vibedoc 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.next/BUILD_ID +1 -0
- package/.next/app-build-manifest.json +92 -0
- package/.next/app-path-routes-manifest.json +1 -0
- package/.next/build-manifest.json +32 -0
- package/.next/package.json +1 -0
- package/.next/prerender-manifest.js +1 -0
- package/.next/prerender-manifest.json +1 -0
- package/.next/react-loadable-manifest.json +282 -0
- package/.next/required-server-files.json +1 -0
- package/.next/routes-manifest.json +1 -0
- package/.next/server/app/(app)/activity/page.js +1 -0
- package/.next/server/app/(app)/activity/page.js.nft.json +1 -0
- package/.next/server/app/(app)/activity/page_client-reference-manifest.js +1 -0
- package/.next/server/app/(app)/board/page.js +2 -0
- package/.next/server/app/(app)/board/page.js.nft.json +1 -0
- package/.next/server/app/(app)/board/page_client-reference-manifest.js +1 -0
- package/.next/server/app/(app)/docs/page.js +2 -0
- package/.next/server/app/(app)/docs/page.js.nft.json +1 -0
- package/.next/server/app/(app)/docs/page_client-reference-manifest.js +1 -0
- package/.next/server/app/(app)/memory/page.js +7 -0
- package/.next/server/app/(app)/memory/page.js.nft.json +1 -0
- package/.next/server/app/(app)/memory/page_client-reference-manifest.js +1 -0
- package/.next/server/app/(app)/settings/page.js +21 -0
- package/.next/server/app/(app)/settings/page.js.nft.json +1 -0
- package/.next/server/app/(app)/settings/page_client-reference-manifest.js +1 -0
- package/.next/server/app/(app)/setup/page.js +1 -0
- package/.next/server/app/(app)/setup/page.js.nft.json +1 -0
- package/.next/server/app/(app)/setup/page_client-reference-manifest.js +1 -0
- package/.next/server/app/_not-found/page.js +1 -0
- package/.next/server/app/_not-found/page.js.nft.json +1 -0
- package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -0
- package/.next/server/app/_not-found.html +1 -0
- package/.next/server/app/_not-found.meta +6 -0
- package/.next/server/app/_not-found.rsc +9 -0
- package/.next/server/app/activity.html +1 -0
- package/.next/server/app/activity.meta +5 -0
- package/.next/server/app/activity.rsc +13 -0
- package/.next/server/app/api/activity/route.js +1 -0
- package/.next/server/app/api/activity/route.js.nft.json +1 -0
- package/.next/server/app/api/backlinks/route.js +1 -0
- package/.next/server/app/api/backlinks/route.js.nft.json +1 -0
- package/.next/server/app/api/context/route.js +1 -0
- package/.next/server/app/api/context/route.js.nft.json +1 -0
- package/.next/server/app/api/decisions/route.js +1 -0
- package/.next/server/app/api/decisions/route.js.nft.json +1 -0
- package/.next/server/app/api/docs/route.js +1 -0
- package/.next/server/app/api/docs/route.js.nft.json +1 -0
- package/.next/server/app/api/events/route.js +3 -0
- package/.next/server/app/api/events/route.js.nft.json +1 -0
- package/.next/server/app/api/mcp/route.js +103 -0
- package/.next/server/app/api/mcp/route.js.nft.json +1 -0
- package/.next/server/app/api/memory/route.js +1 -0
- package/.next/server/app/api/memory/route.js.nft.json +1 -0
- package/.next/server/app/api/projects/route.js +1 -0
- package/.next/server/app/api/projects/route.js.nft.json +1 -0
- package/.next/server/app/api/projects.body +1 -0
- package/.next/server/app/api/projects.meta +1 -0
- package/.next/server/app/api/settings/route.js +1 -0
- package/.next/server/app/api/settings/route.js.nft.json +1 -0
- package/.next/server/app/api/setup/generate/route.js +130 -0
- package/.next/server/app/api/setup/generate/route.js.nft.json +1 -0
- package/.next/server/app/api/setup/write/route.js +1 -0
- package/.next/server/app/api/setup/write/route.js.nft.json +1 -0
- package/.next/server/app/api/summary/route.js +1 -0
- package/.next/server/app/api/summary/route.js.nft.json +1 -0
- package/.next/server/app/api/tasks/route.js +1 -0
- package/.next/server/app/api/tasks/route.js.nft.json +1 -0
- package/.next/server/app/board.html +1 -0
- package/.next/server/app/board.meta +5 -0
- package/.next/server/app/board.rsc +13 -0
- package/.next/server/app/docs.html +1 -0
- package/.next/server/app/docs.meta +5 -0
- package/.next/server/app/docs.rsc +13 -0
- package/.next/server/app/index.html +1 -0
- package/.next/server/app/index.meta +6 -0
- package/.next/server/app/index.rsc +6 -0
- package/.next/server/app/memory.html +1 -0
- package/.next/server/app/memory.meta +5 -0
- package/.next/server/app/memory.rsc +13 -0
- package/.next/server/app/page.js +1 -0
- package/.next/server/app/page.js.nft.json +1 -0
- package/.next/server/app/page_client-reference-manifest.js +1 -0
- package/.next/server/app/settings.html +1 -0
- package/.next/server/app/settings.meta +5 -0
- package/.next/server/app/settings.rsc +13 -0
- package/.next/server/app/setup.html +1 -0
- package/.next/server/app/setup.meta +5 -0
- package/.next/server/app/setup.rsc +13 -0
- package/.next/server/app-paths-manifest.json +24 -0
- package/.next/server/chunks/191.js +91 -0
- package/.next/server/chunks/357.js +2 -0
- package/.next/server/chunks/486.js +12 -0
- package/.next/server/chunks/491.js +2 -0
- package/.next/server/chunks/778.js +9 -0
- package/.next/server/chunks/80.js +60 -0
- package/.next/server/chunks/900.js +6 -0
- package/.next/server/chunks/945.js +20 -0
- package/.next/server/chunks/font-manifest.json +1 -0
- package/.next/server/font-manifest.json +1 -0
- package/.next/server/functions-config-manifest.json +1 -0
- package/.next/server/interception-route-rewrite-manifest.js +1 -0
- package/.next/server/middleware-build-manifest.js +1 -0
- package/.next/server/middleware-manifest.json +6 -0
- package/.next/server/middleware-react-loadable-manifest.js +1 -0
- package/.next/server/next-font-manifest.js +1 -0
- package/.next/server/next-font-manifest.json +1 -0
- package/.next/server/pages/404.html +1 -0
- package/.next/server/pages/500.html +1 -0
- package/.next/server/pages/_app.js +1 -0
- package/.next/server/pages/_app.js.nft.json +1 -0
- package/.next/server/pages/_document.js +1 -0
- package/.next/server/pages/_document.js.nft.json +1 -0
- package/.next/server/pages/_error.js +1 -0
- package/.next/server/pages/_error.js.nft.json +1 -0
- package/.next/server/pages-manifest.json +1 -0
- package/.next/server/server-reference-manifest.js +1 -0
- package/.next/server/server-reference-manifest.json +1 -0
- package/.next/server/webpack-runtime.js +1 -0
- package/.next/static/chunks/1088.464d783cc5eea9de.js +1 -0
- package/.next/static/chunks/1222.e874d92bfc1bc6c7.js +1 -0
- package/.next/static/chunks/1347.3e7d2ed21b663e48.js +1 -0
- package/.next/static/chunks/1433.2f2e32dffc1c27c8.js +1 -0
- package/.next/static/chunks/1472.5e71f95e6296fd63.js +36 -0
- package/.next/static/chunks/1594.09677134642da9ff.js +93 -0
- package/.next/static/chunks/1638.2e37b49b302bcb6a.js +174 -0
- package/.next/static/chunks/2244.cf7a2544ebeb1e19.js +82 -0
- package/.next/static/chunks/228-e44243a26f6475e2.js +9 -0
- package/.next/static/chunks/2306.509ed7c364442601.js +2 -0
- package/.next/static/chunks/2412.949844de7f2bbdc3.js +262 -0
- package/.next/static/chunks/2565.eb3605e7c90e3c7e.js +131 -0
- package/.next/static/chunks/2591.56cbda5d4e6e2943.js +56 -0
- package/.next/static/chunks/2597.ba1681ae114a4aa7.js +29 -0
- package/.next/static/chunks/2647.011471b532619487.js +59 -0
- package/.next/static/chunks/2794.65caa79043b402f7.js +1 -0
- package/.next/static/chunks/2861.4fff66e909869a6d.js +148 -0
- package/.next/static/chunks/2894.5a2b6bbc2c48843d.js +43 -0
- package/.next/static/chunks/3795.50eafedfcd5f01d6.js +24 -0
- package/.next/static/chunks/3904.54baab606637ae6e.js +1 -0
- package/.next/static/chunks/4236.17567db90ef651b7.js +1 -0
- package/.next/static/chunks/4316-6345e1b4bb694a29.js +1 -0
- package/.next/static/chunks/490-ed8ba8bf24ab2f3d.js +1 -0
- package/.next/static/chunks/4982.9f5dde29b741d6dd.js +63 -0
- package/.next/static/chunks/5083.ffcecc2fefa6de50.js +55 -0
- package/.next/static/chunks/5218.35990037cf2fd97c.js +155 -0
- package/.next/static/chunks/5340.5ddd859da4765a69.js +1 -0
- package/.next/static/chunks/5453.47f6d134b08a854e.js +4 -0
- package/.next/static/chunks/5808.d42ab07c5de599fd.js +1 -0
- package/.next/static/chunks/6429.08e2027051a6966c.js +1 -0
- package/.next/static/chunks/6482.03215b09c8639bc2.js +7 -0
- package/.next/static/chunks/6842-aed3c9b445ee77d1.js +2 -0
- package/.next/static/chunks/6864.4be1f9d162073932.js +1 -0
- package/.next/static/chunks/6886.f44c1de05dae9abc.js +1 -0
- package/.next/static/chunks/68bc8b64.37fd49721fa7b320.js +136 -0
- package/.next/static/chunks/6bded0d7-aec80afe2d60204d.js +1 -0
- package/.next/static/chunks/7123.fdc5241f4c912578.js +62 -0
- package/.next/static/chunks/7235.d4cff43d3f970540.js +1 -0
- package/.next/static/chunks/7241.499111c9d51ab606.js +1 -0
- package/.next/static/chunks/7251.17e3ab4cd5935b2e.js +166 -0
- package/.next/static/chunks/7283.d294d5aebfe1c65f.js +215 -0
- package/.next/static/chunks/7292.0dfaab300ca1050a.js +1 -0
- package/.next/static/chunks/7527.0ccae900ac492b8c.js +1 -0
- package/.next/static/chunks/7697-812a5639d661760b.js +1 -0
- package/.next/static/chunks/7722.d7a4456b068af3c0.js +24 -0
- package/.next/static/chunks/7725-63beec2ffb219859.js +16 -0
- package/.next/static/chunks/8130.609cf9a280803973.js +1 -0
- package/.next/static/chunks/8338.2415ec79a5f31092.js +1 -0
- package/.next/static/chunks/845-0e3438196b5ef62c.js +1 -0
- package/.next/static/chunks/8836.71b3f39cb9a95d62.js +5 -0
- package/.next/static/chunks/942c9eea.2013b980eeaebb14.js +53 -0
- package/.next/static/chunks/94c12b52-436125ce5f9c910a.js +1 -0
- package/.next/static/chunks/9528.4d4672f83c5035ab.js +1 -0
- package/.next/static/chunks/9580.942737df82878943.js +1 -0
- package/.next/static/chunks/9672.cb194a5bbad5f696.js +1 -0
- package/.next/static/chunks/app/(app)/activity/page-91b9d738c33e19b5.js +1 -0
- package/.next/static/chunks/app/(app)/board/page-33f5e3998a8445ca.js +1 -0
- package/.next/static/chunks/app/(app)/docs/page-17670ed46c3594e6.js +1 -0
- package/.next/static/chunks/app/(app)/layout-34b4046ccf919d3f.js +1 -0
- package/.next/static/chunks/app/(app)/memory/page-b3aa8c5e028caf75.js +1 -0
- package/.next/static/chunks/app/(app)/settings/page-f264516b9005f933.js +16 -0
- package/.next/static/chunks/app/(app)/setup/page-9fd82b10016eca64.js +16 -0
- package/.next/static/chunks/app/_not-found/page-73e8eefca2388c5f.js +1 -0
- package/.next/static/chunks/app/layout-7054561bfe7eec9c.js +1 -0
- package/.next/static/chunks/app/page-f71834a10930be30.js +1 -0
- package/.next/static/chunks/b09b44eb.fa180e586fdf600b.js +1 -0
- package/.next/static/chunks/ea0025a9.12db9045daafb0c1.js +1 -0
- package/.next/static/chunks/efcceb14.8fc58c5c4428a08e.js +1 -0
- package/.next/static/chunks/framework-20afca218c33ed8b.js +33 -0
- package/.next/static/chunks/main-6224705d81e790a3.js +1 -0
- package/.next/static/chunks/main-app-02ed5dd91baaafdc.js +1 -0
- package/.next/static/chunks/pages/_app-db7a259df1c8778b.js +1 -0
- package/.next/static/chunks/pages/_error-76163253f7e717d4.js +1 -0
- package/.next/static/chunks/polyfills-78c92fac7aa8fdd8.js +1 -0
- package/.next/static/chunks/webpack-648d3cb0a281bce5.js +1 -0
- package/.next/static/css/615004f0fff77145.css +5 -0
- package/.next/static/r-2w-yCd6mM7TOOETgGaA/_buildManifest.js +1 -0
- package/.next/static/r-2w-yCd6mM7TOOETgGaA/_ssgManifest.js +1 -0
- package/README.md +160 -0
- package/bin/vibedoc.js +54 -0
- package/next.config.js +7 -0
- package/package.json +80 -0
- package/ws-server.js +12 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[845],{82825:function(e,t,a){a.d(t,{t:function(){return p}});var n=a(59533),s=a(31229),r=a(21263),o=a(66611),d=a(52284),i=a(72374),l=a(220),c=a(13191),u=a(8637);let f=new Date().toISOString().split("T")[0],m=[{id:"blank",name:"Blank Document",description:"Empty markdown file",defaultPath:"docs/untitled.md",content:"# Untitled\n\n"},{id:"claude-md",name:"CLAUDE.md",description:"AI agent instructions for Claude Code",defaultPath:"CLAUDE.md",content:"# Project Instructions\n\n## What this is\n\n## Stack\n\n## Commands\n```bash\n# install\n# dev\n# build\n```\n\n## Key conventions\n\n## Non-negotiables\n"},{id:"agents-md",name:"AGENTS.md",description:"AI agent instructions (multi-agent)",defaultPath:"AGENTS.md",content:"# Agent Instructions\n\n## Overview\n\n## Agents\n\n### Agent 1\n- **Role:**\n- **Tools:**\n\n## Shared conventions\n"},{id:"prd",name:"Product Requirements",description:"Product requirements document",defaultPath:"docs/prd.md",content:"# Product Requirements\n\n**Status:** Draft\n**Last updated:** ".concat(f,"\n\n## Problem\n\n## Goals\n\n## Non-goals\n\n## Requirements\n\n### Functional\n\n### Non-functional\n\n## Open questions\n")},{id:"architecture-overview",name:"Architecture Overview",description:"System architecture doc",defaultPath:"docs/architecture/overview.md",content:"# Architecture Overview\n\n**Last updated:** ".concat(f,"\n\n## Diagram\n\n```mermaid\ngraph TB\n A[Client] --> B[API]\n B --> C[DB]\n```\n\n## Components\n\n## Key decisions\n")},{id:"api-reference",name:"API Reference",description:"API endpoints reference",defaultPath:"docs/api-reference.md",content:"# API Reference\n\n## Base URL\n\n```\nhttps://api.example.com/v1\n```\n\n## Authentication\n\n## Endpoints\n\n### GET /resource\n\n**Response:**\n```json\n{}\n```\n"},{id:"runbook",name:"Runbook",description:"Operational runbook",defaultPath:"docs/runbook.md",content:"# Runbook\n\n**Last updated:** ".concat(f,"\n\n## Overview\n\n## Procedures\n\n### Deploy\n\n### Rollback\n\n### Troubleshooting\n\n## Contacts\n")},{id:"adr",name:"Architecture Decision",description:"Architecture Decision Record",defaultPath:"docs/architecture/decisions/ADR-001.md",content:"# ADR-001: Title\n\n**Status:** Proposed\n**Date:** ".concat(f,"\n\n## Context\n\n## Decision\n\n## Rationale\n\n## Consequences\n")},{id:"meeting-notes",name:"Meeting Notes",description:"Meeting notes template",defaultPath:"docs/meetings/".concat(f,".md"),content:"# Meeting Notes — ".concat(f,"\n\n**Attendees:**\n\n## Agenda\n\n## Notes\n\n## Action items\n\n| Action | Owner | Due |\n|--------|-------|-----|\n| | | |\n")},{id:"onboarding",name:"Onboarding Guide",description:"Developer onboarding guide",defaultPath:"docs/onboarding.md",content:"# Developer Onboarding\n\n**Last updated:** ".concat(f,"\n\n## Setup\n\n```bash\ngit clone <repo>\nnpm install\nnpm run dev\n```\n\n## Project structure\n\n## Key concepts\n\n## Who to ask\n")}];function p(e){let{open:t,onOpenChange:a,rootParam:f,onDocCreated:p}=e,[x,h]=(0,s.useState)(1),[g,b]=(0,s.useState)(null),[v,k]=(0,s.useState)(""),[N,y]=(0,s.useState)(""),[w,j]=(0,s.useState)(!1);async function C(){if(g&&v.trim()){y(""),j(!0);try{let e=await fetch("/api/docs".concat(f),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:v.trim(),content:g.content})});if(409===e.status){y("File already exists"),j(!1);return}if(!e.ok){let t=await e.json();y(t.error||"Failed to create file"),j(!1);return}a(!1),p(v.trim())}catch(e){y("Network error"),j(!1)}}}return(0,s.useEffect)(()=>{t&&(h(1),b(null),k(""),y(""),j(!1))},[t]),(0,n.jsx)(i.Vq,{open:t,onOpenChange:a,children:(0,n.jsxs)(i.cZ,{className:"max-w-2xl bg-surface border-border",children:[(0,n.jsx)(i.fK,{children:(0,n.jsx)(i.$N,{className:"text-txt text-sm font-semibold",children:1===x?"Choose a template":"Confirm file path"})}),1===x&&(0,n.jsx)(u.x,{className:"max-h-[420px]",children:(0,n.jsx)("div",{className:"grid grid-cols-3 gap-2 p-1",children:m.map(e=>(0,n.jsxs)("button",{onClick:()=>{b(e),k(e.defaultPath),y(""),h(2)},className:(0,d.cn)("flex flex-col items-start gap-1.5 p-3 rounded-lg border border-border text-left","bg-surface2 hover:bg-surface2/80 hover:border-accent/50 transition-colors"),children:[(0,n.jsxs)("div",{className:"flex items-center gap-2",children:[(0,n.jsx)(r.Z,{className:"h-3.5 w-3.5 text-accent shrink-0"}),(0,n.jsx)("span",{className:"text-xs font-medium text-txt",children:e.name})]}),(0,n.jsx)("p",{className:"text-[11px] text-muted leading-relaxed",children:e.description}),(0,n.jsx)("p",{className:"text-[10px] text-muted/60 font-mono truncate w-full",children:e.defaultPath})]},e.id))})}),2===x&&g&&(0,n.jsxs)("div",{className:"space-y-4",children:[(0,n.jsxs)("div",{className:"flex items-start gap-3 p-3 rounded-lg bg-surface2 border border-border",children:[(0,n.jsx)(r.Z,{className:"h-4 w-4 text-accent shrink-0 mt-0.5"}),(0,n.jsxs)("div",{children:[(0,n.jsx)("p",{className:"text-xs font-medium text-txt",children:g.name}),(0,n.jsx)("p",{className:"text-[11px] text-muted mt-0.5",children:g.description})]})]}),(0,n.jsxs)("div",{className:"space-y-1.5",children:[(0,n.jsx)("label",{className:"text-[11px] font-medium text-muted uppercase tracking-wider",children:"File path"}),(0,n.jsx)(c.I,{autoFocus:!0,value:v,onChange:e=>{k(e.target.value),y("")},onKeyDown:e=>{"Enter"===e.key&&C()},placeholder:"docs/my-document.md",className:"h-8 text-xs bg-surface2 border-border font-mono"}),N&&(0,n.jsx)("p",{className:"text-[11px] text-red-400",children:N})]}),(0,n.jsxs)("div",{className:"flex items-center justify-between pt-1",children:[(0,n.jsxs)(l.z,{variant:"ghost",size:"sm",onClick:()=>h(1),className:"h-7 text-xs text-muted hover:text-txt gap-1.5",children:[(0,n.jsx)(o.Z,{className:"h-3 w-3"}),"Back"]}),(0,n.jsx)(l.z,{size:"sm",onClick:C,disabled:w||!v.trim(),className:"h-7 text-xs bg-accent hover:bg-accent/90 text-white",children:w?"Creating…":"Create"})]})]})]})})}},71301:function(e,t,a){a.d(t,{C:function(){return d}});var n=a(59533);a(31229);var s=a(95084),r=a(52284);let o=(0,s.j)("inline-flex items-center rounded-full border border-slate-200 px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-slate-950 focus:ring-offset-2 dark:border-slate-800 dark:focus:ring-slate-300",{variants:{variant:{default:"border-transparent bg-slate-900 text-slate-50 hover:bg-slate-900/80 dark:bg-slate-50 dark:text-slate-900 dark:hover:bg-slate-50/80",secondary:"border-transparent bg-slate-100 text-slate-900 hover:bg-slate-100/80 dark:bg-slate-800 dark:text-slate-50 dark:hover:bg-slate-800/80",destructive:"border-transparent bg-red-500 text-slate-50 hover:bg-red-500/80 dark:bg-red-900 dark:text-slate-50 dark:hover:bg-red-900/80",outline:"text-slate-950 dark:text-slate-50"}},defaultVariants:{variant:"default"}});function d(e){let{className:t,variant:a,...s}=e;return(0,n.jsx)("div",{className:(0,r.cn)(o({variant:a}),t),...s})}},220:function(e,t,a){a.d(t,{z:function(){return l}});var n=a(59533),s=a(31229),r=a(38777),o=a(95084),d=a(52284);let i=(0,o.j)("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-white transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-slate-950 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 dark:ring-offset-slate-950 dark:focus-visible:ring-slate-300",{variants:{variant:{default:"bg-slate-900 text-slate-50 hover:bg-slate-900/90 dark:bg-slate-50 dark:text-slate-900 dark:hover:bg-slate-50/90",destructive:"bg-red-500 text-slate-50 hover:bg-red-500/90 dark:bg-red-900 dark:text-slate-50 dark:hover:bg-red-900/90",outline:"border border-slate-200 bg-white hover:bg-slate-100 hover:text-slate-900 dark:border-slate-800 dark:bg-slate-950 dark:hover:bg-slate-800 dark:hover:text-slate-50",secondary:"bg-slate-100 text-slate-900 hover:bg-slate-100/80 dark:bg-slate-800 dark:text-slate-50 dark:hover:bg-slate-800/80",ghost:"hover:bg-slate-100 hover:text-slate-900 dark:hover:bg-slate-800 dark:hover:text-slate-50",link:"text-slate-900 underline-offset-4 hover:underline dark:text-slate-50"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),l=s.forwardRef((e,t)=>{let{className:a,variant:s,size:o,asChild:l=!1,...c}=e,u=l?r.g7:"button";return(0,n.jsx)(u,{className:(0,d.cn)(i({variant:s,size:o,className:a})),ref:t,...c})});l.displayName="Button"},72374:function(e,t,a){a.d(t,{$N:function(){return m},Vq:function(){return i},cZ:function(){return u},fK:function(){return f}});var n=a(59533),s=a(31229),r=a(68778),o=a(46850),d=a(52284);let i=r.fC;r.xz;let l=r.h_;r.x8;let c=s.forwardRef((e,t)=>{let{className:a,...s}=e;return(0,n.jsx)(r.aV,{ref:t,className:(0,d.cn)("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",a),...s})});c.displayName=r.aV.displayName;let u=s.forwardRef((e,t)=>{let{className:a,children:s,...i}=e;return(0,n.jsxs)(l,{children:[(0,n.jsx)(c,{}),(0,n.jsxs)(r.VY,{ref:t,className:(0,d.cn)("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border border-slate-200 bg-white p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg dark:border-slate-800 dark:bg-slate-950",a),...i,children:[s,(0,n.jsxs)(r.x8,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-white transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-slate-950 focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-slate-100 data-[state=open]:text-slate-500 dark:ring-offset-slate-950 dark:focus:ring-slate-300 dark:data-[state=open]:bg-slate-800 dark:data-[state=open]:text-slate-400",children:[(0,n.jsx)(o.Z,{className:"h-4 w-4"}),(0,n.jsx)("span",{className:"sr-only",children:"Close"})]})]})]})});u.displayName=r.VY.displayName;let f=e=>{let{className:t,...a}=e;return(0,n.jsx)("div",{className:(0,d.cn)("flex flex-col space-y-1.5 text-center sm:text-left",t),...a})};f.displayName="DialogHeader";let m=s.forwardRef((e,t)=>{let{className:a,...s}=e;return(0,n.jsx)(r.Dx,{ref:t,className:(0,d.cn)("text-lg font-semibold leading-none tracking-tight",a),...s})});m.displayName=r.Dx.displayName,s.forwardRef((e,t)=>{let{className:a,...s}=e;return(0,n.jsx)(r.dk,{ref:t,className:(0,d.cn)("text-sm text-slate-500 dark:text-slate-400",a),...s})}).displayName=r.dk.displayName},83373:function(e,t,a){a.d(t,{$F:function(){return u},AW:function(){return f},Xi:function(){return m},h_:function(){return c}});var n=a(59533),s=a(31229),r=a(9140),o=a(12794),d=a(20508),i=a(34457),l=a(52284);let c=r.fC,u=r.xz;r.ZA,r.Uv,r.Tr,r.Ee,s.forwardRef((e,t)=>{let{className:a,inset:s,children:d,...i}=e;return(0,n.jsxs)(r.fF,{ref:t,className:(0,l.cn)("flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-slate-100 data-[state=open]:bg-slate-100 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 dark:focus:bg-slate-800 dark:data-[state=open]:bg-slate-800",s&&"pl-8",a),...i,children:[d,(0,n.jsx)(o.Z,{className:"ml-auto"})]})}).displayName=r.fF.displayName,s.forwardRef((e,t)=>{let{className:a,...s}=e;return(0,n.jsx)(r.tu,{ref:t,className:(0,l.cn)("z-50 min-w-[8rem] overflow-hidden rounded-md border border-slate-200 bg-white p-1 text-slate-950 shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-dropdown-menu-content-transform-origin] dark:border-slate-800 dark:bg-slate-950 dark:text-slate-50",a),...s})}).displayName=r.tu.displayName;let f=s.forwardRef((e,t)=>{let{className:a,sideOffset:s=4,...o}=e;return(0,n.jsx)(r.Uv,{children:(0,n.jsx)(r.VY,{ref:t,sideOffset:s,className:(0,l.cn)("z-50 max-h-[var(--radix-dropdown-menu-content-available-height)] min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-md border border-slate-200 bg-white p-1 text-slate-950 shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-dropdown-menu-content-transform-origin] dark:border-slate-800 dark:bg-slate-950 dark:text-slate-50",a),...o})})});f.displayName=r.VY.displayName;let m=s.forwardRef((e,t)=>{let{className:a,inset:s,...o}=e;return(0,n.jsx)(r.ck,{ref:t,className:(0,l.cn)("relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-slate-100 focus:text-slate-900 data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 dark:focus:bg-slate-800 dark:focus:text-slate-50",s&&"pl-8",a),...o})});m.displayName=r.ck.displayName,s.forwardRef((e,t)=>{let{className:a,children:s,checked:o,...i}=e;return(0,n.jsxs)(r.oC,{ref:t,className:(0,l.cn)("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-slate-100 focus:text-slate-900 data-[disabled]:pointer-events-none data-[disabled]:opacity-50 dark:focus:bg-slate-800 dark:focus:text-slate-50",a),checked:o,...i,children:[(0,n.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,n.jsx)(r.wU,{children:(0,n.jsx)(d.Z,{className:"h-4 w-4"})})}),s]})}).displayName=r.oC.displayName,s.forwardRef((e,t)=>{let{className:a,children:s,...o}=e;return(0,n.jsxs)(r.Rk,{ref:t,className:(0,l.cn)("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-slate-100 focus:text-slate-900 data-[disabled]:pointer-events-none data-[disabled]:opacity-50 dark:focus:bg-slate-800 dark:focus:text-slate-50",a),...o,children:[(0,n.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,n.jsx)(r.wU,{children:(0,n.jsx)(i.Z,{className:"h-2 w-2 fill-current"})})}),s]})}).displayName=r.Rk.displayName,s.forwardRef((e,t)=>{let{className:a,inset:s,...o}=e;return(0,n.jsx)(r.__,{ref:t,className:(0,l.cn)("px-2 py-1.5 text-sm font-semibold",s&&"pl-8",a),...o})}).displayName=r.__.displayName,s.forwardRef((e,t)=>{let{className:a,...s}=e;return(0,n.jsx)(r.Z0,{ref:t,className:(0,l.cn)("-mx-1 my-1 h-px bg-slate-100 dark:bg-slate-800",a),...s})}).displayName=r.Z0.displayName},13191:function(e,t,a){a.d(t,{I:function(){return o}});var n=a(59533),s=a(31229),r=a(52284);let o=s.forwardRef((e,t)=>{let{className:a,type:s,...o}=e;return(0,n.jsx)("input",{type:s,className:(0,r.cn)("flex h-10 w-full rounded-md border border-slate-200 bg-white px-3 py-2 text-base ring-offset-white file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-slate-950 placeholder:text-slate-500 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-slate-950 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm dark:border-slate-800 dark:bg-slate-950 dark:ring-offset-slate-950 dark:file:text-slate-50 dark:placeholder:text-slate-400 dark:focus-visible:ring-slate-300",a),ref:t,...o})});o.displayName="Input"},8637:function(e,t,a){a.d(t,{x:function(){return d}});var n=a(59533),s=a(31229),r=a(19006),o=a(52284);let d=s.forwardRef((e,t)=>{let{className:a,children:s,...d}=e;return(0,n.jsxs)(r.fC,{ref:t,className:(0,o.cn)("relative overflow-hidden",a),...d,children:[(0,n.jsx)(r.l_,{className:"h-full w-full rounded-[inherit]",children:s}),(0,n.jsx)(i,{}),(0,n.jsx)(r.Ns,{})]})});d.displayName=r.fC.displayName;let i=s.forwardRef((e,t)=>{let{className:a,orientation:s="vertical",...d}=e;return(0,n.jsx)(r.gb,{ref:t,orientation:s,className:(0,o.cn)("flex touch-none select-none transition-colors","vertical"===s&&"h-full w-2.5 border-l border-l-transparent p-[1px]","horizontal"===s&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",a),...d,children:(0,n.jsx)(r.q4,{className:"relative flex-1 rounded-full bg-slate-200 dark:bg-slate-800"})})});i.displayName=r.gb.displayName},12301:function(e,t,a){a.d(t,{Z:function(){return d}});var n=a(59533),s=a(31229),r=a(513),o=a(52284);let d=s.forwardRef((e,t)=>{let{className:a,orientation:s="horizontal",decorative:d=!0,...i}=e;return(0,n.jsx)(r.f,{ref:t,decorative:d,orientation:s,className:(0,o.cn)("shrink-0 bg-slate-200 dark:bg-slate-800","horizontal"===s?"h-[1px] w-full":"h-full w-[1px]",a),...i})});d.displayName=r.f.displayName},17477:function(e,t,a){a.d(t,{_v:function(){return c},aJ:function(){return l},pn:function(){return d},u:function(){return i}});var n=a(59533),s=a(31229),r=a(9332),o=a(52284);let d=r.zt,i=r.fC,l=r.xz,c=s.forwardRef((e,t)=>{let{className:a,sideOffset:s=4,...d}=e;return(0,n.jsx)(r.VY,{ref:t,sideOffset:s,className:(0,o.cn)("z-50 overflow-hidden rounded-md border border-slate-200 bg-white px-3 py-1.5 text-sm text-slate-950 shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-tooltip-content-transform-origin] dark:border-slate-800 dark:bg-slate-950 dark:text-slate-50",a),...d})});c.displayName=r.VY.displayName},11180:function(e,t,a){a.d(t,{q:function(){return d},w:function(){return i}});var n=a(59533),s=a(31229),r=a(61250);let o=(0,s.createContext)(null);function d(){let e=(0,s.useContext)(o);if(!e)throw Error("useApp must be used inside AppProvider");return e}function i(e){let{children:t}=e,a=(0,r.useRouter)(),[d,i]=(0,s.useState)([]),[l,c]=(0,s.useState)(""),[u,f]=(0,s.useState)(null),[m,p]=(0,s.useState)(null),[x,h]=(0,s.useState)([]),[g,b]=(0,s.useState)(!0),[v,k]=(0,s.useState)(!1),[N,y]=(0,s.useState)(null),w=(0,s.useRef)(null),j=l?"?root=".concat(encodeURIComponent(l)):"",C=(0,s.useCallback)(async e=>{let t=e||l;if(!t)return;let a="?root=".concat(encodeURIComponent(t));try{let[e,t,n]=await Promise.all([fetch("/api/summary".concat(a)).then(e=>e.json()),fetch("/api/tasks".concat(a)).then(e=>e.json()),fetch("/api/activity".concat(a,"&limit=30")).then(e=>e.json())]);f(e),p(t.board),h(Array.isArray(n)?n:[])}catch(e){}b(!1)},[l]);(0,s.useEffect)(()=>{fetch("/api/projects").then(e=>e.json()).then(e=>{i(e),e.length>0?(c(e[0].root),C(e[0].root)):b(!1)}).catch(()=>b(!1))},[]),(0,s.useEffect)(()=>{if(!l)return;let e=new EventSource("/api/events");return w.current=e,e.onmessage=e=>{try{let t=JSON.parse(e.data);if("connected"===t.type)return;k(!0),setTimeout(()=>k(!1),2e3),["task_updated","decision_logged","memory_updated","session_start"].includes(t.type)&&C()}catch(e){}},()=>{e.close()}},[l,C]);let R=(0,s.useCallback)(async(e,t)=>{p(a=>{let n;if(!a)return a;let s=structuredClone(a);for(let a of Object.keys(s)){let r=s[a].findIndex(t=>t.id===e);-1!==r&&(n={...s[a][r],status:t},s[a]=s[a].filter(t=>t.id!==e))}return n&&s[t]&&(s[t]=[n,...s[t]]),s});try{await fetch("/api/tasks".concat(j),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({taskId:e,status:t,actor:"human"})}),C()}catch(e){C()}},[j,C]),A=(0,s.useCallback)(async e=>{let t=await fetch("/api/docs".concat(j,"&read=").concat(encodeURIComponent(e)));y(await t.json()),a.push("/docs")},[j,a]);return(0,n.jsx)(o.Provider,{value:{projects:d,activeProject:l,summary:u,board:m,activity:x,liveIndicator:v,loading:g,selectedDoc:N,setSelectedDoc:y,rootParam:j,onProjectChange:function(e){c(e),C(e)},refresh:C,moveTask:R,openDoc:A},children:t})}},52284:function(e,t,a){a.d(t,{cn:function(){return r}});var n=a(27494),s=a(724);function r(){for(var e=arguments.length,t=Array(e),a=0;a<e;a++)t[a]=arguments[a];return(0,s.m6)((0,n.W)(t))}}}]);
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8836],{78836:function(t,e,a){a.d(e,{diagram:function(){return tR}});var n,i=a(74275),r=a(21599),s=a(35425),l=a(28311),o=a(42325),h=a(41195),d=function(){var t=(0,l.eW)(function(t,e,a,n){for(a=a||{},n=t.length;n--;a[t[n]]=e);return a},"o"),e=[1,24],a=[1,25],n=[1,26],i=[1,27],r=[1,28],s=[1,63],o=[1,64],h=[1,65],d=[1,66],u=[1,67],p=[1,68],y=[1,69],f=[1,29],b=[1,30],g=[1,31],x=[1,32],_=[1,33],m=[1,34],E=[1,35],A=[1,36],S=[1,37],C=[1,38],k=[1,39],O=[1,40],w=[1,41],T=[1,42],v=[1,43],R=[1,44],D=[1,45],N=[1,46],W=[1,47],P=[1,48],M=[1,50],B=[1,51],j=[1,52],Y=[1,53],I=[1,54],L=[1,55],U=[1,56],F=[1,57],X=[1,58],z=[1,59],Q=[1,60],$=[14,42],q=[14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],V=[12,14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],H=[1,82],G=[1,83],K=[1,84],J=[1,85],Z=[12,14,42],tt=[12,14,33,42],te=[12,14,33,42,76,77,79,80],ta=[12,33],tn=[34,36,37,38,39,40,41,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],ti={trace:(0,l.eW)(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mermaidDoc:4,direction:5,direction_tb:6,direction_bt:7,direction_rl:8,direction_lr:9,graphConfig:10,C4_CONTEXT:11,NEWLINE:12,statements:13,EOF:14,C4_CONTAINER:15,C4_COMPONENT:16,C4_DYNAMIC:17,C4_DEPLOYMENT:18,otherStatements:19,diagramStatements:20,otherStatement:21,title:22,accDescription:23,acc_title:24,acc_title_value:25,acc_descr:26,acc_descr_value:27,acc_descr_multiline_value:28,boundaryStatement:29,boundaryStartStatement:30,boundaryStopStatement:31,boundaryStart:32,LBRACE:33,ENTERPRISE_BOUNDARY:34,attributes:35,SYSTEM_BOUNDARY:36,BOUNDARY:37,CONTAINER_BOUNDARY:38,NODE:39,NODE_L:40,NODE_R:41,RBRACE:42,diagramStatement:43,PERSON:44,PERSON_EXT:45,SYSTEM:46,SYSTEM_DB:47,SYSTEM_QUEUE:48,SYSTEM_EXT:49,SYSTEM_EXT_DB:50,SYSTEM_EXT_QUEUE:51,CONTAINER:52,CONTAINER_DB:53,CONTAINER_QUEUE:54,CONTAINER_EXT:55,CONTAINER_EXT_DB:56,CONTAINER_EXT_QUEUE:57,COMPONENT:58,COMPONENT_DB:59,COMPONENT_QUEUE:60,COMPONENT_EXT:61,COMPONENT_EXT_DB:62,COMPONENT_EXT_QUEUE:63,REL:64,BIREL:65,REL_U:66,REL_D:67,REL_L:68,REL_R:69,REL_B:70,REL_INDEX:71,UPDATE_EL_STYLE:72,UPDATE_REL_STYLE:73,UPDATE_LAYOUT_CONFIG:74,attribute:75,STR:76,STR_KEY:77,STR_VALUE:78,ATTRIBUTE:79,ATTRIBUTE_EMPTY:80,$accept:0,$end:1},terminals_:{2:"error",6:"direction_tb",7:"direction_bt",8:"direction_rl",9:"direction_lr",11:"C4_CONTEXT",12:"NEWLINE",14:"EOF",15:"C4_CONTAINER",16:"C4_COMPONENT",17:"C4_DYNAMIC",18:"C4_DEPLOYMENT",22:"title",23:"accDescription",24:"acc_title",25:"acc_title_value",26:"acc_descr",27:"acc_descr_value",28:"acc_descr_multiline_value",33:"LBRACE",34:"ENTERPRISE_BOUNDARY",36:"SYSTEM_BOUNDARY",37:"BOUNDARY",38:"CONTAINER_BOUNDARY",39:"NODE",40:"NODE_L",41:"NODE_R",42:"RBRACE",44:"PERSON",45:"PERSON_EXT",46:"SYSTEM",47:"SYSTEM_DB",48:"SYSTEM_QUEUE",49:"SYSTEM_EXT",50:"SYSTEM_EXT_DB",51:"SYSTEM_EXT_QUEUE",52:"CONTAINER",53:"CONTAINER_DB",54:"CONTAINER_QUEUE",55:"CONTAINER_EXT",56:"CONTAINER_EXT_DB",57:"CONTAINER_EXT_QUEUE",58:"COMPONENT",59:"COMPONENT_DB",60:"COMPONENT_QUEUE",61:"COMPONENT_EXT",62:"COMPONENT_EXT_DB",63:"COMPONENT_EXT_QUEUE",64:"REL",65:"BIREL",66:"REL_U",67:"REL_D",68:"REL_L",69:"REL_R",70:"REL_B",71:"REL_INDEX",72:"UPDATE_EL_STYLE",73:"UPDATE_REL_STYLE",74:"UPDATE_LAYOUT_CONFIG",76:"STR",77:"STR_KEY",78:"STR_VALUE",79:"ATTRIBUTE",80:"ATTRIBUTE_EMPTY"},productions_:[0,[3,1],[3,1],[5,1],[5,1],[5,1],[5,1],[4,1],[10,4],[10,4],[10,4],[10,4],[10,4],[13,1],[13,1],[13,2],[19,1],[19,2],[19,3],[21,1],[21,1],[21,2],[21,2],[21,1],[29,3],[30,3],[30,3],[30,4],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[31,1],[20,1],[20,2],[20,3],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,1],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[35,1],[35,2],[75,1],[75,2],[75,1],[75,1]],performAction:(0,l.eW)(function(t,e,a,n,i,r,s){var l=r.length-1;switch(i){case 3:n.setDirection("TB");break;case 4:n.setDirection("BT");break;case 5:n.setDirection("RL");break;case 6:n.setDirection("LR");break;case 8:case 9:case 10:case 11:case 12:n.setC4Type(r[l-3]);break;case 19:n.setTitle(r[l].substring(6)),this.$=r[l].substring(6);break;case 20:n.setAccDescription(r[l].substring(15)),this.$=r[l].substring(15);break;case 21:this.$=r[l].trim(),n.setTitle(this.$);break;case 22:case 23:this.$=r[l].trim(),n.setAccDescription(this.$);break;case 28:r[l].splice(2,0,"ENTERPRISE"),n.addPersonOrSystemBoundary(...r[l]),this.$=r[l];break;case 29:r[l].splice(2,0,"SYSTEM"),n.addPersonOrSystemBoundary(...r[l]),this.$=r[l];break;case 30:n.addPersonOrSystemBoundary(...r[l]),this.$=r[l];break;case 31:r[l].splice(2,0,"CONTAINER"),n.addContainerBoundary(...r[l]),this.$=r[l];break;case 32:n.addDeploymentNode("node",...r[l]),this.$=r[l];break;case 33:n.addDeploymentNode("nodeL",...r[l]),this.$=r[l];break;case 34:n.addDeploymentNode("nodeR",...r[l]),this.$=r[l];break;case 35:n.popBoundaryParseStack();break;case 39:n.addPersonOrSystem("person",...r[l]),this.$=r[l];break;case 40:n.addPersonOrSystem("external_person",...r[l]),this.$=r[l];break;case 41:n.addPersonOrSystem("system",...r[l]),this.$=r[l];break;case 42:n.addPersonOrSystem("system_db",...r[l]),this.$=r[l];break;case 43:n.addPersonOrSystem("system_queue",...r[l]),this.$=r[l];break;case 44:n.addPersonOrSystem("external_system",...r[l]),this.$=r[l];break;case 45:n.addPersonOrSystem("external_system_db",...r[l]),this.$=r[l];break;case 46:n.addPersonOrSystem("external_system_queue",...r[l]),this.$=r[l];break;case 47:n.addContainer("container",...r[l]),this.$=r[l];break;case 48:n.addContainer("container_db",...r[l]),this.$=r[l];break;case 49:n.addContainer("container_queue",...r[l]),this.$=r[l];break;case 50:n.addContainer("external_container",...r[l]),this.$=r[l];break;case 51:n.addContainer("external_container_db",...r[l]),this.$=r[l];break;case 52:n.addContainer("external_container_queue",...r[l]),this.$=r[l];break;case 53:n.addComponent("component",...r[l]),this.$=r[l];break;case 54:n.addComponent("component_db",...r[l]),this.$=r[l];break;case 55:n.addComponent("component_queue",...r[l]),this.$=r[l];break;case 56:n.addComponent("external_component",...r[l]),this.$=r[l];break;case 57:n.addComponent("external_component_db",...r[l]),this.$=r[l];break;case 58:n.addComponent("external_component_queue",...r[l]),this.$=r[l];break;case 60:n.addRel("rel",...r[l]),this.$=r[l];break;case 61:n.addRel("birel",...r[l]),this.$=r[l];break;case 62:n.addRel("rel_u",...r[l]),this.$=r[l];break;case 63:n.addRel("rel_d",...r[l]),this.$=r[l];break;case 64:n.addRel("rel_l",...r[l]),this.$=r[l];break;case 65:n.addRel("rel_r",...r[l]),this.$=r[l];break;case 66:n.addRel("rel_b",...r[l]),this.$=r[l];break;case 67:r[l].splice(0,1),n.addRel("rel",...r[l]),this.$=r[l];break;case 68:n.updateElStyle("update_el_style",...r[l]),this.$=r[l];break;case 69:n.updateRelStyle("update_rel_style",...r[l]),this.$=r[l];break;case 70:n.updateLayoutConfig("update_layout_config",...r[l]),this.$=r[l];break;case 71:this.$=[r[l]];break;case 72:r[l].unshift(r[l-1]),this.$=r[l];break;case 73:case 75:this.$=r[l].trim();break;case 74:let o={};o[r[l-1].trim()]=r[l].trim(),this.$=o;break;case 76:this.$=""}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],7:[1,6],8:[1,7],9:[1,8],10:4,11:[1,9],15:[1,10],16:[1,11],17:[1,12],18:[1,13]},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,7]},{1:[2,3]},{1:[2,4]},{1:[2,5]},{1:[2,6]},{12:[1,14]},{12:[1,15]},{12:[1,16]},{12:[1,17]},{12:[1,18]},{13:19,19:20,20:21,21:22,22:e,23:a,24:n,26:i,28:r,29:49,30:61,32:62,34:s,36:o,37:h,38:d,39:u,40:p,41:y,43:23,44:f,45:b,46:g,47:x,48:_,49:m,50:E,51:A,52:S,53:C,54:k,55:O,56:w,57:T,58:v,59:R,60:D,61:N,62:W,63:P,64:M,65:B,66:j,67:Y,68:I,69:L,70:U,71:F,72:X,73:z,74:Q},{13:70,19:20,20:21,21:22,22:e,23:a,24:n,26:i,28:r,29:49,30:61,32:62,34:s,36:o,37:h,38:d,39:u,40:p,41:y,43:23,44:f,45:b,46:g,47:x,48:_,49:m,50:E,51:A,52:S,53:C,54:k,55:O,56:w,57:T,58:v,59:R,60:D,61:N,62:W,63:P,64:M,65:B,66:j,67:Y,68:I,69:L,70:U,71:F,72:X,73:z,74:Q},{13:71,19:20,20:21,21:22,22:e,23:a,24:n,26:i,28:r,29:49,30:61,32:62,34:s,36:o,37:h,38:d,39:u,40:p,41:y,43:23,44:f,45:b,46:g,47:x,48:_,49:m,50:E,51:A,52:S,53:C,54:k,55:O,56:w,57:T,58:v,59:R,60:D,61:N,62:W,63:P,64:M,65:B,66:j,67:Y,68:I,69:L,70:U,71:F,72:X,73:z,74:Q},{13:72,19:20,20:21,21:22,22:e,23:a,24:n,26:i,28:r,29:49,30:61,32:62,34:s,36:o,37:h,38:d,39:u,40:p,41:y,43:23,44:f,45:b,46:g,47:x,48:_,49:m,50:E,51:A,52:S,53:C,54:k,55:O,56:w,57:T,58:v,59:R,60:D,61:N,62:W,63:P,64:M,65:B,66:j,67:Y,68:I,69:L,70:U,71:F,72:X,73:z,74:Q},{13:73,19:20,20:21,21:22,22:e,23:a,24:n,26:i,28:r,29:49,30:61,32:62,34:s,36:o,37:h,38:d,39:u,40:p,41:y,43:23,44:f,45:b,46:g,47:x,48:_,49:m,50:E,51:A,52:S,53:C,54:k,55:O,56:w,57:T,58:v,59:R,60:D,61:N,62:W,63:P,64:M,65:B,66:j,67:Y,68:I,69:L,70:U,71:F,72:X,73:z,74:Q},{14:[1,74]},t($,[2,13],{43:23,29:49,30:61,32:62,20:75,34:s,36:o,37:h,38:d,39:u,40:p,41:y,44:f,45:b,46:g,47:x,48:_,49:m,50:E,51:A,52:S,53:C,54:k,55:O,56:w,57:T,58:v,59:R,60:D,61:N,62:W,63:P,64:M,65:B,66:j,67:Y,68:I,69:L,70:U,71:F,72:X,73:z,74:Q}),t($,[2,14]),t(q,[2,16],{12:[1,76]}),t($,[2,36],{12:[1,77]}),t(V,[2,19]),t(V,[2,20]),{25:[1,78]},{27:[1,79]},t(V,[2,23]),{35:80,75:81,76:H,77:G,79:K,80:J},{35:86,75:81,76:H,77:G,79:K,80:J},{35:87,75:81,76:H,77:G,79:K,80:J},{35:88,75:81,76:H,77:G,79:K,80:J},{35:89,75:81,76:H,77:G,79:K,80:J},{35:90,75:81,76:H,77:G,79:K,80:J},{35:91,75:81,76:H,77:G,79:K,80:J},{35:92,75:81,76:H,77:G,79:K,80:J},{35:93,75:81,76:H,77:G,79:K,80:J},{35:94,75:81,76:H,77:G,79:K,80:J},{35:95,75:81,76:H,77:G,79:K,80:J},{35:96,75:81,76:H,77:G,79:K,80:J},{35:97,75:81,76:H,77:G,79:K,80:J},{35:98,75:81,76:H,77:G,79:K,80:J},{35:99,75:81,76:H,77:G,79:K,80:J},{35:100,75:81,76:H,77:G,79:K,80:J},{35:101,75:81,76:H,77:G,79:K,80:J},{35:102,75:81,76:H,77:G,79:K,80:J},{35:103,75:81,76:H,77:G,79:K,80:J},{35:104,75:81,76:H,77:G,79:K,80:J},t(Z,[2,59]),{35:105,75:81,76:H,77:G,79:K,80:J},{35:106,75:81,76:H,77:G,79:K,80:J},{35:107,75:81,76:H,77:G,79:K,80:J},{35:108,75:81,76:H,77:G,79:K,80:J},{35:109,75:81,76:H,77:G,79:K,80:J},{35:110,75:81,76:H,77:G,79:K,80:J},{35:111,75:81,76:H,77:G,79:K,80:J},{35:112,75:81,76:H,77:G,79:K,80:J},{35:113,75:81,76:H,77:G,79:K,80:J},{35:114,75:81,76:H,77:G,79:K,80:J},{35:115,75:81,76:H,77:G,79:K,80:J},{20:116,29:49,30:61,32:62,34:s,36:o,37:h,38:d,39:u,40:p,41:y,43:23,44:f,45:b,46:g,47:x,48:_,49:m,50:E,51:A,52:S,53:C,54:k,55:O,56:w,57:T,58:v,59:R,60:D,61:N,62:W,63:P,64:M,65:B,66:j,67:Y,68:I,69:L,70:U,71:F,72:X,73:z,74:Q},{12:[1,118],33:[1,117]},{35:119,75:81,76:H,77:G,79:K,80:J},{35:120,75:81,76:H,77:G,79:K,80:J},{35:121,75:81,76:H,77:G,79:K,80:J},{35:122,75:81,76:H,77:G,79:K,80:J},{35:123,75:81,76:H,77:G,79:K,80:J},{35:124,75:81,76:H,77:G,79:K,80:J},{35:125,75:81,76:H,77:G,79:K,80:J},{14:[1,126]},{14:[1,127]},{14:[1,128]},{14:[1,129]},{1:[2,8]},t($,[2,15]),t(q,[2,17],{21:22,19:130,22:e,23:a,24:n,26:i,28:r}),t($,[2,37],{19:20,20:21,21:22,43:23,29:49,30:61,32:62,13:131,22:e,23:a,24:n,26:i,28:r,34:s,36:o,37:h,38:d,39:u,40:p,41:y,44:f,45:b,46:g,47:x,48:_,49:m,50:E,51:A,52:S,53:C,54:k,55:O,56:w,57:T,58:v,59:R,60:D,61:N,62:W,63:P,64:M,65:B,66:j,67:Y,68:I,69:L,70:U,71:F,72:X,73:z,74:Q}),t(V,[2,21]),t(V,[2,22]),t(Z,[2,39]),t(tt,[2,71],{75:81,35:132,76:H,77:G,79:K,80:J}),t(te,[2,73]),{78:[1,133]},t(te,[2,75]),t(te,[2,76]),t(Z,[2,40]),t(Z,[2,41]),t(Z,[2,42]),t(Z,[2,43]),t(Z,[2,44]),t(Z,[2,45]),t(Z,[2,46]),t(Z,[2,47]),t(Z,[2,48]),t(Z,[2,49]),t(Z,[2,50]),t(Z,[2,51]),t(Z,[2,52]),t(Z,[2,53]),t(Z,[2,54]),t(Z,[2,55]),t(Z,[2,56]),t(Z,[2,57]),t(Z,[2,58]),t(Z,[2,60]),t(Z,[2,61]),t(Z,[2,62]),t(Z,[2,63]),t(Z,[2,64]),t(Z,[2,65]),t(Z,[2,66]),t(Z,[2,67]),t(Z,[2,68]),t(Z,[2,69]),t(Z,[2,70]),{31:134,42:[1,135]},{12:[1,136]},{33:[1,137]},t(ta,[2,28]),t(ta,[2,29]),t(ta,[2,30]),t(ta,[2,31]),t(ta,[2,32]),t(ta,[2,33]),t(ta,[2,34]),{1:[2,9]},{1:[2,10]},{1:[2,11]},{1:[2,12]},t(q,[2,18]),t($,[2,38]),t(tt,[2,72]),t(te,[2,74]),t(Z,[2,24]),t(Z,[2,35]),t(tn,[2,25]),t(tn,[2,26],{12:[1,138]}),t(tn,[2,27])],defaultActions:{2:[2,1],3:[2,2],4:[2,7],5:[2,3],6:[2,4],7:[2,5],8:[2,6],74:[2,8],126:[2,9],127:[2,10],128:[2,11],129:[2,12]},parseError:(0,l.eW)(function(t,e){if(e.recoverable)this.trace(t);else{var a=Error(t);throw a.hash=e,a}},"parseError"),parse:(0,l.eW)(function(t){var e=this,a=[0],n=[],i=[null],r=[],s=this.table,o="",h=0,d=0,u=0,p=r.slice.call(arguments,1),y=Object.create(this.lexer),f={yy:{}};for(var b in this.yy)Object.prototype.hasOwnProperty.call(this.yy,b)&&(f.yy[b]=this.yy[b]);y.setInput(t,f.yy),f.yy.lexer=y,f.yy.parser=this,void 0===y.yylloc&&(y.yylloc={});var g=y.yylloc;r.push(g);var x=y.options&&y.options.ranges;function _(){var t;return"number"!=typeof(t=n.pop()||y.lex()||1)&&(t instanceof Array&&(t=(n=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof f.yy.parseError?this.parseError=f.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,l.eW)(function(t){a.length=a.length-2*t,i.length=i.length-t,r.length=r.length-t},"popStack"),(0,l.eW)(_,"lex");for(var m,E,A,S,C,k,O,w,T,v={};;){if(A=a[a.length-1],this.defaultActions[A]?S=this.defaultActions[A]:(null==m&&(m=_()),S=s[A]&&s[A][m]),void 0===S||!S.length||!S[0]){var R="";for(k in T=[],s[A])this.terminals_[k]&&k>2&&T.push("'"+this.terminals_[k]+"'");R=y.showPosition?"Parse error on line "+(h+1)+":\n"+y.showPosition()+"\nExpecting "+T.join(", ")+", got '"+(this.terminals_[m]||m)+"'":"Parse error on line "+(h+1)+": Unexpected "+(1==m?"end of input":"'"+(this.terminals_[m]||m)+"'"),this.parseError(R,{text:y.match,token:this.terminals_[m]||m,line:y.yylineno,loc:g,expected:T})}if(S[0]instanceof Array&&S.length>1)throw Error("Parse Error: multiple actions possible at state: "+A+", token: "+m);switch(S[0]){case 1:a.push(m),i.push(y.yytext),r.push(y.yylloc),a.push(S[1]),m=null,E?(m=E,E=null):(d=y.yyleng,o=y.yytext,h=y.yylineno,g=y.yylloc,u>0&&u--);break;case 2:if(O=this.productions_[S[1]][1],v.$=i[i.length-O],v._$={first_line:r[r.length-(O||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(O||1)].first_column,last_column:r[r.length-1].last_column},x&&(v._$.range=[r[r.length-(O||1)].range[0],r[r.length-1].range[1]]),void 0!==(C=this.performAction.apply(v,[o,d,h,f.yy,S[1],i,r].concat(p))))return C;O&&(a=a.slice(0,-1*O*2),i=i.slice(0,-1*O),r=r.slice(0,-1*O)),a.push(this.productions_[S[1]][0]),i.push(v.$),r.push(v._$),w=s[a[a.length-2]][a[a.length-1]],a.push(w);break;case 3:return!0}}return!0},"parse")},tr={EOF:1,parseError:(0,l.eW)(function(t,e){if(this.yy.parser)this.yy.parser.parseError(t,e);else throw Error(t)},"parseError"),setInput:(0,l.eW)(function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:(0,l.eW)(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:(0,l.eW)(function(t){var e=t.length,a=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var n=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),a.length-1&&(this.yylineno-=a.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:a?(a.length===n.length?this.yylloc.first_column:0)+n[n.length-a.length].length-a[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:(0,l.eW)(function(){return this._more=!0,this},"more"),reject:(0,l.eW)(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:(0,l.eW)(function(t){this.unput(this.match.slice(t))},"less"),pastInput:(0,l.eW)(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:(0,l.eW)(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:(0,l.eW)(function(){var t=this.pastInput(),e=Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},"showPosition"),test_match:(0,l.eW)(function(t,e){var a,n,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(n=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=n.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:n?n[n.length-1].length-n[n.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],a=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),a)return a;if(this._backtrack)for(var r in i)this[r]=i[r];return!1},"test_match"),next:(0,l.eW)(function(){if(this.done)return this.EOF;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var t,e,a,n,i=this._currentRules(),r=0;r<i.length;r++)if((a=this._input.match(this.rules[i[r]]))&&(!e||a[0].length>e[0].length)){if(e=a,n=r,this.options.backtrack_lexer){if(!1!==(t=this.test_match(a,i[r])))return t;if(!this._backtrack)return!1;e=!1;continue}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[n]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:(0,l.eW)(function(){return this.next()||this.lex()},"lex"),begin:(0,l.eW)(function(t){this.conditionStack.push(t)},"begin"),popState:(0,l.eW)(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:(0,l.eW)(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:(0,l.eW)(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:(0,l.eW)(function(t){this.begin(t)},"pushState"),stateStackSize:(0,l.eW)(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:(0,l.eW)(function(t,e,a,n){switch(a){case 0:return 6;case 1:return 7;case 2:return 8;case 3:return 9;case 4:return 22;case 5:return 23;case 6:return this.begin("acc_title"),24;case 7:return this.popState(),"acc_title_value";case 8:return this.begin("acc_descr"),26;case 9:return this.popState(),"acc_descr_value";case 10:this.begin("acc_descr_multiline");break;case 11:case 73:this.popState();break;case 12:return"acc_descr_multiline_value";case 13:case 16:case 70:break;case 14:c;break;case 15:return 12;case 17:return 11;case 18:return 15;case 19:return 16;case 20:return 17;case 21:return 18;case 22:return this.begin("person_ext"),45;case 23:return this.begin("person"),44;case 24:return this.begin("system_ext_queue"),51;case 25:return this.begin("system_ext_db"),50;case 26:return this.begin("system_ext"),49;case 27:return this.begin("system_queue"),48;case 28:return this.begin("system_db"),47;case 29:return this.begin("system"),46;case 30:return this.begin("boundary"),37;case 31:return this.begin("enterprise_boundary"),34;case 32:return this.begin("system_boundary"),36;case 33:return this.begin("container_ext_queue"),57;case 34:return this.begin("container_ext_db"),56;case 35:return this.begin("container_ext"),55;case 36:return this.begin("container_queue"),54;case 37:return this.begin("container_db"),53;case 38:return this.begin("container"),52;case 39:return this.begin("container_boundary"),38;case 40:return this.begin("component_ext_queue"),63;case 41:return this.begin("component_ext_db"),62;case 42:return this.begin("component_ext"),61;case 43:return this.begin("component_queue"),60;case 44:return this.begin("component_db"),59;case 45:return this.begin("component"),58;case 46:case 47:return this.begin("node"),39;case 48:return this.begin("node_l"),40;case 49:return this.begin("node_r"),41;case 50:return this.begin("rel"),64;case 51:return this.begin("birel"),65;case 52:case 53:return this.begin("rel_u"),66;case 54:case 55:return this.begin("rel_d"),67;case 56:case 57:return this.begin("rel_l"),68;case 58:case 59:return this.begin("rel_r"),69;case 60:return this.begin("rel_b"),70;case 61:return this.begin("rel_index"),71;case 62:return this.begin("update_el_style"),72;case 63:return this.begin("update_rel_style"),73;case 64:return this.begin("update_layout_config"),74;case 65:return"EOF_IN_STRUCT";case 66:return this.begin("attribute"),"ATTRIBUTE_EMPTY";case 67:this.begin("attribute");break;case 68:case 79:this.popState(),this.popState();break;case 69:case 71:return 80;case 72:this.begin("string");break;case 74:case 80:return"STR";case 75:this.begin("string_kv");break;case 76:return this.begin("string_kv_key"),"STR_KEY";case 77:this.popState(),this.begin("string_kv_value");break;case 78:return"STR_VALUE";case 81:return"LBRACE";case 82:return"RBRACE";case 83:return"SPACE";case 84:return"EOL";case 85:return 14}},"anonymous"),rules:[/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:title\s[^#\n;]+)/,/^(?:accDescription\s[^#\n;]+)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:%%(?!\{)*[^\n]*(\r?\n?)+)/,/^(?:%%[^\n]*(\r?\n)*)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:C4Context\b)/,/^(?:C4Container\b)/,/^(?:C4Component\b)/,/^(?:C4Dynamic\b)/,/^(?:C4Deployment\b)/,/^(?:Person_Ext\b)/,/^(?:Person\b)/,/^(?:SystemQueue_Ext\b)/,/^(?:SystemDb_Ext\b)/,/^(?:System_Ext\b)/,/^(?:SystemQueue\b)/,/^(?:SystemDb\b)/,/^(?:System\b)/,/^(?:Boundary\b)/,/^(?:Enterprise_Boundary\b)/,/^(?:System_Boundary\b)/,/^(?:ContainerQueue_Ext\b)/,/^(?:ContainerDb_Ext\b)/,/^(?:Container_Ext\b)/,/^(?:ContainerQueue\b)/,/^(?:ContainerDb\b)/,/^(?:Container\b)/,/^(?:Container_Boundary\b)/,/^(?:ComponentQueue_Ext\b)/,/^(?:ComponentDb_Ext\b)/,/^(?:Component_Ext\b)/,/^(?:ComponentQueue\b)/,/^(?:ComponentDb\b)/,/^(?:Component\b)/,/^(?:Deployment_Node\b)/,/^(?:Node\b)/,/^(?:Node_L\b)/,/^(?:Node_R\b)/,/^(?:Rel\b)/,/^(?:BiRel\b)/,/^(?:Rel_Up\b)/,/^(?:Rel_U\b)/,/^(?:Rel_Down\b)/,/^(?:Rel_D\b)/,/^(?:Rel_Left\b)/,/^(?:Rel_L\b)/,/^(?:Rel_Right\b)/,/^(?:Rel_R\b)/,/^(?:Rel_Back\b)/,/^(?:RelIndex\b)/,/^(?:UpdateElementStyle\b)/,/^(?:UpdateRelStyle\b)/,/^(?:UpdateLayoutConfig\b)/,/^(?:$)/,/^(?:[(][ ]*[,])/,/^(?:[(])/,/^(?:[)])/,/^(?:,,)/,/^(?:,)/,/^(?:[ ]*["]["])/,/^(?:[ ]*["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:[ ]*[\$])/,/^(?:[^=]*)/,/^(?:[=][ ]*["])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:[^,]+)/,/^(?:\{)/,/^(?:\})/,/^(?:[\s]+)/,/^(?:[\n\r]+)/,/^(?:$)/],conditions:{acc_descr_multiline:{rules:[11,12],inclusive:!1},acc_descr:{rules:[9],inclusive:!1},acc_title:{rules:[7],inclusive:!1},string_kv_value:{rules:[78,79],inclusive:!1},string_kv_key:{rules:[77],inclusive:!1},string_kv:{rules:[76],inclusive:!1},string:{rules:[73,74],inclusive:!1},attribute:{rules:[68,69,70,71,72,75,80],inclusive:!1},update_layout_config:{rules:[65,66,67,68],inclusive:!1},update_rel_style:{rules:[65,66,67,68],inclusive:!1},update_el_style:{rules:[65,66,67,68],inclusive:!1},rel_b:{rules:[65,66,67,68],inclusive:!1},rel_r:{rules:[65,66,67,68],inclusive:!1},rel_l:{rules:[65,66,67,68],inclusive:!1},rel_d:{rules:[65,66,67,68],inclusive:!1},rel_u:{rules:[65,66,67,68],inclusive:!1},rel_bi:{rules:[],inclusive:!1},rel:{rules:[65,66,67,68],inclusive:!1},node_r:{rules:[65,66,67,68],inclusive:!1},node_l:{rules:[65,66,67,68],inclusive:!1},node:{rules:[65,66,67,68],inclusive:!1},index:{rules:[],inclusive:!1},rel_index:{rules:[65,66,67,68],inclusive:!1},component_ext_queue:{rules:[],inclusive:!1},component_ext_db:{rules:[65,66,67,68],inclusive:!1},component_ext:{rules:[65,66,67,68],inclusive:!1},component_queue:{rules:[65,66,67,68],inclusive:!1},component_db:{rules:[65,66,67,68],inclusive:!1},component:{rules:[65,66,67,68],inclusive:!1},container_boundary:{rules:[65,66,67,68],inclusive:!1},container_ext_queue:{rules:[65,66,67,68],inclusive:!1},container_ext_db:{rules:[65,66,67,68],inclusive:!1},container_ext:{rules:[65,66,67,68],inclusive:!1},container_queue:{rules:[65,66,67,68],inclusive:!1},container_db:{rules:[65,66,67,68],inclusive:!1},container:{rules:[65,66,67,68],inclusive:!1},birel:{rules:[65,66,67,68],inclusive:!1},system_boundary:{rules:[65,66,67,68],inclusive:!1},enterprise_boundary:{rules:[65,66,67,68],inclusive:!1},boundary:{rules:[65,66,67,68],inclusive:!1},system_ext_queue:{rules:[65,66,67,68],inclusive:!1},system_ext_db:{rules:[65,66,67,68],inclusive:!1},system_ext:{rules:[65,66,67,68],inclusive:!1},system_queue:{rules:[65,66,67,68],inclusive:!1},system_db:{rules:[65,66,67,68],inclusive:!1},system:{rules:[65,66,67,68],inclusive:!1},person_ext:{rules:[65,66,67,68],inclusive:!1},person:{rules:[65,66,67,68],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,8,10,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,81,82,83,84,85],inclusive:!0}}};function ts(){this.yy={}}return ti.lexer=tr,(0,l.eW)(ts,"Parser"),ts.prototype=ti,ti.Parser=ts,new ts}();d.parser=d;var u=[],p=[""],y="global",f="",b=[{alias:"global",label:{text:"global"},type:{text:"global"},tags:null,link:null,parentBoundary:""}],g=[],x="",_=!1,m=4,E=2,A=(0,l.eW)(function(){return n},"getC4Type"),S=(0,l.eW)(function(t){n=(0,s.oO)(t,(0,s.nV)())},"setC4Type"),C=(0,l.eW)(function(t,e,a,n,i,r,s,l,o){if(null==t||null==e||null==a||null==n)return;let h={},d=g.find(t=>t.from===e&&t.to===a);if(d?h=d:g.push(h),h.type=t,h.from=e,h.to=a,h.label={text:n},null==i)h.techn={text:""};else if("object"==typeof i){let[t,e]=Object.entries(i)[0];h[t]={text:e}}else h.techn={text:i};if(null==r)h.descr={text:""};else if("object"==typeof r){let[t,e]=Object.entries(r)[0];h[t]={text:e}}else h.descr={text:r};if("object"==typeof s){let[t,e]=Object.entries(s)[0];h[t]=e}else h.sprite=s;if("object"==typeof l){let[t,e]=Object.entries(l)[0];h[t]=e}else h.tags=l;if("object"==typeof o){let[t,e]=Object.entries(o)[0];h[t]=e}else h.link=o;h.wrap=$()},"addRel"),k=(0,l.eW)(function(t,e,a,n,i,r,s){if(null===e||null===a)return;let l={},o=u.find(t=>t.alias===e);if(o&&e===o.alias?l=o:(l.alias=e,u.push(l)),null==a?l.label={text:""}:l.label={text:a},null==n)l.descr={text:""};else if("object"==typeof n){let[t,e]=Object.entries(n)[0];l[t]={text:e}}else l.descr={text:n};if("object"==typeof i){let[t,e]=Object.entries(i)[0];l[t]=e}else l.sprite=i;if("object"==typeof r){let[t,e]=Object.entries(r)[0];l[t]=e}else l.tags=r;if("object"==typeof s){let[t,e]=Object.entries(s)[0];l[t]=e}else l.link=s;l.typeC4Shape={text:t},l.parentBoundary=y,l.wrap=$()},"addPersonOrSystem"),O=(0,l.eW)(function(t,e,a,n,i,r,s,l){if(null===e||null===a)return;let o={},h=u.find(t=>t.alias===e);if(h&&e===h.alias?o=h:(o.alias=e,u.push(o)),null==a?o.label={text:""}:o.label={text:a},null==n)o.techn={text:""};else if("object"==typeof n){let[t,e]=Object.entries(n)[0];o[t]={text:e}}else o.techn={text:n};if(null==i)o.descr={text:""};else if("object"==typeof i){let[t,e]=Object.entries(i)[0];o[t]={text:e}}else o.descr={text:i};if("object"==typeof r){let[t,e]=Object.entries(r)[0];o[t]=e}else o.sprite=r;if("object"==typeof s){let[t,e]=Object.entries(s)[0];o[t]=e}else o.tags=s;if("object"==typeof l){let[t,e]=Object.entries(l)[0];o[t]=e}else o.link=l;o.wrap=$(),o.typeC4Shape={text:t},o.parentBoundary=y},"addContainer"),w=(0,l.eW)(function(t,e,a,n,i,r,s,l){if(null===e||null===a)return;let o={},h=u.find(t=>t.alias===e);if(h&&e===h.alias?o=h:(o.alias=e,u.push(o)),null==a?o.label={text:""}:o.label={text:a},null==n)o.techn={text:""};else if("object"==typeof n){let[t,e]=Object.entries(n)[0];o[t]={text:e}}else o.techn={text:n};if(null==i)o.descr={text:""};else if("object"==typeof i){let[t,e]=Object.entries(i)[0];o[t]={text:e}}else o.descr={text:i};if("object"==typeof r){let[t,e]=Object.entries(r)[0];o[t]=e}else o.sprite=r;if("object"==typeof s){let[t,e]=Object.entries(s)[0];o[t]=e}else o.tags=s;if("object"==typeof l){let[t,e]=Object.entries(l)[0];o[t]=e}else o.link=l;o.wrap=$(),o.typeC4Shape={text:t},o.parentBoundary=y},"addComponent"),T=(0,l.eW)(function(t,e,a,n,i){if(null===t||null===e)return;let r={},s=b.find(e=>e.alias===t);if(s&&t===s.alias?r=s:(r.alias=t,b.push(r)),null==e?r.label={text:""}:r.label={text:e},null==a)r.type={text:"system"};else if("object"==typeof a){let[t,e]=Object.entries(a)[0];r[t]={text:e}}else r.type={text:a};if("object"==typeof n){let[t,e]=Object.entries(n)[0];r[t]=e}else r.tags=n;if("object"==typeof i){let[t,e]=Object.entries(i)[0];r[t]=e}else r.link=i;r.parentBoundary=y,r.wrap=$(),f=y,y=t,p.push(f)},"addPersonOrSystemBoundary"),v=(0,l.eW)(function(t,e,a,n,i){if(null===t||null===e)return;let r={},s=b.find(e=>e.alias===t);if(s&&t===s.alias?r=s:(r.alias=t,b.push(r)),null==e?r.label={text:""}:r.label={text:e},null==a)r.type={text:"container"};else if("object"==typeof a){let[t,e]=Object.entries(a)[0];r[t]={text:e}}else r.type={text:a};if("object"==typeof n){let[t,e]=Object.entries(n)[0];r[t]=e}else r.tags=n;if("object"==typeof i){let[t,e]=Object.entries(i)[0];r[t]=e}else r.link=i;r.parentBoundary=y,r.wrap=$(),f=y,y=t,p.push(f)},"addContainerBoundary"),R=(0,l.eW)(function(t,e,a,n,i,r,s,l){if(null===e||null===a)return;let o={},h=b.find(t=>t.alias===e);if(h&&e===h.alias?o=h:(o.alias=e,b.push(o)),null==a?o.label={text:""}:o.label={text:a},null==n)o.type={text:"node"};else if("object"==typeof n){let[t,e]=Object.entries(n)[0];o[t]={text:e}}else o.type={text:n};if(null==i)o.descr={text:""};else if("object"==typeof i){let[t,e]=Object.entries(i)[0];o[t]={text:e}}else o.descr={text:i};if("object"==typeof s){let[t,e]=Object.entries(s)[0];o[t]=e}else o.tags=s;if("object"==typeof l){let[t,e]=Object.entries(l)[0];o[t]=e}else o.link=l;o.nodeType=t,o.parentBoundary=y,o.wrap=$(),f=y,y=e,p.push(f)},"addDeploymentNode"),D=(0,l.eW)(function(){y=f,p.pop(),f=p.pop(),p.push(f)},"popBoundaryParseStack"),N=(0,l.eW)(function(t,e,a,n,i,r,s,l,o,h,d){let p=u.find(t=>t.alias===e);if(void 0!==p||void 0!==(p=b.find(t=>t.alias===e))){if(null!=a){if("object"==typeof a){let[t,e]=Object.entries(a)[0];p[t]=e}else p.bgColor=a}if(null!=n){if("object"==typeof n){let[t,e]=Object.entries(n)[0];p[t]=e}else p.fontColor=n}if(null!=i){if("object"==typeof i){let[t,e]=Object.entries(i)[0];p[t]=e}else p.borderColor=i}if(null!=r){if("object"==typeof r){let[t,e]=Object.entries(r)[0];p[t]=e}else p.shadowing=r}if(null!=s){if("object"==typeof s){let[t,e]=Object.entries(s)[0];p[t]=e}else p.shape=s}if(null!=l){if("object"==typeof l){let[t,e]=Object.entries(l)[0];p[t]=e}else p.sprite=l}if(null!=o){if("object"==typeof o){let[t,e]=Object.entries(o)[0];p[t]=e}else p.techn=o}if(null!=h){if("object"==typeof h){let[t,e]=Object.entries(h)[0];p[t]=e}else p.legendText=h}if(null!=d){if("object"==typeof d){let[t,e]=Object.entries(d)[0];p[t]=e}else p.legendSprite=d}}},"updateElStyle"),W=(0,l.eW)(function(t,e,a,n,i,r,s){let l=g.find(t=>t.from===e&&t.to===a);if(void 0!==l){if(null!=n){if("object"==typeof n){let[t,e]=Object.entries(n)[0];l[t]=e}else l.textColor=n}if(null!=i){if("object"==typeof i){let[t,e]=Object.entries(i)[0];l[t]=e}else l.lineColor=i}if(null!=r){if("object"==typeof r){let[t,e]=Object.entries(r)[0];l[t]=parseInt(e)}else l.offsetX=parseInt(r)}if(null!=s){if("object"==typeof s){let[t,e]=Object.entries(s)[0];l[t]=parseInt(e)}else l.offsetY=parseInt(s)}}},"updateRelStyle"),P=(0,l.eW)(function(t,e,a){let n=m,i=E;n="object"==typeof e?parseInt(Object.values(e)[0]):parseInt(e),i="object"==typeof a?parseInt(Object.values(a)[0]):parseInt(a),n>=1&&(m=n),i>=1&&(E=i)},"updateLayoutConfig"),M=(0,l.eW)(function(){return m},"getC4ShapeInRow"),B=(0,l.eW)(function(){return E},"getC4BoundaryInRow"),j=(0,l.eW)(function(){return y},"getCurrentBoundaryParse"),Y=(0,l.eW)(function(){return f},"getParentBoundaryParse"),I=(0,l.eW)(function(t){return null==t?u:u.filter(e=>e.parentBoundary===t)},"getC4ShapeArray"),L=(0,l.eW)(function(t){return u.find(e=>e.alias===t)},"getC4Shape"),U=(0,l.eW)(function(t){return Object.keys(I(t))},"getC4ShapeKeys"),F=(0,l.eW)(function(t){return null==t?b:b.filter(e=>e.parentBoundary===t)},"getBoundaries"),X=(0,l.eW)(function(){return g},"getRels"),z=(0,l.eW)(function(){return x},"getTitle"),Q=(0,l.eW)(function(t){_=t},"setWrap"),$=(0,l.eW)(function(){return _},"autoWrap"),q=(0,l.eW)(function(){u=[],b=[{alias:"global",label:{text:"global"},type:{text:"global"},tags:null,link:null,parentBoundary:""}],f="",y="global",p=[""],g=[],p=[""],x="",_=!1,m=4,E=2},"clear"),V=(0,l.eW)(function(t){x=(0,s.oO)(t,(0,s.nV)())},"setTitle"),H={addPersonOrSystem:k,addPersonOrSystemBoundary:T,addContainer:O,addContainerBoundary:v,addComponent:w,addDeploymentNode:R,popBoundaryParseStack:D,addRel:C,updateElStyle:N,updateRelStyle:W,updateLayoutConfig:P,autoWrap:$,setWrap:Q,getC4ShapeArray:I,getC4Shape:L,getC4ShapeKeys:U,getBoundaries:F,getBoundarys:F,getCurrentBoundaryParse:j,getParentBoundaryParse:Y,getRels:X,getTitle:z,getC4Type:A,getC4ShapeInRow:M,getC4BoundaryInRow:B,setAccTitle:s.GN,getAccTitle:s.eu,getAccDescription:s.Mx,setAccDescription:s.U$,getConfig:(0,l.eW)(()=>(0,s.nV)().c4,"getConfig"),clear:q,LINETYPE:{SOLID:0,DOTTED:1,NOTE:2,SOLID_CROSS:3,DOTTED_CROSS:4,SOLID_OPEN:5,DOTTED_OPEN:6,LOOP_START:10,LOOP_END:11,ALT_START:12,ALT_ELSE:13,ALT_END:14,OPT_START:15,OPT_END:16,ACTIVE_START:17,ACTIVE_END:18,PAR_START:19,PAR_AND:20,PAR_END:21,RECT_START:22,RECT_END:23,SOLID_POINT:24,DOTTED_POINT:25},ARROWTYPE:{FILLED:0,OPEN:1},PLACEMENT:{LEFTOF:0,RIGHTOF:1,OVER:2},setTitle:V,setC4Type:S},G=(0,l.eW)(function(t,e){return(0,i.Mu)(t,e)},"drawRect"),K=(0,l.eW)(function(t,e,a,n,i,r){let s=t.append("image");s.attr("width",e),s.attr("height",a),s.attr("x",n),s.attr("y",i);let l=r.startsWith("data:image/png;base64")?r:(0,h.N)(r);s.attr("xlink:href",l)},"drawImage"),J=(0,l.eW)((t,e,a)=>{let n=t.append("g"),i=0;for(let t of e){let e=t.textColor?t.textColor:"#444444",r=t.lineColor?t.lineColor:"#444444",s=t.offsetX?parseInt(t.offsetX):0,l=t.offsetY?parseInt(t.offsetY):0;if(0===i){let e=n.append("line");e.attr("x1",t.startPoint.x),e.attr("y1",t.startPoint.y),e.attr("x2",t.endPoint.x),e.attr("y2",t.endPoint.y),e.attr("stroke-width","1"),e.attr("stroke",r),e.style("fill","none"),"rel_b"!==t.type&&e.attr("marker-end","url(#arrowhead)"),("birel"===t.type||"rel_b"===t.type)&&e.attr("marker-start","url(#arrowend)"),i=-1}else{let e=n.append("path");e.attr("fill","none").attr("stroke-width","1").attr("stroke",r).attr("d","Mstartx,starty Qcontrolx,controly stopx,stopy ".replaceAll("startx",t.startPoint.x).replaceAll("starty",t.startPoint.y).replaceAll("controlx",t.startPoint.x+(t.endPoint.x-t.startPoint.x)/2-(t.endPoint.x-t.startPoint.x)/4).replaceAll("controly",t.startPoint.y+(t.endPoint.y-t.startPoint.y)/2).replaceAll("stopx",t.endPoint.x).replaceAll("stopy",t.endPoint.y)),"rel_b"!==t.type&&e.attr("marker-end","url(#arrowhead)"),("birel"===t.type||"rel_b"===t.type)&&e.attr("marker-start","url(#arrowend)")}let o=a.messageFont();tc(a)(t.label.text,n,Math.min(t.startPoint.x,t.endPoint.x)+Math.abs(t.endPoint.x-t.startPoint.x)/2+s,Math.min(t.startPoint.y,t.endPoint.y)+Math.abs(t.endPoint.y-t.startPoint.y)/2+l,t.label.width,t.label.height,{fill:e},o),t.techn&&""!==t.techn.text&&(o=a.messageFont(),tc(a)("["+t.techn.text+"]",n,Math.min(t.startPoint.x,t.endPoint.x)+Math.abs(t.endPoint.x-t.startPoint.x)/2+s,Math.min(t.startPoint.y,t.endPoint.y)+Math.abs(t.endPoint.y-t.startPoint.y)/2+a.messageFontSize+5+l,Math.max(t.label.width,t.techn.width),t.techn.height,{fill:e,"font-style":"italic"},o))}},"drawRels"),Z=(0,l.eW)(function(t,e,a){let n=t.append("g"),i=e.bgColor?e.bgColor:"none",r=e.borderColor?e.borderColor:"#444444",s=e.fontColor?e.fontColor:"black",l={"stroke-width":1,"stroke-dasharray":"7.0,7.0"};e.nodeType&&(l={"stroke-width":1}),G(n,{x:e.x,y:e.y,fill:i,stroke:r,width:e.width,height:e.height,rx:2.5,ry:2.5,attrs:l});let o=a.boundaryFont();o.fontWeight="bold",o.fontSize=o.fontSize+2,o.fontColor=s,tc(a)(e.label.text,n,e.x,e.y+e.label.Y,e.width,e.height,{fill:"#444444"},o),e.type&&""!==e.type.text&&((o=a.boundaryFont()).fontColor=s,tc(a)(e.type.text,n,e.x,e.y+e.type.Y,e.width,e.height,{fill:"#444444"},o)),e.descr&&""!==e.descr.text&&((o=a.boundaryFont()).fontSize=o.fontSize-2,o.fontColor=s,tc(a)(e.descr.text,n,e.x,e.y+e.descr.Y,e.width,e.height,{fill:"#444444"},o))},"drawBoundary"),tt=(0,l.eW)(function(t,e,a){let n=e.bgColor?e.bgColor:a[e.typeC4Shape.text+"_bg_color"],r=e.borderColor?e.borderColor:a[e.typeC4Shape.text+"_border_color"],s=e.fontColor?e.fontColor:"#FFFFFF",l="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAACD0lEQVR4Xu2YoU4EMRCGT+4j8Ai8AhaH4QHgAUjQuFMECUgMIUgwJAgMhgQsAYUiJCiQIBBY+EITsjfTdme6V24v4c8vyGbb+ZjOtN0bNcvjQXmkH83WvYBWto6PLm6v7p7uH1/w2fXD+PBycX1Pv2l3IdDm/vn7x+dXQiAubRzoURa7gRZWd0iGRIiJbOnhnfYBQZNJjNbuyY2eJG8fkDE3bbG4ep6MHUAsgYxmE3nVs6VsBWJSGccsOlFPmLIViMzLOB7pCVO2AtHJMohH7Fh6zqitQK7m0rJvAVYgGcEpe//PLdDz65sM4pF9N7ICcXDKIB5Nv6j7tD0NoSdM2QrU9Gg0ewE1LqBhHR3BBdvj2vapnidjHxD/q6vd7Pvhr31AwcY8eXMTXAKECZZJFXuEq27aLgQK5uLMohCenGGuGewOxSjBvYBqeG6B+Nqiblggdjnc+ZXDy+FNFpFzw76O3UBAROuXh6FoiAcf5g9eTvUgzy0nWg6I8cXHRUpg5bOVBCo+KDpFajOf23GgPme7RSQ+lacIENUgJ6gg1k6HjgOlqnLqip4tEuhv0hNEMXUD0clyXE3p6pZA0S2nnvTlXwLJEZWlb7cTQH1+USgTN4VhAenm/wea1OCAOmqo6fE1WCb9WSKBah+rbUWPWAmE2Rvk0ApiB45eOyNAzU8xcTvj8KvkKEoOaIYeHNA3ZuygAvFMUO0AAAAASUVORK5CYII=";switch(e.typeC4Shape.text){case"person":l="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAACD0lEQVR4Xu2YoU4EMRCGT+4j8Ai8AhaH4QHgAUjQuFMECUgMIUgwJAgMhgQsAYUiJCiQIBBY+EITsjfTdme6V24v4c8vyGbb+ZjOtN0bNcvjQXmkH83WvYBWto6PLm6v7p7uH1/w2fXD+PBycX1Pv2l3IdDm/vn7x+dXQiAubRzoURa7gRZWd0iGRIiJbOnhnfYBQZNJjNbuyY2eJG8fkDE3bbG4ep6MHUAsgYxmE3nVs6VsBWJSGccsOlFPmLIViMzLOB7pCVO2AtHJMohH7Fh6zqitQK7m0rJvAVYgGcEpe//PLdDz65sM4pF9N7ICcXDKIB5Nv6j7tD0NoSdM2QrU9Gg0ewE1LqBhHR3BBdvj2vapnidjHxD/q6vd7Pvhr31AwcY8eXMTXAKECZZJFXuEq27aLgQK5uLMohCenGGuGewOxSjBvYBqeG6B+Nqiblggdjnc+ZXDy+FNFpFzw76O3UBAROuXh6FoiAcf5g9eTvUgzy0nWg6I8cXHRUpg5bOVBCo+KDpFajOf23GgPme7RSQ+lacIENUgJ6gg1k6HjgOlqnLqip4tEuhv0hNEMXUD0clyXE3p6pZA0S2nnvTlXwLJEZWlb7cTQH1+USgTN4VhAenm/wea1OCAOmqo6fE1WCb9WSKBah+rbUWPWAmE2Rvk0ApiB45eOyNAzU8xcTvj8KvkKEoOaIYeHNA3ZuygAvFMUO0AAAAASUVORK5CYII=";break;case"external_person":l="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAAB6ElEQVR4Xu2YLY+EMBCG9+dWr0aj0Wg0Go1Go0+j8Xdv2uTCvv1gpt0ebHKPuhDaeW4605Z9mJvx4AdXUyTUdd08z+u6flmWZRnHsWkafk9DptAwDPu+f0eAYtu2PEaGWuj5fCIZrBAC2eLBAnRCsEkkxmeaJp7iDJ2QMDdHsLg8SxKFEJaAo8lAXnmuOFIhTMpxxKATebo4UiFknuNo4OniSIXQyRxEA3YsnjGCVEjVXD7yLUAqxBGUyPv/Y4W2beMgGuS7kVQIBycH0fD+oi5pezQETxdHKmQKGk1eQEYldK+jw5GxPfZ9z7Mk0Qnhf1W1m3w//EUn5BDmSZsbR44QQLBEqrBHqOrmSKaQAxdnLArCrxZcM7A7ZKs4ioRq8LFC+NpC3WCBJsvpVw5edm9iEXFuyNfxXAgSwfrFQ1c0iNda8AdejvUgnktOtJQQxmcfFzGglc5WVCj7oDgFqU18boeFSs52CUh8LE8BIVQDT1ABrB0HtgSEYlX5doJnCwv9TXocKCaKbnwhdDKPq4lf3SwU3HLq4V/+WYhHVMa/3b4IlfyikAduCkcBc7mQ3/z/Qq/cTuikhkzB12Ae/mcJC9U+Vo8Ej1gWAtgbeGgFsAMHr50BIWOLCbezvhpBFUdY6EJuJ/QDW0XoMX60zZ0AAAAASUVORK5CYII="}let o=t.append("g");o.attr("class","person-man");let h=(0,i.kc)();switch(e.typeC4Shape.text){case"person":case"external_person":case"system":case"external_system":case"container":case"external_container":case"component":case"external_component":h.x=e.x,h.y=e.y,h.fill=n,h.width=e.width,h.height=e.height,h.stroke=r,h.rx=2.5,h.ry=2.5,h.attrs={"stroke-width":.5},G(o,h);break;case"system_db":case"external_system_db":case"container_db":case"external_container_db":case"component_db":case"external_component_db":o.append("path").attr("fill",n).attr("stroke-width","0.5").attr("stroke",r).attr("d","Mstartx,startyc0,-10 half,-10 half,-10c0,0 half,0 half,10l0,heightc0,10 -half,10 -half,10c0,0 -half,0 -half,-10l0,-height".replaceAll("startx",e.x).replaceAll("starty",e.y).replaceAll("half",e.width/2).replaceAll("height",e.height)),o.append("path").attr("fill","none").attr("stroke-width","0.5").attr("stroke",r).attr("d","Mstartx,startyc0,10 half,10 half,10c0,0 half,0 half,-10".replaceAll("startx",e.x).replaceAll("starty",e.y).replaceAll("half",e.width/2));break;case"system_queue":case"external_system_queue":case"container_queue":case"external_container_queue":case"component_queue":case"external_component_queue":o.append("path").attr("fill",n).attr("stroke-width","0.5").attr("stroke",r).attr("d","Mstartx,startylwidth,0c5,0 5,half 5,halfc0,0 0,half -5,halfl-width,0c-5,0 -5,-half -5,-halfc0,0 0,-half 5,-half".replaceAll("startx",e.x).replaceAll("starty",e.y).replaceAll("width",e.width).replaceAll("half",e.height/2)),o.append("path").attr("fill","none").attr("stroke-width","0.5").attr("stroke",r).attr("d","Mstartx,startyc-5,0 -5,half -5,halfc0,half 5,half 5,half".replaceAll("startx",e.x+e.width).replaceAll("starty",e.y).replaceAll("half",e.height/2))}let d=to(a,e.typeC4Shape.text);switch(o.append("text").attr("fill",s).attr("font-family",d.fontFamily).attr("font-size",d.fontSize-2).attr("font-style","italic").attr("lengthAdjust","spacing").attr("textLength",e.typeC4Shape.width).attr("x",e.x+e.width/2-e.typeC4Shape.width/2).attr("y",e.y+e.typeC4Shape.Y).text("<<"+e.typeC4Shape.text+">>"),e.typeC4Shape.text){case"person":case"external_person":K(o,48,48,e.x+e.width/2-24,e.y+e.image.Y,l)}let u=a[e.typeC4Shape.text+"Font"]();return u.fontWeight="bold",u.fontSize=u.fontSize+2,u.fontColor=s,tc(a)(e.label.text,o,e.x,e.y+e.label.Y,e.width,e.height,{fill:s},u),(u=a[e.typeC4Shape.text+"Font"]()).fontColor=s,e.techn&&e.techn?.text!==""?tc(a)(e.techn.text,o,e.x,e.y+e.techn.Y,e.width,e.height,{fill:s,"font-style":"italic"},u):e.type&&""!==e.type.text&&tc(a)(e.type.text,o,e.x,e.y+e.type.Y,e.width,e.height,{fill:s,"font-style":"italic"},u),e.descr&&""!==e.descr.text&&((u=a.personFont()).fontColor=s,tc(a)(e.descr.text,o,e.x,e.y+e.descr.Y,e.width,e.height,{fill:s},u)),e.height},"drawC4Shape"),te=(0,l.eW)(function(t){t.append("defs").append("symbol").attr("id","database").attr("fill-rule","evenodd").attr("clip-rule","evenodd").append("path").attr("transform","scale(.5)").attr("d","M12.258.001l.256.004.255.005.253.008.251.01.249.012.247.015.246.016.242.019.241.02.239.023.236.024.233.027.231.028.229.031.225.032.223.034.22.036.217.038.214.04.211.041.208.043.205.045.201.046.198.048.194.05.191.051.187.053.183.054.18.056.175.057.172.059.168.06.163.061.16.063.155.064.15.066.074.033.073.033.071.034.07.034.069.035.068.035.067.035.066.035.064.036.064.036.062.036.06.036.06.037.058.037.058.037.055.038.055.038.053.038.052.038.051.039.05.039.048.039.047.039.045.04.044.04.043.04.041.04.04.041.039.041.037.041.036.041.034.041.033.042.032.042.03.042.029.042.027.042.026.043.024.043.023.043.021.043.02.043.018.044.017.043.015.044.013.044.012.044.011.045.009.044.007.045.006.045.004.045.002.045.001.045v17l-.001.045-.002.045-.004.045-.006.045-.007.045-.009.044-.011.045-.012.044-.013.044-.015.044-.017.043-.018.044-.02.043-.021.043-.023.043-.024.043-.026.043-.027.042-.029.042-.03.042-.032.042-.033.042-.034.041-.036.041-.037.041-.039.041-.04.041-.041.04-.043.04-.044.04-.045.04-.047.039-.048.039-.05.039-.051.039-.052.038-.053.038-.055.038-.055.038-.058.037-.058.037-.06.037-.06.036-.062.036-.064.036-.064.036-.066.035-.067.035-.068.035-.069.035-.07.034-.071.034-.073.033-.074.033-.15.066-.155.064-.16.063-.163.061-.168.06-.172.059-.175.057-.18.056-.183.054-.187.053-.191.051-.194.05-.198.048-.201.046-.205.045-.208.043-.211.041-.214.04-.217.038-.22.036-.223.034-.225.032-.229.031-.231.028-.233.027-.236.024-.239.023-.241.02-.242.019-.246.016-.247.015-.249.012-.251.01-.253.008-.255.005-.256.004-.258.001-.258-.001-.256-.004-.255-.005-.253-.008-.251-.01-.249-.012-.247-.015-.245-.016-.243-.019-.241-.02-.238-.023-.236-.024-.234-.027-.231-.028-.228-.031-.226-.032-.223-.034-.22-.036-.217-.038-.214-.04-.211-.041-.208-.043-.204-.045-.201-.046-.198-.048-.195-.05-.19-.051-.187-.053-.184-.054-.179-.056-.176-.057-.172-.059-.167-.06-.164-.061-.159-.063-.155-.064-.151-.066-.074-.033-.072-.033-.072-.034-.07-.034-.069-.035-.068-.035-.067-.035-.066-.035-.064-.036-.063-.036-.062-.036-.061-.036-.06-.037-.058-.037-.057-.037-.056-.038-.055-.038-.053-.038-.052-.038-.051-.039-.049-.039-.049-.039-.046-.039-.046-.04-.044-.04-.043-.04-.041-.04-.04-.041-.039-.041-.037-.041-.036-.041-.034-.041-.033-.042-.032-.042-.03-.042-.029-.042-.027-.042-.026-.043-.024-.043-.023-.043-.021-.043-.02-.043-.018-.044-.017-.043-.015-.044-.013-.044-.012-.044-.011-.045-.009-.044-.007-.045-.006-.045-.004-.045-.002-.045-.001-.045v-17l.001-.045.002-.045.004-.045.006-.045.007-.045.009-.044.011-.045.012-.044.013-.044.015-.044.017-.043.018-.044.02-.043.021-.043.023-.043.024-.043.026-.043.027-.042.029-.042.03-.042.032-.042.033-.042.034-.041.036-.041.037-.041.039-.041.04-.041.041-.04.043-.04.044-.04.046-.04.046-.039.049-.039.049-.039.051-.039.052-.038.053-.038.055-.038.056-.038.057-.037.058-.037.06-.037.061-.036.062-.036.063-.036.064-.036.066-.035.067-.035.068-.035.069-.035.07-.034.072-.034.072-.033.074-.033.151-.066.155-.064.159-.063.164-.061.167-.06.172-.059.176-.057.179-.056.184-.054.187-.053.19-.051.195-.05.198-.048.201-.046.204-.045.208-.043.211-.041.214-.04.217-.038.22-.036.223-.034.226-.032.228-.031.231-.028.234-.027.236-.024.238-.023.241-.02.243-.019.245-.016.247-.015.249-.012.251-.01.253-.008.255-.005.256-.004.258-.001.258.001zm-9.258 20.499v.01l.001.021.003.021.004.022.005.021.006.022.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.023.018.024.019.024.021.024.022.025.023.024.024.025.052.049.056.05.061.051.066.051.07.051.075.051.079.052.084.052.088.052.092.052.097.052.102.051.105.052.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.048.144.049.147.047.152.047.155.047.16.045.163.045.167.043.171.043.176.041.178.041.183.039.187.039.19.037.194.035.197.035.202.033.204.031.209.03.212.029.216.027.219.025.222.024.226.021.23.02.233.018.236.016.24.015.243.012.246.01.249.008.253.005.256.004.259.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.021.224-.024.22-.026.216-.027.212-.028.21-.031.205-.031.202-.034.198-.034.194-.036.191-.037.187-.039.183-.04.179-.04.175-.042.172-.043.168-.044.163-.045.16-.046.155-.046.152-.047.148-.048.143-.049.139-.049.136-.05.131-.05.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.053.083-.051.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.05.023-.024.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.023.01-.022.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.127l-.077.055-.08.053-.083.054-.085.053-.087.052-.09.052-.093.051-.095.05-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.045-.118.044-.12.043-.122.042-.124.042-.126.041-.128.04-.13.04-.132.038-.134.038-.135.037-.138.037-.139.035-.142.035-.143.034-.144.033-.147.032-.148.031-.15.03-.151.03-.153.029-.154.027-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.01-.179.008-.179.008-.181.006-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.006-.179-.008-.179-.008-.178-.01-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.027-.153-.029-.151-.03-.15-.03-.148-.031-.146-.032-.145-.033-.143-.034-.141-.035-.14-.035-.137-.037-.136-.037-.134-.038-.132-.038-.13-.04-.128-.04-.126-.041-.124-.042-.122-.042-.12-.044-.117-.043-.116-.045-.113-.045-.112-.046-.109-.047-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.05-.093-.052-.09-.051-.087-.052-.085-.053-.083-.054-.08-.054-.077-.054v4.127zm0-5.654v.011l.001.021.003.021.004.021.005.022.006.022.007.022.009.022.01.022.011.023.012.023.013.023.015.024.016.023.017.024.018.024.019.024.021.024.022.024.023.025.024.024.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.052.11.051.114.051.119.052.123.05.127.051.131.05.135.049.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.044.171.042.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.022.23.02.233.018.236.016.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.012.241-.015.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.048.139-.05.136-.049.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.051.051-.049.023-.025.023-.024.021-.025.02-.024.019-.024.018-.024.017-.024.015-.023.014-.023.013-.024.012-.022.01-.023.01-.023.008-.022.006-.022.006-.022.004-.021.004-.022.001-.021.001-.021v-4.139l-.077.054-.08.054-.083.054-.085.052-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.044-.118.044-.12.044-.122.042-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.035-.143.033-.144.033-.147.033-.148.031-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.009-.179.009-.179.007-.181.007-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.007-.179-.007-.179-.009-.178-.009-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.031-.146-.033-.145-.033-.143-.033-.141-.035-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.04-.126-.041-.124-.042-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.051-.093-.051-.09-.051-.087-.053-.085-.052-.083-.054-.08-.054-.077-.054v4.139zm0-5.666v.011l.001.02.003.022.004.021.005.022.006.021.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.024.018.023.019.024.021.025.022.024.023.024.024.025.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.051.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.043.171.043.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.021.23.02.233.018.236.017.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.013.241-.014.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.049.139-.049.136-.049.131-.051.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.049.023-.025.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.022.01-.023.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.153l-.077.054-.08.054-.083.053-.085.053-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.048-.105.048-.106.048-.109.046-.111.046-.114.046-.115.044-.118.044-.12.043-.122.043-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.034-.143.034-.144.033-.147.032-.148.032-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.024-.161.024-.162.023-.163.023-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.01-.178.01-.179.009-.179.007-.181.006-.182.006-.182.004-.184.003-.184.001-.185.001-.185-.001-.184-.001-.184-.003-.182-.004-.182-.006-.181-.006-.179-.007-.179-.009-.178-.01-.176-.01-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.023-.162-.023-.161-.024-.159-.024-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.032-.146-.032-.145-.033-.143-.034-.141-.034-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.041-.126-.041-.124-.041-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.048-.105-.048-.102-.048-.1-.05-.097-.049-.095-.051-.093-.051-.09-.052-.087-.052-.085-.053-.083-.053-.08-.054-.077-.054v4.153zm8.74-8.179l-.257.004-.254.005-.25.008-.247.011-.244.012-.241.014-.237.016-.233.018-.231.021-.226.022-.224.023-.22.026-.216.027-.212.028-.21.031-.205.032-.202.033-.198.034-.194.036-.191.038-.187.038-.183.04-.179.041-.175.042-.172.043-.168.043-.163.045-.16.046-.155.046-.152.048-.148.048-.143.048-.139.049-.136.05-.131.05-.126.051-.123.051-.118.051-.114.052-.11.052-.106.052-.101.052-.096.052-.092.052-.088.052-.083.052-.079.052-.074.051-.07.052-.065.051-.06.05-.056.05-.051.05-.023.025-.023.024-.021.024-.02.025-.019.024-.018.024-.017.023-.015.024-.014.023-.013.023-.012.023-.01.023-.01.022-.008.022-.006.023-.006.021-.004.022-.004.021-.001.021-.001.021.001.021.001.021.004.021.004.022.006.021.006.023.008.022.01.022.01.023.012.023.013.023.014.023.015.024.017.023.018.024.019.024.02.025.021.024.023.024.023.025.051.05.056.05.06.05.065.051.07.052.074.051.079.052.083.052.088.052.092.052.096.052.101.052.106.052.11.052.114.052.118.051.123.051.126.051.131.05.136.05.139.049.143.048.148.048.152.048.155.046.16.046.163.045.168.043.172.043.175.042.179.041.183.04.187.038.191.038.194.036.198.034.202.033.205.032.21.031.212.028.216.027.22.026.224.023.226.022.231.021.233.018.237.016.241.014.244.012.247.011.25.008.254.005.257.004.26.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.022.224-.023.22-.026.216-.027.212-.028.21-.031.205-.032.202-.033.198-.034.194-.036.191-.038.187-.038.183-.04.179-.041.175-.042.172-.043.168-.043.163-.045.16-.046.155-.046.152-.048.148-.048.143-.048.139-.049.136-.05.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.05.051-.05.023-.025.023-.024.021-.024.02-.025.019-.024.018-.024.017-.023.015-.024.014-.023.013-.023.012-.023.01-.023.01-.022.008-.022.006-.023.006-.021.004-.022.004-.021.001-.021.001-.021-.001-.021-.001-.021-.004-.021-.004-.022-.006-.021-.006-.023-.008-.022-.01-.022-.01-.023-.012-.023-.013-.023-.014-.023-.015-.024-.017-.023-.018-.024-.019-.024-.02-.025-.021-.024-.023-.024-.023-.025-.051-.05-.056-.05-.06-.05-.065-.051-.07-.052-.074-.051-.079-.052-.083-.052-.088-.052-.092-.052-.096-.052-.101-.052-.106-.052-.11-.052-.114-.052-.118-.051-.123-.051-.126-.051-.131-.05-.136-.05-.139-.049-.143-.048-.148-.048-.152-.048-.155-.046-.16-.046-.163-.045-.168-.043-.172-.043-.175-.042-.179-.041-.183-.04-.187-.038-.191-.038-.194-.036-.198-.034-.202-.033-.205-.032-.21-.031-.212-.028-.216-.027-.22-.026-.224-.023-.226-.022-.231-.021-.233-.018-.237-.016-.241-.014-.244-.012-.247-.011-.25-.008-.254-.005-.257-.004-.26-.001-.26.001z")},"insertDatabaseIcon"),ta=(0,l.eW)(function(t){t.append("defs").append("symbol").attr("id","computer").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M2 2v13h20v-13h-20zm18 11h-16v-9h16v9zm-10.228 6l.466-1h3.524l.467 1h-4.457zm14.228 3h-24l2-6h2.104l-1.33 4h18.45l-1.297-4h2.073l2 6zm-5-10h-14v-7h14v7z")},"insertComputerIcon"),tn=(0,l.eW)(function(t){t.append("defs").append("symbol").attr("id","clock").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0-2c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm5.848 12.459c.202.038.202.333.001.372-1.907.361-6.045 1.111-6.547 1.111-.719 0-1.301-.582-1.301-1.301 0-.512.77-5.447 1.125-7.445.034-.192.312-.181.343.014l.985 6.238 5.394 1.011z")},"insertClockIcon"),ti=(0,l.eW)(function(t){t.append("defs").append("marker").attr("id","arrowhead").attr("refX",9).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z")},"insertArrowHead"),tr=(0,l.eW)(function(t){t.append("defs").append("marker").attr("id","arrowend").attr("refX",1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 10 0 L 0 5 L 10 10 z")},"insertArrowEnd"),ts=(0,l.eW)(function(t){t.append("defs").append("marker").attr("id","filled-head").attr("refX",18).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"insertArrowFilledHead"),tl=(0,l.eW)(function(t){let e=t.append("defs").append("marker").attr("id","crosshead").attr("markerWidth",15).attr("markerHeight",8).attr("orient","auto").attr("refX",16).attr("refY",4);e.append("path").attr("fill","black").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1px").attr("d","M 9,2 V 6 L16,4 Z"),e.append("path").attr("fill","none").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1px").attr("d","M 0,1 L 6,7 M 6,1 L 0,7")},"insertArrowCrossHead"),to=(0,l.eW)((t,e)=>({fontFamily:t[e+"FontFamily"],fontSize:t[e+"FontSize"],fontWeight:t[e+"FontWeight"]}),"getC4ShapeFont"),tc=function(){function t(t,e,a,i,r,s,l){n(e.append("text").attr("x",a+r/2).attr("y",i+s/2+5).style("text-anchor","middle").text(t),l)}function e(t,e,a,i,r,l,o,h){let{fontSize:d,fontFamily:u,fontWeight:p}=h,y=t.split(s.SY.lineBreakRegex);for(let t=0;t<y.length;t++){let s=t*d-d*(y.length-1)/2,l=e.append("text").attr("x",a+r/2).attr("y",i).style("text-anchor","middle").attr("dominant-baseline","middle").style("font-size",d).style("font-weight",p).style("font-family",u);l.append("tspan").attr("dy",s).text(y[t]).attr("alignment-baseline","mathematical"),n(l,o)}}function a(t,a,i,r,s,l,o,h){let d=a.append("switch"),u=d.append("foreignObject").attr("x",i).attr("y",r).attr("width",s).attr("height",l).append("xhtml:div").style("display","table").style("height","100%").style("width","100%");u.append("div").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(t),e(t,d,i,r,s,l,o,h),n(u,o)}function n(t,e){for(let a in e)e.hasOwnProperty(a)&&t.attr(a,e[a])}return(0,l.eW)(t,"byText"),(0,l.eW)(e,"byTspan"),(0,l.eW)(a,"byFo"),(0,l.eW)(n,"_setTextAttrs"),function(n){return"fo"===n.textPlacement?a:"old"===n.textPlacement?t:e}}(),th={drawBoundary:Z,drawC4Shape:tt,drawRels:J,insertArrowHead:ti,insertArrowEnd:tr,insertArrowFilledHead:ts,insertArrowCrossHead:tl,insertDatabaseIcon:te,insertComputerIcon:ta,insertClockIcon:tn},td=0,tu=0,tp=4,ty=2;d.yy=H;var tf={},tb=class{static{(0,l.eW)(this,"Bounds")}constructor(t){this.name="",this.data={},this.data.startx=void 0,this.data.stopx=void 0,this.data.starty=void 0,this.data.stopy=void 0,this.data.widthLimit=void 0,this.nextData={},this.nextData.startx=void 0,this.nextData.stopx=void 0,this.nextData.starty=void 0,this.nextData.stopy=void 0,this.nextData.cnt=0,tg(t.db.getConfig())}setData(t,e,a,n){this.nextData.startx=this.data.startx=t,this.nextData.stopx=this.data.stopx=e,this.nextData.starty=this.data.starty=a,this.nextData.stopy=this.data.stopy=n}updateVal(t,e,a,n){void 0===t[e]?t[e]=a:t[e]=n(a,t[e])}insert(t){this.nextData.cnt=this.nextData.cnt+1;let e=this.nextData.startx===this.nextData.stopx?this.nextData.stopx+t.margin:this.nextData.stopx+2*t.margin,a=e+t.width,n=this.nextData.starty+2*t.margin,i=n+t.height;(e>=this.data.widthLimit||a>=this.data.widthLimit||this.nextData.cnt>tp)&&(e=this.nextData.startx+t.margin+tf.nextLinePaddingX,n=this.nextData.stopy+2*t.margin,this.nextData.stopx=a=e+t.width,this.nextData.starty=this.nextData.stopy,this.nextData.stopy=i=n+t.height,this.nextData.cnt=1),t.x=e,t.y=n,this.updateVal(this.data,"startx",e,Math.min),this.updateVal(this.data,"starty",n,Math.min),this.updateVal(this.data,"stopx",a,Math.max),this.updateVal(this.data,"stopy",i,Math.max),this.updateVal(this.nextData,"startx",e,Math.min),this.updateVal(this.nextData,"starty",n,Math.min),this.updateVal(this.nextData,"stopx",a,Math.max),this.updateVal(this.nextData,"stopy",i,Math.max)}init(t){this.name="",this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0,widthLimit:void 0},this.nextData={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0,cnt:0},tg(t.db.getConfig())}bumpLastMargin(t){this.data.stopx+=t,this.data.stopy+=t}},tg=(0,l.eW)(function(t){(0,s.Yc)(tf,t),t.fontFamily&&(tf.personFontFamily=tf.systemFontFamily=tf.messageFontFamily=t.fontFamily),t.fontSize&&(tf.personFontSize=tf.systemFontSize=tf.messageFontSize=t.fontSize),t.fontWeight&&(tf.personFontWeight=tf.systemFontWeight=tf.messageFontWeight=t.fontWeight)},"setConf"),tx=(0,l.eW)((t,e)=>({fontFamily:t[e+"FontFamily"],fontSize:t[e+"FontSize"],fontWeight:t[e+"FontWeight"]}),"c4ShapeFont"),t_=(0,l.eW)(t=>({fontFamily:t.boundaryFontFamily,fontSize:t.boundaryFontSize,fontWeight:t.boundaryFontWeight}),"boundaryFont"),tm=(0,l.eW)(t=>({fontFamily:t.messageFontFamily,fontSize:t.messageFontSize,fontWeight:t.messageFontWeight}),"messageFont");function tE(t,e,a,n,i){if(!e[t].width){if(a)e[t].text=(0,r.X4)(e[t].text,i,n),e[t].textLines=e[t].text.split(s.SY.lineBreakRegex).length,e[t].width=i,e[t].height=(0,r.XD)(e[t].text,n);else{let a=e[t].text.split(s.SY.lineBreakRegex);e[t].textLines=a.length;let i=0;for(let s of(e[t].height=0,e[t].width=0,a))e[t].width=Math.max((0,r.Cq)(s,n),e[t].width),i=(0,r.XD)(s,n),e[t].height=e[t].height+i}}}(0,l.eW)(tE,"calcC4ShapeTextWH");var tA=(0,l.eW)(function(t,e,a){e.x=a.data.startx,e.y=a.data.starty,e.width=a.data.stopx-a.data.startx,e.height=a.data.stopy-a.data.starty,e.label.y=tf.c4ShapeMargin-35;let n=e.wrap&&tf.wrap,i=t_(tf);i.fontSize=i.fontSize+2,i.fontWeight="bold";let s=(0,r.Cq)(e.label.text,i);tE("label",e,n,i,s),th.drawBoundary(t,e,tf)},"drawBoundary"),tS=(0,l.eW)(function(t,e,a,n){let i=0;for(let s of n){i=0;let n=a[s],l=tx(tf,n.typeC4Shape.text);switch(l.fontSize=l.fontSize-2,n.typeC4Shape.width=(0,r.Cq)("\xab"+n.typeC4Shape.text+"\xbb",l),n.typeC4Shape.height=l.fontSize+2,n.typeC4Shape.Y=tf.c4ShapePadding,i=n.typeC4Shape.Y+n.typeC4Shape.height-4,n.image={width:0,height:0,Y:0},n.typeC4Shape.text){case"person":case"external_person":n.image.width=48,n.image.height=48,n.image.Y=i,i=n.image.Y+n.image.height}n.sprite&&(n.image.width=48,n.image.height=48,n.image.Y=i,i=n.image.Y+n.image.height);let o=n.wrap&&tf.wrap,h=tf.width-2*tf.c4ShapePadding,d=tx(tf,n.typeC4Shape.text);if(d.fontSize=d.fontSize+2,d.fontWeight="bold",tE("label",n,o,d,h),n.label.Y=i+8,i=n.label.Y+n.label.height,n.type&&""!==n.type.text){n.type.text="["+n.type.text+"]";let t=tx(tf,n.typeC4Shape.text);tE("type",n,o,t,h),n.type.Y=i+5,i=n.type.Y+n.type.height}else if(n.techn&&""!==n.techn.text){n.techn.text="["+n.techn.text+"]";let t=tx(tf,n.techn.text);tE("techn",n,o,t,h),n.techn.Y=i+5,i=n.techn.Y+n.techn.height}let u=i,p=n.label.width;if(n.descr&&""!==n.descr.text){let t=tx(tf,n.typeC4Shape.text);tE("descr",n,o,t,h),n.descr.Y=i+20,i=n.descr.Y+n.descr.height,p=Math.max(n.label.width,n.descr.width),u=i-5*n.descr.textLines}p+=tf.c4ShapePadding,n.width=Math.max(n.width||tf.width,p,tf.width),n.height=Math.max(n.height||tf.height,u,tf.height),n.margin=n.margin||tf.c4ShapeMargin,t.insert(n),th.drawC4Shape(e,n,tf)}t.bumpLastMargin(tf.c4ShapeMargin)},"drawC4ShapeArray"),tC=class{static{(0,l.eW)(this,"Point")}constructor(t,e){this.x=t,this.y=e}},tk=(0,l.eW)(function(t,e){let a=t.x,n=t.y,i=e.x,r=e.y,s=a+t.width/2,l=n+t.height/2,o=Math.abs(a-i),h=Math.abs(n-r),d=h/o,u=t.height/t.width,p=null;return n==r&&a<i?p=new tC(a+t.width,l):n==r&&a>i?p=new tC(a,l):a==i&&n<r?p=new tC(s,n+t.height):a==i&&n>r&&(p=new tC(s,n)),a>i&&n<r?p=u>=d?new tC(a,l+d*t.width/2):new tC(s-o/h*t.height/2,n+t.height):a<i&&n<r?p=u>=d?new tC(a+t.width,l+d*t.width/2):new tC(s+o/h*t.height/2,n+t.height):a<i&&n>r?p=u>=d?new tC(a+t.width,l-d*t.width/2):new tC(s+t.height/2*o/h,n):a>i&&n>r&&(p=u>=d?new tC(a,l-t.width/2*d):new tC(s-t.height/2*o/h,n)),p},"getIntersectPoint"),tO=(0,l.eW)(function(t,e){let a={x:0,y:0};a.x=e.x+e.width/2,a.y=e.y+e.height/2;let n=tk(t,a);return a.x=t.x+t.width/2,a.y=t.y+t.height/2,{startPoint:n,endPoint:tk(e,a)}},"getIntersectPoints"),tw=(0,l.eW)(function(t,e,a,n){let i=0;for(let t of e){i+=1;let e=t.wrap&&tf.wrap,s=tm(tf);"C4Dynamic"===n.db.getC4Type()&&(t.label.text=i+": "+t.label.text);let l=(0,r.Cq)(t.label.text,s);tE("label",t,e,s,l),t.techn&&""!==t.techn.text&&(l=(0,r.Cq)(t.techn.text,s),tE("techn",t,e,s,l)),t.descr&&""!==t.descr.text&&(l=(0,r.Cq)(t.descr.text,s),tE("descr",t,e,s,l));let o=tO(a(t.from),a(t.to));t.startPoint=o.startPoint,t.endPoint=o.endPoint}th.drawRels(t,e,tf)},"drawRels");function tT(t,e,a,n,i){let r=new tb(i);for(let[s,l]of(r.data.widthLimit=a.data.widthLimit/Math.min(ty,n.length),n.entries())){let n=0;l.image={width:0,height:0,Y:0},l.sprite&&(l.image.width=48,l.image.height=48,l.image.Y=n,n=l.image.Y+l.image.height);let o=l.wrap&&tf.wrap,h=t_(tf);if(h.fontSize=h.fontSize+2,h.fontWeight="bold",tE("label",l,o,h,r.data.widthLimit),l.label.Y=n+8,n=l.label.Y+l.label.height,l.type&&""!==l.type.text&&(l.type.text="["+l.type.text+"]",tE("type",l,o,t_(tf),r.data.widthLimit),l.type.Y=n+5,n=l.type.Y+l.type.height),l.descr&&""!==l.descr.text){let t=t_(tf);t.fontSize=t.fontSize-2,tE("descr",l,o,t,r.data.widthLimit),l.descr.Y=n+20,n=l.descr.Y+l.descr.height}if(0==s||s%ty==0){let t=a.data.startx+tf.diagramMarginX,e=a.data.stopy+tf.diagramMarginY+n;r.setData(t,t,e,e)}else{let t=r.data.stopx!==r.data.startx?r.data.stopx+tf.diagramMarginX:r.data.startx,e=r.data.starty;r.setData(t,t,e,e)}r.name=l.alias;let d=i.db.getC4ShapeArray(l.alias),u=i.db.getC4ShapeKeys(l.alias);u.length>0&&tS(r,t,d,u),e=l.alias;let p=i.db.getBoundaries(e);p.length>0&&tT(t,e,r,p,i),"global"!==l.alias&&tA(t,l,r),a.data.stopy=Math.max(r.data.stopy+tf.c4ShapeMargin,a.data.stopy),a.data.stopx=Math.max(r.data.stopx+tf.c4ShapeMargin,a.data.stopx),td=Math.max(td,a.data.stopx),tu=Math.max(tu,a.data.stopy)}}(0,l.eW)(tT,"drawInsideBoundary");var tv={drawPersonOrSystemArray:tS,drawBoundary:tA,setConf:tg,draw:(0,l.eW)(function(t,e,a,n){let i;tf=(0,s.nV)().c4;let r=(0,s.nV)().securityLevel;"sandbox"===r&&(i=(0,o.Ys)("#i"+e));let h="sandbox"===r?(0,o.Ys)(i.nodes()[0].contentDocument.body):(0,o.Ys)("body"),d=n.db;n.db.setWrap(tf.wrap),tp=d.getC4ShapeInRow(),ty=d.getC4BoundaryInRow(),l.cM.debug(`C:${JSON.stringify(tf,null,2)}`);let u="sandbox"===r?h.select(`[id="${e}"]`):(0,o.Ys)(`[id="${e}"]`);th.insertComputerIcon(u),th.insertDatabaseIcon(u),th.insertClockIcon(u);let p=new tb(n);p.setData(tf.diagramMarginX,tf.diagramMarginX,tf.diagramMarginY,tf.diagramMarginY),p.data.widthLimit=screen.availWidth,td=tf.diagramMarginX,tu=tf.diagramMarginY;let y=n.db.getTitle();tT(u,"",p,n.db.getBoundaries(""),n),th.insertArrowHead(u),th.insertArrowEnd(u),th.insertArrowCrossHead(u),th.insertArrowFilledHead(u),tw(u,n.db.getRels(),n.db.getC4Shape,n),p.data.stopx=td,p.data.stopy=tu;let f=p.data,b=f.stopy-f.starty+2*tf.diagramMarginY,g=f.stopx-f.startx+2*tf.diagramMarginX;y&&u.append("text").text(y).attr("x",(f.stopx-f.startx)/2-4*tf.diagramMarginX).attr("y",f.starty+tf.diagramMarginY),(0,s.v2)(u,b,g,tf.useMaxWidth);let x=y?60:0;u.attr("viewBox",f.startx-tf.diagramMarginX+" -"+(tf.diagramMarginY+x)+" "+g+" "+(b+x)),l.cM.debug("models:",f)},"draw")},tR={parser:d,db:H,renderer:tv,styles:(0,l.eW)(t=>`.person {
|
|
2
|
+
stroke: ${t.personBorder};
|
|
3
|
+
fill: ${t.personBkg};
|
|
4
|
+
}
|
|
5
|
+
`,"getStyles"),init:(0,l.eW)(({c4:t,wrap:e})=>{tv.setConf(t),H.setWrap(e)},"init")}},74275:function(t,e,a){a.d(e,{AD:function(){return p},AE:function(){return h},Mu:function(){return s},O:function(){return l},kc:function(){return u},rB:function(){return d},yU:function(){return o}});var n=a(35425),i=a(28311),r=a(41195),s=(0,i.eW)((t,e)=>{let a=t.append("rect");if(a.attr("x",e.x),a.attr("y",e.y),a.attr("fill",e.fill),a.attr("stroke",e.stroke),a.attr("width",e.width),a.attr("height",e.height),e.name&&a.attr("name",e.name),e.rx&&a.attr("rx",e.rx),e.ry&&a.attr("ry",e.ry),void 0!==e.attrs)for(let t in e.attrs)a.attr(t,e.attrs[t]);return e.class&&a.attr("class",e.class),a},"drawRect"),l=(0,i.eW)((t,e)=>{s(t,{x:e.startx,y:e.starty,width:e.stopx-e.startx,height:e.stopy-e.starty,fill:e.fill,stroke:e.stroke,class:"rect"}).lower()},"drawBackgroundRect"),o=(0,i.eW)((t,e)=>{let a=e.text.replace(n.Vw," "),i=t.append("text");i.attr("x",e.x),i.attr("y",e.y),i.attr("class","legend"),i.style("text-anchor",e.anchor),e.class&&i.attr("class",e.class);let r=i.append("tspan");return r.attr("x",e.x+2*e.textMargin),r.text(a),i},"drawText"),h=(0,i.eW)((t,e,a,n)=>{let i=t.append("image");i.attr("x",e),i.attr("y",a);let s=(0,r.N)(n);i.attr("xlink:href",s)},"drawImage"),d=(0,i.eW)((t,e,a,n)=>{let i=t.append("use");i.attr("x",e),i.attr("y",a);let s=(0,r.N)(n);i.attr("xlink:href",`#${s}`)},"drawEmbeddedImage"),u=(0,i.eW)(()=>({x:0,y:0,width:100,height:100,fill:"#EDF2AE",stroke:"#666",anchor:"start",rx:0,ry:0}),"getNoteRect"),p=(0,i.eW)(()=>({x:0,y:0,width:100,height:100,"text-anchor":"start",style:"#666",textMargin:0,rx:0,ry:0,tspan:!0}),"getTextObj")}}]);
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4655],{90678:function(t,e,a){a.d(e,{C1:function(){return c},Lf:function(){return ed},XO:function(){return $},Yn:function(){return ec},ZH:function(){return N},aH:function(){return ey},dW:function(){return eh},gU:function(){return eg},jr:function(){return y},us:function(){return B}});var l=a(74407),r=a(21253),i=a(4484),n=a(21599),s=a(35425),h=a(28311),o=a(42325),d=a(68222),c=(0,h.eW)(async(t,e,a)=>{let l,r;let d=e.useHtmlLabels||(0,s.ku)(s.nV()?.htmlLabels);l=a||"node default";let c=t.insert("g").attr("class",l).attr("id",e.domId||e.id),g=c.insert("g").attr("class","label").attr("style",(0,n.R7)(e.labelStyle));r=void 0===e.label?"":"string"==typeof e.label?e.label:e.label[0];let y=await (0,i.rw)(g,(0,s.oO)((0,n.SH)(r),(0,s.nV)()),{useHtmlLabels:d,width:e.width||s.nV().flowchart?.wrappingWidth,cssClasses:"markdown-node-label",style:e.labelStyle,addSvgBackground:!!e.icon||!!e.img}),f=y.getBBox(),p=(e?.padding??0)/2;if(d){let t=y.children[0],e=(0,o.Ys)(y),a=t.getElementsByTagName("img");if(a){let t=""===r.replace(/<img[^>]*>/g,"").trim();await Promise.all([...a].map(e=>new Promise(a=>{function l(){if(e.style.display="flex",e.style.flexDirection="column",t){let t=(0,s.nV)().fontSize?(0,s.nV)().fontSize:window.getComputedStyle(document.body).fontSize,[a=s.vZ.fontSize]=(0,n.VG)(t),l=5*a+"px";e.style.minWidth=l,e.style.maxWidth=l}else e.style.width="100%";a(e)}(0,h.eW)(l,"setupImage"),setTimeout(()=>{e.complete&&l()}),e.addEventListener("error",l),e.addEventListener("load",l)})))}f=t.getBoundingClientRect(),e.attr("width",f.width),e.attr("height",f.height)}return d?g.attr("transform","translate("+-f.width/2+", "+-f.height/2+")"):g.attr("transform","translate(0, "+-f.height/2+")"),e.centerLabel&&g.attr("transform","translate("+-f.width/2+", "+-f.height/2+")"),g.insert("rect",":first-child"),{shapeSvg:c,bbox:f,halfPadding:p,label:g}},"labelHelper"),g=(0,h.eW)(async(t,e,a)=>{let l=a.useHtmlLabels||(0,s.ku)(s.nV()?.flowchart?.htmlLabels),r=t.insert("g").attr("class","label").attr("style",a.labelStyle||""),h=await (0,i.rw)(r,(0,s.oO)((0,n.SH)(e),(0,s.nV)()),{useHtmlLabels:l,width:a.width||s.nV()?.flowchart?.wrappingWidth,style:a.labelStyle,addSvgBackground:!!a.icon||!!a.img}),d=h.getBBox(),c=a.padding/2;if((0,s.ku)(s.nV()?.flowchart?.htmlLabels)){let t=h.children[0],e=(0,o.Ys)(h);d=t.getBoundingClientRect(),e.attr("width",d.width),e.attr("height",d.height)}return l?r.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"):r.attr("transform","translate(0, "+-d.height/2+")"),a.centerLabel&&r.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"),r.insert("rect",":first-child"),{shapeSvg:t,bbox:d,halfPadding:c,label:r}},"insertLabel"),y=(0,h.eW)((t,e)=>{let a=e.node().getBBox();t.width=a.width,t.height=a.height},"updateNodeBounds"),f=(0,h.eW)((t,e)=>("handDrawn"===t.look?"rough-node":"node")+" "+t.cssClasses+" "+(e||""),"getNodeClasses");function p(t){let e=t.map((t,e)=>`${0===e?"M":"L"}${t.x},${t.y}`);return e.push("Z"),e.join(" ")}function u(t,e,a,l,r,i){let n=[],s=a-t,h=2*Math.PI/(s/i),o=e+(l-e)/2;for(let e=0;e<=50;e++){let a=t+e/50*s,l=o+r*Math.sin(h*(a-t));n.push({x:a,y:l})}return n}function m(t,e,a,l,r,i){let n=[],s=r*Math.PI/180,h=(i*Math.PI/180-s)/(l-1);for(let r=0;r<l;r++){let l=s+r*h,i=t+a*Math.cos(l),o=e+a*Math.sin(l);n.push({x:-i,y:-o})}return n}(0,h.eW)(p,"createPathFromPoints"),(0,h.eW)(u,"generateFullSineWavePoints"),(0,h.eW)(m,"generateCirclePoints");var w=(0,h.eW)((t,e)=>{var a,l,r=t.x,i=t.y,n=e.x-r,s=e.y-i,h=t.width/2,o=t.height/2;return Math.abs(s)*h>Math.abs(n)*o?(s<0&&(o=-o),a=0===s?0:o*n/s,l=o):(n<0&&(h=-h),a=h,l=0===n?0:h*s/n),{x:r+a,y:i+l}},"intersectRect");function x(t,e){e&&t.attr("style",e)}async function b(t){let e=(0,o.Ys)(document.createElementNS("http://www.w3.org/2000/svg","foreignObject")),a=e.append("xhtml:div"),l=(0,s.nV)(),r=t.label;t.label&&(0,s.l0)(t.label)&&(r=await (0,s.ur)(t.label.replace(s.SY.lineBreakRegex,"\n"),l));let i='<span class="'+(t.isNode?"nodeLabel":"edgeLabel")+'" '+(t.labelStyle?'style="'+t.labelStyle+'"':"")+">"+r+"</span>";return a.html((0,s.oO)(i,l)),x(a,t.labelStyle),a.style("display","inline-block"),a.style("padding-right","1px"),a.style("white-space","nowrap"),a.attr("xmlns","http://www.w3.org/1999/xhtml"),e.node()}(0,h.eW)(x,"applyStyle"),(0,h.eW)(b,"addHtmlLabel");var $=(0,h.eW)(async(t,e,a,l)=>{let r=t||"";if("object"==typeof r&&(r=r[0]),(0,s.ku)((0,s.nV)().flowchart.htmlLabels)){r=r.replace(/\\n|\n/g,"<br />"),h.cM.info("vertexText"+r);let t={isNode:l,label:(0,n.SH)(r).replace(/fa[blrs]?:fa-[\w-]+/g,t=>`<i class='${t.replace(":"," ")}'></i>`),labelStyle:e?e.replace("fill:","color:"):e};return await b(t)}{let t=document.createElementNS("http://www.w3.org/2000/svg","text");t.setAttribute("style",e.replace("color:","fill:"));for(let e of"string"==typeof r?r.split(/\\n|\n|<br\s*\/?>/gi):Array.isArray(r)?r:[]){let l=document.createElementNS("http://www.w3.org/2000/svg","tspan");l.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),l.setAttribute("dy","1em"),l.setAttribute("x","0"),a?l.setAttribute("class","title-row"):l.setAttribute("class","row"),l.textContent=e.trim(),t.appendChild(l)}return t}},"createLabel"),k=(0,h.eW)((t,e,a,l,r)=>["M",t+r,e,"H",t+a-r,"A",r,r,0,0,1,t+a,e+r,"V",e+l-r,"A",r,r,0,0,1,t+a-r,e+l,"H",t+r,"A",r,r,0,0,1,t,e+l-r,"V",e+r,"A",r,r,0,0,1,t+r,e,"Z"].join(" "),"createRoundedRectPathD"),M=(0,h.eW)(async(t,e)=>{let a;h.cM.info("Creating subgraph rect for ",e.id,e);let n=(0,s.nV)(),{themeVariables:c,handDrawnSeed:g}=n,{clusterBkg:y,clusterBorder:f}=c,{labelStyles:p,nodeStyles:u,borderStyles:m,backgroundStyles:x}=(0,r.UG)(e),b=t.insert("g").attr("class","cluster "+e.cssClasses).attr("id",e.id).attr("data-look",e.look),$=(0,s.ku)(n.flowchart.htmlLabels),M=b.insert("g").attr("class","cluster-label "),S=await (0,i.rw)(M,e.label,{style:e.labelStyle,useHtmlLabels:$,isNode:!0}),D=S.getBBox();if((0,s.ku)(n.flowchart.htmlLabels)){let t=S.children[0],e=(0,o.Ys)(S);D=t.getBoundingClientRect(),e.attr("width",D.width),e.attr("height",D.height)}let W=e.width<=D.width+e.padding?D.width+e.padding:e.width;e.width<=D.width+e.padding?e.diff=(W-e.width)/2-e.padding:e.diff=-e.padding;let v=e.height,C=e.x-W/2,B=e.y-v/2;if(h.cM.trace("Data ",e,JSON.stringify(e)),"handDrawn"===e.look){let t=d.Z.svg(b),l=(0,r._q)(e,{roughness:.7,fill:y,stroke:f,fillWeight:3,seed:g}),i=t.path(k(C,B,W,v,0),l);(a=b.insert(()=>(h.cM.debug("Rough node insert CXC",i),i),":first-child")).select("path:nth-child(2)").attr("style",m.join(";")),a.select("path").attr("style",x.join(";").replace("fill","stroke"))}else(a=b.insert("rect",":first-child")).attr("style",u).attr("rx",e.rx).attr("ry",e.ry).attr("x",C).attr("y",B).attr("width",W).attr("height",v);let{subGraphTitleTopMargin:N}=(0,l.L)(n);if(M.attr("transform",`translate(${e.x-D.width/2}, ${e.y-e.height/2+N})`),p){let t=M.select("span");t&&t.attr("style",p)}let A=a.node().getBBox();return e.offsetX=0,e.width=A.width,e.height=A.height,e.offsetY=D.height-e.padding/2,e.intersect=function(t){return w(e,t)},{cluster:b,labelBBox:D}},"rect"),S=(0,h.eW)((t,e)=>{let a=t.insert("g").attr("class","note-cluster").attr("id",e.id),l=a.insert("rect",":first-child"),r=0*e.padding,i=r/2;l.attr("rx",e.rx).attr("ry",e.ry).attr("x",e.x-e.width/2-i).attr("y",e.y-e.height/2-i).attr("width",e.width+r).attr("height",e.height+r).attr("fill","none");let n=l.node().getBBox();return e.width=n.width,e.height=n.height,e.intersect=function(t){return w(e,t)},{cluster:a,labelBBox:{width:0,height:0}}},"noteGroup"),D=(0,h.eW)(async(t,e)=>{let a;let l=(0,s.nV)(),{themeVariables:r,handDrawnSeed:i}=l,{altBackground:n,compositeBackground:h,compositeTitleBackground:c,nodeBorder:g}=r,y=t.insert("g").attr("class",e.cssClasses).attr("id",e.id).attr("data-id",e.id).attr("data-look",e.look),f=y.insert("g",":first-child"),p=y.insert("g").attr("class","cluster-label"),u=y.append("rect"),m=p.node().appendChild(await $(e.label,e.labelStyle,void 0,!0)),x=m.getBBox();if((0,s.ku)(l.flowchart.htmlLabels)){let t=m.children[0],e=(0,o.Ys)(m);x=t.getBoundingClientRect(),e.attr("width",x.width),e.attr("height",x.height)}let b=0*e.padding,M=(e.width<=x.width+e.padding?x.width+e.padding:e.width)+b;e.width<=x.width+e.padding?e.diff=(M-e.width)/2-e.padding:e.diff=-e.padding;let S=e.height+b,D=e.height+b-x.height-6,W=e.x-M/2,v=e.y-S/2;e.width=M;let C=e.y-e.height/2-b/2+x.height+2;if("handDrawn"===e.look){let t=e.cssClasses.includes("statediagram-cluster-alt"),l=d.Z.svg(y),r=e.rx||e.ry?l.path(k(W,v,M,S,10),{roughness:.7,fill:c,fillStyle:"solid",stroke:g,seed:i}):l.rectangle(W,v,M,S,{seed:i});a=y.insert(()=>r,":first-child");let s=l.rectangle(W,C,M,D,{fill:t?n:h,fillStyle:t?"hachure":"solid",stroke:g,seed:i});a=y.insert(()=>r,":first-child"),u=y.insert(()=>s)}else(a=f.insert("rect",":first-child")).attr("class","outer").attr("x",W).attr("y",v).attr("width",M).attr("height",S).attr("data-look",e.look),u.attr("class","inner").attr("x",W).attr("y",C).attr("width",M).attr("height",D);p.attr("transform",`translate(${e.x-x.width/2}, ${v+1-((0,s.ku)(l.flowchart.htmlLabels)?0:3)})`);let B=a.node().getBBox();return e.height=B.height,e.offsetX=0,e.offsetY=x.height-e.padding/2,e.labelBBox=x,e.intersect=function(t){return w(e,t)},{cluster:y,labelBBox:x}},"roundedWithTitle"),W=(0,h.eW)(async(t,e)=>{let a;h.cM.info("Creating subgraph rect for ",e.id,e);let n=(0,s.nV)(),{themeVariables:c,handDrawnSeed:g}=n,{clusterBkg:y,clusterBorder:f}=c,{labelStyles:p,nodeStyles:u,borderStyles:m,backgroundStyles:x}=(0,r.UG)(e),b=t.insert("g").attr("class","cluster "+e.cssClasses).attr("id",e.id).attr("data-look",e.look),$=(0,s.ku)(n.flowchart.htmlLabels),M=b.insert("g").attr("class","cluster-label "),S=await (0,i.rw)(M,e.label,{style:e.labelStyle,useHtmlLabels:$,isNode:!0,width:e.width}),D=S.getBBox();if((0,s.ku)(n.flowchart.htmlLabels)){let t=S.children[0],e=(0,o.Ys)(S);D=t.getBoundingClientRect(),e.attr("width",D.width),e.attr("height",D.height)}let W=e.width<=D.width+e.padding?D.width+e.padding:e.width;e.width<=D.width+e.padding?e.diff=(W-e.width)/2-e.padding:e.diff=-e.padding;let v=e.height,C=e.x-W/2,B=e.y-v/2;if(h.cM.trace("Data ",e,JSON.stringify(e)),"handDrawn"===e.look){let t=d.Z.svg(b),l=(0,r._q)(e,{roughness:.7,fill:y,stroke:f,fillWeight:4,seed:g}),i=t.path(k(C,B,W,v,e.rx),l);(a=b.insert(()=>(h.cM.debug("Rough node insert CXC",i),i),":first-child")).select("path:nth-child(2)").attr("style",m.join(";")),a.select("path").attr("style",x.join(";").replace("fill","stroke"))}else(a=b.insert("rect",":first-child")).attr("style",u).attr("rx",e.rx).attr("ry",e.ry).attr("x",C).attr("y",B).attr("width",W).attr("height",v);let{subGraphTitleTopMargin:N}=(0,l.L)(n);if(M.attr("transform",`translate(${e.x-D.width/2}, ${e.y-e.height/2+N})`),p){let t=M.select("span");t&&t.attr("style",p)}let A=a.node().getBBox();return e.offsetX=0,e.width=A.width,e.height=A.height,e.offsetY=D.height-e.padding/2,e.intersect=function(t){return w(e,t)},{cluster:b,labelBBox:D}},"kanbanSection"),v={rect:M,squareRect:M,roundedWithTitle:D,noteGroup:S,divider:(0,h.eW)((t,e)=>{let a;let{themeVariables:l,handDrawnSeed:r}=(0,s.nV)(),{nodeBorder:i}=l,n=t.insert("g").attr("class",e.cssClasses).attr("id",e.id).attr("data-look",e.look),h=n.insert("g",":first-child"),o=0*e.padding,c=e.width+o;e.diff=-e.padding;let g=e.height+o,y=e.x-c/2,f=e.y-g/2;if(e.width=c,"handDrawn"===e.look){let t=d.Z.svg(n).rectangle(y,f,c,g,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:i,seed:r});a=n.insert(()=>t,":first-child")}else(a=h.insert("rect",":first-child")).attr("class","divider").attr("x",y).attr("y",f).attr("width",c).attr("height",g).attr("data-look",e.look);let p=a.node().getBBox();return e.height=p.height,e.offsetX=0,e.offsetY=0,e.intersect=function(t){return w(e,t)},{cluster:n,labelBBox:{}}},"divider"),kanbanSection:W},C=new Map,B=(0,h.eW)(async(t,e)=>{let a=e.shape||"rect",l=await v[a](t,e);return C.set(e.id,l),l},"insertCluster"),N=(0,h.eW)(()=>{C=new Map},"clear");function A(t,e,a,l){var r=t.x,i=t.y,n=r-l.x,s=i-l.y,h=Math.sqrt(e*e*s*s+a*a*n*n),o=Math.abs(e*a*n/h);l.x<r&&(o=-o);var d=Math.abs(e*a*s/h);return l.y<i&&(d=-d),{x:r+o,y:i+d}}function q(t,e,a){return A(t,e,e,a)}function R(t,e,a,l){{let r=e.y-t.y,i=t.x-e.x,n=e.x*t.y-t.x*e.y,s=r*a.x+i*a.y+n,h=r*l.x+i*l.y+n;if(0!==s&&0!==h&&_(s,h))return;let o=l.y-a.y,d=a.x-l.x,c=l.x*a.y-a.x*l.y,g=o*t.x+d*t.y+c,y=o*e.x+d*e.y+c;if(1e-6>Math.abs(g)&&1e-6>Math.abs(y)&&_(g,y))return;let f=r*d-o*i;if(0===f)return;let p=Math.abs(f/2),u=i*c-d*n;return{x:u<0?(u-p)/f:(u+p)/f,y:(u=o*n-r*c)<0?(u-p)/f:(u+p)/f}}}function _(t,e){return t*e>0}function L(t,e,a){let l=t.x,r=t.y,i=[],n=Number.POSITIVE_INFINITY,s=Number.POSITIVE_INFINITY;"function"==typeof e.forEach?e.forEach(function(t){n=Math.min(n,t.x),s=Math.min(s,t.y)}):(n=Math.min(n,e.x),s=Math.min(s,e.y));let h=l-t.width/2-n,o=r-t.height/2-s;for(let l=0;l<e.length;l++){let r=e[l],n=e[l<e.length-1?l+1:0],s=R(t,a,{x:h+r.x,y:o+r.y},{x:h+n.x,y:o+n.y});s&&i.push(s)}return i.length?(i.length>1&&i.sort(function(t,e){let l=t.x-a.x,r=t.y-a.y,i=Math.sqrt(l*l+r*r),n=e.x-a.x,s=e.y-a.y,h=Math.sqrt(n*n+s*s);return i<h?-1:i===h?0:1}),i[0]):t}(0,h.eW)(function(t,e){return t.intersect(e)},"intersectNode"),(0,h.eW)(A,"intersectEllipse"),(0,h.eW)(q,"intersectCircle"),(0,h.eW)(R,"intersectLine"),(0,h.eW)(_,"sameSign"),(0,h.eW)(L,"intersectPolygon");var P={circle:q,polygon:L,rect:w};function Z(t,e){let{labelStyles:a}=(0,r.UG)(e);e.labelStyle=a;let l=f(e),i=l;l||(i="anchor");let s=t.insert("g").attr("class",i).attr("id",e.domId||e.id),{cssStyles:o}=e,c=d.Z.svg(s),g=(0,r._q)(e,{fill:"black",stroke:"none",fillStyle:"solid"});"handDrawn"!==e.look&&(g.roughness=0);let p=c.circle(0,0,2,g),u=s.insert(()=>p,":first-child");return u.attr("class","anchor").attr("style",(0,n.R7)(o)),y(e,u),e.intersect=function(t){return h.cM.info("Circle intersect",e,1,t),P.circle(e,1,t)},s}function U(t,e,a,l,r,i,n){let s=Math.atan2(l-e,a-t),h=Math.sqrt(((a-t)/2/r)**2+((l-e)/2/i)**2);if(h>1)throw Error("The given radii are too small to create an arc between the points.");let o=Math.sqrt(1-h**2),d=(t+a)/2+o*i*Math.sin(s)*(n?-1:1),c=(e+l)/2-o*r*Math.cos(s)*(n?-1:1),g=Math.atan2((e-c)/i,(t-d)/r),y=Math.atan2((l-c)/i,(a-d)/r)-g;n&&y<0&&(y+=2*Math.PI),!n&&y>0&&(y-=2*Math.PI);let f=[];for(let t=0;t<20;t++){let e=g+t/19*y,a=d+r*Math.cos(e),l=c+i*Math.sin(e);f.push({x:a,y:l})}return f}async function G(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.UG)(e);e.labelStyle=a;let{shapeSvg:i,bbox:n}=await c(t,e,f(e)),s=n.width+e.padding+20,h=n.height+e.padding,o=h/2,g=o/(2.5+h/50),{cssStyles:u}=e,m=[{x:s/2,y:-h/2},{x:-s/2,y:-h/2},...U(-s/2,-h/2,-s/2,h/2,g,o,!1),{x:s/2,y:h/2},...U(s/2,h/2,s/2,-h/2,g,o,!0)],w=d.Z.svg(i),x=(0,r._q)(e,{});"handDrawn"!==e.look&&(x.roughness=0,x.fillStyle="solid");let b=p(m),$=w.path(b,x),k=i.insert(()=>$,":first-child");return k.attr("class","basic label-container"),u&&"handDrawn"!==e.look&&k.selectAll("path").attr("style",u),l&&"handDrawn"!==e.look&&k.selectAll("path").attr("style",l),k.attr("transform",`translate(${g/2}, 0)`),y(e,k),e.intersect=function(t){return P.polygon(e,m,t)},i}function I(t,e,a,l){return t.insert("polygon",":first-child").attr("points",l.map(function(t){return t.x+","+t.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-e/2+","+a/2+")")}async function T(t,e){let a;let{labelStyles:l,nodeStyles:i}=(0,r.UG)(e);e.labelStyle=l;let{shapeSvg:n,bbox:s}=await c(t,e,f(e)),h=s.height+e.padding,o=s.width+e.padding+12,g=-h,u=[{x:12,y:g},{x:o,y:g},{x:o,y:0},{x:0,y:0},{x:0,y:g+12},{x:12,y:g}],{cssStyles:m}=e;if("handDrawn"===e.look){let t=d.Z.svg(n),l=(0,r._q)(e,{}),i=p(u),s=t.path(i,l);a=n.insert(()=>s,":first-child").attr("transform",`translate(${-o/2}, ${h/2})`),m&&a.attr("style",m)}else a=I(n,o,h,u);return i&&a.attr("style",i),y(e,a),e.intersect=function(t){return P.polygon(e,u,t)},n}function E(t,e){let{nodeStyles:a}=(0,r.UG)(e);e.label="";let l=t.insert("g").attr("class",f(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}],h=d.Z.svg(l),o=(0,r._q)(e,{});"handDrawn"!==e.look&&(o.roughness=0,o.fillStyle="solid");let c=p(s),g=h.path(c,o),y=l.insert(()=>g,":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 P.polygon(e,s,t)},l}async function H(t,e,a){let l;let{labelStyles:i,nodeStyles:s}=(0,r.UG)(e);e.labelStyle=i;let{shapeSvg:o,bbox:g,halfPadding:p}=await c(t,e,f(e)),u=a?.padding??p,m=g.width/2+u,{cssStyles:w}=e;if("handDrawn"===e.look){let t=d.Z.svg(o),a=(0,r._q)(e,{}),i=t.circle(0,0,2*m,a);(l=o.insert(()=>i,":first-child")).attr("class","basic label-container").attr("style",(0,n.R7)(w))}else l=o.insert("circle",":first-child").attr("class","basic label-container").attr("style",s).attr("r",m).attr("cx",0).attr("cy",0);return y(e,l),e.calcIntersect=function(t,e){let a=t.width/2;return P.circle(t,a,e)},e.intersect=function(t){return h.cM.info("Circle intersect",e,m,t),P.circle(e,m,t)},o}function V(t){let e=Math.cos(Math.PI/4),a=Math.sin(Math.PI/4),l=2*t,r={x:l/2*e,y:l/2*a},i={x:-(l/2)*e,y:l/2*a},n={x:-(l/2)*e,y:-(l/2)*a},s={x:l/2*e,y:-(l/2)*a};return`M ${i.x},${i.y} L ${s.x},${s.y}
|
|
2
|
+
M ${r.x},${r.y} L ${n.x},${n.y}`}function Y(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.UG)(e);e.labelStyle=a,e.label="";let i=t.insert("g").attr("class",f(e)).attr("id",e.domId??e.id),n=Math.max(30,e?.width??0),{cssStyles:s}=e,o=d.Z.svg(i),c=(0,r._q)(e,{});"handDrawn"!==e.look&&(c.roughness=0,c.fillStyle="solid");let g=o.circle(0,0,2*n,c),p=V(n),u=o.path(p,c),m=i.insert(()=>g,":first-child");return m.insert(()=>u),s&&"handDrawn"!==e.look&&m.selectAll("path").attr("style",s),l&&"handDrawn"!==e.look&&m.selectAll("path").attr("style",l),y(e,m),e.intersect=function(t){return h.cM.info("crossedCircle intersect",e,{radius:n,point:t}),P.circle(e,n,t)},i}function j(t,e,a,l=100,r=0,i=180){let n=[],s=r*Math.PI/180,h=(i*Math.PI/180-s)/(l-1);for(let r=0;r<l;r++){let l=s+r*h,i=t+a*Math.cos(l),o=e+a*Math.sin(l);n.push({x:-i,y:-o})}return n}async function O(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.UG)(e);e.labelStyle=a;let{shapeSvg:i,bbox:n,label:s}=await c(t,e,f(e)),h=n.width+(e.padding??0),o=n.height+(e.padding??0),g=Math.max(5,.1*o),{cssStyles:u}=e,m=[...j(h/2,-o/2,g,30,-90,0),{x:-h/2-g,y:g},...j(h/2+2*g,-g,g,20,-180,-270),...j(h/2+2*g,g,g,20,-90,-180),{x:-h/2-g,y:-o/2},...j(h/2,o/2,g,20,0,90)],w=[{x:h/2,y:-o/2-g},{x:-h/2,y:-o/2-g},...j(h/2,-o/2,g,20,-90,0),{x:-h/2-g,y:-g},...j(h/2+.1*h,-g,g,20,-180,-270),...j(h/2+.1*h,g,g,20,-90,-180),{x:-h/2-g,y:o/2},...j(h/2,o/2,g,20,0,90),{x:-h/2,y:o/2+g},{x:h/2,y:o/2+g}],x=d.Z.svg(i),b=(0,r._q)(e,{fill:"none"});"handDrawn"!==e.look&&(b.roughness=0,b.fillStyle="solid");let $=p(m).replace("Z",""),k=x.path($,b),M=p(w),S=x.path(M,{...b}),D=i.insert("g",":first-child");return D.insert(()=>S,":first-child").attr("stroke-opacity",0),D.insert(()=>k,":first-child"),D.attr("class","text"),u&&"handDrawn"!==e.look&&D.selectAll("path").attr("style",u),l&&"handDrawn"!==e.look&&D.selectAll("path").attr("style",l),D.attr("transform",`translate(${g}, 0)`),s.attr("transform",`translate(${-h/2+g-(n.x-(n.left??0))},${-o/2+(e.padding??0)/2-(n.y-(n.top??0))})`),y(e,D),e.intersect=function(t){return P.polygon(e,w,t)},i}function z(t,e,a,l=100,r=0,i=180){let n=[],s=r*Math.PI/180,h=(i*Math.PI/180-s)/(l-1);for(let r=0;r<l;r++){let l=s+r*h,i=t+a*Math.cos(l),o=e+a*Math.sin(l);n.push({x:i,y:o})}return n}async function F(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.UG)(e);e.labelStyle=a;let{shapeSvg:i,bbox:n,label:s}=await c(t,e,f(e)),h=n.width+(e.padding??0),o=n.height+(e.padding??0),g=Math.max(5,.1*o),{cssStyles:u}=e,m=[...z(h/2,-o/2,g,20,-90,0),{x:h/2+g,y:-g},...z(h/2+2*g,-g,g,20,-180,-270),...z(h/2+2*g,g,g,20,-90,-180),{x:h/2+g,y:o/2},...z(h/2,o/2,g,20,0,90)],w=[{x:-h/2,y:-o/2-g},{x:h/2,y:-o/2-g},...z(h/2,-o/2,g,20,-90,0),{x:h/2+g,y:-g},...z(h/2+2*g,-g,g,20,-180,-270),...z(h/2+2*g,g,g,20,-90,-180),{x:h/2+g,y:o/2},...z(h/2,o/2,g,20,0,90),{x:h/2,y:o/2+g},{x:-h/2,y:o/2+g}],x=d.Z.svg(i),b=(0,r._q)(e,{fill:"none"});"handDrawn"!==e.look&&(b.roughness=0,b.fillStyle="solid");let $=p(m).replace("Z",""),k=x.path($,b),M=p(w),S=x.path(M,{...b}),D=i.insert("g",":first-child");return D.insert(()=>S,":first-child").attr("stroke-opacity",0),D.insert(()=>k,":first-child"),D.attr("class","text"),u&&"handDrawn"!==e.look&&D.selectAll("path").attr("style",u),l&&"handDrawn"!==e.look&&D.selectAll("path").attr("style",l),D.attr("transform",`translate(${-g}, 0)`),s.attr("transform",`translate(${-h/2+(e.padding??0)/2-(n.x-(n.left??0))},${-o/2+(e.padding??0)/2-(n.y-(n.top??0))})`),y(e,D),e.intersect=function(t){return P.polygon(e,w,t)},i}function X(t,e,a,l=100,r=0,i=180){let n=[],s=r*Math.PI/180,h=(i*Math.PI/180-s)/(l-1);for(let r=0;r<l;r++){let l=s+r*h,i=t+a*Math.cos(l),o=e+a*Math.sin(l);n.push({x:-i,y:-o})}return n}async function J(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.UG)(e);e.labelStyle=a;let{shapeSvg:i,bbox:n,label:s}=await c(t,e,f(e)),h=n.width+(e.padding??0),o=n.height+(e.padding??0),g=Math.max(5,.1*o),{cssStyles:u}=e,m=[...X(h/2,-o/2,g,30,-90,0),{x:-h/2-g,y:g},...X(h/2+2*g,-g,g,20,-180,-270),...X(h/2+2*g,g,g,20,-90,-180),{x:-h/2-g,y:-o/2},...X(h/2,o/2,g,20,0,90)],w=[...X(-h/2+g+g/2,-o/2,g,20,-90,-180),{x:h/2-g/2,y:g},...X(-h/2-g/2,-g,g,20,0,90),...X(-h/2-g/2,g,g,20,-90,0),{x:h/2-g/2,y:-g},...X(-h/2+g+g/2,o/2,g,30,-180,-270)],x=[{x:h/2,y:-o/2-g},{x:-h/2,y:-o/2-g},...X(h/2,-o/2,g,20,-90,0),{x:-h/2-g,y:-g},...X(h/2+2*g,-g,g,20,-180,-270),...X(h/2+2*g,g,g,20,-90,-180),{x:-h/2-g,y:o/2},...X(h/2,o/2,g,20,0,90),{x:-h/2,y:o/2+g},{x:h/2-g-g/2,y:o/2+g},...X(-h/2+g+g/2,-o/2,g,20,-90,-180),{x:h/2-g/2,y:g},...X(-h/2-g/2,-g,g,20,0,90),...X(-h/2-g/2,g,g,20,-90,0),{x:h/2-g/2,y:-g},...X(-h/2+g+g/2,o/2,g,30,-180,-270)],b=d.Z.svg(i),$=(0,r._q)(e,{fill:"none"});"handDrawn"!==e.look&&($.roughness=0,$.fillStyle="solid");let k=p(m).replace("Z",""),M=b.path(k,$),S=p(w).replace("Z",""),D=b.path(S,$),W=p(x),v=b.path(W,{...$}),C=i.insert("g",":first-child");return C.insert(()=>v,":first-child").attr("stroke-opacity",0),C.insert(()=>M,":first-child"),C.insert(()=>D,":first-child"),C.attr("class","text"),u&&"handDrawn"!==e.look&&C.selectAll("path").attr("style",u),l&&"handDrawn"!==e.look&&C.selectAll("path").attr("style",l),C.attr("transform",`translate(${g-g/4}, 0)`),s.attr("transform",`translate(${-h/2+(e.padding??0)/2-(n.x-(n.left??0))},${-o/2+(e.padding??0)/2-(n.y-(n.top??0))})`),y(e,C),e.intersect=function(t){return P.polygon(e,x,t)},i}async function K(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.UG)(e);e.labelStyle=a;let{shapeSvg:i,bbox:n}=await c(t,e,f(e)),s=Math.max(80,(n.width+(e.padding??0)*2)*1.25,e?.width??0),h=Math.max(20,n.height+(e.padding??0)*2,e?.height??0),o=h/2,{cssStyles:g}=e,u=d.Z.svg(i),w=(0,r._q)(e,{});"handDrawn"!==e.look&&(w.roughness=0,w.fillStyle="solid");let x=s-o,b=h/4,$=[{x:x,y:0},{x:b,y:0},{x:0,y:h/2},{x:b,y:h},{x:x,y:h},...m(-x,-h/2,o,50,270,90)],k=p($),M=u.path(k,w),S=i.insert(()=>M,":first-child");return S.attr("class","basic label-container"),g&&"handDrawn"!==e.look&&S.selectChildren("path").attr("style",g),l&&"handDrawn"!==e.look&&S.selectChildren("path").attr("style",l),S.attr("transform",`translate(${-s/2}, ${-h/2})`),y(e,S),e.intersect=function(t){return P.polygon(e,$,t)},i}(0,h.eW)(Z,"anchor"),(0,h.eW)(U,"generateArcPoints"),(0,h.eW)(G,"bowTieRect"),(0,h.eW)(I,"insertPolygonShape"),(0,h.eW)(T,"card"),(0,h.eW)(E,"choice"),(0,h.eW)(H,"circle"),(0,h.eW)(V,"createLine"),(0,h.eW)(Y,"crossedCircle"),(0,h.eW)(j,"generateCirclePoints"),(0,h.eW)(O,"curlyBraceLeft"),(0,h.eW)(z,"generateCirclePoints"),(0,h.eW)(F,"curlyBraceRight"),(0,h.eW)(X,"generateCirclePoints"),(0,h.eW)(J,"curlyBraces"),(0,h.eW)(K,"curvedTrapezoid");var Q=(0,h.eW)((t,e,a,l,r,i)=>`M${t},${e+i} a${r},${i} 0,0,0 ${a},0 a${r},${i} 0,0,0 ${-a},0 l0,${l} a${r},${i} 0,0,0 ${a},0 l0,${-l}`,"createCylinderPathD"),tt=(0,h.eW)((t,e,a,l,r,i)=>`M${t},${e+i} M${t+a},${e+i} a${r},${i} 0,0,0 ${-a},0 l0,${l} a${r},${i} 0,0,0 ${a},0 l0,${-l}`,"createOuterCylinderPathD"),te=(0,h.eW)((t,e,a,l,r,i)=>`M${t-a/2},${-l/2} a${r},${i} 0,0,0 ${a},0`,"createInnerCylinderPathD");async function ta(t,e){let a;let{labelStyles:l,nodeStyles:i}=(0,r.UG)(e);e.labelStyle=l;let{shapeSvg:s,bbox:h,label:o}=await c(t,e,f(e)),g=Math.max(h.width+e.padding,e.width??0),p=g/2,u=p/(2.5+g/50),m=Math.max(h.height+u+e.padding,e.height??0),{cssStyles:w}=e;if("handDrawn"===e.look){let t=d.Z.svg(s),l=tt(0,0,g,m,p,u),i=te(0,u,g,m,p,u),n=t.path(l,(0,r._q)(e,{})),h=t.path(i,(0,r._q)(e,{fill:"none"}));a=s.insert(()=>h,":first-child"),(a=s.insert(()=>n,":first-child")).attr("class","basic label-container"),w&&a.attr("style",w)}else{let t=Q(0,0,g,m,p,u);a=s.insert("path",":first-child").attr("d",t).attr("class","basic label-container").attr("style",(0,n.R7)(w)).attr("style",i)}return a.attr("label-offset-y",u),a.attr("transform",`translate(${-g/2}, ${-(m/2+u)})`),y(e,a),o.attr("transform",`translate(${-(h.width/2)-(h.x-(h.left??0))}, ${-(h.height/2)+(e.padding??0)/1.5-(h.y-(h.top??0))})`),e.intersect=function(t){let a=P.rect(e,t),l=a.x-(e.x??0);if(0!=p&&(Math.abs(l)<(e.width??0)/2||Math.abs(l)==(e.width??0)/2&&Math.abs(a.y-(e.y??0))>(e.height??0)/2-u)){let r=u*u*(1-l*l/(p*p));r>0&&(r=Math.sqrt(r)),r=u-r,t.y-(e.y??0)>0&&(r=-r),a.y+=r}return a},s}async function tl(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.UG)(e);e.labelStyle=a;let{shapeSvg:i,bbox:n,label:s}=await c(t,e,f(e)),h=n.width+e.padding,o=n.height+e.padding,g=.2*o,p=-h/2,u=-o/2-g/2,{cssStyles:m}=e,w=d.Z.svg(i),x=(0,r._q)(e,{});"handDrawn"!==e.look&&(x.roughness=0,x.fillStyle="solid");let b=w.polygon([{x:p,y:u+g},{x:-p,y:u+g},{x:-p,y:-u},{x:p,y:-u},{x:p,y:u},{x:-p,y:u},{x:-p,y:u+g}].map(t=>[t.x,t.y]),x),$=i.insert(()=>b,":first-child");return $.attr("class","basic label-container"),m&&"handDrawn"!==e.look&&$.selectAll("path").attr("style",m),l&&"handDrawn"!==e.look&&$.selectAll("path").attr("style",l),s.attr("transform",`translate(${p+(e.padding??0)/2-(n.x-(n.left??0))}, ${u+g+(e.padding??0)/2-(n.y-(n.top??0))})`),y(e,$),e.intersect=function(t){return P.rect(e,t)},i}async function tr(t,e){let a;let{labelStyles:l,nodeStyles:i}=(0,r.UG)(e);e.labelStyle=l;let{shapeSvg:s,bbox:o,halfPadding:g}=await c(t,e,f(e)),p=o.width/2+g+5,u=o.width/2+g,{cssStyles:m}=e;if("handDrawn"===e.look){let t=d.Z.svg(s),l=(0,r._q)(e,{roughness:.2,strokeWidth:2.5}),i=(0,r._q)(e,{roughness:.2,strokeWidth:1.5}),h=t.circle(0,0,2*p,l),o=t.circle(0,0,2*u,i);(a=s.insert("g",":first-child")).attr("class",(0,n.R7)(e.cssClasses)).attr("style",(0,n.R7)(m)),a.node()?.appendChild(h),a.node()?.appendChild(o)}else{let t=(a=s.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",p).attr("cx",0).attr("cy",0),e.attr("class","inner-circle").attr("style",i).attr("r",u).attr("cx",0).attr("cy",0)}return y(e,a),e.intersect=function(t){return h.cM.info("DoubleCircle intersect",e,p,t),P.circle(e,p,t)},s}function ti(t,e,{config:{themeVariables:a}}){let{labelStyles:l,nodeStyles:i}=(0,r.UG)(e);e.label="",e.labelStyle=l;let n=t.insert("g").attr("class",f(e)).attr("id",e.domId??e.id),{cssStyles:s}=e,o=d.Z.svg(n),{nodeBorder:c}=a,g=(0,r._q)(e,{fillStyle:"solid"});"handDrawn"!==e.look&&(g.roughness=0);let p=o.circle(0,0,14,g),u=n.insert(()=>p,":first-child");return u.selectAll("path").attr("style",`fill: ${c} !important;`),s&&s.length>0&&"handDrawn"!==e.look&&u.selectAll("path").attr("style",s),i&&"handDrawn"!==e.look&&u.selectAll("path").attr("style",i),y(e,u),e.intersect=function(t){return h.cM.info("filledCircle intersect",e,{radius:7,point:t}),P.circle(e,7,t)},n}async function tn(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.UG)(e);e.labelStyle=a;let{shapeSvg:i,bbox:n,label:s}=await c(t,e,f(e)),o=n.width+(e.padding??0),g=o+n.height,u=o+n.height,m=[{x:0,y:-g},{x:u,y:-g},{x:u/2,y:0}],{cssStyles:w}=e,x=d.Z.svg(i),b=(0,r._q)(e,{});"handDrawn"!==e.look&&(b.roughness=0,b.fillStyle="solid");let $=p(m),k=x.path($,b),M=i.insert(()=>k,":first-child").attr("transform",`translate(${-g/2}, ${g/2})`);return w&&"handDrawn"!==e.look&&M.selectChildren("path").attr("style",w),l&&"handDrawn"!==e.look&&M.selectChildren("path").attr("style",l),e.width=o,e.height=g,y(e,M),s.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${-g/2+(e.padding??0)/2+(n.y-(n.top??0))})`),e.intersect=function(t){return h.cM.info("Triangle intersect",e,m,t),P.polygon(e,m,t)},i}function ts(t,e,{dir:a,config:{state:l,themeVariables:i}}){let{nodeStyles:n}=(0,r.UG)(e);e.label="";let s=t.insert("g").attr("class",f(e)).attr("id",e.domId??e.id),{cssStyles:h}=e,o=Math.max(70,e?.width??0),c=Math.max(10,e?.height??0);"LR"===a&&(o=Math.max(10,e?.width??0),c=Math.max(70,e?.height??0));let g=-1*o/2,p=-1*c/2,u=d.Z.svg(s),m=(0,r._q)(e,{stroke:i.lineColor,fill:i.lineColor});"handDrawn"!==e.look&&(m.roughness=0,m.fillStyle="solid");let w=u.rectangle(g,p,o,c,m),x=s.insert(()=>w,":first-child");h&&"handDrawn"!==e.look&&x.selectAll("path").attr("style",h),n&&"handDrawn"!==e.look&&x.selectAll("path").attr("style",n),y(e,x);let b=l?.padding??0;return e.width&&e.height&&(e.width+=b/2||0,e.height+=b/2||0),e.intersect=function(t){return P.rect(e,t)},s}async function th(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.UG)(e);e.labelStyle=a;let{shapeSvg:i,bbox:n}=await c(t,e,f(e)),s=Math.max(80,n.width+(e.padding??0)*2,e?.width??0),o=Math.max(50,n.height+(e.padding??0)*2,e?.height??0),g=o/2,{cssStyles:u}=e,w=d.Z.svg(i),x=(0,r._q)(e,{});"handDrawn"!==e.look&&(x.roughness=0,x.fillStyle="solid");let b=[{x:-s/2,y:-o/2},{x:s/2-g,y:-o/2},...m(-s/2+g,0,g,50,90,270),{x:s/2-g,y:o/2},{x:-s/2,y:o/2}],$=p(b),k=w.path($,x),M=i.insert(()=>k,":first-child");return M.attr("class","basic label-container"),u&&"handDrawn"!==e.look&&M.selectChildren("path").attr("style",u),l&&"handDrawn"!==e.look&&M.selectChildren("path").attr("style",l),y(e,M),e.intersect=function(t){return h.cM.info("Pill intersect",e,{radius:g,point:t}),P.polygon(e,b,t)},i}async function to(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.UG)(e);e.labelStyle=a;let{shapeSvg:i,bbox:n}=await c(t,e,f(e)),s=n.height+(e.padding??0),h=n.width+(e.padding??0)*2.5,{cssStyles:o}=e,g=d.Z.svg(i),u=(0,r._q)(e,{});"handDrawn"!==e.look&&(u.roughness=0,u.fillStyle="solid");let m=h/2,w=m/6,x=s/2,b=(m+=w)-x/2,$=[{x:-b,y:-x},{x:0,y:-x},{x:b,y:-x},{x:m,y:0},{x:b,y:x},{x:0,y:x},{x:-b,y:x},{x:-m,y:0}],k=p($),M=g.path(k,u),S=i.insert(()=>M,":first-child");return S.attr("class","basic label-container"),o&&"handDrawn"!==e.look&&S.selectChildren("path").attr("style",o),l&&"handDrawn"!==e.look&&S.selectChildren("path").attr("style",l),e.width=h,e.height=s,y(e,S),e.intersect=function(t){return P.polygon(e,$,t)},i}async function td(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.UG)(e);e.label="",e.labelStyle=a;let{shapeSvg:i}=await c(t,e,f(e)),n=Math.max(30,e?.width??0),s=Math.max(30,e?.height??0),{cssStyles:o}=e,g=d.Z.svg(i),u=(0,r._q)(e,{});"handDrawn"!==e.look&&(u.roughness=0,u.fillStyle="solid");let m=[{x:0,y:0},{x:n,y:0},{x:0,y:s},{x:n,y:s}],w=p(m),x=g.path(w,u),b=i.insert(()=>x,":first-child");return b.attr("class","basic label-container"),o&&"handDrawn"!==e.look&&b.selectChildren("path").attr("style",o),l&&"handDrawn"!==e.look&&b.selectChildren("path").attr("style",l),b.attr("transform",`translate(${-n/2}, ${-s/2})`),y(e,b),e.intersect=function(t){return h.cM.info("Pill intersect",e,{points:m}),P.polygon(e,m,t)},i}async function tc(t,e,{config:{themeVariables:a,flowchart:l}}){let{labelStyles:n}=(0,r.UG)(e);e.labelStyle=n;let s=Math.max(e.assetHeight??48,e.assetWidth??48),o=l?.wrappingWidth;e.width=Math.max(s,o??0);let{shapeSvg:g,bbox:f,label:p}=await c(t,e,"icon-shape default"),u="t"===e.pos,{nodeBorder:m}=a,{stylesMap:w}=(0,r.dT)(e),x=-s/2,b=-s/2,$=e.label?8:0,k=d.Z.svg(g),M=(0,r._q)(e,{stroke:"none",fill:"none"});"handDrawn"!==e.look&&(M.roughness=0,M.fillStyle="solid");let S=k.rectangle(x,b,s,s,M),D=Math.max(s,f.width),W=s+f.height+$,v=k.rectangle(-D/2,-W/2,D,W,{...M,fill:"transparent",stroke:"none"}),C=g.insert(()=>S,":first-child"),B=g.insert(()=>v);if(e.icon){let t=g.append("g");t.html(`<g>${await (0,i.s4)(e.icon,{height:s,width:s,fallbackPrefix:""})}</g>`);let a=t.node().getBBox(),l=a.width,r=a.height,n=a.x,h=a.y;t.attr("transform",`translate(${-l/2-n},${u?f.height/2+$/2-r/2-h:-f.height/2-$/2-r/2-h})`),t.attr("style",`color: ${w.get("stroke")??m};`)}return p.attr("transform",`translate(${-f.width/2-(f.x-(f.left??0))},${u?-W/2:W/2-f.height})`),C.attr("transform",`translate(0,${u?f.height/2+$/2:-f.height/2-$/2})`),y(e,B),e.intersect=function(t){if(h.cM.info("iconSquare intersect",e,t),!e.label)return P.rect(e,t);let a=e.x??0,l=e.y??0,r=e.height??0,i=[];return i=u?[{x:a-f.width/2,y:l-r/2},{x:a+f.width/2,y:l-r/2},{x:a+f.width/2,y:l-r/2+f.height+$},{x:a+s/2,y:l-r/2+f.height+$},{x:a+s/2,y:l+r/2},{x:a-s/2,y:l+r/2},{x:a-s/2,y:l-r/2+f.height+$},{x:a-f.width/2,y:l-r/2+f.height+$}]:[{x:a-s/2,y:l-r/2},{x:a+s/2,y:l-r/2},{x:a+s/2,y:l-r/2+s},{x:a+f.width/2,y:l-r/2+s},{x:a+f.width/2/2,y:l+r/2},{x:a-f.width/2,y:l+r/2},{x:a-f.width/2,y:l-r/2+s},{x:a-s/2,y:l-r/2+s}],P.polygon(e,i,t)},g}async function tg(t,e,{config:{themeVariables:a,flowchart:l}}){let{labelStyles:n}=(0,r.UG)(e);e.labelStyle=n;let s=Math.max(e.assetHeight??48,e.assetWidth??48),o=l?.wrappingWidth;e.width=Math.max(s,o??0);let{shapeSvg:g,bbox:f,label:p}=await c(t,e,"icon-shape default"),u=e.label?8:0,m="t"===e.pos,{nodeBorder:w,mainBkg:x}=a,{stylesMap:b}=(0,r.dT)(e),$=d.Z.svg(g),k=(0,r._q)(e,{});"handDrawn"!==e.look&&(k.roughness=0,k.fillStyle="solid");let M=b.get("fill");k.stroke=M??x;let S=g.append("g");e.icon&&S.html(`<g>${await (0,i.s4)(e.icon,{height:s,width:s,fallbackPrefix:""})}</g>`);let D=S.node().getBBox(),W=D.width,v=D.height,C=D.x,B=D.y,N=Math.max(W,v)*Math.SQRT2+40,A=$.circle(0,0,N,k),q=Math.max(N,f.width),R=N+f.height+u,_=$.rectangle(-q/2,-R/2,q,R,{...k,fill:"transparent",stroke:"none"}),L=g.insert(()=>A,":first-child"),Z=g.insert(()=>_);return S.attr("transform",`translate(${-W/2-C},${m?f.height/2+u/2-v/2-B:-f.height/2-u/2-v/2-B})`),S.attr("style",`color: ${b.get("stroke")??w};`),p.attr("transform",`translate(${-f.width/2-(f.x-(f.left??0))},${m?-R/2:R/2-f.height})`),L.attr("transform",`translate(0,${m?f.height/2+u/2:-f.height/2-u/2})`),y(e,Z),e.intersect=function(t){return h.cM.info("iconSquare intersect",e,t),P.rect(e,t)},g}async function ty(t,e,{config:{themeVariables:a,flowchart:l}}){let{labelStyles:n}=(0,r.UG)(e);e.labelStyle=n;let s=Math.max(e.assetHeight??48,e.assetWidth??48),o=l?.wrappingWidth;e.width=Math.max(s,o??0);let{shapeSvg:g,bbox:f,halfPadding:p,label:u}=await c(t,e,"icon-shape default"),m="t"===e.pos,w=s+2*p,x=s+2*p,{nodeBorder:b,mainBkg:$}=a,{stylesMap:M}=(0,r.dT)(e),S=e.label?8:0,D=d.Z.svg(g),W=(0,r._q)(e,{});"handDrawn"!==e.look&&(W.roughness=0,W.fillStyle="solid");let v=M.get("fill");W.stroke=v??$;let C=D.path(k(-x/2,-w/2,x,w,5),W),B=Math.max(x,f.width),N=w+f.height+S,A=D.rectangle(-B/2,-N/2,B,N,{...W,fill:"transparent",stroke:"none"}),q=g.insert(()=>C,":first-child").attr("class","icon-shape2"),R=g.insert(()=>A);if(e.icon){let t=g.append("g");t.html(`<g>${await (0,i.s4)(e.icon,{height:s,width:s,fallbackPrefix:""})}</g>`);let a=t.node().getBBox(),l=a.width,r=a.height,n=a.x,h=a.y;t.attr("transform",`translate(${-l/2-n},${m?f.height/2+S/2-r/2-h:-f.height/2-S/2-r/2-h})`),t.attr("style",`color: ${M.get("stroke")??b};`)}return u.attr("transform",`translate(${-f.width/2-(f.x-(f.left??0))},${m?-N/2:N/2-f.height})`),q.attr("transform",`translate(0,${m?f.height/2+S/2:-f.height/2-S/2})`),y(e,R),e.intersect=function(t){if(h.cM.info("iconSquare intersect",e,t),!e.label)return P.rect(e,t);let a=e.x??0,l=e.y??0,r=e.height??0,i=[];return i=m?[{x:a-f.width/2,y:l-r/2},{x:a+f.width/2,y:l-r/2},{x:a+f.width/2,y:l-r/2+f.height+S},{x:a+x/2,y:l-r/2+f.height+S},{x:a+x/2,y:l+r/2},{x:a-x/2,y:l+r/2},{x:a-x/2,y:l-r/2+f.height+S},{x:a-f.width/2,y:l-r/2+f.height+S}]:[{x:a-x/2,y:l-r/2},{x:a+x/2,y:l-r/2},{x:a+x/2,y:l-r/2+w},{x:a+f.width/2,y:l-r/2+w},{x:a+f.width/2/2,y:l+r/2},{x:a-f.width/2,y:l+r/2},{x:a-f.width/2,y:l-r/2+w},{x:a-x/2,y:l-r/2+w}],P.polygon(e,i,t)},g}async function tf(t,e,{config:{themeVariables:a,flowchart:l}}){let{labelStyles:n}=(0,r.UG)(e);e.labelStyle=n;let s=Math.max(e.assetHeight??48,e.assetWidth??48),o=l?.wrappingWidth;e.width=Math.max(s,o??0);let{shapeSvg:g,bbox:f,halfPadding:p,label:u}=await c(t,e,"icon-shape default"),m="t"===e.pos,w=s+2*p,x=s+2*p,{nodeBorder:b,mainBkg:$}=a,{stylesMap:M}=(0,r.dT)(e),S=e.label?8:0,D=d.Z.svg(g),W=(0,r._q)(e,{});"handDrawn"!==e.look&&(W.roughness=0,W.fillStyle="solid");let v=M.get("fill");W.stroke=v??$;let C=D.path(k(-x/2,-w/2,x,w,.1),W),B=Math.max(x,f.width),N=w+f.height+S,A=D.rectangle(-B/2,-N/2,B,N,{...W,fill:"transparent",stroke:"none"}),q=g.insert(()=>C,":first-child"),R=g.insert(()=>A);if(e.icon){let t=g.append("g");t.html(`<g>${await (0,i.s4)(e.icon,{height:s,width:s,fallbackPrefix:""})}</g>`);let a=t.node().getBBox(),l=a.width,r=a.height,n=a.x,h=a.y;t.attr("transform",`translate(${-l/2-n},${m?f.height/2+S/2-r/2-h:-f.height/2-S/2-r/2-h})`),t.attr("style",`color: ${M.get("stroke")??b};`)}return u.attr("transform",`translate(${-f.width/2-(f.x-(f.left??0))},${m?-N/2:N/2-f.height})`),q.attr("transform",`translate(0,${m?f.height/2+S/2:-f.height/2-S/2})`),y(e,R),e.intersect=function(t){if(h.cM.info("iconSquare intersect",e,t),!e.label)return P.rect(e,t);let a=e.x??0,l=e.y??0,r=e.height??0,i=[];return i=m?[{x:a-f.width/2,y:l-r/2},{x:a+f.width/2,y:l-r/2},{x:a+f.width/2,y:l-r/2+f.height+S},{x:a+x/2,y:l-r/2+f.height+S},{x:a+x/2,y:l+r/2},{x:a-x/2,y:l+r/2},{x:a-x/2,y:l-r/2+f.height+S},{x:a-f.width/2,y:l-r/2+f.height+S}]:[{x:a-x/2,y:l-r/2},{x:a+x/2,y:l-r/2},{x:a+x/2,y:l-r/2+w},{x:a+f.width/2,y:l-r/2+w},{x:a+f.width/2/2,y:l+r/2},{x:a-f.width/2,y:l+r/2},{x:a-f.width/2,y:l-r/2+w},{x:a-x/2,y:l-r/2+w}],P.polygon(e,i,t)},g}async function tp(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.UG)(e);e.labelStyle=s;let o=a?.wrappingWidth;e.defaultWidth=a?.wrappingWidth;let g=Math.max(e.label?o??0:0,e?.assetWidth??i),f="on"===e.constraint&&e?.assetHeight?e.assetHeight*e.imageAspectRatio:g,p="on"===e.constraint?f/e.imageAspectRatio:e?.assetHeight??n;e.width=Math.max(f,o??0);let{shapeSvg:u,bbox:m,label:w}=await c(t,e,"image-shape default"),x="t"===e.pos,b=-f/2,$=e.label?8:0,k=d.Z.svg(u),M=(0,r._q)(e,{});"handDrawn"!==e.look&&(M.roughness=0,M.fillStyle="solid");let S=k.rectangle(b,-p/2,f,p,M),D=Math.max(f,m.width),W=p+m.height+$,v=k.rectangle(-D/2,-W/2,D,W,{...M,fill:"none",stroke:"none"}),C=u.insert(()=>S,":first-child"),B=u.insert(()=>v);if(e.img){let t=u.append("image");t.attr("href",e.img),t.attr("width",f),t.attr("height",p),t.attr("preserveAspectRatio","none"),t.attr("transform",`translate(${-f/2},${x?W/2-p:-W/2})`)}return w.attr("transform",`translate(${-m.width/2-(m.x-(m.left??0))},${x?-p/2-m.height/2-$/2:p/2-m.height/2+$/2})`),C.attr("transform",`translate(0,${x?m.height/2+$/2:-m.height/2-$/2})`),y(e,B),e.intersect=function(t){if(h.cM.info("iconSquare intersect",e,t),!e.label)return P.rect(e,t);let a=e.x??0,l=e.y??0,r=e.height??0,i=[];return i=x?[{x:a-m.width/2,y:l-r/2},{x:a+m.width/2,y:l-r/2},{x:a+m.width/2,y:l-r/2+m.height+$},{x:a+f/2,y:l-r/2+m.height+$},{x:a+f/2,y:l+r/2},{x:a-f/2,y:l+r/2},{x:a-f/2,y:l-r/2+m.height+$},{x:a-m.width/2,y:l-r/2+m.height+$}]:[{x:a-f/2,y:l-r/2},{x:a+f/2,y:l-r/2},{x:a+f/2,y:l-r/2+p},{x:a+m.width/2,y:l-r/2+p},{x:a+m.width/2/2,y:l+r/2},{x:a-m.width/2,y:l+r/2},{x:a-m.width/2,y:l-r/2+p},{x:a-f/2,y:l-r/2+p}],P.polygon(e,i,t)},u}async function tu(t,e){let a;let{labelStyles:l,nodeStyles:i}=(0,r.UG)(e);e.labelStyle=l;let{shapeSvg:n,bbox:s}=await c(t,e,f(e)),h=Math.max(s.width+(e.padding??0)*2,e?.width??0),o=Math.max(s.height+(e.padding??0)*2,e?.height??0),g=[{x:0,y:0},{x:h,y:0},{x:h+3*o/6,y:-o},{x:-3*o/6,y:-o}],{cssStyles:u}=e;if("handDrawn"===e.look){let t=d.Z.svg(n),l=(0,r._q)(e,{}),i=p(g),s=t.path(i,l);a=n.insert(()=>s,":first-child").attr("transform",`translate(${-h/2}, ${o/2})`),u&&a.attr("style",u)}else a=I(n,h,o,g);return i&&a.attr("style",i),e.width=h,e.height=o,y(e,a),e.intersect=function(t){return P.polygon(e,g,t)},n}async function tm(t,e,a){let l;let{labelStyles:i,nodeStyles:s}=(0,r.UG)(e);e.labelStyle=i;let{shapeSvg:h,bbox:o}=await c(t,e,f(e)),g=Math.max(o.width+2*a.labelPaddingX,e?.width||0),p=Math.max(o.height+2*a.labelPaddingY,e?.height||0),u=-g/2,m=-p/2,{rx:w,ry:x}=e,{cssStyles:b}=e;if(a?.rx&&a.ry&&(w=a.rx,x=a.ry),"handDrawn"===e.look){let t=d.Z.svg(h),a=(0,r._q)(e,{}),i=w||x?t.path(k(u,m,g,p,w||0),a):t.rectangle(u,m,g,p,a);(l=h.insert(()=>i,":first-child")).attr("class","basic label-container").attr("style",(0,n.R7)(b))}else(l=h.insert("rect",":first-child")).attr("class","basic label-container").attr("style",s).attr("rx",(0,n.R7)(w)).attr("ry",(0,n.R7)(x)).attr("x",u).attr("y",m).attr("width",g).attr("height",p);return y(e,l),e.calcIntersect=function(t,e){return P.rect(t,e)},e.intersect=function(t){return P.rect(e,t)},h}async function tw(t,e){let{shapeSvg:a,bbox:l,label:r}=await c(t,e,"label"),i=a.insert("rect",":first-child");return i.attr("width",.1).attr("height",.1),a.attr("class","label edgeLabel"),r.attr("transform",`translate(${-(l.width/2)-(l.x-(l.left??0))}, ${-(l.height/2)-(l.y-(l.top??0))})`),y(e,i),e.intersect=function(t){return P.rect(e,t)},a}async function tx(t,e){let a;let{labelStyles:l,nodeStyles:i}=(0,r.UG)(e);e.labelStyle=l;let{shapeSvg:n,bbox:s}=await c(t,e,f(e)),h=Math.max(s.width+(e.padding??0),e?.width??0),o=Math.max(s.height+(e.padding??0),e?.height??0),g=[{x:0,y:0},{x:h+3*o/6,y:0},{x:h,y:-o},{x:-(3*o)/6,y:-o}],{cssStyles:u}=e;if("handDrawn"===e.look){let t=d.Z.svg(n),l=(0,r._q)(e,{}),i=p(g),s=t.path(i,l);a=n.insert(()=>s,":first-child").attr("transform",`translate(${-h/2}, ${o/2})`),u&&a.attr("style",u)}else a=I(n,h,o,g);return i&&a.attr("style",i),e.width=h,e.height=o,y(e,a),e.intersect=function(t){return P.polygon(e,g,t)},n}async function tb(t,e){let a;let{labelStyles:l,nodeStyles:i}=(0,r.UG)(e);e.labelStyle=l;let{shapeSvg:n,bbox:s}=await c(t,e,f(e)),h=Math.max(s.width+(e.padding??0),e?.width??0),o=Math.max(s.height+(e.padding??0),e?.height??0),g=[{x:-3*o/6,y:0},{x:h,y:0},{x:h+3*o/6,y:-o},{x:0,y:-o}],{cssStyles:u}=e;if("handDrawn"===e.look){let t=d.Z.svg(n),l=(0,r._q)(e,{}),i=p(g),s=t.path(i,l);a=n.insert(()=>s,":first-child").attr("transform",`translate(${-h/2}, ${o/2})`),u&&a.attr("style",u)}else a=I(n,h,o,g);return i&&a.attr("style",i),e.width=h,e.height=o,y(e,a),e.intersect=function(t){return P.polygon(e,g,t)},n}function t$(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.UG)(e);e.label="",e.labelStyle=a;let i=t.insert("g").attr("class",f(e)).attr("id",e.domId??e.id),{cssStyles:n}=e,s=Math.max(35,e?.width??0),o=Math.max(35,e?.height??0),c=[{x:s,y:0},{x:0,y:o+3.5},{x:s-14,y:o+3.5},{x:0,y:2*o},{x:s,y:o-3.5},{x:14,y:o-3.5}],g=d.Z.svg(i),u=(0,r._q)(e,{});"handDrawn"!==e.look&&(u.roughness=0,u.fillStyle="solid");let m=p(c),w=g.path(m,u),x=i.insert(()=>w,":first-child");return n&&"handDrawn"!==e.look&&x.selectAll("path").attr("style",n),l&&"handDrawn"!==e.look&&x.selectAll("path").attr("style",l),x.attr("transform",`translate(-${s/2},${-o})`),y(e,x),e.intersect=function(t){return h.cM.info("lightningBolt intersect",e,t),P.polygon(e,c,t)},i}(0,h.eW)(ta,"cylinder"),(0,h.eW)(tl,"dividedRectangle"),(0,h.eW)(tr,"doublecircle"),(0,h.eW)(ti,"filledCircle"),(0,h.eW)(tn,"flippedTriangle"),(0,h.eW)(ts,"forkJoin"),(0,h.eW)(th,"halfRoundedRectangle"),(0,h.eW)(to,"hexagon"),(0,h.eW)(td,"hourglass"),(0,h.eW)(tc,"icon"),(0,h.eW)(tg,"iconCircle"),(0,h.eW)(ty,"iconRounded"),(0,h.eW)(tf,"iconSquare"),(0,h.eW)(tp,"imageSquare"),(0,h.eW)(tu,"inv_trapezoid"),(0,h.eW)(tm,"drawRect"),(0,h.eW)(tw,"labelRect"),(0,h.eW)(tx,"lean_left"),(0,h.eW)(tb,"lean_right"),(0,h.eW)(t$,"lightningBolt");var tk=(0,h.eW)((t,e,a,l,r,i,n)=>`M${t},${e+i} a${r},${i} 0,0,0 ${a},0 a${r},${i} 0,0,0 ${-a},0 l0,${l} a${r},${i} 0,0,0 ${a},0 l0,${-l} M${t},${e+i+n} a${r},${i} 0,0,0 ${a},0`,"createCylinderPathD"),tM=(0,h.eW)((t,e,a,l,r,i,n)=>`M${t},${e+i} M${t+a},${e+i} a${r},${i} 0,0,0 ${-a},0 l0,${l} a${r},${i} 0,0,0 ${a},0 l0,${-l} M${t},${e+i+n} a${r},${i} 0,0,0 ${a},0`,"createOuterCylinderPathD"),tS=(0,h.eW)((t,e,a,l,r,i)=>`M${t-a/2},${-l/2} a${r},${i} 0,0,0 ${a},0`,"createInnerCylinderPathD");async function tD(t,e){let a;let{labelStyles:l,nodeStyles:i}=(0,r.UG)(e);e.labelStyle=l;let{shapeSvg:s,bbox:h,label:o}=await c(t,e,f(e)),g=Math.max(h.width+(e.padding??0),e.width??0),p=g/2,u=p/(2.5+g/50),m=Math.max(h.height+u+(e.padding??0),e.height??0),w=.1*m,{cssStyles:x}=e;if("handDrawn"===e.look){let t=d.Z.svg(s),l=tM(0,0,g,m,p,u,w),i=tS(0,u,g,m,p,u),n=(0,r._q)(e,{}),h=t.path(l,n),o=t.path(i,n);s.insert(()=>o,":first-child").attr("class","line"),(a=s.insert(()=>h,":first-child")).attr("class","basic label-container"),x&&a.attr("style",x)}else{let t=tk(0,0,g,m,p,u,w);a=s.insert("path",":first-child").attr("d",t).attr("class","basic label-container").attr("style",(0,n.R7)(x)).attr("style",i)}return a.attr("label-offset-y",u),a.attr("transform",`translate(${-g/2}, ${-(m/2+u)})`),y(e,a),o.attr("transform",`translate(${-(h.width/2)-(h.x-(h.left??0))}, ${-(h.height/2)+u-(h.y-(h.top??0))})`),e.intersect=function(t){let a=P.rect(e,t),l=a.x-(e.x??0);if(0!=p&&(Math.abs(l)<(e.width??0)/2||Math.abs(l)==(e.width??0)/2&&Math.abs(a.y-(e.y??0))>(e.height??0)/2-u)){let r=u*u*(1-l*l/(p*p));r>0&&(r=Math.sqrt(r)),r=u-r,t.y-(e.y??0)>0&&(r=-r),a.y+=r}return a},s}async function tW(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.UG)(e);e.labelStyle=a;let{shapeSvg:i,bbox:n,label:s}=await c(t,e,f(e)),h=Math.max(n.width+(e.padding??0)*2,e?.width??0),o=Math.max(n.height+(e.padding??0)*2,e?.height??0),g=o/4,p=o+g,{cssStyles:m}=e,w=d.Z.svg(i),x=(0,r._q)(e,{});"handDrawn"!==e.look&&(x.roughness=0,x.fillStyle="solid");let b=[{x:-h/2-h/2*.1,y:-p/2},{x:-h/2-h/2*.1,y:p/2},...u(-h/2-h/2*.1,p/2,h/2+h/2*.1,p/2,g,.8),{x:h/2+h/2*.1,y:-p/2},{x:-h/2-h/2*.1,y:-p/2},{x:-h/2,y:-p/2},{x:-h/2,y:p/2*1.1},{x:-h/2,y:-p/2}],$=w.polygon(b.map(t=>[t.x,t.y]),x),k=i.insert(()=>$,":first-child");return k.attr("class","basic label-container"),m&&"handDrawn"!==e.look&&k.selectAll("path").attr("style",m),l&&"handDrawn"!==e.look&&k.selectAll("path").attr("style",l),k.attr("transform",`translate(0,${-g/2})`),s.attr("transform",`translate(${-h/2+(e.padding??0)+h/2*.1/2-(n.x-(n.left??0))},${-o/2+(e.padding??0)-g/2-(n.y-(n.top??0))})`),y(e,k),e.intersect=function(t){return P.polygon(e,b,t)},i}async function tv(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.UG)(e);e.labelStyle=a;let{shapeSvg:i,bbox:n,label:s}=await c(t,e,f(e)),h=Math.max(n.width+(e.padding??0)*2,e?.width??0),o=Math.max(n.height+(e.padding??0)*2,e?.height??0),g=-h/2,u=-o/2,{cssStyles:m}=e,w=d.Z.svg(i),x=(0,r._q)(e,{}),b=[{x:g-5,y:u+5},{x:g-5,y:u+o+5},{x:g+h-5,y:u+o+5},{x:g+h-5,y:u+o},{x:g+h,y:u+o},{x:g+h,y:u+o-5},{x:g+h+5,y:u+o-5},{x:g+h+5,y:u-5},{x:g+5,y:u-5},{x:g+5,y:u},{x:g,y:u},{x:g,y:u+5}];"handDrawn"!==e.look&&(x.roughness=0,x.fillStyle="solid");let $=p(b),k=w.path($,x),M=p([{x:g,y:u+5},{x:g+h-5,y:u+5},{x:g+h-5,y:u+o},{x:g+h,y:u+o},{x:g+h,y:u},{x:g,y:u}]),S=w.path(M,{...x,fill:"none"}),D=i.insert(()=>S,":first-child");return D.insert(()=>k,":first-child"),D.attr("class","basic label-container"),m&&"handDrawn"!==e.look&&D.selectAll("path").attr("style",m),l&&"handDrawn"!==e.look&&D.selectAll("path").attr("style",l),s.attr("transform",`translate(${-(n.width/2)-5-(n.x-(n.left??0))}, ${-(n.height/2)+5-(n.y-(n.top??0))})`),y(e,D),e.intersect=function(t){return P.polygon(e,b,t)},i}async function tC(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.UG)(e);e.labelStyle=a;let{shapeSvg:i,bbox:n,label:s}=await c(t,e,f(e)),h=Math.max(n.width+(e.padding??0)*2,e?.width??0),o=Math.max(n.height+(e.padding??0)*2,e?.height??0),g=o/4,m=o+g,w=-h/2,x=-m/2,{cssStyles:b}=e,$=u(w-5,x+m+5,w+h-5,x+m+5,g,.8),k=$?.[$.length-1],M=[{x:w-5,y:x+5},{x:w-5,y:x+m+5},...$,{x:w+h-5,y:k.y-5},{x:w+h,y:k.y-5},{x:w+h,y:k.y-10},{x:w+h+5,y:k.y-10},{x:w+h+5,y:x-5},{x:w+5,y:x-5},{x:w+5,y:x},{x:w,y:x},{x:w,y:x+5}],S=[{x:w,y:x+5},{x:w+h-5,y:x+5},{x:w+h-5,y:k.y-5},{x:w+h,y:k.y-5},{x:w+h,y:x},{x:w,y:x}],D=d.Z.svg(i),W=(0,r._q)(e,{});"handDrawn"!==e.look&&(W.roughness=0,W.fillStyle="solid");let v=p(M),C=D.path(v,W),B=p(S),N=D.path(B,W),A=i.insert(()=>C,":first-child");return A.insert(()=>N),A.attr("class","basic label-container"),b&&"handDrawn"!==e.look&&A.selectAll("path").attr("style",b),l&&"handDrawn"!==e.look&&A.selectAll("path").attr("style",l),A.attr("transform",`translate(0,${-g/2})`),s.attr("transform",`translate(${-(n.width/2)-5-(n.x-(n.left??0))}, ${-(n.height/2)+5-g/2-(n.y-(n.top??0))})`),y(e,A),e.intersect=function(t){return P.polygon(e,M,t)},i}async function tB(t,e,{config:{themeVariables:a}}){let{labelStyles:l,nodeStyles:i}=(0,r.UG)(e);e.labelStyle=l,e.useHtmlLabels||s.iE().flowchart?.htmlLabels!==!1||(e.centerLabel=!0);let{shapeSvg:n,bbox:h,label:o}=await c(t,e,f(e)),g=Math.max(h.width+(e.padding??0)*2,e?.width??0),p=Math.max(h.height+(e.padding??0)*2,e?.height??0),{cssStyles:u}=e,m=d.Z.svg(n),w=(0,r._q)(e,{fill:a.noteBkgColor,stroke:a.noteBorderColor});"handDrawn"!==e.look&&(w.roughness=0,w.fillStyle="solid");let x=m.rectangle(-g/2,-p/2,g,p,w),b=n.insert(()=>x,":first-child");return b.attr("class","basic label-container"),u&&"handDrawn"!==e.look&&b.selectAll("path").attr("style",u),i&&"handDrawn"!==e.look&&b.selectAll("path").attr("style",i),o.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))}, ${-(h.height/2)-(h.y-(h.top??0))})`),y(e,b),e.intersect=function(t){return P.rect(e,t)},n}(0,h.eW)(tD,"linedCylinder"),(0,h.eW)(tW,"linedWaveEdgedRect"),(0,h.eW)(tv,"multiRect"),(0,h.eW)(tC,"multiWaveEdgedRectangle"),(0,h.eW)(tB,"note");var tN=(0,h.eW)((t,e,a)=>`M${t+a/2},${e} L${t+a},${e-a/2} L${t+a/2},${e-a} L${t},${e-a/2} Z`,"createDecisionBoxPathD");async function tA(t,e){let a;let{labelStyles:l,nodeStyles:i}=(0,r.UG)(e);e.labelStyle=l;let{shapeSvg:n,bbox:s}=await c(t,e,f(e)),h=s.width+e.padding+(s.height+e.padding),o=[{x:h/2,y:0},{x:h,y:-h/2},{x:h/2,y:-h},{x:0,y:-h/2}],{cssStyles:g}=e;if("handDrawn"===e.look){let t=d.Z.svg(n),l=(0,r._q)(e,{}),i=tN(0,0,h),s=t.path(i,l);a=n.insert(()=>s,":first-child").attr("transform",`translate(${-h/2+.5}, ${h/2})`),g&&a.attr("style",g)}else(a=I(n,h,h,o)).attr("transform",`translate(${-h/2+.5}, ${h/2})`);return i&&a.attr("style",i),y(e,a),e.calcIntersect=function(t,e){let a=t.width,l=P.polygon(t,[{x:a/2,y:0},{x:a,y:-a/2},{x:a/2,y:-a},{x:0,y:-a/2}],e);return{x:l.x-.5,y:l.y-.5}},e.intersect=function(t){return this.calcIntersect(e,t)},n}async function tq(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.UG)(e);e.labelStyle=a;let{shapeSvg:i,bbox:n,label:s}=await c(t,e,f(e)),h=Math.max(n.width+(e.padding??0),e?.width??0),o=Math.max(n.height+(e.padding??0),e?.height??0),g=-h/2,u=-o/2,m=u/2,w=[{x:g+m,y:u},{x:g,y:0},{x:g+m,y:-u},{x:-g,y:-u},{x:-g,y:u}],{cssStyles:x}=e,b=d.Z.svg(i),$=(0,r._q)(e,{});"handDrawn"!==e.look&&($.roughness=0,$.fillStyle="solid");let k=p(w),M=b.path(k,$),S=i.insert(()=>M,":first-child");return S.attr("class","basic label-container"),x&&"handDrawn"!==e.look&&S.selectAll("path").attr("style",x),l&&"handDrawn"!==e.look&&S.selectAll("path").attr("style",l),S.attr("transform",`translate(${-m/2},0)`),s.attr("transform",`translate(${-m/2-n.width/2-(n.x-(n.left??0))}, ${-(n.height/2)-(n.y-(n.top??0))})`),y(e,S),e.intersect=function(t){return P.polygon(e,w,t)},i}async function tR(t,e){let a,l,i;let{labelStyles:n,nodeStyles:c}=(0,r.UG)(e);e.labelStyle=n,a=e.cssClasses?"node "+e.cssClasses:"node default";let g=t.insert("g").attr("class",a).attr("id",e.domId||e.id),f=g.insert("g"),p=g.insert("g").attr("class","label").attr("style",c),u=e.description,m=e.label,w=p.node().appendChild(await $(m,e.labelStyle,!0,!0)),x={width:0,height:0};if((0,s.ku)(s.nV()?.flowchart?.htmlLabels)){let t=w.children[0],e=(0,o.Ys)(w);x=t.getBoundingClientRect(),e.attr("width",x.width),e.attr("height",x.height)}h.cM.info("Text 2",u);let b=u||[],M=w.getBBox(),S=p.node().appendChild(await $(b.join?b.join("<br/>"):b,e.labelStyle,!0,!0)),D=S.children[0],W=(0,o.Ys)(S);x=D.getBoundingClientRect(),W.attr("width",x.width),W.attr("height",x.height);let v=(e.padding||0)/2;(0,o.Ys)(S).attr("transform","translate( "+(x.width>M.width?0:(M.width-x.width)/2)+", "+(M.height+v+5)+")"),(0,o.Ys)(w).attr("transform","translate( "+(x.width<M.width?0:-(M.width-x.width)/2)+", 0)"),x=p.node().getBBox(),p.attr("transform","translate("+-x.width/2+", "+(-x.height/2-v+3)+")");let C=x.width+(e.padding||0),B=x.height+(e.padding||0),N=-x.width/2-v,A=-x.height/2-v;if("handDrawn"===e.look){let t=d.Z.svg(g),a=(0,r._q)(e,{}),n=t.path(k(N,A,C,B,e.rx||0),a),s=t.line(-x.width/2-v,-x.height/2-v+M.height+v,x.width/2+v,-x.height/2-v+M.height+v,a);i=g.insert(()=>(h.cM.debug("Rough node insert CXC",n),s),":first-child"),l=g.insert(()=>(h.cM.debug("Rough node insert CXC",n),n),":first-child")}else l=f.insert("rect",":first-child"),i=f.insert("line"),l.attr("class","outer title-state").attr("style",c).attr("x",-x.width/2-v).attr("y",-x.height/2-v).attr("width",x.width+(e.padding||0)).attr("height",x.height+(e.padding||0)),i.attr("class","divider").attr("x1",-x.width/2-v).attr("x2",x.width/2+v).attr("y1",-x.height/2-v+M.height+v).attr("y2",-x.height/2-v+M.height+v);return y(e,l),e.intersect=function(t){return P.rect(e,t)},g}function t_(t,e,a,l,r,i,n){let s=Math.atan2(l-e,a-t),h=Math.sqrt(((a-t)/2/r)**2+((l-e)/2/i)**2);if(h>1)throw Error("The given radii are too small to create an arc between the points.");let o=Math.sqrt(1-h**2),d=(t+a)/2+o*i*Math.sin(s)*(n?-1:1),c=(e+l)/2-o*r*Math.cos(s)*(n?-1:1),g=Math.atan2((e-c)/i,(t-d)/r),y=Math.atan2((l-c)/i,(a-d)/r)-g;n&&y<0&&(y+=2*Math.PI),!n&&y>0&&(y-=2*Math.PI);let f=[];for(let t=0;t<20;t++){let e=g+t/19*y,a=d+r*Math.cos(e),l=c+i*Math.sin(e);f.push({x:a,y:l})}return f}async function tL(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.UG)(e);e.labelStyle=a;let{shapeSvg:i,bbox:n}=await c(t,e,f(e)),s=e?.padding??0,h=e?.padding??0,o=(e?.width?e?.width:n.width)+2*s,g=(e?.height?e?.height:n.height)+2*h,u=e.radius||5,m=e.taper||5,{cssStyles:w}=e,x=d.Z.svg(i),b=(0,r._q)(e,{});e.stroke&&(b.stroke=e.stroke),"handDrawn"!==e.look&&(b.roughness=0,b.fillStyle="solid");let $=[{x:-o/2+m,y:-g/2},{x:o/2-m,y:-g/2},...t_(o/2-m,-g/2,o/2,-g/2+m,u,u,!0),{x:o/2,y:-g/2+m},{x:o/2,y:g/2-m},...t_(o/2,g/2-m,o/2-m,g/2,u,u,!0),{x:o/2-m,y:g/2},{x:-o/2+m,y:g/2},...t_(-o/2+m,g/2,-o/2,g/2-m,u,u,!0),{x:-o/2,y:g/2-m},{x:-o/2,y:-g/2+m},...t_(-o/2,-g/2+m,-o/2+m,-g/2,u,u,!0)],k=p($),M=x.path(k,b),S=i.insert(()=>M,":first-child");return S.attr("class","basic label-container outer-path"),w&&"handDrawn"!==e.look&&S.selectChildren("path").attr("style",w),l&&"handDrawn"!==e.look&&S.selectChildren("path").attr("style",l),y(e,S),e.intersect=function(t){return P.polygon(e,$,t)},i}async function tP(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.UG)(e);e.labelStyle=a;let{shapeSvg:i,bbox:s,label:h}=await c(t,e,f(e)),o=e?.padding??0,g=Math.max(s.width+(e.padding??0)*2,e?.width??0),p=Math.max(s.height+(e.padding??0)*2,e?.height??0),u=-s.width/2-o,m=-s.height/2-o,{cssStyles:w}=e,x=d.Z.svg(i),b=(0,r._q)(e,{});"handDrawn"!==e.look&&(b.roughness=0,b.fillStyle="solid");let $=x.polygon([{x:u,y:m},{x:u+g+8,y:m},{x:u+g+8,y:m+p},{x:u-8,y:m+p},{x:u-8,y:m},{x:u,y:m},{x:u,y:m+p}].map(t=>[t.x,t.y]),b),k=i.insert(()=>$,":first-child");return k.attr("class","basic label-container").attr("style",(0,n.R7)(w)),l&&"handDrawn"!==e.look&&k.selectAll("path").attr("style",l),w&&"handDrawn"!==e.look&&k.selectAll("path").attr("style",l),h.attr("transform",`translate(${-g/2+4+(e.padding??0)-(s.x-(s.left??0))},${-p/2+(e.padding??0)-(s.y-(s.top??0))})`),y(e,k),e.intersect=function(t){return P.rect(e,t)},i}async function tZ(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.UG)(e);e.labelStyle=a;let{shapeSvg:i,bbox:n,label:s}=await c(t,e,f(e)),h=Math.max(n.width+(e.padding??0)*2,e?.width??0),o=Math.max(n.height+(e.padding??0)*2,e?.height??0),g=-h/2,u=-o/2,{cssStyles:m}=e,w=d.Z.svg(i),x=(0,r._q)(e,{});"handDrawn"!==e.look&&(x.roughness=0,x.fillStyle="solid");let b=[{x:g,y:u},{x:g,y:u+o},{x:g+h,y:u+o},{x:g+h,y:u-o/2}],$=p(b),k=w.path($,x),M=i.insert(()=>k,":first-child");return M.attr("class","basic label-container"),m&&"handDrawn"!==e.look&&M.selectChildren("path").attr("style",m),l&&"handDrawn"!==e.look&&M.selectChildren("path").attr("style",l),M.attr("transform",`translate(0, ${o/4})`),s.attr("transform",`translate(${-h/2+(e.padding??0)-(n.x-(n.left??0))}, ${-o/4+(e.padding??0)-(n.y-(n.top??0))})`),y(e,M),e.intersect=function(t){return P.polygon(e,b,t)},i}async function tU(t,e){let a={rx:0,ry:0,classes:"",labelPaddingX:e.labelPaddingX??2*(e?.padding||0),labelPaddingY:1*(e?.padding||0)};return tm(t,e,a)}async function tG(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.UG)(e);e.labelStyle=a;let{shapeSvg:i,bbox:n}=await c(t,e,f(e)),s=n.height+e.padding,h=n.width+s/4+e.padding,o=s/2,{cssStyles:g}=e,u=d.Z.svg(i),w=(0,r._q)(e,{});"handDrawn"!==e.look&&(w.roughness=0,w.fillStyle="solid");let x=[{x:-h/2+o,y:-s/2},{x:h/2-o,y:-s/2},...m(-h/2+o,0,o,50,90,270),{x:h/2-o,y:s/2},...m(h/2-o,0,o,50,270,450)],b=p(x),$=u.path(b,w),k=i.insert(()=>$,":first-child");return k.attr("class","basic label-container outer-path"),g&&"handDrawn"!==e.look&&k.selectChildren("path").attr("style",g),l&&"handDrawn"!==e.look&&k.selectChildren("path").attr("style",l),y(e,k),e.intersect=function(t){return P.polygon(e,x,t)},i}async function tI(t,e){return tm(t,e,{rx:5,ry:5,classes:"flowchart-node"})}function tT(t,e,{config:{themeVariables:a}}){let{labelStyles:l,nodeStyles:i}=(0,r.UG)(e);e.labelStyle=l;let{cssStyles:n}=e,{lineColor:s,stateBorder:h,nodeBorder:o}=a,c=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),g=d.Z.svg(c),f=(0,r._q)(e,{});"handDrawn"!==e.look&&(f.roughness=0,f.fillStyle="solid");let p=g.circle(0,0,14,{...f,stroke:s,strokeWidth:2}),u=h??o,m=g.circle(0,0,5,{...f,fill:u,stroke:u,strokeWidth:2,fillStyle:"solid"}),w=c.insert(()=>p,":first-child");return w.insert(()=>m),n&&w.selectAll("path").attr("style",n),i&&w.selectAll("path").attr("style",i),y(e,w),e.intersect=function(t){return P.circle(e,7,t)},c}function tE(t,e,{config:{themeVariables:a}}){let l;let{lineColor:i}=a,n=t.insert("g").attr("class","node default").attr("id",e.domId||e.id);if("handDrawn"===e.look){let t=d.Z.svg(n).circle(0,0,14,(0,r.TA)(i));(l=n.insert(()=>t)).attr("class","state-start").attr("r",7).attr("width",14).attr("height",14)}else(l=n.insert("circle",":first-child")).attr("class","state-start").attr("r",7).attr("width",14).attr("height",14);return y(e,l),e.intersect=function(t){return P.circle(e,7,t)},n}async function tH(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.UG)(e);e.labelStyle=a;let{shapeSvg:i,bbox:s}=await c(t,e,f(e)),h=(e?.padding||0)/2,o=s.width+e.padding,g=s.height+e.padding,p=-s.width/2-h,u=-s.height/2-h,m=[{x:0,y:0},{x:o,y:0},{x:o,y:-g},{x:0,y:-g},{x:0,y:0},{x:-8,y:0},{x:o+8,y:0},{x:o+8,y:-g},{x:-8,y:-g},{x:-8,y:0}];if("handDrawn"===e.look){let t=d.Z.svg(i),a=(0,r._q)(e,{}),l=t.rectangle(p-8,u,o+16,g,a),s=t.line(p,u,p,u+g,a),h=t.line(p+o,u,p+o,u+g,a);i.insert(()=>s,":first-child"),i.insert(()=>h,":first-child");let c=i.insert(()=>l,":first-child"),{cssStyles:f}=e;c.attr("class","basic label-container").attr("style",(0,n.R7)(f)),y(e,c)}else{let t=I(i,o,g,m);l&&t.attr("style",l),y(e,t)}return e.intersect=function(t){return P.polygon(e,m,t)},i}async function tV(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.UG)(e);e.labelStyle=a;let{shapeSvg:i,bbox:n}=await c(t,e,f(e)),s=Math.max(n.width+(e.padding??0)*2,e?.width??0),h=Math.max(n.height+(e.padding??0)*2,e?.height??0),o=-s/2,g=-h/2,u=.2*h,{cssStyles:m}=e,w=d.Z.svg(i),x=(0,r._q)(e,{}),b=[{x:o-u/2,y:g},{x:o+s+u/2,y:g},{x:o+s+u/2,y:g+h},{x:o-u/2,y:g+h}];"handDrawn"!==e.look&&(x.roughness=0,x.fillStyle="solid");let $=p(b),k=w.path($,x),M=p([{x:o+s-u/2,y:g+h},{x:o+s+u/2,y:g+h},{x:o+s+u/2,y:g+h-.2*h}]),S=w.path(M,{...x,fillStyle:"solid"}),D=i.insert(()=>S,":first-child");return D.insert(()=>k,":first-child"),D.attr("class","basic label-container"),m&&"handDrawn"!==e.look&&D.selectAll("path").attr("style",m),l&&"handDrawn"!==e.look&&D.selectAll("path").attr("style",l),y(e,D),e.intersect=function(t){return P.polygon(e,b,t)},i}async function tY(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.UG)(e);e.labelStyle=a;let{shapeSvg:i,bbox:n,label:s}=await c(t,e,f(e)),h=Math.max(n.width+(e.padding??0)*2,e?.width??0),o=Math.max(n.height+(e.padding??0)*2,e?.height??0),g=o/4,m=.2*h,w=.2*o,x=o+g,{cssStyles:b}=e,$=d.Z.svg(i),k=(0,r._q)(e,{});"handDrawn"!==e.look&&(k.roughness=0,k.fillStyle="solid");let M=[{x:-h/2-h/2*.1,y:x/2},...u(-h/2-h/2*.1,x/2,h/2+h/2*.1,x/2,g,.8),{x:h/2+h/2*.1,y:-x/2},{x:-h/2-h/2*.1,y:-x/2}],S=-h/2+h/2*.1,D=-x/2-.4*w,W=[{x:S+h-m,y:(D+o)*1.4},{x:S+h,y:D+o-w},{x:S+h,y:(D+o)*.9},...u(S+h,(D+o)*1.3,S+h-m,(D+o)*1.5,-(.03*o),.5)],v=p(M),C=$.path(v,k),B=p(W),N=$.path(B,{...k,fillStyle:"solid"}),A=i.insert(()=>N,":first-child");return A.insert(()=>C,":first-child"),A.attr("class","basic label-container"),b&&"handDrawn"!==e.look&&A.selectAll("path").attr("style",b),l&&"handDrawn"!==e.look&&A.selectAll("path").attr("style",l),A.attr("transform",`translate(0,${-g/2})`),s.attr("transform",`translate(${-h/2+(e.padding??0)-(n.x-(n.left??0))},${-o/2+(e.padding??0)-g/2-(n.y-(n.top??0))})`),y(e,A),e.intersect=function(t){return P.polygon(e,M,t)},i}async function tj(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.UG)(e);e.labelStyle=a;let{shapeSvg:i,bbox:n}=await c(t,e,f(e)),s=Math.max(n.width+e.padding,e?.width||0),h=Math.max(n.height+e.padding,e?.height||0),o=i.insert("rect",":first-child");return o.attr("class","text").attr("style",l).attr("rx",0).attr("ry",0).attr("x",-s/2).attr("y",-h/2).attr("width",s).attr("height",h),y(e,o),e.intersect=function(t){return P.rect(e,t)},i}(0,h.eW)(tA,"question"),(0,h.eW)(tq,"rect_left_inv_arrow"),(0,h.eW)(tR,"rectWithTitle"),(0,h.eW)(t_,"generateArcPoints"),(0,h.eW)(tL,"roundedRect"),(0,h.eW)(tP,"shadedProcess"),(0,h.eW)(tZ,"slopedRect"),(0,h.eW)(tU,"squareRect"),(0,h.eW)(tG,"stadium"),(0,h.eW)(tI,"state"),(0,h.eW)(tT,"stateEnd"),(0,h.eW)(tE,"stateStart"),(0,h.eW)(tH,"subroutine"),(0,h.eW)(tV,"taggedRect"),(0,h.eW)(tY,"taggedWaveEdgedRectangle"),(0,h.eW)(tj,"text");var tO=(0,h.eW)((t,e,a,l,r,i)=>`M${t},${e}
|
|
3
|
+
a${r},${i} 0,0,1 0,${-l}
|
|
4
|
+
l${a},0
|
|
5
|
+
a${r},${i} 0,0,1 0,${l}
|
|
6
|
+
M${a},${-l}
|
|
7
|
+
a${r},${i} 0,0,0 0,${l}
|
|
8
|
+
l${-a},0`,"createCylinderPathD"),tz=(0,h.eW)((t,e,a,l,r,i)=>`M${t},${e} M${t+a},${e} a${r},${i} 0,0,0 0,${-l} l${-a},0 a${r},${i} 0,0,0 0,${l} l${a},0`,"createOuterCylinderPathD"),tF=(0,h.eW)((t,e,a,l,r,i)=>`M${t+a/2},${-l/2} a${r},${i} 0,0,0 0,${l}`,"createInnerCylinderPathD");async function tX(t,e){let a;let{labelStyles:l,nodeStyles:i}=(0,r.UG)(e);e.labelStyle=l;let{shapeSvg:s,bbox:h,label:o,halfPadding:g}=await c(t,e,f(e)),p="neo"===e.look?2*g:g,u=h.height+p,m=u/2,w=m/(2.5+u/50),x=h.width+w+p,{cssStyles:b}=e;if("handDrawn"===e.look){let t=d.Z.svg(s),l=tz(0,0,x,u,w,m),i=tF(0,0,x,u,w,m),n=t.path(l,(0,r._q)(e,{})),h=t.path(i,(0,r._q)(e,{fill:"none"}));a=s.insert(()=>h,":first-child"),(a=s.insert(()=>n,":first-child")).attr("class","basic label-container"),b&&a.attr("style",b)}else{let t=tO(0,0,x,u,w,m);(a=s.insert("path",":first-child").attr("d",t).attr("class","basic label-container").attr("style",(0,n.R7)(b)).attr("style",i)).attr("class","basic label-container"),b&&a.selectAll("path").attr("style",b),i&&a.selectAll("path").attr("style",i)}return a.attr("label-offset-x",w),a.attr("transform",`translate(${-x/2}, ${u/2} )`),o.attr("transform",`translate(${-(h.width/2)-w-(h.x-(h.left??0))}, ${-(h.height/2)-(h.y-(h.top??0))})`),y(e,a),e.intersect=function(t){let a=P.rect(e,t),l=a.y-(e.y??0);if(0!=m&&(Math.abs(l)<(e.height??0)/2||Math.abs(l)==(e.height??0)/2&&Math.abs(a.x-(e.x??0))>(e.width??0)/2-w)){let r=w*w*(1-l*l/(m*m));0!=r&&(r=Math.sqrt(Math.abs(r))),r=w-r,t.x-(e.x??0)>0&&(r=-r),a.x+=r}return a},s}async function tJ(t,e){let a;let{labelStyles:l,nodeStyles:i}=(0,r.UG)(e);e.labelStyle=l;let{shapeSvg:n,bbox:s}=await c(t,e,f(e)),h=s.width+e.padding,o=s.height+e.padding,g=[{x:-3*o/6,y:0},{x:h+3*o/6,y:0},{x:h,y:-o},{x:0,y:-o}],{cssStyles:u}=e;if("handDrawn"===e.look){let t=d.Z.svg(n),l=(0,r._q)(e,{}),i=p(g),s=t.path(i,l);a=n.insert(()=>s,":first-child").attr("transform",`translate(${-h/2}, ${o/2})`),u&&a.attr("style",u)}else a=I(n,h,o,g);return i&&a.attr("style",i),e.width=h,e.height=o,y(e,a),e.intersect=function(t){return P.polygon(e,g,t)},n}async function tK(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.UG)(e);e.labelStyle=a;let{shapeSvg:i,bbox:n}=await c(t,e,f(e)),s=Math.max(60,n.width+(e.padding??0)*2,e?.width??0),h=Math.max(20,n.height+(e.padding??0)*2,e?.height??0),{cssStyles:o}=e,g=d.Z.svg(i),u=(0,r._q)(e,{});"handDrawn"!==e.look&&(u.roughness=0,u.fillStyle="solid");let m=[{x:-s/2*.8,y:-h/2},{x:s/2*.8,y:-h/2},{x:s/2,y:-h/2*.6},{x:s/2,y:h/2},{x:-s/2,y:h/2},{x:-s/2,y:-h/2*.6}],w=p(m),x=g.path(w,u),b=i.insert(()=>x,":first-child");return b.attr("class","basic label-container"),o&&"handDrawn"!==e.look&&b.selectChildren("path").attr("style",o),l&&"handDrawn"!==e.look&&b.selectChildren("path").attr("style",l),y(e,b),e.intersect=function(t){return P.polygon(e,m,t)},i}async function tQ(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.UG)(e);e.labelStyle=a;let{shapeSvg:i,bbox:n,label:o}=await c(t,e,f(e)),g=(0,s.ku)(s.nV().flowchart?.htmlLabels),u=n.width+(e.padding??0),m=u+n.height,w=u+n.height,x=[{x:0,y:0},{x:w,y:0},{x:w/2,y:-m}],{cssStyles:b}=e,$=d.Z.svg(i),k=(0,r._q)(e,{});"handDrawn"!==e.look&&(k.roughness=0,k.fillStyle="solid");let M=p(x),S=$.path(M,k),D=i.insert(()=>S,":first-child").attr("transform",`translate(${-m/2}, ${m/2})`);return b&&"handDrawn"!==e.look&&D.selectChildren("path").attr("style",b),l&&"handDrawn"!==e.look&&D.selectChildren("path").attr("style",l),e.width=u,e.height=m,y(e,D),o.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${m/2-(n.height+(e.padding??0)/(g?2:1)-(n.y-(n.top??0)))})`),e.intersect=function(t){return h.cM.info("Triangle intersect",e,x,t),P.polygon(e,x,t)},i}async function t0(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.UG)(e);e.labelStyle=a;let{shapeSvg:i,bbox:n,label:s}=await c(t,e,f(e)),h=Math.max(n.width+(e.padding??0)*2,e?.width??0),o=Math.max(n.height+(e.padding??0)*2,e?.height??0),g=o/8,m=o+g,{cssStyles:w}=e,x=70-h,b=x>0?x/2:0,$=d.Z.svg(i),k=(0,r._q)(e,{});"handDrawn"!==e.look&&(k.roughness=0,k.fillStyle="solid");let M=[{x:-h/2-b,y:m/2},...u(-h/2-b,m/2,h/2+b,m/2,g,.8),{x:h/2+b,y:-m/2},{x:-h/2-b,y:-m/2}],S=p(M),D=$.path(S,k),W=i.insert(()=>D,":first-child");return W.attr("class","basic label-container"),w&&"handDrawn"!==e.look&&W.selectAll("path").attr("style",w),l&&"handDrawn"!==e.look&&W.selectAll("path").attr("style",l),W.attr("transform",`translate(0,${-g/2})`),s.attr("transform",`translate(${-h/2+(e.padding??0)-(n.x-(n.left??0))},${-o/2+(e.padding??0)-g-(n.y-(n.top??0))})`),y(e,W),e.intersect=function(t){return P.polygon(e,M,t)},i}async function t2(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.UG)(e);e.labelStyle=a;let{shapeSvg:i,bbox:n}=await c(t,e,f(e)),s=Math.max(n.width+(e.padding??0)*2,e?.width??0),h=Math.max(n.height+(e.padding??0)*2,e?.height??0),o=s/h,g=s,m=h;g>m*o?m=g/o:g=m*o,g=Math.max(g,100);let w=Math.min(.2*(m=Math.max(m,50)),m/4),x=m+2*w,{cssStyles:b}=e,$=d.Z.svg(i),k=(0,r._q)(e,{});"handDrawn"!==e.look&&(k.roughness=0,k.fillStyle="solid");let M=[{x:-g/2,y:x/2},...u(-g/2,x/2,g/2,x/2,w,1),{x:g/2,y:-x/2},...u(g/2,-x/2,-g/2,-x/2,w,-1)],S=p(M),D=$.path(S,k),W=i.insert(()=>D,":first-child");return W.attr("class","basic label-container"),b&&"handDrawn"!==e.look&&W.selectAll("path").attr("style",b),l&&"handDrawn"!==e.look&&W.selectAll("path").attr("style",l),y(e,W),e.intersect=function(t){return P.polygon(e,M,t)},i}async function t1(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.UG)(e);e.labelStyle=a;let{shapeSvg:i,bbox:n,label:s}=await c(t,e,f(e)),h=Math.max(n.width+(e.padding??0)*2,e?.width??0),o=Math.max(n.height+(e.padding??0)*2,e?.height??0),g=-h/2,p=-o/2,{cssStyles:u}=e,m=d.Z.svg(i),w=(0,r._q)(e,{}),x=[{x:g-5,y:p-5},{x:g-5,y:p+o},{x:g+h,y:p+o},{x:g+h,y:p-5}],b=`M${g-5},${p-5} L${g+h},${p-5} L${g+h},${p+o} L${g-5},${p+o} L${g-5},${p-5}
|
|
9
|
+
M${g-5},${p} L${g+h},${p}
|
|
10
|
+
M${g},${p-5} L${g},${p+o}`;"handDrawn"!==e.look&&(w.roughness=0,w.fillStyle="solid");let $=m.path(b,w),k=i.insert(()=>$,":first-child");return k.attr("transform","translate(2.5, 2.5)"),k.attr("class","basic label-container"),u&&"handDrawn"!==e.look&&k.selectAll("path").attr("style",u),l&&"handDrawn"!==e.look&&k.selectAll("path").attr("style",l),s.attr("transform",`translate(${-(n.width/2)+2.5-(n.x-(n.left??0))}, ${-(n.height/2)+2.5-(n.y-(n.top??0))})`),y(e,k),e.intersect=function(t){return P.polygon(e,x,t)},i}async function t5(t,e){if(e.alias&&(e.label=e.alias),"handDrawn"===e.look){let{themeVariables:a}=(0,s.iE)(),{background:l}=a,r={...e,id:e.id+"-background",look:"default",cssStyles:["stroke: none",`fill: ${l}`]};await t5(t,r)}let a=(0,s.iE)();e.useHtmlLabels=a.htmlLabels;let l=a.er?.diagramPadding??10,i=a.er?.entityPadding??6,{cssStyles:h}=e,{labelStyles:c,nodeStyles:g}=(0,r.UG)(e);if(0===e.attributes.length&&e.label){let r={rx:0,ry:0,labelPaddingX:l,labelPaddingY:1.5*l,classes:""};(0,n.Cq)(e.label,a)+2*r.labelPaddingX<a.er.minEntityWidth&&(e.width=a.er.minEntityWidth);let i=await tm(t,e,r);if(!(0,s.ku)(a.htmlLabels)){let t=i.select("text"),e=t.node()?.getBBox();t.attr("transform",`translate(${-e.width/2}, 0)`)}return i}a.htmlLabels||(l*=1.25,i*=1.25);let p=f(e);p||(p="node default");let u=t.insert("g").attr("class",p).attr("id",e.domId||e.id),m=await t8(u,e.label??"",a,0,0,["name"],c);m.height+=i;let w=0,x=[],b=[],$=0,k=0,M=0,S=0,D=!0,W=!0;for(let t of e.attributes){let e=await t8(u,t.type,a,0,w,["attribute-type"],c);$=Math.max($,e.width+l);let r=await t8(u,t.name,a,0,w,["attribute-name"],c);k=Math.max(k,r.width+l);let n=await t8(u,t.keys.join(),a,0,w,["attribute-keys"],c);M=Math.max(M,n.width+l);let s=await t8(u,t.comment,a,0,w,["attribute-comment"],c);S=Math.max(S,s.width+l);let h=Math.max(e.height,r.height,n.height,s.height)+i;b.push({yOffset:w,rowHeight:h}),w+=h}let v=4;M<=l&&(D=!1,M=0,v--),S<=l&&(W=!1,S=0,v--);let C=u.node().getBBox();if(m.width+2*l-($+k+M+S)>0){let t=m.width+2*l-($+k+M+S);$+=t/v,k+=t/v,M>0&&(M+=t/v),S>0&&(S+=t/v)}let B=$+k+M+S,N=d.Z.svg(u),A=(0,r._q)(e,{});"handDrawn"!==e.look&&(A.roughness=0,A.fillStyle="solid");let q=0;b.length>0&&(q=b.reduce((t,e)=>t+(e?.rowHeight??0),0));let R=Math.max(C.width+2*l,e?.width||0,B),_=Math.max((q??0)+m.height,e?.height||0),L=-R/2,Z=-_/2;u.selectAll("g:not(:first-child)").each((t,e,a)=>{let r=(0,o.Ys)(a[e]),n=r.attr("transform"),s=0,h=0;if(n){let t=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(n);t&&(s=parseFloat(t[1]),h=parseFloat(t[2]),r.attr("class").includes("attribute-name")?s+=$:r.attr("class").includes("attribute-keys")?s+=$+k:r.attr("class").includes("attribute-comment")&&(s+=$+k+M))}r.attr("transform",`translate(${L+l/2+s}, ${h+Z+m.height+i/2})`)}),u.select(".name").attr("transform","translate("+-m.width/2+", "+(Z+i/2)+")");let U=N.rectangle(L,Z,R,_,A),G=u.insert(()=>U,":first-child").attr("style",h.join("")),{themeVariables:I}=(0,s.iE)(),{rowEven:T,rowOdd:E,nodeBorder:H}=I;for(let[t,e]of(x.push(0),b.entries())){let a=(t+1)%2==0&&0!==e.yOffset,l=N.rectangle(L,m.height+Z+e?.yOffset,R,e?.rowHeight,{...A,fill:a?T:E,stroke:H});u.insert(()=>l,"g.label").attr("style",h.join("")).attr("class",`row-rect-${a?"even":"odd"}`)}let V=N.line(L,m.height+Z,R+L,m.height+Z,A);for(let t of(u.insert(()=>V).attr("class","divider"),V=N.line($+L,m.height+Z,$+L,_+Z,A),u.insert(()=>V).attr("class","divider"),D&&(V=N.line($+k+L,m.height+Z,$+k+L,_+Z,A),u.insert(()=>V).attr("class","divider")),W&&(V=N.line($+k+M+L,m.height+Z,$+k+M+L,_+Z,A),u.insert(()=>V).attr("class","divider")),x))V=N.line(L,m.height+Z+t,R+L,m.height+Z+t,A),u.insert(()=>V).attr("class","divider");if(y(e,G),g&&"handDrawn"!==e.look){let t=g.split(";"),e=t?.filter(t=>t.includes("stroke"))?.map(t=>`${t}`).join("; ");u.selectAll("path").attr("style",e??""),u.selectAll(".row-rect-even path").attr("style",g)}return e.intersect=function(t){return P.rect(e,t)},u}async function t8(t,e,a,l=0,r=0,h=[],d=""){let c=t.insert("g").attr("class",`label ${h.join(" ")}`).attr("transform",`translate(${l}, ${r})`).attr("style",d);e!==(0,s.UO)(e)&&(e=(e=(0,s.UO)(e)).replaceAll("<","<").replaceAll(">",">"));let g=c.node().appendChild(await (0,i.rw)(c,e,{width:(0,n.Cq)(e,a)+100,style:d,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,s.ku)(a.htmlLabels)){let t=g.children[0];t.style.textAlign="start";let e=(0,o.Ys)(g);y=t.getBoundingClientRect(),e.attr("width",y.width),e.attr("height",y.height)}return y}async function t4(t,e,a,l,r=a.class.padding??12){let i=l?0:3,n=t.insert("g").attr("class",f(e)).attr("id",e.domId||e.id),s=null,h=null,o=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 t3(s,{text:`\xab${t}\xbb`},0),c=s.node().getBBox().height}h=n.insert("g").attr("class","label-group text"),await t3(h,e,0,["font-weight: bolder"]);let p=h.node().getBBox();g=p.height,o=n.insert("g").attr("class","members-group text");let u=0;for(let t of e.members){let e=await t3(o,t,u,[t.parseClassifier()]);u+=e+i}(y=o.node().getBBox().height)<=0&&(y=r/2),d=n.insert("g").attr("class","methods-group text");let m=0;for(let t of e.methods){let e=await t3(d,t,m,[t.parseClassifier()]);m+=e+i}let w=n.node().getBBox();if(null!==s){let t=s.node().getBBox();s.attr("transform",`translate(${-t.width/2})`)}return h.attr("transform",`translate(${-p.width/2}, ${c})`),w=n.node().getBBox(),o.attr("transform",`translate(0, ${c+g+2*r})`),w=n.node().getBBox(),d.attr("transform",`translate(0, ${c+g+(y?y+4*r:2*r)})`),w=n.node().getBBox(),{shapeSvg:n,bbox:w}}async function t3(t,e,a,l=[]){let r;let d=t.insert("g").attr("class","label").attr("style",l.join("; ")),c=(0,s.iE)(),g="useHtmlLabels"in e?e.useHtmlLabels:(0,s.ku)(c.htmlLabels)??!0,y="";y="text"in e?e.text:e.label,!g&&y.startsWith("\\")&&(y=y.substring(1)),(0,s.l0)(y)&&(g=!0);let f=await (0,i.rw)(d,(0,s.uX)((0,n.SH)(y)),{width:(0,n.Cq)(y,c)+50,classes:"markdown-node-label",useHtmlLabels:g},c),p=1;if(g){let t=f.children[0],e=(0,o.Ys)(f);p=t.innerHTML.split("<br>").length,t.innerHTML.includes("</math>")&&(p+=t.innerHTML.split("<mrow>").length-1);let a=t.getElementsByTagName("img");if(a){let t=""===y.replace(/<img[^>]*>/g,"").trim();await Promise.all([...a].map(e=>new Promise(a=>{function l(){if(e.style.display="flex",e.style.flexDirection="column",t){let t=5*parseInt(c.fontSize?.toString()??window.getComputedStyle(document.body).fontSize,10)+"px";e.style.minWidth=t,e.style.maxWidth=t}else e.style.width="100%";a(e)}(0,h.eW)(l,"setupImage"),setTimeout(()=>{e.complete&&l()}),e.addEventListener("error",l),e.addEventListener("load",l)})))}r=t.getBoundingClientRect(),e.attr("width",r.width),e.attr("height",r.height)}else{l.includes("font-weight: bolder")&&(0,o.Ys)(f).selectAll("tspan").attr("font-weight",""),p=f.children.length;let t=f.children[0];(""===f.textContent||f.textContent.includes(">"))&&(t.textContent=y[0]+y.substring(1).replaceAll(">",">").replaceAll("<","<").trim()," "===y[1]&&(t.textContent=t.textContent[0]+" "+t.textContent.substring(1))),"undefined"===t.textContent&&(t.textContent=""),r=f.getBBox()}return d.attr("transform","translate(0,"+(-r.height/(2*p)+a)+")"),r.height}async function t7(t,e){let a=(0,s.nV)(),l=a.class.padding??12,i=e.useHtmlLabels??(0,s.ku)(a.htmlLabels)??!0;e.annotations=e.annotations??[],e.members=e.members??[],e.methods=e.methods??[];let{shapeSvg:n,bbox:h}=await t4(t,e,a,i,l),{labelStyles:c,nodeStyles:g}=(0,r.UG)(e);e.labelStyle=c,e.cssStyles=e.styles||"";let f=e.styles?.join(";")||g||"";e.cssStyles||(e.cssStyles=f.replaceAll("!important","").split(";"));let p=0===e.members.length&&0===e.methods.length&&!a.class?.hideEmptyMembersBox,u=d.Z.svg(n),m=(0,r._q)(e,{});"handDrawn"!==e.look&&(m.roughness=0,m.fillStyle="solid");let w=h.width,x=h.height;0===e.members.length&&0===e.methods.length?x+=l:e.members.length>0&&0===e.methods.length&&(x+=2*l);let b=-w/2,$=-x/2,k=u.rectangle(b-l,$-l-(p?l:0===e.members.length&&0===e.methods.length?-l/2:0),w+2*l,x+2*l+(p?2*l:0===e.members.length&&0===e.methods.length?-l:0),m),M=n.insert(()=>k,":first-child");M.attr("class","basic label-container");let S=M.node().getBBox();n.selectAll(".text").each((t,a,r)=>{let s=(0,o.Ys)(r[a]),h=s.attr("transform"),d=0;if(h){let t=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(h);t&&(d=parseFloat(t[2]))}let c=d+$+l-(p?l:0===e.members.length&&0===e.methods.length?-l/2:0);i||(c-=4);let g=b;(s.attr("class").includes("label-group")||s.attr("class").includes("annotation-group"))&&(g=-s.node()?.getBBox().width/2||0,n.selectAll("text").each(function(t,e,a){"middle"===window.getComputedStyle(a[e]).textAnchor&&(g=0)})),s.attr("transform",`translate(${g}, ${c})`)});let D=n.select(".annotation-group").node().getBBox().height-(p?l/2:0)||0,W=n.select(".label-group").node().getBBox().height-(p?l/2:0)||0,v=n.select(".members-group").node().getBBox().height-(p?l/2:0)||0;if(e.members.length>0||e.methods.length>0||p){let t=u.line(S.x,D+W+$+l,S.x+S.width,D+W+$+l,m);n.insert(()=>t).attr("class","divider").attr("style",f)}if(p||e.members.length>0||e.methods.length>0){let t=u.line(S.x,D+W+v+$+2*l+l,S.x+S.width,D+W+v+$+l+2*l,m);n.insert(()=>t).attr("class","divider").attr("style",f)}if("handDrawn"!==e.look&&n.selectAll("path").attr("style",f),M.select(":nth-child(2)").attr("style",f),n.selectAll(".divider").select("path").attr("style",f),e.labelStyle?n.selectAll("span").attr("style",e.labelStyle):n.selectAll("span").attr("style",f),!i){let t=RegExp(/color\s*:\s*([^;]*)/),e=t.exec(f);if(e){let t=e[0].replace("color","fill");n.selectAll("tspan").attr("style",t)}else if(c){let e=t.exec(c);if(e){let t=e[0].replace("color","fill");n.selectAll("tspan").attr("style",t)}}}return y(e,M),e.intersect=function(t){return P.rect(e,t)},n}async function t9(t,e){let a;let{labelStyles:l,nodeStyles:i}=(0,r.UG)(e);e.labelStyle=l;let n="verifyMethod"in e,s=f(e),h=t.insert("g").attr("class",s).attr("id",e.domId??e.id),c=a=n?await t6(h,`<<${e.type}>>`,0,e.labelStyle):await t6(h,"<<Element>>",0,e.labelStyle),g=await t6(h,e.name,c,e.labelStyle+"; font-weight: bold;");if(c+=g+20,n){let t=await t6(h,`${e.requirementId?`ID: ${e.requirementId}`:""}`,c,e.labelStyle);c+=t;let a=await t6(h,`${e.text?`Text: ${e.text}`:""}`,c,e.labelStyle);c+=a;let l=await t6(h,`${e.risk?`Risk: ${e.risk}`:""}`,c,e.labelStyle);c+=l,await t6(h,`${e.verifyMethod?`Verification: ${e.verifyMethod}`:""}`,c,e.labelStyle)}else{let t=await t6(h,`${e.type?`Type: ${e.type}`:""}`,c,e.labelStyle);c+=t,await t6(h,`${e.docRef?`Doc Ref: ${e.docRef}`:""}`,c,e.labelStyle)}let p=(h.node()?.getBBox().width??200)+20,u=(h.node()?.getBBox().height??200)+20,m=-p/2,w=-u/2,x=d.Z.svg(h),b=(0,r._q)(e,{});"handDrawn"!==e.look&&(b.roughness=0,b.fillStyle="solid");let $=x.rectangle(m,w,p,u,b),k=h.insert(()=>$,":first-child");if(k.attr("class","basic label-container").attr("style",i),h.selectAll(".label").each((t,e,a)=>{let l=(0,o.Ys)(a[e]),r=l.attr("transform"),i=0,n=0;if(r){let t=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(r);t&&(i=parseFloat(t[1]),n=parseFloat(t[2]))}let s=n-u/2,h=m+10;(0===e||1===e)&&(h=i),l.attr("transform",`translate(${h}, ${s+20})`)}),c>a+g+20){let t=x.line(m,w+a+g+20,m+p,w+a+g+20,b);h.insert(()=>t).attr("style",i)}return y(e,k),e.intersect=function(t){return P.rect(e,t)},h}async function t6(t,e,a,l=""){let r;if(""===e)return 0;let h=t.insert("g").attr("class","label").attr("style",l),d=(0,s.nV)(),c=d.htmlLabels??!0,g=await (0,i.rw)(h,(0,s.uX)((0,n.SH)(e)),{width:(0,n.Cq)(e,d)+50,classes:"markdown-node-label",useHtmlLabels:c,style:l},d);if(c){let t=g.children[0],e=(0,o.Ys)(g);r=t.getBoundingClientRect(),e.attr("width",r.width),e.attr("height",r.height)}else{for(let t of g.children[0].children)t.textContent=t.textContent.replaceAll(">",">").replaceAll("<","<"),l&&t.setAttribute("style",l);r=g.getBBox(),r.height+=6}return h.attr("transform",`translate(${-r.width/2},${-r.height/2+a})`),r.height}(0,h.eW)(tX,"tiltedCylinder"),(0,h.eW)(tJ,"trapezoid"),(0,h.eW)(tK,"trapezoidalPentagon"),(0,h.eW)(tQ,"triangle"),(0,h.eW)(t0,"waveEdgedRectangle"),(0,h.eW)(t2,"waveRectangle"),(0,h.eW)(t1,"windowPane"),(0,h.eW)(t5,"erBox"),(0,h.eW)(t8,"addText"),(0,h.eW)(t4,"textHelper"),(0,h.eW)(t3,"addText"),(0,h.eW)(t7,"classBox"),(0,h.eW)(t9,"requirementBox"),(0,h.eW)(t6,"addText");var et=(0,h.eW)(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 ee(t,e,{config:a}){let l,i,n,s;let{labelStyles:h,nodeStyles:o}=(0,r.UG)(e);e.labelStyle=h||"";let p=e.width;e.width=(e.width??200)-10;let{shapeSvg:u,bbox:m,label:w}=await c(t,e,f(e)),x=e.padding||10,b="";"ticket"in e&&e.ticket&&a?.kanban?.ticketBaseUrl&&(b=a?.kanban?.ticketBaseUrl.replace("#TICKET#",e.ticket),l=u.insert("svg:a",":first-child").attr("class","kanban-ticket-link").attr("xlink:href",b).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 g(l,"ticket"in e&&e.ticket||"",$):{label:i,bbox:n}=await g(u,"ticket"in e&&e.ticket||"",$);let{label:M,bbox:S}=await g(u,"assigned"in e&&e.assigned||"",$);e.width=p;let D=e?.width||0,W=Math.max(n.height,S.height)/2,v=Math.max(m.height+20,e?.height||0)+W,C=-D/2,B=-v/2;w.attr("transform","translate("+(x-D/2)+", "+(-W-m.height/2)+")"),i.attr("transform","translate("+(x-D/2)+", "+(-W+m.height/2)+")"),M.attr("transform","translate("+(x+D/2-S.width-20)+", "+(-W+m.height/2)+")");let{rx:N,ry:A}=e,{cssStyles:q}=e;if("handDrawn"===e.look){let t=d.Z.svg(u),a=(0,r._q)(e,{}),l=N||A?t.path(k(C,B,D,v,N||0),a):t.rectangle(C,B,D,v,a);(s=u.insert(()=>l,":first-child")).attr("class","basic label-container").attr("style",q||null)}else{(s=u.insert("rect",":first-child")).attr("class","basic label-container __APA__").attr("style",o).attr("rx",N??5).attr("ry",A??5).attr("x",C).attr("y",B).attr("width",D).attr("height",v);let t="priority"in e&&e.priority;if(t){let e=u.append("line"),a=C+2,l=B+Math.floor((N??0)/2),r=B+v-Math.floor((N??0)/2);e.attr("x1",a).attr("y1",l).attr("x2",a).attr("y2",r).attr("stroke-width","4").attr("stroke",et(t))}}return y(e,s),e.height=v,e.intersect=function(t){return P.rect(e,t)},u}async function ea(t,e){let a;let{labelStyles:l,nodeStyles:i}=(0,r.UG)(e);e.labelStyle=l;let{shapeSvg:s,bbox:o,halfPadding:g,label:p}=await c(t,e,f(e)),u=o.width+10*g,m=o.height+8*g,w=.15*u,{cssStyles:x}=e,b=o.width+20,$=o.height+20,k=Math.max(u,b),M=Math.max(m,$);p.attr("transform",`translate(${-o.width/2}, ${-o.height/2})`);let S=`M0 0
|
|
11
|
+
a${w},${w} 1 0,0 ${.25*k},${-1*M*.1}
|
|
12
|
+
a${w},${w} 1 0,0 ${.25*k},0
|
|
13
|
+
a${w},${w} 1 0,0 ${.25*k},0
|
|
14
|
+
a${w},${w} 1 0,0 ${.25*k},${.1*M}
|
|
15
|
+
|
|
16
|
+
a${w},${w} 1 0,0 ${.15*k},${.33*M}
|
|
17
|
+
a${.8*w},${.8*w} 1 0,0 0,${.34*M}
|
|
18
|
+
a${w},${w} 1 0,0 ${-1*k*.15},${.33*M}
|
|
19
|
+
|
|
20
|
+
a${w},${w} 1 0,0 ${-1*k*.25},${.15*M}
|
|
21
|
+
a${w},${w} 1 0,0 ${-1*k*.25},0
|
|
22
|
+
a${w},${w} 1 0,0 ${-1*k*.25},0
|
|
23
|
+
a${w},${w} 1 0,0 ${-1*k*.25},${-1*M*.15}
|
|
24
|
+
|
|
25
|
+
a${w},${w} 1 0,0 ${-1*k*.1},${-1*M*.33}
|
|
26
|
+
a${.8*w},${.8*w} 1 0,0 0,${-1*M*.34}
|
|
27
|
+
a${w},${w} 1 0,0 ${.1*k},${-1*M*.33}
|
|
28
|
+
H0 V0 Z`;if("handDrawn"===e.look){let t=d.Z.svg(s),l=(0,r._q)(e,{}),i=t.path(S,l);(a=s.insert(()=>i,":first-child")).attr("class","basic label-container").attr("style",(0,n.R7)(x))}else a=s.insert("path",":first-child").attr("class","basic label-container").attr("style",i).attr("d",S);return a.attr("transform",`translate(${-k/2}, ${-M/2})`),y(e,a),e.calcIntersect=function(t,e){return P.rect(t,e)},e.intersect=function(t){return h.cM.info("Bang intersect",e,t),P.rect(e,t)},s}async function el(t,e){let a;let{labelStyles:l,nodeStyles:i}=(0,r.UG)(e);e.labelStyle=l;let{shapeSvg:s,bbox:o,halfPadding:g,label:p}=await c(t,e,f(e)),u=o.width+2*g,m=o.height+2*g,w=.15*u,x=.25*u,b=.35*u,$=.2*u,{cssStyles:k}=e,M=`M0 0
|
|
29
|
+
a${w},${w} 0 0,1 ${.25*u},${-1*u*.1}
|
|
30
|
+
a${b},${b} 1 0,1 ${.4*u},${-1*u*.1}
|
|
31
|
+
a${x},${x} 1 0,1 ${.35*u},${.2*u}
|
|
32
|
+
|
|
33
|
+
a${w},${w} 1 0,1 ${.15*u},${.35*m}
|
|
34
|
+
a${$},${$} 1 0,1 ${-1*u*.15},${.65*m}
|
|
35
|
+
|
|
36
|
+
a${x},${w} 1 0,1 ${-1*u*.25},${.15*u}
|
|
37
|
+
a${b},${b} 1 0,1 ${-1*u*.5},0
|
|
38
|
+
a${w},${w} 1 0,1 ${-1*u*.25},${-1*u*.15}
|
|
39
|
+
|
|
40
|
+
a${w},${w} 1 0,1 ${-1*u*.1},${-1*m*.35}
|
|
41
|
+
a${$},${$} 1 0,1 ${.1*u},${-1*m*.65}
|
|
42
|
+
H0 V0 Z`;if("handDrawn"===e.look){let t=d.Z.svg(s),l=(0,r._q)(e,{}),i=t.path(M,l);(a=s.insert(()=>i,":first-child")).attr("class","basic label-container").attr("style",(0,n.R7)(k))}else a=s.insert("path",":first-child").attr("class","basic label-container").attr("style",i).attr("d",M);return p.attr("transform",`translate(${-o.width/2}, ${-o.height/2})`),a.attr("transform",`translate(${-u/2}, ${-m/2})`),y(e,a),e.calcIntersect=function(t,e){return P.rect(t,e)},e.intersect=function(t){return h.cM.info("Cloud intersect",e,t),P.rect(e,t)},s}async function er(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.UG)(e);e.labelStyle=a;let{shapeSvg:i,bbox:n,halfPadding:s,label:h}=await c(t,e,f(e)),o=n.width+8*s,d=n.height+2*s,g=`
|
|
43
|
+
M${-o/2} ${d/2-5}
|
|
44
|
+
v${-d+10}
|
|
45
|
+
q0,-5 5,-5
|
|
46
|
+
h${o-10}
|
|
47
|
+
q5,0 5,5
|
|
48
|
+
v${d-10}
|
|
49
|
+
q0,5 -5,5
|
|
50
|
+
h${-o+10}
|
|
51
|
+
q-5,0 -5,-5
|
|
52
|
+
Z
|
|
53
|
+
`,p=i.append("path").attr("id","node-"+e.id).attr("class","node-bkg node-"+e.type).attr("style",l).attr("d",g);return i.append("line").attr("class","node-line-").attr("x1",-o/2).attr("y1",d/2).attr("x2",o/2).attr("y2",d/2),h.attr("transform",`translate(${-n.width/2}, ${-n.height/2})`),i.append(()=>h.node()),y(e,p),e.calcIntersect=function(t,e){return P.rect(t,e)},e.intersect=function(t){return P.rect(e,t)},i}async function ei(t,e){let a={padding:e.padding??0};return H(t,e,a)}(0,h.eW)(ee,"kanbanItem"),(0,h.eW)(ea,"bang"),(0,h.eW)(el,"cloud"),(0,h.eW)(er,"defaultMindmapNode"),(0,h.eW)(ei,"mindmapCircle");var en=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:tU},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:tL},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:tG},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:tH},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:ta},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:H},{semanticName:"Bang",name:"Bang",shortName:"bang",description:"Bang",aliases:["bang"],handler:ea},{semanticName:"Cloud",name:"Cloud",shortName:"cloud",description:"cloud",aliases:["cloud"],handler:el},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:tA},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:to},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:tb},{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:tJ},{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:tu},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:tr},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:tj},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:T},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:tP},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:tE},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:tT},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:ts},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:td},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:O},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:F},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:J},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:t$},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:t0},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:th},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:tX},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:tD},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:K},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:tl},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:tQ},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:t1},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:ti},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:tK},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:tn},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:tZ},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:tC},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:tv},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:G},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:Y},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:tY},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:tV},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:t2},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:tq},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:tW}],es=(0,h.eW)(()=>Object.fromEntries([...Object.entries({state:tI,choice:E,note:tB,rectWithTitle:tR,labelRect:tw,iconSquare:tf,iconCircle:tg,icon:tc,iconRounded:ty,imageSquare:tp,anchor:Z,kanbanItem:ee,mindmapCircle:ei,defaultMindmapNode:er,classBox:t7,erBox:t5,requirementBox:t9}),...en.flatMap(t=>[t.shortName,..."aliases"in t?t.aliases:[],..."internalAliases"in t?t.internalAliases:[]].map(e=>[e,t.handler]))]),"generateShapeMap")();function eh(t){return t in es}(0,h.eW)(eh,"isValidShape");var eo=new Map;async function ed(t,e,a){let l,r;"rect"===e.shape&&(e.rx&&e.ry?e.shape="roundedRect":e.shape="squareRect");let i=e.shape?es[e.shape]:void 0;if(!i)throw Error(`No such shape: ${e.shape}. Please check your syntax.`);if(e.link){let n;"sandbox"===a.config.securityLevel?n="_top":e.linkTarget&&(n=e.linkTarget||"_blank"),l=t.insert("svg:a").attr("xlink:href",e.link).attr("target",n??null),r=await i(l,e,a)}else l=r=await i(t,e,a);return e.tooltip&&r.attr("title",e.tooltip),eo.set(e.id,l),e.haveCallback&&l.attr("class",l.attr("class")+" clickable"),l}(0,h.eW)(ed,"insertNode");var ec=(0,h.eW)((t,e)=>{eo.set(e.id,t)},"setNodeElem"),eg=(0,h.eW)(()=>{eo.clear()},"clear"),ey=(0,h.eW)(t=>{let e=eo.get(t.id);h.cM.trace("Transforming node",t.diff,t,"translate("+(t.x-t.width/2-5)+", "+t.width/2+")");let a=t.diff||0;return t.clusterNode?e.attr("transform","translate("+(t.x+a-t.width/2)+", "+(t.y-t.height/2-8)+")"):e.attr("transform","translate("+t.x+", "+t.y+")"),a},"positionNode")}}]);
|