diff --git a/.editorconfig b/.editorconfig deleted file mode 100644 index 8e6ffe43..00000000 --- a/.editorconfig +++ /dev/null @@ -1,10 +0,0 @@ -root = true - -[*] -indent_style = space -indent_size = 2 -end_of_line = lf -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true -quote_type = single diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml deleted file mode 100644 index fe103ee4..00000000 --- a/.github/workflows/main.yml +++ /dev/null @@ -1,23 +0,0 @@ -name: CI - -on: - push: - branches: - - source - -jobs: - build: - runs-on: ubuntu-latest - - steps: - - run: | - curl -fsS \ - -H 'Accept: application/vnd.github.everest-preview+json' \ - -H 'Content-type: application/json' \ - -H "Authorization: Bearer $GH_PAT_ORG" \ - -X POST \ - -d '{"event_type":"build"}' \ - https://api.github.com/repos/$GH_REPO/dispatches - env: - GH_PAT_ORG: ${{ secrets.GH_PAT_ORG }} - GH_REPO: violentmonkey/violentmonkey-astro diff --git a/.gitignore b/.gitignore deleted file mode 100644 index a30da756..00000000 --- a/.gitignore +++ /dev/null @@ -1,9 +0,0 @@ -node_modules/ -.cache/ -public/ -*.log -.eslintcache -.gatsby-context.js -.idea -gatsby-starter-lumen.iml -.vercel diff --git a/.nojekyll b/.nojekyll new file mode 100644 index 00000000..e69de29b diff --git a/2017/03/14/How-to-edit-scripts-with-your-favorite-editor/index.html b/2017/03/14/How-to-edit-scripts-with-your-favorite-editor/index.html new file mode 100644 index 00000000..4ba28d86 --- /dev/null +++ b/2017/03/14/How-to-edit-scripts-with-your-favorite-editor/index.html @@ -0,0 +1 @@ +Redirecting to: /posts/how-to-edit-scripts-with-your-favorite-editor/ Redirecting from /2017/03/14/How-to-edit-scripts-with-your-favorite-editor/ to /posts/how-to-edit-scripts-with-your-favorite-editor/ \ No newline at end of file diff --git a/README.md b/README.md deleted file mode 100644 index 52f2dfad..00000000 --- a/README.md +++ /dev/null @@ -1,11 +0,0 @@ -# Violentmonkey - -This is the website of Violentmonkey. - -## Structure - -``` -└── content - ├── pages - └── posts # blog posts about Violentmonkey -``` diff --git a/_astro/ScrollIndicator.astro_astro_type_script_index_0_lang.CDfrq4y9.js b/_astro/ScrollIndicator.astro_astro_type_script_index_0_lang.CDfrq4y9.js new file mode 100644 index 00000000..3c225036 --- /dev/null +++ b/_astro/ScrollIndicator.astro_astro_type_script_index_0_lang.CDfrq4y9.js @@ -0,0 +1 @@ +import{o as r}from"./scroller.CbJqCWlR.js";const c=document.querySelector("[data-scroll-indicator]"),t=()=>{if(!c)return;const o=document.documentElement,l=document.body.scrollTop||o.scrollTop,e=o.scrollHeight-o.clientHeight,n=l/e,s=Math.min(1,n);c.style.scale=`${s} 1`};t();r(t); diff --git a/_astro/ToC.astro_astro_type_script_index_0_lang.Bre1WuXA.js b/_astro/ToC.astro_astro_type_script_index_0_lang.Bre1WuXA.js new file mode 100644 index 00000000..1a8c3f29 --- /dev/null +++ b/_astro/ToC.astro_astro_type_script_index_0_lang.Bre1WuXA.js @@ -0,0 +1 @@ +import{o as r}from"./scroller.CbJqCWlR.js";let e;r(()=>{const t=[...document.querySelectorAll(".toc li")].reverse().find(i=>{const c=i.querySelector("a")?.getAttribute("href"),o=(c?document.getElementById(c.slice(1)):void 0)?.getBoundingClientRect();return o&&o.top<=64});e!==t&&(e&&(e.className=""),e=t,e&&(e.className="active"))}); diff --git a/_astro/_baseUniq.CLojSEzq.js b/_astro/_baseUniq.CLojSEzq.js new file mode 100644 index 00000000..12f366e4 --- /dev/null +++ b/_astro/_baseUniq.CLojSEzq.js @@ -0,0 +1 @@ +import{aV as L,br as ln,aE as A,aT as P,bs as gn,bt as dn,aD as W,bu as hn,bv as z,bw as pn,bm as An,bx as m,aW as N,a$ as U,b2 as T,by as _n,aZ as on,bz as wn,bp as On,aF as V,bn as vn,bA as I}from"./mermaid.core.LbQlJBBQ.js";var Pn="[object Symbol]";function x(n){return typeof n=="symbol"||L(n)&&ln(n)==Pn}function yn(n,r){for(var e=-1,i=n==null?0:n.length,f=Array(i);++e-1}function M(n){return W(n)?gn(n):dn(n)}var Ln=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,xn=/^\w*$/;function $(n,r){if(A(n))return!1;var e=typeof n;return e=="number"||e=="symbol"||e=="boolean"||n==null||x(n)?!0:xn.test(n)||!Ln.test(n)||r!=null&&n in Object(r)}var Mn=500;function $n(n){var r=hn(n,function(i){return e.size===Mn&&e.clear(),i}),e=r.cache;return r}var Cn=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Dn=/\\(\\)?/g,Fn=$n(function(n){var r=[];return n.charCodeAt(0)===46&&r.push(""),n.replace(Cn,function(e,i,f,t){r.push(f?t.replace(Dn,"$1"):i||e)}),r});function Gn(n){return n==null?"":k(n)}function j(n,r){return A(n)?n:$(n,r)?[n]:Fn(Gn(n))}function R(n){if(typeof n=="string"||x(n))return n;var r=n+"";return r=="0"&&1/n==-1/0?"-0":r}function nn(n,r){r=j(r,n);for(var e=0,i=r.length;n!=null&&eu))return!1;var h=t.get(n),g=t.get(r);if(h&&g)return h==r&&g==n;var l=-1,d=!0,o=e&zn?new y:void 0;for(t.set(n,r),t.set(r,n);++l=Br){var h=r?null:Ur(n);if(h)return C(h);s=!1,f=tn,a=new y}else a=r?[]:u;n:for(;++i";inherits:false;initial-value:100%;}@property --un-border-opacity{syntax:"";inherits:false;initial-value:100%;}@property --un-bg-opacity{syntax:"";inherits:false;initial-value:100%;}@property --un-inset-ring-color{syntax:"*";inherits:false;}@property --un-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000;}@property --un-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000;}@property --un-inset-shadow-color{syntax:"*";inherits:false;}@property --un-ring-color{syntax:"*";inherits:false;}@property --un-ring-inset{syntax:"*";inherits:false;}@property --un-ring-offset-color{syntax:"*";inherits:false;}@property --un-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000;}@property --un-ring-offset-width{syntax:"";inherits:false;initial-value:0px;}@property --un-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000;}@property --un-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000;}@property --un-shadow-color{syntax:"*";inherits:false;}@property --un-shadow-opacity{syntax:"";inherits:false;initial-value:100%;}@property --un-translate-x{syntax:"*";inherits:false;initial-value:0;}@property --un-translate-y{syntax:"*";inherits:false;initial-value:0;}@property --un-translate-z{syntax:"*";inherits:false;initial-value:0;}@property --un-scale-x{syntax:"*";inherits:false;initial-value:1;}@property --un-scale-y{syntax:"*";inherits:false;initial-value:1;}@property --un-scale-z{syntax:"*";inherits:false;initial-value:1;}}@layer theme{:root,:host{--spacing: .25rem;--default-transition-timingFunction: cubic-bezier(.4, 0, .2, 1);--default-transition-duration: .15s;--radius-DEFAULT: .25rem;--leading-none: 1;--text-3xl-fontSize: 1.875rem;--text-3xl-lineHeight: 2.25rem;--text-2xl-fontSize: 1.5rem;--text-2xl-lineHeight: 2rem;--text-xl-fontSize: 1.25rem;--text-xl-lineHeight: 1.75rem;--text-sm-fontSize: .875rem;--text-sm-lineHeight: 1.25rem;--text-xs-fontSize: .75rem;--text-xs-lineHeight: 1rem;--radius-none: 0;--radius-xl: .75rem;--colors-gray-400: oklch(70.7% .022 261.325);--text-lg-fontSize: 1.125rem;--text-lg-lineHeight: 1.75rem;--text-4xl-fontSize: 2.25rem;--text-4xl-lineHeight: 2.5rem;--font-sans: ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-mono: ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--default-font-family: var(--font-sans);--default-monoFont-family: var(--font-mono)}}@layer base{*,:after,:before,::backdrop,::file-selector-button{box-sizing:border-box;margin:0;padding:0;border:0 solid}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;tab-size:4;font-family:var( --default-font-family, ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji" );font-feature-settings:var(--default-font-featureSettings, normal);font-variation-settings:var(--default-font-variationSettings, normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var( --default-monoFont-family, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace );font-feature-settings:var(--default-monoFont-featureSettings, normal);font-variation-settings:var(--default-monoFont-variationSettings, normal);font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea,::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;border-radius:0;background-color:transparent;opacity:1}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not (-webkit-appearance: -apple-pay-button)) or (contain-intrinsic-size: 1px){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit,::-webkit-datetime-edit-year-field,::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-hour-field,::-webkit-datetime-edit-minute-field,::-webkit-datetime-edit-second-field,::-webkit-datetime-edit-millisecond-field,::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]),::file-selector-button{appearance:button}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden~=until-found])){display:none!important}}@layer shortcuts{.container{width:100%}@media(min-width:40rem){.container{max-width:40rem}}@media(min-width:48rem){.container{max-width:48rem}}@media(min-width:64rem){.container{max-width:64rem}}@media(min-width:80rem){.container{max-width:80rem}}@media(min-width:96rem){.container{max-width:96rem}}}@layer default{.text-0{font-size:0}.text-2xl{font-size:var(--text-2xl-fontSize);line-height:var(--un-leading, var(--text-2xl-lineHeight))}.text-4xl{font-size:var(--text-4xl-fontSize);line-height:var(--un-leading, var(--text-4xl-lineHeight))}.text-lg{font-size:var(--text-lg-fontSize);line-height:var(--un-leading, var(--text-lg-lineHeight))}.text-sm{font-size:var(--text-sm-fontSize);line-height:var(--un-leading, var(--text-sm-lineHeight))}.text-code-foreground{color:color-mix(in srgb,var(--color-code-foreground) var(--un-text-opacity),transparent)}.text-foreground{color:color-mix(in srgb,var(--color-foreground) var(--un-text-opacity),transparent)}.text-muted-foreground{color:color-mix(in srgb,var(--color-muted-foreground) var(--un-text-opacity),transparent)}.text-primary,.hover\:text-primary:hover{color:color-mix(in srgb,var(--color-primary) var(--un-text-opacity),transparent)}.tab{-moz-tab-size:4;-o-tab-size:4;tab-size:4}.mx-2{margin-inline:calc(var(--spacing)*2)}.mx-auto{margin-inline:auto}.my-8{margin-block:calc(var(--spacing)*8)}.mb-20{margin-bottom:calc(var(--spacing)*20)}.mb-6{margin-bottom:calc(var(--spacing)*6)}.ml-2{margin-left:calc(var(--spacing)*2)}.mr-2{margin-right:calc(var(--spacing)*2)}.mt-0{margin-top:calc(var(--spacing)*0)}.mt-20{margin-top:calc(var(--spacing)*20)}.mt-8{margin-top:calc(var(--spacing)*8)}.p-2{padding:calc(var(--spacing)*2)}.p-4{padding:calc(var(--spacing)*4)}.p-6{padding:calc(var(--spacing)*6)}.px-4{padding-inline:calc(var(--spacing)*4)}.px-8{padding-inline:calc(var(--spacing)*8)}.py-2{padding-block:calc(var(--spacing)*2)}.pb-16{padding-bottom:calc(var(--spacing)*16)}.pt-8{padding-top:calc(var(--spacing)*8)}.text-center{text-align:center}.list-none{list-style-type:none}.border-b-2{border-bottom-width:2px}.border-r{border-right-width:1px}.border-t{border-top-width:1px}.border-border{border-color:color-mix(in srgb,var(--color-border) var(--un-border-opacity),transparent)}.border-gray-400{border-color:color-mix(in srgb,var(--colors-gray-400) var(--un-border-opacity),transparent)}.border-transparent{border-color:transparent}.rounded{border-radius:var(--radius-DEFAULT)}.rounded-b-none{border-bottom-left-radius:var(--radius-none);border-bottom-right-radius:var(--radius-none)}.rounded-t-xl{border-top-left-radius:var(--radius-xl);border-top-right-radius:var(--radius-xl)}.bg-background{background-color:color-mix(in srgb,var(--color-background) var(--un-bg-opacity),transparent)}.bg-muted{background-color:color-mix(in srgb,var(--color-muted) var(--un-bg-opacity),transparent)}.bg-progress{background-color:color-mix(in srgb,var(--color-progress) var(--un-bg-opacity),transparent)}.flex{display:flex}.flex-1{flex:1 1 0%}.flex-col{flex-direction:column}.gap-2{gap:calc(var(--spacing)*2)}.grid{display:grid}.grid-col-start-2{grid-column-start:2}.grid-col-start-3{grid-column-start:3}.grid-row-start-2{grid-row-start:2}.h-\[var\(--nav-height\)\]{height:var(--nav-height)}.h-4{height:calc(var(--spacing)*4)}.h-full{height:100%}.h-px{height:1px}.h1{height:calc(var(--spacing)*1)}.h2{height:calc(var(--spacing)*2)}.h3{height:calc(var(--spacing)*3)}.max-h-\[450px\]{max-height:450px}.max-w-\[320px\]{max-width:320px}.min-w-0{min-width:calc(var(--spacing)*0)}.w-\[var\(--aside-width\)\]{width:var(--aside-width)}.w-24{width:calc(var(--spacing)*24)}.w-4{width:calc(var(--spacing)*4)}.w-full{width:100%}.w-screen{width:100vw}.inline{display:inline}.block{display:block}.hidden{display:none}.visible{visibility:visible}.cursor-pointer{cursor:pointer}.uppercase{text-transform:uppercase}.lowercase{text-transform:lowercase}.font-italic,.italic{font-style:italic}.shadow{--un-shadow:0 1px 3px 0 var(--un-shadow-color, rgb(0 0 0 / .1)),0 1px 2px -1px var(--un-shadow-color, rgb(0 0 0 / .1));box-shadow:var(--un-inset-shadow),var(--un-inset-ring-shadow),var(--un-ring-offset-shadow),var(--un-ring-shadow),var(--un-shadow)}.shadow-foreground\/10{--un-shadow-color:color-mix(in srgb, var(--color-foreground) 10%, transparent) }.origin-left{transform-origin:left}.translate-0{--un-translate-x:calc(var(--spacing)*0);--un-translate-y:calc(var(--spacing)*0);translate:var(--un-translate-x) var(--un-translate-y)}.-translate-x-full{--un-translate-x:-100%;translate:var(--un-translate-x) var(--un-translate-y)}.translate-y-0{--un-translate-y:calc(var(--spacing)*0);translate:var(--un-translate-x) var(--un-translate-y)}.translate-y-full{--un-translate-y:100%;translate:var(--un-translate-x) var(--un-translate-y)}.scale-x-0{--un-scale-x:0%;scale:var(--un-scale-x) var(--un-scale-y)}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--un-ease, var(--default-transition-timingFunction));transition-duration:var(--un-duration, var(--default-transition-duration))}.duration-300{--un-duration:.3s;transition-duration:.3s}.items-end{align-items:flex-end}.items-center{align-items:center}.bottom-0{bottom:calc(var(--spacing)*0)}.left-0{left:calc(var(--spacing)*0)}.left-full{left:100%}.right-0{right:calc(var(--spacing)*0)}.right-8{right:calc(var(--spacing)*8)}.top-\[var\(--nav-height\)\]{top:var(--nav-height)}.top-0{top:calc(var(--spacing)*0)}.justify-center{justify-content:center}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.sticky{position:sticky}.static{position:static}.z-0{z-index:0}.z-10{z-index:10}.z-20{z-index:20}.overflow-auto{overflow:auto}.overflow-y-auto{overflow-y:auto}.table{display:table}@supports (color: color-mix(in lab,red,red)){.border-gray-400{border-color:color-mix(in oklab,var(--colors-gray-400) var(--un-border-opacity),transparent)}}@media(min-width:40rem){.sm\:block{display:block}.sm\:hidden{display:none}}@media(min-width:64rem){.lg\:pb-6{padding-bottom:calc(var(--spacing)*6)}.lg\:border-none{--un-border-style:none;border-style:none}.lg\:grid-row-start-1{grid-row-start:1}.lg\:grid-row-end-3{grid-row-end:3}.lg\:max-h-\[calc\(100vh-var\(--nav-height\)\)\]{max-height:calc(100vh - var(--nav-height))}.lg\:hidden{display:none}.lg\:translate-x-0{--un-translate-x:calc(var(--spacing)*0);translate:var(--un-translate-x) var(--un-translate-y)}.lg\:transition-none{transition:none}.lg\:sticky{position:sticky}}}:root{--aside-width: 260px;--nav-height: 4rem;--color-primary: oklch(62.3% .214 259.815);--color-foreground: oklch(21% .034 264.665);--color-background: #fff;--color-border: oklch(87.2% .01 258.338);--color-muted: oklch(55.1% .027 264.364);--color-muted-foreground: oklch(44.6% .03 256.802);--color-code: oklch(92.8% .006 264.531);--color-code-foreground: oklch(62.7% .194 149.214);--color-code-highlighted: oklch(70.4% .191 22.216);--color-label: oklch(88.2% .059 254.128);--color-target: oklch(94.5% .129 101.54);--color-progress: oklch(79.5% .184 86.047)}@media(prefers-color-scheme:dark){:root{--color-foreground: oklch(90% .034 264.665);--color-background: oklch(15% .05 280);--color-border: oklch(30% .01 258.338);--color-muted: oklch(30% .027 264.364);--color-muted-foreground: oklch(70% .03 256.802);--color-code: oklch(25% .006 264.531);--color-code-foreground: oklch(62.7% .194 149.214);--color-code-highlighted: oklch(70.4% .191 22.216);--color-label: oklch(70% .059 254.128);--color-target: oklch(50% .129 101.54);--color-progress: oklch(79.5% .184 86.047)}}@layer shortcuts{.button{color:color-mix(in srgb,var(--color-primary) var(--un-text-opacity),transparent);padding-inline:calc(var(--spacing) * 8);padding-block:calc(var(--spacing) * 3);border-width:1px;border-color:currentColor;border-radius:calc(infinity * 1px);background-color:color-mix(in srgb,var(--color-background) var(--un-bg-opacity),transparent)}.button:hover{color:color-mix(in srgb,var(--color-primary) 90%,transparent)}@property --un-bg-opacity{syntax:"";inherits:false;initial-value:100%;}.button-primary{color:color-mix(in srgb,var(--color-background) var(--un-text-opacity),transparent);background-color:color-mix(in srgb,var(--color-primary) var(--un-bg-opacity),transparent)}@property --un-text-opacity{syntax:"";inherits:false;initial-value:100%;syntax:"";inherits:false;initial-value:100%;}.button-primary:hover{color:color-mix(in srgb,var(--color-background) var(--un-text-opacity),transparent);background-color:color-mix(in srgb,var(--color-primary) 90%,transparent)}@property --un-bg-opacity{syntax:"";inherits:false;initial-value:100%;syntax:"";inherits:false;initial-value:100%;}}p{margin-bottom:calc(var(--spacing) * 2)}hr{margin-inline:auto;margin-block:calc(var(--spacing) * 16);--un-border-style:none;border-style:none;background-color:color-mix(in srgb,var(--color-muted) var(--un-bg-opacity),transparent);width:calc(var(--spacing) * 25);height:2px}img{max-width:100%;display:block}blockquote{color:color-mix(in srgb,var(--color-muted-foreground) var(--un-text-opacity),transparent);margin-block:calc(var(--spacing) * 4);padding:calc(var(--spacing) * 2);padding-left:calc(var(--spacing) * 4);border-left-width:4px;border-color:currentColor;background-color:color-mix(in srgb,var(--color-muted) var(--un-bg-opacity),transparent)}blockquote>:last-child{margin-bottom:calc(var(--spacing) * 0)}ul,ol{margin-bottom:calc(var(--spacing) * 5);padding-left:calc(var(--spacing) * 10)}li{margin-bottom:calc(var(--spacing) * 2)}th,td{padding:.25ex 1ex;border-width:1px}nav a{color:inherit}nav a:hover,nav a:focus,nav a.active{color:color-mix(in srgb,var(--color-primary) var(--un-text-opacity),transparent);border-color:currentColor}nav .nav-icon{margin-right:calc(var(--spacing) * 2);cursor:pointer;position:relative}nav .nav-icon>svg{width:calc(var(--spacing) * 5);height:calc(var(--spacing) * 5);display:block;fill:currentColor}main{margin-inline:auto;padding-inline:calc(var(--spacing) * 4);display:flex;flex-direction:column;column-gap:calc(var(--spacing) * 8);row-gap:calc(var(--spacing) * 6);max-width:64rem}main>*{min-width:calc(var(--spacing) * 0)}@media(min-width:64rem){main{padding-inline:calc(var(--spacing) * 0)}}main.has-sidebar{grid-template-columns:var(--aside-width) 1fr var(--aside-width);max-width:80rem}@media(min-width:64rem){main.has-sidebar{display:grid}}article a:not([role=button]),.link{color:color-mix(in srgb,var(--color-primary) var(--un-text-opacity),transparent);text-decoration-line:underline}article a:not([role=button]):hover,.link:hover{color:color-mix(in srgb,var(--color-primary) 90%,transparent)}article h1,article h2,article h3,article h4,article h5,article h6{margin-top:calc(var(--spacing) * 8);margin-bottom:calc(var(--spacing) * 4);scroll-margin-top:var(--nav-height)}article h1:target,article h2:target,article h3:target,article h4:target,article h5:target,article h6:target{background-color:color-mix(in srgb,var(--color-target) var(--un-bg-opacity),transparent)}article h2{font-size:var(--text-3xl-fontSize);line-height:var(--un-leading, var(--text-3xl-lineHeight))}article h3{font-size:var(--text-2xl-fontSize);line-height:var(--un-leading, var(--text-2xl-lineHeight))}article h4{font-size:var(--text-xl-fontSize);line-height:var(--un-leading, var(--text-xl-lineHeight))}article ul{list-style-type:disc}article ol{list-style-type:decimal}.toc{--toc-depth: 0}@media(min-width:64rem){.toc{padding:calc(var(--spacing) * 4);max-height:calc(100vh - var(--nav-height));top:var(--nav-height);position:sticky;overflow-y:auto}}.toc ul{font-size:var(--text-sm-fontSize);line-height:var(--un-leading, var(--text-sm-lineHeight));padding:calc(var(--spacing) * 0);list-style-type:none}.toc li{margin-bottom:calc(var(--spacing) * 2);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding-left:calc(var(--toc-depth, 0)*16px)}.toc p{margin:calc(var(--spacing) * 0)}.toc a:not(:hover){color:color-mix(in srgb,var(--color-muted-foreground) var(--un-text-opacity),transparent)}.toc li.active a{color:color-mix(in srgb,var(--color-primary) var(--un-text-opacity),transparent)}:not(pre)>code{font-size:var(--text-sm-fontSize);line-height:var(--un-leading, var(--text-sm-lineHeight));color:color-mix(in srgb,var(--color-code-foreground) var(--un-text-opacity),transparent);padding:calc(var(--spacing) * 1);border-radius:var(--radius-DEFAULT);background-color:color-mix(in srgb,var(--color-code) var(--un-bg-opacity),transparent);overflow-wrap:break-word}a code{color:inherit}code[data-theme*=" "],code[data-theme*=" "] span{color:var(--shiki-light)}pre>code{background:var(--shiki-light-bg);margin-bottom:calc(var(--spacing) * 2);padding-inline:calc(var(--spacing) * 4);padding-block:calc(var(--spacing) * 2);border-width:1px;border-color:color-mix(in srgb,var(--color-border) var(--un-border-opacity),transparent);border-radius:var(--radius-DEFAULT);background-color:color-mix(in srgb,var(--color-code) var(--un-bg-opacity),transparent);overflow-x:auto}@media(prefers-color-scheme:dark){code[data-theme*=" "],code[data-theme*=" "] span{color:var(--shiki-dark)}pre>code{background:var(--shiki-dark-bg)}}code span.highlighted{margin-inline:calc(calc(var(--spacing) * 4) * -1);padding-inline:calc(var(--spacing) * 4);background-color:color-mix(in srgb,var(--color-foreground) 10%,transparent);display:block;position:relative}code span.highlighted:before{content:"";background-color:color-mix(in srgb,var(--color-code-highlighted) var(--un-bg-opacity),transparent);width:calc(var(--spacing) * 1);inset:calc(var(--spacing) * 0);position:absolute}.mermaid{overflow-x:auto}.button-list ul{list-style-type:none;display:flex;flex-wrap:wrap;gap:calc(var(--spacing) * 6)}.button-list li a{color:color-mix(in srgb,var(--color-foreground) 80%,transparent);padding:calc(var(--spacing) * 2);border-width:1px;border-color:transparent;border-radius:var(--radius-DEFAULT);text-decoration:none;display:flex;align-items:center}@property --un-text-opacity{syntax:"";inherits:false;initial-value:100%;syntax:"";inherits:false;initial-value:100%;}.button-list li a:hover{color:color-mix(in srgb,var(--color-foreground) var(--un-text-opacity),transparent);border-color:currentColor;text-decoration:none}.button-list li a img{margin-right:calc(var(--spacing) * 2);width:calc(var(--spacing) * 12);height:calc(var(--spacing) * 12)}.home-features ul{padding:calc(var(--spacing) * 0);list-style-type:none}@media(min-width:64rem){.home-features>ul{display:flex}}.home-features>ul>li{padding:calc(var(--spacing) * 4);flex:1 1 0%}.home-features>ul>li>ul{color:color-mix(in srgb,var(--color-muted-foreground) var(--un-text-opacity),transparent);margin-top:calc(var(--spacing) * 2);margin-bottom:calc(var(--spacing) * 0)}@property --un-text-opacity{syntax:"";inherits:false;initial-value:100%;}.home-features>ul>li li{margin-bottom:calc(var(--spacing) * 0)}.label{font-size:var(--text-xs-fontSize);line-height:var(--un-leading, var(--text-xs-lineHeight));--un-leading:var(--leading-none);line-height:var(--leading-none);margin-right:calc(var(--spacing) * 1);padding:calc(var(--spacing) * 1);border-width:1px;border-color:color-mix(in srgb,var(--color-label) var(--un-border-opacity),transparent);border-radius:var(--radius-DEFAULT);background-color:color-mix(in srgb,var(--color-label) 80%,transparent);display:inline-block}@property --un-leading{syntax:"*";inherits:false;}@property --un-border-opacity{syntax:"";inherits:false;initial-value:100%;}@property --un-bg-opacity{syntax:"";inherits:false;initial-value:100%;}@media(prefers-color-scheme:dark){.markdown-alert{--color-border-default: #30363d;--color-accent-fg: #58a6ff;--color-accent-emphasis: #1f6feb;--color-danger-fg: #f85149;--color-danger-emphasis: #da3633;--color-attention-fg: #d29922;--color-attention-emphasis: #9e6a03;--color-done-fg: #a371f7;--color-done-emphasis: #8957e5;--color-success-fg: #3fb950;--color-success-emphasis: #238636}}@media(prefers-color-scheme:light){.markdown-alert{--color-border-default: #d0d7de;--color-accent-fg: #0969da;--color-accent-emphasis: #0969da;--color-danger-fg: #d1242f;--color-danger-emphasis: #cf222e;--color-attention-fg: #9a6700;--color-attention-emphasis: #9a6700;--color-done-fg: #8250df;--color-done-emphasis: #8250df;--color-success-fg: #1a7f37;--color-success-emphasis: #1f883d}}.markdown-alert{border-left:.25em solid var(--borderColor-default, var(--color-border-default));color:inherit;margin-bottom:16px;padding:.5rem 1em}.markdown-alert>:last-child{margin-bottom:0!important}.markdown-alert .markdown-alert-title{align-items:center;display:flex;font-size:14px;font-weight:500;line-height:1}.markdown-alert .markdown-alert-title svg.octicon{margin-right:8px!important;margin-right:var(--base-size-8,8px)!important;fill:currentColor}.markdown-alert.markdown-alert-note{border-left-color:var(--borderColor-accent-emphasis,var(--color-accent-emphasis))}.markdown-alert.markdown-alert-note .markdown-alert-title{color:var(--color-accent-fg);color:var(--fgColor-accent,var(--color-accent-fg))}.markdown-alert.markdown-alert-tip{border-left-color:var(--borderColor-success-emphasis,var(--color-success-emphasis))}.markdown-alert.markdown-alert-tip .markdown-alert-title{color:var(--color-success-fg);color:var(--fgColor-success,var(--color-success-fg))}.markdown-alert.markdown-alert-important{border-left-color:var(--borderColor-done-emphasis,var(--color-done-emphasis))}.markdown-alert.markdown-alert-important .markdown-alert-title{color:var(--color-done-fg);color:var(--fgColor-done,var(--color-done-fg))}.markdown-alert.markdown-alert-warning{border-left-color:var(--borderColor-attention-emphasis,var(--color-attention-emphasis))}.markdown-alert.markdown-alert-warning .markdown-alert-title{color:var(--color-attention-fg);color:var(--fgColor-attention,var(--color-attention-fg))}.markdown-alert.markdown-alert-caution{border-left-color:var(--borderColor-danger-emphasis,var(--color-danger-emphasis))}.markdown-alert.markdown-alert-caution .markdown-alert-title{color:var(--color-danger-fg);color:var(--fgColor-danger,var(--color-danger-fg))}.discord-panel[data-astro-cid-mahorubk]{display:flex;flex-direction:column;width:100%;height:100%;max-width:320px;max-height:450px;--un-translate-y:100%;translate:var(--un-translate-x) var(--un-translate-y);transition-property:transform,translate,scale,rotate;transition-timing-function:var(--un-ease, var(--default-transition-timingFunction));transition-duration:var(--un-duration, var(--default-transition-duration));--un-duration:.3s;transition-duration:.3s;align-items:flex-end;bottom:calc(var(--spacing) * 0);right:calc(var(--spacing) * 0);position:fixed;z-index:10}.discord-open[data-astro-cid-mahorubk]>.discord-panel[data-astro-cid-mahorubk]{--un-translate-y:calc(var(--spacing) * 0);translate:var(--un-translate-x) var(--un-translate-y)}.discord-button[data-astro-cid-mahorubk]{padding-inline:calc(var(--spacing) * 8);padding-block:calc(var(--spacing) * 2);border-bottom-left-radius:var(--radius-none);border-bottom-right-radius:var(--radius-none);border-top-left-radius:var(--radius-xl);border-top-right-radius:var(--radius-xl);cursor:pointer;text-transform:uppercase;transition-property:transform,translate,scale,rotate;transition-timing-function:var(--un-ease, var(--default-transition-timingFunction));transition-duration:var(--un-duration, var(--default-transition-duration));--un-duration:.3s;transition-duration:.3s;bottom:calc(var(--spacing) * 0);right:calc(var(--spacing) * 8);position:fixed}.discord-open[data-astro-cid-mahorubk]>.discord-button[data-astro-cid-mahorubk]{--un-translate-y:100%;translate:var(--un-translate-x) var(--un-translate-y)}@property --un-translate-x{syntax:"*";inherits:false;initial-value:0;}@property --un-translate-y{syntax:"*";inherits:false;initial-value:0;}@property --un-translate-z{syntax:"*";inherits:false;initial-value:0;} diff --git a/_astro/arc.DI4loXX0.js b/_astro/arc.DI4loXX0.js new file mode 100644 index 00000000..a1c579d0 --- /dev/null +++ b/_astro/arc.DI4loXX0.js @@ -0,0 +1 @@ +import{a0 as ln,a1 as an,a2 as H,a3 as q,a4 as B,a5 as un,a6 as y,a7 as tn,a8 as L,a9 as _,aa as rn,ab as o,ac as sn,ad as on,ae as fn}from"./mermaid.core.LbQlJBBQ.js";function cn(l){return l.innerRadius}function yn(l){return l.outerRadius}function gn(l){return l.startAngle}function dn(l){return l.endAngle}function mn(l){return l&&l.padAngle}function pn(l,h,I,D,v,A,C,a){var O=I-l,i=D-h,n=C-v,d=a-A,u=d*O-n*i;if(!(u*ur*r+G*G&&(j=w,z=p),{cx:j,cy:z,x01:-n,y01:-d,x11:j*(v/T-1),y11:z*(v/T-1)}}function hn(){var l=cn,h=yn,I=B(0),D=null,v=gn,A=dn,C=mn,a=null,O=ln(i);function i(){var n,d,u=+l.apply(this,arguments),s=+h.apply(this,arguments),f=v.apply(this,arguments)-un,c=A.apply(this,arguments)-un,F=rn(c-f),t=c>f;if(a||(a=n=O()),sy))a.moveTo(0,0);else if(F>tn-y)a.moveTo(s*H(f),s*q(f)),a.arc(0,0,s,f,c,!t),u>y&&(a.moveTo(u*H(c),u*q(c)),a.arc(0,0,u,c,f,t));else{var m=f,g=c,R=f,T=c,P=F,S=F,j=C.apply(this,arguments)/2,z=j>y&&(D?+D.apply(this,arguments):L(u*u+s*s)),w=_(rn(s-u)/2,+I.apply(this,arguments)),p=w,x=w,e,r;if(z>y){var G=sn(z/u*q(j)),M=sn(z/s*q(j));(P-=G*2)>y?(G*=t?1:-1,R+=G,T-=G):(P=0,R=T=(f+c)/2),(S-=M*2)>y?(M*=t?1:-1,m+=M,g-=M):(S=0,m=g=(f+c)/2)}var J=s*H(m),K=s*q(m),N=u*H(T),Q=u*q(T);if(w>y){var U=s*H(g),V=s*q(g),X=u*H(R),Y=u*q(R),E;if(Fy?x>y?(e=W(X,Y,J,K,s,x,t),r=W(U,V,N,Q,s,x,t),a.moveTo(e.cx+e.x01,e.cy+e.y01),xy)||!(P>y)?a.lineTo(N,Q):p>y?(e=W(N,Q,U,V,u,-p,t),r=W(J,K,X,Y,u,-p,t),a.lineTo(e.cx+e.x01,e.cy+e.y01),po?(this.rect.x-=(this.labelWidth-o)/2,this.setWidth(this.labelWidth)):this.labelPosHorizontal=="right"&&this.setWidth(o+this.labelWidth)),this.labelHeight&&(this.labelPosVertical=="top"?(this.rect.y-=this.labelHeight,this.setHeight(s+this.labelHeight)):this.labelPosVertical=="center"&&this.labelHeight>s?(this.rect.y-=(this.labelHeight-s)/2,this.setHeight(this.labelHeight)):this.labelPosVertical=="bottom"&&this.setHeight(s+this.labelHeight))}}},i.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==h.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},i.prototype.transform=function(t){var o=this.rect.x;o>e.WORLD_BOUNDARY?o=e.WORLD_BOUNDARY:o<-e.WORLD_BOUNDARY&&(o=-e.WORLD_BOUNDARY);var s=this.rect.y;s>e.WORLD_BOUNDARY?s=e.WORLD_BOUNDARY:s<-e.WORLD_BOUNDARY&&(s=-e.WORLD_BOUNDARY);var c=new l(o,s),f=t.inverseTransformPoint(c);this.setLocation(f.x,f.y)},i.prototype.getLeft=function(){return this.rect.x},i.prototype.getRight=function(){return this.rect.x+this.rect.width},i.prototype.getTop=function(){return this.rect.y},i.prototype.getBottom=function(){return this.rect.y+this.rect.height},i.prototype.getParent=function(){return this.owner==null?null:this.owner.getParent()},M.exports=i}),(function(M,G,N){var d=N(0);function h(){}for(var a in d)h[a]=d[a];h.MAX_ITERATIONS=2500,h.DEFAULT_EDGE_LENGTH=50,h.DEFAULT_SPRING_STRENGTH=.45,h.DEFAULT_REPULSION_STRENGTH=4500,h.DEFAULT_GRAVITY_STRENGTH=.4,h.DEFAULT_COMPOUND_GRAVITY_STRENGTH=1,h.DEFAULT_GRAVITY_RANGE_FACTOR=3.8,h.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=1.5,h.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION=!0,h.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION=!0,h.DEFAULT_COOLING_FACTOR_INCREMENTAL=.3,h.COOLING_ADAPTATION_FACTOR=.33,h.ADAPTATION_LOWER_NODE_LIMIT=1e3,h.ADAPTATION_UPPER_NODE_LIMIT=5e3,h.MAX_NODE_DISPLACEMENT_INCREMENTAL=100,h.MAX_NODE_DISPLACEMENT=h.MAX_NODE_DISPLACEMENT_INCREMENTAL*3,h.MIN_REPULSION_DIST=h.DEFAULT_EDGE_LENGTH/10,h.CONVERGENCE_CHECK_PERIOD=100,h.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=.1,h.MIN_EDGE_LENGTH=1,h.GRID_CALCULATION_CHECK_PERIOD=10,M.exports=h}),(function(M,G,N){function d(h,a){h==null&&a==null?(this.x=0,this.y=0):(this.x=h,this.y=a)}d.prototype.getX=function(){return this.x},d.prototype.getY=function(){return this.y},d.prototype.setX=function(h){this.x=h},d.prototype.setY=function(h){this.y=h},d.prototype.getDifference=function(h){return new DimensionD(this.x-h.x,this.y-h.y)},d.prototype.getCopy=function(){return new d(this.x,this.y)},d.prototype.translate=function(h){return this.x+=h.width,this.y+=h.height,this},M.exports=d}),(function(M,G,N){var d=N(2),h=N(10),a=N(0),e=N(7),r=N(3),l=N(1),i=N(13),u=N(12),t=N(11);function o(c,f,T){d.call(this,T),this.estimatedSize=h.MIN_VALUE,this.margin=a.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=c,f!=null&&f instanceof e?this.graphManager=f:f!=null&&f instanceof Layout&&(this.graphManager=f.graphManager)}o.prototype=Object.create(d.prototype);for(var s in d)o[s]=d[s];o.prototype.getNodes=function(){return this.nodes},o.prototype.getEdges=function(){return this.edges},o.prototype.getGraphManager=function(){return this.graphManager},o.prototype.getParent=function(){return this.parent},o.prototype.getLeft=function(){return this.left},o.prototype.getRight=function(){return this.right},o.prototype.getTop=function(){return this.top},o.prototype.getBottom=function(){return this.bottom},o.prototype.isConnected=function(){return this.isConnected},o.prototype.add=function(c,f,T){if(f==null&&T==null){var g=c;if(this.graphManager==null)throw"Graph has no graph mgr!";if(this.getNodes().indexOf(g)>-1)throw"Node already in graph!";return g.owner=this,this.getNodes().push(g),g}else{var v=c;if(!(this.getNodes().indexOf(f)>-1&&this.getNodes().indexOf(T)>-1))throw"Source or target not in graph!";if(!(f.owner==T.owner&&f.owner==this))throw"Both owners must be this graph!";return f.owner!=T.owner?null:(v.source=f,v.target=T,v.isInterGraph=!1,this.getEdges().push(v),f.edges.push(v),T!=f&&T.edges.push(v),v)}},o.prototype.remove=function(c){var f=c;if(c instanceof r){if(f==null)throw"Node is null!";if(!(f.owner!=null&&f.owner==this))throw"Owner graph is invalid!";if(this.graphManager==null)throw"Owner graph manager is invalid!";for(var T=f.edges.slice(),g,v=T.length,L=0;L-1&&b>-1))throw"Source and/or target doesn't know this edge!";g.source.edges.splice(A,1),g.target!=g.source&&g.target.edges.splice(b,1);var F=g.source.owner.getEdges().indexOf(g);if(F==-1)throw"Not in owner's edge list!";g.source.owner.getEdges().splice(F,1)}},o.prototype.updateLeftTop=function(){for(var c=h.MAX_VALUE,f=h.MAX_VALUE,T,g,v,L=this.getNodes(),F=L.length,A=0;AT&&(c=T),f>g&&(f=g)}return c==h.MAX_VALUE?null:(L[0].getParent().paddingLeft!=null?v=L[0].getParent().paddingLeft:v=this.margin,this.left=f-v,this.top=c-v,new u(this.left,this.top))},o.prototype.updateBounds=function(c){for(var f=h.MAX_VALUE,T=-h.MAX_VALUE,g=h.MAX_VALUE,v=-h.MAX_VALUE,L,F,A,b,Z,U=this.nodes,K=U.length,D=0;DL&&(f=L),TA&&(g=A),vL&&(f=L),TA&&(g=A),v=this.nodes.length){var K=0;T.forEach(function(D){D.owner==c&&K++}),K==this.nodes.length&&(this.isConnected=!0)}},M.exports=o}),(function(M,G,N){var d,h=N(1);function a(e){d=N(6),this.layout=e,this.graphs=[],this.edges=[]}a.prototype.addRoot=function(){var e=this.layout.newGraph(),r=this.layout.newNode(null),l=this.add(e,r);return this.setRootGraph(l),this.rootGraph},a.prototype.add=function(e,r,l,i,u){if(l==null&&i==null&&u==null){if(e==null)throw"Graph is null!";if(r==null)throw"Parent node is null!";if(this.graphs.indexOf(e)>-1)throw"Graph already in this graph mgr!";if(this.graphs.push(e),e.parent!=null)throw"Already has a parent!";if(r.child!=null)throw"Already has a child!";return e.parent=r,r.child=e,e}else{u=l,i=r,l=e;var t=i.getOwner(),o=u.getOwner();if(!(t!=null&&t.getGraphManager()==this))throw"Source not in this graph mgr!";if(!(o!=null&&o.getGraphManager()==this))throw"Target not in this graph mgr!";if(t==o)return l.isInterGraph=!1,t.add(l,i,u);if(l.isInterGraph=!0,l.source=i,l.target=u,this.edges.indexOf(l)>-1)throw"Edge already in inter-graph edge list!";if(this.edges.push(l),!(l.source!=null&&l.target!=null))throw"Edge source and/or target is null!";if(!(l.source.edges.indexOf(l)==-1&&l.target.edges.indexOf(l)==-1))throw"Edge already in source and/or target incidency list!";return l.source.edges.push(l),l.target.edges.push(l),l}},a.prototype.remove=function(e){if(e instanceof d){var r=e;if(r.getGraphManager()!=this)throw"Graph not in this graph mgr";if(!(r==this.rootGraph||r.parent!=null&&r.parent.graphManager==this))throw"Invalid parent node!";var l=[];l=l.concat(r.getEdges());for(var i,u=l.length,t=0;t=e.getRight()?r[0]+=Math.min(e.getX()-a.getX(),a.getRight()-e.getRight()):e.getX()<=a.getX()&&e.getRight()>=a.getRight()&&(r[0]+=Math.min(a.getX()-e.getX(),e.getRight()-a.getRight())),a.getY()<=e.getY()&&a.getBottom()>=e.getBottom()?r[1]+=Math.min(e.getY()-a.getY(),a.getBottom()-e.getBottom()):e.getY()<=a.getY()&&e.getBottom()>=a.getBottom()&&(r[1]+=Math.min(a.getY()-e.getY(),e.getBottom()-a.getBottom()));var u=Math.abs((e.getCenterY()-a.getCenterY())/(e.getCenterX()-a.getCenterX()));e.getCenterY()===a.getCenterY()&&e.getCenterX()===a.getCenterX()&&(u=1);var t=u*r[0],o=r[1]/u;r[0]t)return r[0]=l,r[1]=s,r[2]=u,r[3]=U,!1;if(iu)return r[0]=o,r[1]=i,r[2]=b,r[3]=t,!1;if(lu?(r[0]=f,r[1]=T,n=!0):(r[0]=c,r[1]=s,n=!0):p===y&&(l>u?(r[0]=o,r[1]=s,n=!0):(r[0]=g,r[1]=T,n=!0)),-E===y?u>l?(r[2]=Z,r[3]=U,m=!0):(r[2]=b,r[3]=A,m=!0):E===y&&(u>l?(r[2]=F,r[3]=A,m=!0):(r[2]=K,r[3]=U,m=!0)),n&&m)return!1;if(l>u?i>t?(I=this.getCardinalDirection(p,y,4),w=this.getCardinalDirection(E,y,2)):(I=this.getCardinalDirection(-p,y,3),w=this.getCardinalDirection(-E,y,1)):i>t?(I=this.getCardinalDirection(-p,y,1),w=this.getCardinalDirection(-E,y,3)):(I=this.getCardinalDirection(p,y,2),w=this.getCardinalDirection(E,y,4)),!n)switch(I){case 1:W=s,R=l+-L/y,r[0]=R,r[1]=W;break;case 2:R=g,W=i+v*y,r[0]=R,r[1]=W;break;case 3:W=T,R=l+L/y,r[0]=R,r[1]=W;break;case 4:R=f,W=i+-v*y,r[0]=R,r[1]=W;break}if(!m)switch(w){case 1:q=A,x=u+-it/y,r[2]=x,r[3]=q;break;case 2:x=K,q=t+D*y,r[2]=x,r[3]=q;break;case 3:q=U,x=u+it/y,r[2]=x,r[3]=q;break;case 4:x=Z,q=t+-D*y,r[2]=x,r[3]=q;break}}return!1},h.getCardinalDirection=function(a,e,r){return a>e?r:1+r%4},h.getIntersection=function(a,e,r,l){if(l==null)return this.getIntersection2(a,e,r);var i=a.x,u=a.y,t=e.x,o=e.y,s=r.x,c=r.y,f=l.x,T=l.y,g=void 0,v=void 0,L=void 0,F=void 0,A=void 0,b=void 0,Z=void 0,U=void 0,K=void 0;return L=o-u,A=i-t,Z=t*u-i*o,F=T-c,b=s-f,U=f*c-s*T,K=L*b-F*A,K===0?null:(g=(A*U-b*Z)/K,v=(F*Z-L*U)/K,new d(g,v))},h.angleOfVector=function(a,e,r,l){var i=void 0;return a!==r?(i=Math.atan((l-e)/(r-a)),r=0){var T=(-s+Math.sqrt(s*s-4*o*c))/(2*o),g=(-s-Math.sqrt(s*s-4*o*c))/(2*o),v=null;return T>=0&&T<=1?[T]:g>=0&&g<=1?[g]:v}else return null},h.HALF_PI=.5*Math.PI,h.ONE_AND_HALF_PI=1.5*Math.PI,h.TWO_PI=2*Math.PI,h.THREE_PI=3*Math.PI,M.exports=h}),(function(M,G,N){function d(){}d.sign=function(h){return h>0?1:h<0?-1:0},d.floor=function(h){return h<0?Math.ceil(h):Math.floor(h)},d.ceil=function(h){return h<0?Math.floor(h):Math.ceil(h)},M.exports=d}),(function(M,G,N){function d(){}d.MAX_VALUE=2147483647,d.MIN_VALUE=-2147483648,M.exports=d}),(function(M,G,N){var d=(function(){function i(u,t){for(var o=0;o"u"?"undefined":d(a);return a==null||e!="object"&&e!="function"},M.exports=h}),(function(M,G,N){function d(s){if(Array.isArray(s)){for(var c=0,f=Array(s.length);c0&&c;){for(L.push(A[0]);L.length>0&&c;){var b=L[0];L.splice(0,1),v.add(b);for(var Z=b.getEdges(),g=0;g-1&&A.splice(it,1)}v=new Set,F=new Map}}return s},o.prototype.createDummyNodesForBendpoints=function(s){for(var c=[],f=s.source,T=this.graphManager.calcLowestCommonAncestor(s.source,s.target),g=0;g0){for(var T=this.edgeToDummyNodes.get(f),g=0;g=0&&c.splice(U,1);var K=F.getNeighborsList();K.forEach(function(n){if(f.indexOf(n)<0){var m=T.get(n),p=m-1;p==1&&b.push(n),T.set(n,p)}})}f=f.concat(b),(c.length==1||c.length==2)&&(g=!0,v=c[0])}return v},o.prototype.setGraphManager=function(s){this.graphManager=s},M.exports=o}),(function(M,G,N){function d(){}d.seed=1,d.x=0,d.nextDouble=function(){return d.x=Math.sin(d.seed++)*1e4,d.x-Math.floor(d.x)},M.exports=d}),(function(M,G,N){var d=N(5);function h(a,e){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}h.prototype.getWorldOrgX=function(){return this.lworldOrgX},h.prototype.setWorldOrgX=function(a){this.lworldOrgX=a},h.prototype.getWorldOrgY=function(){return this.lworldOrgY},h.prototype.setWorldOrgY=function(a){this.lworldOrgY=a},h.prototype.getWorldExtX=function(){return this.lworldExtX},h.prototype.setWorldExtX=function(a){this.lworldExtX=a},h.prototype.getWorldExtY=function(){return this.lworldExtY},h.prototype.setWorldExtY=function(a){this.lworldExtY=a},h.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},h.prototype.setDeviceOrgX=function(a){this.ldeviceOrgX=a},h.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},h.prototype.setDeviceOrgY=function(a){this.ldeviceOrgY=a},h.prototype.getDeviceExtX=function(){return this.ldeviceExtX},h.prototype.setDeviceExtX=function(a){this.ldeviceExtX=a},h.prototype.getDeviceExtY=function(){return this.ldeviceExtY},h.prototype.setDeviceExtY=function(a){this.ldeviceExtY=a},h.prototype.transformX=function(a){var e=0,r=this.lworldExtX;return r!=0&&(e=this.ldeviceOrgX+(a-this.lworldOrgX)*this.ldeviceExtX/r),e},h.prototype.transformY=function(a){var e=0,r=this.lworldExtY;return r!=0&&(e=this.ldeviceOrgY+(a-this.lworldOrgY)*this.ldeviceExtY/r),e},h.prototype.inverseTransformX=function(a){var e=0,r=this.ldeviceExtX;return r!=0&&(e=this.lworldOrgX+(a-this.ldeviceOrgX)*this.lworldExtX/r),e},h.prototype.inverseTransformY=function(a){var e=0,r=this.ldeviceExtY;return r!=0&&(e=this.lworldOrgY+(a-this.ldeviceOrgY)*this.lworldExtY/r),e},h.prototype.inverseTransformPoint=function(a){var e=new d(this.inverseTransformX(a.x),this.inverseTransformY(a.y));return e},M.exports=h}),(function(M,G,N){function d(t){if(Array.isArray(t)){for(var o=0,s=Array(t.length);oa.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*a.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(t-a.ADAPTATION_LOWER_NODE_LIMIT)/(a.ADAPTATION_UPPER_NODE_LIMIT-a.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-a.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=a.MAX_NODE_DISPLACEMENT_INCREMENTAL):(t>a.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(a.COOLING_ADAPTATION_FACTOR,1-(t-a.ADAPTATION_LOWER_NODE_LIMIT)/(a.ADAPTATION_UPPER_NODE_LIMIT-a.ADAPTATION_LOWER_NODE_LIMIT)*(1-a.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=a.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(this.getAllNodes().length*5,this.maxIterations),this.displacementThresholdPerNode=3*a.DEFAULT_EDGE_LENGTH/100,this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},i.prototype.calcSpringForces=function(){for(var t=this.getAllEdges(),o,s=0;s0&&arguments[0]!==void 0?arguments[0]:!0,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,s,c,f,T,g=this.getAllNodes(),v;if(this.useFRGridVariant)for(this.totalIterations%a.GRID_CALCULATION_CHECK_PERIOD==1&&t&&this.updateGrid(),v=new Set,s=0;sL||v>L)&&(t.gravitationForceX=-this.gravityConstant*f,t.gravitationForceY=-this.gravityConstant*T)):(L=o.getEstimatedSize()*this.compoundGravityRangeFactor,(g>L||v>L)&&(t.gravitationForceX=-this.gravityConstant*f*this.compoundGravityConstant,t.gravitationForceY=-this.gravityConstant*T*this.compoundGravityConstant))},i.prototype.isConverged=function(){var t,o=!1;return this.totalIterations>this.maxIterations/3&&(o=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),t=this.totalDisplacement=g.length||L>=g[0].length)){for(var F=0;Fi}}]),r})();M.exports=e}),(function(M,G,N){function d(){}d.svd=function(h){this.U=null,this.V=null,this.s=null,this.m=0,this.n=0,this.m=h.length,this.n=h[0].length;var a=Math.min(this.m,this.n);this.s=(function(Tt){for(var Ct=[];Tt-- >0;)Ct.push(0);return Ct})(Math.min(this.m+1,this.n)),this.U=(function(Tt){var Ct=function $t(bt){if(bt.length==0)return 0;for(var zt=[],St=0;St0;)Ct.push(0);return Ct})(this.n),r=(function(Tt){for(var Ct=[];Tt-- >0;)Ct.push(0);return Ct})(this.m),l=!0,i=Math.min(this.m-1,this.n),u=Math.max(0,Math.min(this.n-2,this.m)),t=0;t=0;E--)if(this.s[E]!==0){for(var y=E+1;y=0;V--){if((function(Tt,Ct){return Tt&&Ct})(V0;){var Q=void 0,It=void 0;for(Q=n-2;Q>=-1&&Q!==-1;Q--)if(Math.abs(e[Q])<=ht+_*(Math.abs(this.s[Q])+Math.abs(this.s[Q+1]))){e[Q]=0;break}if(Q===n-2)It=4;else{var Nt=void 0;for(Nt=n-1;Nt>=Q&&Nt!==Q;Nt--){var vt=(Nt!==n?Math.abs(e[Nt]):0)+(Nt!==Q+1?Math.abs(e[Nt-1]):0);if(Math.abs(this.s[Nt])<=ht+_*vt){this.s[Nt]=0;break}}Nt===Q?It=3:Nt===n-1?It=1:(It=2,Q=Nt)}switch(Q++,It){case 1:{var rt=e[n-2];e[n-2]=0;for(var gt=n-2;gt>=Q;gt--){var mt=d.hypot(this.s[gt],rt),At=this.s[gt]/mt,Ot=rt/mt;this.s[gt]=mt,gt!==Q&&(rt=-Ot*e[gt-1],e[gt-1]=At*e[gt-1]);for(var Et=0;Et=this.s[Q+1]);){var Lt=this.s[Q];if(this.s[Q]=this.s[Q+1],this.s[Q+1]=Lt,QMath.abs(a)?(e=a/h,e=Math.abs(h)*Math.sqrt(1+e*e)):a!=0?(e=h/a,e=Math.abs(a)*Math.sqrt(1+e*e)):e=0,e},M.exports=d}),(function(M,G,N){var d=(function(){function e(r,l){for(var i=0;i2&&arguments[2]!==void 0?arguments[2]:1,u=arguments.length>3&&arguments[3]!==void 0?arguments[3]:-1,t=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1;h(this,e),this.sequence1=r,this.sequence2=l,this.match_score=i,this.mismatch_penalty=u,this.gap_penalty=t,this.iMax=r.length+1,this.jMax=l.length+1,this.grid=new Array(this.iMax);for(var o=0;o=0;r--){var l=this.listeners[r];l.event===a&&l.callback===e&&this.listeners.splice(r,1)}},h.emit=function(a,e){for(var r=0;r{var G={45:((a,e,r)=>{var l={};l.layoutBase=r(551),l.CoSEConstants=r(806),l.CoSEEdge=r(767),l.CoSEGraph=r(880),l.CoSEGraphManager=r(578),l.CoSELayout=r(765),l.CoSENode=r(991),l.ConstraintHandler=r(902),a.exports=l}),806:((a,e,r)=>{var l=r(551).FDLayoutConstants;function i(){}for(var u in l)i[u]=l[u];i.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,i.DEFAULT_RADIAL_SEPARATION=l.DEFAULT_EDGE_LENGTH,i.DEFAULT_COMPONENT_SEPERATION=60,i.TILE=!0,i.TILING_PADDING_VERTICAL=10,i.TILING_PADDING_HORIZONTAL=10,i.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,i.ENFORCE_CONSTRAINTS=!0,i.APPLY_LAYOUT=!0,i.RELAX_MOVEMENT_ON_CONSTRAINTS=!0,i.TREE_REDUCTION_ON_INCREMENTAL=!0,i.PURE_INCREMENTAL=i.DEFAULT_INCREMENTAL,a.exports=i}),767:((a,e,r)=>{var l=r(551).FDLayoutEdge;function i(t,o,s){l.call(this,t,o,s)}i.prototype=Object.create(l.prototype);for(var u in l)i[u]=l[u];a.exports=i}),880:((a,e,r)=>{var l=r(551).LGraph;function i(t,o,s){l.call(this,t,o,s)}i.prototype=Object.create(l.prototype);for(var u in l)i[u]=l[u];a.exports=i}),578:((a,e,r)=>{var l=r(551).LGraphManager;function i(t){l.call(this,t)}i.prototype=Object.create(l.prototype);for(var u in l)i[u]=l[u];a.exports=i}),765:((a,e,r)=>{var l=r(551).FDLayout,i=r(578),u=r(880),t=r(991),o=r(767),s=r(806),c=r(902),f=r(551).FDLayoutConstants,T=r(551).LayoutConstants,g=r(551).Point,v=r(551).PointD,L=r(551).DimensionD,F=r(551).Layout,A=r(551).Integer,b=r(551).IGeometry,Z=r(551).LGraph,U=r(551).Transform,K=r(551).LinkedList;function D(){l.call(this),this.toBeTiled={},this.constraints={}}D.prototype=Object.create(l.prototype);for(var it in l)D[it]=l[it];D.prototype.newGraphManager=function(){var n=new i(this);return this.graphManager=n,n},D.prototype.newGraph=function(n){return new u(null,this.graphManager,n)},D.prototype.newNode=function(n){return new t(this.graphManager,n)},D.prototype.newEdge=function(n){return new o(null,null,n)},D.prototype.initParameters=function(){l.prototype.initParameters.call(this,arguments),this.isSubLayout||(s.DEFAULT_EDGE_LENGTH<10?this.idealEdgeLength=10:this.idealEdgeLength=s.DEFAULT_EDGE_LENGTH,this.useSmartIdealEdgeLengthCalculation=s.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.gravityConstant=f.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=f.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=f.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=f.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.prunedNodesAll=[],this.growTreeIterations=0,this.afterGrowthIterations=0,this.isTreeGrowing=!1,this.isGrowthFinished=!1)},D.prototype.initSpringEmbedder=function(){l.prototype.initSpringEmbedder.call(this),this.coolingCycle=0,this.maxCoolingCycle=this.maxIterations/f.CONVERGENCE_CHECK_PERIOD,this.finalTemperature=.04,this.coolingAdjuster=1},D.prototype.layout=function(){var n=T.DEFAULT_CREATE_BENDS_AS_NEEDED;return n&&(this.createBendpoints(),this.graphManager.resetAllEdges()),this.level=0,this.classicLayout()},D.prototype.classicLayout=function(){if(this.nodesWithGravity=this.calculateNodesToApplyGravitationTo(),this.graphManager.setAllNodesToApplyGravitation(this.nodesWithGravity),this.calcNoOfChildrenForAllNodes(),this.graphManager.calcLowestCommonAncestors(),this.graphManager.calcInclusionTreeDepths(),this.graphManager.getRoot().calcEstimatedSize(),this.calcIdealEdgeLengths(),this.incremental){if(s.TREE_REDUCTION_ON_INCREMENTAL){this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var m=new Set(this.getAllNodes()),p=this.nodesWithGravity.filter(function(I){return m.has(I)});this.graphManager.setAllNodesToApplyGravitation(p)}}else{var n=this.getFlatForest();if(n.length>0)this.positionNodesRadially(n);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var m=new Set(this.getAllNodes()),p=this.nodesWithGravity.filter(function(E){return m.has(E)});this.graphManager.setAllNodesToApplyGravitation(p),this.positionNodesRandomly()}}return Object.keys(this.constraints).length>0&&(c.handleConstraints(this),this.initConstraintVariables()),this.initSpringEmbedder(),s.APPLY_LAYOUT&&this.runSpringEmbedder(),!0},D.prototype.tick=function(){if(this.totalIterations++,this.totalIterations===this.maxIterations&&!this.isTreeGrowing&&!this.isGrowthFinished)if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;if(this.totalIterations%f.CONVERGENCE_CHECK_PERIOD==0&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.isConverged())if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;this.coolingCycle++,this.layoutQuality==0?this.coolingAdjuster=this.coolingCycle:this.layoutQuality==1&&(this.coolingAdjuster=this.coolingCycle/3),this.coolingFactor=Math.max(this.initialCoolingFactor-Math.pow(this.coolingCycle,Math.log(100*(this.initialCoolingFactor-this.finalTemperature))/Math.log(this.maxCoolingCycle))/100*this.coolingAdjuster,this.finalTemperature),this.animationPeriod=Math.ceil(this.initialAnimationPeriod*Math.sqrt(this.coolingFactor))}if(this.isTreeGrowing){if(this.growTreeIterations%10==0)if(this.prunedNodesAll.length>0){this.graphManager.updateBounds(),this.updateGrid(),this.growTree(this.prunedNodesAll),this.graphManager.resetAllNodesToApplyGravitation();var n=new Set(this.getAllNodes()),m=this.nodesWithGravity.filter(function(y){return n.has(y)});this.graphManager.setAllNodesToApplyGravitation(m),this.graphManager.updateBounds(),this.updateGrid(),s.PURE_INCREMENTAL?this.coolingFactor=f.DEFAULT_COOLING_FACTOR_INCREMENTAL/2:this.coolingFactor=f.DEFAULT_COOLING_FACTOR_INCREMENTAL}else this.isTreeGrowing=!1,this.isGrowthFinished=!0;this.growTreeIterations++}if(this.isGrowthFinished){if(this.isConverged())return!0;this.afterGrowthIterations%10==0&&(this.graphManager.updateBounds(),this.updateGrid()),s.PURE_INCREMENTAL?this.coolingFactor=f.DEFAULT_COOLING_FACTOR_INCREMENTAL/2*((100-this.afterGrowthIterations)/100):this.coolingFactor=f.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var p=!this.isTreeGrowing&&!this.isGrowthFinished,E=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(p,E),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},D.prototype.getPositionsData=function(){for(var n=this.graphManager.getAllNodes(),m={},p=0;p0&&this.updateDisplacements();for(var p=0;p0&&(E.fixedNodeWeight=I)}}if(this.constraints.relativePlacementConstraint){var w=new Map,R=new Map;if(this.dummyToNodeForVerticalAlignment=new Map,this.dummyToNodeForHorizontalAlignment=new Map,this.fixedNodesOnHorizontal=new Set,this.fixedNodesOnVertical=new Set,this.fixedNodeSet.forEach(function(O){n.fixedNodesOnHorizontal.add(O),n.fixedNodesOnVertical.add(O)}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var W=this.constraints.alignmentConstraint.vertical,p=0;p=2*O.length/3;_--)H=Math.floor(Math.random()*(_+1)),$=O[_],O[_]=O[H],O[H]=$;return O},this.nodesInRelativeHorizontal=[],this.nodesInRelativeVertical=[],this.nodeToRelativeConstraintMapHorizontal=new Map,this.nodeToRelativeConstraintMapVertical=new Map,this.nodeToTempPositionMapHorizontal=new Map,this.nodeToTempPositionMapVertical=new Map,this.constraints.relativePlacementConstraint.forEach(function(O){if(O.left){var H=w.has(O.left)?w.get(O.left):O.left,$=w.has(O.right)?w.get(O.right):O.right;n.nodesInRelativeHorizontal.includes(H)||(n.nodesInRelativeHorizontal.push(H),n.nodeToRelativeConstraintMapHorizontal.set(H,[]),n.dummyToNodeForVerticalAlignment.has(H)?n.nodeToTempPositionMapHorizontal.set(H,n.idToNodeMap.get(n.dummyToNodeForVerticalAlignment.get(H)[0]).getCenterX()):n.nodeToTempPositionMapHorizontal.set(H,n.idToNodeMap.get(H).getCenterX())),n.nodesInRelativeHorizontal.includes($)||(n.nodesInRelativeHorizontal.push($),n.nodeToRelativeConstraintMapHorizontal.set($,[]),n.dummyToNodeForVerticalAlignment.has($)?n.nodeToTempPositionMapHorizontal.set($,n.idToNodeMap.get(n.dummyToNodeForVerticalAlignment.get($)[0]).getCenterX()):n.nodeToTempPositionMapHorizontal.set($,n.idToNodeMap.get($).getCenterX())),n.nodeToRelativeConstraintMapHorizontal.get(H).push({right:$,gap:O.gap}),n.nodeToRelativeConstraintMapHorizontal.get($).push({left:H,gap:O.gap})}else{var _=R.has(O.top)?R.get(O.top):O.top,ht=R.has(O.bottom)?R.get(O.bottom):O.bottom;n.nodesInRelativeVertical.includes(_)||(n.nodesInRelativeVertical.push(_),n.nodeToRelativeConstraintMapVertical.set(_,[]),n.dummyToNodeForHorizontalAlignment.has(_)?n.nodeToTempPositionMapVertical.set(_,n.idToNodeMap.get(n.dummyToNodeForHorizontalAlignment.get(_)[0]).getCenterY()):n.nodeToTempPositionMapVertical.set(_,n.idToNodeMap.get(_).getCenterY())),n.nodesInRelativeVertical.includes(ht)||(n.nodesInRelativeVertical.push(ht),n.nodeToRelativeConstraintMapVertical.set(ht,[]),n.dummyToNodeForHorizontalAlignment.has(ht)?n.nodeToTempPositionMapVertical.set(ht,n.idToNodeMap.get(n.dummyToNodeForHorizontalAlignment.get(ht)[0]).getCenterY()):n.nodeToTempPositionMapVertical.set(ht,n.idToNodeMap.get(ht).getCenterY())),n.nodeToRelativeConstraintMapVertical.get(_).push({bottom:ht,gap:O.gap}),n.nodeToRelativeConstraintMapVertical.get(ht).push({top:_,gap:O.gap})}});else{var q=new Map,V=new Map;this.constraints.relativePlacementConstraint.forEach(function(O){if(O.left){var H=w.has(O.left)?w.get(O.left):O.left,$=w.has(O.right)?w.get(O.right):O.right;q.has(H)?q.get(H).push($):q.set(H,[$]),q.has($)?q.get($).push(H):q.set($,[H])}else{var _=R.has(O.top)?R.get(O.top):O.top,ht=R.has(O.bottom)?R.get(O.bottom):O.bottom;V.has(_)?V.get(_).push(ht):V.set(_,[ht]),V.has(ht)?V.get(ht).push(_):V.set(ht,[_])}});var Y=function(H,$){var _=[],ht=[],Q=new K,It=new Set,Nt=0;return H.forEach(function(vt,rt){if(!It.has(rt)){_[Nt]=[],ht[Nt]=!1;var gt=rt;for(Q.push(gt),It.add(gt),_[Nt].push(gt);Q.length!=0;){gt=Q.shift(),$.has(gt)&&(ht[Nt]=!0);var mt=H.get(gt);mt.forEach(function(At){It.has(At)||(Q.push(At),It.add(At),_[Nt].push(At))})}Nt++}}),{components:_,isFixed:ht}},et=Y(q,n.fixedNodesOnHorizontal);this.componentsOnHorizontal=et.components,this.fixedComponentsOnHorizontal=et.isFixed;var z=Y(V,n.fixedNodesOnVertical);this.componentsOnVertical=z.components,this.fixedComponentsOnVertical=z.isFixed}}},D.prototype.updateDisplacements=function(){var n=this;if(this.constraints.fixedNodeConstraint&&this.constraints.fixedNodeConstraint.forEach(function(z){var O=n.idToNodeMap.get(z.nodeId);O.displacementX=0,O.displacementY=0}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var m=this.constraints.alignmentConstraint.vertical,p=0;p1){var R;for(R=0;RE&&(E=Math.floor(w.y)),I=Math.floor(w.x+s.DEFAULT_COMPONENT_SEPERATION)}this.transform(new v(T.WORLD_CENTER_X-w.x/2,T.WORLD_CENTER_Y-w.y/2))},D.radialLayout=function(n,m,p){var E=Math.max(this.maxDiagonalInTree(n),s.DEFAULT_RADIAL_SEPARATION);D.branchRadialLayout(m,null,0,359,0,E);var y=Z.calculateBounds(n),I=new U;I.setDeviceOrgX(y.getMinX()),I.setDeviceOrgY(y.getMinY()),I.setWorldOrgX(p.x),I.setWorldOrgY(p.y);for(var w=0;w1;){var $=H[0];H.splice(0,1);var _=V.indexOf($);_>=0&&V.splice(_,1),z--,Y--}m!=null?O=(V.indexOf(H[0])+1)%z:O=0;for(var ht=Math.abs(E-p)/Y,Q=O;et!=Y;Q=++Q%z){var It=V[Q].getOtherEnd(n);if(It!=m){var Nt=(p+et*ht)%360,vt=(Nt+ht)%360;D.branchRadialLayout(It,n,Nt,vt,y+I,I),et++}}},D.maxDiagonalInTree=function(n){for(var m=A.MIN_VALUE,p=0;pm&&(m=y)}return m},D.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},D.prototype.groupZeroDegreeMembers=function(){var n=this,m={};this.memberGroups={},this.idToDummyNode={};for(var p=[],E=this.graphManager.getAllNodes(),y=0;y"u"&&(m[R]=[]),m[R]=m[R].concat(I)}Object.keys(m).forEach(function(W){if(m[W].length>1){var x="DummyCompound_"+W;n.memberGroups[x]=m[W];var q=m[W][0].getParent(),V=new t(n.graphManager);V.id=x,V.paddingLeft=q.paddingLeft||0,V.paddingRight=q.paddingRight||0,V.paddingBottom=q.paddingBottom||0,V.paddingTop=q.paddingTop||0,n.idToDummyNode[x]=V;var Y=n.getGraphManager().add(n.newGraph(),V),et=q.getChild();et.add(V);for(var z=0;zy?(E.rect.x-=(E.labelWidth-y)/2,E.setWidth(E.labelWidth),E.labelMarginLeft=(E.labelWidth-y)/2):E.labelPosHorizontal=="right"&&E.setWidth(y+E.labelWidth)),E.labelHeight&&(E.labelPosVertical=="top"?(E.rect.y-=E.labelHeight,E.setHeight(I+E.labelHeight),E.labelMarginTop=E.labelHeight):E.labelPosVertical=="center"&&E.labelHeight>I?(E.rect.y-=(E.labelHeight-I)/2,E.setHeight(E.labelHeight),E.labelMarginTop=(E.labelHeight-I)/2):E.labelPosVertical=="bottom"&&E.setHeight(I+E.labelHeight))}})},D.prototype.repopulateCompounds=function(){for(var n=this.compoundOrder.length-1;n>=0;n--){var m=this.compoundOrder[n],p=m.id,E=m.paddingLeft,y=m.paddingTop,I=m.labelMarginLeft,w=m.labelMarginTop;this.adjustLocations(this.tiledMemberPack[p],m.rect.x,m.rect.y,E,y,I,w)}},D.prototype.repopulateZeroDegreeMembers=function(){var n=this,m=this.tiledZeroDegreePack;Object.keys(m).forEach(function(p){var E=n.idToDummyNode[p],y=E.paddingLeft,I=E.paddingTop,w=E.labelMarginLeft,R=E.labelMarginTop;n.adjustLocations(m[p],E.rect.x,E.rect.y,y,I,w,R)})},D.prototype.getToBeTiled=function(n){var m=n.id;if(this.toBeTiled[m]!=null)return this.toBeTiled[m];var p=n.getChild();if(p==null)return this.toBeTiled[m]=!1,!1;for(var E=p.getNodes(),y=0;y0)return this.toBeTiled[m]=!1,!1;if(I.getChild()==null){this.toBeTiled[I.id]=!1;continue}if(!this.getToBeTiled(I))return this.toBeTiled[m]=!1,!1}return this.toBeTiled[m]=!0,!0},D.prototype.getNodeDegree=function(n){n.id;for(var m=n.getEdges(),p=0,E=0;Eq&&(q=Y.rect.height)}p+=q+n.verticalPadding}},D.prototype.tileCompoundMembers=function(n,m){var p=this;this.tiledMemberPack=[],Object.keys(n).forEach(function(E){var y=m[E];if(p.tiledMemberPack[E]=p.tileNodes(n[E],y.paddingLeft+y.paddingRight),y.rect.width=p.tiledMemberPack[E].width,y.rect.height=p.tiledMemberPack[E].height,y.setCenter(p.tiledMemberPack[E].centerX,p.tiledMemberPack[E].centerY),y.labelMarginLeft=0,y.labelMarginTop=0,s.NODE_DIMENSIONS_INCLUDE_LABELS){var I=y.rect.width,w=y.rect.height;y.labelWidth&&(y.labelPosHorizontal=="left"?(y.rect.x-=y.labelWidth,y.setWidth(I+y.labelWidth),y.labelMarginLeft=y.labelWidth):y.labelPosHorizontal=="center"&&y.labelWidth>I?(y.rect.x-=(y.labelWidth-I)/2,y.setWidth(y.labelWidth),y.labelMarginLeft=(y.labelWidth-I)/2):y.labelPosHorizontal=="right"&&y.setWidth(I+y.labelWidth)),y.labelHeight&&(y.labelPosVertical=="top"?(y.rect.y-=y.labelHeight,y.setHeight(w+y.labelHeight),y.labelMarginTop=y.labelHeight):y.labelPosVertical=="center"&&y.labelHeight>w?(y.rect.y-=(y.labelHeight-w)/2,y.setHeight(y.labelHeight),y.labelMarginTop=(y.labelHeight-w)/2):y.labelPosVertical=="bottom"&&y.setHeight(w+y.labelHeight))}})},D.prototype.tileNodes=function(n,m){var p=this.tileNodesByFavoringDim(n,m,!0),E=this.tileNodesByFavoringDim(n,m,!1),y=this.getOrgRatio(p),I=this.getOrgRatio(E),w;return IR&&(R=z.getWidth())});var W=I/y,x=w/y,q=Math.pow(p-E,2)+4*(W+E)*(x+p)*y,V=(E-p+Math.sqrt(q))/(2*(W+E)),Y;m?(Y=Math.ceil(V),Y==V&&Y++):Y=Math.floor(V);var et=Y*(W+E)-E;return R>et&&(et=R),et+=E*2,et},D.prototype.tileNodesByFavoringDim=function(n,m,p){var E=s.TILING_PADDING_VERTICAL,y=s.TILING_PADDING_HORIZONTAL,I=s.TILING_COMPARE_BY,w={rows:[],rowWidth:[],rowHeight:[],width:0,height:m,verticalPadding:E,horizontalPadding:y,centerX:0,centerY:0};I&&(w.idealRowWidth=this.calcIdealRowWidth(n,p));var R=function(O){return O.rect.width*O.rect.height},W=function(O,H){return R(H)-R(O)};n.sort(function(z,O){var H=W;return w.idealRowWidth?(H=I,H(z.id,O.id)):H(z,O)});for(var x=0,q=0,V=0;V0&&(w+=n.horizontalPadding),n.rowWidth[p]=w,n.width0&&(R+=n.verticalPadding);var W=0;R>n.rowHeight[p]&&(W=n.rowHeight[p],n.rowHeight[p]=R,W=n.rowHeight[p]-W),n.height+=W,n.rows[p].push(m)},D.prototype.getShortestRowIndex=function(n){for(var m=-1,p=Number.MAX_VALUE,E=0;Ep&&(m=E,p=n.rowWidth[E]);return m},D.prototype.canAddHorizontal=function(n,m,p){if(n.idealRowWidth){var E=n.rows.length-1,y=n.rowWidth[E];return y+m+n.horizontalPadding<=n.idealRowWidth}var I=this.getShortestRowIndex(n);if(I<0)return!0;var w=n.rowWidth[I];if(w+n.horizontalPadding+m<=n.width)return!0;var R=0;n.rowHeight[I]0&&(R=p+n.verticalPadding-n.rowHeight[I]);var W;n.width-w>=m+n.horizontalPadding?W=(n.height+R)/(w+m+n.horizontalPadding):W=(n.height+R)/n.width,R=p+n.verticalPadding;var x;return n.widthI&&m!=p){E.splice(-1,1),n.rows[p].push(y),n.rowWidth[m]=n.rowWidth[m]-I,n.rowWidth[p]=n.rowWidth[p]+I,n.width=n.rowWidth[instance.getLongestRowIndex(n)];for(var w=Number.MIN_VALUE,R=0;Rw&&(w=E[R].height);m>0&&(w+=n.verticalPadding);var W=n.rowHeight[m]+n.rowHeight[p];n.rowHeight[m]=w,n.rowHeight[p]0)for(var et=y;et<=I;et++)Y[0]+=this.grid[et][w-1].length+this.grid[et][w].length-1;if(I0)for(var et=w;et<=R;et++)Y[3]+=this.grid[y-1][et].length+this.grid[y][et].length-1;for(var z=A.MAX_VALUE,O,H,$=0;${var l=r(551).FDLayoutNode,i=r(551).IMath;function u(o,s,c,f){l.call(this,o,s,c,f)}u.prototype=Object.create(l.prototype);for(var t in l)u[t]=l[t];u.prototype.calculateDisplacement=function(){var o=this.graphManager.getLayout();this.getChild()!=null&&this.fixedNodeWeight?(this.displacementX+=o.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.fixedNodeWeight,this.displacementY+=o.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.fixedNodeWeight):(this.displacementX+=o.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY+=o.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren),Math.abs(this.displacementX)>o.coolingFactor*o.maxNodeDisplacement&&(this.displacementX=o.coolingFactor*o.maxNodeDisplacement*i.sign(this.displacementX)),Math.abs(this.displacementY)>o.coolingFactor*o.maxNodeDisplacement&&(this.displacementY=o.coolingFactor*o.maxNodeDisplacement*i.sign(this.displacementY)),this.child&&this.child.getNodes().length>0&&this.propogateDisplacementToChildren(this.displacementX,this.displacementY)},u.prototype.propogateDisplacementToChildren=function(o,s){for(var c=this.getChild().getNodes(),f,T=0;T{function l(c){if(Array.isArray(c)){for(var f=0,T=Array(c.length);f0){var Lt=0;ot.forEach(function(st){B=="horizontal"?(tt.set(st,g.has(st)?v[g.get(st)]:k.get(st)),Lt+=tt.get(st)):(tt.set(st,g.has(st)?L[g.get(st)]:k.get(st)),Lt+=tt.get(st))}),Lt=Lt/ot.length,lt.forEach(function(st){J.has(st)||tt.set(st,Lt)})}else{var ft=0;lt.forEach(function(st){B=="horizontal"?ft+=g.has(st)?v[g.get(st)]:k.get(st):ft+=g.has(st)?L[g.get(st)]:k.get(st)}),ft=ft/lt.length,lt.forEach(function(st){tt.set(st,ft)})}});for(var Mt=function(){var ot=ut.shift(),Lt=P.get(ot);Lt.forEach(function(ft){if(tt.get(ft.id)st&&(st=kt),KtXt&&(Xt=Kt)}}catch(ee){Ct=!0,$t=ee}finally{try{!Tt&&bt.return&&bt.return()}finally{if(Ct)throw $t}}var fe=(Lt+st)/2-(ft+Xt)/2,Qt=!0,jt=!1,_t=void 0;try{for(var Jt=lt[Symbol.iterator](),ne;!(Qt=(ne=Jt.next()).done);Qt=!0){var te=ne.value;tt.set(te,tt.get(te)+fe)}}catch(ee){jt=!0,_t=ee}finally{try{!Qt&&Jt.return&&Jt.return()}finally{if(jt)throw _t}}})}return tt},it=function(P){var B=0,J=0,k=0,at=0;if(P.forEach(function(j){j.left?v[g.get(j.left)]-v[g.get(j.right)]>=0?B++:J++:L[g.get(j.top)]-L[g.get(j.bottom)]>=0?k++:at++}),B>J&&k>at)for(var ct=0;ctJ)for(var nt=0;ntat)for(var tt=0;tt1)f.fixedNodeConstraint.forEach(function(S,P){E[P]=[S.position.x,S.position.y],y[P]=[v[g.get(S.nodeId)],L[g.get(S.nodeId)]]}),I=!0;else if(f.alignmentConstraint)(function(){var S=0;if(f.alignmentConstraint.vertical){for(var P=f.alignmentConstraint.vertical,B=function(tt){var j=new Set;P[tt].forEach(function(pt){j.add(pt)});var ut=new Set([].concat(l(j)).filter(function(pt){return R.has(pt)})),Mt=void 0;ut.size>0?Mt=v[g.get(ut.values().next().value)]:Mt=K(j).x,P[tt].forEach(function(pt){E[S]=[Mt,L[g.get(pt)]],y[S]=[v[g.get(pt)],L[g.get(pt)]],S++})},J=0;J0?Mt=v[g.get(ut.values().next().value)]:Mt=K(j).y,k[tt].forEach(function(pt){E[S]=[v[g.get(pt)],Mt],y[S]=[v[g.get(pt)],L[g.get(pt)]],S++})},ct=0;ctV&&(V=q[et].length,Y=et);if(V0){var Et={x:0,y:0};f.fixedNodeConstraint.forEach(function(S,P){var B={x:v[g.get(S.nodeId)],y:L[g.get(S.nodeId)]},J=S.position,k=U(J,B);Et.x+=k.x,Et.y+=k.y}),Et.x/=f.fixedNodeConstraint.length,Et.y/=f.fixedNodeConstraint.length,v.forEach(function(S,P){v[P]+=Et.x}),L.forEach(function(S,P){L[P]+=Et.y}),f.fixedNodeConstraint.forEach(function(S){v[g.get(S.nodeId)]=S.position.x,L[g.get(S.nodeId)]=S.position.y})}if(f.alignmentConstraint){if(f.alignmentConstraint.vertical)for(var Dt=f.alignmentConstraint.vertical,Rt=function(P){var B=new Set;Dt[P].forEach(function(at){B.add(at)});var J=new Set([].concat(l(B)).filter(function(at){return R.has(at)})),k=void 0;J.size>0?k=v[g.get(J.values().next().value)]:k=K(B).x,B.forEach(function(at){R.has(at)||(v[g.get(at)]=k)})},Ht=0;Ht0?k=L[g.get(J.values().next().value)]:k=K(B).y,B.forEach(function(at){R.has(at)||(L[g.get(at)]=k)})},Ft=0;Ft{a.exports=M})},N={};function d(a){var e=N[a];if(e!==void 0)return e.exports;var r=N[a]={exports:{}};return G[a](r,r.exports,d),r.exports}var h=d(45);return h})()})})(he)),he.exports}var vr=se.exports,Oe;function pr(){return Oe||(Oe=1,(function(C,X){(function(G,N){C.exports=N(dr())})(vr,function(M){return(()=>{var G={658:(a=>{a.exports=Object.assign!=null?Object.assign.bind(Object):function(e){for(var r=arguments.length,l=Array(r>1?r-1:0),i=1;i{var l=(function(){function t(o,s){var c=[],f=!0,T=!1,g=void 0;try{for(var v=o[Symbol.iterator](),L;!(f=(L=v.next()).done)&&(c.push(L.value),!(s&&c.length===s));f=!0);}catch(F){T=!0,g=F}finally{try{!f&&v.return&&v.return()}finally{if(T)throw g}}return c}return function(o,s){if(Array.isArray(o))return o;if(Symbol.iterator in Object(o))return t(o,s);throw new TypeError("Invalid attempt to destructure non-iterable instance")}})(),i=r(140).layoutBase.LinkedList,u={};u.getTopMostNodes=function(t){for(var o={},s=0;s0&&I.merge(x)});for(var w=0;w1){L=g[0],F=L.connectedEdges().length,g.forEach(function(y){y.connectedEdges().length0&&c.set("dummy"+(c.size+1),Z),U},u.relocateComponent=function(t,o,s){if(!s.fixedNodeConstraint){var c=Number.POSITIVE_INFINITY,f=Number.NEGATIVE_INFINITY,T=Number.POSITIVE_INFINITY,g=Number.NEGATIVE_INFINITY;if(s.quality=="draft"){var v=!0,L=!1,F=void 0;try{for(var A=o.nodeIndexes[Symbol.iterator](),b;!(v=(b=A.next()).done);v=!0){var Z=b.value,U=l(Z,2),K=U[0],D=U[1],it=s.cy.getElementById(K);if(it){var n=it.boundingBox(),m=o.xCoords[D]-n.w/2,p=o.xCoords[D]+n.w/2,E=o.yCoords[D]-n.h/2,y=o.yCoords[D]+n.h/2;mf&&(f=p),Eg&&(g=y)}}}catch(x){L=!0,F=x}finally{try{!v&&A.return&&A.return()}finally{if(L)throw F}}var I=t.x-(f+c)/2,w=t.y-(g+T)/2;o.xCoords=o.xCoords.map(function(x){return x+I}),o.yCoords=o.yCoords.map(function(x){return x+w})}else{Object.keys(o).forEach(function(x){var q=o[x],V=q.getRect().x,Y=q.getRect().x+q.getRect().width,et=q.getRect().y,z=q.getRect().y+q.getRect().height;Vf&&(f=Y),etg&&(g=z)});var R=t.x-(f+c)/2,W=t.y-(g+T)/2;Object.keys(o).forEach(function(x){var q=o[x];q.setCenter(q.getCenterX()+R,q.getCenterY()+W)})}}},u.calcBoundingBox=function(t,o,s,c){for(var f=Number.MAX_SAFE_INTEGER,T=Number.MIN_SAFE_INTEGER,g=Number.MAX_SAFE_INTEGER,v=Number.MIN_SAFE_INTEGER,L=void 0,F=void 0,A=void 0,b=void 0,Z=t.descendants().not(":parent"),U=Z.length,K=0;KL&&(f=L),TA&&(g=A),v{var l=r(548),i=r(140).CoSELayout,u=r(140).CoSENode,t=r(140).layoutBase.PointD,o=r(140).layoutBase.DimensionD,s=r(140).layoutBase.LayoutConstants,c=r(140).layoutBase.FDLayoutConstants,f=r(140).CoSEConstants,T=function(v,L){var F=v.cy,A=v.eles,b=A.nodes(),Z=A.edges(),U=void 0,K=void 0,D=void 0,it={};v.randomize&&(U=L.nodeIndexes,K=L.xCoords,D=L.yCoords);var n=function(x){return typeof x=="function"},m=function(x,q){return n(x)?x(q):x},p=l.calcParentsWithoutChildren(F,A),E=function W(x,q,V,Y){for(var et=q.length,z=0;z0){var Q=void 0;Q=V.getGraphManager().add(V.newGraph(),$),W(Q,H,V,Y)}}},y=function(x,q,V){for(var Y=0,et=0,z=0;z0?f.DEFAULT_EDGE_LENGTH=c.DEFAULT_EDGE_LENGTH=Y/et:n(v.idealEdgeLength)?f.DEFAULT_EDGE_LENGTH=c.DEFAULT_EDGE_LENGTH=50:f.DEFAULT_EDGE_LENGTH=c.DEFAULT_EDGE_LENGTH=v.idealEdgeLength,f.MIN_REPULSION_DIST=c.MIN_REPULSION_DIST=c.DEFAULT_EDGE_LENGTH/10,f.DEFAULT_RADIAL_SEPARATION=c.DEFAULT_EDGE_LENGTH)},I=function(x,q){q.fixedNodeConstraint&&(x.constraints.fixedNodeConstraint=q.fixedNodeConstraint),q.alignmentConstraint&&(x.constraints.alignmentConstraint=q.alignmentConstraint),q.relativePlacementConstraint&&(x.constraints.relativePlacementConstraint=q.relativePlacementConstraint)};v.nestingFactor!=null&&(f.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=c.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=v.nestingFactor),v.gravity!=null&&(f.DEFAULT_GRAVITY_STRENGTH=c.DEFAULT_GRAVITY_STRENGTH=v.gravity),v.numIter!=null&&(f.MAX_ITERATIONS=c.MAX_ITERATIONS=v.numIter),v.gravityRange!=null&&(f.DEFAULT_GRAVITY_RANGE_FACTOR=c.DEFAULT_GRAVITY_RANGE_FACTOR=v.gravityRange),v.gravityCompound!=null&&(f.DEFAULT_COMPOUND_GRAVITY_STRENGTH=c.DEFAULT_COMPOUND_GRAVITY_STRENGTH=v.gravityCompound),v.gravityRangeCompound!=null&&(f.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=c.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=v.gravityRangeCompound),v.initialEnergyOnIncremental!=null&&(f.DEFAULT_COOLING_FACTOR_INCREMENTAL=c.DEFAULT_COOLING_FACTOR_INCREMENTAL=v.initialEnergyOnIncremental),v.tilingCompareBy!=null&&(f.TILING_COMPARE_BY=v.tilingCompareBy),v.quality=="proof"?s.QUALITY=2:s.QUALITY=0,f.NODE_DIMENSIONS_INCLUDE_LABELS=c.NODE_DIMENSIONS_INCLUDE_LABELS=s.NODE_DIMENSIONS_INCLUDE_LABELS=v.nodeDimensionsIncludeLabels,f.DEFAULT_INCREMENTAL=c.DEFAULT_INCREMENTAL=s.DEFAULT_INCREMENTAL=!v.randomize,f.ANIMATE=c.ANIMATE=s.ANIMATE=v.animate,f.TILE=v.tile,f.TILING_PADDING_VERTICAL=typeof v.tilingPaddingVertical=="function"?v.tilingPaddingVertical.call():v.tilingPaddingVertical,f.TILING_PADDING_HORIZONTAL=typeof v.tilingPaddingHorizontal=="function"?v.tilingPaddingHorizontal.call():v.tilingPaddingHorizontal,f.DEFAULT_INCREMENTAL=c.DEFAULT_INCREMENTAL=s.DEFAULT_INCREMENTAL=!0,f.PURE_INCREMENTAL=!v.randomize,s.DEFAULT_UNIFORM_LEAF_NODE_SIZES=v.uniformNodeDimensions,v.step=="transformed"&&(f.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,f.ENFORCE_CONSTRAINTS=!1,f.APPLY_LAYOUT=!1),v.step=="enforced"&&(f.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,f.ENFORCE_CONSTRAINTS=!0,f.APPLY_LAYOUT=!1),v.step=="cose"&&(f.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,f.ENFORCE_CONSTRAINTS=!1,f.APPLY_LAYOUT=!0),v.step=="all"&&(v.randomize?f.TRANSFORM_ON_CONSTRAINT_HANDLING=!0:f.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,f.ENFORCE_CONSTRAINTS=!0,f.APPLY_LAYOUT=!0),v.fixedNodeConstraint||v.alignmentConstraint||v.relativePlacementConstraint?f.TREE_REDUCTION_ON_INCREMENTAL=!1:f.TREE_REDUCTION_ON_INCREMENTAL=!0;var w=new i,R=w.newGraphManager();return E(R.addRoot(),l.getTopMostNodes(b),w,v),y(w,R,Z),I(w,v),w.runLayout(),it};a.exports={coseLayout:T}}),212:((a,e,r)=>{var l=(function(){function v(L,F){for(var A=0;A0)if(p){var I=t.getTopMostNodes(A.eles.nodes());if(D=t.connectComponents(b,A.eles,I),D.forEach(function(vt){var rt=vt.boundingBox();it.push({x:rt.x1+rt.w/2,y:rt.y1+rt.h/2})}),A.randomize&&D.forEach(function(vt){A.eles=vt,U.push(s(A))}),A.quality=="default"||A.quality=="proof"){var w=b.collection();if(A.tile){var R=new Map,W=[],x=[],q=0,V={nodeIndexes:R,xCoords:W,yCoords:x},Y=[];if(D.forEach(function(vt,rt){vt.edges().length==0&&(vt.nodes().forEach(function(gt,mt){w.merge(vt.nodes()[mt]),gt.isParent()||(V.nodeIndexes.set(vt.nodes()[mt].id(),q++),V.xCoords.push(vt.nodes()[0].position().x),V.yCoords.push(vt.nodes()[0].position().y))}),Y.push(rt))}),w.length>1){var et=w.boundingBox();it.push({x:et.x1+et.w/2,y:et.y1+et.h/2}),D.push(w),U.push(V);for(var z=Y.length-1;z>=0;z--)D.splice(Y[z],1),U.splice(Y[z],1),it.splice(Y[z],1)}}D.forEach(function(vt,rt){A.eles=vt,K.push(f(A,U[rt])),t.relocateComponent(it[rt],K[rt],A)})}else D.forEach(function(vt,rt){t.relocateComponent(it[rt],U[rt],A)});var O=new Set;if(D.length>1){var H=[],$=Z.filter(function(vt){return vt.css("display")=="none"});D.forEach(function(vt,rt){var gt=void 0;if(A.quality=="draft"&&(gt=U[rt].nodeIndexes),vt.nodes().not($).length>0){var mt={};mt.edges=[],mt.nodes=[];var At=void 0;vt.nodes().not($).forEach(function(Ot){if(A.quality=="draft")if(!Ot.isParent())At=gt.get(Ot.id()),mt.nodes.push({x:U[rt].xCoords[At]-Ot.boundingbox().w/2,y:U[rt].yCoords[At]-Ot.boundingbox().h/2,width:Ot.boundingbox().w,height:Ot.boundingbox().h});else{var Et=t.calcBoundingBox(Ot,U[rt].xCoords,U[rt].yCoords,gt);mt.nodes.push({x:Et.topLeftX,y:Et.topLeftY,width:Et.width,height:Et.height})}else K[rt][Ot.id()]&&mt.nodes.push({x:K[rt][Ot.id()].getLeft(),y:K[rt][Ot.id()].getTop(),width:K[rt][Ot.id()].getWidth(),height:K[rt][Ot.id()].getHeight()})}),vt.edges().forEach(function(Ot){var Et=Ot.source(),Dt=Ot.target();if(Et.css("display")!="none"&&Dt.css("display")!="none")if(A.quality=="draft"){var Rt=gt.get(Et.id()),Ht=gt.get(Dt.id()),Ut=[],Pt=[];if(Et.isParent()){var Ft=t.calcBoundingBox(Et,U[rt].xCoords,U[rt].yCoords,gt);Ut.push(Ft.topLeftX+Ft.width/2),Ut.push(Ft.topLeftY+Ft.height/2)}else Ut.push(U[rt].xCoords[Rt]),Ut.push(U[rt].yCoords[Rt]);if(Dt.isParent()){var Yt=t.calcBoundingBox(Dt,U[rt].xCoords,U[rt].yCoords,gt);Pt.push(Yt.topLeftX+Yt.width/2),Pt.push(Yt.topLeftY+Yt.height/2)}else Pt.push(U[rt].xCoords[Ht]),Pt.push(U[rt].yCoords[Ht]);mt.edges.push({startX:Ut[0],startY:Ut[1],endX:Pt[0],endY:Pt[1]})}else K[rt][Et.id()]&&K[rt][Dt.id()]&&mt.edges.push({startX:K[rt][Et.id()].getCenterX(),startY:K[rt][Et.id()].getCenterY(),endX:K[rt][Dt.id()].getCenterX(),endY:K[rt][Dt.id()].getCenterY()})}),mt.nodes.length>0&&(H.push(mt),O.add(rt))}});var _=m.packComponents(H,A.randomize).shifts;if(A.quality=="draft")U.forEach(function(vt,rt){var gt=vt.xCoords.map(function(At){return At+_[rt].dx}),mt=vt.yCoords.map(function(At){return At+_[rt].dy});vt.xCoords=gt,vt.yCoords=mt});else{var ht=0;O.forEach(function(vt){Object.keys(K[vt]).forEach(function(rt){var gt=K[vt][rt];gt.setCenter(gt.getCenterX()+_[ht].dx,gt.getCenterY()+_[ht].dy)}),ht++})}}}else{var E=A.eles.boundingBox();if(it.push({x:E.x1+E.w/2,y:E.y1+E.h/2}),A.randomize){var y=s(A);U.push(y)}A.quality=="default"||A.quality=="proof"?(K.push(f(A,U[0])),t.relocateComponent(it[0],K[0],A)):t.relocateComponent(it[0],U[0],A)}var Q=function(rt,gt){if(A.quality=="default"||A.quality=="proof"){typeof rt=="number"&&(rt=gt);var mt=void 0,At=void 0,Ot=rt.data("id");return K.forEach(function(Dt){Ot in Dt&&(mt={x:Dt[Ot].getRect().getCenterX(),y:Dt[Ot].getRect().getCenterY()},At=Dt[Ot])}),A.nodeDimensionsIncludeLabels&&(At.labelWidth&&(At.labelPosHorizontal=="left"?mt.x+=At.labelWidth/2:At.labelPosHorizontal=="right"&&(mt.x-=At.labelWidth/2)),At.labelHeight&&(At.labelPosVertical=="top"?mt.y+=At.labelHeight/2:At.labelPosVertical=="bottom"&&(mt.y-=At.labelHeight/2))),mt==null&&(mt={x:rt.position("x"),y:rt.position("y")}),{x:mt.x,y:mt.y}}else{var Et=void 0;return U.forEach(function(Dt){var Rt=Dt.nodeIndexes.get(rt.id());Rt!=null&&(Et={x:Dt.xCoords[Rt],y:Dt.yCoords[Rt]})}),Et==null&&(Et={x:rt.position("x"),y:rt.position("y")}),{x:Et.x,y:Et.y}}};if(A.quality=="default"||A.quality=="proof"||A.randomize){var It=t.calcParentsWithoutChildren(b,Z),Nt=Z.filter(function(vt){return vt.css("display")=="none"});A.eles=Z.not(Nt),Z.nodes().not(":parent").not(Nt).layoutPositions(F,A,Q),It.length>0&&It.forEach(function(vt){vt.position(Q(vt))})}else console.log("If randomize option is set to false, then quality option must be 'default' or 'proof'.")}}]),v})();a.exports=g}),657:((a,e,r)=>{var l=r(548),i=r(140).layoutBase.Matrix,u=r(140).layoutBase.SVD,t=function(s){var c=s.cy,f=s.eles,T=f.nodes(),g=f.nodes(":parent"),v=new Map,L=new Map,F=new Map,A=[],b=[],Z=[],U=[],K=[],D=[],it=[],n=[],m=void 0,p=1e8,E=1e-9,y=s.piTol,I=s.samplingType,w=s.nodeSeparation,R=void 0,W=function(){for(var P=0,B=0,J=!1;B=at;){nt=k[at++];for(var xt=A[nt],lt=0;ltut&&(ut=K[Lt],Mt=Lt)}return Mt},q=function(P){var B=void 0;if(P){B=Math.floor(Math.random()*m);for(var k=0;k=1)break;j=tt}for(var pt=0;pt=1)break;j=tt}for(var lt=0;lt0&&(B.isParent()?A[P].push(F.get(B.id())):A[P].push(B.id()))})});var Nt=function(P){var B=L.get(P),J=void 0;v.get(P).forEach(function(k){c.getElementById(k).isParent()?J=F.get(k):J=k,A[B].push(J),A[L.get(J)].push(P)})},vt=!0,rt=!1,gt=void 0;try{for(var mt=v.keys()[Symbol.iterator](),At;!(vt=(At=mt.next()).done);vt=!0){var Ot=At.value;Nt(Ot)}}catch(S){rt=!0,gt=S}finally{try{!vt&&mt.return&&mt.return()}finally{if(rt)throw gt}}m=L.size;var Et=void 0;if(m>2){R=m{var l=r(212),i=function(t){t&&t("layout","fcose",l)};typeof cytoscape<"u"&&i(cytoscape),a.exports=i}),140:(a=>{a.exports=M})},N={};function d(a){var e=N[a];if(e!==void 0)return e.exports;var r=N[a]={exports:{}};return G[a](r,r.exports,d),r.exports}var h=d(579);return h})()})})(se)),se.exports}var yr=pr();const Er=Be(yr);var De={L:"left",R:"right",T:"top",B:"bottom"},xe={L:dt(C=>`${C},${C/2} 0,${C} 0,0`,"L"),R:dt(C=>`0,${C/2} ${C},0 ${C},${C}`,"R"),T:dt(C=>`0,0 ${C},0 ${C/2},${C}`,"T"),B:dt(C=>`${C/2},0 ${C},${C} 0,${C}`,"B")},oe={L:dt((C,X)=>C-X+2,"L"),R:dt((C,X)=>C-2,"R"),T:dt((C,X)=>C-X+2,"T"),B:dt((C,X)=>C-2,"B")},mr=dt(function(C){return Wt(C)?C==="L"?"R":"L":C==="T"?"B":"T"},"getOppositeArchitectureDirection"),Ie=dt(function(C){const X=C;return X==="L"||X==="R"||X==="T"||X==="B"},"isArchitectureDirection"),Wt=dt(function(C){const X=C;return X==="L"||X==="R"},"isArchitectureDirectionX"),qt=dt(function(C){const X=C;return X==="T"||X==="B"},"isArchitectureDirectionY"),me=dt(function(C,X){const M=Wt(C)&&qt(X),G=qt(C)&&Wt(X);return M||G},"isArchitectureDirectionXY"),Tr=dt(function(C){const X=C[0],M=C[1],G=Wt(X)&&qt(M),N=qt(X)&&Wt(M);return G||N},"isArchitecturePairXY"),Nr=dt(function(C){return C!=="LL"&&C!=="RR"&&C!=="TT"&&C!=="BB"},"isValidArchitectureDirectionPair"),pe=dt(function(C,X){const M=`${C}${X}`;return Nr(M)?M:void 0},"getArchitectureDirectionPair"),Lr=dt(function([C,X],M){const G=M[0],N=M[1];return Wt(G)?qt(N)?[C+(G==="L"?-1:1),X+(N==="T"?1:-1)]:[C+(G==="L"?-1:1),X]:Wt(N)?[C+(N==="L"?1:-1),X+(G==="T"?1:-1)]:[C,X+(G==="T"?1:-1)]},"shiftPositionByArchitectureDirectionPair"),Cr=dt(function(C){return C==="LT"||C==="TL"?[1,1]:C==="BL"||C==="LB"?[1,-1]:C==="BR"||C==="RB"?[-1,-1]:[-1,1]},"getArchitectureDirectionXYFactors"),Ar=dt(function(C,X){return me(C,X)?"bend":Wt(C)?"horizontal":"vertical"},"getArchitectureDirectionAlignment"),Mr=dt(function(C){return C.type==="service"},"isArchitectureService"),wr=dt(function(C){return C.type==="junction"},"isArchitectureJunction"),Fe=dt(C=>C.data(),"edgeData"),ie=dt(C=>C.data(),"nodeData"),Or=ir.architecture,be=class{constructor(){this.nodes={},this.groups={},this.edges=[],this.registeredIds={},this.elements={},this.setAccTitle=qe,this.getAccTitle=Qe,this.setDiagramTitle=Je,this.getDiagramTitle=Ke,this.getAccDescription=je,this.setAccDescription=_e,this.clear()}static{dt(this,"ArchitectureDB")}clear(){this.nodes={},this.groups={},this.edges=[],this.registeredIds={},this.dataStructures=void 0,this.elements={},tr()}addService({id:C,icon:X,in:M,title:G,iconText:N}){if(this.registeredIds[C]!==void 0)throw new Error(`The service id [${C}] is already in use by another ${this.registeredIds[C]}`);if(M!==void 0){if(C===M)throw new Error(`The service [${C}] cannot be placed within itself`);if(this.registeredIds[M]===void 0)throw new Error(`The service [${C}]'s parent does not exist. Please make sure the parent is created before this service`);if(this.registeredIds[M]==="node")throw new Error(`The service [${C}]'s parent is not a group`)}this.registeredIds[C]="node",this.nodes[C]={id:C,type:"service",icon:X,iconText:N,title:G,edges:[],in:M}}getServices(){return Object.values(this.nodes).filter(Mr)}addJunction({id:C,in:X}){this.registeredIds[C]="node",this.nodes[C]={id:C,type:"junction",edges:[],in:X}}getJunctions(){return Object.values(this.nodes).filter(wr)}getNodes(){return Object.values(this.nodes)}getNode(C){return this.nodes[C]??null}addGroup({id:C,icon:X,in:M,title:G}){if(this.registeredIds?.[C]!==void 0)throw new Error(`The group id [${C}] is already in use by another ${this.registeredIds[C]}`);if(M!==void 0){if(C===M)throw new Error(`The group [${C}] cannot be placed within itself`);if(this.registeredIds?.[M]===void 0)throw new Error(`The group [${C}]'s parent does not exist. Please make sure the parent is created before this group`);if(this.registeredIds?.[M]==="node")throw new Error(`The group [${C}]'s parent is not a group`)}this.registeredIds[C]="group",this.groups[C]={id:C,icon:X,title:G,in:M}}getGroups(){return Object.values(this.groups)}addEdge({lhsId:C,rhsId:X,lhsDir:M,rhsDir:G,lhsInto:N,rhsInto:d,lhsGroup:h,rhsGroup:a,title:e}){if(!Ie(M))throw new Error(`Invalid direction given for left hand side of edge ${C}--${X}. Expected (L,R,T,B) got ${String(M)}`);if(!Ie(G))throw new Error(`Invalid direction given for right hand side of edge ${C}--${X}. Expected (L,R,T,B) got ${String(G)}`);if(this.nodes[C]===void 0&&this.groups[C]===void 0)throw new Error(`The left-hand id [${C}] does not yet exist. Please create the service/group before declaring an edge to it.`);if(this.nodes[X]===void 0&&this.groups[X]===void 0)throw new Error(`The right-hand id [${X}] does not yet exist. Please create the service/group before declaring an edge to it.`);const r=this.nodes[C].in,l=this.nodes[X].in;if(h&&r&&l&&r==l)throw new Error(`The left-hand id [${C}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);if(a&&r&&l&&r==l)throw new Error(`The right-hand id [${X}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);const i={lhsId:C,lhsDir:M,lhsInto:N,lhsGroup:h,rhsId:X,rhsDir:G,rhsInto:d,rhsGroup:a,title:e};this.edges.push(i),this.nodes[C]&&this.nodes[X]&&(this.nodes[C].edges.push(this.edges[this.edges.length-1]),this.nodes[X].edges.push(this.edges[this.edges.length-1]))}getEdges(){return this.edges}getDataStructures(){if(this.dataStructures===void 0){const C={},X=Object.entries(this.nodes).reduce((a,[e,r])=>(a[e]=r.edges.reduce((l,i)=>{const u=this.getNode(i.lhsId)?.in,t=this.getNode(i.rhsId)?.in;if(u&&t&&u!==t){const o=Ar(i.lhsDir,i.rhsDir);o!=="bend"&&(C[u]??={},C[u][t]=o,C[t]??={},C[t][u]=o)}if(i.lhsId===e){const o=pe(i.lhsDir,i.rhsDir);o&&(l[o]=i.rhsId)}else{const o=pe(i.rhsDir,i.lhsDir);o&&(l[o]=i.lhsId)}return l},{}),a),{}),M=Object.keys(X)[0],G={[M]:1},N=Object.keys(X).reduce((a,e)=>e===M?a:{...a,[e]:1},{}),d=dt(a=>{const e={[a]:[0,0]},r=[a];for(;r.length>0;){const l=r.shift();if(l){G[l]=1,delete N[l];const i=X[l],[u,t]=e[l];Object.entries(i).forEach(([o,s])=>{G[s]||(e[s]=Lr([u,t],o),r.push(s))})}}return e},"BFS"),h=[d(M)];for(;Object.keys(N).length>0;)h.push(d(Object.keys(N)[0]));this.dataStructures={adjList:X,spatialMaps:h,groupAlignments:C}}return this.dataStructures}setElementForId(C,X){this.elements[C]=X}getElementById(C){return this.elements[C]}getConfig(){return er({...Or,...rr().architecture})}getConfigField(C){return this.getConfig()[C]}},Dr=dt((C,X)=>{lr(C,X),C.groups.map(M=>X.addGroup(M)),C.services.map(M=>X.addService({...M,type:"service"})),C.junctions.map(M=>X.addJunction({...M,type:"junction"})),C.edges.map(M=>X.addEdge(M))},"populateDb"),Pe={parser:{yy:void 0},parse:dt(async C=>{const X=await fr("architecture",C);Re.debug(X);const M=Pe.parser?.yy;if(!(M instanceof be))throw new Error("parser.parser?.yy was not a ArchitectureDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");Dr(X,M)},"parse")},xr=dt(C=>` + .edge { + stroke-width: ${C.archEdgeWidth}; + stroke: ${C.archEdgeColor}; + fill: none; + } + + .arrow { + fill: ${C.archEdgeArrowColor}; + } + + .node-bkg { + fill: none; + stroke: ${C.archGroupBorderColor}; + stroke-width: ${C.archGroupBorderWidth}; + stroke-dasharray: 8; + } + .node-icon-text { + display: flex; + align-items: center; + } + + .node-icon-text > div { + color: #fff; + margin: 1px; + height: fit-content; + text-align: center; + overflow: hidden; + display: -webkit-box; + -webkit-box-orient: vertical; + } +`,"getStyles"),Ir=xr,re=dt(C=>`${C}`,"wrapIcon"),ae={prefix:"mermaid-architecture",height:80,width:80,icons:{database:{body:re('')},server:{body:re('')},disk:{body:re('')},internet:{body:re('')},cloud:{body:re('')},unknown:hr,blank:{body:re("")}}},Rr=dt(async function(C,X,M){const G=M.getConfigField("padding"),N=M.getConfigField("iconSize"),d=N/2,h=N/6,a=h/2;await Promise.all(X.edges().map(async e=>{const{source:r,sourceDir:l,sourceArrow:i,sourceGroup:u,target:t,targetDir:o,targetArrow:s,targetGroup:c,label:f}=Fe(e);let{x:T,y:g}=e[0].sourceEndpoint();const{x:v,y:L}=e[0].midpoint();let{x:F,y:A}=e[0].targetEndpoint();const b=G+4;if(u&&(Wt(l)?T+=l==="L"?-b:b:g+=l==="T"?-b:b+18),c&&(Wt(o)?F+=o==="L"?-b:b:A+=o==="T"?-b:b+18),!u&&M.getNode(r)?.type==="junction"&&(Wt(l)?T+=l==="L"?d:-d:g+=l==="T"?d:-d),!c&&M.getNode(t)?.type==="junction"&&(Wt(o)?F+=o==="L"?d:-d:A+=o==="T"?d:-d),e[0]._private.rscratch){const Z=C.insert("g");if(Z.insert("path").attr("d",`M ${T},${g} L ${v},${L} L${F},${A} `).attr("class","edge").attr("id",or(r,t,{prefix:"L"})),i){const U=Wt(l)?oe[l](T,h):T-a,K=qt(l)?oe[l](g,h):g-a;Z.insert("polygon").attr("points",xe[l](h)).attr("transform",`translate(${U},${K})`).attr("class","arrow")}if(s){const U=Wt(o)?oe[o](F,h):F-a,K=qt(o)?oe[o](A,h):A-a;Z.insert("polygon").attr("points",xe[o](h)).attr("transform",`translate(${U},${K})`).attr("class","arrow")}if(f){const U=me(l,o)?"XY":Wt(l)?"X":"Y";let K=0;U==="X"?K=Math.abs(T-F):U==="Y"?K=Math.abs(g-A)/1.5:K=Math.abs(T-F)/2;const D=Z.append("g");if(await Ee(D,f,{useHtmlLabels:!1,width:K,classes:"architecture-service-label"},ye()),D.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle"),U==="X")D.attr("transform","translate("+v+", "+L+")");else if(U==="Y")D.attr("transform","translate("+v+", "+L+") rotate(-90)");else if(U==="XY"){const it=pe(l,o);if(it&&Tr(it)){const n=D.node().getBoundingClientRect(),[m,p]=Cr(it);D.attr("dominant-baseline","auto").attr("transform",`rotate(${-1*m*p*45})`);const E=D.node().getBoundingClientRect();D.attr("transform",` + translate(${v}, ${L-n.height/2}) + translate(${m*E.width/2}, ${p*E.height/2}) + rotate(${-1*m*p*45}, 0, ${n.height/2}) + `)}}}}}))},"drawEdges"),Sr=dt(async function(C,X,M){const N=M.getConfigField("padding")*.75,d=M.getConfigField("fontSize"),a=M.getConfigField("iconSize")/2;await Promise.all(X.nodes().map(async e=>{const r=ie(e);if(r.type==="group"){const{h:l,w:i,x1:u,y1:t}=e.boundingBox(),o=C.append("rect");o.attr("id",`group-${r.id}`).attr("x",u+a).attr("y",t+a).attr("width",i).attr("height",l).attr("class","node-bkg");const s=C.append("g");let c=u,f=t;if(r.icon){const T=s.append("g");T.html(`${await ve(r.icon,{height:N,width:N,fallbackPrefix:ae.prefix})}`),T.attr("transform","translate("+(c+a+1)+", "+(f+a+1)+")"),c+=N,f+=d/2-1-2}if(r.label){const T=s.append("g");await Ee(T,r.label,{useHtmlLabels:!1,width:i,classes:"architecture-service-label"},ye()),T.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","start").attr("text-anchor","start"),T.attr("transform","translate("+(c+a+4)+", "+(f+a+2)+")")}M.setElementForId(r.id,o)}}))},"drawGroups"),Fr=dt(async function(C,X,M){const G=ye();for(const N of M){const d=X.append("g"),h=C.getConfigField("iconSize");if(N.title){const l=d.append("g");await Ee(l,N.title,{useHtmlLabels:!1,width:h*1.5,classes:"architecture-service-label"},G),l.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle"),l.attr("transform","translate("+h/2+", "+h+")")}const a=d.append("g");if(N.icon)a.html(`${await ve(N.icon,{height:h,width:h,fallbackPrefix:ae.prefix})}`);else if(N.iconText){a.html(`${await ve("blank",{height:h,width:h,fallbackPrefix:ae.prefix})}`);const u=a.append("g").append("foreignObject").attr("width",h).attr("height",h).append("div").attr("class","node-icon-text").attr("style",`height: ${h}px;`).append("div").html(ar(N.iconText,G)),t=parseInt(window.getComputedStyle(u.node(),null).getPropertyValue("font-size").replace(/\D/g,""))??16;u.attr("style",`-webkit-line-clamp: ${Math.floor((h-2)/t)};`)}else a.append("path").attr("class","node-bkg").attr("id","node-"+N.id).attr("d",`M0 ${h} v${-h} q0,-5 5,-5 h${h} q5,0 5,5 v${h} H0 Z`);d.attr("id",`service-${N.id}`).attr("class","architecture-service");const{width:e,height:r}=d.node().getBBox();N.width=e,N.height=r,C.setElementForId(N.id,d)}return 0},"drawServices"),br=dt(function(C,X,M){M.forEach(G=>{const N=X.append("g"),d=C.getConfigField("iconSize");N.append("g").append("rect").attr("id","node-"+G.id).attr("fill-opacity","0").attr("width",d).attr("height",d),N.attr("class","architecture-junction");const{width:a,height:e}=N._groups[0][0].getBBox();N.width=a,N.height=e,C.setElementForId(G.id,N)})},"drawJunctions");sr([{name:ae.prefix,icons:ae}]);Se.use(Er);function Ge(C,X,M){C.forEach(G=>{X.add({group:"nodes",data:{type:"service",id:G.id,icon:G.icon,label:G.title,parent:G.in,width:M.getConfigField("iconSize"),height:M.getConfigField("iconSize")},classes:"node-service"})})}dt(Ge,"addServices");function Ue(C,X,M){C.forEach(G=>{X.add({group:"nodes",data:{type:"junction",id:G.id,parent:G.in,width:M.getConfigField("iconSize"),height:M.getConfigField("iconSize")},classes:"node-junction"})})}dt(Ue,"addJunctions");function Ye(C,X){X.nodes().map(M=>{const G=ie(M);if(G.type==="group")return;G.x=M.position().x,G.y=M.position().y,C.getElementById(G.id).attr("transform","translate("+(G.x||0)+","+(G.y||0)+")")})}dt(Ye,"positionNodes");function Xe(C,X){C.forEach(M=>{X.add({group:"nodes",data:{type:"group",id:M.id,icon:M.icon,label:M.title,parent:M.in},classes:"node-group"})})}dt(Xe,"addGroups");function He(C,X){C.forEach(M=>{const{lhsId:G,rhsId:N,lhsInto:d,lhsGroup:h,rhsInto:a,lhsDir:e,rhsDir:r,rhsGroup:l,title:i}=M,u=me(M.lhsDir,M.rhsDir)?"segments":"straight",t={id:`${G}-${N}`,label:i,source:G,sourceDir:e,sourceArrow:d,sourceGroup:h,sourceEndpoint:e==="L"?"0 50%":e==="R"?"100% 50%":e==="T"?"50% 0":"50% 100%",target:N,targetDir:r,targetArrow:a,targetGroup:l,targetEndpoint:r==="L"?"0 50%":r==="R"?"100% 50%":r==="T"?"50% 0":"50% 100%"};X.add({group:"edges",data:t,classes:u})})}dt(He,"addEdges");function We(C,X,M){const G=dt((a,e)=>Object.entries(a).reduce((r,[l,i])=>{let u=0;const t=Object.entries(i);if(t.length===1)return r[l]=t[0][1],r;for(let o=0;o{const e={},r={};return Object.entries(a).forEach(([l,[i,u]])=>{const t=C.getNode(l)?.in??"default";e[u]??={},e[u][t]??=[],e[u][t].push(l),r[i]??={},r[i][t]??=[],r[i][t].push(l)}),{horiz:Object.values(G(e,"horizontal")).filter(l=>l.length>1),vert:Object.values(G(r,"vertical")).filter(l=>l.length>1)}}),[d,h]=N.reduce(([a,e],{horiz:r,vert:l})=>[[...a,...r],[...e,...l]],[[],[]]);return{horizontal:d,vertical:h}}dt(We,"getAlignments");function Ve(C,X){const M=[],G=dt(d=>`${d[0]},${d[1]}`,"posToStr"),N=dt(d=>d.split(",").map(h=>parseInt(h)),"strToPos");return C.forEach(d=>{const h=Object.fromEntries(Object.entries(d).map(([l,i])=>[G(i),l])),a=[G([0,0])],e={},r={L:[-1,0],R:[1,0],T:[0,1],B:[0,-1]};for(;a.length>0;){const l=a.shift();if(l){e[l]=1;const i=h[l];if(i){const u=N(l);Object.entries(r).forEach(([t,o])=>{const s=G([u[0]+o[0],u[1]+o[1]]),c=h[s];c&&!e[s]&&(a.push(s),M.push({[De[t]]:c,[De[mr(t)]]:i,gap:1.5*X.getConfigField("iconSize")}))})}}}}),M}dt(Ve,"getRelativeConstraints");function ze(C,X,M,G,N,{spatialMaps:d,groupAlignments:h}){return new Promise(a=>{const e=nr("body").append("div").attr("id","cy").attr("style","display:none"),r=Se({container:document.getElementById("cy"),style:[{selector:"edge",style:{"curve-style":"straight",label:"data(label)","source-endpoint":"data(sourceEndpoint)","target-endpoint":"data(targetEndpoint)"}},{selector:"edge.segments",style:{"curve-style":"segments","segment-weights":"0","segment-distances":[.5],"edge-distances":"endpoints","source-endpoint":"data(sourceEndpoint)","target-endpoint":"data(targetEndpoint)"}},{selector:"node",style:{"compound-sizing-wrt-labels":"include"}},{selector:"node[label]",style:{"text-valign":"bottom","text-halign":"center","font-size":`${N.getConfigField("fontSize")}px`}},{selector:".node-service",style:{label:"data(label)",width:"data(width)",height:"data(height)"}},{selector:".node-junction",style:{width:"data(width)",height:"data(height)"}},{selector:".node-group",style:{padding:`${N.getConfigField("padding")}px`}}],layout:{name:"grid",boundingBox:{x1:0,x2:100,y1:0,y2:100}}});e.remove(),Xe(M,r),Ge(C,r,N),Ue(X,r,N),He(G,r);const l=We(N,d,h),i=Ve(d,N),u=r.layout({name:"fcose",quality:"proof",styleEnabled:!1,animate:!1,nodeDimensionsIncludeLabels:!1,idealEdgeLength(t){const[o,s]=t.connectedNodes(),{parent:c}=ie(o),{parent:f}=ie(s);return c===f?1.5*N.getConfigField("iconSize"):.5*N.getConfigField("iconSize")},edgeElasticity(t){const[o,s]=t.connectedNodes(),{parent:c}=ie(o),{parent:f}=ie(s);return c===f?.45:.001},alignmentConstraint:l,relativePlacementConstraint:i});u.one("layoutstop",()=>{function t(o,s,c,f){let T,g;const{x:v,y:L}=o,{x:F,y:A}=s;g=(f-L+(v-c)*(L-A)/(v-F))/Math.sqrt(1+Math.pow((L-A)/(v-F),2)),T=Math.sqrt(Math.pow(f-L,2)+Math.pow(c-v,2)-Math.pow(g,2));const b=Math.sqrt(Math.pow(F-v,2)+Math.pow(A-L,2));T=T/b;let Z=(F-v)*(f-L)-(A-L)*(c-v);switch(!0){case Z>=0:Z=1;break;case Z<0:Z=-1;break}let U=(F-v)*(c-v)+(A-L)*(f-L);switch(!0){case U>=0:U=1;break;case U<0:U=-1;break}return g=Math.abs(g)*Z,T=T*U,{distances:g,weights:T}}dt(t,"getSegmentWeights"),r.startBatch();for(const o of Object.values(r.edges()))if(o.data?.()){const{x:s,y:c}=o.source().position(),{x:f,y:T}=o.target().position();if(s!==f&&c!==T){const g=o.sourceEndpoint(),v=o.targetEndpoint(),{sourceDir:L}=Fe(o),[F,A]=qt(L)?[g.x,v.y]:[v.x,g.y],{weights:b,distances:Z}=t(g,v,F,A);o.style("segment-distances",Z),o.style("segment-weights",b)}}r.endBatch(),u.run()}),u.run(),r.ready(t=>{Re.info("Ready",t),a(r)})})}dt(ze,"layoutArchitecture");var Pr=dt(async(C,X,M,G)=>{const N=G.db,d=N.getServices(),h=N.getJunctions(),a=N.getGroups(),e=N.getEdges(),r=N.getDataStructures(),l=ke(X),i=l.append("g");i.attr("class","architecture-edges");const u=l.append("g");u.attr("class","architecture-services");const t=l.append("g");t.attr("class","architecture-groups"),await Fr(N,u,d),br(N,u,h);const o=await ze(d,h,a,e,N,r);await Rr(i,o,N),await Sr(t,o,N),Ye(N,o),Ze(void 0,l,N.getConfigField("padding"),N.getConfigField("useMaxWidth"))},"draw"),Gr={draw:Pr},$r={parser:Pe,get db(){return new be},renderer:Gr,styles:Ir};export{$r as diagram}; diff --git a/_astro/blockDiagram-VD42YOAC.BtxH3WKO.js b/_astro/blockDiagram-VD42YOAC.BtxH3WKO.js new file mode 100644 index 00000000..d5be4565 --- /dev/null +++ b/_astro/blockDiagram-VD42YOAC.BtxH3WKO.js @@ -0,0 +1,122 @@ +import{g as oe}from"./chunk-FMBD7UC4.Tjciooq0.js";import{_ as d,E as rt,d as O,e as he,l as L,y as de,A as ge,c as R,ai as ue,R as pe,S as fe,O as xe,aj as j,ak as Wt,al as ye,u as $,k as be,am as we,an as xt,i as yt,ao as me}from"./mermaid.core.LbQlJBBQ.js";import{c as Le}from"./clone.DKHdMD-Z.js";import{G as Se}from"./graph.wNZOIPAH.js";import{c as ke}from"./channel.y7_wL4g7.js";import"./page._rMDHl_T.js";import"./_baseUniq.CLojSEzq.js";var bt=(function(){var e=d(function(D,y,g,f){for(g=g||{},f=D.length;f--;g[D[f]]=y);return g},"o"),t=[1,15],a=[1,7],i=[1,13],l=[1,14],s=[1,19],r=[1,16],n=[1,17],c=[1,18],u=[8,30],o=[8,10,21,28,29,30,31,39,43,46],x=[1,23],w=[1,24],b=[8,10,15,16,21,28,29,30,31,39,43,46],S=[8,10,15,16,21,27,28,29,30,31,39,43,46],v=[1,49],k={trace:d(function(){},"trace"),yy:{},symbols_:{error:2,spaceLines:3,SPACELINE:4,NL:5,separator:6,SPACE:7,EOF:8,start:9,BLOCK_DIAGRAM_KEY:10,document:11,stop:12,statement:13,link:14,LINK:15,START_LINK:16,LINK_LABEL:17,STR:18,nodeStatement:19,columnsStatement:20,SPACE_BLOCK:21,blockStatement:22,classDefStatement:23,cssClassStatement:24,styleStatement:25,node:26,SIZE:27,COLUMNS:28,"id-block":29,end:30,NODE_ID:31,nodeShapeNLabel:32,dirList:33,DIR:34,NODE_DSTART:35,NODE_DEND:36,BLOCK_ARROW_START:37,BLOCK_ARROW_END:38,classDef:39,CLASSDEF_ID:40,CLASSDEF_STYLEOPTS:41,DEFAULT:42,class:43,CLASSENTITY_IDS:44,STYLECLASS:45,style:46,STYLE_ENTITY_IDS:47,STYLE_DEFINITION_DATA:48,$accept:0,$end:1},terminals_:{2:"error",4:"SPACELINE",5:"NL",7:"SPACE",8:"EOF",10:"BLOCK_DIAGRAM_KEY",15:"LINK",16:"START_LINK",17:"LINK_LABEL",18:"STR",21:"SPACE_BLOCK",27:"SIZE",28:"COLUMNS",29:"id-block",30:"end",31:"NODE_ID",34:"DIR",35:"NODE_DSTART",36:"NODE_DEND",37:"BLOCK_ARROW_START",38:"BLOCK_ARROW_END",39:"classDef",40:"CLASSDEF_ID",41:"CLASSDEF_STYLEOPTS",42:"DEFAULT",43:"class",44:"CLASSENTITY_IDS",45:"STYLECLASS",46:"style",47:"STYLE_ENTITY_IDS",48:"STYLE_DEFINITION_DATA"},productions_:[0,[3,1],[3,2],[3,2],[6,1],[6,1],[6,1],[9,3],[12,1],[12,1],[12,2],[12,2],[11,1],[11,2],[14,1],[14,4],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[19,3],[19,2],[19,1],[20,1],[22,4],[22,3],[26,1],[26,2],[33,1],[33,2],[32,3],[32,4],[23,3],[23,3],[24,3],[25,3]],performAction:d(function(y,g,f,m,E,h,W){var p=h.length-1;switch(E){case 4:m.getLogger().debug("Rule: separator (NL) ");break;case 5:m.getLogger().debug("Rule: separator (Space) ");break;case 6:m.getLogger().debug("Rule: separator (EOF) ");break;case 7:m.getLogger().debug("Rule: hierarchy: ",h[p-1]),m.setHierarchy(h[p-1]);break;case 8:m.getLogger().debug("Stop NL ");break;case 9:m.getLogger().debug("Stop EOF ");break;case 10:m.getLogger().debug("Stop NL2 ");break;case 11:m.getLogger().debug("Stop EOF2 ");break;case 12:m.getLogger().debug("Rule: statement: ",h[p]),typeof h[p].length=="number"?this.$=h[p]:this.$=[h[p]];break;case 13:m.getLogger().debug("Rule: statement #2: ",h[p-1]),this.$=[h[p-1]].concat(h[p]);break;case 14:m.getLogger().debug("Rule: link: ",h[p],y),this.$={edgeTypeStr:h[p],label:""};break;case 15:m.getLogger().debug("Rule: LABEL link: ",h[p-3],h[p-1],h[p]),this.$={edgeTypeStr:h[p],label:h[p-1]};break;case 18:const I=parseInt(h[p]),Z=m.generateId();this.$={id:Z,type:"space",label:"",width:I,children:[]};break;case 23:m.getLogger().debug("Rule: (nodeStatement link node) ",h[p-2],h[p-1],h[p]," typestr: ",h[p-1].edgeTypeStr);const V=m.edgeStrToEdgeData(h[p-1].edgeTypeStr);this.$=[{id:h[p-2].id,label:h[p-2].label,type:h[p-2].type,directions:h[p-2].directions},{id:h[p-2].id+"-"+h[p].id,start:h[p-2].id,end:h[p].id,label:h[p-1].label,type:"edge",directions:h[p].directions,arrowTypeEnd:V,arrowTypeStart:"arrow_open"},{id:h[p].id,label:h[p].label,type:m.typeStr2Type(h[p].typeStr),directions:h[p].directions}];break;case 24:m.getLogger().debug("Rule: nodeStatement (abc88 node size) ",h[p-1],h[p]),this.$={id:h[p-1].id,label:h[p-1].label,type:m.typeStr2Type(h[p-1].typeStr),directions:h[p-1].directions,widthInColumns:parseInt(h[p],10)};break;case 25:m.getLogger().debug("Rule: nodeStatement (node) ",h[p]),this.$={id:h[p].id,label:h[p].label,type:m.typeStr2Type(h[p].typeStr),directions:h[p].directions,widthInColumns:1};break;case 26:m.getLogger().debug("APA123",this?this:"na"),m.getLogger().debug("COLUMNS: ",h[p]),this.$={type:"column-setting",columns:h[p]==="auto"?-1:parseInt(h[p])};break;case 27:m.getLogger().debug("Rule: id-block statement : ",h[p-2],h[p-1]),m.generateId(),this.$={...h[p-2],type:"composite",children:h[p-1]};break;case 28:m.getLogger().debug("Rule: blockStatement : ",h[p-2],h[p-1],h[p]);const at=m.generateId();this.$={id:at,type:"composite",label:"",children:h[p-1]};break;case 29:m.getLogger().debug("Rule: node (NODE_ID separator): ",h[p]),this.$={id:h[p]};break;case 30:m.getLogger().debug("Rule: node (NODE_ID nodeShapeNLabel separator): ",h[p-1],h[p]),this.$={id:h[p-1],label:h[p].label,typeStr:h[p].typeStr,directions:h[p].directions};break;case 31:m.getLogger().debug("Rule: dirList: ",h[p]),this.$=[h[p]];break;case 32:m.getLogger().debug("Rule: dirList: ",h[p-1],h[p]),this.$=[h[p-1]].concat(h[p]);break;case 33:m.getLogger().debug("Rule: nodeShapeNLabel: ",h[p-2],h[p-1],h[p]),this.$={typeStr:h[p-2]+h[p],label:h[p-1]};break;case 34:m.getLogger().debug("Rule: BLOCK_ARROW nodeShapeNLabel: ",h[p-3],h[p-2]," #3:",h[p-1],h[p]),this.$={typeStr:h[p-3]+h[p],label:h[p-2],directions:h[p-1]};break;case 35:case 36:this.$={type:"classDef",id:h[p-1].trim(),css:h[p].trim()};break;case 37:this.$={type:"applyClass",id:h[p-1].trim(),styleClass:h[p].trim()};break;case 38:this.$={type:"applyStyles",id:h[p-1].trim(),stylesStr:h[p].trim()};break}},"anonymous"),table:[{9:1,10:[1,2]},{1:[3]},{10:t,11:3,13:4,19:5,20:6,21:a,22:8,23:9,24:10,25:11,26:12,28:i,29:l,31:s,39:r,43:n,46:c},{8:[1,20]},e(u,[2,12],{13:4,19:5,20:6,22:8,23:9,24:10,25:11,26:12,11:21,10:t,21:a,28:i,29:l,31:s,39:r,43:n,46:c}),e(o,[2,16],{14:22,15:x,16:w}),e(o,[2,17]),e(o,[2,18]),e(o,[2,19]),e(o,[2,20]),e(o,[2,21]),e(o,[2,22]),e(b,[2,25],{27:[1,25]}),e(o,[2,26]),{19:26,26:12,31:s},{10:t,11:27,13:4,19:5,20:6,21:a,22:8,23:9,24:10,25:11,26:12,28:i,29:l,31:s,39:r,43:n,46:c},{40:[1,28],42:[1,29]},{44:[1,30]},{47:[1,31]},e(S,[2,29],{32:32,35:[1,33],37:[1,34]}),{1:[2,7]},e(u,[2,13]),{26:35,31:s},{31:[2,14]},{17:[1,36]},e(b,[2,24]),{10:t,11:37,13:4,14:22,15:x,16:w,19:5,20:6,21:a,22:8,23:9,24:10,25:11,26:12,28:i,29:l,31:s,39:r,43:n,46:c},{30:[1,38]},{41:[1,39]},{41:[1,40]},{45:[1,41]},{48:[1,42]},e(S,[2,30]),{18:[1,43]},{18:[1,44]},e(b,[2,23]),{18:[1,45]},{30:[1,46]},e(o,[2,28]),e(o,[2,35]),e(o,[2,36]),e(o,[2,37]),e(o,[2,38]),{36:[1,47]},{33:48,34:v},{15:[1,50]},e(o,[2,27]),e(S,[2,33]),{38:[1,51]},{33:52,34:v,38:[2,31]},{31:[2,15]},e(S,[2,34]),{38:[2,32]}],defaultActions:{20:[2,7],23:[2,14],50:[2,15],52:[2,32]},parseError:d(function(y,g){if(g.recoverable)this.trace(y);else{var f=new Error(y);throw f.hash=g,f}},"parseError"),parse:d(function(y){var g=this,f=[0],m=[],E=[null],h=[],W=this.table,p="",I=0,Z=0,V=2,at=1,ne=h.slice.call(arguments,1),z=Object.create(this.lexer),q={yy:{}};for(var gt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,gt)&&(q.yy[gt]=this.yy[gt]);z.setInput(y,q.yy),q.yy.lexer=z,q.yy.parser=this,typeof z.yylloc>"u"&&(z.yylloc={});var ut=z.yylloc;h.push(ut);var le=z.options&&z.options.ranges;typeof q.yy.parseError=="function"?this.parseError=q.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ce(P){f.length=f.length-2*P,E.length=E.length-P,h.length=h.length-P}d(ce,"popStack");function Nt(){var P;return P=m.pop()||z.lex()||at,typeof P!="number"&&(P instanceof Array&&(m=P,P=m.pop()),P=g.symbols_[P]||P),P}d(Nt,"lex");for(var F,J,H,pt,Q={},st,G,Tt,it;;){if(J=f[f.length-1],this.defaultActions[J]?H=this.defaultActions[J]:((F===null||typeof F>"u")&&(F=Nt()),H=W[J]&&W[J][F]),typeof H>"u"||!H.length||!H[0]){var ft="";it=[];for(st in W[J])this.terminals_[st]&&st>V&&it.push("'"+this.terminals_[st]+"'");z.showPosition?ft="Parse error on line "+(I+1)+`: +`+z.showPosition()+` +Expecting `+it.join(", ")+", got '"+(this.terminals_[F]||F)+"'":ft="Parse error on line "+(I+1)+": Unexpected "+(F==at?"end of input":"'"+(this.terminals_[F]||F)+"'"),this.parseError(ft,{text:z.match,token:this.terminals_[F]||F,line:z.yylineno,loc:ut,expected:it})}if(H[0]instanceof Array&&H.length>1)throw new Error("Parse Error: multiple actions possible at state: "+J+", token: "+F);switch(H[0]){case 1:f.push(F),E.push(z.yytext),h.push(z.yylloc),f.push(H[1]),F=null,Z=z.yyleng,p=z.yytext,I=z.yylineno,ut=z.yylloc;break;case 2:if(G=this.productions_[H[1]][1],Q.$=E[E.length-G],Q._$={first_line:h[h.length-(G||1)].first_line,last_line:h[h.length-1].last_line,first_column:h[h.length-(G||1)].first_column,last_column:h[h.length-1].last_column},le&&(Q._$.range=[h[h.length-(G||1)].range[0],h[h.length-1].range[1]]),pt=this.performAction.apply(Q,[p,Z,I,q.yy,H[1],E,h].concat(ne)),typeof pt<"u")return pt;G&&(f=f.slice(0,-1*G*2),E=E.slice(0,-1*G),h=h.slice(0,-1*G)),f.push(this.productions_[H[1]][0]),E.push(Q.$),h.push(Q._$),Tt=W[f[f.length-2]][f[f.length-1]],f.push(Tt);break;case 3:return!0}}return!0},"parse")},B=(function(){var D={EOF:1,parseError:d(function(g,f){if(this.yy.parser)this.yy.parser.parseError(g,f);else throw new Error(g)},"parseError"),setInput:d(function(y,g){return this.yy=g||this.yy||{},this._input=y,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:d(function(){var y=this._input[0];this.yytext+=y,this.yyleng++,this.offset++,this.match+=y,this.matched+=y;var g=y.match(/(?:\r\n?|\n).*/g);return g?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),y},"input"),unput:d(function(y){var g=y.length,f=y.split(/(?:\r\n?|\n)/g);this._input=y+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-g),this.offset-=g;var m=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),f.length-1&&(this.yylineno-=f.length-1);var E=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:f?(f.length===m.length?this.yylloc.first_column:0)+m[m.length-f.length].length-f[0].length:this.yylloc.first_column-g},this.options.ranges&&(this.yylloc.range=[E[0],E[0]+this.yyleng-g]),this.yyleng=this.yytext.length,this},"unput"),more:d(function(){return this._more=!0,this},"more"),reject:d(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:d(function(y){this.unput(this.match.slice(y))},"less"),pastInput:d(function(){var y=this.matched.substr(0,this.matched.length-this.match.length);return(y.length>20?"...":"")+y.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:d(function(){var y=this.match;return y.length<20&&(y+=this._input.substr(0,20-y.length)),(y.substr(0,20)+(y.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:d(function(){var y=this.pastInput(),g=new Array(y.length+1).join("-");return y+this.upcomingInput()+` +`+g+"^"},"showPosition"),test_match:d(function(y,g){var f,m,E;if(this.options.backtrack_lexer&&(E={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&&(E.yylloc.range=this.yylloc.range.slice(0))),m=y[0].match(/(?:\r\n?|\n).*/g),m&&(this.yylineno+=m.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:m?m[m.length-1].length-m[m.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+y[0].length},this.yytext+=y[0],this.match+=y[0],this.matches=y,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(y[0].length),this.matched+=y[0],f=this.performAction.call(this,this.yy,this,g,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),f)return f;if(this._backtrack){for(var h in E)this[h]=E[h];return!1}return!1},"test_match"),next:d(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var y,g,f,m;this._more||(this.yytext="",this.match="");for(var E=this._currentRules(),h=0;hg[0].length)){if(g=f,m=h,this.options.backtrack_lexer){if(y=this.test_match(f,E[h]),y!==!1)return y;if(this._backtrack){g=!1;continue}else return!1}else if(!this.options.flex)break}return g?(y=this.test_match(g,E[m]),y!==!1?y:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:d(function(){var g=this.next();return g||this.lex()},"lex"),begin:d(function(g){this.conditionStack.push(g)},"begin"),popState:d(function(){var g=this.conditionStack.length-1;return g>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:d(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:d(function(g){return g=this.conditionStack.length-1-Math.abs(g||0),g>=0?this.conditionStack[g]:"INITIAL"},"topState"),pushState:d(function(g){this.begin(g)},"pushState"),stateStackSize:d(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:d(function(g,f,m,E){switch(m){case 0:return g.getLogger().debug("Found block-beta"),10;case 1:return g.getLogger().debug("Found id-block"),29;case 2:return g.getLogger().debug("Found block"),10;case 3:g.getLogger().debug(".",f.yytext);break;case 4:g.getLogger().debug("_",f.yytext);break;case 5:return 5;case 6:return f.yytext=-1,28;case 7:return f.yytext=f.yytext.replace(/columns\s+/,""),g.getLogger().debug("COLUMNS (LEX)",f.yytext),28;case 8:this.pushState("md_string");break;case 9:return"MD_STR";case 10:this.popState();break;case 11:this.pushState("string");break;case 12:g.getLogger().debug("LEX: POPPING STR:",f.yytext),this.popState();break;case 13:return g.getLogger().debug("LEX: STR end:",f.yytext),"STR";case 14:return f.yytext=f.yytext.replace(/space\:/,""),g.getLogger().debug("SPACE NUM (LEX)",f.yytext),21;case 15:return f.yytext="1",g.getLogger().debug("COLUMNS (LEX)",f.yytext),21;case 16:return 42;case 17:return"LINKSTYLE";case 18:return"INTERPOLATE";case 19:return this.pushState("CLASSDEF"),39;case 20:return this.popState(),this.pushState("CLASSDEFID"),"DEFAULT_CLASSDEF_ID";case 21:return this.popState(),this.pushState("CLASSDEFID"),40;case 22:return this.popState(),41;case 23:return this.pushState("CLASS"),43;case 24:return this.popState(),this.pushState("CLASS_STYLE"),44;case 25:return this.popState(),45;case 26:return this.pushState("STYLE_STMNT"),46;case 27:return this.popState(),this.pushState("STYLE_DEFINITION"),47;case 28:return this.popState(),48;case 29:return this.pushState("acc_title"),"acc_title";case 30:return this.popState(),"acc_title_value";case 31:return this.pushState("acc_descr"),"acc_descr";case 32:return this.popState(),"acc_descr_value";case 33:this.pushState("acc_descr_multiline");break;case 34:this.popState();break;case 35:return"acc_descr_multiline_value";case 36:return 30;case 37:return this.popState(),g.getLogger().debug("Lex: (("),"NODE_DEND";case 38:return this.popState(),g.getLogger().debug("Lex: (("),"NODE_DEND";case 39:return this.popState(),g.getLogger().debug("Lex: ))"),"NODE_DEND";case 40:return this.popState(),g.getLogger().debug("Lex: (("),"NODE_DEND";case 41:return this.popState(),g.getLogger().debug("Lex: (("),"NODE_DEND";case 42:return this.popState(),g.getLogger().debug("Lex: (-"),"NODE_DEND";case 43:return this.popState(),g.getLogger().debug("Lex: -)"),"NODE_DEND";case 44:return this.popState(),g.getLogger().debug("Lex: (("),"NODE_DEND";case 45:return this.popState(),g.getLogger().debug("Lex: ]]"),"NODE_DEND";case 46:return this.popState(),g.getLogger().debug("Lex: ("),"NODE_DEND";case 47:return this.popState(),g.getLogger().debug("Lex: ])"),"NODE_DEND";case 48:return this.popState(),g.getLogger().debug("Lex: /]"),"NODE_DEND";case 49:return this.popState(),g.getLogger().debug("Lex: /]"),"NODE_DEND";case 50:return this.popState(),g.getLogger().debug("Lex: )]"),"NODE_DEND";case 51:return this.popState(),g.getLogger().debug("Lex: )"),"NODE_DEND";case 52:return this.popState(),g.getLogger().debug("Lex: ]>"),"NODE_DEND";case 53:return this.popState(),g.getLogger().debug("Lex: ]"),"NODE_DEND";case 54:return g.getLogger().debug("Lexa: -)"),this.pushState("NODE"),35;case 55:return g.getLogger().debug("Lexa: (-"),this.pushState("NODE"),35;case 56:return g.getLogger().debug("Lexa: ))"),this.pushState("NODE"),35;case 57:return g.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;case 58:return g.getLogger().debug("Lex: ((("),this.pushState("NODE"),35;case 59:return g.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;case 60:return g.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;case 61:return g.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;case 62:return g.getLogger().debug("Lexc: >"),this.pushState("NODE"),35;case 63:return g.getLogger().debug("Lexa: (["),this.pushState("NODE"),35;case 64:return g.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;case 65:return this.pushState("NODE"),35;case 66:return this.pushState("NODE"),35;case 67:return this.pushState("NODE"),35;case 68:return this.pushState("NODE"),35;case 69:return this.pushState("NODE"),35;case 70:return this.pushState("NODE"),35;case 71:return this.pushState("NODE"),35;case 72:return g.getLogger().debug("Lexa: ["),this.pushState("NODE"),35;case 73:return this.pushState("BLOCK_ARROW"),g.getLogger().debug("LEX ARR START"),37;case 74:return g.getLogger().debug("Lex: NODE_ID",f.yytext),31;case 75:return g.getLogger().debug("Lex: EOF",f.yytext),8;case 76:this.pushState("md_string");break;case 77:this.pushState("md_string");break;case 78:return"NODE_DESCR";case 79:this.popState();break;case 80:g.getLogger().debug("Lex: Starting string"),this.pushState("string");break;case 81:g.getLogger().debug("LEX ARR: Starting string"),this.pushState("string");break;case 82:return g.getLogger().debug("LEX: NODE_DESCR:",f.yytext),"NODE_DESCR";case 83:g.getLogger().debug("LEX POPPING"),this.popState();break;case 84:g.getLogger().debug("Lex: =>BAE"),this.pushState("ARROW_DIR");break;case 85:return f.yytext=f.yytext.replace(/^,\s*/,""),g.getLogger().debug("Lex (right): dir:",f.yytext),"DIR";case 86:return f.yytext=f.yytext.replace(/^,\s*/,""),g.getLogger().debug("Lex (left):",f.yytext),"DIR";case 87:return f.yytext=f.yytext.replace(/^,\s*/,""),g.getLogger().debug("Lex (x):",f.yytext),"DIR";case 88:return f.yytext=f.yytext.replace(/^,\s*/,""),g.getLogger().debug("Lex (y):",f.yytext),"DIR";case 89:return f.yytext=f.yytext.replace(/^,\s*/,""),g.getLogger().debug("Lex (up):",f.yytext),"DIR";case 90:return f.yytext=f.yytext.replace(/^,\s*/,""),g.getLogger().debug("Lex (down):",f.yytext),"DIR";case 91:return f.yytext="]>",g.getLogger().debug("Lex (ARROW_DIR end):",f.yytext),this.popState(),this.popState(),"BLOCK_ARROW_END";case 92:return g.getLogger().debug("Lex: LINK","#"+f.yytext+"#"),15;case 93:return g.getLogger().debug("Lex: LINK",f.yytext),15;case 94:return g.getLogger().debug("Lex: LINK",f.yytext),15;case 95:return g.getLogger().debug("Lex: LINK",f.yytext),15;case 96:return g.getLogger().debug("Lex: START_LINK",f.yytext),this.pushState("LLABEL"),16;case 97:return g.getLogger().debug("Lex: START_LINK",f.yytext),this.pushState("LLABEL"),16;case 98:return g.getLogger().debug("Lex: START_LINK",f.yytext),this.pushState("LLABEL"),16;case 99:this.pushState("md_string");break;case 100:return g.getLogger().debug("Lex: Starting string"),this.pushState("string"),"LINK_LABEL";case 101:return this.popState(),g.getLogger().debug("Lex: LINK","#"+f.yytext+"#"),15;case 102:return this.popState(),g.getLogger().debug("Lex: LINK",f.yytext),15;case 103:return this.popState(),g.getLogger().debug("Lex: LINK",f.yytext),15;case 104:return g.getLogger().debug("Lex: COLON",f.yytext),f.yytext=f.yytext.slice(1),27}},"anonymous"),rules:[/^(?:block-beta\b)/,/^(?:block:)/,/^(?:block\b)/,/^(?:[\s]+)/,/^(?:[\n]+)/,/^(?:((\u000D\u000A)|(\u000A)))/,/^(?:columns\s+auto\b)/,/^(?:columns\s+[\d]+)/,/^(?:["][`])/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:space[:]\d+)/,/^(?:space\b)/,/^(?:default\b)/,/^(?:linkStyle\b)/,/^(?:interpolate\b)/,/^(?:classDef\s+)/,/^(?:DEFAULT\s+)/,/^(?:\w+\s+)/,/^(?:[^\n]*)/,/^(?:class\s+)/,/^(?:(\w+)+((,\s*\w+)*))/,/^(?:[^\n]*)/,/^(?:style\s+)/,/^(?:(\w+)+((,\s*\w+)*))/,/^(?:[^\n]*)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:end\b\s*)/,/^(?:\(\(\()/,/^(?:\)\)\))/,/^(?:[\)]\))/,/^(?:\}\})/,/^(?:\})/,/^(?:\(-)/,/^(?:-\))/,/^(?:\(\()/,/^(?:\]\])/,/^(?:\()/,/^(?:\]\))/,/^(?:\\\])/,/^(?:\/\])/,/^(?:\)\])/,/^(?:[\)])/,/^(?:\]>)/,/^(?:[\]])/,/^(?:-\))/,/^(?:\(-)/,/^(?:\)\))/,/^(?:\))/,/^(?:\(\(\()/,/^(?:\(\()/,/^(?:\{\{)/,/^(?:\{)/,/^(?:>)/,/^(?:\(\[)/,/^(?:\()/,/^(?:\[\[)/,/^(?:\[\|)/,/^(?:\[\()/,/^(?:\)\)\))/,/^(?:\[\\)/,/^(?:\[\/)/,/^(?:\[\\)/,/^(?:\[)/,/^(?:<\[)/,/^(?:[^\(\[\n\-\)\{\}\s\<\>:]+)/,/^(?:$)/,/^(?:["][`])/,/^(?:["][`])/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["])/,/^(?:["])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:\]>\s*\()/,/^(?:,?\s*right\s*)/,/^(?:,?\s*left\s*)/,/^(?:,?\s*x\s*)/,/^(?:,?\s*y\s*)/,/^(?:,?\s*up\s*)/,/^(?:,?\s*down\s*)/,/^(?:\)\s*)/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?:\s*~~[\~]+\s*)/,/^(?:\s*[xo<]?--\s*)/,/^(?:\s*[xo<]?==\s*)/,/^(?:\s*[xo<]?-\.\s*)/,/^(?:["][`])/,/^(?:["])/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?::\d+)/],conditions:{STYLE_DEFINITION:{rules:[28],inclusive:!1},STYLE_STMNT:{rules:[27],inclusive:!1},CLASSDEFID:{rules:[22],inclusive:!1},CLASSDEF:{rules:[20,21],inclusive:!1},CLASS_STYLE:{rules:[25],inclusive:!1},CLASS:{rules:[24],inclusive:!1},LLABEL:{rules:[99,100,101,102,103],inclusive:!1},ARROW_DIR:{rules:[85,86,87,88,89,90,91],inclusive:!1},BLOCK_ARROW:{rules:[76,81,84],inclusive:!1},NODE:{rules:[37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,77,80],inclusive:!1},md_string:{rules:[9,10,78,79],inclusive:!1},space:{rules:[],inclusive:!1},string:{rules:[12,13,82,83],inclusive:!1},acc_descr_multiline:{rules:[34,35],inclusive:!1},acc_descr:{rules:[32],inclusive:!1},acc_title:{rules:[30],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,11,14,15,16,17,18,19,23,26,29,31,33,36,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,92,93,94,95,96,97,98,104],inclusive:!0}}};return D})();k.lexer=B;function _(){this.yy={}}return d(_,"Parser"),_.prototype=k,k.Parser=_,new _})();bt.parser=bt;var ve=bt,X=new Map,kt=[],wt=new Map,Bt="color",Ct="fill",Ee="bgFill",Pt=",",_e=R(),ct=new Map,De=d(e=>be.sanitizeText(e,_e),"sanitizeText"),Ne=d(function(e,t=""){let a=ct.get(e);a||(a={id:e,styles:[],textStyles:[]},ct.set(e,a)),t?.split(Pt).forEach(i=>{const l=i.replace(/([^;]*);/,"$1").trim();if(RegExp(Bt).exec(i)){const r=l.replace(Ct,Ee).replace(Bt,Ct);a.textStyles.push(r)}a.styles.push(l)})},"addStyleClass"),Te=d(function(e,t=""){const a=X.get(e);t!=null&&(a.styles=t.split(Pt))},"addStyle2Node"),Be=d(function(e,t){e.split(",").forEach(function(a){let i=X.get(a);if(i===void 0){const l=a.trim();i={id:l,type:"na",children:[]},X.set(l,i)}i.classes||(i.classes=[]),i.classes.push(t)})},"setCssClass"),Yt=d((e,t)=>{const a=e.flat(),i=[],s=a.find(r=>r?.type==="column-setting")?.columns??-1;for(const r of a){if(typeof s=="number"&&s>0&&r.type!=="column-setting"&&typeof r.widthInColumns=="number"&&r.widthInColumns>s&&L.warn(`Block ${r.id} width ${r.widthInColumns} exceeds configured column width ${s}`),r.label&&(r.label=De(r.label)),r.type==="classDef"){Ne(r.id,r.css);continue}if(r.type==="applyClass"){Be(r.id,r?.styleClass??"");continue}if(r.type==="applyStyles"){r?.stylesStr&&Te(r.id,r?.stylesStr);continue}if(r.type==="column-setting")t.columns=r.columns??-1;else if(r.type==="edge"){const n=(wt.get(r.id)??0)+1;wt.set(r.id,n),r.id=n+"-"+r.id,kt.push(r)}else{r.label||(r.type==="composite"?r.label="":r.label=r.id);const n=X.get(r.id);if(n===void 0?X.set(r.id,r):(r.type!=="na"&&(n.type=r.type),r.label!==r.id&&(n.label=r.label)),r.children&&Yt(r.children,r),r.type==="space"){const c=r.width??1;for(let u=0;u{L.debug("Clear called"),de(),et={id:"root",type:"composite",children:[],columns:-1},X=new Map([["root",et]]),vt=[],ct=new Map,kt=[],wt=new Map},"clear");function Ht(e){switch(L.debug("typeStr2Type",e),e){case"[]":return"square";case"()":return L.debug("we have a round"),"round";case"(())":return"circle";case">]":return"rect_left_inv_arrow";case"{}":return"diamond";case"{{}}":return"hexagon";case"([])":return"stadium";case"[[]]":return"subroutine";case"[()]":return"cylinder";case"((()))":return"doublecircle";case"[//]":return"lean_right";case"[\\\\]":return"lean_left";case"[/\\]":return"trapezoid";case"[\\/]":return"inv_trapezoid";case"<[]>":return"block_arrow";default:return"na"}}d(Ht,"typeStr2Type");function Kt(e){switch(L.debug("typeStr2Type",e),e){case"==":return"thick";default:return"normal"}}d(Kt,"edgeTypeStr2Type");function Xt(e){switch(e.replace(/^[\s-]+|[\s-]+$/g,"")){case"x":return"arrow_cross";case"o":return"arrow_circle";case">":return"arrow_point";default:return""}}d(Xt,"edgeStrToEdgeData");var It=0,Ie=d(()=>(It++,"id-"+Math.random().toString(36).substr(2,12)+"-"+It),"generateId"),Oe=d(e=>{et.children=e,Yt(e,et),vt=et.children},"setHierarchy"),Re=d(e=>{const t=X.get(e);return t?t.columns?t.columns:t.children?t.children.length:-1:-1},"getColumns"),ze=d(()=>[...X.values()],"getBlocksFlat"),Ae=d(()=>vt||[],"getBlocks"),Me=d(()=>kt,"getEdges"),Fe=d(e=>X.get(e),"getBlock"),We=d(e=>{X.set(e.id,e)},"setBlock"),Pe=d(()=>L,"getLogger"),Ye=d(function(){return ct},"getClasses"),He={getConfig:d(()=>rt().block,"getConfig"),typeStr2Type:Ht,edgeTypeStr2Type:Kt,edgeStrToEdgeData:Xt,getLogger:Pe,getBlocksFlat:ze,getBlocks:Ae,getEdges:Me,setHierarchy:Oe,getBlock:Fe,setBlock:We,getColumns:Re,getClasses:Ye,clear:Ce,generateId:Ie},Ke=He,nt=d((e,t)=>{const a=ke,i=a(e,"r"),l=a(e,"g"),s=a(e,"b");return ge(i,l,s,t)},"fade"),Xe=d(e=>`.label { + font-family: ${e.fontFamily}; + color: ${e.nodeTextColor||e.textColor}; + } + .cluster-label text { + fill: ${e.titleColor}; + } + .cluster-label span,p { + color: ${e.titleColor}; + } + + + + .label text,span,p { + fill: ${e.nodeTextColor||e.textColor}; + color: ${e.nodeTextColor||e.textColor}; + } + + .node rect, + .node circle, + .node ellipse, + .node polygon, + .node path { + fill: ${e.mainBkg}; + stroke: ${e.nodeBorder}; + stroke-width: 1px; + } + .flowchart-label text { + text-anchor: middle; + } + // .flowchart-label .text-outer-tspan { + // text-anchor: middle; + // } + // .flowchart-label .text-inner-tspan { + // text-anchor: start; + // } + + .node .label { + text-align: center; + } + .node.clickable { + cursor: pointer; + } + + .arrowheadPath { + fill: ${e.arrowheadColor}; + } + + .edgePath .path { + stroke: ${e.lineColor}; + stroke-width: 2.0px; + } + + .flowchart-link { + stroke: ${e.lineColor}; + fill: none; + } + + .edgeLabel { + background-color: ${e.edgeLabelBackground}; + rect { + opacity: 0.5; + background-color: ${e.edgeLabelBackground}; + fill: ${e.edgeLabelBackground}; + } + text-align: center; + } + + /* For html labels only */ + .labelBkg { + background-color: ${nt(e.edgeLabelBackground,.5)}; + // background-color: + } + + .node .cluster { + // fill: ${nt(e.mainBkg,.5)}; + fill: ${nt(e.clusterBkg,.5)}; + stroke: ${nt(e.clusterBorder,.2)}; + box-shadow: rgba(50, 50, 93, 0.25) 0px 13px 27px -5px, rgba(0, 0, 0, 0.3) 0px 8px 16px -8px; + stroke-width: 1px; + } + + .cluster text { + fill: ${e.titleColor}; + } + + .cluster span,p { + color: ${e.titleColor}; + } + /* .cluster div { + color: ${e.titleColor}; + } */ + + div.mermaidTooltip { + position: absolute; + text-align: center; + max-width: 200px; + padding: 2px; + font-family: ${e.fontFamily}; + font-size: 12px; + background: ${e.tertiaryColor}; + border: 1px solid ${e.border2}; + border-radius: 2px; + pointer-events: none; + z-index: 100; + } + + .flowchartTitleText { + text-anchor: middle; + font-size: 18px; + fill: ${e.textColor}; + } + ${oe()} +`,"getStyles"),Ue=Xe,je=d((e,t,a,i)=>{t.forEach(l=>{rr[l](e,a,i)})},"insertMarkers"),Ve=d((e,t,a)=>{L.trace("Making markers for ",a),e.append("defs").append("marker").attr("id",a+"_"+t+"-extensionStart").attr("class","marker extension "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 1,7 L18,13 V 1 Z"),e.append("defs").append("marker").attr("id",a+"_"+t+"-extensionEnd").attr("class","marker extension "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z")},"extension"),Ge=d((e,t,a)=>{e.append("defs").append("marker").attr("id",a+"_"+t+"-compositionStart").attr("class","marker composition "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",a+"_"+t+"-compositionEnd").attr("class","marker composition "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"composition"),Ze=d((e,t,a)=>{e.append("defs").append("marker").attr("id",a+"_"+t+"-aggregationStart").attr("class","marker aggregation "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",a+"_"+t+"-aggregationEnd").attr("class","marker aggregation "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"aggregation"),qe=d((e,t,a)=>{e.append("defs").append("marker").attr("id",a+"_"+t+"-dependencyStart").attr("class","marker dependency "+t).attr("refX",6).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",a+"_"+t+"-dependencyEnd").attr("class","marker dependency "+t).attr("refX",13).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")},"dependency"),Je=d((e,t,a)=>{e.append("defs").append("marker").attr("id",a+"_"+t+"-lollipopStart").attr("class","marker lollipop "+t).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),e.append("defs").append("marker").attr("id",a+"_"+t+"-lollipopEnd").attr("class","marker lollipop "+t).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6)},"lollipop"),Qe=d((e,t,a)=>{e.append("marker").attr("id",a+"_"+t+"-pointEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",6).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").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",a+"_"+t+"-pointStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",4.5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 5 L 10 10 L 10 0 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},"point"),$e=d((e,t,a)=>{e.append("marker").attr("id",a+"_"+t+"-circleEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",11).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",a+"_"+t+"-circleStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",-1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},"circle"),tr=d((e,t,a)=>{e.append("marker").attr("id",a+"_"+t+"-crossEnd").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",12).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),e.append("marker").attr("id",a+"_"+t+"-crossStart").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",-1).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0")},"cross"),er=d((e,t,a)=>{e.append("defs").append("marker").attr("id",a+"_"+t+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","strokeWidth").attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"barb"),rr={extension:Ve,composition:Ge,aggregation:Ze,dependency:qe,lollipop:Je,point:Qe,circle:$e,cross:tr,barb:er},ar=je,C=R()?.block?.padding??8;function Ut(e,t){if(e===0||!Number.isInteger(e))throw new Error("Columns must be an integer !== 0.");if(t<0||!Number.isInteger(t))throw new Error("Position must be a non-negative integer."+t);if(e<0)return{px:t,py:0};if(e===1)return{px:0,py:t};const a=t%e,i=Math.floor(t/e);return{px:a,py:i}}d(Ut,"calculateBlockPosition");var sr=d(e=>{let t=0,a=0;for(const i of e.children){const{width:l,height:s,x:r,y:n}=i.size??{width:0,height:0,x:0,y:0};L.debug("getMaxChildSize abc95 child:",i.id,"width:",l,"height:",s,"x:",r,"y:",n,i.type),i.type!=="space"&&(l>t&&(t=l/(e.widthInColumns??1)),s>a&&(a=s))}return{width:t,height:a}},"getMaxChildSize");function ot(e,t,a=0,i=0){L.debug("setBlockSizes abc95 (start)",e.id,e?.size?.x,"block width =",e?.size,"siblingWidth",a),e?.size?.width||(e.size={width:a,height:i,x:0,y:0});let l=0,s=0;if(e.children?.length>0){for(const b of e.children)ot(b,t);const r=sr(e);l=r.width,s=r.height,L.debug("setBlockSizes abc95 maxWidth of",e.id,":s children is ",l,s);for(const b of e.children)b.size&&(L.debug(`abc95 Setting size of children of ${e.id} id=${b.id} ${l} ${s} ${JSON.stringify(b.size)}`),b.size.width=l*(b.widthInColumns??1)+C*((b.widthInColumns??1)-1),b.size.height=s,b.size.x=0,b.size.y=0,L.debug(`abc95 updating size of ${e.id} children child:${b.id} maxWidth:${l} maxHeight:${s}`));for(const b of e.children)ot(b,t,l,s);const n=e.columns??-1;let c=0;for(const b of e.children)c+=b.widthInColumns??1;let u=e.children.length;n>0&&n0?Math.min(e.children.length,n):e.children.length;if(b>0){const S=(x-b*C-C)/b;L.debug("abc95 (growing to fit) width",e.id,x,e.size?.width,S);for(const v of e.children)v.size&&(v.size.width=S)}}e.size={width:x,height:w,x:0,y:0}}L.debug("setBlockSizes abc94 (done)",e.id,e?.size?.x,e?.size?.width,e?.size?.y,e?.size?.height)}d(ot,"setBlockSizes");function Et(e,t){L.debug(`abc85 layout blocks (=>layoutBlocks) ${e.id} x: ${e?.size?.x} y: ${e?.size?.y} width: ${e?.size?.width}`);const a=e.columns??-1;if(L.debug("layoutBlocks columns abc95",e.id,"=>",a,e),e.children&&e.children.length>0){const i=e?.children[0]?.size?.width??0,l=e.children.length*i+(e.children.length-1)*C;L.debug("widthOfChildren 88",l,"posX");let s=0;L.debug("abc91 block?.size?.x",e.id,e?.size?.x);let r=e?.size?.x?e?.size?.x+(-e?.size?.width/2||0):-C,n=0;for(const c of e.children){const u=e;if(!c.size)continue;const{width:o,height:x}=c.size,{px:w,py:b}=Ut(a,s);if(b!=n&&(n=b,r=e?.size?.x?e?.size?.x+(-e?.size?.width/2||0):-C,L.debug("New row in layout for block",e.id," and child ",c.id,n)),L.debug(`abc89 layout blocks (child) id: ${c.id} Pos: ${s} (px, py) ${w},${b} (${u?.size?.x},${u?.size?.y}) parent: ${u.id} width: ${o}${C}`),u.size){const v=o/2;c.size.x=r+C+v,L.debug(`abc91 layout blocks (calc) px, pyid:${c.id} startingPos=X${r} new startingPosX${c.size.x} ${v} padding=${C} width=${o} halfWidth=${v} => x:${c.size.x} y:${c.size.y} ${c.widthInColumns} (width * (child?.w || 1)) / 2 ${o*(c?.widthInColumns??1)/2}`),r=c.size.x+v,c.size.y=u.size.y-u.size.height/2+b*(x+C)+x/2+C,L.debug(`abc88 layout blocks (calc) px, pyid:${c.id}startingPosX${r}${C}${v}=>x:${c.size.x}y:${c.size.y}${c.widthInColumns}(width * (child?.w || 1)) / 2${o*(c?.widthInColumns??1)/2}`)}c.children&&Et(c);let S=c?.widthInColumns??1;a>0&&(S=Math.min(S,a-s%a)),s+=S,L.debug("abc88 columnsPos",c,s)}}L.debug(`layout blocks (<==layoutBlocks) ${e.id} x: ${e?.size?.x} y: ${e?.size?.y} width: ${e?.size?.width}`)}d(Et,"layoutBlocks");function _t(e,{minX:t,minY:a,maxX:i,maxY:l}={minX:0,minY:0,maxX:0,maxY:0}){if(e.size&&e.id!=="root"){const{x:s,y:r,width:n,height:c}=e.size;s-n/2i&&(i=s+n/2),r+c/2>l&&(l=r+c/2)}if(e.children)for(const s of e.children)({minX:t,minY:a,maxX:i,maxY:l}=_t(s,{minX:t,minY:a,maxX:i,maxY:l}));return{minX:t,minY:a,maxX:i,maxY:l}}d(_t,"findBounds");function jt(e){const t=e.getBlock("root");if(!t)return;ot(t,e,0,0),Et(t),L.debug("getBlocks",JSON.stringify(t,null,2));const{minX:a,minY:i,maxX:l,maxY:s}=_t(t),r=s-i,n=l-a;return{x:a,y:i,width:n,height:r}}d(jt,"layout");function mt(e,t){t&&e.attr("style",t)}d(mt,"applyStyle");function Vt(e,t){const a=O(document.createElementNS("http://www.w3.org/2000/svg","foreignObject")),i=a.append("xhtml:div"),l=e.label,s=e.isNode?"nodeLabel":"edgeLabel",r=i.append("span");return r.html(yt(l,t)),mt(r,e.labelStyle),r.attr("class",s),mt(i,e.labelStyle),i.style("display","inline-block"),i.style("white-space","nowrap"),i.attr("xmlns","http://www.w3.org/1999/xhtml"),a.node()}d(Vt,"addHtmlLabel");var ir=d(async(e,t,a,i)=>{let l=e||"";typeof l=="object"&&(l=l[0]);const s=R();if(j(s.flowchart.htmlLabels)){l=l.replace(/\\n|\n/g,"
"),L.debug("vertexText"+l);const r=await we(xt(l)),n={isNode:i,label:r,labelStyle:t.replace("fill:","color:")};return Vt(n,s)}else{const r=document.createElementNS("http://www.w3.org/2000/svg","text");r.setAttribute("style",t.replace("color:","fill:"));let n=[];typeof l=="string"?n=l.split(/\\n|\n|/gi):Array.isArray(l)?n=l:n=[];for(const c of n){const u=document.createElementNS("http://www.w3.org/2000/svg","tspan");u.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),u.setAttribute("dy","1em"),u.setAttribute("x","0"),a?u.setAttribute("class","title-row"):u.setAttribute("class","row"),u.textContent=c.trim(),r.appendChild(u)}return r}},"createLabel"),K=ir,nr=d((e,t,a,i,l)=>{t.arrowTypeStart&&Ot(e,"start",t.arrowTypeStart,a,i,l),t.arrowTypeEnd&&Ot(e,"end",t.arrowTypeEnd,a,i,l)},"addEdgeMarkers"),lr={arrow_cross:"cross",arrow_point:"point",arrow_barb:"barb",arrow_circle:"circle",aggregation:"aggregation",extension:"extension",composition:"composition",dependency:"dependency",lollipop:"lollipop"},Ot=d((e,t,a,i,l,s)=>{const r=lr[a];if(!r){L.warn(`Unknown arrow type: ${a}`);return}const n=t==="start"?"Start":"End";e.attr(`marker-${t}`,`url(${i}#${l}_${s}-${r}${n})`)},"addEdgeMarker"),Lt={},M={},cr=d(async(e,t)=>{const a=R(),i=j(a.flowchart.htmlLabels),l=t.labelType==="markdown"?Wt(e,t.label,{style:t.labelStyle,useHtmlLabels:i,addSvgBackground:!0},a):await K(t.label,t.labelStyle),s=e.insert("g").attr("class","edgeLabel"),r=s.insert("g").attr("class","label");r.node().appendChild(l);let n=l.getBBox();if(i){const u=l.children[0],o=O(l);n=u.getBoundingClientRect(),o.attr("width",n.width),o.attr("height",n.height)}r.attr("transform","translate("+-n.width/2+", "+-n.height/2+")"),Lt[t.id]=s,t.width=n.width,t.height=n.height;let c;if(t.startLabelLeft){const u=await K(t.startLabelLeft,t.labelStyle),o=e.insert("g").attr("class","edgeTerminals"),x=o.insert("g").attr("class","inner");c=x.node().appendChild(u);const w=u.getBBox();x.attr("transform","translate("+-w.width/2+", "+-w.height/2+")"),M[t.id]||(M[t.id]={}),M[t.id].startLeft=o,tt(c,t.startLabelLeft)}if(t.startLabelRight){const u=await K(t.startLabelRight,t.labelStyle),o=e.insert("g").attr("class","edgeTerminals"),x=o.insert("g").attr("class","inner");c=o.node().appendChild(u),x.node().appendChild(u);const w=u.getBBox();x.attr("transform","translate("+-w.width/2+", "+-w.height/2+")"),M[t.id]||(M[t.id]={}),M[t.id].startRight=o,tt(c,t.startLabelRight)}if(t.endLabelLeft){const u=await K(t.endLabelLeft,t.labelStyle),o=e.insert("g").attr("class","edgeTerminals"),x=o.insert("g").attr("class","inner");c=x.node().appendChild(u);const w=u.getBBox();x.attr("transform","translate("+-w.width/2+", "+-w.height/2+")"),o.node().appendChild(u),M[t.id]||(M[t.id]={}),M[t.id].endLeft=o,tt(c,t.endLabelLeft)}if(t.endLabelRight){const u=await K(t.endLabelRight,t.labelStyle),o=e.insert("g").attr("class","edgeTerminals"),x=o.insert("g").attr("class","inner");c=x.node().appendChild(u);const w=u.getBBox();x.attr("transform","translate("+-w.width/2+", "+-w.height/2+")"),o.node().appendChild(u),M[t.id]||(M[t.id]={}),M[t.id].endRight=o,tt(c,t.endLabelRight)}return l},"insertEdgeLabel");function tt(e,t){R().flowchart.htmlLabels&&e&&(e.style.width=t.length*9+"px",e.style.height="12px")}d(tt,"setTerminalWidth");var or=d((e,t)=>{L.debug("Moving label abc88 ",e.id,e.label,Lt[e.id],t);let a=t.updatedPath?t.updatedPath:t.originalPath;const i=R(),{subGraphTitleTotalMargin:l}=ye(i);if(e.label){const s=Lt[e.id];let r=e.x,n=e.y;if(a){const c=$.calcLabelPosition(a);L.debug("Moving label "+e.label+" from (",r,",",n,") to (",c.x,",",c.y,") abc88"),t.updatedPath&&(r=c.x,n=c.y)}s.attr("transform",`translate(${r}, ${n+l/2})`)}if(e.startLabelLeft){const s=M[e.id].startLeft;let r=e.x,n=e.y;if(a){const c=$.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_left",a);r=c.x,n=c.y}s.attr("transform",`translate(${r}, ${n})`)}if(e.startLabelRight){const s=M[e.id].startRight;let r=e.x,n=e.y;if(a){const c=$.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_right",a);r=c.x,n=c.y}s.attr("transform",`translate(${r}, ${n})`)}if(e.endLabelLeft){const s=M[e.id].endLeft;let r=e.x,n=e.y;if(a){const c=$.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_left",a);r=c.x,n=c.y}s.attr("transform",`translate(${r}, ${n})`)}if(e.endLabelRight){const s=M[e.id].endRight;let r=e.x,n=e.y;if(a){const c=$.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_right",a);r=c.x,n=c.y}s.attr("transform",`translate(${r}, ${n})`)}},"positionEdgeLabel"),hr=d((e,t)=>{const a=e.x,i=e.y,l=Math.abs(t.x-a),s=Math.abs(t.y-i),r=e.width/2,n=e.height/2;return l>=r||s>=n},"outsideNode"),dr=d((e,t,a)=>{L.debug(`intersection calc abc89: + outsidePoint: ${JSON.stringify(t)} + insidePoint : ${JSON.stringify(a)} + node : x:${e.x} y:${e.y} w:${e.width} h:${e.height}`);const i=e.x,l=e.y,s=Math.abs(i-a.x),r=e.width/2;let n=a.xMath.abs(i-t.x)*c){let x=a.y{L.debug("abc88 cutPathAtIntersect",e,t);let a=[],i=e[0],l=!1;return e.forEach(s=>{if(!hr(t,s)&&!l){const r=dr(t,i,s);let n=!1;a.forEach(c=>{n=n||c.x===r.x&&c.y===r.y}),a.some(c=>c.x===r.x&&c.y===r.y)||a.push(r),l=!0}else i=s,l||a.push(s)}),a},"cutPathAtIntersect"),gr=d(function(e,t,a,i,l,s,r){let n=a.points;L.debug("abc88 InsertEdge: edge=",a,"e=",t);let c=!1;const u=s.node(t.v);var o=s.node(t.w);o?.intersect&&u?.intersect&&(n=n.slice(1,a.points.length-1),n.unshift(u.intersect(n[0])),n.push(o.intersect(n[n.length-1]))),a.toCluster&&(L.debug("to cluster abc88",i[a.toCluster]),n=Rt(a.points,i[a.toCluster].node),c=!0),a.fromCluster&&(L.debug("from cluster abc88",i[a.fromCluster]),n=Rt(n.reverse(),i[a.fromCluster].node).reverse(),c=!0);const x=n.filter(y=>!Number.isNaN(y.y));let w=fe;a.curve&&(l==="graph"||l==="flowchart")&&(w=a.curve);const{x:b,y:S}=ue(a),v=pe().x(b).y(S).curve(w);let k;switch(a.thickness){case"normal":k="edge-thickness-normal";break;case"thick":k="edge-thickness-thick";break;case"invisible":k="edge-thickness-thick";break;default:k=""}switch(a.pattern){case"solid":k+=" edge-pattern-solid";break;case"dotted":k+=" edge-pattern-dotted";break;case"dashed":k+=" edge-pattern-dashed";break}const B=e.append("path").attr("d",v(x)).attr("id",a.id).attr("class"," "+k+(a.classes?" "+a.classes:"")).attr("style",a.style);let _="";(R().flowchart.arrowMarkerAbsolute||R().state.arrowMarkerAbsolute)&&(_=xe(!0)),nr(B,a,_,r,l);let D={};return c&&(D.updatedPath=n),D.originalPath=a.points,D},"insertEdge"),ur=d(e=>{const t=new Set;for(const a of e)switch(a){case"x":t.add("right"),t.add("left");break;case"y":t.add("up"),t.add("down");break;default:t.add(a);break}return t},"expandAndDeduplicateDirections"),pr=d((e,t,a)=>{const i=ur(e),l=2,s=t.height+2*a.padding,r=s/l,n=t.width+2*r+a.padding,c=a.padding/2;return i.has("right")&&i.has("left")&&i.has("up")&&i.has("down")?[{x:0,y:0},{x:r,y:0},{x:n/2,y:2*c},{x:n-r,y:0},{x:n,y:0},{x:n,y:-s/3},{x:n+2*c,y:-s/2},{x:n,y:-2*s/3},{x:n,y:-s},{x:n-r,y:-s},{x:n/2,y:-s-2*c},{x:r,y:-s},{x:0,y:-s},{x:0,y:-2*s/3},{x:-2*c,y:-s/2},{x:0,y:-s/3}]:i.has("right")&&i.has("left")&&i.has("up")?[{x:r,y:0},{x:n-r,y:0},{x:n,y:-s/2},{x:n-r,y:-s},{x:r,y:-s},{x:0,y:-s/2}]:i.has("right")&&i.has("left")&&i.has("down")?[{x:0,y:0},{x:r,y:-s},{x:n-r,y:-s},{x:n,y:0}]:i.has("right")&&i.has("up")&&i.has("down")?[{x:0,y:0},{x:n,y:-r},{x:n,y:-s+r},{x:0,y:-s}]:i.has("left")&&i.has("up")&&i.has("down")?[{x:n,y:0},{x:0,y:-r},{x:0,y:-s+r},{x:n,y:-s}]:i.has("right")&&i.has("left")?[{x:r,y:0},{x:r,y:-c},{x:n-r,y:-c},{x:n-r,y:0},{x:n,y:-s/2},{x:n-r,y:-s},{x:n-r,y:-s+c},{x:r,y:-s+c},{x:r,y:-s},{x:0,y:-s/2}]:i.has("up")&&i.has("down")?[{x:n/2,y:0},{x:0,y:-c},{x:r,y:-c},{x:r,y:-s+c},{x:0,y:-s+c},{x:n/2,y:-s},{x:n,y:-s+c},{x:n-r,y:-s+c},{x:n-r,y:-c},{x:n,y:-c}]:i.has("right")&&i.has("up")?[{x:0,y:0},{x:n,y:-r},{x:0,y:-s}]:i.has("right")&&i.has("down")?[{x:0,y:0},{x:n,y:0},{x:0,y:-s}]:i.has("left")&&i.has("up")?[{x:n,y:0},{x:0,y:-r},{x:n,y:-s}]:i.has("left")&&i.has("down")?[{x:n,y:0},{x:0,y:0},{x:n,y:-s}]:i.has("right")?[{x:r,y:-c},{x:r,y:-c},{x:n-r,y:-c},{x:n-r,y:0},{x:n,y:-s/2},{x:n-r,y:-s},{x:n-r,y:-s+c},{x:r,y:-s+c},{x:r,y:-s+c}]:i.has("left")?[{x:r,y:0},{x:r,y:-c},{x:n-r,y:-c},{x:n-r,y:-s+c},{x:r,y:-s+c},{x:r,y:-s},{x:0,y:-s/2}]:i.has("up")?[{x:r,y:-c},{x:r,y:-s+c},{x:0,y:-s+c},{x:n/2,y:-s},{x:n,y:-s+c},{x:n-r,y:-s+c},{x:n-r,y:-c}]:i.has("down")?[{x:n/2,y:0},{x:0,y:-c},{x:r,y:-c},{x:r,y:-s+c},{x:n-r,y:-s+c},{x:n-r,y:-c},{x:n,y:-c}]:[{x:0,y:0}]},"getArrowPoints");function Gt(e,t){return e.intersect(t)}d(Gt,"intersectNode");var fr=Gt;function Zt(e,t,a,i){var l=e.x,s=e.y,r=l-i.x,n=s-i.y,c=Math.sqrt(t*t*n*n+a*a*r*r),u=Math.abs(t*a*r/c);i.x0}d(St,"sameSign");var yr=Qt,br=$t;function $t(e,t,a){var i=e.x,l=e.y,s=[],r=Number.POSITIVE_INFINITY,n=Number.POSITIVE_INFINITY;typeof t.forEach=="function"?t.forEach(function(S){r=Math.min(r,S.x),n=Math.min(n,S.y)}):(r=Math.min(r,t.x),n=Math.min(n,t.y));for(var c=i-e.width/2-r,u=l-e.height/2-n,o=0;o1&&s.sort(function(S,v){var k=S.x-a.x,B=S.y-a.y,_=Math.sqrt(k*k+B*B),D=v.x-a.x,y=v.y-a.y,g=Math.sqrt(D*D+y*y);return _{var a=e.x,i=e.y,l=t.x-a,s=t.y-i,r=e.width/2,n=e.height/2,c,u;return Math.abs(s)*r>Math.abs(l)*n?(s<0&&(n=-n),c=s===0?0:n*l/s,u=n):(l<0&&(r=-r),c=r,u=l===0?0:r*s/l),{x:a+c,y:i+u}},"intersectRect"),mr=wr,N={node:fr,circle:xr,ellipse:qt,polygon:br,rect:mr},A=d(async(e,t,a,i)=>{const l=R();let s;const r=t.useHtmlLabels||j(l.flowchart.htmlLabels);a?s=a:s="node default";const n=e.insert("g").attr("class",s).attr("id",t.domId||t.id),c=n.insert("g").attr("class","label").attr("style",t.labelStyle);let u;t.labelText===void 0?u="":u=typeof t.labelText=="string"?t.labelText:t.labelText[0];const o=c.node();let x;t.labelType==="markdown"?x=Wt(c,yt(xt(u),l),{useHtmlLabels:r,width:t.width||l.flowchart.wrappingWidth,classes:"markdown-node-label"},l):x=o.appendChild(await K(yt(xt(u),l),t.labelStyle,!1,i));let w=x.getBBox();const b=t.padding/2;if(j(l.flowchart.htmlLabels)){const S=x.children[0],v=O(x),k=S.getElementsByTagName("img");if(k){const B=u.replace(/]*>/g,"").trim()==="";await Promise.all([...k].map(_=>new Promise(D=>{function y(){if(_.style.display="flex",_.style.flexDirection="column",B){const g=l.fontSize?l.fontSize:window.getComputedStyle(document.body).fontSize,m=parseInt(g,10)*5+"px";_.style.minWidth=m,_.style.maxWidth=m}else _.style.width="100%";D(_)}d(y,"setupImage"),setTimeout(()=>{_.complete&&y()}),_.addEventListener("error",y),_.addEventListener("load",y)})))}w=S.getBoundingClientRect(),v.attr("width",w.width),v.attr("height",w.height)}return r?c.attr("transform","translate("+-w.width/2+", "+-w.height/2+")"):c.attr("transform","translate(0, "+-w.height/2+")"),t.centerLabel&&c.attr("transform","translate("+-w.width/2+", "+-w.height/2+")"),c.insert("rect",":first-child"),{shapeSvg:n,bbox:w,halfPadding:b,label:c}},"labelHelper"),T=d((e,t)=>{const a=t.node().getBBox();e.width=a.width,e.height=a.height},"updateNodeBounds");function U(e,t,a,i){return e.insert("polygon",":first-child").attr("points",i.map(function(l){return l.x+","+l.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-t/2+","+a/2+")")}d(U,"insertPolygonShape");var Lr=d(async(e,t)=>{t.useHtmlLabels||R().flowchart.htmlLabels||(t.centerLabel=!0);const{shapeSvg:i,bbox:l,halfPadding:s}=await A(e,t,"node "+t.classes,!0);L.info("Classes = ",t.classes);const r=i.insert("rect",":first-child");return r.attr("rx",t.rx).attr("ry",t.ry).attr("x",-l.width/2-s).attr("y",-l.height/2-s).attr("width",l.width+t.padding).attr("height",l.height+t.padding),T(t,r),t.intersect=function(n){return N.rect(t,n)},i},"note"),Sr=Lr,zt=d(e=>e?" "+e:"","formatClass"),Y=d((e,t)=>`${t||"node default"}${zt(e.classes)} ${zt(e.class)}`,"getClassesFromNode"),At=d(async(e,t)=>{const{shapeSvg:a,bbox:i}=await A(e,t,Y(t,void 0),!0),l=i.width+t.padding,s=i.height+t.padding,r=l+s,n=[{x:r/2,y:0},{x:r,y:-r/2},{x:r/2,y:-r},{x:0,y:-r/2}];L.info("Question main (Circle)");const c=U(a,r,r,n);return c.attr("style",t.style),T(t,c),t.intersect=function(u){return L.warn("Intersect called"),N.polygon(t,n,u)},a},"question"),kr=d((e,t)=>{const a=e.insert("g").attr("class","node default").attr("id",t.domId||t.id),i=28,l=[{x:0,y:i/2},{x:i/2,y:0},{x:0,y:-i/2},{x:-i/2,y:0}];return a.insert("polygon",":first-child").attr("points",l.map(function(r){return r.x+","+r.y}).join(" ")).attr("class","state-start").attr("r",7).attr("width",28).attr("height",28),t.width=28,t.height=28,t.intersect=function(r){return N.circle(t,14,r)},a},"choice"),vr=d(async(e,t)=>{const{shapeSvg:a,bbox:i}=await A(e,t,Y(t,void 0),!0),l=4,s=i.height+t.padding,r=s/l,n=i.width+2*r+t.padding,c=[{x:r,y:0},{x:n-r,y:0},{x:n,y:-s/2},{x:n-r,y:-s},{x:r,y:-s},{x:0,y:-s/2}],u=U(a,n,s,c);return u.attr("style",t.style),T(t,u),t.intersect=function(o){return N.polygon(t,c,o)},a},"hexagon"),Er=d(async(e,t)=>{const{shapeSvg:a,bbox:i}=await A(e,t,void 0,!0),l=2,s=i.height+2*t.padding,r=s/l,n=i.width+2*r+t.padding,c=pr(t.directions,i,t),u=U(a,n,s,c);return u.attr("style",t.style),T(t,u),t.intersect=function(o){return N.polygon(t,c,o)},a},"block_arrow"),_r=d(async(e,t)=>{const{shapeSvg:a,bbox:i}=await A(e,t,Y(t,void 0),!0),l=i.width+t.padding,s=i.height+t.padding,r=[{x:-s/2,y:0},{x:l,y:0},{x:l,y:-s},{x:-s/2,y:-s},{x:0,y:-s/2}];return U(a,l,s,r).attr("style",t.style),t.width=l+s,t.height=s,t.intersect=function(c){return N.polygon(t,r,c)},a},"rect_left_inv_arrow"),Dr=d(async(e,t)=>{const{shapeSvg:a,bbox:i}=await A(e,t,Y(t),!0),l=i.width+t.padding,s=i.height+t.padding,r=[{x:-2*s/6,y:0},{x:l-s/6,y:0},{x:l+2*s/6,y:-s},{x:s/6,y:-s}],n=U(a,l,s,r);return n.attr("style",t.style),T(t,n),t.intersect=function(c){return N.polygon(t,r,c)},a},"lean_right"),Nr=d(async(e,t)=>{const{shapeSvg:a,bbox:i}=await A(e,t,Y(t,void 0),!0),l=i.width+t.padding,s=i.height+t.padding,r=[{x:2*s/6,y:0},{x:l+s/6,y:0},{x:l-2*s/6,y:-s},{x:-s/6,y:-s}],n=U(a,l,s,r);return n.attr("style",t.style),T(t,n),t.intersect=function(c){return N.polygon(t,r,c)},a},"lean_left"),Tr=d(async(e,t)=>{const{shapeSvg:a,bbox:i}=await A(e,t,Y(t,void 0),!0),l=i.width+t.padding,s=i.height+t.padding,r=[{x:-2*s/6,y:0},{x:l+2*s/6,y:0},{x:l-s/6,y:-s},{x:s/6,y:-s}],n=U(a,l,s,r);return n.attr("style",t.style),T(t,n),t.intersect=function(c){return N.polygon(t,r,c)},a},"trapezoid"),Br=d(async(e,t)=>{const{shapeSvg:a,bbox:i}=await A(e,t,Y(t,void 0),!0),l=i.width+t.padding,s=i.height+t.padding,r=[{x:s/6,y:0},{x:l-s/6,y:0},{x:l+2*s/6,y:-s},{x:-2*s/6,y:-s}],n=U(a,l,s,r);return n.attr("style",t.style),T(t,n),t.intersect=function(c){return N.polygon(t,r,c)},a},"inv_trapezoid"),Cr=d(async(e,t)=>{const{shapeSvg:a,bbox:i}=await A(e,t,Y(t,void 0),!0),l=i.width+t.padding,s=i.height+t.padding,r=[{x:0,y:0},{x:l+s/2,y:0},{x:l,y:-s/2},{x:l+s/2,y:-s},{x:0,y:-s}],n=U(a,l,s,r);return n.attr("style",t.style),T(t,n),t.intersect=function(c){return N.polygon(t,r,c)},a},"rect_right_inv_arrow"),Ir=d(async(e,t)=>{const{shapeSvg:a,bbox:i}=await A(e,t,Y(t,void 0),!0),l=i.width+t.padding,s=l/2,r=s/(2.5+l/50),n=i.height+r+t.padding,c="M 0,"+r+" a "+s+","+r+" 0,0,0 "+l+" 0 a "+s+","+r+" 0,0,0 "+-l+" 0 l 0,"+n+" a "+s+","+r+" 0,0,0 "+l+" 0 l 0,"+-n,u=a.attr("label-offset-y",r).insert("path",":first-child").attr("style",t.style).attr("d",c).attr("transform","translate("+-l/2+","+-(n/2+r)+")");return T(t,u),t.intersect=function(o){const x=N.rect(t,o),w=x.x-t.x;if(s!=0&&(Math.abs(w)t.height/2-r)){let b=r*r*(1-w*w/(s*s));b!=0&&(b=Math.sqrt(b)),b=r-b,o.y-t.y>0&&(b=-b),x.y+=b}return x},a},"cylinder"),Or=d(async(e,t)=>{const{shapeSvg:a,bbox:i,halfPadding:l}=await A(e,t,"node "+t.classes+" "+t.class,!0),s=a.insert("rect",":first-child"),r=t.positioned?t.width:i.width+t.padding,n=t.positioned?t.height:i.height+t.padding,c=t.positioned?-r/2:-i.width/2-l,u=t.positioned?-n/2:-i.height/2-l;if(s.attr("class","basic label-container").attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("x",c).attr("y",u).attr("width",r).attr("height",n),t.props){const o=new Set(Object.keys(t.props));t.props.borders&&(ht(s,t.props.borders,r,n),o.delete("borders")),o.forEach(x=>{L.warn(`Unknown node property ${x}`)})}return T(t,s),t.intersect=function(o){return N.rect(t,o)},a},"rect"),Rr=d(async(e,t)=>{const{shapeSvg:a,bbox:i,halfPadding:l}=await A(e,t,"node "+t.classes,!0),s=a.insert("rect",":first-child"),r=t.positioned?t.width:i.width+t.padding,n=t.positioned?t.height:i.height+t.padding,c=t.positioned?-r/2:-i.width/2-l,u=t.positioned?-n/2:-i.height/2-l;if(s.attr("class","basic cluster composite label-container").attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("x",c).attr("y",u).attr("width",r).attr("height",n),t.props){const o=new Set(Object.keys(t.props));t.props.borders&&(ht(s,t.props.borders,r,n),o.delete("borders")),o.forEach(x=>{L.warn(`Unknown node property ${x}`)})}return T(t,s),t.intersect=function(o){return N.rect(t,o)},a},"composite"),zr=d(async(e,t)=>{const{shapeSvg:a}=await A(e,t,"label",!0);L.trace("Classes = ",t.class);const i=a.insert("rect",":first-child"),l=0,s=0;if(i.attr("width",l).attr("height",s),a.attr("class","label edgeLabel"),t.props){const r=new Set(Object.keys(t.props));t.props.borders&&(ht(i,t.props.borders,l,s),r.delete("borders")),r.forEach(n=>{L.warn(`Unknown node property ${n}`)})}return T(t,i),t.intersect=function(r){return N.rect(t,r)},a},"labelRect");function ht(e,t,a,i){const l=[],s=d(n=>{l.push(n,0)},"addBorder"),r=d(n=>{l.push(0,n)},"skipBorder");t.includes("t")?(L.debug("add top border"),s(a)):r(a),t.includes("r")?(L.debug("add right border"),s(i)):r(i),t.includes("b")?(L.debug("add bottom border"),s(a)):r(a),t.includes("l")?(L.debug("add left border"),s(i)):r(i),e.attr("stroke-dasharray",l.join(" "))}d(ht,"applyNodePropertyBorders");var Ar=d(async(e,t)=>{let a;t.classes?a="node "+t.classes:a="node default";const i=e.insert("g").attr("class",a).attr("id",t.domId||t.id),l=i.insert("rect",":first-child"),s=i.insert("line"),r=i.insert("g").attr("class","label"),n=t.labelText.flat?t.labelText.flat():t.labelText;let c="";typeof n=="object"?c=n[0]:c=n,L.info("Label text abc79",c,n,typeof n=="object");const u=r.node().appendChild(await K(c,t.labelStyle,!0,!0));let o={width:0,height:0};if(j(R().flowchart.htmlLabels)){const v=u.children[0],k=O(u);o=v.getBoundingClientRect(),k.attr("width",o.width),k.attr("height",o.height)}L.info("Text 2",n);const x=n.slice(1,n.length);let w=u.getBBox();const b=r.node().appendChild(await K(x.join?x.join("
"):x,t.labelStyle,!0,!0));if(j(R().flowchart.htmlLabels)){const v=b.children[0],k=O(b);o=v.getBoundingClientRect(),k.attr("width",o.width),k.attr("height",o.height)}const S=t.padding/2;return O(b).attr("transform","translate( "+(o.width>w.width?0:(w.width-o.width)/2)+", "+(w.height+S+5)+")"),O(u).attr("transform","translate( "+(o.width{const{shapeSvg:a,bbox:i}=await A(e,t,Y(t,void 0),!0),l=i.height+t.padding,s=i.width+l/4+t.padding,r=a.insert("rect",":first-child").attr("style",t.style).attr("rx",l/2).attr("ry",l/2).attr("x",-s/2).attr("y",-l/2).attr("width",s).attr("height",l);return T(t,r),t.intersect=function(n){return N.rect(t,n)},a},"stadium"),Fr=d(async(e,t)=>{const{shapeSvg:a,bbox:i,halfPadding:l}=await A(e,t,Y(t,void 0),!0),s=a.insert("circle",":first-child");return s.attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("r",i.width/2+l).attr("width",i.width+t.padding).attr("height",i.height+t.padding),L.info("Circle main"),T(t,s),t.intersect=function(r){return L.info("Circle intersect",t,i.width/2+l,r),N.circle(t,i.width/2+l,r)},a},"circle"),Wr=d(async(e,t)=>{const{shapeSvg:a,bbox:i,halfPadding:l}=await A(e,t,Y(t,void 0),!0),s=5,r=a.insert("g",":first-child"),n=r.insert("circle"),c=r.insert("circle");return r.attr("class",t.class),n.attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("r",i.width/2+l+s).attr("width",i.width+t.padding+s*2).attr("height",i.height+t.padding+s*2),c.attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("r",i.width/2+l).attr("width",i.width+t.padding).attr("height",i.height+t.padding),L.info("DoubleCircle main"),T(t,n),t.intersect=function(u){return L.info("DoubleCircle intersect",t,i.width/2+l+s,u),N.circle(t,i.width/2+l+s,u)},a},"doublecircle"),Pr=d(async(e,t)=>{const{shapeSvg:a,bbox:i}=await A(e,t,Y(t,void 0),!0),l=i.width+t.padding,s=i.height+t.padding,r=[{x:0,y:0},{x:l,y:0},{x:l,y:-s},{x:0,y:-s},{x:0,y:0},{x:-8,y:0},{x:l+8,y:0},{x:l+8,y:-s},{x:-8,y:-s},{x:-8,y:0}],n=U(a,l,s,r);return n.attr("style",t.style),T(t,n),t.intersect=function(c){return N.polygon(t,r,c)},a},"subroutine"),Yr=d((e,t)=>{const a=e.insert("g").attr("class","node default").attr("id",t.domId||t.id),i=a.insert("circle",":first-child");return i.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),T(t,i),t.intersect=function(l){return N.circle(t,7,l)},a},"start"),Mt=d((e,t,a)=>{const i=e.insert("g").attr("class","node default").attr("id",t.domId||t.id);let l=70,s=10;a==="LR"&&(l=10,s=70);const r=i.append("rect").attr("x",-1*l/2).attr("y",-1*s/2).attr("width",l).attr("height",s).attr("class","fork-join");return T(t,r),t.height=t.height+t.padding/2,t.width=t.width+t.padding/2,t.intersect=function(n){return N.rect(t,n)},i},"forkJoin"),Hr=d((e,t)=>{const a=e.insert("g").attr("class","node default").attr("id",t.domId||t.id),i=a.insert("circle",":first-child"),l=a.insert("circle",":first-child");return l.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),i.attr("class","state-end").attr("r",5).attr("width",10).attr("height",10),T(t,l),t.intersect=function(s){return N.circle(t,7,s)},a},"end"),Kr=d(async(e,t)=>{const a=t.padding/2,i=4,l=8;let s;t.classes?s="node "+t.classes:s="node default";const r=e.insert("g").attr("class",s).attr("id",t.domId||t.id),n=r.insert("rect",":first-child"),c=r.insert("line"),u=r.insert("line");let o=0,x=i;const w=r.insert("g").attr("class","label");let b=0;const S=t.classData.annotations?.[0],v=t.classData.annotations[0]?"«"+t.classData.annotations[0]+"»":"",k=w.node().appendChild(await K(v,t.labelStyle,!0,!0));let B=k.getBBox();if(j(R().flowchart.htmlLabels)){const E=k.children[0],h=O(k);B=E.getBoundingClientRect(),h.attr("width",B.width),h.attr("height",B.height)}t.classData.annotations[0]&&(x+=B.height+i,o+=B.width);let _=t.classData.label;t.classData.type!==void 0&&t.classData.type!==""&&(R().flowchart.htmlLabels?_+="<"+t.classData.type+">":_+="<"+t.classData.type+">");const D=w.node().appendChild(await K(_,t.labelStyle,!0,!0));O(D).attr("class","classTitle");let y=D.getBBox();if(j(R().flowchart.htmlLabels)){const E=D.children[0],h=O(D);y=E.getBoundingClientRect(),h.attr("width",y.width),h.attr("height",y.height)}x+=y.height+i,y.width>o&&(o=y.width);const g=[];t.classData.members.forEach(async E=>{const h=E.getDisplayDetails();let W=h.displayText;R().flowchart.htmlLabels&&(W=W.replace(//g,">"));const p=w.node().appendChild(await K(W,h.cssStyle?h.cssStyle:t.labelStyle,!0,!0));let I=p.getBBox();if(j(R().flowchart.htmlLabels)){const Z=p.children[0],V=O(p);I=Z.getBoundingClientRect(),V.attr("width",I.width),V.attr("height",I.height)}I.width>o&&(o=I.width),x+=I.height+i,g.push(p)}),x+=l;const f=[];if(t.classData.methods.forEach(async E=>{const h=E.getDisplayDetails();let W=h.displayText;R().flowchart.htmlLabels&&(W=W.replace(//g,">"));const p=w.node().appendChild(await K(W,h.cssStyle?h.cssStyle:t.labelStyle,!0,!0));let I=p.getBBox();if(j(R().flowchart.htmlLabels)){const Z=p.children[0],V=O(p);I=Z.getBoundingClientRect(),V.attr("width",I.width),V.attr("height",I.height)}I.width>o&&(o=I.width),x+=I.height+i,f.push(p)}),x+=l,S){let E=(o-B.width)/2;O(k).attr("transform","translate( "+(-1*o/2+E)+", "+-1*x/2+")"),b=B.height+i}let m=(o-y.width)/2;return O(D).attr("transform","translate( "+(-1*o/2+m)+", "+(-1*x/2+b)+")"),b+=y.height+i,c.attr("class","divider").attr("x1",-o/2-a).attr("x2",o/2+a).attr("y1",-x/2-a+l+b).attr("y2",-x/2-a+l+b),b+=l,g.forEach(E=>{O(E).attr("transform","translate( "+-o/2+", "+(-1*x/2+b+l/2)+")");const h=E?.getBBox();b+=(h?.height??0)+i}),b+=l,u.attr("class","divider").attr("x1",-o/2-a).attr("x2",o/2+a).attr("y1",-x/2-a+l+b).attr("y2",-x/2-a+l+b),b+=l,f.forEach(E=>{O(E).attr("transform","translate( "+-o/2+", "+(-1*x/2+b)+")");const h=E?.getBBox();b+=(h?.height??0)+i}),n.attr("style",t.style).attr("class","outer title-state").attr("x",-o/2-a).attr("y",-(x/2)-a).attr("width",o+t.padding).attr("height",x+t.padding),T(t,n),t.intersect=function(E){return N.rect(t,E)},r},"class_box"),Ft={rhombus:At,composite:Rr,question:At,rect:Or,labelRect:zr,rectWithTitle:Ar,choice:kr,circle:Fr,doublecircle:Wr,stadium:Mr,hexagon:vr,block_arrow:Er,rect_left_inv_arrow:_r,lean_right:Dr,lean_left:Nr,trapezoid:Tr,inv_trapezoid:Br,rect_right_inv_arrow:Cr,cylinder:Ir,start:Yr,end:Hr,note:Sr,subroutine:Pr,fork:Mt,join:Mt,class_box:Kr},lt={},te=d(async(e,t,a)=>{let i,l;if(t.link){let s;R().securityLevel==="sandbox"?s="_top":t.linkTarget&&(s=t.linkTarget||"_blank"),i=e.insert("svg:a").attr("xlink:href",t.link).attr("target",s),l=await Ft[t.shape](i,t,a)}else l=await Ft[t.shape](e,t,a),i=l;return t.tooltip&&l.attr("title",t.tooltip),t.class&&l.attr("class","node default "+t.class),lt[t.id]=i,t.haveCallback&<[t.id].attr("class",lt[t.id].attr("class")+" clickable"),i},"insertNode"),Xr=d(e=>{const t=lt[e.id];L.trace("Transforming node",e.diff,e,"translate("+(e.x-e.width/2-5)+", "+e.width/2+")");const a=8,i=e.diff||0;return e.clusterNode?t.attr("transform","translate("+(e.x+i-e.width/2)+", "+(e.y-e.height/2-a)+")"):t.attr("transform","translate("+e.x+", "+e.y+")"),i},"positionNode");function Dt(e,t,a=!1){const i=e;let l="default";(i?.classes?.length||0)>0&&(l=(i?.classes??[]).join(" ")),l=l+" flowchart-label";let s=0,r="",n;switch(i.type){case"round":s=5,r="rect";break;case"composite":s=0,r="composite",n=0;break;case"square":r="rect";break;case"diamond":r="question";break;case"hexagon":r="hexagon";break;case"block_arrow":r="block_arrow";break;case"odd":r="rect_left_inv_arrow";break;case"lean_right":r="lean_right";break;case"lean_left":r="lean_left";break;case"trapezoid":r="trapezoid";break;case"inv_trapezoid":r="inv_trapezoid";break;case"rect_left_inv_arrow":r="rect_left_inv_arrow";break;case"circle":r="circle";break;case"ellipse":r="ellipse";break;case"stadium":r="stadium";break;case"subroutine":r="subroutine";break;case"cylinder":r="cylinder";break;case"group":r="rect";break;case"doublecircle":r="doublecircle";break;default:r="rect"}const c=me(i?.styles??[]),u=i.label,o=i.size??{width:0,height:0,x:0,y:0};return{labelStyle:c.labelStyle,shape:r,labelText:u,rx:s,ry:s,class:l,style:c.style,id:i.id,directions:i.directions,width:o.width,height:o.height,x:o.x,y:o.y,positioned:a,intersect:void 0,type:i.type,padding:n??rt()?.block?.padding??0}}d(Dt,"getNodeFromBlock");async function ee(e,t,a){const i=Dt(t,a,!1);if(i.type==="group")return;const l=rt(),s=await te(e,i,{config:l}),r=s.node().getBBox(),n=a.getBlock(i.id);n.size={width:r.width,height:r.height,x:0,y:0,node:s},a.setBlock(n),s.remove()}d(ee,"calculateBlockSize");async function re(e,t,a){const i=Dt(t,a,!0);if(a.getBlock(i.id).type!=="space"){const s=rt();await te(e,i,{config:s}),t.intersect=i?.intersect,Xr(i)}}d(re,"insertBlockPositioned");async function dt(e,t,a,i){for(const l of t)await i(e,l,a),l.children&&await dt(e,l.children,a,i)}d(dt,"performOperations");async function ae(e,t,a){await dt(e,t,a,ee)}d(ae,"calculateBlockSizes");async function se(e,t,a){await dt(e,t,a,re)}d(se,"insertBlocks");async function ie(e,t,a,i,l){const s=new Se({multigraph:!0,compound:!0});s.setGraph({rankdir:"TB",nodesep:10,ranksep:10,marginx:8,marginy:8});for(const r of a)r.size&&s.setNode(r.id,{width:r.size.width,height:r.size.height,intersect:r.intersect});for(const r of t)if(r.start&&r.end){const n=i.getBlock(r.start),c=i.getBlock(r.end);if(n?.size&&c?.size){const u=n.size,o=c.size,x=[{x:u.x,y:u.y},{x:u.x+(o.x-u.x)/2,y:u.y+(o.y-u.y)/2},{x:o.x,y:o.y}];gr(e,{v:r.start,w:r.end,name:r.id},{...r,arrowTypeEnd:r.arrowTypeEnd,arrowTypeStart:r.arrowTypeStart,points:x,classes:"edge-thickness-normal edge-pattern-solid flowchart-link LS-a1 LE-b1"},void 0,"block",s,l),r.label&&(await cr(e,{...r,label:r.label,labelStyle:"stroke: #333; stroke-width: 1.5px;fill:none;",arrowTypeEnd:r.arrowTypeEnd,arrowTypeStart:r.arrowTypeStart,points:x,classes:"edge-thickness-normal edge-pattern-solid flowchart-link LS-a1 LE-b1"}),or({...r,x:x[1].x,y:x[1].y},{originalPath:x}))}}}d(ie,"insertEdges");var Ur=d(function(e,t){return t.db.getClasses()},"getClasses"),jr=d(async function(e,t,a,i){const{securityLevel:l,block:s}=rt(),r=i.db;let n;l==="sandbox"&&(n=O("#i"+t));const c=l==="sandbox"?O(n.nodes()[0].contentDocument.body):O("body"),u=l==="sandbox"?c.select(`[id="${t}"]`):O(`[id="${t}"]`);ar(u,["point","circle","cross"],i.type,t);const x=r.getBlocks(),w=r.getBlocksFlat(),b=r.getEdges(),S=u.insert("g").attr("class","block");await ae(S,x,r);const v=jt(r);if(await se(S,x,r),await ie(S,b,w,r,t),v){const k=v,B=Math.max(1,Math.round(.125*(k.width/k.height))),_=k.height+B+10,D=k.width+10,{useMaxWidth:y}=s;he(u,_,D,!!y),L.debug("Here Bounds",v,k),u.attr("viewBox",`${k.x-5} ${k.y-5} ${k.width+10} ${k.height+10}`)}},"draw"),Vr={draw:jr,getClasses:Ur},ea={parser:ve,db:Ke,renderer:Vr,styles:Ue};export{ea as diagram}; diff --git a/_astro/c4Diagram-YG6GDRKO.Dnzr4dCc.js b/_astro/c4Diagram-YG6GDRKO.Dnzr4dCc.js new file mode 100644 index 00000000..5d487a6c --- /dev/null +++ b/_astro/c4Diagram-YG6GDRKO.Dnzr4dCc.js @@ -0,0 +1,10 @@ +import{g as Oe,d as Re}from"./chunk-TZMSLE5B.t1iciHUx.js";import{_ as g,s as Se,g as De,a as Pe,b as Be,c as Dt,d as Nt,l as he,e as Ie,f as Me,h as Tt,i as pe,j as Le,w as Ne,k as Jt,m as ue}from"./mermaid.core.LbQlJBBQ.js";import"./page._rMDHl_T.js";var jt=(function(){var e=g(function(_t,x,m,v){for(m=m||{},v=_t.length;v--;m[_t[v]]=x);return m},"o"),t=[1,24],s=[1,25],o=[1,26],l=[1,27],a=[1,28],r=[1,63],n=[1,64],i=[1,65],u=[1,66],d=[1,67],y=[1,68],p=[1,69],E=[1,29],O=[1,30],S=[1,31],P=[1,32],M=[1,33],U=[1,34],H=[1,35],q=[1,36],G=[1,37],K=[1,38],J=[1,39],Z=[1,40],$=[1,41],tt=[1,42],et=[1,43],at=[1,44],it=[1,45],nt=[1,46],rt=[1,47],st=[1,48],lt=[1,50],ot=[1,51],ct=[1,52],ht=[1,53],ut=[1,54],dt=[1,55],ft=[1,56],pt=[1,57],yt=[1,58],gt=[1,59],bt=[1,60],Ct=[14,42],Xt=[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],Ot=[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],k=[1,82],A=[1,83],C=[1,84],w=[1,85],T=[12,14,42],re=[12,14,33,42],Bt=[12,14,33,42,76,77,79,80],vt=[12,33],Wt=[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],Qt={trace:g(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:g(function(x,m,v,b,R,h,Rt){var f=h.length-1;switch(R){case 3:b.setDirection("TB");break;case 4:b.setDirection("BT");break;case 5:b.setDirection("RL");break;case 6:b.setDirection("LR");break;case 8:case 9:case 10:case 11:case 12:b.setC4Type(h[f-3]);break;case 19:b.setTitle(h[f].substring(6)),this.$=h[f].substring(6);break;case 20:b.setAccDescription(h[f].substring(15)),this.$=h[f].substring(15);break;case 21:this.$=h[f].trim(),b.setTitle(this.$);break;case 22:case 23:this.$=h[f].trim(),b.setAccDescription(this.$);break;case 28:h[f].splice(2,0,"ENTERPRISE"),b.addPersonOrSystemBoundary(...h[f]),this.$=h[f];break;case 29:h[f].splice(2,0,"SYSTEM"),b.addPersonOrSystemBoundary(...h[f]),this.$=h[f];break;case 30:b.addPersonOrSystemBoundary(...h[f]),this.$=h[f];break;case 31:h[f].splice(2,0,"CONTAINER"),b.addContainerBoundary(...h[f]),this.$=h[f];break;case 32:b.addDeploymentNode("node",...h[f]),this.$=h[f];break;case 33:b.addDeploymentNode("nodeL",...h[f]),this.$=h[f];break;case 34:b.addDeploymentNode("nodeR",...h[f]),this.$=h[f];break;case 35:b.popBoundaryParseStack();break;case 39:b.addPersonOrSystem("person",...h[f]),this.$=h[f];break;case 40:b.addPersonOrSystem("external_person",...h[f]),this.$=h[f];break;case 41:b.addPersonOrSystem("system",...h[f]),this.$=h[f];break;case 42:b.addPersonOrSystem("system_db",...h[f]),this.$=h[f];break;case 43:b.addPersonOrSystem("system_queue",...h[f]),this.$=h[f];break;case 44:b.addPersonOrSystem("external_system",...h[f]),this.$=h[f];break;case 45:b.addPersonOrSystem("external_system_db",...h[f]),this.$=h[f];break;case 46:b.addPersonOrSystem("external_system_queue",...h[f]),this.$=h[f];break;case 47:b.addContainer("container",...h[f]),this.$=h[f];break;case 48:b.addContainer("container_db",...h[f]),this.$=h[f];break;case 49:b.addContainer("container_queue",...h[f]),this.$=h[f];break;case 50:b.addContainer("external_container",...h[f]),this.$=h[f];break;case 51:b.addContainer("external_container_db",...h[f]),this.$=h[f];break;case 52:b.addContainer("external_container_queue",...h[f]),this.$=h[f];break;case 53:b.addComponent("component",...h[f]),this.$=h[f];break;case 54:b.addComponent("component_db",...h[f]),this.$=h[f];break;case 55:b.addComponent("component_queue",...h[f]),this.$=h[f];break;case 56:b.addComponent("external_component",...h[f]),this.$=h[f];break;case 57:b.addComponent("external_component_db",...h[f]),this.$=h[f];break;case 58:b.addComponent("external_component_queue",...h[f]),this.$=h[f];break;case 60:b.addRel("rel",...h[f]),this.$=h[f];break;case 61:b.addRel("birel",...h[f]),this.$=h[f];break;case 62:b.addRel("rel_u",...h[f]),this.$=h[f];break;case 63:b.addRel("rel_d",...h[f]),this.$=h[f];break;case 64:b.addRel("rel_l",...h[f]),this.$=h[f];break;case 65:b.addRel("rel_r",...h[f]),this.$=h[f];break;case 66:b.addRel("rel_b",...h[f]),this.$=h[f];break;case 67:h[f].splice(0,1),b.addRel("rel",...h[f]),this.$=h[f];break;case 68:b.updateElStyle("update_el_style",...h[f]),this.$=h[f];break;case 69:b.updateRelStyle("update_rel_style",...h[f]),this.$=h[f];break;case 70:b.updateLayoutConfig("update_layout_config",...h[f]),this.$=h[f];break;case 71:this.$=[h[f]];break;case 72:h[f].unshift(h[f-1]),this.$=h[f];break;case 73:case 75:this.$=h[f].trim();break;case 74:let Et={};Et[h[f-1].trim()]=h[f].trim(),this.$=Et;break;case 76:this.$="";break}},"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:t,23:s,24:o,26:l,28:a,29:49,30:61,32:62,34:r,36:n,37:i,38:u,39:d,40:y,41:p,43:23,44:E,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:rt,63:st,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt},{13:70,19:20,20:21,21:22,22:t,23:s,24:o,26:l,28:a,29:49,30:61,32:62,34:r,36:n,37:i,38:u,39:d,40:y,41:p,43:23,44:E,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:rt,63:st,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt},{13:71,19:20,20:21,21:22,22:t,23:s,24:o,26:l,28:a,29:49,30:61,32:62,34:r,36:n,37:i,38:u,39:d,40:y,41:p,43:23,44:E,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:rt,63:st,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt},{13:72,19:20,20:21,21:22,22:t,23:s,24:o,26:l,28:a,29:49,30:61,32:62,34:r,36:n,37:i,38:u,39:d,40:y,41:p,43:23,44:E,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:rt,63:st,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt},{13:73,19:20,20:21,21:22,22:t,23:s,24:o,26:l,28:a,29:49,30:61,32:62,34:r,36:n,37:i,38:u,39:d,40:y,41:p,43:23,44:E,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:rt,63:st,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt},{14:[1,74]},e(Ct,[2,13],{43:23,29:49,30:61,32:62,20:75,34:r,36:n,37:i,38:u,39:d,40:y,41:p,44:E,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:rt,63:st,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt}),e(Ct,[2,14]),e(Xt,[2,16],{12:[1,76]}),e(Ct,[2,36],{12:[1,77]}),e(Ot,[2,19]),e(Ot,[2,20]),{25:[1,78]},{27:[1,79]},e(Ot,[2,23]),{35:80,75:81,76:k,77:A,79:C,80:w},{35:86,75:81,76:k,77:A,79:C,80:w},{35:87,75:81,76:k,77:A,79:C,80:w},{35:88,75:81,76:k,77:A,79:C,80:w},{35:89,75:81,76:k,77:A,79:C,80:w},{35:90,75:81,76:k,77:A,79:C,80:w},{35:91,75:81,76:k,77:A,79:C,80:w},{35:92,75:81,76:k,77:A,79:C,80:w},{35:93,75:81,76:k,77:A,79:C,80:w},{35:94,75:81,76:k,77:A,79:C,80:w},{35:95,75:81,76:k,77:A,79:C,80:w},{35:96,75:81,76:k,77:A,79:C,80:w},{35:97,75:81,76:k,77:A,79:C,80:w},{35:98,75:81,76:k,77:A,79:C,80:w},{35:99,75:81,76:k,77:A,79:C,80:w},{35:100,75:81,76:k,77:A,79:C,80:w},{35:101,75:81,76:k,77:A,79:C,80:w},{35:102,75:81,76:k,77:A,79:C,80:w},{35:103,75:81,76:k,77:A,79:C,80:w},{35:104,75:81,76:k,77:A,79:C,80:w},e(T,[2,59]),{35:105,75:81,76:k,77:A,79:C,80:w},{35:106,75:81,76:k,77:A,79:C,80:w},{35:107,75:81,76:k,77:A,79:C,80:w},{35:108,75:81,76:k,77:A,79:C,80:w},{35:109,75:81,76:k,77:A,79:C,80:w},{35:110,75:81,76:k,77:A,79:C,80:w},{35:111,75:81,76:k,77:A,79:C,80:w},{35:112,75:81,76:k,77:A,79:C,80:w},{35:113,75:81,76:k,77:A,79:C,80:w},{35:114,75:81,76:k,77:A,79:C,80:w},{35:115,75:81,76:k,77:A,79:C,80:w},{20:116,29:49,30:61,32:62,34:r,36:n,37:i,38:u,39:d,40:y,41:p,43:23,44:E,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:rt,63:st,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt},{12:[1,118],33:[1,117]},{35:119,75:81,76:k,77:A,79:C,80:w},{35:120,75:81,76:k,77:A,79:C,80:w},{35:121,75:81,76:k,77:A,79:C,80:w},{35:122,75:81,76:k,77:A,79:C,80:w},{35:123,75:81,76:k,77:A,79:C,80:w},{35:124,75:81,76:k,77:A,79:C,80:w},{35:125,75:81,76:k,77:A,79:C,80:w},{14:[1,126]},{14:[1,127]},{14:[1,128]},{14:[1,129]},{1:[2,8]},e(Ct,[2,15]),e(Xt,[2,17],{21:22,19:130,22:t,23:s,24:o,26:l,28:a}),e(Ct,[2,37],{19:20,20:21,21:22,43:23,29:49,30:61,32:62,13:131,22:t,23:s,24:o,26:l,28:a,34:r,36:n,37:i,38:u,39:d,40:y,41:p,44:E,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:rt,63:st,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt}),e(Ot,[2,21]),e(Ot,[2,22]),e(T,[2,39]),e(re,[2,71],{75:81,35:132,76:k,77:A,79:C,80:w}),e(Bt,[2,73]),{78:[1,133]},e(Bt,[2,75]),e(Bt,[2,76]),e(T,[2,40]),e(T,[2,41]),e(T,[2,42]),e(T,[2,43]),e(T,[2,44]),e(T,[2,45]),e(T,[2,46]),e(T,[2,47]),e(T,[2,48]),e(T,[2,49]),e(T,[2,50]),e(T,[2,51]),e(T,[2,52]),e(T,[2,53]),e(T,[2,54]),e(T,[2,55]),e(T,[2,56]),e(T,[2,57]),e(T,[2,58]),e(T,[2,60]),e(T,[2,61]),e(T,[2,62]),e(T,[2,63]),e(T,[2,64]),e(T,[2,65]),e(T,[2,66]),e(T,[2,67]),e(T,[2,68]),e(T,[2,69]),e(T,[2,70]),{31:134,42:[1,135]},{12:[1,136]},{33:[1,137]},e(vt,[2,28]),e(vt,[2,29]),e(vt,[2,30]),e(vt,[2,31]),e(vt,[2,32]),e(vt,[2,33]),e(vt,[2,34]),{1:[2,9]},{1:[2,10]},{1:[2,11]},{1:[2,12]},e(Xt,[2,18]),e(Ct,[2,38]),e(re,[2,72]),e(Bt,[2,74]),e(T,[2,24]),e(T,[2,35]),e(Wt,[2,25]),e(Wt,[2,26],{12:[1,138]}),e(Wt,[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:g(function(x,m){if(m.recoverable)this.trace(x);else{var v=new Error(x);throw v.hash=m,v}},"parseError"),parse:g(function(x){var m=this,v=[0],b=[],R=[null],h=[],Rt=this.table,f="",Et=0,se=0,Ae=2,le=1,Ce=h.slice.call(arguments,1),D=Object.create(this.lexer),kt={yy:{}};for(var Ht in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Ht)&&(kt.yy[Ht]=this.yy[Ht]);D.setInput(x,kt.yy),kt.yy.lexer=D,kt.yy.parser=this,typeof D.yylloc>"u"&&(D.yylloc={});var qt=D.yylloc;h.push(qt);var we=D.options&&D.options.ranges;typeof kt.yy.parseError=="function"?this.parseError=kt.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Te(L){v.length=v.length-2*L,R.length=R.length-L,h.length=h.length-L}g(Te,"popStack");function oe(){var L;return L=b.pop()||D.lex()||le,typeof L!="number"&&(L instanceof Array&&(b=L,L=b.pop()),L=m.symbols_[L]||L),L}g(oe,"lex");for(var I,At,N,Gt,wt={},Mt,W,ce,Lt;;){if(At=v[v.length-1],this.defaultActions[At]?N=this.defaultActions[At]:((I===null||typeof I>"u")&&(I=oe()),N=Rt[At]&&Rt[At][I]),typeof N>"u"||!N.length||!N[0]){var Kt="";Lt=[];for(Mt in Rt[At])this.terminals_[Mt]&&Mt>Ae&&Lt.push("'"+this.terminals_[Mt]+"'");D.showPosition?Kt="Parse error on line "+(Et+1)+`: +`+D.showPosition()+` +Expecting `+Lt.join(", ")+", got '"+(this.terminals_[I]||I)+"'":Kt="Parse error on line "+(Et+1)+": Unexpected "+(I==le?"end of input":"'"+(this.terminals_[I]||I)+"'"),this.parseError(Kt,{text:D.match,token:this.terminals_[I]||I,line:D.yylineno,loc:qt,expected:Lt})}if(N[0]instanceof Array&&N.length>1)throw new Error("Parse Error: multiple actions possible at state: "+At+", token: "+I);switch(N[0]){case 1:v.push(I),R.push(D.yytext),h.push(D.yylloc),v.push(N[1]),I=null,se=D.yyleng,f=D.yytext,Et=D.yylineno,qt=D.yylloc;break;case 2:if(W=this.productions_[N[1]][1],wt.$=R[R.length-W],wt._$={first_line:h[h.length-(W||1)].first_line,last_line:h[h.length-1].last_line,first_column:h[h.length-(W||1)].first_column,last_column:h[h.length-1].last_column},we&&(wt._$.range=[h[h.length-(W||1)].range[0],h[h.length-1].range[1]]),Gt=this.performAction.apply(wt,[f,se,Et,kt.yy,N[1],R,h].concat(Ce)),typeof Gt<"u")return Gt;W&&(v=v.slice(0,-1*W*2),R=R.slice(0,-1*W),h=h.slice(0,-1*W)),v.push(this.productions_[N[1]][0]),R.push(wt.$),h.push(wt._$),ce=Rt[v[v.length-2]][v[v.length-1]],v.push(ce);break;case 3:return!0}}return!0},"parse")},ke=(function(){var _t={EOF:1,parseError:g(function(m,v){if(this.yy.parser)this.yy.parser.parseError(m,v);else throw new Error(m)},"parseError"),setInput:g(function(x,m){return this.yy=m||this.yy||{},this._input=x,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:g(function(){var x=this._input[0];this.yytext+=x,this.yyleng++,this.offset++,this.match+=x,this.matched+=x;var m=x.match(/(?:\r\n?|\n).*/g);return m?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),x},"input"),unput:g(function(x){var m=x.length,v=x.split(/(?:\r\n?|\n)/g);this._input=x+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-m),this.offset-=m;var b=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),v.length-1&&(this.yylineno-=v.length-1);var R=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:v?(v.length===b.length?this.yylloc.first_column:0)+b[b.length-v.length].length-v[0].length:this.yylloc.first_column-m},this.options.ranges&&(this.yylloc.range=[R[0],R[0]+this.yyleng-m]),this.yyleng=this.yytext.length,this},"unput"),more:g(function(){return this._more=!0,this},"more"),reject:g(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:g(function(x){this.unput(this.match.slice(x))},"less"),pastInput:g(function(){var x=this.matched.substr(0,this.matched.length-this.match.length);return(x.length>20?"...":"")+x.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:g(function(){var x=this.match;return x.length<20&&(x+=this._input.substr(0,20-x.length)),(x.substr(0,20)+(x.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:g(function(){var x=this.pastInput(),m=new Array(x.length+1).join("-");return x+this.upcomingInput()+` +`+m+"^"},"showPosition"),test_match:g(function(x,m){var v,b,R;if(this.options.backtrack_lexer&&(R={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&&(R.yylloc.range=this.yylloc.range.slice(0))),b=x[0].match(/(?:\r\n?|\n).*/g),b&&(this.yylineno+=b.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:b?b[b.length-1].length-b[b.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+x[0].length},this.yytext+=x[0],this.match+=x[0],this.matches=x,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(x[0].length),this.matched+=x[0],v=this.performAction.call(this,this.yy,this,m,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),v)return v;if(this._backtrack){for(var h in R)this[h]=R[h];return!1}return!1},"test_match"),next:g(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var x,m,v,b;this._more||(this.yytext="",this.match="");for(var R=this._currentRules(),h=0;hm[0].length)){if(m=v,b=h,this.options.backtrack_lexer){if(x=this.test_match(v,R[h]),x!==!1)return x;if(this._backtrack){m=!1;continue}else return!1}else if(!this.options.flex)break}return m?(x=this.test_match(m,R[b]),x!==!1?x:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:g(function(){var m=this.next();return m||this.lex()},"lex"),begin:g(function(m){this.conditionStack.push(m)},"begin"),popState:g(function(){var m=this.conditionStack.length-1;return m>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:g(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:g(function(m){return m=this.conditionStack.length-1-Math.abs(m||0),m>=0?this.conditionStack[m]:"INITIAL"},"topState"),pushState:g(function(m){this.begin(m)},"pushState"),stateStackSize:g(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:g(function(m,v,b,R){switch(b){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:this.popState();break;case 12:return"acc_descr_multiline_value";case 13:break;case 14:c;break;case 15:return 12;case 16:break;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:return this.begin("node"),39;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:return this.begin("rel_u"),66;case 53:return this.begin("rel_u"),66;case 54:return this.begin("rel_d"),67;case 55:return this.begin("rel_d"),67;case 56:return this.begin("rel_l"),68;case 57:return this.begin("rel_l"),68;case 58:return this.begin("rel_r"),69;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:this.popState(),this.popState();break;case 69:return 80;case 70:break;case 71:return 80;case 72:this.begin("string");break;case 73:this.popState();break;case 74: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 79:this.popState(),this.popState();break;case 80:return"STR";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}}};return _t})();Qt.lexer=ke;function It(){this.yy={}}return g(It,"Parser"),It.prototype=Qt,Qt.Parser=It,new It})();jt.parser=jt;var Ye=jt,V=[],xt=[""],B="global",F="",X=[{alias:"global",label:{text:"global"},type:{text:"global"},tags:null,link:null,parentBoundary:""}],Pt=[],ee="",ae=!1,Ut=4,Ft=2,ye,je=g(function(){return ye},"getC4Type"),Ue=g(function(e){ye=pe(e,Dt())},"setC4Type"),Fe=g(function(e,t,s,o,l,a,r,n,i){if(e==null||t===void 0||t===null||s===void 0||s===null||o===void 0||o===null)return;let u={};const d=Pt.find(y=>y.from===t&&y.to===s);if(d?u=d:Pt.push(u),u.type=e,u.from=t,u.to=s,u.label={text:o},l==null)u.techn={text:""};else if(typeof l=="object"){let[y,p]=Object.entries(l)[0];u[y]={text:p}}else u.techn={text:l};if(a==null)u.descr={text:""};else if(typeof a=="object"){let[y,p]=Object.entries(a)[0];u[y]={text:p}}else u.descr={text:a};if(typeof r=="object"){let[y,p]=Object.entries(r)[0];u[y]=p}else u.sprite=r;if(typeof n=="object"){let[y,p]=Object.entries(n)[0];u[y]=p}else u.tags=n;if(typeof i=="object"){let[y,p]=Object.entries(i)[0];u[y]=p}else u.link=i;u.wrap=mt()},"addRel"),Ve=g(function(e,t,s,o,l,a,r){if(t===null||s===null)return;let n={};const i=V.find(u=>u.alias===t);if(i&&t===i.alias?n=i:(n.alias=t,V.push(n)),s==null?n.label={text:""}:n.label={text:s},o==null)n.descr={text:""};else if(typeof o=="object"){let[u,d]=Object.entries(o)[0];n[u]={text:d}}else n.descr={text:o};if(typeof l=="object"){let[u,d]=Object.entries(l)[0];n[u]=d}else n.sprite=l;if(typeof a=="object"){let[u,d]=Object.entries(a)[0];n[u]=d}else n.tags=a;if(typeof r=="object"){let[u,d]=Object.entries(r)[0];n[u]=d}else n.link=r;n.typeC4Shape={text:e},n.parentBoundary=B,n.wrap=mt()},"addPersonOrSystem"),ze=g(function(e,t,s,o,l,a,r,n){if(t===null||s===null)return;let i={};const u=V.find(d=>d.alias===t);if(u&&t===u.alias?i=u:(i.alias=t,V.push(i)),s==null?i.label={text:""}:i.label={text:s},o==null)i.techn={text:""};else if(typeof o=="object"){let[d,y]=Object.entries(o)[0];i[d]={text:y}}else i.techn={text:o};if(l==null)i.descr={text:""};else if(typeof l=="object"){let[d,y]=Object.entries(l)[0];i[d]={text:y}}else i.descr={text:l};if(typeof a=="object"){let[d,y]=Object.entries(a)[0];i[d]=y}else i.sprite=a;if(typeof r=="object"){let[d,y]=Object.entries(r)[0];i[d]=y}else i.tags=r;if(typeof n=="object"){let[d,y]=Object.entries(n)[0];i[d]=y}else i.link=n;i.wrap=mt(),i.typeC4Shape={text:e},i.parentBoundary=B},"addContainer"),Xe=g(function(e,t,s,o,l,a,r,n){if(t===null||s===null)return;let i={};const u=V.find(d=>d.alias===t);if(u&&t===u.alias?i=u:(i.alias=t,V.push(i)),s==null?i.label={text:""}:i.label={text:s},o==null)i.techn={text:""};else if(typeof o=="object"){let[d,y]=Object.entries(o)[0];i[d]={text:y}}else i.techn={text:o};if(l==null)i.descr={text:""};else if(typeof l=="object"){let[d,y]=Object.entries(l)[0];i[d]={text:y}}else i.descr={text:l};if(typeof a=="object"){let[d,y]=Object.entries(a)[0];i[d]=y}else i.sprite=a;if(typeof r=="object"){let[d,y]=Object.entries(r)[0];i[d]=y}else i.tags=r;if(typeof n=="object"){let[d,y]=Object.entries(n)[0];i[d]=y}else i.link=n;i.wrap=mt(),i.typeC4Shape={text:e},i.parentBoundary=B},"addComponent"),We=g(function(e,t,s,o,l){if(e===null||t===null)return;let a={};const r=X.find(n=>n.alias===e);if(r&&e===r.alias?a=r:(a.alias=e,X.push(a)),t==null?a.label={text:""}:a.label={text:t},s==null)a.type={text:"system"};else if(typeof s=="object"){let[n,i]=Object.entries(s)[0];a[n]={text:i}}else a.type={text:s};if(typeof o=="object"){let[n,i]=Object.entries(o)[0];a[n]=i}else a.tags=o;if(typeof l=="object"){let[n,i]=Object.entries(l)[0];a[n]=i}else a.link=l;a.parentBoundary=B,a.wrap=mt(),F=B,B=e,xt.push(F)},"addPersonOrSystemBoundary"),Qe=g(function(e,t,s,o,l){if(e===null||t===null)return;let a={};const r=X.find(n=>n.alias===e);if(r&&e===r.alias?a=r:(a.alias=e,X.push(a)),t==null?a.label={text:""}:a.label={text:t},s==null)a.type={text:"container"};else if(typeof s=="object"){let[n,i]=Object.entries(s)[0];a[n]={text:i}}else a.type={text:s};if(typeof o=="object"){let[n,i]=Object.entries(o)[0];a[n]=i}else a.tags=o;if(typeof l=="object"){let[n,i]=Object.entries(l)[0];a[n]=i}else a.link=l;a.parentBoundary=B,a.wrap=mt(),F=B,B=e,xt.push(F)},"addContainerBoundary"),He=g(function(e,t,s,o,l,a,r,n){if(t===null||s===null)return;let i={};const u=X.find(d=>d.alias===t);if(u&&t===u.alias?i=u:(i.alias=t,X.push(i)),s==null?i.label={text:""}:i.label={text:s},o==null)i.type={text:"node"};else if(typeof o=="object"){let[d,y]=Object.entries(o)[0];i[d]={text:y}}else i.type={text:o};if(l==null)i.descr={text:""};else if(typeof l=="object"){let[d,y]=Object.entries(l)[0];i[d]={text:y}}else i.descr={text:l};if(typeof r=="object"){let[d,y]=Object.entries(r)[0];i[d]=y}else i.tags=r;if(typeof n=="object"){let[d,y]=Object.entries(n)[0];i[d]=y}else i.link=n;i.nodeType=e,i.parentBoundary=B,i.wrap=mt(),F=B,B=t,xt.push(F)},"addDeploymentNode"),qe=g(function(){B=F,xt.pop(),F=xt.pop(),xt.push(F)},"popBoundaryParseStack"),Ge=g(function(e,t,s,o,l,a,r,n,i,u,d){let y=V.find(p=>p.alias===t);if(!(y===void 0&&(y=X.find(p=>p.alias===t),y===void 0))){if(s!=null)if(typeof s=="object"){let[p,E]=Object.entries(s)[0];y[p]=E}else y.bgColor=s;if(o!=null)if(typeof o=="object"){let[p,E]=Object.entries(o)[0];y[p]=E}else y.fontColor=o;if(l!=null)if(typeof l=="object"){let[p,E]=Object.entries(l)[0];y[p]=E}else y.borderColor=l;if(a!=null)if(typeof a=="object"){let[p,E]=Object.entries(a)[0];y[p]=E}else y.shadowing=a;if(r!=null)if(typeof r=="object"){let[p,E]=Object.entries(r)[0];y[p]=E}else y.shape=r;if(n!=null)if(typeof n=="object"){let[p,E]=Object.entries(n)[0];y[p]=E}else y.sprite=n;if(i!=null)if(typeof i=="object"){let[p,E]=Object.entries(i)[0];y[p]=E}else y.techn=i;if(u!=null)if(typeof u=="object"){let[p,E]=Object.entries(u)[0];y[p]=E}else y.legendText=u;if(d!=null)if(typeof d=="object"){let[p,E]=Object.entries(d)[0];y[p]=E}else y.legendSprite=d}},"updateElStyle"),Ke=g(function(e,t,s,o,l,a,r){const n=Pt.find(i=>i.from===t&&i.to===s);if(n!==void 0){if(o!=null)if(typeof o=="object"){let[i,u]=Object.entries(o)[0];n[i]=u}else n.textColor=o;if(l!=null)if(typeof l=="object"){let[i,u]=Object.entries(l)[0];n[i]=u}else n.lineColor=l;if(a!=null)if(typeof a=="object"){let[i,u]=Object.entries(a)[0];n[i]=parseInt(u)}else n.offsetX=parseInt(a);if(r!=null)if(typeof r=="object"){let[i,u]=Object.entries(r)[0];n[i]=parseInt(u)}else n.offsetY=parseInt(r)}},"updateRelStyle"),Je=g(function(e,t,s){let o=Ut,l=Ft;if(typeof t=="object"){const a=Object.values(t)[0];o=parseInt(a)}else o=parseInt(t);if(typeof s=="object"){const a=Object.values(s)[0];l=parseInt(a)}else l=parseInt(s);o>=1&&(Ut=o),l>=1&&(Ft=l)},"updateLayoutConfig"),Ze=g(function(){return Ut},"getC4ShapeInRow"),$e=g(function(){return Ft},"getC4BoundaryInRow"),t0=g(function(){return B},"getCurrentBoundaryParse"),e0=g(function(){return F},"getParentBoundaryParse"),ge=g(function(e){return e==null?V:V.filter(t=>t.parentBoundary===e)},"getC4ShapeArray"),a0=g(function(e){return V.find(t=>t.alias===e)},"getC4Shape"),i0=g(function(e){return Object.keys(ge(e))},"getC4ShapeKeys"),be=g(function(e){return e==null?X:X.filter(t=>t.parentBoundary===e)},"getBoundaries"),n0=be,r0=g(function(){return Pt},"getRels"),s0=g(function(){return ee},"getTitle"),l0=g(function(e){ae=e},"setWrap"),mt=g(function(){return ae},"autoWrap"),o0=g(function(){V=[],X=[{alias:"global",label:{text:"global"},type:{text:"global"},tags:null,link:null,parentBoundary:""}],F="",B="global",xt=[""],Pt=[],xt=[""],ee="",ae=!1,Ut=4,Ft=2},"clear"),c0={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},h0={FILLED:0,OPEN:1},u0={LEFTOF:0,RIGHTOF:1,OVER:2},d0=g(function(e){ee=pe(e,Dt())},"setTitle"),Zt={addPersonOrSystem:Ve,addPersonOrSystemBoundary:We,addContainer:ze,addContainerBoundary:Qe,addComponent:Xe,addDeploymentNode:He,popBoundaryParseStack:qe,addRel:Fe,updateElStyle:Ge,updateRelStyle:Ke,updateLayoutConfig:Je,autoWrap:mt,setWrap:l0,getC4ShapeArray:ge,getC4Shape:a0,getC4ShapeKeys:i0,getBoundaries:be,getBoundarys:n0,getCurrentBoundaryParse:t0,getParentBoundaryParse:e0,getRels:r0,getTitle:s0,getC4Type:je,getC4ShapeInRow:Ze,getC4BoundaryInRow:$e,setAccTitle:Be,getAccTitle:Pe,getAccDescription:De,setAccDescription:Se,getConfig:g(()=>Dt().c4,"getConfig"),clear:o0,LINETYPE:c0,ARROWTYPE:h0,PLACEMENT:u0,setTitle:d0,setC4Type:Ue},ie=g(function(e,t){return Re(e,t)},"drawRect"),_e=g(function(e,t,s,o,l,a){const r=e.append("image");r.attr("width",t),r.attr("height",s),r.attr("x",o),r.attr("y",l);let n=a.startsWith("data:image/png;base64")?a:Le.sanitizeUrl(a);r.attr("xlink:href",n)},"drawImage"),f0=g((e,t,s)=>{const o=e.append("g");let l=0;for(let a of t){let r=a.textColor?a.textColor:"#444444",n=a.lineColor?a.lineColor:"#444444",i=a.offsetX?parseInt(a.offsetX):0,u=a.offsetY?parseInt(a.offsetY):0,d="";if(l===0){let p=o.append("line");p.attr("x1",a.startPoint.x),p.attr("y1",a.startPoint.y),p.attr("x2",a.endPoint.x),p.attr("y2",a.endPoint.y),p.attr("stroke-width","1"),p.attr("stroke",n),p.style("fill","none"),a.type!=="rel_b"&&p.attr("marker-end","url("+d+"#arrowhead)"),(a.type==="birel"||a.type==="rel_b")&&p.attr("marker-start","url("+d+"#arrowend)"),l=-1}else{let p=o.append("path");p.attr("fill","none").attr("stroke-width","1").attr("stroke",n).attr("d","Mstartx,starty Qcontrolx,controly stopx,stopy ".replaceAll("startx",a.startPoint.x).replaceAll("starty",a.startPoint.y).replaceAll("controlx",a.startPoint.x+(a.endPoint.x-a.startPoint.x)/2-(a.endPoint.x-a.startPoint.x)/4).replaceAll("controly",a.startPoint.y+(a.endPoint.y-a.startPoint.y)/2).replaceAll("stopx",a.endPoint.x).replaceAll("stopy",a.endPoint.y)),a.type!=="rel_b"&&p.attr("marker-end","url("+d+"#arrowhead)"),(a.type==="birel"||a.type==="rel_b")&&p.attr("marker-start","url("+d+"#arrowend)")}let y=s.messageFont();Q(s)(a.label.text,o,Math.min(a.startPoint.x,a.endPoint.x)+Math.abs(a.endPoint.x-a.startPoint.x)/2+i,Math.min(a.startPoint.y,a.endPoint.y)+Math.abs(a.endPoint.y-a.startPoint.y)/2+u,a.label.width,a.label.height,{fill:r},y),a.techn&&a.techn.text!==""&&(y=s.messageFont(),Q(s)("["+a.techn.text+"]",o,Math.min(a.startPoint.x,a.endPoint.x)+Math.abs(a.endPoint.x-a.startPoint.x)/2+i,Math.min(a.startPoint.y,a.endPoint.y)+Math.abs(a.endPoint.y-a.startPoint.y)/2+s.messageFontSize+5+u,Math.max(a.label.width,a.techn.width),a.techn.height,{fill:r,"font-style":"italic"},y))}},"drawRels"),p0=g(function(e,t,s){const o=e.append("g");let l=t.bgColor?t.bgColor:"none",a=t.borderColor?t.borderColor:"#444444",r=t.fontColor?t.fontColor:"black",n={"stroke-width":1,"stroke-dasharray":"7.0,7.0"};t.nodeType&&(n={"stroke-width":1});let i={x:t.x,y:t.y,fill:l,stroke:a,width:t.width,height:t.height,rx:2.5,ry:2.5,attrs:n};ie(o,i);let u=s.boundaryFont();u.fontWeight="bold",u.fontSize=u.fontSize+2,u.fontColor=r,Q(s)(t.label.text,o,t.x,t.y+t.label.Y,t.width,t.height,{fill:"#444444"},u),t.type&&t.type.text!==""&&(u=s.boundaryFont(),u.fontColor=r,Q(s)(t.type.text,o,t.x,t.y+t.type.Y,t.width,t.height,{fill:"#444444"},u)),t.descr&&t.descr.text!==""&&(u=s.boundaryFont(),u.fontSize=u.fontSize-2,u.fontColor=r,Q(s)(t.descr.text,o,t.x,t.y+t.descr.Y,t.width,t.height,{fill:"#444444"},u))},"drawBoundary"),y0=g(function(e,t,s){let o=t.bgColor?t.bgColor:s[t.typeC4Shape.text+"_bg_color"],l=t.borderColor?t.borderColor:s[t.typeC4Shape.text+"_border_color"],a=t.fontColor?t.fontColor:"#FFFFFF",r="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAACD0lEQVR4Xu2YoU4EMRCGT+4j8Ai8AhaH4QHgAUjQuFMECUgMIUgwJAgMhgQsAYUiJCiQIBBY+EITsjfTdme6V24v4c8vyGbb+ZjOtN0bNcvjQXmkH83WvYBWto6PLm6v7p7uH1/w2fXD+PBycX1Pv2l3IdDm/vn7x+dXQiAubRzoURa7gRZWd0iGRIiJbOnhnfYBQZNJjNbuyY2eJG8fkDE3bbG4ep6MHUAsgYxmE3nVs6VsBWJSGccsOlFPmLIViMzLOB7pCVO2AtHJMohH7Fh6zqitQK7m0rJvAVYgGcEpe//PLdDz65sM4pF9N7ICcXDKIB5Nv6j7tD0NoSdM2QrU9Gg0ewE1LqBhHR3BBdvj2vapnidjHxD/q6vd7Pvhr31AwcY8eXMTXAKECZZJFXuEq27aLgQK5uLMohCenGGuGewOxSjBvYBqeG6B+Nqiblggdjnc+ZXDy+FNFpFzw76O3UBAROuXh6FoiAcf5g9eTvUgzy0nWg6I8cXHRUpg5bOVBCo+KDpFajOf23GgPme7RSQ+lacIENUgJ6gg1k6HjgOlqnLqip4tEuhv0hNEMXUD0clyXE3p6pZA0S2nnvTlXwLJEZWlb7cTQH1+USgTN4VhAenm/wea1OCAOmqo6fE1WCb9WSKBah+rbUWPWAmE2Rvk0ApiB45eOyNAzU8xcTvj8KvkKEoOaIYeHNA3ZuygAvFMUO0AAAAASUVORK5CYII=";switch(t.typeC4Shape.text){case"person":r="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":r="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAAB6ElEQVR4Xu2YLY+EMBCG9+dWr0aj0Wg0Go1Go0+j8Xdv2uTCvv1gpt0ebHKPuhDaeW4605Z9mJvx4AdXUyTUdd08z+u6flmWZRnHsWkafk9DptAwDPu+f0eAYtu2PEaGWuj5fCIZrBAC2eLBAnRCsEkkxmeaJp7iDJ2QMDdHsLg8SxKFEJaAo8lAXnmuOFIhTMpxxKATebo4UiFknuNo4OniSIXQyRxEA3YsnjGCVEjVXD7yLUAqxBGUyPv/Y4W2beMgGuS7kVQIBycH0fD+oi5pezQETxdHKmQKGk1eQEYldK+jw5GxPfZ9z7Mk0Qnhf1W1m3w//EUn5BDmSZsbR44QQLBEqrBHqOrmSKaQAxdnLArCrxZcM7A7ZKs4ioRq8LFC+NpC3WCBJsvpVw5edm9iEXFuyNfxXAgSwfrFQ1c0iNda8AdejvUgnktOtJQQxmcfFzGglc5WVCj7oDgFqU18boeFSs52CUh8LE8BIVQDT1ABrB0HtgSEYlX5doJnCwv9TXocKCaKbnwhdDKPq4lf3SwU3HLq4V/+WYhHVMa/3b4IlfyikAduCkcBc7mQ3/z/Qq/cTuikhkzB12Ae/mcJC9U+Vo8Ej1gWAtgbeGgFsAMHr50BIWOLCbezvhpBFUdY6EJuJ/QDW0XoMX60zZ0AAAAASUVORK5CYII=";break}const n=e.append("g");n.attr("class","person-man");const i=Oe();switch(t.typeC4Shape.text){case"person":case"external_person":case"system":case"external_system":case"container":case"external_container":case"component":case"external_component":i.x=t.x,i.y=t.y,i.fill=o,i.width=t.width,i.height=t.height,i.stroke=l,i.rx=2.5,i.ry=2.5,i.attrs={"stroke-width":.5},ie(n,i);break;case"system_db":case"external_system_db":case"container_db":case"external_container_db":case"component_db":case"external_component_db":n.append("path").attr("fill",o).attr("stroke-width","0.5").attr("stroke",l).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",t.x).replaceAll("starty",t.y).replaceAll("half",t.width/2).replaceAll("height",t.height)),n.append("path").attr("fill","none").attr("stroke-width","0.5").attr("stroke",l).attr("d","Mstartx,startyc0,10 half,10 half,10c0,0 half,0 half,-10".replaceAll("startx",t.x).replaceAll("starty",t.y).replaceAll("half",t.width/2));break;case"system_queue":case"external_system_queue":case"container_queue":case"external_container_queue":case"component_queue":case"external_component_queue":n.append("path").attr("fill",o).attr("stroke-width","0.5").attr("stroke",l).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",t.x).replaceAll("starty",t.y).replaceAll("width",t.width).replaceAll("half",t.height/2)),n.append("path").attr("fill","none").attr("stroke-width","0.5").attr("stroke",l).attr("d","Mstartx,startyc-5,0 -5,half -5,halfc0,half 5,half 5,half".replaceAll("startx",t.x+t.width).replaceAll("starty",t.y).replaceAll("half",t.height/2));break}let u=A0(s,t.typeC4Shape.text);switch(n.append("text").attr("fill",a).attr("font-family",u.fontFamily).attr("font-size",u.fontSize-2).attr("font-style","italic").attr("lengthAdjust","spacing").attr("textLength",t.typeC4Shape.width).attr("x",t.x+t.width/2-t.typeC4Shape.width/2).attr("y",t.y+t.typeC4Shape.Y).text("<<"+t.typeC4Shape.text+">>"),t.typeC4Shape.text){case"person":case"external_person":_e(n,48,48,t.x+t.width/2-24,t.y+t.image.Y,r);break}let d=s[t.typeC4Shape.text+"Font"]();return d.fontWeight="bold",d.fontSize=d.fontSize+2,d.fontColor=a,Q(s)(t.label.text,n,t.x,t.y+t.label.Y,t.width,t.height,{fill:a},d),d=s[t.typeC4Shape.text+"Font"](),d.fontColor=a,t.techn&&t.techn?.text!==""?Q(s)(t.techn.text,n,t.x,t.y+t.techn.Y,t.width,t.height,{fill:a,"font-style":"italic"},d):t.type&&t.type.text!==""&&Q(s)(t.type.text,n,t.x,t.y+t.type.Y,t.width,t.height,{fill:a,"font-style":"italic"},d),t.descr&&t.descr.text!==""&&(d=s.personFont(),d.fontColor=a,Q(s)(t.descr.text,n,t.x,t.y+t.descr.Y,t.width,t.height,{fill:a},d)),t.height},"drawC4Shape"),g0=g(function(e){e.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"),b0=g(function(e){e.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"),_0=g(function(e){e.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"),x0=g(function(e){e.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"),m0=g(function(e){e.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"),v0=g(function(e){e.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"),E0=g(function(e){e.append("defs").append("marker").attr("id","sequencenumber").attr("refX",15).attr("refY",15).attr("markerWidth",60).attr("markerHeight",40).attr("orient","auto").append("circle").attr("cx",15).attr("cy",15).attr("r",6)},"insertDynamicNumber"),k0=g(function(e){const s=e.append("defs").append("marker").attr("id","crosshead").attr("markerWidth",15).attr("markerHeight",8).attr("orient","auto").attr("refX",16).attr("refY",4);s.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"),s.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"),A0=g((e,t)=>({fontFamily:e[t+"FontFamily"],fontSize:e[t+"FontSize"],fontWeight:e[t+"FontWeight"]}),"getC4ShapeFont"),Q=(function(){function e(l,a,r,n,i,u,d){const y=a.append("text").attr("x",r+i/2).attr("y",n+u/2+5).style("text-anchor","middle").text(l);o(y,d)}g(e,"byText");function t(l,a,r,n,i,u,d,y){const{fontSize:p,fontFamily:E,fontWeight:O}=y,S=l.split(Jt.lineBreakRegex);for(let P=0;P=this.data.widthLimit||s>=this.data.widthLimit||this.nextData.cnt>xe)&&(t=this.nextData.startx+e.margin+_.nextLinePaddingX,o=this.nextData.stopy+e.margin*2,this.nextData.stopx=s=t+e.width,this.nextData.starty=this.nextData.stopy,this.nextData.stopy=l=o+e.height,this.nextData.cnt=1),e.x=t,e.y=o,this.updateVal(this.data,"startx",t,Math.min),this.updateVal(this.data,"starty",o,Math.min),this.updateVal(this.data,"stopx",s,Math.max),this.updateVal(this.data,"stopy",l,Math.max),this.updateVal(this.nextData,"startx",t,Math.min),this.updateVal(this.nextData,"starty",o,Math.min),this.updateVal(this.nextData,"stopx",s,Math.max),this.updateVal(this.nextData,"stopy",l,Math.max)}init(e){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},te(e.db.getConfig())}bumpLastMargin(e){this.data.stopx+=e,this.data.stopy+=e}},te=g(function(e){Me(_,e),e.fontFamily&&(_.personFontFamily=_.systemFontFamily=_.messageFontFamily=e.fontFamily),e.fontSize&&(_.personFontSize=_.systemFontSize=_.messageFontSize=e.fontSize),e.fontWeight&&(_.personFontWeight=_.systemFontWeight=_.messageFontWeight=e.fontWeight)},"setConf"),St=g((e,t)=>({fontFamily:e[t+"FontFamily"],fontSize:e[t+"FontSize"],fontWeight:e[t+"FontWeight"]}),"c4ShapeFont"),Yt=g(e=>({fontFamily:e.boundaryFontFamily,fontSize:e.boundaryFontSize,fontWeight:e.boundaryFontWeight}),"boundaryFont"),C0=g(e=>({fontFamily:e.messageFontFamily,fontSize:e.messageFontSize,fontWeight:e.messageFontWeight}),"messageFont");function j(e,t,s,o,l){if(!t[e].width)if(s)t[e].text=Ne(t[e].text,l,o),t[e].textLines=t[e].text.split(Jt.lineBreakRegex).length,t[e].width=l,t[e].height=ue(t[e].text,o);else{let a=t[e].text.split(Jt.lineBreakRegex);t[e].textLines=a.length;let r=0;t[e].height=0,t[e].width=0;for(const n of a)t[e].width=Math.max(Tt(n,o),t[e].width),r=ue(n,o),t[e].height=t[e].height+r}}g(j,"calcC4ShapeTextWH");var ve=g(function(e,t,s){t.x=s.data.startx,t.y=s.data.starty,t.width=s.data.stopx-s.data.startx,t.height=s.data.stopy-s.data.starty,t.label.y=_.c4ShapeMargin-35;let o=t.wrap&&_.wrap,l=Yt(_);l.fontSize=l.fontSize+2,l.fontWeight="bold";let a=Tt(t.label.text,l);j("label",t,o,l,a),z.drawBoundary(e,t,_)},"drawBoundary"),Ee=g(function(e,t,s,o){let l=0;for(const a of o){l=0;const r=s[a];let n=St(_,r.typeC4Shape.text);switch(n.fontSize=n.fontSize-2,r.typeC4Shape.width=Tt("«"+r.typeC4Shape.text+"»",n),r.typeC4Shape.height=n.fontSize+2,r.typeC4Shape.Y=_.c4ShapePadding,l=r.typeC4Shape.Y+r.typeC4Shape.height-4,r.image={width:0,height:0,Y:0},r.typeC4Shape.text){case"person":case"external_person":r.image.width=48,r.image.height=48,r.image.Y=l,l=r.image.Y+r.image.height;break}r.sprite&&(r.image.width=48,r.image.height=48,r.image.Y=l,l=r.image.Y+r.image.height);let i=r.wrap&&_.wrap,u=_.width-_.c4ShapePadding*2,d=St(_,r.typeC4Shape.text);if(d.fontSize=d.fontSize+2,d.fontWeight="bold",j("label",r,i,d,u),r.label.Y=l+8,l=r.label.Y+r.label.height,r.type&&r.type.text!==""){r.type.text="["+r.type.text+"]";let E=St(_,r.typeC4Shape.text);j("type",r,i,E,u),r.type.Y=l+5,l=r.type.Y+r.type.height}else if(r.techn&&r.techn.text!==""){r.techn.text="["+r.techn.text+"]";let E=St(_,r.techn.text);j("techn",r,i,E,u),r.techn.Y=l+5,l=r.techn.Y+r.techn.height}let y=l,p=r.label.width;if(r.descr&&r.descr.text!==""){let E=St(_,r.typeC4Shape.text);j("descr",r,i,E,u),r.descr.Y=l+20,l=r.descr.Y+r.descr.height,p=Math.max(r.label.width,r.descr.width),y=l-r.descr.textLines*5}p=p+_.c4ShapePadding,r.width=Math.max(r.width||_.width,p,_.width),r.height=Math.max(r.height||_.height,y,_.height),r.margin=r.margin||_.c4ShapeMargin,e.insert(r),z.drawC4Shape(t,r,_)}e.bumpLastMargin(_.c4ShapeMargin)},"drawC4ShapeArray"),Y=class{static{g(this,"Point")}constructor(e,t){this.x=e,this.y=t}},de=g(function(e,t){let s=e.x,o=e.y,l=t.x,a=t.y,r=s+e.width/2,n=o+e.height/2,i=Math.abs(s-l),u=Math.abs(o-a),d=u/i,y=e.height/e.width,p=null;return o==a&&sl?p=new Y(s,n):s==l&&oa&&(p=new Y(r,o)),s>l&&o=d?p=new Y(s,n+d*e.width/2):p=new Y(r-i/u*e.height/2,o+e.height):s=d?p=new Y(s+e.width,n+d*e.width/2):p=new Y(r+i/u*e.height/2,o+e.height):sa?y>=d?p=new Y(s+e.width,n-d*e.width/2):p=new Y(r+e.height/2*i/u,o):s>l&&o>a&&(y>=d?p=new Y(s,n-e.width/2*d):p=new Y(r-e.height/2*i/u,o)),p},"getIntersectPoint"),w0=g(function(e,t){let s={x:0,y:0};s.x=t.x+t.width/2,s.y=t.y+t.height/2;let o=de(e,s);s.x=e.x+e.width/2,s.y=e.y+e.height/2;let l=de(t,s);return{startPoint:o,endPoint:l}},"getIntersectPoints"),T0=g(function(e,t,s,o){let l=0;for(let a of t){l=l+1;let r=a.wrap&&_.wrap,n=C0(_);o.db.getC4Type()==="C4Dynamic"&&(a.label.text=l+": "+a.label.text);let u=Tt(a.label.text,n);j("label",a,r,n,u),a.techn&&a.techn.text!==""&&(u=Tt(a.techn.text,n),j("techn",a,r,n,u)),a.descr&&a.descr.text!==""&&(u=Tt(a.descr.text,n),j("descr",a,r,n,u));let d=s(a.from),y=s(a.to),p=w0(d,y);a.startPoint=p.startPoint,a.endPoint=p.endPoint}z.drawRels(e,t,_)},"drawRels");function ne(e,t,s,o,l){let a=new me(l);a.data.widthLimit=s.data.widthLimit/Math.min($t,o.length);for(let[r,n]of o.entries()){let i=0;n.image={width:0,height:0,Y:0},n.sprite&&(n.image.width=48,n.image.height=48,n.image.Y=i,i=n.image.Y+n.image.height);let u=n.wrap&&_.wrap,d=Yt(_);if(d.fontSize=d.fontSize+2,d.fontWeight="bold",j("label",n,u,d,a.data.widthLimit),n.label.Y=i+8,i=n.label.Y+n.label.height,n.type&&n.type.text!==""){n.type.text="["+n.type.text+"]";let O=Yt(_);j("type",n,u,O,a.data.widthLimit),n.type.Y=i+5,i=n.type.Y+n.type.height}if(n.descr&&n.descr.text!==""){let O=Yt(_);O.fontSize=O.fontSize-2,j("descr",n,u,O,a.data.widthLimit),n.descr.Y=i+20,i=n.descr.Y+n.descr.height}if(r==0||r%$t===0){let O=s.data.startx+_.diagramMarginX,S=s.data.stopy+_.diagramMarginY+i;a.setData(O,O,S,S)}else{let O=a.data.stopx!==a.data.startx?a.data.stopx+_.diagramMarginX:a.data.startx,S=a.data.starty;a.setData(O,O,S,S)}a.name=n.alias;let y=l.db.getC4ShapeArray(n.alias),p=l.db.getC4ShapeKeys(n.alias);p.length>0&&Ee(a,e,y,p),t=n.alias;let E=l.db.getBoundaries(t);E.length>0&&ne(e,t,a,E,l),n.alias!=="global"&&ve(e,n,a),s.data.stopy=Math.max(a.data.stopy+_.c4ShapeMargin,s.data.stopy),s.data.stopx=Math.max(a.data.stopx+_.c4ShapeMargin,s.data.stopx),Vt=Math.max(Vt,s.data.stopx),zt=Math.max(zt,s.data.stopy)}}g(ne,"drawInsideBoundary");var O0=g(function(e,t,s,o){_=Dt().c4;const l=Dt().securityLevel;let a;l==="sandbox"&&(a=Nt("#i"+t));const r=l==="sandbox"?Nt(a.nodes()[0].contentDocument.body):Nt("body");let n=o.db;o.db.setWrap(_.wrap),xe=n.getC4ShapeInRow(),$t=n.getC4BoundaryInRow(),he.debug(`C:${JSON.stringify(_,null,2)}`);const i=l==="sandbox"?r.select(`[id="${t}"]`):Nt(`[id="${t}"]`);z.insertComputerIcon(i),z.insertDatabaseIcon(i),z.insertClockIcon(i);let u=new me(o);u.setData(_.diagramMarginX,_.diagramMarginX,_.diagramMarginY,_.diagramMarginY),u.data.widthLimit=screen.availWidth,Vt=_.diagramMarginX,zt=_.diagramMarginY;const d=o.db.getTitle();let y=o.db.getBoundaries("");ne(i,"",u,y,o),z.insertArrowHead(i),z.insertArrowEnd(i),z.insertArrowCrossHead(i),z.insertArrowFilledHead(i),T0(i,o.db.getRels(),o.db.getC4Shape,o),u.data.stopx=Vt,u.data.stopy=zt;const p=u.data;let O=p.stopy-p.starty+2*_.diagramMarginY;const P=p.stopx-p.startx+2*_.diagramMarginX;d&&i.append("text").text(d).attr("x",(p.stopx-p.startx)/2-4*_.diagramMarginX).attr("y",p.starty+_.diagramMarginY),Ie(i,O,P,_.useMaxWidth);const M=d?60:0;i.attr("viewBox",p.startx-_.diagramMarginX+" -"+(_.diagramMarginY+M)+" "+P+" "+(O+M)),he.debug("models:",p)},"draw"),fe={drawPersonOrSystemArray:Ee,drawBoundary:ve,setConf:te,draw:O0},R0=g(e=>`.person { + stroke: ${e.personBorder}; + fill: ${e.personBkg}; + } +`,"getStyles"),S0=R0,I0={parser:Ye,db:Zt,renderer:fe,styles:S0,init:g(({c4:e,wrap:t})=>{fe.setConf(e),Zt.setWrap(t)},"init")};export{I0 as diagram}; diff --git a/_astro/channel.y7_wL4g7.js b/_astro/channel.y7_wL4g7.js new file mode 100644 index 00000000..3eb342f1 --- /dev/null +++ b/_astro/channel.y7_wL4g7.js @@ -0,0 +1 @@ +import{ap as o,aq as n}from"./mermaid.core.LbQlJBBQ.js";const t=(a,r)=>o.lang.round(n.parse(a)[r]);export{t as c}; diff --git a/_astro/chrome.Ct0Uq-uE_1XvEiT.webp b/_astro/chrome.Ct0Uq-uE_1XvEiT.webp new file mode 100644 index 00000000..bba66a0c Binary files /dev/null and b/_astro/chrome.Ct0Uq-uE_1XvEiT.webp differ diff --git a/_astro/chunk-4BX2VUAB.CV908Kae.js b/_astro/chunk-4BX2VUAB.CV908Kae.js new file mode 100644 index 00000000..41c09e62 --- /dev/null +++ b/_astro/chunk-4BX2VUAB.CV908Kae.js @@ -0,0 +1 @@ +import{_ as i}from"./mermaid.core.LbQlJBBQ.js";function t(c,e){c.accDescr&&e.setAccDescription?.(c.accDescr),c.accTitle&&e.setAccTitle?.(c.accTitle),c.title&&e.setDiagramTitle?.(c.title)}i(t,"populateCommonDb");export{t as p}; diff --git a/_astro/chunk-55IACEB6.b7ueBidu.js b/_astro/chunk-55IACEB6.b7ueBidu.js new file mode 100644 index 00000000..e7f6cbc1 --- /dev/null +++ b/_astro/chunk-55IACEB6.b7ueBidu.js @@ -0,0 +1 @@ +import{_ as a,d as o}from"./mermaid.core.LbQlJBBQ.js";var d=a((t,e)=>{let n;return e==="sandbox"&&(n=o("#i"+t)),(e==="sandbox"?o(n.nodes()[0].contentDocument.body):o("body")).select(`[id="${t}"]`)},"getDiagramElement");export{d as g}; diff --git a/_astro/chunk-B4BG7PRW.B0Ch1pGH.js b/_astro/chunk-B4BG7PRW.B0Ch1pGH.js new file mode 100644 index 00000000..45633bb4 --- /dev/null +++ b/_astro/chunk-B4BG7PRW.B0Ch1pGH.js @@ -0,0 +1,165 @@ +import{g as Ze}from"./chunk-FMBD7UC4.Tjciooq0.js";import{g as $e}from"./chunk-55IACEB6.b7ueBidu.js";import{s as et}from"./chunk-QN33PNHL.BI3h-IJf.js";import{_ as p,l as ve,c as D,o as tt,r as st,u as Ie,d as J,b as it,a as at,s as nt,g as rt,p as ut,q as lt,k as x,y as ot,x as ct,i as ht,Q as M}from"./mermaid.core.LbQlJBBQ.js";var Oe=(function(){var e=p(function(v,l,o,d){for(o=o||{},d=v.length;d--;o[v[d]]=l);return o},"o"),i=[1,18],r=[1,19],u=[1,20],a=[1,41],c=[1,42],A=[1,26],f=[1,24],k=[1,25],_=[1,32],he=[1,33],de=[1,34],C=[1,45],pe=[1,35],Ae=[1,36],fe=[1,37],ge=[1,38],Ce=[1,27],me=[1,28],be=[1,29],Ee=[1,30],ye=[1,31],m=[1,44],b=[1,46],E=[1,43],y=[1,47],Te=[1,9],h=[1,8,9],Z=[1,58],$=[1,59],ee=[1,60],te=[1,61],se=[1,62],ke=[1,63],De=[1,64],R=[1,8,9,41],we=[1,76],V=[1,8,9,12,13,22,39,41,44,68,69,70,71,72,73,74,79,81],ie=[1,8,9,12,13,18,20,22,39,41,44,50,60,68,69,70,71,72,73,74,79,81,86,100,102,103],ae=[13,60,86,100,102,103],G=[13,60,73,74,86,100,102,103],Ve=[13,60,68,69,70,71,72,86,100,102,103],Fe=[1,100],U=[1,117],z=[1,113],K=[1,109],Y=[1,115],Q=[1,110],W=[1,111],j=[1,112],X=[1,114],q=[1,116],Pe=[22,48,60,61,82,86,87,88,89,90],Be=[1,8,9,39,41,44],ne=[1,8,9,22],Me=[1,145],Re=[1,8,9,61],N=[1,8,9,22,48,60,61,82,86,87,88,89,90],_e={trace:p(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mermaidDoc:4,statements:5,graphConfig:6,CLASS_DIAGRAM:7,NEWLINE:8,EOF:9,statement:10,classLabel:11,SQS:12,STR:13,SQE:14,namespaceName:15,alphaNumToken:16,classLiteralName:17,DOT:18,className:19,GENERICTYPE:20,relationStatement:21,LABEL:22,namespaceStatement:23,classStatement:24,memberStatement:25,annotationStatement:26,clickStatement:27,styleStatement:28,cssClassStatement:29,noteStatement:30,classDefStatement:31,direction:32,acc_title:33,acc_title_value:34,acc_descr:35,acc_descr_value:36,acc_descr_multiline_value:37,namespaceIdentifier:38,STRUCT_START:39,classStatements:40,STRUCT_STOP:41,NAMESPACE:42,classIdentifier:43,STYLE_SEPARATOR:44,members:45,CLASS:46,emptyBody:47,SPACE:48,ANNOTATION_START:49,ANNOTATION_END:50,MEMBER:51,SEPARATOR:52,relation:53,NOTE_FOR:54,noteText:55,NOTE:56,CLASSDEF:57,classList:58,stylesOpt:59,ALPHA:60,COMMA:61,direction_tb:62,direction_bt:63,direction_rl:64,direction_lr:65,relationType:66,lineType:67,AGGREGATION:68,EXTENSION:69,COMPOSITION:70,DEPENDENCY:71,LOLLIPOP:72,LINE:73,DOTTED_LINE:74,CALLBACK:75,LINK:76,LINK_TARGET:77,CLICK:78,CALLBACK_NAME:79,CALLBACK_ARGS:80,HREF:81,STYLE:82,CSSCLASS:83,style:84,styleComponent:85,NUM:86,COLON:87,UNIT:88,BRKT:89,PCT:90,commentToken:91,textToken:92,graphCodeTokens:93,textNoTagsToken:94,TAGSTART:95,TAGEND:96,"==":97,"--":98,DEFAULT:99,MINUS:100,keywords:101,UNICODE_TEXT:102,BQUOTE_STR:103,$accept:0,$end:1},terminals_:{2:"error",7:"CLASS_DIAGRAM",8:"NEWLINE",9:"EOF",12:"SQS",13:"STR",14:"SQE",18:"DOT",20:"GENERICTYPE",22:"LABEL",33:"acc_title",34:"acc_title_value",35:"acc_descr",36:"acc_descr_value",37:"acc_descr_multiline_value",39:"STRUCT_START",41:"STRUCT_STOP",42:"NAMESPACE",44:"STYLE_SEPARATOR",46:"CLASS",48:"SPACE",49:"ANNOTATION_START",50:"ANNOTATION_END",51:"MEMBER",52:"SEPARATOR",54:"NOTE_FOR",56:"NOTE",57:"CLASSDEF",60:"ALPHA",61:"COMMA",62:"direction_tb",63:"direction_bt",64:"direction_rl",65:"direction_lr",68:"AGGREGATION",69:"EXTENSION",70:"COMPOSITION",71:"DEPENDENCY",72:"LOLLIPOP",73:"LINE",74:"DOTTED_LINE",75:"CALLBACK",76:"LINK",77:"LINK_TARGET",78:"CLICK",79:"CALLBACK_NAME",80:"CALLBACK_ARGS",81:"HREF",82:"STYLE",83:"CSSCLASS",86:"NUM",87:"COLON",88:"UNIT",89:"BRKT",90:"PCT",93:"graphCodeTokens",95:"TAGSTART",96:"TAGEND",97:"==",98:"--",99:"DEFAULT",100:"MINUS",101:"keywords",102:"UNICODE_TEXT",103:"BQUOTE_STR"},productions_:[0,[3,1],[3,1],[4,1],[6,4],[5,1],[5,2],[5,3],[11,3],[15,1],[15,1],[15,3],[15,2],[19,1],[19,3],[19,1],[19,2],[19,2],[19,2],[10,1],[10,2],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,2],[10,2],[10,1],[23,4],[23,5],[38,2],[40,1],[40,2],[40,3],[24,1],[24,3],[24,4],[24,3],[24,6],[43,2],[43,3],[47,0],[47,2],[47,2],[26,4],[45,1],[45,2],[25,1],[25,2],[25,1],[25,1],[21,3],[21,4],[21,4],[21,5],[30,3],[30,2],[31,3],[58,1],[58,3],[32,1],[32,1],[32,1],[32,1],[53,3],[53,2],[53,2],[53,1],[66,1],[66,1],[66,1],[66,1],[66,1],[67,1],[67,1],[27,3],[27,4],[27,3],[27,4],[27,4],[27,5],[27,3],[27,4],[27,4],[27,5],[27,4],[27,5],[27,5],[27,6],[28,3],[29,3],[59,1],[59,3],[84,1],[84,2],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[91,1],[91,1],[92,1],[92,1],[92,1],[92,1],[92,1],[92,1],[92,1],[94,1],[94,1],[94,1],[94,1],[16,1],[16,1],[16,1],[16,1],[17,1],[55,1]],performAction:p(function(l,o,d,n,g,t,H){var s=t.length-1;switch(g){case 8:this.$=t[s-1];break;case 9:case 10:case 13:case 15:this.$=t[s];break;case 11:case 14:this.$=t[s-2]+"."+t[s];break;case 12:case 16:this.$=t[s-1]+t[s];break;case 17:case 18:this.$=t[s-1]+"~"+t[s]+"~";break;case 19:n.addRelation(t[s]);break;case 20:t[s-1].title=n.cleanupLabel(t[s]),n.addRelation(t[s-1]);break;case 31:this.$=t[s].trim(),n.setAccTitle(this.$);break;case 32:case 33:this.$=t[s].trim(),n.setAccDescription(this.$);break;case 34:n.addClassesToNamespace(t[s-3],t[s-1]);break;case 35:n.addClassesToNamespace(t[s-4],t[s-1]);break;case 36:this.$=t[s],n.addNamespace(t[s]);break;case 37:this.$=[t[s]];break;case 38:this.$=[t[s-1]];break;case 39:t[s].unshift(t[s-2]),this.$=t[s];break;case 41:n.setCssClass(t[s-2],t[s]);break;case 42:n.addMembers(t[s-3],t[s-1]);break;case 44:n.setCssClass(t[s-5],t[s-3]),n.addMembers(t[s-5],t[s-1]);break;case 45:this.$=t[s],n.addClass(t[s]);break;case 46:this.$=t[s-1],n.addClass(t[s-1]),n.setClassLabel(t[s-1],t[s]);break;case 50:n.addAnnotation(t[s],t[s-2]);break;case 51:case 64:this.$=[t[s]];break;case 52:t[s].push(t[s-1]),this.$=t[s];break;case 53:break;case 54:n.addMember(t[s-1],n.cleanupLabel(t[s]));break;case 55:break;case 56:break;case 57:this.$={id1:t[s-2],id2:t[s],relation:t[s-1],relationTitle1:"none",relationTitle2:"none"};break;case 58:this.$={id1:t[s-3],id2:t[s],relation:t[s-1],relationTitle1:t[s-2],relationTitle2:"none"};break;case 59:this.$={id1:t[s-3],id2:t[s],relation:t[s-2],relationTitle1:"none",relationTitle2:t[s-1]};break;case 60:this.$={id1:t[s-4],id2:t[s],relation:t[s-2],relationTitle1:t[s-3],relationTitle2:t[s-1]};break;case 61:n.addNote(t[s],t[s-1]);break;case 62:n.addNote(t[s]);break;case 63:this.$=t[s-2],n.defineClass(t[s-1],t[s]);break;case 65:this.$=t[s-2].concat([t[s]]);break;case 66:n.setDirection("TB");break;case 67:n.setDirection("BT");break;case 68:n.setDirection("RL");break;case 69:n.setDirection("LR");break;case 70:this.$={type1:t[s-2],type2:t[s],lineType:t[s-1]};break;case 71:this.$={type1:"none",type2:t[s],lineType:t[s-1]};break;case 72:this.$={type1:t[s-1],type2:"none",lineType:t[s]};break;case 73:this.$={type1:"none",type2:"none",lineType:t[s]};break;case 74:this.$=n.relationType.AGGREGATION;break;case 75:this.$=n.relationType.EXTENSION;break;case 76:this.$=n.relationType.COMPOSITION;break;case 77:this.$=n.relationType.DEPENDENCY;break;case 78:this.$=n.relationType.LOLLIPOP;break;case 79:this.$=n.lineType.LINE;break;case 80:this.$=n.lineType.DOTTED_LINE;break;case 81:case 87:this.$=t[s-2],n.setClickEvent(t[s-1],t[s]);break;case 82:case 88:this.$=t[s-3],n.setClickEvent(t[s-2],t[s-1]),n.setTooltip(t[s-2],t[s]);break;case 83:this.$=t[s-2],n.setLink(t[s-1],t[s]);break;case 84:this.$=t[s-3],n.setLink(t[s-2],t[s-1],t[s]);break;case 85:this.$=t[s-3],n.setLink(t[s-2],t[s-1]),n.setTooltip(t[s-2],t[s]);break;case 86:this.$=t[s-4],n.setLink(t[s-3],t[s-2],t[s]),n.setTooltip(t[s-3],t[s-1]);break;case 89:this.$=t[s-3],n.setClickEvent(t[s-2],t[s-1],t[s]);break;case 90:this.$=t[s-4],n.setClickEvent(t[s-3],t[s-2],t[s-1]),n.setTooltip(t[s-3],t[s]);break;case 91:this.$=t[s-3],n.setLink(t[s-2],t[s]);break;case 92:this.$=t[s-4],n.setLink(t[s-3],t[s-1],t[s]);break;case 93:this.$=t[s-4],n.setLink(t[s-3],t[s-1]),n.setTooltip(t[s-3],t[s]);break;case 94:this.$=t[s-5],n.setLink(t[s-4],t[s-2],t[s]),n.setTooltip(t[s-4],t[s-1]);break;case 95:this.$=t[s-2],n.setCssStyle(t[s-1],t[s]);break;case 96:n.setCssClass(t[s-1],t[s]);break;case 97:this.$=[t[s]];break;case 98:t[s-2].push(t[s]),this.$=t[s-2];break;case 100:this.$=t[s-1]+t[s];break}},"anonymous"),table:[{3:1,4:2,5:3,6:4,7:[1,6],10:5,16:39,17:40,19:21,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,33:i,35:r,37:u,38:22,42:a,43:23,46:c,49:A,51:f,52:k,54:_,56:he,57:de,60:C,62:pe,63:Ae,64:fe,65:ge,75:Ce,76:me,78:be,82:Ee,83:ye,86:m,100:b,102:E,103:y},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,3]},e(Te,[2,5],{8:[1,48]}),{8:[1,49]},e(h,[2,19],{22:[1,50]}),e(h,[2,21]),e(h,[2,22]),e(h,[2,23]),e(h,[2,24]),e(h,[2,25]),e(h,[2,26]),e(h,[2,27]),e(h,[2,28]),e(h,[2,29]),e(h,[2,30]),{34:[1,51]},{36:[1,52]},e(h,[2,33]),e(h,[2,53],{53:53,66:56,67:57,13:[1,54],22:[1,55],68:Z,69:$,70:ee,71:te,72:se,73:ke,74:De}),{39:[1,65]},e(R,[2,40],{39:[1,67],44:[1,66]}),e(h,[2,55]),e(h,[2,56]),{16:68,60:C,86:m,100:b,102:E},{16:39,17:40,19:69,60:C,86:m,100:b,102:E,103:y},{16:39,17:40,19:70,60:C,86:m,100:b,102:E,103:y},{16:39,17:40,19:71,60:C,86:m,100:b,102:E,103:y},{60:[1,72]},{13:[1,73]},{16:39,17:40,19:74,60:C,86:m,100:b,102:E,103:y},{13:we,55:75},{58:77,60:[1,78]},e(h,[2,66]),e(h,[2,67]),e(h,[2,68]),e(h,[2,69]),e(V,[2,13],{16:39,17:40,19:80,18:[1,79],20:[1,81],60:C,86:m,100:b,102:E,103:y}),e(V,[2,15],{20:[1,82]}),{15:83,16:84,17:85,60:C,86:m,100:b,102:E,103:y},{16:39,17:40,19:86,60:C,86:m,100:b,102:E,103:y},e(ie,[2,123]),e(ie,[2,124]),e(ie,[2,125]),e(ie,[2,126]),e([1,8,9,12,13,20,22,39,41,44,68,69,70,71,72,73,74,79,81],[2,127]),e(Te,[2,6],{10:5,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,19:21,38:22,43:23,16:39,17:40,5:87,33:i,35:r,37:u,42:a,46:c,49:A,51:f,52:k,54:_,56:he,57:de,60:C,62:pe,63:Ae,64:fe,65:ge,75:Ce,76:me,78:be,82:Ee,83:ye,86:m,100:b,102:E,103:y}),{5:88,10:5,16:39,17:40,19:21,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,33:i,35:r,37:u,38:22,42:a,43:23,46:c,49:A,51:f,52:k,54:_,56:he,57:de,60:C,62:pe,63:Ae,64:fe,65:ge,75:Ce,76:me,78:be,82:Ee,83:ye,86:m,100:b,102:E,103:y},e(h,[2,20]),e(h,[2,31]),e(h,[2,32]),{13:[1,90],16:39,17:40,19:89,60:C,86:m,100:b,102:E,103:y},{53:91,66:56,67:57,68:Z,69:$,70:ee,71:te,72:se,73:ke,74:De},e(h,[2,54]),{67:92,73:ke,74:De},e(ae,[2,73],{66:93,68:Z,69:$,70:ee,71:te,72:se}),e(G,[2,74]),e(G,[2,75]),e(G,[2,76]),e(G,[2,77]),e(G,[2,78]),e(Ve,[2,79]),e(Ve,[2,80]),{8:[1,95],24:96,40:94,43:23,46:c},{16:97,60:C,86:m,100:b,102:E},{41:[1,99],45:98,51:Fe},{50:[1,101]},{13:[1,102]},{13:[1,103]},{79:[1,104],81:[1,105]},{22:U,48:z,59:106,60:K,82:Y,84:107,85:108,86:Q,87:W,88:j,89:X,90:q},{60:[1,118]},{13:we,55:119},e(h,[2,62]),e(h,[2,128]),{22:U,48:z,59:120,60:K,61:[1,121],82:Y,84:107,85:108,86:Q,87:W,88:j,89:X,90:q},e(Pe,[2,64]),{16:39,17:40,19:122,60:C,86:m,100:b,102:E,103:y},e(V,[2,16]),e(V,[2,17]),e(V,[2,18]),{39:[2,36]},{15:124,16:84,17:85,18:[1,123],39:[2,9],60:C,86:m,100:b,102:E,103:y},{39:[2,10]},e(Be,[2,45],{11:125,12:[1,126]}),e(Te,[2,7]),{9:[1,127]},e(ne,[2,57]),{16:39,17:40,19:128,60:C,86:m,100:b,102:E,103:y},{13:[1,130],16:39,17:40,19:129,60:C,86:m,100:b,102:E,103:y},e(ae,[2,72],{66:131,68:Z,69:$,70:ee,71:te,72:se}),e(ae,[2,71]),{41:[1,132]},{24:96,40:133,43:23,46:c},{8:[1,134],41:[2,37]},e(R,[2,41],{39:[1,135]}),{41:[1,136]},e(R,[2,43]),{41:[2,51],45:137,51:Fe},{16:39,17:40,19:138,60:C,86:m,100:b,102:E,103:y},e(h,[2,81],{13:[1,139]}),e(h,[2,83],{13:[1,141],77:[1,140]}),e(h,[2,87],{13:[1,142],80:[1,143]}),{13:[1,144]},e(h,[2,95],{61:Me}),e(Re,[2,97],{85:146,22:U,48:z,60:K,82:Y,86:Q,87:W,88:j,89:X,90:q}),e(N,[2,99]),e(N,[2,101]),e(N,[2,102]),e(N,[2,103]),e(N,[2,104]),e(N,[2,105]),e(N,[2,106]),e(N,[2,107]),e(N,[2,108]),e(N,[2,109]),e(h,[2,96]),e(h,[2,61]),e(h,[2,63],{61:Me}),{60:[1,147]},e(V,[2,14]),{15:148,16:84,17:85,60:C,86:m,100:b,102:E,103:y},{39:[2,12]},e(Be,[2,46]),{13:[1,149]},{1:[2,4]},e(ne,[2,59]),e(ne,[2,58]),{16:39,17:40,19:150,60:C,86:m,100:b,102:E,103:y},e(ae,[2,70]),e(h,[2,34]),{41:[1,151]},{24:96,40:152,41:[2,38],43:23,46:c},{45:153,51:Fe},e(R,[2,42]),{41:[2,52]},e(h,[2,50]),e(h,[2,82]),e(h,[2,84]),e(h,[2,85],{77:[1,154]}),e(h,[2,88]),e(h,[2,89],{13:[1,155]}),e(h,[2,91],{13:[1,157],77:[1,156]}),{22:U,48:z,60:K,82:Y,84:158,85:108,86:Q,87:W,88:j,89:X,90:q},e(N,[2,100]),e(Pe,[2,65]),{39:[2,11]},{14:[1,159]},e(ne,[2,60]),e(h,[2,35]),{41:[2,39]},{41:[1,160]},e(h,[2,86]),e(h,[2,90]),e(h,[2,92]),e(h,[2,93],{77:[1,161]}),e(Re,[2,98],{85:146,22:U,48:z,60:K,82:Y,86:Q,87:W,88:j,89:X,90:q}),e(Be,[2,8]),e(R,[2,44]),e(h,[2,94])],defaultActions:{2:[2,1],3:[2,2],4:[2,3],83:[2,36],85:[2,10],124:[2,12],127:[2,4],137:[2,52],148:[2,11],152:[2,39]},parseError:p(function(l,o){if(o.recoverable)this.trace(l);else{var d=new Error(l);throw d.hash=o,d}},"parseError"),parse:p(function(l){var o=this,d=[0],n=[],g=[null],t=[],H=this.table,s="",ue=0,Ge=0,Xe=2,Ue=1,qe=t.slice.call(arguments,1),T=Object.create(this.lexer),I={yy:{}};for(var Se in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Se)&&(I.yy[Se]=this.yy[Se]);T.setInput(l,I.yy),I.yy.lexer=T,I.yy.parser=this,typeof T.yylloc>"u"&&(T.yylloc={});var Ne=T.yylloc;t.push(Ne);var He=T.options&&T.options.ranges;typeof I.yy.parseError=="function"?this.parseError=I.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Je(B){d.length=d.length-2*B,g.length=g.length-B,t.length=t.length-B}p(Je,"popStack");function ze(){var B;return B=n.pop()||T.lex()||Ue,typeof B!="number"&&(B instanceof Array&&(n=B,B=n.pop()),B=o.symbols_[B]||B),B}p(ze,"lex");for(var F,O,S,Le,P={},le,L,Ke,oe;;){if(O=d[d.length-1],this.defaultActions[O]?S=this.defaultActions[O]:((F===null||typeof F>"u")&&(F=ze()),S=H[O]&&H[O][F]),typeof S>"u"||!S.length||!S[0]){var xe="";oe=[];for(le in H[O])this.terminals_[le]&&le>Xe&&oe.push("'"+this.terminals_[le]+"'");T.showPosition?xe="Parse error on line "+(ue+1)+`: +`+T.showPosition()+` +Expecting `+oe.join(", ")+", got '"+(this.terminals_[F]||F)+"'":xe="Parse error on line "+(ue+1)+": Unexpected "+(F==Ue?"end of input":"'"+(this.terminals_[F]||F)+"'"),this.parseError(xe,{text:T.match,token:this.terminals_[F]||F,line:T.yylineno,loc:Ne,expected:oe})}if(S[0]instanceof Array&&S.length>1)throw new Error("Parse Error: multiple actions possible at state: "+O+", token: "+F);switch(S[0]){case 1:d.push(F),g.push(T.yytext),t.push(T.yylloc),d.push(S[1]),F=null,Ge=T.yyleng,s=T.yytext,ue=T.yylineno,Ne=T.yylloc;break;case 2:if(L=this.productions_[S[1]][1],P.$=g[g.length-L],P._$={first_line:t[t.length-(L||1)].first_line,last_line:t[t.length-1].last_line,first_column:t[t.length-(L||1)].first_column,last_column:t[t.length-1].last_column},He&&(P._$.range=[t[t.length-(L||1)].range[0],t[t.length-1].range[1]]),Le=this.performAction.apply(P,[s,Ge,ue,I.yy,S[1],g,t].concat(qe)),typeof Le<"u")return Le;L&&(d=d.slice(0,-1*L*2),g=g.slice(0,-1*L),t=t.slice(0,-1*L)),d.push(this.productions_[S[1]][0]),g.push(P.$),t.push(P._$),Ke=H[d[d.length-2]][d[d.length-1]],d.push(Ke);break;case 3:return!0}}return!0},"parse")},je=(function(){var v={EOF:1,parseError:p(function(o,d){if(this.yy.parser)this.yy.parser.parseError(o,d);else throw new Error(o)},"parseError"),setInput:p(function(l,o){return this.yy=o||this.yy||{},this._input=l,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:p(function(){var l=this._input[0];this.yytext+=l,this.yyleng++,this.offset++,this.match+=l,this.matched+=l;var o=l.match(/(?:\r\n?|\n).*/g);return o?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),l},"input"),unput:p(function(l){var o=l.length,d=l.split(/(?:\r\n?|\n)/g);this._input=l+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-o),this.offset-=o;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),d.length-1&&(this.yylineno-=d.length-1);var g=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:d?(d.length===n.length?this.yylloc.first_column:0)+n[n.length-d.length].length-d[0].length:this.yylloc.first_column-o},this.options.ranges&&(this.yylloc.range=[g[0],g[0]+this.yyleng-o]),this.yyleng=this.yytext.length,this},"unput"),more:p(function(){return this._more=!0,this},"more"),reject:p(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:p(function(l){this.unput(this.match.slice(l))},"less"),pastInput:p(function(){var l=this.matched.substr(0,this.matched.length-this.match.length);return(l.length>20?"...":"")+l.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:p(function(){var l=this.match;return l.length<20&&(l+=this._input.substr(0,20-l.length)),(l.substr(0,20)+(l.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:p(function(){var l=this.pastInput(),o=new Array(l.length+1).join("-");return l+this.upcomingInput()+` +`+o+"^"},"showPosition"),test_match:p(function(l,o){var d,n,g;if(this.options.backtrack_lexer&&(g={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&&(g.yylloc.range=this.yylloc.range.slice(0))),n=l[0].match(/(?:\r\n?|\n).*/g),n&&(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+l[0].length},this.yytext+=l[0],this.match+=l[0],this.matches=l,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(l[0].length),this.matched+=l[0],d=this.performAction.call(this,this.yy,this,o,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),d)return d;if(this._backtrack){for(var t in g)this[t]=g[t];return!1}return!1},"test_match"),next:p(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var l,o,d,n;this._more||(this.yytext="",this.match="");for(var g=this._currentRules(),t=0;to[0].length)){if(o=d,n=t,this.options.backtrack_lexer){if(l=this.test_match(d,g[t]),l!==!1)return l;if(this._backtrack){o=!1;continue}else return!1}else if(!this.options.flex)break}return o?(l=this.test_match(o,g[n]),l!==!1?l:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:p(function(){var o=this.next();return o||this.lex()},"lex"),begin:p(function(o){this.conditionStack.push(o)},"begin"),popState:p(function(){var o=this.conditionStack.length-1;return o>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:p(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:p(function(o){return o=this.conditionStack.length-1-Math.abs(o||0),o>=0?this.conditionStack[o]:"INITIAL"},"topState"),pushState:p(function(o){this.begin(o)},"pushState"),stateStackSize:p(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:p(function(o,d,n,g){switch(n){case 0:return 62;case 1:return 63;case 2:return 64;case 3:return 65;case 4:break;case 5:break;case 6:return this.begin("acc_title"),33;case 7:return this.popState(),"acc_title_value";case 8:return this.begin("acc_descr"),35;case 9:return this.popState(),"acc_descr_value";case 10:this.begin("acc_descr_multiline");break;case 11:this.popState();break;case 12:return"acc_descr_multiline_value";case 13:return 8;case 14:break;case 15:return 7;case 16:return 7;case 17:return"EDGE_STATE";case 18:this.begin("callback_name");break;case 19:this.popState();break;case 20:this.popState(),this.begin("callback_args");break;case 21:return 79;case 22:this.popState();break;case 23:return 80;case 24:this.popState();break;case 25:return"STR";case 26:this.begin("string");break;case 27:return 82;case 28:return 57;case 29:return this.begin("namespace"),42;case 30:return this.popState(),8;case 31:break;case 32:return this.begin("namespace-body"),39;case 33:return this.popState(),41;case 34:return"EOF_IN_STRUCT";case 35:return 8;case 36:break;case 37:return"EDGE_STATE";case 38:return this.begin("class"),46;case 39:return this.popState(),8;case 40:break;case 41:return this.popState(),this.popState(),41;case 42:return this.begin("class-body"),39;case 43:return this.popState(),41;case 44:return"EOF_IN_STRUCT";case 45:return"EDGE_STATE";case 46:return"OPEN_IN_STRUCT";case 47:break;case 48:return"MEMBER";case 49:return 83;case 50:return 75;case 51:return 76;case 52:return 78;case 53:return 54;case 54:return 56;case 55:return 49;case 56:return 50;case 57:return 81;case 58:this.popState();break;case 59:return"GENERICTYPE";case 60:this.begin("generic");break;case 61:this.popState();break;case 62:return"BQUOTE_STR";case 63:this.begin("bqstring");break;case 64:return 77;case 65:return 77;case 66:return 77;case 67:return 77;case 68:return 69;case 69:return 69;case 70:return 71;case 71:return 71;case 72:return 70;case 73:return 68;case 74:return 72;case 75:return 73;case 76:return 74;case 77:return 22;case 78:return 44;case 79:return 100;case 80:return 18;case 81:return"PLUS";case 82:return 87;case 83:return 61;case 84:return 89;case 85:return 89;case 86:return 90;case 87:return"EQUALS";case 88:return"EQUALS";case 89:return 60;case 90:return 12;case 91:return 14;case 92:return"PUNCTUATION";case 93:return 86;case 94:return 102;case 95:return 48;case 96:return 48;case 97:return 9}},"anonymous"),rules:[/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:%%(?!\{)*[^\n]*(\r?\n?)+)/,/^(?:%%[^\n]*(\r?\n)*)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:classDiagram-v2\b)/,/^(?:classDiagram\b)/,/^(?:\[\*\])/,/^(?:call[\s]+)/,/^(?:\([\s]*\))/,/^(?:\()/,/^(?:[^(]*)/,/^(?:\))/,/^(?:[^)]*)/,/^(?:["])/,/^(?:[^"]*)/,/^(?:["])/,/^(?:style\b)/,/^(?:classDef\b)/,/^(?:namespace\b)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:[{])/,/^(?:[}])/,/^(?:$)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:\[\*\])/,/^(?:class\b)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:[}])/,/^(?:[{])/,/^(?:[}])/,/^(?:$)/,/^(?:\[\*\])/,/^(?:[{])/,/^(?:[\n])/,/^(?:[^{}\n]*)/,/^(?:cssClass\b)/,/^(?:callback\b)/,/^(?:link\b)/,/^(?:click\b)/,/^(?:note for\b)/,/^(?:note\b)/,/^(?:<<)/,/^(?:>>)/,/^(?:href\b)/,/^(?:[~])/,/^(?:[^~]*)/,/^(?:~)/,/^(?:[`])/,/^(?:[^`]+)/,/^(?:[`])/,/^(?:_self\b)/,/^(?:_blank\b)/,/^(?:_parent\b)/,/^(?:_top\b)/,/^(?:\s*<\|)/,/^(?:\s*\|>)/,/^(?:\s*>)/,/^(?:\s*<)/,/^(?:\s*\*)/,/^(?:\s*o\b)/,/^(?:\s*\(\))/,/^(?:--)/,/^(?:\.\.)/,/^(?::{1}[^:\n;]+)/,/^(?::{3})/,/^(?:-)/,/^(?:\.)/,/^(?:\+)/,/^(?::)/,/^(?:,)/,/^(?:#)/,/^(?:#)/,/^(?:%)/,/^(?:=)/,/^(?:=)/,/^(?:\w+)/,/^(?:\[)/,/^(?:\])/,/^(?:[!"#$%&'*+,-.`?\\/])/,/^(?:[0-9]+)/,/^(?:[\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6]|[\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377]|[\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5]|[\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA]|[\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE]|[\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA]|[\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0]|[\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977]|[\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2]|[\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A]|[\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39]|[\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8]|[\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C]|[\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C]|[\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99]|[\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0]|[\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D]|[\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3]|[\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10]|[\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1]|[\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81]|[\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3]|[\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6]|[\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A]|[\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081]|[\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D]|[\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0]|[\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310]|[\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C]|[\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711]|[\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7]|[\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C]|[\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16]|[\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF]|[\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC]|[\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D]|[\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D]|[\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3]|[\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F]|[\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128]|[\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184]|[\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3]|[\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6]|[\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE]|[\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C]|[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D]|[\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC]|[\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B]|[\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788]|[\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805]|[\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB]|[\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28]|[\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5]|[\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4]|[\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E]|[\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D]|[\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36]|[\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D]|[\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC]|[\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF]|[\uFFD2-\uFFD7\uFFDA-\uFFDC])/,/^(?:\s)/,/^(?:\s)/,/^(?:$)/],conditions:{"namespace-body":{rules:[26,33,34,35,36,37,38,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},namespace:{rules:[26,29,30,31,32,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},"class-body":{rules:[26,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},class:{rules:[26,39,40,41,42,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},acc_descr_multiline:{rules:[11,12,26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},acc_descr:{rules:[9,26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},acc_title:{rules:[7,26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},callback_args:{rules:[22,23,26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},callback_name:{rules:[19,20,21,26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},href:{rules:[26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},struct:{rules:[26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},generic:{rules:[26,49,50,51,52,53,54,55,56,57,58,59,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},bqstring:{rules:[26,49,50,51,52,53,54,55,56,57,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},string:{rules:[24,25,26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,8,10,13,14,15,16,17,18,26,27,28,29,38,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97],inclusive:!0}}};return v})();_e.lexer=je;function re(){this.yy={}}return p(re,"Parser"),re.prototype=_e,_e.Parser=re,new re})();Oe.parser=Oe;var Et=Oe,Ye=["#","+","~","-",""],Qe=class{static{p(this,"ClassMember")}constructor(e,i){this.memberType=i,this.visibility="",this.classifier="",this.text="";const r=ht(e,D());this.parseMember(r)}getDisplayDetails(){let e=this.visibility+M(this.id);this.memberType==="method"&&(e+=`(${M(this.parameters.trim())})`,this.returnType&&(e+=" : "+M(this.returnType))),e=e.trim();const i=this.parseClassifier();return{displayText:e,cssStyle:i}}parseMember(e){let i="";if(this.memberType==="method"){const a=/([#+~-])?(.+)\((.*)\)([\s$*])?(.*)([$*])?/.exec(e);if(a){const c=a[1]?a[1].trim():"";if(Ye.includes(c)&&(this.visibility=c),this.id=a[2],this.parameters=a[3]?a[3].trim():"",i=a[4]?a[4].trim():"",this.returnType=a[5]?a[5].trim():"",i===""){const A=this.returnType.substring(this.returnType.length-1);/[$*]/.exec(A)&&(i=A,this.returnType=this.returnType.substring(0,this.returnType.length-1))}}}else{const u=e.length,a=e.substring(0,1),c=e.substring(u-1);Ye.includes(a)&&(this.visibility=a),/[$*]/.exec(c)&&(i=c),this.id=e.substring(this.visibility===""?0:1,i===""?u:u-1)}this.classifier=i,this.id=this.id.startsWith(" ")?" "+this.id.trim():this.id.trim();const r=`${this.visibility?"\\"+this.visibility:""}${M(this.id)}${this.memberType==="method"?`(${M(this.parameters)})${this.returnType?" : "+M(this.returnType):""}`:""}`;this.text=r.replaceAll("<","<").replaceAll(">",">"),this.text.startsWith("\\<")&&(this.text=this.text.replace("\\<","~"))}parseClassifier(){switch(this.classifier){case"*":return"font-style:italic;";case"$":return"text-decoration:underline;";default:return""}}},ce="classId-",We=0,w=p(e=>x.sanitizeText(e,D()),"sanitizeText"),yt=class{constructor(){this.relations=[],this.classes=new Map,this.styleClasses=new Map,this.notes=[],this.interfaces=[],this.namespaces=new Map,this.namespaceCounter=0,this.functions=[],this.lineType={LINE:0,DOTTED_LINE:1},this.relationType={AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3,LOLLIPOP:4},this.setupToolTips=p(e=>{let i=J(".mermaidTooltip");(i._groups||i)[0][0]===null&&(i=J("body").append("div").attr("class","mermaidTooltip").style("opacity",0)),J(e).select("svg").selectAll("g.node").on("mouseover",a=>{const c=J(a.currentTarget);if(c.attr("title")===null)return;const f=this.getBoundingClientRect();i.transition().duration(200).style("opacity",".9"),i.text(c.attr("title")).style("left",window.scrollX+f.left+(f.right-f.left)/2+"px").style("top",window.scrollY+f.top-14+document.body.scrollTop+"px"),i.html(i.html().replace(/<br\/>/g,"
")),c.classed("hover",!0)}).on("mouseout",a=>{i.transition().duration(500).style("opacity",0),J(a.currentTarget).classed("hover",!1)})},"setupToolTips"),this.direction="TB",this.setAccTitle=it,this.getAccTitle=at,this.setAccDescription=nt,this.getAccDescription=rt,this.setDiagramTitle=ut,this.getDiagramTitle=lt,this.getConfig=p(()=>D().class,"getConfig"),this.functions.push(this.setupToolTips.bind(this)),this.clear(),this.addRelation=this.addRelation.bind(this),this.addClassesToNamespace=this.addClassesToNamespace.bind(this),this.addNamespace=this.addNamespace.bind(this),this.setCssClass=this.setCssClass.bind(this),this.addMembers=this.addMembers.bind(this),this.addClass=this.addClass.bind(this),this.setClassLabel=this.setClassLabel.bind(this),this.addAnnotation=this.addAnnotation.bind(this),this.addMember=this.addMember.bind(this),this.cleanupLabel=this.cleanupLabel.bind(this),this.addNote=this.addNote.bind(this),this.defineClass=this.defineClass.bind(this),this.setDirection=this.setDirection.bind(this),this.setLink=this.setLink.bind(this),this.bindFunctions=this.bindFunctions.bind(this),this.clear=this.clear.bind(this),this.setTooltip=this.setTooltip.bind(this),this.setClickEvent=this.setClickEvent.bind(this),this.setCssStyle=this.setCssStyle.bind(this)}static{p(this,"ClassDB")}splitClassNameAndType(e){const i=x.sanitizeText(e,D());let r="",u=i;if(i.indexOf("~")>0){const a=i.split("~");u=w(a[0]),r=w(a[1])}return{className:u,type:r}}setClassLabel(e,i){const r=x.sanitizeText(e,D());i&&(i=w(i));const{className:u}=this.splitClassNameAndType(r);this.classes.get(u).label=i,this.classes.get(u).text=`${i}${this.classes.get(u).type?`<${this.classes.get(u).type}>`:""}`}addClass(e){const i=x.sanitizeText(e,D()),{className:r,type:u}=this.splitClassNameAndType(i);if(this.classes.has(r))return;const a=x.sanitizeText(r,D());this.classes.set(a,{id:a,type:u,label:a,text:`${a}${u?`<${u}>`:""}`,shape:"classBox",cssClasses:"default",methods:[],members:[],annotations:[],styles:[],domId:ce+a+"-"+We}),We++}addInterface(e,i){const r={id:`interface${this.interfaces.length}`,label:e,classId:i};this.interfaces.push(r)}lookUpDomId(e){const i=x.sanitizeText(e,D());if(this.classes.has(i))return this.classes.get(i).domId;throw new Error("Class not found: "+i)}clear(){this.relations=[],this.classes=new Map,this.notes=[],this.interfaces=[],this.functions=[],this.functions.push(this.setupToolTips.bind(this)),this.namespaces=new Map,this.namespaceCounter=0,this.direction="TB",ot()}getClass(e){return this.classes.get(e)}getClasses(){return this.classes}getRelations(){return this.relations}getNotes(){return this.notes}addRelation(e){ve.debug("Adding relation: "+JSON.stringify(e));const i=[this.relationType.LOLLIPOP,this.relationType.AGGREGATION,this.relationType.COMPOSITION,this.relationType.DEPENDENCY,this.relationType.EXTENSION];e.relation.type1===this.relationType.LOLLIPOP&&!i.includes(e.relation.type2)?(this.addClass(e.id2),this.addInterface(e.id1,e.id2),e.id1=`interface${this.interfaces.length-1}`):e.relation.type2===this.relationType.LOLLIPOP&&!i.includes(e.relation.type1)?(this.addClass(e.id1),this.addInterface(e.id2,e.id1),e.id2=`interface${this.interfaces.length-1}`):(this.addClass(e.id1),this.addClass(e.id2)),e.id1=this.splitClassNameAndType(e.id1).className,e.id2=this.splitClassNameAndType(e.id2).className,e.relationTitle1=x.sanitizeText(e.relationTitle1.trim(),D()),e.relationTitle2=x.sanitizeText(e.relationTitle2.trim(),D()),this.relations.push(e)}addAnnotation(e,i){const r=this.splitClassNameAndType(e).className;this.classes.get(r).annotations.push(i)}addMember(e,i){this.addClass(e);const r=this.splitClassNameAndType(e).className,u=this.classes.get(r);if(typeof i=="string"){const a=i.trim();a.startsWith("<<")&&a.endsWith(">>")?u.annotations.push(w(a.substring(2,a.length-2))):a.indexOf(")")>0?u.methods.push(new Qe(a,"method")):a&&u.members.push(new Qe(a,"attribute"))}}addMembers(e,i){Array.isArray(i)&&(i.reverse(),i.forEach(r=>this.addMember(e,r)))}addNote(e,i){const r={id:`note${this.notes.length}`,class:i,text:e};this.notes.push(r)}cleanupLabel(e){return e.startsWith(":")&&(e=e.substring(1)),w(e.trim())}setCssClass(e,i){e.split(",").forEach(r=>{let u=r;/\d/.exec(r[0])&&(u=ce+u);const a=this.classes.get(u);a&&(a.cssClasses+=" "+i)})}defineClass(e,i){for(const r of e){let u=this.styleClasses.get(r);u===void 0&&(u={id:r,styles:[],textStyles:[]},this.styleClasses.set(r,u)),i&&i.forEach(a=>{if(/color/.exec(a)){const c=a.replace("fill","bgFill");u.textStyles.push(c)}u.styles.push(a)}),this.classes.forEach(a=>{a.cssClasses.includes(r)&&a.styles.push(...i.flatMap(c=>c.split(",")))})}}setTooltip(e,i){e.split(",").forEach(r=>{i!==void 0&&(this.classes.get(r).tooltip=w(i))})}getTooltip(e,i){return i&&this.namespaces.has(i)?this.namespaces.get(i).classes.get(e).tooltip:this.classes.get(e).tooltip}setLink(e,i,r){const u=D();e.split(",").forEach(a=>{let c=a;/\d/.exec(a[0])&&(c=ce+c);const A=this.classes.get(c);A&&(A.link=Ie.formatUrl(i,u),u.securityLevel==="sandbox"?A.linkTarget="_top":typeof r=="string"?A.linkTarget=w(r):A.linkTarget="_blank")}),this.setCssClass(e,"clickable")}setClickEvent(e,i,r){e.split(",").forEach(u=>{this.setClickFunc(u,i,r),this.classes.get(u).haveCallback=!0}),this.setCssClass(e,"clickable")}setClickFunc(e,i,r){const u=x.sanitizeText(e,D());if(D().securityLevel!=="loose"||i===void 0)return;const c=u;if(this.classes.has(c)){const A=this.lookUpDomId(c);let f=[];if(typeof r=="string"){f=r.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let k=0;k{const k=document.querySelector(`[id="${A}"]`);k!==null&&k.addEventListener("click",()=>{Ie.runFunc(i,...f)},!1)})}}bindFunctions(e){this.functions.forEach(i=>{i(e)})}getDirection(){return this.direction}setDirection(e){this.direction=e}addNamespace(e){this.namespaces.has(e)||(this.namespaces.set(e,{id:e,classes:new Map,children:{},domId:ce+e+"-"+this.namespaceCounter}),this.namespaceCounter++)}getNamespace(e){return this.namespaces.get(e)}getNamespaces(){return this.namespaces}addClassesToNamespace(e,i){if(this.namespaces.has(e))for(const r of i){const{className:u}=this.splitClassNameAndType(r);this.classes.get(u).parent=e,this.namespaces.get(e).classes.set(u,this.classes.get(u))}}setCssStyle(e,i){const r=this.classes.get(e);if(!(!i||!r))for(const u of i)u.includes(",")?r.styles.push(...u.split(",")):r.styles.push(u)}getArrowMarker(e){let i;switch(e){case 0:i="aggregation";break;case 1:i="extension";break;case 2:i="composition";break;case 3:i="dependency";break;case 4:i="lollipop";break;default:i="none"}return i}getData(){const e=[],i=[],r=D();for(const a of this.namespaces.keys()){const c=this.namespaces.get(a);if(c){const A={id:c.id,label:c.id,isGroup:!0,padding:r.class.padding??16,shape:"rect",cssStyles:["fill: none","stroke: black"],look:r.look};e.push(A)}}for(const a of this.classes.keys()){const c=this.classes.get(a);if(c){const A=c;A.parentId=c.parent,A.look=r.look,e.push(A)}}let u=0;for(const a of this.notes){u++;const c={id:a.id,label:a.text,isGroup:!1,shape:"note",padding:r.class.padding??6,cssStyles:["text-align: left","white-space: nowrap",`fill: ${r.themeVariables.noteBkgColor}`,`stroke: ${r.themeVariables.noteBorderColor}`],look:r.look};e.push(c);const A=this.classes.get(a.class)?.id??"";if(A){const f={id:`edgeNote${u}`,start:a.id,end:A,type:"normal",thickness:"normal",classes:"relation",arrowTypeStart:"none",arrowTypeEnd:"none",arrowheadStyle:"",labelStyle:[""],style:["fill: none"],pattern:"dotted",look:r.look};i.push(f)}}for(const a of this.interfaces){const c={id:a.id,label:a.label,isGroup:!1,shape:"rect",cssStyles:["opacity: 0;"],look:r.look};e.push(c)}u=0;for(const a of this.relations){u++;const c={id:ct(a.id1,a.id2,{prefix:"id",counter:u}),start:a.id1,end:a.id2,type:"normal",label:a.title,labelpos:"c",thickness:"normal",classes:"relation",arrowTypeStart:this.getArrowMarker(a.relation.type1),arrowTypeEnd:this.getArrowMarker(a.relation.type2),startLabelRight:a.relationTitle1==="none"?"":a.relationTitle1,endLabelLeft:a.relationTitle2==="none"?"":a.relationTitle2,arrowheadStyle:"",labelStyle:["display: inline-block"],style:a.style||"",pattern:a.relation.lineType==1?"dashed":"solid",look:r.look};i.push(c)}return{nodes:e,edges:i,other:{},config:r,direction:this.getDirection()}}},dt=p(e=>`g.classGroup text { + fill: ${e.nodeBorder||e.classText}; + stroke: none; + font-family: ${e.fontFamily}; + font-size: 10px; + + .title { + font-weight: bolder; + } + +} + +.nodeLabel, .edgeLabel { + color: ${e.classText}; +} +.edgeLabel .label rect { + fill: ${e.mainBkg}; +} +.label text { + fill: ${e.classText}; +} + +.labelBkg { + background: ${e.mainBkg}; +} +.edgeLabel .label span { + background: ${e.mainBkg}; +} + +.classTitle { + font-weight: bolder; +} +.node rect, + .node circle, + .node ellipse, + .node polygon, + .node path { + fill: ${e.mainBkg}; + stroke: ${e.nodeBorder}; + stroke-width: 1px; + } + + +.divider { + stroke: ${e.nodeBorder}; + stroke-width: 1; +} + +g.clickable { + cursor: pointer; +} + +g.classGroup rect { + fill: ${e.mainBkg}; + stroke: ${e.nodeBorder}; +} + +g.classGroup line { + stroke: ${e.nodeBorder}; + stroke-width: 1; +} + +.classLabel .box { + stroke: none; + stroke-width: 0; + fill: ${e.mainBkg}; + opacity: 0.5; +} + +.classLabel .label { + fill: ${e.nodeBorder}; + font-size: 10px; +} + +.relation { + stroke: ${e.lineColor}; + stroke-width: 1; + fill: none; +} + +.dashed-line{ + stroke-dasharray: 3; +} + +.dotted-line{ + stroke-dasharray: 1 2; +} + +#compositionStart, .composition { + fill: ${e.lineColor} !important; + stroke: ${e.lineColor} !important; + stroke-width: 1; +} + +#compositionEnd, .composition { + fill: ${e.lineColor} !important; + stroke: ${e.lineColor} !important; + stroke-width: 1; +} + +#dependencyStart, .dependency { + fill: ${e.lineColor} !important; + stroke: ${e.lineColor} !important; + stroke-width: 1; +} + +#dependencyStart, .dependency { + fill: ${e.lineColor} !important; + stroke: ${e.lineColor} !important; + stroke-width: 1; +} + +#extensionStart, .extension { + fill: transparent !important; + stroke: ${e.lineColor} !important; + stroke-width: 1; +} + +#extensionEnd, .extension { + fill: transparent !important; + stroke: ${e.lineColor} !important; + stroke-width: 1; +} + +#aggregationStart, .aggregation { + fill: transparent !important; + stroke: ${e.lineColor} !important; + stroke-width: 1; +} + +#aggregationEnd, .aggregation { + fill: transparent !important; + stroke: ${e.lineColor} !important; + stroke-width: 1; +} + +#lollipopStart, .lollipop { + fill: ${e.mainBkg} !important; + stroke: ${e.lineColor} !important; + stroke-width: 1; +} + +#lollipopEnd, .lollipop { + fill: ${e.mainBkg} !important; + stroke: ${e.lineColor} !important; + stroke-width: 1; +} + +.edgeTerminals { + font-size: 11px; + line-height: initial; +} + +.classTitleText { + text-anchor: middle; + font-size: 18px; + fill: ${e.textColor}; +} + ${Ze()} +`,"getStyles"),Tt=dt,pt=p((e,i="TB")=>{if(!e.doc)return i;let r=i;for(const u of e.doc)u.stmt==="dir"&&(r=u.value);return r},"getDir"),At=p(function(e,i){return i.db.getClasses()},"getClasses"),ft=p(async function(e,i,r,u){ve.info("REF0:"),ve.info("Drawing class diagram (v3)",i);const{securityLevel:a,state:c,layout:A}=D(),f=u.db.getData(),k=$e(i,a);f.type=u.type,f.layoutAlgorithm=tt(A),f.nodeSpacing=c?.nodeSpacing||50,f.rankSpacing=c?.rankSpacing||50,f.markers=["aggregation","extension","composition","dependency","lollipop"],f.diagramId=i,await st(f,k);const _=8;Ie.insertTitle(k,"classDiagramTitleText",c?.titleTopMargin??25,u.db.getDiagramTitle()),et(k,_,"classDiagram",c?.useMaxWidth??!0)},"draw"),kt={getClasses:At,draw:ft,getDir:pt};export{yt as C,Et as a,kt as c,Tt as s}; diff --git a/_astro/chunk-DI55MBZ5.DiMe6WwJ.js b/_astro/chunk-DI55MBZ5.DiMe6WwJ.js new file mode 100644 index 00000000..20067c90 --- /dev/null +++ b/_astro/chunk-DI55MBZ5.DiMe6WwJ.js @@ -0,0 +1,220 @@ +import{g as Zt}from"./chunk-55IACEB6.b7ueBidu.js";import{s as te}from"./chunk-QN33PNHL.BI3h-IJf.js";import{_ as d,l as _,c as w,r as ee,u as se,a as ie,b as re,g as ae,s as ne,p as oe,q as le,T as ce,k as U,y as he}from"./mermaid.core.LbQlJBBQ.js";var kt=(function(){var t=d(function(Y,a,c,r){for(c=c||{},r=Y.length;r--;c[Y[r]]=a);return c},"o"),e=[1,2],o=[1,3],s=[1,4],h=[2,4],u=[1,9],S=[1,11],g=[1,16],n=[1,17],T=[1,18],b=[1,19],C=[1,33],A=[1,20],k=[1,21],f=[1,22],D=[1,23],R=[1,24],L=[1,26],$=[1,27],I=[1,28],P=[1,29],et=[1,30],st=[1,31],it=[1,32],rt=[1,35],at=[1,36],nt=[1,37],ot=[1,38],j=[1,34],p=[1,4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],lt=[1,4,5,14,15,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,39,40,41,45,48,51,52,53,54,57],At=[4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],yt={trace:d(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SPACE:4,NL:5,SD:6,document:7,line:8,statement:9,classDefStatement:10,styleStatement:11,cssClassStatement:12,idStatement:13,DESCR:14,"-->":15,HIDE_EMPTY:16,scale:17,WIDTH:18,COMPOSIT_STATE:19,STRUCT_START:20,STRUCT_STOP:21,STATE_DESCR:22,AS:23,ID:24,FORK:25,JOIN:26,CHOICE:27,CONCURRENT:28,note:29,notePosition:30,NOTE_TEXT:31,direction:32,acc_title:33,acc_title_value:34,acc_descr:35,acc_descr_value:36,acc_descr_multiline_value:37,CLICK:38,STRING:39,HREF:40,classDef:41,CLASSDEF_ID:42,CLASSDEF_STYLEOPTS:43,DEFAULT:44,style:45,STYLE_IDS:46,STYLEDEF_STYLEOPTS:47,class:48,CLASSENTITY_IDS:49,STYLECLASS:50,direction_tb:51,direction_bt:52,direction_rl:53,direction_lr:54,eol:55,";":56,EDGE_STATE:57,STYLE_SEPARATOR:58,left_of:59,right_of:60,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NL",6:"SD",14:"DESCR",15:"-->",16:"HIDE_EMPTY",17:"scale",18:"WIDTH",19:"COMPOSIT_STATE",20:"STRUCT_START",21:"STRUCT_STOP",22:"STATE_DESCR",23:"AS",24:"ID",25:"FORK",26:"JOIN",27:"CHOICE",28:"CONCURRENT",29:"note",31:"NOTE_TEXT",33:"acc_title",34:"acc_title_value",35:"acc_descr",36:"acc_descr_value",37:"acc_descr_multiline_value",38:"CLICK",39:"STRING",40:"HREF",41:"classDef",42:"CLASSDEF_ID",43:"CLASSDEF_STYLEOPTS",44:"DEFAULT",45:"style",46:"STYLE_IDS",47:"STYLEDEF_STYLEOPTS",48:"class",49:"CLASSENTITY_IDS",50:"STYLECLASS",51:"direction_tb",52:"direction_bt",53:"direction_rl",54:"direction_lr",56:";",57:"EDGE_STATE",58:"STYLE_SEPARATOR",59:"left_of",60:"right_of"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,3],[9,4],[9,1],[9,2],[9,1],[9,4],[9,3],[9,6],[9,1],[9,1],[9,1],[9,1],[9,4],[9,4],[9,1],[9,2],[9,2],[9,1],[9,5],[9,5],[10,3],[10,3],[11,3],[12,3],[32,1],[32,1],[32,1],[32,1],[55,1],[55,1],[13,1],[13,1],[13,3],[13,3],[30,1],[30,1]],performAction:d(function(a,c,r,y,E,i,X){var l=i.length-1;switch(E){case 3:return y.setRootDoc(i[l]),i[l];case 4:this.$=[];break;case 5:i[l]!="nl"&&(i[l-1].push(i[l]),this.$=i[l-1]);break;case 6:case 7:this.$=i[l];break;case 8:this.$="nl";break;case 12:this.$=i[l];break;case 13:const J=i[l-1];J.description=y.trimColon(i[l]),this.$=J;break;case 14:this.$={stmt:"relation",state1:i[l-2],state2:i[l]};break;case 15:const gt=y.trimColon(i[l]);this.$={stmt:"relation",state1:i[l-3],state2:i[l-1],description:gt};break;case 19:this.$={stmt:"state",id:i[l-3],type:"default",description:"",doc:i[l-1]};break;case 20:var B=i[l],H=i[l-2].trim();if(i[l].match(":")){var ht=i[l].split(":");B=ht[0],H=[H,ht[1]]}this.$={stmt:"state",id:B,type:"default",description:H};break;case 21:this.$={stmt:"state",id:i[l-3],type:"default",description:i[l-5],doc:i[l-1]};break;case 22:this.$={stmt:"state",id:i[l],type:"fork"};break;case 23:this.$={stmt:"state",id:i[l],type:"join"};break;case 24:this.$={stmt:"state",id:i[l],type:"choice"};break;case 25:this.$={stmt:"state",id:y.getDividerId(),type:"divider"};break;case 26:this.$={stmt:"state",id:i[l-1].trim(),note:{position:i[l-2].trim(),text:i[l].trim()}};break;case 29:this.$=i[l].trim(),y.setAccTitle(this.$);break;case 30:case 31:this.$=i[l].trim(),y.setAccDescription(this.$);break;case 32:this.$={stmt:"click",id:i[l-3],url:i[l-2],tooltip:i[l-1]};break;case 33:this.$={stmt:"click",id:i[l-3],url:i[l-1],tooltip:""};break;case 34:case 35:this.$={stmt:"classDef",id:i[l-1].trim(),classes:i[l].trim()};break;case 36:this.$={stmt:"style",id:i[l-1].trim(),styleClass:i[l].trim()};break;case 37:this.$={stmt:"applyClass",id:i[l-1].trim(),styleClass:i[l].trim()};break;case 38:y.setDirection("TB"),this.$={stmt:"dir",value:"TB"};break;case 39:y.setDirection("BT"),this.$={stmt:"dir",value:"BT"};break;case 40:y.setDirection("RL"),this.$={stmt:"dir",value:"RL"};break;case 41:y.setDirection("LR"),this.$={stmt:"dir",value:"LR"};break;case 44:case 45:this.$={stmt:"state",id:i[l].trim(),type:"default",description:""};break;case 46:this.$={stmt:"state",id:i[l-2].trim(),classes:[i[l].trim()],type:"default",description:""};break;case 47:this.$={stmt:"state",id:i[l-2].trim(),classes:[i[l].trim()],type:"default",description:""};break}},"anonymous"),table:[{3:1,4:e,5:o,6:s},{1:[3]},{3:5,4:e,5:o,6:s},{3:6,4:e,5:o,6:s},t([1,4,5,16,17,19,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],h,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:u,5:S,8:8,9:10,10:12,11:13,12:14,13:15,16:g,17:n,19:T,22:b,24:C,25:A,26:k,27:f,28:D,29:R,32:25,33:L,35:$,37:I,38:P,41:et,45:st,48:it,51:rt,52:at,53:nt,54:ot,57:j},t(p,[2,5]),{9:39,10:12,11:13,12:14,13:15,16:g,17:n,19:T,22:b,24:C,25:A,26:k,27:f,28:D,29:R,32:25,33:L,35:$,37:I,38:P,41:et,45:st,48:it,51:rt,52:at,53:nt,54:ot,57:j},t(p,[2,7]),t(p,[2,8]),t(p,[2,9]),t(p,[2,10]),t(p,[2,11]),t(p,[2,12],{14:[1,40],15:[1,41]}),t(p,[2,16]),{18:[1,42]},t(p,[2,18],{20:[1,43]}),{23:[1,44]},t(p,[2,22]),t(p,[2,23]),t(p,[2,24]),t(p,[2,25]),{30:45,31:[1,46],59:[1,47],60:[1,48]},t(p,[2,28]),{34:[1,49]},{36:[1,50]},t(p,[2,31]),{13:51,24:C,57:j},{42:[1,52],44:[1,53]},{46:[1,54]},{49:[1,55]},t(lt,[2,44],{58:[1,56]}),t(lt,[2,45],{58:[1,57]}),t(p,[2,38]),t(p,[2,39]),t(p,[2,40]),t(p,[2,41]),t(p,[2,6]),t(p,[2,13]),{13:58,24:C,57:j},t(p,[2,17]),t(At,h,{7:59}),{24:[1,60]},{24:[1,61]},{23:[1,62]},{24:[2,48]},{24:[2,49]},t(p,[2,29]),t(p,[2,30]),{39:[1,63],40:[1,64]},{43:[1,65]},{43:[1,66]},{47:[1,67]},{50:[1,68]},{24:[1,69]},{24:[1,70]},t(p,[2,14],{14:[1,71]}),{4:u,5:S,8:8,9:10,10:12,11:13,12:14,13:15,16:g,17:n,19:T,21:[1,72],22:b,24:C,25:A,26:k,27:f,28:D,29:R,32:25,33:L,35:$,37:I,38:P,41:et,45:st,48:it,51:rt,52:at,53:nt,54:ot,57:j},t(p,[2,20],{20:[1,73]}),{31:[1,74]},{24:[1,75]},{39:[1,76]},{39:[1,77]},t(p,[2,34]),t(p,[2,35]),t(p,[2,36]),t(p,[2,37]),t(lt,[2,46]),t(lt,[2,47]),t(p,[2,15]),t(p,[2,19]),t(At,h,{7:78}),t(p,[2,26]),t(p,[2,27]),{5:[1,79]},{5:[1,80]},{4:u,5:S,8:8,9:10,10:12,11:13,12:14,13:15,16:g,17:n,19:T,21:[1,81],22:b,24:C,25:A,26:k,27:f,28:D,29:R,32:25,33:L,35:$,37:I,38:P,41:et,45:st,48:it,51:rt,52:at,53:nt,54:ot,57:j},t(p,[2,32]),t(p,[2,33]),t(p,[2,21])],defaultActions:{5:[2,1],6:[2,2],47:[2,48],48:[2,49]},parseError:d(function(a,c){if(c.recoverable)this.trace(a);else{var r=new Error(a);throw r.hash=c,r}},"parseError"),parse:d(function(a){var c=this,r=[0],y=[],E=[null],i=[],X=this.table,l="",B=0,H=0,ht=2,J=1,gt=i.slice.call(arguments,1),m=Object.create(this.lexer),V={yy:{}};for(var Tt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Tt)&&(V.yy[Tt]=this.yy[Tt]);m.setInput(a,V.yy),V.yy.lexer=m,V.yy.parser=this,typeof m.yylloc>"u"&&(m.yylloc={});var Et=m.yylloc;i.push(Et);var qt=m.options&&m.options.ranges;typeof V.yy.parseError=="function"?this.parseError=V.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Qt(O){r.length=r.length-2*O,E.length=E.length-O,i.length=i.length-O}d(Qt,"popStack");function xt(){var O;return O=y.pop()||m.lex()||J,typeof O!="number"&&(O instanceof Array&&(y=O,O=y.pop()),O=c.symbols_[O]||O),O}d(xt,"lex");for(var x,M,N,_t,W={},ut,F,Lt,dt;;){if(M=r[r.length-1],this.defaultActions[M]?N=this.defaultActions[M]:((x===null||typeof x>"u")&&(x=xt()),N=X[M]&&X[M][x]),typeof N>"u"||!N.length||!N[0]){var mt="";dt=[];for(ut in X[M])this.terminals_[ut]&&ut>ht&&dt.push("'"+this.terminals_[ut]+"'");m.showPosition?mt="Parse error on line "+(B+1)+`: +`+m.showPosition()+` +Expecting `+dt.join(", ")+", got '"+(this.terminals_[x]||x)+"'":mt="Parse error on line "+(B+1)+": Unexpected "+(x==J?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(mt,{text:m.match,token:this.terminals_[x]||x,line:m.yylineno,loc:Et,expected:dt})}if(N[0]instanceof Array&&N.length>1)throw new Error("Parse Error: multiple actions possible at state: "+M+", token: "+x);switch(N[0]){case 1:r.push(x),E.push(m.yytext),i.push(m.yylloc),r.push(N[1]),x=null,H=m.yyleng,l=m.yytext,B=m.yylineno,Et=m.yylloc;break;case 2:if(F=this.productions_[N[1]][1],W.$=E[E.length-F],W._$={first_line:i[i.length-(F||1)].first_line,last_line:i[i.length-1].last_line,first_column:i[i.length-(F||1)].first_column,last_column:i[i.length-1].last_column},qt&&(W._$.range=[i[i.length-(F||1)].range[0],i[i.length-1].range[1]]),_t=this.performAction.apply(W,[l,H,B,V.yy,N[1],E,i].concat(gt)),typeof _t<"u")return _t;F&&(r=r.slice(0,-1*F*2),E=E.slice(0,-1*F),i=i.slice(0,-1*F)),r.push(this.productions_[N[1]][0]),E.push(W.$),i.push(W._$),Lt=X[r[r.length-2]][r[r.length-1]],r.push(Lt);break;case 3:return!0}}return!0},"parse")},Jt=(function(){var Y={EOF:1,parseError:d(function(c,r){if(this.yy.parser)this.yy.parser.parseError(c,r);else throw new Error(c)},"parseError"),setInput:d(function(a,c){return this.yy=c||this.yy||{},this._input=a,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:d(function(){var a=this._input[0];this.yytext+=a,this.yyleng++,this.offset++,this.match+=a,this.matched+=a;var c=a.match(/(?:\r\n?|\n).*/g);return c?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),a},"input"),unput:d(function(a){var c=a.length,r=a.split(/(?:\r\n?|\n)/g);this._input=a+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-c),this.offset-=c;var y=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),r.length-1&&(this.yylineno-=r.length-1);var E=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:r?(r.length===y.length?this.yylloc.first_column:0)+y[y.length-r.length].length-r[0].length:this.yylloc.first_column-c},this.options.ranges&&(this.yylloc.range=[E[0],E[0]+this.yyleng-c]),this.yyleng=this.yytext.length,this},"unput"),more:d(function(){return this._more=!0,this},"more"),reject:d(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:d(function(a){this.unput(this.match.slice(a))},"less"),pastInput:d(function(){var a=this.matched.substr(0,this.matched.length-this.match.length);return(a.length>20?"...":"")+a.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:d(function(){var a=this.match;return a.length<20&&(a+=this._input.substr(0,20-a.length)),(a.substr(0,20)+(a.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:d(function(){var a=this.pastInput(),c=new Array(a.length+1).join("-");return a+this.upcomingInput()+` +`+c+"^"},"showPosition"),test_match:d(function(a,c){var r,y,E;if(this.options.backtrack_lexer&&(E={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&&(E.yylloc.range=this.yylloc.range.slice(0))),y=a[0].match(/(?:\r\n?|\n).*/g),y&&(this.yylineno+=y.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:y?y[y.length-1].length-y[y.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+a[0].length},this.yytext+=a[0],this.match+=a[0],this.matches=a,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(a[0].length),this.matched+=a[0],r=this.performAction.call(this,this.yy,this,c,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack){for(var i in E)this[i]=E[i];return!1}return!1},"test_match"),next:d(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var a,c,r,y;this._more||(this.yytext="",this.match="");for(var E=this._currentRules(),i=0;ic[0].length)){if(c=r,y=i,this.options.backtrack_lexer){if(a=this.test_match(r,E[i]),a!==!1)return a;if(this._backtrack){c=!1;continue}else return!1}else if(!this.options.flex)break}return c?(a=this.test_match(c,E[y]),a!==!1?a:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:d(function(){var c=this.next();return c||this.lex()},"lex"),begin:d(function(c){this.conditionStack.push(c)},"begin"),popState:d(function(){var c=this.conditionStack.length-1;return c>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:d(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:d(function(c){return c=this.conditionStack.length-1-Math.abs(c||0),c>=0?this.conditionStack[c]:"INITIAL"},"topState"),pushState:d(function(c){this.begin(c)},"pushState"),stateStackSize:d(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:d(function(c,r,y,E){switch(y){case 0:return 38;case 1:return 40;case 2:return 39;case 3:return 44;case 4:return 51;case 5:return 52;case 6:return 53;case 7:return 54;case 8:break;case 9:break;case 10:return 5;case 11:break;case 12:break;case 13:break;case 14:break;case 15:return this.pushState("SCALE"),17;case 16:return 18;case 17:this.popState();break;case 18:return this.begin("acc_title"),33;case 19:return this.popState(),"acc_title_value";case 20:return this.begin("acc_descr"),35;case 21:return this.popState(),"acc_descr_value";case 22:this.begin("acc_descr_multiline");break;case 23:this.popState();break;case 24:return"acc_descr_multiline_value";case 25:return this.pushState("CLASSDEF"),41;case 26:return this.popState(),this.pushState("CLASSDEFID"),"DEFAULT_CLASSDEF_ID";case 27:return this.popState(),this.pushState("CLASSDEFID"),42;case 28:return this.popState(),43;case 29:return this.pushState("CLASS"),48;case 30:return this.popState(),this.pushState("CLASS_STYLE"),49;case 31:return this.popState(),50;case 32:return this.pushState("STYLE"),45;case 33:return this.popState(),this.pushState("STYLEDEF_STYLES"),46;case 34:return this.popState(),47;case 35:return this.pushState("SCALE"),17;case 36:return 18;case 37:this.popState();break;case 38:this.pushState("STATE");break;case 39:return this.popState(),r.yytext=r.yytext.slice(0,-8).trim(),25;case 40:return this.popState(),r.yytext=r.yytext.slice(0,-8).trim(),26;case 41:return this.popState(),r.yytext=r.yytext.slice(0,-10).trim(),27;case 42:return this.popState(),r.yytext=r.yytext.slice(0,-8).trim(),25;case 43:return this.popState(),r.yytext=r.yytext.slice(0,-8).trim(),26;case 44:return this.popState(),r.yytext=r.yytext.slice(0,-10).trim(),27;case 45:return 51;case 46:return 52;case 47:return 53;case 48:return 54;case 49:this.pushState("STATE_STRING");break;case 50:return this.pushState("STATE_ID"),"AS";case 51:return this.popState(),"ID";case 52:this.popState();break;case 53:return"STATE_DESCR";case 54:return 19;case 55:this.popState();break;case 56:return this.popState(),this.pushState("struct"),20;case 57:break;case 58:return this.popState(),21;case 59:break;case 60:return this.begin("NOTE"),29;case 61:return this.popState(),this.pushState("NOTE_ID"),59;case 62:return this.popState(),this.pushState("NOTE_ID"),60;case 63:this.popState(),this.pushState("FLOATING_NOTE");break;case 64:return this.popState(),this.pushState("FLOATING_NOTE_ID"),"AS";case 65:break;case 66:return"NOTE_TEXT";case 67:return this.popState(),"ID";case 68:return this.popState(),this.pushState("NOTE_TEXT"),24;case 69:return this.popState(),r.yytext=r.yytext.substr(2).trim(),31;case 70:return this.popState(),r.yytext=r.yytext.slice(0,-8).trim(),31;case 71:return 6;case 72:return 6;case 73:return 16;case 74:return 57;case 75:return 24;case 76:return r.yytext=r.yytext.trim(),14;case 77:return 15;case 78:return 28;case 79:return 58;case 80:return 5;case 81:return"INVALID"}},"anonymous"),rules:[/^(?:click\b)/i,/^(?:href\b)/i,/^(?:"[^"]*")/i,/^(?:default\b)/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:[\s]+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:scale\s+)/i,/^(?:\d+)/i,/^(?:\s+width\b)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:classDef\s+)/i,/^(?:DEFAULT\s+)/i,/^(?:\w+\s+)/i,/^(?:[^\n]*)/i,/^(?:class\s+)/i,/^(?:(\w+)+((,\s*\w+)*))/i,/^(?:[^\n]*)/i,/^(?:style\s+)/i,/^(?:[\w,]+\s+)/i,/^(?:[^\n]*)/i,/^(?:scale\s+)/i,/^(?:\d+)/i,/^(?:\s+width\b)/i,/^(?:state\s+)/i,/^(?:.*<>)/i,/^(?:.*<>)/i,/^(?:.*<>)/i,/^(?:.*\[\[fork\]\])/i,/^(?:.*\[\[join\]\])/i,/^(?:.*\[\[choice\]\])/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:["])/i,/^(?:\s*as\s+)/i,/^(?:[^\n\{]*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[^\n\s\{]+)/i,/^(?:\n)/i,/^(?:\{)/i,/^(?:%%(?!\{)[^\n]*)/i,/^(?:\})/i,/^(?:[\n])/i,/^(?:note\s+)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:")/i,/^(?:\s*as\s*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[^\n]*)/i,/^(?:\s*[^:\n\s\-]+)/i,/^(?:\s*:[^:\n;]+)/i,/^(?:[\s\S]*?end note\b)/i,/^(?:stateDiagram\s+)/i,/^(?:stateDiagram-v2\s+)/i,/^(?:hide empty description\b)/i,/^(?:\[\*\])/i,/^(?:[^:\n\s\-\{]+)/i,/^(?:\s*:[^:\n;]+)/i,/^(?:-->)/i,/^(?:--)/i,/^(?::::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{LINE:{rules:[12,13],inclusive:!1},struct:{rules:[12,13,25,29,32,38,45,46,47,48,57,58,59,60,74,75,76,77,78],inclusive:!1},FLOATING_NOTE_ID:{rules:[67],inclusive:!1},FLOATING_NOTE:{rules:[64,65,66],inclusive:!1},NOTE_TEXT:{rules:[69,70],inclusive:!1},NOTE_ID:{rules:[68],inclusive:!1},NOTE:{rules:[61,62,63],inclusive:!1},STYLEDEF_STYLEOPTS:{rules:[],inclusive:!1},STYLEDEF_STYLES:{rules:[34],inclusive:!1},STYLE_IDS:{rules:[],inclusive:!1},STYLE:{rules:[33],inclusive:!1},CLASS_STYLE:{rules:[31],inclusive:!1},CLASS:{rules:[30],inclusive:!1},CLASSDEFID:{rules:[28],inclusive:!1},CLASSDEF:{rules:[26,27],inclusive:!1},acc_descr_multiline:{rules:[23,24],inclusive:!1},acc_descr:{rules:[21],inclusive:!1},acc_title:{rules:[19],inclusive:!1},SCALE:{rules:[16,17,36,37],inclusive:!1},ALIAS:{rules:[],inclusive:!1},STATE_ID:{rules:[51],inclusive:!1},STATE_STRING:{rules:[52,53],inclusive:!1},FORK_STATE:{rules:[],inclusive:!1},STATE:{rules:[12,13,39,40,41,42,43,44,49,50,54,55,56],inclusive:!1},ID:{rules:[12,13],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,13,14,15,18,20,22,25,29,32,35,38,56,60,71,72,73,74,75,76,77,79,80,81],inclusive:!0}}};return Y})();yt.lexer=Jt;function ct(){this.yy={}}return d(ct,"Parser"),ct.prototype=yt,yt.Parser=ct,new ct})();kt.parser=kt;var Ge=kt,ue="TB",Ft="TB",It="dir",K="state",z="root",vt="relation",de="classDef",fe="style",pe="applyClass",Z="default",Yt="divider",Gt="fill:none",Bt="fill: #333",Vt="c",Mt="text",Ut="normal",bt="rect",Dt="rectWithTitle",Se="stateStart",ye="stateEnd",Ot="divider",Rt="roundedWithTitle",ge="note",Te="noteGroup",tt="statediagram",Ee="state",_e=`${tt}-${Ee}`,jt="transition",me="note",be="note-edge",De=`${jt} ${be}`,ke=`${tt}-${me}`,ve="cluster",Ce=`${tt}-${ve}`,Ae="cluster-alt",xe=`${tt}-${Ae}`,Ht="parent",Wt="note",Le="state",Ct="----",Ie=`${Ct}${Wt}`,Nt=`${Ct}${Ht}`,zt=d((t,e=Ft)=>{if(!t.doc)return e;let o=e;for(const s of t.doc)s.stmt==="dir"&&(o=s.value);return o},"getDir"),Oe=d(function(t,e){return e.db.getClasses()},"getClasses"),Re=d(async function(t,e,o,s){_.info("REF0:"),_.info("Drawing state diagram (v2)",e);const{securityLevel:h,state:u,layout:S}=w();s.db.extract(s.db.getRootDocV2());const g=s.db.getData(),n=Zt(e,h);g.type=s.type,g.layoutAlgorithm=S,g.nodeSpacing=u?.nodeSpacing||50,g.rankSpacing=u?.rankSpacing||50,g.markers=["barb"],g.diagramId=e,await ee(g,n);const T=8;try{(typeof s.db.getLinks=="function"?s.db.getLinks():new Map).forEach((C,A)=>{const k=typeof A=="string"?A:typeof A?.id=="string"?A.id:"";if(!k){_.warn("⚠️ Invalid or missing stateId from key:",JSON.stringify(A));return}const f=n.node()?.querySelectorAll("g");let D;if(f?.forEach(I=>{I.textContent?.trim()===k&&(D=I)}),!D){_.warn("⚠️ Could not find node matching text:",k);return}const R=D.parentNode;if(!R){_.warn("⚠️ Node has no parent, cannot wrap:",k);return}const L=document.createElementNS("http://www.w3.org/2000/svg","a"),$=C.url.replace(/^"+|"+$/g,"");if(L.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",$),L.setAttribute("target","_blank"),C.tooltip){const I=C.tooltip.replace(/^"+|"+$/g,"");L.setAttribute("title",I)}R.replaceChild(L,D),L.appendChild(D),_.info("🔗 Wrapped node in tag for:",k,C.url)})}catch(b){_.error("❌ Error injecting clickable links:",b)}se.insertTitle(n,"statediagramTitleText",u?.titleTopMargin??25,s.db.getDiagramTitle()),te(n,T,tt,u?.useMaxWidth??!0)},"draw"),Be={getClasses:Oe,draw:Re,getDir:zt},pt=new Map,G=0;function St(t="",e=0,o="",s=Ct){const h=o!==null&&o.length>0?`${s}${o}`:"";return`${Le}-${t}${h}-${e}`}d(St,"stateDomId");var Ne=d((t,e,o,s,h,u,S,g)=>{_.trace("items",e),e.forEach(n=>{switch(n.stmt){case K:Q(t,n,o,s,h,u,S,g);break;case Z:Q(t,n,o,s,h,u,S,g);break;case vt:{Q(t,n.state1,o,s,h,u,S,g),Q(t,n.state2,o,s,h,u,S,g);const T={id:"edge"+G,start:n.state1.id,end:n.state2.id,arrowhead:"normal",arrowTypeEnd:"arrow_barb",style:Gt,labelStyle:"",label:U.sanitizeText(n.description??"",w()),arrowheadStyle:Bt,labelpos:Vt,labelType:Mt,thickness:Ut,classes:jt,look:S};h.push(T),G++}break}})},"setupDoc"),wt=d((t,e=Ft)=>{let o=e;if(t.doc)for(const s of t.doc)s.stmt==="dir"&&(o=s.value);return o},"getDir");function q(t,e,o){if(!e.id||e.id===""||e.id==="")return;e.cssClasses&&(Array.isArray(e.cssCompiledStyles)||(e.cssCompiledStyles=[]),e.cssClasses.split(" ").forEach(h=>{const u=o.get(h);u&&(e.cssCompiledStyles=[...e.cssCompiledStyles??[],...u.styles])}));const s=t.find(h=>h.id===e.id);s?Object.assign(s,e):t.push(e)}d(q,"insertOrUpdateNode");function Kt(t){return t?.classes?.join(" ")??""}d(Kt,"getClassesFromDbInfo");function Xt(t){return t?.styles??[]}d(Xt,"getStylesFromDbInfo");var Q=d((t,e,o,s,h,u,S,g)=>{const n=e.id,T=o.get(n),b=Kt(T),C=Xt(T),A=w();if(_.info("dataFetcher parsedItem",e,T,C),n!=="root"){let k=bt;e.start===!0?k=Se:e.start===!1&&(k=ye),e.type!==Z&&(k=e.type),pt.get(n)||pt.set(n,{id:n,shape:k,description:U.sanitizeText(n,A),cssClasses:`${b} ${_e}`,cssStyles:C});const f=pt.get(n);e.description&&(Array.isArray(f.description)?(f.shape=Dt,f.description.push(e.description)):f.description?.length&&f.description.length>0?(f.shape=Dt,f.description===n?f.description=[e.description]:f.description=[f.description,e.description]):(f.shape=bt,f.description=e.description),f.description=U.sanitizeTextOrArray(f.description,A)),f.description?.length===1&&f.shape===Dt&&(f.type==="group"?f.shape=Rt:f.shape=bt),!f.type&&e.doc&&(_.info("Setting cluster for XCX",n,wt(e)),f.type="group",f.isGroup=!0,f.dir=wt(e),f.shape=e.type===Yt?Ot:Rt,f.cssClasses=`${f.cssClasses} ${Ce} ${u?xe:""}`);const D={labelStyle:"",shape:f.shape,label:f.description,cssClasses:f.cssClasses,cssCompiledStyles:[],cssStyles:f.cssStyles,id:n,dir:f.dir,domId:St(n,G),type:f.type,isGroup:f.type==="group",padding:8,rx:10,ry:10,look:S};if(D.shape===Ot&&(D.label=""),t&&t.id!=="root"&&(_.trace("Setting node ",n," to be child of its parent ",t.id),D.parentId=t.id),D.centerLabel=!0,e.note){const R={labelStyle:"",shape:ge,label:e.note.text,cssClasses:ke,cssStyles:[],cssCompiledStyles:[],id:n+Ie+"-"+G,domId:St(n,G,Wt),type:f.type,isGroup:f.type==="group",padding:A.flowchart?.padding,look:S,position:e.note.position},L=n+Nt,$={labelStyle:"",shape:Te,label:e.note.text,cssClasses:f.cssClasses,cssStyles:[],id:n+Nt,domId:St(n,G,Ht),type:"group",isGroup:!0,padding:16,look:S,position:e.note.position};G++,$.id=L,R.parentId=L,q(s,$,g),q(s,R,g),q(s,D,g);let I=n,P=R.id;e.note.position==="left of"&&(I=R.id,P=n),h.push({id:I+"-"+P,start:I,end:P,arrowhead:"none",arrowTypeEnd:"",style:Gt,labelStyle:"",classes:De,arrowheadStyle:Bt,labelpos:Vt,labelType:Mt,thickness:Ut,look:S})}else q(s,D,g)}e.doc&&(_.trace("Adding nodes children "),Ne(e,e.doc,o,s,h,!u,S,g))},"dataFetcher"),we=d(()=>{pt.clear(),G=0},"reset"),v={START_NODE:"[*]",START_TYPE:"start",END_NODE:"[*]",END_TYPE:"end",COLOR_KEYWORD:"color",FILL_KEYWORD:"fill",BG_FILL:"bgFill",STYLECLASS_SEP:","},$t=d(()=>new Map,"newClassesList"),Pt=d(()=>({relations:[],states:new Map,documents:{}}),"newDoc"),ft=d(t=>JSON.parse(JSON.stringify(t)),"clone"),Ve=class{constructor(t){this.version=t,this.nodes=[],this.edges=[],this.rootDoc=[],this.classes=$t(),this.documents={root:Pt()},this.currentDocument=this.documents.root,this.startEndCount=0,this.dividerCnt=0,this.links=new Map,this.getAccTitle=ie,this.setAccTitle=re,this.getAccDescription=ae,this.setAccDescription=ne,this.setDiagramTitle=oe,this.getDiagramTitle=le,this.clear(),this.setRootDoc=this.setRootDoc.bind(this),this.getDividerId=this.getDividerId.bind(this),this.setDirection=this.setDirection.bind(this),this.trimColon=this.trimColon.bind(this)}static{d(this,"StateDB")}static{this.relationType={AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3}}extract(t){this.clear(!0);for(const s of Array.isArray(t)?t:t.doc)switch(s.stmt){case K:this.addState(s.id.trim(),s.type,s.doc,s.description,s.note);break;case vt:this.addRelation(s.state1,s.state2,s.description);break;case de:this.addStyleClass(s.id.trim(),s.classes);break;case fe:this.handleStyleDef(s);break;case pe:this.setCssClass(s.id.trim(),s.styleClass);break;case"click":this.addLink(s.id,s.url,s.tooltip);break}const e=this.getStates(),o=w();we(),Q(void 0,this.getRootDocV2(),e,this.nodes,this.edges,!0,o.look,this.classes);for(const s of this.nodes)if(Array.isArray(s.label)){if(s.description=s.label.slice(1),s.isGroup&&s.description.length>0)throw new Error(`Group nodes can only have label. Remove the additional description for node [${s.id}]`);s.label=s.label[0]}}handleStyleDef(t){const e=t.id.trim().split(","),o=t.styleClass.split(",");for(const s of e){let h=this.getState(s);if(!h){const u=s.trim();this.addState(u),h=this.getState(u)}h&&(h.styles=o.map(u=>u.replace(/;/g,"")?.trim()))}}setRootDoc(t){_.info("Setting root doc",t),this.rootDoc=t,this.version===1?this.extract(t):this.extract(this.getRootDocV2())}docTranslator(t,e,o){if(e.stmt===vt){this.docTranslator(t,e.state1,!0),this.docTranslator(t,e.state2,!1);return}if(e.stmt===K&&(e.id===v.START_NODE?(e.id=t.id+(o?"_start":"_end"),e.start=o):e.id=e.id.trim()),e.stmt!==z&&e.stmt!==K||!e.doc)return;const s=[];let h=[];for(const u of e.doc)if(u.type===Yt){const S=ft(u);S.doc=ft(h),s.push(S),h=[]}else h.push(u);if(s.length>0&&h.length>0){const u={stmt:K,id:ce(),type:"divider",doc:ft(h)};s.push(ft(u)),e.doc=s}e.doc.forEach(u=>this.docTranslator(e,u,!0))}getRootDocV2(){return this.docTranslator({id:z,stmt:z},{id:z,stmt:z,doc:this.rootDoc},!0),{id:z,doc:this.rootDoc}}addState(t,e=Z,o=void 0,s=void 0,h=void 0,u=void 0,S=void 0,g=void 0){const n=t?.trim();if(!this.currentDocument.states.has(n))_.info("Adding state ",n,s),this.currentDocument.states.set(n,{stmt:K,id:n,descriptions:[],type:e,doc:o,note:h,classes:[],styles:[],textStyles:[]});else{const T=this.currentDocument.states.get(n);if(!T)throw new Error(`State not found: ${n}`);T.doc||(T.doc=o),T.type||(T.type=e)}if(s&&(_.info("Setting state description",n,s),(Array.isArray(s)?s:[s]).forEach(b=>this.addDescription(n,b.trim()))),h){const T=this.currentDocument.states.get(n);if(!T)throw new Error(`State not found: ${n}`);T.note=h,T.note.text=U.sanitizeText(T.note.text,w())}u&&(_.info("Setting state classes",n,u),(Array.isArray(u)?u:[u]).forEach(b=>this.setCssClass(n,b.trim()))),S&&(_.info("Setting state styles",n,S),(Array.isArray(S)?S:[S]).forEach(b=>this.setStyle(n,b.trim()))),g&&(_.info("Setting state styles",n,S),(Array.isArray(g)?g:[g]).forEach(b=>this.setTextStyle(n,b.trim())))}clear(t){this.nodes=[],this.edges=[],this.documents={root:Pt()},this.currentDocument=this.documents.root,this.startEndCount=0,this.classes=$t(),t||(this.links=new Map,he())}getState(t){return this.currentDocument.states.get(t)}getStates(){return this.currentDocument.states}logDocuments(){_.info("Documents = ",this.documents)}getRelations(){return this.currentDocument.relations}addLink(t,e,o){this.links.set(t,{url:e,tooltip:o}),_.warn("Adding link",t,e,o)}getLinks(){return this.links}startIdIfNeeded(t=""){return t===v.START_NODE?(this.startEndCount++,`${v.START_TYPE}${this.startEndCount}`):t}startTypeIfNeeded(t="",e=Z){return t===v.START_NODE?v.START_TYPE:e}endIdIfNeeded(t=""){return t===v.END_NODE?(this.startEndCount++,`${v.END_TYPE}${this.startEndCount}`):t}endTypeIfNeeded(t="",e=Z){return t===v.END_NODE?v.END_TYPE:e}addRelationObjs(t,e,o=""){const s=this.startIdIfNeeded(t.id.trim()),h=this.startTypeIfNeeded(t.id.trim(),t.type),u=this.startIdIfNeeded(e.id.trim()),S=this.startTypeIfNeeded(e.id.trim(),e.type);this.addState(s,h,t.doc,t.description,t.note,t.classes,t.styles,t.textStyles),this.addState(u,S,e.doc,e.description,e.note,e.classes,e.styles,e.textStyles),this.currentDocument.relations.push({id1:s,id2:u,relationTitle:U.sanitizeText(o,w())})}addRelation(t,e,o){if(typeof t=="object"&&typeof e=="object")this.addRelationObjs(t,e,o);else if(typeof t=="string"&&typeof e=="string"){const s=this.startIdIfNeeded(t.trim()),h=this.startTypeIfNeeded(t),u=this.endIdIfNeeded(e.trim()),S=this.endTypeIfNeeded(e);this.addState(s,h),this.addState(u,S),this.currentDocument.relations.push({id1:s,id2:u,relationTitle:o?U.sanitizeText(o,w()):void 0})}}addDescription(t,e){const o=this.currentDocument.states.get(t),s=e.startsWith(":")?e.replace(":","").trim():e;o?.descriptions?.push(U.sanitizeText(s,w()))}cleanupLabel(t){return t.startsWith(":")?t.slice(2).trim():t.trim()}getDividerId(){return this.dividerCnt++,`divider-id-${this.dividerCnt}`}addStyleClass(t,e=""){this.classes.has(t)||this.classes.set(t,{id:t,styles:[],textStyles:[]});const o=this.classes.get(t);e&&o&&e.split(v.STYLECLASS_SEP).forEach(s=>{const h=s.replace(/([^;]*);/,"$1").trim();if(RegExp(v.COLOR_KEYWORD).exec(s)){const S=h.replace(v.FILL_KEYWORD,v.BG_FILL).replace(v.COLOR_KEYWORD,v.FILL_KEYWORD);o.textStyles.push(S)}o.styles.push(h)})}getClasses(){return this.classes}setCssClass(t,e){t.split(",").forEach(o=>{let s=this.getState(o);if(!s){const h=o.trim();this.addState(h),s=this.getState(h)}s?.classes?.push(e)})}setStyle(t,e){this.getState(t)?.styles?.push(e)}setTextStyle(t,e){this.getState(t)?.textStyles?.push(e)}getDirectionStatement(){return this.rootDoc.find(t=>t.stmt===It)}getDirection(){return this.getDirectionStatement()?.value??ue}setDirection(t){const e=this.getDirectionStatement();e?e.value=t:this.rootDoc.unshift({stmt:It,value:t})}trimColon(t){return t.startsWith(":")?t.slice(1).trim():t.trim()}getData(){const t=w();return{nodes:this.nodes,edges:this.edges,other:{},config:t,direction:zt(this.getRootDocV2())}}getConfig(){return w().state}},$e=d(t=>` +defs #statediagram-barbEnd { + fill: ${t.transitionColor}; + stroke: ${t.transitionColor}; + } +g.stateGroup text { + fill: ${t.nodeBorder}; + stroke: none; + font-size: 10px; +} +g.stateGroup text { + fill: ${t.textColor}; + stroke: none; + font-size: 10px; + +} +g.stateGroup .state-title { + font-weight: bolder; + fill: ${t.stateLabelColor}; +} + +g.stateGroup rect { + fill: ${t.mainBkg}; + stroke: ${t.nodeBorder}; +} + +g.stateGroup line { + stroke: ${t.lineColor}; + stroke-width: 1; +} + +.transition { + stroke: ${t.transitionColor}; + stroke-width: 1; + fill: none; +} + +.stateGroup .composit { + fill: ${t.background}; + border-bottom: 1px +} + +.stateGroup .alt-composit { + fill: #e0e0e0; + border-bottom: 1px +} + +.state-note { + stroke: ${t.noteBorderColor}; + fill: ${t.noteBkgColor}; + + text { + fill: ${t.noteTextColor}; + stroke: none; + font-size: 10px; + } +} + +.stateLabel .box { + stroke: none; + stroke-width: 0; + fill: ${t.mainBkg}; + opacity: 0.5; +} + +.edgeLabel .label rect { + fill: ${t.labelBackgroundColor}; + opacity: 0.5; +} +.edgeLabel { + background-color: ${t.edgeLabelBackground}; + p { + background-color: ${t.edgeLabelBackground}; + } + rect { + opacity: 0.5; + background-color: ${t.edgeLabelBackground}; + fill: ${t.edgeLabelBackground}; + } + text-align: center; +} +.edgeLabel .label text { + fill: ${t.transitionLabelColor||t.tertiaryTextColor}; +} +.label div .edgeLabel { + color: ${t.transitionLabelColor||t.tertiaryTextColor}; +} + +.stateLabel text { + fill: ${t.stateLabelColor}; + font-size: 10px; + font-weight: bold; +} + +.node circle.state-start { + fill: ${t.specialStateColor}; + stroke: ${t.specialStateColor}; +} + +.node .fork-join { + fill: ${t.specialStateColor}; + stroke: ${t.specialStateColor}; +} + +.node circle.state-end { + fill: ${t.innerEndBackground}; + stroke: ${t.background}; + stroke-width: 1.5 +} +.end-state-inner { + fill: ${t.compositeBackground||t.background}; + // stroke: ${t.background}; + stroke-width: 1.5 +} + +.node rect { + fill: ${t.stateBkg||t.mainBkg}; + stroke: ${t.stateBorder||t.nodeBorder}; + stroke-width: 1px; +} +.node polygon { + fill: ${t.mainBkg}; + stroke: ${t.stateBorder||t.nodeBorder};; + stroke-width: 1px; +} +#statediagram-barbEnd { + fill: ${t.lineColor}; +} + +.statediagram-cluster rect { + fill: ${t.compositeTitleBackground}; + stroke: ${t.stateBorder||t.nodeBorder}; + stroke-width: 1px; +} + +.cluster-label, .nodeLabel { + color: ${t.stateLabelColor}; + // line-height: 1; +} + +.statediagram-cluster rect.outer { + rx: 5px; + ry: 5px; +} +.statediagram-state .divider { + stroke: ${t.stateBorder||t.nodeBorder}; +} + +.statediagram-state .title-state { + rx: 5px; + ry: 5px; +} +.statediagram-cluster.statediagram-cluster .inner { + fill: ${t.compositeBackground||t.background}; +} +.statediagram-cluster.statediagram-cluster-alt .inner { + fill: ${t.altBackground?t.altBackground:"#efefef"}; +} + +.statediagram-cluster .inner { + rx:0; + ry:0; +} + +.statediagram-state rect.basic { + rx: 5px; + ry: 5px; +} +.statediagram-state rect.divider { + stroke-dasharray: 10,10; + fill: ${t.altBackground?t.altBackground:"#efefef"}; +} + +.note-edge { + stroke-dasharray: 5; +} + +.statediagram-note rect { + fill: ${t.noteBkgColor}; + stroke: ${t.noteBorderColor}; + stroke-width: 1px; + rx: 0; + ry: 0; +} +.statediagram-note rect { + fill: ${t.noteBkgColor}; + stroke: ${t.noteBorderColor}; + stroke-width: 1px; + rx: 0; + ry: 0; +} + +.statediagram-note text { + fill: ${t.noteTextColor}; +} + +.statediagram-note .nodeLabel { + color: ${t.noteTextColor}; +} +.statediagram .edgeLabel { + color: red; // ${t.noteTextColor}; +} + +#dependencyStart, #dependencyEnd { + fill: ${t.lineColor}; + stroke: ${t.lineColor}; + stroke-width: 1; +} + +.statediagramTitleText { + text-anchor: middle; + font-size: 18px; + fill: ${t.textColor}; +} +`,"getStyles"),Me=$e;export{Ve as S,Ge as a,Be as b,Me as s}; diff --git a/_astro/chunk-FMBD7UC4.Tjciooq0.js b/_astro/chunk-FMBD7UC4.Tjciooq0.js new file mode 100644 index 00000000..f9b57ca9 --- /dev/null +++ b/_astro/chunk-FMBD7UC4.Tjciooq0.js @@ -0,0 +1,15 @@ +import{_ as e}from"./mermaid.core.LbQlJBBQ.js";var l=e(()=>` + /* Font Awesome icon styling - consolidated */ + .label-icon { + display: inline-block; + height: 1em; + overflow: visible; + vertical-align: -0.125em; + } + + .node .label-icon path { + fill: currentColor; + stroke: revert; + stroke-width: revert; + } +`,"getIconStyles");export{l as g}; diff --git a/_astro/chunk-QN33PNHL.BI3h-IJf.js b/_astro/chunk-QN33PNHL.BI3h-IJf.js new file mode 100644 index 00000000..9afb02f5 --- /dev/null +++ b/_astro/chunk-QN33PNHL.BI3h-IJf.js @@ -0,0 +1 @@ +import{_ as a,e as w,l as x}from"./mermaid.core.LbQlJBBQ.js";var d=a((e,t,i,r)=>{e.attr("class",i);const{width:o,height:h,x:n,y:c}=u(e,t);w(e,h,o,r);const s=l(n,c,o,h,t);e.attr("viewBox",s),x.debug(`viewBox configured: ${s} with padding: ${t}`)},"setupViewPortForSVG"),u=a((e,t)=>{const i=e.node()?.getBBox()||{width:0,height:0,x:0,y:0};return{width:i.width+t*2,height:i.height+t*2,x:i.x,y:i.y}},"calculateDimensionsWithPadding"),l=a((e,t,i,r,o)=>`${e-o} ${t-o} ${i} ${r}`,"createViewBox");export{d as s}; diff --git a/_astro/chunk-QZHKN3VN.B7dpA8ra.js b/_astro/chunk-QZHKN3VN.B7dpA8ra.js new file mode 100644 index 00000000..f84e26d9 --- /dev/null +++ b/_astro/chunk-QZHKN3VN.B7dpA8ra.js @@ -0,0 +1 @@ +import{_ as i}from"./mermaid.core.LbQlJBBQ.js";var r=class{constructor(t){this.init=t,this.records=this.init()}static{i(this,"ImperativeState")}reset(){this.records=this.init()}};export{r as I}; diff --git a/_astro/chunk-TZMSLE5B.t1iciHUx.js b/_astro/chunk-TZMSLE5B.t1iciHUx.js new file mode 100644 index 00000000..a3ddfb80 --- /dev/null +++ b/_astro/chunk-TZMSLE5B.t1iciHUx.js @@ -0,0 +1 @@ +import{_ as n,U as o,j as l}from"./mermaid.core.LbQlJBBQ.js";var x=n((s,t)=>{const e=s.append("rect");if(e.attr("x",t.x),e.attr("y",t.y),e.attr("fill",t.fill),e.attr("stroke",t.stroke),e.attr("width",t.width),e.attr("height",t.height),t.name&&e.attr("name",t.name),t.rx&&e.attr("rx",t.rx),t.ry&&e.attr("ry",t.ry),t.attrs!==void 0)for(const r in t.attrs)e.attr(r,t.attrs[r]);return t.class&&e.attr("class",t.class),e},"drawRect"),d=n((s,t)=>{const e={x:t.startx,y:t.starty,width:t.stopx-t.startx,height:t.stopy-t.starty,fill:t.fill,stroke:t.stroke,class:"rect"};x(s,e).lower()},"drawBackgroundRect"),g=n((s,t)=>{const e=t.text.replace(o," "),r=s.append("text");r.attr("x",t.x),r.attr("y",t.y),r.attr("class","legend"),r.style("text-anchor",t.anchor),t.class&&r.attr("class",t.class);const a=r.append("tspan");return a.attr("x",t.x+t.textMargin*2),a.text(e),r},"drawText"),h=n((s,t,e,r)=>{const a=s.append("image");a.attr("x",t),a.attr("y",e);const i=l.sanitizeUrl(r);a.attr("xlink:href",i)},"drawImage"),m=n((s,t,e,r)=>{const a=s.append("use");a.attr("x",t),a.attr("y",e);const i=l.sanitizeUrl(r);a.attr("xlink:href",`#${i}`)},"drawEmbeddedImage"),y=n(()=>({x:0,y:0,width:100,height:100,fill:"#EDF2AE",stroke:"#666",anchor:"start",rx:0,ry:0}),"getNoteRect"),p=n(()=>({x:0,y:0,width:100,height:100,"text-anchor":"start",style:"#666",textMargin:0,rx:0,ry:0,tspan:!0}),"getTextObj");export{d as a,p as b,m as c,x as d,h as e,g as f,y as g}; diff --git a/_astro/classDiagram-2ON5EDUG.ChOIO5pY.js b/_astro/classDiagram-2ON5EDUG.ChOIO5pY.js new file mode 100644 index 00000000..5312a711 --- /dev/null +++ b/_astro/classDiagram-2ON5EDUG.ChOIO5pY.js @@ -0,0 +1 @@ +import{s as a,c as s,a as e,C as t}from"./chunk-B4BG7PRW.B0Ch1pGH.js";import{_ as i}from"./mermaid.core.LbQlJBBQ.js";import"./chunk-FMBD7UC4.Tjciooq0.js";import"./chunk-55IACEB6.b7ueBidu.js";import"./chunk-QN33PNHL.BI3h-IJf.js";import"./page._rMDHl_T.js";var u={parser:e,get db(){return new t},renderer:s,styles:a,init:i(r=>{r.class||(r.class={}),r.class.arrowMarkerAbsolute=r.arrowMarkerAbsolute},"init")};export{u as diagram}; diff --git a/_astro/classDiagram-v2-WZHVMYZB.ChOIO5pY.js b/_astro/classDiagram-v2-WZHVMYZB.ChOIO5pY.js new file mode 100644 index 00000000..5312a711 --- /dev/null +++ b/_astro/classDiagram-v2-WZHVMYZB.ChOIO5pY.js @@ -0,0 +1 @@ +import{s as a,c as s,a as e,C as t}from"./chunk-B4BG7PRW.B0Ch1pGH.js";import{_ as i}from"./mermaid.core.LbQlJBBQ.js";import"./chunk-FMBD7UC4.Tjciooq0.js";import"./chunk-55IACEB6.b7ueBidu.js";import"./chunk-QN33PNHL.BI3h-IJf.js";import"./page._rMDHl_T.js";var u={parser:e,get db(){return new t},renderer:s,styles:a,init:i(r=>{r.class||(r.class={}),r.class.arrowMarkerAbsolute=r.arrowMarkerAbsolute},"init")};export{u as diagram}; diff --git a/_astro/clone.DKHdMD-Z.js b/_astro/clone.DKHdMD-Z.js new file mode 100644 index 00000000..9fec3ddc --- /dev/null +++ b/_astro/clone.DKHdMD-Z.js @@ -0,0 +1 @@ +import{b as r}from"./graph.wNZOIPAH.js";var e=4;function a(o){return r(o,e)}export{a as c}; diff --git a/_astro/cose-bilkent-S5V4N54A.XbIyOKxw.js b/_astro/cose-bilkent-S5V4N54A.XbIyOKxw.js new file mode 100644 index 00000000..ddca80fe --- /dev/null +++ b/_astro/cose-bilkent-S5V4N54A.XbIyOKxw.js @@ -0,0 +1 @@ +import{aG as lt,_ as V,l as $,d as gt}from"./mermaid.core.LbQlJBBQ.js";import{c as tt}from"./cytoscape.esm.DtBltrT8.js";import"./page._rMDHl_T.js";var k={exports:{}},Z={exports:{}},Q={exports:{}},ut=Q.exports,j;function ft(){return j||(j=1,(function(G,b){(function(I,L){G.exports=L()})(ut,function(){return(function(N){var I={};function L(o){if(I[o])return I[o].exports;var e=I[o]={i:o,l:!1,exports:{}};return N[o].call(e.exports,e,e.exports,L),e.l=!0,e.exports}return L.m=N,L.c=I,L.i=function(o){return o},L.d=function(o,e,t){L.o(o,e)||Object.defineProperty(o,e,{configurable:!1,enumerable:!0,get:t})},L.n=function(o){var e=o&&o.__esModule?function(){return o.default}:function(){return o};return L.d(e,"a",e),e},L.o=function(o,e){return Object.prototype.hasOwnProperty.call(o,e)},L.p="",L(L.s=26)})([(function(N,I,L){function o(){}o.QUALITY=1,o.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,o.DEFAULT_INCREMENTAL=!1,o.DEFAULT_ANIMATION_ON_LAYOUT=!0,o.DEFAULT_ANIMATION_DURING_LAYOUT=!1,o.DEFAULT_ANIMATION_PERIOD=50,o.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,o.DEFAULT_GRAPH_MARGIN=15,o.NODE_DIMENSIONS_INCLUDE_LABELS=!1,o.SIMPLE_NODE_SIZE=40,o.SIMPLE_NODE_HALF_SIZE=o.SIMPLE_NODE_SIZE/2,o.EMPTY_COMPOUND_NODE_SIZE=40,o.MIN_EDGE_LENGTH=1,o.WORLD_BOUNDARY=1e6,o.INITIAL_WORLD_BOUNDARY=o.WORLD_BOUNDARY/1e3,o.WORLD_CENTER_X=1200,o.WORLD_CENTER_Y=900,N.exports=o}),(function(N,I,L){var o=L(2),e=L(8),t=L(9);function i(g,n,d){o.call(this,d),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=d,this.bendpoints=[],this.source=g,this.target=n}i.prototype=Object.create(o.prototype);for(var l in o)i[l]=o[l];i.prototype.getSource=function(){return this.source},i.prototype.getTarget=function(){return this.target},i.prototype.isInterGraph=function(){return this.isInterGraph},i.prototype.getLength=function(){return this.length},i.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},i.prototype.getBendpoints=function(){return this.bendpoints},i.prototype.getLca=function(){return this.lca},i.prototype.getSourceInLca=function(){return this.sourceInLca},i.prototype.getTargetInLca=function(){return this.targetInLca},i.prototype.getOtherEnd=function(g){if(this.source===g)return this.target;if(this.target===g)return this.source;throw"Node is not incident with this edge"},i.prototype.getOtherEndInGraph=function(g,n){for(var d=this.getOtherEnd(g),r=n.getGraphManager().getRoot();;){if(d.getOwner()==n)return d;if(d.getOwner()==r)break;d=d.getOwner().getParent()}return null},i.prototype.updateLength=function(){var g=new Array(4);this.isOverlapingSourceAndTarget=e.getIntersection(this.target.getRect(),this.source.getRect(),g),this.isOverlapingSourceAndTarget||(this.lengthX=g[0]-g[2],this.lengthY=g[1]-g[3],Math.abs(this.lengthX)<1&&(this.lengthX=t.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=t.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},i.prototype.updateLengthSimple=function(){this.lengthX=this.target.getCenterX()-this.source.getCenterX(),this.lengthY=this.target.getCenterY()-this.source.getCenterY(),Math.abs(this.lengthX)<1&&(this.lengthX=t.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=t.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},N.exports=i}),(function(N,I,L){function o(e){this.vGraphObject=e}N.exports=o}),(function(N,I,L){var o=L(2),e=L(10),t=L(13),i=L(0),l=L(16),g=L(4);function n(r,h,a,p){a==null&&p==null&&(p=h),o.call(this,p),r.graphManager!=null&&(r=r.graphManager),this.estimatedSize=e.MIN_VALUE,this.inclusionTreeDepth=e.MAX_VALUE,this.vGraphObject=p,this.edges=[],this.graphManager=r,a!=null&&h!=null?this.rect=new t(h.x,h.y,a.width,a.height):this.rect=new t}n.prototype=Object.create(o.prototype);for(var d in o)n[d]=o[d];n.prototype.getEdges=function(){return this.edges},n.prototype.getChild=function(){return this.child},n.prototype.getOwner=function(){return this.owner},n.prototype.getWidth=function(){return this.rect.width},n.prototype.setWidth=function(r){this.rect.width=r},n.prototype.getHeight=function(){return this.rect.height},n.prototype.setHeight=function(r){this.rect.height=r},n.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},n.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},n.prototype.getCenter=function(){return new g(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},n.prototype.getLocation=function(){return new g(this.rect.x,this.rect.y)},n.prototype.getRect=function(){return this.rect},n.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},n.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},n.prototype.setRect=function(r,h){this.rect.x=r.x,this.rect.y=r.y,this.rect.width=h.width,this.rect.height=h.height},n.prototype.setCenter=function(r,h){this.rect.x=r-this.rect.width/2,this.rect.y=h-this.rect.height/2},n.prototype.setLocation=function(r,h){this.rect.x=r,this.rect.y=h},n.prototype.moveBy=function(r,h){this.rect.x+=r,this.rect.y+=h},n.prototype.getEdgeListToNode=function(r){var h=[],a=this;return a.edges.forEach(function(p){if(p.target==r){if(p.source!=a)throw"Incorrect edge source!";h.push(p)}}),h},n.prototype.getEdgesBetween=function(r){var h=[],a=this;return a.edges.forEach(function(p){if(!(p.source==a||p.target==a))throw"Incorrect edge source and/or target";(p.target==r||p.source==r)&&h.push(p)}),h},n.prototype.getNeighborsList=function(){var r=new Set,h=this;return h.edges.forEach(function(a){if(a.source==h)r.add(a.target);else{if(a.target!=h)throw"Incorrect incidency!";r.add(a.source)}}),r},n.prototype.withChildren=function(){var r=new Set,h,a;if(r.add(this),this.child!=null)for(var p=this.child.getNodes(),v=0;vh&&(this.rect.x-=(this.labelWidth-h)/2,this.setWidth(this.labelWidth)),this.labelHeight>a&&(this.labelPos=="center"?this.rect.y-=(this.labelHeight-a)/2:this.labelPos=="top"&&(this.rect.y-=this.labelHeight-a),this.setHeight(this.labelHeight))}}},n.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==e.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},n.prototype.transform=function(r){var h=this.rect.x;h>i.WORLD_BOUNDARY?h=i.WORLD_BOUNDARY:h<-i.WORLD_BOUNDARY&&(h=-i.WORLD_BOUNDARY);var a=this.rect.y;a>i.WORLD_BOUNDARY?a=i.WORLD_BOUNDARY:a<-i.WORLD_BOUNDARY&&(a=-i.WORLD_BOUNDARY);var p=new g(h,a),v=r.inverseTransformPoint(p);this.setLocation(v.x,v.y)},n.prototype.getLeft=function(){return this.rect.x},n.prototype.getRight=function(){return this.rect.x+this.rect.width},n.prototype.getTop=function(){return this.rect.y},n.prototype.getBottom=function(){return this.rect.y+this.rect.height},n.prototype.getParent=function(){return this.owner==null?null:this.owner.getParent()},N.exports=n}),(function(N,I,L){function o(e,t){e==null&&t==null?(this.x=0,this.y=0):(this.x=e,this.y=t)}o.prototype.getX=function(){return this.x},o.prototype.getY=function(){return this.y},o.prototype.setX=function(e){this.x=e},o.prototype.setY=function(e){this.y=e},o.prototype.getDifference=function(e){return new DimensionD(this.x-e.x,this.y-e.y)},o.prototype.getCopy=function(){return new o(this.x,this.y)},o.prototype.translate=function(e){return this.x+=e.width,this.y+=e.height,this},N.exports=o}),(function(N,I,L){var o=L(2),e=L(10),t=L(0),i=L(6),l=L(3),g=L(1),n=L(13),d=L(12),r=L(11);function h(p,v,D){o.call(this,D),this.estimatedSize=e.MIN_VALUE,this.margin=t.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=p,v!=null&&v instanceof i?this.graphManager=v:v!=null&&v instanceof Layout&&(this.graphManager=v.graphManager)}h.prototype=Object.create(o.prototype);for(var a in o)h[a]=o[a];h.prototype.getNodes=function(){return this.nodes},h.prototype.getEdges=function(){return this.edges},h.prototype.getGraphManager=function(){return this.graphManager},h.prototype.getParent=function(){return this.parent},h.prototype.getLeft=function(){return this.left},h.prototype.getRight=function(){return this.right},h.prototype.getTop=function(){return this.top},h.prototype.getBottom=function(){return this.bottom},h.prototype.isConnected=function(){return this.isConnected},h.prototype.add=function(p,v,D){if(v==null&&D==null){var u=p;if(this.graphManager==null)throw"Graph has no graph mgr!";if(this.getNodes().indexOf(u)>-1)throw"Node already in graph!";return u.owner=this,this.getNodes().push(u),u}else{var T=p;if(!(this.getNodes().indexOf(v)>-1&&this.getNodes().indexOf(D)>-1))throw"Source or target not in graph!";if(!(v.owner==D.owner&&v.owner==this))throw"Both owners must be this graph!";return v.owner!=D.owner?null:(T.source=v,T.target=D,T.isInterGraph=!1,this.getEdges().push(T),v.edges.push(T),D!=v&&D.edges.push(T),T)}},h.prototype.remove=function(p){var v=p;if(p instanceof l){if(v==null)throw"Node is null!";if(!(v.owner!=null&&v.owner==this))throw"Owner graph is invalid!";if(this.graphManager==null)throw"Owner graph manager is invalid!";for(var D=v.edges.slice(),u,T=D.length,y=0;y-1&&f>-1))throw"Source and/or target doesn't know this edge!";u.source.edges.splice(s,1),u.target!=u.source&&u.target.edges.splice(f,1);var O=u.source.owner.getEdges().indexOf(u);if(O==-1)throw"Not in owner's edge list!";u.source.owner.getEdges().splice(O,1)}},h.prototype.updateLeftTop=function(){for(var p=e.MAX_VALUE,v=e.MAX_VALUE,D,u,T,y=this.getNodes(),O=y.length,s=0;sD&&(p=D),v>u&&(v=u)}return p==e.MAX_VALUE?null:(y[0].getParent().paddingLeft!=null?T=y[0].getParent().paddingLeft:T=this.margin,this.left=v-T,this.top=p-T,new d(this.left,this.top))},h.prototype.updateBounds=function(p){for(var v=e.MAX_VALUE,D=-e.MAX_VALUE,u=e.MAX_VALUE,T=-e.MAX_VALUE,y,O,s,f,c,E=this.nodes,A=E.length,m=0;my&&(v=y),Ds&&(u=s),Ty&&(v=y),Ds&&(u=s),T=this.nodes.length){var A=0;D.forEach(function(m){m.owner==p&&A++}),A==this.nodes.length&&(this.isConnected=!0)}},N.exports=h}),(function(N,I,L){var o,e=L(1);function t(i){o=L(5),this.layout=i,this.graphs=[],this.edges=[]}t.prototype.addRoot=function(){var i=this.layout.newGraph(),l=this.layout.newNode(null),g=this.add(i,l);return this.setRootGraph(g),this.rootGraph},t.prototype.add=function(i,l,g,n,d){if(g==null&&n==null&&d==null){if(i==null)throw"Graph is null!";if(l==null)throw"Parent node is null!";if(this.graphs.indexOf(i)>-1)throw"Graph already in this graph mgr!";if(this.graphs.push(i),i.parent!=null)throw"Already has a parent!";if(l.child!=null)throw"Already has a child!";return i.parent=l,l.child=i,i}else{d=g,n=l,g=i;var r=n.getOwner(),h=d.getOwner();if(!(r!=null&&r.getGraphManager()==this))throw"Source not in this graph mgr!";if(!(h!=null&&h.getGraphManager()==this))throw"Target not in this graph mgr!";if(r==h)return g.isInterGraph=!1,r.add(g,n,d);if(g.isInterGraph=!0,g.source=n,g.target=d,this.edges.indexOf(g)>-1)throw"Edge already in inter-graph edge list!";if(this.edges.push(g),!(g.source!=null&&g.target!=null))throw"Edge source and/or target is null!";if(!(g.source.edges.indexOf(g)==-1&&g.target.edges.indexOf(g)==-1))throw"Edge already in source and/or target incidency list!";return g.source.edges.push(g),g.target.edges.push(g),g}},t.prototype.remove=function(i){if(i instanceof o){var l=i;if(l.getGraphManager()!=this)throw"Graph not in this graph mgr";if(!(l==this.rootGraph||l.parent!=null&&l.parent.graphManager==this))throw"Invalid parent node!";var g=[];g=g.concat(l.getEdges());for(var n,d=g.length,r=0;r=i.getRight()?l[0]+=Math.min(i.getX()-t.getX(),t.getRight()-i.getRight()):i.getX()<=t.getX()&&i.getRight()>=t.getRight()&&(l[0]+=Math.min(t.getX()-i.getX(),i.getRight()-t.getRight())),t.getY()<=i.getY()&&t.getBottom()>=i.getBottom()?l[1]+=Math.min(i.getY()-t.getY(),t.getBottom()-i.getBottom()):i.getY()<=t.getY()&&i.getBottom()>=t.getBottom()&&(l[1]+=Math.min(t.getY()-i.getY(),i.getBottom()-t.getBottom()));var d=Math.abs((i.getCenterY()-t.getCenterY())/(i.getCenterX()-t.getCenterX()));i.getCenterY()===t.getCenterY()&&i.getCenterX()===t.getCenterX()&&(d=1);var r=d*l[0],h=l[1]/d;l[0]r)return l[0]=g,l[1]=a,l[2]=d,l[3]=E,!1;if(nd)return l[0]=h,l[1]=n,l[2]=f,l[3]=r,!1;if(gd?(l[0]=v,l[1]=D,R=!0):(l[0]=p,l[1]=a,R=!0):S===w&&(g>d?(l[0]=h,l[1]=a,R=!0):(l[0]=u,l[1]=D,R=!0)),-Y===w?d>g?(l[2]=c,l[3]=E,M=!0):(l[2]=f,l[3]=s,M=!0):Y===w&&(d>g?(l[2]=O,l[3]=s,M=!0):(l[2]=A,l[3]=E,M=!0)),R&&M)return!1;if(g>d?n>r?(x=this.getCardinalDirection(S,w,4),F=this.getCardinalDirection(Y,w,2)):(x=this.getCardinalDirection(-S,w,3),F=this.getCardinalDirection(-Y,w,1)):n>r?(x=this.getCardinalDirection(-S,w,1),F=this.getCardinalDirection(-Y,w,3)):(x=this.getCardinalDirection(S,w,2),F=this.getCardinalDirection(Y,w,4)),!R)switch(x){case 1:P=a,U=g+-y/w,l[0]=U,l[1]=P;break;case 2:U=u,P=n+T*w,l[0]=U,l[1]=P;break;case 3:P=D,U=g+y/w,l[0]=U,l[1]=P;break;case 4:U=v,P=n+-T*w,l[0]=U,l[1]=P;break}if(!M)switch(F){case 1:X=s,_=d+-C/w,l[2]=_,l[3]=X;break;case 2:_=A,X=r+m*w,l[2]=_,l[3]=X;break;case 3:X=E,_=d+C/w,l[2]=_,l[3]=X;break;case 4:_=c,X=r+-m*w,l[2]=_,l[3]=X;break}}return!1},e.getCardinalDirection=function(t,i,l){return t>i?l:1+l%4},e.getIntersection=function(t,i,l,g){if(g==null)return this.getIntersection2(t,i,l);var n=t.x,d=t.y,r=i.x,h=i.y,a=l.x,p=l.y,v=g.x,D=g.y,u=void 0,T=void 0,y=void 0,O=void 0,s=void 0,f=void 0,c=void 0,E=void 0,A=void 0;return y=h-d,s=n-r,c=r*d-n*h,O=D-p,f=a-v,E=v*p-a*D,A=y*f-O*s,A===0?null:(u=(s*E-f*c)/A,T=(O*c-y*E)/A,new o(u,T))},e.angleOfVector=function(t,i,l,g){var n=void 0;return t!==l?(n=Math.atan((g-i)/(l-t)),l0?1:e<0?-1:0},o.floor=function(e){return e<0?Math.ceil(e):Math.floor(e)},o.ceil=function(e){return e<0?Math.floor(e):Math.ceil(e)},N.exports=o}),(function(N,I,L){function o(){}o.MAX_VALUE=2147483647,o.MIN_VALUE=-2147483648,N.exports=o}),(function(N,I,L){var o=(function(){function n(d,r){for(var h=0;h"u"?"undefined":o(t);return t==null||i!="object"&&i!="function"},N.exports=e}),(function(N,I,L){function o(a){if(Array.isArray(a)){for(var p=0,v=Array(a.length);p0&&p;){for(y.push(s[0]);y.length>0&&p;){var f=y[0];y.splice(0,1),T.add(f);for(var c=f.getEdges(),u=0;u-1&&s.splice(C,1)}T=new Set,O=new Map}}return a},h.prototype.createDummyNodesForBendpoints=function(a){for(var p=[],v=a.source,D=this.graphManager.calcLowestCommonAncestor(a.source,a.target),u=0;u0){for(var D=this.edgeToDummyNodes.get(v),u=0;u=0&&p.splice(E,1);var A=O.getNeighborsList();A.forEach(function(R){if(v.indexOf(R)<0){var M=D.get(R),S=M-1;S==1&&f.push(R),D.set(R,S)}})}v=v.concat(f),(p.length==1||p.length==2)&&(u=!0,T=p[0])}return T},h.prototype.setGraphManager=function(a){this.graphManager=a},N.exports=h}),(function(N,I,L){function o(){}o.seed=1,o.x=0,o.nextDouble=function(){return o.x=Math.sin(o.seed++)*1e4,o.x-Math.floor(o.x)},N.exports=o}),(function(N,I,L){var o=L(4);function e(t,i){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}e.prototype.getWorldOrgX=function(){return this.lworldOrgX},e.prototype.setWorldOrgX=function(t){this.lworldOrgX=t},e.prototype.getWorldOrgY=function(){return this.lworldOrgY},e.prototype.setWorldOrgY=function(t){this.lworldOrgY=t},e.prototype.getWorldExtX=function(){return this.lworldExtX},e.prototype.setWorldExtX=function(t){this.lworldExtX=t},e.prototype.getWorldExtY=function(){return this.lworldExtY},e.prototype.setWorldExtY=function(t){this.lworldExtY=t},e.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},e.prototype.setDeviceOrgX=function(t){this.ldeviceOrgX=t},e.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},e.prototype.setDeviceOrgY=function(t){this.ldeviceOrgY=t},e.prototype.getDeviceExtX=function(){return this.ldeviceExtX},e.prototype.setDeviceExtX=function(t){this.ldeviceExtX=t},e.prototype.getDeviceExtY=function(){return this.ldeviceExtY},e.prototype.setDeviceExtY=function(t){this.ldeviceExtY=t},e.prototype.transformX=function(t){var i=0,l=this.lworldExtX;return l!=0&&(i=this.ldeviceOrgX+(t-this.lworldOrgX)*this.ldeviceExtX/l),i},e.prototype.transformY=function(t){var i=0,l=this.lworldExtY;return l!=0&&(i=this.ldeviceOrgY+(t-this.lworldOrgY)*this.ldeviceExtY/l),i},e.prototype.inverseTransformX=function(t){var i=0,l=this.ldeviceExtX;return l!=0&&(i=this.lworldOrgX+(t-this.ldeviceOrgX)*this.lworldExtX/l),i},e.prototype.inverseTransformY=function(t){var i=0,l=this.ldeviceExtY;return l!=0&&(i=this.lworldOrgY+(t-this.ldeviceOrgY)*this.lworldExtY/l),i},e.prototype.inverseTransformPoint=function(t){var i=new o(this.inverseTransformX(t.x),this.inverseTransformY(t.y));return i},N.exports=e}),(function(N,I,L){function o(r){if(Array.isArray(r)){for(var h=0,a=Array(r.length);ht.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*t.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(r-t.ADAPTATION_LOWER_NODE_LIMIT)/(t.ADAPTATION_UPPER_NODE_LIMIT-t.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-t.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=t.MAX_NODE_DISPLACEMENT_INCREMENTAL):(r>t.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(t.COOLING_ADAPTATION_FACTOR,1-(r-t.ADAPTATION_LOWER_NODE_LIMIT)/(t.ADAPTATION_UPPER_NODE_LIMIT-t.ADAPTATION_LOWER_NODE_LIMIT)*(1-t.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=t.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(this.getAllNodes().length*5,this.maxIterations),this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},n.prototype.calcSpringForces=function(){for(var r=this.getAllEdges(),h,a=0;a0&&arguments[0]!==void 0?arguments[0]:!0,h=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,a,p,v,D,u=this.getAllNodes(),T;if(this.useFRGridVariant)for(this.totalIterations%t.GRID_CALCULATION_CHECK_PERIOD==1&&r&&this.updateGrid(),T=new Set,a=0;ay||T>y)&&(r.gravitationForceX=-this.gravityConstant*v,r.gravitationForceY=-this.gravityConstant*D)):(y=h.getEstimatedSize()*this.compoundGravityRangeFactor,(u>y||T>y)&&(r.gravitationForceX=-this.gravityConstant*v*this.compoundGravityConstant,r.gravitationForceY=-this.gravityConstant*D*this.compoundGravityConstant))},n.prototype.isConverged=function(){var r,h=!1;return this.totalIterations>this.maxIterations/3&&(h=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),r=this.totalDisplacement=u.length||y>=u[0].length)){for(var O=0;On}}]),l})();N.exports=i}),(function(N,I,L){var o=(function(){function i(l,g){for(var n=0;n2&&arguments[2]!==void 0?arguments[2]:1,d=arguments.length>3&&arguments[3]!==void 0?arguments[3]:-1,r=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1;e(this,i),this.sequence1=l,this.sequence2=g,this.match_score=n,this.mismatch_penalty=d,this.gap_penalty=r,this.iMax=l.length+1,this.jMax=g.length+1,this.grid=new Array(this.iMax);for(var h=0;h=0;l--){var g=this.listeners[l];g.event===t&&g.callback===i&&this.listeners.splice(l,1)}},e.emit=function(t,i){for(var l=0;lg.coolingFactor*g.maxNodeDisplacement&&(this.displacementX=g.coolingFactor*g.maxNodeDisplacement*t.sign(this.displacementX)),Math.abs(this.displacementY)>g.coolingFactor*g.maxNodeDisplacement&&(this.displacementY=g.coolingFactor*g.maxNodeDisplacement*t.sign(this.displacementY)),this.child==null?this.moveBy(this.displacementX,this.displacementY):this.child.getNodes().length==0?this.moveBy(this.displacementX,this.displacementY):this.propogateDisplacementToChildren(this.displacementX,this.displacementY),g.totalDisplacement+=Math.abs(this.displacementX)+Math.abs(this.displacementY),this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0},i.prototype.propogateDisplacementToChildren=function(g,n){for(var d=this.getChild().getNodes(),r,h=0;h0)this.positionNodesRadially(s);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var f=new Set(this.getAllNodes()),c=this.nodesWithGravity.filter(function(E){return f.has(E)});this.graphManager.setAllNodesToApplyGravitation(c),this.positionNodesRandomly()}}return this.initSpringEmbedder(),this.runSpringEmbedder(),!0},y.prototype.tick=function(){if(this.totalIterations++,this.totalIterations===this.maxIterations&&!this.isTreeGrowing&&!this.isGrowthFinished)if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;if(this.totalIterations%d.CONVERGENCE_CHECK_PERIOD==0&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.isConverged())if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;this.coolingCycle++,this.layoutQuality==0?this.coolingAdjuster=this.coolingCycle:this.layoutQuality==1&&(this.coolingAdjuster=this.coolingCycle/3),this.coolingFactor=Math.max(this.initialCoolingFactor-Math.pow(this.coolingCycle,Math.log(100*(this.initialCoolingFactor-this.finalTemperature))/Math.log(this.maxCoolingCycle))/100*this.coolingAdjuster,this.finalTemperature),this.animationPeriod=Math.ceil(this.initialAnimationPeriod*Math.sqrt(this.coolingFactor))}if(this.isTreeGrowing){if(this.growTreeIterations%10==0)if(this.prunedNodesAll.length>0){this.graphManager.updateBounds(),this.updateGrid(),this.growTree(this.prunedNodesAll),this.graphManager.resetAllNodesToApplyGravitation();var s=new Set(this.getAllNodes()),f=this.nodesWithGravity.filter(function(A){return s.has(A)});this.graphManager.setAllNodesToApplyGravitation(f),this.graphManager.updateBounds(),this.updateGrid(),this.coolingFactor=d.DEFAULT_COOLING_FACTOR_INCREMENTAL}else this.isTreeGrowing=!1,this.isGrowthFinished=!0;this.growTreeIterations++}if(this.isGrowthFinished){if(this.isConverged())return!0;this.afterGrowthIterations%10==0&&(this.graphManager.updateBounds(),this.updateGrid()),this.coolingFactor=d.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var c=!this.isTreeGrowing&&!this.isGrowthFinished,E=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(c,E),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},y.prototype.getPositionsData=function(){for(var s=this.graphManager.getAllNodes(),f={},c=0;c1){var R;for(R=0;RE&&(E=Math.floor(C.y)),m=Math.floor(C.x+n.DEFAULT_COMPONENT_SEPERATION)}this.transform(new a(r.WORLD_CENTER_X-C.x/2,r.WORLD_CENTER_Y-C.y/2))},y.radialLayout=function(s,f,c){var E=Math.max(this.maxDiagonalInTree(s),n.DEFAULT_RADIAL_SEPARATION);y.branchRadialLayout(f,null,0,359,0,E);var A=u.calculateBounds(s),m=new T;m.setDeviceOrgX(A.getMinX()),m.setDeviceOrgY(A.getMinY()),m.setWorldOrgX(c.x),m.setWorldOrgY(c.y);for(var C=0;C1;){var X=_[0];_.splice(0,1);var H=w.indexOf(X);H>=0&&w.splice(H,1),U--,x--}f!=null?P=(w.indexOf(_[0])+1)%U:P=0;for(var W=Math.abs(E-c)/x,B=P;F!=x;B=++B%U){var K=w[B].getOtherEnd(s);if(K!=f){var q=(c+F*W)%360,ht=(q+W)%360;y.branchRadialLayout(K,s,q,ht,A+m,m),F++}}},y.maxDiagonalInTree=function(s){for(var f=v.MIN_VALUE,c=0;cf&&(f=A)}return f},y.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},y.prototype.groupZeroDegreeMembers=function(){var s=this,f={};this.memberGroups={},this.idToDummyNode={};for(var c=[],E=this.graphManager.getAllNodes(),A=0;A"u"&&(f[R]=[]),f[R]=f[R].concat(m)}Object.keys(f).forEach(function(M){if(f[M].length>1){var S="DummyCompound_"+M;s.memberGroups[S]=f[M];var Y=f[M][0].getParent(),w=new l(s.graphManager);w.id=S,w.paddingLeft=Y.paddingLeft||0,w.paddingRight=Y.paddingRight||0,w.paddingBottom=Y.paddingBottom||0,w.paddingTop=Y.paddingTop||0,s.idToDummyNode[S]=w;var x=s.getGraphManager().add(s.newGraph(),w),F=Y.getChild();F.add(w);for(var U=0;U=0;s--){var f=this.compoundOrder[s],c=f.id,E=f.paddingLeft,A=f.paddingTop;this.adjustLocations(this.tiledMemberPack[c],f.rect.x,f.rect.y,E,A)}},y.prototype.repopulateZeroDegreeMembers=function(){var s=this,f=this.tiledZeroDegreePack;Object.keys(f).forEach(function(c){var E=s.idToDummyNode[c],A=E.paddingLeft,m=E.paddingTop;s.adjustLocations(f[c],E.rect.x,E.rect.y,A,m)})},y.prototype.getToBeTiled=function(s){var f=s.id;if(this.toBeTiled[f]!=null)return this.toBeTiled[f];var c=s.getChild();if(c==null)return this.toBeTiled[f]=!1,!1;for(var E=c.getNodes(),A=0;A0)return this.toBeTiled[f]=!1,!1;if(m.getChild()==null){this.toBeTiled[m.id]=!1;continue}if(!this.getToBeTiled(m))return this.toBeTiled[f]=!1,!1}return this.toBeTiled[f]=!0,!0},y.prototype.getNodeDegree=function(s){s.id;for(var f=s.getEdges(),c=0,E=0;EM&&(M=Y.rect.height)}c+=M+s.verticalPadding}},y.prototype.tileCompoundMembers=function(s,f){var c=this;this.tiledMemberPack=[],Object.keys(s).forEach(function(E){var A=f[E];c.tiledMemberPack[E]=c.tileNodes(s[E],A.paddingLeft+A.paddingRight),A.rect.width=c.tiledMemberPack[E].width,A.rect.height=c.tiledMemberPack[E].height})},y.prototype.tileNodes=function(s,f){var c=n.TILING_PADDING_VERTICAL,E=n.TILING_PADDING_HORIZONTAL,A={rows:[],rowWidth:[],rowHeight:[],width:0,height:f,verticalPadding:c,horizontalPadding:E};s.sort(function(R,M){return R.rect.width*R.rect.height>M.rect.width*M.rect.height?-1:R.rect.width*R.rect.height0&&(C+=s.horizontalPadding),s.rowWidth[c]=C,s.width0&&(R+=s.verticalPadding);var M=0;R>s.rowHeight[c]&&(M=s.rowHeight[c],s.rowHeight[c]=R,M=s.rowHeight[c]-M),s.height+=M,s.rows[c].push(f)},y.prototype.getShortestRowIndex=function(s){for(var f=-1,c=Number.MAX_VALUE,E=0;Ec&&(f=E,c=s.rowWidth[E]);return f},y.prototype.canAddHorizontal=function(s,f,c){var E=this.getShortestRowIndex(s);if(E<0)return!0;var A=s.rowWidth[E];if(A+s.horizontalPadding+f<=s.width)return!0;var m=0;s.rowHeight[E]0&&(m=c+s.verticalPadding-s.rowHeight[E]);var C;s.width-A>=f+s.horizontalPadding?C=(s.height+m)/(A+f+s.horizontalPadding):C=(s.height+m)/s.width,m=c+s.verticalPadding;var R;return s.widthm&&f!=c){E.splice(-1,1),s.rows[c].push(A),s.rowWidth[f]=s.rowWidth[f]-m,s.rowWidth[c]=s.rowWidth[c]+m,s.width=s.rowWidth[instance.getLongestRowIndex(s)];for(var C=Number.MIN_VALUE,R=0;RC&&(C=E[R].height);f>0&&(C+=s.verticalPadding);var M=s.rowHeight[f]+s.rowHeight[c];s.rowHeight[f]=C,s.rowHeight[c]0)for(var F=A;F<=m;F++)x[0]+=this.grid[F][C-1].length+this.grid[F][C].length-1;if(m0)for(var F=C;F<=R;F++)x[3]+=this.grid[A-1][F].length+this.grid[A][F].length-1;for(var U=v.MAX_VALUE,P,_,X=0;X0){var R;R=T.getGraphManager().add(T.newGraph(),c),this.processChildrenList(R,f,T)}}},a.prototype.stop=function(){return this.stopped=!0,this};var v=function(u){u("layout","cose-bilkent",a)};typeof cytoscape<"u"&&v(cytoscape),I.exports=v})])})})(k)),k.exports}var yt=vt();const Et=lt(yt);tt.use(Et);function et(G,b){G.forEach(N=>{const I={id:N.id,labelText:N.label,height:N.height,width:N.width,padding:N.padding??0};Object.keys(N).forEach(L=>{["id","label","height","width","padding","x","y"].includes(L)||(I[L]=N[L])}),b.add({group:"nodes",data:I,position:{x:N.x??0,y:N.y??0}})})}V(et,"addNodes");function rt(G,b){G.forEach(N=>{const I={id:N.id,source:N.start,target:N.end};Object.keys(N).forEach(L=>{["id","start","end"].includes(L)||(I[L]=N[L])}),b.add({group:"edges",data:I})})}V(rt,"addEdges");function it(G){return new Promise(b=>{const N=gt("body").append("div").attr("id","cy").attr("style","display:none"),I=tt({container:document.getElementById("cy"),style:[{selector:"edge",style:{"curve-style":"bezier"}}]});N.remove(),et(G.nodes,I),rt(G.edges,I),I.nodes().forEach(function(o){o.layoutDimensions=()=>{const e=o.data();return{w:e.width,h:e.height}}});const L={name:"cose-bilkent",quality:"proof",styleEnabled:!1,animate:!1};I.layout(L).run(),I.ready(o=>{$.info("Cytoscape ready",o),b(I)})})}V(it,"createCytoscapeInstance");function nt(G){return G.nodes().map(b=>{const N=b.data(),I=b.position(),L={id:N.id,x:I.x,y:I.y};return Object.keys(N).forEach(o=>{o!=="id"&&(L[o]=N[o])}),L})}V(nt,"extractPositionedNodes");function ot(G){return G.edges().map(b=>{const N=b.data(),I=b._private.rscratch,L={id:N.id,source:N.source,target:N.target,startX:I.startX,startY:I.startY,midX:I.midX,midY:I.midY,endX:I.endX,endY:I.endY};return Object.keys(N).forEach(o=>{["id","source","target"].includes(o)||(L[o]=N[o])}),L})}V(ot,"extractPositionedEdges");async function st(G,b){$.debug("Starting cose-bilkent layout algorithm");try{at(G);const N=await it(G),I=nt(N),L=ot(N);return $.debug(`Layout completed: ${I.length} nodes, ${L.length} edges`),{nodes:I,edges:L}}catch(N){throw $.error("Error in cose-bilkent layout algorithm:",N),N}}V(st,"executeCoseBilkentLayout");function at(G){if(!G)throw new Error("Layout data is required");if(!G.config)throw new Error("Configuration is required in layout data");if(!G.rootNode)throw new Error("Root node is required");if(!G.nodes||!Array.isArray(G.nodes))throw new Error("No nodes found in layout data");if(!Array.isArray(G.edges))throw new Error("Edges array is required in layout data");return!0}V(at,"validateLayoutData");var Lt=V(async(G,b,{insertCluster:N,insertEdge:I,insertEdgeLabel:L,insertMarkers:o,insertNode:e,log:t,positionEdgeLabel:i},{algorithm:l})=>{const g={},n={},d=b.select("g");o(d,G.markers,G.type,G.diagramId);const r=d.insert("g").attr("class","subgraphs"),h=d.insert("g").attr("class","edgePaths"),a=d.insert("g").attr("class","edgeLabels"),p=d.insert("g").attr("class","nodes");t.debug("Inserting nodes into DOM for dimension calculation"),await Promise.all(G.nodes.map(async u=>{if(u.isGroup){const T={...u};n[u.id]=T,g[u.id]=T,await N(r,u)}else{const T={...u};g[u.id]=T;const y=await e(p,u,{config:G.config,dir:G.direction||"TB"}),O=y.node().getBBox();T.width=O.width,T.height=O.height,T.domId=y,t.debug(`Node ${u.id} dimensions: ${O.width}x${O.height}`)}})),t.debug("Running cose-bilkent layout algorithm");const v={...G,nodes:G.nodes.map(u=>{const T=g[u.id];return{...u,width:T.width,height:T.height}})},D=await st(v,G.config);t.debug("Positioning nodes based on layout results"),D.nodes.forEach(u=>{const T=g[u.id];T?.domId&&(T.domId.attr("transform",`translate(${u.x}, ${u.y})`),T.x=u.x,T.y=u.y,t.debug(`Positioned node ${T.id} at center (${u.x}, ${u.y})`))}),D.edges.forEach(u=>{const T=G.edges.find(y=>y.id===u.id);T&&(T.points=[{x:u.startX,y:u.startY},{x:u.midX,y:u.midY},{x:u.endX,y:u.endY}])}),t.debug("Inserting and positioning edges"),await Promise.all(G.edges.map(async u=>{await L(a,u);const T=g[u.start??""],y=g[u.end??""];if(T&&y){const O=D.edges.find(s=>s.id===u.id);if(O){t.debug("APA01 positionedEdge",O);const s={...u},f=I(h,s,n,G.type,T,y,G.diagramId);i(s,f)}else{const s={...u,points:[{x:T.x||0,y:T.y||0},{x:y.x||0,y:y.y||0}]},f=I(h,s,n,G.type,T,y,G.diagramId);i(s,f)}}})),t.debug("Cose-bilkent rendering completed")},"render"),Nt=Lt;export{Nt as render}; diff --git a/_astro/cytoscape.esm.DtBltrT8.js b/_astro/cytoscape.esm.DtBltrT8.js new file mode 100644 index 00000000..7423108d --- /dev/null +++ b/_astro/cytoscape.esm.DtBltrT8.js @@ -0,0 +1,331 @@ +function Bs(r,e){(e==null||e>r.length)&&(e=r.length);for(var t=0,a=Array(e);t=r.length?{done:!0}:{done:!1,value:r[a++]}},e:function(l){throw l},f:n}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var i,s=!0,o=!1;return{s:function(){t=t.call(r)},n:function(){var l=t.next();return s=l.done,l},e:function(l){o=!0,i=l},f:function(){try{s||t.return==null||t.return()}finally{if(o)throw i}}}}function Jl(r,e,t){return(e=jl(e))in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function ac(r){if(typeof Symbol<"u"&&r[Symbol.iterator]!=null||r["@@iterator"]!=null)return Array.from(r)}function nc(r,e){var t=r==null?null:typeof Symbol<"u"&&r[Symbol.iterator]||r["@@iterator"];if(t!=null){var a,n,i,s,o=[],l=!0,u=!1;try{if(i=(t=t.call(r)).next,e===0){if(Object(t)!==t)return;l=!1}else for(;!(l=(a=i.call(t)).done)&&(o.push(a.value),o.length!==e);l=!0);}catch(v){u=!0,n=v}finally{try{if(!l&&t.return!=null&&(s=t.return(),Object(s)!==s))return}finally{if(u)throw n}}return o}}function ic(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function sc(){throw new TypeError(`Invalid attempt to spread non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Je(r,e){return ec(r)||nc(r,e)||Xs(r,e)||ic()}function mn(r){return rc(r)||ac(r)||Xs(r)||sc()}function oc(r,e){if(typeof r!="object"||!r)return r;var t=r[Symbol.toPrimitive];if(t!==void 0){var a=t.call(r,e);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(r)}function jl(r){var e=oc(r,"string");return typeof e=="symbol"?e:e+""}function ar(r){"@babel/helpers - typeof";return ar=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ar(r)}function Xs(r,e){if(r){if(typeof r=="string")return Bs(r,e);var t={}.toString.call(r).slice(8,-1);return t==="Object"&&r.constructor&&(t=r.constructor.name),t==="Map"||t==="Set"?Array.from(r):t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?Bs(r,e):void 0}}var rr=typeof window>"u"?null:window,To=rr?rr.navigator:null;rr&&rr.document;var uc=ar(""),ev=ar({}),lc=ar(function(){}),vc=typeof HTMLElement>"u"?"undefined":ar(HTMLElement),La=function(e){return e&&e.instanceString&&Ue(e.instanceString)?e.instanceString():null},ge=function(e){return e!=null&&ar(e)==uc},Ue=function(e){return e!=null&&ar(e)===lc},_e=function(e){return!Dr(e)&&(Array.isArray?Array.isArray(e):e!=null&&e instanceof Array)},Le=function(e){return e!=null&&ar(e)===ev&&!_e(e)&&e.constructor===Object},fc=function(e){return e!=null&&ar(e)===ev},ae=function(e){return e!=null&&ar(e)===ar(1)&&!isNaN(e)},cc=function(e){return ae(e)&&Math.floor(e)===e},bn=function(e){if(vc!=="undefined")return e!=null&&e instanceof HTMLElement},Dr=function(e){return Ia(e)||rv(e)},Ia=function(e){return La(e)==="collection"&&e._private.single},rv=function(e){return La(e)==="collection"&&!e._private.single},Ys=function(e){return La(e)==="core"},tv=function(e){return La(e)==="stylesheet"},dc=function(e){return La(e)==="event"},ut=function(e){return e==null?!0:!!(e===""||e.match(/^\s+$/))},hc=function(e){return typeof HTMLElement>"u"?!1:e instanceof HTMLElement},gc=function(e){return Le(e)&&ae(e.x1)&&ae(e.x2)&&ae(e.y1)&&ae(e.y2)},pc=function(e){return fc(e)&&Ue(e.then)},yc=function(){return To&&To.userAgent.match(/msie|trident|edge/i)},Qt=function(e,t){t||(t=function(){if(arguments.length===1)return arguments[0];if(arguments.length===0)return"undefined";for(var i=[],s=0;st?1:0},Tc=function(e,t){return-1*nv(e,t)},be=Object.assign!=null?Object.assign.bind(Object):function(r){for(var e=arguments,t=1;t1&&(g-=1),g<1/6?d+(y-d)*6*g:g<1/2?y:g<2/3?d+(y-d)*(2/3-g)*6:d}var f=new RegExp("^"+wc+"$").exec(e);if(f){if(a=parseInt(f[1]),a<0?a=(360- -1*a%360)%360:a>360&&(a=a%360),a/=360,n=parseFloat(f[2]),n<0||n>100||(n=n/100,i=parseFloat(f[3]),i<0||i>100)||(i=i/100,s=f[4],s!==void 0&&(s=parseFloat(s),s<0||s>1)))return;if(n===0)o=l=u=Math.round(i*255);else{var c=i<.5?i*(1+n):i+n-i*n,h=2*i-c;o=Math.round(255*v(h,c,a+1/3)),l=Math.round(255*v(h,c,a)),u=Math.round(255*v(h,c,a-1/3))}t=[o,l,u,s]}return t},Dc=function(e){var t,a=new RegExp("^"+mc+"$").exec(e);if(a){t=[];for(var n=[],i=1;i<=3;i++){var s=a[i];if(s[s.length-1]==="%"&&(n[i]=!0),s=parseFloat(s),n[i]&&(s=s/100*255),s<0||s>255)return;t.push(Math.floor(s))}var o=n[1]||n[2]||n[3],l=n[1]&&n[2]&&n[3];if(o&&!l)return;var u=a[4];if(u!==void 0){if(u=parseFloat(u),u<0||u>1)return;t.push(u)}}return t},Bc=function(e){return Pc[e.toLowerCase()]},iv=function(e){return(_e(e)?e:null)||Bc(e)||Sc(e)||Dc(e)||kc(e)},Pc={transparent:[0,0,0,0],aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],grey:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},sv=function(e){for(var t=e.map,a=e.keys,n=a.length,i=0;i=l||R<0||m&&L>=c}function T(){var A=e();if(x(A))return k(A);d=setTimeout(T,C(A))}function k(A){return d=void 0,b&&v?w(A):(v=f=void 0,h)}function D(){d!==void 0&&clearTimeout(d),g=0,v=y=f=d=void 0}function B(){return d===void 0?h:k(e())}function P(){var A=e(),R=x(A);if(v=arguments,f=this,y=A,R){if(d===void 0)return E(y);if(m)return clearTimeout(d),d=setTimeout(T,l),w(y)}return d===void 0&&(d=setTimeout(T,l)),h}return P.cancel=D,P.flush=B,P}return fi=s,fi}var Vc=Fc(),Fa=Oa(Vc),ci=rr?rr.performance:null,lv=ci&&ci.now?function(){return ci.now()}:function(){return Date.now()},qc=(function(){if(rr){if(rr.requestAnimationFrame)return function(r){rr.requestAnimationFrame(r)};if(rr.mozRequestAnimationFrame)return function(r){rr.mozRequestAnimationFrame(r)};if(rr.webkitRequestAnimationFrame)return function(r){rr.webkitRequestAnimationFrame(r)};if(rr.msRequestAnimationFrame)return function(r){rr.msRequestAnimationFrame(r)}}return function(r){r&&setTimeout(function(){r(lv())},1e3/60)}})(),wn=function(e){return qc(e)},Yr=lv,Tt=9261,vv=65599,Ht=5381,fv=function(e){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Tt,a=t,n;n=e.next(),!n.done;)a=a*vv+n.value|0;return a},Ca=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Tt;return t*vv+e|0},Ta=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ht;return(t<<5)+t+e|0},_c=function(e,t){return e*2097152+t},et=function(e){return e[0]*2097152+e[1]},Xa=function(e,t){return[Ca(e[0],t[0]),Ta(e[1],t[1])]},qo=function(e,t){var a={value:0,done:!1},n=0,i=e.length,s={next:function(){return n=0;n--)e[n]===t&&e.splice(n,1)},eo=function(e){e.splice(0,e.length)},Qc=function(e,t){for(var a=0;a"u"?"undefined":ar(Set))!==jc?Set:ed,In=function(e,t){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(e===void 0||t===void 0||!Ys(e)){$e("An element must have a core reference and parameters set");return}var n=t.group;if(n==null&&(t.data&&t.data.source!=null&&t.data.target!=null?n="edges":n="nodes"),n!=="nodes"&&n!=="edges"){$e("An element must be of type `nodes` or `edges`; you specified `"+n+"`");return}this.length=1,this[0]=this;var i=this._private={cy:e,single:!0,data:t.data||{},position:t.position||{x:0,y:0},autoWidth:void 0,autoHeight:void 0,autoPadding:void 0,compoundBoundsClean:!1,listeners:[],group:n,style:{},rstyle:{},styleCxts:[],styleKeys:{},removed:!0,selected:!!t.selected,selectable:t.selectable===void 0?!0:!!t.selectable,locked:!!t.locked,grabbed:!1,grabbable:t.grabbable===void 0?!0:!!t.grabbable,pannable:t.pannable===void 0?n==="edges":!!t.pannable,active:!1,classes:new ra,animation:{current:[],queue:[]},rscratch:{},scratch:t.scratch||{},edges:[],children:[],parent:t.parent&&t.parent.isNode()?t.parent:null,traversalCache:{},backgrounding:!1,bbCache:null,bbCacheShift:{x:0,y:0},bodyBounds:null,overlayBounds:null,labelBounds:{all:null,source:null,target:null,main:null},arrowBounds:{source:null,target:null,"mid-source":null,"mid-target":null}};if(i.position.x==null&&(i.position.x=0),i.position.y==null&&(i.position.y=0),t.renderedPosition){var s=t.renderedPosition,o=e.pan(),l=e.zoom();i.position={x:(s.x-o.x)/l,y:(s.y-o.y)/l}}var u=[];_e(t.classes)?u=t.classes:ge(t.classes)&&(u=t.classes.split(/\s+/));for(var v=0,f=u.length;vm?1:0},v=function(p,m,b,w,E){var C;if(b==null&&(b=0),E==null&&(E=a),b<0)throw new Error("lo must be non-negative");for(w==null&&(w=p.length);bD;0<=D?k++:k--)T.push(k);return T}).apply(this).reverse(),x=[],w=0,E=C.length;wB;0<=B?++T:--T)P.push(s(p,b));return P},y=function(p,m,b,w){var E,C,x;for(w==null&&(w=a),E=p[b];b>m;){if(x=b-1>>1,C=p[x],w(E,C)<0){p[b]=C,b=x;continue}break}return p[b]=E},g=function(p,m,b){var w,E,C,x,T;for(b==null&&(b=a),E=p.length,T=m,C=p[m],w=2*m+1;w0;){var C=m.pop(),x=g(C),T=C.id();if(c[T]=x,x!==1/0)for(var k=C.neighborhood().intersect(d),D=0;D0)for(O.unshift(M);f[G];){var N=f[G];O.unshift(N.edge),O.unshift(N.node),V=N.node,G=V.id()}return o.spawn(O)}}}},od={kruskal:function(e){e=e||function(b){return 1};for(var t=this.byGroup(),a=t.nodes,n=t.edges,i=a.length,s=new Array(i),o=a,l=function(w){for(var E=0;E0;){if(E(),x++,w===v){for(var T=[],k=i,D=v,B=p[D];T.unshift(k),B!=null&&T.unshift(B),k=g[D],k!=null;)D=k.id(),B=p[D];return{found:!0,distance:f[w],path:this.spawn(T),steps:x}}h[w]=!0;for(var P=b._private.edges,A=0;AB&&(d[D]=B,m[D]=k,b[D]=E),!i){var P=k*v+T;!i&&d[P]>B&&(d[P]=B,m[P]=T,b[P]=E)}}}for(var A=0;A1&&arguments[1]!==void 0?arguments[1]:s,ie=b(we),de=[],he=ie;;){if(he==null)return t.spawn();var Ee=m(he),pe=Ee.edge,Se=Ee.pred;if(de.unshift(he[0]),he.same(ye)&&de.length>0)break;pe!=null&&de.unshift(pe),he=Se}return l.spawn(de)},C=0;C=0;v--){var f=u[v],c=f[1],h=f[2];(t[c]===o&&t[h]===l||t[c]===l&&t[h]===o)&&u.splice(v,1)}for(var d=0;dn;){var i=Math.floor(Math.random()*t.length);t=gd(i,e,t),a--}return t},pd={kargerStein:function(){var e=this,t=this.byGroup(),a=t.nodes,n=t.edges;n.unmergeBy(function(O){return O.isLoop()});var i=a.length,s=n.length,o=Math.ceil(Math.pow(Math.log(i)/Math.LN2,2)),l=Math.floor(i/hd);if(i<2){$e("At least 2 nodes are required for Karger-Stein algorithm");return}for(var u=[],v=0;v1&&arguments[1]!==void 0?arguments[1]:0,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:e.length,n=1/0,i=t;i1&&arguments[1]!==void 0?arguments[1]:0,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:e.length,n=-1/0,i=t;i1&&arguments[1]!==void 0?arguments[1]:0,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:e.length,n=0,i=0,s=t;s1&&arguments[1]!==void 0?arguments[1]:0,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:e.length,n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,s=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!0;n?e=e.slice(t,a):(a0&&e.splice(0,t));for(var o=0,l=e.length-1;l>=0;l--){var u=e[l];s?isFinite(u)||(e[l]=-1/0,o++):e.splice(l,1)}i&&e.sort(function(c,h){return c-h});var v=e.length,f=Math.floor(v/2);return v%2!==0?e[f+1+o]:(e[f-1+o]+e[f+o])/2},Ed=function(e){return Math.PI*e/180},Ya=function(e,t){return Math.atan2(t,e)-Math.PI/2},ro=Math.log2||function(r){return Math.log(r)/Math.log(2)},to=function(e){return e>0?1:e<0?-1:0},Bt=function(e,t){return Math.sqrt(Et(e,t))},Et=function(e,t){var a=t.x-e.x,n=t.y-e.y;return a*a+n*n},Cd=function(e){for(var t=e.length,a=0,n=0;n=e.x1&&e.y2>=e.y1)return{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2,w:e.x2-e.x1,h:e.y2-e.y1};if(e.w!=null&&e.h!=null&&e.w>=0&&e.h>=0)return{x1:e.x1,y1:e.y1,x2:e.x1+e.w,y2:e.y1+e.h,w:e.w,h:e.h}}},Sd=function(e){return{x1:e.x1,x2:e.x2,w:e.w,y1:e.y1,y2:e.y2,h:e.h}},kd=function(e){e.x1=1/0,e.y1=1/0,e.x2=-1/0,e.y2=-1/0,e.w=0,e.h=0},Dd=function(e,t){e.x1=Math.min(e.x1,t.x1),e.x2=Math.max(e.x2,t.x2),e.w=e.x2-e.x1,e.y1=Math.min(e.y1,t.y1),e.y2=Math.max(e.y2,t.y2),e.h=e.y2-e.y1},mv=function(e,t,a){e.x1=Math.min(e.x1,t),e.x2=Math.max(e.x2,t),e.w=e.x2-e.x1,e.y1=Math.min(e.y1,a),e.y2=Math.max(e.y2,a),e.h=e.y2-e.y1},un=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return e.x1-=t,e.x2+=t,e.y1-=t,e.y2+=t,e.w=e.x2-e.x1,e.h=e.y2-e.y1,e},ln=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[0],a,n,i,s;if(t.length===1)a=n=i=s=t[0];else if(t.length===2)a=i=t[0],s=n=t[1];else if(t.length===4){var o=Je(t,4);a=o[0],n=o[1],i=o[2],s=o[3]}return e.x1-=s,e.x2+=n,e.y1-=a,e.y2+=i,e.w=e.x2-e.x1,e.h=e.y2-e.y1,e},Uo=function(e,t){e.x1=t.x1,e.y1=t.y1,e.x2=t.x2,e.y2=t.y2,e.w=e.x2-e.x1,e.h=e.y2-e.y1},ao=function(e,t){return!(e.x1>t.x2||t.x1>e.x2||e.x2t.y2||t.y1>e.y2)},nt=function(e,t,a){return e.x1<=t&&t<=e.x2&&e.y1<=a&&a<=e.y2},Ko=function(e,t){return nt(e,t.x,t.y)},bv=function(e,t){return nt(e,t.x1,t.y1)&&nt(e,t.x2,t.y2)},Bd=(gi=Math.hypot)!==null&&gi!==void 0?gi:function(r,e){return Math.sqrt(r*r+e*e)};function Pd(r,e){if(r.length<3)throw new Error("Need at least 3 vertices");var t=function(T,k){return{x:T.x+k.x,y:T.y+k.y}},a=function(T,k){return{x:T.x-k.x,y:T.y-k.y}},n=function(T,k){return{x:T.x*k,y:T.y*k}},i=function(T,k){return T.x*k.y-T.y*k.x},s=function(T){var k=Bd(T.x,T.y);return k===0?{x:0,y:0}:{x:T.x/k,y:T.y/k}},o=function(T){for(var k=0,D=0;D7&&arguments[7]!==void 0?arguments[7]:"auto",u=l==="auto"?vt(i,s):l,v=i/2,f=s/2;u=Math.min(u,v,f);var c=u!==v,h=u!==f,d;if(c){var y=a-v+u-o,g=n-f-o,p=a+v-u+o,m=g;if(d=it(e,t,a,n,y,g,p,m,!1),d.length>0)return d}if(h){var b=a+v+o,w=n-f+u-o,E=b,C=n+f-u+o;if(d=it(e,t,a,n,b,w,E,C,!1),d.length>0)return d}if(c){var x=a-v+u-o,T=n+f+o,k=a+v-u+o,D=T;if(d=it(e,t,a,n,x,T,k,D,!1),d.length>0)return d}if(h){var B=a-v-o,P=n-f+u-o,A=B,R=n+f-u+o;if(d=it(e,t,a,n,B,P,A,R,!1),d.length>0)return d}var L;{var I=a-v+u,M=n-f+u;if(L=ya(e,t,a,n,I,M,u+o),L.length>0&&L[0]<=I&&L[1]<=M)return[L[0],L[1]]}{var O=a+v-u,V=n-f+u;if(L=ya(e,t,a,n,O,V,u+o),L.length>0&&L[0]>=O&&L[1]<=V)return[L[0],L[1]]}{var G=a+v-u,N=n+f-u;if(L=ya(e,t,a,n,G,N,u+o),L.length>0&&L[0]>=G&&L[1]>=N)return[L[0],L[1]]}{var F=a-v+u,U=n+f-u;if(L=ya(e,t,a,n,F,U,u+o),L.length>0&&L[0]<=F&&L[1]>=U)return[L[0],L[1]]}return[]},Rd=function(e,t,a,n,i,s,o){var l=o,u=Math.min(a,i),v=Math.max(a,i),f=Math.min(n,s),c=Math.max(n,s);return u-l<=e&&e<=v+l&&f-l<=t&&t<=c+l},Md=function(e,t,a,n,i,s,o,l,u){var v={x1:Math.min(a,o,i)-u,x2:Math.max(a,o,i)+u,y1:Math.min(n,l,s)-u,y2:Math.max(n,l,s)+u};return!(ev.x2||tv.y2)},Ld=function(e,t,a,n){a-=n;var i=t*t-4*e*a;if(i<0)return[];var s=Math.sqrt(i),o=2*e,l=(-t+s)/o,u=(-t-s)/o;return[l,u]},Id=function(e,t,a,n,i){var s=1e-5;e===0&&(e=s),t/=e,a/=e,n/=e;var o,l,u,v,f,c,h,d;if(l=(3*a-t*t)/9,u=-(27*n)+t*(9*a-2*(t*t)),u/=54,o=l*l*l+u*u,i[1]=0,h=t/3,o>0){f=u+Math.sqrt(o),f=f<0?-Math.pow(-f,1/3):Math.pow(f,1/3),c=u-Math.sqrt(o),c=c<0?-Math.pow(-c,1/3):Math.pow(c,1/3),i[0]=-h+f+c,h+=(f+c)/2,i[4]=i[2]=-h,h=Math.sqrt(3)*(-c+f)/2,i[3]=h,i[5]=-h;return}if(i[5]=i[3]=0,o===0){d=u<0?-Math.pow(-u,1/3):Math.pow(u,1/3),i[0]=-h+2*d,i[4]=i[2]=-(d+h);return}l=-l,v=l*l*l,v=Math.acos(u/Math.sqrt(v)),d=2*Math.sqrt(l),i[0]=-h+d*Math.cos(v/3),i[2]=-h+d*Math.cos((v+2*Math.PI)/3),i[4]=-h+d*Math.cos((v+4*Math.PI)/3)},Od=function(e,t,a,n,i,s,o,l){var u=1*a*a-4*a*i+2*a*o+4*i*i-4*i*o+o*o+n*n-4*n*s+2*n*l+4*s*s-4*s*l+l*l,v=9*a*i-3*a*a-3*a*o-6*i*i+3*i*o+9*n*s-3*n*n-3*n*l-6*s*s+3*s*l,f=3*a*a-6*a*i+a*o-a*e+2*i*i+2*i*e-o*e+3*n*n-6*n*s+n*l-n*t+2*s*s+2*s*t-l*t,c=1*a*i-a*a+a*e-i*e+n*s-n*n+n*t-s*t,h=[];Id(u,v,f,c,h);for(var d=1e-7,y=[],g=0;g<6;g+=2)Math.abs(h[g+1])=0&&h[g]<=1&&y.push(h[g]);y.push(1),y.push(0);for(var p=-1,m,b,w,E=0;E=0?wu?(e-i)*(e-i)+(t-s)*(t-s):v-c},Sr=function(e,t,a){for(var n,i,s,o,l,u=0,v=0;v=e&&e>=s||n<=e&&e<=s)l=(e-n)/(s-n)*(o-i)+i,l>t&&u++;else continue;return u%2!==0},Zr=function(e,t,a,n,i,s,o,l,u){var v=new Array(a.length),f;l[0]!=null?(f=Math.atan(l[1]/l[0]),l[0]<0?f=f+Math.PI/2:f=-f-Math.PI/2):f=l;for(var c=Math.cos(-f),h=Math.sin(-f),d=0;d0){var g=Cn(v,-u);y=En(g)}else y=v;return Sr(e,t,y)},zd=function(e,t,a,n,i,s,o,l){for(var u=new Array(a.length*2),v=0;v=0&&g<=1&&m.push(g),p>=0&&p<=1&&m.push(p),m.length===0)return[];var b=m[0]*l[0]+e,w=m[0]*l[1]+t;if(m.length>1){if(m[0]==m[1])return[b,w];var E=m[1]*l[0]+e,C=m[1]*l[1]+t;return[b,w,E,C]}else return[b,w]},pi=function(e,t,a){return t<=e&&e<=a||a<=e&&e<=t?e:e<=t&&t<=a||a<=t&&t<=e?t:a},it=function(e,t,a,n,i,s,o,l,u){var v=e-i,f=a-e,c=o-i,h=t-s,d=n-t,y=l-s,g=c*h-y*v,p=f*h-d*v,m=y*f-c*d;if(m!==0){var b=g/m,w=p/m,E=.001,C=0-E,x=1+E;return C<=b&&b<=x&&C<=w&&w<=x?[e+b*f,t+b*d]:u?[e+b*f,t+b*d]:[]}else return g===0||p===0?pi(e,a,o)===o?[o,l]:pi(e,a,i)===i?[i,s]:pi(i,o,a)===a?[a,n]:[]:[]},Vd=function(e,t,a,n,i){var s=[],o=n/2,l=i/2,u=t,v=a;s.push({x:u+o*e[0],y:v+l*e[1]});for(var f=1;f0){var y=Cn(f,-l);h=En(y)}else h=f}else h=a;for(var g,p,m,b,w=0;w2){for(var d=[v[0],v[1]],y=Math.pow(d[0]-e,2)+Math.pow(d[1]-t,2),g=1;gv&&(v=w)},get:function(b){return u[b]}},c=0;c0?L=R.edgesTo(A)[0]:L=A.edgesTo(R)[0];var I=n(L);A=A.id(),x[A]>x[B]+I&&(x[A]=x[B]+I,T.nodes.indexOf(A)<0?T.push(A):T.updateItem(A),C[A]=0,E[A]=[]),x[A]==x[B]+I&&(C[A]=C[A]+C[B],E[A].push(B))}else for(var M=0;M0;){for(var N=w.pop(),F=0;F0&&o.push(a[l]);o.length!==0&&i.push(n.collection(o))}return i},eh=function(e,t){for(var a=0;a5&&arguments[5]!==void 0?arguments[5]:ah,o=n,l,u,v=0;v=2?va(e,t,a,0,Jo,nh):va(e,t,a,0,Qo)},squaredEuclidean:function(e,t,a){return va(e,t,a,0,Jo)},manhattan:function(e,t,a){return va(e,t,a,0,Qo)},max:function(e,t,a){return va(e,t,a,-1/0,ih)}};Jt["squared-euclidean"]=Jt.squaredEuclidean;Jt.squaredeuclidean=Jt.squaredEuclidean;function Nn(r,e,t,a,n,i){var s;return Ue(r)?s=r:s=Jt[r]||Jt.euclidean,e===0&&Ue(r)?s(n,i):s(e,t,a,n,i)}var sh=cr({k:2,m:2,sensitivityThreshold:1e-4,distance:"euclidean",maxIterations:10,attributes:[],testMode:!1,testCentroids:null}),io=function(e){return sh(e)},Tn=function(e,t,a,n,i){var s=i!=="kMedoids",o=s?function(f){return a[f]}:function(f){return n[f](a)},l=function(c){return n[c](t)},u=a,v=t;return Nn(e,n.length,o,l,u,v)},mi=function(e,t,a){for(var n=a.length,i=new Array(n),s=new Array(n),o=new Array(t),l=null,u=0;ua)return!1}return!0},lh=function(e,t,a){for(var n=0;no&&(o=t[u][v],l=v);i[l].push(e[u])}for(var f=0;f=i.threshold||i.mode==="dendrogram"&&e.length===1)return!1;var d=t[s],y=t[n[s]],g;i.mode==="dendrogram"?g={left:d,right:y,key:d.key}:g={value:d.value.concat(y.value),key:d.key},e[d.index]=g,e.splice(y.index,1),t[d.key]=g;for(var p=0;pa[y.key][m.key]&&(l=a[y.key][m.key])):i.linkage==="max"?(l=a[d.key][m.key],a[d.key][m.key]0&&n.push(i);return n},nu=function(e,t,a){for(var n=[],i=0;io&&(s=u,o=t[i*e+u])}s>0&&n.push(s)}for(var v=0;vu&&(l=v,u=f)}a[i]=s[l]}return n=nu(e,t,a),n},iu=function(e){for(var t=this.cy(),a=this.nodes(),n=xh(e),i={},s=0;s=B?(P=B,B=R,A=L):R>P&&(P=R);for(var I=0;I0?1:0;x[k%n.minIterations*o+F]=U,N+=U}if(N>0&&(k>=n.minIterations-1||k==n.maxIterations-1)){for(var Q=0,K=0;K1||C>1)&&(o=!0),f[b]=[],m.outgoers().forEach(function(T){T.isEdge()&&f[b].push(T.id())})}else c[b]=[void 0,m.target().id()]}):s.forEach(function(m){var b=m.id();if(m.isNode()){var w=m.degree(!0);w%2&&(l?u?o=!0:u=b:l=b),f[b]=[],m.connectedEdges().forEach(function(E){return f[b].push(E.id())})}else c[b]=[m.source().id(),m.target().id()]});var h={found:!1,trail:void 0};if(o)return h;if(u&&l)if(i){if(v&&u!=v)return h;v=u}else{if(v&&u!=v&&l!=v)return h;v||(v=u)}else v||(v=s[0].id());var d=function(b){for(var w=b,E=[b],C,x,T;f[w].length;)C=f[w].shift(),x=c[C][0],T=c[C][1],w!=T?(f[T]=f[T].filter(function(k){return k!=C}),w=T):!i&&w!=x&&(f[x]=f[x].filter(function(k){return k!=C}),w=x),E.unshift(C),E.unshift(w);return E},y=[],g=[];for(g=d(v);g.length!=1;)f[g[0]].length==0?(y.unshift(s.getElementById(g.shift())),y.unshift(s.getElementById(g.shift()))):g=d(g.shift()).concat(g);y.unshift(s.getElementById(g.shift()));for(var p in f)if(f[p].length)return h;return h.found=!0,h.trail=this.spawn(y,!0),h}},Qa=function(){var e=this,t={},a=0,n=0,i=[],s=[],o={},l=function(c,h){for(var d=s.length-1,y=[],g=e.spawn();s[d].x!=c||s[d].y!=h;)y.push(s.pop().edge),d--;y.push(s.pop().edge),y.forEach(function(p){var m=p.connectedNodes().intersection(e);g.merge(p),m.forEach(function(b){var w=b.id(),E=b.connectedEdges().intersection(e);g.merge(b),t[w].cutVertex?g.merge(E.filter(function(C){return C.isLoop()})):g.merge(E)})}),i.push(g)},u=function(c,h,d){c===d&&(n+=1),t[h]={id:a,low:a++,cutVertex:!1};var y=e.getElementById(h).connectedEdges().intersection(e);if(y.size()===0)i.push(e.spawn(e.getElementById(h)));else{var g,p,m,b;y.forEach(function(w){g=w.source().id(),p=w.target().id(),m=g===h?p:g,m!==d&&(b=w.id(),o[b]||(o[b]=!0,s.push({x:h,y:m,edge:w})),m in t?t[h].low=Math.min(t[h].low,t[m].id):(u(c,m,h),t[h].low=Math.min(t[h].low,t[m].low),t[h].id<=t[m].low&&(t[h].cutVertex=!0,l(h,m))))})}};e.forEach(function(f){if(f.isNode()){var c=f.id();c in t||(n=0,u(c,c),t[c].cutVertex=n>1)}});var v=Object.keys(t).filter(function(f){return t[f].cutVertex}).map(function(f){return e.getElementById(f)});return{cut:e.spawn(v),components:i}},Ph={hopcroftTarjanBiconnected:Qa,htbc:Qa,htb:Qa,hopcroftTarjanBiconnectedComponents:Qa},Ja=function(){var e=this,t={},a=0,n=[],i=[],s=e.spawn(e),o=function(u){i.push(u),t[u]={index:a,low:a++,explored:!1};var v=e.getElementById(u).connectedEdges().intersection(e);if(v.forEach(function(y){var g=y.target().id();g!==u&&(g in t||o(g),t[g].explored||(t[u].low=Math.min(t[u].low,t[g].low)))}),t[u].index===t[u].low){for(var f=e.spawn();;){var c=i.pop();if(f.merge(e.getElementById(c)),t[c].low=t[u].index,t[c].explored=!0,c===u)break}var h=f.edgesWith(f),d=f.merge(h);n.push(d),s=s.difference(d)}};return e.forEach(function(l){if(l.isNode()){var u=l.id();u in t||o(u)}}),{cut:s,components:n}},Ah={tarjanStronglyConnected:Ja,tsc:Ja,tscc:Ja,tarjanStronglyConnectedComponents:Ja},Dv={};[Sa,sd,od,ld,fd,dd,pd,Hd,Xt,Yt,Rs,th,gh,bh,kh,Bh,Ph,Ah].forEach(function(r){be(Dv,r)});/*! +Embeddable Minimum Strictly-Compliant Promises/A+ 1.1.1 Thenable +Copyright (c) 2013-2014 Ralf S. Engelschall (http://engelschall.com) +Licensed under The MIT License (http://opensource.org/licenses/MIT) +*/var Bv=0,Pv=1,Av=2,Nr=function(e){if(!(this instanceof Nr))return new Nr(e);this.id="Thenable/1.0.7",this.state=Bv,this.fulfillValue=void 0,this.rejectReason=void 0,this.onFulfilled=[],this.onRejected=[],this.proxy={then:this.then.bind(this)},typeof e=="function"&&e.call(this,this.fulfill.bind(this),this.reject.bind(this))};Nr.prototype={fulfill:function(e){return su(this,Pv,"fulfillValue",e)},reject:function(e){return su(this,Av,"rejectReason",e)},then:function(e,t){var a=this,n=new Nr;return a.onFulfilled.push(uu(e,n,"fulfill")),a.onRejected.push(uu(t,n,"reject")),Rv(a),n.proxy}};var su=function(e,t,a,n){return e.state===Bv&&(e.state=t,e[a]=n,Rv(e)),e},Rv=function(e){e.state===Pv?ou(e,"onFulfilled",e.fulfillValue):e.state===Av&&ou(e,"onRejected",e.rejectReason)},ou=function(e,t,a){if(e[t].length!==0){var n=e[t];e[t]=[];var i=function(){for(var o=0;o0}},clearQueue:function(){return function(){var t=this,a=t.length!==void 0,n=a?t:[t],i=this._private.cy||this;if(!i.styleEnabled())return this;for(var s=0;s-1}return qi=e,qi}var _i,Ru;function Yh(){if(Ru)return _i;Ru=1;var r=Vn();function e(t,a){var n=this.__data__,i=r(n,t);return i<0?(++this.size,n.push([t,a])):n[i][1]=a,this}return _i=e,_i}var Gi,Mu;function Zh(){if(Mu)return Gi;Mu=1;var r=$h(),e=Uh(),t=Kh(),a=Xh(),n=Yh();function i(s){var o=-1,l=s==null?0:s.length;for(this.clear();++o-1&&a%1==0&&a0&&this.spawn(n).updateStyle().emit("class"),t},addClass:function(e){return this.toggleClass(e,!0)},hasClass:function(e){var t=this[0];return t!=null&&t._private.classes.has(e)},toggleClass:function(e,t){_e(e)||(e=e.match(/\S+/g)||[]);for(var a=this,n=t===void 0,i=[],s=0,o=a.length;s0&&this.spawn(i).updateStyle().emit("class"),a},removeClass:function(e){return this.toggleClass(e,!1)},flashClass:function(e,t){var a=this;if(t==null)t=250;else if(t===0)return a;return a.addClass(e),setTimeout(function(){a.removeClass(e)},t),a}};vn.className=vn.classNames=vn.classes;var Me={metaChar:"[\\!\\\"\\#\\$\\%\\&\\'\\(\\)\\*\\+\\,\\.\\/\\:\\;\\<\\=\\>\\?\\@\\[\\]\\^\\`\\{\\|\\}\\~]",comparatorOp:"=|\\!=|>|>=|<|<=|\\$=|\\^=|\\*=",boolOp:"\\?|\\!|\\^",string:`"(?:\\\\"|[^"])*"|'(?:\\\\'|[^'])*'`,number:tr,meta:"degree|indegree|outdegree",separator:"\\s*,\\s*",descendant:"\\s+",child:"\\s+>\\s+",subject:"\\$",group:"node|edge|\\*",directedEdge:"\\s+->\\s+",undirectedEdge:"\\s+<->\\s+"};Me.variable="(?:[\\w-.]|(?:\\\\"+Me.metaChar+"))+";Me.className="(?:[\\w-]|(?:\\\\"+Me.metaChar+"))+";Me.value=Me.string+"|"+Me.number;Me.id=Me.variable;(function(){var r,e,t;for(r=Me.comparatorOp.split("|"),t=0;t=0)&&e!=="="&&(Me.comparatorOp+="|\\!"+e)})();var qe=function(){return{checks:[]}},se={GROUP:0,COLLECTION:1,FILTER:2,DATA_COMPARE:3,DATA_EXIST:4,DATA_BOOL:5,META_COMPARE:6,STATE:7,ID:8,CLASS:9,UNDIRECTED_EDGE:10,DIRECTED_EDGE:11,NODE_SOURCE:12,NODE_TARGET:13,NODE_NEIGHBOR:14,CHILD:15,DESCENDANT:16,PARENT:17,ANCESTOR:18,COMPOUND_SPLIT:19,TRUE:20},Os=[{selector:":selected",matches:function(e){return e.selected()}},{selector:":unselected",matches:function(e){return!e.selected()}},{selector:":selectable",matches:function(e){return e.selectable()}},{selector:":unselectable",matches:function(e){return!e.selectable()}},{selector:":locked",matches:function(e){return e.locked()}},{selector:":unlocked",matches:function(e){return!e.locked()}},{selector:":visible",matches:function(e){return e.visible()}},{selector:":hidden",matches:function(e){return!e.visible()}},{selector:":transparent",matches:function(e){return e.transparent()}},{selector:":grabbed",matches:function(e){return e.grabbed()}},{selector:":free",matches:function(e){return!e.grabbed()}},{selector:":removed",matches:function(e){return e.removed()}},{selector:":inside",matches:function(e){return!e.removed()}},{selector:":grabbable",matches:function(e){return e.grabbable()}},{selector:":ungrabbable",matches:function(e){return!e.grabbable()}},{selector:":animated",matches:function(e){return e.animated()}},{selector:":unanimated",matches:function(e){return!e.animated()}},{selector:":parent",matches:function(e){return e.isParent()}},{selector:":childless",matches:function(e){return e.isChildless()}},{selector:":child",matches:function(e){return e.isChild()}},{selector:":orphan",matches:function(e){return e.isOrphan()}},{selector:":nonorphan",matches:function(e){return e.isChild()}},{selector:":compound",matches:function(e){return e.isNode()?e.isParent():e.source().isParent()||e.target().isParent()}},{selector:":loop",matches:function(e){return e.isLoop()}},{selector:":simple",matches:function(e){return e.isSimple()}},{selector:":active",matches:function(e){return e.active()}},{selector:":inactive",matches:function(e){return!e.active()}},{selector:":backgrounding",matches:function(e){return e.backgrounding()}},{selector:":nonbackgrounding",matches:function(e){return!e.backgrounding()}}].sort(function(r,e){return Tc(r.selector,e.selector)}),Dg=(function(){for(var r={},e,t=0;t0&&v.edgeCount>0)return Ve("The selector `"+e+"` is invalid because it uses both a compound selector and an edge selector"),!1;if(v.edgeCount>1)return Ve("The selector `"+e+"` is invalid because it uses multiple edge selectors"),!1;v.edgeCount===1&&Ve("The selector `"+e+"` is deprecated. Edge selectors do not take effect on changes to source and target nodes after an edge is added, for performance reasons. Use a class or data selector on edges instead, updating the class or data of an edge when your app detects a change in source or target nodes.")}return!0},Lg=function(){if(this.toStringCache!=null)return this.toStringCache;for(var e=function(v){return v??""},t=function(v){return ge(v)?'"'+v+'"':e(v)},a=function(v){return" "+v+" "},n=function(v,f){var c=v.type,h=v.value;switch(c){case se.GROUP:{var d=e(h);return d.substring(0,d.length-1)}case se.DATA_COMPARE:{var y=v.field,g=v.operator;return"["+y+a(e(g))+t(h)+"]"}case se.DATA_BOOL:{var p=v.operator,m=v.field;return"["+e(p)+m+"]"}case se.DATA_EXIST:{var b=v.field;return"["+b+"]"}case se.META_COMPARE:{var w=v.operator,E=v.field;return"[["+E+a(e(w))+t(h)+"]]"}case se.STATE:return h;case se.ID:return"#"+h;case se.CLASS:return"."+h;case se.PARENT:case se.CHILD:return i(v.parent,f)+a(">")+i(v.child,f);case se.ANCESTOR:case se.DESCENDANT:return i(v.ancestor,f)+" "+i(v.descendant,f);case se.COMPOUND_SPLIT:{var C=i(v.left,f),x=i(v.subject,f),T=i(v.right,f);return C+(C.length>0?" ":"")+x+T}case se.TRUE:return""}},i=function(v,f){return v.checks.reduce(function(c,h,d){return c+(f===v&&d===0?"$":"")+n(h,f)},"")},s="",o=0;o1&&o=0&&(t=t.replace("!",""),f=!0),t.indexOf("@")>=0&&(t=t.replace("@",""),v=!0),(i||o||v)&&(l=!i&&!s?"":""+e,u=""+a),v&&(e=l=l.toLowerCase(),a=u=u.toLowerCase()),t){case"*=":n=l.indexOf(u)>=0;break;case"$=":n=l.indexOf(u,l.length-u.length)>=0;break;case"^=":n=l.indexOf(u)===0;break;case"=":n=e===a;break;case">":c=!0,n=e>a;break;case">=":c=!0,n=e>=a;break;case"<":c=!0,n=e0;){var v=n.shift();e(v),i.add(v.id()),o&&a(n,i,v)}return r}function Vv(r,e,t){if(t.isParent())for(var a=t._private.children,n=0;n1&&arguments[1]!==void 0?arguments[1]:!0;return lo(this,r,e,Vv)};function qv(r,e,t){if(t.isChild()){var a=t._private.parent;e.has(a.id())||r.push(a)}}jt.forEachUp=function(r){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return lo(this,r,e,qv)};function _g(r,e,t){qv(r,e,t),Vv(r,e,t)}jt.forEachUpAndDown=function(r){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return lo(this,r,e,_g)};jt.ancestors=jt.parents;var Ba,_v;Ba=_v={data:Fe.data({field:"data",bindingEvent:"data",allowBinding:!0,allowSetting:!0,settingEvent:"data",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,immutableKeys:{id:!0,source:!0,target:!0,parent:!0},updateStyle:!0}),removeData:Fe.removeData({field:"data",event:"data",triggerFnName:"trigger",triggerEvent:!0,immutableKeys:{id:!0,source:!0,target:!0,parent:!0},updateStyle:!0}),scratch:Fe.data({field:"scratch",bindingEvent:"scratch",allowBinding:!0,allowSetting:!0,settingEvent:"scratch",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeScratch:Fe.removeData({field:"scratch",event:"scratch",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0}),rscratch:Fe.data({field:"rscratch",allowBinding:!1,allowSetting:!0,settingTriggersEvent:!1,allowGetting:!0}),removeRscratch:Fe.removeData({field:"rscratch",triggerEvent:!1}),id:function(){var e=this[0];if(e)return e._private.data.id}};Ba.attr=Ba.data;Ba.removeAttr=Ba.removeData;var Gg=_v,_n={};function ps(r){return function(e){var t=this;if(e===void 0&&(e=!0),t.length!==0)if(t.isNode()&&!t.removed()){for(var a=0,n=t[0],i=n._private.edges,s=0;se}),minIndegree:Nt("indegree",function(r,e){return re}),minOutdegree:Nt("outdegree",function(r,e){return re})});be(_n,{totalDegree:function(e){for(var t=0,a=this.nodes(),n=0;n0,c=f;f&&(v=v[0]);var h=c?v.position():{x:0,y:0};t!==void 0?u.position(e,t+h[e]):i!==void 0&&u.position({x:i.x+h.x,y:i.y+h.y})}else{var d=a.position(),y=o?a.parent():null,g=y&&y.length>0,p=g;g&&(y=y[0]);var m=p?y.position():{x:0,y:0};return i={x:d.x-m.x,y:d.y-m.y},e===void 0?i:i[e]}else if(!s)return;return this}};Or.modelPosition=Or.point=Or.position;Or.modelPositions=Or.points=Or.positions;Or.renderedPoint=Or.renderedPosition;Or.relativePoint=Or.relativePosition;var Hg=Gv,Zt,pt;Zt=pt={};pt.renderedBoundingBox=function(r){var e=this.boundingBox(r),t=this.cy(),a=t.zoom(),n=t.pan(),i=e.x1*a+n.x,s=e.x2*a+n.x,o=e.y1*a+n.y,l=e.y2*a+n.y;return{x1:i,x2:s,y1:o,y2:l,w:s-i,h:l-o}};pt.dirtyCompoundBoundsCache=function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,e=this.cy();return!e.styleEnabled()||!e.hasCompoundNodes()?this:(this.forEachUp(function(t){if(t.isParent()){var a=t._private;a.compoundBoundsClean=!1,a.bbCache=null,r||t.emitAndNotify("bounds")}}),this)};pt.updateCompoundBounds=function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,e=this.cy();if(!e.styleEnabled()||!e.hasCompoundNodes())return this;if(!r&&e.batching())return this;function t(s){if(!s.isParent())return;var o=s._private,l=s.children(),u=s.pstyle("compound-sizing-wrt-labels").value==="include",v={width:{val:s.pstyle("min-width").pfValue,left:s.pstyle("min-width-bias-left"),right:s.pstyle("min-width-bias-right")},height:{val:s.pstyle("min-height").pfValue,top:s.pstyle("min-height-bias-top"),bottom:s.pstyle("min-height-bias-bottom")}},f=l.boundingBox({includeLabels:u,includeOverlays:!1,useCache:!1}),c=o.position;(f.w===0||f.h===0)&&(f={w:s.pstyle("width").pfValue,h:s.pstyle("height").pfValue},f.x1=c.x-f.w/2,f.x2=c.x+f.w/2,f.y1=c.y-f.h/2,f.y2=c.y+f.h/2);function h(k,D,B){var P=0,A=0,R=D+B;return k>0&&R>0&&(P=D/R*k,A=B/R*k),{biasDiff:P,biasComplementDiff:A}}function d(k,D,B,P){if(B.units==="%")switch(P){case"width":return k>0?B.pfValue*k:0;case"height":return D>0?B.pfValue*D:0;case"average":return k>0&&D>0?B.pfValue*(k+D)/2:0;case"min":return k>0&&D>0?k>D?B.pfValue*D:B.pfValue*k:0;case"max":return k>0&&D>0?k>D?B.pfValue*k:B.pfValue*D:0;default:return 0}else return B.units==="px"?B.pfValue:0}var y=v.width.left.value;v.width.left.units==="px"&&v.width.val>0&&(y=y*100/v.width.val);var g=v.width.right.value;v.width.right.units==="px"&&v.width.val>0&&(g=g*100/v.width.val);var p=v.height.top.value;v.height.top.units==="px"&&v.height.val>0&&(p=p*100/v.height.val);var m=v.height.bottom.value;v.height.bottom.units==="px"&&v.height.val>0&&(m=m*100/v.height.val);var b=h(v.width.val-f.w,y,g),w=b.biasDiff,E=b.biasComplementDiff,C=h(v.height.val-f.h,p,m),x=C.biasDiff,T=C.biasComplementDiff;o.autoPadding=d(f.w,f.h,s.pstyle("padding"),s.pstyle("padding-relative-to").value),o.autoWidth=Math.max(f.w,v.width.val),c.x=(-w+f.x1+f.x2+E)/2,o.autoHeight=Math.max(f.h,v.height.val),c.y=(-x+f.y1+f.y2+T)/2}for(var a=0;ae.x2?n:e.x2,e.y1=ae.y2?i:e.y2,e.w=e.x2-e.x1,e.h=e.y2-e.y1)},tt=function(e,t){return t==null?e:Ir(e,t.x1,t.y1,t.x2,t.y2)},fa=function(e,t,a){return Tr(e,t,a)},ja=function(e,t,a){if(!t.cy().headless()){var n=t._private,i=n.rstyle,s=i.arrowWidth/2,o=t.pstyle(a+"-arrow-shape").value,l,u;if(o!=="none"){a==="source"?(l=i.srcX,u=i.srcY):a==="target"?(l=i.tgtX,u=i.tgtY):(l=i.midX,u=i.midY);var v=n.arrowBounds=n.arrowBounds||{},f=v[a]=v[a]||{};f.x1=l-s,f.y1=u-s,f.x2=l+s,f.y2=u+s,f.w=f.x2-f.x1,f.h=f.y2-f.y1,un(f,1),Ir(e,f.x1,f.y1,f.x2,f.y2)}}},ys=function(e,t,a){if(!t.cy().headless()){var n;a?n=a+"-":n="";var i=t._private,s=i.rstyle,o=t.pstyle(n+"label").strValue;if(o){var l=t.pstyle("text-halign"),u=t.pstyle("text-valign"),v=fa(s,"labelWidth",a),f=fa(s,"labelHeight",a),c=fa(s,"labelX",a),h=fa(s,"labelY",a),d=t.pstyle(n+"text-margin-x").pfValue,y=t.pstyle(n+"text-margin-y").pfValue,g=t.isEdge(),p=t.pstyle(n+"text-rotation"),m=t.pstyle("text-outline-width").pfValue,b=t.pstyle("text-border-width").pfValue,w=b/2,E=t.pstyle("text-background-padding").pfValue,C=2,x=f,T=v,k=T/2,D=x/2,B,P,A,R;if(g)B=c-k,P=c+k,A=h-D,R=h+D;else{switch(l.value){case"left":B=c-T,P=c;break;case"center":B=c-k,P=c+k;break;case"right":B=c,P=c+T;break}switch(u.value){case"top":A=h-x,R=h;break;case"center":A=h-D,R=h+D;break;case"bottom":A=h,R=h+x;break}}var L=d-Math.max(m,w)-E-C,I=d+Math.max(m,w)+E+C,M=y-Math.max(m,w)-E-C,O=y+Math.max(m,w)+E+C;B+=L,P+=I,A+=M,R+=O;var V=a||"main",G=i.labelBounds,N=G[V]=G[V]||{};N.x1=B,N.y1=A,N.x2=P,N.y2=R,N.w=P-B,N.h=R-A,N.leftPad=L,N.rightPad=I,N.topPad=M,N.botPad=O;var F=g&&p.strValue==="autorotate",U=p.pfValue!=null&&p.pfValue!==0;if(F||U){var Q=F?fa(i.rstyle,"labelAngle",a):p.pfValue,K=Math.cos(Q),j=Math.sin(Q),re=(B+P)/2,ne=(A+R)/2;if(!g){switch(l.value){case"left":re=P;break;case"right":re=B;break}switch(u.value){case"top":ne=R;break;case"bottom":ne=A;break}}var J=function(Ce,we){return Ce=Ce-re,we=we-ne,{x:Ce*K-we*j+re,y:Ce*j+we*K+ne}},z=J(B,A),q=J(B,R),H=J(P,A),Y=J(P,R);B=Math.min(z.x,q.x,H.x,Y.x),P=Math.max(z.x,q.x,H.x,Y.x),A=Math.min(z.y,q.y,H.y,Y.y),R=Math.max(z.y,q.y,H.y,Y.y)}var te=V+"Rot",ce=G[te]=G[te]||{};ce.x1=B,ce.y1=A,ce.x2=P,ce.y2=R,ce.w=P-B,ce.h=R-A,Ir(e,B,A,P,R),Ir(i.labelBounds.all,B,A,P,R)}return e}},ol=function(e,t){if(!t.cy().headless()){var a=t.pstyle("outline-opacity").value,n=t.pstyle("outline-width").value,i=t.pstyle("outline-offset").value,s=n+i;Wv(e,t,a,s,"outside",s/2)}},Wv=function(e,t,a,n,i,s){if(!(a===0||n<=0||i==="inside")){var o=t.cy(),l=t.pstyle("shape").value,u=o.renderer().nodeShapes[l],v=t.position(),f=v.x,c=v.y,h=t.width(),d=t.height();if(u.hasMiterBounds){i==="center"&&(n/=2);var y=u.miterBounds(f,c,h,d,n);tt(e,y)}else s!=null&&s>0&&ln(e,[s,s,s,s])}},Wg=function(e,t){if(!t.cy().headless()){var a=t.pstyle("border-opacity").value,n=t.pstyle("border-width").pfValue,i=t.pstyle("border-position").value;Wv(e,t,a,n,i)}},$g=function(e,t){var a=e._private.cy,n=a.styleEnabled(),i=a.headless(),s=wr(),o=e._private,l=e.isNode(),u=e.isEdge(),v,f,c,h,d,y,g=o.rstyle,p=l&&n?e.pstyle("bounds-expansion").pfValue:[0],m=function(Ae){return Ae.pstyle("display").value!=="none"},b=!n||m(e)&&(!u||m(e.source())&&m(e.target()));if(b){var w=0,E=0;n&&t.includeOverlays&&(w=e.pstyle("overlay-opacity").value,w!==0&&(E=e.pstyle("overlay-padding").value));var C=0,x=0;n&&t.includeUnderlays&&(C=e.pstyle("underlay-opacity").value,C!==0&&(x=e.pstyle("underlay-padding").value));var T=Math.max(E,x),k=0,D=0;if(n&&(k=e.pstyle("width").pfValue,D=k/2),l&&t.includeNodes){var B=e.position();d=B.x,y=B.y;var P=e.outerWidth(),A=P/2,R=e.outerHeight(),L=R/2;v=d-A,f=d+A,c=y-L,h=y+L,Ir(s,v,c,f,h),n&&ol(s,e),n&&t.includeOutlines&&!i&&ol(s,e),n&&Wg(s,e)}else if(u&&t.includeEdges)if(n&&!i){var I=e.pstyle("curve-style").strValue;if(v=Math.min(g.srcX,g.midX,g.tgtX),f=Math.max(g.srcX,g.midX,g.tgtX),c=Math.min(g.srcY,g.midY,g.tgtY),h=Math.max(g.srcY,g.midY,g.tgtY),v-=D,f+=D,c-=D,h+=D,Ir(s,v,c,f,h),I==="haystack"){var M=g.haystackPts;if(M&&M.length===2){if(v=M[0].x,c=M[0].y,f=M[1].x,h=M[1].y,v>f){var O=v;v=f,f=O}if(c>h){var V=c;c=h,h=V}Ir(s,v-D,c-D,f+D,h+D)}}else if(I==="bezier"||I==="unbundled-bezier"||at(I,"segments")||at(I,"taxi")){var G;switch(I){case"bezier":case"unbundled-bezier":G=g.bezierPts;break;case"segments":case"taxi":case"round-segments":case"round-taxi":G=g.linePts;break}if(G!=null)for(var N=0;Nf){var re=v;v=f,f=re}if(c>h){var ne=c;c=h,h=ne}v-=D,f+=D,c-=D,h+=D,Ir(s,v,c,f,h)}if(n&&t.includeEdges&&u&&(ja(s,e,"mid-source"),ja(s,e,"mid-target"),ja(s,e,"source"),ja(s,e,"target")),n){var J=e.pstyle("ghost").value==="yes";if(J){var z=e.pstyle("ghost-offset-x").pfValue,q=e.pstyle("ghost-offset-y").pfValue;Ir(s,s.x1+z,s.y1+q,s.x2+z,s.y2+q)}}var H=o.bodyBounds=o.bodyBounds||{};Uo(H,s),ln(H,p),un(H,1),n&&(v=s.x1,f=s.x2,c=s.y1,h=s.y2,Ir(s,v-T,c-T,f+T,h+T));var Y=o.overlayBounds=o.overlayBounds||{};Uo(Y,s),ln(Y,p),un(Y,1);var te=o.labelBounds=o.labelBounds||{};te.all!=null?kd(te.all):te.all=wr(),n&&t.includeLabels&&(t.includeMainLabels&&ys(s,e,null),u&&(t.includeSourceLabels&&ys(s,e,"source"),t.includeTargetLabels&&ys(s,e,"target")))}return s.x1=Ar(s.x1),s.y1=Ar(s.y1),s.x2=Ar(s.x2),s.y2=Ar(s.y2),s.w=Ar(s.x2-s.x1),s.h=Ar(s.y2-s.y1),s.w>0&&s.h>0&&b&&(ln(s,p),un(s,1)),s},$v=function(e){var t=0,a=function(s){return(s?1:0)<0&&arguments[0]!==void 0?arguments[0]:sp,e=arguments.length>1?arguments[1]:void 0,t=0;t=0;o--)s(o);return this};dt.removeAllListeners=function(){return this.removeListener("*")};dt.emit=dt.trigger=function(r,e,t){var a=this.listeners,n=a.length;return this.emitting++,_e(e)||(e=[e]),op(this,function(i,s){t!=null&&(a=[{event:s.event,type:s.type,namespace:s.namespace,callback:t}],n=a.length);for(var o=function(){var v=a[l];if(v.type===s.type&&(!v.namespace||v.namespace===s.namespace||v.namespace===ip)&&i.eventMatches(i.context,v,s)){var f=[s];e!=null&&Qc(f,e),i.beforeEmit(i.context,v,s),v.conf&&v.conf.one&&(i.listeners=i.listeners.filter(function(d){return d!==v}));var c=i.callbackContext(i.context,v,s),h=v.callback.apply(c,f);i.afterEmit(i.context,v,s),h===!1&&(s.stopPropagation(),s.preventDefault())}},l=0;l1&&!s){var o=this.length-1,l=this[o],u=l._private.data.id;this[o]=void 0,this[e]=l,i.set(u,{ele:l,index:e})}return this.length--,this},unmergeOne:function(e){e=e[0];var t=this._private,a=e._private.data.id,n=t.map,i=n.get(a);if(!i)return this;var s=i.index;return this.unmergeAt(s),this},unmerge:function(e){var t=this._private.cy;if(!e)return this;if(e&&ge(e)){var a=e;e=t.mutableElements().filter(a)}for(var n=0;n=0;t--){var a=this[t];e(a)&&this.unmergeAt(t)}return this},map:function(e,t){for(var a=[],n=this,i=0;ia&&(a=l,n=o)}return{value:a,ele:n}},min:function(e,t){for(var a=1/0,n,i=this,s=0;s=0&&i"u"?"undefined":ar(Symbol))!=e&&ar(Symbol.iterator)!=e;t&&(Sn[Symbol.iterator]=function(){var a=this,n={value:void 0,done:!1},i=0,s=this.length;return Jl({next:function(){return i1&&arguments[1]!==void 0?arguments[1]:!0,a=this[0],n=a.cy();if(n.styleEnabled()&&a){a._private.styleDirty&&(a._private.styleDirty=!1,n.style().apply(a));var i=a._private.style[e];return i??(t?n.style().getDefaultProperty(e):null)}},numericStyle:function(e){var t=this[0];if(t.cy().styleEnabled()&&t){var a=t.pstyle(e);return a.pfValue!==void 0?a.pfValue:a.value}},numericStyleUnits:function(e){var t=this[0];if(t.cy().styleEnabled()&&t)return t.pstyle(e).units},renderedStyle:function(e){var t=this.cy();if(!t.styleEnabled())return this;var a=this[0];if(a)return t.style().getRenderedStyle(a,e)},style:function(e,t){var a=this.cy();if(!a.styleEnabled())return this;var n=!1,i=a.style();if(Le(e)){var s=e;i.applyBypass(this,s,n),this.emitAndNotify("style")}else if(ge(e))if(t===void 0){var o=this[0];return o?i.getStylePropertyValue(o,e):void 0}else i.applyBypass(this,e,t,n),this.emitAndNotify("style");else if(e===void 0){var l=this[0];return l?i.getRawStyle(l):void 0}return this},removeStyle:function(e){var t=this.cy();if(!t.styleEnabled())return this;var a=!1,n=t.style(),i=this;if(e===void 0)for(var s=0;s0&&e.push(v[0]),e.push(o[0])}return this.spawn(e,!0).filter(r)},"neighborhood"),closedNeighborhood:function(e){return this.neighborhood().add(this).filter(e)},openNeighborhood:function(e){return this.neighborhood(e)}});gr.neighbourhood=gr.neighborhood;gr.closedNeighbourhood=gr.closedNeighborhood;gr.openNeighbourhood=gr.openNeighborhood;be(gr,{source:Rr(function(e){var t=this[0],a;return t&&(a=t._private.source||t.cy().collection()),a&&e?a.filter(e):a},"source"),target:Rr(function(e){var t=this[0],a;return t&&(a=t._private.target||t.cy().collection()),a&&e?a.filter(e):a},"target"),sources:ml({attr:"source"}),targets:ml({attr:"target"})});function ml(r){return function(t){for(var a=[],n=0;n0);return s},component:function(){var e=this[0];return e.cy().mutableElements().components(e)[0]}});gr.componentsOf=gr.components;var fr=function(e,t){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(e===void 0){$e("A collection must have a reference to the core");return}var i=new Xr,s=!1;if(!t)t=[];else if(t.length>0&&Le(t[0])&&!Ia(t[0])){s=!0;for(var o=[],l=new ra,u=0,v=t.length;u0&&arguments[0]!==void 0?arguments[0]:!0,e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,t=this,a=t.cy(),n=a._private,i=[],s=[],o,l=0,u=t.length;l0){for(var V=o.length===t.length?t:new fr(a,o),G=0;G0&&arguments[0]!==void 0?arguments[0]:!0,e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,t=this,a=[],n={},i=t._private.cy;function s(R){for(var L=R._private.edges,I=0;I0&&(r?B.emitAndNotify("remove"):e&&B.emit("remove"));for(var P=0;P0?P=R:B=R;while(Math.abs(A)>s&&++L=i?m(D,L):I===0?L:w(D,B,B+u)}var C=!1;function x(){C=!0,(r!==e||t!==a)&&b()}var T=function(B){return C||x(),r===e&&t===a?B:B===0?0:B===1?1:g(E(B),e,a)};T.getControlPoints=function(){return[{x:r,y:e},{x:t,y:a}]};var k="generateBezier("+[r,e,t,a]+")";return T.toString=function(){return k},T}/*! Runge-Kutta spring physics function generator. Adapted from Framer.js, copyright Koen Bok. MIT License: http://en.wikipedia.org/wiki/MIT_License */var mp=(function(){function r(a){return-a.tension*a.x-a.friction*a.v}function e(a,n,i){var s={x:a.x+i.dx*n,v:a.v+i.dv*n,tension:a.tension,friction:a.friction};return{dx:s.v,dv:r(s)}}function t(a,n){var i={dx:a.v,dv:r(a)},s=e(a,n*.5,i),o=e(a,n*.5,s),l=e(a,n,o),u=1/6*(i.dx+2*(s.dx+o.dx)+l.dx),v=1/6*(i.dv+2*(s.dv+o.dv)+l.dv);return a.x=a.x+u*n,a.v=a.v+v*n,a}return function a(n,i,s){var o={x:-1,v:0,tension:null,friction:null},l=[0],u=0,v=1/1e4,f=16/1e3,c,h,d;for(n=parseFloat(n)||500,i=parseFloat(i)||20,s=s||null,o.tension=n,o.friction=i,c=s!==null,c?(u=a(n,i),h=u/s*f):h=f;d=t(d||o,h),l.push(1+d.x),u+=16,Math.abs(d.x)>v&&Math.abs(d.v)>v;);return c?function(y){return l[y*(l.length-1)|0]}:u}})(),Ge=function(e,t,a,n){var i=yp(e,t,a,n);return function(s,o,l){return s+(o-s)*i(l)}},cn={linear:function(e,t,a){return e+(t-e)*a},ease:Ge(.25,.1,.25,1),"ease-in":Ge(.42,0,1,1),"ease-out":Ge(0,0,.58,1),"ease-in-out":Ge(.42,0,.58,1),"ease-in-sine":Ge(.47,0,.745,.715),"ease-out-sine":Ge(.39,.575,.565,1),"ease-in-out-sine":Ge(.445,.05,.55,.95),"ease-in-quad":Ge(.55,.085,.68,.53),"ease-out-quad":Ge(.25,.46,.45,.94),"ease-in-out-quad":Ge(.455,.03,.515,.955),"ease-in-cubic":Ge(.55,.055,.675,.19),"ease-out-cubic":Ge(.215,.61,.355,1),"ease-in-out-cubic":Ge(.645,.045,.355,1),"ease-in-quart":Ge(.895,.03,.685,.22),"ease-out-quart":Ge(.165,.84,.44,1),"ease-in-out-quart":Ge(.77,0,.175,1),"ease-in-quint":Ge(.755,.05,.855,.06),"ease-out-quint":Ge(.23,1,.32,1),"ease-in-out-quint":Ge(.86,0,.07,1),"ease-in-expo":Ge(.95,.05,.795,.035),"ease-out-expo":Ge(.19,1,.22,1),"ease-in-out-expo":Ge(1,0,0,1),"ease-in-circ":Ge(.6,.04,.98,.335),"ease-out-circ":Ge(.075,.82,.165,1),"ease-in-out-circ":Ge(.785,.135,.15,.86),spring:function(e,t,a){if(a===0)return cn.linear;var n=mp(e,t,a);return function(i,s,o){return i+(s-i)*n(o)}},"cubic-bezier":Ge};function xl(r,e,t,a,n){if(a===1||e===t)return t;var i=n(e,t,a);return r==null||((r.roundValue||r.color)&&(i=Math.round(i)),r.min!==void 0&&(i=Math.max(i,r.min)),r.max!==void 0&&(i=Math.min(i,r.max))),i}function El(r,e){return r.pfValue!=null||r.value!=null?r.pfValue!=null&&(e==null||e.type.units!=="%")?r.pfValue:r.value:r}function zt(r,e,t,a,n){var i=n!=null?n.type:null;t<0?t=0:t>1&&(t=1);var s=El(r,n),o=El(e,n);if(ae(s)&&ae(o))return xl(i,s,o,t,a);if(_e(s)&&_e(o)){for(var l=[],u=0;u0?(h==="spring"&&d.push(s.duration),s.easingImpl=cn[h].apply(null,d)):s.easingImpl=cn[h]}var y=s.easingImpl,g;if(s.duration===0?g=1:g=(t-l)/s.duration,s.applying&&(g=s.progress),g<0?g=0:g>1&&(g=1),s.delay==null){var p=s.startPosition,m=s.position;if(m&&n&&!r.locked()){var b={};da(p.x,m.x)&&(b.x=zt(p.x,m.x,g,y)),da(p.y,m.y)&&(b.y=zt(p.y,m.y,g,y)),r.position(b)}var w=s.startPan,E=s.pan,C=i.pan,x=E!=null&&a;x&&(da(w.x,E.x)&&(C.x=zt(w.x,E.x,g,y)),da(w.y,E.y)&&(C.y=zt(w.y,E.y,g,y)),r.emit("pan"));var T=s.startZoom,k=s.zoom,D=k!=null&&a;D&&(da(T,k)&&(i.zoom=ka(i.minZoom,zt(T,k,g,y),i.maxZoom)),r.emit("zoom")),(x||D)&&r.emit("viewport");var B=s.style;if(B&&B.length>0&&n){for(var P=0;P=0;x--){var T=C[x];T()}C.splice(0,C.length)},m=h.length-1;m>=0;m--){var b=h[m],w=b._private;if(w.stopped){h.splice(m,1),w.hooked=!1,w.playing=!1,w.started=!1,p(w.frames);continue}!w.playing&&!w.applying||(w.playing&&w.applying&&(w.applying=!1),w.started||wp(v,b,r),bp(v,b,r,f),w.applying&&(w.applying=!1),p(w.frames),w.step!=null&&w.step(r),b.completed()&&(h.splice(m,1),w.hooked=!1,w.playing=!1,w.started=!1,p(w.completes)),y=!0)}return!f&&h.length===0&&d.length===0&&a.push(v),y}for(var i=!1,s=0;s0?e.notify("draw",t):e.notify("draw")),t.unmerge(a),e.emit("step")}var xp={animate:Fe.animate(),animation:Fe.animation(),animated:Fe.animated(),clearQueue:Fe.clearQueue(),delay:Fe.delay(),delayAnimation:Fe.delayAnimation(),stop:Fe.stop(),addToAnimationPool:function(e){var t=this;t.styleEnabled()&&t._private.aniEles.merge(e)},stopAnimationLoop:function(){this._private.animationsRunning=!1},startAnimationLoop:function(){var e=this;if(e._private.animationsRunning=!0,!e.styleEnabled())return;function t(){e._private.animationsRunning&&wn(function(i){Cl(i,e),t()})}var a=e.renderer();a&&a.beforeRender?a.beforeRender(function(i,s){Cl(s,e)},a.beforeRenderPriorities.animations):t()}},Ep={qualifierCompare:function(e,t){return e==null||t==null?e==null&&t==null:e.sameText(t)},eventMatches:function(e,t,a){var n=t.qualifier;return n!=null?e!==a.target&&Ia(a.target)&&n.matches(a.target):!0},addEventFields:function(e,t){t.cy=e,t.target=e},callbackContext:function(e,t,a){return t.qualifier!=null?a.target:e}},tn=function(e){return ge(e)?new ft(e):e},tf={createEmitter:function(){var e=this._private;return e.emitter||(e.emitter=new Gn(Ep,this)),this},emitter:function(){return this._private.emitter},on:function(e,t,a){return this.emitter().on(e,tn(t),a),this},removeListener:function(e,t,a){return this.emitter().removeListener(e,tn(t),a),this},removeAllListeners:function(){return this.emitter().removeAllListeners(),this},one:function(e,t,a){return this.emitter().one(e,tn(t),a),this},once:function(e,t,a){return this.emitter().one(e,tn(t),a),this},emit:function(e,t){return this.emitter().emit(e,t),this},emitAndNotify:function(e,t){return this.emit(e),this.notify(e,t),this}};Fe.eventAliasesOn(tf);var zs={png:function(e){var t=this._private.renderer;return e=e||{},t.png(e)},jpg:function(e){var t=this._private.renderer;return e=e||{},e.bg=e.bg||"#fff",t.jpg(e)}};zs.jpeg=zs.jpg;var dn={layout:function(e){var t=this;if(e==null){$e("Layout options must be specified to make a layout");return}if(e.name==null){$e("A `name` must be specified to make a layout");return}var a=e.name,n=t.extension("layout",a);if(n==null){$e("No such layout `"+a+"` found. Did you forget to import it and `cytoscape.use()` it?");return}var i;ge(e.eles)?i=t.$(e.eles):i=e.eles!=null?e.eles:t.$();var s=new n(be({},e,{cy:t,eles:i}));return s}};dn.createLayout=dn.makeLayout=dn.layout;var Cp={notify:function(e,t){var a=this._private;if(this.batching()){a.batchNotifications=a.batchNotifications||{};var n=a.batchNotifications[e]=a.batchNotifications[e]||this.collection();t!=null&&n.merge(t);return}if(a.notificationsEnabled){var i=this.renderer();this.destroyed()||!i||i.notify(e,t)}},notifications:function(e){var t=this._private;return e===void 0?t.notificationsEnabled:(t.notificationsEnabled=!!e,this)},noNotifications:function(e){this.notifications(!1),e(),this.notifications(!0)},batching:function(){return this._private.batchCount>0},startBatch:function(){var e=this._private;return e.batchCount==null&&(e.batchCount=0),e.batchCount===0&&(e.batchStyleEles=this.collection(),e.batchNotifications={}),e.batchCount++,this},endBatch:function(){var e=this._private;if(e.batchCount===0)return this;if(e.batchCount--,e.batchCount===0){e.batchStyleEles.updateStyle();var t=this.renderer();Object.keys(e.batchNotifications).forEach(function(a){var n=e.batchNotifications[a];n.empty()?t.notify(a):t.notify(a,n)})}return this},batch:function(e){return this.startBatch(),e(),this.endBatch(),this},batchData:function(e){var t=this;return this.batch(function(){for(var a=Object.keys(e),n=0;n0;)t.removeChild(t.childNodes[0]);e._private.renderer=null,e.mutableElements().forEach(function(a){var n=a._private;n.rscratch={},n.rstyle={},n.animation.current=[],n.animation.queue=[]})},onRender:function(e){return this.on("render",e)},offRender:function(e){return this.off("render",e)}};Fs.invalidateDimensions=Fs.resize;var hn={collection:function(e,t){return ge(e)?this.$(e):Dr(e)?e.collection():_e(e)?(t||(t={}),new fr(this,e,t.unique,t.removed)):new fr(this)},nodes:function(e){var t=this.$(function(a){return a.isNode()});return e?t.filter(e):t},edges:function(e){var t=this.$(function(a){return a.isEdge()});return e?t.filter(e):t},$:function(e){var t=this._private.elements;return e?t.filter(e):t.spawnSelf()},mutableElements:function(){return this._private.elements}};hn.elements=hn.filter=hn.$;var ur={},wa="t",Sp="f";ur.apply=function(r){for(var e=this,t=e._private,a=t.cy,n=a.collection(),i=0;i0;if(c||f&&h){var d=void 0;c&&h||c?d=u.properties:h&&(d=u.mappedProperties);for(var y=0;y1&&(w=1),o.color){var C=a.valueMin[0],x=a.valueMax[0],T=a.valueMin[1],k=a.valueMax[1],D=a.valueMin[2],B=a.valueMax[2],P=a.valueMin[3]==null?1:a.valueMin[3],A=a.valueMax[3]==null?1:a.valueMax[3],R=[Math.round(C+(x-C)*w),Math.round(T+(k-T)*w),Math.round(D+(B-D)*w),Math.round(P+(A-P)*w)];i={bypass:a.bypass,name:a.name,value:R,strValue:"rgb("+R[0]+", "+R[1]+", "+R[2]+")"}}else if(o.number){var L=a.valueMin+(a.valueMax-a.valueMin)*w;i=this.parse(a.name,L,a.bypass,c)}else return!1;if(!i)return y(),!1;i.mapping=a,a=i;break}case s.data:{for(var I=a.field.split("."),M=f.data,O=0;O0&&i>0){for(var o={},l=!1,u=0;u0?r.delayAnimation(s).play().promise().then(b):b()}).then(function(){return r.animation({style:o,duration:i,easing:r.pstyle("transition-timing-function").value,queue:!1}).play().promise()}).then(function(){t.removeBypasses(r,n),r.emitAndNotify("style"),a.transitioning=!1})}else a.transitioning&&(this.removeBypasses(r,n),r.emitAndNotify("style"),a.transitioning=!1)};ur.checkTrigger=function(r,e,t,a,n,i){var s=this.properties[e],o=n(s);r.removed()||o!=null&&o(t,a,r)&&i(s)};ur.checkZOrderTrigger=function(r,e,t,a){var n=this;this.checkTrigger(r,e,t,a,function(i){return i.triggersZOrder},function(){n._private.cy.notify("zorder",r)})};ur.checkBoundsTrigger=function(r,e,t,a){this.checkTrigger(r,e,t,a,function(n){return n.triggersBounds},function(n){r.dirtyCompoundBoundsCache(),r.dirtyBoundingBoxCache()})};ur.checkConnectedEdgesBoundsTrigger=function(r,e,t,a){this.checkTrigger(r,e,t,a,function(n){return n.triggersBoundsOfConnectedEdges},function(n){r.connectedEdges().forEach(function(i){i.dirtyBoundingBoxCache()})})};ur.checkParallelEdgesBoundsTrigger=function(r,e,t,a){this.checkTrigger(r,e,t,a,function(n){return n.triggersBoundsOfParallelEdges},function(n){r.parallelEdges().forEach(function(i){i.dirtyBoundingBoxCache()})})};ur.checkTriggers=function(r,e,t,a){r.dirtyStyleCache(),this.checkZOrderTrigger(r,e,t,a),this.checkBoundsTrigger(r,e,t,a),this.checkConnectedEdgesBoundsTrigger(r,e,t,a),this.checkParallelEdgesBoundsTrigger(r,e,t,a)};var _a={};_a.applyBypass=function(r,e,t,a){var n=this,i=[],s=!0;if(e==="*"||e==="**"){if(t!==void 0)for(var o=0;on.length?a=a.substr(n.length):a=""}function l(){i.length>s.length?i=i.substr(s.length):i=""}for(;;){var u=a.match(/^\s*$/);if(u)break;var v=a.match(/^\s*((?:.|\s)+?)\s*\{((?:.|\s)+?)\}/);if(!v){Ve("Halting stylesheet parsing: String stylesheet contains more to parse but no selector and block found in: "+a);break}n=v[0];var f=v[1];if(f!=="core"){var c=new ft(f);if(c.invalid){Ve("Skipping parsing of block: Invalid selector found in string stylesheet: "+f),o();continue}}var h=v[2],d=!1;i=h;for(var y=[];;){var g=i.match(/^\s*$/);if(g)break;var p=i.match(/^\s*(.+?)\s*:\s*(.+?)(?:\s*;|\s*$)/);if(!p){Ve("Skipping parsing of block: Invalid formatting of style property and value definitions found in:"+h),d=!0;break}s=p[0];var m=p[1],b=p[2],w=e.properties[m];if(!w){Ve("Skipping property: Invalid property name in: "+s),l();continue}var E=t.parse(m,b);if(!E){Ve("Skipping property: Invalid property definition in: "+s),l();continue}y.push({name:m,val:b}),l()}if(d){o();break}t.selector(f);for(var C=0;C=7&&e[0]==="d"&&(v=new RegExp(o.data.regex).exec(e))){if(t)return!1;var c=o.data;return{name:r,value:v,strValue:""+e,mapped:c,field:v[1],bypass:t}}else if(e.length>=10&&e[0]==="m"&&(f=new RegExp(o.mapData.regex).exec(e))){if(t||u.multiple)return!1;var h=o.mapData;if(!(u.color||u.number))return!1;var d=this.parse(r,f[4]);if(!d||d.mapped)return!1;var y=this.parse(r,f[5]);if(!y||y.mapped)return!1;if(d.pfValue===y.pfValue||d.strValue===y.strValue)return Ve("`"+r+": "+e+"` is not a valid mapper because the output range is zero; converting to `"+r+": "+d.strValue+"`"),this.parse(r,d.strValue);if(u.color){var g=d.value,p=y.value,m=g[0]===p[0]&&g[1]===p[1]&&g[2]===p[2]&&(g[3]===p[3]||(g[3]==null||g[3]===1)&&(p[3]==null||p[3]===1));if(m)return!1}return{name:r,value:f,strValue:""+e,mapped:h,field:f[1],fieldMin:parseFloat(f[2]),fieldMax:parseFloat(f[3]),valueMin:d.value,valueMax:y.value,bypass:t}}}if(u.multiple&&a!=="multiple"){var b;if(l?b=e.split(/\s+/):_e(e)?b=e:b=[e],u.evenMultiple&&b.length%2!==0)return null;for(var w=[],E=[],C=[],x="",T=!1,k=0;k0?" ":"")+D.strValue}return u.validate&&!u.validate(w,E)?null:u.singleEnum&&T?w.length===1&&ge(w[0])?{name:r,value:w[0],strValue:w[0],bypass:t}:null:{name:r,value:w,pfValue:C,strValue:x,bypass:t,units:E}}var B=function(){for(var J=0;Ju.max||u.strictMax&&e===u.max))return null;var I={name:r,value:e,strValue:""+e+(P||""),units:P,bypass:t};return u.unitless||P!=="px"&&P!=="em"?I.pfValue=e:I.pfValue=P==="px"||!P?e:this.getEmSizeInPixels()*e,(P==="ms"||P==="s")&&(I.pfValue=P==="ms"?e:1e3*e),(P==="deg"||P==="rad")&&(I.pfValue=P==="rad"?e:Ed(e)),P==="%"&&(I.pfValue=e/100),I}else if(u.propList){var M=[],O=""+e;if(O!=="none"){for(var V=O.split(/\s*,\s*|\s+/),G=0;G0&&o>0&&!isNaN(a.w)&&!isNaN(a.h)&&a.w>0&&a.h>0){l=Math.min((s-2*t)/a.w,(o-2*t)/a.h),l=l>this._private.maxZoom?this._private.maxZoom:l,l=l=a.minZoom&&(a.maxZoom=t),this},minZoom:function(e){return e===void 0?this._private.minZoom:this.zoomRange({min:e})},maxZoom:function(e){return e===void 0?this._private.maxZoom:this.zoomRange({max:e})},getZoomedViewport:function(e){var t=this._private,a=t.pan,n=t.zoom,i,s,o=!1;if(t.zoomingEnabled||(o=!0),ae(e)?s=e:Le(e)&&(s=e.level,e.position!=null?i=On(e.position,n,a):e.renderedPosition!=null&&(i=e.renderedPosition),i!=null&&!t.panningEnabled&&(o=!0)),s=s>t.maxZoom?t.maxZoom:s,s=st.maxZoom||!t.zoomingEnabled?s=!0:(t.zoom=l,i.push("zoom"))}if(n&&(!s||!e.cancelOnFailedZoom)&&t.panningEnabled){var u=e.pan;ae(u.x)&&(t.pan.x=u.x,o=!1),ae(u.y)&&(t.pan.y=u.y,o=!1),o||i.push("pan")}return i.length>0&&(i.push("viewport"),this.emit(i.join(" ")),this.notify("viewport")),this},center:function(e){var t=this.getCenterPan(e);return t&&(this._private.pan=t,this.emit("pan viewport"),this.notify("viewport")),this},getCenterPan:function(e,t){if(this._private.panningEnabled){if(ge(e)){var a=e;e=this.mutableElements().filter(a)}else Dr(e)||(e=this.mutableElements());if(e.length!==0){var n=e.boundingBox(),i=this.width(),s=this.height();t=t===void 0?this._private.zoom:t;var o={x:(i-t*(n.x1+n.x2))/2,y:(s-t*(n.y1+n.y2))/2};return o}}},reset:function(){return!this._private.panningEnabled||!this._private.zoomingEnabled?this:(this.viewport({pan:{x:0,y:0},zoom:1}),this)},invalidateSize:function(){this._private.sizeCache=null},size:function(){var e=this._private,t=e.container,a=this;return e.sizeCache=e.sizeCache||(t?(function(){var n=a.window().getComputedStyle(t),i=function(o){return parseFloat(n.getPropertyValue(o))};return{width:t.clientWidth-i("padding-left")-i("padding-right"),height:t.clientHeight-i("padding-top")-i("padding-bottom")}})():{width:1,height:1})},width:function(){return this.size().width},height:function(){return this.size().height},extent:function(){var e=this._private.pan,t=this._private.zoom,a=this.renderedExtent(),n={x1:(a.x1-e.x)/t,x2:(a.x2-e.x)/t,y1:(a.y1-e.y)/t,y2:(a.y2-e.y)/t};return n.w=n.x2-n.x1,n.h=n.y2-n.y1,n},renderedExtent:function(){var e=this.width(),t=this.height();return{x1:0,y1:0,x2:e,y2:t,w:e,h:t}},multiClickDebounceTime:function(e){if(e)this._private.multiClickDebounceTime=e;else return this._private.multiClickDebounceTime;return this}};At.centre=At.center;At.autolockNodes=At.autolock;At.autoungrabifyNodes=At.autoungrabify;var Aa={data:Fe.data({field:"data",bindingEvent:"data",allowBinding:!0,allowSetting:!0,settingEvent:"data",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeData:Fe.removeData({field:"data",event:"data",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0}),scratch:Fe.data({field:"scratch",bindingEvent:"scratch",allowBinding:!0,allowSetting:!0,settingEvent:"scratch",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeScratch:Fe.removeData({field:"scratch",event:"scratch",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0})};Aa.attr=Aa.data;Aa.removeAttr=Aa.removeData;var Ra=function(e){var t=this;e=be({},e);var a=e.container;a&&!bn(a)&&bn(a[0])&&(a=a[0]);var n=a?a._cyreg:null;n=n||{},n&&n.cy&&(n.cy.destroy(),n={});var i=n.readies=n.readies||[];a&&(a._cyreg=n),n.cy=t;var s=rr!==void 0&&a!==void 0&&!e.headless,o=e;o.layout=be({name:s?"grid":"null"},o.layout),o.renderer=be({name:s?"canvas":"null"},o.renderer);var l=function(d,y,g){return y!==void 0?y:g!==void 0?g:d},u=this._private={container:a,ready:!1,options:o,elements:new fr(this),listeners:[],aniEles:new fr(this),data:o.data||{},scratch:{},layout:null,renderer:null,destroyed:!1,notificationsEnabled:!0,minZoom:1e-50,maxZoom:1e50,zoomingEnabled:l(!0,o.zoomingEnabled),userZoomingEnabled:l(!0,o.userZoomingEnabled),panningEnabled:l(!0,o.panningEnabled),userPanningEnabled:l(!0,o.userPanningEnabled),boxSelectionEnabled:l(!0,o.boxSelectionEnabled),autolock:l(!1,o.autolock,o.autolockNodes),autoungrabify:l(!1,o.autoungrabify,o.autoungrabifyNodes),autounselectify:l(!1,o.autounselectify),styleEnabled:o.styleEnabled===void 0?s:o.styleEnabled,zoom:ae(o.zoom)?o.zoom:1,pan:{x:Le(o.pan)&&ae(o.pan.x)?o.pan.x:0,y:Le(o.pan)&&ae(o.pan.y)?o.pan.y:0},animation:{current:[],queue:[]},hasCompoundNodes:!1,multiClickDebounceTime:l(250,o.multiClickDebounceTime)};this.createEmitter(),this.selectionType(o.selectionType),this.zoomRange({min:o.minZoom,max:o.maxZoom});var v=function(d,y){var g=d.some(pc);if(g)return ta.all(d).then(y);y(d)};u.styleEnabled&&t.setStyle([]);var f=be({},o,o.renderer);t.initRenderer(f);var c=function(d,y,g){t.notifications(!1);var p=t.mutableElements();p.length>0&&p.remove(),d!=null&&(Le(d)||_e(d))&&t.add(d),t.one("layoutready",function(b){t.notifications(!0),t.emit(b),t.one("load",y),t.emitAndNotify("load")}).one("layoutstop",function(){t.one("done",g),t.emit("done")});var m=be({},t._private.options.layout);m.eles=t.elements(),t.layout(m).run()};v([o.style,o.elements],function(h){var d=h[0],y=h[1];u.styleEnabled&&t.style().append(d),c(y,function(){t.startAnimationLoop(),u.ready=!0,Ue(o.ready)&&t.on("ready",o.ready);for(var g=0;g0,o=!!r.boundingBox,l=wr(o?r.boundingBox:structuredClone(e.extent())),u;if(Dr(r.roots))u=r.roots;else if(_e(r.roots)){for(var v=[],f=0;f0;){var R=A(),L=k(R,B);if(L)R.outgoers().filter(function(ye){return ye.isNode()&&t.has(ye)}).forEach(P);else if(L===null){Ve("Detected double maximal shift for node `"+R.id()+"`. Bailing maximal adjustment due to cycle. Use `options.maximal: true` only on DAGs.");break}}}var I=0;if(r.avoidOverlap)for(var M=0;M0&&p[0].length<=3?pe/2:0),Re=2*Math.PI/p[he].length*Ee;return he===0&&p[0].length===1&&(Se=1),{x:H.x+Se*Math.cos(Re),y:H.y+Se*Math.sin(Re)}}else{var Oe=p[he].length,Ne=Math.max(Oe===1?0:o?(l.w-r.padding*2-Y.w)/((r.grid?ce:Oe)-1):(l.w-r.padding*2-Y.w)/((r.grid?ce:Oe)+1),I),ze={x:H.x+(Ee+1-(Oe+1)/2)*Ne,y:H.y+(he+1-(K+1)/2)*te};return ze}},Ce={downward:0,leftward:90,upward:180,rightward:-90};Object.keys(Ce).indexOf(r.direction)===-1&&$e("Invalid direction '".concat(r.direction,"' specified for breadthfirst layout. Valid values are: ").concat(Object.keys(Ce).join(", ")));var we=function(ie){return $c(Ae(ie),l,Ce[r.direction])};return t.nodes().layoutPositions(this,r,we),this};var Ap={fit:!0,padding:30,boundingBox:void 0,avoidOverlap:!0,nodeDimensionsIncludeLabels:!1,spacingFactor:void 0,radius:void 0,startAngle:3/2*Math.PI,sweep:void 0,clockwise:!0,sort:void 0,animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:function(e,t){return!0},ready:void 0,stop:void 0,transform:function(e,t){return t}};function nf(r){this.options=be({},Ap,r)}nf.prototype.run=function(){var r=this.options,e=r,t=r.cy,a=e.eles,n=e.counterclockwise!==void 0?!e.counterclockwise:e.clockwise,i=a.nodes().not(":parent");e.sort&&(i=i.sort(e.sort));for(var s=wr(e.boundingBox?e.boundingBox:{x1:0,y1:0,w:t.width(),h:t.height()}),o={x:s.x1+s.w/2,y:s.y1+s.h/2},l=e.sweep===void 0?2*Math.PI-2*Math.PI/i.length:e.sweep,u=l/Math.max(1,i.length-1),v,f=0,c=0;c1&&e.avoidOverlap){f*=1.75;var p=Math.cos(u)-Math.cos(0),m=Math.sin(u)-Math.sin(0),b=Math.sqrt(f*f/(p*p+m*m));v=Math.max(b,v)}var w=function(C,x){var T=e.startAngle+x*u*(n?1:-1),k=v*Math.cos(T),D=v*Math.sin(T),B={x:o.x+k,y:o.y+D};return B};return a.nodes().layoutPositions(this,e,w),this};var Rp={fit:!0,padding:30,startAngle:3/2*Math.PI,sweep:void 0,clockwise:!0,equidistant:!1,minNodeSpacing:10,boundingBox:void 0,avoidOverlap:!0,nodeDimensionsIncludeLabels:!1,height:void 0,width:void 0,spacingFactor:void 0,concentric:function(e){return e.degree()},levelWidth:function(e){return e.maxDegree()/4},animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:function(e,t){return!0},ready:void 0,stop:void 0,transform:function(e,t){return t}};function sf(r){this.options=be({},Rp,r)}sf.prototype.run=function(){for(var r=this.options,e=r,t=e.counterclockwise!==void 0?!e.counterclockwise:e.clockwise,a=r.cy,n=e.eles,i=n.nodes().not(":parent"),s=wr(e.boundingBox?e.boundingBox:{x1:0,y1:0,w:a.width(),h:a.height()}),o={x:s.x1+s.w/2,y:s.y1+s.h/2},l=[],u=0,v=0;v0){var E=Math.abs(m[0].value-w.value);E>=g&&(m=[],p.push(m))}m.push(w)}var C=u+e.minNodeSpacing;if(!e.avoidOverlap){var x=p.length>0&&p[0].length>1,T=Math.min(s.w,s.h)/2-C,k=T/(p.length+x?1:0);C=Math.min(C,k)}for(var D=0,B=0;B1&&e.avoidOverlap){var L=Math.cos(R)-Math.cos(0),I=Math.sin(R)-Math.sin(0),M=Math.sqrt(C*C/(L*L+I*I));D=Math.max(M,D)}P.r=D,D+=C}if(e.equidistant){for(var O=0,V=0,G=0;G=r.numIter||(Fp(a,r),a.temperature=a.temperature*r.coolingFactor,a.temperature=r.animationThreshold&&i(),wn(v)}};v()}else{for(;u;)u=s(l),l++;kl(a,r),o()}return this};Kn.prototype.stop=function(){return this.stopped=!0,this.thread&&this.thread.stop(),this.emit("layoutstop"),this};Kn.prototype.destroy=function(){return this.thread&&this.thread.stop(),this};var Lp=function(e,t,a){for(var n=a.eles.edges(),i=a.eles.nodes(),s=wr(a.boundingBox?a.boundingBox:{x1:0,y1:0,w:e.width(),h:e.height()}),o={isCompound:e.hasCompoundNodes(),layoutNodes:[],idToIndex:{},nodeSize:i.size(),graphSet:[],indexToGraph:[],layoutEdges:[],edgeSize:n.size(),temperature:a.initialTemp,clientWidth:s.w,clientHeight:s.h,boundingBox:s},l=a.eles.components(),u={},v=0;v0){o.graphSet.push(T);for(var v=0;vn.count?0:n.graph},of=function(e,t,a,n){var i=n.graphSet[a];if(-10)var f=n.nodeOverlap*v,c=Math.sqrt(o*o+l*l),h=f*o/c,d=f*l/c;else var y=Dn(e,o,l),g=Dn(t,-1*o,-1*l),p=g.x-y.x,m=g.y-y.y,b=p*p+m*m,c=Math.sqrt(b),f=(e.nodeRepulsion+t.nodeRepulsion)/b,h=f*p/c,d=f*m/c;e.isLocked||(e.offsetX-=h,e.offsetY-=d),t.isLocked||(t.offsetX+=h,t.offsetY+=d)}},_p=function(e,t,a,n){if(a>0)var i=e.maxX-t.minX;else var i=t.maxX-e.minX;if(n>0)var s=e.maxY-t.minY;else var s=t.maxY-e.minY;return i>=0&&s>=0?Math.sqrt(i*i+s*s):0},Dn=function(e,t,a){var n=e.positionX,i=e.positionY,s=e.height||1,o=e.width||1,l=a/t,u=s/o,v={};return t===0&&0a?(v.x=n,v.y=i+s/2,v):0t&&-1*u<=l&&l<=u?(v.x=n-o/2,v.y=i-o*a/2/t,v):0=u)?(v.x=n+s*t/2/a,v.y=i+s/2,v):(0>a&&(l<=-1*u||l>=u)&&(v.x=n-s*t/2/a,v.y=i-s/2),v)},Gp=function(e,t){for(var a=0;aa){var g=t.gravity*h/y,p=t.gravity*d/y;c.offsetX+=g,c.offsetY+=p}}}}},Wp=function(e,t){var a=[],n=0,i=-1;for(a.push.apply(a,e.graphSet[0]),i+=e.graphSet[0].length;n<=i;){var s=a[n++],o=e.idToIndex[s],l=e.layoutNodes[o],u=l.children;if(0a)var i={x:a*e/n,y:a*t/n};else var i={x:e,y:t};return i},lf=function(e,t){var a=e.parentId;if(a!=null){var n=t.layoutNodes[t.idToIndex[a]],i=!1;if((n.maxX==null||e.maxX+n.padRight>n.maxX)&&(n.maxX=e.maxX+n.padRight,i=!0),(n.minX==null||e.minX-n.padLeftn.maxY)&&(n.maxY=e.maxY+n.padBottom,i=!0),(n.minY==null||e.minY-n.padTopp&&(d+=g+t.componentSpacing,h=0,y=0,g=0)}}},Kp={fit:!0,padding:30,boundingBox:void 0,avoidOverlap:!0,avoidOverlapPadding:10,nodeDimensionsIncludeLabels:!1,spacingFactor:void 0,condense:!1,rows:void 0,cols:void 0,position:function(e){},sort:void 0,animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:function(e,t){return!0},ready:void 0,stop:void 0,transform:function(e,t){return t}};function vf(r){this.options=be({},Kp,r)}vf.prototype.run=function(){var r=this.options,e=r,t=r.cy,a=e.eles,n=a.nodes().not(":parent");e.sort&&(n=n.sort(e.sort));var i=wr(e.boundingBox?e.boundingBox:{x1:0,y1:0,w:t.width(),h:t.height()});if(i.h===0||i.w===0)a.nodes().layoutPositions(this,e,function(U){return{x:i.x1,y:i.y1}});else{var s=n.size(),o=Math.sqrt(s*i.h/i.w),l=Math.round(o),u=Math.round(i.w/i.h*o),v=function(Q){if(Q==null)return Math.min(l,u);var K=Math.min(l,u);K==l?l=Q:u=Q},f=function(Q){if(Q==null)return Math.max(l,u);var K=Math.max(l,u);K==l?l=Q:u=Q},c=e.rows,h=e.cols!=null?e.cols:e.columns;if(c!=null&&h!=null)l=c,u=h;else if(c!=null&&h==null)l=c,u=Math.ceil(s/l);else if(c==null&&h!=null)u=h,l=Math.ceil(s/u);else if(u*l>s){var d=v(),y=f();(d-1)*y>=s?v(d-1):(y-1)*d>=s&&f(y-1)}else for(;u*l=s?f(p+1):v(g+1)}var m=i.w/u,b=i.h/l;if(e.condense&&(m=0,b=0),e.avoidOverlap)for(var w=0;w=u&&(L=0,R++)},M={},O=0;O(L=Nd(r,e,I[M],I[M+1],I[M+2],I[M+3])))return g(x,L),!0}else if(k.edgeType==="bezier"||k.edgeType==="multibezier"||k.edgeType==="self"||k.edgeType==="compound"){for(var I=k.allpts,M=0;M+5(L=Od(r,e,I[M],I[M+1],I[M+2],I[M+3],I[M+4],I[M+5])))return g(x,L),!0}for(var O=O||T.source,V=V||T.target,G=n.getArrowWidth(D,B),N=[{name:"source",x:k.arrowStartX,y:k.arrowStartY,angle:k.srcArrowAngle},{name:"target",x:k.arrowEndX,y:k.arrowEndY,angle:k.tgtArrowAngle},{name:"mid-source",x:k.midX,y:k.midY,angle:k.midsrcArrowAngle},{name:"mid-target",x:k.midX,y:k.midY,angle:k.midtgtArrowAngle}],M=0;M0&&(p(O),p(V))}function b(x,T,k){return Tr(x,T,k)}function w(x,T){var k=x._private,D=c,B;T?B=T+"-":B="",x.boundingBox();var P=k.labelBounds[T||"main"],A=x.pstyle(B+"label").value,R=x.pstyle("text-events").strValue==="yes";if(!(!R||!A)){var L=b(k.rscratch,"labelX",T),I=b(k.rscratch,"labelY",T),M=b(k.rscratch,"labelAngle",T),O=x.pstyle(B+"text-margin-x").pfValue,V=x.pstyle(B+"text-margin-y").pfValue,G=P.x1-D-O,N=P.x2+D-O,F=P.y1-D-V,U=P.y2+D-V;if(M){var Q=Math.cos(M),K=Math.sin(M),j=function(Y,te){return Y=Y-L,te=te-I,{x:Y*Q-te*K+L,y:Y*K+te*Q+I}},re=j(G,F),ne=j(G,U),J=j(N,F),z=j(N,U),q=[re.x+O,re.y+V,J.x+O,J.y+V,z.x+O,z.y+V,ne.x+O,ne.y+V];if(Sr(r,e,q))return g(x),!0}else if(nt(P,r,e))return g(x),!0}}for(var E=s.length-1;E>=0;E--){var C=s[E];C.isNode()?p(C)||w(C):m(C)||w(C)||w(C,"source")||w(C,"target")}return o};Mt.getAllInBox=function(r,e,t,a){var n=this.getCachedZSortedEles().interactive,i=this.cy.zoom(),s=2/i,o=[],l=Math.min(r,t),u=Math.max(r,t),v=Math.min(e,a),f=Math.max(e,a);r=l,t=u,e=v,a=f;var c=wr({x1:r,y1:e,x2:t,y2:a}),h=[{x:c.x1,y:c.y1},{x:c.x2,y:c.y1},{x:c.x2,y:c.y2},{x:c.x1,y:c.y2}],d=[[h[0],h[1]],[h[1],h[2]],[h[2],h[3]],[h[3],h[0]]];function y(Y,te,ce){return Tr(Y,te,ce)}function g(Y,te){var ce=Y._private,Ae=s,Ce="";Y.boundingBox();var we=ce.labelBounds.main;if(!we)return null;var ye=y(ce.rscratch,"labelX",te),ie=y(ce.rscratch,"labelY",te),de=y(ce.rscratch,"labelAngle",te),he=Y.pstyle(Ce+"text-margin-x").pfValue,Ee=Y.pstyle(Ce+"text-margin-y").pfValue,pe=we.x1-Ae-he,Se=we.x2+Ae-he,Re=we.y1-Ae-Ee,Oe=we.y2+Ae-Ee;if(de){var Ne=Math.cos(de),ze=Math.sin(de),xe=function(X,S){return X=X-ye,S=S-ie,{x:X*Ne-S*ze+ye,y:X*ze+S*Ne+ie}};return[xe(pe,Re),xe(Se,Re),xe(Se,Oe),xe(pe,Oe)]}else return[{x:pe,y:Re},{x:Se,y:Re},{x:Se,y:Oe},{x:pe,y:Oe}]}function p(Y,te,ce,Ae){function Ce(we,ye,ie){return(ie.y-we.y)*(ye.x-we.x)>(ye.y-we.y)*(ie.x-we.x)}return Ce(Y,ce,Ae)!==Ce(te,ce,Ae)&&Ce(Y,te,ce)!==Ce(Y,te,Ae)}for(var m=0;m0?-(Math.PI-e.ang):Math.PI+e.ang},jp=function(e,t,a,n,i){if(e!==Rl?Ml(t,e,Vr):Jp(Pr,Vr),Ml(t,a,Pr),Pl=Vr.nx*Pr.ny-Vr.ny*Pr.nx,Al=Vr.nx*Pr.nx-Vr.ny*-Pr.ny,Ur=Math.asin(Math.max(-1,Math.min(1,Pl))),Math.abs(Ur)<1e-6){Vs=t.x,qs=t.y,Ct=Vt=0;return}St=1,gn=!1,Al<0?Ur<0?Ur=Math.PI+Ur:(Ur=Math.PI-Ur,St=-1,gn=!0):Ur>0&&(St=-1,gn=!0),t.radius!==void 0?Vt=t.radius:Vt=n,wt=Ur/2,an=Math.min(Vr.len/2,Pr.len/2),i?(zr=Math.abs(Math.cos(wt)*Vt/Math.sin(wt)),zr>an?(zr=an,Ct=Math.abs(zr*Math.sin(wt)/Math.cos(wt))):Ct=Vt):(zr=Math.min(an,Vt),Ct=Math.abs(zr*Math.sin(wt)/Math.cos(wt))),_s=t.x+Pr.nx*zr,Gs=t.y+Pr.ny*zr,Vs=_s-Pr.ny*Ct*St,qs=Gs+Pr.nx*Ct*St,hf=t.x+Vr.nx*zr,gf=t.y+Vr.ny*zr,Rl=t};function pf(r,e){e.radius===0?r.lineTo(e.cx,e.cy):r.arc(e.cx,e.cy,e.radius,e.startAngle,e.endAngle,e.counterClockwise)}function po(r,e,t,a){var n=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0;return a===0||e.radius===0?{cx:e.x,cy:e.y,radius:0,startX:e.x,startY:e.y,stopX:e.x,stopY:e.y,startAngle:void 0,endAngle:void 0,counterClockwise:void 0}:(jp(r,e,t,a,n),{cx:Vs,cy:qs,radius:Ct,startX:hf,startY:gf,stopX:_s,stopY:Gs,startAngle:Vr.ang+Math.PI/2*St,endAngle:Pr.ang-Math.PI/2*St,counterClockwise:gn})}var Ma=.01,ey=Math.sqrt(2*Ma),yr={};yr.findMidptPtsEtc=function(r,e){var t=e.posPts,a=e.intersectionPts,n=e.vectorNormInverse,i,s=r.pstyle("source-endpoint"),o=r.pstyle("target-endpoint"),l=s.units!=null&&o.units!=null,u=function(E,C,x,T){var k=T-C,D=x-E,B=Math.sqrt(D*D+k*k);return{x:-k/B,y:D/B}},v=r.pstyle("edge-distances").value;switch(v){case"node-position":i=t;break;case"intersection":i=a;break;case"endpoints":{if(l){var f=this.manualEndptToPx(r.source()[0],s),c=Je(f,2),h=c[0],d=c[1],y=this.manualEndptToPx(r.target()[0],o),g=Je(y,2),p=g[0],m=g[1],b={x1:h,y1:d,x2:p,y2:m};n=u(h,d,p,m),i=b}else Ve("Edge ".concat(r.id()," has edge-distances:endpoints specified without manual endpoints specified via source-endpoint and target-endpoint. Falling back on edge-distances:intersection (default).")),i=a;break}}return{midptPts:i,vectorNormInverse:n}};yr.findHaystackPoints=function(r){for(var e=0;e0?Math.max(S-_,0):Math.min(S+_,0)},A=P(D,T),R=P(B,k),L=!1;m===u?p=Math.abs(A)>Math.abs(R)?n:a:m===l||m===o?(p=a,L=!0):(m===i||m===s)&&(p=n,L=!0);var I=p===a,M=I?R:A,O=I?B:D,V=to(O),G=!1;!(L&&(w||C))&&(m===o&&O<0||m===l&&O>0||m===i&&O>0||m===s&&O<0)&&(V*=-1,M=V*Math.abs(M),G=!0);var N;if(w){var F=E<0?1+E:E;N=F*M}else{var U=E<0?M:0;N=U+E*V}var Q=function(S){return Math.abs(S)=Math.abs(M)},K=Q(N),j=Q(Math.abs(M)-Math.abs(N)),re=K||j;if(re&&!G)if(I){var ne=Math.abs(O)<=c/2,J=Math.abs(D)<=h/2;if(ne){var z=(v.x1+v.x2)/2,q=v.y1,H=v.y2;t.segpts=[z,q,z,H]}else if(J){var Y=(v.y1+v.y2)/2,te=v.x1,ce=v.x2;t.segpts=[te,Y,ce,Y]}else t.segpts=[v.x1,v.y2]}else{var Ae=Math.abs(O)<=f/2,Ce=Math.abs(B)<=d/2;if(Ae){var we=(v.y1+v.y2)/2,ye=v.x1,ie=v.x2;t.segpts=[ye,we,ie,we]}else if(Ce){var de=(v.x1+v.x2)/2,he=v.y1,Ee=v.y2;t.segpts=[de,he,de,Ee]}else t.segpts=[v.x2,v.y1]}else if(I){var pe=v.y1+N+(g?c/2*V:0),Se=v.x1,Re=v.x2;t.segpts=[Se,pe,Re,pe]}else{var Oe=v.x1+N+(g?f/2*V:0),Ne=v.y1,ze=v.y2;t.segpts=[Oe,Ne,Oe,ze]}if(t.isRound){var xe=r.pstyle("taxi-radius").value,ue=r.pstyle("radius-type").value[0]==="arc-radius";t.radii=new Array(t.segpts.length/2).fill(xe),t.isArcRadius=new Array(t.segpts.length/2).fill(ue)}};yr.tryToCorrectInvalidPoints=function(r,e){var t=r._private.rscratch;if(t.edgeType==="bezier"){var a=e.srcPos,n=e.tgtPos,i=e.srcW,s=e.srcH,o=e.tgtW,l=e.tgtH,u=e.srcShape,v=e.tgtShape,f=e.srcCornerRadius,c=e.tgtCornerRadius,h=e.srcRs,d=e.tgtRs,y=!ae(t.startX)||!ae(t.startY),g=!ae(t.arrowStartX)||!ae(t.arrowStartY),p=!ae(t.endX)||!ae(t.endY),m=!ae(t.arrowEndX)||!ae(t.arrowEndY),b=3,w=this.getArrowWidth(r.pstyle("width").pfValue,r.pstyle("arrow-scale").value)*this.arrowShapeWidth,E=b*w,C=Bt({x:t.ctrlpts[0],y:t.ctrlpts[1]},{x:t.startX,y:t.startY}),x=CO.poolIndex()){var V=M;M=O,O=V}var G=A.srcPos=M.position(),N=A.tgtPos=O.position(),F=A.srcW=M.outerWidth(),U=A.srcH=M.outerHeight(),Q=A.tgtW=O.outerWidth(),K=A.tgtH=O.outerHeight(),j=A.srcShape=t.nodeShapes[e.getNodeShape(M)],re=A.tgtShape=t.nodeShapes[e.getNodeShape(O)],ne=A.srcCornerRadius=M.pstyle("corner-radius").value==="auto"?"auto":M.pstyle("corner-radius").pfValue,J=A.tgtCornerRadius=O.pstyle("corner-radius").value==="auto"?"auto":O.pstyle("corner-radius").pfValue,z=A.tgtRs=O._private.rscratch,q=A.srcRs=M._private.rscratch;A.dirCounts={north:0,west:0,south:0,east:0,northwest:0,southwest:0,northeast:0,southeast:0};for(var H=0;H=ey||(Re=Math.sqrt(Math.max(Se*Se,Ma)+Math.max(pe*pe,Ma)));var Oe=A.vector={x:Se,y:pe},Ne=A.vectorNorm={x:Oe.x/Re,y:Oe.y/Re},ze={x:-Ne.y,y:Ne.x};A.nodesOverlap=!ae(Re)||re.checkPoint(we[0],we[1],0,Q,K,N.x,N.y,J,z)||j.checkPoint(ie[0],ie[1],0,F,U,G.x,G.y,ne,q),A.vectorNormInverse=ze,R={nodesOverlap:A.nodesOverlap,dirCounts:A.dirCounts,calculatedIntersection:!0,hasBezier:A.hasBezier,hasUnbundled:A.hasUnbundled,eles:A.eles,srcPos:N,srcRs:z,tgtPos:G,tgtRs:q,srcW:Q,srcH:K,tgtW:F,tgtH:U,srcIntn:de,tgtIntn:ye,srcShape:re,tgtShape:j,posPts:{x1:Ee.x2,y1:Ee.y2,x2:Ee.x1,y2:Ee.y1},intersectionPts:{x1:he.x2,y1:he.y2,x2:he.x1,y2:he.y1},vector:{x:-Oe.x,y:-Oe.y},vectorNorm:{x:-Ne.x,y:-Ne.y},vectorNormInverse:{x:-ze.x,y:-ze.y}}}var xe=Ce?R:A;te.nodesOverlap=xe.nodesOverlap,te.srcIntn=xe.srcIntn,te.tgtIntn=xe.tgtIntn,te.isRound=ce.startsWith("round"),n&&(M.isParent()||M.isChild()||O.isParent()||O.isChild())&&(M.parents().anySame(O)||O.parents().anySame(M)||M.same(O)&&M.isParent())?e.findCompoundLoopPoints(Y,xe,H,Ae):M===O?e.findLoopPoints(Y,xe,H,Ae):ce.endsWith("segments")?e.findSegmentsPoints(Y,xe):ce.endsWith("taxi")?e.findTaxiPoints(Y,xe):ce==="straight"||!Ae&&A.eles.length%2===1&&H===Math.floor(A.eles.length/2)?e.findStraightEdgePoints(Y):e.findBezierPoints(Y,xe,H,Ae,Ce),e.findEndpoints(Y),e.tryToCorrectInvalidPoints(Y,xe),e.checkForInvalidEdgeWarning(Y),e.storeAllpts(Y),e.storeEdgeProjections(Y),e.calculateArrowAngles(Y),e.recalculateEdgeLabelProjections(Y),e.calculateLabelAngles(Y)}},x=0;x0){var we=u,ye=Et(we,Wt(s)),ie=Et(we,Wt(Ce)),de=ye;if(ie2){var he=Et(we,{x:Ce[2],y:Ce[3]});he0){var W=v,$=Et(W,Wt(s)),Z=Et(W,Wt(_)),oe=$;if(Z<$&&(s=[_[0],_[1]],oe=Z),_.length>2){var ee=Et(W,{x:_[2],y:_[3]});ee=d||x){g={cp:w,segment:C};break}}if(g)break}var T=g.cp,k=g.segment,D=(d-p)/k.length,B=k.t1-k.t0,P=h?k.t0+B*D:k.t1-B*D;P=ka(0,P,1),e=Kt(T.p0,T.p1,T.p2,P),c=ty(T.p0,T.p1,T.p2,P);break}case"straight":case"segments":case"haystack":{for(var A=0,R,L,I,M,O=a.allpts.length,V=0;V+3=d));V+=2);var G=d-L,N=G/R;N=ka(0,N,1),e=Td(I,M,N),c=bf(I,M);break}}s("labelX",f,e.x),s("labelY",f,e.y),s("labelAutoAngle",f,c)}};u("source"),u("target"),this.applyLabelDimensions(r)}};Gr.applyLabelDimensions=function(r){this.applyPrefixedLabelDimensions(r),r.isEdge()&&(this.applyPrefixedLabelDimensions(r,"source"),this.applyPrefixedLabelDimensions(r,"target"))};Gr.applyPrefixedLabelDimensions=function(r,e){var t=r._private,a=this.getLabelText(r,e),n=Dt(a,r._private.labelDimsKey);if(Tr(t.rscratch,"prefixedLabelDimsKey",e)!==n){Kr(t.rscratch,"prefixedLabelDimsKey",e,n);var i=this.calculateLabelDimensions(r,a),s=r.pstyle("line-height").pfValue,o=r.pstyle("text-wrap").strValue,l=Tr(t.rscratch,"labelWrapCachedLines",e)||[],u=o!=="wrap"?1:Math.max(l.length,1),v=i.height/u,f=v*s,c=i.width,h=i.height+(u-1)*(s-1)*v;Kr(t.rstyle,"labelWidth",e,c),Kr(t.rscratch,"labelWidth",e,c),Kr(t.rstyle,"labelHeight",e,h),Kr(t.rscratch,"labelHeight",e,h),Kr(t.rscratch,"labelLineHeight",e,f)}};Gr.getLabelText=function(r,e){var t=r._private,a=e?e+"-":"",n=r.pstyle(a+"label").strValue,i=r.pstyle("text-transform").value,s=function(U,Q){return Q?(Kr(t.rscratch,U,e,Q),Q):Tr(t.rscratch,U,e)};if(!n)return"";i=="none"||(i=="uppercase"?n=n.toUpperCase():i=="lowercase"&&(n=n.toLowerCase()));var o=r.pstyle("text-wrap").value;if(o==="wrap"){var l=s("labelKey");if(l!=null&&s("labelWrapKey")===l)return s("labelWrapCachedText");for(var u="​",v=n.split(` +`),f=r.pstyle("text-max-width").pfValue,c=r.pstyle("text-overflow-wrap").value,h=c==="anywhere",d=[],y=/[\s\u200b]+|$/g,g=0;gf){var E=p.matchAll(y),C="",x=0,T=kr(E),k;try{for(T.s();!(k=T.n()).done;){var D=k.value,B=D[0],P=p.substring(x,D.index);x=D.index+B.length;var A=C.length===0?P:C+P+B,R=this.calculateLabelDimensions(r,A),L=R.width;L<=f?C+=P+B:(C&&d.push(C),C=P+B)}}catch(F){T.e(F)}finally{T.f()}C.match(/^[\s\u200b]+$/)||d.push(C)}else d.push(p)}s("labelWrapCachedLines",d),n=s("labelWrapCachedText",d.join(` +`)),s("labelWrapKey",l)}else if(o==="ellipsis"){var I=r.pstyle("text-max-width").pfValue,M="",O="…",V=!1;if(this.calculateLabelDimensions(r,n).widthI)break;M+=n[G],G===n.length-1&&(V=!0)}return V||(M+=O),M}return n};Gr.getLabelJustification=function(r){var e=r.pstyle("text-justification").strValue,t=r.pstyle("text-halign").strValue;if(e==="auto")if(r.isNode())switch(t){case"left":return"right";case"right":return"left";default:return"center"}else return"center";else return e};Gr.calculateLabelDimensions=function(r,e){var t=this,a=t.cy.window(),n=a.document,i=0,s=r.pstyle("font-style").strValue,o=r.pstyle("font-size").pfValue,l=r.pstyle("font-family").strValue,u=r.pstyle("font-weight").strValue,v=this.labelCalcCanvas,f=this.labelCalcCanvasContext;if(!v){v=this.labelCalcCanvas=n.createElement("canvas"),f=this.labelCalcCanvasContext=v.getContext("2d");var c=v.style;c.position="absolute",c.left="-9999px",c.top="-9999px",c.zIndex="-1",c.visibility="hidden",c.pointerEvents="none"}f.font="".concat(s," ").concat(u," ").concat(o,"px ").concat(l);for(var h=0,d=0,y=e.split(` +`),g=0;g1&&arguments[1]!==void 0?arguments[1]:!0;if(e.merge(s),o)for(var l=0;l=r.desktopTapThreshold2}var lr=i(S);je&&(r.hoverData.tapholdCancelled=!0);var jr=function(){var Br=r.hoverData.dragDelta=r.hoverData.dragDelta||[];Br.length===0?(Br.push(Pe[0]),Br.push(Pe[1])):(Br[0]+=Pe[0],Br[1]+=Pe[1])};W=!0,n(De,["mousemove","vmousemove","tapdrag"],S,{x:ee[0],y:ee[1]});var Ze=function(Br){return{originalEvent:S,type:Br,position:{x:ee[0],y:ee[1]}}},Wr=function(){r.data.bgActivePosistion=void 0,r.hoverData.selecting||$.emit(Ze("boxstart")),me[4]=1,r.hoverData.selecting=!0,r.redrawHint("select",!0),r.redraw()};if(r.hoverData.which===3){if(je){var $r=Ze("cxtdrag");fe?fe.emit($r):$.emit($r),r.hoverData.cxtDragged=!0,(!r.hoverData.cxtOver||De!==r.hoverData.cxtOver)&&(r.hoverData.cxtOver&&r.hoverData.cxtOver.emit(Ze("cxtdragout")),r.hoverData.cxtOver=De,De&&De.emit(Ze("cxtdragover")))}}else if(r.hoverData.dragging){if(W=!0,$.panningEnabled()&&$.userPanningEnabled()){var It;if(r.hoverData.justStartedPan){var $a=r.hoverData.mdownPos;It={x:(ee[0]-$a[0])*Z,y:(ee[1]-$a[1])*Z},r.hoverData.justStartedPan=!1}else It={x:Pe[0]*Z,y:Pe[1]*Z};$.panBy(It),$.emit(Ze("dragpan")),r.hoverData.dragged=!0}ee=r.projectIntoViewport(S.clientX,S.clientY)}else if(me[4]==1&&(fe==null||fe.pannable())){if(je){if(!r.hoverData.dragging&&$.boxSelectionEnabled()&&(lr||!$.panningEnabled()||!$.userPanningEnabled()))Wr();else if(!r.hoverData.selecting&&$.panningEnabled()&&$.userPanningEnabled()){var bt=s(fe,r.hoverData.downs);bt&&(r.hoverData.dragging=!0,r.hoverData.justStartedPan=!0,me[4]=0,r.data.bgActivePosistion=Wt(ve),r.redrawHint("select",!0),r.redraw())}fe&&fe.pannable()&&fe.active()&&fe.unactivate()}}else{if(fe&&fe.pannable()&&fe.active()&&fe.unactivate(),(!fe||!fe.grabbed())&&De!=Te&&(Te&&n(Te,["mouseout","tapdragout"],S,{x:ee[0],y:ee[1]}),De&&n(De,["mouseover","tapdragover"],S,{x:ee[0],y:ee[1]}),r.hoverData.last=De),fe)if(je){if($.boxSelectionEnabled()&&lr)fe&&fe.grabbed()&&(p(Be),fe.emit(Ze("freeon")),Be.emit(Ze("free")),r.dragData.didDrag&&(fe.emit(Ze("dragfreeon")),Be.emit(Ze("dragfree")))),Wr();else if(fe&&fe.grabbed()&&r.nodeIsDraggable(fe)){var Er=!r.dragData.didDrag;Er&&r.redrawHint("eles",!0),r.dragData.didDrag=!0,r.hoverData.draggingEles||y(Be,{inDragLayer:!0});var hr={x:0,y:0};if(ae(Pe[0])&&ae(Pe[1])&&(hr.x+=Pe[0],hr.y+=Pe[1],Er)){var Cr=r.hoverData.dragDelta;Cr&&ae(Cr[0])&&ae(Cr[1])&&(hr.x+=Cr[0],hr.y+=Cr[1])}r.hoverData.draggingEles=!0,Be.silentShift(hr).emit(Ze("position")).emit(Ze("drag")),r.redrawHint("drag",!0),r.redraw()}}else jr();W=!0}if(me[2]=ee[0],me[3]=ee[1],W)return S.stopPropagation&&S.stopPropagation(),S.preventDefault&&S.preventDefault(),!1}},!1);var P,A,R;r.registerBinding(e,"mouseup",function(S){if(!(r.hoverData.which===1&&S.which!==1&&r.hoverData.capture)){var _=r.hoverData.capture;if(_){r.hoverData.capture=!1;var W=r.cy,$=r.projectIntoViewport(S.clientX,S.clientY),Z=r.selection,oe=r.findNearestElement($[0],$[1],!0,!1),ee=r.dragData.possibleDragElements,ve=r.hoverData.down,le=i(S);r.data.bgActivePosistion&&(r.redrawHint("select",!0),r.redraw()),r.hoverData.tapholdCancelled=!0,r.data.bgActivePosistion=void 0,ve&&ve.unactivate();var me=function(Ke){return{originalEvent:S,type:Ke,position:{x:$[0],y:$[1]}}};if(r.hoverData.which===3){var De=me("cxttapend");if(ve?ve.emit(De):W.emit(De),!r.hoverData.cxtDragged){var Te=me("cxttap");ve?ve.emit(Te):W.emit(Te)}r.hoverData.cxtDragged=!1,r.hoverData.which=null}else if(r.hoverData.which===1){if(n(oe,["mouseup","tapend","vmouseup"],S,{x:$[0],y:$[1]}),!r.dragData.didDrag&&!r.hoverData.dragged&&!r.hoverData.selecting&&!r.hoverData.isOverThresholdDrag&&(n(ve,["click","tap","vclick"],S,{x:$[0],y:$[1]}),A=!1,S.timeStamp-R<=W.multiClickDebounceTime()?(P&&clearTimeout(P),A=!0,R=null,n(ve,["dblclick","dbltap","vdblclick"],S,{x:$[0],y:$[1]})):(P=setTimeout(function(){A||n(ve,["oneclick","onetap","voneclick"],S,{x:$[0],y:$[1]})},W.multiClickDebounceTime()),R=S.timeStamp)),ve==null&&!r.dragData.didDrag&&!r.hoverData.selecting&&!r.hoverData.dragged&&!i(S)&&(W.$(t).unselect(["tapunselect"]),ee.length>0&&r.redrawHint("eles",!0),r.dragData.possibleDragElements=ee=W.collection()),oe==ve&&!r.dragData.didDrag&&!r.hoverData.selecting&&oe!=null&&oe._private.selectable&&(r.hoverData.dragging||(W.selectionType()==="additive"||le?oe.selected()?oe.unselect(["tapunselect"]):oe.select(["tapselect"]):le||(W.$(t).unmerge(oe).unselect(["tapunselect"]),oe.select(["tapselect"]))),r.redrawHint("eles",!0)),r.hoverData.selecting){var fe=W.collection(r.getAllInBox(Z[0],Z[1],Z[2],Z[3]));r.redrawHint("select",!0),fe.length>0&&r.redrawHint("eles",!0),W.emit(me("boxend"));var Pe=function(Ke){return Ke.selectable()&&!Ke.selected()};W.selectionType()==="additive"||le||W.$(t).unmerge(fe).unselect(),fe.emit(me("box")).stdFilter(Pe).select().emit(me("boxselect")),r.redraw()}if(r.hoverData.dragging&&(r.hoverData.dragging=!1,r.redrawHint("select",!0),r.redrawHint("eles",!0),r.redraw()),!Z[4]){r.redrawHint("drag",!0),r.redrawHint("eles",!0);var Be=ve&&ve.grabbed();p(ee),Be&&(ve.emit(me("freeon")),ee.emit(me("free")),r.dragData.didDrag&&(ve.emit(me("dragfreeon")),ee.emit(me("dragfree"))))}}Z[4]=0,r.hoverData.down=null,r.hoverData.cxtStarted=!1,r.hoverData.draggingEles=!1,r.hoverData.selecting=!1,r.hoverData.isOverThresholdDrag=!1,r.dragData.didDrag=!1,r.hoverData.dragged=!1,r.hoverData.dragDelta=[],r.hoverData.mdownPos=null,r.hoverData.mdownGPos=null,r.hoverData.which=null}}},!1);var L=[],I=4,M,O=1e5,V=function(S,_){for(var W=0;W=I){var $=L;if(M=V($,5),!M){var Z=Math.abs($[0]);M=G($)&&Z>5}if(M)for(var oe=0;oe<$.length;oe++)O=Math.min(Math.abs($[oe]),O)}else L.push(W),_=!0;else M&&(O=Math.min(Math.abs(W),O));if(!r.scrollingPage){var ee=r.cy,ve=ee.zoom(),le=ee.pan(),me=r.projectIntoViewport(S.clientX,S.clientY),De=[me[0]*ve+le.x,me[1]*ve+le.y];if(r.hoverData.draggingEles||r.hoverData.dragging||r.hoverData.cxtStarted||k()){S.preventDefault();return}if(ee.panningEnabled()&&ee.userPanningEnabled()&&ee.zoomingEnabled()&&ee.userZoomingEnabled()){S.preventDefault(),r.data.wheelZooming=!0,clearTimeout(r.data.wheelTimeout),r.data.wheelTimeout=setTimeout(function(){r.data.wheelZooming=!1,r.redrawHint("eles",!0),r.redraw()},150);var Te;_&&Math.abs(W)>5&&(W=to(W)*5),Te=W/-250,M&&(Te/=O,Te*=3),Te=Te*r.wheelSensitivity;var fe=S.deltaMode===1;fe&&(Te*=33);var Pe=ee.zoom()*Math.pow(10,Te);S.type==="gesturechange"&&(Pe=r.gestureStartZoom*S.scale),ee.zoom({level:Pe,renderedPosition:{x:De[0],y:De[1]}}),ee.emit({type:S.type==="gesturechange"?"pinchzoom":"scrollzoom",originalEvent:S,position:{x:me[0],y:me[1]}})}}}};r.registerBinding(r.container,"wheel",N,!0),r.registerBinding(e,"scroll",function(S){r.scrollingPage=!0,clearTimeout(r.scrollingPageTimeout),r.scrollingPageTimeout=setTimeout(function(){r.scrollingPage=!1},250)},!0),r.registerBinding(r.container,"gesturestart",function(S){r.gestureStartZoom=r.cy.zoom(),r.hasTouchStarted||S.preventDefault()},!0),r.registerBinding(r.container,"gesturechange",function(X){r.hasTouchStarted||N(X)},!0),r.registerBinding(r.container,"mouseout",function(S){var _=r.projectIntoViewport(S.clientX,S.clientY);r.cy.emit({originalEvent:S,type:"mouseout",position:{x:_[0],y:_[1]}})},!1),r.registerBinding(r.container,"mouseover",function(S){var _=r.projectIntoViewport(S.clientX,S.clientY);r.cy.emit({originalEvent:S,type:"mouseover",position:{x:_[0],y:_[1]}})},!1);var F,U,Q,K,j,re,ne,J,z,q,H,Y,te,ce=function(S,_,W,$){return Math.sqrt((W-S)*(W-S)+($-_)*($-_))},Ae=function(S,_,W,$){return(W-S)*(W-S)+($-_)*($-_)},Ce;r.registerBinding(r.container,"touchstart",Ce=function(S){if(r.hasTouchStarted=!0,!!D(S)){b(),r.touchData.capture=!0,r.data.bgActivePosistion=void 0;var _=r.cy,W=r.touchData.now,$=r.touchData.earlier;if(S.touches[0]){var Z=r.projectIntoViewport(S.touches[0].clientX,S.touches[0].clientY);W[0]=Z[0],W[1]=Z[1]}if(S.touches[1]){var Z=r.projectIntoViewport(S.touches[1].clientX,S.touches[1].clientY);W[2]=Z[0],W[3]=Z[1]}if(S.touches[2]){var Z=r.projectIntoViewport(S.touches[2].clientX,S.touches[2].clientY);W[4]=Z[0],W[5]=Z[1]}var oe=function(lr){return{originalEvent:S,type:lr,position:{x:W[0],y:W[1]}}};if(S.touches[1]){r.touchData.singleTouchMoved=!0,p(r.dragData.touchDragEles);var ee=r.findContainerClientCoords();z=ee[0],q=ee[1],H=ee[2],Y=ee[3],F=S.touches[0].clientX-z,U=S.touches[0].clientY-q,Q=S.touches[1].clientX-z,K=S.touches[1].clientY-q,te=0<=F&&F<=H&&0<=Q&&Q<=H&&0<=U&&U<=Y&&0<=K&&K<=Y;var ve=_.pan(),le=_.zoom();j=ce(F,U,Q,K),re=Ae(F,U,Q,K),ne=[(F+Q)/2,(U+K)/2],J=[(ne[0]-ve.x)/le,(ne[1]-ve.y)/le];var me=200,De=me*me;if(re=1){for(var mr=r.touchData.startPosition=[null,null,null,null,null,null],Ye=0;Ye=r.touchTapThreshold2}if(_&&r.touchData.cxt){S.preventDefault();var Ye=S.touches[0].clientX-z,ir=S.touches[0].clientY-q,er=S.touches[1].clientX-z,lr=S.touches[1].clientY-q,jr=Ae(Ye,ir,er,lr),Ze=jr/re,Wr=150,$r=Wr*Wr,It=1.5,$a=It*It;if(Ze>=$a||jr>=$r){r.touchData.cxt=!1,r.data.bgActivePosistion=void 0,r.redrawHint("select",!0);var bt=le("cxttapend");r.touchData.start?(r.touchData.start.unactivate().emit(bt),r.touchData.start=null):$.emit(bt)}}if(_&&r.touchData.cxt){var bt=le("cxtdrag");r.data.bgActivePosistion=void 0,r.redrawHint("select",!0),r.touchData.start?r.touchData.start.emit(bt):$.emit(bt),r.touchData.start&&(r.touchData.start._private.grabbed=!1),r.touchData.cxtDragged=!0;var Er=r.findNearestElement(Z[0],Z[1],!0,!0);(!r.touchData.cxtOver||Er!==r.touchData.cxtOver)&&(r.touchData.cxtOver&&r.touchData.cxtOver.emit(le("cxtdragout")),r.touchData.cxtOver=Er,Er&&Er.emit(le("cxtdragover")))}else if(_&&S.touches[2]&&$.boxSelectionEnabled())S.preventDefault(),r.data.bgActivePosistion=void 0,this.lastThreeTouch=+new Date,r.touchData.selecting||$.emit(le("boxstart")),r.touchData.selecting=!0,r.touchData.didSelect=!0,W[4]=1,!W||W.length===0||W[0]===void 0?(W[0]=(Z[0]+Z[2]+Z[4])/3,W[1]=(Z[1]+Z[3]+Z[5])/3,W[2]=(Z[0]+Z[2]+Z[4])/3+1,W[3]=(Z[1]+Z[3]+Z[5])/3+1):(W[2]=(Z[0]+Z[2]+Z[4])/3,W[3]=(Z[1]+Z[3]+Z[5])/3),r.redrawHint("select",!0),r.redraw();else if(_&&S.touches[1]&&!r.touchData.didSelect&&$.zoomingEnabled()&&$.panningEnabled()&&$.userZoomingEnabled()&&$.userPanningEnabled()){S.preventDefault(),r.data.bgActivePosistion=void 0,r.redrawHint("select",!0);var hr=r.dragData.touchDragEles;if(hr){r.redrawHint("drag",!0);for(var Cr=0;Cr0&&!r.hoverData.draggingEles&&!r.swipePanning&&r.data.bgActivePosistion!=null&&(r.data.bgActivePosistion=void 0,r.redrawHint("select",!0),r.redraw())}},!1);var ye;r.registerBinding(e,"touchcancel",ye=function(S){var _=r.touchData.start;r.touchData.capture=!1,_&&_.unactivate()});var ie,de,he,Ee;if(r.registerBinding(e,"touchend",ie=function(S){var _=r.touchData.start,W=r.touchData.capture;if(W)S.touches.length===0&&(r.touchData.capture=!1),S.preventDefault();else return;var $=r.selection;r.swipePanning=!1,r.hoverData.draggingEles=!1;var Z=r.cy,oe=Z.zoom(),ee=r.touchData.now,ve=r.touchData.earlier;if(S.touches[0]){var le=r.projectIntoViewport(S.touches[0].clientX,S.touches[0].clientY);ee[0]=le[0],ee[1]=le[1]}if(S.touches[1]){var le=r.projectIntoViewport(S.touches[1].clientX,S.touches[1].clientY);ee[2]=le[0],ee[3]=le[1]}if(S.touches[2]){var le=r.projectIntoViewport(S.touches[2].clientX,S.touches[2].clientY);ee[4]=le[0],ee[5]=le[1]}var me=function($r){return{originalEvent:S,type:$r,position:{x:ee[0],y:ee[1]}}};_&&_.unactivate();var De;if(r.touchData.cxt){if(De=me("cxttapend"),_?_.emit(De):Z.emit(De),!r.touchData.cxtDragged){var Te=me("cxttap");_?_.emit(Te):Z.emit(Te)}r.touchData.start&&(r.touchData.start._private.grabbed=!1),r.touchData.cxt=!1,r.touchData.start=null,r.redraw();return}if(!S.touches[2]&&Z.boxSelectionEnabled()&&r.touchData.selecting){r.touchData.selecting=!1;var fe=Z.collection(r.getAllInBox($[0],$[1],$[2],$[3]));$[0]=void 0,$[1]=void 0,$[2]=void 0,$[3]=void 0,$[4]=0,r.redrawHint("select",!0),Z.emit(me("boxend"));var Pe=function($r){return $r.selectable()&&!$r.selected()};fe.emit(me("box")).stdFilter(Pe).select().emit(me("boxselect")),fe.nonempty()&&r.redrawHint("eles",!0),r.redraw()}if(_?.unactivate(),S.touches[2])r.data.bgActivePosistion=void 0,r.redrawHint("select",!0);else if(!S.touches[1]){if(!S.touches[0]){if(!S.touches[0]){r.data.bgActivePosistion=void 0,r.redrawHint("select",!0);var Be=r.dragData.touchDragEles;if(_!=null){var je=_._private.grabbed;p(Be),r.redrawHint("drag",!0),r.redrawHint("eles",!0),je&&(_.emit(me("freeon")),Be.emit(me("free")),r.dragData.didDrag&&(_.emit(me("dragfreeon")),Be.emit(me("dragfree")))),n(_,["touchend","tapend","vmouseup","tapdragout"],S,{x:ee[0],y:ee[1]}),_.unactivate(),r.touchData.start=null}else{var Ke=r.findNearestElement(ee[0],ee[1],!0,!0);n(Ke,["touchend","tapend","vmouseup","tapdragout"],S,{x:ee[0],y:ee[1]})}var mr=r.touchData.startPosition[0]-ee[0],Ye=mr*mr,ir=r.touchData.startPosition[1]-ee[1],er=ir*ir,lr=Ye+er,jr=lr*oe*oe;r.touchData.singleTouchMoved||(_||Z.$(":selected").unselect(["tapunselect"]),n(_,["tap","vclick"],S,{x:ee[0],y:ee[1]}),de=!1,S.timeStamp-Ee<=Z.multiClickDebounceTime()?(he&&clearTimeout(he),de=!0,Ee=null,n(_,["dbltap","vdblclick"],S,{x:ee[0],y:ee[1]})):(he=setTimeout(function(){de||n(_,["onetap","voneclick"],S,{x:ee[0],y:ee[1]})},Z.multiClickDebounceTime()),Ee=S.timeStamp)),_!=null&&!r.dragData.didDrag&&_._private.selectable&&jr"u"){var pe=[],Se=function(S){return{clientX:S.clientX,clientY:S.clientY,force:1,identifier:S.pointerId,pageX:S.pageX,pageY:S.pageY,radiusX:S.width/2,radiusY:S.height/2,screenX:S.screenX,screenY:S.screenY,target:S.target}},Re=function(S){return{event:S,touch:Se(S)}},Oe=function(S){pe.push(Re(S))},Ne=function(S){for(var _=0;_0)return F[0]}return null},d=Object.keys(c),y=0;y0?h:wv(i,s,e,t,a,n,o,l)},checkPoint:function(e,t,a,n,i,s,o,l){l=l==="auto"?vt(n,i):l;var u=2*l;if(Zr(e,t,this.points,s,o,n,i-u,[0,-1],a)||Zr(e,t,this.points,s,o,n-u,i,[0,-1],a))return!0;var v=n/2+2*a,f=i/2+2*a,c=[s-v,o-f,s-v,o,s+v,o,s+v,o-f];return!!(Sr(e,t,c)||kt(e,t,u,u,s+n/2-l,o+i/2-l,a)||kt(e,t,u,u,s-n/2+l,o+i/2-l,a))}}};Qr.registerNodeShapes=function(){var r=this.nodeShapes={},e=this;this.generateEllipse(),this.generatePolygon("triangle",br(3,0)),this.generateRoundPolygon("round-triangle",br(3,0)),this.generatePolygon("rectangle",br(4,0)),r.square=r.rectangle,this.generateRoundRectangle(),this.generateCutRectangle(),this.generateBarrel(),this.generateBottomRoundrectangle();{var t=[0,1,1,0,0,-1,-1,0];this.generatePolygon("diamond",t),this.generateRoundPolygon("round-diamond",t)}this.generatePolygon("pentagon",br(5,0)),this.generateRoundPolygon("round-pentagon",br(5,0)),this.generatePolygon("hexagon",br(6,0)),this.generateRoundPolygon("round-hexagon",br(6,0)),this.generatePolygon("heptagon",br(7,0)),this.generateRoundPolygon("round-heptagon",br(7,0)),this.generatePolygon("octagon",br(8,0)),this.generateRoundPolygon("round-octagon",br(8,0));var a=new Array(20);{var n=Ps(5,0),i=Ps(5,Math.PI/5),s=.5*(3-Math.sqrt(5));s*=1.57;for(var o=0;o=e.deqFastCost*w)break}else if(u){if(m>=e.deqCost*h||m>=e.deqAvgCost*c)break}else if(b>=e.deqNoDrawCost*ws)break;var E=e.deq(a,g,y);if(E.length>0)for(var C=0;C0&&(e.onDeqd(a,d),!u&&e.shouldRedraw(a,d,g,y)&&i())},o=e.priority||js;n.beforeRender(s,o(a))}}}},ny=(function(){function r(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:xn;ht(this,r),this.idsByKey=new Xr,this.keyForId=new Xr,this.cachesByLvl=new Xr,this.lvls=[],this.getKey=e,this.doesEleInvalidateKey=t}return gt(r,[{key:"getIdsFor",value:function(t){t==null&&$e("Can not get id list for null key");var a=this.idsByKey,n=this.idsByKey.get(t);return n||(n=new ra,a.set(t,n)),n}},{key:"addIdForKey",value:function(t,a){t!=null&&this.getIdsFor(t).add(a)}},{key:"deleteIdForKey",value:function(t,a){t!=null&&this.getIdsFor(t).delete(a)}},{key:"getNumberOfIdsForKey",value:function(t){return t==null?0:this.getIdsFor(t).size}},{key:"updateKeyMappingFor",value:function(t){var a=t.id(),n=this.keyForId.get(a),i=this.getKey(t);this.deleteIdForKey(n,a),this.addIdForKey(i,a),this.keyForId.set(a,i)}},{key:"deleteKeyMappingFor",value:function(t){var a=t.id(),n=this.keyForId.get(a);this.deleteIdForKey(n,a),this.keyForId.delete(a)}},{key:"keyHasChangedFor",value:function(t){var a=t.id(),n=this.keyForId.get(a),i=this.getKey(t);return n!==i}},{key:"isInvalid",value:function(t){return this.keyHasChangedFor(t)||this.doesEleInvalidateKey(t)}},{key:"getCachesAt",value:function(t){var a=this.cachesByLvl,n=this.lvls,i=a.get(t);return i||(i=new Xr,a.set(t,i),n.push(t)),i}},{key:"getCache",value:function(t,a){return this.getCachesAt(a).get(t)}},{key:"get",value:function(t,a){var n=this.getKey(t),i=this.getCache(n,a);return i!=null&&this.updateKeyMappingFor(t),i}},{key:"getForCachedKey",value:function(t,a){var n=this.keyForId.get(t.id()),i=this.getCache(n,a);return i}},{key:"hasCache",value:function(t,a){return this.getCachesAt(a).has(t)}},{key:"has",value:function(t,a){var n=this.getKey(t);return this.hasCache(n,a)}},{key:"setCache",value:function(t,a,n){n.key=t,this.getCachesAt(a).set(t,n)}},{key:"set",value:function(t,a,n){var i=this.getKey(t);this.setCache(i,a,n),this.updateKeyMappingFor(t)}},{key:"deleteCache",value:function(t,a){this.getCachesAt(a).delete(t)}},{key:"delete",value:function(t,a){var n=this.getKey(t);this.deleteCache(n,a)}},{key:"invalidateKey",value:function(t){var a=this;this.lvls.forEach(function(n){return a.deleteCache(t,n)})}},{key:"invalidate",value:function(t){var a=t.id(),n=this.keyForId.get(a);this.deleteKeyMappingFor(t);var i=this.doesEleInvalidateKey(t);return i&&this.invalidateKey(n),i||this.getNumberOfIdsForKey(n)===0}}])})(),Nl=25,nn=50,pn=-4,Hs=3,Sf=7.99,iy=8,sy=1024,oy=1024,uy=1024,ly=.2,vy=.8,fy=10,cy=.15,dy=.1,hy=.9,gy=.9,py=100,yy=1,Ut={dequeue:"dequeue",downscale:"downscale",highQuality:"highQuality"},my=cr({getKey:null,doesEleInvalidateKey:xn,drawElement:null,getBoundingBox:null,getRotationPoint:null,getRotationOffset:null,isVisible:dv,allowEdgeTxrCaching:!0,allowParentTxrCaching:!0}),ba=function(e,t){var a=this;a.renderer=e,a.onDequeues=[];var n=my(t);be(a,n),a.lookup=new ny(n.getKey,n.doesEleInvalidateKey),a.setupDequeueing()},nr=ba.prototype;nr.reasons=Ut;nr.getTextureQueue=function(r){var e=this;return e.eleImgCaches=e.eleImgCaches||{},e.eleImgCaches[r]=e.eleImgCaches[r]||[]};nr.getRetiredTextureQueue=function(r){var e=this,t=e.eleImgCaches.retired=e.eleImgCaches.retired||{},a=t[r]=t[r]||[];return a};nr.getElementQueue=function(){var r=this,e=r.eleCacheQueue=r.eleCacheQueue||new Va(function(t,a){return a.reqs-t.reqs});return e};nr.getElementKeyToQueue=function(){var r=this,e=r.eleKeyToCacheQueue=r.eleKeyToCacheQueue||{};return e};nr.getElement=function(r,e,t,a,n){var i=this,s=this.renderer,o=s.cy.zoom(),l=this.lookup;if(!e||e.w===0||e.h===0||isNaN(e.w)||isNaN(e.h)||!r.visible()||r.removed()||!i.allowEdgeTxrCaching&&r.isEdge()||!i.allowParentTxrCaching&&r.isParent())return null;if(a==null&&(a=Math.ceil(ro(o*t))),a=Sf||a>Hs)return null;var u=Math.pow(2,a),v=e.h*u,f=e.w*u,c=s.eleTextBiggerThanMin(r,u);if(!this.isVisible(r,c))return null;var h=l.get(r,a);if(h&&h.invalidated&&(h.invalidated=!1,h.texture.invalidatedWidth-=h.width),h)return h;var d;if(v<=Nl?d=Nl:v<=nn?d=nn:d=Math.ceil(v/nn)*nn,v>uy||f>oy)return null;var y=i.getTextureQueue(d),g=y[y.length-2],p=function(){return i.recycleTexture(d,f)||i.addTexture(d,f)};g||(g=y[y.length-1]),g||(g=p()),g.width-g.usedWidtha;B--)k=i.getElement(r,e,t,B,Ut.downscale);D()}else return i.queueElement(r,C.level-1),C;else{var P;if(!b&&!w&&!E)for(var A=a-1;A>=pn;A--){var R=l.get(r,A);if(R){P=R;break}}if(m(P))return i.queueElement(r,a),P;g.context.translate(g.usedWidth,0),g.context.scale(u,u),this.drawElement(g.context,r,e,c,!1),g.context.scale(1/u,1/u),g.context.translate(-g.usedWidth,0)}return h={x:g.usedWidth,texture:g,level:a,scale:u,width:f,height:v,scaledLabelShown:c},g.usedWidth+=Math.ceil(f+iy),g.eleCaches.push(h),l.set(r,a,h),i.checkTextureFullness(g),h};nr.invalidateElements=function(r){for(var e=0;e=ly*r.width&&this.retireTexture(r)};nr.checkTextureFullness=function(r){var e=this,t=e.getTextureQueue(r.height);r.usedWidth/r.width>vy&&r.fullnessChecks>=fy?lt(t,r):r.fullnessChecks++};nr.retireTexture=function(r){var e=this,t=r.height,a=e.getTextureQueue(t),n=this.lookup;lt(a,r),r.retired=!0;for(var i=r.eleCaches,s=0;s=e)return s.retired=!1,s.usedWidth=0,s.invalidatedWidth=0,s.fullnessChecks=0,eo(s.eleCaches),s.context.setTransform(1,0,0,1,0,0),s.context.clearRect(0,0,s.width,s.height),lt(n,s),a.push(s),s}};nr.queueElement=function(r,e){var t=this,a=t.getElementQueue(),n=t.getElementKeyToQueue(),i=this.getKey(r),s=n[i];if(s)s.level=Math.max(s.level,e),s.eles.merge(r),s.reqs++,a.updateItem(s);else{var o={eles:r.spawn().merge(r),level:e,reqs:1,key:i};a.push(o),n[i]=o}};nr.dequeue=function(r){for(var e=this,t=e.getElementQueue(),a=e.getElementKeyToQueue(),n=[],i=e.lookup,s=0;s0;s++){var o=t.pop(),l=o.key,u=o.eles[0],v=i.hasCache(u,o.level);if(a[l]=null,v)continue;n.push(o);var f=e.getBoundingBox(u);e.getElement(u,f,r,o.level,Ut.dequeue)}return n};nr.removeFromQueue=function(r){var e=this,t=e.getElementQueue(),a=e.getElementKeyToQueue(),n=this.getKey(r),i=a[n];i!=null&&(i.eles.length===1?(i.reqs=Js,t.updateItem(i),t.pop(),a[n]=null):i.eles.unmerge(r))};nr.onDequeue=function(r){this.onDequeues.push(r)};nr.offDequeue=function(r){lt(this.onDequeues,r)};nr.setupDequeueing=Tf.setupDequeueing({deqRedrawThreshold:py,deqCost:cy,deqAvgCost:dy,deqNoDrawCost:hy,deqFastCost:gy,deq:function(e,t,a){return e.dequeue(t,a)},onDeqd:function(e,t){for(var a=0;a=wy||t>Pn)return null}a.validateLayersElesOrdering(t,r);var l=a.layersByLevel,u=Math.pow(2,t),v=l[t]=l[t]||[],f,c=a.levelIsComplete(t,r),h,d=function(){var D=function(L){if(a.validateLayersElesOrdering(L,r),a.levelIsComplete(L,r))return h=l[L],!0},B=function(L){if(!h)for(var I=t+L;xa<=I&&I<=Pn&&!D(I);I+=L);};B(1),B(-1);for(var P=v.length-1;P>=0;P--){var A=v[P];A.invalid&<(v,A)}};if(!c)d();else return v;var y=function(){if(!f){f=wr();for(var D=0;DFl||A>Fl)return null;var R=P*A;if(R>By)return null;var L=a.makeLayer(f,t);if(B!=null){var I=v.indexOf(B)+1;v.splice(I,0,L)}else(D.insert===void 0||D.insert)&&v.unshift(L);return L};if(a.skipping&&!o)return null;for(var p=null,m=r.length/by,b=!o,w=0;w=m||!bv(p.bb,E.boundingBox()))&&(p=g({insert:!0,after:p}),!p))return null;h||b?a.queueLayer(p,E):a.drawEleInLayer(p,E,t,e),p.eles.push(E),x[t]=p}return h||(b?null:v)};dr.getEleLevelForLayerLevel=function(r,e){return r};dr.drawEleInLayer=function(r,e,t,a){var n=this,i=this.renderer,s=r.context,o=e.boundingBox();o.w===0||o.h===0||!e.visible()||(t=n.getEleLevelForLayerLevel(t,a),i.setImgSmoothing(s,!1),i.drawCachedElement(s,e,null,null,t,Py),i.setImgSmoothing(s,!0))};dr.levelIsComplete=function(r,e){var t=this,a=t.layersByLevel[r];if(!a||a.length===0)return!1;for(var n=0,i=0;i0||s.invalid)return!1;n+=s.eles.length}return n===e.length};dr.validateLayersElesOrdering=function(r,e){var t=this.layersByLevel[r];if(t)for(var a=0;a0){e=!0;break}}return e};dr.invalidateElements=function(r){var e=this;r.length!==0&&(e.lastInvalidationTime=Yr(),!(r.length===0||!e.haveLayers())&&e.updateElementsInLayers(r,function(a,n,i){e.invalidateLayer(a)}))};dr.invalidateLayer=function(r){if(this.lastInvalidationTime=Yr(),!r.invalid){var e=r.level,t=r.eles,a=this.layersByLevel[e];lt(a,r),r.elesQueue=[],r.invalid=!0,r.replacement&&(r.replacement.invalid=!0);for(var n=0;n3&&arguments[3]!==void 0?arguments[3]:!0,n=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,i=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!0,s=this,o=e._private.rscratch;if(!(i&&!e.visible())&&!(o.badLine||o.allpts==null||isNaN(o.allpts[0]))){var l;t&&(l=t,r.translate(-l.x1,-l.y1));var u=i?e.pstyle("opacity").value:1,v=i?e.pstyle("line-opacity").value:1,f=e.pstyle("curve-style").value,c=e.pstyle("line-style").value,h=e.pstyle("width").pfValue,d=e.pstyle("line-cap").value,y=e.pstyle("line-outline-width").value,g=e.pstyle("line-outline-color").value,p=u*v,m=u*v,b=function(){var L=arguments.length>0&&arguments[0]!==void 0?arguments[0]:p;f==="straight-triangle"?(s.eleStrokeStyle(r,e,L),s.drawEdgeTrianglePath(e,r,o.allpts)):(r.lineWidth=h,r.lineCap=d,s.eleStrokeStyle(r,e,L),s.drawEdgePath(e,r,o.allpts,c),r.lineCap="butt")},w=function(){var L=arguments.length>0&&arguments[0]!==void 0?arguments[0]:p;if(r.lineWidth=h+y,r.lineCap=d,y>0)s.colorStrokeStyle(r,g[0],g[1],g[2],L);else{r.lineCap="butt";return}f==="straight-triangle"?s.drawEdgeTrianglePath(e,r,o.allpts):(s.drawEdgePath(e,r,o.allpts,c),r.lineCap="butt")},E=function(){n&&s.drawEdgeOverlay(r,e)},C=function(){n&&s.drawEdgeUnderlay(r,e)},x=function(){var L=arguments.length>0&&arguments[0]!==void 0?arguments[0]:m;s.drawArrowheads(r,e,L)},T=function(){s.drawElementText(r,e,null,a)};r.lineJoin="round";var k=e.pstyle("ghost").value==="yes";if(k){var D=e.pstyle("ghost-offset-x").pfValue,B=e.pstyle("ghost-offset-y").pfValue,P=e.pstyle("ghost-opacity").value,A=p*P;r.translate(D,B),b(A),x(A),r.translate(-D,-B)}else w();C(),b(),x(),E(),T(),t&&r.translate(l.x1,l.y1)}};var Bf=function(e){if(!["overlay","underlay"].includes(e))throw new Error("Invalid state");return function(t,a){if(a.visible()){var n=a.pstyle("".concat(e,"-opacity")).value;if(n!==0){var i=this,s=i.usePaths(),o=a._private.rscratch,l=a.pstyle("".concat(e,"-padding")).pfValue,u=2*l,v=a.pstyle("".concat(e,"-color")).value;t.lineWidth=u,o.edgeType==="self"&&!s?t.lineCap="butt":t.lineCap="round",i.colorStrokeStyle(t,v[0],v[1],v[2],n),i.drawEdgePath(a,t,o.allpts,"solid")}}}};Jr.drawEdgeOverlay=Bf("overlay");Jr.drawEdgeUnderlay=Bf("underlay");Jr.drawEdgePath=function(r,e,t,a){var n=r._private.rscratch,i=e,s,o=!1,l=this.usePaths(),u=r.pstyle("line-dash-pattern").pfValue,v=r.pstyle("line-dash-offset").pfValue;if(l){var f=t.join("$"),c=n.pathCacheKey&&n.pathCacheKey===f;c?(s=e=n.pathCache,o=!0):(s=e=new Path2D,n.pathCacheKey=f,n.pathCache=s)}if(i.setLineDash)switch(a){case"dotted":i.setLineDash([1,1]);break;case"dashed":i.setLineDash(u),i.lineDashOffset=v;break;case"solid":i.setLineDash([]);break}if(!o&&!n.badLine)switch(e.beginPath&&e.beginPath(),e.moveTo(t[0],t[1]),n.edgeType){case"bezier":case"self":case"compound":case"multibezier":for(var h=2;h+35&&arguments[5]!==void 0?arguments[5]:!0,s=this;if(a==null){if(i&&!s.eleTextBiggerThanMin(e))return}else if(a===!1)return;if(e.isNode()){var o=e.pstyle("label");if(!o||!o.value)return;var l=s.getLabelJustification(e);r.textAlign=l,r.textBaseline="bottom"}else{var u=e.element()._private.rscratch.badLine,v=e.pstyle("label"),f=e.pstyle("source-label"),c=e.pstyle("target-label");if(u||(!v||!v.value)&&(!f||!f.value)&&(!c||!c.value))return;r.textAlign="center",r.textBaseline="bottom"}var h=!t,d;t&&(d=t,r.translate(-d.x1,-d.y1)),n==null?(s.drawText(r,e,null,h,i),e.isEdge()&&(s.drawText(r,e,"source",h,i),s.drawText(r,e,"target",h,i))):s.drawText(r,e,n,h,i),t&&r.translate(d.x1,d.y1)};Lt.getFontCache=function(r){var e;this.fontCaches=this.fontCaches||[];for(var t=0;t2&&arguments[2]!==void 0?arguments[2]:!0,a=e.pstyle("font-style").strValue,n=e.pstyle("font-size").pfValue+"px",i=e.pstyle("font-family").strValue,s=e.pstyle("font-weight").strValue,o=t?e.effectiveOpacity()*e.pstyle("text-opacity").value:1,l=e.pstyle("text-outline-opacity").value*o,u=e.pstyle("color").value,v=e.pstyle("text-outline-color").value;r.font=a+" "+s+" "+n+" "+i,r.lineJoin="round",this.colorFillStyle(r,u[0],u[1],u[2],o),this.colorStrokeStyle(r,v[0],v[1],v[2],l)};function qy(r,e,t,a,n){var i=Math.min(a,n),s=i/2,o=e+a/2,l=t+n/2;r.beginPath(),r.arc(o,l,s,0,Math.PI*2),r.closePath()}function Gl(r,e,t,a,n){var i=arguments.length>5&&arguments[5]!==void 0?arguments[5]:5,s=Math.min(i,a/2,n/2);r.beginPath(),r.moveTo(e+s,t),r.lineTo(e+a-s,t),r.quadraticCurveTo(e+a,t,e+a,t+s),r.lineTo(e+a,t+n-s),r.quadraticCurveTo(e+a,t+n,e+a-s,t+n),r.lineTo(e+s,t+n),r.quadraticCurveTo(e,t+n,e,t+n-s),r.lineTo(e,t+s),r.quadraticCurveTo(e,t,e+s,t),r.closePath()}Lt.getTextAngle=function(r,e){var t,a=r._private,n=a.rscratch,i=e?e+"-":"",s=r.pstyle(i+"text-rotation");if(s.strValue==="autorotate"){var o=Tr(n,"labelAngle",e);t=r.isEdge()?o:0}else s.strValue==="none"?t=0:t=s.pfValue;return t};Lt.drawText=function(r,e,t){var a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,n=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,i=e._private,s=i.rscratch,o=n?e.effectiveOpacity():1;if(!(n&&(o===0||e.pstyle("text-opacity").value===0))){t==="main"&&(t=null);var l=Tr(s,"labelX",t),u=Tr(s,"labelY",t),v,f,c=this.getLabelText(e,t);if(c!=null&&c!==""&&!isNaN(l)&&!isNaN(u)){this.setupTextStyle(r,e,n);var h=t?t+"-":"",d=Tr(s,"labelWidth",t),y=Tr(s,"labelHeight",t),g=e.pstyle(h+"text-margin-x").pfValue,p=e.pstyle(h+"text-margin-y").pfValue,m=e.isEdge(),b=e.pstyle("text-halign").value,w=e.pstyle("text-valign").value;m&&(b="center",w="center"),l+=g,u+=p;var E;switch(a?E=this.getTextAngle(e,t):E=0,E!==0&&(v=l,f=u,r.translate(v,f),r.rotate(E),l=0,u=0),w){case"top":break;case"center":u+=y/2;break;case"bottom":u+=y;break}var C=e.pstyle("text-background-opacity").value,x=e.pstyle("text-border-opacity").value,T=e.pstyle("text-border-width").pfValue,k=e.pstyle("text-background-padding").pfValue,D=e.pstyle("text-background-shape").strValue,B=D==="round-rectangle"||D==="roundrectangle",P=D==="circle",A=2;if(C>0||T>0&&x>0){var R=r.fillStyle,L=r.strokeStyle,I=r.lineWidth,M=e.pstyle("text-background-color").value,O=e.pstyle("text-border-color").value,V=e.pstyle("text-border-style").value,G=C>0,N=T>0&&x>0,F=l-k;switch(b){case"left":F-=d;break;case"center":F-=d/2;break}var U=u-y-k,Q=d+2*k,K=y+2*k;if(G&&(r.fillStyle="rgba(".concat(M[0],",").concat(M[1],",").concat(M[2],",").concat(C*o,")")),N&&(r.strokeStyle="rgba(".concat(O[0],",").concat(O[1],",").concat(O[2],",").concat(x*o,")"),r.lineWidth=T,r.setLineDash))switch(V){case"dotted":r.setLineDash([1,1]);break;case"dashed":r.setLineDash([4,2]);break;case"double":r.lineWidth=T/4,r.setLineDash([]);break;case"solid":default:r.setLineDash([]);break}if(B?(r.beginPath(),Gl(r,F,U,Q,K,A)):P?(r.beginPath(),qy(r,F,U,Q,K)):(r.beginPath(),r.rect(F,U,Q,K)),G&&r.fill(),N&&r.stroke(),N&&V==="double"){var j=T/2;r.beginPath(),B?Gl(r,F+j,U+j,Q-2*j,K-2*j,A):r.rect(F+j,U+j,Q-2*j,K-2*j),r.stroke()}r.fillStyle=R,r.strokeStyle=L,r.lineWidth=I,r.setLineDash&&r.setLineDash([])}var re=2*e.pstyle("text-outline-width").pfValue;if(re>0&&(r.lineWidth=re),e.pstyle("text-wrap").value==="wrap"){var ne=Tr(s,"labelWrapCachedLines",t),J=Tr(s,"labelLineHeight",t),z=d/2,q=this.getLabelJustification(e);switch(q==="auto"||(b==="left"?q==="left"?l+=-d:q==="center"&&(l+=-z):b==="center"?q==="left"?l+=-z:q==="right"&&(l+=z):b==="right"&&(q==="center"?l+=z:q==="right"&&(l+=d))),w){case"top":u-=(ne.length-1)*J;break;case"center":case"bottom":u-=(ne.length-1)*J;break}for(var H=0;H0&&r.strokeText(ne[H],l,u),r.fillText(ne[H],l,u),u+=J}else re>0&&r.strokeText(c,l,u),r.fillText(c,l,u);E!==0&&(r.rotate(-E),r.translate(-v,-f))}}};var yt={};yt.drawNode=function(r,e,t){var a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,n=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,i=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!0,s=this,o,l,u=e._private,v=u.rscratch,f=e.position();if(!(!ae(f.x)||!ae(f.y))&&!(i&&!e.visible())){var c=i?e.effectiveOpacity():1,h=s.usePaths(),d,y=!1,g=e.padding();o=e.width()+2*g,l=e.height()+2*g;var p;t&&(p=t,r.translate(-p.x1,-p.y1));for(var m=e.pstyle("background-image"),b=m.value,w=new Array(b.length),E=new Array(b.length),C=0,x=0;x0&&arguments[0]!==void 0?arguments[0]:A;s.eleFillStyle(r,e,ue)},J=function(){var ue=arguments.length>0&&arguments[0]!==void 0?arguments[0]:N;s.colorStrokeStyle(r,R[0],R[1],R[2],ue)},z=function(){var ue=arguments.length>0&&arguments[0]!==void 0?arguments[0]:K;s.colorStrokeStyle(r,U[0],U[1],U[2],ue)},q=function(ue,X,S,_){var W=s.nodePathCache=s.nodePathCache||[],$=cv(S==="polygon"?S+","+_.join(","):S,""+X,""+ue,""+re),Z=W[$],oe,ee=!1;return Z!=null?(oe=Z,ee=!0,v.pathCache=oe):(oe=new Path2D,W[$]=v.pathCache=oe),{path:oe,cacheHit:ee}},H=e.pstyle("shape").strValue,Y=e.pstyle("shape-polygon-points").pfValue;if(h){r.translate(f.x,f.y);var te=q(o,l,H,Y);d=te.path,y=te.cacheHit}var ce=function(){if(!y){var ue=f;h&&(ue={x:0,y:0}),s.nodeShapes[s.getNodeShape(e)].draw(d||r,ue.x,ue.y,o,l,re,v)}h?r.fill(d):r.fill()},Ae=function(){for(var ue=arguments.length>0&&arguments[0]!==void 0?arguments[0]:c,X=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,S=u.backgrounding,_=0,W=0;W0&&arguments[0]!==void 0?arguments[0]:!1,X=arguments.length>1&&arguments[1]!==void 0?arguments[1]:c;s.hasPie(e)&&(s.drawPie(r,e,X),ue&&(h||s.nodeShapes[s.getNodeShape(e)].draw(r,f.x,f.y,o,l,re,v)))},we=function(){var ue=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,X=arguments.length>1&&arguments[1]!==void 0?arguments[1]:c;s.hasStripe(e)&&(r.save(),h?r.clip(v.pathCache):(s.nodeShapes[s.getNodeShape(e)].draw(r,f.x,f.y,o,l,re,v),r.clip()),s.drawStripe(r,e,X),r.restore(),ue&&(h||s.nodeShapes[s.getNodeShape(e)].draw(r,f.x,f.y,o,l,re,v)))},ye=function(){var ue=arguments.length>0&&arguments[0]!==void 0?arguments[0]:c,X=(B>0?B:-B)*ue,S=B>0?0:255;B!==0&&(s.colorFillStyle(r,S,S,S,X),h?r.fill(d):r.fill())},ie=function(){if(P>0){if(r.lineWidth=P,r.lineCap=M,r.lineJoin=I,r.setLineDash)switch(L){case"dotted":r.setLineDash([1,1]);break;case"dashed":r.setLineDash(V),r.lineDashOffset=G;break;case"solid":case"double":r.setLineDash([]);break}if(O!=="center"){if(r.save(),r.lineWidth*=2,O==="inside")h?r.clip(d):r.clip();else{var ue=new Path2D;ue.rect(-o/2-P,-l/2-P,o+2*P,l+2*P),ue.addPath(d),r.clip(ue,"evenodd")}h?r.stroke(d):r.stroke(),r.restore()}else h?r.stroke(d):r.stroke();if(L==="double"){r.lineWidth=P/3;var X=r.globalCompositeOperation;r.globalCompositeOperation="destination-out",h?r.stroke(d):r.stroke(),r.globalCompositeOperation=X}r.setLineDash&&r.setLineDash([])}},de=function(){if(F>0){if(r.lineWidth=F,r.lineCap="butt",r.setLineDash)switch(Q){case"dotted":r.setLineDash([1,1]);break;case"dashed":r.setLineDash([4,2]);break;case"solid":case"double":r.setLineDash([]);break}var ue=f;h&&(ue={x:0,y:0});var X=s.getNodeShape(e),S=P;O==="inside"&&(S=0),O==="outside"&&(S*=2);var _=(o+S+(F+j))/o,W=(l+S+(F+j))/l,$=o*_,Z=l*W,oe=s.nodeShapes[X].points,ee;if(h){var ve=q($,Z,X,oe);ee=ve.path}if(X==="ellipse")s.drawEllipsePath(ee||r,ue.x,ue.y,$,Z);else if(["round-diamond","round-heptagon","round-hexagon","round-octagon","round-pentagon","round-polygon","round-triangle","round-tag"].includes(X)){var le=0,me=0,De=0;X==="round-diamond"?le=(S+j+F)*1.4:X==="round-heptagon"?(le=(S+j+F)*1.075,De=-(S/2+j+F)/35):X==="round-hexagon"?le=(S+j+F)*1.12:X==="round-pentagon"?(le=(S+j+F)*1.13,De=-(S/2+j+F)/15):X==="round-tag"?(le=(S+j+F)*1.12,me=(S/2+F+j)*.07):X==="round-triangle"&&(le=(S+j+F)*(Math.PI/2),De=-(S+j/2+F)/Math.PI),le!==0&&(_=(o+le)/o,$=o*_,["round-hexagon","round-tag"].includes(X)||(W=(l+le)/l,Z=l*W)),re=re==="auto"?Ev($,Z):re;for(var Te=$/2,fe=Z/2,Pe=re+(S+F+j)/2,Be=new Array(oe.length/2),je=new Array(oe.length/2),Ke=0;Ke0){if(n=n||a.position(),i==null||s==null){var h=a.padding();i=a.width()+2*h,s=a.height()+2*h}o.colorFillStyle(t,v[0],v[1],v[2],u),o.nodeShapes[f].draw(t,n.x,n.y,i+l*2,s+l*2,c),t.fill()}}}};yt.drawNodeOverlay=Pf("overlay");yt.drawNodeUnderlay=Pf("underlay");yt.hasPie=function(r){return r=r[0],r._private.hasPie};yt.hasStripe=function(r){return r=r[0],r._private.hasStripe};yt.drawPie=function(r,e,t,a){e=e[0],a=a||e.position();var n=e.cy().style(),i=e.pstyle("pie-size"),s=e.pstyle("pie-hole"),o=e.pstyle("pie-start-angle").pfValue,l=a.x,u=a.y,v=e.width(),f=e.height(),c=Math.min(v,f)/2,h,d=0,y=this.usePaths();if(y&&(l=0,u=0),i.units==="%"?c=c*i.pfValue:i.pfValue!==void 0&&(c=i.pfValue/2),s.units==="%"?h=c*s.pfValue:s.pfValue!==void 0&&(h=s.pfValue/2),!(h>=c))for(var g=1;g<=n.pieBackgroundN;g++){var p=e.pstyle("pie-"+g+"-background-size").value,m=e.pstyle("pie-"+g+"-background-color").value,b=e.pstyle("pie-"+g+"-background-opacity").value*t,w=p/100;w+d>1&&(w=1-d);var E=1.5*Math.PI+2*Math.PI*d;E+=o;var C=2*Math.PI*w,x=E+C;p===0||d>=1||d+w>1||(h===0?(r.beginPath(),r.moveTo(l,u),r.arc(l,u,c,E,x),r.closePath()):(r.beginPath(),r.arc(l,u,c,E,x),r.arc(l,u,h,x,E,!0),r.closePath()),this.colorFillStyle(r,m[0],m[1],m[2],b),r.fill(),d+=w)}};yt.drawStripe=function(r,e,t,a){e=e[0],a=a||e.position();var n=e.cy().style(),i=a.x,s=a.y,o=e.width(),l=e.height(),u=0,v=this.usePaths();r.save();var f=e.pstyle("stripe-direction").value,c=e.pstyle("stripe-size");switch(f){case"vertical":break;case"righward":r.rotate(-Math.PI/2);break}var h=o,d=l;c.units==="%"?(h=h*c.pfValue,d=d*c.pfValue):c.pfValue!==void 0&&(h=c.pfValue,d=c.pfValue),v&&(i=0,s=0),s-=h/2,i-=d/2;for(var y=1;y<=n.stripeBackgroundN;y++){var g=e.pstyle("stripe-"+y+"-background-size").value,p=e.pstyle("stripe-"+y+"-background-color").value,m=e.pstyle("stripe-"+y+"-background-opacity").value*t,b=g/100;b+u>1&&(b=1-u),!(g===0||u>=1||u+b>1)&&(r.beginPath(),r.rect(i,s+d*u,h,d*b),r.closePath(),this.colorFillStyle(r,p[0],p[1],p[2],m),r.fill(),u+=b)}r.restore()};var xr={},_y=100;xr.getPixelRatio=function(){var r=this.data.contexts[0];if(this.forcedPixelRatio!=null)return this.forcedPixelRatio;var e=this.cy.window(),t=r.backingStorePixelRatio||r.webkitBackingStorePixelRatio||r.mozBackingStorePixelRatio||r.msBackingStorePixelRatio||r.oBackingStorePixelRatio||r.backingStorePixelRatio||1;return(e.devicePixelRatio||1)/t};xr.paintCache=function(r){for(var e=this.paintCaches=this.paintCaches||[],t=!0,a,n=0;ne.minMbLowQualFrames&&(e.motionBlurPxRatio=e.mbPxRBlurry)),e.clearingMotionBlur&&(e.motionBlurPxRatio=1),e.textureDrawLastFrame&&!f&&(v[e.NODE]=!0,v[e.SELECT_BOX]=!0);var m=t.style(),b=t.zoom(),w=s!==void 0?s:b,E=t.pan(),C={x:E.x,y:E.y},x={zoom:b,pan:{x:E.x,y:E.y}},T=e.prevViewport,k=T===void 0||x.zoom!==T.zoom||x.pan.x!==T.pan.x||x.pan.y!==T.pan.y;!k&&!(y&&!d)&&(e.motionBlurPxRatio=1),o&&(C=o),w*=l,C.x*=l,C.y*=l;var D=e.getCachedZSortedEles();function B(J,z,q,H,Y){var te=J.globalCompositeOperation;J.globalCompositeOperation="destination-out",e.colorFillStyle(J,255,255,255,e.motionBlurTransparency),J.fillRect(z,q,H,Y),J.globalCompositeOperation=te}function P(J,z){var q,H,Y,te;!e.clearingMotionBlur&&(J===u.bufferContexts[e.MOTIONBLUR_BUFFER_NODE]||J===u.bufferContexts[e.MOTIONBLUR_BUFFER_DRAG])?(q={x:E.x*h,y:E.y*h},H=b*h,Y=e.canvasWidth*h,te=e.canvasHeight*h):(q=C,H=w,Y=e.canvasWidth,te=e.canvasHeight),J.setTransform(1,0,0,1,0,0),z==="motionBlur"?B(J,0,0,Y,te):!a&&(z===void 0||z)&&J.clearRect(0,0,Y,te),n||(J.translate(q.x,q.y),J.scale(H,H)),o&&J.translate(o.x,o.y),s&&J.scale(s,s)}if(f||(e.textureDrawLastFrame=!1),f){if(e.textureDrawLastFrame=!0,!e.textureCache){e.textureCache={},e.textureCache.bb=t.mutableElements().boundingBox(),e.textureCache.texture=e.data.bufferCanvases[e.TEXTURE_BUFFER];var A=e.data.bufferContexts[e.TEXTURE_BUFFER];A.setTransform(1,0,0,1,0,0),A.clearRect(0,0,e.canvasWidth*e.textureMult,e.canvasHeight*e.textureMult),e.render({forcedContext:A,drawOnlyNodeLayer:!0,forcedPxRatio:l*e.textureMult});var x=e.textureCache.viewport={zoom:t.zoom(),pan:t.pan(),width:e.canvasWidth,height:e.canvasHeight};x.mpan={x:(0-x.pan.x)/x.zoom,y:(0-x.pan.y)/x.zoom}}v[e.DRAG]=!1,v[e.NODE]=!1;var R=u.contexts[e.NODE],L=e.textureCache.texture,x=e.textureCache.viewport;R.setTransform(1,0,0,1,0,0),c?B(R,0,0,x.width,x.height):R.clearRect(0,0,x.width,x.height);var I=m.core("outside-texture-bg-color").value,M=m.core("outside-texture-bg-opacity").value;e.colorFillStyle(R,I[0],I[1],I[2],M),R.fillRect(0,0,x.width,x.height);var b=t.zoom();P(R,!1),R.clearRect(x.mpan.x,x.mpan.y,x.width/x.zoom/l,x.height/x.zoom/l),R.drawImage(L,x.mpan.x,x.mpan.y,x.width/x.zoom/l,x.height/x.zoom/l)}else e.textureOnViewport&&!a&&(e.textureCache=null);var O=t.extent(),V=e.pinching||e.hoverData.dragging||e.swipePanning||e.data.wheelZooming||e.hoverData.draggingEles||e.cy.animated(),G=e.hideEdgesOnViewport&&V,N=[];if(N[e.NODE]=!v[e.NODE]&&c&&!e.clearedForMotionBlur[e.NODE]||e.clearingMotionBlur,N[e.NODE]&&(e.clearedForMotionBlur[e.NODE]=!0),N[e.DRAG]=!v[e.DRAG]&&c&&!e.clearedForMotionBlur[e.DRAG]||e.clearingMotionBlur,N[e.DRAG]&&(e.clearedForMotionBlur[e.DRAG]=!0),v[e.NODE]||n||i||N[e.NODE]){var F=c&&!N[e.NODE]&&h!==1,R=a||(F?e.data.bufferContexts[e.MOTIONBLUR_BUFFER_NODE]:u.contexts[e.NODE]),U=c&&!F?"motionBlur":void 0;P(R,U),G?e.drawCachedNodes(R,D.nondrag,l,O):e.drawLayeredElements(R,D.nondrag,l,O),e.debug&&e.drawDebugPoints(R,D.nondrag),!n&&!c&&(v[e.NODE]=!1)}if(!i&&(v[e.DRAG]||n||N[e.DRAG])){var F=c&&!N[e.DRAG]&&h!==1,R=a||(F?e.data.bufferContexts[e.MOTIONBLUR_BUFFER_DRAG]:u.contexts[e.DRAG]);P(R,c&&!F?"motionBlur":void 0),G?e.drawCachedNodes(R,D.drag,l,O):e.drawCachedElements(R,D.drag,l,O),e.debug&&e.drawDebugPoints(R,D.drag),!n&&!c&&(v[e.DRAG]=!1)}if(this.drawSelectionRectangle(r,P),c&&h!==1){var Q=u.contexts[e.NODE],K=e.data.bufferCanvases[e.MOTIONBLUR_BUFFER_NODE],j=u.contexts[e.DRAG],re=e.data.bufferCanvases[e.MOTIONBLUR_BUFFER_DRAG],ne=function(z,q,H){z.setTransform(1,0,0,1,0,0),H||!p?z.clearRect(0,0,e.canvasWidth,e.canvasHeight):B(z,0,0,e.canvasWidth,e.canvasHeight);var Y=h;z.drawImage(q,0,0,e.canvasWidth*Y,e.canvasHeight*Y,0,0,e.canvasWidth,e.canvasHeight)};(v[e.NODE]||N[e.NODE])&&(ne(Q,K,N[e.NODE]),v[e.NODE]=!1),(v[e.DRAG]||N[e.DRAG])&&(ne(j,re,N[e.DRAG]),v[e.DRAG]=!1)}e.prevViewport=x,e.clearingMotionBlur&&(e.clearingMotionBlur=!1,e.motionBlurCleared=!0,e.motionBlur=!0),c&&(e.motionBlurTimeout=setTimeout(function(){e.motionBlurTimeout=null,e.clearedForMotionBlur[e.NODE]=!1,e.clearedForMotionBlur[e.DRAG]=!1,e.motionBlur=!1,e.clearingMotionBlur=!f,e.mbFrames=0,v[e.NODE]=!0,v[e.DRAG]=!0,e.redraw()},_y)),a||t.emit("render")};var ha;xr.drawSelectionRectangle=function(r,e){var t=this,a=t.cy,n=t.data,i=a.style(),s=r.drawOnlyNodeLayer,o=r.drawAllLayers,l=n.canvasNeedsRedraw,u=r.forcedContext;if(t.showFps||!s&&l[t.SELECT_BOX]&&!o){var v=u||n.contexts[t.SELECT_BOX];if(e(v),t.selection[4]==1&&(t.hoverData.selecting||t.touchData.selecting)){var f=t.cy.zoom(),c=i.core("selection-box-border-width").value/f;v.lineWidth=c,v.fillStyle="rgba("+i.core("selection-box-color").value[0]+","+i.core("selection-box-color").value[1]+","+i.core("selection-box-color").value[2]+","+i.core("selection-box-opacity").value+")",v.fillRect(t.selection[0],t.selection[1],t.selection[2]-t.selection[0],t.selection[3]-t.selection[1]),c>0&&(v.strokeStyle="rgba("+i.core("selection-box-border-color").value[0]+","+i.core("selection-box-border-color").value[1]+","+i.core("selection-box-border-color").value[2]+","+i.core("selection-box-opacity").value+")",v.strokeRect(t.selection[0],t.selection[1],t.selection[2]-t.selection[0],t.selection[3]-t.selection[1]))}if(n.bgActivePosistion&&!t.hoverData.selecting){var f=t.cy.zoom(),h=n.bgActivePosistion;v.fillStyle="rgba("+i.core("active-bg-color").value[0]+","+i.core("active-bg-color").value[1]+","+i.core("active-bg-color").value[2]+","+i.core("active-bg-opacity").value+")",v.beginPath(),v.arc(h.x,h.y,i.core("active-bg-size").pfValue/f,0,2*Math.PI),v.fill()}var d=t.lastRedrawTime;if(t.showFps&&d){d=Math.round(d);var y=Math.round(1e3/d),g="1 frame = "+d+" ms = "+y+" fps";if(v.setTransform(1,0,0,1,0,0),v.fillStyle="rgba(255, 0, 0, 0.75)",v.strokeStyle="rgba(255, 0, 0, 0.75)",v.font="30px Arial",!ha){var p=v.measureText(g);ha=p.actualBoundingBoxAscent}v.fillText(g,0,ha);var m=60;v.strokeRect(0,ha+10,250,20),v.fillRect(0,ha+10,250*Math.min(y/m,1),20)}o||(l[t.SELECT_BOX]=!1)}};function Hl(r,e,t){var a=r.createShader(e);if(r.shaderSource(a,t),r.compileShader(a),!r.getShaderParameter(a,r.COMPILE_STATUS))throw new Error(r.getShaderInfoLog(a));return a}function Gy(r,e,t){var a=Hl(r,r.VERTEX_SHADER,e),n=Hl(r,r.FRAGMENT_SHADER,t),i=r.createProgram();if(r.attachShader(i,a),r.attachShader(i,n),r.linkProgram(i),!r.getProgramParameter(i,r.LINK_STATUS))throw new Error("Could not initialize shaders");return i}function Hy(r,e,t){t===void 0&&(t=e);var a=r.makeOffscreenCanvas(e,t),n=a.context=a.getContext("2d");return a.clear=function(){return n.clearRect(0,0,a.width,a.height)},a.clear(),a}function bo(r){var e=r.pixelRatio,t=r.cy.zoom(),a=r.cy.pan();return{zoom:t*e,pan:{x:a.x*e,y:a.y*e}}}function Wy(r){var e=r.pixelRatio,t=r.cy.zoom();return t*e}function $y(r,e,t,a,n){var i=a*t+e.x,s=n*t+e.y;return s=Math.round(r.canvasHeight-s),[i,s]}function Uy(r){return r.pstyle("background-fill").value!=="solid"||r.pstyle("background-image").strValue!=="none"?!1:r.pstyle("border-width").value===0||r.pstyle("border-opacity").value===0?!0:r.pstyle("border-style").value==="solid"}function Ky(r,e){if(r.length!==e.length)return!1;for(var t=0;t>0&255)/255,t[1]=(r>>8&255)/255,t[2]=(r>>16&255)/255,t[3]=(r>>24&255)/255,t}function Xy(r){return r[0]+(r[1]<<8)+(r[2]<<16)+(r[3]<<24)}function Yy(r,e){var t=r.createTexture();return t.buffer=function(a){r.bindTexture(r.TEXTURE_2D,t),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_S,r.CLAMP_TO_EDGE),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_T,r.CLAMP_TO_EDGE),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_MAG_FILTER,r.LINEAR),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_MIN_FILTER,r.LINEAR_MIPMAP_NEAREST),r.pixelStorei(r.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!0),r.texImage2D(r.TEXTURE_2D,0,r.RGBA,r.RGBA,r.UNSIGNED_BYTE,a),r.generateMipmap(r.TEXTURE_2D),r.bindTexture(r.TEXTURE_2D,null)},t.deleteTexture=function(){r.deleteTexture(t)},t}function Af(r,e){switch(e){case"float":return[1,r.FLOAT,4];case"vec2":return[2,r.FLOAT,4];case"vec3":return[3,r.FLOAT,4];case"vec4":return[4,r.FLOAT,4];case"int":return[1,r.INT,4];case"ivec2":return[2,r.INT,4]}}function Rf(r,e,t){switch(e){case r.FLOAT:return new Float32Array(t);case r.INT:return new Int32Array(t)}}function Zy(r,e,t,a,n,i){switch(e){case r.FLOAT:return new Float32Array(t.buffer,i*a,n);case r.INT:return new Int32Array(t.buffer,i*a,n)}}function Qy(r,e,t,a){var n=Af(r,e),i=Je(n,2),s=i[0],o=i[1],l=Rf(r,o,a),u=r.createBuffer();return r.bindBuffer(r.ARRAY_BUFFER,u),r.bufferData(r.ARRAY_BUFFER,l,r.STATIC_DRAW),o===r.FLOAT?r.vertexAttribPointer(t,s,o,!1,0,0):o===r.INT&&r.vertexAttribIPointer(t,s,o,0,0),r.enableVertexAttribArray(t),r.bindBuffer(r.ARRAY_BUFFER,null),u}function Fr(r,e,t,a){var n=Af(r,t),i=Je(n,3),s=i[0],o=i[1],l=i[2],u=Rf(r,o,e*s),v=s*l,f=r.createBuffer();r.bindBuffer(r.ARRAY_BUFFER,f),r.bufferData(r.ARRAY_BUFFER,e*v,r.DYNAMIC_DRAW),r.enableVertexAttribArray(a),o===r.FLOAT?r.vertexAttribPointer(a,s,o,!1,v,0):o===r.INT&&r.vertexAttribIPointer(a,s,o,v,0),r.vertexAttribDivisor(a,1),r.bindBuffer(r.ARRAY_BUFFER,null);for(var c=new Array(e),h=0;hs&&(o=s/a,l=a*o,u=n*o),{scale:o,texW:l,texH:u}}},{key:"draw",value:function(t,a,n){var i=this;if(this.locked)throw new Error("can't draw, atlas is locked");var s=this.texSize,o=this.texRows,l=this.texHeight,u=this.getScale(a),v=u.scale,f=u.texW,c=u.texH,h=function(b,w){if(n&&w){var E=w.context,C=b.x,x=b.row,T=C,k=l*x;E.save(),E.translate(T,k),E.scale(v,v),n(E,a),E.restore()}},d=[null,null],y=function(){h(i.freePointer,i.canvas),d[0]={x:i.freePointer.x,y:i.freePointer.row*l,w:f,h:c},d[1]={x:i.freePointer.x+f,y:i.freePointer.row*l,w:0,h:c},i.freePointer.x+=f,i.freePointer.x==s&&(i.freePointer.x=0,i.freePointer.row++)},g=function(){var b=i.scratch,w=i.canvas;b.clear(),h({x:0,row:0},b);var E=s-i.freePointer.x,C=f-E,x=l;{var T=i.freePointer.x,k=i.freePointer.row*l,D=E;w.context.drawImage(b,0,0,D,x,T,k,D,x),d[0]={x:T,y:k,w:D,h:c}}{var B=E,P=(i.freePointer.row+1)*l,A=C;w&&w.context.drawImage(b,B,0,A,x,0,P,A,x),d[1]={x:0,y:P,w:A,h:c}}i.freePointer.x=C,i.freePointer.row++},p=function(){i.freePointer.x=0,i.freePointer.row++};if(this.freePointer.x+f<=s)y();else{if(this.freePointer.row>=o-1)return!1;this.freePointer.x===s?(p(),y()):this.enableWrapping?g():(p(),y())}return this.keyToLocation.set(t,d),this.needsBuffer=!0,d}},{key:"getOffsets",value:function(t){return this.keyToLocation.get(t)}},{key:"isEmpty",value:function(){return this.freePointer.x===0&&this.freePointer.row===0}},{key:"canFit",value:function(t){if(this.locked)return!1;var a=this.texSize,n=this.texRows,i=this.getScale(t),s=i.texW;return this.freePointer.x+s>a?this.freePointer.row1&&arguments[1]!==void 0?arguments[1]:{},i=n.forceRedraw,s=i===void 0?!1:i,o=n.filterEle,l=o===void 0?function(){return!0}:o,u=n.filterType,v=u===void 0?function(){return!0}:u,f=!1,c=!1,h=kr(t),d;try{for(h.s();!(d=h.n()).done;){var y=d.value;if(l(y)){var g=kr(this.renderTypes.values()),p;try{var m=function(){var w=p.value,E=w.type;if(v(E)){var C=a.collections.get(w.collection),x=w.getKey(y),T=Array.isArray(x)?x:[x];if(s)T.forEach(function(P){return C.markKeyForGC(P)}),c=!0;else{var k=w.getID?w.getID(y):y.id(),D=a._key(E,k),B=a.typeAndIdToKey.get(D);B!==void 0&&!Ky(T,B)&&(f=!0,a.typeAndIdToKey.delete(D),B.forEach(function(P){return C.markKeyForGC(P)}))}}};for(g.s();!(p=g.n()).done;)m()}catch(b){g.e(b)}finally{g.f()}}}}catch(b){h.e(b)}finally{h.f()}return c&&(this.gc(),f=!1),f}},{key:"gc",value:function(){var t=kr(this.collections.values()),a;try{for(t.s();!(a=t.n()).done;){var n=a.value;n.gc()}}catch(i){t.e(i)}finally{t.f()}}},{key:"getOrCreateAtlas",value:function(t,a,n,i){var s=this.renderTypes.get(a),o=this.collections.get(s.collection),l=!1,u=o.draw(i,n,function(c){s.drawClipped?(c.save(),c.beginPath(),c.rect(0,0,n.w,n.h),c.clip(),s.drawElement(c,t,n,!0,!0),c.restore()):s.drawElement(c,t,n,!0,!0),l=!0});if(l){var v=s.getID?s.getID(t):t.id(),f=this._key(a,v);this.typeAndIdToKey.has(f)?this.typeAndIdToKey.get(f).push(i):this.typeAndIdToKey.set(f,[i])}return u}},{key:"getAtlasInfo",value:function(t,a){var n=this,i=this.renderTypes.get(a),s=i.getKey(t),o=Array.isArray(s)?s:[s];return o.map(function(l){var u=i.getBoundingBox(t,l),v=n.getOrCreateAtlas(t,a,u,l),f=v.getOffsets(l),c=Je(f,2),h=c[0],d=c[1];return{atlas:v,tex:h,tex1:h,tex2:d,bb:u}})}},{key:"getDebugInfo",value:function(){var t=[],a=kr(this.collections),n;try{for(a.s();!(n=a.n()).done;){var i=Je(n.value,2),s=i[0],o=i[1],l=o.getCounts(),u=l.keyCount,v=l.atlasCount;t.push({type:s,keyCount:u,atlasCount:v})}}catch(f){a.e(f)}finally{a.f()}return t}}])})(),sm=(function(){function r(e){ht(this,r),this.globalOptions=e,this.atlasSize=e.webglTexSize,this.maxAtlasesPerBatch=e.webglTexPerBatch,this.batchAtlases=[]}return gt(r,[{key:"getMaxAtlasesPerBatch",value:function(){return this.maxAtlasesPerBatch}},{key:"getAtlasSize",value:function(){return this.atlasSize}},{key:"getIndexArray",value:function(){return Array.from({length:this.maxAtlasesPerBatch},function(t,a){return a})}},{key:"startBatch",value:function(){this.batchAtlases=[]}},{key:"getAtlasCount",value:function(){return this.batchAtlases.length}},{key:"getAtlases",value:function(){return this.batchAtlases}},{key:"canAddToCurrentBatch",value:function(t){return this.batchAtlases.length===this.maxAtlasesPerBatch?this.batchAtlases.includes(t):!0}},{key:"getAtlasIndexForBatch",value:function(t){var a=this.batchAtlases.indexOf(t);if(a<0){if(this.batchAtlases.length===this.maxAtlasesPerBatch)throw new Error("cannot add more atlases to batch");this.batchAtlases.push(t),a=this.batchAtlases.length-1}return a}}])})(),om=` + float circleSD(vec2 p, float r) { + return distance(vec2(0), p) - r; // signed distance + } +`,um=` + float rectangleSD(vec2 p, vec2 b) { + vec2 d = abs(p)-b; + return distance(vec2(0),max(d,0.0)) + min(max(d.x,d.y),0.0); + } +`,lm=` + float roundRectangleSD(vec2 p, vec2 b, vec4 cr) { + cr.xy = (p.x > 0.0) ? cr.xy : cr.zw; + cr.x = (p.y > 0.0) ? cr.x : cr.y; + vec2 q = abs(p) - b + cr.x; + return min(max(q.x, q.y), 0.0) + distance(vec2(0), max(q, 0.0)) - cr.x; + } +`,vm=` + float ellipseSD(vec2 p, vec2 ab) { + p = abs( p ); // symmetry + + // find root with Newton solver + vec2 q = ab*(p-ab); + float w = (q.x1.0) ? d : -d; + } +`,Ea={SCREEN:{name:"screen",screen:!0},PICKING:{name:"picking",picking:!0}},An={IGNORE:1,USE_BB:2},Cs=0,Kl=1,Xl=2,Ts=3,_t=4,sn=5,ga=6,pa=7,fm=(function(){function r(e,t,a){ht(this,r),this.r=e,this.gl=t,this.maxInstances=a.webglBatchSize,this.atlasSize=a.webglTexSize,this.bgColor=a.bgColor,this.debug=a.webglDebug,this.batchDebugInfo=[],a.enableWrapping=!0,a.createTextureCanvas=Hy,this.atlasManager=new im(e,a),this.batchManager=new sm(a),this.simpleShapeOptions=new Map,this.program=this._createShaderProgram(Ea.SCREEN),this.pickingProgram=this._createShaderProgram(Ea.PICKING),this.vao=this._createVAO()}return gt(r,[{key:"addAtlasCollection",value:function(t,a){this.atlasManager.addAtlasCollection(t,a)}},{key:"addTextureAtlasRenderType",value:function(t,a){this.atlasManager.addRenderType(t,a)}},{key:"addSimpleShapeRenderType",value:function(t,a){this.simpleShapeOptions.set(t,a)}},{key:"invalidate",value:function(t){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=a.type,i=this.atlasManager;return n?i.invalidate(t,{filterType:function(o){return o===n},forceRedraw:!0}):i.invalidate(t)}},{key:"gc",value:function(){this.atlasManager.gc()}},{key:"_createShaderProgram",value:function(t){var a=this.gl,n=`#version 300 es + precision highp float; + + uniform mat3 uPanZoomMatrix; + uniform int uAtlasSize; + + // instanced + in vec2 aPosition; // a vertex from the unit square + + in mat3 aTransform; // used to transform verticies, eg into a bounding box + in int aVertType; // the type of thing we are rendering + + // the z-index that is output when using picking mode + in vec4 aIndex; + + // For textures + in int aAtlasId; // which shader unit/atlas to use + in vec4 aTex; // x/y/w/h of texture in atlas + + // for edges + in vec4 aPointAPointB; + in vec4 aPointCPointD; + in vec2 aLineWidth; // also used for node border width + + // simple shapes + in vec4 aCornerRadius; // for round-rectangle [top-right, bottom-right, top-left, bottom-left] + in vec4 aColor; // also used for edges + in vec4 aBorderColor; // aLineWidth is used for border width + + // output values passed to the fragment shader + out vec2 vTexCoord; + out vec4 vColor; + out vec2 vPosition; + // flat values are not interpolated + flat out int vAtlasId; + flat out int vVertType; + flat out vec2 vTopRight; + flat out vec2 vBotLeft; + flat out vec4 vCornerRadius; + flat out vec4 vBorderColor; + flat out vec2 vBorderWidth; + flat out vec4 vIndex; + + void main(void) { + int vid = gl_VertexID; + vec2 position = aPosition; // TODO make this a vec3, simplifies some code below + + if(aVertType == `.concat(Cs,`) { + float texX = aTex.x; // texture coordinates + float texY = aTex.y; + float texW = aTex.z; + float texH = aTex.w; + + if(vid == 1 || vid == 2 || vid == 4) { + texX += texW; + } + if(vid == 2 || vid == 4 || vid == 5) { + texY += texH; + } + + float d = float(uAtlasSize); + vTexCoord = vec2(texX / d, texY / d); // tex coords must be between 0 and 1 + + gl_Position = vec4(uPanZoomMatrix * aTransform * vec3(position, 1.0), 1.0); + } + else if(aVertType == `).concat(_t," || aVertType == ").concat(pa,` + || aVertType == `).concat(sn," || aVertType == ").concat(ga,`) { // simple shapes + + // the bounding box is needed by the fragment shader + vBotLeft = (aTransform * vec3(0, 0, 1)).xy; // flat + vTopRight = (aTransform * vec3(1, 1, 1)).xy; // flat + vPosition = (aTransform * vec3(position, 1)).xy; // will be interpolated + + // calculations are done in the fragment shader, just pass these along + vColor = aColor; + vCornerRadius = aCornerRadius; + vBorderColor = aBorderColor; + vBorderWidth = aLineWidth; + + gl_Position = vec4(uPanZoomMatrix * aTransform * vec3(position, 1.0), 1.0); + } + else if(aVertType == `).concat(Kl,`) { + vec2 source = aPointAPointB.xy; + vec2 target = aPointAPointB.zw; + + // adjust the geometry so that the line is centered on the edge + position.y = position.y - 0.5; + + // stretch the unit square into a long skinny rectangle + vec2 xBasis = target - source; + vec2 yBasis = normalize(vec2(-xBasis.y, xBasis.x)); + vec2 point = source + xBasis * position.x + yBasis * aLineWidth[0] * position.y; + + gl_Position = vec4(uPanZoomMatrix * vec3(point, 1.0), 1.0); + vColor = aColor; + } + else if(aVertType == `).concat(Xl,`) { + vec2 pointA = aPointAPointB.xy; + vec2 pointB = aPointAPointB.zw; + vec2 pointC = aPointCPointD.xy; + vec2 pointD = aPointCPointD.zw; + + // adjust the geometry so that the line is centered on the edge + position.y = position.y - 0.5; + + vec2 p0, p1, p2, pos; + if(position.x == 0.0) { // The left side of the unit square + p0 = pointA; + p1 = pointB; + p2 = pointC; + pos = position; + } else { // The right side of the unit square, use same approach but flip the geometry upside down + p0 = pointD; + p1 = pointC; + p2 = pointB; + pos = vec2(0.0, -position.y); + } + + vec2 p01 = p1 - p0; + vec2 p12 = p2 - p1; + vec2 p21 = p1 - p2; + + // Find the normal vector. + vec2 tangent = normalize(normalize(p12) + normalize(p01)); + vec2 normal = vec2(-tangent.y, tangent.x); + + // Find the vector perpendicular to p0 -> p1. + vec2 p01Norm = normalize(vec2(-p01.y, p01.x)); + + // Determine the bend direction. + float sigma = sign(dot(p01 + p21, normal)); + float width = aLineWidth[0]; + + if(sign(pos.y) == -sigma) { + // This is an intersecting vertex. Adjust the position so that there's no overlap. + vec2 point = 0.5 * width * normal * -sigma / dot(normal, p01Norm); + gl_Position = vec4(uPanZoomMatrix * vec3(p1 + point, 1.0), 1.0); + } else { + // This is a non-intersecting vertex. Treat it like a mitre join. + vec2 point = 0.5 * width * normal * sigma * dot(normal, p01Norm); + gl_Position = vec4(uPanZoomMatrix * vec3(p1 + point, 1.0), 1.0); + } + + vColor = aColor; + } + else if(aVertType == `).concat(Ts,` && vid < 3) { + // massage the first triangle into an edge arrow + if(vid == 0) + position = vec2(-0.15, -0.3); + if(vid == 1) + position = vec2( 0.0, 0.0); + if(vid == 2) + position = vec2( 0.15, -0.3); + + gl_Position = vec4(uPanZoomMatrix * aTransform * vec3(position, 1.0), 1.0); + vColor = aColor; + } + else { + gl_Position = vec4(2.0, 0.0, 0.0, 1.0); // discard vertex by putting it outside webgl clip space + } + + vAtlasId = aAtlasId; + vVertType = aVertType; + vIndex = aIndex; + } + `),i=this.batchManager.getIndexArray(),s=`#version 300 es + precision highp float; + + // declare texture unit for each texture atlas in the batch + `.concat(i.map(function(u){return"uniform sampler2D uTexture".concat(u,";")}).join(` + `),` + + uniform vec4 uBGColor; + uniform float uZoom; + + in vec2 vTexCoord; + in vec4 vColor; + in vec2 vPosition; // model coordinates + + flat in int vAtlasId; + flat in vec4 vIndex; + flat in int vVertType; + flat in vec2 vTopRight; + flat in vec2 vBotLeft; + flat in vec4 vCornerRadius; + flat in vec4 vBorderColor; + flat in vec2 vBorderWidth; + + out vec4 outColor; + + `).concat(om,` + `).concat(um,` + `).concat(lm,` + `).concat(vm,` + + vec4 blend(vec4 top, vec4 bot) { // blend colors with premultiplied alpha + return vec4( + top.rgb + (bot.rgb * (1.0 - top.a)), + top.a + (bot.a * (1.0 - top.a)) + ); + } + + vec4 distInterp(vec4 cA, vec4 cB, float d) { // interpolate color using Signed Distance + // scale to the zoom level so that borders don't look blurry when zoomed in + // note 1.5 is an aribitrary value chosen because it looks good + return mix(cA, cB, 1.0 - smoothstep(0.0, 1.5 / uZoom, abs(d))); + } + + void main(void) { + if(vVertType == `).concat(Cs,`) { + // look up the texel from the texture unit + `).concat(i.map(function(u){return"if(vAtlasId == ".concat(u,") outColor = texture(uTexture").concat(u,", vTexCoord);")}).join(` + else `),` + } + else if(vVertType == `).concat(Ts,`) { + // mimics how canvas renderer uses context.globalCompositeOperation = 'destination-out'; + outColor = blend(vColor, uBGColor); + outColor.a = 1.0; // make opaque, masks out line under arrow + } + else if(vVertType == `).concat(_t,` && vBorderWidth == vec2(0.0)) { // simple rectangle with no border + outColor = vColor; // unit square is already transformed to the rectangle, nothing else needs to be done + } + else if(vVertType == `).concat(_t," || vVertType == ").concat(pa,` + || vVertType == `).concat(sn," || vVertType == ").concat(ga,`) { // use SDF + + float outerBorder = vBorderWidth[0]; + float innerBorder = vBorderWidth[1]; + float borderPadding = outerBorder * 2.0; + float w = vTopRight.x - vBotLeft.x - borderPadding; + float h = vTopRight.y - vBotLeft.y - borderPadding; + vec2 b = vec2(w/2.0, h/2.0); // half width, half height + vec2 p = vPosition - vec2(vTopRight.x - b[0] - outerBorder, vTopRight.y - b[1] - outerBorder); // translate to center + + float d; // signed distance + if(vVertType == `).concat(_t,`) { + d = rectangleSD(p, b); + } else if(vVertType == `).concat(pa,` && w == h) { + d = circleSD(p, b.x); // faster than ellipse + } else if(vVertType == `).concat(pa,`) { + d = ellipseSD(p, b); + } else { + d = roundRectangleSD(p, b, vCornerRadius.wzyx); + } + + // use the distance to interpolate a color to smooth the edges of the shape, doesn't need multisampling + // we must smooth colors inwards, because we can't change pixels outside the shape's bounding box + if(d > 0.0) { + if(d > outerBorder) { + discard; + } else { + outColor = distInterp(vBorderColor, vec4(0), d - outerBorder); + } + } else { + if(d > innerBorder) { + vec4 outerColor = outerBorder == 0.0 ? vec4(0) : vBorderColor; + vec4 innerBorderColor = blend(vBorderColor, vColor); + outColor = distInterp(innerBorderColor, outerColor, d); + } + else { + vec4 outerColor; + if(innerBorder == 0.0 && outerBorder == 0.0) { + outerColor = vec4(0); + } else if(innerBorder == 0.0) { + outerColor = vBorderColor; + } else { + outerColor = blend(vBorderColor, vColor); + } + outColor = distInterp(vColor, outerColor, d - innerBorder); + } + } + } + else { + outColor = vColor; + } + + `).concat(t.picking?`if(outColor.a == 0.0) discard; + else outColor = vIndex;`:"",` + } + `),o=Gy(a,n,s);o.aPosition=a.getAttribLocation(o,"aPosition"),o.aIndex=a.getAttribLocation(o,"aIndex"),o.aVertType=a.getAttribLocation(o,"aVertType"),o.aTransform=a.getAttribLocation(o,"aTransform"),o.aAtlasId=a.getAttribLocation(o,"aAtlasId"),o.aTex=a.getAttribLocation(o,"aTex"),o.aPointAPointB=a.getAttribLocation(o,"aPointAPointB"),o.aPointCPointD=a.getAttribLocation(o,"aPointCPointD"),o.aLineWidth=a.getAttribLocation(o,"aLineWidth"),o.aColor=a.getAttribLocation(o,"aColor"),o.aCornerRadius=a.getAttribLocation(o,"aCornerRadius"),o.aBorderColor=a.getAttribLocation(o,"aBorderColor"),o.uPanZoomMatrix=a.getUniformLocation(o,"uPanZoomMatrix"),o.uAtlasSize=a.getUniformLocation(o,"uAtlasSize"),o.uBGColor=a.getUniformLocation(o,"uBGColor"),o.uZoom=a.getUniformLocation(o,"uZoom"),o.uTextures=[];for(var l=0;l1&&arguments[1]!==void 0?arguments[1]:Ea.SCREEN;this.panZoomMatrix=t,this.renderTarget=a,this.batchDebugInfo=[],this.wrappedCount=0,this.simpleCount=0,this.startBatch()}},{key:"startBatch",value:function(){this.instanceCount=0,this.batchManager.startBatch()}},{key:"endFrame",value:function(){this.endBatch()}},{key:"_isVisible",value:function(t,a){return t.visible()?a&&a.isVisible?a.isVisible(t):!0:!1}},{key:"drawTexture",value:function(t,a,n){var i=this.atlasManager,s=this.batchManager,o=i.getRenderTypeOpts(n);if(this._isVisible(t,o)&&!(t.isEdge()&&!this._isValidEdge(t))){if(this.renderTarget.picking&&o.getTexPickingMode){var l=o.getTexPickingMode(t);if(l===An.IGNORE)return;if(l==An.USE_BB){this.drawPickingRectangle(t,a,n);return}}var u=i.getAtlasInfo(t,n),v=kr(u),f;try{for(v.s();!(f=v.n()).done;){var c=f.value,h=c.atlas,d=c.tex1,y=c.tex2;s.canAddToCurrentBatch(h)||this.endBatch();for(var g=s.getAtlasIndexForBatch(h),p=0,m=[[d,!0],[y,!1]];p=this.maxInstances&&this.endBatch()}}}}catch(B){v.e(B)}finally{v.f()}}}},{key:"setTransformMatrix",value:function(t,a,n,i){var s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,o=0;if(n.shapeProps&&n.shapeProps.padding&&(o=t.pstyle(n.shapeProps.padding).pfValue),i){var l=i.bb,u=i.tex1,v=i.tex2,f=u.w/(u.w+v.w);s||(f=1-f);var c=this._getAdjustedBB(l,o,s,f);this._applyTransformMatrix(a,c,n,t)}else{var h=n.getBoundingBox(t),d=this._getAdjustedBB(h,o,!0,1);this._applyTransformMatrix(a,d,n,t)}}},{key:"_applyTransformMatrix",value:function(t,a,n,i){var s,o;$l(t);var l=n.getRotation?n.getRotation(i):0;if(l!==0){var u=n.getRotationPoint(i),v=u.x,f=u.y;yn(t,t,[v,f]),Ul(t,t,l);var c=n.getRotationOffset(i);s=c.x+(a.xOffset||0),o=c.y+(a.yOffset||0)}else s=a.x1,o=a.y1;yn(t,t,[s,o]),Ws(t,t,[a.w,a.h])}},{key:"_getAdjustedBB",value:function(t,a,n,i){var s=t.x1,o=t.y1,l=t.w,u=t.h,v=t.yOffset;a&&(s-=a,o-=a,l+=2*a,u+=2*a);var f=0,c=l*i;return n&&i<1?l=c:!n&&i<1&&(f=l-c,s+=f,l=c),{x1:s,y1:o,w:l,h:u,xOffset:f,yOffset:v}}},{key:"drawPickingRectangle",value:function(t,a,n){var i=this.atlasManager.getRenderTypeOpts(n),s=this.instanceCount;this.vertTypeBuffer.getView(s)[0]=_t;var o=this.indexBuffer.getView(s);qt(a,o);var l=this.colorBuffer.getView(s);xt([0,0,0],1,l);var u=this.transformBuffer.getMatrixView(s);this.setTransformMatrix(t,u,i),this.simpleCount++,this.instanceCount++,this.instanceCount>=this.maxInstances&&this.endBatch()}},{key:"drawNode",value:function(t,a,n){var i=this.simpleShapeOptions.get(n);if(this._isVisible(t,i)){var s=i.shapeProps,o=this._getVertTypeForShape(t,s.shape);if(o===void 0||i.isSimple&&!i.isSimple(t)){this.drawTexture(t,a,n);return}var l=this.instanceCount;if(this.vertTypeBuffer.getView(l)[0]=o,o===sn||o===ga){var u=i.getBoundingBox(t),v=this._getCornerRadius(t,s.radius,u),f=this.cornerRadiusBuffer.getView(l);f[0]=v,f[1]=v,f[2]=v,f[3]=v,o===ga&&(f[0]=0,f[2]=0)}var c=this.indexBuffer.getView(l);qt(a,c);var h=t.pstyle(s.color).value,d=t.pstyle(s.opacity).value,y=this.colorBuffer.getView(l);xt(h,d,y);var g=this.lineWidthBuffer.getView(l);if(g[0]=0,g[1]=0,s.border){var p=t.pstyle("border-width").value;if(p>0){var m=t.pstyle("border-color").value,b=t.pstyle("border-opacity").value,w=this.borderColorBuffer.getView(l);xt(m,b,w);var E=t.pstyle("border-position").value;if(E==="inside")g[0]=0,g[1]=-p;else if(E==="outside")g[0]=p,g[1]=0;else{var C=p/2;g[0]=C,g[1]=-C}}}var x=this.transformBuffer.getMatrixView(l);this.setTransformMatrix(t,x,i),this.simpleCount++,this.instanceCount++,this.instanceCount>=this.maxInstances&&this.endBatch()}}},{key:"_getVertTypeForShape",value:function(t,a){var n=t.pstyle(a).value;switch(n){case"rectangle":return _t;case"ellipse":return pa;case"roundrectangle":case"round-rectangle":return sn;case"bottom-round-rectangle":return ga;default:return}}},{key:"_getCornerRadius",value:function(t,a,n){var i=n.w,s=n.h;if(t.pstyle(a).value==="auto")return vt(i,s);var o=t.pstyle(a).pfValue,l=i/2,u=s/2;return Math.min(o,u,l)}},{key:"drawEdgeArrow",value:function(t,a,n){if(t.visible()){var i=t._private.rscratch,s,o,l;if(n==="source"?(s=i.arrowStartX,o=i.arrowStartY,l=i.srcArrowAngle):(s=i.arrowEndX,o=i.arrowEndY,l=i.tgtArrowAngle),!(isNaN(s)||s==null||isNaN(o)||o==null||isNaN(l)||l==null)){var u=t.pstyle(n+"-arrow-shape").value;if(u!=="none"){var v=t.pstyle(n+"-arrow-color").value,f=t.pstyle("opacity").value,c=t.pstyle("line-opacity").value,h=f*c,d=t.pstyle("width").pfValue,y=t.pstyle("arrow-scale").value,g=this.r.getArrowWidth(d,y),p=this.instanceCount,m=this.transformBuffer.getMatrixView(p);$l(m),yn(m,m,[s,o]),Ws(m,m,[g,g]),Ul(m,m,l),this.vertTypeBuffer.getView(p)[0]=Ts;var b=this.indexBuffer.getView(p);qt(a,b);var w=this.colorBuffer.getView(p);xt(v,h,w),this.instanceCount++,this.instanceCount>=this.maxInstances&&this.endBatch()}}}}},{key:"drawEdgeLine",value:function(t,a){if(t.visible()){var n=this._getEdgePoints(t);if(n){var i=t.pstyle("opacity").value,s=t.pstyle("line-opacity").value,o=t.pstyle("width").pfValue,l=t.pstyle("line-color").value,u=i*s;if(n.length/2+this.instanceCount>this.maxInstances&&this.endBatch(),n.length==4){var v=this.instanceCount;this.vertTypeBuffer.getView(v)[0]=Kl;var f=this.indexBuffer.getView(v);qt(a,f);var c=this.colorBuffer.getView(v);xt(l,u,c);var h=this.lineWidthBuffer.getView(v);h[0]=o;var d=this.pointAPointBBuffer.getView(v);d[0]=n[0],d[1]=n[1],d[2]=n[2],d[3]=n[3],this.instanceCount++,this.instanceCount>=this.maxInstances&&this.endBatch()}else for(var y=0;y=this.maxInstances&&this.endBatch()}}}}},{key:"_isValidEdge",value:function(t){var a=t._private.rscratch;return!(a.badLine||a.allpts==null||isNaN(a.allpts[0]))}},{key:"_getEdgePoints",value:function(t){var a=t._private.rscratch;if(this._isValidEdge(t)){var n=a.allpts;if(n.length==4)return n;var i=this._getNumSegments(t);return this._getCurveSegmentPoints(n,i)}}},{key:"_getNumSegments",value:function(t){var a=15;return Math.min(Math.max(a,5),this.maxInstances)}},{key:"_getCurveSegmentPoints",value:function(t,a){if(t.length==4)return t;for(var n=Array((a+1)*2),i=0;i<=a;i++)if(i==0)n[0]=t[0],n[1]=t[1];else if(i==a)n[i*2]=t[t.length-2],n[i*2+1]=t[t.length-1];else{var s=i/a;this._setCurvePoint(t,s,n,i*2)}return n}},{key:"_setCurvePoint",value:function(t,a,n,i){if(t.length<=2)n[i]=t[0],n[i+1]=t[1];else{for(var s=Array(t.length-2),o=0;o0}},o=function(f){var c=f.pstyle("text-events").strValue==="yes";return c?An.USE_BB:An.IGNORE},l=function(f){var c=f.position(),h=c.x,d=c.y,y=f.outerWidth(),g=f.outerHeight();return{w:y,h:g,x1:h-y/2,y1:d-g/2}};t.drawing.addAtlasCollection("node",{texRows:r.webglTexRowsNodes}),t.drawing.addAtlasCollection("label",{texRows:r.webglTexRows}),t.drawing.addTextureAtlasRenderType("node-body",{collection:"node",getKey:e.getStyleKey,getBoundingBox:e.getElementBox,drawElement:e.drawElement}),t.drawing.addSimpleShapeRenderType("node-body",{getBoundingBox:l,isSimple:Uy,shapeProps:{shape:"shape",color:"background-color",opacity:"background-opacity",radius:"corner-radius",border:!0}}),t.drawing.addSimpleShapeRenderType("node-overlay",{getBoundingBox:l,isVisible:s("overlay"),shapeProps:{shape:"overlay-shape",color:"overlay-color",opacity:"overlay-opacity",padding:"overlay-padding",radius:"overlay-corner-radius"}}),t.drawing.addSimpleShapeRenderType("node-underlay",{getBoundingBox:l,isVisible:s("underlay"),shapeProps:{shape:"underlay-shape",color:"underlay-color",opacity:"underlay-opacity",padding:"underlay-padding",radius:"underlay-corner-radius"}}),t.drawing.addTextureAtlasRenderType("label",{collection:"label",getTexPickingMode:o,getKey:Ss(e.getLabelKey,null),getBoundingBox:ks(e.getLabelBox,null),drawClipped:!0,drawElement:e.drawLabel,getRotation:n(null),getRotationPoint:e.getLabelRotationPoint,getRotationOffset:e.getLabelRotationOffset,isVisible:i("label")}),t.drawing.addTextureAtlasRenderType("edge-source-label",{collection:"label",getTexPickingMode:o,getKey:Ss(e.getSourceLabelKey,"source"),getBoundingBox:ks(e.getSourceLabelBox,"source"),drawClipped:!0,drawElement:e.drawSourceLabel,getRotation:n("source"),getRotationPoint:e.getSourceLabelRotationPoint,getRotationOffset:e.getSourceLabelRotationOffset,isVisible:i("source-label")}),t.drawing.addTextureAtlasRenderType("edge-target-label",{collection:"label",getTexPickingMode:o,getKey:Ss(e.getTargetLabelKey,"target"),getBoundingBox:ks(e.getTargetLabelBox,"target"),drawClipped:!0,drawElement:e.drawTargetLabel,getRotation:n("target"),getRotationPoint:e.getTargetLabelRotationPoint,getRotationOffset:e.getTargetLabelRotationOffset,isVisible:i("target-label")});var u=Fa(function(){console.log("garbage collect flag set"),t.data.gc=!0},1e4);t.onUpdateEleCalcs(function(v,f){var c=!1;f&&f.length>0&&(c|=t.drawing.invalidate(f)),c&&u()}),dm(t)};function cm(r){var e=r.cy.container(),t=e&&e.style&&e.style.backgroundColor||"white";return iv(t)}function Lf(r,e){var t=r._private.rscratch;return Tr(t,"labelWrapCachedLines",e)||[]}var Ss=function(e,t){return function(a){var n=e(a),i=Lf(a,t);return i.length>1?i.map(function(s,o){return"".concat(n,"_").concat(o)}):n}},ks=function(e,t){return function(a,n){var i=e(a);if(typeof n=="string"){var s=n.indexOf("_");if(s>0){var o=Number(n.substring(s+1)),l=Lf(a,t),u=i.h/l.length,v=u*o,f=i.y1+v;return{x1:i.x1,w:i.w,y1:f,h:u,yOffset:v}}}return i}};function dm(r){{var e=r.render;r.render=function(i){i=i||{};var s=r.cy;r.webgl&&(s.zoom()>Sf?(hm(r),e.call(r,i)):(gm(r),Of(r,i,Ea.SCREEN)))}}{var t=r.matchCanvasSize;r.matchCanvasSize=function(i){t.call(r,i),r.pickingFrameBuffer.setFramebufferAttachmentSizes(r.canvasWidth,r.canvasHeight),r.pickingFrameBuffer.needsDraw=!0}}r.findNearestElements=function(i,s,o,l){return xm(r,i,s)};{var a=r.invalidateCachedZSortedEles;r.invalidateCachedZSortedEles=function(){a.call(r),r.pickingFrameBuffer.needsDraw=!0}}{var n=r.notify;r.notify=function(i,s){n.call(r,i,s),i==="viewport"||i==="bounds"?r.pickingFrameBuffer.needsDraw=!0:i==="background"&&r.drawing.invalidate(s,{type:"node-body"})}}}function hm(r){var e=r.data.contexts[r.WEBGL];e.clear(e.COLOR_BUFFER_BIT|e.DEPTH_BUFFER_BIT)}function gm(r){var e=function(a){a.save(),a.setTransform(1,0,0,1,0,0),a.clearRect(0,0,r.canvasWidth,r.canvasHeight),a.restore()};e(r.data.contexts[r.NODE]),e(r.data.contexts[r.DRAG])}function pm(r){var e=r.canvasWidth,t=r.canvasHeight,a=bo(r),n=a.pan,i=a.zoom,s=Es();yn(s,s,[n.x,n.y]),Ws(s,s,[i,i]);var o=Es();rm(o,e,t);var l=Es();return em(l,o,s),l}function If(r,e){var t=r.canvasWidth,a=r.canvasHeight,n=bo(r),i=n.pan,s=n.zoom;e.setTransform(1,0,0,1,0,0),e.clearRect(0,0,t,a),e.translate(i.x,i.y),e.scale(s,s)}function ym(r,e){r.drawSelectionRectangle(e,function(t){return If(r,t)})}function mm(r){var e=r.data.contexts[r.NODE];e.save(),If(r,e),e.strokeStyle="rgba(0, 0, 0, 0.3)",e.beginPath(),e.moveTo(-1e3,0),e.lineTo(1e3,0),e.stroke(),e.beginPath(),e.moveTo(0,-1e3),e.lineTo(0,1e3),e.stroke(),e.restore()}function bm(r){var e=function(n,i,s){for(var o=n.atlasManager.getAtlasCollection(i),l=r.data.contexts[r.NODE],u=o.atlases,v=0;v=0&&w.add(x)}return w}function xm(r,e,t){var a=wm(r,e,t),n=r.getCachedZSortedEles(),i,s,o=kr(a),l;try{for(o.s();!(l=o.n()).done;){var u=l.value,v=n[u];if(!i&&v.isNode()&&(i=v),!s&&v.isEdge()&&(s=v),i&&s)break}}catch(f){o.e(f)}finally{o.f()}return[i,s].filter(Boolean)}function Ds(r,e,t){var a=r.drawing;e+=1,t.isNode()?(a.drawNode(t,e,"node-underlay"),a.drawNode(t,e,"node-body"),a.drawTexture(t,e,"label"),a.drawNode(t,e,"node-overlay")):(a.drawEdgeLine(t,e),a.drawEdgeArrow(t,e,"source"),a.drawEdgeArrow(t,e,"target"),a.drawTexture(t,e,"label"),a.drawTexture(t,e,"edge-source-label"),a.drawTexture(t,e,"edge-target-label"))}function Of(r,e,t){var a;r.webglDebug&&(a=performance.now());var n=r.drawing,i=0;if(t.screen&&r.data.canvasNeedsRedraw[r.SELECT_BOX]&&ym(r,e),r.data.canvasNeedsRedraw[r.NODE]||t.picking){var s=r.data.contexts[r.WEBGL];t.screen?(s.clearColor(0,0,0,0),s.enable(s.BLEND),s.blendFunc(s.ONE,s.ONE_MINUS_SRC_ALPHA)):s.disable(s.BLEND),s.clear(s.COLOR_BUFFER_BIT|s.DEPTH_BUFFER_BIT),s.viewport(0,0,s.canvas.width,s.canvas.height);var o=pm(r),l=r.getCachedZSortedEles();if(i=l.length,n.startFrame(o,t),t.screen){for(var u=0;u0&&s>0){h.clearRect(0,0,i,s),h.globalCompositeOperation="source-over";var d=this.getCachedZSortedEles();if(r.full)h.translate(-a.x1*u,-a.y1*u),h.scale(u,u),this.drawElements(h,d),h.scale(1/u,1/u),h.translate(a.x1*u,a.y1*u);else{var y=e.pan(),g={x:y.x*u,y:y.y*u};u*=e.zoom(),h.translate(g.x,g.y),h.scale(u,u),this.drawElements(h,d),h.scale(1/u,1/u),h.translate(-g.x,-g.y)}r.bg&&(h.globalCompositeOperation="destination-over",h.fillStyle=r.bg,h.rect(0,0,i,s),h.fill())}return c};function Em(r,e){for(var t=atob(r),a=new ArrayBuffer(t.length),n=new Uint8Array(a),i=0;i"u"?"undefined":ar(OffscreenCanvas))!=="undefined")t=new OffscreenCanvas(r,e);else{var a=this.cy.window(),n=a.document;t=n.createElement("canvas"),t.width=r,t.height=e}return t};[Df,Hr,Jr,mo,Lt,yt,xr,Mf,mt,Wa,Ff].forEach(function(r){be(ke,r)});var Sm=[{name:"null",impl:df},{name:"base",impl:Cf},{name:"canvas",impl:Cm}],km=[{type:"layout",extensions:Qp},{type:"renderer",extensions:Sm}],qf={},_f={};function Gf(r,e,t){var a=t,n=function(T){Ve("Can not register `"+e+"` for `"+r+"` since `"+T+"` already exists in the prototype and can not be overridden")};if(r==="core"){if(Ra.prototype[e])return n(e);Ra.prototype[e]=t}else if(r==="collection"){if(fr.prototype[e])return n(e);fr.prototype[e]=t}else if(r==="layout"){for(var i=function(T){this.options=T,t.call(this,T),Le(this._private)||(this._private={}),this._private.cy=T.cy,this._private.listeners=[],this.createEmitter()},s=i.prototype=Object.create(t.prototype),o=[],l=0;l{p.clear(),J.clear(),d.clear()},"clear"),D=w((e,t)=>{const n=p.get(t)||[];return i.trace("In isDescendant",t," ",e," = ",n.includes(e)),n.includes(e)},"isDescendant"),se=w((e,t)=>{const n=p.get(t)||[];return i.info("Descendants of ",t," is ",n),i.info("Edge is ",e),e.v===t||e.w===t?!1:n?n.includes(e.v)||D(e.v,t)||D(e.w,t)||n.includes(e.w):(i.debug("Tilt, ",t,",not in descendants"),!1)},"edgeInCluster"),G=w((e,t,n,a)=>{i.warn("Copying children of ",e,"root",a,"data",t.node(e),a);const r=t.children(e)||[];e!==a&&r.push(e),i.warn("Copying (nodes) clusterId",e,"nodes",r),r.forEach(o=>{if(t.children(o).length>0)G(o,t,n,a);else{const l=t.node(o);i.info("cp ",o," to ",a," with parent ",e),n.setNode(o,l),a!==t.parent(o)&&(i.warn("Setting parent",o,t.parent(o)),n.setParent(o,t.parent(o))),e!==a&&o!==e?(i.debug("Setting parent",o,e),n.setParent(o,e)):(i.info("In copy ",e,"root",a,"data",t.node(e),a),i.debug("Not Setting parent for node=",o,"cluster!==rootId",e!==a,"node!==clusterId",o!==e));const u=t.edges(o);i.debug("Copying Edges",u),u.forEach(c=>{i.info("Edge",c);const m=t.edge(c.v,c.w,c.name);i.info("Edge data",m,a);try{se(c,a)?(i.info("Copying as ",c.v,c.w,m,c.name),n.setEdge(c.v,c.w,m,c.name),i.info("newGraph edges ",n.edges(),n.edge(n.edges()[0]))):i.info("Skipping copy of edge ",c.v,"-->",c.w," rootId: ",a," clusterId:",e)}catch(v){i.error(v)}})}i.debug("Removing node",o),t.removeNode(o)})},"copy"),R=w((e,t)=>{const n=t.children(e);let a=[...n];for(const r of n)J.set(r,e),a=[...a,...R(r,t)];return a},"extractDescendants"),ie=w((e,t,n)=>{const a=e.edges().filter(c=>c.v===t||c.w===t),r=e.edges().filter(c=>c.v===n||c.w===n),o=a.map(c=>({v:c.v===t?n:c.v,w:c.w===t?t:c.w})),l=r.map(c=>({v:c.v,w:c.w}));return o.filter(c=>l.some(m=>c.v===m.v&&c.w===m.w))},"findCommonEdges"),C=w((e,t,n)=>{const a=t.children(e);if(i.trace("Searching children of id ",e,a),a.length<1)return e;let r;for(const o of a){const l=C(o,t,n),u=ie(t,n,l);if(l)if(u.length>0)r=l;else return l}return r},"findNonClusterChild"),k=w(e=>!d.has(e)||!d.get(e).externalConnections?e:d.has(e)?d.get(e).id:e,"getAnchorId"),re=w((e,t)=>{if(!e||t>10){i.debug("Opting out, no graph ");return}else i.debug("Opting in, graph ");e.nodes().forEach(function(n){e.children(n).length>0&&(i.warn("Cluster identified",n," Replacement id in edges: ",C(n,e,n)),p.set(n,R(n,e)),d.set(n,{id:C(n,e,n),clusterData:e.node(n)}))}),e.nodes().forEach(function(n){const a=e.children(n),r=e.edges();a.length>0?(i.debug("Cluster identified",n,p),r.forEach(o=>{const l=D(o.v,n),u=D(o.w,n);l^u&&(i.warn("Edge: ",o," leaves cluster ",n),i.warn("Descendants of XXX ",n,": ",p.get(n)),d.get(n).externalConnections=!0)})):i.debug("Not a cluster ",n,p)});for(let n of d.keys()){const a=d.get(n).id,r=e.parent(a);r!==n&&d.has(r)&&!d.get(r).externalConnections&&(d.get(n).id=r)}e.edges().forEach(function(n){const a=e.edge(n);i.warn("Edge "+n.v+" -> "+n.w+": "+JSON.stringify(n)),i.warn("Edge "+n.v+" -> "+n.w+": "+JSON.stringify(e.edge(n)));let r=n.v,o=n.w;if(i.warn("Fix XXX",d,"ids:",n.v,n.w,"Translating: ",d.get(n.v)," --- ",d.get(n.w)),d.get(n.v)||d.get(n.w)){if(i.warn("Fixing and trying - removing XXX",n.v,n.w,n.name),r=k(n.v),o=k(n.w),e.removeEdge(n.v,n.w,n.name),r!==n.v){const l=e.parent(r);d.get(l).externalConnections=!0,a.fromCluster=n.v}if(o!==n.w){const l=e.parent(o);d.get(l).externalConnections=!0,a.toCluster=n.w}i.warn("Fix Replacing with XXX",r,o,n.name),e.setEdge(r,o,a,n.name)}}),i.warn("Adjusted Graph",h(e)),T(e,0),i.trace(d)},"adjustClustersAndEdges"),T=w((e,t)=>{if(i.warn("extractor - ",t,h(e),e.children("D")),t>10){i.error("Bailing out");return}let n=e.nodes(),a=!1;for(const r of n){const o=e.children(r);a=a||o.length>0}if(!a){i.debug("Done, no node has children",e.nodes());return}i.debug("Nodes = ",n,t);for(const r of n)if(i.debug("Extracting node",r,d,d.has(r)&&!d.get(r).externalConnections,!e.parent(r),e.node(r),e.children("D")," Depth ",t),!d.has(r))i.debug("Not a cluster",r,t);else if(!d.get(r).externalConnections&&e.children(r)&&e.children(r).length>0){i.warn("Cluster without external connections, without a parent and with children",r,t);let l=e.graph().rankdir==="TB"?"LR":"TB";d.get(r)?.clusterData?.dir&&(l=d.get(r).clusterData.dir,i.warn("Fixing dir",d.get(r).clusterData.dir,l));const u=new B({multigraph:!0,compound:!0}).setGraph({rankdir:l,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});i.warn("Old graph before copy",h(e)),G(r,e,u,r),e.setNode(r,{clusterNode:!0,id:r,clusterData:d.get(r).clusterData,label:d.get(r).label,graph:u}),i.warn("New graph after copy node: (",r,")",h(u)),i.debug("Old graph after copy",h(e))}else i.warn("Cluster ** ",r," **not meeting the criteria !externalConnections:",!d.get(r).externalConnections," no parent: ",!e.parent(r)," children ",e.children(r)&&e.children(r).length>0,e.children("D"),t),i.debug(d);n=e.nodes(),i.warn("New list of nodes",n);for(const r of n){const o=e.node(r);i.warn(" Now next level",r,o),o?.clusterNode&&T(o.graph,t+1)}},"extractor"),M=w((e,t)=>{if(t.length===0)return[];let n=Object.assign([],t);return t.forEach(a=>{const r=e.children(a),o=M(e,r);n=[...n,...o]}),n},"sorter"),oe=w(e=>M(e,e.children()),"sortNodesByHierarchy"),j=w(async(e,t,n,a,r,o)=>{i.warn("Graph in recursive render:XAX",h(t),r);const l=t.graph().rankdir;i.trace("Dir in recursive render - dir:",l);const u=e.insert("g").attr("class","root");t.nodes()?i.info("Recursive render XXX",t.nodes()):i.info("No nodes found for",t),t.edges().length>0&&i.info("Recursive edges",t.edge(t.edges()[0]));const c=u.insert("g").attr("class","clusters"),m=u.insert("g").attr("class","edgePaths"),v=u.insert("g").attr("class","edgeLabels"),X=u.insert("g").attr("class","nodes");await Promise.all(t.nodes().map(async function(f){const s=t.node(f);if(r!==void 0){const g=JSON.parse(JSON.stringify(r.clusterData));i.trace(`Setting data for parent cluster XXX + Node.id = `,f,` + data=`,g.height,` +Parent cluster`,r.height),t.setNode(r.id,g),t.parent(f)||(i.trace("Setting parent",f,r.id),t.setParent(f,r.id,g))}if(i.info("(Insert) Node XXX"+f+": "+JSON.stringify(t.node(f))),s?.clusterNode){i.info("Cluster identified XBX",f,s.width,t.node(f));const{ranksep:g,nodesep:E}=t.graph();s.graph.setGraph({...s.graph.graph(),ranksep:g+25,nodesep:E});const N=await j(X,s.graph,n,a,t.node(f),o),x=N.elem;z(s,x),s.diff=N.diff||0,i.info("New compound node after recursive render XAX",f,"width",s.width,"height",s.height),U(x,s)}else t.children(f).length>0?(i.trace("Cluster - the non recursive path XBX",f,s.id,s,s.width,"Graph:",t),i.trace(C(s.id,t)),d.set(s.id,{id:C(s.id,t),node:s})):(i.trace("Node - the non recursive path XAX",f,X,t.node(f),l),await $(X,t.node(f),{config:o,dir:l}))})),await w(async()=>{const f=t.edges().map(async function(s){const g=t.edge(s.v,s.w,s.name);i.info("Edge "+s.v+" -> "+s.w+": "+JSON.stringify(s)),i.info("Edge "+s.v+" -> "+s.w+": ",s," ",JSON.stringify(t.edge(s))),i.info("Fix",d,"ids:",s.v,s.w,"Translating: ",d.get(s.v),d.get(s.w)),await Z(v,g)});await Promise.all(f)},"processEdges")(),i.info("Graph before layout:",JSON.stringify(h(t))),i.info("############################################# XXX"),i.info("### Layout ### XXX"),i.info("############################################# XXX"),I(t),i.info("Graph after layout:",JSON.stringify(h(t)));let O=0,{subGraphTitleTotalMargin:S}=q(o);return await Promise.all(oe(t).map(async function(f){const s=t.node(f);if(i.info("Position XBX => "+f+": ("+s.x,","+s.y,") width: ",s.width," height: ",s.height),s?.clusterNode)s.y+=S,i.info("A tainted cluster node XBX1",f,s.id,s.width,s.height,s.x,s.y,t.parent(f)),d.get(s.id).node=s,P(s);else if(t.children(f).length>0){i.info("A pure cluster node XBX1",f,s.id,s.x,s.y,s.width,s.height,t.parent(f)),s.height+=S,t.node(s.parentId);const g=s?.padding/2||0,E=s?.labelBBox?.height||0,N=E-g||0;i.debug("OffsetY",N,"labelHeight",E,"halfPadding",g),await K(c,s),d.get(s.id).node=s}else{const g=t.node(s.parentId);s.y+=S/2,i.info("A regular node XBX1 - using the padding",s.id,"parent",s.parentId,s.width,s.height,s.x,s.y,"offsetY",s.offsetY,"parent",g,g?.offsetY,s),P(s)}})),t.edges().forEach(function(f){const s=t.edge(f);i.info("Edge "+f.v+" -> "+f.w+": "+JSON.stringify(s),s),s.points.forEach(x=>x.y+=S/2);const g=t.node(f.v);var E=t.node(f.w);const N=Q(m,s,d,n,g,E,a);W(s,N)}),t.nodes().forEach(function(f){const s=t.node(f);i.info(f,s.type,s.diff),s.isGroup&&(O=s.diff)}),i.warn("Returning from recursive render XAX",u,O),{elem:u,diff:O}},"recursiveRender"),we=w(async(e,t)=>{const n=new B({multigraph:!0,compound:!0}).setGraph({rankdir:e.direction,nodesep:e.config?.nodeSpacing||e.config?.flowchart?.nodeSpacing||e.nodeSpacing,ranksep:e.config?.rankSpacing||e.config?.flowchart?.rankSpacing||e.rankSpacing,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}}),a=t.select("g");F(a,e.markers,e.type,e.diagramId),Y(),_(),H(),te(),e.nodes.forEach(o=>{n.setNode(o.id,{...o}),o.parentId&&n.setParent(o.id,o.parentId)}),i.debug("Edges:",e.edges),e.edges.forEach(o=>{if(o.start===o.end){const l=o.start,u=l+"---"+l+"---1",c=l+"---"+l+"---2",m=n.node(l);n.setNode(u,{domId:u,id:u,parentId:m.parentId,labelStyle:"",label:"",padding:0,shape:"labelRect",style:"",width:10,height:10}),n.setParent(u,m.parentId),n.setNode(c,{domId:c,id:c,parentId:m.parentId,labelStyle:"",padding:0,shape:"labelRect",label:"",style:"",width:10,height:10}),n.setParent(c,m.parentId);const v=structuredClone(o),X=structuredClone(o),y=structuredClone(o);v.label="",v.arrowTypeEnd="none",v.id=l+"-cyclic-special-1",X.arrowTypeStart="none",X.arrowTypeEnd="none",X.id=l+"-cyclic-special-mid",y.label="",m.isGroup&&(v.fromCluster=l,y.toCluster=l),y.id=l+"-cyclic-special-2",y.arrowTypeStart="none",n.setEdge(l,u,v,l+"-cyclic-special-0"),n.setEdge(u,c,X,l+"-cyclic-special-1"),n.setEdge(c,l,y,l+"-cyc=1e21?n.toLocaleString("en").replace(/,/g,""):n.toString(10)}function j(n,t){if((e=(n=t?n.toExponential(t-1):n.toExponential()).indexOf("e"))<0)return null;var e,i=n.slice(0,e);return[i.length>1?i[0]+i.slice(2):i,+n.slice(e+1)]}function J(n){return n=j(Math.abs(n)),n?n[1]:NaN}function K(n,t){return function(e,i){for(var o=e.length,f=[],c=0,u=n[0],p=0;o>0&&u>0&&(p+u+1>i&&(u=Math.max(1,i-p)),f.push(e.substring(o-=u,o+u)),!((p+=u+1)>i));)u=n[c=(c+1)%n.length];return f.reverse().join(t)}}function Q(n){return function(t){return t.replace(/[0-9]/g,function(e){return n[+e]})}}var V=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function N(n){if(!(t=V.exec(n)))throw new Error("invalid format: "+n);var t;return new $({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}N.prototype=$.prototype;function $(n){this.fill=n.fill===void 0?" ":n.fill+"",this.align=n.align===void 0?">":n.align+"",this.sign=n.sign===void 0?"-":n.sign+"",this.symbol=n.symbol===void 0?"":n.symbol+"",this.zero=!!n.zero,this.width=n.width===void 0?void 0:+n.width,this.comma=!!n.comma,this.precision=n.precision===void 0?void 0:+n.precision,this.trim=!!n.trim,this.type=n.type===void 0?"":n.type+""}$.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function W(n){n:for(var t=n.length,e=1,i=-1,o;e0&&(i=0);break}return i>0?n.slice(0,i)+n.slice(o+1):n}var U;function _(n,t){var e=j(n,t);if(!e)return n+"";var i=e[0],o=e[1],f=o-(U=Math.max(-8,Math.min(8,Math.floor(o/3)))*3)+1,c=i.length;return f===c?i:f>c?i+new Array(f-c+1).join("0"):f>0?i.slice(0,f)+"."+i.slice(f):"0."+new Array(1-f).join("0")+j(n,Math.max(0,t+f-1))[0]}function G(n,t){var e=j(n,t);if(!e)return n+"";var i=e[0],o=e[1];return o<0?"0."+new Array(-o).join("0")+i:i.length>o+1?i.slice(0,o+1)+"."+i.slice(o+1):i+new Array(o-i.length+2).join("0")}const I={"%":(n,t)=>(n*100).toFixed(t),b:n=>Math.round(n).toString(2),c:n=>n+"",d:H,e:(n,t)=>n.toExponential(t),f:(n,t)=>n.toFixed(t),g:(n,t)=>n.toPrecision(t),o:n=>Math.round(n).toString(8),p:(n,t)=>G(n*100,t),r:G,s:_,X:n=>Math.round(n).toString(16).toUpperCase(),x:n=>Math.round(n).toString(16)};function X(n){return n}var O=Array.prototype.map,R=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function v(n){var t=n.grouping===void 0||n.thousands===void 0?X:K(O.call(n.grouping,Number),n.thousands+""),e=n.currency===void 0?"":n.currency[0]+"",i=n.currency===void 0?"":n.currency[1]+"",o=n.decimal===void 0?".":n.decimal+"",f=n.numerals===void 0?X:Q(O.call(n.numerals,String)),c=n.percent===void 0?"%":n.percent+"",u=n.minus===void 0?"−":n.minus+"",p=n.nan===void 0?"NaN":n.nan+"";function F(a){a=N(a);var x=a.fill,M=a.align,m=a.sign,w=a.symbol,l=a.zero,S=a.width,E=a.comma,g=a.precision,L=a.trim,d=a.type;d==="n"?(E=!0,d="g"):I[d]||(g===void 0&&(g=12),L=!0,d="g"),(l||x==="0"&&M==="=")&&(l=!0,x="0",M="=");var Z=w==="$"?e:w==="#"&&/[boxX]/.test(d)?"0"+d.toLowerCase():"",q=w==="$"?i:/[%p]/.test(d)?c:"",T=I[d],B=/[defgprs%]/.test(d);g=g===void 0?6:/[gprs]/.test(d)?Math.max(1,Math.min(21,g)):Math.max(0,Math.min(20,g));function C(r){var y=Z,h=q,b,D,k;if(d==="c")h=T(r)+h,r="";else{r=+r;var P=r<0||1/r<0;if(r=isNaN(r)?p:T(Math.abs(r),g),L&&(r=W(r)),P&&+r==0&&m!=="+"&&(P=!1),y=(P?m==="("?m:u:m==="-"||m==="("?"":m)+y,h=(d==="s"?R[8+U/3]:"")+h+(P&&m==="("?")":""),B){for(b=-1,D=r.length;++bk||k>57){h=(k===46?o+r.slice(b+1):r.slice(b))+h,r=r.slice(0,b);break}}}E&&!l&&(r=t(r,1/0));var z=y.length+r.length+h.length,s=z>1)+y+r+h+s.slice(z);break;default:r=s+y+r+h;break}return f(r)}return C.toString=function(){return a+""},C}function Y(a,x){var M=F((a=N(a),a.type="f",a)),m=Math.max(-8,Math.min(8,Math.floor(J(x)/3)))*3,w=Math.pow(10,-m),l=R[8+m/3];return function(S){return M(w*S)+l}}return{format:F,formatPrefix:Y}}var A,nn,tn;rn({thousands:",",grouping:[3],currency:["$",""]});function rn(n){return A=v(n),nn=A.format,tn=A.formatPrefix,A}export{tn as a,nn as b,J as e,N as f}; diff --git a/_astro/diagram-PSM6KHXK.0TbXjUWG.js b/_astro/diagram-PSM6KHXK.0TbXjUWG.js new file mode 100644 index 00000000..449ab498 --- /dev/null +++ b/_astro/diagram-PSM6KHXK.0TbXjUWG.js @@ -0,0 +1,24 @@ +import{_ as w,D as ee,E as te,H as de,e as he,l as J,b9 as P,d as j,b as ue,a as pe,p as fe,q as me,g as ge,s as ye,F as Se,ba as ve,y as xe}from"./mermaid.core.LbQlJBBQ.js";import{s as be}from"./chunk-QN33PNHL.BI3h-IJf.js";import{p as we}from"./chunk-4BX2VUAB.CV908Kae.js";import{p as Ce}from"./treemap-KMMF4GRG.BHoxrBMR.js";import{b as I}from"./defaultLocale.C4B-KCzX.js";import{o as Z}from"./ordinal.BYWQX77i.js";import"./page._rMDHl_T.js";import"./min.D5TVP8RA.js";import"./_baseUniq.CLojSEzq.js";import"./init.Gi6I4Gst.js";function Te(e){var a=0,n=e.children,l=n&&n.length;if(!l)a=1;else for(;--l>=0;)a+=n[l].value;e.value=a}function Le(){return this.eachAfter(Te)}function $e(e,a){let n=-1;for(const l of this)e.call(a,l,++n,this);return this}function Ae(e,a){for(var n=this,l=[n],o,i,d=-1;n=l.pop();)if(e.call(a,n,++d,this),o=n.children)for(i=o.length-1;i>=0;--i)l.push(o[i]);return this}function Fe(e,a){for(var n=this,l=[n],o=[],i,d,h,m=-1;n=l.pop();)if(o.push(n),i=n.children)for(d=0,h=i.length;d=0;)n+=l[o].value;a.value=n})}function Me(e){return this.eachBefore(function(a){a.children&&a.children.sort(e)})}function _e(e){for(var a=this,n=ze(a,e),l=[a];a!==n;)a=a.parent,l.push(a);for(var o=l.length;e!==n;)l.splice(o,0,e),e=e.parent;return l}function ze(e,a){if(e===a)return e;var n=e.ancestors(),l=a.ancestors(),o=null;for(e=n.pop(),a=l.pop();e===a;)o=e,e=n.pop(),a=l.pop();return o}function Ve(){for(var e=this,a=[e];e=e.parent;)a.push(e);return a}function De(){return Array.from(this)}function Pe(){var e=[];return this.eachBefore(function(a){a.children||e.push(a)}),e}function Be(){var e=this,a=[];return e.each(function(n){n!==e&&a.push({source:n.parent,target:n})}),a}function*Ee(){var e=this,a,n=[e],l,o,i;do for(a=n.reverse(),n=[];e=a.pop();)if(yield e,l=e.children)for(o=0,i=l.length;o=0;--h)o.push(i=d[h]=new Y(d[h])),i.parent=l,i.depth=l.depth+1;return n.eachBefore(Oe)}function Re(){return K(this).eachBefore(Ie)}function We(e){return e.children}function He(e){return Array.isArray(e)?e[1]:null}function Ie(e){e.data.value!==void 0&&(e.value=e.data.value),e.data=e.data.data}function Oe(e){var a=0;do e.height=a;while((e=e.parent)&&e.height<++a)}function Y(e){this.data=e,this.depth=this.height=0,this.parent=null}Y.prototype=K.prototype={constructor:Y,count:Le,each:$e,eachAfter:Fe,eachBefore:Ae,find:ke,sum:Ne,sort:Me,path:_e,ancestors:Ve,descendants:De,leaves:Pe,links:Be,copy:Re,[Symbol.iterator]:Ee};function qe(e){if(typeof e!="function")throw new Error;return e}function O(){return 0}function q(e){return function(){return e}}function Ge(e){e.x0=Math.round(e.x0),e.y0=Math.round(e.y0),e.x1=Math.round(e.x1),e.y1=Math.round(e.y1)}function Xe(e,a,n,l,o){for(var i=e.children,d,h=-1,m=i.length,c=e.value&&(l-a)/e.value;++hN&&(N=c),M=p*p*E,k=Math.max(N/M,M/g),k>V){p-=c;break}V=k}d.push(m={value:p,dice:x1?l:1)},n})(Ye);function Je(){var e=Ze,a=!1,n=1,l=1,o=[0],i=O,d=O,h=O,m=O,c=O;function u(r){return r.x0=r.y0=0,r.x1=n,r.y1=l,r.eachBefore(b),o=[0],a&&r.eachBefore(Ge),r}function b(r){var x=o[r.depth],S=r.x0+x,v=r.y0+x,p=r.x1-x,g=r.y1-x;p{ve(o)&&(n?.textStyles?n.textStyles.push(o):n.textStyles=[o]),n?.styles?n.styles.push(o):n.styles=[o]}),this.classes.set(e,n)}getClasses(){return this.classes}getStylesForClass(e){return this.classes.get(e)?.styles??[]}clear(){xe(),this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.root=void 0}};function ne(e){if(!e.length)return[];const a=[],n=[];return e.forEach(l=>{const o={name:l.name,children:l.type==="Leaf"?void 0:[]};for(o.classSelector=l?.classSelector,l?.cssCompiledStyles&&(o.cssCompiledStyles=[l.cssCompiledStyles]),l.type==="Leaf"&&l.value!==void 0&&(o.value=l.value);n.length>0&&n[n.length-1].level>=l.level;)n.pop();if(n.length===0)a.push(o);else{const i=n[n.length-1].node;i.children?i.children.push(o):i.children=[o]}l.type!=="Leaf"&&n.push({node:o,level:l.level})}),a}w(ne,"buildHierarchy");var Ke=w((e,a)=>{we(e,a);const n=[];for(const i of e.TreemapRows??[])i.$type==="ClassDefStatement"&&a.addClass(i.className??"",i.styleText??"");for(const i of e.TreemapRows??[]){const d=i.item;if(!d)continue;const h=i.indent?parseInt(i.indent):0,m=Qe(d),c=d.classSelector?a.getStylesForClass(d.classSelector):[],u=c.length>0?c.join(";"):void 0,b={level:h,name:m,type:d.$type,value:d.value,classSelector:d.classSelector,cssCompiledStyles:u};n.push(b)}const l=ne(n),o=w((i,d)=>{for(const h of i)a.addNode(h,d),h.children&&h.children.length>0&&o(h.children,d+1)},"addNodesRecursively");o(l,0)},"populate"),Qe=w(e=>e.name?String(e.name):"","getItemName"),le={parser:{yy:void 0},parse:w(async e=>{try{const n=await Ce("treemap",e);J.debug("Treemap AST:",n);const l=le.parser?.yy;if(!(l instanceof ae))throw new Error("parser.parser?.yy was not a TreemapDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");Ke(n,l)}catch(a){throw J.error("Error parsing treemap:",a),a}},"parse")},et=10,B=10,G=25,tt=w((e,a,n,l)=>{const o=l.db,i=o.getConfig(),d=i.padding??et,h=o.getDiagramTitle(),m=o.getRoot(),{themeVariables:c}=te();if(!m)return;const u=h?30:0,b=de(a),r=i.nodeWidth?i.nodeWidth*B:960,x=i.nodeHeight?i.nodeHeight*B:500,S=r,v=x+u;b.attr("viewBox",`0 0 ${S} ${v}`),he(b,v,S,i.useMaxWidth);let p;try{const t=i.valueFormat||",";if(t==="$0,0")p=w(s=>"$"+I(",")(s),"valueFormat");else if(t.startsWith("$")&&t.includes(",")){const s=/\.\d+/.exec(t),f=s?s[0]:"";p=w(C=>"$"+I(","+f)(C),"valueFormat")}else if(t.startsWith("$")){const s=t.substring(1);p=w(f=>"$"+I(s||"")(f),"valueFormat")}else p=I(t)}catch(t){J.error("Error creating format function:",t),p=I(",")}const g=Z().range(["transparent",c.cScale0,c.cScale1,c.cScale2,c.cScale3,c.cScale4,c.cScale5,c.cScale6,c.cScale7,c.cScale8,c.cScale9,c.cScale10,c.cScale11]),N=Z().range(["transparent",c.cScalePeer0,c.cScalePeer1,c.cScalePeer2,c.cScalePeer3,c.cScalePeer4,c.cScalePeer5,c.cScalePeer6,c.cScalePeer7,c.cScalePeer8,c.cScalePeer9,c.cScalePeer10,c.cScalePeer11]),k=Z().range([c.cScaleLabel0,c.cScaleLabel1,c.cScaleLabel2,c.cScaleLabel3,c.cScaleLabel4,c.cScaleLabel5,c.cScaleLabel6,c.cScaleLabel7,c.cScaleLabel8,c.cScaleLabel9,c.cScaleLabel10,c.cScaleLabel11]);h&&b.append("text").attr("x",S/2).attr("y",u/2).attr("class","treemapTitle").attr("text-anchor","middle").attr("dominant-baseline","middle").text(h);const V=b.append("g").attr("transform",`translate(0, ${u})`).attr("class","treemapContainer"),E=K(m).sum(t=>t.value??0).sort((t,s)=>(s.value??0)-(t.value??0)),Q=Je().size([r,x]).paddingTop(t=>t.children&&t.children.length>0?G+B:0).paddingInner(d).paddingLeft(t=>t.children&&t.children.length>0?B:0).paddingRight(t=>t.children&&t.children.length>0?B:0).paddingBottom(t=>t.children&&t.children.length>0?B:0).round(!0)(E),re=Q.descendants().filter(t=>t.children&&t.children.length>0),R=V.selectAll(".treemapSection").data(re).enter().append("g").attr("class","treemapSection").attr("transform",t=>`translate(${t.x0},${t.y0})`);R.append("rect").attr("width",t=>t.x1-t.x0).attr("height",G).attr("class","treemapSectionHeader").attr("fill","none").attr("fill-opacity",.6).attr("stroke-width",.6).attr("style",t=>t.depth===0?"display: none;":""),R.append("clipPath").attr("id",(t,s)=>`clip-section-${a}-${s}`).append("rect").attr("width",t=>Math.max(0,t.x1-t.x0-12)).attr("height",G),R.append("rect").attr("width",t=>t.x1-t.x0).attr("height",t=>t.y1-t.y0).attr("class",(t,s)=>`treemapSection section${s}`).attr("fill",t=>g(t.data.name)).attr("fill-opacity",.6).attr("stroke",t=>N(t.data.name)).attr("stroke-width",2).attr("stroke-opacity",.4).attr("style",t=>{if(t.depth===0)return"display: none;";const s=P({cssCompiledStyles:t.data.cssCompiledStyles});return s.nodeStyles+";"+s.borderStyles.join(";")}),R.append("text").attr("class","treemapSectionLabel").attr("x",6).attr("y",G/2).attr("dominant-baseline","middle").text(t=>t.depth===0?"":t.data.name).attr("font-weight","bold").attr("style",t=>{if(t.depth===0)return"display: none;";const s="dominant-baseline: middle; font-size: 12px; fill:"+k(t.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;",f=P({cssCompiledStyles:t.data.cssCompiledStyles});return s+f.labelStyles.replace("color:","fill:")}).each(function(t){if(t.depth===0)return;const s=j(this),f=t.data.name;s.text(f);const C=t.x1-t.x0,L=6;let $;i.showValues!==!1&&t.value?$=C-10-30-10-L:$=C-L-6;const A=Math.max(15,$),y=s.node();if(y.getComputedTextLength()>A){let T=f;for(;T.length>0;){if(T=f.substring(0,T.length-1),T.length===0){s.text("..."),y.getComputedTextLength()>A&&s.text("");break}if(s.text(T+"..."),y.getComputedTextLength()<=A)break}}}),i.showValues!==!1&&R.append("text").attr("class","treemapSectionValue").attr("x",t=>t.x1-t.x0-10).attr("y",G/2).attr("text-anchor","end").attr("dominant-baseline","middle").text(t=>t.value?p(t.value):"").attr("font-style","italic").attr("style",t=>{if(t.depth===0)return"display: none;";const s="text-anchor: end; dominant-baseline: middle; font-size: 10px; fill:"+k(t.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;",f=P({cssCompiledStyles:t.data.cssCompiledStyles});return s+f.labelStyles.replace("color:","fill:")});const se=Q.leaves(),X=V.selectAll(".treemapLeafGroup").data(se).enter().append("g").attr("class",(t,s)=>`treemapNode treemapLeafGroup leaf${s}${t.data.classSelector?` ${t.data.classSelector}`:""}x`).attr("transform",t=>`translate(${t.x0},${t.y0})`);X.append("rect").attr("width",t=>t.x1-t.x0).attr("height",t=>t.y1-t.y0).attr("class","treemapLeaf").attr("fill",t=>t.parent?g(t.parent.data.name):g(t.data.name)).attr("style",t=>P({cssCompiledStyles:t.data.cssCompiledStyles}).nodeStyles).attr("fill-opacity",.3).attr("stroke",t=>t.parent?g(t.parent.data.name):g(t.data.name)).attr("stroke-width",3),X.append("clipPath").attr("id",(t,s)=>`clip-${a}-${s}`).append("rect").attr("width",t=>Math.max(0,t.x1-t.x0-4)).attr("height",t=>Math.max(0,t.y1-t.y0-4)),X.append("text").attr("class","treemapLabel").attr("x",t=>(t.x1-t.x0)/2).attr("y",t=>(t.y1-t.y0)/2).attr("style",t=>{const s="text-anchor: middle; dominant-baseline: middle; font-size: 38px;fill:"+k(t.data.name)+";",f=P({cssCompiledStyles:t.data.cssCompiledStyles});return s+f.labelStyles.replace("color:","fill:")}).attr("clip-path",(t,s)=>`url(#clip-${a}-${s})`).text(t=>t.data.name).each(function(t){const s=j(this),f=t.x1-t.x0,C=t.y1-t.y0,L=s.node(),$=4,D=f-2*$,A=C-2*$;if(D<10||A<10){s.style("display","none");return}let y=parseInt(s.style("font-size"),10);const _=8,F=28,T=.6,z=6,W=2;for(;L.getComputedTextLength()>D&&y>_;)y--,s.style("font-size",`${y}px`);let H=Math.max(z,Math.min(F,Math.round(y*T))),U=y+W+H;for(;U>A&&y>_&&(y--,H=Math.max(z,Math.min(F,Math.round(y*T))),!(HD||y<_||A(s.x1-s.x0)/2).attr("y",function(s){return(s.y1-s.y0)/2}).attr("style",s=>{const f="text-anchor: middle; dominant-baseline: hanging; font-size: 28px;fill:"+k(s.data.name)+";",C=P({cssCompiledStyles:s.data.cssCompiledStyles});return f+C.labelStyles.replace("color:","fill:")}).attr("clip-path",(s,f)=>`url(#clip-${a}-${f})`).text(s=>s.value?p(s.value):"").each(function(s){const f=j(this),C=this.parentNode;if(!C){f.style("display","none");return}const L=j(C).select(".treemapLabel");if(L.empty()||L.style("display")==="none"){f.style("display","none");return}const $=parseFloat(L.style("font-size")),D=28,A=.6,y=6,_=2,F=Math.max(y,Math.min(D,Math.round($*A)));f.style("font-size",`${F}px`);const z=(s.y1-s.y0)/2+$/2+_;f.attr("y",z);const W=s.x1-s.x0,oe=s.y1-s.y0-4,ce=W-8;f.node().getComputedTextLength()>ce||z+F>oe||F{const a=ee(lt,e);return` + .treemapNode.section { + stroke: ${a.sectionStrokeColor}; + stroke-width: ${a.sectionStrokeWidth}; + fill: ${a.sectionFillColor}; + } + .treemapNode.leaf { + stroke: ${a.leafStrokeColor}; + stroke-width: ${a.leafStrokeWidth}; + fill: ${a.leafFillColor}; + } + .treemapLabel { + fill: ${a.labelColor}; + font-size: ${a.labelFontSize}; + } + .treemapValue { + fill: ${a.valueColor}; + font-size: ${a.valueFontSize}; + } + .treemapTitle { + fill: ${a.titleColor}; + font-size: ${a.titleFontSize}; + } + `},"getStyles"),st=rt,St={parser:le,get db(){return new ae},renderer:nt,styles:st};export{St as diagram}; diff --git a/_astro/diagram-QEK2KX5R.rXmDqRow.js b/_astro/diagram-QEK2KX5R.rXmDqRow.js new file mode 100644 index 00000000..7d186776 --- /dev/null +++ b/_astro/diagram-QEK2KX5R.rXmDqRow.js @@ -0,0 +1,43 @@ +import{_ as l,s as k,g as R,q as E,p as F,a as I,b as _,H as D,y as G,D as f,E as C,F as P,l as z,K as H}from"./mermaid.core.LbQlJBBQ.js";import{p as V}from"./chunk-4BX2VUAB.CV908Kae.js";import{p as W}from"./treemap-KMMF4GRG.BHoxrBMR.js";import"./page._rMDHl_T.js";import"./min.D5TVP8RA.js";import"./_baseUniq.CLojSEzq.js";var h={showLegend:!0,ticks:5,max:null,min:0,graticule:"circle"},w={axes:[],curves:[],options:h},m=structuredClone(w),B=P.radar,j=l(()=>f({...B,...C().radar}),"getConfig"),b=l(()=>m.axes,"getAxes"),q=l(()=>m.curves,"getCurves"),K=l(()=>m.options,"getOptions"),N=l(a=>{m.axes=a.map(t=>({name:t.name,label:t.label??t.name}))},"setAxes"),U=l(a=>{m.curves=a.map(t=>({name:t.name,label:t.label??t.name,entries:X(t.entries)}))},"setCurves"),X=l(a=>{if(a[0].axis==null)return a.map(e=>e.value);const t=b();if(t.length===0)throw new Error("Axes must be populated before curves for reference entries");return t.map(e=>{const r=a.find(s=>s.axis?.$refText===e.name);if(r===void 0)throw new Error("Missing entry for axis "+e.label);return r.value})},"computeCurveEntries"),Y=l(a=>{const t=a.reduce((e,r)=>(e[r.name]=r,e),{});m.options={showLegend:t.showLegend?.value??h.showLegend,ticks:t.ticks?.value??h.ticks,max:t.max?.value??h.max,min:t.min?.value??h.min,graticule:t.graticule?.value??h.graticule}},"setOptions"),Z=l(()=>{G(),m=structuredClone(w)},"clear"),$={getAxes:b,getCurves:q,getOptions:K,setAxes:N,setCurves:U,setOptions:Y,getConfig:j,clear:Z,setAccTitle:_,getAccTitle:I,setDiagramTitle:F,getDiagramTitle:E,getAccDescription:R,setAccDescription:k},J=l(a=>{V(a,$);const{axes:t,curves:e,options:r}=a;$.setAxes(t),$.setCurves(e),$.setOptions(r)},"populate"),Q={parse:l(async a=>{const t=await W("radar",a);z.debug(t),J(t)},"parse")},tt=l((a,t,e,r)=>{const s=r.db,o=s.getAxes(),i=s.getCurves(),n=s.getOptions(),c=s.getConfig(),d=s.getDiagramTitle(),u=D(t),p=et(u,c),g=n.max??Math.max(...i.map(y=>Math.max(...y.entries))),x=n.min,v=Math.min(c.width,c.height)/2;at(p,o,v,n.ticks,n.graticule),rt(p,o,v,c),M(p,o,i,x,g,n.graticule,c),T(p,i,n.showLegend,c),p.append("text").attr("class","radarTitle").text(d).attr("x",0).attr("y",-c.height/2-c.marginTop)},"draw"),et=l((a,t)=>{const e=t.width+t.marginLeft+t.marginRight,r=t.height+t.marginTop+t.marginBottom,s={x:t.marginLeft+t.width/2,y:t.marginTop+t.height/2};return a.attr("viewbox",`0 0 ${e} ${r}`).attr("width",e).attr("height",r),a.append("g").attr("transform",`translate(${s.x}, ${s.y})`)},"drawFrame"),at=l((a,t,e,r,s)=>{if(s==="circle")for(let o=0;o{const p=2*u*Math.PI/o-Math.PI/2,g=n*Math.cos(p),x=n*Math.sin(p);return`${g},${x}`}).join(" ");a.append("polygon").attr("points",c).attr("class","radarGraticule")}}},"drawGraticule"),rt=l((a,t,e,r)=>{const s=t.length;for(let o=0;o{if(d.entries.length!==n)return;const p=d.entries.map((g,x)=>{const v=2*Math.PI*x/n-Math.PI/2,y=A(g,r,s,c),O=y*Math.cos(v),S=y*Math.sin(v);return{x:O,y:S}});o==="circle"?a.append("path").attr("d",L(p,i.curveTension)).attr("class",`radarCurve-${u}`):o==="polygon"&&a.append("polygon").attr("points",p.map(g=>`${g.x},${g.y}`).join(" ")).attr("class",`radarCurve-${u}`)})}l(M,"drawCurves");function A(a,t,e,r){const s=Math.min(Math.max(a,t),e);return r*(s-t)/(e-t)}l(A,"relativeRadius");function L(a,t){const e=a.length;let r=`M${a[0].x},${a[0].y}`;for(let s=0;s{const d=a.append("g").attr("transform",`translate(${s}, ${o+c*i})`);d.append("rect").attr("width",12).attr("height",12).attr("class",`radarLegendBox-${c}`),d.append("text").attr("x",16).attr("y",0).attr("class","radarLegendText").text(n.label)})}l(T,"drawLegend");var st={draw:tt},nt=l((a,t)=>{let e="";for(let r=0;r{const t=H(),e=C(),r=f(t,e.themeVariables),s=f(r.radar,a);return{themeVariables:r,radarOptions:s}},"buildRadarStyleOptions"),it=l(({radar:a}={})=>{const{themeVariables:t,radarOptions:e}=ot(a);return` + .radarTitle { + font-size: ${t.fontSize}; + color: ${t.titleColor}; + dominant-baseline: hanging; + text-anchor: middle; + } + .radarAxisLine { + stroke: ${e.axisColor}; + stroke-width: ${e.axisStrokeWidth}; + } + .radarAxisLabel { + dominant-baseline: middle; + text-anchor: middle; + font-size: ${e.axisLabelFontSize}px; + color: ${e.axisColor}; + } + .radarGraticule { + fill: ${e.graticuleColor}; + fill-opacity: ${e.graticuleOpacity}; + stroke: ${e.graticuleColor}; + stroke-width: ${e.graticuleStrokeWidth}; + } + .radarLegendText { + text-anchor: start; + font-size: ${e.legendFontSize}px; + dominant-baseline: hanging; + } + ${nt(t,e)} + `},"styles"),mt={parser:Q,db:$,renderer:st,styles:it};export{mt as diagram}; diff --git a/_astro/diagram-S2PKOQOG.Cn_-o7eu.js b/_astro/diagram-S2PKOQOG.Cn_-o7eu.js new file mode 100644 index 00000000..063c1f94 --- /dev/null +++ b/_astro/diagram-S2PKOQOG.Cn_-o7eu.js @@ -0,0 +1,24 @@ +import{_ as b,D as u,H as $,e as B,l as m,b as C,a as S,p as D,q as T,g as E,s as F,E as P,F as z,y as A}from"./mermaid.core.LbQlJBBQ.js";import{p as W}from"./chunk-4BX2VUAB.CV908Kae.js";import{p as _}from"./treemap-KMMF4GRG.BHoxrBMR.js";import"./page._rMDHl_T.js";import"./min.D5TVP8RA.js";import"./_baseUniq.CLojSEzq.js";var N=z.packet,w=class{constructor(){this.packet=[],this.setAccTitle=C,this.getAccTitle=S,this.setDiagramTitle=D,this.getDiagramTitle=T,this.getAccDescription=E,this.setAccDescription=F}static{b(this,"PacketDB")}getConfig(){const t=u({...N,...P().packet});return t.showBits&&(t.paddingY+=10),t}getPacket(){return this.packet}pushWord(t){t.length>0&&this.packet.push(t)}clear(){A(),this.packet=[]}},L=1e4,M=b((t,e)=>{W(t,e);let r=-1,o=[],n=1;const{bitsPerRow:l}=e.getConfig();for(let{start:a,end:i,bits:d,label:c}of t.blocks){if(a!==void 0&&i!==void 0&&i{if(t.start===void 0)throw new Error("start should have been set during first phase");if(t.end===void 0)throw new Error("end should have been set during first phase");if(t.start>t.end)throw new Error(`Block start ${t.start} is greater than block end ${t.end}.`);if(t.end+1<=e*r)return[t,void 0];const o=e*r-1,n=e*r;return[{start:t.start,end:o,label:t.label,bits:o-t.start},{start:n,end:t.end,label:t.label,bits:t.end-n}]},"getNextFittingBlock"),v={parser:{yy:void 0},parse:b(async t=>{const e=await _("packet",t),r=v.parser?.yy;if(!(r instanceof w))throw new Error("parser.parser?.yy was not a PacketDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");m.debug(e),M(e,r)},"parse")},H=b((t,e,r,o)=>{const n=o.db,l=n.getConfig(),{rowHeight:a,paddingY:i,bitWidth:d,bitsPerRow:c}=l,p=n.getPacket(),s=n.getDiagramTitle(),h=a+i,g=h*(p.length+1)-(s?0:a),k=d*c+2,f=$(e);f.attr("viewbox",`0 0 ${k} ${g}`),B(f,g,k,l.useMaxWidth);for(const[x,y]of p.entries())I(f,y,x,l);f.append("text").text(s).attr("x",k/2).attr("y",g-h/2).attr("dominant-baseline","middle").attr("text-anchor","middle").attr("class","packetTitle")},"draw"),I=b((t,e,r,{rowHeight:o,paddingX:n,paddingY:l,bitWidth:a,bitsPerRow:i,showBits:d})=>{const c=t.append("g"),p=r*(o+l)+l;for(const s of e){const h=s.start%i*a+1,g=(s.end-s.start+1)*a-n;if(c.append("rect").attr("x",h).attr("y",p).attr("width",g).attr("height",o).attr("class","packetBlock"),c.append("text").attr("x",h+g/2).attr("y",p+o/2).attr("class","packetLabel").attr("dominant-baseline","middle").attr("text-anchor","middle").text(s.label),!d)continue;const k=s.end===s.start,f=p-2;c.append("text").attr("x",h+(k?g/2:0)).attr("y",f).attr("class","packetByte start").attr("dominant-baseline","auto").attr("text-anchor",k?"middle":"start").text(s.start),k||c.append("text").attr("x",h+g).attr("y",f).attr("class","packetByte end").attr("dominant-baseline","auto").attr("text-anchor","end").text(s.end)}},"drawWord"),O={draw:H},j={byteFontSize:"10px",startByteColor:"black",endByteColor:"black",labelColor:"black",labelFontSize:"12px",titleColor:"black",titleFontSize:"14px",blockStrokeColor:"black",blockStrokeWidth:"1",blockFillColor:"#efefef"},q=b(({packet:t}={})=>{const e=u(j,t);return` + .packetByte { + font-size: ${e.byteFontSize}; + } + .packetByte.start { + fill: ${e.startByteColor}; + } + .packetByte.end { + fill: ${e.endByteColor}; + } + .packetLabel { + fill: ${e.labelColor}; + font-size: ${e.labelFontSize}; + } + .packetTitle { + fill: ${e.titleColor}; + font-size: ${e.titleFontSize}; + } + .packetBlock { + stroke: ${e.blockStrokeColor}; + stroke-width: ${e.blockStrokeWidth}; + fill: ${e.blockFillColor}; + } + `},"styles"),Q={parser:v,get db(){return new w},renderer:O,styles:q};export{Q as diagram}; diff --git a/_astro/easy-1.5G8u0UbD_WMJxy.webp b/_astro/easy-1.5G8u0UbD_WMJxy.webp new file mode 100644 index 00000000..afc12bed Binary files /dev/null and b/_astro/easy-1.5G8u0UbD_WMJxy.webp differ diff --git a/_astro/edge.fWBEKm3h_1HbCeb.webp b/_astro/edge.fWBEKm3h_1HbCeb.webp new file mode 100644 index 00000000..788e0547 Binary files /dev/null and b/_astro/edge.fWBEKm3h_1HbCeb.webp differ diff --git a/_astro/erDiagram-Q2GNP2WA.mcAILrwl.js b/_astro/erDiagram-Q2GNP2WA.mcAILrwl.js new file mode 100644 index 00000000..48f6a9e1 --- /dev/null +++ b/_astro/erDiagram-Q2GNP2WA.mcAILrwl.js @@ -0,0 +1,60 @@ +import{g as vt}from"./chunk-55IACEB6.b7ueBidu.js";import{s as Dt}from"./chunk-QN33PNHL.BI3h-IJf.js";import{_ as l,b as wt,a as Vt,s as Lt,g as Mt,p as Bt,q as Ft,c as $,l as D,y as Yt,x as Pt,A as zt,B as Gt,o as Kt,r as Zt,d as Ut,u as jt}from"./mermaid.core.LbQlJBBQ.js";import{c as Wt}from"./channel.y7_wL4g7.js";import"./page._rMDHl_T.js";var ut=(function(){var e=l(function(N,n,a,c){for(a=a||{},c=N.length;c--;a[N[c]]=n);return a},"o"),i=[6,8,10,22,24,26,28,33,34,35,36,37,40,43,44,50],d=[1,10],o=[1,11],h=[1,12],p=[1,13],R=[1,20],g=[1,21],m=[1,22],w=[1,23],K=[1,24],k=[1,19],tt=[1,25],Z=[1,26],S=[1,18],V=[1,33],et=[1,34],st=[1,35],it=[1,36],rt=[1,37],dt=[6,8,10,13,15,17,20,21,22,24,26,28,33,34,35,36,37,40,43,44,50,63,64,65,66,67],T=[1,42],O=[1,43],L=[1,52],M=[40,50,68,69],B=[1,63],F=[1,61],A=[1,58],Y=[1,62],P=[1,64],U=[6,8,10,13,17,22,24,26,28,33,34,35,36,37,40,41,42,43,44,48,49,50,63,64,65,66,67],pt=[63,64,65,66,67],ft=[1,81],yt=[1,80],_t=[1,78],gt=[1,79],bt=[6,10,42,47],C=[6,10,13,41,42,47,48,49],j=[1,89],W=[1,88],Q=[1,87],z=[19,56],mt=[1,98],Et=[1,97],nt=[19,56,58,60],at={trace:l(function(){},"trace"),yy:{},symbols_:{error:2,start:3,ER_DIAGRAM:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,entityName:11,relSpec:12,COLON:13,role:14,STYLE_SEPARATOR:15,idList:16,BLOCK_START:17,attributes:18,BLOCK_STOP:19,SQS:20,SQE:21,title:22,title_value:23,acc_title:24,acc_title_value:25,acc_descr:26,acc_descr_value:27,acc_descr_multiline_value:28,direction:29,classDefStatement:30,classStatement:31,styleStatement:32,direction_tb:33,direction_bt:34,direction_rl:35,direction_lr:36,CLASSDEF:37,stylesOpt:38,separator:39,UNICODE_TEXT:40,STYLE_TEXT:41,COMMA:42,CLASS:43,STYLE:44,style:45,styleComponent:46,SEMI:47,NUM:48,BRKT:49,ENTITY_NAME:50,attribute:51,attributeType:52,attributeName:53,attributeKeyTypeList:54,attributeComment:55,ATTRIBUTE_WORD:56,attributeKeyType:57,",":58,ATTRIBUTE_KEY:59,COMMENT:60,cardinality:61,relType:62,ZERO_OR_ONE:63,ZERO_OR_MORE:64,ONE_OR_MORE:65,ONLY_ONE:66,MD_PARENT:67,NON_IDENTIFYING:68,IDENTIFYING:69,WORD:70,$accept:0,$end:1},terminals_:{2:"error",4:"ER_DIAGRAM",6:"EOF",8:"SPACE",10:"NEWLINE",13:"COLON",15:"STYLE_SEPARATOR",17:"BLOCK_START",19:"BLOCK_STOP",20:"SQS",21:"SQE",22:"title",23:"title_value",24:"acc_title",25:"acc_title_value",26:"acc_descr",27:"acc_descr_value",28:"acc_descr_multiline_value",33:"direction_tb",34:"direction_bt",35:"direction_rl",36:"direction_lr",37:"CLASSDEF",40:"UNICODE_TEXT",41:"STYLE_TEXT",42:"COMMA",43:"CLASS",44:"STYLE",47:"SEMI",48:"NUM",49:"BRKT",50:"ENTITY_NAME",56:"ATTRIBUTE_WORD",58:",",59:"ATTRIBUTE_KEY",60:"COMMENT",63:"ZERO_OR_ONE",64:"ZERO_OR_MORE",65:"ONE_OR_MORE",66:"ONLY_ONE",67:"MD_PARENT",68:"NON_IDENTIFYING",69:"IDENTIFYING",70:"WORD"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,5],[9,9],[9,7],[9,7],[9,4],[9,6],[9,3],[9,5],[9,1],[9,3],[9,7],[9,9],[9,6],[9,8],[9,4],[9,6],[9,2],[9,2],[9,2],[9,1],[9,1],[9,1],[9,1],[9,1],[29,1],[29,1],[29,1],[29,1],[30,4],[16,1],[16,1],[16,3],[16,3],[31,3],[32,4],[38,1],[38,3],[45,1],[45,2],[39,1],[39,1],[39,1],[46,1],[46,1],[46,1],[46,1],[11,1],[11,1],[18,1],[18,2],[51,2],[51,3],[51,3],[51,4],[52,1],[53,1],[54,1],[54,3],[57,1],[55,1],[12,3],[61,1],[61,1],[61,1],[61,1],[61,1],[62,1],[62,1],[14,1],[14,1],[14,1]],performAction:l(function(n,a,c,r,u,t,G){var s=t.length-1;switch(u){case 1:break;case 2:this.$=[];break;case 3:t[s-1].push(t[s]),this.$=t[s-1];break;case 4:case 5:this.$=t[s];break;case 6:case 7:this.$=[];break;case 8:r.addEntity(t[s-4]),r.addEntity(t[s-2]),r.addRelationship(t[s-4],t[s],t[s-2],t[s-3]);break;case 9:r.addEntity(t[s-8]),r.addEntity(t[s-4]),r.addRelationship(t[s-8],t[s],t[s-4],t[s-5]),r.setClass([t[s-8]],t[s-6]),r.setClass([t[s-4]],t[s-2]);break;case 10:r.addEntity(t[s-6]),r.addEntity(t[s-2]),r.addRelationship(t[s-6],t[s],t[s-2],t[s-3]),r.setClass([t[s-6]],t[s-4]);break;case 11:r.addEntity(t[s-6]),r.addEntity(t[s-4]),r.addRelationship(t[s-6],t[s],t[s-4],t[s-5]),r.setClass([t[s-4]],t[s-2]);break;case 12:r.addEntity(t[s-3]),r.addAttributes(t[s-3],t[s-1]);break;case 13:r.addEntity(t[s-5]),r.addAttributes(t[s-5],t[s-1]),r.setClass([t[s-5]],t[s-3]);break;case 14:r.addEntity(t[s-2]);break;case 15:r.addEntity(t[s-4]),r.setClass([t[s-4]],t[s-2]);break;case 16:r.addEntity(t[s]);break;case 17:r.addEntity(t[s-2]),r.setClass([t[s-2]],t[s]);break;case 18:r.addEntity(t[s-6],t[s-4]),r.addAttributes(t[s-6],t[s-1]);break;case 19:r.addEntity(t[s-8],t[s-6]),r.addAttributes(t[s-8],t[s-1]),r.setClass([t[s-8]],t[s-3]);break;case 20:r.addEntity(t[s-5],t[s-3]);break;case 21:r.addEntity(t[s-7],t[s-5]),r.setClass([t[s-7]],t[s-2]);break;case 22:r.addEntity(t[s-3],t[s-1]);break;case 23:r.addEntity(t[s-5],t[s-3]),r.setClass([t[s-5]],t[s]);break;case 24:case 25:this.$=t[s].trim(),r.setAccTitle(this.$);break;case 26:case 27:this.$=t[s].trim(),r.setAccDescription(this.$);break;case 32:r.setDirection("TB");break;case 33:r.setDirection("BT");break;case 34:r.setDirection("RL");break;case 35:r.setDirection("LR");break;case 36:this.$=t[s-3],r.addClass(t[s-2],t[s-1]);break;case 37:case 38:case 56:case 64:this.$=[t[s]];break;case 39:case 40:this.$=t[s-2].concat([t[s]]);break;case 41:this.$=t[s-2],r.setClass(t[s-1],t[s]);break;case 42:this.$=t[s-3],r.addCssStyles(t[s-2],t[s-1]);break;case 43:this.$=[t[s]];break;case 44:t[s-2].push(t[s]),this.$=t[s-2];break;case 46:this.$=t[s-1]+t[s];break;case 54:case 76:case 77:this.$=t[s].replace(/"/g,"");break;case 55:case 78:this.$=t[s];break;case 57:t[s].push(t[s-1]),this.$=t[s];break;case 58:this.$={type:t[s-1],name:t[s]};break;case 59:this.$={type:t[s-2],name:t[s-1],keys:t[s]};break;case 60:this.$={type:t[s-2],name:t[s-1],comment:t[s]};break;case 61:this.$={type:t[s-3],name:t[s-2],keys:t[s-1],comment:t[s]};break;case 62:case 63:case 66:this.$=t[s];break;case 65:t[s-2].push(t[s]),this.$=t[s-2];break;case 67:this.$=t[s].replace(/"/g,"");break;case 68:this.$={cardA:t[s],relType:t[s-1],cardB:t[s-2]};break;case 69:this.$=r.Cardinality.ZERO_OR_ONE;break;case 70:this.$=r.Cardinality.ZERO_OR_MORE;break;case 71:this.$=r.Cardinality.ONE_OR_MORE;break;case 72:this.$=r.Cardinality.ONLY_ONE;break;case 73:this.$=r.Cardinality.MD_PARENT;break;case 74:this.$=r.Identification.NON_IDENTIFYING;break;case 75:this.$=r.Identification.IDENTIFYING;break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},e(i,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:9,22:d,24:o,26:h,28:p,29:14,30:15,31:16,32:17,33:R,34:g,35:m,36:w,37:K,40:k,43:tt,44:Z,50:S},e(i,[2,7],{1:[2,1]}),e(i,[2,3]),{9:27,11:9,22:d,24:o,26:h,28:p,29:14,30:15,31:16,32:17,33:R,34:g,35:m,36:w,37:K,40:k,43:tt,44:Z,50:S},e(i,[2,5]),e(i,[2,6]),e(i,[2,16],{12:28,61:32,15:[1,29],17:[1,30],20:[1,31],63:V,64:et,65:st,66:it,67:rt}),{23:[1,38]},{25:[1,39]},{27:[1,40]},e(i,[2,27]),e(i,[2,28]),e(i,[2,29]),e(i,[2,30]),e(i,[2,31]),e(dt,[2,54]),e(dt,[2,55]),e(i,[2,32]),e(i,[2,33]),e(i,[2,34]),e(i,[2,35]),{16:41,40:T,41:O},{16:44,40:T,41:O},{16:45,40:T,41:O},e(i,[2,4]),{11:46,40:k,50:S},{16:47,40:T,41:O},{18:48,19:[1,49],51:50,52:51,56:L},{11:53,40:k,50:S},{62:54,68:[1,55],69:[1,56]},e(M,[2,69]),e(M,[2,70]),e(M,[2,71]),e(M,[2,72]),e(M,[2,73]),e(i,[2,24]),e(i,[2,25]),e(i,[2,26]),{13:B,38:57,41:F,42:A,45:59,46:60,48:Y,49:P},e(U,[2,37]),e(U,[2,38]),{16:65,40:T,41:O,42:A},{13:B,38:66,41:F,42:A,45:59,46:60,48:Y,49:P},{13:[1,67],15:[1,68]},e(i,[2,17],{61:32,12:69,17:[1,70],42:A,63:V,64:et,65:st,66:it,67:rt}),{19:[1,71]},e(i,[2,14]),{18:72,19:[2,56],51:50,52:51,56:L},{53:73,56:[1,74]},{56:[2,62]},{21:[1,75]},{61:76,63:V,64:et,65:st,66:it,67:rt},e(pt,[2,74]),e(pt,[2,75]),{6:ft,10:yt,39:77,42:_t,47:gt},{40:[1,82],41:[1,83]},e(bt,[2,43],{46:84,13:B,41:F,48:Y,49:P}),e(C,[2,45]),e(C,[2,50]),e(C,[2,51]),e(C,[2,52]),e(C,[2,53]),e(i,[2,41],{42:A}),{6:ft,10:yt,39:85,42:_t,47:gt},{14:86,40:j,50:W,70:Q},{16:90,40:T,41:O},{11:91,40:k,50:S},{18:92,19:[1,93],51:50,52:51,56:L},e(i,[2,12]),{19:[2,57]},e(z,[2,58],{54:94,55:95,57:96,59:mt,60:Et}),e([19,56,59,60],[2,63]),e(i,[2,22],{15:[1,100],17:[1,99]}),e([40,50],[2,68]),e(i,[2,36]),{13:B,41:F,45:101,46:60,48:Y,49:P},e(i,[2,47]),e(i,[2,48]),e(i,[2,49]),e(U,[2,39]),e(U,[2,40]),e(C,[2,46]),e(i,[2,42]),e(i,[2,8]),e(i,[2,76]),e(i,[2,77]),e(i,[2,78]),{13:[1,102],42:A},{13:[1,104],15:[1,103]},{19:[1,105]},e(i,[2,15]),e(z,[2,59],{55:106,58:[1,107],60:Et}),e(z,[2,60]),e(nt,[2,64]),e(z,[2,67]),e(nt,[2,66]),{18:108,19:[1,109],51:50,52:51,56:L},{16:110,40:T,41:O},e(bt,[2,44],{46:84,13:B,41:F,48:Y,49:P}),{14:111,40:j,50:W,70:Q},{16:112,40:T,41:O},{14:113,40:j,50:W,70:Q},e(i,[2,13]),e(z,[2,61]),{57:114,59:mt},{19:[1,115]},e(i,[2,20]),e(i,[2,23],{17:[1,116],42:A}),e(i,[2,11]),{13:[1,117],42:A},e(i,[2,10]),e(nt,[2,65]),e(i,[2,18]),{18:118,19:[1,119],51:50,52:51,56:L},{14:120,40:j,50:W,70:Q},{19:[1,121]},e(i,[2,21]),e(i,[2,9]),e(i,[2,19])],defaultActions:{52:[2,62],72:[2,57]},parseError:l(function(n,a){if(a.recoverable)this.trace(n);else{var c=new Error(n);throw c.hash=a,c}},"parseError"),parse:l(function(n){var a=this,c=[0],r=[],u=[null],t=[],G=this.table,s="",q=0,kt=0,Rt=2,St=1,xt=t.slice.call(arguments,1),f=Object.create(this.lexer),x={yy:{}};for(var ct in this.yy)Object.prototype.hasOwnProperty.call(this.yy,ct)&&(x.yy[ct]=this.yy[ct]);f.setInput(n,x.yy),x.yy.lexer=f,x.yy.parser=this,typeof f.yylloc>"u"&&(f.yylloc={});var ot=f.yylloc;t.push(ot);var It=f.options&&f.options.ranges;typeof x.yy.parseError=="function"?this.parseError=x.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Ct(_){c.length=c.length-2*_,u.length=u.length-_,t.length=t.length-_}l(Ct,"popStack");function Tt(){var _;return _=r.pop()||f.lex()||St,typeof _!="number"&&(_ instanceof Array&&(r=_,_=r.pop()),_=a.symbols_[_]||_),_}l(Tt,"lex");for(var y,I,b,lt,v={},H,E,Ot,J;;){if(I=c[c.length-1],this.defaultActions[I]?b=this.defaultActions[I]:((y===null||typeof y>"u")&&(y=Tt()),b=G[I]&&G[I][y]),typeof b>"u"||!b.length||!b[0]){var ht="";J=[];for(H in G[I])this.terminals_[H]&&H>Rt&&J.push("'"+this.terminals_[H]+"'");f.showPosition?ht="Parse error on line "+(q+1)+`: +`+f.showPosition()+` +Expecting `+J.join(", ")+", got '"+(this.terminals_[y]||y)+"'":ht="Parse error on line "+(q+1)+": Unexpected "+(y==St?"end of input":"'"+(this.terminals_[y]||y)+"'"),this.parseError(ht,{text:f.match,token:this.terminals_[y]||y,line:f.yylineno,loc:ot,expected:J})}if(b[0]instanceof Array&&b.length>1)throw new Error("Parse Error: multiple actions possible at state: "+I+", token: "+y);switch(b[0]){case 1:c.push(y),u.push(f.yytext),t.push(f.yylloc),c.push(b[1]),y=null,kt=f.yyleng,s=f.yytext,q=f.yylineno,ot=f.yylloc;break;case 2:if(E=this.productions_[b[1]][1],v.$=u[u.length-E],v._$={first_line:t[t.length-(E||1)].first_line,last_line:t[t.length-1].last_line,first_column:t[t.length-(E||1)].first_column,last_column:t[t.length-1].last_column},It&&(v._$.range=[t[t.length-(E||1)].range[0],t[t.length-1].range[1]]),lt=this.performAction.apply(v,[s,kt,q,x.yy,b[1],u,t].concat(xt)),typeof lt<"u")return lt;E&&(c=c.slice(0,-1*E*2),u=u.slice(0,-1*E),t=t.slice(0,-1*E)),c.push(this.productions_[b[1]][0]),u.push(v.$),t.push(v._$),Ot=G[c[c.length-2]][c[c.length-1]],c.push(Ot);break;case 3:return!0}}return!0},"parse")},Nt=(function(){var N={EOF:1,parseError:l(function(a,c){if(this.yy.parser)this.yy.parser.parseError(a,c);else throw new Error(a)},"parseError"),setInput:l(function(n,a){return this.yy=a||this.yy||{},this._input=n,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:l(function(){var n=this._input[0];this.yytext+=n,this.yyleng++,this.offset++,this.match+=n,this.matched+=n;var a=n.match(/(?:\r\n?|\n).*/g);return a?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),n},"input"),unput:l(function(n){var a=n.length,c=n.split(/(?:\r\n?|\n)/g);this._input=n+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-a),this.offset-=a;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),c.length-1&&(this.yylineno-=c.length-1);var u=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:c?(c.length===r.length?this.yylloc.first_column:0)+r[r.length-c.length].length-c[0].length:this.yylloc.first_column-a},this.options.ranges&&(this.yylloc.range=[u[0],u[0]+this.yyleng-a]),this.yyleng=this.yytext.length,this},"unput"),more:l(function(){return this._more=!0,this},"more"),reject:l(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:l(function(n){this.unput(this.match.slice(n))},"less"),pastInput:l(function(){var n=this.matched.substr(0,this.matched.length-this.match.length);return(n.length>20?"...":"")+n.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:l(function(){var n=this.match;return n.length<20&&(n+=this._input.substr(0,20-n.length)),(n.substr(0,20)+(n.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:l(function(){var n=this.pastInput(),a=new Array(n.length+1).join("-");return n+this.upcomingInput()+` +`+a+"^"},"showPosition"),test_match:l(function(n,a){var c,r,u;if(this.options.backtrack_lexer&&(u={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&&(u.yylloc.range=this.yylloc.range.slice(0))),r=n[0].match(/(?:\r\n?|\n).*/g),r&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+n[0].length},this.yytext+=n[0],this.match+=n[0],this.matches=n,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(n[0].length),this.matched+=n[0],c=this.performAction.call(this,this.yy,this,a,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),c)return c;if(this._backtrack){for(var t in u)this[t]=u[t];return!1}return!1},"test_match"),next:l(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var n,a,c,r;this._more||(this.yytext="",this.match="");for(var u=this._currentRules(),t=0;ta[0].length)){if(a=c,r=t,this.options.backtrack_lexer){if(n=this.test_match(c,u[t]),n!==!1)return n;if(this._backtrack){a=!1;continue}else return!1}else if(!this.options.flex)break}return a?(n=this.test_match(a,u[r]),n!==!1?n:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:l(function(){var a=this.next();return a||this.lex()},"lex"),begin:l(function(a){this.conditionStack.push(a)},"begin"),popState:l(function(){var a=this.conditionStack.length-1;return a>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:l(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:l(function(a){return a=this.conditionStack.length-1-Math.abs(a||0),a>=0?this.conditionStack[a]:"INITIAL"},"topState"),pushState:l(function(a){this.begin(a)},"pushState"),stateStackSize:l(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:l(function(a,c,r,u){switch(r){case 0:return this.begin("acc_title"),24;case 1:return this.popState(),"acc_title_value";case 2:return this.begin("acc_descr"),26;case 3:return this.popState(),"acc_descr_value";case 4:this.begin("acc_descr_multiline");break;case 5:this.popState();break;case 6:return"acc_descr_multiline_value";case 7:return 33;case 8:return 34;case 9:return 35;case 10:return 36;case 11:return 10;case 12:break;case 13:return 8;case 14:return 50;case 15:return 70;case 16:return 4;case 17:return this.begin("block"),17;case 18:return 49;case 19:return 49;case 20:return 42;case 21:return 15;case 22:return 13;case 23:break;case 24:return 59;case 25:return 56;case 26:return 56;case 27:return 60;case 28:break;case 29:return this.popState(),19;case 30:return c.yytext[0];case 31:return 20;case 32:return 21;case 33:return this.begin("style"),44;case 34:return this.popState(),10;case 35:break;case 36:return 13;case 37:return 42;case 38:return 49;case 39:return this.begin("style"),37;case 40:return 43;case 41:return 63;case 42:return 65;case 43:return 65;case 44:return 65;case 45:return 63;case 46:return 63;case 47:return 64;case 48:return 64;case 49:return 64;case 50:return 64;case 51:return 64;case 52:return 65;case 53:return 64;case 54:return 65;case 55:return 66;case 56:return 66;case 57:return 66;case 58:return 66;case 59:return 63;case 60:return 64;case 61:return 65;case 62:return 67;case 63:return 68;case 64:return 69;case 65:return 69;case 66:return 68;case 67:return 68;case 68:return 68;case 69:return 41;case 70:return 47;case 71:return 40;case 72:return 48;case 73:return c.yytext[0];case 74:return 6}},"anonymous"),rules:[/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:[\s]+)/i,/^(?:"[^"%\r\n\v\b\\]+")/i,/^(?:"[^"]*")/i,/^(?:erDiagram\b)/i,/^(?:\{)/i,/^(?:#)/i,/^(?:#)/i,/^(?:,)/i,/^(?::::)/i,/^(?::)/i,/^(?:\s+)/i,/^(?:\b((?:PK)|(?:FK)|(?:UK))\b)/i,/^(?:([^\s]*)[~].*[~]([^\s]*))/i,/^(?:([\*A-Za-z_\u00C0-\uFFFF][A-Za-z0-9\-\_\[\]\(\)\u00C0-\uFFFF\*]*))/i,/^(?:"[^"]*")/i,/^(?:[\n]+)/i,/^(?:\})/i,/^(?:.)/i,/^(?:\[)/i,/^(?:\])/i,/^(?:style\b)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?::)/i,/^(?:,)/i,/^(?:#)/i,/^(?:classDef\b)/i,/^(?:class\b)/i,/^(?:one or zero\b)/i,/^(?:one or more\b)/i,/^(?:one or many\b)/i,/^(?:1\+)/i,/^(?:\|o\b)/i,/^(?:zero or one\b)/i,/^(?:zero or more\b)/i,/^(?:zero or many\b)/i,/^(?:0\+)/i,/^(?:\}o\b)/i,/^(?:many\(0\))/i,/^(?:many\(1\))/i,/^(?:many\b)/i,/^(?:\}\|)/i,/^(?:one\b)/i,/^(?:only one\b)/i,/^(?:1\b)/i,/^(?:\|\|)/i,/^(?:o\|)/i,/^(?:o\{)/i,/^(?:\|\{)/i,/^(?:\s*u\b)/i,/^(?:\.\.)/i,/^(?:--)/i,/^(?:to\b)/i,/^(?:optionally to\b)/i,/^(?:\.-)/i,/^(?:-\.)/i,/^(?:([^\x00-\x7F]|\w|-|\*)+)/i,/^(?:;)/i,/^(?:([^\x00-\x7F]|\w|-|\*)+)/i,/^(?:[0-9])/i,/^(?:.)/i,/^(?:$)/i],conditions:{style:{rules:[34,35,36,37,38,69,70],inclusive:!1},acc_descr_multiline:{rules:[5,6],inclusive:!1},acc_descr:{rules:[3],inclusive:!1},acc_title:{rules:[1],inclusive:!1},block:{rules:[23,24,25,26,27,28,29,30],inclusive:!1},INITIAL:{rules:[0,2,4,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,31,32,33,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,71,72,73,74],inclusive:!0}}};return N})();at.lexer=Nt;function X(){this.yy={}}return l(X,"Parser"),X.prototype=at,at.Parser=X,new X})();ut.parser=ut;var Qt=ut,Xt=class{constructor(){this.entities=new Map,this.relationships=[],this.classes=new Map,this.direction="TB",this.Cardinality={ZERO_OR_ONE:"ZERO_OR_ONE",ZERO_OR_MORE:"ZERO_OR_MORE",ONE_OR_MORE:"ONE_OR_MORE",ONLY_ONE:"ONLY_ONE",MD_PARENT:"MD_PARENT"},this.Identification={NON_IDENTIFYING:"NON_IDENTIFYING",IDENTIFYING:"IDENTIFYING"},this.setAccTitle=wt,this.getAccTitle=Vt,this.setAccDescription=Lt,this.getAccDescription=Mt,this.setDiagramTitle=Bt,this.getDiagramTitle=Ft,this.getConfig=l(()=>$().er,"getConfig"),this.clear(),this.addEntity=this.addEntity.bind(this),this.addAttributes=this.addAttributes.bind(this),this.addRelationship=this.addRelationship.bind(this),this.setDirection=this.setDirection.bind(this),this.addCssStyles=this.addCssStyles.bind(this),this.addClass=this.addClass.bind(this),this.setClass=this.setClass.bind(this),this.setAccTitle=this.setAccTitle.bind(this),this.setAccDescription=this.setAccDescription.bind(this)}static{l(this,"ErDB")}addEntity(e,i=""){return this.entities.has(e)?!this.entities.get(e)?.alias&&i&&(this.entities.get(e).alias=i,D.info(`Add alias '${i}' to entity '${e}'`)):(this.entities.set(e,{id:`entity-${e}-${this.entities.size}`,label:e,attributes:[],alias:i,shape:"erBox",look:$().look??"default",cssClasses:"default",cssStyles:[]}),D.info("Added new entity :",e)),this.entities.get(e)}getEntity(e){return this.entities.get(e)}getEntities(){return this.entities}getClasses(){return this.classes}addAttributes(e,i){const d=this.addEntity(e);let o;for(o=i.length-1;o>=0;o--)i[o].keys||(i[o].keys=[]),i[o].comment||(i[o].comment=""),d.attributes.push(i[o]),D.debug("Added attribute ",i[o].name)}addRelationship(e,i,d,o){const h=this.entities.get(e),p=this.entities.get(d);if(!h||!p)return;const R={entityA:h.id,roleA:i,entityB:p.id,relSpec:o};this.relationships.push(R),D.debug("Added new relationship :",R)}getRelationships(){return this.relationships}getDirection(){return this.direction}setDirection(e){this.direction=e}getCompiledStyles(e){let i=[];for(const d of e){const o=this.classes.get(d);o?.styles&&(i=[...i,...o.styles??[]].map(h=>h.trim())),o?.textStyles&&(i=[...i,...o.textStyles??[]].map(h=>h.trim()))}return i}addCssStyles(e,i){for(const d of e){const o=this.entities.get(d);if(!i||!o)return;for(const h of i)o.cssStyles.push(h)}}addClass(e,i){e.forEach(d=>{let o=this.classes.get(d);o===void 0&&(o={id:d,styles:[],textStyles:[]},this.classes.set(d,o)),i&&i.forEach(function(h){if(/color/.exec(h)){const p=h.replace("fill","bgFill");o.textStyles.push(p)}o.styles.push(h)})})}setClass(e,i){for(const d of e){const o=this.entities.get(d);if(o)for(const h of i)o.cssClasses+=" "+h}}clear(){this.entities=new Map,this.classes=new Map,this.relationships=[],Yt()}getData(){const e=[],i=[],d=$();for(const h of this.entities.keys()){const p=this.entities.get(h);p&&(p.cssCompiledStyles=this.getCompiledStyles(p.cssClasses.split(" ")),e.push(p))}let o=0;for(const h of this.relationships){const p={id:Pt(h.entityA,h.entityB,{prefix:"id",counter:o++}),type:"normal",curve:"basis",start:h.entityA,end:h.entityB,label:h.roleA,labelpos:"c",thickness:"normal",classes:"relationshipLine",arrowTypeStart:h.relSpec.cardB.toLowerCase(),arrowTypeEnd:h.relSpec.cardA.toLowerCase(),pattern:h.relSpec.relType=="IDENTIFYING"?"solid":"dashed",look:d.look};i.push(p)}return{nodes:e,edges:i,other:{},config:d,direction:"TB"}}},At={};Gt(At,{draw:()=>qt});var qt=l(async function(e,i,d,o){D.info("REF0:"),D.info("Drawing er diagram (unified)",i);const{securityLevel:h,er:p,layout:R}=$(),g=o.db.getData(),m=vt(i,h);g.type=o.type,g.layoutAlgorithm=Kt(R),g.config.flowchart.nodeSpacing=p?.nodeSpacing||140,g.config.flowchart.rankSpacing=p?.rankSpacing||80,g.direction=o.db.getDirection(),g.markers=["only_one","zero_or_one","one_or_more","zero_or_more"],g.diagramId=i,await Zt(g,m),g.layoutAlgorithm==="elk"&&m.select(".edges").lower();const w=m.selectAll('[id*="-background"]');Array.from(w).length>0&&w.each(function(){const k=Ut(this),Z=k.attr("id").replace("-background",""),S=m.select(`#${CSS.escape(Z)}`);if(!S.empty()){const V=S.attr("transform");k.attr("transform",V)}});const K=8;jt.insertTitle(m,"erDiagramTitleText",p?.titleTopMargin??25,o.db.getDiagramTitle()),Dt(m,K,"erDiagram",p?.useMaxWidth??!0)},"draw"),Ht=l((e,i)=>{const d=Wt,o=d(e,"r"),h=d(e,"g"),p=d(e,"b");return zt(o,h,p,i)},"fade"),Jt=l(e=>` + .entityBox { + fill: ${e.mainBkg}; + stroke: ${e.nodeBorder}; + } + + .relationshipLabelBox { + fill: ${e.tertiaryColor}; + opacity: 0.7; + background-color: ${e.tertiaryColor}; + rect { + opacity: 0.5; + } + } + + .labelBkg { + background-color: ${Ht(e.tertiaryColor,.5)}; + } + + .edgeLabel .label { + fill: ${e.nodeBorder}; + font-size: 14px; + } + + .label { + font-family: ${e.fontFamily}; + color: ${e.nodeTextColor||e.textColor}; + } + + .edge-pattern-dashed { + stroke-dasharray: 8,8; + } + + .node rect, + .node circle, + .node ellipse, + .node polygon + { + fill: ${e.mainBkg}; + stroke: ${e.nodeBorder}; + stroke-width: 1px; + } + + .relationshipLine { + stroke: ${e.lineColor}; + stroke-width: 1; + fill: none; + } + + .marker { + fill: none !important; + stroke: ${e.lineColor} !important; + stroke-width: 1; + } +`,"getStyles"),$t=Jt,ne={parser:Qt,get db(){return new Xt},renderer:At,styles:$t};export{ne as diagram}; diff --git a/_astro/firefox.C8clDc_x_Z1XWJ7R.webp b/_astro/firefox.C8clDc_x_Z1XWJ7R.webp new file mode 100644 index 00000000..8185fec9 Binary files /dev/null and b/_astro/firefox.C8clDc_x_Z1XWJ7R.webp differ diff --git a/_astro/flowDiagram-NV44I4VS.PKUPp6Gy.js b/_astro/flowDiagram-NV44I4VS.PKUPp6Gy.js new file mode 100644 index 00000000..5a4ec9e5 --- /dev/null +++ b/_astro/flowDiagram-NV44I4VS.PKUPp6Gy.js @@ -0,0 +1,162 @@ +import{g as Yt}from"./chunk-FMBD7UC4.Tjciooq0.js";import{_ as A,n as Pt,l as $,c as g1,d as E1,o as qt,r as Ht,u as st,b as Xt,s as Qt,p as Jt,a as Zt,g as $t,q as te,k as ee,t as se,J as ie,v as re,x as et,y as ae,z as ne,A as ue}from"./mermaid.core.LbQlJBBQ.js";import{g as oe}from"./chunk-55IACEB6.b7ueBidu.js";import{s as le}from"./chunk-QN33PNHL.BI3h-IJf.js";import{c as ce}from"./channel.y7_wL4g7.js";import"./page._rMDHl_T.js";var he="flowchart-",de=class{constructor(){this.vertexCounter=0,this.config=g1(),this.vertices=new Map,this.edges=[],this.classes=new Map,this.subGraphs=[],this.subGraphLookup=new Map,this.tooltips=new Map,this.subCount=0,this.firstGraphFlag=!0,this.secCount=-1,this.posCrossRef=[],this.funs=[],this.setAccTitle=Xt,this.setAccDescription=Qt,this.setDiagramTitle=Jt,this.getAccTitle=Zt,this.getAccDescription=$t,this.getDiagramTitle=te,this.funs.push(this.setupToolTips.bind(this)),this.addVertex=this.addVertex.bind(this),this.firstGraph=this.firstGraph.bind(this),this.setDirection=this.setDirection.bind(this),this.addSubGraph=this.addSubGraph.bind(this),this.addLink=this.addLink.bind(this),this.setLink=this.setLink.bind(this),this.updateLink=this.updateLink.bind(this),this.addClass=this.addClass.bind(this),this.setClass=this.setClass.bind(this),this.destructLink=this.destructLink.bind(this),this.setClickEvent=this.setClickEvent.bind(this),this.setTooltip=this.setTooltip.bind(this),this.updateLinkInterpolate=this.updateLinkInterpolate.bind(this),this.setClickFun=this.setClickFun.bind(this),this.bindFunctions=this.bindFunctions.bind(this),this.lex={firstGraph:this.firstGraph.bind(this)},this.clear(),this.setGen("gen-2")}static{A(this,"FlowDB")}sanitizeText(t){return ee.sanitizeText(t,this.config)}lookUpDomId(t){for(const i of this.vertices.values())if(i.id===t)return i.domId;return t}addVertex(t,i,r,a,o,d,l={},b){if(!t||t.trim().length===0)return;let u;if(b!==void 0){let D;b.includes(` +`)?D=b+` +`:D=`{ +`+b+` +}`,u=se(D,{schema:ie})}const p=this.edges.find(D=>D.id===t);if(p){const D=u;D?.animate!==void 0&&(p.animate=D.animate),D?.animation!==void 0&&(p.animation=D.animation),D?.curve!==void 0&&(p.interpolate=D.curve);return}let S,g=this.vertices.get(t);if(g===void 0&&(g={id:t,labelType:"text",domId:he+t+"-"+this.vertexCounter,styles:[],classes:[]},this.vertices.set(t,g)),this.vertexCounter++,i!==void 0?(this.config=g1(),S=this.sanitizeText(i.text.trim()),g.labelType=i.type,S.startsWith('"')&&S.endsWith('"')&&(S=S.substring(1,S.length-1)),g.text=S):g.text===void 0&&(g.text=t),r!==void 0&&(g.type=r),a?.forEach(D=>{g.styles.push(D)}),o?.forEach(D=>{g.classes.push(D)}),d!==void 0&&(g.dir=d),g.props===void 0?g.props=l:l!==void 0&&Object.assign(g.props,l),u!==void 0){if(u.shape){if(u.shape!==u.shape.toLowerCase()||u.shape.includes("_"))throw new Error(`No such shape: ${u.shape}. Shape names should be lowercase.`);if(!re(u.shape))throw new Error(`No such shape: ${u.shape}.`);g.type=u?.shape}u?.label&&(g.text=u?.label),u?.icon&&(g.icon=u?.icon,!u.label?.trim()&&g.text===t&&(g.text="")),u?.form&&(g.form=u?.form),u?.pos&&(g.pos=u?.pos),u?.img&&(g.img=u?.img,!u.label?.trim()&&g.text===t&&(g.text="")),u?.constraint&&(g.constraint=u.constraint),u.w&&(g.assetWidth=Number(u.w)),u.h&&(g.assetHeight=Number(u.h))}}addSingleLink(t,i,r,a){const l={start:t,end:i,type:void 0,text:"",labelType:"text",classes:[],isUserDefinedId:!1,interpolate:this.edges.defaultInterpolate};$.info("abc78 Got edge...",l);const b=r.text;if(b!==void 0&&(l.text=this.sanitizeText(b.text.trim()),l.text.startsWith('"')&&l.text.endsWith('"')&&(l.text=l.text.substring(1,l.text.length-1)),l.labelType=b.type),r!==void 0&&(l.type=r.type,l.stroke=r.stroke,l.length=r.length>10?10:r.length),a&&!this.edges.some(u=>u.id===a))l.id=a,l.isUserDefinedId=!0;else{const u=this.edges.filter(p=>p.start===l.start&&p.end===l.end);u.length===0?l.id=et(l.start,l.end,{counter:0,prefix:"L"}):l.id=et(l.start,l.end,{counter:u.length+1,prefix:"L"})}if(this.edges.length<(this.config.maxEdges??500))$.info("Pushing edge..."),this.edges.push(l);else throw new Error(`Edge limit exceeded. ${this.edges.length} edges found, but the limit is ${this.config.maxEdges}. + +Initialize mermaid with maxEdges set to a higher number to allow more edges. +You cannot set this config via configuration inside the diagram as it is a secure config. +You have to call mermaid.initialize.`)}isLinkData(t){return t!==null&&typeof t=="object"&&"id"in t&&typeof t.id=="string"}addLink(t,i,r){const a=this.isLinkData(r)?r.id.replace("@",""):void 0;$.info("addLink",t,i,a);for(const o of t)for(const d of i){const l=o===t[t.length-1],b=d===i[0];l&&b?this.addSingleLink(o,d,r,a):this.addSingleLink(o,d,r,void 0)}}updateLinkInterpolate(t,i){t.forEach(r=>{r==="default"?this.edges.defaultInterpolate=i:this.edges[r].interpolate=i})}updateLink(t,i){t.forEach(r=>{if(typeof r=="number"&&r>=this.edges.length)throw new Error(`The index ${r} for linkStyle is out of bounds. Valid indices for linkStyle are between 0 and ${this.edges.length-1}. (Help: Ensure that the index is within the range of existing edges.)`);r==="default"?this.edges.defaultStyle=i:(this.edges[r].style=i,(this.edges[r]?.style?.length??0)>0&&!this.edges[r]?.style?.some(a=>a?.startsWith("fill"))&&this.edges[r]?.style?.push("fill:none"))})}addClass(t,i){const r=i.join().replace(/\\,/g,"§§§").replace(/,/g,";").replace(/§§§/g,",").split(";");t.split(",").forEach(a=>{let o=this.classes.get(a);o===void 0&&(o={id:a,styles:[],textStyles:[]},this.classes.set(a,o)),r?.forEach(d=>{if(/color/.exec(d)){const l=d.replace("fill","bgFill");o.textStyles.push(l)}o.styles.push(d)})})}setDirection(t){this.direction=t.trim(),/.*/.exec(this.direction)&&(this.direction="LR"),/.*v/.exec(this.direction)&&(this.direction="TB"),this.direction==="TD"&&(this.direction="TB")}setClass(t,i){for(const r of t.split(",")){const a=this.vertices.get(r);a&&a.classes.push(i);const o=this.edges.find(l=>l.id===r);o&&o.classes.push(i);const d=this.subGraphLookup.get(r);d&&d.classes.push(i)}}setTooltip(t,i){if(i!==void 0){i=this.sanitizeText(i);for(const r of t.split(","))this.tooltips.set(this.version==="gen-1"?this.lookUpDomId(r):r,i)}}setClickFun(t,i,r){const a=this.lookUpDomId(t);if(g1().securityLevel!=="loose"||i===void 0)return;let o=[];if(typeof r=="string"){o=r.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let l=0;l{const l=document.querySelector(`[id="${a}"]`);l!==null&&l.addEventListener("click",()=>{st.runFunc(i,...o)},!1)}))}setLink(t,i,r){t.split(",").forEach(a=>{const o=this.vertices.get(a);o!==void 0&&(o.link=st.formatUrl(i,this.config),o.linkTarget=r)}),this.setClass(t,"clickable")}getTooltip(t){return this.tooltips.get(t)}setClickEvent(t,i,r){t.split(",").forEach(a=>{this.setClickFun(a,i,r)}),this.setClass(t,"clickable")}bindFunctions(t){this.funs.forEach(i=>{i(t)})}getDirection(){return this.direction?.trim()}getVertices(){return this.vertices}getEdges(){return this.edges}getClasses(){return this.classes}setupToolTips(t){let i=E1(".mermaidTooltip");(i._groups||i)[0][0]===null&&(i=E1("body").append("div").attr("class","mermaidTooltip").style("opacity",0)),E1(t).select("svg").selectAll("g.node").on("mouseover",o=>{const d=E1(o.currentTarget);if(d.attr("title")===null)return;const b=o.currentTarget?.getBoundingClientRect();i.transition().duration(200).style("opacity",".9"),i.text(d.attr("title")).style("left",window.scrollX+b.left+(b.right-b.left)/2+"px").style("top",window.scrollY+b.bottom+"px"),i.html(i.html().replace(/<br\/>/g,"
")),d.classed("hover",!0)}).on("mouseout",o=>{i.transition().duration(500).style("opacity",0),E1(o.currentTarget).classed("hover",!1)})}clear(t="gen-2"){this.vertices=new Map,this.classes=new Map,this.edges=[],this.funs=[this.setupToolTips.bind(this)],this.subGraphs=[],this.subGraphLookup=new Map,this.subCount=0,this.tooltips=new Map,this.firstGraphFlag=!0,this.version=t,this.config=g1(),ae()}setGen(t){this.version=t||"gen-2"}defaultStyle(){return"fill:#ffa;stroke: #f66; stroke-width: 3px; stroke-dasharray: 5, 5;fill:#ffa;stroke: #666;"}addSubGraph(t,i,r){let a=t.text.trim(),o=r.text;t===r&&/\s/.exec(r.text)&&(a=void 0);const l=A(g=>{const D={boolean:{},number:{},string:{}},K=[];let x;return{nodeList:g.filter(function(U){const J=typeof U;return U.stmt&&U.stmt==="dir"?(x=U.value,!1):U.trim()===""?!1:J in D?D[J].hasOwnProperty(U)?!1:D[J][U]=!0:K.includes(U)?!1:K.push(U)}),dir:x}},"uniq")(i.flat()),b=l.nodeList;let u=l.dir;const p=g1().flowchart??{};if(u=u??(p.inheritDir?this.getDirection()??g1().direction??void 0:void 0),this.version==="gen-1")for(let g=0;g2e3)return{result:!1,count:0};if(this.posCrossRef[this.secCount]=i,this.subGraphs[i].id===t)return{result:!0,count:0};let a=0,o=1;for(;a=0){const l=this.indexNodes2(t,d);if(l.result)return{result:!0,count:o+l.count};o=o+l.count}a=a+1}return{result:!1,count:o}}getDepthFirstPos(t){return this.posCrossRef[t]}indexNodes(){this.secCount=-1,this.subGraphs.length>0&&this.indexNodes2("none",this.subGraphs.length-1)}getSubGraphs(){return this.subGraphs}firstGraph(){return this.firstGraphFlag?(this.firstGraphFlag=!1,!0):!1}destructStartLink(t){let i=t.trim(),r="arrow_open";switch(i[0]){case"<":r="arrow_point",i=i.slice(1);break;case"x":r="arrow_cross",i=i.slice(1);break;case"o":r="arrow_circle",i=i.slice(1);break}let a="normal";return i.includes("=")&&(a="thick"),i.includes(".")&&(a="dotted"),{type:r,stroke:a}}countChar(t,i){const r=i.length;let a=0;for(let o=0;o":a="arrow_point",i.startsWith("<")&&(a="double_"+a,r=r.slice(1));break;case"o":a="arrow_circle",i.startsWith("o")&&(a="double_"+a,r=r.slice(1));break}let o="normal",d=r.length-1;r.startsWith("=")&&(o="thick"),r.startsWith("~")&&(o="invisible");const l=this.countChar(".",r);return l&&(o="dotted",d=l),{type:a,stroke:o,length:d}}destructLink(t,i){const r=this.destructEndLink(t);let a;if(i){if(a=this.destructStartLink(i),a.stroke!==r.stroke)return{type:"INVALID",stroke:"INVALID"};if(a.type==="arrow_open")a.type=r.type;else{if(a.type!==r.type)return{type:"INVALID",stroke:"INVALID"};a.type="double_"+a.type}return a.type==="double_arrow"&&(a.type="double_arrow_point"),a.length=r.length,a}return r}exists(t,i){for(const r of t)if(r.nodes.includes(i))return!0;return!1}makeUniq(t,i){const r=[];return t.nodes.forEach((a,o)=>{this.exists(i,a)||r.push(t.nodes[o])}),{nodes:r}}getTypeFromVertex(t){if(t.img)return"imageSquare";if(t.icon)return t.form==="circle"?"iconCircle":t.form==="square"?"iconSquare":t.form==="rounded"?"iconRounded":"icon";switch(t.type){case"square":case void 0:return"squareRect";case"round":return"roundedRect";case"ellipse":return"ellipse";default:return t.type}}findNode(t,i){return t.find(r=>r.id===i)}destructEdgeType(t){let i="none",r="arrow_point";switch(t){case"arrow_point":case"arrow_circle":case"arrow_cross":r=t;break;case"double_arrow_point":case"double_arrow_circle":case"double_arrow_cross":i=t.replace("double_",""),r=i;break}return{arrowTypeStart:i,arrowTypeEnd:r}}addNodeFromVertex(t,i,r,a,o,d){const l=r.get(t.id),b=a.get(t.id)??!1,u=this.findNode(i,t.id);if(u)u.cssStyles=t.styles,u.cssCompiledStyles=this.getCompiledStyles(t.classes),u.cssClasses=t.classes.join(" ");else{const p={id:t.id,label:t.text,labelStyle:"",parentId:l,padding:o.flowchart?.padding||8,cssStyles:t.styles,cssCompiledStyles:this.getCompiledStyles(["default","node",...t.classes]),cssClasses:"default "+t.classes.join(" "),dir:t.dir,domId:t.domId,look:d,link:t.link,linkTarget:t.linkTarget,tooltip:this.getTooltip(t.id),icon:t.icon,pos:t.pos,img:t.img,assetWidth:t.assetWidth,assetHeight:t.assetHeight,constraint:t.constraint};b?i.push({...p,isGroup:!0,shape:"rect"}):i.push({...p,isGroup:!1,shape:this.getTypeFromVertex(t)})}}getCompiledStyles(t){let i=[];for(const r of t){const a=this.classes.get(r);a?.styles&&(i=[...i,...a.styles??[]].map(o=>o.trim())),a?.textStyles&&(i=[...i,...a.textStyles??[]].map(o=>o.trim()))}return i}getData(){const t=g1(),i=[],r=[],a=this.getSubGraphs(),o=new Map,d=new Map;for(let u=a.length-1;u>=0;u--){const p=a[u];p.nodes.length>0&&d.set(p.id,!0);for(const S of p.nodes)o.set(S,p.id)}for(let u=a.length-1;u>=0;u--){const p=a[u];i.push({id:p.id,label:p.title,labelStyle:"",parentId:o.get(p.id),padding:8,cssCompiledStyles:this.getCompiledStyles(p.classes),cssClasses:p.classes.join(" "),shape:"rect",dir:p.dir,isGroup:!0,look:t.look})}this.getVertices().forEach(u=>{this.addNodeFromVertex(u,i,o,d,t,t.look||"classic")});const b=this.getEdges();return b.forEach((u,p)=>{const{arrowTypeStart:S,arrowTypeEnd:g}=this.destructEdgeType(u.type),D=[...b.defaultStyle??[]];u.style&&D.push(...u.style);const K={id:et(u.start,u.end,{counter:p,prefix:"L"},u.id),isUserDefinedId:u.isUserDefinedId,start:u.start,end:u.end,type:u.type??"normal",label:u.text,labelpos:"c",thickness:u.stroke,minlen:u.length,classes:u?.stroke==="invisible"?"":"edge-thickness-normal edge-pattern-solid flowchart-link",arrowTypeStart:u?.stroke==="invisible"||u?.type==="arrow_open"?"none":S,arrowTypeEnd:u?.stroke==="invisible"||u?.type==="arrow_open"?"none":g,arrowheadStyle:"fill: #333",cssCompiledStyles:this.getCompiledStyles(u.classes),labelStyle:D,style:D,pattern:u.stroke,look:t.look,animate:u.animate,animation:u.animation,curve:u.interpolate||this.edges.defaultInterpolate||t.flowchart?.curve};r.push(K)}),{nodes:i,edges:r,other:{},config:t}}defaultConfig(){return ne.flowchart}},pe=A(function(t,i){return i.db.getClasses()},"getClasses"),fe=A(async function(t,i,r,a){$.info("REF0:"),$.info("Drawing state diagram (v2)",i);const{securityLevel:o,flowchart:d,layout:l}=g1();let b;o==="sandbox"&&(b=E1("#i"+i));const u=o==="sandbox"?b.nodes()[0].contentDocument:document;$.debug("Before getData: ");const p=a.db.getData();$.debug("Data: ",p);const S=oe(i,o),g=a.db.getDirection();p.type=a.type,p.layoutAlgorithm=qt(l),p.layoutAlgorithm==="dagre"&&l==="elk"&&$.warn("flowchart-elk was moved to an external package in Mermaid v11. Please refer [release notes](https://github.com/mermaid-js/mermaid/releases/tag/v11.0.0) for more details. This diagram will be rendered using `dagre` layout as a fallback."),p.direction=g,p.nodeSpacing=d?.nodeSpacing||50,p.rankSpacing=d?.rankSpacing||50,p.markers=["point","circle","cross"],p.diagramId=i,$.debug("REF1:",p),await Ht(p,S);const D=p.config.flowchart?.diagramPadding??8;st.insertTitle(S,"flowchartTitleText",d?.titleTopMargin||0,a.db.getDiagramTitle()),le(S,D,"flowchart",d?.useMaxWidth||!1);for(const K of p.nodes){const x=E1(`#${i} [id="${K.id}"]`);if(!x||!K.link)continue;const F=u.createElementNS("http://www.w3.org/2000/svg","a");F.setAttributeNS("http://www.w3.org/2000/svg","class",K.cssClasses),F.setAttributeNS("http://www.w3.org/2000/svg","rel","noopener"),o==="sandbox"?F.setAttributeNS("http://www.w3.org/2000/svg","target","_top"):K.linkTarget&&F.setAttributeNS("http://www.w3.org/2000/svg","target",K.linkTarget);const U=x.insert(function(){return F},":first-child"),J=x.select(".label-container");J&&U.append(function(){return J.node()});const b1=x.select(".label");b1&&U.append(function(){return b1.node()})}},"draw"),ge={getClasses:pe,draw:fe},it=(function(){var t=A(function(f1,c,h,f){for(h=h||{},f=f1.length;f--;h[f1[f]]=c);return h},"o"),i=[1,4],r=[1,3],a=[1,5],o=[1,8,9,10,11,27,34,36,38,44,60,84,85,86,87,88,89,102,105,106,109,111,114,115,116,121,122,123,124],d=[2,2],l=[1,13],b=[1,14],u=[1,15],p=[1,16],S=[1,23],g=[1,25],D=[1,26],K=[1,27],x=[1,49],F=[1,48],U=[1,29],J=[1,30],b1=[1,31],P1=[1,32],O1=[1,33],L=[1,44],V=[1,46],w=[1,42],I=[1,47],R=[1,43],N=[1,50],G=[1,45],P=[1,51],O=[1,52],M1=[1,34],U1=[1,35],W1=[1,36],z1=[1,37],d1=[1,57],T=[1,8,9,10,11,27,32,34,36,38,44,60,84,85,86,87,88,89,102,105,106,109,111,114,115,116,121,122,123,124],t1=[1,61],e1=[1,60],s1=[1,62],C1=[8,9,11,75,77,78],rt=[1,78],D1=[1,91],S1=[1,96],x1=[1,95],T1=[1,92],y1=[1,88],F1=[1,94],_1=[1,90],B1=[1,97],v1=[1,93],L1=[1,98],V1=[1,89],A1=[8,9,10,11,40,75,77,78],W=[8,9,10,11,40,46,75,77,78],q=[8,9,10,11,29,40,44,46,48,50,52,54,56,58,60,63,65,67,68,70,75,77,78,89,102,105,106,109,111,114,115,116],at=[8,9,11,44,60,75,77,78,89,102,105,106,109,111,114,115,116],w1=[44,60,89,102,105,106,109,111,114,115,116],nt=[1,121],ut=[1,122],j1=[1,124],K1=[1,123],ot=[44,60,62,74,89,102,105,106,109,111,114,115,116],lt=[1,133],ct=[1,147],ht=[1,148],dt=[1,149],pt=[1,150],ft=[1,135],gt=[1,137],bt=[1,141],At=[1,142],kt=[1,143],mt=[1,144],Et=[1,145],Ct=[1,146],Dt=[1,151],St=[1,152],xt=[1,131],Tt=[1,132],yt=[1,139],Ft=[1,134],_t=[1,138],Bt=[1,136],X1=[8,9,10,11,27,32,34,36,38,44,60,84,85,86,87,88,89,102,105,106,109,111,114,115,116,121,122,123,124],vt=[1,154],Lt=[1,156],B=[8,9,11],H=[8,9,10,11,14,44,60,89,105,106,109,111,114,115,116],k=[1,176],z=[1,172],j=[1,173],m=[1,177],E=[1,174],C=[1,175],I1=[77,116,119],y=[8,9,10,11,12,14,27,29,32,44,60,75,84,85,86,87,88,89,90,105,109,111,114,115,116],Vt=[10,106],p1=[31,49,51,53,55,57,62,64,66,67,69,71,116,117,118],i1=[1,247],r1=[1,245],a1=[1,249],n1=[1,243],u1=[1,244],o1=[1,246],l1=[1,248],c1=[1,250],R1=[1,268],wt=[8,9,11,106],Z=[8,9,10,11,60,84,105,106,109,110,111,112],Q1={trace:A(function(){},"trace"),yy:{},symbols_:{error:2,start:3,graphConfig:4,document:5,line:6,statement:7,SEMI:8,NEWLINE:9,SPACE:10,EOF:11,GRAPH:12,NODIR:13,DIR:14,FirstStmtSeparator:15,ending:16,endToken:17,spaceList:18,spaceListNewline:19,vertexStatement:20,separator:21,styleStatement:22,linkStyleStatement:23,classDefStatement:24,classStatement:25,clickStatement:26,subgraph:27,textNoTags:28,SQS:29,text:30,SQE:31,end:32,direction:33,acc_title:34,acc_title_value:35,acc_descr:36,acc_descr_value:37,acc_descr_multiline_value:38,shapeData:39,SHAPE_DATA:40,link:41,node:42,styledVertex:43,AMP:44,vertex:45,STYLE_SEPARATOR:46,idString:47,DOUBLECIRCLESTART:48,DOUBLECIRCLEEND:49,PS:50,PE:51,"(-":52,"-)":53,STADIUMSTART:54,STADIUMEND:55,SUBROUTINESTART:56,SUBROUTINEEND:57,VERTEX_WITH_PROPS_START:58,"NODE_STRING[field]":59,COLON:60,"NODE_STRING[value]":61,PIPE:62,CYLINDERSTART:63,CYLINDEREND:64,DIAMOND_START:65,DIAMOND_STOP:66,TAGEND:67,TRAPSTART:68,TRAPEND:69,INVTRAPSTART:70,INVTRAPEND:71,linkStatement:72,arrowText:73,TESTSTR:74,START_LINK:75,edgeText:76,LINK:77,LINK_ID:78,edgeTextToken:79,STR:80,MD_STR:81,textToken:82,keywords:83,STYLE:84,LINKSTYLE:85,CLASSDEF:86,CLASS:87,CLICK:88,DOWN:89,UP:90,textNoTagsToken:91,stylesOpt:92,"idString[vertex]":93,"idString[class]":94,CALLBACKNAME:95,CALLBACKARGS:96,HREF:97,LINK_TARGET:98,"STR[link]":99,"STR[tooltip]":100,alphaNum:101,DEFAULT:102,numList:103,INTERPOLATE:104,NUM:105,COMMA:106,style:107,styleComponent:108,NODE_STRING:109,UNIT:110,BRKT:111,PCT:112,idStringToken:113,MINUS:114,MULT:115,UNICODE_TEXT:116,TEXT:117,TAGSTART:118,EDGE_TEXT:119,alphaNumToken:120,direction_tb:121,direction_bt:122,direction_rl:123,direction_lr:124,$accept:0,$end:1},terminals_:{2:"error",8:"SEMI",9:"NEWLINE",10:"SPACE",11:"EOF",12:"GRAPH",13:"NODIR",14:"DIR",27:"subgraph",29:"SQS",31:"SQE",32:"end",34:"acc_title",35:"acc_title_value",36:"acc_descr",37:"acc_descr_value",38:"acc_descr_multiline_value",40:"SHAPE_DATA",44:"AMP",46:"STYLE_SEPARATOR",48:"DOUBLECIRCLESTART",49:"DOUBLECIRCLEEND",50:"PS",51:"PE",52:"(-",53:"-)",54:"STADIUMSTART",55:"STADIUMEND",56:"SUBROUTINESTART",57:"SUBROUTINEEND",58:"VERTEX_WITH_PROPS_START",59:"NODE_STRING[field]",60:"COLON",61:"NODE_STRING[value]",62:"PIPE",63:"CYLINDERSTART",64:"CYLINDEREND",65:"DIAMOND_START",66:"DIAMOND_STOP",67:"TAGEND",68:"TRAPSTART",69:"TRAPEND",70:"INVTRAPSTART",71:"INVTRAPEND",74:"TESTSTR",75:"START_LINK",77:"LINK",78:"LINK_ID",80:"STR",81:"MD_STR",84:"STYLE",85:"LINKSTYLE",86:"CLASSDEF",87:"CLASS",88:"CLICK",89:"DOWN",90:"UP",93:"idString[vertex]",94:"idString[class]",95:"CALLBACKNAME",96:"CALLBACKARGS",97:"HREF",98:"LINK_TARGET",99:"STR[link]",100:"STR[tooltip]",102:"DEFAULT",104:"INTERPOLATE",105:"NUM",106:"COMMA",109:"NODE_STRING",110:"UNIT",111:"BRKT",112:"PCT",114:"MINUS",115:"MULT",116:"UNICODE_TEXT",117:"TEXT",118:"TAGSTART",119:"EDGE_TEXT",121:"direction_tb",122:"direction_bt",123:"direction_rl",124:"direction_lr"},productions_:[0,[3,2],[5,0],[5,2],[6,1],[6,1],[6,1],[6,1],[6,1],[4,2],[4,2],[4,2],[4,3],[16,2],[16,1],[17,1],[17,1],[17,1],[15,1],[15,1],[15,2],[19,2],[19,2],[19,1],[19,1],[18,2],[18,1],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,9],[7,6],[7,4],[7,1],[7,2],[7,2],[7,1],[21,1],[21,1],[21,1],[39,2],[39,1],[20,4],[20,3],[20,4],[20,2],[20,2],[20,1],[42,1],[42,6],[42,5],[43,1],[43,3],[45,4],[45,4],[45,6],[45,4],[45,4],[45,4],[45,8],[45,4],[45,4],[45,4],[45,6],[45,4],[45,4],[45,4],[45,4],[45,4],[45,1],[41,2],[41,3],[41,3],[41,1],[41,3],[41,4],[76,1],[76,2],[76,1],[76,1],[72,1],[72,2],[73,3],[30,1],[30,2],[30,1],[30,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[28,1],[28,2],[28,1],[28,1],[24,5],[25,5],[26,2],[26,4],[26,3],[26,5],[26,3],[26,5],[26,5],[26,7],[26,2],[26,4],[26,2],[26,4],[26,4],[26,6],[22,5],[23,5],[23,5],[23,9],[23,9],[23,7],[23,7],[103,1],[103,3],[92,1],[92,3],[107,1],[107,2],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[82,1],[82,1],[82,1],[82,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[79,1],[79,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[47,1],[47,2],[101,1],[101,2],[33,1],[33,1],[33,1],[33,1]],performAction:A(function(c,h,f,n,_,e,G1){var s=e.length-1;switch(_){case 2:this.$=[];break;case 3:(!Array.isArray(e[s])||e[s].length>0)&&e[s-1].push(e[s]),this.$=e[s-1];break;case 4:case 183:this.$=e[s];break;case 11:n.setDirection("TB"),this.$="TB";break;case 12:n.setDirection(e[s-1]),this.$=e[s-1];break;case 27:this.$=e[s-1].nodes;break;case 28:case 29:case 30:case 31:case 32:this.$=[];break;case 33:this.$=n.addSubGraph(e[s-6],e[s-1],e[s-4]);break;case 34:this.$=n.addSubGraph(e[s-3],e[s-1],e[s-3]);break;case 35:this.$=n.addSubGraph(void 0,e[s-1],void 0);break;case 37:this.$=e[s].trim(),n.setAccTitle(this.$);break;case 38:case 39:this.$=e[s].trim(),n.setAccDescription(this.$);break;case 43:this.$=e[s-1]+e[s];break;case 44:this.$=e[s];break;case 45:n.addVertex(e[s-1][e[s-1].length-1],void 0,void 0,void 0,void 0,void 0,void 0,e[s]),n.addLink(e[s-3].stmt,e[s-1],e[s-2]),this.$={stmt:e[s-1],nodes:e[s-1].concat(e[s-3].nodes)};break;case 46:n.addLink(e[s-2].stmt,e[s],e[s-1]),this.$={stmt:e[s],nodes:e[s].concat(e[s-2].nodes)};break;case 47:n.addLink(e[s-3].stmt,e[s-1],e[s-2]),this.$={stmt:e[s-1],nodes:e[s-1].concat(e[s-3].nodes)};break;case 48:this.$={stmt:e[s-1],nodes:e[s-1]};break;case 49:n.addVertex(e[s-1][e[s-1].length-1],void 0,void 0,void 0,void 0,void 0,void 0,e[s]),this.$={stmt:e[s-1],nodes:e[s-1],shapeData:e[s]};break;case 50:this.$={stmt:e[s],nodes:e[s]};break;case 51:this.$=[e[s]];break;case 52:n.addVertex(e[s-5][e[s-5].length-1],void 0,void 0,void 0,void 0,void 0,void 0,e[s-4]),this.$=e[s-5].concat(e[s]);break;case 53:this.$=e[s-4].concat(e[s]);break;case 54:this.$=e[s];break;case 55:this.$=e[s-2],n.setClass(e[s-2],e[s]);break;case 56:this.$=e[s-3],n.addVertex(e[s-3],e[s-1],"square");break;case 57:this.$=e[s-3],n.addVertex(e[s-3],e[s-1],"doublecircle");break;case 58:this.$=e[s-5],n.addVertex(e[s-5],e[s-2],"circle");break;case 59:this.$=e[s-3],n.addVertex(e[s-3],e[s-1],"ellipse");break;case 60:this.$=e[s-3],n.addVertex(e[s-3],e[s-1],"stadium");break;case 61:this.$=e[s-3],n.addVertex(e[s-3],e[s-1],"subroutine");break;case 62:this.$=e[s-7],n.addVertex(e[s-7],e[s-1],"rect",void 0,void 0,void 0,Object.fromEntries([[e[s-5],e[s-3]]]));break;case 63:this.$=e[s-3],n.addVertex(e[s-3],e[s-1],"cylinder");break;case 64:this.$=e[s-3],n.addVertex(e[s-3],e[s-1],"round");break;case 65:this.$=e[s-3],n.addVertex(e[s-3],e[s-1],"diamond");break;case 66:this.$=e[s-5],n.addVertex(e[s-5],e[s-2],"hexagon");break;case 67:this.$=e[s-3],n.addVertex(e[s-3],e[s-1],"odd");break;case 68:this.$=e[s-3],n.addVertex(e[s-3],e[s-1],"trapezoid");break;case 69:this.$=e[s-3],n.addVertex(e[s-3],e[s-1],"inv_trapezoid");break;case 70:this.$=e[s-3],n.addVertex(e[s-3],e[s-1],"lean_right");break;case 71:this.$=e[s-3],n.addVertex(e[s-3],e[s-1],"lean_left");break;case 72:this.$=e[s],n.addVertex(e[s]);break;case 73:e[s-1].text=e[s],this.$=e[s-1];break;case 74:case 75:e[s-2].text=e[s-1],this.$=e[s-2];break;case 76:this.$=e[s];break;case 77:var v=n.destructLink(e[s],e[s-2]);this.$={type:v.type,stroke:v.stroke,length:v.length,text:e[s-1]};break;case 78:var v=n.destructLink(e[s],e[s-2]);this.$={type:v.type,stroke:v.stroke,length:v.length,text:e[s-1],id:e[s-3]};break;case 79:this.$={text:e[s],type:"text"};break;case 80:this.$={text:e[s-1].text+""+e[s],type:e[s-1].type};break;case 81:this.$={text:e[s],type:"string"};break;case 82:this.$={text:e[s],type:"markdown"};break;case 83:var v=n.destructLink(e[s]);this.$={type:v.type,stroke:v.stroke,length:v.length};break;case 84:var v=n.destructLink(e[s]);this.$={type:v.type,stroke:v.stroke,length:v.length,id:e[s-1]};break;case 85:this.$=e[s-1];break;case 86:this.$={text:e[s],type:"text"};break;case 87:this.$={text:e[s-1].text+""+e[s],type:e[s-1].type};break;case 88:this.$={text:e[s],type:"string"};break;case 89:case 104:this.$={text:e[s],type:"markdown"};break;case 101:this.$={text:e[s],type:"text"};break;case 102:this.$={text:e[s-1].text+""+e[s],type:e[s-1].type};break;case 103:this.$={text:e[s],type:"text"};break;case 105:this.$=e[s-4],n.addClass(e[s-2],e[s]);break;case 106:this.$=e[s-4],n.setClass(e[s-2],e[s]);break;case 107:case 115:this.$=e[s-1],n.setClickEvent(e[s-1],e[s]);break;case 108:case 116:this.$=e[s-3],n.setClickEvent(e[s-3],e[s-2]),n.setTooltip(e[s-3],e[s]);break;case 109:this.$=e[s-2],n.setClickEvent(e[s-2],e[s-1],e[s]);break;case 110:this.$=e[s-4],n.setClickEvent(e[s-4],e[s-3],e[s-2]),n.setTooltip(e[s-4],e[s]);break;case 111:this.$=e[s-2],n.setLink(e[s-2],e[s]);break;case 112:this.$=e[s-4],n.setLink(e[s-4],e[s-2]),n.setTooltip(e[s-4],e[s]);break;case 113:this.$=e[s-4],n.setLink(e[s-4],e[s-2],e[s]);break;case 114:this.$=e[s-6],n.setLink(e[s-6],e[s-4],e[s]),n.setTooltip(e[s-6],e[s-2]);break;case 117:this.$=e[s-1],n.setLink(e[s-1],e[s]);break;case 118:this.$=e[s-3],n.setLink(e[s-3],e[s-2]),n.setTooltip(e[s-3],e[s]);break;case 119:this.$=e[s-3],n.setLink(e[s-3],e[s-2],e[s]);break;case 120:this.$=e[s-5],n.setLink(e[s-5],e[s-4],e[s]),n.setTooltip(e[s-5],e[s-2]);break;case 121:this.$=e[s-4],n.addVertex(e[s-2],void 0,void 0,e[s]);break;case 122:this.$=e[s-4],n.updateLink([e[s-2]],e[s]);break;case 123:this.$=e[s-4],n.updateLink(e[s-2],e[s]);break;case 124:this.$=e[s-8],n.updateLinkInterpolate([e[s-6]],e[s-2]),n.updateLink([e[s-6]],e[s]);break;case 125:this.$=e[s-8],n.updateLinkInterpolate(e[s-6],e[s-2]),n.updateLink(e[s-6],e[s]);break;case 126:this.$=e[s-6],n.updateLinkInterpolate([e[s-4]],e[s]);break;case 127:this.$=e[s-6],n.updateLinkInterpolate(e[s-4],e[s]);break;case 128:case 130:this.$=[e[s]];break;case 129:case 131:e[s-2].push(e[s]),this.$=e[s-2];break;case 133:this.$=e[s-1]+e[s];break;case 181:this.$=e[s];break;case 182:this.$=e[s-1]+""+e[s];break;case 184:this.$=e[s-1]+""+e[s];break;case 185:this.$={stmt:"dir",value:"TB"};break;case 186:this.$={stmt:"dir",value:"BT"};break;case 187:this.$={stmt:"dir",value:"RL"};break;case 188:this.$={stmt:"dir",value:"LR"};break}},"anonymous"),table:[{3:1,4:2,9:i,10:r,12:a},{1:[3]},t(o,d,{5:6}),{4:7,9:i,10:r,12:a},{4:8,9:i,10:r,12:a},{13:[1,9],14:[1,10]},{1:[2,1],6:11,7:12,8:l,9:b,10:u,11:p,20:17,22:18,23:19,24:20,25:21,26:22,27:S,33:24,34:g,36:D,38:K,42:28,43:38,44:x,45:39,47:40,60:F,84:U,85:J,86:b1,87:P1,88:O1,89:L,102:V,105:w,106:I,109:R,111:N,113:41,114:G,115:P,116:O,121:M1,122:U1,123:W1,124:z1},t(o,[2,9]),t(o,[2,10]),t(o,[2,11]),{8:[1,54],9:[1,55],10:d1,15:53,18:56},t(T,[2,3]),t(T,[2,4]),t(T,[2,5]),t(T,[2,6]),t(T,[2,7]),t(T,[2,8]),{8:t1,9:e1,11:s1,21:58,41:59,72:63,75:[1,64],77:[1,66],78:[1,65]},{8:t1,9:e1,11:s1,21:67},{8:t1,9:e1,11:s1,21:68},{8:t1,9:e1,11:s1,21:69},{8:t1,9:e1,11:s1,21:70},{8:t1,9:e1,11:s1,21:71},{8:t1,9:e1,10:[1,72],11:s1,21:73},t(T,[2,36]),{35:[1,74]},{37:[1,75]},t(T,[2,39]),t(C1,[2,50],{18:76,39:77,10:d1,40:rt}),{10:[1,79]},{10:[1,80]},{10:[1,81]},{10:[1,82]},{14:D1,44:S1,60:x1,80:[1,86],89:T1,95:[1,83],97:[1,84],101:85,105:y1,106:F1,109:_1,111:B1,114:v1,115:L1,116:V1,120:87},t(T,[2,185]),t(T,[2,186]),t(T,[2,187]),t(T,[2,188]),t(A1,[2,51]),t(A1,[2,54],{46:[1,99]}),t(W,[2,72],{113:112,29:[1,100],44:x,48:[1,101],50:[1,102],52:[1,103],54:[1,104],56:[1,105],58:[1,106],60:F,63:[1,107],65:[1,108],67:[1,109],68:[1,110],70:[1,111],89:L,102:V,105:w,106:I,109:R,111:N,114:G,115:P,116:O}),t(q,[2,181]),t(q,[2,142]),t(q,[2,143]),t(q,[2,144]),t(q,[2,145]),t(q,[2,146]),t(q,[2,147]),t(q,[2,148]),t(q,[2,149]),t(q,[2,150]),t(q,[2,151]),t(q,[2,152]),t(o,[2,12]),t(o,[2,18]),t(o,[2,19]),{9:[1,113]},t(at,[2,26],{18:114,10:d1}),t(T,[2,27]),{42:115,43:38,44:x,45:39,47:40,60:F,89:L,102:V,105:w,106:I,109:R,111:N,113:41,114:G,115:P,116:O},t(T,[2,40]),t(T,[2,41]),t(T,[2,42]),t(w1,[2,76],{73:116,62:[1,118],74:[1,117]}),{76:119,79:120,80:nt,81:ut,116:j1,119:K1},{75:[1,125],77:[1,126]},t(ot,[2,83]),t(T,[2,28]),t(T,[2,29]),t(T,[2,30]),t(T,[2,31]),t(T,[2,32]),{10:lt,12:ct,14:ht,27:dt,28:127,32:pt,44:ft,60:gt,75:bt,80:[1,129],81:[1,130],83:140,84:At,85:kt,86:mt,87:Et,88:Ct,89:Dt,90:St,91:128,105:xt,109:Tt,111:yt,114:Ft,115:_t,116:Bt},t(X1,d,{5:153}),t(T,[2,37]),t(T,[2,38]),t(C1,[2,48],{44:vt}),t(C1,[2,49],{18:155,10:d1,40:Lt}),t(A1,[2,44]),{44:x,47:157,60:F,89:L,102:V,105:w,106:I,109:R,111:N,113:41,114:G,115:P,116:O},{102:[1,158],103:159,105:[1,160]},{44:x,47:161,60:F,89:L,102:V,105:w,106:I,109:R,111:N,113:41,114:G,115:P,116:O},{44:x,47:162,60:F,89:L,102:V,105:w,106:I,109:R,111:N,113:41,114:G,115:P,116:O},t(B,[2,107],{10:[1,163],96:[1,164]}),{80:[1,165]},t(B,[2,115],{120:167,10:[1,166],14:D1,44:S1,60:x1,89:T1,105:y1,106:F1,109:_1,111:B1,114:v1,115:L1,116:V1}),t(B,[2,117],{10:[1,168]}),t(H,[2,183]),t(H,[2,170]),t(H,[2,171]),t(H,[2,172]),t(H,[2,173]),t(H,[2,174]),t(H,[2,175]),t(H,[2,176]),t(H,[2,177]),t(H,[2,178]),t(H,[2,179]),t(H,[2,180]),{44:x,47:169,60:F,89:L,102:V,105:w,106:I,109:R,111:N,113:41,114:G,115:P,116:O},{30:170,67:k,80:z,81:j,82:171,116:m,117:E,118:C},{30:178,67:k,80:z,81:j,82:171,116:m,117:E,118:C},{30:180,50:[1,179],67:k,80:z,81:j,82:171,116:m,117:E,118:C},{30:181,67:k,80:z,81:j,82:171,116:m,117:E,118:C},{30:182,67:k,80:z,81:j,82:171,116:m,117:E,118:C},{30:183,67:k,80:z,81:j,82:171,116:m,117:E,118:C},{109:[1,184]},{30:185,67:k,80:z,81:j,82:171,116:m,117:E,118:C},{30:186,65:[1,187],67:k,80:z,81:j,82:171,116:m,117:E,118:C},{30:188,67:k,80:z,81:j,82:171,116:m,117:E,118:C},{30:189,67:k,80:z,81:j,82:171,116:m,117:E,118:C},{30:190,67:k,80:z,81:j,82:171,116:m,117:E,118:C},t(q,[2,182]),t(o,[2,20]),t(at,[2,25]),t(C1,[2,46],{39:191,18:192,10:d1,40:rt}),t(w1,[2,73],{10:[1,193]}),{10:[1,194]},{30:195,67:k,80:z,81:j,82:171,116:m,117:E,118:C},{77:[1,196],79:197,116:j1,119:K1},t(I1,[2,79]),t(I1,[2,81]),t(I1,[2,82]),t(I1,[2,168]),t(I1,[2,169]),{76:198,79:120,80:nt,81:ut,116:j1,119:K1},t(ot,[2,84]),{8:t1,9:e1,10:lt,11:s1,12:ct,14:ht,21:200,27:dt,29:[1,199],32:pt,44:ft,60:gt,75:bt,83:140,84:At,85:kt,86:mt,87:Et,88:Ct,89:Dt,90:St,91:201,105:xt,109:Tt,111:yt,114:Ft,115:_t,116:Bt},t(y,[2,101]),t(y,[2,103]),t(y,[2,104]),t(y,[2,157]),t(y,[2,158]),t(y,[2,159]),t(y,[2,160]),t(y,[2,161]),t(y,[2,162]),t(y,[2,163]),t(y,[2,164]),t(y,[2,165]),t(y,[2,166]),t(y,[2,167]),t(y,[2,90]),t(y,[2,91]),t(y,[2,92]),t(y,[2,93]),t(y,[2,94]),t(y,[2,95]),t(y,[2,96]),t(y,[2,97]),t(y,[2,98]),t(y,[2,99]),t(y,[2,100]),{6:11,7:12,8:l,9:b,10:u,11:p,20:17,22:18,23:19,24:20,25:21,26:22,27:S,32:[1,202],33:24,34:g,36:D,38:K,42:28,43:38,44:x,45:39,47:40,60:F,84:U,85:J,86:b1,87:P1,88:O1,89:L,102:V,105:w,106:I,109:R,111:N,113:41,114:G,115:P,116:O,121:M1,122:U1,123:W1,124:z1},{10:d1,18:203},{44:[1,204]},t(A1,[2,43]),{10:[1,205],44:x,60:F,89:L,102:V,105:w,106:I,109:R,111:N,113:112,114:G,115:P,116:O},{10:[1,206]},{10:[1,207],106:[1,208]},t(Vt,[2,128]),{10:[1,209],44:x,60:F,89:L,102:V,105:w,106:I,109:R,111:N,113:112,114:G,115:P,116:O},{10:[1,210],44:x,60:F,89:L,102:V,105:w,106:I,109:R,111:N,113:112,114:G,115:P,116:O},{80:[1,211]},t(B,[2,109],{10:[1,212]}),t(B,[2,111],{10:[1,213]}),{80:[1,214]},t(H,[2,184]),{80:[1,215],98:[1,216]},t(A1,[2,55],{113:112,44:x,60:F,89:L,102:V,105:w,106:I,109:R,111:N,114:G,115:P,116:O}),{31:[1,217],67:k,82:218,116:m,117:E,118:C},t(p1,[2,86]),t(p1,[2,88]),t(p1,[2,89]),t(p1,[2,153]),t(p1,[2,154]),t(p1,[2,155]),t(p1,[2,156]),{49:[1,219],67:k,82:218,116:m,117:E,118:C},{30:220,67:k,80:z,81:j,82:171,116:m,117:E,118:C},{51:[1,221],67:k,82:218,116:m,117:E,118:C},{53:[1,222],67:k,82:218,116:m,117:E,118:C},{55:[1,223],67:k,82:218,116:m,117:E,118:C},{57:[1,224],67:k,82:218,116:m,117:E,118:C},{60:[1,225]},{64:[1,226],67:k,82:218,116:m,117:E,118:C},{66:[1,227],67:k,82:218,116:m,117:E,118:C},{30:228,67:k,80:z,81:j,82:171,116:m,117:E,118:C},{31:[1,229],67:k,82:218,116:m,117:E,118:C},{67:k,69:[1,230],71:[1,231],82:218,116:m,117:E,118:C},{67:k,69:[1,233],71:[1,232],82:218,116:m,117:E,118:C},t(C1,[2,45],{18:155,10:d1,40:Lt}),t(C1,[2,47],{44:vt}),t(w1,[2,75]),t(w1,[2,74]),{62:[1,234],67:k,82:218,116:m,117:E,118:C},t(w1,[2,77]),t(I1,[2,80]),{77:[1,235],79:197,116:j1,119:K1},{30:236,67:k,80:z,81:j,82:171,116:m,117:E,118:C},t(X1,d,{5:237}),t(y,[2,102]),t(T,[2,35]),{43:238,44:x,45:39,47:40,60:F,89:L,102:V,105:w,106:I,109:R,111:N,113:41,114:G,115:P,116:O},{10:d1,18:239},{10:i1,60:r1,84:a1,92:240,105:n1,107:241,108:242,109:u1,110:o1,111:l1,112:c1},{10:i1,60:r1,84:a1,92:251,104:[1,252],105:n1,107:241,108:242,109:u1,110:o1,111:l1,112:c1},{10:i1,60:r1,84:a1,92:253,104:[1,254],105:n1,107:241,108:242,109:u1,110:o1,111:l1,112:c1},{105:[1,255]},{10:i1,60:r1,84:a1,92:256,105:n1,107:241,108:242,109:u1,110:o1,111:l1,112:c1},{44:x,47:257,60:F,89:L,102:V,105:w,106:I,109:R,111:N,113:41,114:G,115:P,116:O},t(B,[2,108]),{80:[1,258]},{80:[1,259],98:[1,260]},t(B,[2,116]),t(B,[2,118],{10:[1,261]}),t(B,[2,119]),t(W,[2,56]),t(p1,[2,87]),t(W,[2,57]),{51:[1,262],67:k,82:218,116:m,117:E,118:C},t(W,[2,64]),t(W,[2,59]),t(W,[2,60]),t(W,[2,61]),{109:[1,263]},t(W,[2,63]),t(W,[2,65]),{66:[1,264],67:k,82:218,116:m,117:E,118:C},t(W,[2,67]),t(W,[2,68]),t(W,[2,70]),t(W,[2,69]),t(W,[2,71]),t([10,44,60,89,102,105,106,109,111,114,115,116],[2,85]),t(w1,[2,78]),{31:[1,265],67:k,82:218,116:m,117:E,118:C},{6:11,7:12,8:l,9:b,10:u,11:p,20:17,22:18,23:19,24:20,25:21,26:22,27:S,32:[1,266],33:24,34:g,36:D,38:K,42:28,43:38,44:x,45:39,47:40,60:F,84:U,85:J,86:b1,87:P1,88:O1,89:L,102:V,105:w,106:I,109:R,111:N,113:41,114:G,115:P,116:O,121:M1,122:U1,123:W1,124:z1},t(A1,[2,53]),{43:267,44:x,45:39,47:40,60:F,89:L,102:V,105:w,106:I,109:R,111:N,113:41,114:G,115:P,116:O},t(B,[2,121],{106:R1}),t(wt,[2,130],{108:269,10:i1,60:r1,84:a1,105:n1,109:u1,110:o1,111:l1,112:c1}),t(Z,[2,132]),t(Z,[2,134]),t(Z,[2,135]),t(Z,[2,136]),t(Z,[2,137]),t(Z,[2,138]),t(Z,[2,139]),t(Z,[2,140]),t(Z,[2,141]),t(B,[2,122],{106:R1}),{10:[1,270]},t(B,[2,123],{106:R1}),{10:[1,271]},t(Vt,[2,129]),t(B,[2,105],{106:R1}),t(B,[2,106],{113:112,44:x,60:F,89:L,102:V,105:w,106:I,109:R,111:N,114:G,115:P,116:O}),t(B,[2,110]),t(B,[2,112],{10:[1,272]}),t(B,[2,113]),{98:[1,273]},{51:[1,274]},{62:[1,275]},{66:[1,276]},{8:t1,9:e1,11:s1,21:277},t(T,[2,34]),t(A1,[2,52]),{10:i1,60:r1,84:a1,105:n1,107:278,108:242,109:u1,110:o1,111:l1,112:c1},t(Z,[2,133]),{14:D1,44:S1,60:x1,89:T1,101:279,105:y1,106:F1,109:_1,111:B1,114:v1,115:L1,116:V1,120:87},{14:D1,44:S1,60:x1,89:T1,101:280,105:y1,106:F1,109:_1,111:B1,114:v1,115:L1,116:V1,120:87},{98:[1,281]},t(B,[2,120]),t(W,[2,58]),{30:282,67:k,80:z,81:j,82:171,116:m,117:E,118:C},t(W,[2,66]),t(X1,d,{5:283}),t(wt,[2,131],{108:269,10:i1,60:r1,84:a1,105:n1,109:u1,110:o1,111:l1,112:c1}),t(B,[2,126],{120:167,10:[1,284],14:D1,44:S1,60:x1,89:T1,105:y1,106:F1,109:_1,111:B1,114:v1,115:L1,116:V1}),t(B,[2,127],{120:167,10:[1,285],14:D1,44:S1,60:x1,89:T1,105:y1,106:F1,109:_1,111:B1,114:v1,115:L1,116:V1}),t(B,[2,114]),{31:[1,286],67:k,82:218,116:m,117:E,118:C},{6:11,7:12,8:l,9:b,10:u,11:p,20:17,22:18,23:19,24:20,25:21,26:22,27:S,32:[1,287],33:24,34:g,36:D,38:K,42:28,43:38,44:x,45:39,47:40,60:F,84:U,85:J,86:b1,87:P1,88:O1,89:L,102:V,105:w,106:I,109:R,111:N,113:41,114:G,115:P,116:O,121:M1,122:U1,123:W1,124:z1},{10:i1,60:r1,84:a1,92:288,105:n1,107:241,108:242,109:u1,110:o1,111:l1,112:c1},{10:i1,60:r1,84:a1,92:289,105:n1,107:241,108:242,109:u1,110:o1,111:l1,112:c1},t(W,[2,62]),t(T,[2,33]),t(B,[2,124],{106:R1}),t(B,[2,125],{106:R1})],defaultActions:{},parseError:A(function(c,h){if(h.recoverable)this.trace(c);else{var f=new Error(c);throw f.hash=h,f}},"parseError"),parse:A(function(c){var h=this,f=[0],n=[],_=[null],e=[],G1=this.table,s="",v=0,It=0,Wt=2,Rt=1,zt=e.slice.call(arguments,1),M=Object.create(this.lexer),k1={yy:{}};for(var J1 in this.yy)Object.prototype.hasOwnProperty.call(this.yy,J1)&&(k1.yy[J1]=this.yy[J1]);M.setInput(c,k1.yy),k1.yy.lexer=M,k1.yy.parser=this,typeof M.yylloc>"u"&&(M.yylloc={});var Z1=M.yylloc;e.push(Z1);var jt=M.options&&M.options.ranges;typeof k1.yy.parseError=="function"?this.parseError=k1.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Kt(X){f.length=f.length-2*X,_.length=_.length-X,e.length=e.length-X}A(Kt,"popStack");function Nt(){var X;return X=n.pop()||M.lex()||Rt,typeof X!="number"&&(X instanceof Array&&(n=X,X=n.pop()),X=h.symbols_[X]||X),X}A(Nt,"lex");for(var Y,m1,Q,$1,N1={},q1,h1,Gt,H1;;){if(m1=f[f.length-1],this.defaultActions[m1]?Q=this.defaultActions[m1]:((Y===null||typeof Y>"u")&&(Y=Nt()),Q=G1[m1]&&G1[m1][Y]),typeof Q>"u"||!Q.length||!Q[0]){var tt="";H1=[];for(q1 in G1[m1])this.terminals_[q1]&&q1>Wt&&H1.push("'"+this.terminals_[q1]+"'");M.showPosition?tt="Parse error on line "+(v+1)+`: +`+M.showPosition()+` +Expecting `+H1.join(", ")+", got '"+(this.terminals_[Y]||Y)+"'":tt="Parse error on line "+(v+1)+": Unexpected "+(Y==Rt?"end of input":"'"+(this.terminals_[Y]||Y)+"'"),this.parseError(tt,{text:M.match,token:this.terminals_[Y]||Y,line:M.yylineno,loc:Z1,expected:H1})}if(Q[0]instanceof Array&&Q.length>1)throw new Error("Parse Error: multiple actions possible at state: "+m1+", token: "+Y);switch(Q[0]){case 1:f.push(Y),_.push(M.yytext),e.push(M.yylloc),f.push(Q[1]),Y=null,It=M.yyleng,s=M.yytext,v=M.yylineno,Z1=M.yylloc;break;case 2:if(h1=this.productions_[Q[1]][1],N1.$=_[_.length-h1],N1._$={first_line:e[e.length-(h1||1)].first_line,last_line:e[e.length-1].last_line,first_column:e[e.length-(h1||1)].first_column,last_column:e[e.length-1].last_column},jt&&(N1._$.range=[e[e.length-(h1||1)].range[0],e[e.length-1].range[1]]),$1=this.performAction.apply(N1,[s,It,v,k1.yy,Q[1],_,e].concat(zt)),typeof $1<"u")return $1;h1&&(f=f.slice(0,-1*h1*2),_=_.slice(0,-1*h1),e=e.slice(0,-1*h1)),f.push(this.productions_[Q[1]][0]),_.push(N1.$),e.push(N1._$),Gt=G1[f[f.length-2]][f[f.length-1]],f.push(Gt);break;case 3:return!0}}return!0},"parse")},Ut=(function(){var f1={EOF:1,parseError:A(function(h,f){if(this.yy.parser)this.yy.parser.parseError(h,f);else throw new Error(h)},"parseError"),setInput:A(function(c,h){return this.yy=h||this.yy||{},this._input=c,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:A(function(){var c=this._input[0];this.yytext+=c,this.yyleng++,this.offset++,this.match+=c,this.matched+=c;var h=c.match(/(?:\r\n?|\n).*/g);return h?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),c},"input"),unput:A(function(c){var h=c.length,f=c.split(/(?:\r\n?|\n)/g);this._input=c+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-h),this.offset-=h;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),f.length-1&&(this.yylineno-=f.length-1);var _=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:f?(f.length===n.length?this.yylloc.first_column:0)+n[n.length-f.length].length-f[0].length:this.yylloc.first_column-h},this.options.ranges&&(this.yylloc.range=[_[0],_[0]+this.yyleng-h]),this.yyleng=this.yytext.length,this},"unput"),more:A(function(){return this._more=!0,this},"more"),reject:A(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:A(function(c){this.unput(this.match.slice(c))},"less"),pastInput:A(function(){var c=this.matched.substr(0,this.matched.length-this.match.length);return(c.length>20?"...":"")+c.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:A(function(){var c=this.match;return c.length<20&&(c+=this._input.substr(0,20-c.length)),(c.substr(0,20)+(c.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:A(function(){var c=this.pastInput(),h=new Array(c.length+1).join("-");return c+this.upcomingInput()+` +`+h+"^"},"showPosition"),test_match:A(function(c,h){var f,n,_;if(this.options.backtrack_lexer&&(_={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&&(_.yylloc.range=this.yylloc.range.slice(0))),n=c[0].match(/(?:\r\n?|\n).*/g),n&&(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+c[0].length},this.yytext+=c[0],this.match+=c[0],this.matches=c,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(c[0].length),this.matched+=c[0],f=this.performAction.call(this,this.yy,this,h,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),f)return f;if(this._backtrack){for(var e in _)this[e]=_[e];return!1}return!1},"test_match"),next:A(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var c,h,f,n;this._more||(this.yytext="",this.match="");for(var _=this._currentRules(),e=0;e<_.length;e++)if(f=this._input.match(this.rules[_[e]]),f&&(!h||f[0].length>h[0].length)){if(h=f,n=e,this.options.backtrack_lexer){if(c=this.test_match(f,_[e]),c!==!1)return c;if(this._backtrack){h=!1;continue}else return!1}else if(!this.options.flex)break}return h?(c=this.test_match(h,_[n]),c!==!1?c:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:A(function(){var h=this.next();return h||this.lex()},"lex"),begin:A(function(h){this.conditionStack.push(h)},"begin"),popState:A(function(){var h=this.conditionStack.length-1;return h>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:A(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:A(function(h){return h=this.conditionStack.length-1-Math.abs(h||0),h>=0?this.conditionStack[h]:"INITIAL"},"topState"),pushState:A(function(h){this.begin(h)},"pushState"),stateStackSize:A(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:A(function(h,f,n,_){switch(n){case 0:return this.begin("acc_title"),34;case 1:return this.popState(),"acc_title_value";case 2:return this.begin("acc_descr"),36;case 3:return this.popState(),"acc_descr_value";case 4:this.begin("acc_descr_multiline");break;case 5:this.popState();break;case 6:return"acc_descr_multiline_value";case 7:return this.pushState("shapeData"),f.yytext="",40;case 8:return this.pushState("shapeDataStr"),40;case 9:return this.popState(),40;case 10:const e=/\n\s*/g;return f.yytext=f.yytext.replace(e,"
"),40;case 11:return 40;case 12:this.popState();break;case 13:this.begin("callbackname");break;case 14:this.popState();break;case 15:this.popState(),this.begin("callbackargs");break;case 16:return 95;case 17:this.popState();break;case 18:return 96;case 19:return"MD_STR";case 20:this.popState();break;case 21:this.begin("md_string");break;case 22:return"STR";case 23:this.popState();break;case 24:this.pushState("string");break;case 25:return 84;case 26:return 102;case 27:return 85;case 28:return 104;case 29:return 86;case 30:return 87;case 31:return 97;case 32:this.begin("click");break;case 33:this.popState();break;case 34:return 88;case 35:return h.lex.firstGraph()&&this.begin("dir"),12;case 36:return h.lex.firstGraph()&&this.begin("dir"),12;case 37:return h.lex.firstGraph()&&this.begin("dir"),12;case 38:return 27;case 39:return 32;case 40:return 98;case 41:return 98;case 42:return 98;case 43:return 98;case 44:return this.popState(),13;case 45:return this.popState(),14;case 46:return this.popState(),14;case 47:return this.popState(),14;case 48:return this.popState(),14;case 49:return this.popState(),14;case 50:return this.popState(),14;case 51:return this.popState(),14;case 52:return this.popState(),14;case 53:return this.popState(),14;case 54:return this.popState(),14;case 55:return 121;case 56:return 122;case 57:return 123;case 58:return 124;case 59:return 78;case 60:return 105;case 61:return 111;case 62:return 46;case 63:return 60;case 64:return 44;case 65:return 8;case 66:return 106;case 67:return 115;case 68:return this.popState(),77;case 69:return this.pushState("edgeText"),75;case 70:return 119;case 71:return this.popState(),77;case 72:return this.pushState("thickEdgeText"),75;case 73:return 119;case 74:return this.popState(),77;case 75:return this.pushState("dottedEdgeText"),75;case 76:return 119;case 77:return 77;case 78:return this.popState(),53;case 79:return"TEXT";case 80:return this.pushState("ellipseText"),52;case 81:return this.popState(),55;case 82:return this.pushState("text"),54;case 83:return this.popState(),57;case 84:return this.pushState("text"),56;case 85:return 58;case 86:return this.pushState("text"),67;case 87:return this.popState(),64;case 88:return this.pushState("text"),63;case 89:return this.popState(),49;case 90:return this.pushState("text"),48;case 91:return this.popState(),69;case 92:return this.popState(),71;case 93:return 117;case 94:return this.pushState("trapText"),68;case 95:return this.pushState("trapText"),70;case 96:return 118;case 97:return 67;case 98:return 90;case 99:return"SEP";case 100:return 89;case 101:return 115;case 102:return 111;case 103:return 44;case 104:return 109;case 105:return 114;case 106:return 116;case 107:return this.popState(),62;case 108:return this.pushState("text"),62;case 109:return this.popState(),51;case 110:return this.pushState("text"),50;case 111:return this.popState(),31;case 112:return this.pushState("text"),29;case 113:return this.popState(),66;case 114:return this.pushState("text"),65;case 115:return"TEXT";case 116:return"QUOTE";case 117:return 9;case 118:return 10;case 119:return 11}},"anonymous"),rules:[/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:@\{)/,/^(?:["])/,/^(?:["])/,/^(?:[^\"]+)/,/^(?:[^}^"]+)/,/^(?:\})/,/^(?:call[\s]+)/,/^(?:\([\s]*\))/,/^(?:\()/,/^(?:[^(]*)/,/^(?:\))/,/^(?:[^)]*)/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["][`])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:["])/,/^(?:style\b)/,/^(?:default\b)/,/^(?:linkStyle\b)/,/^(?:interpolate\b)/,/^(?:classDef\b)/,/^(?:class\b)/,/^(?:href[\s])/,/^(?:click[\s]+)/,/^(?:[\s\n])/,/^(?:[^\s\n]*)/,/^(?:flowchart-elk\b)/,/^(?:graph\b)/,/^(?:flowchart\b)/,/^(?:subgraph\b)/,/^(?:end\b\s*)/,/^(?:_self\b)/,/^(?:_blank\b)/,/^(?:_parent\b)/,/^(?:_top\b)/,/^(?:(\r?\n)*\s*\n)/,/^(?:\s*LR\b)/,/^(?:\s*RL\b)/,/^(?:\s*TB\b)/,/^(?:\s*BT\b)/,/^(?:\s*TD\b)/,/^(?:\s*BR\b)/,/^(?:\s*<)/,/^(?:\s*>)/,/^(?:\s*\^)/,/^(?:\s*v\b)/,/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:[^\s\"]+@(?=[^\{\"]))/,/^(?:[0-9]+)/,/^(?:#)/,/^(?::::)/,/^(?::)/,/^(?:&)/,/^(?:;)/,/^(?:,)/,/^(?:\*)/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?--\s*)/,/^(?:[^-]|-(?!-)+)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?==\s*)/,/^(?:[^=]|=(?!))/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?:\s*[xo<]?-\.\s*)/,/^(?:[^\.]|\.(?!))/,/^(?:\s*~~[\~]+\s*)/,/^(?:[-/\)][\)])/,/^(?:[^\(\)\[\]\{\}]|!\)+)/,/^(?:\(-)/,/^(?:\]\))/,/^(?:\(\[)/,/^(?:\]\])/,/^(?:\[\[)/,/^(?:\[\|)/,/^(?:>)/,/^(?:\)\])/,/^(?:\[\()/,/^(?:\)\)\))/,/^(?:\(\(\()/,/^(?:[\\(?=\])][\]])/,/^(?:\/(?=\])\])/,/^(?:\/(?!\])|\\(?!\])|[^\\\[\]\(\)\{\}\/]+)/,/^(?:\[\/)/,/^(?:\[\\)/,/^(?:<)/,/^(?:>)/,/^(?:\^)/,/^(?:\\\|)/,/^(?:v\b)/,/^(?:\*)/,/^(?:#)/,/^(?:&)/,/^(?:([A-Za-z0-9!"\#$%&'*+\.`?\\_\/]|-(?=[^\>\-\.])|(?!))+)/,/^(?:-)/,/^(?:[\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6]|[\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377]|[\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5]|[\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA]|[\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE]|[\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA]|[\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0]|[\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977]|[\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2]|[\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A]|[\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39]|[\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8]|[\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C]|[\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C]|[\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99]|[\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0]|[\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D]|[\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3]|[\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10]|[\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1]|[\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81]|[\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3]|[\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6]|[\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A]|[\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081]|[\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D]|[\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0]|[\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310]|[\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C]|[\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711]|[\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7]|[\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C]|[\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16]|[\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF]|[\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC]|[\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D]|[\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D]|[\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3]|[\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F]|[\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128]|[\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184]|[\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3]|[\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6]|[\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE]|[\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C]|[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D]|[\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC]|[\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B]|[\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788]|[\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805]|[\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB]|[\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28]|[\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5]|[\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4]|[\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E]|[\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D]|[\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36]|[\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D]|[\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC]|[\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF]|[\uFFD2-\uFFD7\uFFDA-\uFFDC])/,/^(?:\|)/,/^(?:\|)/,/^(?:\))/,/^(?:\()/,/^(?:\])/,/^(?:\[)/,/^(?:(\}))/,/^(?:\{)/,/^(?:[^\[\]\(\)\{\}\|\"]+)/,/^(?:")/,/^(?:(\r?\n)+)/,/^(?:\s)/,/^(?:$)/],conditions:{shapeDataEndBracket:{rules:[21,24,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},shapeDataStr:{rules:[9,10,21,24,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},shapeData:{rules:[8,11,12,21,24,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},callbackargs:{rules:[17,18,21,24,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},callbackname:{rules:[14,15,16,21,24,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},href:{rules:[21,24,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},click:{rules:[21,24,33,34,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},dottedEdgeText:{rules:[21,24,74,76,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},thickEdgeText:{rules:[21,24,71,73,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},edgeText:{rules:[21,24,68,70,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},trapText:{rules:[21,24,77,80,82,84,88,90,91,92,93,94,95,108,110,112,114],inclusive:!1},ellipseText:{rules:[21,24,77,78,79,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},text:{rules:[21,24,77,80,81,82,83,84,87,88,89,90,94,95,107,108,109,110,111,112,113,114,115],inclusive:!1},vertex:{rules:[21,24,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},dir:{rules:[21,24,44,45,46,47,48,49,50,51,52,53,54,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},acc_descr_multiline:{rules:[5,6,21,24,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},acc_descr:{rules:[3,21,24,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},acc_title:{rules:[1,21,24,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},md_string:{rules:[19,20,21,24,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},string:{rules:[21,22,23,24,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},INITIAL:{rules:[0,2,4,7,13,21,24,25,26,27,28,29,30,31,32,35,36,37,38,39,40,41,42,43,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,71,72,74,75,77,80,82,84,85,86,88,90,94,95,96,97,98,99,100,101,102,103,104,105,106,108,110,112,114,116,117,118,119],inclusive:!0}}};return f1})();Q1.lexer=Ut;function Y1(){this.yy={}}return A(Y1,"Parser"),Y1.prototype=Q1,Q1.Parser=Y1,new Y1})();it.parser=it;var Ot=it,Mt=Object.assign({},Ot);Mt.parse=t=>{const i=t.replace(/}\s*\n/g,`} +`);return Ot.parse(i)};var be=Mt,Ae=A((t,i)=>{const r=ce,a=r(t,"r"),o=r(t,"g"),d=r(t,"b");return ue(a,o,d,i)},"fade"),ke=A(t=>`.label { + font-family: ${t.fontFamily}; + color: ${t.nodeTextColor||t.textColor}; + } + .cluster-label text { + fill: ${t.titleColor}; + } + .cluster-label span { + color: ${t.titleColor}; + } + .cluster-label span p { + background-color: transparent; + } + + .label text,span { + fill: ${t.nodeTextColor||t.textColor}; + color: ${t.nodeTextColor||t.textColor}; + } + + .node rect, + .node circle, + .node ellipse, + .node polygon, + .node path { + fill: ${t.mainBkg}; + stroke: ${t.nodeBorder}; + stroke-width: 1px; + } + .rough-node .label text , .node .label text, .image-shape .label, .icon-shape .label { + text-anchor: middle; + } + // .flowchart-label .text-outer-tspan { + // text-anchor: middle; + // } + // .flowchart-label .text-inner-tspan { + // text-anchor: start; + // } + + .node .katex path { + fill: #000; + stroke: #000; + stroke-width: 1px; + } + + .rough-node .label,.node .label, .image-shape .label, .icon-shape .label { + text-align: center; + } + .node.clickable { + cursor: pointer; + } + + + .root .anchor path { + fill: ${t.lineColor} !important; + stroke-width: 0; + stroke: ${t.lineColor}; + } + + .arrowheadPath { + fill: ${t.arrowheadColor}; + } + + .edgePath .path { + stroke: ${t.lineColor}; + stroke-width: 2.0px; + } + + .flowchart-link { + stroke: ${t.lineColor}; + fill: none; + } + + .edgeLabel { + background-color: ${t.edgeLabelBackground}; + p { + background-color: ${t.edgeLabelBackground}; + } + rect { + opacity: 0.5; + background-color: ${t.edgeLabelBackground}; + fill: ${t.edgeLabelBackground}; + } + text-align: center; + } + + /* For html labels only */ + .labelBkg { + background-color: ${Ae(t.edgeLabelBackground,.5)}; + // background-color: + } + + .cluster rect { + fill: ${t.clusterBkg}; + stroke: ${t.clusterBorder}; + stroke-width: 1px; + } + + .cluster text { + fill: ${t.titleColor}; + } + + .cluster span { + color: ${t.titleColor}; + } + /* .cluster div { + color: ${t.titleColor}; + } */ + + div.mermaidTooltip { + position: absolute; + text-align: center; + max-width: 200px; + padding: 2px; + font-family: ${t.fontFamily}; + font-size: 12px; + background: ${t.tertiaryColor}; + border: 1px solid ${t.border2}; + border-radius: 2px; + pointer-events: none; + z-index: 100; + } + + .flowchartTitleText { + text-anchor: middle; + font-size: 18px; + fill: ${t.textColor}; + } + + rect.text { + fill: none; + stroke-width: 0; + } + + .icon-shape, .image-shape { + background-color: ${t.edgeLabelBackground}; + p { + background-color: ${t.edgeLabelBackground}; + padding: 2px; + } + rect { + opacity: 0.5; + background-color: ${t.edgeLabelBackground}; + fill: ${t.edgeLabelBackground}; + } + text-align: center; + } + ${Yt()} +`,"getStyles"),me=ke,ye={parser:be,get db(){return new de},renderer:ge,styles:me,init:A(t=>{t.flowchart||(t.flowchart={}),t.layout&&Pt({layout:t.layout}),t.flowchart.arrowMarkerAbsolute=t.arrowMarkerAbsolute,Pt({flowchart:{arrowMarkerAbsolute:t.arrowMarkerAbsolute}})},"init")};export{ye as diagram}; diff --git a/_astro/ganttDiagram-JELNMOA3.DeRSi4dw.js b/_astro/ganttDiagram-JELNMOA3.DeRSi4dw.js new file mode 100644 index 00000000..d1f51c93 --- /dev/null +++ b/_astro/ganttDiagram-JELNMOA3.DeRSi4dw.js @@ -0,0 +1,267 @@ +import{bb as an,bc as Wn,bd as on,be as cn,bf as un,bg as ce,bh as $n,aG as ae,_ as d,g as On,s as Hn,q as Nn,p as Pn,a as Vn,b as zn,c as _t,d as Zt,e as Rn,bi as rt,l as Tt,k as qn,j as Zn,y as Bn,u as Xn}from"./mermaid.core.LbQlJBBQ.js";import{b as Gn,t as He,c as jn,a as Qn,l as Jn}from"./linear.B94hpPI-.js";import{i as Kn}from"./init.Gi6I4Gst.js";import"./page._rMDHl_T.js";import"./defaultLocale.C4B-KCzX.js";function tr(t,e){let n;if(e===void 0)for(const r of t)r!=null&&(n=r)&&(n=r);else{let r=-1;for(let i of t)(i=e(i,++r,t))!=null&&(n=i)&&(n=i)}return n}function er(t,e){let n;if(e===void 0)for(const r of t)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);else{let r=-1;for(let i of t)(i=e(i,++r,t))!=null&&(n>i||n===void 0&&i>=i)&&(n=i)}return n}function nr(t){return t}var Xt=1,ue=2,Te=3,Bt=4,Ne=1e-6;function rr(t){return"translate("+t+",0)"}function ir(t){return"translate(0,"+t+")"}function sr(t){return e=>+t(e)}function ar(t,e){return e=Math.max(0,t.bandwidth()-e*2)/2,t.round()&&(e=Math.round(e)),n=>+t(n)+e}function or(){return!this.__axis}function ln(t,e){var n=[],r=null,i=null,a=6,c=6,m=3,Y=typeof window<"u"&&window.devicePixelRatio>1?0:.5,C=t===Xt||t===Bt?-1:1,k=t===Bt||t===ue?"x":"y",L=t===Xt||t===Te?rr:ir;function _(S){var Z=r??(e.ticks?e.ticks.apply(e,n):e.domain()),A=i??(e.tickFormat?e.tickFormat.apply(e,n):nr),U=Math.max(a,0)+m,I=e.range(),N=+I[0]+Y,W=+I[I.length-1]+Y,q=(e.bandwidth?ar:sr)(e.copy(),Y),j=S.selection?S.selection():S,p=j.selectAll(".domain").data([null]),g=j.selectAll(".tick").data(Z,e).order(),y=g.exit(),h=g.enter().append("g").attr("class","tick"),D=g.select("line"),w=g.select("text");p=p.merge(p.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),g=g.merge(h),D=D.merge(h.append("line").attr("stroke","currentColor").attr(k+"2",C*a)),w=w.merge(h.append("text").attr("fill","currentColor").attr(k,C*U).attr("dy",t===Xt?"0em":t===Te?"0.71em":"0.32em")),S!==j&&(p=p.transition(S),g=g.transition(S),D=D.transition(S),w=w.transition(S),y=y.transition(S).attr("opacity",Ne).attr("transform",function(T){return isFinite(T=q(T))?L(T+Y):this.getAttribute("transform")}),h.attr("opacity",Ne).attr("transform",function(T){var v=this.parentNode.__axis;return L((v&&isFinite(v=v(T))?v:q(T))+Y)})),y.remove(),p.attr("d",t===Bt||t===ue?c?"M"+C*c+","+N+"H"+Y+"V"+W+"H"+C*c:"M"+Y+","+N+"V"+W:c?"M"+N+","+C*c+"V"+Y+"H"+W+"V"+C*c:"M"+N+","+Y+"H"+W),g.attr("opacity",1).attr("transform",function(T){return L(q(T)+Y)}),D.attr(k+"2",C*a),w.attr(k,C*U).text(A),j.filter(or).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",t===ue?"start":t===Bt?"end":"middle"),j.each(function(){this.__axis=q})}return _.scale=function(S){return arguments.length?(e=S,_):e},_.ticks=function(){return n=Array.from(arguments),_},_.tickArguments=function(S){return arguments.length?(n=S==null?[]:Array.from(S),_):n.slice()},_.tickValues=function(S){return arguments.length?(r=S==null?null:Array.from(S),_):r&&r.slice()},_.tickFormat=function(S){return arguments.length?(i=S,_):i},_.tickSize=function(S){return arguments.length?(a=c=+S,_):a},_.tickSizeInner=function(S){return arguments.length?(a=+S,_):a},_.tickSizeOuter=function(S){return arguments.length?(c=+S,_):c},_.tickPadding=function(S){return arguments.length?(m=+S,_):m},_.offset=function(S){return arguments.length?(Y=+S,_):Y},_}function cr(t){return ln(Xt,t)}function ur(t){return ln(Te,t)}const lr=Math.PI/180,fr=180/Math.PI,ee=18,fn=.96422,dn=1,hn=.82521,mn=4/29,Ft=6/29,gn=3*Ft*Ft,dr=Ft*Ft*Ft;function yn(t){if(t instanceof ft)return new ft(t.l,t.a,t.b,t.opacity);if(t instanceof ht)return kn(t);t instanceof an||(t=Wn(t));var e=he(t.r),n=he(t.g),r=he(t.b),i=le((.2225045*e+.7168786*n+.0606169*r)/dn),a,c;return e===n&&n===r?a=c=i:(a=le((.4360747*e+.3850649*n+.1430804*r)/fn),c=le((.0139322*e+.0971045*n+.7141733*r)/hn)),new ft(116*i-16,500*(a-i),200*(i-c),t.opacity)}function hr(t,e,n,r){return arguments.length===1?yn(t):new ft(t,e,n,r??1)}function ft(t,e,n,r){this.l=+t,this.a=+e,this.b=+n,this.opacity=+r}on(ft,hr,cn(un,{brighter(t){return new ft(this.l+ee*(t??1),this.a,this.b,this.opacity)},darker(t){return new ft(this.l-ee*(t??1),this.a,this.b,this.opacity)},rgb(){var t=(this.l+16)/116,e=isNaN(this.a)?t:t+this.a/500,n=isNaN(this.b)?t:t-this.b/200;return e=fn*fe(e),t=dn*fe(t),n=hn*fe(n),new an(de(3.1338561*e-1.6168667*t-.4906146*n),de(-.9787684*e+1.9161415*t+.033454*n),de(.0719453*e-.2289914*t+1.4052427*n),this.opacity)}}));function le(t){return t>dr?Math.pow(t,1/3):t/gn+mn}function fe(t){return t>Ft?t*t*t:gn*(t-mn)}function de(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function he(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function mr(t){if(t instanceof ht)return new ht(t.h,t.c,t.l,t.opacity);if(t instanceof ft||(t=yn(t)),t.a===0&&t.b===0)return new ht(NaN,0(t(a=new Date(+a)),a),i.ceil=a=>(t(a=new Date(a-1)),e(a,1),t(a),a),i.round=a=>{const c=i(a),m=i.ceil(a);return a-c(e(a=new Date(+a),c==null?1:Math.floor(c)),a),i.range=(a,c,m)=>{const Y=[];if(a=i.ceil(a),m=m==null?1:Math.floor(m),!(a0))return Y;let C;do Y.push(C=new Date(+a)),e(a,m),t(a);while(Cet(c=>{if(c>=c)for(;t(c),!a(c);)c.setTime(c-1)},(c,m)=>{if(c>=c)if(m<0)for(;++m<=0;)for(;e(c,-1),!a(c););else for(;--m>=0;)for(;e(c,1),!a(c););}),n&&(i.count=(a,c)=>(me.setTime(+a),ge.setTime(+c),t(me),t(ge),Math.floor(n(me,ge))),i.every=a=>(a=Math.floor(a),!isFinite(a)||!(a>0)?null:a>1?i.filter(r?c=>r(c)%a===0:c=>i.count(0,c)%a===0):i)),i}const Ut=et(()=>{},(t,e)=>{t.setTime(+t+e)},(t,e)=>e-t);Ut.every=t=>(t=Math.floor(t),!isFinite(t)||!(t>0)?null:t>1?et(e=>{e.setTime(Math.floor(e/t)*t)},(e,n)=>{e.setTime(+e+n*t)},(e,n)=>(n-e)/t):Ut);Ut.range;const mt=1e3,ct=mt*60,gt=ct*60,yt=gt*24,Ce=yt*7,Pe=yt*30,ye=yt*365,vt=et(t=>{t.setTime(t-t.getMilliseconds())},(t,e)=>{t.setTime(+t+e*mt)},(t,e)=>(e-t)/mt,t=>t.getUTCSeconds());vt.range;const $t=et(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*mt)},(t,e)=>{t.setTime(+t+e*ct)},(t,e)=>(e-t)/ct,t=>t.getMinutes());$t.range;const pr=et(t=>{t.setUTCSeconds(0,0)},(t,e)=>{t.setTime(+t+e*ct)},(t,e)=>(e-t)/ct,t=>t.getUTCMinutes());pr.range;const Ot=et(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*mt-t.getMinutes()*ct)},(t,e)=>{t.setTime(+t+e*gt)},(t,e)=>(e-t)/gt,t=>t.getHours());Ot.range;const vr=et(t=>{t.setUTCMinutes(0,0,0)},(t,e)=>{t.setTime(+t+e*gt)},(t,e)=>(e-t)/gt,t=>t.getUTCHours());vr.range;const bt=et(t=>t.setHours(0,0,0,0),(t,e)=>t.setDate(t.getDate()+e),(t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*ct)/yt,t=>t.getDate()-1);bt.range;const Se=et(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/yt,t=>t.getUTCDate()-1);Se.range;const Tr=et(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/yt,t=>Math.floor(t/yt));Tr.range;function Dt(t){return et(e=>{e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)},(e,n)=>{e.setDate(e.getDate()+n*7)},(e,n)=>(n-e-(n.getTimezoneOffset()-e.getTimezoneOffset())*ct)/Ce)}const Pt=Dt(0),Ht=Dt(1),pn=Dt(2),vn=Dt(3),xt=Dt(4),Tn=Dt(5),bn=Dt(6);Pt.range;Ht.range;pn.range;vn.range;xt.range;Tn.range;bn.range;function Mt(t){return et(e=>{e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCDate(e.getUTCDate()+n*7)},(e,n)=>(n-e)/Ce)}const xn=Mt(0),ne=Mt(1),br=Mt(2),xr=Mt(3),Et=Mt(4),wr=Mt(5),Dr=Mt(6);xn.range;ne.range;br.range;xr.range;Et.range;wr.range;Dr.range;const Nt=et(t=>{t.setDate(1),t.setHours(0,0,0,0)},(t,e)=>{t.setMonth(t.getMonth()+e)},(t,e)=>e.getMonth()-t.getMonth()+(e.getFullYear()-t.getFullYear())*12,t=>t.getMonth());Nt.range;const Mr=et(t=>{t.setUTCDate(1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCMonth(t.getUTCMonth()+e)},(t,e)=>e.getUTCMonth()-t.getUTCMonth()+(e.getUTCFullYear()-t.getUTCFullYear())*12,t=>t.getUTCMonth());Mr.range;const kt=et(t=>{t.setMonth(0,1),t.setHours(0,0,0,0)},(t,e)=>{t.setFullYear(t.getFullYear()+e)},(t,e)=>e.getFullYear()-t.getFullYear(),t=>t.getFullYear());kt.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:et(e=>{e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)},(e,n)=>{e.setFullYear(e.getFullYear()+n*t)});kt.range;const wt=et(t=>{t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCFullYear(t.getUTCFullYear()+e)},(t,e)=>e.getUTCFullYear()-t.getUTCFullYear(),t=>t.getUTCFullYear());wt.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:et(e=>{e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCFullYear(e.getUTCFullYear()+n*t)});wt.range;function Cr(t,e,n,r,i,a){const c=[[vt,1,mt],[vt,5,5*mt],[vt,15,15*mt],[vt,30,30*mt],[a,1,ct],[a,5,5*ct],[a,15,15*ct],[a,30,30*ct],[i,1,gt],[i,3,3*gt],[i,6,6*gt],[i,12,12*gt],[r,1,yt],[r,2,2*yt],[n,1,Ce],[e,1,Pe],[e,3,3*Pe],[t,1,ye]];function m(C,k,L){const _=kU).right(c,_);if(S===c.length)return t.every(He(C/ye,k/ye,L));if(S===0)return Ut.every(Math.max(He(C,k,L),1));const[Z,A]=c[_/c[S-1][2]53)return null;"w"in l||(l.w=1),"Z"in l?($=pe(Lt(l.y,0,1)),Q=$.getUTCDay(),$=Q>4||Q===0?ne.ceil($):ne($),$=Se.offset($,(l.V-1)*7),l.y=$.getUTCFullYear(),l.m=$.getUTCMonth(),l.d=$.getUTCDate()+(l.w+6)%7):($=ke(Lt(l.y,0,1)),Q=$.getDay(),$=Q>4||Q===0?Ht.ceil($):Ht($),$=bt.offset($,(l.V-1)*7),l.y=$.getFullYear(),l.m=$.getMonth(),l.d=$.getDate()+(l.w+6)%7)}else("W"in l||"U"in l)&&("w"in l||(l.w="u"in l?l.u%7:"W"in l?1:0),Q="Z"in l?pe(Lt(l.y,0,1)).getUTCDay():ke(Lt(l.y,0,1)).getDay(),l.m=0,l.d="W"in l?(l.w+6)%7+l.W*7-(Q+5)%7:l.w+l.U*7-(Q+6)%7);return"Z"in l?(l.H+=l.Z/100|0,l.M+=l.Z%100,pe(l)):ke(l)}}function y(M,H,V,l){for(var J=0,$=H.length,Q=V.length,G,it;J<$;){if(l>=Q)return-1;if(G=H.charCodeAt(J++),G===37){if(G=H.charAt(J++),it=j[G in Ve?H.charAt(J++):G],!it||(l=it(M,V,l))<0)return-1}else if(G!=V.charCodeAt(l++))return-1}return l}function h(M,H,V){var l=C.exec(H.slice(V));return l?(M.p=k.get(l[0].toLowerCase()),V+l[0].length):-1}function D(M,H,V){var l=S.exec(H.slice(V));return l?(M.w=Z.get(l[0].toLowerCase()),V+l[0].length):-1}function w(M,H,V){var l=L.exec(H.slice(V));return l?(M.w=_.get(l[0].toLowerCase()),V+l[0].length):-1}function T(M,H,V){var l=I.exec(H.slice(V));return l?(M.m=N.get(l[0].toLowerCase()),V+l[0].length):-1}function v(M,H,V){var l=A.exec(H.slice(V));return l?(M.m=U.get(l[0].toLowerCase()),V+l[0].length):-1}function u(M,H,V){return y(M,e,H,V)}function f(M,H,V){return y(M,n,H,V)}function b(M,H,V){return y(M,r,H,V)}function x(M){return c[M.getDay()]}function F(M){return a[M.getDay()]}function o(M){return Y[M.getMonth()]}function X(M){return m[M.getMonth()]}function s(M){return i[+(M.getHours()>=12)]}function E(M){return 1+~~(M.getMonth()/3)}function R(M){return c[M.getUTCDay()]}function z(M){return a[M.getUTCDay()]}function P(M){return Y[M.getUTCMonth()]}function K(M){return m[M.getUTCMonth()]}function O(M){return i[+(M.getUTCHours()>=12)]}function st(M){return 1+~~(M.getUTCMonth()/3)}return{format:function(M){var H=p(M+="",W);return H.toString=function(){return M},H},parse:function(M){var H=g(M+="",!1);return H.toString=function(){return M},H},utcFormat:function(M){var H=p(M+="",q);return H.toString=function(){return M},H},utcParse:function(M){var H=g(M+="",!0);return H.toString=function(){return M},H}}}var Ve={"-":"",_:" ",0:"0"},nt=/^\s*\d+/,Yr=/^%/,Ur=/[\\^$*+?|[\]().{}]/g;function B(t,e,n){var r=t<0?"-":"",i=(r?-t:t)+"",a=i.length;return r+(a[e.toLowerCase(),n]))}function Ir(t,e,n){var r=nt.exec(e.slice(n,n+1));return r?(t.w=+r[0],n+r[0].length):-1}function Lr(t,e,n){var r=nt.exec(e.slice(n,n+1));return r?(t.u=+r[0],n+r[0].length):-1}function Ar(t,e,n){var r=nt.exec(e.slice(n,n+2));return r?(t.U=+r[0],n+r[0].length):-1}function Wr(t,e,n){var r=nt.exec(e.slice(n,n+2));return r?(t.V=+r[0],n+r[0].length):-1}function $r(t,e,n){var r=nt.exec(e.slice(n,n+2));return r?(t.W=+r[0],n+r[0].length):-1}function ze(t,e,n){var r=nt.exec(e.slice(n,n+4));return r?(t.y=+r[0],n+r[0].length):-1}function Re(t,e,n){var r=nt.exec(e.slice(n,n+2));return r?(t.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function Or(t,e,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(n,n+6));return r?(t.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function Hr(t,e,n){var r=nt.exec(e.slice(n,n+1));return r?(t.q=r[0]*3-3,n+r[0].length):-1}function Nr(t,e,n){var r=nt.exec(e.slice(n,n+2));return r?(t.m=r[0]-1,n+r[0].length):-1}function qe(t,e,n){var r=nt.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function Pr(t,e,n){var r=nt.exec(e.slice(n,n+3));return r?(t.m=0,t.d=+r[0],n+r[0].length):-1}function Ze(t,e,n){var r=nt.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function Vr(t,e,n){var r=nt.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function zr(t,e,n){var r=nt.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function Rr(t,e,n){var r=nt.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function qr(t,e,n){var r=nt.exec(e.slice(n,n+6));return r?(t.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function Zr(t,e,n){var r=Yr.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function Br(t,e,n){var r=nt.exec(e.slice(n));return r?(t.Q=+r[0],n+r[0].length):-1}function Xr(t,e,n){var r=nt.exec(e.slice(n));return r?(t.s=+r[0],n+r[0].length):-1}function Be(t,e){return B(t.getDate(),e,2)}function Gr(t,e){return B(t.getHours(),e,2)}function jr(t,e){return B(t.getHours()%12||12,e,2)}function Qr(t,e){return B(1+bt.count(kt(t),t),e,3)}function wn(t,e){return B(t.getMilliseconds(),e,3)}function Jr(t,e){return wn(t,e)+"000"}function Kr(t,e){return B(t.getMonth()+1,e,2)}function ti(t,e){return B(t.getMinutes(),e,2)}function ei(t,e){return B(t.getSeconds(),e,2)}function ni(t){var e=t.getDay();return e===0?7:e}function ri(t,e){return B(Pt.count(kt(t)-1,t),e,2)}function Dn(t){var e=t.getDay();return e>=4||e===0?xt(t):xt.ceil(t)}function ii(t,e){return t=Dn(t),B(xt.count(kt(t),t)+(kt(t).getDay()===4),e,2)}function si(t){return t.getDay()}function ai(t,e){return B(Ht.count(kt(t)-1,t),e,2)}function oi(t,e){return B(t.getFullYear()%100,e,2)}function ci(t,e){return t=Dn(t),B(t.getFullYear()%100,e,2)}function ui(t,e){return B(t.getFullYear()%1e4,e,4)}function li(t,e){var n=t.getDay();return t=n>=4||n===0?xt(t):xt.ceil(t),B(t.getFullYear()%1e4,e,4)}function fi(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+B(e/60|0,"0",2)+B(e%60,"0",2)}function Xe(t,e){return B(t.getUTCDate(),e,2)}function di(t,e){return B(t.getUTCHours(),e,2)}function hi(t,e){return B(t.getUTCHours()%12||12,e,2)}function mi(t,e){return B(1+Se.count(wt(t),t),e,3)}function Mn(t,e){return B(t.getUTCMilliseconds(),e,3)}function gi(t,e){return Mn(t,e)+"000"}function yi(t,e){return B(t.getUTCMonth()+1,e,2)}function ki(t,e){return B(t.getUTCMinutes(),e,2)}function pi(t,e){return B(t.getUTCSeconds(),e,2)}function vi(t){var e=t.getUTCDay();return e===0?7:e}function Ti(t,e){return B(xn.count(wt(t)-1,t),e,2)}function Cn(t){var e=t.getUTCDay();return e>=4||e===0?Et(t):Et.ceil(t)}function bi(t,e){return t=Cn(t),B(Et.count(wt(t),t)+(wt(t).getUTCDay()===4),e,2)}function xi(t){return t.getUTCDay()}function wi(t,e){return B(ne.count(wt(t)-1,t),e,2)}function Di(t,e){return B(t.getUTCFullYear()%100,e,2)}function Mi(t,e){return t=Cn(t),B(t.getUTCFullYear()%100,e,2)}function Ci(t,e){return B(t.getUTCFullYear()%1e4,e,4)}function Si(t,e){var n=t.getUTCDay();return t=n>=4||n===0?Et(t):Et.ceil(t),B(t.getUTCFullYear()%1e4,e,4)}function _i(){return"+0000"}function Ge(){return"%"}function je(t){return+t}function Qe(t){return Math.floor(+t/1e3)}var St,re;Fi({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function Fi(t){return St=Fr(t),re=St.format,St.parse,St.utcFormat,St.utcParse,St}function Yi(t){return new Date(t)}function Ui(t){return t instanceof Date?+t:+new Date(+t)}function Sn(t,e,n,r,i,a,c,m,Y,C){var k=jn(),L=k.invert,_=k.domain,S=C(".%L"),Z=C(":%S"),A=C("%I:%M"),U=C("%I %p"),I=C("%a %d"),N=C("%b %d"),W=C("%B"),q=C("%Y");function j(p){return(Y(p)4&&(S+=7),_.add(S,n));return Z.diff(A,"week")+1},m.isoWeekday=function(C){return this.$utils().u(C)?this.day()||7:this.day(this.day()%7?C:C-7)};var Y=m.startOf;m.startOf=function(C,k){var L=this.$utils(),_=!!L.u(k)||k;return L.p(C)==="isoweek"?_?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):Y.bind(this)(C,k)}}}))})(Gt)),Gt.exports}var Ai=Li();const Wi=ae(Ai);var jt={exports:{}},$i=jt.exports,Ke;function Oi(){return Ke||(Ke=1,(function(t,e){(function(n,r){t.exports=r()})($i,(function(){var n={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},r=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,i=/\d/,a=/\d\d/,c=/\d\d?/,m=/\d*[^-_:/,()\s\d]+/,Y={},C=function(U){return(U=+U)+(U>68?1900:2e3)},k=function(U){return function(I){this[U]=+I}},L=[/[+-]\d\d:?(\d\d)?|Z/,function(U){(this.zone||(this.zone={})).offset=(function(I){if(!I||I==="Z")return 0;var N=I.match(/([+-]|\d\d)/g),W=60*N[1]+(+N[2]||0);return W===0?0:N[0]==="+"?-W:W})(U)}],_=function(U){var I=Y[U];return I&&(I.indexOf?I:I.s.concat(I.f))},S=function(U,I){var N,W=Y.meridiem;if(W){for(var q=1;q<=24;q+=1)if(U.indexOf(W(q,0,I))>-1){N=q>12;break}}else N=U===(I?"pm":"PM");return N},Z={A:[m,function(U){this.afternoon=S(U,!1)}],a:[m,function(U){this.afternoon=S(U,!0)}],Q:[i,function(U){this.month=3*(U-1)+1}],S:[i,function(U){this.milliseconds=100*+U}],SS:[a,function(U){this.milliseconds=10*+U}],SSS:[/\d{3}/,function(U){this.milliseconds=+U}],s:[c,k("seconds")],ss:[c,k("seconds")],m:[c,k("minutes")],mm:[c,k("minutes")],H:[c,k("hours")],h:[c,k("hours")],HH:[c,k("hours")],hh:[c,k("hours")],D:[c,k("day")],DD:[a,k("day")],Do:[m,function(U){var I=Y.ordinal,N=U.match(/\d+/);if(this.day=N[0],I)for(var W=1;W<=31;W+=1)I(W).replace(/\[|\]/g,"")===U&&(this.day=W)}],w:[c,k("week")],ww:[a,k("week")],M:[c,k("month")],MM:[a,k("month")],MMM:[m,function(U){var I=_("months"),N=(_("monthsShort")||I.map((function(W){return W.slice(0,3)}))).indexOf(U)+1;if(N<1)throw new Error;this.month=N%12||N}],MMMM:[m,function(U){var I=_("months").indexOf(U)+1;if(I<1)throw new Error;this.month=I%12||I}],Y:[/[+-]?\d+/,k("year")],YY:[a,function(U){this.year=C(U)}],YYYY:[/\d{4}/,k("year")],Z:L,ZZ:L};function A(U){var I,N;I=U,N=Y&&Y.formats;for(var W=(U=I.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(D,w,T){var v=T&&T.toUpperCase();return w||N[T]||n[T]||N[v].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(u,f,b){return f||b.slice(1)}))}))).match(r),q=W.length,j=0;j-1)return new Date((F==="X"?1e3:1)*x);var s=A(F)(x),E=s.year,R=s.month,z=s.day,P=s.hours,K=s.minutes,O=s.seconds,st=s.milliseconds,M=s.zone,H=s.week,V=new Date,l=z||(E||R?1:V.getDate()),J=E||V.getFullYear(),$=0;E&&!R||($=R>0?R-1:V.getMonth());var Q,G=P||0,it=K||0,at=O||0,pt=st||0;return M?new Date(Date.UTC(J,$,l,G,it,at,pt+60*M.offset*1e3)):o?new Date(Date.UTC(J,$,l,G,it,at,pt)):(Q=new Date(J,$,l,G,it,at,pt),H&&(Q=X(Q).week(H).toDate()),Q)}catch{return new Date("")}})(p,h,g,N),this.init(),v&&v!==!0&&(this.$L=this.locale(v).$L),T&&p!=this.format(h)&&(this.$d=new Date("")),Y={}}else if(h instanceof Array)for(var u=h.length,f=1;f<=u;f+=1){y[1]=h[f-1];var b=N.apply(this,y);if(b.isValid()){this.$d=b.$d,this.$L=b.$L,this.init();break}f===u&&(this.$d=new Date(""))}else q.call(this,j)}}}))})(jt)),jt.exports}var Hi=Oi();const Ni=ae(Hi);var Qt={exports:{}},Pi=Qt.exports,tn;function Vi(){return tn||(tn=1,(function(t,e){(function(n,r){t.exports=r()})(Pi,(function(){return function(n,r){var i=r.prototype,a=i.format;i.format=function(c){var m=this,Y=this.$locale();if(!this.isValid())return a.bind(this)(c);var C=this.$utils(),k=(c||"YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,(function(L){switch(L){case"Q":return Math.ceil((m.$M+1)/3);case"Do":return Y.ordinal(m.$D);case"gggg":return m.weekYear();case"GGGG":return m.isoWeekYear();case"wo":return Y.ordinal(m.week(),"W");case"w":case"ww":return C.s(m.week(),L==="w"?1:2,"0");case"W":case"WW":return C.s(m.isoWeek(),L==="W"?1:2,"0");case"k":case"kk":return C.s(String(m.$H===0?24:m.$H),L==="k"?1:2,"0");case"X":return Math.floor(m.$d.getTime()/1e3);case"x":return m.$d.getTime();case"z":return"["+m.offsetName()+"]";case"zzz":return"["+m.offsetName("long")+"]";default:return L}}));return a.bind(this)(k)}}}))})(Qt)),Qt.exports}var zi=Vi();const Ri=ae(zi);var Jt={exports:{}},qi=Jt.exports,en;function Zi(){return en||(en=1,(function(t,e){(function(n,r){t.exports=r()})(qi,(function(){var n,r,i=1e3,a=6e4,c=36e5,m=864e5,Y=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,C=31536e6,k=2628e6,L=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,_={years:C,months:k,days:m,hours:c,minutes:a,seconds:i,milliseconds:1,weeks:6048e5},S=function(p){return p instanceof q},Z=function(p,g,y){return new q(p,y,g.$l)},A=function(p){return r.p(p)+"s"},U=function(p){return p<0},I=function(p){return U(p)?Math.ceil(p):Math.floor(p)},N=function(p){return Math.abs(p)},W=function(p,g){return p?U(p)?{negative:!0,format:""+N(p)+g}:{negative:!1,format:""+p+g}:{negative:!1,format:""}},q=(function(){function p(y,h,D){var w=this;if(this.$d={},this.$l=D,y===void 0&&(this.$ms=0,this.parseFromMilliseconds()),h)return Z(y*_[A(h)],this);if(typeof y=="number")return this.$ms=y,this.parseFromMilliseconds(),this;if(typeof y=="object")return Object.keys(y).forEach((function(u){w.$d[A(u)]=y[u]})),this.calMilliseconds(),this;if(typeof y=="string"){var T=y.match(L);if(T){var v=T.slice(2).map((function(u){return u!=null?Number(u):0}));return this.$d.years=v[0],this.$d.months=v[1],this.$d.weeks=v[2],this.$d.days=v[3],this.$d.hours=v[4],this.$d.minutes=v[5],this.$d.seconds=v[6],this.calMilliseconds(),this}}return this}var g=p.prototype;return g.calMilliseconds=function(){var y=this;this.$ms=Object.keys(this.$d).reduce((function(h,D){return h+(y.$d[D]||0)*_[D]}),0)},g.parseFromMilliseconds=function(){var y=this.$ms;this.$d.years=I(y/C),y%=C,this.$d.months=I(y/k),y%=k,this.$d.days=I(y/m),y%=m,this.$d.hours=I(y/c),y%=c,this.$d.minutes=I(y/a),y%=a,this.$d.seconds=I(y/i),y%=i,this.$d.milliseconds=y},g.toISOString=function(){var y=W(this.$d.years,"Y"),h=W(this.$d.months,"M"),D=+this.$d.days||0;this.$d.weeks&&(D+=7*this.$d.weeks);var w=W(D,"D"),T=W(this.$d.hours,"H"),v=W(this.$d.minutes,"M"),u=this.$d.seconds||0;this.$d.milliseconds&&(u+=this.$d.milliseconds/1e3,u=Math.round(1e3*u)/1e3);var f=W(u,"S"),b=y.negative||h.negative||w.negative||T.negative||v.negative||f.negative,x=T.format||v.format||f.format?"T":"",F=(b?"-":"")+"P"+y.format+h.format+w.format+x+T.format+v.format+f.format;return F==="P"||F==="-P"?"P0D":F},g.toJSON=function(){return this.toISOString()},g.format=function(y){var h=y||"YYYY-MM-DDTHH:mm:ss",D={Y:this.$d.years,YY:r.s(this.$d.years,2,"0"),YYYY:r.s(this.$d.years,4,"0"),M:this.$d.months,MM:r.s(this.$d.months,2,"0"),D:this.$d.days,DD:r.s(this.$d.days,2,"0"),H:this.$d.hours,HH:r.s(this.$d.hours,2,"0"),m:this.$d.minutes,mm:r.s(this.$d.minutes,2,"0"),s:this.$d.seconds,ss:r.s(this.$d.seconds,2,"0"),SSS:r.s(this.$d.milliseconds,3,"0")};return h.replace(Y,(function(w,T){return T||String(D[w])}))},g.as=function(y){return this.$ms/_[A(y)]},g.get=function(y){var h=this.$ms,D=A(y);return D==="milliseconds"?h%=1e3:h=D==="weeks"?I(h/_[D]):this.$d[D],h||0},g.add=function(y,h,D){var w;return w=h?y*_[A(h)]:S(y)?y.$ms:Z(y,this).$ms,Z(this.$ms+w*(D?-1:1),this)},g.subtract=function(y,h){return this.add(y,h,!0)},g.locale=function(y){var h=this.clone();return h.$l=y,h},g.clone=function(){return Z(this.$ms,this)},g.humanize=function(y){return n().add(this.$ms,"ms").locale(this.$l).fromNow(!y)},g.valueOf=function(){return this.asMilliseconds()},g.milliseconds=function(){return this.get("milliseconds")},g.asMilliseconds=function(){return this.as("milliseconds")},g.seconds=function(){return this.get("seconds")},g.asSeconds=function(){return this.as("seconds")},g.minutes=function(){return this.get("minutes")},g.asMinutes=function(){return this.as("minutes")},g.hours=function(){return this.get("hours")},g.asHours=function(){return this.as("hours")},g.days=function(){return this.get("days")},g.asDays=function(){return this.as("days")},g.weeks=function(){return this.get("weeks")},g.asWeeks=function(){return this.as("weeks")},g.months=function(){return this.get("months")},g.asMonths=function(){return this.as("months")},g.years=function(){return this.get("years")},g.asYears=function(){return this.as("years")},p})(),j=function(p,g,y){return p.add(g.years()*y,"y").add(g.months()*y,"M").add(g.days()*y,"d").add(g.hours()*y,"h").add(g.minutes()*y,"m").add(g.seconds()*y,"s").add(g.milliseconds()*y,"ms")};return function(p,g,y){n=y,r=y().$utils(),y.duration=function(w,T){var v=y.locale();return Z(w,{$l:v},T)},y.isDuration=S;var h=g.prototype.add,D=g.prototype.subtract;g.prototype.add=function(w,T){return S(w)?j(this,w,1):h.bind(this)(w,T)},g.prototype.subtract=function(w,T){return S(w)?j(this,w,-1):D.bind(this)(w,T)}}}))})(Jt)),Jt.exports}var Bi=Zi();const Xi=ae(Bi);var xe=(function(){var t=d(function(v,u,f,b){for(f=f||{},b=v.length;b--;f[v[b]]=u);return f},"o"),e=[6,8,10,12,13,14,15,16,17,18,20,21,22,23,24,25,26,27,28,29,30,31,33,35,36,38,40],n=[1,26],r=[1,27],i=[1,28],a=[1,29],c=[1,30],m=[1,31],Y=[1,32],C=[1,33],k=[1,34],L=[1,9],_=[1,10],S=[1,11],Z=[1,12],A=[1,13],U=[1,14],I=[1,15],N=[1,16],W=[1,19],q=[1,20],j=[1,21],p=[1,22],g=[1,23],y=[1,25],h=[1,35],D={trace:d(function(){},"trace"),yy:{},symbols_:{error:2,start:3,gantt:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NL:10,weekday:11,weekday_monday:12,weekday_tuesday:13,weekday_wednesday:14,weekday_thursday:15,weekday_friday:16,weekday_saturday:17,weekday_sunday:18,weekend:19,weekend_friday:20,weekend_saturday:21,dateFormat:22,inclusiveEndDates:23,topAxis:24,axisFormat:25,tickInterval:26,excludes:27,includes:28,todayMarker:29,title:30,acc_title:31,acc_title_value:32,acc_descr:33,acc_descr_value:34,acc_descr_multiline_value:35,section:36,clickStatement:37,taskTxt:38,taskData:39,click:40,callbackname:41,callbackargs:42,href:43,clickStatementDebug:44,$accept:0,$end:1},terminals_:{2:"error",4:"gantt",6:"EOF",8:"SPACE",10:"NL",12:"weekday_monday",13:"weekday_tuesday",14:"weekday_wednesday",15:"weekday_thursday",16:"weekday_friday",17:"weekday_saturday",18:"weekday_sunday",20:"weekend_friday",21:"weekend_saturday",22:"dateFormat",23:"inclusiveEndDates",24:"topAxis",25:"axisFormat",26:"tickInterval",27:"excludes",28:"includes",29:"todayMarker",30:"title",31:"acc_title",32:"acc_title_value",33:"acc_descr",34:"acc_descr_value",35:"acc_descr_multiline_value",36:"section",38:"taskTxt",39:"taskData",40:"click",41:"callbackname",42:"callbackargs",43:"href"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[19,1],[19,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,1],[9,2],[37,2],[37,3],[37,3],[37,4],[37,3],[37,4],[37,2],[44,2],[44,3],[44,3],[44,4],[44,3],[44,4],[44,2]],performAction:d(function(u,f,b,x,F,o,X){var s=o.length-1;switch(F){case 1:return o[s-1];case 2:this.$=[];break;case 3:o[s-1].push(o[s]),this.$=o[s-1];break;case 4:case 5:this.$=o[s];break;case 6:case 7:this.$=[];break;case 8:x.setWeekday("monday");break;case 9:x.setWeekday("tuesday");break;case 10:x.setWeekday("wednesday");break;case 11:x.setWeekday("thursday");break;case 12:x.setWeekday("friday");break;case 13:x.setWeekday("saturday");break;case 14:x.setWeekday("sunday");break;case 15:x.setWeekend("friday");break;case 16:x.setWeekend("saturday");break;case 17:x.setDateFormat(o[s].substr(11)),this.$=o[s].substr(11);break;case 18:x.enableInclusiveEndDates(),this.$=o[s].substr(18);break;case 19:x.TopAxis(),this.$=o[s].substr(8);break;case 20:x.setAxisFormat(o[s].substr(11)),this.$=o[s].substr(11);break;case 21:x.setTickInterval(o[s].substr(13)),this.$=o[s].substr(13);break;case 22:x.setExcludes(o[s].substr(9)),this.$=o[s].substr(9);break;case 23:x.setIncludes(o[s].substr(9)),this.$=o[s].substr(9);break;case 24:x.setTodayMarker(o[s].substr(12)),this.$=o[s].substr(12);break;case 27:x.setDiagramTitle(o[s].substr(6)),this.$=o[s].substr(6);break;case 28:this.$=o[s].trim(),x.setAccTitle(this.$);break;case 29:case 30:this.$=o[s].trim(),x.setAccDescription(this.$);break;case 31:x.addSection(o[s].substr(8)),this.$=o[s].substr(8);break;case 33:x.addTask(o[s-1],o[s]),this.$="task";break;case 34:this.$=o[s-1],x.setClickEvent(o[s-1],o[s],null);break;case 35:this.$=o[s-2],x.setClickEvent(o[s-2],o[s-1],o[s]);break;case 36:this.$=o[s-2],x.setClickEvent(o[s-2],o[s-1],null),x.setLink(o[s-2],o[s]);break;case 37:this.$=o[s-3],x.setClickEvent(o[s-3],o[s-2],o[s-1]),x.setLink(o[s-3],o[s]);break;case 38:this.$=o[s-2],x.setClickEvent(o[s-2],o[s],null),x.setLink(o[s-2],o[s-1]);break;case 39:this.$=o[s-3],x.setClickEvent(o[s-3],o[s-1],o[s]),x.setLink(o[s-3],o[s-2]);break;case 40:this.$=o[s-1],x.setLink(o[s-1],o[s]);break;case 41:case 47:this.$=o[s-1]+" "+o[s];break;case 42:case 43:case 45:this.$=o[s-2]+" "+o[s-1]+" "+o[s];break;case 44:case 46:this.$=o[s-3]+" "+o[s-2]+" "+o[s-1]+" "+o[s];break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:17,12:n,13:r,14:i,15:a,16:c,17:m,18:Y,19:18,20:C,21:k,22:L,23:_,24:S,25:Z,26:A,27:U,28:I,29:N,30:W,31:q,33:j,35:p,36:g,37:24,38:y,40:h},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:36,11:17,12:n,13:r,14:i,15:a,16:c,17:m,18:Y,19:18,20:C,21:k,22:L,23:_,24:S,25:Z,26:A,27:U,28:I,29:N,30:W,31:q,33:j,35:p,36:g,37:24,38:y,40:h},t(e,[2,5]),t(e,[2,6]),t(e,[2,17]),t(e,[2,18]),t(e,[2,19]),t(e,[2,20]),t(e,[2,21]),t(e,[2,22]),t(e,[2,23]),t(e,[2,24]),t(e,[2,25]),t(e,[2,26]),t(e,[2,27]),{32:[1,37]},{34:[1,38]},t(e,[2,30]),t(e,[2,31]),t(e,[2,32]),{39:[1,39]},t(e,[2,8]),t(e,[2,9]),t(e,[2,10]),t(e,[2,11]),t(e,[2,12]),t(e,[2,13]),t(e,[2,14]),t(e,[2,15]),t(e,[2,16]),{41:[1,40],43:[1,41]},t(e,[2,4]),t(e,[2,28]),t(e,[2,29]),t(e,[2,33]),t(e,[2,34],{42:[1,42],43:[1,43]}),t(e,[2,40],{41:[1,44]}),t(e,[2,35],{43:[1,45]}),t(e,[2,36]),t(e,[2,38],{42:[1,46]}),t(e,[2,37]),t(e,[2,39])],defaultActions:{},parseError:d(function(u,f){if(f.recoverable)this.trace(u);else{var b=new Error(u);throw b.hash=f,b}},"parseError"),parse:d(function(u){var f=this,b=[0],x=[],F=[null],o=[],X=this.table,s="",E=0,R=0,z=2,P=1,K=o.slice.call(arguments,1),O=Object.create(this.lexer),st={yy:{}};for(var M in this.yy)Object.prototype.hasOwnProperty.call(this.yy,M)&&(st.yy[M]=this.yy[M]);O.setInput(u,st.yy),st.yy.lexer=O,st.yy.parser=this,typeof O.yylloc>"u"&&(O.yylloc={});var H=O.yylloc;o.push(H);var V=O.options&&O.options.ranges;typeof st.yy.parseError=="function"?this.parseError=st.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function l(ot){b.length=b.length-2*ot,F.length=F.length-ot,o.length=o.length-ot}d(l,"popStack");function J(){var ot;return ot=x.pop()||O.lex()||P,typeof ot!="number"&&(ot instanceof Array&&(x=ot,ot=x.pop()),ot=f.symbols_[ot]||ot),ot}d(J,"lex");for(var $,Q,G,it,at={},pt,ut,Oe,qt;;){if(Q=b[b.length-1],this.defaultActions[Q]?G=this.defaultActions[Q]:(($===null||typeof $>"u")&&($=J()),G=X[Q]&&X[Q][$]),typeof G>"u"||!G.length||!G[0]){var oe="";qt=[];for(pt in X[Q])this.terminals_[pt]&&pt>z&&qt.push("'"+this.terminals_[pt]+"'");O.showPosition?oe="Parse error on line "+(E+1)+`: +`+O.showPosition()+` +Expecting `+qt.join(", ")+", got '"+(this.terminals_[$]||$)+"'":oe="Parse error on line "+(E+1)+": Unexpected "+($==P?"end of input":"'"+(this.terminals_[$]||$)+"'"),this.parseError(oe,{text:O.match,token:this.terminals_[$]||$,line:O.yylineno,loc:H,expected:qt})}if(G[0]instanceof Array&&G.length>1)throw new Error("Parse Error: multiple actions possible at state: "+Q+", token: "+$);switch(G[0]){case 1:b.push($),F.push(O.yytext),o.push(O.yylloc),b.push(G[1]),$=null,R=O.yyleng,s=O.yytext,E=O.yylineno,H=O.yylloc;break;case 2:if(ut=this.productions_[G[1]][1],at.$=F[F.length-ut],at._$={first_line:o[o.length-(ut||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(ut||1)].first_column,last_column:o[o.length-1].last_column},V&&(at._$.range=[o[o.length-(ut||1)].range[0],o[o.length-1].range[1]]),it=this.performAction.apply(at,[s,R,E,st.yy,G[1],F,o].concat(K)),typeof it<"u")return it;ut&&(b=b.slice(0,-1*ut*2),F=F.slice(0,-1*ut),o=o.slice(0,-1*ut)),b.push(this.productions_[G[1]][0]),F.push(at.$),o.push(at._$),Oe=X[b[b.length-2]][b[b.length-1]],b.push(Oe);break;case 3:return!0}}return!0},"parse")},w=(function(){var v={EOF:1,parseError:d(function(f,b){if(this.yy.parser)this.yy.parser.parseError(f,b);else throw new Error(f)},"parseError"),setInput:d(function(u,f){return this.yy=f||this.yy||{},this._input=u,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:d(function(){var u=this._input[0];this.yytext+=u,this.yyleng++,this.offset++,this.match+=u,this.matched+=u;var f=u.match(/(?:\r\n?|\n).*/g);return f?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),u},"input"),unput:d(function(u){var f=u.length,b=u.split(/(?:\r\n?|\n)/g);this._input=u+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-f),this.offset-=f;var x=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),b.length-1&&(this.yylineno-=b.length-1);var F=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:b?(b.length===x.length?this.yylloc.first_column:0)+x[x.length-b.length].length-b[0].length:this.yylloc.first_column-f},this.options.ranges&&(this.yylloc.range=[F[0],F[0]+this.yyleng-f]),this.yyleng=this.yytext.length,this},"unput"),more:d(function(){return this._more=!0,this},"more"),reject:d(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:d(function(u){this.unput(this.match.slice(u))},"less"),pastInput:d(function(){var u=this.matched.substr(0,this.matched.length-this.match.length);return(u.length>20?"...":"")+u.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:d(function(){var u=this.match;return u.length<20&&(u+=this._input.substr(0,20-u.length)),(u.substr(0,20)+(u.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:d(function(){var u=this.pastInput(),f=new Array(u.length+1).join("-");return u+this.upcomingInput()+` +`+f+"^"},"showPosition"),test_match:d(function(u,f){var b,x,F;if(this.options.backtrack_lexer&&(F={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&&(F.yylloc.range=this.yylloc.range.slice(0))),x=u[0].match(/(?:\r\n?|\n).*/g),x&&(this.yylineno+=x.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:x?x[x.length-1].length-x[x.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+u[0].length},this.yytext+=u[0],this.match+=u[0],this.matches=u,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(u[0].length),this.matched+=u[0],b=this.performAction.call(this,this.yy,this,f,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),b)return b;if(this._backtrack){for(var o in F)this[o]=F[o];return!1}return!1},"test_match"),next:d(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var u,f,b,x;this._more||(this.yytext="",this.match="");for(var F=this._currentRules(),o=0;of[0].length)){if(f=b,x=o,this.options.backtrack_lexer){if(u=this.test_match(b,F[o]),u!==!1)return u;if(this._backtrack){f=!1;continue}else return!1}else if(!this.options.flex)break}return f?(u=this.test_match(f,F[x]),u!==!1?u:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:d(function(){var f=this.next();return f||this.lex()},"lex"),begin:d(function(f){this.conditionStack.push(f)},"begin"),popState:d(function(){var f=this.conditionStack.length-1;return f>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:d(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:d(function(f){return f=this.conditionStack.length-1-Math.abs(f||0),f>=0?this.conditionStack[f]:"INITIAL"},"topState"),pushState:d(function(f){this.begin(f)},"pushState"),stateStackSize:d(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:d(function(f,b,x,F){switch(x){case 0:return this.begin("open_directive"),"open_directive";case 1:return this.begin("acc_title"),31;case 2:return this.popState(),"acc_title_value";case 3:return this.begin("acc_descr"),33;case 4:return this.popState(),"acc_descr_value";case 5:this.begin("acc_descr_multiline");break;case 6:this.popState();break;case 7:return"acc_descr_multiline_value";case 8:break;case 9:break;case 10:break;case 11:return 10;case 12:break;case 13:break;case 14:this.begin("href");break;case 15:this.popState();break;case 16:return 43;case 17:this.begin("callbackname");break;case 18:this.popState();break;case 19:this.popState(),this.begin("callbackargs");break;case 20:return 41;case 21:this.popState();break;case 22:return 42;case 23:this.begin("click");break;case 24:this.popState();break;case 25:return 40;case 26:return 4;case 27:return 22;case 28:return 23;case 29:return 24;case 30:return 25;case 31:return 26;case 32:return 28;case 33:return 27;case 34:return 29;case 35:return 12;case 36:return 13;case 37:return 14;case 38:return 15;case 39:return 16;case 40:return 17;case 41:return 18;case 42:return 20;case 43:return 21;case 44:return"date";case 45:return 30;case 46:return"accDescription";case 47:return 36;case 48:return 38;case 49:return 39;case 50:return":";case 51:return 6;case 52:return"INVALID"}},"anonymous"),rules:[/^(?:%%\{)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:%%(?!\{)*[^\n]*)/i,/^(?:[^\}]%%*[^\n]*)/i,/^(?:%%*[^\n]*[\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:%[^\n]*)/i,/^(?:href[\s]+["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:call[\s]+)/i,/^(?:\([\s]*\))/i,/^(?:\()/i,/^(?:[^(]*)/i,/^(?:\))/i,/^(?:[^)]*)/i,/^(?:click[\s]+)/i,/^(?:[\s\n])/i,/^(?:[^\s\n]*)/i,/^(?:gantt\b)/i,/^(?:dateFormat\s[^#\n;]+)/i,/^(?:inclusiveEndDates\b)/i,/^(?:topAxis\b)/i,/^(?:axisFormat\s[^#\n;]+)/i,/^(?:tickInterval\s[^#\n;]+)/i,/^(?:includes\s[^#\n;]+)/i,/^(?:excludes\s[^#\n;]+)/i,/^(?:todayMarker\s[^\n;]+)/i,/^(?:weekday\s+monday\b)/i,/^(?:weekday\s+tuesday\b)/i,/^(?:weekday\s+wednesday\b)/i,/^(?:weekday\s+thursday\b)/i,/^(?:weekday\s+friday\b)/i,/^(?:weekday\s+saturday\b)/i,/^(?:weekday\s+sunday\b)/i,/^(?:weekend\s+friday\b)/i,/^(?:weekend\s+saturday\b)/i,/^(?:\d\d\d\d-\d\d-\d\d\b)/i,/^(?:title\s[^\n]+)/i,/^(?:accDescription\s[^#\n;]+)/i,/^(?:section\s[^\n]+)/i,/^(?:[^:\n]+)/i,/^(?::[^#\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[6,7],inclusive:!1},acc_descr:{rules:[4],inclusive:!1},acc_title:{rules:[2],inclusive:!1},callbackargs:{rules:[21,22],inclusive:!1},callbackname:{rules:[18,19,20],inclusive:!1},href:{rules:[15,16],inclusive:!1},click:{rules:[24,25],inclusive:!1},INITIAL:{rules:[0,1,3,5,8,9,10,11,12,13,14,17,23,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],inclusive:!0}}};return v})();D.lexer=w;function T(){this.yy={}}return d(T,"Parser"),T.prototype=D,D.Parser=T,new T})();xe.parser=xe;var Gi=xe;rt.extend(Wi);rt.extend(Ni);rt.extend(Ri);var nn={friday:5,saturday:6},lt="",_e="",Fe=void 0,Ye="",Vt=[],zt=[],Ue=new Map,Ee=[],ie=[],It="",Ie="",_n=["active","done","crit","milestone","vert"],Le=[],Rt=!1,Ae=!1,We="sunday",se="saturday",we=0,ji=d(function(){Ee=[],ie=[],It="",Le=[],Kt=0,Me=void 0,te=void 0,tt=[],lt="",_e="",Ie="",Fe=void 0,Ye="",Vt=[],zt=[],Rt=!1,Ae=!1,we=0,Ue=new Map,Bn(),We="sunday",se="saturday"},"clear"),Qi=d(function(t){_e=t},"setAxisFormat"),Ji=d(function(){return _e},"getAxisFormat"),Ki=d(function(t){Fe=t},"setTickInterval"),ts=d(function(){return Fe},"getTickInterval"),es=d(function(t){Ye=t},"setTodayMarker"),ns=d(function(){return Ye},"getTodayMarker"),rs=d(function(t){lt=t},"setDateFormat"),is=d(function(){Rt=!0},"enableInclusiveEndDates"),ss=d(function(){return Rt},"endDatesAreInclusive"),as=d(function(){Ae=!0},"enableTopAxis"),os=d(function(){return Ae},"topAxisEnabled"),cs=d(function(t){Ie=t},"setDisplayMode"),us=d(function(){return Ie},"getDisplayMode"),ls=d(function(){return lt},"getDateFormat"),fs=d(function(t){Vt=t.toLowerCase().split(/[\s,]+/)},"setIncludes"),ds=d(function(){return Vt},"getIncludes"),hs=d(function(t){zt=t.toLowerCase().split(/[\s,]+/)},"setExcludes"),ms=d(function(){return zt},"getExcludes"),gs=d(function(){return Ue},"getLinks"),ys=d(function(t){It=t,Ee.push(t)},"addSection"),ks=d(function(){return Ee},"getSections"),ps=d(function(){let t=rn();const e=10;let n=0;for(;!t&&n{const Y=m.trim();return Y==="x"||Y==="X"},"isTimestampFormat")(e)&&/^\d+$/.test(n))return new Date(Number(n));const a=/^after\s+(?[\d\w- ]+)/.exec(n);if(a!==null){let m=null;for(const C of a.groups.ids.split(" ")){let k=Ct(C);k!==void 0&&(!m||k.endTime>m.endTime)&&(m=k)}if(m)return m.endTime;const Y=new Date;return Y.setHours(0,0,0,0),Y}let c=rt(n,e.trim(),!0);if(c.isValid())return c.toDate();{Tt.debug("Invalid date:"+n),Tt.debug("With date format:"+e.trim());const m=new Date(n);if(m===void 0||isNaN(m.getTime())||m.getFullYear()<-1e4||m.getFullYear()>1e4)throw new Error("Invalid date:"+n);return m}},"getStartDate"),Un=d(function(t){const e=/^(\d+(?:\.\d+)?)([Mdhmswy]|ms)$/.exec(t.trim());return e!==null?[Number.parseFloat(e[1]),e[2]]:[NaN,"ms"]},"parseDuration"),En=d(function(t,e,n,r=!1){n=n.trim();const a=/^until\s+(?[\d\w- ]+)/.exec(n);if(a!==null){let k=null;for(const _ of a.groups.ids.split(" ")){let S=Ct(_);S!==void 0&&(!k||S.startTime{window.open(n,"_self")}),Ue.set(r,n))}),Ln(t,"clickable")},"setLink"),Ln=d(function(t,e){t.split(",").forEach(function(n){let r=Ct(n);r!==void 0&&r.classes.push(e)})},"setClass"),_s=d(function(t,e,n){if(_t().securityLevel!=="loose"||e===void 0)return;let r=[];if(typeof n=="string"){r=n.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let a=0;a{Xn.runFunc(e,...r)})},"setClickFun"),An=d(function(t,e){Le.push(function(){const n=document.querySelector(`[id="${t}"]`);n!==null&&n.addEventListener("click",function(){e()})},function(){const n=document.querySelector(`[id="${t}-text"]`);n!==null&&n.addEventListener("click",function(){e()})})},"pushFun"),Fs=d(function(t,e,n){t.split(",").forEach(function(r){_s(r,e,n)}),Ln(t,"clickable")},"setClickEvent"),Ys=d(function(t){Le.forEach(function(e){e(t)})},"bindFunctions"),Us={getConfig:d(()=>_t().gantt,"getConfig"),clear:ji,setDateFormat:rs,getDateFormat:ls,enableInclusiveEndDates:is,endDatesAreInclusive:ss,enableTopAxis:as,topAxisEnabled:os,setAxisFormat:Qi,getAxisFormat:Ji,setTickInterval:Ki,getTickInterval:ts,setTodayMarker:es,getTodayMarker:ns,setAccTitle:zn,getAccTitle:Vn,setDiagramTitle:Pn,getDiagramTitle:Nn,setDisplayMode:cs,getDisplayMode:us,setAccDescription:Hn,getAccDescription:On,addSection:ys,getSections:ks,getTasks:ps,addTask:Ms,findTaskById:Ct,addTaskOrg:Cs,setIncludes:fs,getIncludes:ds,setExcludes:hs,getExcludes:ms,setClickEvent:Fs,setLink:Ss,getLinks:gs,bindFunctions:Ys,parseDuration:Un,isInvalidDate:Fn,setWeekday:vs,getWeekday:Ts,setWeekend:bs};function $e(t,e,n){let r=!0;for(;r;)r=!1,n.forEach(function(i){const a="^\\s*"+i+"\\s*$",c=new RegExp(a);t[0].match(c)&&(e[i]=!0,t.shift(1),r=!0)})}d($e,"getTaskTags");rt.extend(Xi);var Es=d(function(){Tt.debug("Something is calling, setConf, remove the call")},"setConf"),sn={monday:Ht,tuesday:pn,wednesday:vn,thursday:xt,friday:Tn,saturday:bn,sunday:Pt},Is=d((t,e)=>{let n=[...t].map(()=>-1/0),r=[...t].sort((a,c)=>a.startTime-c.startTime||a.order-c.order),i=0;for(const a of r)for(let c=0;c=n[c]){n[c]=a.endTime,a.order=c+e,c>i&&(i=c);break}return i},"getMaxIntersections"),dt,ve=1e4,Ls=d(function(t,e,n,r){const i=_t().gantt,a=_t().securityLevel;let c;a==="sandbox"&&(c=Zt("#i"+e));const m=a==="sandbox"?Zt(c.nodes()[0].contentDocument.body):Zt("body"),Y=a==="sandbox"?c.nodes()[0].contentDocument:document,C=Y.getElementById(e);dt=C.parentElement.offsetWidth,dt===void 0&&(dt=1200),i.useWidth!==void 0&&(dt=i.useWidth);const k=r.db.getTasks();let L=[];for(const h of k)L.push(h.type);L=y(L);const _={};let S=2*i.topPadding;if(r.db.getDisplayMode()==="compact"||i.displayMode==="compact"){const h={};for(const w of k)h[w.section]===void 0?h[w.section]=[w]:h[w.section].push(w);let D=0;for(const w of Object.keys(h)){const T=Is(h[w],D)+1;D+=T,S+=T*(i.barHeight+i.barGap),_[w]=T}}else{S+=k.length*(i.barHeight+i.barGap);for(const h of L)_[h]=k.filter(D=>D.type===h).length}C.setAttribute("viewBox","0 0 "+dt+" "+S);const Z=m.select(`[id="${e}"]`),A=Ei().domain([er(k,function(h){return h.startTime}),tr(k,function(h){return h.endTime})]).rangeRound([0,dt-i.leftPadding-i.rightPadding]);function U(h,D){const w=h.startTime,T=D.startTime;let v=0;return w>T?v=1:ws.vert===E.vert?0:s.vert?1:-1);const x=[...new Set(h.map(s=>s.order))].map(s=>h.find(E=>E.order===s));Z.append("g").selectAll("rect").data(x).enter().append("rect").attr("x",0).attr("y",function(s,E){return E=s.order,E*D+w-2}).attr("width",function(){return f-i.rightPadding/2}).attr("height",D).attr("class",function(s){for(const[E,R]of L.entries())if(s.type===R)return"section section"+E%i.numberSectionStyles;return"section section0"}).enter();const F=Z.append("g").selectAll("rect").data(h).enter(),o=r.db.getLinks();if(F.append("rect").attr("id",function(s){return s.id}).attr("rx",3).attr("ry",3).attr("x",function(s){return s.milestone?A(s.startTime)+T+.5*(A(s.endTime)-A(s.startTime))-.5*v:A(s.startTime)+T}).attr("y",function(s,E){return E=s.order,s.vert?i.gridLineStartPadding:E*D+w}).attr("width",function(s){return s.milestone?v:s.vert?.08*v:A(s.renderEndTime||s.endTime)-A(s.startTime)}).attr("height",function(s){return s.vert?k.length*(i.barHeight+i.barGap)+i.barHeight*2:v}).attr("transform-origin",function(s,E){return E=s.order,(A(s.startTime)+T+.5*(A(s.endTime)-A(s.startTime))).toString()+"px "+(E*D+w+.5*v).toString()+"px"}).attr("class",function(s){const E="task";let R="";s.classes.length>0&&(R=s.classes.join(" "));let z=0;for(const[K,O]of L.entries())s.type===O&&(z=K%i.numberSectionStyles);let P="";return s.active?s.crit?P+=" activeCrit":P=" active":s.done?s.crit?P=" doneCrit":P=" done":s.crit&&(P+=" crit"),P.length===0&&(P=" task"),s.milestone&&(P=" milestone "+P),s.vert&&(P=" vert "+P),P+=z,P+=" "+R,E+P}),F.append("text").attr("id",function(s){return s.id+"-text"}).text(function(s){return s.task}).attr("font-size",i.fontSize).attr("x",function(s){let E=A(s.startTime),R=A(s.renderEndTime||s.endTime);if(s.milestone&&(E+=.5*(A(s.endTime)-A(s.startTime))-.5*v,R=E+v),s.vert)return A(s.startTime)+T;const z=this.getBBox().width;return z>R-E?R+z+1.5*i.leftPadding>f?E+T-5:R+T+5:(R-E)/2+E+T}).attr("y",function(s,E){return s.vert?i.gridLineStartPadding+k.length*(i.barHeight+i.barGap)+60:(E=s.order,E*D+i.barHeight/2+(i.fontSize/2-2)+w)}).attr("text-height",v).attr("class",function(s){const E=A(s.startTime);let R=A(s.endTime);s.milestone&&(R=E+v);const z=this.getBBox().width;let P="";s.classes.length>0&&(P=s.classes.join(" "));let K=0;for(const[st,M]of L.entries())s.type===M&&(K=st%i.numberSectionStyles);let O="";return s.active&&(s.crit?O="activeCritText"+K:O="activeText"+K),s.done?s.crit?O=O+" doneCritText"+K:O=O+" doneText"+K:s.crit&&(O=O+" critText"+K),s.milestone&&(O+=" milestoneText"),s.vert&&(O+=" vertText"),z>R-E?R+z+1.5*i.leftPadding>f?P+" taskTextOutsideLeft taskTextOutside"+K+" "+O:P+" taskTextOutsideRight taskTextOutside"+K+" "+O+" width-"+z:P+" taskText taskText"+K+" "+O+" width-"+z}),_t().securityLevel==="sandbox"){let s;s=Zt("#i"+e);const E=s.nodes()[0].contentDocument;F.filter(function(R){return o.has(R.id)}).each(function(R){var z=E.querySelector("#"+R.id),P=E.querySelector("#"+R.id+"-text");const K=z.parentNode;var O=E.createElement("a");O.setAttribute("xlink:href",o.get(R.id)),O.setAttribute("target","_top"),K.appendChild(O),O.appendChild(z),O.appendChild(P)})}}d(N,"drawRects");function W(h,D,w,T,v,u,f,b){if(f.length===0&&b.length===0)return;let x,F;for(const{startTime:z,endTime:P}of u)(x===void 0||zF)&&(F=P);if(!x||!F)return;if(rt(F).diff(rt(x),"year")>5){Tt.warn("The difference between the min and max time is more than 5 years. This will cause performance issues. Skipping drawing exclude days.");return}const o=r.db.getDateFormat(),X=[];let s=null,E=rt(x);for(;E.valueOf()<=F;)r.db.isInvalidDate(E,o,f,b)?s?s.end=E:s={start:E,end:E}:s&&(X.push(s),s=null),E=E.add(1,"d");Z.append("g").selectAll("rect").data(X).enter().append("rect").attr("id",z=>"exclude-"+z.start.format("YYYY-MM-DD")).attr("x",z=>A(z.start.startOf("day"))+w).attr("y",i.gridLineStartPadding).attr("width",z=>A(z.end.endOf("day"))-A(z.start.startOf("day"))).attr("height",v-D-i.gridLineStartPadding).attr("transform-origin",function(z,P){return(A(z.start)+w+.5*(A(z.end)-A(z.start))).toString()+"px "+(P*h+.5*v).toString()+"px"}).attr("class","exclude-range")}d(W,"drawExcludeDays");function q(h,D,w,T){if(w<=0||h>D)return 1/0;const v=D-h,u=rt.duration({[T??"day"]:w}).asMilliseconds();return u<=0?1/0:Math.ceil(v/u)}d(q,"getEstimatedTickCount");function j(h,D,w,T){const v=r.db.getDateFormat(),u=r.db.getAxisFormat();let f;u?f=u:v==="D"?f="%d":f=i.axisFormat??"%Y-%m-%d";let b=ur(A).tickSize(-T+D+i.gridLineStartPadding).tickFormat(re(f));const F=/^([1-9]\d*)(millisecond|second|minute|hour|day|week|month)$/.exec(r.db.getTickInterval()||i.tickInterval);if(F!==null){const o=parseInt(F[1],10);if(isNaN(o)||o<=0)Tt.warn(`Invalid tick interval value: "${F[1]}". Skipping custom tick interval.`);else{const X=F[2],s=r.db.getWeekday()||i.weekday,E=A.domain(),R=E[0],z=E[1],P=q(R,z,o,X);if(P>ve)Tt.warn(`The tick interval "${o}${X}" would generate ${P} ticks, which exceeds the maximum allowed (${ve}). This may indicate an invalid date or time range. Skipping custom tick interval.`);else switch(X){case"millisecond":b.ticks(Ut.every(o));break;case"second":b.ticks(vt.every(o));break;case"minute":b.ticks($t.every(o));break;case"hour":b.ticks(Ot.every(o));break;case"day":b.ticks(bt.every(o));break;case"week":b.ticks(sn[s].every(o));break;case"month":b.ticks(Nt.every(o));break}}}if(Z.append("g").attr("class","grid").attr("transform","translate("+h+", "+(T-50)+")").call(b).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10).attr("dy","1em"),r.db.topAxisEnabled()||i.topAxis){let o=cr(A).tickSize(-T+D+i.gridLineStartPadding).tickFormat(re(f));if(F!==null){const X=parseInt(F[1],10);if(isNaN(X)||X<=0)Tt.warn(`Invalid tick interval value: "${F[1]}". Skipping custom tick interval.`);else{const s=F[2],E=r.db.getWeekday()||i.weekday,R=A.domain(),z=R[0],P=R[1];if(q(z,P,X,s)<=ve)switch(s){case"millisecond":o.ticks(Ut.every(X));break;case"second":o.ticks(vt.every(X));break;case"minute":o.ticks($t.every(X));break;case"hour":o.ticks(Ot.every(X));break;case"day":o.ticks(bt.every(X));break;case"week":o.ticks(sn[E].every(X));break;case"month":o.ticks(Nt.every(X));break}}}Z.append("g").attr("class","grid").attr("transform","translate("+h+", "+D+")").call(o).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10)}}d(j,"makeGrid");function p(h,D){let w=0;const T=Object.keys(_).map(v=>[v,_[v]]);Z.append("g").selectAll("text").data(T).enter().append(function(v){const u=v[0].split(qn.lineBreakRegex),f=-(u.length-1)/2,b=Y.createElementNS("http://www.w3.org/2000/svg","text");b.setAttribute("dy",f+"em");for(const[x,F]of u.entries()){const o=Y.createElementNS("http://www.w3.org/2000/svg","tspan");o.setAttribute("alignment-baseline","central"),o.setAttribute("x","10"),x>0&&o.setAttribute("dy","1em"),o.textContent=F,b.appendChild(o)}return b}).attr("x",10).attr("y",function(v,u){if(u>0)for(let f=0;f` + .mermaid-main-font { + font-family: ${t.fontFamily}; + } + + .exclude-range { + fill: ${t.excludeBkgColor}; + } + + .section { + stroke: none; + opacity: 0.2; + } + + .section0 { + fill: ${t.sectionBkgColor}; + } + + .section2 { + fill: ${t.sectionBkgColor2}; + } + + .section1, + .section3 { + fill: ${t.altSectionBkgColor}; + opacity: 0.2; + } + + .sectionTitle0 { + fill: ${t.titleColor}; + } + + .sectionTitle1 { + fill: ${t.titleColor}; + } + + .sectionTitle2 { + fill: ${t.titleColor}; + } + + .sectionTitle3 { + fill: ${t.titleColor}; + } + + .sectionTitle { + text-anchor: start; + font-family: ${t.fontFamily}; + } + + + /* Grid and axis */ + + .grid .tick { + stroke: ${t.gridColor}; + opacity: 0.8; + shape-rendering: crispEdges; + } + + .grid .tick text { + font-family: ${t.fontFamily}; + fill: ${t.textColor}; + } + + .grid path { + stroke-width: 0; + } + + + /* Today line */ + + .today { + fill: none; + stroke: ${t.todayLineColor}; + stroke-width: 2px; + } + + + /* Task styling */ + + /* Default task */ + + .task { + stroke-width: 2; + } + + .taskText { + text-anchor: middle; + font-family: ${t.fontFamily}; + } + + .taskTextOutsideRight { + fill: ${t.taskTextDarkColor}; + text-anchor: start; + font-family: ${t.fontFamily}; + } + + .taskTextOutsideLeft { + fill: ${t.taskTextDarkColor}; + text-anchor: end; + } + + + /* Special case clickable */ + + .task.clickable { + cursor: pointer; + } + + .taskText.clickable { + cursor: pointer; + fill: ${t.taskTextClickableColor} !important; + font-weight: bold; + } + + .taskTextOutsideLeft.clickable { + cursor: pointer; + fill: ${t.taskTextClickableColor} !important; + font-weight: bold; + } + + .taskTextOutsideRight.clickable { + cursor: pointer; + fill: ${t.taskTextClickableColor} !important; + font-weight: bold; + } + + + /* Specific task settings for the sections*/ + + .taskText0, + .taskText1, + .taskText2, + .taskText3 { + fill: ${t.taskTextColor}; + } + + .task0, + .task1, + .task2, + .task3 { + fill: ${t.taskBkgColor}; + stroke: ${t.taskBorderColor}; + } + + .taskTextOutside0, + .taskTextOutside2 + { + fill: ${t.taskTextOutsideColor}; + } + + .taskTextOutside1, + .taskTextOutside3 { + fill: ${t.taskTextOutsideColor}; + } + + + /* Active task */ + + .active0, + .active1, + .active2, + .active3 { + fill: ${t.activeTaskBkgColor}; + stroke: ${t.activeTaskBorderColor}; + } + + .activeText0, + .activeText1, + .activeText2, + .activeText3 { + fill: ${t.taskTextDarkColor} !important; + } + + + /* Completed task */ + + .done0, + .done1, + .done2, + .done3 { + stroke: ${t.doneTaskBorderColor}; + fill: ${t.doneTaskBkgColor}; + stroke-width: 2; + } + + .doneText0, + .doneText1, + .doneText2, + .doneText3 { + fill: ${t.taskTextDarkColor} !important; + } + + + /* Tasks on the critical line */ + + .crit0, + .crit1, + .crit2, + .crit3 { + stroke: ${t.critBorderColor}; + fill: ${t.critBkgColor}; + stroke-width: 2; + } + + .activeCrit0, + .activeCrit1, + .activeCrit2, + .activeCrit3 { + stroke: ${t.critBorderColor}; + fill: ${t.activeTaskBkgColor}; + stroke-width: 2; + } + + .doneCrit0, + .doneCrit1, + .doneCrit2, + .doneCrit3 { + stroke: ${t.critBorderColor}; + fill: ${t.doneTaskBkgColor}; + stroke-width: 2; + cursor: pointer; + shape-rendering: crispEdges; + } + + .milestone { + transform: rotate(45deg) scale(0.8,0.8); + } + + .milestoneText { + font-style: italic; + } + .doneCritText0, + .doneCritText1, + .doneCritText2, + .doneCritText3 { + fill: ${t.taskTextDarkColor} !important; + } + + .vert { + stroke: ${t.vertLineColor}; + } + + .vertText { + font-size: 15px; + text-anchor: middle; + fill: ${t.vertLineColor} !important; + } + + .activeCritText0, + .activeCritText1, + .activeCritText2, + .activeCritText3 { + fill: ${t.taskTextDarkColor} !important; + } + + .titleText { + text-anchor: middle; + font-size: 18px; + fill: ${t.titleColor||t.textColor}; + font-family: ${t.fontFamily}; + } +`,"getStyles"),$s=Ws,zs={parser:Gi,db:Us,renderer:As,styles:$s};export{zs as diagram}; diff --git a/_astro/gitGraphDiagram-NY62KEGX.DrvSVcW5.js b/_astro/gitGraphDiagram-NY62KEGX.DrvSVcW5.js new file mode 100644 index 00000000..730c2771 --- /dev/null +++ b/_astro/gitGraphDiagram-NY62KEGX.DrvSVcW5.js @@ -0,0 +1,65 @@ +import{p as Y}from"./chunk-4BX2VUAB.CV908Kae.js";import{I as K}from"./chunk-QZHKN3VN.B7dpA8ra.js";import{_ as l,q as U,p as V,s as X,g as J,a as Q,b as Z,l as m,c as rr,d as er,u as tr,C as ar,y as sr,k as C,D as nr,E as or,F as cr,G as ir}from"./mermaid.core.LbQlJBBQ.js";import{p as dr}from"./treemap-KMMF4GRG.BHoxrBMR.js";import"./page._rMDHl_T.js";import"./min.D5TVP8RA.js";import"./_baseUniq.CLojSEzq.js";var x={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},hr=cr.gitGraph,I=l(()=>nr({...hr,...or().gitGraph}),"getConfig"),c=new K(()=>{const t=I(),r=t.mainBranchName,s=t.mainBranchOrder;return{mainBranchName:r,commits:new Map,head:null,branchConfig:new Map([[r,{name:r,order:s}]]),branches:new Map([[r,null]]),currBranch:r,direction:"LR",seq:0,options:{}}});function A(){return ir({length:7})}l(A,"getID");function F(t,r){const s=Object.create(null);return t.reduce((n,e)=>{const a=r(e);return s[a]||(s[a]=!0,n.push(e)),n},[])}l(F,"uniqBy");var lr=l(function(t){c.records.direction=t},"setDirection"),$r=l(function(t){m.debug("options str",t),t=t?.trim(),t=t||"{}";try{c.records.options=JSON.parse(t)}catch(r){m.error("error while parsing gitGraph options",r.message)}},"setOptions"),fr=l(function(){return c.records.options},"getOptions"),gr=l(function(t){let r=t.msg,s=t.id;const n=t.type;let e=t.tags;m.info("commit",r,s,n,e),m.debug("Entering commit:",r,s,n,e);const a=I();s=C.sanitizeText(s,a),r=C.sanitizeText(r,a),e=e?.map(o=>C.sanitizeText(o,a));const d={id:s||c.records.seq+"-"+A(),message:r,seq:c.records.seq++,type:n??x.NORMAL,tags:e??[],parents:c.records.head==null?[]:[c.records.head.id],branch:c.records.currBranch};c.records.head=d,m.info("main branch",a.mainBranchName),c.records.commits.has(d.id)&&m.warn(`Commit ID ${d.id} already exists`),c.records.commits.set(d.id,d),c.records.branches.set(c.records.currBranch,d.id),m.debug("in pushCommit "+d.id)},"commit"),yr=l(function(t){let r=t.name;const s=t.order;if(r=C.sanitizeText(r,I()),c.records.branches.has(r))throw new Error(`Trying to create an existing branch. (Help: Either use a new name if you want create a new branch or try using "checkout ${r}")`);c.records.branches.set(r,c.records.head!=null?c.records.head.id:null),c.records.branchConfig.set(r,{name:r,order:s}),z(r),m.debug("in createBranch")},"branch"),ur=l(t=>{let r=t.branch,s=t.id;const n=t.type,e=t.tags,a=I();r=C.sanitizeText(r,a),s&&(s=C.sanitizeText(s,a));const d=c.records.branches.get(c.records.currBranch),o=c.records.branches.get(r),f=d?c.records.commits.get(d):void 0,h=o?c.records.commits.get(o):void 0;if(f&&h&&f.branch===r)throw new Error(`Cannot merge branch '${r}' into itself.`);if(c.records.currBranch===r){const i=new Error('Incorrect usage of "merge". Cannot merge a branch to itself');throw i.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["branch abc"]},i}if(f===void 0||!f){const i=new Error(`Incorrect usage of "merge". Current branch (${c.records.currBranch})has no commits`);throw i.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["commit"]},i}if(!c.records.branches.has(r)){const i=new Error('Incorrect usage of "merge". Branch to be merged ('+r+") does not exist");throw i.hash={text:`merge ${r}`,token:`merge ${r}`,expected:[`branch ${r}`]},i}if(h===void 0||!h){const i=new Error('Incorrect usage of "merge". Branch to be merged ('+r+") has no commits");throw i.hash={text:`merge ${r}`,token:`merge ${r}`,expected:['"commit"']},i}if(f===h){const i=new Error('Incorrect usage of "merge". Both branches have same head');throw i.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["branch abc"]},i}if(s&&c.records.commits.has(s)){const i=new Error('Incorrect usage of "merge". Commit with id:'+s+" already exists, use different custom id");throw i.hash={text:`merge ${r} ${s} ${n} ${e?.join(" ")}`,token:`merge ${r} ${s} ${n} ${e?.join(" ")}`,expected:[`merge ${r} ${s}_UNIQUE ${n} ${e?.join(" ")}`]},i}const $=o||"",g={id:s||`${c.records.seq}-${A()}`,message:`merged branch ${r} into ${c.records.currBranch}`,seq:c.records.seq++,parents:c.records.head==null?[]:[c.records.head.id,$],branch:c.records.currBranch,type:x.MERGE,customType:n,customId:!!s,tags:e??[]};c.records.head=g,c.records.commits.set(g.id,g),c.records.branches.set(c.records.currBranch,g.id),m.debug(c.records.branches),m.debug("in mergeBranch")},"merge"),pr=l(function(t){let r=t.id,s=t.targetId,n=t.tags,e=t.parent;m.debug("Entering cherryPick:",r,s,n);const a=I();if(r=C.sanitizeText(r,a),s=C.sanitizeText(s,a),n=n?.map(f=>C.sanitizeText(f,a)),e=C.sanitizeText(e,a),!r||!c.records.commits.has(r)){const f=new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');throw f.hash={text:`cherryPick ${r} ${s}`,token:`cherryPick ${r} ${s}`,expected:["cherry-pick abc"]},f}const d=c.records.commits.get(r);if(d===void 0||!d)throw new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');if(e&&!(Array.isArray(d.parents)&&d.parents.includes(e)))throw new Error("Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit.");const o=d.branch;if(d.type===x.MERGE&&!e)throw new Error("Incorrect usage of cherry-pick: If the source commit is a merge commit, an immediate parent commit must be specified.");if(!s||!c.records.commits.has(s)){if(o===c.records.currBranch){const g=new Error('Incorrect usage of "cherryPick". Source commit is already on current branch');throw g.hash={text:`cherryPick ${r} ${s}`,token:`cherryPick ${r} ${s}`,expected:["cherry-pick abc"]},g}const f=c.records.branches.get(c.records.currBranch);if(f===void 0||!f){const g=new Error(`Incorrect usage of "cherry-pick". Current branch (${c.records.currBranch})has no commits`);throw g.hash={text:`cherryPick ${r} ${s}`,token:`cherryPick ${r} ${s}`,expected:["cherry-pick abc"]},g}const h=c.records.commits.get(f);if(h===void 0||!h){const g=new Error(`Incorrect usage of "cherry-pick". Current branch (${c.records.currBranch})has no commits`);throw g.hash={text:`cherryPick ${r} ${s}`,token:`cherryPick ${r} ${s}`,expected:["cherry-pick abc"]},g}const $={id:c.records.seq+"-"+A(),message:`cherry-picked ${d?.message} into ${c.records.currBranch}`,seq:c.records.seq++,parents:c.records.head==null?[]:[c.records.head.id,d.id],branch:c.records.currBranch,type:x.CHERRY_PICK,tags:n?n.filter(Boolean):[`cherry-pick:${d.id}${d.type===x.MERGE?`|parent:${e}`:""}`]};c.records.head=$,c.records.commits.set($.id,$),c.records.branches.set(c.records.currBranch,$.id),m.debug(c.records.branches),m.debug("in cherryPick")}},"cherryPick"),z=l(function(t){if(t=C.sanitizeText(t,I()),c.records.branches.has(t)){c.records.currBranch=t;const r=c.records.branches.get(c.records.currBranch);r===void 0||!r?c.records.head=null:c.records.head=c.records.commits.get(r)??null}else{const r=new Error(`Trying to checkout branch which is not yet created. (Help try using "branch ${t}")`);throw r.hash={text:`checkout ${t}`,token:`checkout ${t}`,expected:[`branch ${t}`]},r}},"checkout");function H(t,r,s){const n=t.indexOf(r);n===-1?t.push(s):t.splice(n,1,s)}l(H,"upsert");function P(t){const r=t.reduce((e,a)=>e.seq>a.seq?e:a,t[0]);let s="";t.forEach(function(e){e===r?s+=" *":s+=" |"});const n=[s,r.id,r.seq];for(const e in c.records.branches)c.records.branches.get(e)===r.id&&n.push(e);if(m.debug(n.join(" ")),r.parents&&r.parents.length==2&&r.parents[0]&&r.parents[1]){const e=c.records.commits.get(r.parents[0]);H(t,r,e),r.parents[1]&&t.push(c.records.commits.get(r.parents[1]))}else{if(r.parents.length==0)return;if(r.parents[0]){const e=c.records.commits.get(r.parents[0]);H(t,r,e)}}t=F(t,e=>e.id),P(t)}l(P,"prettyPrintCommitHistory");var xr=l(function(){m.debug(c.records.commits);const t=N()[0];P([t])},"prettyPrint"),mr=l(function(){c.reset(),sr()},"clear"),br=l(function(){return[...c.records.branchConfig.values()].map((r,s)=>r.order!==null&&r.order!==void 0?r:{...r,order:parseFloat(`0.${s}`)}).sort((r,s)=>(r.order??0)-(s.order??0)).map(({name:r})=>({name:r}))},"getBranchesAsObjArray"),wr=l(function(){return c.records.branches},"getBranches"),vr=l(function(){return c.records.commits},"getCommits"),N=l(function(){const t=[...c.records.commits.values()];return t.forEach(function(r){m.debug(r.id)}),t.sort((r,s)=>r.seq-s.seq),t},"getCommitsArray"),Cr=l(function(){return c.records.currBranch},"getCurrentBranch"),Er=l(function(){return c.records.direction},"getDirection"),Tr=l(function(){return c.records.head},"getHead"),S={commitType:x,getConfig:I,setDirection:lr,setOptions:$r,getOptions:fr,commit:gr,branch:yr,merge:ur,cherryPick:pr,checkout:z,prettyPrint:xr,clear:mr,getBranchesAsObjArray:br,getBranches:wr,getCommits:vr,getCommitsArray:N,getCurrentBranch:Cr,getDirection:Er,getHead:Tr,setAccTitle:Z,getAccTitle:Q,getAccDescription:J,setAccDescription:X,setDiagramTitle:V,getDiagramTitle:U},Br=l((t,r)=>{Y(t,r),t.dir&&r.setDirection(t.dir);for(const s of t.statements)Lr(s,r)},"populate"),Lr=l((t,r)=>{const n={Commit:l(e=>r.commit(kr(e)),"Commit"),Branch:l(e=>r.branch(Mr(e)),"Branch"),Merge:l(e=>r.merge(Ir(e)),"Merge"),Checkout:l(e=>r.checkout(Rr(e)),"Checkout"),CherryPicking:l(e=>r.cherryPick(Gr(e)),"CherryPicking")}[t.$type];n?n(t):m.error(`Unknown statement type: ${t.$type}`)},"parseStatement"),kr=l(t=>({id:t.id,msg:t.message??"",type:t.type!==void 0?x[t.type]:x.NORMAL,tags:t.tags??void 0}),"parseCommit"),Mr=l(t=>({name:t.name,order:t.order??0}),"parseBranch"),Ir=l(t=>({branch:t.branch,id:t.id??"",type:t.type!==void 0?x[t.type]:void 0,tags:t.tags??void 0}),"parseMerge"),Rr=l(t=>t.branch,"parseCheckout"),Gr=l(t=>({id:t.id,targetId:"",tags:t.tags?.length===0?void 0:t.tags,parent:t.parent}),"parseCherryPicking"),Or={parse:l(async t=>{const r=await dr("gitGraph",t);m.debug(r),Br(r,S)},"parse")},qr=rr(),v=qr?.gitGraph,L=10,k=40,E=4,T=2,M=8,b=new Map,w=new Map,O=30,R=new Map,q=[],B=0,u="LR",Ar=l(()=>{b.clear(),w.clear(),R.clear(),B=0,q=[],u="LR"},"clear"),W=l(t=>{const r=document.createElementNS("http://www.w3.org/2000/svg","text");return(typeof t=="string"?t.split(/\\n|\n|/gi):t).forEach(n=>{const e=document.createElementNS("http://www.w3.org/2000/svg","tspan");e.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),e.setAttribute("dy","1em"),e.setAttribute("x","0"),e.setAttribute("class","row"),e.textContent=n.trim(),r.appendChild(e)}),r},"drawText"),j=l(t=>{let r,s,n;return u==="BT"?(s=l((e,a)=>e<=a,"comparisonFunc"),n=1/0):(s=l((e,a)=>e>=a,"comparisonFunc"),n=0),t.forEach(e=>{const a=u==="TB"||u=="BT"?w.get(e)?.y:w.get(e)?.x;a!==void 0&&s(a,n)&&(r=e,n=a)}),r},"findClosestParent"),_r=l(t=>{let r="",s=1/0;return t.forEach(n=>{const e=w.get(n).y;e<=s&&(r=n,s=e)}),r||void 0},"findClosestParentBT"),Hr=l((t,r,s)=>{let n=s,e=s;const a=[];t.forEach(d=>{const o=r.get(d);if(!o)throw new Error(`Commit not found for key ${d}`);o.parents.length?(n=Dr(o),e=Math.max(n,e)):a.push(o),Fr(o,n)}),n=e,a.forEach(d=>{zr(d,n,s)}),t.forEach(d=>{const o=r.get(d);if(o?.parents.length){const f=_r(o.parents);n=w.get(f).y-k,n<=e&&(e=n);const h=b.get(o.branch).pos,$=n-L;w.set(o.id,{x:h,y:$})}})},"setParallelBTPos"),Pr=l(t=>{const r=j(t.parents.filter(n=>n!==null));if(!r)throw new Error(`Closest parent not found for commit ${t.id}`);const s=w.get(r)?.y;if(s===void 0)throw new Error(`Closest parent position not found for commit ${t.id}`);return s},"findClosestParentPos"),Dr=l(t=>Pr(t)+k,"calculateCommitPosition"),Fr=l((t,r)=>{const s=b.get(t.branch);if(!s)throw new Error(`Branch not found for commit ${t.id}`);const n=s.pos,e=r+L;return w.set(t.id,{x:n,y:e}),{x:n,y:e}},"setCommitPosition"),zr=l((t,r,s)=>{const n=b.get(t.branch);if(!n)throw new Error(`Branch not found for commit ${t.id}`);const e=r+s,a=n.pos;w.set(t.id,{x:a,y:e})},"setRootPosition"),Nr=l((t,r,s,n,e,a)=>{if(a===x.HIGHLIGHT)t.append("rect").attr("x",s.x-10).attr("y",s.y-10).attr("width",20).attr("height",20).attr("class",`commit ${r.id} commit-highlight${e%M} ${n}-outer`),t.append("rect").attr("x",s.x-6).attr("y",s.y-6).attr("width",12).attr("height",12).attr("class",`commit ${r.id} commit${e%M} ${n}-inner`);else if(a===x.CHERRY_PICK)t.append("circle").attr("cx",s.x).attr("cy",s.y).attr("r",10).attr("class",`commit ${r.id} ${n}`),t.append("circle").attr("cx",s.x-3).attr("cy",s.y+2).attr("r",2.75).attr("fill","#fff").attr("class",`commit ${r.id} ${n}`),t.append("circle").attr("cx",s.x+3).attr("cy",s.y+2).attr("r",2.75).attr("fill","#fff").attr("class",`commit ${r.id} ${n}`),t.append("line").attr("x1",s.x+3).attr("y1",s.y+1).attr("x2",s.x).attr("y2",s.y-5).attr("stroke","#fff").attr("class",`commit ${r.id} ${n}`),t.append("line").attr("x1",s.x-3).attr("y1",s.y+1).attr("x2",s.x).attr("y2",s.y-5).attr("stroke","#fff").attr("class",`commit ${r.id} ${n}`);else{const d=t.append("circle");if(d.attr("cx",s.x),d.attr("cy",s.y),d.attr("r",r.type===x.MERGE?9:10),d.attr("class",`commit ${r.id} commit${e%M}`),a===x.MERGE){const o=t.append("circle");o.attr("cx",s.x),o.attr("cy",s.y),o.attr("r",6),o.attr("class",`commit ${n} ${r.id} commit${e%M}`)}a===x.REVERSE&&t.append("path").attr("d",`M ${s.x-5},${s.y-5}L${s.x+5},${s.y+5}M${s.x-5},${s.y+5}L${s.x+5},${s.y-5}`).attr("class",`commit ${n} ${r.id} commit${e%M}`)}},"drawCommitBullet"),Sr=l((t,r,s,n)=>{if(r.type!==x.CHERRY_PICK&&(r.customId&&r.type===x.MERGE||r.type!==x.MERGE)&&v?.showCommitLabel){const e=t.append("g"),a=e.insert("rect").attr("class","commit-label-bkg"),d=e.append("text").attr("x",n).attr("y",s.y+25).attr("class","commit-label").text(r.id),o=d.node()?.getBBox();if(o&&(a.attr("x",s.posWithOffset-o.width/2-T).attr("y",s.y+13.5).attr("width",o.width+2*T).attr("height",o.height+2*T),u==="TB"||u==="BT"?(a.attr("x",s.x-(o.width+4*E+5)).attr("y",s.y-12),d.attr("x",s.x-(o.width+4*E)).attr("y",s.y+o.height-12)):d.attr("x",s.posWithOffset-o.width/2),v.rotateCommitLabel))if(u==="TB"||u==="BT")d.attr("transform","rotate(-45, "+s.x+", "+s.y+")"),a.attr("transform","rotate(-45, "+s.x+", "+s.y+")");else{const f=-7.5-(o.width+10)/25*9.5,h=10+o.width/25*8.5;e.attr("transform","translate("+f+", "+h+") rotate(-45, "+n+", "+s.y+")")}}},"drawCommitLabel"),Wr=l((t,r,s,n)=>{if(r.tags.length>0){let e=0,a=0,d=0;const o=[];for(const f of r.tags.reverse()){const h=t.insert("polygon"),$=t.append("circle"),g=t.append("text").attr("y",s.y-16-e).attr("class","tag-label").text(f),i=g.node()?.getBBox();if(!i)throw new Error("Tag bbox not found");a=Math.max(a,i.width),d=Math.max(d,i.height),g.attr("x",s.posWithOffset-i.width/2),o.push({tag:g,hole:$,rect:h,yOffset:e}),e+=20}for(const{tag:f,hole:h,rect:$,yOffset:g}of o){const i=d/2,y=s.y-19.2-g;if($.attr("class","tag-label-bkg").attr("points",` + ${n-a/2-E/2},${y+T} + ${n-a/2-E/2},${y-T} + ${s.posWithOffset-a/2-E},${y-i-T} + ${s.posWithOffset+a/2+E},${y-i-T} + ${s.posWithOffset+a/2+E},${y+i+T} + ${s.posWithOffset-a/2-E},${y+i+T}`),h.attr("cy",y).attr("cx",n-a/2+E/2).attr("r",1.5).attr("class","tag-hole"),u==="TB"||u==="BT"){const p=n+g;$.attr("class","tag-label-bkg").attr("points",` + ${s.x},${p+2} + ${s.x},${p-2} + ${s.x+L},${p-i-2} + ${s.x+L+a+4},${p-i-2} + ${s.x+L+a+4},${p+i+2} + ${s.x+L},${p+i+2}`).attr("transform","translate(12,12) rotate(45, "+s.x+","+n+")"),h.attr("cx",s.x+E/2).attr("cy",p).attr("transform","translate(12,12) rotate(45, "+s.x+","+n+")"),f.attr("x",s.x+5).attr("y",p+3).attr("transform","translate(14,14) rotate(45, "+s.x+","+n+")")}}}},"drawCommitTags"),jr=l(t=>{switch(t.customType??t.type){case x.NORMAL:return"commit-normal";case x.REVERSE:return"commit-reverse";case x.HIGHLIGHT:return"commit-highlight";case x.MERGE:return"commit-merge";case x.CHERRY_PICK:return"commit-cherry-pick";default:return"commit-normal"}},"getCommitClassType"),Yr=l((t,r,s,n)=>{const e={x:0,y:0};if(t.parents.length>0){const a=j(t.parents);if(a){const d=n.get(a)??e;return r==="TB"?d.y+k:r==="BT"?(n.get(t.id)??e).y-k:d.x+k}}else return r==="TB"?O:r==="BT"?(n.get(t.id)??e).y-k:0;return 0},"calculatePosition"),Kr=l((t,r,s)=>{const n=u==="BT"&&s?r:r+L,e=u==="TB"||u==="BT"?n:b.get(t.branch)?.pos,a=u==="TB"||u==="BT"?b.get(t.branch)?.pos:n;if(a===void 0||e===void 0)throw new Error(`Position were undefined for commit ${t.id}`);return{x:a,y:e,posWithOffset:n}},"getCommitPosition"),D=l((t,r,s)=>{if(!v)throw new Error("GitGraph config not found");const n=t.append("g").attr("class","commit-bullets"),e=t.append("g").attr("class","commit-labels");let a=u==="TB"||u==="BT"?O:0;const d=[...r.keys()],o=v?.parallelCommits??!1,f=l(($,g)=>{const i=r.get($)?.seq,y=r.get(g)?.seq;return i!==void 0&&y!==void 0?i-y:0},"sortKeys");let h=d.sort(f);u==="BT"&&(o&&Hr(h,r,a),h=h.reverse()),h.forEach($=>{const g=r.get($);if(!g)throw new Error(`Commit not found for key ${$}`);o&&(a=Yr(g,u,a,w));const i=Kr(g,a,o);if(s){const y=jr(g),p=g.customType??g.type,_=b.get(g.branch)?.index??0;Nr(n,g,i,y,_,p),Sr(e,g,i,a),Wr(e,g,i,a)}u==="TB"||u==="BT"?w.set(g.id,{x:i.x,y:i.posWithOffset}):w.set(g.id,{x:i.posWithOffset,y:i.y}),a=u==="BT"&&o?a+k:a+k+L,a>B&&(B=a)})},"drawCommits"),Ur=l((t,r,s,n,e)=>{const d=(u==="TB"||u==="BT"?s.xh.branch===d,"isOnBranchToGetCurve"),f=l(h=>h.seq>t.seq&&h.seqf(h)&&o(h))},"shouldRerouteArrow"),G=l((t,r,s=0)=>{const n=t+Math.abs(t-r)/2;if(s>5)return n;if(q.every(d=>Math.abs(d-n)>=10))return q.push(n),n;const a=Math.abs(t-r);return G(t,r-a/5,s+1)},"findLane"),Vr=l((t,r,s,n)=>{const e=w.get(r.id),a=w.get(s.id);if(e===void 0||a===void 0)throw new Error(`Commit positions not found for commits ${r.id} and ${s.id}`);const d=Ur(r,s,e,a,n);let o="",f="",h=0,$=0,g=b.get(s.branch)?.index;s.type===x.MERGE&&r.id!==s.parents[0]&&(g=b.get(r.branch)?.index);let i;if(d){o="A 10 10, 0, 0, 0,",f="A 10 10, 0, 0, 1,",h=10,$=10;const y=e.ya.x&&(o="A 20 20, 0, 0, 0,",f="A 20 20, 0, 0, 1,",h=20,$=20,s.type===x.MERGE&&r.id!==s.parents[0]?i=`M ${e.x} ${e.y} L ${e.x} ${a.y-h} ${f} ${e.x-$} ${a.y} L ${a.x} ${a.y}`:i=`M ${e.x} ${e.y} L ${a.x+h} ${e.y} ${o} ${a.x} ${e.y+$} L ${a.x} ${a.y}`),e.x===a.x&&(i=`M ${e.x} ${e.y} L ${a.x} ${a.y}`)):u==="BT"?(e.xa.x&&(o="A 20 20, 0, 0, 0,",f="A 20 20, 0, 0, 1,",h=20,$=20,s.type===x.MERGE&&r.id!==s.parents[0]?i=`M ${e.x} ${e.y} L ${e.x} ${a.y+h} ${o} ${e.x-$} ${a.y} L ${a.x} ${a.y}`:i=`M ${e.x} ${e.y} L ${a.x-h} ${e.y} ${o} ${a.x} ${e.y-$} L ${a.x} ${a.y}`),e.x===a.x&&(i=`M ${e.x} ${e.y} L ${a.x} ${a.y}`)):(e.ya.y&&(s.type===x.MERGE&&r.id!==s.parents[0]?i=`M ${e.x} ${e.y} L ${a.x-h} ${e.y} ${o} ${a.x} ${e.y-$} L ${a.x} ${a.y}`:i=`M ${e.x} ${e.y} L ${e.x} ${a.y+h} ${f} ${e.x+$} ${a.y} L ${a.x} ${a.y}`),e.y===a.y&&(i=`M ${e.x} ${e.y} L ${a.x} ${a.y}`));if(i===void 0)throw new Error("Line definition not found");t.append("path").attr("d",i).attr("class","arrow arrow"+g%M)},"drawArrow"),Xr=l((t,r)=>{const s=t.append("g").attr("class","commit-arrows");[...r.keys()].forEach(n=>{const e=r.get(n);e.parents&&e.parents.length>0&&e.parents.forEach(a=>{Vr(s,r.get(a),e,r)})})},"drawArrows"),Jr=l((t,r)=>{const s=t.append("g");r.forEach((n,e)=>{const a=e%M,d=b.get(n.name)?.pos;if(d===void 0)throw new Error(`Position not found for branch ${n.name}`);const o=s.append("line");o.attr("x1",0),o.attr("y1",d),o.attr("x2",B),o.attr("y2",d),o.attr("class","branch branch"+a),u==="TB"?(o.attr("y1",O),o.attr("x1",d),o.attr("y2",B),o.attr("x2",d)):u==="BT"&&(o.attr("y1",B),o.attr("x1",d),o.attr("y2",O),o.attr("x2",d)),q.push(d);const f=n.name,h=W(f),$=s.insert("rect"),i=s.insert("g").attr("class","branchLabel").insert("g").attr("class","label branch-label"+a);i.node().appendChild(h);const y=h.getBBox();$.attr("class","branchLabelBkg label"+a).attr("rx",4).attr("ry",4).attr("x",-y.width-4-(v?.rotateCommitLabel===!0?30:0)).attr("y",-y.height/2+8).attr("width",y.width+18).attr("height",y.height+4),i.attr("transform","translate("+(-y.width-14-(v?.rotateCommitLabel===!0?30:0))+", "+(d-y.height/2-1)+")"),u==="TB"?($.attr("x",d-y.width/2-10).attr("y",0),i.attr("transform","translate("+(d-y.width/2-5)+", 0)")):u==="BT"?($.attr("x",d-y.width/2-10).attr("y",B),i.attr("transform","translate("+(d-y.width/2-5)+", "+B+")")):$.attr("transform","translate(-19, "+(d-y.height/2)+")")})},"drawBranches"),Qr=l(function(t,r,s,n,e){return b.set(t,{pos:r,index:s}),r+=50+(e?40:0)+(u==="TB"||u==="BT"?n.width/2:0),r},"setBranchPosition"),Zr=l(function(t,r,s,n){if(Ar(),m.debug("in gitgraph renderer",t+` +`,"id:",r,s),!v)throw new Error("GitGraph config not found");const e=v.rotateCommitLabel??!1,a=n.db;R=a.getCommits();const d=a.getBranchesAsObjArray();u=a.getDirection();const o=er(`[id="${r}"]`);let f=0;d.forEach((h,$)=>{const g=W(h.name),i=o.append("g"),y=i.insert("g").attr("class","branchLabel"),p=y.insert("g").attr("class","label branch-label");p.node()?.appendChild(g);const _=g.getBBox();f=Qr(h.name,f,$,_,e),p.remove(),y.remove(),i.remove()}),D(o,R,!1),v.showBranches&&Jr(o,d),Xr(o,R),D(o,R,!0),tr.insertTitle(o,"gitTitleText",v.titleTopMargin??0,a.getDiagramTitle()),ar(void 0,o,v.diagramPadding,v.useMaxWidth)},"draw"),re={draw:Zr},ee=l(t=>` + .commit-id, + .commit-msg, + .branch-label { + fill: lightgrey; + color: lightgrey; + font-family: 'trebuchet ms', verdana, arial, sans-serif; + font-family: var(--mermaid-font-family); + } + ${[0,1,2,3,4,5,6,7].map(r=>` + .branch-label${r} { fill: ${t["gitBranchLabel"+r]}; } + .commit${r} { stroke: ${t["git"+r]}; fill: ${t["git"+r]}; } + .commit-highlight${r} { stroke: ${t["gitInv"+r]}; fill: ${t["gitInv"+r]}; } + .label${r} { fill: ${t["git"+r]}; } + .arrow${r} { stroke: ${t["git"+r]}; } + `).join(` +`)} + + .branch { + stroke-width: 1; + stroke: ${t.lineColor}; + stroke-dasharray: 2; + } + .commit-label { font-size: ${t.commitLabelFontSize}; fill: ${t.commitLabelColor};} + .commit-label-bkg { font-size: ${t.commitLabelFontSize}; fill: ${t.commitLabelBackground}; opacity: 0.5; } + .tag-label { font-size: ${t.tagLabelFontSize}; fill: ${t.tagLabelColor};} + .tag-label-bkg { fill: ${t.tagLabelBackground}; stroke: ${t.tagLabelBorder}; } + .tag-hole { fill: ${t.textColor}; } + + .commit-merge { + stroke: ${t.primaryColor}; + fill: ${t.primaryColor}; + } + .commit-reverse { + stroke: ${t.primaryColor}; + fill: ${t.primaryColor}; + stroke-width: 3; + } + .commit-highlight-outer { + } + .commit-highlight-inner { + stroke: ${t.primaryColor}; + fill: ${t.primaryColor}; + } + + .arrow { stroke-width: 8; stroke-linecap: round; fill: none} + .gitTitleText { + text-anchor: middle; + font-size: 18px; + fill: ${t.textColor}; + } +`,"getStyles"),te=ee,he={parser:Or,db:S,renderer:re,styles:te};export{he as diagram}; diff --git a/_astro/github.CKJQOwnD_1hyVYf.webp b/_astro/github.CKJQOwnD_1hyVYf.webp new file mode 100644 index 00000000..f9354d02 Binary files /dev/null and b/_astro/github.CKJQOwnD_1hyVYf.webp differ diff --git a/_astro/graph.wNZOIPAH.js b/_astro/graph.wNZOIPAH.js new file mode 100644 index 00000000..743be933 --- /dev/null +++ b/_astro/graph.wNZOIPAH.js @@ -0,0 +1 @@ +import{aP as T,aQ as C,aR as z,aS as R,aT as S,aU as k,aV as V,aW as L,aX as K,aY as j,aZ as ee,a_ as te,a$ as re,b0 as se,b1 as ne,b2 as ie,aE as ae,b3 as oe,b4 as ue,b5 as he,b6 as y,b7 as $,b8 as v}from"./mermaid.core.LbQlJBBQ.js";import{k as d,g as Y,s as de,e as ce,f as fe,h as ge,j as le,c as be,l as _e,b as pe,m,n as g,r as ye}from"./_baseUniq.CLojSEzq.js";function me(t,e){return t&&T(e,d(e),t)}function je(t,e){return t&&T(e,C(e),t)}function Te(t,e){return T(t,Y(t),e)}var Oe=Object.getOwnPropertySymbols,W=Oe?function(t){for(var e=[];t;)ce(e,Y(t)),t=z(t);return e}:de;function Ee(t,e){return T(t,W(t),e)}function Ae(t){return fe(t,C,W)}var Ce=Object.prototype,Le=Ce.hasOwnProperty;function we(t){var e=t.length,r=new t.constructor(e);return e&&typeof t[0]=="string"&&Le.call(t,"index")&&(r.index=t.index,r.input=t.input),r}function Ne(t,e){var r=e?R(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.byteLength)}var Pe=/\w*$/;function Fe(t){var e=new t.constructor(t.source,Pe.exec(t));return e.lastIndex=t.lastIndex,e}var I=S?S.prototype:void 0,D=I?I.valueOf:void 0;function Se(t){return D?Object(D.call(t)):{}}var $e="[object Boolean]",ve="[object Date]",Ie="[object Map]",De="[object Number]",Me="[object RegExp]",Ue="[object Set]",Ge="[object String]",xe="[object Symbol]",Be="[object ArrayBuffer]",Re="[object DataView]",Ve="[object Float32Array]",Ke="[object Float64Array]",Ye="[object Int8Array]",We="[object Int16Array]",qe="[object Int32Array]",He="[object Uint8Array]",Qe="[object Uint8ClampedArray]",Xe="[object Uint16Array]",Ze="[object Uint32Array]";function Je(t,e,r){var s=t.constructor;switch(e){case Be:return R(t);case $e:case ve:return new s(+t);case Re:return Ne(t,r);case Ve:case Ke:case Ye:case We:case qe:case He:case Qe:case Xe:case Ze:return k(t,r);case Ie:return new s;case De:case Ge:return new s(t);case Me:return Fe(t);case Ue:return new s;case xe:return Se(t)}}var ze="[object Map]";function ke(t){return V(t)&&L(t)==ze}var M=j&&j.isMap,et=M?K(M):ke,tt="[object Set]";function rt(t){return V(t)&&L(t)==tt}var U=j&&j.isSet,st=U?K(U):rt,nt=1,it=2,at=4,q="[object Arguments]",ot="[object Array]",ut="[object Boolean]",ht="[object Date]",dt="[object Error]",H="[object Function]",ct="[object GeneratorFunction]",ft="[object Map]",gt="[object Number]",Q="[object Object]",lt="[object RegExp]",bt="[object Set]",_t="[object String]",pt="[object Symbol]",yt="[object WeakMap]",mt="[object ArrayBuffer]",jt="[object DataView]",Tt="[object Float32Array]",Ot="[object Float64Array]",Et="[object Int8Array]",At="[object Int16Array]",Ct="[object Int32Array]",Lt="[object Uint8Array]",wt="[object Uint8ClampedArray]",Nt="[object Uint16Array]",Pt="[object Uint32Array]",o={};o[q]=o[ot]=o[mt]=o[jt]=o[ut]=o[ht]=o[Tt]=o[Ot]=o[Et]=o[At]=o[Ct]=o[ft]=o[gt]=o[Q]=o[lt]=o[bt]=o[_t]=o[pt]=o[Lt]=o[wt]=o[Nt]=o[Pt]=!0;o[dt]=o[H]=o[yt]=!1;function O(t,e,r,s,n,a){var i,u=e&nt,h=e&it,Z=e&at;if(i!==void 0)return i;if(!ee(t))return t;var w=ae(t);if(w){if(i=we(t),!u)return te(t,i)}else{var b=L(t),N=b==H||b==ct;if(re(t))return se(t,u);if(b==Q||b==q||N&&!n){if(i=h||N?{}:ne(t),!u)return h?Ee(t,je(i,t)):Te(t,me(i,t))}else{if(!o[b])return n?t:{};i=Je(t,b,u)}}a||(a=new ie);var P=a.get(t);if(P)return P;a.set(t,i),st(t)?t.forEach(function(c){i.add(O(c,e,r,c,t,a))}):et(t)&&t.forEach(function(c,f){i.set(f,O(c,e,r,f,t,a))});var J=Z?h?Ae:ge:h?C:d,F=w?void 0:J(t);return le(F||t,function(c,f){F&&(f=c,c=t[f]),oe(i,f,O(c,e,r,f,t,a))}),i}function Ft(t,e){return be(e,function(r){return t[r]})}function E(t){return t==null?[]:Ft(t,d(t))}function _(t){return t===void 0}var St=ue(function(t){return _e(pe(t,1,he,!0))}),$t="\0",l="\0",G="";class X{constructor(e={}){this._isDirected=Object.prototype.hasOwnProperty.call(e,"directed")?e.directed:!0,this._isMultigraph=Object.prototype.hasOwnProperty.call(e,"multigraph")?e.multigraph:!1,this._isCompound=Object.prototype.hasOwnProperty.call(e,"compound")?e.compound:!1,this._label=void 0,this._defaultNodeLabelFn=y(void 0),this._defaultEdgeLabelFn=y(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[l]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}isDirected(){return this._isDirected}isMultigraph(){return this._isMultigraph}isCompound(){return this._isCompound}setGraph(e){return this._label=e,this}graph(){return this._label}setDefaultNodeLabel(e){return $(e)||(e=y(e)),this._defaultNodeLabelFn=e,this}nodeCount(){return this._nodeCount}nodes(){return d(this._nodes)}sources(){var e=this;return m(this.nodes(),function(r){return v(e._in[r])})}sinks(){var e=this;return m(this.nodes(),function(r){return v(e._out[r])})}setNodes(e,r){var s=arguments,n=this;return g(e,function(a){s.length>1?n.setNode(a,r):n.setNode(a)}),this}setNode(e,r){return Object.prototype.hasOwnProperty.call(this._nodes,e)?(arguments.length>1&&(this._nodes[e]=r),this):(this._nodes[e]=arguments.length>1?r:this._defaultNodeLabelFn(e),this._isCompound&&(this._parent[e]=l,this._children[e]={},this._children[l][e]=!0),this._in[e]={},this._preds[e]={},this._out[e]={},this._sucs[e]={},++this._nodeCount,this)}node(e){return this._nodes[e]}hasNode(e){return Object.prototype.hasOwnProperty.call(this._nodes,e)}removeNode(e){if(Object.prototype.hasOwnProperty.call(this._nodes,e)){var r=s=>this.removeEdge(this._edgeObjs[s]);delete this._nodes[e],this._isCompound&&(this._removeFromParentsChildList(e),delete this._parent[e],g(this.children(e),s=>{this.setParent(s)}),delete this._children[e]),g(d(this._in[e]),r),delete this._in[e],delete this._preds[e],g(d(this._out[e]),r),delete this._out[e],delete this._sucs[e],--this._nodeCount}return this}setParent(e,r){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(_(r))r=l;else{r+="";for(var s=r;!_(s);s=this.parent(s))if(s===e)throw new Error("Setting "+r+" as parent of "+e+" would create a cycle");this.setNode(r)}return this.setNode(e),this._removeFromParentsChildList(e),this._parent[e]=r,this._children[r][e]=!0,this}_removeFromParentsChildList(e){delete this._children[this._parent[e]][e]}parent(e){if(this._isCompound){var r=this._parent[e];if(r!==l)return r}}children(e){if(_(e)&&(e=l),this._isCompound){var r=this._children[e];if(r)return d(r)}else{if(e===l)return this.nodes();if(this.hasNode(e))return[]}}predecessors(e){var r=this._preds[e];if(r)return d(r)}successors(e){var r=this._sucs[e];if(r)return d(r)}neighbors(e){var r=this.predecessors(e);if(r)return St(r,this.successors(e))}isLeaf(e){var r;return this.isDirected()?r=this.successors(e):r=this.neighbors(e),r.length===0}filterNodes(e){var r=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});r.setGraph(this.graph());var s=this;g(this._nodes,function(i,u){e(u)&&r.setNode(u,i)}),g(this._edgeObjs,function(i){r.hasNode(i.v)&&r.hasNode(i.w)&&r.setEdge(i,s.edge(i))});var n={};function a(i){var u=s.parent(i);return u===void 0||r.hasNode(u)?(n[i]=u,u):u in n?n[u]:a(u)}return this._isCompound&&g(r.nodes(),function(i){r.setParent(i,a(i))}),r}setDefaultEdgeLabel(e){return $(e)||(e=y(e)),this._defaultEdgeLabelFn=e,this}edgeCount(){return this._edgeCount}edges(){return E(this._edgeObjs)}setPath(e,r){var s=this,n=arguments;return ye(e,function(a,i){return n.length>1?s.setEdge(a,i,r):s.setEdge(a,i),i}),this}setEdge(){var e,r,s,n,a=!1,i=arguments[0];typeof i=="object"&&i!==null&&"v"in i?(e=i.v,r=i.w,s=i.name,arguments.length===2&&(n=arguments[1],a=!0)):(e=i,r=arguments[1],s=arguments[3],arguments.length>2&&(n=arguments[2],a=!0)),e=""+e,r=""+r,_(s)||(s=""+s);var u=p(this._isDirected,e,r,s);if(Object.prototype.hasOwnProperty.call(this._edgeLabels,u))return a&&(this._edgeLabels[u]=n),this;if(!_(s)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(e),this.setNode(r),this._edgeLabels[u]=a?n:this._defaultEdgeLabelFn(e,r,s);var h=vt(this._isDirected,e,r,s);return e=h.v,r=h.w,Object.freeze(h),this._edgeObjs[u]=h,x(this._preds[r],e),x(this._sucs[e],r),this._in[r][u]=h,this._out[e][u]=h,this._edgeCount++,this}edge(e,r,s){var n=arguments.length===1?A(this._isDirected,arguments[0]):p(this._isDirected,e,r,s);return this._edgeLabels[n]}hasEdge(e,r,s){var n=arguments.length===1?A(this._isDirected,arguments[0]):p(this._isDirected,e,r,s);return Object.prototype.hasOwnProperty.call(this._edgeLabels,n)}removeEdge(e,r,s){var n=arguments.length===1?A(this._isDirected,arguments[0]):p(this._isDirected,e,r,s),a=this._edgeObjs[n];return a&&(e=a.v,r=a.w,delete this._edgeLabels[n],delete this._edgeObjs[n],B(this._preds[r],e),B(this._sucs[e],r),delete this._in[r][n],delete this._out[e][n],this._edgeCount--),this}inEdges(e,r){var s=this._in[e];if(s){var n=E(s);return r?m(n,function(a){return a.v===r}):n}}outEdges(e,r){var s=this._out[e];if(s){var n=E(s);return r?m(n,function(a){return a.w===r}):n}}nodeEdges(e,r){var s=this.inEdges(e,r);if(s)return s.concat(this.outEdges(e,r))}}X.prototype._nodeCount=0;X.prototype._edgeCount=0;function x(t,e){t[e]?t[e]++:t[e]=1}function B(t,e){--t[e]||delete t[e]}function p(t,e,r,s){var n=""+e,a=""+r;if(!t&&n>a){var i=n;n=a,a=i}return n+G+a+G+(_(s)?$t:s)}function vt(t,e,r,s){var n=""+e,a=""+r;if(!t&&n>a){var i=n;n=a,a=i}var u={v:n,w:a};return s&&(u.name=s),u}function A(t,e){return p(t,e.v,e.w,e.name)}export{X as G,O as b,_ as i,E as v}; diff --git a/_astro/infoDiagram-WHAUD3N6.DII4lMba.js b/_astro/infoDiagram-WHAUD3N6.DII4lMba.js new file mode 100644 index 00000000..032a9c92 --- /dev/null +++ b/_astro/infoDiagram-WHAUD3N6.DII4lMba.js @@ -0,0 +1,2 @@ +import{_ as e,l as s,H as n,e as i,I as p}from"./mermaid.core.LbQlJBBQ.js";import{p as g}from"./treemap-KMMF4GRG.BHoxrBMR.js";import"./page._rMDHl_T.js";import"./min.D5TVP8RA.js";import"./_baseUniq.CLojSEzq.js";var v={parse:e(async r=>{const a=await g("info",r);s.debug(a)},"parse")},d={version:p.version+""},m=e(()=>d.version,"getVersion"),c={getVersion:m},l=e((r,a,o)=>{s.debug(`rendering info diagram +`+r);const t=n(a);i(t,100,400,!0),t.append("g").append("text").attr("x",100).attr("y",40).attr("class","version").attr("font-size",32).style("text-anchor","middle").text(`v${o}`)},"draw"),f={draw:l},S={parser:v,db:c,renderer:f};export{S as diagram}; diff --git a/_astro/init.Gi6I4Gst.js b/_astro/init.Gi6I4Gst.js new file mode 100644 index 00000000..d44de941 --- /dev/null +++ b/_astro/init.Gi6I4Gst.js @@ -0,0 +1 @@ +function t(e,a){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(a).domain(e);break}return this}export{t as i}; diff --git a/_astro/journeyDiagram-XKPGCS4Q.DFKcAErE.js b/_astro/journeyDiagram-XKPGCS4Q.DFKcAErE.js new file mode 100644 index 00000000..07130f71 --- /dev/null +++ b/_astro/journeyDiagram-XKPGCS4Q.DFKcAErE.js @@ -0,0 +1,139 @@ +import{a as gt,g as lt,f as mt,d as xt}from"./chunk-TZMSLE5B.t1iciHUx.js";import{g as kt}from"./chunk-FMBD7UC4.Tjciooq0.js";import{_ as n,g as _t,s as vt,a as bt,b as wt,q as Tt,p as St,c as R,d as X,e as $t,y as Mt}from"./mermaid.core.LbQlJBBQ.js";import{d as et}from"./arc.DI4loXX0.js";import"./page._rMDHl_T.js";var U=(function(){var t=n(function(h,i,a,l){for(a=a||{},l=h.length;l--;a[h[l]]=i);return a},"o"),e=[6,8,10,11,12,14,16,17,18],s=[1,9],c=[1,10],r=[1,11],f=[1,12],u=[1,13],y=[1,14],g={trace:n(function(){},"trace"),yy:{},symbols_:{error:2,start:3,journey:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,title:11,acc_title:12,acc_title_value:13,acc_descr:14,acc_descr_value:15,acc_descr_multiline_value:16,section:17,taskName:18,taskData:19,$accept:0,$end:1},terminals_:{2:"error",4:"journey",6:"EOF",8:"SPACE",10:"NEWLINE",11:"title",12:"acc_title",13:"acc_title_value",14:"acc_descr",15:"acc_descr_value",16:"acc_descr_multiline_value",17:"section",18:"taskName",19:"taskData"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,2]],performAction:n(function(i,a,l,d,p,o,b){var k=o.length-1;switch(p){case 1:return o[k-1];case 2:this.$=[];break;case 3:o[k-1].push(o[k]),this.$=o[k-1];break;case 4:case 5:this.$=o[k];break;case 6:case 7:this.$=[];break;case 8:d.setDiagramTitle(o[k].substr(6)),this.$=o[k].substr(6);break;case 9:this.$=o[k].trim(),d.setAccTitle(this.$);break;case 10:case 11:this.$=o[k].trim(),d.setAccDescription(this.$);break;case 12:d.addSection(o[k].substr(8)),this.$=o[k].substr(8);break;case 13:d.addTask(o[k-1],o[k]),this.$="task";break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:s,12:c,14:r,16:f,17:u,18:y},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:15,11:s,12:c,14:r,16:f,17:u,18:y},t(e,[2,5]),t(e,[2,6]),t(e,[2,8]),{13:[1,16]},{15:[1,17]},t(e,[2,11]),t(e,[2,12]),{19:[1,18]},t(e,[2,4]),t(e,[2,9]),t(e,[2,10]),t(e,[2,13])],defaultActions:{},parseError:n(function(i,a){if(a.recoverable)this.trace(i);else{var l=new Error(i);throw l.hash=a,l}},"parseError"),parse:n(function(i){var a=this,l=[0],d=[],p=[null],o=[],b=this.table,k="",C=0,K=0,dt=2,Q=1,yt=o.slice.call(arguments,1),_=Object.create(this.lexer),I={yy:{}};for(var O in this.yy)Object.prototype.hasOwnProperty.call(this.yy,O)&&(I.yy[O]=this.yy[O]);_.setInput(i,I.yy),I.yy.lexer=_,I.yy.parser=this,typeof _.yylloc>"u"&&(_.yylloc={});var Y=_.yylloc;o.push(Y);var ft=_.options&&_.options.ranges;typeof I.yy.parseError=="function"?this.parseError=I.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function pt(w){l.length=l.length-2*w,p.length=p.length-w,o.length=o.length-w}n(pt,"popStack");function D(){var w;return w=d.pop()||_.lex()||Q,typeof w!="number"&&(w instanceof Array&&(d=w,w=d.pop()),w=a.symbols_[w]||w),w}n(D,"lex");for(var v,A,T,q,F={},N,M,tt,z;;){if(A=l[l.length-1],this.defaultActions[A]?T=this.defaultActions[A]:((v===null||typeof v>"u")&&(v=D()),T=b[A]&&b[A][v]),typeof T>"u"||!T.length||!T[0]){var H="";z=[];for(N in b[A])this.terminals_[N]&&N>dt&&z.push("'"+this.terminals_[N]+"'");_.showPosition?H="Parse error on line "+(C+1)+`: +`+_.showPosition()+` +Expecting `+z.join(", ")+", got '"+(this.terminals_[v]||v)+"'":H="Parse error on line "+(C+1)+": Unexpected "+(v==Q?"end of input":"'"+(this.terminals_[v]||v)+"'"),this.parseError(H,{text:_.match,token:this.terminals_[v]||v,line:_.yylineno,loc:Y,expected:z})}if(T[0]instanceof Array&&T.length>1)throw new Error("Parse Error: multiple actions possible at state: "+A+", token: "+v);switch(T[0]){case 1:l.push(v),p.push(_.yytext),o.push(_.yylloc),l.push(T[1]),v=null,K=_.yyleng,k=_.yytext,C=_.yylineno,Y=_.yylloc;break;case 2:if(M=this.productions_[T[1]][1],F.$=p[p.length-M],F._$={first_line:o[o.length-(M||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(M||1)].first_column,last_column:o[o.length-1].last_column},ft&&(F._$.range=[o[o.length-(M||1)].range[0],o[o.length-1].range[1]]),q=this.performAction.apply(F,[k,K,C,I.yy,T[1],p,o].concat(yt)),typeof q<"u")return q;M&&(l=l.slice(0,-1*M*2),p=p.slice(0,-1*M),o=o.slice(0,-1*M)),l.push(this.productions_[T[1]][0]),p.push(F.$),o.push(F._$),tt=b[l[l.length-2]][l[l.length-1]],l.push(tt);break;case 3:return!0}}return!0},"parse")},m=(function(){var h={EOF:1,parseError:n(function(a,l){if(this.yy.parser)this.yy.parser.parseError(a,l);else throw new Error(a)},"parseError"),setInput:n(function(i,a){return this.yy=a||this.yy||{},this._input=i,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:n(function(){var i=this._input[0];this.yytext+=i,this.yyleng++,this.offset++,this.match+=i,this.matched+=i;var a=i.match(/(?:\r\n?|\n).*/g);return a?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),i},"input"),unput:n(function(i){var a=i.length,l=i.split(/(?:\r\n?|\n)/g);this._input=i+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-a),this.offset-=a;var d=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),l.length-1&&(this.yylineno-=l.length-1);var p=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:l?(l.length===d.length?this.yylloc.first_column:0)+d[d.length-l.length].length-l[0].length:this.yylloc.first_column-a},this.options.ranges&&(this.yylloc.range=[p[0],p[0]+this.yyleng-a]),this.yyleng=this.yytext.length,this},"unput"),more:n(function(){return this._more=!0,this},"more"),reject:n(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:n(function(i){this.unput(this.match.slice(i))},"less"),pastInput:n(function(){var i=this.matched.substr(0,this.matched.length-this.match.length);return(i.length>20?"...":"")+i.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:n(function(){var i=this.match;return i.length<20&&(i+=this._input.substr(0,20-i.length)),(i.substr(0,20)+(i.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:n(function(){var i=this.pastInput(),a=new Array(i.length+1).join("-");return i+this.upcomingInput()+` +`+a+"^"},"showPosition"),test_match:n(function(i,a){var l,d,p;if(this.options.backtrack_lexer&&(p={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&&(p.yylloc.range=this.yylloc.range.slice(0))),d=i[0].match(/(?:\r\n?|\n).*/g),d&&(this.yylineno+=d.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:d?d[d.length-1].length-d[d.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+i[0].length},this.yytext+=i[0],this.match+=i[0],this.matches=i,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(i[0].length),this.matched+=i[0],l=this.performAction.call(this,this.yy,this,a,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),l)return l;if(this._backtrack){for(var o in p)this[o]=p[o];return!1}return!1},"test_match"),next:n(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var i,a,l,d;this._more||(this.yytext="",this.match="");for(var p=this._currentRules(),o=0;oa[0].length)){if(a=l,d=o,this.options.backtrack_lexer){if(i=this.test_match(l,p[o]),i!==!1)return i;if(this._backtrack){a=!1;continue}else return!1}else if(!this.options.flex)break}return a?(i=this.test_match(a,p[d]),i!==!1?i:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:n(function(){var a=this.next();return a||this.lex()},"lex"),begin:n(function(a){this.conditionStack.push(a)},"begin"),popState:n(function(){var a=this.conditionStack.length-1;return a>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:n(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:n(function(a){return a=this.conditionStack.length-1-Math.abs(a||0),a>=0?this.conditionStack[a]:"INITIAL"},"topState"),pushState:n(function(a){this.begin(a)},"pushState"),stateStackSize:n(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:n(function(a,l,d,p){switch(d){case 0:break;case 1:break;case 2:return 10;case 3:break;case 4:break;case 5:return 4;case 6:return 11;case 7:return this.begin("acc_title"),12;case 8:return this.popState(),"acc_title_value";case 9:return this.begin("acc_descr"),14;case 10:return this.popState(),"acc_descr_value";case 11:this.begin("acc_descr_multiline");break;case 12:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:return 17;case 15:return 18;case 16:return 19;case 17:return":";case 18:return 6;case 19:return"INVALID"}},"anonymous"),rules:[/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:journey\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:section\s[^#:\n;]+)/i,/^(?:[^#:\n;]+)/i,/^(?::[^#\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,9,11,14,15,16,17,18,19],inclusive:!0}}};return h})();g.lexer=m;function x(){this.yy={}}return n(x,"Parser"),x.prototype=g,g.Parser=x,new x})();U.parser=U;var Et=U,V="",Z=[],L=[],B=[],Ct=n(function(){Z.length=0,L.length=0,V="",B.length=0,Mt()},"clear"),Pt=n(function(t){V=t,Z.push(t)},"addSection"),It=n(function(){return Z},"getSections"),At=n(function(){let t=it();const e=100;let s=0;for(;!t&&s{s.people&&t.push(...s.people)}),[...new Set(t)].sort()},"updateActors"),Vt=n(function(t,e){const s=e.substr(1).split(":");let c=0,r=[];s.length===1?(c=Number(s[0]),r=[]):(c=Number(s[0]),r=s[1].split(","));const f=r.map(y=>y.trim()),u={section:V,type:V,people:f,task:t,score:c};B.push(u)},"addTask"),Rt=n(function(t){const e={section:V,type:V,description:t,task:t,classes:[]};L.push(e)},"addTaskOrg"),it=n(function(){const t=n(function(s){return B[s].processed},"compileTask");let e=!0;for(const[s,c]of B.entries())t(s),e=e&&c.processed;return e},"compileTasks"),Lt=n(function(){return Ft()},"getActors"),rt={getConfig:n(()=>R().journey,"getConfig"),clear:Ct,setDiagramTitle:St,getDiagramTitle:Tt,setAccTitle:wt,getAccTitle:bt,setAccDescription:vt,getAccDescription:_t,addSection:Pt,getSections:It,getTasks:At,addTask:Vt,addTaskOrg:Rt,getActors:Lt},Bt=n(t=>`.label { + font-family: ${t.fontFamily}; + color: ${t.textColor}; + } + .mouth { + stroke: #666; + } + + line { + stroke: ${t.textColor} + } + + .legend { + fill: ${t.textColor}; + font-family: ${t.fontFamily}; + } + + .label text { + fill: #333; + } + .label { + color: ${t.textColor} + } + + .face { + ${t.faceColor?`fill: ${t.faceColor}`:"fill: #FFF8DC"}; + stroke: #999; + } + + .node rect, + .node circle, + .node ellipse, + .node polygon, + .node path { + fill: ${t.mainBkg}; + stroke: ${t.nodeBorder}; + stroke-width: 1px; + } + + .node .label { + text-align: center; + } + .node.clickable { + cursor: pointer; + } + + .arrowheadPath { + fill: ${t.arrowheadColor}; + } + + .edgePath .path { + stroke: ${t.lineColor}; + stroke-width: 1.5px; + } + + .flowchart-link { + stroke: ${t.lineColor}; + fill: none; + } + + .edgeLabel { + background-color: ${t.edgeLabelBackground}; + rect { + opacity: 0.5; + } + text-align: center; + } + + .cluster rect { + } + + .cluster text { + fill: ${t.titleColor}; + } + + div.mermaidTooltip { + position: absolute; + text-align: center; + max-width: 200px; + padding: 2px; + font-family: ${t.fontFamily}; + font-size: 12px; + background: ${t.tertiaryColor}; + border: 1px solid ${t.border2}; + border-radius: 2px; + pointer-events: none; + z-index: 100; + } + + .task-type-0, .section-type-0 { + ${t.fillType0?`fill: ${t.fillType0}`:""}; + } + .task-type-1, .section-type-1 { + ${t.fillType0?`fill: ${t.fillType1}`:""}; + } + .task-type-2, .section-type-2 { + ${t.fillType0?`fill: ${t.fillType2}`:""}; + } + .task-type-3, .section-type-3 { + ${t.fillType0?`fill: ${t.fillType3}`:""}; + } + .task-type-4, .section-type-4 { + ${t.fillType0?`fill: ${t.fillType4}`:""}; + } + .task-type-5, .section-type-5 { + ${t.fillType0?`fill: ${t.fillType5}`:""}; + } + .task-type-6, .section-type-6 { + ${t.fillType0?`fill: ${t.fillType6}`:""}; + } + .task-type-7, .section-type-7 { + ${t.fillType0?`fill: ${t.fillType7}`:""}; + } + + .actor-0 { + ${t.actor0?`fill: ${t.actor0}`:""}; + } + .actor-1 { + ${t.actor1?`fill: ${t.actor1}`:""}; + } + .actor-2 { + ${t.actor2?`fill: ${t.actor2}`:""}; + } + .actor-3 { + ${t.actor3?`fill: ${t.actor3}`:""}; + } + .actor-4 { + ${t.actor4?`fill: ${t.actor4}`:""}; + } + .actor-5 { + ${t.actor5?`fill: ${t.actor5}`:""}; + } + ${kt()} +`,"getStyles"),jt=Bt,J=n(function(t,e){return xt(t,e)},"drawRect"),Nt=n(function(t,e){const c=t.append("circle").attr("cx",e.cx).attr("cy",e.cy).attr("class","face").attr("r",15).attr("stroke-width",2).attr("overflow","visible"),r=t.append("g");r.append("circle").attr("cx",e.cx-15/3).attr("cy",e.cy-15/3).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),r.append("circle").attr("cx",e.cx+15/3).attr("cy",e.cy-15/3).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666");function f(g){const m=et().startAngle(Math.PI/2).endAngle(3*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);g.append("path").attr("class","mouth").attr("d",m).attr("transform","translate("+e.cx+","+(e.cy+2)+")")}n(f,"smile");function u(g){const m=et().startAngle(3*Math.PI/2).endAngle(5*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);g.append("path").attr("class","mouth").attr("d",m).attr("transform","translate("+e.cx+","+(e.cy+7)+")")}n(u,"sad");function y(g){g.append("line").attr("class","mouth").attr("stroke",2).attr("x1",e.cx-5).attr("y1",e.cy+7).attr("x2",e.cx+5).attr("y2",e.cy+7).attr("class","mouth").attr("stroke-width","1px").attr("stroke","#666")}return n(y,"ambivalent"),e.score>3?f(r):e.score<3?u(r):y(r),c},"drawFace"),ot=n(function(t,e){const s=t.append("circle");return s.attr("cx",e.cx),s.attr("cy",e.cy),s.attr("class","actor-"+e.pos),s.attr("fill",e.fill),s.attr("stroke",e.stroke),s.attr("r",e.r),s.class!==void 0&&s.attr("class",s.class),e.title!==void 0&&s.append("title").text(e.title),s},"drawCircle"),ct=n(function(t,e){return mt(t,e)},"drawText"),zt=n(function(t,e){function s(r,f,u,y,g){return r+","+f+" "+(r+u)+","+f+" "+(r+u)+","+(f+y-g)+" "+(r+u-g*1.2)+","+(f+y)+" "+r+","+(f+y)}n(s,"genPoints");const c=t.append("polygon");c.attr("points",s(e.x,e.y,50,20,7)),c.attr("class","labelBox"),e.y=e.y+e.labelMargin,e.x=e.x+.5*e.labelMargin,ct(t,e)},"drawLabel"),Wt=n(function(t,e,s){const c=t.append("g"),r=lt();r.x=e.x,r.y=e.y,r.fill=e.fill,r.width=s.width*e.taskCount+s.diagramMarginX*(e.taskCount-1),r.height=s.height,r.class="journey-section section-type-"+e.num,r.rx=3,r.ry=3,J(c,r),ht(s)(e.text,c,r.x,r.y,r.width,r.height,{class:"journey-section section-type-"+e.num},s,e.colour)},"drawSection"),nt=-1,Ot=n(function(t,e,s){const c=e.x+s.width/2,r=t.append("g");nt++,r.append("line").attr("id","task"+nt).attr("x1",c).attr("y1",e.y).attr("x2",c).attr("y2",450).attr("class","task-line").attr("stroke-width","1px").attr("stroke-dasharray","4 2").attr("stroke","#666"),Nt(r,{cx:c,cy:300+(5-e.score)*30,score:e.score});const u=lt();u.x=e.x,u.y=e.y,u.fill=e.fill,u.width=s.width,u.height=s.height,u.class="task task-type-"+e.num,u.rx=3,u.ry=3,J(r,u);let y=e.x+14;e.people.forEach(g=>{const m=e.actors[g].color,x={cx:y,cy:e.y,r:7,fill:m,stroke:"#000",title:g,pos:e.actors[g].position};ot(r,x),y+=10}),ht(s)(e.task,r,u.x,u.y,u.width,u.height,{class:"task"},s,e.colour)},"drawTask"),Yt=n(function(t,e){gt(t,e)},"drawBackgroundRect"),ht=(function(){function t(r,f,u,y,g,m,x,h){const i=f.append("text").attr("x",u+g/2).attr("y",y+m/2+5).style("font-color",h).style("text-anchor","middle").text(r);c(i,x)}n(t,"byText");function e(r,f,u,y,g,m,x,h,i){const{taskFontSize:a,taskFontFamily:l}=h,d=r.split(//gi);for(let p=0;p{const f=E[r].color,u={cx:20,cy:c,r:7,fill:f,stroke:"#000",pos:E[r].position};j.drawCircle(t,u);let y=t.append("text").attr("visibility","hidden").text(r);const g=y.node().getBoundingClientRect().width;y.remove();let m=[];if(g<=s)m=[r];else{const x=r.split(" ");let h="";y=t.append("text").attr("visibility","hidden"),x.forEach(i=>{const a=h?`${h} ${i}`:i;if(y.text(a),y.node().getBoundingClientRect().width>s){if(h&&m.push(h),h=i,y.text(i),y.node().getBoundingClientRect().width>s){let d="";for(const p of i)d+=p,y.text(d+"-"),y.node().getBoundingClientRect().width>s&&(m.push(d.slice(0,-1)+"-"),d=p);h=d}}else h=a}),h&&m.push(h),y.remove()}m.forEach((x,h)=>{const i={x:40,y:c+7+h*20,fill:"#666",text:x,textMargin:e.boxTextMargin??5},l=j.drawText(t,i).node().getBoundingClientRect().width;l>W&&l>e.leftMargin-l&&(W=l)}),c+=Math.max(20,m.length*20)})}n(ut,"drawActorLegend");var $=R().journey,P=0,Xt=n(function(t,e,s,c){const r=R(),f=r.journey.titleColor,u=r.journey.titleFontSize,y=r.journey.titleFontFamily,g=r.securityLevel;let m;g==="sandbox"&&(m=X("#i"+e));const x=g==="sandbox"?X(m.nodes()[0].contentDocument.body):X("body");S.init();const h=x.select("#"+e);j.initGraphics(h);const i=c.db.getTasks(),a=c.db.getDiagramTitle(),l=c.db.getActors();for(const C in E)delete E[C];let d=0;l.forEach(C=>{E[C]={color:$.actorColours[d%$.actorColours.length],position:d},d++}),ut(h),P=$.leftMargin+W,S.insert(0,0,P,Object.keys(E).length*50),Gt(h,i,0);const p=S.getBounds();a&&h.append("text").text(a).attr("x",P).attr("font-size",u).attr("font-weight","bold").attr("y",25).attr("fill",f).attr("font-family",y);const o=p.stopy-p.starty+2*$.diagramMarginY,b=P+p.stopx+2*$.diagramMarginX;$t(h,o,b,$.useMaxWidth),h.append("line").attr("x1",P).attr("y1",$.height*4).attr("x2",b-P-4).attr("y2",$.height*4).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#arrowhead)");const k=a?70:0;h.attr("viewBox",`${p.startx} -25 ${b} ${o+k}`),h.attr("preserveAspectRatio","xMinYMin meet"),h.attr("height",o+k+25)},"draw"),S={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],init:n(function(){this.sequenceItems=[],this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},this.verticalPos=0},"init"),updateVal:n(function(t,e,s,c){t[e]===void 0?t[e]=s:t[e]=c(s,t[e])},"updateVal"),updateBounds:n(function(t,e,s,c){const r=R().journey,f=this;let u=0;function y(g){return n(function(x){u++;const h=f.sequenceItems.length-u+1;f.updateVal(x,"starty",e-h*r.boxMargin,Math.min),f.updateVal(x,"stopy",c+h*r.boxMargin,Math.max),f.updateVal(S.data,"startx",t-h*r.boxMargin,Math.min),f.updateVal(S.data,"stopx",s+h*r.boxMargin,Math.max),g!=="activation"&&(f.updateVal(x,"startx",t-h*r.boxMargin,Math.min),f.updateVal(x,"stopx",s+h*r.boxMargin,Math.max),f.updateVal(S.data,"starty",e-h*r.boxMargin,Math.min),f.updateVal(S.data,"stopy",c+h*r.boxMargin,Math.max))},"updateItemBounds")}n(y,"updateFn"),this.sequenceItems.forEach(y())},"updateBounds"),insert:n(function(t,e,s,c){const r=Math.min(t,s),f=Math.max(t,s),u=Math.min(e,c),y=Math.max(e,c);this.updateVal(S.data,"startx",r,Math.min),this.updateVal(S.data,"starty",u,Math.min),this.updateVal(S.data,"stopx",f,Math.max),this.updateVal(S.data,"stopy",y,Math.max),this.updateBounds(r,u,f,y)},"insert"),bumpVerticalPos:n(function(t){this.verticalPos=this.verticalPos+t,this.data.stopy=this.verticalPos},"bumpVerticalPos"),getVerticalPos:n(function(){return this.verticalPos},"getVerticalPos"),getBounds:n(function(){return this.data},"getBounds")},G=$.sectionFills,st=$.sectionColours,Gt=n(function(t,e,s){const c=R().journey;let r="";const f=c.height*2+c.diagramMarginY,u=s+f;let y=0,g="#CCC",m="black",x=0;for(const[h,i]of e.entries()){if(r!==i.section){g=G[y%G.length],x=y%G.length,m=st[y%st.length];let l=0;const d=i.section;for(let o=h;o(E[d]&&(l[d]=E[d]),l),{});i.x=h*c.taskMargin+h*c.width+P,i.y=u,i.width=c.diagramMarginX,i.height=c.diagramMarginY,i.colour=m,i.fill=g,i.num=x,i.actors=a,j.drawTask(t,i,c),S.insert(i.x,i.y,i.x+i.width+c.taskMargin,450)}},"drawTasks"),at={setConf:Ht,draw:Xt},Dt={parser:Et,db:rt,renderer:at,styles:jt,init:n(t=>{at.setConf(t.journey),rt.clear()},"init")};export{Dt as diagram}; diff --git a/_astro/kanban-definition-3W4ZIXB7.Dgxll3cG.js b/_astro/kanban-definition-3W4ZIXB7.Dgxll3cG.js new file mode 100644 index 00000000..4acb4245 --- /dev/null +++ b/_astro/kanban-definition-3W4ZIXB7.Dgxll3cG.js @@ -0,0 +1,89 @@ +import{_ as o,l as te,c as U,H as fe,af as ye,ag as be,ah as me,V as _e,F as Y,i as j,t as Ee,J as ke,W as Se,X as ce,Y as le}from"./mermaid.core.LbQlJBBQ.js";import{g as Ne}from"./chunk-FMBD7UC4.Tjciooq0.js";import"./page._rMDHl_T.js";var $=(function(){var e=o(function(O,i,n,r){for(n=n||{},r=O.length;r--;n[O[r]]=i);return n},"o"),u=[1,4],p=[1,13],s=[1,12],d=[1,15],E=[1,16],b=[1,20],l=[1,19],D=[6,7,8],I=[1,26],g=[1,24],w=[1,25],_=[6,7,11],G=[1,31],N=[6,7,11,24],V=[1,6,13,16,17,20,23],m=[1,35],A=[1,36],L=[1,6,7,11,13,16,17,20,23],H=[1,38],T={trace:o(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mindMap:4,spaceLines:5,SPACELINE:6,NL:7,KANBAN:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,node:14,shapeData:15,ICON:16,CLASS:17,nodeWithId:18,nodeWithoutId:19,NODE_DSTART:20,NODE_DESCR:21,NODE_DEND:22,NODE_ID:23,SHAPE_DATA:24,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"KANBAN",11:"EOF",13:"SPACELIST",16:"ICON",17:"CLASS",20:"NODE_DSTART",21:"NODE_DESCR",22:"NODE_DEND",23:"NODE_ID",24:"SHAPE_DATA"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,3],[12,2],[12,2],[12,2],[12,1],[12,2],[12,1],[12,1],[12,1],[12,1],[14,1],[14,1],[19,3],[18,1],[18,4],[15,2],[15,1]],performAction:o(function(i,n,r,a,h,t,M){var c=t.length-1;switch(h){case 6:case 7:return a;case 8:a.getLogger().trace("Stop NL ");break;case 9:a.getLogger().trace("Stop EOF ");break;case 11:a.getLogger().trace("Stop NL2 ");break;case 12:a.getLogger().trace("Stop EOF2 ");break;case 15:a.getLogger().info("Node: ",t[c-1].id),a.addNode(t[c-2].length,t[c-1].id,t[c-1].descr,t[c-1].type,t[c]);break;case 16:a.getLogger().info("Node: ",t[c].id),a.addNode(t[c-1].length,t[c].id,t[c].descr,t[c].type);break;case 17:a.getLogger().trace("Icon: ",t[c]),a.decorateNode({icon:t[c]});break;case 18:case 23:a.decorateNode({class:t[c]});break;case 19:a.getLogger().trace("SPACELIST");break;case 20:a.getLogger().trace("Node: ",t[c-1].id),a.addNode(0,t[c-1].id,t[c-1].descr,t[c-1].type,t[c]);break;case 21:a.getLogger().trace("Node: ",t[c].id),a.addNode(0,t[c].id,t[c].descr,t[c].type);break;case 22:a.decorateNode({icon:t[c]});break;case 27:a.getLogger().trace("node found ..",t[c-2]),this.$={id:t[c-1],descr:t[c-1],type:a.getType(t[c-2],t[c])};break;case 28:this.$={id:t[c],descr:t[c],type:0};break;case 29:a.getLogger().trace("node found ..",t[c-3]),this.$={id:t[c-3],descr:t[c-1],type:a.getType(t[c-2],t[c])};break;case 30:this.$=t[c-1]+t[c];break;case 31:this.$=t[c];break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:u},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:u},{6:p,7:[1,10],9:9,12:11,13:s,14:14,16:d,17:E,18:17,19:18,20:b,23:l},e(D,[2,3]),{1:[2,2]},e(D,[2,4]),e(D,[2,5]),{1:[2,6],6:p,12:21,13:s,14:14,16:d,17:E,18:17,19:18,20:b,23:l},{6:p,9:22,12:11,13:s,14:14,16:d,17:E,18:17,19:18,20:b,23:l},{6:I,7:g,10:23,11:w},e(_,[2,24],{18:17,19:18,14:27,16:[1,28],17:[1,29],20:b,23:l}),e(_,[2,19]),e(_,[2,21],{15:30,24:G}),e(_,[2,22]),e(_,[2,23]),e(N,[2,25]),e(N,[2,26]),e(N,[2,28],{20:[1,32]}),{21:[1,33]},{6:I,7:g,10:34,11:w},{1:[2,7],6:p,12:21,13:s,14:14,16:d,17:E,18:17,19:18,20:b,23:l},e(V,[2,14],{7:m,11:A}),e(L,[2,8]),e(L,[2,9]),e(L,[2,10]),e(_,[2,16],{15:37,24:G}),e(_,[2,17]),e(_,[2,18]),e(_,[2,20],{24:H}),e(N,[2,31]),{21:[1,39]},{22:[1,40]},e(V,[2,13],{7:m,11:A}),e(L,[2,11]),e(L,[2,12]),e(_,[2,15],{24:H}),e(N,[2,30]),{22:[1,41]},e(N,[2,27]),e(N,[2,29])],defaultActions:{2:[2,1],6:[2,2]},parseError:o(function(i,n){if(n.recoverable)this.trace(i);else{var r=new Error(i);throw r.hash=n,r}},"parseError"),parse:o(function(i){var n=this,r=[0],a=[],h=[null],t=[],M=this.table,c="",W=0,se=0,ue=2,re=1,ge=t.slice.call(arguments,1),y=Object.create(this.lexer),R={yy:{}};for(var J in this.yy)Object.prototype.hasOwnProperty.call(this.yy,J)&&(R.yy[J]=this.yy[J]);y.setInput(i,R.yy),R.yy.lexer=y,R.yy.parser=this,typeof y.yylloc>"u"&&(y.yylloc={});var q=y.yylloc;t.push(q);var de=y.options&&y.options.ranges;typeof R.yy.parseError=="function"?this.parseError=R.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function pe(S){r.length=r.length-2*S,h.length=h.length-S,t.length=t.length-S}o(pe,"popStack");function ae(){var S;return S=a.pop()||y.lex()||re,typeof S!="number"&&(S instanceof Array&&(a=S,S=a.pop()),S=n.symbols_[S]||S),S}o(ae,"lex");for(var k,P,x,Q,F={},z,C,oe,X;;){if(P=r[r.length-1],this.defaultActions[P]?x=this.defaultActions[P]:((k===null||typeof k>"u")&&(k=ae()),x=M[P]&&M[P][k]),typeof x>"u"||!x.length||!x[0]){var Z="";X=[];for(z in M[P])this.terminals_[z]&&z>ue&&X.push("'"+this.terminals_[z]+"'");y.showPosition?Z="Parse error on line "+(W+1)+`: +`+y.showPosition()+` +Expecting `+X.join(", ")+", got '"+(this.terminals_[k]||k)+"'":Z="Parse error on line "+(W+1)+": Unexpected "+(k==re?"end of input":"'"+(this.terminals_[k]||k)+"'"),this.parseError(Z,{text:y.match,token:this.terminals_[k]||k,line:y.yylineno,loc:q,expected:X})}if(x[0]instanceof Array&&x.length>1)throw new Error("Parse Error: multiple actions possible at state: "+P+", token: "+k);switch(x[0]){case 1:r.push(k),h.push(y.yytext),t.push(y.yylloc),r.push(x[1]),k=null,se=y.yyleng,c=y.yytext,W=y.yylineno,q=y.yylloc;break;case 2:if(C=this.productions_[x[1]][1],F.$=h[h.length-C],F._$={first_line:t[t.length-(C||1)].first_line,last_line:t[t.length-1].last_line,first_column:t[t.length-(C||1)].first_column,last_column:t[t.length-1].last_column},de&&(F._$.range=[t[t.length-(C||1)].range[0],t[t.length-1].range[1]]),Q=this.performAction.apply(F,[c,se,W,R.yy,x[1],h,t].concat(ge)),typeof Q<"u")return Q;C&&(r=r.slice(0,-1*C*2),h=h.slice(0,-1*C),t=t.slice(0,-1*C)),r.push(this.productions_[x[1]][0]),h.push(F.$),t.push(F._$),oe=M[r[r.length-2]][r[r.length-1]],r.push(oe);break;case 3:return!0}}return!0},"parse")},K=(function(){var O={EOF:1,parseError:o(function(n,r){if(this.yy.parser)this.yy.parser.parseError(n,r);else throw new Error(n)},"parseError"),setInput:o(function(i,n){return this.yy=n||this.yy||{},this._input=i,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:o(function(){var i=this._input[0];this.yytext+=i,this.yyleng++,this.offset++,this.match+=i,this.matched+=i;var n=i.match(/(?:\r\n?|\n).*/g);return n?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),i},"input"),unput:o(function(i){var n=i.length,r=i.split(/(?:\r\n?|\n)/g);this._input=i+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-n),this.offset-=n;var a=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),r.length-1&&(this.yylineno-=r.length-1);var h=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:r?(r.length===a.length?this.yylloc.first_column:0)+a[a.length-r.length].length-r[0].length:this.yylloc.first_column-n},this.options.ranges&&(this.yylloc.range=[h[0],h[0]+this.yyleng-n]),this.yyleng=this.yytext.length,this},"unput"),more:o(function(){return this._more=!0,this},"more"),reject:o(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:o(function(i){this.unput(this.match.slice(i))},"less"),pastInput:o(function(){var i=this.matched.substr(0,this.matched.length-this.match.length);return(i.length>20?"...":"")+i.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:o(function(){var i=this.match;return i.length<20&&(i+=this._input.substr(0,20-i.length)),(i.substr(0,20)+(i.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:o(function(){var i=this.pastInput(),n=new Array(i.length+1).join("-");return i+this.upcomingInput()+` +`+n+"^"},"showPosition"),test_match:o(function(i,n){var r,a,h;if(this.options.backtrack_lexer&&(h={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&&(h.yylloc.range=this.yylloc.range.slice(0))),a=i[0].match(/(?:\r\n?|\n).*/g),a&&(this.yylineno+=a.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:a?a[a.length-1].length-a[a.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+i[0].length},this.yytext+=i[0],this.match+=i[0],this.matches=i,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(i[0].length),this.matched+=i[0],r=this.performAction.call(this,this.yy,this,n,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack){for(var t in h)this[t]=h[t];return!1}return!1},"test_match"),next:o(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var i,n,r,a;this._more||(this.yytext="",this.match="");for(var h=this._currentRules(),t=0;tn[0].length)){if(n=r,a=t,this.options.backtrack_lexer){if(i=this.test_match(r,h[t]),i!==!1)return i;if(this._backtrack){n=!1;continue}else return!1}else if(!this.options.flex)break}return n?(i=this.test_match(n,h[a]),i!==!1?i:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:o(function(){var n=this.next();return n||this.lex()},"lex"),begin:o(function(n){this.conditionStack.push(n)},"begin"),popState:o(function(){var n=this.conditionStack.length-1;return n>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:o(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:o(function(n){return n=this.conditionStack.length-1-Math.abs(n||0),n>=0?this.conditionStack[n]:"INITIAL"},"topState"),pushState:o(function(n){this.begin(n)},"pushState"),stateStackSize:o(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:o(function(n,r,a,h){switch(a){case 0:return this.pushState("shapeData"),r.yytext="",24;case 1:return this.pushState("shapeDataStr"),24;case 2:return this.popState(),24;case 3:const t=/\n\s*/g;return r.yytext=r.yytext.replace(t,"
"),24;case 4:return 24;case 5:this.popState();break;case 6:return n.getLogger().trace("Found comment",r.yytext),6;case 7:return 8;case 8:this.begin("CLASS");break;case 9:return this.popState(),17;case 10:this.popState();break;case 11:n.getLogger().trace("Begin icon"),this.begin("ICON");break;case 12:return n.getLogger().trace("SPACELINE"),6;case 13:return 7;case 14:return 16;case 15:n.getLogger().trace("end icon"),this.popState();break;case 16:return n.getLogger().trace("Exploding node"),this.begin("NODE"),20;case 17:return n.getLogger().trace("Cloud"),this.begin("NODE"),20;case 18:return n.getLogger().trace("Explosion Bang"),this.begin("NODE"),20;case 19:return n.getLogger().trace("Cloud Bang"),this.begin("NODE"),20;case 20:return this.begin("NODE"),20;case 21:return this.begin("NODE"),20;case 22:return this.begin("NODE"),20;case 23:return this.begin("NODE"),20;case 24:return 13;case 25:return 23;case 26:return 11;case 27:this.begin("NSTR2");break;case 28:return"NODE_DESCR";case 29:this.popState();break;case 30:n.getLogger().trace("Starting NSTR"),this.begin("NSTR");break;case 31:return n.getLogger().trace("description:",r.yytext),"NODE_DESCR";case 32:this.popState();break;case 33:return this.popState(),n.getLogger().trace("node end ))"),"NODE_DEND";case 34:return this.popState(),n.getLogger().trace("node end )"),"NODE_DEND";case 35:return this.popState(),n.getLogger().trace("node end ...",r.yytext),"NODE_DEND";case 36:return this.popState(),n.getLogger().trace("node end (("),"NODE_DEND";case 37:return this.popState(),n.getLogger().trace("node end (-"),"NODE_DEND";case 38:return this.popState(),n.getLogger().trace("node end (-"),"NODE_DEND";case 39:return this.popState(),n.getLogger().trace("node end (("),"NODE_DEND";case 40:return this.popState(),n.getLogger().trace("node end (("),"NODE_DEND";case 41:return n.getLogger().trace("Long description:",r.yytext),21;case 42:return n.getLogger().trace("Long description:",r.yytext),21}},"anonymous"),rules:[/^(?:@\{)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^\"]+)/i,/^(?:[^}^"]+)/i,/^(?:\})/i,/^(?:\s*%%.*)/i,/^(?:kanban\b)/i,/^(?::::)/i,/^(?:.+)/i,/^(?:\n)/i,/^(?:::icon\()/i,/^(?:[\s]+[\n])/i,/^(?:[\n]+)/i,/^(?:[^\)]+)/i,/^(?:\))/i,/^(?:-\))/i,/^(?:\(-)/i,/^(?:\)\))/i,/^(?:\))/i,/^(?:\(\()/i,/^(?:\{\{)/i,/^(?:\()/i,/^(?:\[)/i,/^(?:[\s]+)/i,/^(?:[^\(\[\n\)\{\}@]+)/i,/^(?:$)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:[^"]+)/i,/^(?:["])/i,/^(?:[\)]\))/i,/^(?:[\)])/i,/^(?:[\]])/i,/^(?:\}\})/i,/^(?:\(-)/i,/^(?:-\))/i,/^(?:\(\()/i,/^(?:\()/i,/^(?:[^\)\]\(\}]+)/i,/^(?:.+(?!\(\())/i],conditions:{shapeDataEndBracket:{rules:[],inclusive:!1},shapeDataStr:{rules:[2,3],inclusive:!1},shapeData:{rules:[1,4,5],inclusive:!1},CLASS:{rules:[9,10],inclusive:!1},ICON:{rules:[14,15],inclusive:!1},NSTR2:{rules:[28,29],inclusive:!1},NSTR:{rules:[31,32],inclusive:!1},NODE:{rules:[27,30,33,34,35,36,37,38,39,40,41,42],inclusive:!1},INITIAL:{rules:[0,6,7,8,11,12,13,16,17,18,19,20,21,22,23,24,25,26],inclusive:!0}}};return O})();T.lexer=K;function B(){this.yy={}}return o(B,"Parser"),B.prototype=T,T.Parser=B,new B})();$.parser=$;var xe=$,v=[],ne=[],ee=0,ie={},ve=o(()=>{v=[],ne=[],ee=0,ie={}},"clear"),De=o(e=>{if(v.length===0)return null;const u=v[0].level;let p=null;for(let s=v.length-1;s>=0;s--)if(v[s].level===u&&!p&&(p=v[s]),v[s].levell.parentId===d.id);for(const l of b){const D={id:l.id,parentId:d.id,label:j(l.label??"",s),isGroup:!1,ticket:l?.ticket,priority:l?.priority,assigned:l?.assigned,icon:l?.icon,shape:"kanbanItem",level:l.level,rx:5,ry:5,cssStyles:["text-align: left"]};u.push(D)}}return{nodes:u,edges:e,other:{},config:U()}},"getData"),Oe=o((e,u,p,s,d)=>{const E=U();let b=E.mindmap?.padding??Y.mindmap.padding;switch(s){case f.ROUNDED_RECT:case f.RECT:case f.HEXAGON:b*=2}const l={id:j(u,E)||"kbn"+ee++,level:e,label:j(p,E),width:E.mindmap?.maxNodeWidth??Y.mindmap.maxNodeWidth,padding:b,isGroup:!1};if(d!==void 0){let I;d.includes(` +`)?I=d+` +`:I=`{ +`+d+` +}`;const g=Ee(I,{schema:ke});if(g.shape&&(g.shape!==g.shape.toLowerCase()||g.shape.includes("_")))throw new Error(`No such shape: ${g.shape}. Shape names should be lowercase.`);g?.shape&&g.shape==="kanbanItem"&&(l.shape=g?.shape),g?.label&&(l.label=g?.label),g?.icon&&(l.icon=g?.icon.toString()),g?.assigned&&(l.assigned=g?.assigned.toString()),g?.ticket&&(l.ticket=g?.ticket.toString()),g?.priority&&(l.priority=g?.priority)}const D=De(e);D?l.parentId=D.id||"kbn"+ee++:ne.push(l),v.push(l)},"addNode"),f={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},Ie=o((e,u)=>{switch(te.debug("In get type",e,u),e){case"[":return f.RECT;case"(":return u===")"?f.ROUNDED_RECT:f.CLOUD;case"((":return f.CIRCLE;case")":return f.CLOUD;case"))":return f.BANG;case"{{":return f.HEXAGON;default:return f.DEFAULT}},"getType"),Ce=o((e,u)=>{ie[e]=u},"setElementForId"),we=o(e=>{if(!e)return;const u=U(),p=v[v.length-1];e.icon&&(p.icon=j(e.icon,u)),e.class&&(p.cssClasses=j(e.class,u))},"decorateNode"),Ae=o(e=>{switch(e){case f.DEFAULT:return"no-border";case f.RECT:return"rect";case f.ROUNDED_RECT:return"rounded-rect";case f.CIRCLE:return"circle";case f.CLOUD:return"cloud";case f.BANG:return"bang";case f.HEXAGON:return"hexgon";default:return"no-border"}},"type2Str"),Te=o(()=>te,"getLogger"),Re=o(e=>ie[e],"getElementById"),Pe={clear:ve,addNode:Oe,getSections:he,getData:Le,nodeType:f,getType:Ie,setElementForId:Ce,decorateNode:we,type2Str:Ae,getLogger:Te,getElementById:Re},Ve=Pe,Be=o(async(e,u,p,s)=>{te.debug(`Rendering kanban diagram +`+e);const E=s.db.getData(),b=U();b.htmlLabels=!1;const l=fe(u),D=l.append("g");D.attr("class","sections");const I=l.append("g");I.attr("class","items");const g=E.nodes.filter(m=>m.isGroup);let w=0;const _=10,G=[];let N=25;for(const m of g){const A=b?.kanban?.sectionWidth||200;w=w+1,m.x=A*w+(w-1)*_/2,m.width=A,m.y=0,m.height=A*3,m.rx=5,m.ry=5,m.cssClasses=m.cssClasses+" section-"+w;const L=await ye(D,m);N=Math.max(N,L?.labelBBox?.height),G.push(L)}let V=0;for(const m of g){const A=G[V];V=V+1;const L=b?.kanban?.sectionWidth||200,H=-L*3/2+N;let T=H;const K=E.nodes.filter(i=>i.parentId===m.id);for(const i of K){if(i.isGroup)throw new Error("Groups within groups are not allowed in Kanban diagrams");i.x=m.x,i.width=L-1.5*_;const r=(await be(I,i,{config:b})).node().getBBox();i.y=T+r.height/2,await me(i),T=i.y+r.height/2+_/2}const B=A.cluster.select("rect"),O=Math.max(T-H+3*_,50)+(N-25);B.attr("height",O)}_e(void 0,l,b.mindmap?.padding??Y.kanban.padding,b.mindmap?.useMaxWidth??Y.kanban.useMaxWidth)},"draw"),Fe={draw:Be},je=o(e=>{let u="";for(let s=0;se.darkMode?le(s,d):ce(s,d),"adjuster");for(let s=0;s` + .edge { + stroke-width: 3; + } + ${je(e)} + .section-root rect, .section-root path, .section-root circle, .section-root polygon { + fill: ${e.git0}; + } + .section-root text { + fill: ${e.gitBranchLabel0}; + } + .icon-container { + height:100%; + display: flex; + justify-content: center; + align-items: center; + } + .edge { + fill: none; + } + .cluster-label, .label { + color: ${e.textColor}; + fill: ${e.textColor}; + } + .kanban-label { + dy: 1em; + alignment-baseline: middle; + text-anchor: middle; + dominant-baseline: middle; + text-align: center; + } + ${Ne()} +`,"getStyles"),He=Ge,ze={db:Ve,renderer:Fe,parser:xe,styles:He};export{ze as diagram}; diff --git a/_astro/katex.XbL3y5x-.js b/_astro/katex.XbL3y5x-.js new file mode 100644 index 00000000..d477fa51 --- /dev/null +++ b/_astro/katex.XbL3y5x-.js @@ -0,0 +1,261 @@ +class u0{constructor(e,t,a){this.lexer=void 0,this.start=void 0,this.end=void 0,this.lexer=e,this.start=t,this.end=a}static range(e,t){return t?!e||!e.loc||!t.loc||e.loc.lexer!==t.loc.lexer?null:new u0(e.loc.lexer,e.loc.start,t.loc.end):e&&e.loc}}class m0{constructor(e,t){this.text=void 0,this.loc=void 0,this.noexpand=void 0,this.treatAsRelax=void 0,this.text=e,this.loc=t}range(e,t){return new m0(t,u0.range(this,e))}}class M{constructor(e,t){this.name=void 0,this.position=void 0,this.length=void 0,this.rawMessage=void 0;var a="KaTeX parse error: "+e,n,s,u=t&&t.loc;if(u&&u.start<=u.end){var h=u.lexer.input;n=u.start,s=u.end,n===h.length?a+=" at end of input: ":a+=" at position "+(n+1)+": ";var c=h.slice(n,s).replace(/[^]/g,"$&̲"),p;n>15?p="…"+h.slice(n-15,n):p=h.slice(0,n);var g;s+15":">","<":"<",'"':""","'":"'"},ba=/[&><"']/g;function ya(r){return String(r).replace(ba,e=>ga[e])}var vr=function r(e){return e.type==="ordgroup"||e.type==="color"?e.body.length===1?r(e.body[0]):e:e.type==="font"?r(e.body):e},xa=function(e){var t=vr(e);return t.type==="mathord"||t.type==="textord"||t.type==="atom"},wa=function(e){if(!e)throw new Error("Expected non-null, but got "+String(e));return e},ka=function(e){var t=/^[\x00-\x20]*([^\\/#?]*?)(:|�*58|�*3a|&colon)/i.exec(e);return t?t[2]!==":"||!/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(t[1])?null:t[1].toLowerCase():"_relative"},V={deflt:fa,escape:ya,hyphenate:va,getBaseElem:vr,isCharacterBox:xa,protocolFromUrl:ka},ze={displayMode:{type:"boolean",description:"Render math in display mode, which puts the math in display style (so \\int and \\sum are large, for example), and centers the math on the page on its own line.",cli:"-d, --display-mode"},output:{type:{enum:["htmlAndMathml","html","mathml"]},description:"Determines the markup language of the output.",cli:"-F, --format "},leqno:{type:"boolean",description:"Render display math in leqno style (left-justified tags)."},fleqn:{type:"boolean",description:"Render display math flush left."},throwOnError:{type:"boolean",default:!0,cli:"-t, --no-throw-on-error",cliDescription:"Render errors (in the color given by --error-color) instead of throwing a ParseError exception when encountering an error."},errorColor:{type:"string",default:"#cc0000",cli:"-c, --error-color ",cliDescription:"A color string given in the format 'rgb' or 'rrggbb' (no #). This option determines the color of errors rendered by the -t option.",cliProcessor:r=>"#"+r},macros:{type:"object",cli:"-m, --macro ",cliDescription:"Define custom macro of the form '\\foo:expansion' (use multiple -m arguments for multiple macros).",cliDefault:[],cliProcessor:(r,e)=>(e.push(r),e)},minRuleThickness:{type:"number",description:"Specifies a minimum thickness, in ems, for fraction lines, `\\sqrt` top lines, `{array}` vertical lines, `\\hline`, `\\hdashline`, `\\underline`, `\\overline`, and the borders of `\\fbox`, `\\boxed`, and `\\fcolorbox`.",processor:r=>Math.max(0,r),cli:"--min-rule-thickness ",cliProcessor:parseFloat},colorIsTextColor:{type:"boolean",description:"Makes \\color behave like LaTeX's 2-argument \\textcolor, instead of LaTeX's one-argument \\color mode change.",cli:"-b, --color-is-text-color"},strict:{type:[{enum:["warn","ignore","error"]},"boolean","function"],description:"Turn on strict / LaTeX faithfulness mode, which throws an error if the input uses features that are not supported by LaTeX.",cli:"-S, --strict",cliDefault:!1},trust:{type:["boolean","function"],description:"Trust the input, enabling all HTML features such as \\url.",cli:"-T, --trust"},maxSize:{type:"number",default:1/0,description:"If non-zero, all user-specified sizes, e.g. in \\rule{500em}{500em}, will be capped to maxSize ems. Otherwise, elements and spaces can be arbitrarily large",processor:r=>Math.max(0,r),cli:"-s, --max-size ",cliProcessor:parseInt},maxExpand:{type:"number",default:1e3,description:"Limit the number of macro expansions to the specified number, to prevent e.g. infinite macro loops. If set to Infinity, the macro expander will try to fully expand as in LaTeX.",processor:r=>Math.max(0,r),cli:"-e, --max-expand ",cliProcessor:r=>r==="Infinity"?1/0:parseInt(r)},globalGroup:{type:"boolean",cli:!1}};function Sa(r){if(r.default)return r.default;var e=r.type,t=Array.isArray(e)?e[0]:e;if(typeof t!="string")return t.enum[0];switch(t){case"boolean":return!1;case"string":return"";case"number":return 0;case"object":return{}}}class dt{constructor(e){this.displayMode=void 0,this.output=void 0,this.leqno=void 0,this.fleqn=void 0,this.throwOnError=void 0,this.errorColor=void 0,this.macros=void 0,this.minRuleThickness=void 0,this.colorIsTextColor=void 0,this.strict=void 0,this.trust=void 0,this.maxSize=void 0,this.maxExpand=void 0,this.globalGroup=void 0,e=e||{};for(var t in ze)if(ze.hasOwnProperty(t)){var a=ze[t];this[t]=e[t]!==void 0?a.processor?a.processor(e[t]):e[t]:Sa(a)}}reportNonstrict(e,t,a){var n=this.strict;if(typeof n=="function"&&(n=n(e,t,a)),!(!n||n==="ignore")){if(n===!0||n==="error")throw new M("LaTeX-incompatible input and strict mode is set to 'error': "+(t+" ["+e+"]"),a);n==="warn"?typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(t+" ["+e+"]")):typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+n+"': "+t+" ["+e+"]"))}}useStrictBehavior(e,t,a){var n=this.strict;if(typeof n=="function")try{n=n(e,t,a)}catch{n="error"}return!n||n==="ignore"?!1:n===!0||n==="error"?!0:n==="warn"?(typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(t+" ["+e+"]")),!1):(typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+n+"': "+t+" ["+e+"]")),!1)}isTrusted(e){if(e.url&&!e.protocol){var t=V.protocolFromUrl(e.url);if(t==null)return!1;e.protocol=t}var a=typeof this.trust=="function"?this.trust(e):this.trust;return!!a}}class O0{constructor(e,t,a){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=e,this.size=t,this.cramped=a}sup(){return y0[Ma[this.id]]}sub(){return y0[za[this.id]]}fracNum(){return y0[Aa[this.id]]}fracDen(){return y0[Ta[this.id]]}cramp(){return y0[Ba[this.id]]}text(){return y0[Da[this.id]]}isTight(){return this.size>=2}}var ft=0,Te=1,ee=2,B0=3,le=4,f0=5,te=6,n0=7,y0=[new O0(ft,0,!1),new O0(Te,0,!0),new O0(ee,1,!1),new O0(B0,1,!0),new O0(le,2,!1),new O0(f0,2,!0),new O0(te,3,!1),new O0(n0,3,!0)],Ma=[le,f0,le,f0,te,n0,te,n0],za=[f0,f0,f0,f0,n0,n0,n0,n0],Aa=[ee,B0,le,f0,te,n0,te,n0],Ta=[B0,B0,f0,f0,n0,n0,n0,n0],Ba=[Te,Te,B0,B0,f0,f0,n0,n0],Da=[ft,Te,ee,B0,ee,B0,ee,B0],R={DISPLAY:y0[ft],TEXT:y0[ee],SCRIPT:y0[le],SCRIPTSCRIPT:y0[te]},nt=[{name:"latin",blocks:[[256,591],[768,879]]},{name:"cyrillic",blocks:[[1024,1279]]},{name:"armenian",blocks:[[1328,1423]]},{name:"brahmic",blocks:[[2304,4255]]},{name:"georgian",blocks:[[4256,4351]]},{name:"cjk",blocks:[[12288,12543],[19968,40879],[65280,65376]]},{name:"hangul",blocks:[[44032,55215]]}];function Ca(r){for(var e=0;e=n[0]&&r<=n[1])return t.name}return null}var Ae=[];nt.forEach(r=>r.blocks.forEach(e=>Ae.push(...e)));function gr(r){for(var e=0;e=Ae[e]&&r<=Ae[e+1])return!0;return!1}var _0=80,Na=function(e,t){return"M95,"+(622+e+t)+` +c-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,-10,-9.5,-14 +c0,-2,0.3,-3.3,1,-4c1.3,-2.7,23.83,-20.7,67.5,-54 +c44.2,-33.3,65.8,-50.3,66.5,-51c1.3,-1.3,3,-2,5,-2c4.7,0,8.7,3.3,12,10 +s173,378,173,378c0.7,0,35.3,-71,104,-213c68.7,-142,137.5,-285,206.5,-429 +c69,-144,104.5,-217.7,106.5,-221 +l`+e/2.075+" -"+e+` +c5.3,-9.3,12,-14,20,-14 +H400000v`+(40+e)+`H845.2724 +s-225.272,467,-225.272,467s-235,486,-235,486c-2.7,4.7,-9,7,-19,7 +c-6,0,-10,-1,-12,-3s-194,-422,-194,-422s-65,47,-65,47z +M`+(834+e)+" "+t+"h400000v"+(40+e)+"h-400000z"},qa=function(e,t){return"M263,"+(601+e+t)+`c0.7,0,18,39.7,52,119 +c34,79.3,68.167,158.7,102.5,238c34.3,79.3,51.8,119.3,52.5,120 +c340,-704.7,510.7,-1060.3,512,-1067 +l`+e/2.084+" -"+e+` +c4.7,-7.3,11,-11,19,-11 +H40000v`+(40+e)+`H1012.3 +s-271.3,567,-271.3,567c-38.7,80.7,-84,175,-136,283c-52,108,-89.167,185.3,-111.5,232 +c-22.3,46.7,-33.8,70.3,-34.5,71c-4.7,4.7,-12.3,7,-23,7s-12,-1,-12,-1 +s-109,-253,-109,-253c-72.7,-168,-109.3,-252,-110,-252c-10.7,8,-22,16.7,-34,26 +c-22,17.3,-33.3,26,-34,26s-26,-26,-26,-26s76,-59,76,-59s76,-60,76,-60z +M`+(1001+e)+" "+t+"h400000v"+(40+e)+"h-400000z"},Ra=function(e,t){return"M983 "+(10+e+t)+` +l`+e/3.13+" -"+e+` +c4,-6.7,10,-10,18,-10 H400000v`+(40+e)+` +H1013.1s-83.4,268,-264.1,840c-180.7,572,-277,876.3,-289,913c-4.7,4.7,-12.7,7,-24,7 +s-12,0,-12,0c-1.3,-3.3,-3.7,-11.7,-7,-25c-35.3,-125.3,-106.7,-373.3,-214,-744 +c-10,12,-21,25,-33,39s-32,39,-32,39c-6,-5.3,-15,-14,-27,-26s25,-30,25,-30 +c26.7,-32.7,52,-63,76,-91s52,-60,52,-60s208,722,208,722 +c56,-175.3,126.3,-397.3,211,-666c84.7,-268.7,153.8,-488.2,207.5,-658.5 +c53.7,-170.3,84.5,-266.8,92.5,-289.5z +M`+(1001+e)+" "+t+"h400000v"+(40+e)+"h-400000z"},Ea=function(e,t){return"M424,"+(2398+e+t)+` +c-1.3,-0.7,-38.5,-172,-111.5,-514c-73,-342,-109.8,-513.3,-110.5,-514 +c0,-2,-10.7,14.3,-32,49c-4.7,7.3,-9.8,15.7,-15.5,25c-5.7,9.3,-9.8,16,-12.5,20 +s-5,7,-5,7c-4,-3.3,-8.3,-7.7,-13,-13s-13,-13,-13,-13s76,-122,76,-122s77,-121,77,-121 +s209,968,209,968c0,-2,84.7,-361.7,254,-1079c169.3,-717.3,254.7,-1077.7,256,-1081 +l`+e/4.223+" -"+e+`c4,-6.7,10,-10,18,-10 H400000 +v`+(40+e)+`H1014.6 +s-87.3,378.7,-272.6,1166c-185.3,787.3,-279.3,1182.3,-282,1185 +c-2,6,-10,9,-24,9 +c-8,0,-12,-0.7,-12,-2z M`+(1001+e)+" "+t+` +h400000v`+(40+e)+"h-400000z"},Ia=function(e,t){return"M473,"+(2713+e+t)+` +c339.3,-1799.3,509.3,-2700,510,-2702 l`+e/5.298+" -"+e+` +c3.3,-7.3,9.3,-11,18,-11 H400000v`+(40+e)+`H1017.7 +s-90.5,478,-276.2,1466c-185.7,988,-279.5,1483,-281.5,1485c-2,6,-10,9,-24,9 +c-8,0,-12,-0.7,-12,-2c0,-1.3,-5.3,-32,-16,-92c-50.7,-293.3,-119.7,-693.3,-207,-1200 +c0,-1.3,-5.3,8.7,-16,30c-10.7,21.3,-21.3,42.7,-32,64s-16,33,-16,33s-26,-26,-26,-26 +s76,-153,76,-153s77,-151,77,-151c0.7,0.7,35.7,202,105,604c67.3,400.7,102,602.7,104, +606zM`+(1001+e)+" "+t+"h400000v"+(40+e)+"H1017.7z"},Fa=function(e){var t=e/2;return"M400000 "+e+" H0 L"+t+" 0 l65 45 L145 "+(e-80)+" H400000z"},Oa=function(e,t,a){var n=a-54-t-e;return"M702 "+(e+t)+"H400000"+(40+e)+` +H742v`+n+`l-4 4-4 4c-.667.7 -2 1.5-4 2.5s-4.167 1.833-6.5 2.5-5.5 1-9.5 1 +h-12l-28-84c-16.667-52-96.667 -294.333-240-727l-212 -643 -85 170 +c-4-3.333-8.333-7.667-13 -13l-13-13l77-155 77-156c66 199.333 139 419.667 +219 661 l218 661zM702 `+t+"H400000v"+(40+e)+"H742z"},Ha=function(e,t,a){t=1e3*t;var n="";switch(e){case"sqrtMain":n=Na(t,_0);break;case"sqrtSize1":n=qa(t,_0);break;case"sqrtSize2":n=Ra(t,_0);break;case"sqrtSize3":n=Ea(t,_0);break;case"sqrtSize4":n=Ia(t,_0);break;case"sqrtTall":n=Oa(t,_0,a)}return n},La=function(e,t){switch(e){case"⎜":return"M291 0 H417 V"+t+" H291z M291 0 H417 V"+t+" H291z";case"∣":return"M145 0 H188 V"+t+" H145z M145 0 H188 V"+t+" H145z";case"∥":return"M145 0 H188 V"+t+" H145z M145 0 H188 V"+t+" H145z"+("M367 0 H410 V"+t+" H367z M367 0 H410 V"+t+" H367z");case"⎟":return"M457 0 H583 V"+t+" H457z M457 0 H583 V"+t+" H457z";case"⎢":return"M319 0 H403 V"+t+" H319z M319 0 H403 V"+t+" H319z";case"⎥":return"M263 0 H347 V"+t+" H263z M263 0 H347 V"+t+" H263z";case"⎪":return"M384 0 H504 V"+t+" H384z M384 0 H504 V"+t+" H384z";case"⏐":return"M312 0 H355 V"+t+" H312z M312 0 H355 V"+t+" H312z";case"‖":return"M257 0 H300 V"+t+" H257z M257 0 H300 V"+t+" H257z"+("M478 0 H521 V"+t+" H478z M478 0 H521 V"+t+" H478z");default:return""}},Ft={doubleleftarrow:`M262 157 +l10-10c34-36 62.7-77 86-123 3.3-8 5-13.3 5-16 0-5.3-6.7-8-20-8-7.3 + 0-12.2.5-14.5 1.5-2.3 1-4.8 4.5-7.5 10.5-49.3 97.3-121.7 169.3-217 216-28 + 14-57.3 25-88 33-6.7 2-11 3.8-13 5.5-2 1.7-3 4.2-3 7.5s1 5.8 3 7.5 +c2 1.7 6.3 3.5 13 5.5 68 17.3 128.2 47.8 180.5 91.5 52.3 43.7 93.8 96.2 124.5 + 157.5 9.3 8 15.3 12.3 18 13h6c12-.7 18-4 18-10 0-2-1.7-7-5-15-23.3-46-52-87 +-86-123l-10-10h399738v-40H218c328 0 0 0 0 0l-10-8c-26.7-20-65.7-43-117-69 2.7 +-2 6-3.7 10-5 36.7-16 72.3-37.3 107-64l10-8h399782v-40z +m8 0v40h399730v-40zm0 194v40h399730v-40z`,doublerightarrow:`M399738 392l +-10 10c-34 36-62.7 77-86 123-3.3 8-5 13.3-5 16 0 5.3 6.7 8 20 8 7.3 0 12.2-.5 + 14.5-1.5 2.3-1 4.8-4.5 7.5-10.5 49.3-97.3 121.7-169.3 217-216 28-14 57.3-25 88 +-33 6.7-2 11-3.8 13-5.5 2-1.7 3-4.2 3-7.5s-1-5.8-3-7.5c-2-1.7-6.3-3.5-13-5.5-68 +-17.3-128.2-47.8-180.5-91.5-52.3-43.7-93.8-96.2-124.5-157.5-9.3-8-15.3-12.3-18 +-13h-6c-12 .7-18 4-18 10 0 2 1.7 7 5 15 23.3 46 52 87 86 123l10 10H0v40h399782 +c-328 0 0 0 0 0l10 8c26.7 20 65.7 43 117 69-2.7 2-6 3.7-10 5-36.7 16-72.3 37.3 +-107 64l-10 8H0v40zM0 157v40h399730v-40zm0 194v40h399730v-40z`,leftarrow:`M400000 241H110l3-3c68.7-52.7 113.7-120 + 135-202 4-14.7 6-23 6-25 0-7.3-7-11-21-11-8 0-13.2.8-15.5 2.5-2.3 1.7-4.2 5.8 +-5.5 12.5-1.3 4.7-2.7 10.3-4 17-12 48.7-34.8 92-68.5 130S65.3 228.3 18 247 +c-10 4-16 7.7-18 11 0 8.7 6 14.3 18 17 47.3 18.7 87.8 47 121.5 85S196 441.3 208 + 490c.7 2 1.3 5 2 9s1.2 6.7 1.5 8c.3 1.3 1 3.3 2 6s2.2 4.5 3.5 5.5c1.3 1 3.3 + 1.8 6 2.5s6 1 10 1c14 0 21-3.7 21-11 0-2-2-10.3-6-25-20-79.3-65-146.7-135-202 + l-3-3h399890zM100 241v40h399900v-40z`,leftbrace:`M6 548l-6-6v-35l6-11c56-104 135.3-181.3 238-232 57.3-28.7 117 +-45 179-50h399577v120H403c-43.3 7-81 15-113 26-100.7 33-179.7 91-237 174-2.7 + 5-6 9-10 13-.7 1-7.3 1-20 1H6z`,leftbraceunder:`M0 6l6-6h17c12.688 0 19.313.3 20 1 4 4 7.313 8.3 10 13 + 35.313 51.3 80.813 93.8 136.5 127.5 55.688 33.7 117.188 55.8 184.5 66.5.688 + 0 2 .3 4 1 18.688 2.7 76 4.3 172 5h399450v120H429l-6-1c-124.688-8-235-61.7 +-331-161C60.687 138.7 32.312 99.3 7 54L0 41V6z`,leftgroup:`M400000 80 +H435C64 80 168.3 229.4 21 260c-5.9 1.2-18 0-18 0-2 0-3-1-3-3v-38C76 61 257 0 + 435 0h399565z`,leftgroupunder:`M400000 262 +H435C64 262 168.3 112.6 21 82c-5.9-1.2-18 0-18 0-2 0-3 1-3 3v38c76 158 257 219 + 435 219h399565z`,leftharpoon:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3 +-3.3 10.2-9.5 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5 +-18.3 3-21-1.3-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7 +-196 228-6.7 4.7-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40z`,leftharpoonplus:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3-3.3 10.2-9.5 + 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5-18.3 3-21-1.3 +-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7-196 228-6.7 4.7 +-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40zM0 435v40h400000v-40z +m0 0v40h400000v-40z`,leftharpoondown:`M7 241c-4 4-6.333 8.667-7 14 0 5.333.667 9 2 11s5.333 + 5.333 12 10c90.667 54 156 130 196 228 3.333 10.667 6.333 16.333 9 17 2 .667 5 + 1 9 1h5c10.667 0 16.667-2 18-6 2-2.667 1-9.667-3-21-32-87.333-82.667-157.667 +-152-211l-3-3h399907v-40zM93 281 H400000 v-40L7 241z`,leftharpoondownplus:`M7 435c-4 4-6.3 8.7-7 14 0 5.3.7 9 2 11s5.3 5.3 12 + 10c90.7 54 156 130 196 228 3.3 10.7 6.3 16.3 9 17 2 .7 5 1 9 1h5c10.7 0 16.7 +-2 18-6 2-2.7 1-9.7-3-21-32-87.3-82.7-157.7-152-211l-3-3h399907v-40H7zm93 0 +v40h399900v-40zM0 241v40h399900v-40zm0 0v40h399900v-40z`,lefthook:`M400000 281 H103s-33-11.2-61-33.5S0 197.3 0 164s14.2-61.2 42.5 +-83.5C70.8 58.2 104 47 142 47 c16.7 0 25 6.7 25 20 0 12-8.7 18.7-26 20-40 3.3 +-68.7 15.7-86 37-10 12-15 25.3-15 40 0 22.7 9.8 40.7 29.5 54 19.7 13.3 43.5 21 + 71.5 23h399859zM103 281v-40h399897v40z`,leftlinesegment:`M40 281 V428 H0 V94 H40 V241 H400000 v40z +M40 281 V428 H0 V94 H40 V241 H400000 v40z`,leftmapsto:`M40 281 V448H0V74H40V241H400000v40z +M40 281 V448H0V74H40V241H400000v40z`,leftToFrom:`M0 147h400000v40H0zm0 214c68 40 115.7 95.7 143 167h22c15.3 0 23 +-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69-70-101l-7-8h399905v-40H95l7-8 +c28.7-32 52-65.7 70-101 10.7-23.3 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 265.3 + 68 321 0 361zm0-174v-40h399900v40zm100 154v40h399900v-40z`,longequal:`M0 50 h400000 v40H0z m0 194h40000v40H0z +M0 50 h400000 v40H0z m0 194h40000v40H0z`,midbrace:`M200428 334 +c-100.7-8.3-195.3-44-280-108-55.3-42-101.7-93-139-153l-9-14c-2.7 4-5.7 8.7-9 14 +-53.3 86.7-123.7 153-211 199-66.7 36-137.3 56.3-212 62H0V214h199568c178.3-11.7 + 311.7-78.3 403-201 6-8 9.7-12 11-12 .7-.7 6.7-1 18-1s17.3.3 18 1c1.3 0 5 4 11 + 12 44.7 59.3 101.3 106.3 170 141s145.3 54.3 229 60h199572v120z`,midbraceunder:`M199572 214 +c100.7 8.3 195.3 44 280 108 55.3 42 101.7 93 139 153l9 14c2.7-4 5.7-8.7 9-14 + 53.3-86.7 123.7-153 211-199 66.7-36 137.3-56.3 212-62h199568v120H200432c-178.3 + 11.7-311.7 78.3-403 201-6 8-9.7 12-11 12-.7.7-6.7 1-18 1s-17.3-.3-18-1c-1.3 0 +-5-4-11-12-44.7-59.3-101.3-106.3-170-141s-145.3-54.3-229-60H0V214z`,oiintSize1:`M512.6 71.6c272.6 0 320.3 106.8 320.3 178.2 0 70.8-47.7 177.6 +-320.3 177.6S193.1 320.6 193.1 249.8c0-71.4 46.9-178.2 319.5-178.2z +m368.1 178.2c0-86.4-60.9-215.4-368.1-215.4-306.4 0-367.3 129-367.3 215.4 0 85.8 +60.9 214.8 367.3 214.8 307.2 0 368.1-129 368.1-214.8z`,oiintSize2:`M757.8 100.1c384.7 0 451.1 137.6 451.1 230 0 91.3-66.4 228.8 +-451.1 228.8-386.3 0-452.7-137.5-452.7-228.8 0-92.4 66.4-230 452.7-230z +m502.4 230c0-111.2-82.4-277.2-502.4-277.2s-504 166-504 277.2 +c0 110 84 276 504 276s502.4-166 502.4-276z`,oiiintSize1:`M681.4 71.6c408.9 0 480.5 106.8 480.5 178.2 0 70.8-71.6 177.6 +-480.5 177.6S202.1 320.6 202.1 249.8c0-71.4 70.5-178.2 479.3-178.2z +m525.8 178.2c0-86.4-86.8-215.4-525.7-215.4-437.9 0-524.7 129-524.7 215.4 0 +85.8 86.8 214.8 524.7 214.8 438.9 0 525.7-129 525.7-214.8z`,oiiintSize2:`M1021.2 53c603.6 0 707.8 165.8 707.8 277.2 0 110-104.2 275.8 +-707.8 275.8-606 0-710.2-165.8-710.2-275.8C311 218.8 415.2 53 1021.2 53z +m770.4 277.1c0-131.2-126.4-327.6-770.5-327.6S248.4 198.9 248.4 330.1 +c0 130 128.8 326.4 772.7 326.4s770.5-196.4 770.5-326.4z`,rightarrow:`M0 241v40h399891c-47.3 35.3-84 78-110 128 +-16.7 32-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20 + 11 8 0 13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7 + 39-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85 +-40.5-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5 +-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67 + 151.7 139 205zm0 0v40h399900v-40z`,rightbrace:`M400000 542l +-6 6h-17c-12.7 0-19.3-.3-20-1-4-4-7.3-8.3-10-13-35.3-51.3-80.8-93.8-136.5-127.5 +s-117.2-55.8-184.5-66.5c-.7 0-2-.3-4-1-18.7-2.7-76-4.3-172-5H0V214h399571l6 1 +c124.7 8 235 61.7 331 161 31.3 33.3 59.7 72.7 85 118l7 13v35z`,rightbraceunder:`M399994 0l6 6v35l-6 11c-56 104-135.3 181.3-238 232-57.3 + 28.7-117 45-179 50H-300V214h399897c43.3-7 81-15 113-26 100.7-33 179.7-91 237 +-174 2.7-5 6-9 10-13 .7-1 7.3-1 20-1h17z`,rightgroup:`M0 80h399565c371 0 266.7 149.4 414 180 5.9 1.2 18 0 18 0 2 0 + 3-1 3-3v-38c-76-158-257-219-435-219H0z`,rightgroupunder:`M0 262h399565c371 0 266.7-149.4 414-180 5.9-1.2 18 0 18 + 0 2 0 3 1 3 3v38c-76 158-257 219-435 219H0z`,rightharpoon:`M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3 +-3.7-15.3-11-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2 +-10.7 0-16.7 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58 + 69.2 92 94.5zm0 0v40h399900v-40z`,rightharpoonplus:`M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3-3.7-15.3-11 +-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2-10.7 0-16.7 + 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58 69.2 92 94.5z +m0 0v40h399900v-40z m100 194v40h399900v-40zm0 0v40h399900v-40z`,rightharpoondown:`M399747 511c0 7.3 6.7 11 20 11 8 0 13-.8 15-2.5s4.7-6.8 + 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3 8.5-5.8 9.5 +-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3-64.7 57-92 95 +-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 241v40h399900v-40z`,rightharpoondownplus:`M399747 705c0 7.3 6.7 11 20 11 8 0 13-.8 + 15-2.5s4.7-6.8 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3 + 8.5-5.8 9.5-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3 +-64.7 57-92 95-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 435v40h399900v-40z +m0-194v40h400000v-40zm0 0v40h400000v-40z`,righthook:`M399859 241c-764 0 0 0 0 0 40-3.3 68.7-15.7 86-37 10-12 15-25.3 + 15-40 0-22.7-9.8-40.7-29.5-54-19.7-13.3-43.5-21-71.5-23-17.3-1.3-26-8-26-20 0 +-13.3 8.7-20 26-20 38 0 71 11.2 99 33.5 0 0 7 5.6 21 16.7 14 11.2 21 33.5 21 + 66.8s-14 61.2-42 83.5c-28 22.3-61 33.5-99 33.5L0 241z M0 281v-40h399859v40z`,rightlinesegment:`M399960 241 V94 h40 V428 h-40 V281 H0 v-40z +M399960 241 V94 h40 V428 h-40 V281 H0 v-40z`,rightToFrom:`M400000 167c-70.7-42-118-97.7-142-167h-23c-15.3 0-23 .3-23 + 1 0 1.3 5.3 13.7 16 37 18 35.3 41.3 69 70 101l7 8H0v40h399905l-7 8c-28.7 32 +-52 65.7-70 101-10.7 23.3-16 35.7-16 37 0 .7 7.7 1 23 1h23c24-69.3 71.3-125 142 +-167z M100 147v40h399900v-40zM0 341v40h399900v-40z`,twoheadleftarrow:`M0 167c68 40 + 115.7 95.7 143 167h22c15.3 0 23-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69 +-70-101l-7-8h125l9 7c50.7 39.3 85 86 103 140h46c0-4.7-6.3-18.7-19-42-18-35.3 +-40-67.3-66-96l-9-9h399716v-40H284l9-9c26-28.7 48-60.7 66-96 12.7-23.333 19 +-37.333 19-42h-46c-18 54-52.3 100.7-103 140l-9 7H95l7-8c28.7-32 52-65.7 70-101 + 10.7-23.333 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 71.3 68 127 0 167z`,twoheadrightarrow:`M400000 167 +c-68-40-115.7-95.7-143-167h-22c-15.3 0-23 .3-23 1 0 1.3 5.3 13.7 16 37 18 35.3 + 41.3 69 70 101l7 8h-125l-9-7c-50.7-39.3-85-86-103-140h-46c0 4.7 6.3 18.7 19 42 + 18 35.3 40 67.3 66 96l9 9H0v40h399716l-9 9c-26 28.7-48 60.7-66 96-12.7 23.333 +-19 37.333-19 42h46c18-54 52.3-100.7 103-140l9-7h125l-7 8c-28.7 32-52 65.7-70 + 101-10.7 23.333-16 35.7-16 37 0 .7 7.7 1 23 1h22c27.3-71.3 75-127 143-167z`,tilde1:`M200 55.538c-77 0-168 73.953-177 73.953-3 0-7 +-2.175-9-5.437L2 97c-1-2-2-4-2-6 0-4 2-7 5-9l20-12C116 12 171 0 207 0c86 0 + 114 68 191 68 78 0 168-68 177-68 4 0 7 2 9 5l12 19c1 2.175 2 4.35 2 6.525 0 + 4.35-2 7.613-5 9.788l-19 13.05c-92 63.077-116.937 75.308-183 76.128 +-68.267.847-113-73.952-191-73.952z`,tilde2:`M344 55.266c-142 0-300.638 81.316-311.5 86.418 +-8.01 3.762-22.5 10.91-23.5 5.562L1 120c-1-2-1-3-1-4 0-5 3-9 8-10l18.4-9C160.9 + 31.9 283 0 358 0c148 0 188 122 331 122s314-97 326-97c4 0 8 2 10 7l7 21.114 +c1 2.14 1 3.21 1 4.28 0 5.347-3 9.626-7 10.696l-22.3 12.622C852.6 158.372 751 + 181.476 676 181.476c-149 0-189-126.21-332-126.21z`,tilde3:`M786 59C457 59 32 175.242 13 175.242c-6 0-10-3.457 +-11-10.37L.15 138c-1-7 3-12 10-13l19.2-6.4C378.4 40.7 634.3 0 804.3 0c337 0 + 411.8 157 746.8 157 328 0 754-112 773-112 5 0 10 3 11 9l1 14.075c1 8.066-.697 + 16.595-6.697 17.492l-21.052 7.31c-367.9 98.146-609.15 122.696-778.15 122.696 + -338 0-409-156.573-744-156.573z`,tilde4:`M786 58C457 58 32 177.487 13 177.487c-6 0-10-3.345 +-11-10.035L.15 143c-1-7 3-12 10-13l22-6.7C381.2 35 637.15 0 807.15 0c337 0 409 + 177 744 177 328 0 754-127 773-127 5 0 10 3 11 9l1 14.794c1 7.805-3 13.38-9 + 14.495l-20.7 5.574c-366.85 99.79-607.3 139.372-776.3 139.372-338 0-409 + -175.236-744-175.236z`,vec:`M377 20c0-5.333 1.833-10 5.5-14S391 0 397 0c4.667 0 8.667 1.667 12 5 +3.333 2.667 6.667 9 10 19 6.667 24.667 20.333 43.667 41 57 7.333 4.667 11 +10.667 11 18 0 6-1 10-3 12s-6.667 5-14 9c-28.667 14.667-53.667 35.667-75 63 +-1.333 1.333-3.167 3.5-5.5 6.5s-4 4.833-5 5.5c-1 .667-2.5 1.333-4.5 2s-4.333 1 +-7 1c-4.667 0-9.167-1.833-13.5-5.5S337 184 337 178c0-12.667 15.667-32.333 47-59 +H213l-171-1c-8.667-6-13-12.333-13-19 0-4.667 4.333-11.333 13-20h359 +c-16-25.333-24-45-24-59z`,widehat1:`M529 0h5l519 115c5 1 9 5 9 10 0 1-1 2-1 3l-4 22 +c-1 5-5 9-11 9h-2L532 67 19 159h-2c-5 0-9-4-11-9l-5-22c-1-6 2-12 8-13z`,widehat2:`M1181 0h2l1171 176c6 0 10 5 10 11l-2 23c-1 6-5 10 +-11 10h-1L1182 67 15 220h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widehat3:`M1181 0h2l1171 236c6 0 10 5 10 11l-2 23c-1 6-5 10 +-11 10h-1L1182 67 15 280h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widehat4:`M1181 0h2l1171 296c6 0 10 5 10 11l-2 23c-1 6-5 10 +-11 10h-1L1182 67 15 340h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widecheck1:`M529,159h5l519,-115c5,-1,9,-5,9,-10c0,-1,-1,-2,-1,-3l-4,-22c-1, +-5,-5,-9,-11,-9h-2l-512,92l-513,-92h-2c-5,0,-9,4,-11,9l-5,22c-1,6,2,12,8,13z`,widecheck2:`M1181,220h2l1171,-176c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10, +-11,-10h-1l-1168,153l-1167,-153h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,widecheck3:`M1181,280h2l1171,-236c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10, +-11,-10h-1l-1168,213l-1167,-213h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,widecheck4:`M1181,340h2l1171,-296c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10, +-11,-10h-1l-1168,273l-1167,-273h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,baraboveleftarrow:`M400000 620h-399890l3 -3c68.7 -52.7 113.7 -120 135 -202 +c4 -14.7 6 -23 6 -25c0 -7.3 -7 -11 -21 -11c-8 0 -13.2 0.8 -15.5 2.5 +c-2.3 1.7 -4.2 5.8 -5.5 12.5c-1.3 4.7 -2.7 10.3 -4 17c-12 48.7 -34.8 92 -68.5 130 +s-74.2 66.3 -121.5 85c-10 4 -16 7.7 -18 11c0 8.7 6 14.3 18 17c47.3 18.7 87.8 47 +121.5 85s56.5 81.3 68.5 130c0.7 2 1.3 5 2 9s1.2 6.7 1.5 8c0.3 1.3 1 3.3 2 6 +s2.2 4.5 3.5 5.5c1.3 1 3.3 1.8 6 2.5s6 1 10 1c14 0 21 -3.7 21 -11 +c0 -2 -2 -10.3 -6 -25c-20 -79.3 -65 -146.7 -135 -202l-3 -3h399890z +M100 620v40h399900v-40z M0 241v40h399900v-40zM0 241v40h399900v-40z`,rightarrowabovebar:`M0 241v40h399891c-47.3 35.3-84 78-110 128-16.7 32 +-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20 11 8 0 +13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7 39 +-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85-40.5 +-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5 +-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67 +151.7 139 205zm96 379h399894v40H0zm0 0h399904v40H0z`,baraboveshortleftharpoon:`M507,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11 +c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17 +c2,0.7,5,1,9,1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21 +c-32,-87.3,-82.7,-157.7,-152,-211c0,0,-3,-3,-3,-3l399351,0l0,-40 +c-398570,0,-399437,0,-399437,0z M593 435 v40 H399500 v-40z +M0 281 v-40 H399908 v40z M0 281 v-40 H399908 v40z`,rightharpoonaboveshortbar:`M0,241 l0,40c399126,0,399993,0,399993,0 +c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199, +-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6 +c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z +M0 241 v40 H399908 v-40z M0 475 v-40 H399500 v40z M0 475 v-40 H399500 v40z`,shortbaraboveleftharpoon:`M7,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11 +c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17c2,0.7,5,1,9, +1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21c-32,-87.3,-82.7,-157.7, +-152,-211c0,0,-3,-3,-3,-3l399907,0l0,-40c-399126,0,-399993,0,-399993,0z +M93 435 v40 H400000 v-40z M500 241 v40 H400000 v-40z M500 241 v40 H400000 v-40z`,shortrightharpoonabovebar:`M53,241l0,40c398570,0,399437,0,399437,0 +c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199, +-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6 +c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z +M500 241 v40 H399408 v-40z M500 435 v40 H400000 v-40z`},Pa=function(e,t){switch(e){case"lbrack":return"M403 1759 V84 H666 V0 H319 V1759 v"+t+` v1759 h347 v-84 +H403z M403 1759 V0 H319 V1759 v`+t+" v1759 h84z";case"rbrack":return"M347 1759 V0 H0 V84 H263 V1759 v"+t+` v1759 H0 v84 H347z +M347 1759 V0 H263 V1759 v`+t+" v1759 h84z";case"vert":return"M145 15 v585 v"+t+` v585 c2.667,10,9.667,15,21,15 +c10,0,16.667,-5,20,-15 v-585 v`+-t+` v-585 c-2.667,-10,-9.667,-15,-21,-15 +c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v`+t+" v585 h43z";case"doublevert":return"M145 15 v585 v"+t+` v585 c2.667,10,9.667,15,21,15 +c10,0,16.667,-5,20,-15 v-585 v`+-t+` v-585 c-2.667,-10,-9.667,-15,-21,-15 +c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v`+t+` v585 h43z +M367 15 v585 v`+t+` v585 c2.667,10,9.667,15,21,15 +c10,0,16.667,-5,20,-15 v-585 v`+-t+` v-585 c-2.667,-10,-9.667,-15,-21,-15 +c-10,0,-16.667,5,-20,15z M410 15 H367 v585 v`+t+" v585 h43z";case"lfloor":return"M319 602 V0 H403 V602 v"+t+` v1715 h263 v84 H319z +MM319 602 V0 H403 V602 v`+t+" v1715 H319z";case"rfloor":return"M319 602 V0 H403 V602 v"+t+` v1799 H0 v-84 H319z +MM319 602 V0 H403 V602 v`+t+" v1715 H319z";case"lceil":return"M403 1759 V84 H666 V0 H319 V1759 v"+t+` v602 h84z +M403 1759 V0 H319 V1759 v`+t+" v602 h84z";case"rceil":return"M347 1759 V0 H0 V84 H263 V1759 v"+t+` v602 h84z +M347 1759 V0 h-84 V1759 v`+t+" v602 h84z";case"lparen":return`M863,9c0,-2,-2,-5,-6,-9c0,0,-17,0,-17,0c-12.7,0,-19.3,0.3,-20,1 +c-5.3,5.3,-10.3,11,-15,17c-242.7,294.7,-395.3,682,-458,1162c-21.3,163.3,-33.3,349, +-36,557 l0,`+(t+84)+`c0.2,6,0,26,0,60c2,159.3,10,310.7,24,454c53.3,528,210, +949.7,470,1265c4.7,6,9.7,11.7,15,17c0.7,0.7,7,1,19,1c0,0,18,0,18,0c4,-4,6,-7,6,-9 +c0,-2.7,-3.3,-8.7,-10,-18c-135.3,-192.7,-235.5,-414.3,-300.5,-665c-65,-250.7,-102.5, +-544.7,-112.5,-882c-2,-104,-3,-167,-3,-189 +l0,-`+(t+92)+`c0,-162.7,5.7,-314,17,-454c20.7,-272,63.7,-513,129,-723c65.3, +-210,155.3,-396.3,270,-559c6.7,-9.3,10,-15.3,10,-18z`;case"rparen":return`M76,0c-16.7,0,-25,3,-25,9c0,2,2,6.3,6,13c21.3,28.7,42.3,60.3, +63,95c96.7,156.7,172.8,332.5,228.5,527.5c55.7,195,92.8,416.5,111.5,664.5 +c11.3,139.3,17,290.7,17,454c0,28,1.7,43,3.3,45l0,`+(t+9)+` +c-3,4,-3.3,16.7,-3.3,38c0,162,-5.7,313.7,-17,455c-18.7,248,-55.8,469.3,-111.5,664 +c-55.7,194.7,-131.8,370.3,-228.5,527c-20.7,34.7,-41.7,66.3,-63,95c-2,3.3,-4,7,-6,11 +c0,7.3,5.7,11,17,11c0,0,11,0,11,0c9.3,0,14.3,-0.3,15,-1c5.3,-5.3,10.3,-11,15,-17 +c242.7,-294.7,395.3,-681.7,458,-1161c21.3,-164.7,33.3,-350.7,36,-558 +l0,-`+(t+144)+`c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949.7, +-470,-1265c-4.7,-6,-9.7,-11.7,-15,-17c-0.7,-0.7,-6.7,-1,-18,-1z`;default:throw new Error("Unknown stretchy delimiter.")}};class oe{constructor(e){this.children=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.children=e,this.classes=[],this.height=0,this.depth=0,this.maxFontSize=0,this.style={}}hasClass(e){return this.classes.includes(e)}toNode(){for(var e=document.createDocumentFragment(),t=0;tt.toText();return this.children.map(e).join("")}}var x0={"AMS-Regular":{32:[0,0,0,0,.25],65:[0,.68889,0,0,.72222],66:[0,.68889,0,0,.66667],67:[0,.68889,0,0,.72222],68:[0,.68889,0,0,.72222],69:[0,.68889,0,0,.66667],70:[0,.68889,0,0,.61111],71:[0,.68889,0,0,.77778],72:[0,.68889,0,0,.77778],73:[0,.68889,0,0,.38889],74:[.16667,.68889,0,0,.5],75:[0,.68889,0,0,.77778],76:[0,.68889,0,0,.66667],77:[0,.68889,0,0,.94445],78:[0,.68889,0,0,.72222],79:[.16667,.68889,0,0,.77778],80:[0,.68889,0,0,.61111],81:[.16667,.68889,0,0,.77778],82:[0,.68889,0,0,.72222],83:[0,.68889,0,0,.55556],84:[0,.68889,0,0,.66667],85:[0,.68889,0,0,.72222],86:[0,.68889,0,0,.72222],87:[0,.68889,0,0,1],88:[0,.68889,0,0,.72222],89:[0,.68889,0,0,.72222],90:[0,.68889,0,0,.66667],107:[0,.68889,0,0,.55556],160:[0,0,0,0,.25],165:[0,.675,.025,0,.75],174:[.15559,.69224,0,0,.94666],240:[0,.68889,0,0,.55556],295:[0,.68889,0,0,.54028],710:[0,.825,0,0,2.33334],732:[0,.9,0,0,2.33334],770:[0,.825,0,0,2.33334],771:[0,.9,0,0,2.33334],989:[.08167,.58167,0,0,.77778],1008:[0,.43056,.04028,0,.66667],8245:[0,.54986,0,0,.275],8463:[0,.68889,0,0,.54028],8487:[0,.68889,0,0,.72222],8498:[0,.68889,0,0,.55556],8502:[0,.68889,0,0,.66667],8503:[0,.68889,0,0,.44445],8504:[0,.68889,0,0,.66667],8513:[0,.68889,0,0,.63889],8592:[-.03598,.46402,0,0,.5],8594:[-.03598,.46402,0,0,.5],8602:[-.13313,.36687,0,0,1],8603:[-.13313,.36687,0,0,1],8606:[.01354,.52239,0,0,1],8608:[.01354,.52239,0,0,1],8610:[.01354,.52239,0,0,1.11111],8611:[.01354,.52239,0,0,1.11111],8619:[0,.54986,0,0,1],8620:[0,.54986,0,0,1],8621:[-.13313,.37788,0,0,1.38889],8622:[-.13313,.36687,0,0,1],8624:[0,.69224,0,0,.5],8625:[0,.69224,0,0,.5],8630:[0,.43056,0,0,1],8631:[0,.43056,0,0,1],8634:[.08198,.58198,0,0,.77778],8635:[.08198,.58198,0,0,.77778],8638:[.19444,.69224,0,0,.41667],8639:[.19444,.69224,0,0,.41667],8642:[.19444,.69224,0,0,.41667],8643:[.19444,.69224,0,0,.41667],8644:[.1808,.675,0,0,1],8646:[.1808,.675,0,0,1],8647:[.1808,.675,0,0,1],8648:[.19444,.69224,0,0,.83334],8649:[.1808,.675,0,0,1],8650:[.19444,.69224,0,0,.83334],8651:[.01354,.52239,0,0,1],8652:[.01354,.52239,0,0,1],8653:[-.13313,.36687,0,0,1],8654:[-.13313,.36687,0,0,1],8655:[-.13313,.36687,0,0,1],8666:[.13667,.63667,0,0,1],8667:[.13667,.63667,0,0,1],8669:[-.13313,.37788,0,0,1],8672:[-.064,.437,0,0,1.334],8674:[-.064,.437,0,0,1.334],8705:[0,.825,0,0,.5],8708:[0,.68889,0,0,.55556],8709:[.08167,.58167,0,0,.77778],8717:[0,.43056,0,0,.42917],8722:[-.03598,.46402,0,0,.5],8724:[.08198,.69224,0,0,.77778],8726:[.08167,.58167,0,0,.77778],8733:[0,.69224,0,0,.77778],8736:[0,.69224,0,0,.72222],8737:[0,.69224,0,0,.72222],8738:[.03517,.52239,0,0,.72222],8739:[.08167,.58167,0,0,.22222],8740:[.25142,.74111,0,0,.27778],8741:[.08167,.58167,0,0,.38889],8742:[.25142,.74111,0,0,.5],8756:[0,.69224,0,0,.66667],8757:[0,.69224,0,0,.66667],8764:[-.13313,.36687,0,0,.77778],8765:[-.13313,.37788,0,0,.77778],8769:[-.13313,.36687,0,0,.77778],8770:[-.03625,.46375,0,0,.77778],8774:[.30274,.79383,0,0,.77778],8776:[-.01688,.48312,0,0,.77778],8778:[.08167,.58167,0,0,.77778],8782:[.06062,.54986,0,0,.77778],8783:[.06062,.54986,0,0,.77778],8785:[.08198,.58198,0,0,.77778],8786:[.08198,.58198,0,0,.77778],8787:[.08198,.58198,0,0,.77778],8790:[0,.69224,0,0,.77778],8791:[.22958,.72958,0,0,.77778],8796:[.08198,.91667,0,0,.77778],8806:[.25583,.75583,0,0,.77778],8807:[.25583,.75583,0,0,.77778],8808:[.25142,.75726,0,0,.77778],8809:[.25142,.75726,0,0,.77778],8812:[.25583,.75583,0,0,.5],8814:[.20576,.70576,0,0,.77778],8815:[.20576,.70576,0,0,.77778],8816:[.30274,.79383,0,0,.77778],8817:[.30274,.79383,0,0,.77778],8818:[.22958,.72958,0,0,.77778],8819:[.22958,.72958,0,0,.77778],8822:[.1808,.675,0,0,.77778],8823:[.1808,.675,0,0,.77778],8828:[.13667,.63667,0,0,.77778],8829:[.13667,.63667,0,0,.77778],8830:[.22958,.72958,0,0,.77778],8831:[.22958,.72958,0,0,.77778],8832:[.20576,.70576,0,0,.77778],8833:[.20576,.70576,0,0,.77778],8840:[.30274,.79383,0,0,.77778],8841:[.30274,.79383,0,0,.77778],8842:[.13597,.63597,0,0,.77778],8843:[.13597,.63597,0,0,.77778],8847:[.03517,.54986,0,0,.77778],8848:[.03517,.54986,0,0,.77778],8858:[.08198,.58198,0,0,.77778],8859:[.08198,.58198,0,0,.77778],8861:[.08198,.58198,0,0,.77778],8862:[0,.675,0,0,.77778],8863:[0,.675,0,0,.77778],8864:[0,.675,0,0,.77778],8865:[0,.675,0,0,.77778],8872:[0,.69224,0,0,.61111],8873:[0,.69224,0,0,.72222],8874:[0,.69224,0,0,.88889],8876:[0,.68889,0,0,.61111],8877:[0,.68889,0,0,.61111],8878:[0,.68889,0,0,.72222],8879:[0,.68889,0,0,.72222],8882:[.03517,.54986,0,0,.77778],8883:[.03517,.54986,0,0,.77778],8884:[.13667,.63667,0,0,.77778],8885:[.13667,.63667,0,0,.77778],8888:[0,.54986,0,0,1.11111],8890:[.19444,.43056,0,0,.55556],8891:[.19444,.69224,0,0,.61111],8892:[.19444,.69224,0,0,.61111],8901:[0,.54986,0,0,.27778],8903:[.08167,.58167,0,0,.77778],8905:[.08167,.58167,0,0,.77778],8906:[.08167,.58167,0,0,.77778],8907:[0,.69224,0,0,.77778],8908:[0,.69224,0,0,.77778],8909:[-.03598,.46402,0,0,.77778],8910:[0,.54986,0,0,.76042],8911:[0,.54986,0,0,.76042],8912:[.03517,.54986,0,0,.77778],8913:[.03517,.54986,0,0,.77778],8914:[0,.54986,0,0,.66667],8915:[0,.54986,0,0,.66667],8916:[0,.69224,0,0,.66667],8918:[.0391,.5391,0,0,.77778],8919:[.0391,.5391,0,0,.77778],8920:[.03517,.54986,0,0,1.33334],8921:[.03517,.54986,0,0,1.33334],8922:[.38569,.88569,0,0,.77778],8923:[.38569,.88569,0,0,.77778],8926:[.13667,.63667,0,0,.77778],8927:[.13667,.63667,0,0,.77778],8928:[.30274,.79383,0,0,.77778],8929:[.30274,.79383,0,0,.77778],8934:[.23222,.74111,0,0,.77778],8935:[.23222,.74111,0,0,.77778],8936:[.23222,.74111,0,0,.77778],8937:[.23222,.74111,0,0,.77778],8938:[.20576,.70576,0,0,.77778],8939:[.20576,.70576,0,0,.77778],8940:[.30274,.79383,0,0,.77778],8941:[.30274,.79383,0,0,.77778],8994:[.19444,.69224,0,0,.77778],8995:[.19444,.69224,0,0,.77778],9416:[.15559,.69224,0,0,.90222],9484:[0,.69224,0,0,.5],9488:[0,.69224,0,0,.5],9492:[0,.37788,0,0,.5],9496:[0,.37788,0,0,.5],9585:[.19444,.68889,0,0,.88889],9586:[.19444,.74111,0,0,.88889],9632:[0,.675,0,0,.77778],9633:[0,.675,0,0,.77778],9650:[0,.54986,0,0,.72222],9651:[0,.54986,0,0,.72222],9654:[.03517,.54986,0,0,.77778],9660:[0,.54986,0,0,.72222],9661:[0,.54986,0,0,.72222],9664:[.03517,.54986,0,0,.77778],9674:[.11111,.69224,0,0,.66667],9733:[.19444,.69224,0,0,.94445],10003:[0,.69224,0,0,.83334],10016:[0,.69224,0,0,.83334],10731:[.11111,.69224,0,0,.66667],10846:[.19444,.75583,0,0,.61111],10877:[.13667,.63667,0,0,.77778],10878:[.13667,.63667,0,0,.77778],10885:[.25583,.75583,0,0,.77778],10886:[.25583,.75583,0,0,.77778],10887:[.13597,.63597,0,0,.77778],10888:[.13597,.63597,0,0,.77778],10889:[.26167,.75726,0,0,.77778],10890:[.26167,.75726,0,0,.77778],10891:[.48256,.98256,0,0,.77778],10892:[.48256,.98256,0,0,.77778],10901:[.13667,.63667,0,0,.77778],10902:[.13667,.63667,0,0,.77778],10933:[.25142,.75726,0,0,.77778],10934:[.25142,.75726,0,0,.77778],10935:[.26167,.75726,0,0,.77778],10936:[.26167,.75726,0,0,.77778],10937:[.26167,.75726,0,0,.77778],10938:[.26167,.75726,0,0,.77778],10949:[.25583,.75583,0,0,.77778],10950:[.25583,.75583,0,0,.77778],10955:[.28481,.79383,0,0,.77778],10956:[.28481,.79383,0,0,.77778],57350:[.08167,.58167,0,0,.22222],57351:[.08167,.58167,0,0,.38889],57352:[.08167,.58167,0,0,.77778],57353:[0,.43056,.04028,0,.66667],57356:[.25142,.75726,0,0,.77778],57357:[.25142,.75726,0,0,.77778],57358:[.41951,.91951,0,0,.77778],57359:[.30274,.79383,0,0,.77778],57360:[.30274,.79383,0,0,.77778],57361:[.41951,.91951,0,0,.77778],57366:[.25142,.75726,0,0,.77778],57367:[.25142,.75726,0,0,.77778],57368:[.25142,.75726,0,0,.77778],57369:[.25142,.75726,0,0,.77778],57370:[.13597,.63597,0,0,.77778],57371:[.13597,.63597,0,0,.77778]},"Caligraphic-Regular":{32:[0,0,0,0,.25],65:[0,.68333,0,.19445,.79847],66:[0,.68333,.03041,.13889,.65681],67:[0,.68333,.05834,.13889,.52653],68:[0,.68333,.02778,.08334,.77139],69:[0,.68333,.08944,.11111,.52778],70:[0,.68333,.09931,.11111,.71875],71:[.09722,.68333,.0593,.11111,.59487],72:[0,.68333,.00965,.11111,.84452],73:[0,.68333,.07382,0,.54452],74:[.09722,.68333,.18472,.16667,.67778],75:[0,.68333,.01445,.05556,.76195],76:[0,.68333,0,.13889,.68972],77:[0,.68333,0,.13889,1.2009],78:[0,.68333,.14736,.08334,.82049],79:[0,.68333,.02778,.11111,.79611],80:[0,.68333,.08222,.08334,.69556],81:[.09722,.68333,0,.11111,.81667],82:[0,.68333,0,.08334,.8475],83:[0,.68333,.075,.13889,.60556],84:[0,.68333,.25417,0,.54464],85:[0,.68333,.09931,.08334,.62583],86:[0,.68333,.08222,0,.61278],87:[0,.68333,.08222,.08334,.98778],88:[0,.68333,.14643,.13889,.7133],89:[.09722,.68333,.08222,.08334,.66834],90:[0,.68333,.07944,.13889,.72473],160:[0,0,0,0,.25]},"Fraktur-Regular":{32:[0,0,0,0,.25],33:[0,.69141,0,0,.29574],34:[0,.69141,0,0,.21471],38:[0,.69141,0,0,.73786],39:[0,.69141,0,0,.21201],40:[.24982,.74947,0,0,.38865],41:[.24982,.74947,0,0,.38865],42:[0,.62119,0,0,.27764],43:[.08319,.58283,0,0,.75623],44:[0,.10803,0,0,.27764],45:[.08319,.58283,0,0,.75623],46:[0,.10803,0,0,.27764],47:[.24982,.74947,0,0,.50181],48:[0,.47534,0,0,.50181],49:[0,.47534,0,0,.50181],50:[0,.47534,0,0,.50181],51:[.18906,.47534,0,0,.50181],52:[.18906,.47534,0,0,.50181],53:[.18906,.47534,0,0,.50181],54:[0,.69141,0,0,.50181],55:[.18906,.47534,0,0,.50181],56:[0,.69141,0,0,.50181],57:[.18906,.47534,0,0,.50181],58:[0,.47534,0,0,.21606],59:[.12604,.47534,0,0,.21606],61:[-.13099,.36866,0,0,.75623],63:[0,.69141,0,0,.36245],65:[0,.69141,0,0,.7176],66:[0,.69141,0,0,.88397],67:[0,.69141,0,0,.61254],68:[0,.69141,0,0,.83158],69:[0,.69141,0,0,.66278],70:[.12604,.69141,0,0,.61119],71:[0,.69141,0,0,.78539],72:[.06302,.69141,0,0,.7203],73:[0,.69141,0,0,.55448],74:[.12604,.69141,0,0,.55231],75:[0,.69141,0,0,.66845],76:[0,.69141,0,0,.66602],77:[0,.69141,0,0,1.04953],78:[0,.69141,0,0,.83212],79:[0,.69141,0,0,.82699],80:[.18906,.69141,0,0,.82753],81:[.03781,.69141,0,0,.82699],82:[0,.69141,0,0,.82807],83:[0,.69141,0,0,.82861],84:[0,.69141,0,0,.66899],85:[0,.69141,0,0,.64576],86:[0,.69141,0,0,.83131],87:[0,.69141,0,0,1.04602],88:[0,.69141,0,0,.71922],89:[.18906,.69141,0,0,.83293],90:[.12604,.69141,0,0,.60201],91:[.24982,.74947,0,0,.27764],93:[.24982,.74947,0,0,.27764],94:[0,.69141,0,0,.49965],97:[0,.47534,0,0,.50046],98:[0,.69141,0,0,.51315],99:[0,.47534,0,0,.38946],100:[0,.62119,0,0,.49857],101:[0,.47534,0,0,.40053],102:[.18906,.69141,0,0,.32626],103:[.18906,.47534,0,0,.5037],104:[.18906,.69141,0,0,.52126],105:[0,.69141,0,0,.27899],106:[0,.69141,0,0,.28088],107:[0,.69141,0,0,.38946],108:[0,.69141,0,0,.27953],109:[0,.47534,0,0,.76676],110:[0,.47534,0,0,.52666],111:[0,.47534,0,0,.48885],112:[.18906,.52396,0,0,.50046],113:[.18906,.47534,0,0,.48912],114:[0,.47534,0,0,.38919],115:[0,.47534,0,0,.44266],116:[0,.62119,0,0,.33301],117:[0,.47534,0,0,.5172],118:[0,.52396,0,0,.5118],119:[0,.52396,0,0,.77351],120:[.18906,.47534,0,0,.38865],121:[.18906,.47534,0,0,.49884],122:[.18906,.47534,0,0,.39054],160:[0,0,0,0,.25],8216:[0,.69141,0,0,.21471],8217:[0,.69141,0,0,.21471],58112:[0,.62119,0,0,.49749],58113:[0,.62119,0,0,.4983],58114:[.18906,.69141,0,0,.33328],58115:[.18906,.69141,0,0,.32923],58116:[.18906,.47534,0,0,.50343],58117:[0,.69141,0,0,.33301],58118:[0,.62119,0,0,.33409],58119:[0,.47534,0,0,.50073]},"Main-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.35],34:[0,.69444,0,0,.60278],35:[.19444,.69444,0,0,.95833],36:[.05556,.75,0,0,.575],37:[.05556,.75,0,0,.95833],38:[0,.69444,0,0,.89444],39:[0,.69444,0,0,.31944],40:[.25,.75,0,0,.44722],41:[.25,.75,0,0,.44722],42:[0,.75,0,0,.575],43:[.13333,.63333,0,0,.89444],44:[.19444,.15556,0,0,.31944],45:[0,.44444,0,0,.38333],46:[0,.15556,0,0,.31944],47:[.25,.75,0,0,.575],48:[0,.64444,0,0,.575],49:[0,.64444,0,0,.575],50:[0,.64444,0,0,.575],51:[0,.64444,0,0,.575],52:[0,.64444,0,0,.575],53:[0,.64444,0,0,.575],54:[0,.64444,0,0,.575],55:[0,.64444,0,0,.575],56:[0,.64444,0,0,.575],57:[0,.64444,0,0,.575],58:[0,.44444,0,0,.31944],59:[.19444,.44444,0,0,.31944],60:[.08556,.58556,0,0,.89444],61:[-.10889,.39111,0,0,.89444],62:[.08556,.58556,0,0,.89444],63:[0,.69444,0,0,.54305],64:[0,.69444,0,0,.89444],65:[0,.68611,0,0,.86944],66:[0,.68611,0,0,.81805],67:[0,.68611,0,0,.83055],68:[0,.68611,0,0,.88194],69:[0,.68611,0,0,.75555],70:[0,.68611,0,0,.72361],71:[0,.68611,0,0,.90416],72:[0,.68611,0,0,.9],73:[0,.68611,0,0,.43611],74:[0,.68611,0,0,.59444],75:[0,.68611,0,0,.90138],76:[0,.68611,0,0,.69166],77:[0,.68611,0,0,1.09166],78:[0,.68611,0,0,.9],79:[0,.68611,0,0,.86388],80:[0,.68611,0,0,.78611],81:[.19444,.68611,0,0,.86388],82:[0,.68611,0,0,.8625],83:[0,.68611,0,0,.63889],84:[0,.68611,0,0,.8],85:[0,.68611,0,0,.88472],86:[0,.68611,.01597,0,.86944],87:[0,.68611,.01597,0,1.18888],88:[0,.68611,0,0,.86944],89:[0,.68611,.02875,0,.86944],90:[0,.68611,0,0,.70277],91:[.25,.75,0,0,.31944],92:[.25,.75,0,0,.575],93:[.25,.75,0,0,.31944],94:[0,.69444,0,0,.575],95:[.31,.13444,.03194,0,.575],97:[0,.44444,0,0,.55902],98:[0,.69444,0,0,.63889],99:[0,.44444,0,0,.51111],100:[0,.69444,0,0,.63889],101:[0,.44444,0,0,.52708],102:[0,.69444,.10903,0,.35139],103:[.19444,.44444,.01597,0,.575],104:[0,.69444,0,0,.63889],105:[0,.69444,0,0,.31944],106:[.19444,.69444,0,0,.35139],107:[0,.69444,0,0,.60694],108:[0,.69444,0,0,.31944],109:[0,.44444,0,0,.95833],110:[0,.44444,0,0,.63889],111:[0,.44444,0,0,.575],112:[.19444,.44444,0,0,.63889],113:[.19444,.44444,0,0,.60694],114:[0,.44444,0,0,.47361],115:[0,.44444,0,0,.45361],116:[0,.63492,0,0,.44722],117:[0,.44444,0,0,.63889],118:[0,.44444,.01597,0,.60694],119:[0,.44444,.01597,0,.83055],120:[0,.44444,0,0,.60694],121:[.19444,.44444,.01597,0,.60694],122:[0,.44444,0,0,.51111],123:[.25,.75,0,0,.575],124:[.25,.75,0,0,.31944],125:[.25,.75,0,0,.575],126:[.35,.34444,0,0,.575],160:[0,0,0,0,.25],163:[0,.69444,0,0,.86853],168:[0,.69444,0,0,.575],172:[0,.44444,0,0,.76666],176:[0,.69444,0,0,.86944],177:[.13333,.63333,0,0,.89444],184:[.17014,0,0,0,.51111],198:[0,.68611,0,0,1.04166],215:[.13333,.63333,0,0,.89444],216:[.04861,.73472,0,0,.89444],223:[0,.69444,0,0,.59722],230:[0,.44444,0,0,.83055],247:[.13333,.63333,0,0,.89444],248:[.09722,.54167,0,0,.575],305:[0,.44444,0,0,.31944],338:[0,.68611,0,0,1.16944],339:[0,.44444,0,0,.89444],567:[.19444,.44444,0,0,.35139],710:[0,.69444,0,0,.575],711:[0,.63194,0,0,.575],713:[0,.59611,0,0,.575],714:[0,.69444,0,0,.575],715:[0,.69444,0,0,.575],728:[0,.69444,0,0,.575],729:[0,.69444,0,0,.31944],730:[0,.69444,0,0,.86944],732:[0,.69444,0,0,.575],733:[0,.69444,0,0,.575],915:[0,.68611,0,0,.69166],916:[0,.68611,0,0,.95833],920:[0,.68611,0,0,.89444],923:[0,.68611,0,0,.80555],926:[0,.68611,0,0,.76666],928:[0,.68611,0,0,.9],931:[0,.68611,0,0,.83055],933:[0,.68611,0,0,.89444],934:[0,.68611,0,0,.83055],936:[0,.68611,0,0,.89444],937:[0,.68611,0,0,.83055],8211:[0,.44444,.03194,0,.575],8212:[0,.44444,.03194,0,1.14999],8216:[0,.69444,0,0,.31944],8217:[0,.69444,0,0,.31944],8220:[0,.69444,0,0,.60278],8221:[0,.69444,0,0,.60278],8224:[.19444,.69444,0,0,.51111],8225:[.19444,.69444,0,0,.51111],8242:[0,.55556,0,0,.34444],8407:[0,.72444,.15486,0,.575],8463:[0,.69444,0,0,.66759],8465:[0,.69444,0,0,.83055],8467:[0,.69444,0,0,.47361],8472:[.19444,.44444,0,0,.74027],8476:[0,.69444,0,0,.83055],8501:[0,.69444,0,0,.70277],8592:[-.10889,.39111,0,0,1.14999],8593:[.19444,.69444,0,0,.575],8594:[-.10889,.39111,0,0,1.14999],8595:[.19444,.69444,0,0,.575],8596:[-.10889,.39111,0,0,1.14999],8597:[.25,.75,0,0,.575],8598:[.19444,.69444,0,0,1.14999],8599:[.19444,.69444,0,0,1.14999],8600:[.19444,.69444,0,0,1.14999],8601:[.19444,.69444,0,0,1.14999],8636:[-.10889,.39111,0,0,1.14999],8637:[-.10889,.39111,0,0,1.14999],8640:[-.10889,.39111,0,0,1.14999],8641:[-.10889,.39111,0,0,1.14999],8656:[-.10889,.39111,0,0,1.14999],8657:[.19444,.69444,0,0,.70277],8658:[-.10889,.39111,0,0,1.14999],8659:[.19444,.69444,0,0,.70277],8660:[-.10889,.39111,0,0,1.14999],8661:[.25,.75,0,0,.70277],8704:[0,.69444,0,0,.63889],8706:[0,.69444,.06389,0,.62847],8707:[0,.69444,0,0,.63889],8709:[.05556,.75,0,0,.575],8711:[0,.68611,0,0,.95833],8712:[.08556,.58556,0,0,.76666],8715:[.08556,.58556,0,0,.76666],8722:[.13333,.63333,0,0,.89444],8723:[.13333,.63333,0,0,.89444],8725:[.25,.75,0,0,.575],8726:[.25,.75,0,0,.575],8727:[-.02778,.47222,0,0,.575],8728:[-.02639,.47361,0,0,.575],8729:[-.02639,.47361,0,0,.575],8730:[.18,.82,0,0,.95833],8733:[0,.44444,0,0,.89444],8734:[0,.44444,0,0,1.14999],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.31944],8741:[.25,.75,0,0,.575],8743:[0,.55556,0,0,.76666],8744:[0,.55556,0,0,.76666],8745:[0,.55556,0,0,.76666],8746:[0,.55556,0,0,.76666],8747:[.19444,.69444,.12778,0,.56875],8764:[-.10889,.39111,0,0,.89444],8768:[.19444,.69444,0,0,.31944],8771:[.00222,.50222,0,0,.89444],8773:[.027,.638,0,0,.894],8776:[.02444,.52444,0,0,.89444],8781:[.00222,.50222,0,0,.89444],8801:[.00222,.50222,0,0,.89444],8804:[.19667,.69667,0,0,.89444],8805:[.19667,.69667,0,0,.89444],8810:[.08556,.58556,0,0,1.14999],8811:[.08556,.58556,0,0,1.14999],8826:[.08556,.58556,0,0,.89444],8827:[.08556,.58556,0,0,.89444],8834:[.08556,.58556,0,0,.89444],8835:[.08556,.58556,0,0,.89444],8838:[.19667,.69667,0,0,.89444],8839:[.19667,.69667,0,0,.89444],8846:[0,.55556,0,0,.76666],8849:[.19667,.69667,0,0,.89444],8850:[.19667,.69667,0,0,.89444],8851:[0,.55556,0,0,.76666],8852:[0,.55556,0,0,.76666],8853:[.13333,.63333,0,0,.89444],8854:[.13333,.63333,0,0,.89444],8855:[.13333,.63333,0,0,.89444],8856:[.13333,.63333,0,0,.89444],8857:[.13333,.63333,0,0,.89444],8866:[0,.69444,0,0,.70277],8867:[0,.69444,0,0,.70277],8868:[0,.69444,0,0,.89444],8869:[0,.69444,0,0,.89444],8900:[-.02639,.47361,0,0,.575],8901:[-.02639,.47361,0,0,.31944],8902:[-.02778,.47222,0,0,.575],8968:[.25,.75,0,0,.51111],8969:[.25,.75,0,0,.51111],8970:[.25,.75,0,0,.51111],8971:[.25,.75,0,0,.51111],8994:[-.13889,.36111,0,0,1.14999],8995:[-.13889,.36111,0,0,1.14999],9651:[.19444,.69444,0,0,1.02222],9657:[-.02778,.47222,0,0,.575],9661:[.19444,.69444,0,0,1.02222],9667:[-.02778,.47222,0,0,.575],9711:[.19444,.69444,0,0,1.14999],9824:[.12963,.69444,0,0,.89444],9825:[.12963,.69444,0,0,.89444],9826:[.12963,.69444,0,0,.89444],9827:[.12963,.69444,0,0,.89444],9837:[0,.75,0,0,.44722],9838:[.19444,.69444,0,0,.44722],9839:[.19444,.69444,0,0,.44722],10216:[.25,.75,0,0,.44722],10217:[.25,.75,0,0,.44722],10815:[0,.68611,0,0,.9],10927:[.19667,.69667,0,0,.89444],10928:[.19667,.69667,0,0,.89444],57376:[.19444,.69444,0,0,0]},"Main-BoldItalic":{32:[0,0,0,0,.25],33:[0,.69444,.11417,0,.38611],34:[0,.69444,.07939,0,.62055],35:[.19444,.69444,.06833,0,.94444],37:[.05556,.75,.12861,0,.94444],38:[0,.69444,.08528,0,.88555],39:[0,.69444,.12945,0,.35555],40:[.25,.75,.15806,0,.47333],41:[.25,.75,.03306,0,.47333],42:[0,.75,.14333,0,.59111],43:[.10333,.60333,.03306,0,.88555],44:[.19444,.14722,0,0,.35555],45:[0,.44444,.02611,0,.41444],46:[0,.14722,0,0,.35555],47:[.25,.75,.15806,0,.59111],48:[0,.64444,.13167,0,.59111],49:[0,.64444,.13167,0,.59111],50:[0,.64444,.13167,0,.59111],51:[0,.64444,.13167,0,.59111],52:[.19444,.64444,.13167,0,.59111],53:[0,.64444,.13167,0,.59111],54:[0,.64444,.13167,0,.59111],55:[.19444,.64444,.13167,0,.59111],56:[0,.64444,.13167,0,.59111],57:[0,.64444,.13167,0,.59111],58:[0,.44444,.06695,0,.35555],59:[.19444,.44444,.06695,0,.35555],61:[-.10889,.39111,.06833,0,.88555],63:[0,.69444,.11472,0,.59111],64:[0,.69444,.09208,0,.88555],65:[0,.68611,0,0,.86555],66:[0,.68611,.0992,0,.81666],67:[0,.68611,.14208,0,.82666],68:[0,.68611,.09062,0,.87555],69:[0,.68611,.11431,0,.75666],70:[0,.68611,.12903,0,.72722],71:[0,.68611,.07347,0,.89527],72:[0,.68611,.17208,0,.8961],73:[0,.68611,.15681,0,.47166],74:[0,.68611,.145,0,.61055],75:[0,.68611,.14208,0,.89499],76:[0,.68611,0,0,.69777],77:[0,.68611,.17208,0,1.07277],78:[0,.68611,.17208,0,.8961],79:[0,.68611,.09062,0,.85499],80:[0,.68611,.0992,0,.78721],81:[.19444,.68611,.09062,0,.85499],82:[0,.68611,.02559,0,.85944],83:[0,.68611,.11264,0,.64999],84:[0,.68611,.12903,0,.7961],85:[0,.68611,.17208,0,.88083],86:[0,.68611,.18625,0,.86555],87:[0,.68611,.18625,0,1.15999],88:[0,.68611,.15681,0,.86555],89:[0,.68611,.19803,0,.86555],90:[0,.68611,.14208,0,.70888],91:[.25,.75,.1875,0,.35611],93:[.25,.75,.09972,0,.35611],94:[0,.69444,.06709,0,.59111],95:[.31,.13444,.09811,0,.59111],97:[0,.44444,.09426,0,.59111],98:[0,.69444,.07861,0,.53222],99:[0,.44444,.05222,0,.53222],100:[0,.69444,.10861,0,.59111],101:[0,.44444,.085,0,.53222],102:[.19444,.69444,.21778,0,.4],103:[.19444,.44444,.105,0,.53222],104:[0,.69444,.09426,0,.59111],105:[0,.69326,.11387,0,.35555],106:[.19444,.69326,.1672,0,.35555],107:[0,.69444,.11111,0,.53222],108:[0,.69444,.10861,0,.29666],109:[0,.44444,.09426,0,.94444],110:[0,.44444,.09426,0,.64999],111:[0,.44444,.07861,0,.59111],112:[.19444,.44444,.07861,0,.59111],113:[.19444,.44444,.105,0,.53222],114:[0,.44444,.11111,0,.50167],115:[0,.44444,.08167,0,.48694],116:[0,.63492,.09639,0,.385],117:[0,.44444,.09426,0,.62055],118:[0,.44444,.11111,0,.53222],119:[0,.44444,.11111,0,.76777],120:[0,.44444,.12583,0,.56055],121:[.19444,.44444,.105,0,.56166],122:[0,.44444,.13889,0,.49055],126:[.35,.34444,.11472,0,.59111],160:[0,0,0,0,.25],168:[0,.69444,.11473,0,.59111],176:[0,.69444,0,0,.94888],184:[.17014,0,0,0,.53222],198:[0,.68611,.11431,0,1.02277],216:[.04861,.73472,.09062,0,.88555],223:[.19444,.69444,.09736,0,.665],230:[0,.44444,.085,0,.82666],248:[.09722,.54167,.09458,0,.59111],305:[0,.44444,.09426,0,.35555],338:[0,.68611,.11431,0,1.14054],339:[0,.44444,.085,0,.82666],567:[.19444,.44444,.04611,0,.385],710:[0,.69444,.06709,0,.59111],711:[0,.63194,.08271,0,.59111],713:[0,.59444,.10444,0,.59111],714:[0,.69444,.08528,0,.59111],715:[0,.69444,0,0,.59111],728:[0,.69444,.10333,0,.59111],729:[0,.69444,.12945,0,.35555],730:[0,.69444,0,0,.94888],732:[0,.69444,.11472,0,.59111],733:[0,.69444,.11472,0,.59111],915:[0,.68611,.12903,0,.69777],916:[0,.68611,0,0,.94444],920:[0,.68611,.09062,0,.88555],923:[0,.68611,0,0,.80666],926:[0,.68611,.15092,0,.76777],928:[0,.68611,.17208,0,.8961],931:[0,.68611,.11431,0,.82666],933:[0,.68611,.10778,0,.88555],934:[0,.68611,.05632,0,.82666],936:[0,.68611,.10778,0,.88555],937:[0,.68611,.0992,0,.82666],8211:[0,.44444,.09811,0,.59111],8212:[0,.44444,.09811,0,1.18221],8216:[0,.69444,.12945,0,.35555],8217:[0,.69444,.12945,0,.35555],8220:[0,.69444,.16772,0,.62055],8221:[0,.69444,.07939,0,.62055]},"Main-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.12417,0,.30667],34:[0,.69444,.06961,0,.51444],35:[.19444,.69444,.06616,0,.81777],37:[.05556,.75,.13639,0,.81777],38:[0,.69444,.09694,0,.76666],39:[0,.69444,.12417,0,.30667],40:[.25,.75,.16194,0,.40889],41:[.25,.75,.03694,0,.40889],42:[0,.75,.14917,0,.51111],43:[.05667,.56167,.03694,0,.76666],44:[.19444,.10556,0,0,.30667],45:[0,.43056,.02826,0,.35778],46:[0,.10556,0,0,.30667],47:[.25,.75,.16194,0,.51111],48:[0,.64444,.13556,0,.51111],49:[0,.64444,.13556,0,.51111],50:[0,.64444,.13556,0,.51111],51:[0,.64444,.13556,0,.51111],52:[.19444,.64444,.13556,0,.51111],53:[0,.64444,.13556,0,.51111],54:[0,.64444,.13556,0,.51111],55:[.19444,.64444,.13556,0,.51111],56:[0,.64444,.13556,0,.51111],57:[0,.64444,.13556,0,.51111],58:[0,.43056,.0582,0,.30667],59:[.19444,.43056,.0582,0,.30667],61:[-.13313,.36687,.06616,0,.76666],63:[0,.69444,.1225,0,.51111],64:[0,.69444,.09597,0,.76666],65:[0,.68333,0,0,.74333],66:[0,.68333,.10257,0,.70389],67:[0,.68333,.14528,0,.71555],68:[0,.68333,.09403,0,.755],69:[0,.68333,.12028,0,.67833],70:[0,.68333,.13305,0,.65277],71:[0,.68333,.08722,0,.77361],72:[0,.68333,.16389,0,.74333],73:[0,.68333,.15806,0,.38555],74:[0,.68333,.14028,0,.525],75:[0,.68333,.14528,0,.76888],76:[0,.68333,0,0,.62722],77:[0,.68333,.16389,0,.89666],78:[0,.68333,.16389,0,.74333],79:[0,.68333,.09403,0,.76666],80:[0,.68333,.10257,0,.67833],81:[.19444,.68333,.09403,0,.76666],82:[0,.68333,.03868,0,.72944],83:[0,.68333,.11972,0,.56222],84:[0,.68333,.13305,0,.71555],85:[0,.68333,.16389,0,.74333],86:[0,.68333,.18361,0,.74333],87:[0,.68333,.18361,0,.99888],88:[0,.68333,.15806,0,.74333],89:[0,.68333,.19383,0,.74333],90:[0,.68333,.14528,0,.61333],91:[.25,.75,.1875,0,.30667],93:[.25,.75,.10528,0,.30667],94:[0,.69444,.06646,0,.51111],95:[.31,.12056,.09208,0,.51111],97:[0,.43056,.07671,0,.51111],98:[0,.69444,.06312,0,.46],99:[0,.43056,.05653,0,.46],100:[0,.69444,.10333,0,.51111],101:[0,.43056,.07514,0,.46],102:[.19444,.69444,.21194,0,.30667],103:[.19444,.43056,.08847,0,.46],104:[0,.69444,.07671,0,.51111],105:[0,.65536,.1019,0,.30667],106:[.19444,.65536,.14467,0,.30667],107:[0,.69444,.10764,0,.46],108:[0,.69444,.10333,0,.25555],109:[0,.43056,.07671,0,.81777],110:[0,.43056,.07671,0,.56222],111:[0,.43056,.06312,0,.51111],112:[.19444,.43056,.06312,0,.51111],113:[.19444,.43056,.08847,0,.46],114:[0,.43056,.10764,0,.42166],115:[0,.43056,.08208,0,.40889],116:[0,.61508,.09486,0,.33222],117:[0,.43056,.07671,0,.53666],118:[0,.43056,.10764,0,.46],119:[0,.43056,.10764,0,.66444],120:[0,.43056,.12042,0,.46389],121:[.19444,.43056,.08847,0,.48555],122:[0,.43056,.12292,0,.40889],126:[.35,.31786,.11585,0,.51111],160:[0,0,0,0,.25],168:[0,.66786,.10474,0,.51111],176:[0,.69444,0,0,.83129],184:[.17014,0,0,0,.46],198:[0,.68333,.12028,0,.88277],216:[.04861,.73194,.09403,0,.76666],223:[.19444,.69444,.10514,0,.53666],230:[0,.43056,.07514,0,.71555],248:[.09722,.52778,.09194,0,.51111],338:[0,.68333,.12028,0,.98499],339:[0,.43056,.07514,0,.71555],710:[0,.69444,.06646,0,.51111],711:[0,.62847,.08295,0,.51111],713:[0,.56167,.10333,0,.51111],714:[0,.69444,.09694,0,.51111],715:[0,.69444,0,0,.51111],728:[0,.69444,.10806,0,.51111],729:[0,.66786,.11752,0,.30667],730:[0,.69444,0,0,.83129],732:[0,.66786,.11585,0,.51111],733:[0,.69444,.1225,0,.51111],915:[0,.68333,.13305,0,.62722],916:[0,.68333,0,0,.81777],920:[0,.68333,.09403,0,.76666],923:[0,.68333,0,0,.69222],926:[0,.68333,.15294,0,.66444],928:[0,.68333,.16389,0,.74333],931:[0,.68333,.12028,0,.71555],933:[0,.68333,.11111,0,.76666],934:[0,.68333,.05986,0,.71555],936:[0,.68333,.11111,0,.76666],937:[0,.68333,.10257,0,.71555],8211:[0,.43056,.09208,0,.51111],8212:[0,.43056,.09208,0,1.02222],8216:[0,.69444,.12417,0,.30667],8217:[0,.69444,.12417,0,.30667],8220:[0,.69444,.1685,0,.51444],8221:[0,.69444,.06961,0,.51444],8463:[0,.68889,0,0,.54028]},"Main-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.27778],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.77778],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.19444,.10556,0,0,.27778],45:[0,.43056,0,0,.33333],46:[0,.10556,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.64444,0,0,.5],49:[0,.64444,0,0,.5],50:[0,.64444,0,0,.5],51:[0,.64444,0,0,.5],52:[0,.64444,0,0,.5],53:[0,.64444,0,0,.5],54:[0,.64444,0,0,.5],55:[0,.64444,0,0,.5],56:[0,.64444,0,0,.5],57:[0,.64444,0,0,.5],58:[0,.43056,0,0,.27778],59:[.19444,.43056,0,0,.27778],60:[.0391,.5391,0,0,.77778],61:[-.13313,.36687,0,0,.77778],62:[.0391,.5391,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.77778],65:[0,.68333,0,0,.75],66:[0,.68333,0,0,.70834],67:[0,.68333,0,0,.72222],68:[0,.68333,0,0,.76389],69:[0,.68333,0,0,.68056],70:[0,.68333,0,0,.65278],71:[0,.68333,0,0,.78472],72:[0,.68333,0,0,.75],73:[0,.68333,0,0,.36111],74:[0,.68333,0,0,.51389],75:[0,.68333,0,0,.77778],76:[0,.68333,0,0,.625],77:[0,.68333,0,0,.91667],78:[0,.68333,0,0,.75],79:[0,.68333,0,0,.77778],80:[0,.68333,0,0,.68056],81:[.19444,.68333,0,0,.77778],82:[0,.68333,0,0,.73611],83:[0,.68333,0,0,.55556],84:[0,.68333,0,0,.72222],85:[0,.68333,0,0,.75],86:[0,.68333,.01389,0,.75],87:[0,.68333,.01389,0,1.02778],88:[0,.68333,0,0,.75],89:[0,.68333,.025,0,.75],90:[0,.68333,0,0,.61111],91:[.25,.75,0,0,.27778],92:[.25,.75,0,0,.5],93:[.25,.75,0,0,.27778],94:[0,.69444,0,0,.5],95:[.31,.12056,.02778,0,.5],97:[0,.43056,0,0,.5],98:[0,.69444,0,0,.55556],99:[0,.43056,0,0,.44445],100:[0,.69444,0,0,.55556],101:[0,.43056,0,0,.44445],102:[0,.69444,.07778,0,.30556],103:[.19444,.43056,.01389,0,.5],104:[0,.69444,0,0,.55556],105:[0,.66786,0,0,.27778],106:[.19444,.66786,0,0,.30556],107:[0,.69444,0,0,.52778],108:[0,.69444,0,0,.27778],109:[0,.43056,0,0,.83334],110:[0,.43056,0,0,.55556],111:[0,.43056,0,0,.5],112:[.19444,.43056,0,0,.55556],113:[.19444,.43056,0,0,.52778],114:[0,.43056,0,0,.39167],115:[0,.43056,0,0,.39445],116:[0,.61508,0,0,.38889],117:[0,.43056,0,0,.55556],118:[0,.43056,.01389,0,.52778],119:[0,.43056,.01389,0,.72222],120:[0,.43056,0,0,.52778],121:[.19444,.43056,.01389,0,.52778],122:[0,.43056,0,0,.44445],123:[.25,.75,0,0,.5],124:[.25,.75,0,0,.27778],125:[.25,.75,0,0,.5],126:[.35,.31786,0,0,.5],160:[0,0,0,0,.25],163:[0,.69444,0,0,.76909],167:[.19444,.69444,0,0,.44445],168:[0,.66786,0,0,.5],172:[0,.43056,0,0,.66667],176:[0,.69444,0,0,.75],177:[.08333,.58333,0,0,.77778],182:[.19444,.69444,0,0,.61111],184:[.17014,0,0,0,.44445],198:[0,.68333,0,0,.90278],215:[.08333,.58333,0,0,.77778],216:[.04861,.73194,0,0,.77778],223:[0,.69444,0,0,.5],230:[0,.43056,0,0,.72222],247:[.08333,.58333,0,0,.77778],248:[.09722,.52778,0,0,.5],305:[0,.43056,0,0,.27778],338:[0,.68333,0,0,1.01389],339:[0,.43056,0,0,.77778],567:[.19444,.43056,0,0,.30556],710:[0,.69444,0,0,.5],711:[0,.62847,0,0,.5],713:[0,.56778,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.66786,0,0,.27778],730:[0,.69444,0,0,.75],732:[0,.66786,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.68333,0,0,.625],916:[0,.68333,0,0,.83334],920:[0,.68333,0,0,.77778],923:[0,.68333,0,0,.69445],926:[0,.68333,0,0,.66667],928:[0,.68333,0,0,.75],931:[0,.68333,0,0,.72222],933:[0,.68333,0,0,.77778],934:[0,.68333,0,0,.72222],936:[0,.68333,0,0,.77778],937:[0,.68333,0,0,.72222],8211:[0,.43056,.02778,0,.5],8212:[0,.43056,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5],8224:[.19444,.69444,0,0,.44445],8225:[.19444,.69444,0,0,.44445],8230:[0,.123,0,0,1.172],8242:[0,.55556,0,0,.275],8407:[0,.71444,.15382,0,.5],8463:[0,.68889,0,0,.54028],8465:[0,.69444,0,0,.72222],8467:[0,.69444,0,.11111,.41667],8472:[.19444,.43056,0,.11111,.63646],8476:[0,.69444,0,0,.72222],8501:[0,.69444,0,0,.61111],8592:[-.13313,.36687,0,0,1],8593:[.19444,.69444,0,0,.5],8594:[-.13313,.36687,0,0,1],8595:[.19444,.69444,0,0,.5],8596:[-.13313,.36687,0,0,1],8597:[.25,.75,0,0,.5],8598:[.19444,.69444,0,0,1],8599:[.19444,.69444,0,0,1],8600:[.19444,.69444,0,0,1],8601:[.19444,.69444,0,0,1],8614:[.011,.511,0,0,1],8617:[.011,.511,0,0,1.126],8618:[.011,.511,0,0,1.126],8636:[-.13313,.36687,0,0,1],8637:[-.13313,.36687,0,0,1],8640:[-.13313,.36687,0,0,1],8641:[-.13313,.36687,0,0,1],8652:[.011,.671,0,0,1],8656:[-.13313,.36687,0,0,1],8657:[.19444,.69444,0,0,.61111],8658:[-.13313,.36687,0,0,1],8659:[.19444,.69444,0,0,.61111],8660:[-.13313,.36687,0,0,1],8661:[.25,.75,0,0,.61111],8704:[0,.69444,0,0,.55556],8706:[0,.69444,.05556,.08334,.5309],8707:[0,.69444,0,0,.55556],8709:[.05556,.75,0,0,.5],8711:[0,.68333,0,0,.83334],8712:[.0391,.5391,0,0,.66667],8715:[.0391,.5391,0,0,.66667],8722:[.08333,.58333,0,0,.77778],8723:[.08333,.58333,0,0,.77778],8725:[.25,.75,0,0,.5],8726:[.25,.75,0,0,.5],8727:[-.03472,.46528,0,0,.5],8728:[-.05555,.44445,0,0,.5],8729:[-.05555,.44445,0,0,.5],8730:[.2,.8,0,0,.83334],8733:[0,.43056,0,0,.77778],8734:[0,.43056,0,0,1],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.27778],8741:[.25,.75,0,0,.5],8743:[0,.55556,0,0,.66667],8744:[0,.55556,0,0,.66667],8745:[0,.55556,0,0,.66667],8746:[0,.55556,0,0,.66667],8747:[.19444,.69444,.11111,0,.41667],8764:[-.13313,.36687,0,0,.77778],8768:[.19444,.69444,0,0,.27778],8771:[-.03625,.46375,0,0,.77778],8773:[-.022,.589,0,0,.778],8776:[-.01688,.48312,0,0,.77778],8781:[-.03625,.46375,0,0,.77778],8784:[-.133,.673,0,0,.778],8801:[-.03625,.46375,0,0,.77778],8804:[.13597,.63597,0,0,.77778],8805:[.13597,.63597,0,0,.77778],8810:[.0391,.5391,0,0,1],8811:[.0391,.5391,0,0,1],8826:[.0391,.5391,0,0,.77778],8827:[.0391,.5391,0,0,.77778],8834:[.0391,.5391,0,0,.77778],8835:[.0391,.5391,0,0,.77778],8838:[.13597,.63597,0,0,.77778],8839:[.13597,.63597,0,0,.77778],8846:[0,.55556,0,0,.66667],8849:[.13597,.63597,0,0,.77778],8850:[.13597,.63597,0,0,.77778],8851:[0,.55556,0,0,.66667],8852:[0,.55556,0,0,.66667],8853:[.08333,.58333,0,0,.77778],8854:[.08333,.58333,0,0,.77778],8855:[.08333,.58333,0,0,.77778],8856:[.08333,.58333,0,0,.77778],8857:[.08333,.58333,0,0,.77778],8866:[0,.69444,0,0,.61111],8867:[0,.69444,0,0,.61111],8868:[0,.69444,0,0,.77778],8869:[0,.69444,0,0,.77778],8872:[.249,.75,0,0,.867],8900:[-.05555,.44445,0,0,.5],8901:[-.05555,.44445,0,0,.27778],8902:[-.03472,.46528,0,0,.5],8904:[.005,.505,0,0,.9],8942:[.03,.903,0,0,.278],8943:[-.19,.313,0,0,1.172],8945:[-.1,.823,0,0,1.282],8968:[.25,.75,0,0,.44445],8969:[.25,.75,0,0,.44445],8970:[.25,.75,0,0,.44445],8971:[.25,.75,0,0,.44445],8994:[-.14236,.35764,0,0,1],8995:[-.14236,.35764,0,0,1],9136:[.244,.744,0,0,.412],9137:[.244,.745,0,0,.412],9651:[.19444,.69444,0,0,.88889],9657:[-.03472,.46528,0,0,.5],9661:[.19444,.69444,0,0,.88889],9667:[-.03472,.46528,0,0,.5],9711:[.19444,.69444,0,0,1],9824:[.12963,.69444,0,0,.77778],9825:[.12963,.69444,0,0,.77778],9826:[.12963,.69444,0,0,.77778],9827:[.12963,.69444,0,0,.77778],9837:[0,.75,0,0,.38889],9838:[.19444,.69444,0,0,.38889],9839:[.19444,.69444,0,0,.38889],10216:[.25,.75,0,0,.38889],10217:[.25,.75,0,0,.38889],10222:[.244,.744,0,0,.412],10223:[.244,.745,0,0,.412],10229:[.011,.511,0,0,1.609],10230:[.011,.511,0,0,1.638],10231:[.011,.511,0,0,1.859],10232:[.024,.525,0,0,1.609],10233:[.024,.525,0,0,1.638],10234:[.024,.525,0,0,1.858],10236:[.011,.511,0,0,1.638],10815:[0,.68333,0,0,.75],10927:[.13597,.63597,0,0,.77778],10928:[.13597,.63597,0,0,.77778],57376:[.19444,.69444,0,0,0]},"Math-BoldItalic":{32:[0,0,0,0,.25],48:[0,.44444,0,0,.575],49:[0,.44444,0,0,.575],50:[0,.44444,0,0,.575],51:[.19444,.44444,0,0,.575],52:[.19444,.44444,0,0,.575],53:[.19444,.44444,0,0,.575],54:[0,.64444,0,0,.575],55:[.19444,.44444,0,0,.575],56:[0,.64444,0,0,.575],57:[.19444,.44444,0,0,.575],65:[0,.68611,0,0,.86944],66:[0,.68611,.04835,0,.8664],67:[0,.68611,.06979,0,.81694],68:[0,.68611,.03194,0,.93812],69:[0,.68611,.05451,0,.81007],70:[0,.68611,.15972,0,.68889],71:[0,.68611,0,0,.88673],72:[0,.68611,.08229,0,.98229],73:[0,.68611,.07778,0,.51111],74:[0,.68611,.10069,0,.63125],75:[0,.68611,.06979,0,.97118],76:[0,.68611,0,0,.75555],77:[0,.68611,.11424,0,1.14201],78:[0,.68611,.11424,0,.95034],79:[0,.68611,.03194,0,.83666],80:[0,.68611,.15972,0,.72309],81:[.19444,.68611,0,0,.86861],82:[0,.68611,.00421,0,.87235],83:[0,.68611,.05382,0,.69271],84:[0,.68611,.15972,0,.63663],85:[0,.68611,.11424,0,.80027],86:[0,.68611,.25555,0,.67778],87:[0,.68611,.15972,0,1.09305],88:[0,.68611,.07778,0,.94722],89:[0,.68611,.25555,0,.67458],90:[0,.68611,.06979,0,.77257],97:[0,.44444,0,0,.63287],98:[0,.69444,0,0,.52083],99:[0,.44444,0,0,.51342],100:[0,.69444,0,0,.60972],101:[0,.44444,0,0,.55361],102:[.19444,.69444,.11042,0,.56806],103:[.19444,.44444,.03704,0,.5449],104:[0,.69444,0,0,.66759],105:[0,.69326,0,0,.4048],106:[.19444,.69326,.0622,0,.47083],107:[0,.69444,.01852,0,.6037],108:[0,.69444,.0088,0,.34815],109:[0,.44444,0,0,1.0324],110:[0,.44444,0,0,.71296],111:[0,.44444,0,0,.58472],112:[.19444,.44444,0,0,.60092],113:[.19444,.44444,.03704,0,.54213],114:[0,.44444,.03194,0,.5287],115:[0,.44444,0,0,.53125],116:[0,.63492,0,0,.41528],117:[0,.44444,0,0,.68102],118:[0,.44444,.03704,0,.56666],119:[0,.44444,.02778,0,.83148],120:[0,.44444,0,0,.65903],121:[.19444,.44444,.03704,0,.59028],122:[0,.44444,.04213,0,.55509],160:[0,0,0,0,.25],915:[0,.68611,.15972,0,.65694],916:[0,.68611,0,0,.95833],920:[0,.68611,.03194,0,.86722],923:[0,.68611,0,0,.80555],926:[0,.68611,.07458,0,.84125],928:[0,.68611,.08229,0,.98229],931:[0,.68611,.05451,0,.88507],933:[0,.68611,.15972,0,.67083],934:[0,.68611,0,0,.76666],936:[0,.68611,.11653,0,.71402],937:[0,.68611,.04835,0,.8789],945:[0,.44444,0,0,.76064],946:[.19444,.69444,.03403,0,.65972],947:[.19444,.44444,.06389,0,.59003],948:[0,.69444,.03819,0,.52222],949:[0,.44444,0,0,.52882],950:[.19444,.69444,.06215,0,.50833],951:[.19444,.44444,.03704,0,.6],952:[0,.69444,.03194,0,.5618],953:[0,.44444,0,0,.41204],954:[0,.44444,0,0,.66759],955:[0,.69444,0,0,.67083],956:[.19444,.44444,0,0,.70787],957:[0,.44444,.06898,0,.57685],958:[.19444,.69444,.03021,0,.50833],959:[0,.44444,0,0,.58472],960:[0,.44444,.03704,0,.68241],961:[.19444,.44444,0,0,.6118],962:[.09722,.44444,.07917,0,.42361],963:[0,.44444,.03704,0,.68588],964:[0,.44444,.13472,0,.52083],965:[0,.44444,.03704,0,.63055],966:[.19444,.44444,0,0,.74722],967:[.19444,.44444,0,0,.71805],968:[.19444,.69444,.03704,0,.75833],969:[0,.44444,.03704,0,.71782],977:[0,.69444,0,0,.69155],981:[.19444,.69444,0,0,.7125],982:[0,.44444,.03194,0,.975],1009:[.19444,.44444,0,0,.6118],1013:[0,.44444,0,0,.48333],57649:[0,.44444,0,0,.39352],57911:[.19444,.44444,0,0,.43889]},"Math-Italic":{32:[0,0,0,0,.25],48:[0,.43056,0,0,.5],49:[0,.43056,0,0,.5],50:[0,.43056,0,0,.5],51:[.19444,.43056,0,0,.5],52:[.19444,.43056,0,0,.5],53:[.19444,.43056,0,0,.5],54:[0,.64444,0,0,.5],55:[.19444,.43056,0,0,.5],56:[0,.64444,0,0,.5],57:[.19444,.43056,0,0,.5],65:[0,.68333,0,.13889,.75],66:[0,.68333,.05017,.08334,.75851],67:[0,.68333,.07153,.08334,.71472],68:[0,.68333,.02778,.05556,.82792],69:[0,.68333,.05764,.08334,.7382],70:[0,.68333,.13889,.08334,.64306],71:[0,.68333,0,.08334,.78625],72:[0,.68333,.08125,.05556,.83125],73:[0,.68333,.07847,.11111,.43958],74:[0,.68333,.09618,.16667,.55451],75:[0,.68333,.07153,.05556,.84931],76:[0,.68333,0,.02778,.68056],77:[0,.68333,.10903,.08334,.97014],78:[0,.68333,.10903,.08334,.80347],79:[0,.68333,.02778,.08334,.76278],80:[0,.68333,.13889,.08334,.64201],81:[.19444,.68333,0,.08334,.79056],82:[0,.68333,.00773,.08334,.75929],83:[0,.68333,.05764,.08334,.6132],84:[0,.68333,.13889,.08334,.58438],85:[0,.68333,.10903,.02778,.68278],86:[0,.68333,.22222,0,.58333],87:[0,.68333,.13889,0,.94445],88:[0,.68333,.07847,.08334,.82847],89:[0,.68333,.22222,0,.58056],90:[0,.68333,.07153,.08334,.68264],97:[0,.43056,0,0,.52859],98:[0,.69444,0,0,.42917],99:[0,.43056,0,.05556,.43276],100:[0,.69444,0,.16667,.52049],101:[0,.43056,0,.05556,.46563],102:[.19444,.69444,.10764,.16667,.48959],103:[.19444,.43056,.03588,.02778,.47697],104:[0,.69444,0,0,.57616],105:[0,.65952,0,0,.34451],106:[.19444,.65952,.05724,0,.41181],107:[0,.69444,.03148,0,.5206],108:[0,.69444,.01968,.08334,.29838],109:[0,.43056,0,0,.87801],110:[0,.43056,0,0,.60023],111:[0,.43056,0,.05556,.48472],112:[.19444,.43056,0,.08334,.50313],113:[.19444,.43056,.03588,.08334,.44641],114:[0,.43056,.02778,.05556,.45116],115:[0,.43056,0,.05556,.46875],116:[0,.61508,0,.08334,.36111],117:[0,.43056,0,.02778,.57246],118:[0,.43056,.03588,.02778,.48472],119:[0,.43056,.02691,.08334,.71592],120:[0,.43056,0,.02778,.57153],121:[.19444,.43056,.03588,.05556,.49028],122:[0,.43056,.04398,.05556,.46505],160:[0,0,0,0,.25],915:[0,.68333,.13889,.08334,.61528],916:[0,.68333,0,.16667,.83334],920:[0,.68333,.02778,.08334,.76278],923:[0,.68333,0,.16667,.69445],926:[0,.68333,.07569,.08334,.74236],928:[0,.68333,.08125,.05556,.83125],931:[0,.68333,.05764,.08334,.77986],933:[0,.68333,.13889,.05556,.58333],934:[0,.68333,0,.08334,.66667],936:[0,.68333,.11,.05556,.61222],937:[0,.68333,.05017,.08334,.7724],945:[0,.43056,.0037,.02778,.6397],946:[.19444,.69444,.05278,.08334,.56563],947:[.19444,.43056,.05556,0,.51773],948:[0,.69444,.03785,.05556,.44444],949:[0,.43056,0,.08334,.46632],950:[.19444,.69444,.07378,.08334,.4375],951:[.19444,.43056,.03588,.05556,.49653],952:[0,.69444,.02778,.08334,.46944],953:[0,.43056,0,.05556,.35394],954:[0,.43056,0,0,.57616],955:[0,.69444,0,0,.58334],956:[.19444,.43056,0,.02778,.60255],957:[0,.43056,.06366,.02778,.49398],958:[.19444,.69444,.04601,.11111,.4375],959:[0,.43056,0,.05556,.48472],960:[0,.43056,.03588,0,.57003],961:[.19444,.43056,0,.08334,.51702],962:[.09722,.43056,.07986,.08334,.36285],963:[0,.43056,.03588,0,.57141],964:[0,.43056,.1132,.02778,.43715],965:[0,.43056,.03588,.02778,.54028],966:[.19444,.43056,0,.08334,.65417],967:[.19444,.43056,0,.05556,.62569],968:[.19444,.69444,.03588,.11111,.65139],969:[0,.43056,.03588,0,.62245],977:[0,.69444,0,.08334,.59144],981:[.19444,.69444,0,.08334,.59583],982:[0,.43056,.02778,0,.82813],1009:[.19444,.43056,0,.08334,.51702],1013:[0,.43056,0,.05556,.4059],57649:[0,.43056,0,.02778,.32246],57911:[.19444,.43056,0,.08334,.38403]},"SansSerif-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.36667],34:[0,.69444,0,0,.55834],35:[.19444,.69444,0,0,.91667],36:[.05556,.75,0,0,.55],37:[.05556,.75,0,0,1.02912],38:[0,.69444,0,0,.83056],39:[0,.69444,0,0,.30556],40:[.25,.75,0,0,.42778],41:[.25,.75,0,0,.42778],42:[0,.75,0,0,.55],43:[.11667,.61667,0,0,.85556],44:[.10556,.13056,0,0,.30556],45:[0,.45833,0,0,.36667],46:[0,.13056,0,0,.30556],47:[.25,.75,0,0,.55],48:[0,.69444,0,0,.55],49:[0,.69444,0,0,.55],50:[0,.69444,0,0,.55],51:[0,.69444,0,0,.55],52:[0,.69444,0,0,.55],53:[0,.69444,0,0,.55],54:[0,.69444,0,0,.55],55:[0,.69444,0,0,.55],56:[0,.69444,0,0,.55],57:[0,.69444,0,0,.55],58:[0,.45833,0,0,.30556],59:[.10556,.45833,0,0,.30556],61:[-.09375,.40625,0,0,.85556],63:[0,.69444,0,0,.51945],64:[0,.69444,0,0,.73334],65:[0,.69444,0,0,.73334],66:[0,.69444,0,0,.73334],67:[0,.69444,0,0,.70278],68:[0,.69444,0,0,.79445],69:[0,.69444,0,0,.64167],70:[0,.69444,0,0,.61111],71:[0,.69444,0,0,.73334],72:[0,.69444,0,0,.79445],73:[0,.69444,0,0,.33056],74:[0,.69444,0,0,.51945],75:[0,.69444,0,0,.76389],76:[0,.69444,0,0,.58056],77:[0,.69444,0,0,.97778],78:[0,.69444,0,0,.79445],79:[0,.69444,0,0,.79445],80:[0,.69444,0,0,.70278],81:[.10556,.69444,0,0,.79445],82:[0,.69444,0,0,.70278],83:[0,.69444,0,0,.61111],84:[0,.69444,0,0,.73334],85:[0,.69444,0,0,.76389],86:[0,.69444,.01528,0,.73334],87:[0,.69444,.01528,0,1.03889],88:[0,.69444,0,0,.73334],89:[0,.69444,.0275,0,.73334],90:[0,.69444,0,0,.67223],91:[.25,.75,0,0,.34306],93:[.25,.75,0,0,.34306],94:[0,.69444,0,0,.55],95:[.35,.10833,.03056,0,.55],97:[0,.45833,0,0,.525],98:[0,.69444,0,0,.56111],99:[0,.45833,0,0,.48889],100:[0,.69444,0,0,.56111],101:[0,.45833,0,0,.51111],102:[0,.69444,.07639,0,.33611],103:[.19444,.45833,.01528,0,.55],104:[0,.69444,0,0,.56111],105:[0,.69444,0,0,.25556],106:[.19444,.69444,0,0,.28611],107:[0,.69444,0,0,.53056],108:[0,.69444,0,0,.25556],109:[0,.45833,0,0,.86667],110:[0,.45833,0,0,.56111],111:[0,.45833,0,0,.55],112:[.19444,.45833,0,0,.56111],113:[.19444,.45833,0,0,.56111],114:[0,.45833,.01528,0,.37222],115:[0,.45833,0,0,.42167],116:[0,.58929,0,0,.40417],117:[0,.45833,0,0,.56111],118:[0,.45833,.01528,0,.5],119:[0,.45833,.01528,0,.74445],120:[0,.45833,0,0,.5],121:[.19444,.45833,.01528,0,.5],122:[0,.45833,0,0,.47639],126:[.35,.34444,0,0,.55],160:[0,0,0,0,.25],168:[0,.69444,0,0,.55],176:[0,.69444,0,0,.73334],180:[0,.69444,0,0,.55],184:[.17014,0,0,0,.48889],305:[0,.45833,0,0,.25556],567:[.19444,.45833,0,0,.28611],710:[0,.69444,0,0,.55],711:[0,.63542,0,0,.55],713:[0,.63778,0,0,.55],728:[0,.69444,0,0,.55],729:[0,.69444,0,0,.30556],730:[0,.69444,0,0,.73334],732:[0,.69444,0,0,.55],733:[0,.69444,0,0,.55],915:[0,.69444,0,0,.58056],916:[0,.69444,0,0,.91667],920:[0,.69444,0,0,.85556],923:[0,.69444,0,0,.67223],926:[0,.69444,0,0,.73334],928:[0,.69444,0,0,.79445],931:[0,.69444,0,0,.79445],933:[0,.69444,0,0,.85556],934:[0,.69444,0,0,.79445],936:[0,.69444,0,0,.85556],937:[0,.69444,0,0,.79445],8211:[0,.45833,.03056,0,.55],8212:[0,.45833,.03056,0,1.10001],8216:[0,.69444,0,0,.30556],8217:[0,.69444,0,0,.30556],8220:[0,.69444,0,0,.55834],8221:[0,.69444,0,0,.55834]},"SansSerif-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.05733,0,.31945],34:[0,.69444,.00316,0,.5],35:[.19444,.69444,.05087,0,.83334],36:[.05556,.75,.11156,0,.5],37:[.05556,.75,.03126,0,.83334],38:[0,.69444,.03058,0,.75834],39:[0,.69444,.07816,0,.27778],40:[.25,.75,.13164,0,.38889],41:[.25,.75,.02536,0,.38889],42:[0,.75,.11775,0,.5],43:[.08333,.58333,.02536,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,.01946,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,.13164,0,.5],48:[0,.65556,.11156,0,.5],49:[0,.65556,.11156,0,.5],50:[0,.65556,.11156,0,.5],51:[0,.65556,.11156,0,.5],52:[0,.65556,.11156,0,.5],53:[0,.65556,.11156,0,.5],54:[0,.65556,.11156,0,.5],55:[0,.65556,.11156,0,.5],56:[0,.65556,.11156,0,.5],57:[0,.65556,.11156,0,.5],58:[0,.44444,.02502,0,.27778],59:[.125,.44444,.02502,0,.27778],61:[-.13,.37,.05087,0,.77778],63:[0,.69444,.11809,0,.47222],64:[0,.69444,.07555,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,.08293,0,.66667],67:[0,.69444,.11983,0,.63889],68:[0,.69444,.07555,0,.72223],69:[0,.69444,.11983,0,.59722],70:[0,.69444,.13372,0,.56945],71:[0,.69444,.11983,0,.66667],72:[0,.69444,.08094,0,.70834],73:[0,.69444,.13372,0,.27778],74:[0,.69444,.08094,0,.47222],75:[0,.69444,.11983,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,.08094,0,.875],78:[0,.69444,.08094,0,.70834],79:[0,.69444,.07555,0,.73611],80:[0,.69444,.08293,0,.63889],81:[.125,.69444,.07555,0,.73611],82:[0,.69444,.08293,0,.64584],83:[0,.69444,.09205,0,.55556],84:[0,.69444,.13372,0,.68056],85:[0,.69444,.08094,0,.6875],86:[0,.69444,.1615,0,.66667],87:[0,.69444,.1615,0,.94445],88:[0,.69444,.13372,0,.66667],89:[0,.69444,.17261,0,.66667],90:[0,.69444,.11983,0,.61111],91:[.25,.75,.15942,0,.28889],93:[.25,.75,.08719,0,.28889],94:[0,.69444,.0799,0,.5],95:[.35,.09444,.08616,0,.5],97:[0,.44444,.00981,0,.48056],98:[0,.69444,.03057,0,.51667],99:[0,.44444,.08336,0,.44445],100:[0,.69444,.09483,0,.51667],101:[0,.44444,.06778,0,.44445],102:[0,.69444,.21705,0,.30556],103:[.19444,.44444,.10836,0,.5],104:[0,.69444,.01778,0,.51667],105:[0,.67937,.09718,0,.23889],106:[.19444,.67937,.09162,0,.26667],107:[0,.69444,.08336,0,.48889],108:[0,.69444,.09483,0,.23889],109:[0,.44444,.01778,0,.79445],110:[0,.44444,.01778,0,.51667],111:[0,.44444,.06613,0,.5],112:[.19444,.44444,.0389,0,.51667],113:[.19444,.44444,.04169,0,.51667],114:[0,.44444,.10836,0,.34167],115:[0,.44444,.0778,0,.38333],116:[0,.57143,.07225,0,.36111],117:[0,.44444,.04169,0,.51667],118:[0,.44444,.10836,0,.46111],119:[0,.44444,.10836,0,.68334],120:[0,.44444,.09169,0,.46111],121:[.19444,.44444,.10836,0,.46111],122:[0,.44444,.08752,0,.43472],126:[.35,.32659,.08826,0,.5],160:[0,0,0,0,.25],168:[0,.67937,.06385,0,.5],176:[0,.69444,0,0,.73752],184:[.17014,0,0,0,.44445],305:[0,.44444,.04169,0,.23889],567:[.19444,.44444,.04169,0,.26667],710:[0,.69444,.0799,0,.5],711:[0,.63194,.08432,0,.5],713:[0,.60889,.08776,0,.5],714:[0,.69444,.09205,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,.09483,0,.5],729:[0,.67937,.07774,0,.27778],730:[0,.69444,0,0,.73752],732:[0,.67659,.08826,0,.5],733:[0,.69444,.09205,0,.5],915:[0,.69444,.13372,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,.07555,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,.12816,0,.66667],928:[0,.69444,.08094,0,.70834],931:[0,.69444,.11983,0,.72222],933:[0,.69444,.09031,0,.77778],934:[0,.69444,.04603,0,.72222],936:[0,.69444,.09031,0,.77778],937:[0,.69444,.08293,0,.72222],8211:[0,.44444,.08616,0,.5],8212:[0,.44444,.08616,0,1],8216:[0,.69444,.07816,0,.27778],8217:[0,.69444,.07816,0,.27778],8220:[0,.69444,.14205,0,.5],8221:[0,.69444,.00316,0,.5]},"SansSerif-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.31945],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.75834],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,0,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.65556,0,0,.5],49:[0,.65556,0,0,.5],50:[0,.65556,0,0,.5],51:[0,.65556,0,0,.5],52:[0,.65556,0,0,.5],53:[0,.65556,0,0,.5],54:[0,.65556,0,0,.5],55:[0,.65556,0,0,.5],56:[0,.65556,0,0,.5],57:[0,.65556,0,0,.5],58:[0,.44444,0,0,.27778],59:[.125,.44444,0,0,.27778],61:[-.13,.37,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,0,0,.66667],67:[0,.69444,0,0,.63889],68:[0,.69444,0,0,.72223],69:[0,.69444,0,0,.59722],70:[0,.69444,0,0,.56945],71:[0,.69444,0,0,.66667],72:[0,.69444,0,0,.70834],73:[0,.69444,0,0,.27778],74:[0,.69444,0,0,.47222],75:[0,.69444,0,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,0,0,.875],78:[0,.69444,0,0,.70834],79:[0,.69444,0,0,.73611],80:[0,.69444,0,0,.63889],81:[.125,.69444,0,0,.73611],82:[0,.69444,0,0,.64584],83:[0,.69444,0,0,.55556],84:[0,.69444,0,0,.68056],85:[0,.69444,0,0,.6875],86:[0,.69444,.01389,0,.66667],87:[0,.69444,.01389,0,.94445],88:[0,.69444,0,0,.66667],89:[0,.69444,.025,0,.66667],90:[0,.69444,0,0,.61111],91:[.25,.75,0,0,.28889],93:[.25,.75,0,0,.28889],94:[0,.69444,0,0,.5],95:[.35,.09444,.02778,0,.5],97:[0,.44444,0,0,.48056],98:[0,.69444,0,0,.51667],99:[0,.44444,0,0,.44445],100:[0,.69444,0,0,.51667],101:[0,.44444,0,0,.44445],102:[0,.69444,.06944,0,.30556],103:[.19444,.44444,.01389,0,.5],104:[0,.69444,0,0,.51667],105:[0,.67937,0,0,.23889],106:[.19444,.67937,0,0,.26667],107:[0,.69444,0,0,.48889],108:[0,.69444,0,0,.23889],109:[0,.44444,0,0,.79445],110:[0,.44444,0,0,.51667],111:[0,.44444,0,0,.5],112:[.19444,.44444,0,0,.51667],113:[.19444,.44444,0,0,.51667],114:[0,.44444,.01389,0,.34167],115:[0,.44444,0,0,.38333],116:[0,.57143,0,0,.36111],117:[0,.44444,0,0,.51667],118:[0,.44444,.01389,0,.46111],119:[0,.44444,.01389,0,.68334],120:[0,.44444,0,0,.46111],121:[.19444,.44444,.01389,0,.46111],122:[0,.44444,0,0,.43472],126:[.35,.32659,0,0,.5],160:[0,0,0,0,.25],168:[0,.67937,0,0,.5],176:[0,.69444,0,0,.66667],184:[.17014,0,0,0,.44445],305:[0,.44444,0,0,.23889],567:[.19444,.44444,0,0,.26667],710:[0,.69444,0,0,.5],711:[0,.63194,0,0,.5],713:[0,.60889,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.67937,0,0,.27778],730:[0,.69444,0,0,.66667],732:[0,.67659,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.69444,0,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,0,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,0,0,.66667],928:[0,.69444,0,0,.70834],931:[0,.69444,0,0,.72222],933:[0,.69444,0,0,.77778],934:[0,.69444,0,0,.72222],936:[0,.69444,0,0,.77778],937:[0,.69444,0,0,.72222],8211:[0,.44444,.02778,0,.5],8212:[0,.44444,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5]},"Script-Regular":{32:[0,0,0,0,.25],65:[0,.7,.22925,0,.80253],66:[0,.7,.04087,0,.90757],67:[0,.7,.1689,0,.66619],68:[0,.7,.09371,0,.77443],69:[0,.7,.18583,0,.56162],70:[0,.7,.13634,0,.89544],71:[0,.7,.17322,0,.60961],72:[0,.7,.29694,0,.96919],73:[0,.7,.19189,0,.80907],74:[.27778,.7,.19189,0,1.05159],75:[0,.7,.31259,0,.91364],76:[0,.7,.19189,0,.87373],77:[0,.7,.15981,0,1.08031],78:[0,.7,.3525,0,.9015],79:[0,.7,.08078,0,.73787],80:[0,.7,.08078,0,1.01262],81:[0,.7,.03305,0,.88282],82:[0,.7,.06259,0,.85],83:[0,.7,.19189,0,.86767],84:[0,.7,.29087,0,.74697],85:[0,.7,.25815,0,.79996],86:[0,.7,.27523,0,.62204],87:[0,.7,.27523,0,.80532],88:[0,.7,.26006,0,.94445],89:[0,.7,.2939,0,.70961],90:[0,.7,.24037,0,.8212],160:[0,0,0,0,.25]},"Size1-Regular":{32:[0,0,0,0,.25],40:[.35001,.85,0,0,.45834],41:[.35001,.85,0,0,.45834],47:[.35001,.85,0,0,.57778],91:[.35001,.85,0,0,.41667],92:[.35001,.85,0,0,.57778],93:[.35001,.85,0,0,.41667],123:[.35001,.85,0,0,.58334],125:[.35001,.85,0,0,.58334],160:[0,0,0,0,.25],710:[0,.72222,0,0,.55556],732:[0,.72222,0,0,.55556],770:[0,.72222,0,0,.55556],771:[0,.72222,0,0,.55556],8214:[-99e-5,.601,0,0,.77778],8593:[1e-5,.6,0,0,.66667],8595:[1e-5,.6,0,0,.66667],8657:[1e-5,.6,0,0,.77778],8659:[1e-5,.6,0,0,.77778],8719:[.25001,.75,0,0,.94445],8720:[.25001,.75,0,0,.94445],8721:[.25001,.75,0,0,1.05556],8730:[.35001,.85,0,0,1],8739:[-.00599,.606,0,0,.33333],8741:[-.00599,.606,0,0,.55556],8747:[.30612,.805,.19445,0,.47222],8748:[.306,.805,.19445,0,.47222],8749:[.306,.805,.19445,0,.47222],8750:[.30612,.805,.19445,0,.47222],8896:[.25001,.75,0,0,.83334],8897:[.25001,.75,0,0,.83334],8898:[.25001,.75,0,0,.83334],8899:[.25001,.75,0,0,.83334],8968:[.35001,.85,0,0,.47222],8969:[.35001,.85,0,0,.47222],8970:[.35001,.85,0,0,.47222],8971:[.35001,.85,0,0,.47222],9168:[-99e-5,.601,0,0,.66667],10216:[.35001,.85,0,0,.47222],10217:[.35001,.85,0,0,.47222],10752:[.25001,.75,0,0,1.11111],10753:[.25001,.75,0,0,1.11111],10754:[.25001,.75,0,0,1.11111],10756:[.25001,.75,0,0,.83334],10758:[.25001,.75,0,0,.83334]},"Size2-Regular":{32:[0,0,0,0,.25],40:[.65002,1.15,0,0,.59722],41:[.65002,1.15,0,0,.59722],47:[.65002,1.15,0,0,.81111],91:[.65002,1.15,0,0,.47222],92:[.65002,1.15,0,0,.81111],93:[.65002,1.15,0,0,.47222],123:[.65002,1.15,0,0,.66667],125:[.65002,1.15,0,0,.66667],160:[0,0,0,0,.25],710:[0,.75,0,0,1],732:[0,.75,0,0,1],770:[0,.75,0,0,1],771:[0,.75,0,0,1],8719:[.55001,1.05,0,0,1.27778],8720:[.55001,1.05,0,0,1.27778],8721:[.55001,1.05,0,0,1.44445],8730:[.65002,1.15,0,0,1],8747:[.86225,1.36,.44445,0,.55556],8748:[.862,1.36,.44445,0,.55556],8749:[.862,1.36,.44445,0,.55556],8750:[.86225,1.36,.44445,0,.55556],8896:[.55001,1.05,0,0,1.11111],8897:[.55001,1.05,0,0,1.11111],8898:[.55001,1.05,0,0,1.11111],8899:[.55001,1.05,0,0,1.11111],8968:[.65002,1.15,0,0,.52778],8969:[.65002,1.15,0,0,.52778],8970:[.65002,1.15,0,0,.52778],8971:[.65002,1.15,0,0,.52778],10216:[.65002,1.15,0,0,.61111],10217:[.65002,1.15,0,0,.61111],10752:[.55001,1.05,0,0,1.51112],10753:[.55001,1.05,0,0,1.51112],10754:[.55001,1.05,0,0,1.51112],10756:[.55001,1.05,0,0,1.11111],10758:[.55001,1.05,0,0,1.11111]},"Size3-Regular":{32:[0,0,0,0,.25],40:[.95003,1.45,0,0,.73611],41:[.95003,1.45,0,0,.73611],47:[.95003,1.45,0,0,1.04445],91:[.95003,1.45,0,0,.52778],92:[.95003,1.45,0,0,1.04445],93:[.95003,1.45,0,0,.52778],123:[.95003,1.45,0,0,.75],125:[.95003,1.45,0,0,.75],160:[0,0,0,0,.25],710:[0,.75,0,0,1.44445],732:[0,.75,0,0,1.44445],770:[0,.75,0,0,1.44445],771:[0,.75,0,0,1.44445],8730:[.95003,1.45,0,0,1],8968:[.95003,1.45,0,0,.58334],8969:[.95003,1.45,0,0,.58334],8970:[.95003,1.45,0,0,.58334],8971:[.95003,1.45,0,0,.58334],10216:[.95003,1.45,0,0,.75],10217:[.95003,1.45,0,0,.75]},"Size4-Regular":{32:[0,0,0,0,.25],40:[1.25003,1.75,0,0,.79167],41:[1.25003,1.75,0,0,.79167],47:[1.25003,1.75,0,0,1.27778],91:[1.25003,1.75,0,0,.58334],92:[1.25003,1.75,0,0,1.27778],93:[1.25003,1.75,0,0,.58334],123:[1.25003,1.75,0,0,.80556],125:[1.25003,1.75,0,0,.80556],160:[0,0,0,0,.25],710:[0,.825,0,0,1.8889],732:[0,.825,0,0,1.8889],770:[0,.825,0,0,1.8889],771:[0,.825,0,0,1.8889],8730:[1.25003,1.75,0,0,1],8968:[1.25003,1.75,0,0,.63889],8969:[1.25003,1.75,0,0,.63889],8970:[1.25003,1.75,0,0,.63889],8971:[1.25003,1.75,0,0,.63889],9115:[.64502,1.155,0,0,.875],9116:[1e-5,.6,0,0,.875],9117:[.64502,1.155,0,0,.875],9118:[.64502,1.155,0,0,.875],9119:[1e-5,.6,0,0,.875],9120:[.64502,1.155,0,0,.875],9121:[.64502,1.155,0,0,.66667],9122:[-99e-5,.601,0,0,.66667],9123:[.64502,1.155,0,0,.66667],9124:[.64502,1.155,0,0,.66667],9125:[-99e-5,.601,0,0,.66667],9126:[.64502,1.155,0,0,.66667],9127:[1e-5,.9,0,0,.88889],9128:[.65002,1.15,0,0,.88889],9129:[.90001,0,0,0,.88889],9130:[0,.3,0,0,.88889],9131:[1e-5,.9,0,0,.88889],9132:[.65002,1.15,0,0,.88889],9133:[.90001,0,0,0,.88889],9143:[.88502,.915,0,0,1.05556],10216:[1.25003,1.75,0,0,.80556],10217:[1.25003,1.75,0,0,.80556],57344:[-.00499,.605,0,0,1.05556],57345:[-.00499,.605,0,0,1.05556],57680:[0,.12,0,0,.45],57681:[0,.12,0,0,.45],57682:[0,.12,0,0,.45],57683:[0,.12,0,0,.45]},"Typewriter-Regular":{32:[0,0,0,0,.525],33:[0,.61111,0,0,.525],34:[0,.61111,0,0,.525],35:[0,.61111,0,0,.525],36:[.08333,.69444,0,0,.525],37:[.08333,.69444,0,0,.525],38:[0,.61111,0,0,.525],39:[0,.61111,0,0,.525],40:[.08333,.69444,0,0,.525],41:[.08333,.69444,0,0,.525],42:[0,.52083,0,0,.525],43:[-.08056,.53055,0,0,.525],44:[.13889,.125,0,0,.525],45:[-.08056,.53055,0,0,.525],46:[0,.125,0,0,.525],47:[.08333,.69444,0,0,.525],48:[0,.61111,0,0,.525],49:[0,.61111,0,0,.525],50:[0,.61111,0,0,.525],51:[0,.61111,0,0,.525],52:[0,.61111,0,0,.525],53:[0,.61111,0,0,.525],54:[0,.61111,0,0,.525],55:[0,.61111,0,0,.525],56:[0,.61111,0,0,.525],57:[0,.61111,0,0,.525],58:[0,.43056,0,0,.525],59:[.13889,.43056,0,0,.525],60:[-.05556,.55556,0,0,.525],61:[-.19549,.41562,0,0,.525],62:[-.05556,.55556,0,0,.525],63:[0,.61111,0,0,.525],64:[0,.61111,0,0,.525],65:[0,.61111,0,0,.525],66:[0,.61111,0,0,.525],67:[0,.61111,0,0,.525],68:[0,.61111,0,0,.525],69:[0,.61111,0,0,.525],70:[0,.61111,0,0,.525],71:[0,.61111,0,0,.525],72:[0,.61111,0,0,.525],73:[0,.61111,0,0,.525],74:[0,.61111,0,0,.525],75:[0,.61111,0,0,.525],76:[0,.61111,0,0,.525],77:[0,.61111,0,0,.525],78:[0,.61111,0,0,.525],79:[0,.61111,0,0,.525],80:[0,.61111,0,0,.525],81:[.13889,.61111,0,0,.525],82:[0,.61111,0,0,.525],83:[0,.61111,0,0,.525],84:[0,.61111,0,0,.525],85:[0,.61111,0,0,.525],86:[0,.61111,0,0,.525],87:[0,.61111,0,0,.525],88:[0,.61111,0,0,.525],89:[0,.61111,0,0,.525],90:[0,.61111,0,0,.525],91:[.08333,.69444,0,0,.525],92:[.08333,.69444,0,0,.525],93:[.08333,.69444,0,0,.525],94:[0,.61111,0,0,.525],95:[.09514,0,0,0,.525],96:[0,.61111,0,0,.525],97:[0,.43056,0,0,.525],98:[0,.61111,0,0,.525],99:[0,.43056,0,0,.525],100:[0,.61111,0,0,.525],101:[0,.43056,0,0,.525],102:[0,.61111,0,0,.525],103:[.22222,.43056,0,0,.525],104:[0,.61111,0,0,.525],105:[0,.61111,0,0,.525],106:[.22222,.61111,0,0,.525],107:[0,.61111,0,0,.525],108:[0,.61111,0,0,.525],109:[0,.43056,0,0,.525],110:[0,.43056,0,0,.525],111:[0,.43056,0,0,.525],112:[.22222,.43056,0,0,.525],113:[.22222,.43056,0,0,.525],114:[0,.43056,0,0,.525],115:[0,.43056,0,0,.525],116:[0,.55358,0,0,.525],117:[0,.43056,0,0,.525],118:[0,.43056,0,0,.525],119:[0,.43056,0,0,.525],120:[0,.43056,0,0,.525],121:[.22222,.43056,0,0,.525],122:[0,.43056,0,0,.525],123:[.08333,.69444,0,0,.525],124:[.08333,.69444,0,0,.525],125:[.08333,.69444,0,0,.525],126:[0,.61111,0,0,.525],127:[0,.61111,0,0,.525],160:[0,0,0,0,.525],176:[0,.61111,0,0,.525],184:[.19445,0,0,0,.525],305:[0,.43056,0,0,.525],567:[.22222,.43056,0,0,.525],711:[0,.56597,0,0,.525],713:[0,.56555,0,0,.525],714:[0,.61111,0,0,.525],715:[0,.61111,0,0,.525],728:[0,.61111,0,0,.525],730:[0,.61111,0,0,.525],770:[0,.61111,0,0,.525],771:[0,.61111,0,0,.525],776:[0,.61111,0,0,.525],915:[0,.61111,0,0,.525],916:[0,.61111,0,0,.525],920:[0,.61111,0,0,.525],923:[0,.61111,0,0,.525],926:[0,.61111,0,0,.525],928:[0,.61111,0,0,.525],931:[0,.61111,0,0,.525],933:[0,.61111,0,0,.525],934:[0,.61111,0,0,.525],936:[0,.61111,0,0,.525],937:[0,.61111,0,0,.525],8216:[0,.61111,0,0,.525],8217:[0,.61111,0,0,.525],8242:[0,.61111,0,0,.525],9251:[.11111,.21944,0,0,.525]}},ve={slant:[.25,.25,.25],space:[0,0,0],stretch:[0,0,0],shrink:[0,0,0],xHeight:[.431,.431,.431],quad:[1,1.171,1.472],extraSpace:[0,0,0],num1:[.677,.732,.925],num2:[.394,.384,.387],num3:[.444,.471,.504],denom1:[.686,.752,1.025],denom2:[.345,.344,.532],sup1:[.413,.503,.504],sup2:[.363,.431,.404],sup3:[.289,.286,.294],sub1:[.15,.143,.2],sub2:[.247,.286,.4],supDrop:[.386,.353,.494],subDrop:[.05,.071,.1],delim1:[2.39,1.7,1.98],delim2:[1.01,1.157,1.42],axisHeight:[.25,.25,.25],defaultRuleThickness:[.04,.049,.049],bigOpSpacing1:[.111,.111,.111],bigOpSpacing2:[.166,.166,.166],bigOpSpacing3:[.2,.2,.2],bigOpSpacing4:[.6,.611,.611],bigOpSpacing5:[.1,.143,.143],sqrtRuleThickness:[.04,.04,.04],ptPerEm:[10,10,10],doubleRuleSep:[.2,.2,.2],arrayRuleWidth:[.04,.04,.04],fboxsep:[.3,.3,.3],fboxrule:[.04,.04,.04]},Ot={Å:"A",Ð:"D",Þ:"o",å:"a",ð:"d",þ:"o",А:"A",Б:"B",В:"B",Г:"F",Д:"A",Е:"E",Ж:"K",З:"3",И:"N",Й:"N",К:"K",Л:"N",М:"M",Н:"H",О:"O",П:"N",Р:"P",С:"C",Т:"T",У:"y",Ф:"O",Х:"X",Ц:"U",Ч:"h",Ш:"W",Щ:"W",Ъ:"B",Ы:"X",Ь:"B",Э:"3",Ю:"X",Я:"R",а:"a",б:"b",в:"a",г:"r",д:"y",е:"e",ж:"m",з:"e",и:"n",й:"n",к:"n",л:"n",м:"m",н:"n",о:"o",п:"n",р:"p",с:"c",т:"o",у:"y",ф:"b",х:"x",ц:"n",ч:"n",ш:"w",щ:"w",ъ:"a",ы:"m",ь:"a",э:"e",ю:"m",я:"r"};function Va(r,e){x0[r]=e}function pt(r,e,t){if(!x0[e])throw new Error("Font metrics not found for font: "+e+".");var a=r.charCodeAt(0),n=x0[e][a];if(!n&&r[0]in Ot&&(a=Ot[r[0]].charCodeAt(0),n=x0[e][a]),!n&&t==="text"&&gr(a)&&(n=x0[e][77]),n)return{depth:n[0],height:n[1],italic:n[2],skew:n[3],width:n[4]}}var Ue={};function Ga(r){var e;if(r>=5?e=0:r>=3?e=1:e=2,!Ue[e]){var t=Ue[e]={cssEmPerMu:ve.quad[e]/18};for(var a in ve)ve.hasOwnProperty(a)&&(t[a]=ve[a][e])}return Ue[e]}var Ua=[[1,1,1],[2,1,1],[3,1,1],[4,2,1],[5,2,1],[6,3,1],[7,4,2],[8,6,3],[9,7,6],[10,8,7],[11,10,9]],Ht=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],Lt=function(e,t){return t.size<2?e:Ua[e-1][t.size-1]};class T0{constructor(e){this.style=void 0,this.color=void 0,this.size=void 0,this.textSize=void 0,this.phantom=void 0,this.font=void 0,this.fontFamily=void 0,this.fontWeight=void 0,this.fontShape=void 0,this.sizeMultiplier=void 0,this.maxSize=void 0,this.minRuleThickness=void 0,this._fontMetrics=void 0,this.style=e.style,this.color=e.color,this.size=e.size||T0.BASESIZE,this.textSize=e.textSize||this.size,this.phantom=!!e.phantom,this.font=e.font||"",this.fontFamily=e.fontFamily||"",this.fontWeight=e.fontWeight||"",this.fontShape=e.fontShape||"",this.sizeMultiplier=Ht[this.size-1],this.maxSize=e.maxSize,this.minRuleThickness=e.minRuleThickness,this._fontMetrics=void 0}extend(e){var t={style:this.style,size:this.size,textSize:this.textSize,color:this.color,phantom:this.phantom,font:this.font,fontFamily:this.fontFamily,fontWeight:this.fontWeight,fontShape:this.fontShape,maxSize:this.maxSize,minRuleThickness:this.minRuleThickness};for(var a in e)e.hasOwnProperty(a)&&(t[a]=e[a]);return new T0(t)}havingStyle(e){return this.style===e?this:this.extend({style:e,size:Lt(this.textSize,e)})}havingCrampedStyle(){return this.havingStyle(this.style.cramp())}havingSize(e){return this.size===e&&this.textSize===e?this:this.extend({style:this.style.text(),size:e,textSize:e,sizeMultiplier:Ht[e-1]})}havingBaseStyle(e){e=e||this.style.text();var t=Lt(T0.BASESIZE,e);return this.size===t&&this.textSize===T0.BASESIZE&&this.style===e?this:this.extend({style:e,size:t})}havingBaseSizing(){var e;switch(this.style.id){case 4:case 5:e=3;break;case 6:case 7:e=1;break;default:e=6}return this.extend({style:this.style.text(),size:e})}withColor(e){return this.extend({color:e})}withPhantom(){return this.extend({phantom:!0})}withFont(e){return this.extend({font:e})}withTextFontFamily(e){return this.extend({fontFamily:e,font:""})}withTextFontWeight(e){return this.extend({fontWeight:e,font:""})}withTextFontShape(e){return this.extend({fontShape:e,font:""})}sizingClasses(e){return e.size!==this.size?["sizing","reset-size"+e.size,"size"+this.size]:[]}baseSizingClasses(){return this.size!==T0.BASESIZE?["sizing","reset-size"+this.size,"size"+T0.BASESIZE]:[]}fontMetrics(){return this._fontMetrics||(this._fontMetrics=Ga(this.size)),this._fontMetrics}getColor(){return this.phantom?"transparent":this.color}}T0.BASESIZE=6;var it={pt:1,mm:7227/2540,cm:7227/254,in:72.27,bp:803/800,pc:12,dd:1238/1157,cc:14856/1157,nd:685/642,nc:1370/107,sp:1/65536,px:803/800},Ya={ex:!0,em:!0,mu:!0},br=function(e){return typeof e!="string"&&(e=e.unit),e in it||e in Ya||e==="ex"},K=function(e,t){var a;if(e.unit in it)a=it[e.unit]/t.fontMetrics().ptPerEm/t.sizeMultiplier;else if(e.unit==="mu")a=t.fontMetrics().cssEmPerMu;else{var n;if(t.style.isTight()?n=t.havingStyle(t.style.text()):n=t,e.unit==="ex")a=n.fontMetrics().xHeight;else if(e.unit==="em")a=n.fontMetrics().quad;else throw new M("Invalid unit: '"+e.unit+"'");n!==t&&(a*=n.sizeMultiplier/t.sizeMultiplier)}return Math.min(e.number*a,t.maxSize)},A=function(e){return+e.toFixed(4)+"em"},P0=function(e){return e.filter(t=>t).join(" ")},yr=function(e,t,a){if(this.classes=e||[],this.attributes={},this.height=0,this.depth=0,this.maxFontSize=0,this.style=a||{},t){t.style.isTight()&&this.classes.push("mtight");var n=t.getColor();n&&(this.style.color=n)}},xr=function(e){var t=document.createElement(e);t.className=P0(this.classes);for(var a in this.style)this.style.hasOwnProperty(a)&&(t.style[a]=this.style[a]);for(var n in this.attributes)this.attributes.hasOwnProperty(n)&&t.setAttribute(n,this.attributes[n]);for(var s=0;s/=\x00-\x1f]/,wr=function(e){var t="<"+e;this.classes.length&&(t+=' class="'+V.escape(P0(this.classes))+'"');var a="";for(var n in this.style)this.style.hasOwnProperty(n)&&(a+=V.hyphenate(n)+":"+this.style[n]+";");a&&(t+=' style="'+V.escape(a)+'"');for(var s in this.attributes)if(this.attributes.hasOwnProperty(s)){if(Xa.test(s))throw new M("Invalid attribute name '"+s+"'");t+=" "+s+'="'+V.escape(this.attributes[s])+'"'}t+=">";for(var u=0;u",t};class he{constructor(e,t,a,n){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.width=void 0,this.maxFontSize=void 0,this.style=void 0,yr.call(this,e,a,n),this.children=t||[]}setAttribute(e,t){this.attributes[e]=t}hasClass(e){return this.classes.includes(e)}toNode(){return xr.call(this,"span")}toMarkup(){return wr.call(this,"span")}}class vt{constructor(e,t,a,n){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,yr.call(this,t,n),this.children=a||[],this.setAttribute("href",e)}setAttribute(e,t){this.attributes[e]=t}hasClass(e){return this.classes.includes(e)}toNode(){return xr.call(this,"a")}toMarkup(){return wr.call(this,"a")}}class $a{constructor(e,t,a){this.src=void 0,this.alt=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.alt=t,this.src=e,this.classes=["mord"],this.style=a}hasClass(e){return this.classes.includes(e)}toNode(){var e=document.createElement("img");e.src=this.src,e.alt=this.alt,e.className="mord";for(var t in this.style)this.style.hasOwnProperty(t)&&(e.style[t]=this.style[t]);return e}toMarkup(){var e=''+V.escape(this.alt)+'0&&(t=document.createElement("span"),t.style.marginRight=A(this.italic)),this.classes.length>0&&(t=t||document.createElement("span"),t.className=P0(this.classes));for(var a in this.style)this.style.hasOwnProperty(a)&&(t=t||document.createElement("span"),t.style[a]=this.style[a]);return t?(t.appendChild(e),t):e}toMarkup(){var e=!1,t="0&&(a+="margin-right:"+this.italic+"em;");for(var n in this.style)this.style.hasOwnProperty(n)&&(a+=V.hyphenate(n)+":"+this.style[n]+";");a&&(e=!0,t+=' style="'+V.escape(a)+'"');var s=V.escape(this.text);return e?(t+=">",t+=s,t+="",t):s}}class C0{constructor(e,t){this.children=void 0,this.attributes=void 0,this.children=e||[],this.attributes=t||{}}toNode(){var e="http://www.w3.org/2000/svg",t=document.createElementNS(e,"svg");for(var a in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,a)&&t.setAttribute(a,this.attributes[a]);for(var n=0;n':''}}class st{constructor(e){this.attributes=void 0,this.attributes=e||{}}toNode(){var e="http://www.w3.org/2000/svg",t=document.createElementNS(e,"line");for(var a in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,a)&&t.setAttribute(a,this.attributes[a]);return t}toMarkup(){var e=" but got "+String(r)+".")}var Za={bin:1,close:1,inner:1,open:1,punct:1,rel:1},Ka={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1},$={math:{},text:{}};function i(r,e,t,a,n,s){$[r][n]={font:e,group:t,replace:a},s&&a&&($[r][a]=$[r][n])}var l="math",k="text",o="main",d="ams",W="accent-token",D="bin",i0="close",re="inner",q="mathord",_="op-token",c0="open",qe="punct",f="rel",R0="spacing",v="textord";i(l,o,f,"≡","\\equiv",!0);i(l,o,f,"≺","\\prec",!0);i(l,o,f,"≻","\\succ",!0);i(l,o,f,"∼","\\sim",!0);i(l,o,f,"⊥","\\perp");i(l,o,f,"⪯","\\preceq",!0);i(l,o,f,"⪰","\\succeq",!0);i(l,o,f,"≃","\\simeq",!0);i(l,o,f,"∣","\\mid",!0);i(l,o,f,"≪","\\ll",!0);i(l,o,f,"≫","\\gg",!0);i(l,o,f,"≍","\\asymp",!0);i(l,o,f,"∥","\\parallel");i(l,o,f,"⋈","\\bowtie",!0);i(l,o,f,"⌣","\\smile",!0);i(l,o,f,"⊑","\\sqsubseteq",!0);i(l,o,f,"⊒","\\sqsupseteq",!0);i(l,o,f,"≐","\\doteq",!0);i(l,o,f,"⌢","\\frown",!0);i(l,o,f,"∋","\\ni",!0);i(l,o,f,"∝","\\propto",!0);i(l,o,f,"⊢","\\vdash",!0);i(l,o,f,"⊣","\\dashv",!0);i(l,o,f,"∋","\\owns");i(l,o,qe,".","\\ldotp");i(l,o,qe,"⋅","\\cdotp");i(l,o,v,"#","\\#");i(k,o,v,"#","\\#");i(l,o,v,"&","\\&");i(k,o,v,"&","\\&");i(l,o,v,"ℵ","\\aleph",!0);i(l,o,v,"∀","\\forall",!0);i(l,o,v,"ℏ","\\hbar",!0);i(l,o,v,"∃","\\exists",!0);i(l,o,v,"∇","\\nabla",!0);i(l,o,v,"♭","\\flat",!0);i(l,o,v,"ℓ","\\ell",!0);i(l,o,v,"♮","\\natural",!0);i(l,o,v,"♣","\\clubsuit",!0);i(l,o,v,"℘","\\wp",!0);i(l,o,v,"♯","\\sharp",!0);i(l,o,v,"♢","\\diamondsuit",!0);i(l,o,v,"ℜ","\\Re",!0);i(l,o,v,"♡","\\heartsuit",!0);i(l,o,v,"ℑ","\\Im",!0);i(l,o,v,"♠","\\spadesuit",!0);i(l,o,v,"§","\\S",!0);i(k,o,v,"§","\\S");i(l,o,v,"¶","\\P",!0);i(k,o,v,"¶","\\P");i(l,o,v,"†","\\dag");i(k,o,v,"†","\\dag");i(k,o,v,"†","\\textdagger");i(l,o,v,"‡","\\ddag");i(k,o,v,"‡","\\ddag");i(k,o,v,"‡","\\textdaggerdbl");i(l,o,i0,"⎱","\\rmoustache",!0);i(l,o,c0,"⎰","\\lmoustache",!0);i(l,o,i0,"⟯","\\rgroup",!0);i(l,o,c0,"⟮","\\lgroup",!0);i(l,o,D,"∓","\\mp",!0);i(l,o,D,"⊖","\\ominus",!0);i(l,o,D,"⊎","\\uplus",!0);i(l,o,D,"⊓","\\sqcap",!0);i(l,o,D,"∗","\\ast");i(l,o,D,"⊔","\\sqcup",!0);i(l,o,D,"◯","\\bigcirc",!0);i(l,o,D,"∙","\\bullet",!0);i(l,o,D,"‡","\\ddagger");i(l,o,D,"≀","\\wr",!0);i(l,o,D,"⨿","\\amalg");i(l,o,D,"&","\\And");i(l,o,f,"⟵","\\longleftarrow",!0);i(l,o,f,"⇐","\\Leftarrow",!0);i(l,o,f,"⟸","\\Longleftarrow",!0);i(l,o,f,"⟶","\\longrightarrow",!0);i(l,o,f,"⇒","\\Rightarrow",!0);i(l,o,f,"⟹","\\Longrightarrow",!0);i(l,o,f,"↔","\\leftrightarrow",!0);i(l,o,f,"⟷","\\longleftrightarrow",!0);i(l,o,f,"⇔","\\Leftrightarrow",!0);i(l,o,f,"⟺","\\Longleftrightarrow",!0);i(l,o,f,"↦","\\mapsto",!0);i(l,o,f,"⟼","\\longmapsto",!0);i(l,o,f,"↗","\\nearrow",!0);i(l,o,f,"↩","\\hookleftarrow",!0);i(l,o,f,"↪","\\hookrightarrow",!0);i(l,o,f,"↘","\\searrow",!0);i(l,o,f,"↼","\\leftharpoonup",!0);i(l,o,f,"⇀","\\rightharpoonup",!0);i(l,o,f,"↙","\\swarrow",!0);i(l,o,f,"↽","\\leftharpoondown",!0);i(l,o,f,"⇁","\\rightharpoondown",!0);i(l,o,f,"↖","\\nwarrow",!0);i(l,o,f,"⇌","\\rightleftharpoons",!0);i(l,d,f,"≮","\\nless",!0);i(l,d,f,"","\\@nleqslant");i(l,d,f,"","\\@nleqq");i(l,d,f,"⪇","\\lneq",!0);i(l,d,f,"≨","\\lneqq",!0);i(l,d,f,"","\\@lvertneqq");i(l,d,f,"⋦","\\lnsim",!0);i(l,d,f,"⪉","\\lnapprox",!0);i(l,d,f,"⊀","\\nprec",!0);i(l,d,f,"⋠","\\npreceq",!0);i(l,d,f,"⋨","\\precnsim",!0);i(l,d,f,"⪹","\\precnapprox",!0);i(l,d,f,"≁","\\nsim",!0);i(l,d,f,"","\\@nshortmid");i(l,d,f,"∤","\\nmid",!0);i(l,d,f,"⊬","\\nvdash",!0);i(l,d,f,"⊭","\\nvDash",!0);i(l,d,f,"⋪","\\ntriangleleft");i(l,d,f,"⋬","\\ntrianglelefteq",!0);i(l,d,f,"⊊","\\subsetneq",!0);i(l,d,f,"","\\@varsubsetneq");i(l,d,f,"⫋","\\subsetneqq",!0);i(l,d,f,"","\\@varsubsetneqq");i(l,d,f,"≯","\\ngtr",!0);i(l,d,f,"","\\@ngeqslant");i(l,d,f,"","\\@ngeqq");i(l,d,f,"⪈","\\gneq",!0);i(l,d,f,"≩","\\gneqq",!0);i(l,d,f,"","\\@gvertneqq");i(l,d,f,"⋧","\\gnsim",!0);i(l,d,f,"⪊","\\gnapprox",!0);i(l,d,f,"⊁","\\nsucc",!0);i(l,d,f,"⋡","\\nsucceq",!0);i(l,d,f,"⋩","\\succnsim",!0);i(l,d,f,"⪺","\\succnapprox",!0);i(l,d,f,"≆","\\ncong",!0);i(l,d,f,"","\\@nshortparallel");i(l,d,f,"∦","\\nparallel",!0);i(l,d,f,"⊯","\\nVDash",!0);i(l,d,f,"⋫","\\ntriangleright");i(l,d,f,"⋭","\\ntrianglerighteq",!0);i(l,d,f,"","\\@nsupseteqq");i(l,d,f,"⊋","\\supsetneq",!0);i(l,d,f,"","\\@varsupsetneq");i(l,d,f,"⫌","\\supsetneqq",!0);i(l,d,f,"","\\@varsupsetneqq");i(l,d,f,"⊮","\\nVdash",!0);i(l,d,f,"⪵","\\precneqq",!0);i(l,d,f,"⪶","\\succneqq",!0);i(l,d,f,"","\\@nsubseteqq");i(l,d,D,"⊴","\\unlhd");i(l,d,D,"⊵","\\unrhd");i(l,d,f,"↚","\\nleftarrow",!0);i(l,d,f,"↛","\\nrightarrow",!0);i(l,d,f,"⇍","\\nLeftarrow",!0);i(l,d,f,"⇏","\\nRightarrow",!0);i(l,d,f,"↮","\\nleftrightarrow",!0);i(l,d,f,"⇎","\\nLeftrightarrow",!0);i(l,d,f,"△","\\vartriangle");i(l,d,v,"ℏ","\\hslash");i(l,d,v,"▽","\\triangledown");i(l,d,v,"◊","\\lozenge");i(l,d,v,"Ⓢ","\\circledS");i(l,d,v,"®","\\circledR");i(k,d,v,"®","\\circledR");i(l,d,v,"∡","\\measuredangle",!0);i(l,d,v,"∄","\\nexists");i(l,d,v,"℧","\\mho");i(l,d,v,"Ⅎ","\\Finv",!0);i(l,d,v,"⅁","\\Game",!0);i(l,d,v,"‵","\\backprime");i(l,d,v,"▲","\\blacktriangle");i(l,d,v,"▼","\\blacktriangledown");i(l,d,v,"■","\\blacksquare");i(l,d,v,"⧫","\\blacklozenge");i(l,d,v,"★","\\bigstar");i(l,d,v,"∢","\\sphericalangle",!0);i(l,d,v,"∁","\\complement",!0);i(l,d,v,"ð","\\eth",!0);i(k,o,v,"ð","ð");i(l,d,v,"╱","\\diagup");i(l,d,v,"╲","\\diagdown");i(l,d,v,"□","\\square");i(l,d,v,"□","\\Box");i(l,d,v,"◊","\\Diamond");i(l,d,v,"¥","\\yen",!0);i(k,d,v,"¥","\\yen",!0);i(l,d,v,"✓","\\checkmark",!0);i(k,d,v,"✓","\\checkmark");i(l,d,v,"ℶ","\\beth",!0);i(l,d,v,"ℸ","\\daleth",!0);i(l,d,v,"ℷ","\\gimel",!0);i(l,d,v,"ϝ","\\digamma",!0);i(l,d,v,"ϰ","\\varkappa");i(l,d,c0,"┌","\\@ulcorner",!0);i(l,d,i0,"┐","\\@urcorner",!0);i(l,d,c0,"└","\\@llcorner",!0);i(l,d,i0,"┘","\\@lrcorner",!0);i(l,d,f,"≦","\\leqq",!0);i(l,d,f,"⩽","\\leqslant",!0);i(l,d,f,"⪕","\\eqslantless",!0);i(l,d,f,"≲","\\lesssim",!0);i(l,d,f,"⪅","\\lessapprox",!0);i(l,d,f,"≊","\\approxeq",!0);i(l,d,D,"⋖","\\lessdot");i(l,d,f,"⋘","\\lll",!0);i(l,d,f,"≶","\\lessgtr",!0);i(l,d,f,"⋚","\\lesseqgtr",!0);i(l,d,f,"⪋","\\lesseqqgtr",!0);i(l,d,f,"≑","\\doteqdot");i(l,d,f,"≓","\\risingdotseq",!0);i(l,d,f,"≒","\\fallingdotseq",!0);i(l,d,f,"∽","\\backsim",!0);i(l,d,f,"⋍","\\backsimeq",!0);i(l,d,f,"⫅","\\subseteqq",!0);i(l,d,f,"⋐","\\Subset",!0);i(l,d,f,"⊏","\\sqsubset",!0);i(l,d,f,"≼","\\preccurlyeq",!0);i(l,d,f,"⋞","\\curlyeqprec",!0);i(l,d,f,"≾","\\precsim",!0);i(l,d,f,"⪷","\\precapprox",!0);i(l,d,f,"⊲","\\vartriangleleft");i(l,d,f,"⊴","\\trianglelefteq");i(l,d,f,"⊨","\\vDash",!0);i(l,d,f,"⊪","\\Vvdash",!0);i(l,d,f,"⌣","\\smallsmile");i(l,d,f,"⌢","\\smallfrown");i(l,d,f,"≏","\\bumpeq",!0);i(l,d,f,"≎","\\Bumpeq",!0);i(l,d,f,"≧","\\geqq",!0);i(l,d,f,"⩾","\\geqslant",!0);i(l,d,f,"⪖","\\eqslantgtr",!0);i(l,d,f,"≳","\\gtrsim",!0);i(l,d,f,"⪆","\\gtrapprox",!0);i(l,d,D,"⋗","\\gtrdot");i(l,d,f,"⋙","\\ggg",!0);i(l,d,f,"≷","\\gtrless",!0);i(l,d,f,"⋛","\\gtreqless",!0);i(l,d,f,"⪌","\\gtreqqless",!0);i(l,d,f,"≖","\\eqcirc",!0);i(l,d,f,"≗","\\circeq",!0);i(l,d,f,"≜","\\triangleq",!0);i(l,d,f,"∼","\\thicksim");i(l,d,f,"≈","\\thickapprox");i(l,d,f,"⫆","\\supseteqq",!0);i(l,d,f,"⋑","\\Supset",!0);i(l,d,f,"⊐","\\sqsupset",!0);i(l,d,f,"≽","\\succcurlyeq",!0);i(l,d,f,"⋟","\\curlyeqsucc",!0);i(l,d,f,"≿","\\succsim",!0);i(l,d,f,"⪸","\\succapprox",!0);i(l,d,f,"⊳","\\vartriangleright");i(l,d,f,"⊵","\\trianglerighteq");i(l,d,f,"⊩","\\Vdash",!0);i(l,d,f,"∣","\\shortmid");i(l,d,f,"∥","\\shortparallel");i(l,d,f,"≬","\\between",!0);i(l,d,f,"⋔","\\pitchfork",!0);i(l,d,f,"∝","\\varpropto");i(l,d,f,"◀","\\blacktriangleleft");i(l,d,f,"∴","\\therefore",!0);i(l,d,f,"∍","\\backepsilon");i(l,d,f,"▶","\\blacktriangleright");i(l,d,f,"∵","\\because",!0);i(l,d,f,"⋘","\\llless");i(l,d,f,"⋙","\\gggtr");i(l,d,D,"⊲","\\lhd");i(l,d,D,"⊳","\\rhd");i(l,d,f,"≂","\\eqsim",!0);i(l,o,f,"⋈","\\Join");i(l,d,f,"≑","\\Doteq",!0);i(l,d,D,"∔","\\dotplus",!0);i(l,d,D,"∖","\\smallsetminus");i(l,d,D,"⋒","\\Cap",!0);i(l,d,D,"⋓","\\Cup",!0);i(l,d,D,"⩞","\\doublebarwedge",!0);i(l,d,D,"⊟","\\boxminus",!0);i(l,d,D,"⊞","\\boxplus",!0);i(l,d,D,"⋇","\\divideontimes",!0);i(l,d,D,"⋉","\\ltimes",!0);i(l,d,D,"⋊","\\rtimes",!0);i(l,d,D,"⋋","\\leftthreetimes",!0);i(l,d,D,"⋌","\\rightthreetimes",!0);i(l,d,D,"⋏","\\curlywedge",!0);i(l,d,D,"⋎","\\curlyvee",!0);i(l,d,D,"⊝","\\circleddash",!0);i(l,d,D,"⊛","\\circledast",!0);i(l,d,D,"⋅","\\centerdot");i(l,d,D,"⊺","\\intercal",!0);i(l,d,D,"⋒","\\doublecap");i(l,d,D,"⋓","\\doublecup");i(l,d,D,"⊠","\\boxtimes",!0);i(l,d,f,"⇢","\\dashrightarrow",!0);i(l,d,f,"⇠","\\dashleftarrow",!0);i(l,d,f,"⇇","\\leftleftarrows",!0);i(l,d,f,"⇆","\\leftrightarrows",!0);i(l,d,f,"⇚","\\Lleftarrow",!0);i(l,d,f,"↞","\\twoheadleftarrow",!0);i(l,d,f,"↢","\\leftarrowtail",!0);i(l,d,f,"↫","\\looparrowleft",!0);i(l,d,f,"⇋","\\leftrightharpoons",!0);i(l,d,f,"↶","\\curvearrowleft",!0);i(l,d,f,"↺","\\circlearrowleft",!0);i(l,d,f,"↰","\\Lsh",!0);i(l,d,f,"⇈","\\upuparrows",!0);i(l,d,f,"↿","\\upharpoonleft",!0);i(l,d,f,"⇃","\\downharpoonleft",!0);i(l,o,f,"⊶","\\origof",!0);i(l,o,f,"⊷","\\imageof",!0);i(l,d,f,"⊸","\\multimap",!0);i(l,d,f,"↭","\\leftrightsquigarrow",!0);i(l,d,f,"⇉","\\rightrightarrows",!0);i(l,d,f,"⇄","\\rightleftarrows",!0);i(l,d,f,"↠","\\twoheadrightarrow",!0);i(l,d,f,"↣","\\rightarrowtail",!0);i(l,d,f,"↬","\\looparrowright",!0);i(l,d,f,"↷","\\curvearrowright",!0);i(l,d,f,"↻","\\circlearrowright",!0);i(l,d,f,"↱","\\Rsh",!0);i(l,d,f,"⇊","\\downdownarrows",!0);i(l,d,f,"↾","\\upharpoonright",!0);i(l,d,f,"⇂","\\downharpoonright",!0);i(l,d,f,"⇝","\\rightsquigarrow",!0);i(l,d,f,"⇝","\\leadsto");i(l,d,f,"⇛","\\Rrightarrow",!0);i(l,d,f,"↾","\\restriction");i(l,o,v,"‘","`");i(l,o,v,"$","\\$");i(k,o,v,"$","\\$");i(k,o,v,"$","\\textdollar");i(l,o,v,"%","\\%");i(k,o,v,"%","\\%");i(l,o,v,"_","\\_");i(k,o,v,"_","\\_");i(k,o,v,"_","\\textunderscore");i(l,o,v,"∠","\\angle",!0);i(l,o,v,"∞","\\infty",!0);i(l,o,v,"′","\\prime");i(l,o,v,"△","\\triangle");i(l,o,v,"Γ","\\Gamma",!0);i(l,o,v,"Δ","\\Delta",!0);i(l,o,v,"Θ","\\Theta",!0);i(l,o,v,"Λ","\\Lambda",!0);i(l,o,v,"Ξ","\\Xi",!0);i(l,o,v,"Π","\\Pi",!0);i(l,o,v,"Σ","\\Sigma",!0);i(l,o,v,"Υ","\\Upsilon",!0);i(l,o,v,"Φ","\\Phi",!0);i(l,o,v,"Ψ","\\Psi",!0);i(l,o,v,"Ω","\\Omega",!0);i(l,o,v,"A","Α");i(l,o,v,"B","Β");i(l,o,v,"E","Ε");i(l,o,v,"Z","Ζ");i(l,o,v,"H","Η");i(l,o,v,"I","Ι");i(l,o,v,"K","Κ");i(l,o,v,"M","Μ");i(l,o,v,"N","Ν");i(l,o,v,"O","Ο");i(l,o,v,"P","Ρ");i(l,o,v,"T","Τ");i(l,o,v,"X","Χ");i(l,o,v,"¬","\\neg",!0);i(l,o,v,"¬","\\lnot");i(l,o,v,"⊤","\\top");i(l,o,v,"⊥","\\bot");i(l,o,v,"∅","\\emptyset");i(l,d,v,"∅","\\varnothing");i(l,o,q,"α","\\alpha",!0);i(l,o,q,"β","\\beta",!0);i(l,o,q,"γ","\\gamma",!0);i(l,o,q,"δ","\\delta",!0);i(l,o,q,"ϵ","\\epsilon",!0);i(l,o,q,"ζ","\\zeta",!0);i(l,o,q,"η","\\eta",!0);i(l,o,q,"θ","\\theta",!0);i(l,o,q,"ι","\\iota",!0);i(l,o,q,"κ","\\kappa",!0);i(l,o,q,"λ","\\lambda",!0);i(l,o,q,"μ","\\mu",!0);i(l,o,q,"ν","\\nu",!0);i(l,o,q,"ξ","\\xi",!0);i(l,o,q,"ο","\\omicron",!0);i(l,o,q,"π","\\pi",!0);i(l,o,q,"ρ","\\rho",!0);i(l,o,q,"σ","\\sigma",!0);i(l,o,q,"τ","\\tau",!0);i(l,o,q,"υ","\\upsilon",!0);i(l,o,q,"ϕ","\\phi",!0);i(l,o,q,"χ","\\chi",!0);i(l,o,q,"ψ","\\psi",!0);i(l,o,q,"ω","\\omega",!0);i(l,o,q,"ε","\\varepsilon",!0);i(l,o,q,"ϑ","\\vartheta",!0);i(l,o,q,"ϖ","\\varpi",!0);i(l,o,q,"ϱ","\\varrho",!0);i(l,o,q,"ς","\\varsigma",!0);i(l,o,q,"φ","\\varphi",!0);i(l,o,D,"∗","*",!0);i(l,o,D,"+","+");i(l,o,D,"−","-",!0);i(l,o,D,"⋅","\\cdot",!0);i(l,o,D,"∘","\\circ",!0);i(l,o,D,"÷","\\div",!0);i(l,o,D,"±","\\pm",!0);i(l,o,D,"×","\\times",!0);i(l,o,D,"∩","\\cap",!0);i(l,o,D,"∪","\\cup",!0);i(l,o,D,"∖","\\setminus",!0);i(l,o,D,"∧","\\land");i(l,o,D,"∨","\\lor");i(l,o,D,"∧","\\wedge",!0);i(l,o,D,"∨","\\vee",!0);i(l,o,v,"√","\\surd");i(l,o,c0,"⟨","\\langle",!0);i(l,o,c0,"∣","\\lvert");i(l,o,c0,"∥","\\lVert");i(l,o,i0,"?","?");i(l,o,i0,"!","!");i(l,o,i0,"⟩","\\rangle",!0);i(l,o,i0,"∣","\\rvert");i(l,o,i0,"∥","\\rVert");i(l,o,f,"=","=");i(l,o,f,":",":");i(l,o,f,"≈","\\approx",!0);i(l,o,f,"≅","\\cong",!0);i(l,o,f,"≥","\\ge");i(l,o,f,"≥","\\geq",!0);i(l,o,f,"←","\\gets");i(l,o,f,">","\\gt",!0);i(l,o,f,"∈","\\in",!0);i(l,o,f,"","\\@not");i(l,o,f,"⊂","\\subset",!0);i(l,o,f,"⊃","\\supset",!0);i(l,o,f,"⊆","\\subseteq",!0);i(l,o,f,"⊇","\\supseteq",!0);i(l,d,f,"⊈","\\nsubseteq",!0);i(l,d,f,"⊉","\\nsupseteq",!0);i(l,o,f,"⊨","\\models");i(l,o,f,"←","\\leftarrow",!0);i(l,o,f,"≤","\\le");i(l,o,f,"≤","\\leq",!0);i(l,o,f,"<","\\lt",!0);i(l,o,f,"→","\\rightarrow",!0);i(l,o,f,"→","\\to");i(l,d,f,"≱","\\ngeq",!0);i(l,d,f,"≰","\\nleq",!0);i(l,o,R0," ","\\ ");i(l,o,R0," ","\\space");i(l,o,R0," ","\\nobreakspace");i(k,o,R0," ","\\ ");i(k,o,R0," "," ");i(k,o,R0," ","\\space");i(k,o,R0," ","\\nobreakspace");i(l,o,R0,null,"\\nobreak");i(l,o,R0,null,"\\allowbreak");i(l,o,qe,",",",");i(l,o,qe,";",";");i(l,d,D,"⊼","\\barwedge",!0);i(l,d,D,"⊻","\\veebar",!0);i(l,o,D,"⊙","\\odot",!0);i(l,o,D,"⊕","\\oplus",!0);i(l,o,D,"⊗","\\otimes",!0);i(l,o,v,"∂","\\partial",!0);i(l,o,D,"⊘","\\oslash",!0);i(l,d,D,"⊚","\\circledcirc",!0);i(l,d,D,"⊡","\\boxdot",!0);i(l,o,D,"△","\\bigtriangleup");i(l,o,D,"▽","\\bigtriangledown");i(l,o,D,"†","\\dagger");i(l,o,D,"⋄","\\diamond");i(l,o,D,"⋆","\\star");i(l,o,D,"◃","\\triangleleft");i(l,o,D,"▹","\\triangleright");i(l,o,c0,"{","\\{");i(k,o,v,"{","\\{");i(k,o,v,"{","\\textbraceleft");i(l,o,i0,"}","\\}");i(k,o,v,"}","\\}");i(k,o,v,"}","\\textbraceright");i(l,o,c0,"{","\\lbrace");i(l,o,i0,"}","\\rbrace");i(l,o,c0,"[","\\lbrack",!0);i(k,o,v,"[","\\lbrack",!0);i(l,o,i0,"]","\\rbrack",!0);i(k,o,v,"]","\\rbrack",!0);i(l,o,c0,"(","\\lparen",!0);i(l,o,i0,")","\\rparen",!0);i(k,o,v,"<","\\textless",!0);i(k,o,v,">","\\textgreater",!0);i(l,o,c0,"⌊","\\lfloor",!0);i(l,o,i0,"⌋","\\rfloor",!0);i(l,o,c0,"⌈","\\lceil",!0);i(l,o,i0,"⌉","\\rceil",!0);i(l,o,v,"\\","\\backslash");i(l,o,v,"∣","|");i(l,o,v,"∣","\\vert");i(k,o,v,"|","\\textbar",!0);i(l,o,v,"∥","\\|");i(l,o,v,"∥","\\Vert");i(k,o,v,"∥","\\textbardbl");i(k,o,v,"~","\\textasciitilde");i(k,o,v,"\\","\\textbackslash");i(k,o,v,"^","\\textasciicircum");i(l,o,f,"↑","\\uparrow",!0);i(l,o,f,"⇑","\\Uparrow",!0);i(l,o,f,"↓","\\downarrow",!0);i(l,o,f,"⇓","\\Downarrow",!0);i(l,o,f,"↕","\\updownarrow",!0);i(l,o,f,"⇕","\\Updownarrow",!0);i(l,o,_,"∐","\\coprod");i(l,o,_,"⋁","\\bigvee");i(l,o,_,"⋀","\\bigwedge");i(l,o,_,"⨄","\\biguplus");i(l,o,_,"⋂","\\bigcap");i(l,o,_,"⋃","\\bigcup");i(l,o,_,"∫","\\int");i(l,o,_,"∫","\\intop");i(l,o,_,"∬","\\iint");i(l,o,_,"∭","\\iiint");i(l,o,_,"∏","\\prod");i(l,o,_,"∑","\\sum");i(l,o,_,"⨂","\\bigotimes");i(l,o,_,"⨁","\\bigoplus");i(l,o,_,"⨀","\\bigodot");i(l,o,_,"∮","\\oint");i(l,o,_,"∯","\\oiint");i(l,o,_,"∰","\\oiiint");i(l,o,_,"⨆","\\bigsqcup");i(l,o,_,"∫","\\smallint");i(k,o,re,"…","\\textellipsis");i(l,o,re,"…","\\mathellipsis");i(k,o,re,"…","\\ldots",!0);i(l,o,re,"…","\\ldots",!0);i(l,o,re,"⋯","\\@cdots",!0);i(l,o,re,"⋱","\\ddots",!0);i(l,o,v,"⋮","\\varvdots");i(k,o,v,"⋮","\\varvdots");i(l,o,W,"ˊ","\\acute");i(l,o,W,"ˋ","\\grave");i(l,o,W,"¨","\\ddot");i(l,o,W,"~","\\tilde");i(l,o,W,"ˉ","\\bar");i(l,o,W,"˘","\\breve");i(l,o,W,"ˇ","\\check");i(l,o,W,"^","\\hat");i(l,o,W,"⃗","\\vec");i(l,o,W,"˙","\\dot");i(l,o,W,"˚","\\mathring");i(l,o,q,"","\\@imath");i(l,o,q,"","\\@jmath");i(l,o,v,"ı","ı");i(l,o,v,"ȷ","ȷ");i(k,o,v,"ı","\\i",!0);i(k,o,v,"ȷ","\\j",!0);i(k,o,v,"ß","\\ss",!0);i(k,o,v,"æ","\\ae",!0);i(k,o,v,"œ","\\oe",!0);i(k,o,v,"ø","\\o",!0);i(k,o,v,"Æ","\\AE",!0);i(k,o,v,"Œ","\\OE",!0);i(k,o,v,"Ø","\\O",!0);i(k,o,W,"ˊ","\\'");i(k,o,W,"ˋ","\\`");i(k,o,W,"ˆ","\\^");i(k,o,W,"˜","\\~");i(k,o,W,"ˉ","\\=");i(k,o,W,"˘","\\u");i(k,o,W,"˙","\\.");i(k,o,W,"¸","\\c");i(k,o,W,"˚","\\r");i(k,o,W,"ˇ","\\v");i(k,o,W,"¨",'\\"');i(k,o,W,"˝","\\H");i(k,o,W,"◯","\\textcircled");var kr={"--":!0,"---":!0,"``":!0,"''":!0};i(k,o,v,"–","--",!0);i(k,o,v,"–","\\textendash");i(k,o,v,"—","---",!0);i(k,o,v,"—","\\textemdash");i(k,o,v,"‘","`",!0);i(k,o,v,"‘","\\textquoteleft");i(k,o,v,"’","'",!0);i(k,o,v,"’","\\textquoteright");i(k,o,v,"“","``",!0);i(k,o,v,"“","\\textquotedblleft");i(k,o,v,"”","''",!0);i(k,o,v,"”","\\textquotedblright");i(l,o,v,"°","\\degree",!0);i(k,o,v,"°","\\degree");i(k,o,v,"°","\\textdegree",!0);i(l,o,v,"£","\\pounds");i(l,o,v,"£","\\mathsterling",!0);i(k,o,v,"£","\\pounds");i(k,o,v,"£","\\textsterling",!0);i(l,d,v,"✠","\\maltese");i(k,d,v,"✠","\\maltese");var Vt='0123456789/@."';for(var Ye=0;Ye0)return b0(s,p,n,t,u.concat(g));if(c){var y,x;if(c==="boldsymbol"){var w=_a(s,n,t,u,a);y=w.fontName,x=[w.fontClass]}else h?(y=zr[c].fontName,x=[c]):(y=xe(c,t.fontWeight,t.fontShape),x=[c,t.fontWeight,t.fontShape]);if(Re(s,y,n).metrics)return b0(s,y,n,t,u.concat(x));if(kr.hasOwnProperty(s)&&y.slice(0,10)==="Typewriter"){for(var z=[],T=0;T{if(P0(r.classes)!==P0(e.classes)||r.skew!==e.skew||r.maxFontSize!==e.maxFontSize)return!1;if(r.classes.length===1){var t=r.classes[0];if(t==="mbin"||t==="mord")return!1}for(var a in r.style)if(r.style.hasOwnProperty(a)&&r.style[a]!==e.style[a])return!1;for(var n in e.style)if(e.style.hasOwnProperty(n)&&r.style[n]!==e.style[n])return!1;return!0},r1=r=>{for(var e=0;et&&(t=u.height),u.depth>a&&(a=u.depth),u.maxFontSize>n&&(n=u.maxFontSize)}e.height=t,e.depth=a,e.maxFontSize=n},l0=function(e,t,a,n){var s=new he(e,t,a,n);return gt(s),s},Sr=(r,e,t,a)=>new he(r,e,t,a),a1=function(e,t,a){var n=l0([e],[],t);return n.height=Math.max(a||t.fontMetrics().defaultRuleThickness,t.minRuleThickness),n.style.borderBottomWidth=A(n.height),n.maxFontSize=1,n},n1=function(e,t,a,n){var s=new vt(e,t,a,n);return gt(s),s},Mr=function(e){var t=new oe(e);return gt(t),t},i1=function(e,t){return e instanceof oe?l0([],[e],t):e},s1=function(e){if(e.positionType==="individualShift"){for(var t=e.children,a=[t[0]],n=-t[0].shift-t[0].elem.depth,s=n,u=1;u{var t=l0(["mspace"],[],e),a=K(r,e);return t.style.marginRight=A(a),t},xe=function(e,t,a){var n="";switch(e){case"amsrm":n="AMS";break;case"textrm":n="Main";break;case"textsf":n="SansSerif";break;case"texttt":n="Typewriter";break;default:n=e}var s;return t==="textbf"&&a==="textit"?s="BoldItalic":t==="textbf"?s="Bold":t==="textit"?s="Italic":s="Regular",n+"-"+s},zr={mathbf:{variant:"bold",fontName:"Main-Bold"},mathrm:{variant:"normal",fontName:"Main-Regular"},textit:{variant:"italic",fontName:"Main-Italic"},mathit:{variant:"italic",fontName:"Main-Italic"},mathnormal:{variant:"italic",fontName:"Math-Italic"},mathsfit:{variant:"sans-serif-italic",fontName:"SansSerif-Italic"},mathbb:{variant:"double-struck",fontName:"AMS-Regular"},mathcal:{variant:"script",fontName:"Caligraphic-Regular"},mathfrak:{variant:"fraktur",fontName:"Fraktur-Regular"},mathscr:{variant:"script",fontName:"Script-Regular"},mathsf:{variant:"sans-serif",fontName:"SansSerif-Regular"},mathtt:{variant:"monospace",fontName:"Typewriter-Regular"}},Ar={vec:["vec",.471,.714],oiintSize1:["oiintSize1",.957,.499],oiintSize2:["oiintSize2",1.472,.659],oiiintSize1:["oiiintSize1",1.304,.499],oiiintSize2:["oiiintSize2",1.98,.659]},o1=function(e,t){var[a,n,s]=Ar[e],u=new V0(a),h=new C0([u],{width:A(n),height:A(s),style:"width:"+A(n),viewBox:"0 0 "+1e3*n+" "+1e3*s,preserveAspectRatio:"xMinYMin"}),c=Sr(["overlay"],[h],t);return c.height=s,c.style.height=A(s),c.style.width=A(n),c},b={fontMap:zr,makeSymbol:b0,mathsym:Qa,makeSpan:l0,makeSvgSpan:Sr,makeLineSpan:a1,makeAnchor:n1,makeFragment:Mr,wrapFragment:i1,makeVList:l1,makeOrd:e1,makeGlue:u1,staticSvg:o1,svgData:Ar,tryCombineChars:r1},Z={number:3,unit:"mu"},$0={number:4,unit:"mu"},A0={number:5,unit:"mu"},h1={mord:{mop:Z,mbin:$0,mrel:A0,minner:Z},mop:{mord:Z,mop:Z,mrel:A0,minner:Z},mbin:{mord:$0,mop:$0,mopen:$0,minner:$0},mrel:{mord:A0,mop:A0,mopen:A0,minner:A0},mopen:{},mclose:{mop:Z,mbin:$0,mrel:A0,minner:Z},mpunct:{mord:Z,mop:Z,mrel:A0,mopen:Z,mclose:Z,mpunct:Z,minner:Z},minner:{mord:Z,mop:Z,mbin:$0,mrel:A0,mopen:Z,mpunct:Z,minner:Z}},m1={mord:{mop:Z},mop:{mord:Z,mop:Z},mbin:{},mrel:{},mopen:{},mclose:{mop:Z},mpunct:{},minner:{mop:Z}},Tr={},De={},Ce={};function B(r){for(var{type:e,names:t,props:a,handler:n,htmlBuilder:s,mathmlBuilder:u}=r,h={type:e,numArgs:a.numArgs,argTypes:a.argTypes,allowedInArgument:!!a.allowedInArgument,allowedInText:!!a.allowedInText,allowedInMath:a.allowedInMath===void 0?!0:a.allowedInMath,numOptionalArgs:a.numOptionalArgs||0,infix:!!a.infix,primitive:!!a.primitive,handler:n},c=0;c{var C=T.classes[0],N=z.classes[0];C==="mbin"&&d1.includes(N)?T.classes[0]="mord":N==="mbin"&&c1.includes(C)&&(z.classes[0]="mord")},{node:y},x,w),$t(s,(z,T)=>{var C=ut(T),N=ut(z),I=C&&N?z.hasClass("mtight")?m1[C][N]:h1[C][N]:null;if(I)return b.makeGlue(I,p)},{node:y},x,w),s},$t=function r(e,t,a,n,s){n&&e.push(n);for(var u=0;ux=>{e.splice(y+1,0,x),u++})(u)}n&&e.pop()},Br=function(e){return e instanceof oe||e instanceof vt||e instanceof he&&e.hasClass("enclosing")?e:null},v1=function r(e,t){var a=Br(e);if(a){var n=a.children;if(n.length){if(t==="right")return r(n[n.length-1],"right");if(t==="left")return r(n[0],"left")}}return e},ut=function(e,t){return e?(t&&(e=v1(e,t)),p1[e.classes[0]]||null):null},ue=function(e,t){var a=["nulldelimiter"].concat(e.baseSizingClasses());return N0(t.concat(a))},L=function(e,t,a){if(!e)return N0();if(De[e.type]){var n=De[e.type](e,t);if(a&&t.size!==a.size){n=N0(t.sizingClasses(a),[n],t);var s=t.sizeMultiplier/a.sizeMultiplier;n.height*=s,n.depth*=s}return n}else throw new M("Got group of unknown type: '"+e.type+"'")};function we(r,e){var t=N0(["base"],r,e),a=N0(["strut"]);return a.style.height=A(t.height+t.depth),t.depth&&(a.style.verticalAlign=A(-t.depth)),t.children.unshift(a),t}function ot(r,e){var t=null;r.length===1&&r[0].type==="tag"&&(t=r[0].tag,r=r[0].body);var a=t0(r,e,"root"),n;a.length===2&&a[1].hasClass("tag")&&(n=a.pop());for(var s=[],u=[],h=0;h0&&(s.push(we(u,e)),u=[]),s.push(a[h]));u.length>0&&s.push(we(u,e));var p;t?(p=we(t0(t,e,!0)),p.classes=["tag"],s.push(p)):n&&s.push(n);var g=N0(["katex-html"],s);if(g.setAttribute("aria-hidden","true"),p){var y=p.children[0];y.style.height=A(g.height+g.depth),g.depth&&(y.style.verticalAlign=A(-g.depth))}return g}function Dr(r){return new oe(r)}class h0{constructor(e,t,a){this.type=void 0,this.attributes=void 0,this.children=void 0,this.classes=void 0,this.type=e,this.attributes={},this.children=t||[],this.classes=a||[]}setAttribute(e,t){this.attributes[e]=t}getAttribute(e){return this.attributes[e]}toNode(){var e=document.createElementNS("http://www.w3.org/1998/Math/MathML",this.type);for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&e.setAttribute(t,this.attributes[t]);this.classes.length>0&&(e.className=P0(this.classes));for(var a=0;a0&&(e+=' class ="'+V.escape(P0(this.classes))+'"'),e+=">";for(var a=0;a",e}toText(){return this.children.map(e=>e.toText()).join("")}}class w0{constructor(e){this.text=void 0,this.text=e}toNode(){return document.createTextNode(this.text)}toMarkup(){return V.escape(this.toText())}toText(){return this.text}}class g1{constructor(e){this.width=void 0,this.character=void 0,this.width=e,e>=.05555&&e<=.05556?this.character=" ":e>=.1666&&e<=.1667?this.character=" ":e>=.2222&&e<=.2223?this.character=" ":e>=.2777&&e<=.2778?this.character="  ":e>=-.05556&&e<=-.05555?this.character=" ⁣":e>=-.1667&&e<=-.1666?this.character=" ⁣":e>=-.2223&&e<=-.2222?this.character=" ⁣":e>=-.2778&&e<=-.2777?this.character=" ⁣":this.character=null}toNode(){if(this.character)return document.createTextNode(this.character);var e=document.createElementNS("http://www.w3.org/1998/Math/MathML","mspace");return e.setAttribute("width",A(this.width)),e}toMarkup(){return this.character?""+this.character+"":''}toText(){return this.character?this.character:" "}}var S={MathNode:h0,TextNode:w0,SpaceNode:g1,newDocumentFragment:Dr},v0=function(e,t,a){return $[t][e]&&$[t][e].replace&&e.charCodeAt(0)!==55349&&!(kr.hasOwnProperty(e)&&a&&(a.fontFamily&&a.fontFamily.slice(4,6)==="tt"||a.font&&a.font.slice(4,6)==="tt"))&&(e=$[t][e].replace),new S.TextNode(e)},bt=function(e){return e.length===1?e[0]:new S.MathNode("mrow",e)},yt=function(e,t){if(t.fontFamily==="texttt")return"monospace";if(t.fontFamily==="textsf")return t.fontShape==="textit"&&t.fontWeight==="textbf"?"sans-serif-bold-italic":t.fontShape==="textit"?"sans-serif-italic":t.fontWeight==="textbf"?"bold-sans-serif":"sans-serif";if(t.fontShape==="textit"&&t.fontWeight==="textbf")return"bold-italic";if(t.fontShape==="textit")return"italic";if(t.fontWeight==="textbf")return"bold";var a=t.font;if(!a||a==="mathnormal")return null;var n=e.mode;if(a==="mathit")return"italic";if(a==="boldsymbol")return e.type==="textord"?"bold":"bold-italic";if(a==="mathbf")return"bold";if(a==="mathbb")return"double-struck";if(a==="mathsfit")return"sans-serif-italic";if(a==="mathfrak")return"fraktur";if(a==="mathscr"||a==="mathcal")return"script";if(a==="mathsf")return"sans-serif";if(a==="mathtt")return"monospace";var s=e.text;if(["\\imath","\\jmath"].includes(s))return null;$[n][s]&&$[n][s].replace&&(s=$[n][s].replace);var u=b.fontMap[a].fontName;return pt(s,u,n)?b.fontMap[a].variant:null};function je(r){if(!r)return!1;if(r.type==="mi"&&r.children.length===1){var e=r.children[0];return e instanceof w0&&e.text==="."}else if(r.type==="mo"&&r.children.length===1&&r.getAttribute("separator")==="true"&&r.getAttribute("lspace")==="0em"&&r.getAttribute("rspace")==="0em"){var t=r.children[0];return t instanceof w0&&t.text===","}else return!1}var o0=function(e,t,a){if(e.length===1){var n=X(e[0],t);return a&&n instanceof h0&&n.type==="mo"&&(n.setAttribute("lspace","0em"),n.setAttribute("rspace","0em")),[n]}for(var s=[],u,h=0;h=1&&(u.type==="mn"||je(u))){var p=c.children[0];p instanceof h0&&p.type==="mn"&&(p.children=[...u.children,...p.children],s.pop())}else if(u.type==="mi"&&u.children.length===1){var g=u.children[0];if(g instanceof w0&&g.text==="̸"&&(c.type==="mo"||c.type==="mi"||c.type==="mn")){var y=c.children[0];y instanceof w0&&y.text.length>0&&(y.text=y.text.slice(0,1)+"̸"+y.text.slice(1),s.pop())}}}s.push(c),u=c}return s},G0=function(e,t,a){return bt(o0(e,t,a))},X=function(e,t){if(!e)return new S.MathNode("mrow");if(Ce[e.type]){var a=Ce[e.type](e,t);return a}else throw new M("Got group of unknown type: '"+e.type+"'")};function Wt(r,e,t,a,n){var s=o0(r,t),u;s.length===1&&s[0]instanceof h0&&["mrow","mtable"].includes(s[0].type)?u=s[0]:u=new S.MathNode("mrow",s);var h=new S.MathNode("annotation",[new S.TextNode(e)]);h.setAttribute("encoding","application/x-tex");var c=new S.MathNode("semantics",[u,h]),p=new S.MathNode("math",[c]);p.setAttribute("xmlns","http://www.w3.org/1998/Math/MathML"),a&&p.setAttribute("display","block");var g=n?"katex":"katex-mathml";return b.makeSpan([g],[p])}var Cr=function(e){return new T0({style:e.displayMode?R.DISPLAY:R.TEXT,maxSize:e.maxSize,minRuleThickness:e.minRuleThickness})},Nr=function(e,t){if(t.displayMode){var a=["katex-display"];t.leqno&&a.push("leqno"),t.fleqn&&a.push("fleqn"),e=b.makeSpan(a,[e])}return e},b1=function(e,t,a){var n=Cr(a),s;if(a.output==="mathml")return Wt(e,t,n,a.displayMode,!0);if(a.output==="html"){var u=ot(e,n);s=b.makeSpan(["katex"],[u])}else{var h=Wt(e,t,n,a.displayMode,!1),c=ot(e,n);s=b.makeSpan(["katex"],[h,c])}return Nr(s,a)},y1=function(e,t,a){var n=Cr(a),s=ot(e,n),u=b.makeSpan(["katex"],[s]);return Nr(u,a)},x1={widehat:"^",widecheck:"ˇ",widetilde:"~",utilde:"~",overleftarrow:"←",underleftarrow:"←",xleftarrow:"←",overrightarrow:"→",underrightarrow:"→",xrightarrow:"→",underbrace:"⏟",overbrace:"⏞",overgroup:"⏠",undergroup:"⏡",overleftrightarrow:"↔",underleftrightarrow:"↔",xleftrightarrow:"↔",Overrightarrow:"⇒",xRightarrow:"⇒",overleftharpoon:"↼",xleftharpoonup:"↼",overrightharpoon:"⇀",xrightharpoonup:"⇀",xLeftarrow:"⇐",xLeftrightarrow:"⇔",xhookleftarrow:"↩",xhookrightarrow:"↪",xmapsto:"↦",xrightharpoondown:"⇁",xleftharpoondown:"↽",xrightleftharpoons:"⇌",xleftrightharpoons:"⇋",xtwoheadleftarrow:"↞",xtwoheadrightarrow:"↠",xlongequal:"=",xtofrom:"⇄",xrightleftarrows:"⇄",xrightequilibrium:"⇌",xleftequilibrium:"⇋","\\cdrightarrow":"→","\\cdleftarrow":"←","\\cdlongequal":"="},w1=function(e){var t=new S.MathNode("mo",[new S.TextNode(x1[e.replace(/^\\/,"")])]);return t.setAttribute("stretchy","true"),t},k1={overrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],overleftarrow:[["leftarrow"],.888,522,"xMinYMin"],underrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],underleftarrow:[["leftarrow"],.888,522,"xMinYMin"],xrightarrow:[["rightarrow"],1.469,522,"xMaxYMin"],"\\cdrightarrow":[["rightarrow"],3,522,"xMaxYMin"],xleftarrow:[["leftarrow"],1.469,522,"xMinYMin"],"\\cdleftarrow":[["leftarrow"],3,522,"xMinYMin"],Overrightarrow:[["doublerightarrow"],.888,560,"xMaxYMin"],xRightarrow:[["doublerightarrow"],1.526,560,"xMaxYMin"],xLeftarrow:[["doubleleftarrow"],1.526,560,"xMinYMin"],overleftharpoon:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoonup:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoondown:[["leftharpoondown"],.888,522,"xMinYMin"],overrightharpoon:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoonup:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoondown:[["rightharpoondown"],.888,522,"xMaxYMin"],xlongequal:[["longequal"],.888,334,"xMinYMin"],"\\cdlongequal":[["longequal"],3,334,"xMinYMin"],xtwoheadleftarrow:[["twoheadleftarrow"],.888,334,"xMinYMin"],xtwoheadrightarrow:[["twoheadrightarrow"],.888,334,"xMaxYMin"],overleftrightarrow:[["leftarrow","rightarrow"],.888,522],overbrace:[["leftbrace","midbrace","rightbrace"],1.6,548],underbrace:[["leftbraceunder","midbraceunder","rightbraceunder"],1.6,548],underleftrightarrow:[["leftarrow","rightarrow"],.888,522],xleftrightarrow:[["leftarrow","rightarrow"],1.75,522],xLeftrightarrow:[["doubleleftarrow","doublerightarrow"],1.75,560],xrightleftharpoons:[["leftharpoondownplus","rightharpoonplus"],1.75,716],xleftrightharpoons:[["leftharpoonplus","rightharpoondownplus"],1.75,716],xhookleftarrow:[["leftarrow","righthook"],1.08,522],xhookrightarrow:[["lefthook","rightarrow"],1.08,522],overlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],underlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],overgroup:[["leftgroup","rightgroup"],.888,342],undergroup:[["leftgroupunder","rightgroupunder"],.888,342],xmapsto:[["leftmapsto","rightarrow"],1.5,522],xtofrom:[["leftToFrom","rightToFrom"],1.75,528],xrightleftarrows:[["baraboveleftarrow","rightarrowabovebar"],1.75,901],xrightequilibrium:[["baraboveshortleftharpoon","rightharpoonaboveshortbar"],1.75,716],xleftequilibrium:[["shortbaraboveleftharpoon","shortrightharpoonabovebar"],1.75,716]},S1=function(e){return e.type==="ordgroup"?e.body.length:1},M1=function(e,t){function a(){var h=4e5,c=e.label.slice(1);if(["widehat","widecheck","widetilde","utilde"].includes(c)){var p=e,g=S1(p.base),y,x,w;if(g>5)c==="widehat"||c==="widecheck"?(y=420,h=2364,w=.42,x=c+"4"):(y=312,h=2340,w=.34,x="tilde4");else{var z=[1,1,2,2,3,3][g];c==="widehat"||c==="widecheck"?(h=[0,1062,2364,2364,2364][z],y=[0,239,300,360,420][z],w=[0,.24,.3,.3,.36,.42][z],x=c+z):(h=[0,600,1033,2339,2340][z],y=[0,260,286,306,312][z],w=[0,.26,.286,.3,.306,.34][z],x="tilde"+z)}var T=new V0(x),C=new C0([T],{width:"100%",height:A(w),viewBox:"0 0 "+h+" "+y,preserveAspectRatio:"none"});return{span:b.makeSvgSpan([],[C],t),minWidth:0,height:w}}else{var N=[],I=k1[c],[F,G,H]=I,U=H/1e3,P=F.length,j,Y;if(P===1){var z0=I[3];j=["hide-tail"],Y=[z0]}else if(P===2)j=["halfarrow-left","halfarrow-right"],Y=["xMinYMin","xMaxYMin"];else if(P===3)j=["brace-left","brace-center","brace-right"],Y=["xMinYMin","xMidYMin","xMaxYMin"];else throw new Error(`Correct katexImagesData or update code here to support + `+P+" children.");for(var r0=0;r00&&(n.style.minWidth=A(s)),n},z1=function(e,t,a,n,s){var u,h=e.height+e.depth+a+n;if(/fbox|color|angl/.test(t)){if(u=b.makeSpan(["stretchy",t],[],s),t==="fbox"){var c=s.color&&s.getColor();c&&(u.style.borderColor=c)}}else{var p=[];/^[bx]cancel$/.test(t)&&p.push(new st({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(t)&&p.push(new st({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"}));var g=new C0(p,{width:"100%",height:A(h)});u=b.makeSvgSpan([],[g],s)}return u.height=h,u.style.height=A(h),u},q0={encloseSpan:z1,mathMLnode:w1,svgSpan:M1};function O(r,e){if(!r||r.type!==e)throw new Error("Expected node of type "+e+", but got "+(r?"node of type "+r.type:String(r)));return r}function xt(r){var e=Ee(r);if(!e)throw new Error("Expected node of symbol group type, but got "+(r?"node of type "+r.type:String(r)));return e}function Ee(r){return r&&(r.type==="atom"||Ka.hasOwnProperty(r.type))?r:null}var wt=(r,e)=>{var t,a,n;r&&r.type==="supsub"?(a=O(r.base,"accent"),t=a.base,r.base=t,n=ja(L(r,e)),r.base=a):(a=O(r,"accent"),t=a.base);var s=L(t,e.havingCrampedStyle()),u=a.isShifty&&V.isCharacterBox(t),h=0;if(u){var c=V.getBaseElem(t),p=L(c,e.havingCrampedStyle());h=Pt(p).skew}var g=a.label==="\\c",y=g?s.height+s.depth:Math.min(s.height,e.fontMetrics().xHeight),x;if(a.isStretchy)x=q0.svgSpan(a,e),x=b.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:s},{type:"elem",elem:x,wrapperClasses:["svg-align"],wrapperStyle:h>0?{width:"calc(100% - "+A(2*h)+")",marginLeft:A(2*h)}:void 0}]},e);else{var w,z;a.label==="\\vec"?(w=b.staticSvg("vec",e),z=b.svgData.vec[1]):(w=b.makeOrd({mode:a.mode,text:a.label},e,"textord"),w=Pt(w),w.italic=0,z=w.width,g&&(y+=w.depth)),x=b.makeSpan(["accent-body"],[w]);var T=a.label==="\\textcircled";T&&(x.classes.push("accent-full"),y=s.height);var C=h;T||(C-=z/2),x.style.left=A(C),a.label==="\\textcircled"&&(x.style.top=".2em"),x=b.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:s},{type:"kern",size:-y},{type:"elem",elem:x}]},e)}var N=b.makeSpan(["mord","accent"],[x],e);return n?(n.children[0]=N,n.height=Math.max(N.height,n.height),n.classes[0]="mord",n):N},qr=(r,e)=>{var t=r.isStretchy?q0.mathMLnode(r.label):new S.MathNode("mo",[v0(r.label,r.mode)]),a=new S.MathNode("mover",[X(r.base,e),t]);return a.setAttribute("accent","true"),a},A1=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map(r=>"\\"+r).join("|"));B({type:"accent",names:["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring","\\widecheck","\\widehat","\\widetilde","\\overrightarrow","\\overleftarrow","\\Overrightarrow","\\overleftrightarrow","\\overgroup","\\overlinesegment","\\overleftharpoon","\\overrightharpoon"],props:{numArgs:1},handler:(r,e)=>{var t=Ne(e[0]),a=!A1.test(r.funcName),n=!a||r.funcName==="\\widehat"||r.funcName==="\\widetilde"||r.funcName==="\\widecheck";return{type:"accent",mode:r.parser.mode,label:r.funcName,isStretchy:a,isShifty:n,base:t}},htmlBuilder:wt,mathmlBuilder:qr});B({type:"accent",names:["\\'","\\`","\\^","\\~","\\=","\\u","\\.",'\\"',"\\c","\\r","\\H","\\v","\\textcircled"],props:{numArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["primitive"]},handler:(r,e)=>{var t=e[0],a=r.parser.mode;return a==="math"&&(r.parser.settings.reportNonstrict("mathVsTextAccents","LaTeX's accent "+r.funcName+" works only in text mode"),a="text"),{type:"accent",mode:a,label:r.funcName,isStretchy:!1,isShifty:!0,base:t}},htmlBuilder:wt,mathmlBuilder:qr});B({type:"accentUnder",names:["\\underleftarrow","\\underrightarrow","\\underleftrightarrow","\\undergroup","\\underlinesegment","\\utilde"],props:{numArgs:1},handler:(r,e)=>{var{parser:t,funcName:a}=r,n=e[0];return{type:"accentUnder",mode:t.mode,label:a,base:n}},htmlBuilder:(r,e)=>{var t=L(r.base,e),a=q0.svgSpan(r,e),n=r.label==="\\utilde"?.12:0,s=b.makeVList({positionType:"top",positionData:t.height,children:[{type:"elem",elem:a,wrapperClasses:["svg-align"]},{type:"kern",size:n},{type:"elem",elem:t}]},e);return b.makeSpan(["mord","accentunder"],[s],e)},mathmlBuilder:(r,e)=>{var t=q0.mathMLnode(r.label),a=new S.MathNode("munder",[X(r.base,e),t]);return a.setAttribute("accentunder","true"),a}});var ke=r=>{var e=new S.MathNode("mpadded",r?[r]:[]);return e.setAttribute("width","+0.6em"),e.setAttribute("lspace","0.3em"),e};B({type:"xArrow",names:["\\xleftarrow","\\xrightarrow","\\xLeftarrow","\\xRightarrow","\\xleftrightarrow","\\xLeftrightarrow","\\xhookleftarrow","\\xhookrightarrow","\\xmapsto","\\xrightharpoondown","\\xrightharpoonup","\\xleftharpoondown","\\xleftharpoonup","\\xrightleftharpoons","\\xleftrightharpoons","\\xlongequal","\\xtwoheadrightarrow","\\xtwoheadleftarrow","\\xtofrom","\\xrightleftarrows","\\xrightequilibrium","\\xleftequilibrium","\\\\cdrightarrow","\\\\cdleftarrow","\\\\cdlongequal"],props:{numArgs:1,numOptionalArgs:1},handler(r,e,t){var{parser:a,funcName:n}=r;return{type:"xArrow",mode:a.mode,label:n,body:e[0],below:t[0]}},htmlBuilder(r,e){var t=e.style,a=e.havingStyle(t.sup()),n=b.wrapFragment(L(r.body,a,e),e),s=r.label.slice(0,2)==="\\x"?"x":"cd";n.classes.push(s+"-arrow-pad");var u;r.below&&(a=e.havingStyle(t.sub()),u=b.wrapFragment(L(r.below,a,e),e),u.classes.push(s+"-arrow-pad"));var h=q0.svgSpan(r,e),c=-e.fontMetrics().axisHeight+.5*h.height,p=-e.fontMetrics().axisHeight-.5*h.height-.111;(n.depth>.25||r.label==="\\xleftequilibrium")&&(p-=n.depth);var g;if(u){var y=-e.fontMetrics().axisHeight+u.height+.5*h.height+.111;g=b.makeVList({positionType:"individualShift",children:[{type:"elem",elem:n,shift:p},{type:"elem",elem:h,shift:c},{type:"elem",elem:u,shift:y}]},e)}else g=b.makeVList({positionType:"individualShift",children:[{type:"elem",elem:n,shift:p},{type:"elem",elem:h,shift:c}]},e);return g.children[0].children[0].children[1].classes.push("svg-align"),b.makeSpan(["mrel","x-arrow"],[g],e)},mathmlBuilder(r,e){var t=q0.mathMLnode(r.label);t.setAttribute("minsize",r.label.charAt(0)==="x"?"1.75em":"3.0em");var a;if(r.body){var n=ke(X(r.body,e));if(r.below){var s=ke(X(r.below,e));a=new S.MathNode("munderover",[t,s,n])}else a=new S.MathNode("mover",[t,n])}else if(r.below){var u=ke(X(r.below,e));a=new S.MathNode("munder",[t,u])}else a=ke(),a=new S.MathNode("mover",[t,a]);return a}});var T1=b.makeSpan;function Rr(r,e){var t=t0(r.body,e,!0);return T1([r.mclass],t,e)}function Er(r,e){var t,a=o0(r.body,e);return r.mclass==="minner"?t=new S.MathNode("mpadded",a):r.mclass==="mord"?r.isCharacterBox?(t=a[0],t.type="mi"):t=new S.MathNode("mi",a):(r.isCharacterBox?(t=a[0],t.type="mo"):t=new S.MathNode("mo",a),r.mclass==="mbin"?(t.attributes.lspace="0.22em",t.attributes.rspace="0.22em"):r.mclass==="mpunct"?(t.attributes.lspace="0em",t.attributes.rspace="0.17em"):r.mclass==="mopen"||r.mclass==="mclose"?(t.attributes.lspace="0em",t.attributes.rspace="0em"):r.mclass==="minner"&&(t.attributes.lspace="0.0556em",t.attributes.width="+0.1111em")),t}B({type:"mclass",names:["\\mathord","\\mathbin","\\mathrel","\\mathopen","\\mathclose","\\mathpunct","\\mathinner"],props:{numArgs:1,primitive:!0},handler(r,e){var{parser:t,funcName:a}=r,n=e[0];return{type:"mclass",mode:t.mode,mclass:"m"+a.slice(5),body:Q(n),isCharacterBox:V.isCharacterBox(n)}},htmlBuilder:Rr,mathmlBuilder:Er});var Ie=r=>{var e=r.type==="ordgroup"&&r.body.length?r.body[0]:r;return e.type==="atom"&&(e.family==="bin"||e.family==="rel")?"m"+e.family:"mord"};B({type:"mclass",names:["\\@binrel"],props:{numArgs:2},handler(r,e){var{parser:t}=r;return{type:"mclass",mode:t.mode,mclass:Ie(e[0]),body:Q(e[1]),isCharacterBox:V.isCharacterBox(e[1])}}});B({type:"mclass",names:["\\stackrel","\\overset","\\underset"],props:{numArgs:2},handler(r,e){var{parser:t,funcName:a}=r,n=e[1],s=e[0],u;a!=="\\stackrel"?u=Ie(n):u="mrel";var h={type:"op",mode:n.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:a!=="\\stackrel",body:Q(n)},c={type:"supsub",mode:s.mode,base:h,sup:a==="\\underset"?null:s,sub:a==="\\underset"?s:null};return{type:"mclass",mode:t.mode,mclass:u,body:[c],isCharacterBox:V.isCharacterBox(c)}},htmlBuilder:Rr,mathmlBuilder:Er});B({type:"pmb",names:["\\pmb"],props:{numArgs:1,allowedInText:!0},handler(r,e){var{parser:t}=r;return{type:"pmb",mode:t.mode,mclass:Ie(e[0]),body:Q(e[0])}},htmlBuilder(r,e){var t=t0(r.body,e,!0),a=b.makeSpan([r.mclass],t,e);return a.style.textShadow="0.02em 0.01em 0.04px",a},mathmlBuilder(r,e){var t=o0(r.body,e),a=new S.MathNode("mstyle",t);return a.setAttribute("style","text-shadow: 0.02em 0.01em 0.04px"),a}});var B1={">":"\\\\cdrightarrow","<":"\\\\cdleftarrow","=":"\\\\cdlongequal",A:"\\uparrow",V:"\\downarrow","|":"\\Vert",".":"no arrow"},jt=()=>({type:"styling",body:[],mode:"math",style:"display"}),Zt=r=>r.type==="textord"&&r.text==="@",D1=(r,e)=>(r.type==="mathord"||r.type==="atom")&&r.text===e;function C1(r,e,t){var a=B1[r];switch(a){case"\\\\cdrightarrow":case"\\\\cdleftarrow":return t.callFunction(a,[e[0]],[e[1]]);case"\\uparrow":case"\\downarrow":{var n=t.callFunction("\\\\cdleft",[e[0]],[]),s={type:"atom",text:a,mode:"math",family:"rel"},u=t.callFunction("\\Big",[s],[]),h=t.callFunction("\\\\cdright",[e[1]],[]),c={type:"ordgroup",mode:"math",body:[n,u,h]};return t.callFunction("\\\\cdparent",[c],[])}case"\\\\cdlongequal":return t.callFunction("\\\\cdlongequal",[],[]);case"\\Vert":{var p={type:"textord",text:"\\Vert",mode:"math"};return t.callFunction("\\Big",[p],[])}default:return{type:"textord",text:" ",mode:"math"}}}function N1(r){var e=[];for(r.gullet.beginGroup(),r.gullet.macros.set("\\cr","\\\\\\relax"),r.gullet.beginGroup();;){e.push(r.parseExpression(!1,"\\\\")),r.gullet.endGroup(),r.gullet.beginGroup();var t=r.fetch().text;if(t==="&"||t==="\\\\")r.consume();else if(t==="\\end"){e[e.length-1].length===0&&e.pop();break}else throw new M("Expected \\\\ or \\cr or \\end",r.nextToken)}for(var a=[],n=[a],s=0;s-1))if("<>AV".indexOf(p)>-1)for(var y=0;y<2;y++){for(var x=!0,w=c+1;wAV=|." after @',u[c]);var z=C1(p,g,r),T={type:"styling",body:[z],mode:"math",style:"display"};a.push(T),h=jt()}s%2===0?a.push(h):a.shift(),a=[],n.push(a)}r.gullet.endGroup(),r.gullet.endGroup();var C=new Array(n[0].length).fill({type:"align",align:"c",pregap:.25,postgap:.25});return{type:"array",mode:"math",body:n,arraystretch:1,addJot:!0,rowGaps:[null],cols:C,colSeparationType:"CD",hLinesBeforeRow:new Array(n.length+1).fill([])}}B({type:"cdlabel",names:["\\\\cdleft","\\\\cdright"],props:{numArgs:1},handler(r,e){var{parser:t,funcName:a}=r;return{type:"cdlabel",mode:t.mode,side:a.slice(4),label:e[0]}},htmlBuilder(r,e){var t=e.havingStyle(e.style.sup()),a=b.wrapFragment(L(r.label,t,e),e);return a.classes.push("cd-label-"+r.side),a.style.bottom=A(.8-a.depth),a.height=0,a.depth=0,a},mathmlBuilder(r,e){var t=new S.MathNode("mrow",[X(r.label,e)]);return t=new S.MathNode("mpadded",[t]),t.setAttribute("width","0"),r.side==="left"&&t.setAttribute("lspace","-1width"),t.setAttribute("voffset","0.7em"),t=new S.MathNode("mstyle",[t]),t.setAttribute("displaystyle","false"),t.setAttribute("scriptlevel","1"),t}});B({type:"cdlabelparent",names:["\\\\cdparent"],props:{numArgs:1},handler(r,e){var{parser:t}=r;return{type:"cdlabelparent",mode:t.mode,fragment:e[0]}},htmlBuilder(r,e){var t=b.wrapFragment(L(r.fragment,e),e);return t.classes.push("cd-vert-arrow"),t},mathmlBuilder(r,e){return new S.MathNode("mrow",[X(r.fragment,e)])}});B({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler(r,e){for(var{parser:t}=r,a=O(e[0],"ordgroup"),n=a.body,s="",u=0;u=1114111)throw new M("\\@char with invalid code point "+s);return c<=65535?p=String.fromCharCode(c):(c-=65536,p=String.fromCharCode((c>>10)+55296,(c&1023)+56320)),{type:"textord",mode:t.mode,text:p}}});var Ir=(r,e)=>{var t=t0(r.body,e.withColor(r.color),!1);return b.makeFragment(t)},Fr=(r,e)=>{var t=o0(r.body,e.withColor(r.color)),a=new S.MathNode("mstyle",t);return a.setAttribute("mathcolor",r.color),a};B({type:"color",names:["\\textcolor"],props:{numArgs:2,allowedInText:!0,argTypes:["color","original"]},handler(r,e){var{parser:t}=r,a=O(e[0],"color-token").color,n=e[1];return{type:"color",mode:t.mode,color:a,body:Q(n)}},htmlBuilder:Ir,mathmlBuilder:Fr});B({type:"color",names:["\\color"],props:{numArgs:1,allowedInText:!0,argTypes:["color"]},handler(r,e){var{parser:t,breakOnTokenText:a}=r,n=O(e[0],"color-token").color;t.gullet.macros.set("\\current@color",n);var s=t.parseExpression(!0,a);return{type:"color",mode:t.mode,color:n,body:s}},htmlBuilder:Ir,mathmlBuilder:Fr});B({type:"cr",names:["\\\\"],props:{numArgs:0,numOptionalArgs:0,allowedInText:!0},handler(r,e,t){var{parser:a}=r,n=a.gullet.future().text==="["?a.parseSizeGroup(!0):null,s=!a.settings.displayMode||!a.settings.useStrictBehavior("newLineInDisplayMode","In LaTeX, \\\\ or \\newline does nothing in display mode");return{type:"cr",mode:a.mode,newLine:s,size:n&&O(n,"size").value}},htmlBuilder(r,e){var t=b.makeSpan(["mspace"],[],e);return r.newLine&&(t.classes.push("newline"),r.size&&(t.style.marginTop=A(K(r.size,e)))),t},mathmlBuilder(r,e){var t=new S.MathNode("mspace");return r.newLine&&(t.setAttribute("linebreak","newline"),r.size&&t.setAttribute("height",A(K(r.size,e)))),t}});var ht={"\\global":"\\global","\\long":"\\\\globallong","\\\\globallong":"\\\\globallong","\\def":"\\gdef","\\gdef":"\\gdef","\\edef":"\\xdef","\\xdef":"\\xdef","\\let":"\\\\globallet","\\futurelet":"\\\\globalfuture"},Or=r=>{var e=r.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(e))throw new M("Expected a control sequence",r);return e},q1=r=>{var e=r.gullet.popToken();return e.text==="="&&(e=r.gullet.popToken(),e.text===" "&&(e=r.gullet.popToken())),e},Hr=(r,e,t,a)=>{var n=r.gullet.macros.get(t.text);n==null&&(t.noexpand=!0,n={tokens:[t],numArgs:0,unexpandable:!r.gullet.isExpandable(t.text)}),r.gullet.macros.set(e,n,a)};B({type:"internal",names:["\\global","\\long","\\\\globallong"],props:{numArgs:0,allowedInText:!0},handler(r){var{parser:e,funcName:t}=r;e.consumeSpaces();var a=e.fetch();if(ht[a.text])return(t==="\\global"||t==="\\\\globallong")&&(a.text=ht[a.text]),O(e.parseFunction(),"internal");throw new M("Invalid token after macro prefix",a)}});B({type:"internal",names:["\\def","\\gdef","\\edef","\\xdef"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(r){var{parser:e,funcName:t}=r,a=e.gullet.popToken(),n=a.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(n))throw new M("Expected a control sequence",a);for(var s=0,u,h=[[]];e.gullet.future().text!=="{";)if(a=e.gullet.popToken(),a.text==="#"){if(e.gullet.future().text==="{"){u=e.gullet.future(),h[s].push("{");break}if(a=e.gullet.popToken(),!/^[1-9]$/.test(a.text))throw new M('Invalid argument number "'+a.text+'"');if(parseInt(a.text)!==s+1)throw new M('Argument number "'+a.text+'" out of order');s++,h.push([])}else{if(a.text==="EOF")throw new M("Expected a macro definition");h[s].push(a.text)}var{tokens:c}=e.gullet.consumeArg();return u&&c.unshift(u),(t==="\\edef"||t==="\\xdef")&&(c=e.gullet.expandTokens(c),c.reverse()),e.gullet.macros.set(n,{tokens:c,numArgs:s,delimiters:h},t===ht[t]),{type:"internal",mode:e.mode}}});B({type:"internal",names:["\\let","\\\\globallet"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(r){var{parser:e,funcName:t}=r,a=Or(e.gullet.popToken());e.gullet.consumeSpaces();var n=q1(e);return Hr(e,a,n,t==="\\\\globallet"),{type:"internal",mode:e.mode}}});B({type:"internal",names:["\\futurelet","\\\\globalfuture"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(r){var{parser:e,funcName:t}=r,a=Or(e.gullet.popToken()),n=e.gullet.popToken(),s=e.gullet.popToken();return Hr(e,a,s,t==="\\\\globalfuture"),e.gullet.pushToken(s),e.gullet.pushToken(n),{type:"internal",mode:e.mode}}});var ie=function(e,t,a){var n=$.math[e]&&$.math[e].replace,s=pt(n||e,t,a);if(!s)throw new Error("Unsupported symbol "+e+" and font size "+t+".");return s},kt=function(e,t,a,n){var s=a.havingBaseStyle(t),u=b.makeSpan(n.concat(s.sizingClasses(a)),[e],a),h=s.sizeMultiplier/a.sizeMultiplier;return u.height*=h,u.depth*=h,u.maxFontSize=s.sizeMultiplier,u},Lr=function(e,t,a){var n=t.havingBaseStyle(a),s=(1-t.sizeMultiplier/n.sizeMultiplier)*t.fontMetrics().axisHeight;e.classes.push("delimcenter"),e.style.top=A(s),e.height-=s,e.depth+=s},R1=function(e,t,a,n,s,u){var h=b.makeSymbol(e,"Main-Regular",s,n),c=kt(h,t,n,u);return a&&Lr(c,n,t),c},E1=function(e,t,a,n){return b.makeSymbol(e,"Size"+t+"-Regular",a,n)},Pr=function(e,t,a,n,s,u){var h=E1(e,t,s,n),c=kt(b.makeSpan(["delimsizing","size"+t],[h],n),R.TEXT,n,u);return a&&Lr(c,n,R.TEXT),c},Ze=function(e,t,a){var n;t==="Size1-Regular"?n="delim-size1":n="delim-size4";var s=b.makeSpan(["delimsizinginner",n],[b.makeSpan([],[b.makeSymbol(e,t,a)])]);return{type:"elem",elem:s}},Ke=function(e,t,a){var n=x0["Size4-Regular"][e.charCodeAt(0)]?x0["Size4-Regular"][e.charCodeAt(0)][4]:x0["Size1-Regular"][e.charCodeAt(0)][4],s=new V0("inner",La(e,Math.round(1e3*t))),u=new C0([s],{width:A(n),height:A(t),style:"width:"+A(n),viewBox:"0 0 "+1e3*n+" "+Math.round(1e3*t),preserveAspectRatio:"xMinYMin"}),h=b.makeSvgSpan([],[u],a);return h.height=t,h.style.height=A(t),h.style.width=A(n),{type:"elem",elem:h}},mt=.008,Se={type:"kern",size:-1*mt},I1=["|","\\lvert","\\rvert","\\vert"],F1=["\\|","\\lVert","\\rVert","\\Vert"],Vr=function(e,t,a,n,s,u){var h,c,p,g,y="",x=0;h=p=g=e,c=null;var w="Size1-Regular";e==="\\uparrow"?p=g="⏐":e==="\\Uparrow"?p=g="‖":e==="\\downarrow"?h=p="⏐":e==="\\Downarrow"?h=p="‖":e==="\\updownarrow"?(h="\\uparrow",p="⏐",g="\\downarrow"):e==="\\Updownarrow"?(h="\\Uparrow",p="‖",g="\\Downarrow"):I1.includes(e)?(p="∣",y="vert",x=333):F1.includes(e)?(p="∥",y="doublevert",x=556):e==="["||e==="\\lbrack"?(h="⎡",p="⎢",g="⎣",w="Size4-Regular",y="lbrack",x=667):e==="]"||e==="\\rbrack"?(h="⎤",p="⎥",g="⎦",w="Size4-Regular",y="rbrack",x=667):e==="\\lfloor"||e==="⌊"?(p=h="⎢",g="⎣",w="Size4-Regular",y="lfloor",x=667):e==="\\lceil"||e==="⌈"?(h="⎡",p=g="⎢",w="Size4-Regular",y="lceil",x=667):e==="\\rfloor"||e==="⌋"?(p=h="⎥",g="⎦",w="Size4-Regular",y="rfloor",x=667):e==="\\rceil"||e==="⌉"?(h="⎤",p=g="⎥",w="Size4-Regular",y="rceil",x=667):e==="("||e==="\\lparen"?(h="⎛",p="⎜",g="⎝",w="Size4-Regular",y="lparen",x=875):e===")"||e==="\\rparen"?(h="⎞",p="⎟",g="⎠",w="Size4-Regular",y="rparen",x=875):e==="\\{"||e==="\\lbrace"?(h="⎧",c="⎨",g="⎩",p="⎪",w="Size4-Regular"):e==="\\}"||e==="\\rbrace"?(h="⎫",c="⎬",g="⎭",p="⎪",w="Size4-Regular"):e==="\\lgroup"||e==="⟮"?(h="⎧",g="⎩",p="⎪",w="Size4-Regular"):e==="\\rgroup"||e==="⟯"?(h="⎫",g="⎭",p="⎪",w="Size4-Regular"):e==="\\lmoustache"||e==="⎰"?(h="⎧",g="⎭",p="⎪",w="Size4-Regular"):(e==="\\rmoustache"||e==="⎱")&&(h="⎫",g="⎩",p="⎪",w="Size4-Regular");var z=ie(h,w,s),T=z.height+z.depth,C=ie(p,w,s),N=C.height+C.depth,I=ie(g,w,s),F=I.height+I.depth,G=0,H=1;if(c!==null){var U=ie(c,w,s);G=U.height+U.depth,H=2}var P=T+F+G,j=Math.max(0,Math.ceil((t-P)/(H*N))),Y=P+j*H*N,z0=n.fontMetrics().axisHeight;a&&(z0*=n.sizeMultiplier);var r0=Y/2-z0,e0=[];if(y.length>0){var Y0=Y-T-F,s0=Math.round(Y*1e3),g0=Pa(y,Math.round(Y0*1e3)),E0=new V0(y,g0),j0=(x/1e3).toFixed(3)+"em",Z0=(s0/1e3).toFixed(3)+"em",Le=new C0([E0],{width:j0,height:Z0,viewBox:"0 0 "+x+" "+s0}),I0=b.makeSvgSpan([],[Le],n);I0.height=s0/1e3,I0.style.width=j0,I0.style.height=Z0,e0.push({type:"elem",elem:I0})}else{if(e0.push(Ze(g,w,s)),e0.push(Se),c===null){var F0=Y-T-F+2*mt;e0.push(Ke(p,F0,n))}else{var d0=(Y-T-F-G)/2+2*mt;e0.push(Ke(p,d0,n)),e0.push(Se),e0.push(Ze(c,w,s)),e0.push(Se),e0.push(Ke(p,d0,n))}e0.push(Se),e0.push(Ze(h,w,s))}var ne=n.havingBaseStyle(R.TEXT),Pe=b.makeVList({positionType:"bottom",positionData:r0,children:e0},ne);return kt(b.makeSpan(["delimsizing","mult"],[Pe],ne),R.TEXT,n,u)},Je=80,Qe=.08,_e=function(e,t,a,n,s){var u=Ha(e,n,a),h=new V0(e,u),c=new C0([h],{width:"400em",height:A(t),viewBox:"0 0 400000 "+a,preserveAspectRatio:"xMinYMin slice"});return b.makeSvgSpan(["hide-tail"],[c],s)},O1=function(e,t){var a=t.havingBaseSizing(),n=Xr("\\surd",e*a.sizeMultiplier,Yr,a),s=a.sizeMultiplier,u=Math.max(0,t.minRuleThickness-t.fontMetrics().sqrtRuleThickness),h,c=0,p=0,g=0,y;return n.type==="small"?(g=1e3+1e3*u+Je,e<1?s=1:e<1.4&&(s=.7),c=(1+u+Qe)/s,p=(1+u)/s,h=_e("sqrtMain",c,g,u,t),h.style.minWidth="0.853em",y=.833/s):n.type==="large"?(g=(1e3+Je)*se[n.size],p=(se[n.size]+u)/s,c=(se[n.size]+u+Qe)/s,h=_e("sqrtSize"+n.size,c,g,u,t),h.style.minWidth="1.02em",y=1/s):(c=e+u+Qe,p=e+u,g=Math.floor(1e3*e+u)+Je,h=_e("sqrtTall",c,g,u,t),h.style.minWidth="0.742em",y=1.056),h.height=p,h.style.height=A(c),{span:h,advanceWidth:y,ruleWidth:(t.fontMetrics().sqrtRuleThickness+u)*s}},Gr=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","\\surd"],H1=["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱"],Ur=["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"],se=[0,1.2,1.8,2.4,3],L1=function(e,t,a,n,s){if(e==="<"||e==="\\lt"||e==="⟨"?e="\\langle":(e===">"||e==="\\gt"||e==="⟩")&&(e="\\rangle"),Gr.includes(e)||Ur.includes(e))return Pr(e,t,!1,a,n,s);if(H1.includes(e))return Vr(e,se[t],!1,a,n,s);throw new M("Illegal delimiter: '"+e+"'")},P1=[{type:"small",style:R.SCRIPTSCRIPT},{type:"small",style:R.SCRIPT},{type:"small",style:R.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],V1=[{type:"small",style:R.SCRIPTSCRIPT},{type:"small",style:R.SCRIPT},{type:"small",style:R.TEXT},{type:"stack"}],Yr=[{type:"small",style:R.SCRIPTSCRIPT},{type:"small",style:R.SCRIPT},{type:"small",style:R.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}],G1=function(e){if(e.type==="small")return"Main-Regular";if(e.type==="large")return"Size"+e.size+"-Regular";if(e.type==="stack")return"Size4-Regular";throw new Error("Add support for delim type '"+e.type+"' here.")},Xr=function(e,t,a,n){for(var s=Math.min(2,3-n.style.size),u=s;ut)return a[u]}return a[a.length-1]},$r=function(e,t,a,n,s,u){e==="<"||e==="\\lt"||e==="⟨"?e="\\langle":(e===">"||e==="\\gt"||e==="⟩")&&(e="\\rangle");var h;Ur.includes(e)?h=P1:Gr.includes(e)?h=Yr:h=V1;var c=Xr(e,t,h,n);return c.type==="small"?R1(e,c.style,a,n,s,u):c.type==="large"?Pr(e,c.size,a,n,s,u):Vr(e,t,a,n,s,u)},U1=function(e,t,a,n,s,u){var h=n.fontMetrics().axisHeight*n.sizeMultiplier,c=901,p=5/n.fontMetrics().ptPerEm,g=Math.max(t-h,a+h),y=Math.max(g/500*c,2*g-p);return $r(e,y,!0,n,s,u)},D0={sqrtImage:O1,sizedDelim:L1,sizeToMaxHeight:se,customSizedDelim:$r,leftRightDelim:U1},Kt={"\\bigl":{mclass:"mopen",size:1},"\\Bigl":{mclass:"mopen",size:2},"\\biggl":{mclass:"mopen",size:3},"\\Biggl":{mclass:"mopen",size:4},"\\bigr":{mclass:"mclose",size:1},"\\Bigr":{mclass:"mclose",size:2},"\\biggr":{mclass:"mclose",size:3},"\\Biggr":{mclass:"mclose",size:4},"\\bigm":{mclass:"mrel",size:1},"\\Bigm":{mclass:"mrel",size:2},"\\biggm":{mclass:"mrel",size:3},"\\Biggm":{mclass:"mrel",size:4},"\\big":{mclass:"mord",size:1},"\\Big":{mclass:"mord",size:2},"\\bigg":{mclass:"mord",size:3},"\\Bigg":{mclass:"mord",size:4}},Y1=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","<",">","\\langle","⟨","\\rangle","⟩","\\lt","\\gt","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱","/","\\backslash","|","\\vert","\\|","\\Vert","\\uparrow","\\Uparrow","\\downarrow","\\Downarrow","\\updownarrow","\\Updownarrow","."];function Fe(r,e){var t=Ee(r);if(t&&Y1.includes(t.text))return t;throw t?new M("Invalid delimiter '"+t.text+"' after '"+e.funcName+"'",r):new M("Invalid delimiter type '"+r.type+"'",r)}B({type:"delimsizing",names:["\\bigl","\\Bigl","\\biggl","\\Biggl","\\bigr","\\Bigr","\\biggr","\\Biggr","\\bigm","\\Bigm","\\biggm","\\Biggm","\\big","\\Big","\\bigg","\\Bigg"],props:{numArgs:1,argTypes:["primitive"]},handler:(r,e)=>{var t=Fe(e[0],r);return{type:"delimsizing",mode:r.parser.mode,size:Kt[r.funcName].size,mclass:Kt[r.funcName].mclass,delim:t.text}},htmlBuilder:(r,e)=>r.delim==="."?b.makeSpan([r.mclass]):D0.sizedDelim(r.delim,r.size,e,r.mode,[r.mclass]),mathmlBuilder:r=>{var e=[];r.delim!=="."&&e.push(v0(r.delim,r.mode));var t=new S.MathNode("mo",e);r.mclass==="mopen"||r.mclass==="mclose"?t.setAttribute("fence","true"):t.setAttribute("fence","false"),t.setAttribute("stretchy","true");var a=A(D0.sizeToMaxHeight[r.size]);return t.setAttribute("minsize",a),t.setAttribute("maxsize",a),t}});function Jt(r){if(!r.body)throw new Error("Bug: The leftright ParseNode wasn't fully parsed.")}B({type:"leftright-right",names:["\\right"],props:{numArgs:1,primitive:!0},handler:(r,e)=>{var t=r.parser.gullet.macros.get("\\current@color");if(t&&typeof t!="string")throw new M("\\current@color set to non-string in \\right");return{type:"leftright-right",mode:r.parser.mode,delim:Fe(e[0],r).text,color:t}}});B({type:"leftright",names:["\\left"],props:{numArgs:1,primitive:!0},handler:(r,e)=>{var t=Fe(e[0],r),a=r.parser;++a.leftrightDepth;var n=a.parseExpression(!1);--a.leftrightDepth,a.expect("\\right",!1);var s=O(a.parseFunction(),"leftright-right");return{type:"leftright",mode:a.mode,body:n,left:t.text,right:s.delim,rightColor:s.color}},htmlBuilder:(r,e)=>{Jt(r);for(var t=t0(r.body,e,!0,["mopen","mclose"]),a=0,n=0,s=!1,u=0;u{Jt(r);var t=o0(r.body,e);if(r.left!=="."){var a=new S.MathNode("mo",[v0(r.left,r.mode)]);a.setAttribute("fence","true"),t.unshift(a)}if(r.right!=="."){var n=new S.MathNode("mo",[v0(r.right,r.mode)]);n.setAttribute("fence","true"),r.rightColor&&n.setAttribute("mathcolor",r.rightColor),t.push(n)}return bt(t)}});B({type:"middle",names:["\\middle"],props:{numArgs:1,primitive:!0},handler:(r,e)=>{var t=Fe(e[0],r);if(!r.parser.leftrightDepth)throw new M("\\middle without preceding \\left",t);return{type:"middle",mode:r.parser.mode,delim:t.text}},htmlBuilder:(r,e)=>{var t;if(r.delim===".")t=ue(e,[]);else{t=D0.sizedDelim(r.delim,1,e,r.mode,[]);var a={delim:r.delim,options:e};t.isMiddle=a}return t},mathmlBuilder:(r,e)=>{var t=r.delim==="\\vert"||r.delim==="|"?v0("|","text"):v0(r.delim,r.mode),a=new S.MathNode("mo",[t]);return a.setAttribute("fence","true"),a.setAttribute("lspace","0.05em"),a.setAttribute("rspace","0.05em"),a}});var St=(r,e)=>{var t=b.wrapFragment(L(r.body,e),e),a=r.label.slice(1),n=e.sizeMultiplier,s,u=0,h=V.isCharacterBox(r.body);if(a==="sout")s=b.makeSpan(["stretchy","sout"]),s.height=e.fontMetrics().defaultRuleThickness/n,u=-.5*e.fontMetrics().xHeight;else if(a==="phase"){var c=K({number:.6,unit:"pt"},e),p=K({number:.35,unit:"ex"},e),g=e.havingBaseSizing();n=n/g.sizeMultiplier;var y=t.height+t.depth+c+p;t.style.paddingLeft=A(y/2+c);var x=Math.floor(1e3*y*n),w=Fa(x),z=new C0([new V0("phase",w)],{width:"400em",height:A(x/1e3),viewBox:"0 0 400000 "+x,preserveAspectRatio:"xMinYMin slice"});s=b.makeSvgSpan(["hide-tail"],[z],e),s.style.height=A(y),u=t.depth+c+p}else{/cancel/.test(a)?h||t.classes.push("cancel-pad"):a==="angl"?t.classes.push("anglpad"):t.classes.push("boxpad");var T=0,C=0,N=0;/box/.test(a)?(N=Math.max(e.fontMetrics().fboxrule,e.minRuleThickness),T=e.fontMetrics().fboxsep+(a==="colorbox"?0:N),C=T):a==="angl"?(N=Math.max(e.fontMetrics().defaultRuleThickness,e.minRuleThickness),T=4*N,C=Math.max(0,.25-t.depth)):(T=h?.2:0,C=T),s=q0.encloseSpan(t,a,T,C,e),/fbox|boxed|fcolorbox/.test(a)?(s.style.borderStyle="solid",s.style.borderWidth=A(N)):a==="angl"&&N!==.049&&(s.style.borderTopWidth=A(N),s.style.borderRightWidth=A(N)),u=t.depth+C,r.backgroundColor&&(s.style.backgroundColor=r.backgroundColor,r.borderColor&&(s.style.borderColor=r.borderColor))}var I;if(r.backgroundColor)I=b.makeVList({positionType:"individualShift",children:[{type:"elem",elem:s,shift:u},{type:"elem",elem:t,shift:0}]},e);else{var F=/cancel|phase/.test(a)?["svg-align"]:[];I=b.makeVList({positionType:"individualShift",children:[{type:"elem",elem:t,shift:0},{type:"elem",elem:s,shift:u,wrapperClasses:F}]},e)}return/cancel/.test(a)&&(I.height=t.height,I.depth=t.depth),/cancel/.test(a)&&!h?b.makeSpan(["mord","cancel-lap"],[I],e):b.makeSpan(["mord"],[I],e)},Mt=(r,e)=>{var t=0,a=new S.MathNode(r.label.indexOf("colorbox")>-1?"mpadded":"menclose",[X(r.body,e)]);switch(r.label){case"\\cancel":a.setAttribute("notation","updiagonalstrike");break;case"\\bcancel":a.setAttribute("notation","downdiagonalstrike");break;case"\\phase":a.setAttribute("notation","phasorangle");break;case"\\sout":a.setAttribute("notation","horizontalstrike");break;case"\\fbox":a.setAttribute("notation","box");break;case"\\angl":a.setAttribute("notation","actuarial");break;case"\\fcolorbox":case"\\colorbox":if(t=e.fontMetrics().fboxsep*e.fontMetrics().ptPerEm,a.setAttribute("width","+"+2*t+"pt"),a.setAttribute("height","+"+2*t+"pt"),a.setAttribute("lspace",t+"pt"),a.setAttribute("voffset",t+"pt"),r.label==="\\fcolorbox"){var n=Math.max(e.fontMetrics().fboxrule,e.minRuleThickness);a.setAttribute("style","border: "+n+"em solid "+String(r.borderColor))}break;case"\\xcancel":a.setAttribute("notation","updiagonalstrike downdiagonalstrike");break}return r.backgroundColor&&a.setAttribute("mathbackground",r.backgroundColor),a};B({type:"enclose",names:["\\colorbox"],props:{numArgs:2,allowedInText:!0,argTypes:["color","text"]},handler(r,e,t){var{parser:a,funcName:n}=r,s=O(e[0],"color-token").color,u=e[1];return{type:"enclose",mode:a.mode,label:n,backgroundColor:s,body:u}},htmlBuilder:St,mathmlBuilder:Mt});B({type:"enclose",names:["\\fcolorbox"],props:{numArgs:3,allowedInText:!0,argTypes:["color","color","text"]},handler(r,e,t){var{parser:a,funcName:n}=r,s=O(e[0],"color-token").color,u=O(e[1],"color-token").color,h=e[2];return{type:"enclose",mode:a.mode,label:n,backgroundColor:u,borderColor:s,body:h}},htmlBuilder:St,mathmlBuilder:Mt});B({type:"enclose",names:["\\fbox"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!0},handler(r,e){var{parser:t}=r;return{type:"enclose",mode:t.mode,label:"\\fbox",body:e[0]}}});B({type:"enclose",names:["\\cancel","\\bcancel","\\xcancel","\\sout","\\phase"],props:{numArgs:1},handler(r,e){var{parser:t,funcName:a}=r,n=e[0];return{type:"enclose",mode:t.mode,label:a,body:n}},htmlBuilder:St,mathmlBuilder:Mt});B({type:"enclose",names:["\\angl"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!1},handler(r,e){var{parser:t}=r;return{type:"enclose",mode:t.mode,label:"\\angl",body:e[0]}}});var Wr={};function k0(r){for(var{type:e,names:t,props:a,handler:n,htmlBuilder:s,mathmlBuilder:u}=r,h={type:e,numArgs:a.numArgs||0,allowedInText:!1,numOptionalArgs:0,handler:n},c=0;c{var e=r.parser.settings;if(!e.displayMode)throw new M("{"+r.envName+"} can be used only in display mode.")};function zt(r){if(r.indexOf("ed")===-1)return r.indexOf("*")===-1}function U0(r,e,t){var{hskipBeforeAndAfter:a,addJot:n,cols:s,arraystretch:u,colSeparationType:h,autoTag:c,singleRow:p,emptySingleRow:g,maxNumCols:y,leqno:x}=e;if(r.gullet.beginGroup(),p||r.gullet.macros.set("\\cr","\\\\\\relax"),!u){var w=r.gullet.expandMacroAsText("\\arraystretch");if(w==null)u=1;else if(u=parseFloat(w),!u||u<0)throw new M("Invalid \\arraystretch: "+w)}r.gullet.beginGroup();var z=[],T=[z],C=[],N=[],I=c!=null?[]:void 0;function F(){c&&r.gullet.macros.set("\\@eqnsw","1",!0)}function G(){I&&(r.gullet.macros.get("\\df@tag")?(I.push(r.subparse([new m0("\\df@tag")])),r.gullet.macros.set("\\df@tag",void 0,!0)):I.push(!!c&&r.gullet.macros.get("\\@eqnsw")==="1"))}for(F(),N.push(Qt(r));;){var H=r.parseExpression(!1,p?"\\end":"\\\\");r.gullet.endGroup(),r.gullet.beginGroup(),H={type:"ordgroup",mode:r.mode,body:H},t&&(H={type:"styling",mode:r.mode,style:t,body:[H]}),z.push(H);var U=r.fetch().text;if(U==="&"){if(y&&z.length===y){if(p||h)throw new M("Too many tab characters: &",r.nextToken);r.settings.reportNonstrict("textEnv","Too few columns specified in the {array} column argument.")}r.consume()}else if(U==="\\end"){G(),z.length===1&&H.type==="styling"&&H.body[0].body.length===0&&(T.length>1||!g)&&T.pop(),N.length0&&(F+=.25),p.push({pos:F,isDashed:fe[pe]})}for(G(u[0]),a=0;a0&&(r0+=I,Pfe))for(a=0;a=h)){var J0=void 0;(n>0||e.hskipBeforeAndAfter)&&(J0=V.deflt(d0.pregap,x),J0!==0&&(g0=b.makeSpan(["arraycolsep"],[]),g0.style.width=A(J0),s0.push(g0)));var Q0=[];for(a=0;a0){for(var ca=b.makeLineSpan("hline",t,g),da=b.makeLineSpan("hdashline",t,g),Ve=[{type:"elem",elem:c,shift:0}];p.length>0;){var Et=p.pop(),It=Et.pos-e0;Et.isDashed?Ve.push({type:"elem",elem:da,shift:It}):Ve.push({type:"elem",elem:ca,shift:It})}c=b.makeVList({positionType:"individualShift",children:Ve},t)}if(j0.length===0)return b.makeSpan(["mord"],[c],t);var Ge=b.makeVList({positionType:"individualShift",children:j0},t);return Ge=b.makeSpan(["tag"],[Ge],t),b.makeFragment([c,Ge])},X1={c:"center ",l:"left ",r:"right "},M0=function(e,t){for(var a=[],n=new S.MathNode("mtd",[],["mtr-glue"]),s=new S.MathNode("mtd",[],["mml-eqn-num"]),u=0;u0){var z=e.cols,T="",C=!1,N=0,I=z.length;z[0].type==="separator"&&(x+="top ",N=1),z[z.length-1].type==="separator"&&(x+="bottom ",I-=1);for(var F=N;F0?"left ":"",x+=j[j.length-1].length>0?"right ":"";for(var Y=1;Y-1?"alignat":"align",s=e.envName==="split",u=U0(e.parser,{cols:a,addJot:!0,autoTag:s?void 0:zt(e.envName),emptySingleRow:!0,colSeparationType:n,maxNumCols:s?2:void 0,leqno:e.parser.settings.leqno},"display"),h,c=0,p={type:"ordgroup",mode:e.mode,body:[]};if(t[0]&&t[0].type==="ordgroup"){for(var g="",y=0;y0&&w&&(C=1),a[z]={type:"align",align:T,pregap:C,postgap:0}}return u.colSeparationType=w?"align":"alignat",u};k0({type:"array",names:["array","darray"],props:{numArgs:1},handler(r,e){var t=Ee(e[0]),a=t?[e[0]]:O(e[0],"ordgroup").body,n=a.map(function(u){var h=xt(u),c=h.text;if("lcr".indexOf(c)!==-1)return{type:"align",align:c};if(c==="|")return{type:"separator",separator:"|"};if(c===":")return{type:"separator",separator:":"};throw new M("Unknown column alignment: "+c,u)}),s={cols:n,hskipBeforeAndAfter:!0,maxNumCols:n.length};return U0(r.parser,s,At(r.envName))},htmlBuilder:S0,mathmlBuilder:M0});k0({type:"array",names:["matrix","pmatrix","bmatrix","Bmatrix","vmatrix","Vmatrix","matrix*","pmatrix*","bmatrix*","Bmatrix*","vmatrix*","Vmatrix*"],props:{numArgs:0},handler(r){var e={matrix:null,pmatrix:["(",")"],bmatrix:["[","]"],Bmatrix:["\\{","\\}"],vmatrix:["|","|"],Vmatrix:["\\Vert","\\Vert"]}[r.envName.replace("*","")],t="c",a={hskipBeforeAndAfter:!1,cols:[{type:"align",align:t}]};if(r.envName.charAt(r.envName.length-1)==="*"){var n=r.parser;if(n.consumeSpaces(),n.fetch().text==="["){if(n.consume(),n.consumeSpaces(),t=n.fetch().text,"lcr".indexOf(t)===-1)throw new M("Expected l or c or r",n.nextToken);n.consume(),n.consumeSpaces(),n.expect("]"),n.consume(),a.cols=[{type:"align",align:t}]}}var s=U0(r.parser,a,At(r.envName)),u=Math.max(0,...s.body.map(h=>h.length));return s.cols=new Array(u).fill({type:"align",align:t}),e?{type:"leftright",mode:r.mode,body:[s],left:e[0],right:e[1],rightColor:void 0}:s},htmlBuilder:S0,mathmlBuilder:M0});k0({type:"array",names:["smallmatrix"],props:{numArgs:0},handler(r){var e={arraystretch:.5},t=U0(r.parser,e,"script");return t.colSeparationType="small",t},htmlBuilder:S0,mathmlBuilder:M0});k0({type:"array",names:["subarray"],props:{numArgs:1},handler(r,e){var t=Ee(e[0]),a=t?[e[0]]:O(e[0],"ordgroup").body,n=a.map(function(u){var h=xt(u),c=h.text;if("lc".indexOf(c)!==-1)return{type:"align",align:c};throw new M("Unknown column alignment: "+c,u)});if(n.length>1)throw new M("{subarray} can contain only one column");var s={cols:n,hskipBeforeAndAfter:!1,arraystretch:.5};if(s=U0(r.parser,s,"script"),s.body.length>0&&s.body[0].length>1)throw new M("{subarray} can contain only one column");return s},htmlBuilder:S0,mathmlBuilder:M0});k0({type:"array",names:["cases","dcases","rcases","drcases"],props:{numArgs:0},handler(r){var e={arraystretch:1.2,cols:[{type:"align",align:"l",pregap:0,postgap:1},{type:"align",align:"l",pregap:0,postgap:0}]},t=U0(r.parser,e,At(r.envName));return{type:"leftright",mode:r.mode,body:[t],left:r.envName.indexOf("r")>-1?".":"\\{",right:r.envName.indexOf("r")>-1?"\\}":".",rightColor:void 0}},htmlBuilder:S0,mathmlBuilder:M0});k0({type:"array",names:["align","align*","aligned","split"],props:{numArgs:0},handler:Zr,htmlBuilder:S0,mathmlBuilder:M0});k0({type:"array",names:["gathered","gather","gather*"],props:{numArgs:0},handler(r){["gather","gather*"].includes(r.envName)&&Oe(r);var e={cols:[{type:"align",align:"c"}],addJot:!0,colSeparationType:"gather",autoTag:zt(r.envName),emptySingleRow:!0,leqno:r.parser.settings.leqno};return U0(r.parser,e,"display")},htmlBuilder:S0,mathmlBuilder:M0});k0({type:"array",names:["alignat","alignat*","alignedat"],props:{numArgs:1},handler:Zr,htmlBuilder:S0,mathmlBuilder:M0});k0({type:"array",names:["equation","equation*"],props:{numArgs:0},handler(r){Oe(r);var e={autoTag:zt(r.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,leqno:r.parser.settings.leqno};return U0(r.parser,e,"display")},htmlBuilder:S0,mathmlBuilder:M0});k0({type:"array",names:["CD"],props:{numArgs:0},handler(r){return Oe(r),N1(r.parser)},htmlBuilder:S0,mathmlBuilder:M0});m("\\nonumber","\\gdef\\@eqnsw{0}");m("\\notag","\\nonumber");B({type:"text",names:["\\hline","\\hdashline"],props:{numArgs:0,allowedInText:!0,allowedInMath:!0},handler(r,e){throw new M(r.funcName+" valid only within array environment")}});var _t=Wr;B({type:"environment",names:["\\begin","\\end"],props:{numArgs:1,argTypes:["text"]},handler(r,e){var{parser:t,funcName:a}=r,n=e[0];if(n.type!=="ordgroup")throw new M("Invalid environment name",n);for(var s="",u=0;u{var t=r.font,a=e.withFont(t);return L(r.body,a)},Jr=(r,e)=>{var t=r.font,a=e.withFont(t);return X(r.body,a)},er={"\\Bbb":"\\mathbb","\\bold":"\\mathbf","\\frak":"\\mathfrak","\\bm":"\\boldsymbol"};B({type:"font",names:["\\mathrm","\\mathit","\\mathbf","\\mathnormal","\\mathsfit","\\mathbb","\\mathcal","\\mathfrak","\\mathscr","\\mathsf","\\mathtt","\\Bbb","\\bold","\\frak"],props:{numArgs:1,allowedInArgument:!0},handler:(r,e)=>{var{parser:t,funcName:a}=r,n=Ne(e[0]),s=a;return s in er&&(s=er[s]),{type:"font",mode:t.mode,font:s.slice(1),body:n}},htmlBuilder:Kr,mathmlBuilder:Jr});B({type:"mclass",names:["\\boldsymbol","\\bm"],props:{numArgs:1},handler:(r,e)=>{var{parser:t}=r,a=e[0],n=V.isCharacterBox(a);return{type:"mclass",mode:t.mode,mclass:Ie(a),body:[{type:"font",mode:t.mode,font:"boldsymbol",body:a}],isCharacterBox:n}}});B({type:"font",names:["\\rm","\\sf","\\tt","\\bf","\\it","\\cal"],props:{numArgs:0,allowedInText:!0},handler:(r,e)=>{var{parser:t,funcName:a,breakOnTokenText:n}=r,{mode:s}=t,u=t.parseExpression(!0,n),h="math"+a.slice(1);return{type:"font",mode:s,font:h,body:{type:"ordgroup",mode:t.mode,body:u}}},htmlBuilder:Kr,mathmlBuilder:Jr});var Qr=(r,e)=>{var t=e;return r==="display"?t=t.id>=R.SCRIPT.id?t.text():R.DISPLAY:r==="text"&&t.size===R.DISPLAY.size?t=R.TEXT:r==="script"?t=R.SCRIPT:r==="scriptscript"&&(t=R.SCRIPTSCRIPT),t},Tt=(r,e)=>{var t=Qr(r.size,e.style),a=t.fracNum(),n=t.fracDen(),s;s=e.havingStyle(a);var u=L(r.numer,s,e);if(r.continued){var h=8.5/e.fontMetrics().ptPerEm,c=3.5/e.fontMetrics().ptPerEm;u.height=u.height0?z=3*x:z=7*x,T=e.fontMetrics().denom1):(y>0?(w=e.fontMetrics().num2,z=x):(w=e.fontMetrics().num3,z=3*x),T=e.fontMetrics().denom2);var C;if(g){var I=e.fontMetrics().axisHeight;w-u.depth-(I+.5*y){var t=new S.MathNode("mfrac",[X(r.numer,e),X(r.denom,e)]);if(!r.hasBarLine)t.setAttribute("linethickness","0px");else if(r.barSize){var a=K(r.barSize,e);t.setAttribute("linethickness",A(a))}var n=Qr(r.size,e.style);if(n.size!==e.style.size){t=new S.MathNode("mstyle",[t]);var s=n.size===R.DISPLAY.size?"true":"false";t.setAttribute("displaystyle",s),t.setAttribute("scriptlevel","0")}if(r.leftDelim!=null||r.rightDelim!=null){var u=[];if(r.leftDelim!=null){var h=new S.MathNode("mo",[new S.TextNode(r.leftDelim.replace("\\",""))]);h.setAttribute("fence","true"),u.push(h)}if(u.push(t),r.rightDelim!=null){var c=new S.MathNode("mo",[new S.TextNode(r.rightDelim.replace("\\",""))]);c.setAttribute("fence","true"),u.push(c)}return bt(u)}return t};B({type:"genfrac",names:["\\dfrac","\\frac","\\tfrac","\\dbinom","\\binom","\\tbinom","\\\\atopfrac","\\\\bracefrac","\\\\brackfrac"],props:{numArgs:2,allowedInArgument:!0},handler:(r,e)=>{var{parser:t,funcName:a}=r,n=e[0],s=e[1],u,h=null,c=null,p="auto";switch(a){case"\\dfrac":case"\\frac":case"\\tfrac":u=!0;break;case"\\\\atopfrac":u=!1;break;case"\\dbinom":case"\\binom":case"\\tbinom":u=!1,h="(",c=")";break;case"\\\\bracefrac":u=!1,h="\\{",c="\\}";break;case"\\\\brackfrac":u=!1,h="[",c="]";break;default:throw new Error("Unrecognized genfrac command")}switch(a){case"\\dfrac":case"\\dbinom":p="display";break;case"\\tfrac":case"\\tbinom":p="text";break}return{type:"genfrac",mode:t.mode,continued:!1,numer:n,denom:s,hasBarLine:u,leftDelim:h,rightDelim:c,size:p,barSize:null}},htmlBuilder:Tt,mathmlBuilder:Bt});B({type:"genfrac",names:["\\cfrac"],props:{numArgs:2},handler:(r,e)=>{var{parser:t,funcName:a}=r,n=e[0],s=e[1];return{type:"genfrac",mode:t.mode,continued:!0,numer:n,denom:s,hasBarLine:!0,leftDelim:null,rightDelim:null,size:"display",barSize:null}}});B({type:"infix",names:["\\over","\\choose","\\atop","\\brace","\\brack"],props:{numArgs:0,infix:!0},handler(r){var{parser:e,funcName:t,token:a}=r,n;switch(t){case"\\over":n="\\frac";break;case"\\choose":n="\\binom";break;case"\\atop":n="\\\\atopfrac";break;case"\\brace":n="\\\\bracefrac";break;case"\\brack":n="\\\\brackfrac";break;default:throw new Error("Unrecognized infix genfrac command")}return{type:"infix",mode:e.mode,replaceWith:n,token:a}}});var tr=["display","text","script","scriptscript"],rr=function(e){var t=null;return e.length>0&&(t=e,t=t==="."?null:t),t};B({type:"genfrac",names:["\\genfrac"],props:{numArgs:6,allowedInArgument:!0,argTypes:["math","math","size","text","math","math"]},handler(r,e){var{parser:t}=r,a=e[4],n=e[5],s=Ne(e[0]),u=s.type==="atom"&&s.family==="open"?rr(s.text):null,h=Ne(e[1]),c=h.type==="atom"&&h.family==="close"?rr(h.text):null,p=O(e[2],"size"),g,y=null;p.isBlank?g=!0:(y=p.value,g=y.number>0);var x="auto",w=e[3];if(w.type==="ordgroup"){if(w.body.length>0){var z=O(w.body[0],"textord");x=tr[Number(z.text)]}}else w=O(w,"textord"),x=tr[Number(w.text)];return{type:"genfrac",mode:t.mode,numer:a,denom:n,continued:!1,hasBarLine:g,barSize:y,leftDelim:u,rightDelim:c,size:x}},htmlBuilder:Tt,mathmlBuilder:Bt});B({type:"infix",names:["\\above"],props:{numArgs:1,argTypes:["size"],infix:!0},handler(r,e){var{parser:t,funcName:a,token:n}=r;return{type:"infix",mode:t.mode,replaceWith:"\\\\abovefrac",size:O(e[0],"size").value,token:n}}});B({type:"genfrac",names:["\\\\abovefrac"],props:{numArgs:3,argTypes:["math","size","math"]},handler:(r,e)=>{var{parser:t,funcName:a}=r,n=e[0],s=wa(O(e[1],"infix").size),u=e[2],h=s.number>0;return{type:"genfrac",mode:t.mode,numer:n,denom:u,continued:!1,hasBarLine:h,barSize:s,leftDelim:null,rightDelim:null,size:"auto"}},htmlBuilder:Tt,mathmlBuilder:Bt});var _r=(r,e)=>{var t=e.style,a,n;r.type==="supsub"?(a=r.sup?L(r.sup,e.havingStyle(t.sup()),e):L(r.sub,e.havingStyle(t.sub()),e),n=O(r.base,"horizBrace")):n=O(r,"horizBrace");var s=L(n.base,e.havingBaseStyle(R.DISPLAY)),u=q0.svgSpan(n,e),h;if(n.isOver?(h=b.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:s},{type:"kern",size:.1},{type:"elem",elem:u}]},e),h.children[0].children[0].children[1].classes.push("svg-align")):(h=b.makeVList({positionType:"bottom",positionData:s.depth+.1+u.height,children:[{type:"elem",elem:u},{type:"kern",size:.1},{type:"elem",elem:s}]},e),h.children[0].children[0].children[0].classes.push("svg-align")),a){var c=b.makeSpan(["mord",n.isOver?"mover":"munder"],[h],e);n.isOver?h=b.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:c},{type:"kern",size:.2},{type:"elem",elem:a}]},e):h=b.makeVList({positionType:"bottom",positionData:c.depth+.2+a.height+a.depth,children:[{type:"elem",elem:a},{type:"kern",size:.2},{type:"elem",elem:c}]},e)}return b.makeSpan(["mord",n.isOver?"mover":"munder"],[h],e)},$1=(r,e)=>{var t=q0.mathMLnode(r.label);return new S.MathNode(r.isOver?"mover":"munder",[X(r.base,e),t])};B({type:"horizBrace",names:["\\overbrace","\\underbrace"],props:{numArgs:1},handler(r,e){var{parser:t,funcName:a}=r;return{type:"horizBrace",mode:t.mode,label:a,isOver:/^\\over/.test(a),base:e[0]}},htmlBuilder:_r,mathmlBuilder:$1});B({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:(r,e)=>{var{parser:t}=r,a=e[1],n=O(e[0],"url").url;return t.settings.isTrusted({command:"\\href",url:n})?{type:"href",mode:t.mode,href:n,body:Q(a)}:t.formatUnsupportedCmd("\\href")},htmlBuilder:(r,e)=>{var t=t0(r.body,e,!1);return b.makeAnchor(r.href,[],t,e)},mathmlBuilder:(r,e)=>{var t=G0(r.body,e);return t instanceof h0||(t=new h0("mrow",[t])),t.setAttribute("href",r.href),t}});B({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:(r,e)=>{var{parser:t}=r,a=O(e[0],"url").url;if(!t.settings.isTrusted({command:"\\url",url:a}))return t.formatUnsupportedCmd("\\url");for(var n=[],s=0;s{var{parser:t,funcName:a,token:n}=r,s=O(e[0],"raw").string,u=e[1];t.settings.strict&&t.settings.reportNonstrict("htmlExtension","HTML extension is disabled on strict mode");var h,c={};switch(a){case"\\htmlClass":c.class=s,h={command:"\\htmlClass",class:s};break;case"\\htmlId":c.id=s,h={command:"\\htmlId",id:s};break;case"\\htmlStyle":c.style=s,h={command:"\\htmlStyle",style:s};break;case"\\htmlData":{for(var p=s.split(","),g=0;g{var t=t0(r.body,e,!1),a=["enclosing"];r.attributes.class&&a.push(...r.attributes.class.trim().split(/\s+/));var n=b.makeSpan(a,t,e);for(var s in r.attributes)s!=="class"&&r.attributes.hasOwnProperty(s)&&n.setAttribute(s,r.attributes[s]);return n},mathmlBuilder:(r,e)=>G0(r.body,e)});B({type:"htmlmathml",names:["\\html@mathml"],props:{numArgs:2,allowedInText:!0},handler:(r,e)=>{var{parser:t}=r;return{type:"htmlmathml",mode:t.mode,html:Q(e[0]),mathml:Q(e[1])}},htmlBuilder:(r,e)=>{var t=t0(r.html,e,!1);return b.makeFragment(t)},mathmlBuilder:(r,e)=>G0(r.mathml,e)});var et=function(e){if(/^[-+]? *(\d+(\.\d*)?|\.\d+)$/.test(e))return{number:+e,unit:"bp"};var t=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(e);if(!t)throw new M("Invalid size: '"+e+"' in \\includegraphics");var a={number:+(t[1]+t[2]),unit:t[3]};if(!br(a))throw new M("Invalid unit: '"+a.unit+"' in \\includegraphics.");return a};B({type:"includegraphics",names:["\\includegraphics"],props:{numArgs:1,numOptionalArgs:1,argTypes:["raw","url"],allowedInText:!1},handler:(r,e,t)=>{var{parser:a}=r,n={number:0,unit:"em"},s={number:.9,unit:"em"},u={number:0,unit:"em"},h="";if(t[0])for(var c=O(t[0],"raw").string,p=c.split(","),g=0;g{var t=K(r.height,e),a=0;r.totalheight.number>0&&(a=K(r.totalheight,e)-t);var n=0;r.width.number>0&&(n=K(r.width,e));var s={height:A(t+a)};n>0&&(s.width=A(n)),a>0&&(s.verticalAlign=A(-a));var u=new $a(r.src,r.alt,s);return u.height=t,u.depth=a,u},mathmlBuilder:(r,e)=>{var t=new S.MathNode("mglyph",[]);t.setAttribute("alt",r.alt);var a=K(r.height,e),n=0;if(r.totalheight.number>0&&(n=K(r.totalheight,e)-a,t.setAttribute("valign",A(-n))),t.setAttribute("height",A(a+n)),r.width.number>0){var s=K(r.width,e);t.setAttribute("width",A(s))}return t.setAttribute("src",r.src),t}});B({type:"kern",names:["\\kern","\\mkern","\\hskip","\\mskip"],props:{numArgs:1,argTypes:["size"],primitive:!0,allowedInText:!0},handler(r,e){var{parser:t,funcName:a}=r,n=O(e[0],"size");if(t.settings.strict){var s=a[1]==="m",u=n.value.unit==="mu";s?(u||t.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+a+" supports only mu units, "+("not "+n.value.unit+" units")),t.mode!=="math"&&t.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+a+" works only in math mode")):u&&t.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+a+" doesn't support mu units")}return{type:"kern",mode:t.mode,dimension:n.value}},htmlBuilder(r,e){return b.makeGlue(r.dimension,e)},mathmlBuilder(r,e){var t=K(r.dimension,e);return new S.SpaceNode(t)}});B({type:"lap",names:["\\mathllap","\\mathrlap","\\mathclap"],props:{numArgs:1,allowedInText:!0},handler:(r,e)=>{var{parser:t,funcName:a}=r,n=e[0];return{type:"lap",mode:t.mode,alignment:a.slice(5),body:n}},htmlBuilder:(r,e)=>{var t;r.alignment==="clap"?(t=b.makeSpan([],[L(r.body,e)]),t=b.makeSpan(["inner"],[t],e)):t=b.makeSpan(["inner"],[L(r.body,e)]);var a=b.makeSpan(["fix"],[]),n=b.makeSpan([r.alignment],[t,a],e),s=b.makeSpan(["strut"]);return s.style.height=A(n.height+n.depth),n.depth&&(s.style.verticalAlign=A(-n.depth)),n.children.unshift(s),n=b.makeSpan(["thinbox"],[n],e),b.makeSpan(["mord","vbox"],[n],e)},mathmlBuilder:(r,e)=>{var t=new S.MathNode("mpadded",[X(r.body,e)]);if(r.alignment!=="rlap"){var a=r.alignment==="llap"?"-1":"-0.5";t.setAttribute("lspace",a+"width")}return t.setAttribute("width","0px"),t}});B({type:"styling",names:["\\(","$"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(r,e){var{funcName:t,parser:a}=r,n=a.mode;a.switchMode("math");var s=t==="\\("?"\\)":"$",u=a.parseExpression(!1,s);return a.expect(s),a.switchMode(n),{type:"styling",mode:a.mode,style:"text",body:u}}});B({type:"text",names:["\\)","\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(r,e){throw new M("Mismatched "+r.funcName)}});var ar=(r,e)=>{switch(e.style.size){case R.DISPLAY.size:return r.display;case R.TEXT.size:return r.text;case R.SCRIPT.size:return r.script;case R.SCRIPTSCRIPT.size:return r.scriptscript;default:return r.text}};B({type:"mathchoice",names:["\\mathchoice"],props:{numArgs:4,primitive:!0},handler:(r,e)=>{var{parser:t}=r;return{type:"mathchoice",mode:t.mode,display:Q(e[0]),text:Q(e[1]),script:Q(e[2]),scriptscript:Q(e[3])}},htmlBuilder:(r,e)=>{var t=ar(r,e),a=t0(t,e,!1);return b.makeFragment(a)},mathmlBuilder:(r,e)=>{var t=ar(r,e);return G0(t,e)}});var ea=(r,e,t,a,n,s,u)=>{r=b.makeSpan([],[r]);var h=t&&V.isCharacterBox(t),c,p;if(e){var g=L(e,a.havingStyle(n.sup()),a);p={elem:g,kern:Math.max(a.fontMetrics().bigOpSpacing1,a.fontMetrics().bigOpSpacing3-g.depth)}}if(t){var y=L(t,a.havingStyle(n.sub()),a);c={elem:y,kern:Math.max(a.fontMetrics().bigOpSpacing2,a.fontMetrics().bigOpSpacing4-y.height)}}var x;if(p&&c){var w=a.fontMetrics().bigOpSpacing5+c.elem.height+c.elem.depth+c.kern+r.depth+u;x=b.makeVList({positionType:"bottom",positionData:w,children:[{type:"kern",size:a.fontMetrics().bigOpSpacing5},{type:"elem",elem:c.elem,marginLeft:A(-s)},{type:"kern",size:c.kern},{type:"elem",elem:r},{type:"kern",size:p.kern},{type:"elem",elem:p.elem,marginLeft:A(s)},{type:"kern",size:a.fontMetrics().bigOpSpacing5}]},a)}else if(c){var z=r.height-u;x=b.makeVList({positionType:"top",positionData:z,children:[{type:"kern",size:a.fontMetrics().bigOpSpacing5},{type:"elem",elem:c.elem,marginLeft:A(-s)},{type:"kern",size:c.kern},{type:"elem",elem:r}]},a)}else if(p){var T=r.depth+u;x=b.makeVList({positionType:"bottom",positionData:T,children:[{type:"elem",elem:r},{type:"kern",size:p.kern},{type:"elem",elem:p.elem,marginLeft:A(s)},{type:"kern",size:a.fontMetrics().bigOpSpacing5}]},a)}else return r;var C=[x];if(c&&s!==0&&!h){var N=b.makeSpan(["mspace"],[],a);N.style.marginRight=A(s),C.unshift(N)}return b.makeSpan(["mop","op-limits"],C,a)},ta=["\\smallint"],ae=(r,e)=>{var t,a,n=!1,s;r.type==="supsub"?(t=r.sup,a=r.sub,s=O(r.base,"op"),n=!0):s=O(r,"op");var u=e.style,h=!1;u.size===R.DISPLAY.size&&s.symbol&&!ta.includes(s.name)&&(h=!0);var c;if(s.symbol){var p=h?"Size2-Regular":"Size1-Regular",g="";if((s.name==="\\oiint"||s.name==="\\oiiint")&&(g=s.name.slice(1),s.name=g==="oiint"?"\\iint":"\\iiint"),c=b.makeSymbol(s.name,p,"math",e,["mop","op-symbol",h?"large-op":"small-op"]),g.length>0){var y=c.italic,x=b.staticSvg(g+"Size"+(h?"2":"1"),e);c=b.makeVList({positionType:"individualShift",children:[{type:"elem",elem:c,shift:0},{type:"elem",elem:x,shift:h?.08:0}]},e),s.name="\\"+g,c.classes.unshift("mop"),c.italic=y}}else if(s.body){var w=t0(s.body,e,!0);w.length===1&&w[0]instanceof p0?(c=w[0],c.classes[0]="mop"):c=b.makeSpan(["mop"],w,e)}else{for(var z=[],T=1;T{var t;if(r.symbol)t=new h0("mo",[v0(r.name,r.mode)]),ta.includes(r.name)&&t.setAttribute("largeop","false");else if(r.body)t=new h0("mo",o0(r.body,e));else{t=new h0("mi",[new w0(r.name.slice(1))]);var a=new h0("mo",[v0("⁡","text")]);r.parentIsSupSub?t=new h0("mrow",[t,a]):t=Dr([t,a])}return t},W1={"∏":"\\prod","∐":"\\coprod","∑":"\\sum","⋀":"\\bigwedge","⋁":"\\bigvee","⋂":"\\bigcap","⋃":"\\bigcup","⨀":"\\bigodot","⨁":"\\bigoplus","⨂":"\\bigotimes","⨄":"\\biguplus","⨆":"\\bigsqcup"};B({type:"op",names:["\\coprod","\\bigvee","\\bigwedge","\\biguplus","\\bigcap","\\bigcup","\\intop","\\prod","\\sum","\\bigotimes","\\bigoplus","\\bigodot","\\bigsqcup","\\smallint","∏","∐","∑","⋀","⋁","⋂","⋃","⨀","⨁","⨂","⨄","⨆"],props:{numArgs:0},handler:(r,e)=>{var{parser:t,funcName:a}=r,n=a;return n.length===1&&(n=W1[n]),{type:"op",mode:t.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:n}},htmlBuilder:ae,mathmlBuilder:me});B({type:"op",names:["\\mathop"],props:{numArgs:1,primitive:!0},handler:(r,e)=>{var{parser:t}=r,a=e[0];return{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!1,body:Q(a)}},htmlBuilder:ae,mathmlBuilder:me});var j1={"∫":"\\int","∬":"\\iint","∭":"\\iiint","∮":"\\oint","∯":"\\oiint","∰":"\\oiiint"};B({type:"op",names:["\\arcsin","\\arccos","\\arctan","\\arctg","\\arcctg","\\arg","\\ch","\\cos","\\cosec","\\cosh","\\cot","\\cotg","\\coth","\\csc","\\ctg","\\cth","\\deg","\\dim","\\exp","\\hom","\\ker","\\lg","\\ln","\\log","\\sec","\\sin","\\sinh","\\sh","\\tan","\\tanh","\\tg","\\th"],props:{numArgs:0},handler(r){var{parser:e,funcName:t}=r;return{type:"op",mode:e.mode,limits:!1,parentIsSupSub:!1,symbol:!1,name:t}},htmlBuilder:ae,mathmlBuilder:me});B({type:"op",names:["\\det","\\gcd","\\inf","\\lim","\\max","\\min","\\Pr","\\sup"],props:{numArgs:0},handler(r){var{parser:e,funcName:t}=r;return{type:"op",mode:e.mode,limits:!0,parentIsSupSub:!1,symbol:!1,name:t}},htmlBuilder:ae,mathmlBuilder:me});B({type:"op",names:["\\int","\\iint","\\iiint","\\oint","\\oiint","\\oiiint","∫","∬","∭","∮","∯","∰"],props:{numArgs:0,allowedInArgument:!0},handler(r){var{parser:e,funcName:t}=r,a=t;return a.length===1&&(a=j1[a]),{type:"op",mode:e.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:a}},htmlBuilder:ae,mathmlBuilder:me});var ra=(r,e)=>{var t,a,n=!1,s;r.type==="supsub"?(t=r.sup,a=r.sub,s=O(r.base,"operatorname"),n=!0):s=O(r,"operatorname");var u;if(s.body.length>0){for(var h=s.body.map(y=>{var x=y.text;return typeof x=="string"?{type:"textord",mode:y.mode,text:x}:y}),c=t0(h,e.withFont("mathrm"),!0),p=0;p{for(var t=o0(r.body,e.withFont("mathrm")),a=!0,n=0;ng.toText()).join("");t=[new S.TextNode(h)]}var c=new S.MathNode("mi",t);c.setAttribute("mathvariant","normal");var p=new S.MathNode("mo",[v0("⁡","text")]);return r.parentIsSupSub?new S.MathNode("mrow",[c,p]):S.newDocumentFragment([c,p])};B({type:"operatorname",names:["\\operatorname@","\\operatornamewithlimits"],props:{numArgs:1},handler:(r,e)=>{var{parser:t,funcName:a}=r,n=e[0];return{type:"operatorname",mode:t.mode,body:Q(n),alwaysHandleSupSub:a==="\\operatornamewithlimits",limits:!1,parentIsSupSub:!1}},htmlBuilder:ra,mathmlBuilder:Z1});m("\\operatorname","\\@ifstar\\operatornamewithlimits\\operatorname@");W0({type:"ordgroup",htmlBuilder(r,e){return r.semisimple?b.makeFragment(t0(r.body,e,!1)):b.makeSpan(["mord"],t0(r.body,e,!0),e)},mathmlBuilder(r,e){return G0(r.body,e,!0)}});B({type:"overline",names:["\\overline"],props:{numArgs:1},handler(r,e){var{parser:t}=r,a=e[0];return{type:"overline",mode:t.mode,body:a}},htmlBuilder(r,e){var t=L(r.body,e.havingCrampedStyle()),a=b.makeLineSpan("overline-line",e),n=e.fontMetrics().defaultRuleThickness,s=b.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:t},{type:"kern",size:3*n},{type:"elem",elem:a},{type:"kern",size:n}]},e);return b.makeSpan(["mord","overline"],[s],e)},mathmlBuilder(r,e){var t=new S.MathNode("mo",[new S.TextNode("‾")]);t.setAttribute("stretchy","true");var a=new S.MathNode("mover",[X(r.body,e),t]);return a.setAttribute("accent","true"),a}});B({type:"phantom",names:["\\phantom"],props:{numArgs:1,allowedInText:!0},handler:(r,e)=>{var{parser:t}=r,a=e[0];return{type:"phantom",mode:t.mode,body:Q(a)}},htmlBuilder:(r,e)=>{var t=t0(r.body,e.withPhantom(),!1);return b.makeFragment(t)},mathmlBuilder:(r,e)=>{var t=o0(r.body,e);return new S.MathNode("mphantom",t)}});B({type:"hphantom",names:["\\hphantom"],props:{numArgs:1,allowedInText:!0},handler:(r,e)=>{var{parser:t}=r,a=e[0];return{type:"hphantom",mode:t.mode,body:a}},htmlBuilder:(r,e)=>{var t=b.makeSpan([],[L(r.body,e.withPhantom())]);if(t.height=0,t.depth=0,t.children)for(var a=0;a{var t=o0(Q(r.body),e),a=new S.MathNode("mphantom",t),n=new S.MathNode("mpadded",[a]);return n.setAttribute("height","0px"),n.setAttribute("depth","0px"),n}});B({type:"vphantom",names:["\\vphantom"],props:{numArgs:1,allowedInText:!0},handler:(r,e)=>{var{parser:t}=r,a=e[0];return{type:"vphantom",mode:t.mode,body:a}},htmlBuilder:(r,e)=>{var t=b.makeSpan(["inner"],[L(r.body,e.withPhantom())]),a=b.makeSpan(["fix"],[]);return b.makeSpan(["mord","rlap"],[t,a],e)},mathmlBuilder:(r,e)=>{var t=o0(Q(r.body),e),a=new S.MathNode("mphantom",t),n=new S.MathNode("mpadded",[a]);return n.setAttribute("width","0px"),n}});B({type:"raisebox",names:["\\raisebox"],props:{numArgs:2,argTypes:["size","hbox"],allowedInText:!0},handler(r,e){var{parser:t}=r,a=O(e[0],"size").value,n=e[1];return{type:"raisebox",mode:t.mode,dy:a,body:n}},htmlBuilder(r,e){var t=L(r.body,e),a=K(r.dy,e);return b.makeVList({positionType:"shift",positionData:-a,children:[{type:"elem",elem:t}]},e)},mathmlBuilder(r,e){var t=new S.MathNode("mpadded",[X(r.body,e)]),a=r.dy.number+r.dy.unit;return t.setAttribute("voffset",a),t}});B({type:"internal",names:["\\relax"],props:{numArgs:0,allowedInText:!0,allowedInArgument:!0},handler(r){var{parser:e}=r;return{type:"internal",mode:e.mode}}});B({type:"rule",names:["\\rule"],props:{numArgs:2,numOptionalArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["size","size","size"]},handler(r,e,t){var{parser:a}=r,n=t[0],s=O(e[0],"size"),u=O(e[1],"size");return{type:"rule",mode:a.mode,shift:n&&O(n,"size").value,width:s.value,height:u.value}},htmlBuilder(r,e){var t=b.makeSpan(["mord","rule"],[],e),a=K(r.width,e),n=K(r.height,e),s=r.shift?K(r.shift,e):0;return t.style.borderRightWidth=A(a),t.style.borderTopWidth=A(n),t.style.bottom=A(s),t.width=a,t.height=n+s,t.depth=-s,t.maxFontSize=n*1.125*e.sizeMultiplier,t},mathmlBuilder(r,e){var t=K(r.width,e),a=K(r.height,e),n=r.shift?K(r.shift,e):0,s=e.color&&e.getColor()||"black",u=new S.MathNode("mspace");u.setAttribute("mathbackground",s),u.setAttribute("width",A(t)),u.setAttribute("height",A(a));var h=new S.MathNode("mpadded",[u]);return n>=0?h.setAttribute("height",A(n)):(h.setAttribute("height",A(n)),h.setAttribute("depth",A(-n))),h.setAttribute("voffset",A(n)),h}});function aa(r,e,t){for(var a=t0(r,e,!1),n=e.sizeMultiplier/t.sizeMultiplier,s=0;s{var t=e.havingSize(r.size);return aa(r.body,t,e)};B({type:"sizing",names:nr,props:{numArgs:0,allowedInText:!0},handler:(r,e)=>{var{breakOnTokenText:t,funcName:a,parser:n}=r,s=n.parseExpression(!1,t);return{type:"sizing",mode:n.mode,size:nr.indexOf(a)+1,body:s}},htmlBuilder:K1,mathmlBuilder:(r,e)=>{var t=e.havingSize(r.size),a=o0(r.body,t),n=new S.MathNode("mstyle",a);return n.setAttribute("mathsize",A(t.sizeMultiplier)),n}});B({type:"smash",names:["\\smash"],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:(r,e,t)=>{var{parser:a}=r,n=!1,s=!1,u=t[0]&&O(t[0],"ordgroup");if(u)for(var h="",c=0;c{var t=b.makeSpan([],[L(r.body,e)]);if(!r.smashHeight&&!r.smashDepth)return t;if(r.smashHeight&&(t.height=0,t.children))for(var a=0;a{var t=new S.MathNode("mpadded",[X(r.body,e)]);return r.smashHeight&&t.setAttribute("height","0px"),r.smashDepth&&t.setAttribute("depth","0px"),t}});B({type:"sqrt",names:["\\sqrt"],props:{numArgs:1,numOptionalArgs:1},handler(r,e,t){var{parser:a}=r,n=t[0],s=e[0];return{type:"sqrt",mode:a.mode,body:s,index:n}},htmlBuilder(r,e){var t=L(r.body,e.havingCrampedStyle());t.height===0&&(t.height=e.fontMetrics().xHeight),t=b.wrapFragment(t,e);var a=e.fontMetrics(),n=a.defaultRuleThickness,s=n;e.style.idt.height+t.depth+u&&(u=(u+y-t.height-t.depth)/2);var x=c.height-t.height-u-p;t.style.paddingLeft=A(g);var w=b.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:t,wrapperClasses:["svg-align"]},{type:"kern",size:-(t.height+x)},{type:"elem",elem:c},{type:"kern",size:p}]},e);if(r.index){var z=e.havingStyle(R.SCRIPTSCRIPT),T=L(r.index,z,e),C=.6*(w.height-w.depth),N=b.makeVList({positionType:"shift",positionData:-C,children:[{type:"elem",elem:T}]},e),I=b.makeSpan(["root"],[N]);return b.makeSpan(["mord","sqrt"],[I,w],e)}else return b.makeSpan(["mord","sqrt"],[w],e)},mathmlBuilder(r,e){var{body:t,index:a}=r;return a?new S.MathNode("mroot",[X(t,e),X(a,e)]):new S.MathNode("msqrt",[X(t,e)])}});var ir={display:R.DISPLAY,text:R.TEXT,script:R.SCRIPT,scriptscript:R.SCRIPTSCRIPT};B({type:"styling",names:["\\displaystyle","\\textstyle","\\scriptstyle","\\scriptscriptstyle"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(r,e){var{breakOnTokenText:t,funcName:a,parser:n}=r,s=n.parseExpression(!0,t),u=a.slice(1,a.length-5);return{type:"styling",mode:n.mode,style:u,body:s}},htmlBuilder(r,e){var t=ir[r.style],a=e.havingStyle(t).withFont("");return aa(r.body,a,e)},mathmlBuilder(r,e){var t=ir[r.style],a=e.havingStyle(t),n=o0(r.body,a),s=new S.MathNode("mstyle",n),u={display:["0","true"],text:["0","false"],script:["1","false"],scriptscript:["2","false"]},h=u[r.style];return s.setAttribute("scriptlevel",h[0]),s.setAttribute("displaystyle",h[1]),s}});var J1=function(e,t){var a=e.base;if(a)if(a.type==="op"){var n=a.limits&&(t.style.size===R.DISPLAY.size||a.alwaysHandleSupSub);return n?ae:null}else if(a.type==="operatorname"){var s=a.alwaysHandleSupSub&&(t.style.size===R.DISPLAY.size||a.limits);return s?ra:null}else{if(a.type==="accent")return V.isCharacterBox(a.base)?wt:null;if(a.type==="horizBrace"){var u=!e.sub;return u===a.isOver?_r:null}else return null}else return null};W0({type:"supsub",htmlBuilder(r,e){var t=J1(r,e);if(t)return t(r,e);var{base:a,sup:n,sub:s}=r,u=L(a,e),h,c,p=e.fontMetrics(),g=0,y=0,x=a&&V.isCharacterBox(a);if(n){var w=e.havingStyle(e.style.sup());h=L(n,w,e),x||(g=u.height-w.fontMetrics().supDrop*w.sizeMultiplier/e.sizeMultiplier)}if(s){var z=e.havingStyle(e.style.sub());c=L(s,z,e),x||(y=u.depth+z.fontMetrics().subDrop*z.sizeMultiplier/e.sizeMultiplier)}var T;e.style===R.DISPLAY?T=p.sup1:e.style.cramped?T=p.sup3:T=p.sup2;var C=e.sizeMultiplier,N=A(.5/p.ptPerEm/C),I=null;if(c){var F=r.base&&r.base.type==="op"&&r.base.name&&(r.base.name==="\\oiint"||r.base.name==="\\oiiint");(u instanceof p0||F)&&(I=A(-u.italic))}var G;if(h&&c){g=Math.max(g,T,h.depth+.25*p.xHeight),y=Math.max(y,p.sub2);var H=p.defaultRuleThickness,U=4*H;if(g-h.depth-(c.height-y)0&&(g+=P,y-=P)}var j=[{type:"elem",elem:c,shift:y,marginRight:N,marginLeft:I},{type:"elem",elem:h,shift:-g,marginRight:N}];G=b.makeVList({positionType:"individualShift",children:j},e)}else if(c){y=Math.max(y,p.sub1,c.height-.8*p.xHeight);var Y=[{type:"elem",elem:c,marginLeft:I,marginRight:N}];G=b.makeVList({positionType:"shift",positionData:y,children:Y},e)}else if(h)g=Math.max(g,T,h.depth+.25*p.xHeight),G=b.makeVList({positionType:"shift",positionData:-g,children:[{type:"elem",elem:h,marginRight:N}]},e);else throw new Error("supsub must have either sup or sub.");var z0=ut(u,"right")||"mord";return b.makeSpan([z0],[u,b.makeSpan(["msupsub"],[G])],e)},mathmlBuilder(r,e){var t=!1,a,n;r.base&&r.base.type==="horizBrace"&&(n=!!r.sup,n===r.base.isOver&&(t=!0,a=r.base.isOver)),r.base&&(r.base.type==="op"||r.base.type==="operatorname")&&(r.base.parentIsSupSub=!0);var s=[X(r.base,e)];r.sub&&s.push(X(r.sub,e)),r.sup&&s.push(X(r.sup,e));var u;if(t)u=a?"mover":"munder";else if(r.sub)if(r.sup){var p=r.base;p&&p.type==="op"&&p.limits&&e.style===R.DISPLAY||p&&p.type==="operatorname"&&p.alwaysHandleSupSub&&(e.style===R.DISPLAY||p.limits)?u="munderover":u="msubsup"}else{var c=r.base;c&&c.type==="op"&&c.limits&&(e.style===R.DISPLAY||c.alwaysHandleSupSub)||c&&c.type==="operatorname"&&c.alwaysHandleSupSub&&(c.limits||e.style===R.DISPLAY)?u="munder":u="msub"}else{var h=r.base;h&&h.type==="op"&&h.limits&&(e.style===R.DISPLAY||h.alwaysHandleSupSub)||h&&h.type==="operatorname"&&h.alwaysHandleSupSub&&(h.limits||e.style===R.DISPLAY)?u="mover":u="msup"}return new S.MathNode(u,s)}});W0({type:"atom",htmlBuilder(r,e){return b.mathsym(r.text,r.mode,e,["m"+r.family])},mathmlBuilder(r,e){var t=new S.MathNode("mo",[v0(r.text,r.mode)]);if(r.family==="bin"){var a=yt(r,e);a==="bold-italic"&&t.setAttribute("mathvariant",a)}else r.family==="punct"?t.setAttribute("separator","true"):(r.family==="open"||r.family==="close")&&t.setAttribute("stretchy","false");return t}});var na={mi:"italic",mn:"normal",mtext:"normal"};W0({type:"mathord",htmlBuilder(r,e){return b.makeOrd(r,e,"mathord")},mathmlBuilder(r,e){var t=new S.MathNode("mi",[v0(r.text,r.mode,e)]),a=yt(r,e)||"italic";return a!==na[t.type]&&t.setAttribute("mathvariant",a),t}});W0({type:"textord",htmlBuilder(r,e){return b.makeOrd(r,e,"textord")},mathmlBuilder(r,e){var t=v0(r.text,r.mode,e),a=yt(r,e)||"normal",n;return r.mode==="text"?n=new S.MathNode("mtext",[t]):/[0-9]/.test(r.text)?n=new S.MathNode("mn",[t]):r.text==="\\prime"?n=new S.MathNode("mo",[t]):n=new S.MathNode("mi",[t]),a!==na[n.type]&&n.setAttribute("mathvariant",a),n}});var tt={"\\nobreak":"nobreak","\\allowbreak":"allowbreak"},rt={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}};W0({type:"spacing",htmlBuilder(r,e){if(rt.hasOwnProperty(r.text)){var t=rt[r.text].className||"";if(r.mode==="text"){var a=b.makeOrd(r,e,"textord");return a.classes.push(t),a}else return b.makeSpan(["mspace",t],[b.mathsym(r.text,r.mode,e)],e)}else{if(tt.hasOwnProperty(r.text))return b.makeSpan(["mspace",tt[r.text]],[],e);throw new M('Unknown type of space "'+r.text+'"')}},mathmlBuilder(r,e){var t;if(rt.hasOwnProperty(r.text))t=new S.MathNode("mtext",[new S.TextNode(" ")]);else{if(tt.hasOwnProperty(r.text))return new S.MathNode("mspace");throw new M('Unknown type of space "'+r.text+'"')}return t}});var sr=()=>{var r=new S.MathNode("mtd",[]);return r.setAttribute("width","50%"),r};W0({type:"tag",mathmlBuilder(r,e){var t=new S.MathNode("mtable",[new S.MathNode("mtr",[sr(),new S.MathNode("mtd",[G0(r.body,e)]),sr(),new S.MathNode("mtd",[G0(r.tag,e)])])]);return t.setAttribute("width","100%"),t}});var lr={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},ur={"\\textbf":"textbf","\\textmd":"textmd"},Q1={"\\textit":"textit","\\textup":"textup"},or=(r,e)=>{var t=r.font;if(t){if(lr[t])return e.withTextFontFamily(lr[t]);if(ur[t])return e.withTextFontWeight(ur[t]);if(t==="\\emph")return e.fontShape==="textit"?e.withTextFontShape("textup"):e.withTextFontShape("textit")}else return e;return e.withTextFontShape(Q1[t])};B({type:"text",names:["\\text","\\textrm","\\textsf","\\texttt","\\textnormal","\\textbf","\\textmd","\\textit","\\textup","\\emph"],props:{numArgs:1,argTypes:["text"],allowedInArgument:!0,allowedInText:!0},handler(r,e){var{parser:t,funcName:a}=r,n=e[0];return{type:"text",mode:t.mode,body:Q(n),font:a}},htmlBuilder(r,e){var t=or(r,e),a=t0(r.body,t,!0);return b.makeSpan(["mord","text"],a,t)},mathmlBuilder(r,e){var t=or(r,e);return G0(r.body,t)}});B({type:"underline",names:["\\underline"],props:{numArgs:1,allowedInText:!0},handler(r,e){var{parser:t}=r;return{type:"underline",mode:t.mode,body:e[0]}},htmlBuilder(r,e){var t=L(r.body,e),a=b.makeLineSpan("underline-line",e),n=e.fontMetrics().defaultRuleThickness,s=b.makeVList({positionType:"top",positionData:t.height,children:[{type:"kern",size:n},{type:"elem",elem:a},{type:"kern",size:3*n},{type:"elem",elem:t}]},e);return b.makeSpan(["mord","underline"],[s],e)},mathmlBuilder(r,e){var t=new S.MathNode("mo",[new S.TextNode("‾")]);t.setAttribute("stretchy","true");var a=new S.MathNode("munder",[X(r.body,e),t]);return a.setAttribute("accentunder","true"),a}});B({type:"vcenter",names:["\\vcenter"],props:{numArgs:1,argTypes:["original"],allowedInText:!1},handler(r,e){var{parser:t}=r;return{type:"vcenter",mode:t.mode,body:e[0]}},htmlBuilder(r,e){var t=L(r.body,e),a=e.fontMetrics().axisHeight,n=.5*(t.height-a-(t.depth+a));return b.makeVList({positionType:"shift",positionData:n,children:[{type:"elem",elem:t}]},e)},mathmlBuilder(r,e){return new S.MathNode("mpadded",[X(r.body,e)],["vcenter"])}});B({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler(r,e,t){throw new M("\\verb ended by end of line instead of matching delimiter")},htmlBuilder(r,e){for(var t=hr(r),a=[],n=e.havingStyle(e.style.text()),s=0;sr.body.replace(/ /g,r.star?"␣":" "),L0=Tr,ia=`[ \r + ]`,_1="\\\\[a-zA-Z@]+",e4="\\\\[^\uD800-\uDFFF]",t4="("+_1+")"+ia+"*",r4=`\\\\( +|[ \r ]+ +?)[ \r ]*`,ct="[̀-ͯ]",a4=new RegExp(ct+"+$"),n4="("+ia+"+)|"+(r4+"|")+"([!-\\[\\]-‧‪-퟿豈-￿]"+(ct+"*")+"|[\uD800-\uDBFF][\uDC00-\uDFFF]"+(ct+"*")+"|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5"+("|"+t4)+("|"+e4+")");class mr{constructor(e,t){this.input=void 0,this.settings=void 0,this.tokenRegex=void 0,this.catcodes=void 0,this.input=e,this.settings=t,this.tokenRegex=new RegExp(n4,"g"),this.catcodes={"%":14,"~":13}}setCatcode(e,t){this.catcodes[e]=t}lex(){var e=this.input,t=this.tokenRegex.lastIndex;if(t===e.length)return new m0("EOF",new u0(this,t,t));var a=this.tokenRegex.exec(e);if(a===null||a.index!==t)throw new M("Unexpected character: '"+e[t]+"'",new m0(e[t],new u0(this,t,t+1)));var n=a[6]||a[3]||(a[2]?"\\ ":" ");if(this.catcodes[n]===14){var s=e.indexOf(` +`,this.tokenRegex.lastIndex);return s===-1?(this.tokenRegex.lastIndex=e.length,this.settings.reportNonstrict("commentAtEnd","% comment has no terminating newline; LaTeX would fail because of commenting the end of math mode (e.g. $)")):this.tokenRegex.lastIndex=s+1,this.lex()}return new m0(n,new u0(this,t,this.tokenRegex.lastIndex))}}class i4{constructor(e,t){e===void 0&&(e={}),t===void 0&&(t={}),this.current=void 0,this.builtins=void 0,this.undefStack=void 0,this.current=t,this.builtins=e,this.undefStack=[]}beginGroup(){this.undefStack.push({})}endGroup(){if(this.undefStack.length===0)throw new M("Unbalanced namespace destruction: attempt to pop global namespace; please report this as a bug");var e=this.undefStack.pop();for(var t in e)e.hasOwnProperty(t)&&(e[t]==null?delete this.current[t]:this.current[t]=e[t])}endGroups(){for(;this.undefStack.length>0;)this.endGroup()}has(e){return this.current.hasOwnProperty(e)||this.builtins.hasOwnProperty(e)}get(e){return this.current.hasOwnProperty(e)?this.current[e]:this.builtins[e]}set(e,t,a){if(a===void 0&&(a=!1),a){for(var n=0;n0&&(this.undefStack[this.undefStack.length-1][e]=t)}else{var s=this.undefStack[this.undefStack.length-1];s&&!s.hasOwnProperty(e)&&(s[e]=this.current[e])}t==null?delete this.current[e]:this.current[e]=t}}var s4=jr;m("\\noexpand",function(r){var e=r.popToken();return r.isExpandable(e.text)&&(e.noexpand=!0,e.treatAsRelax=!0),{tokens:[e],numArgs:0}});m("\\expandafter",function(r){var e=r.popToken();return r.expandOnce(!0),{tokens:[e],numArgs:0}});m("\\@firstoftwo",function(r){var e=r.consumeArgs(2);return{tokens:e[0],numArgs:0}});m("\\@secondoftwo",function(r){var e=r.consumeArgs(2);return{tokens:e[1],numArgs:0}});m("\\@ifnextchar",function(r){var e=r.consumeArgs(3);r.consumeSpaces();var t=r.future();return e[0].length===1&&e[0][0].text===t.text?{tokens:e[1],numArgs:0}:{tokens:e[2],numArgs:0}});m("\\@ifstar","\\@ifnextchar *{\\@firstoftwo{#1}}");m("\\TextOrMath",function(r){var e=r.consumeArgs(2);return r.mode==="text"?{tokens:e[0],numArgs:0}:{tokens:e[1],numArgs:0}});var cr={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15};m("\\char",function(r){var e=r.popToken(),t,a="";if(e.text==="'")t=8,e=r.popToken();else if(e.text==='"')t=16,e=r.popToken();else if(e.text==="`")if(e=r.popToken(),e.text[0]==="\\")a=e.text.charCodeAt(1);else{if(e.text==="EOF")throw new M("\\char` missing argument");a=e.text.charCodeAt(0)}else t=10;if(t){if(a=cr[e.text],a==null||a>=t)throw new M("Invalid base-"+t+" digit "+e.text);for(var n;(n=cr[r.future().text])!=null&&n{var n=r.consumeArg().tokens;if(n.length!==1)throw new M("\\newcommand's first argument must be a macro name");var s=n[0].text,u=r.isDefined(s);if(u&&!e)throw new M("\\newcommand{"+s+"} attempting to redefine "+(s+"; use \\renewcommand"));if(!u&&!t)throw new M("\\renewcommand{"+s+"} when command "+s+" does not yet exist; use \\newcommand");var h=0;if(n=r.consumeArg().tokens,n.length===1&&n[0].text==="["){for(var c="",p=r.expandNextToken();p.text!=="]"&&p.text!=="EOF";)c+=p.text,p=r.expandNextToken();if(!c.match(/^\s*[0-9]+\s*$/))throw new M("Invalid number of arguments: "+c);h=parseInt(c),n=r.consumeArg().tokens}return u&&a||r.macros.set(s,{tokens:n,numArgs:h}),""};m("\\newcommand",r=>Dt(r,!1,!0,!1));m("\\renewcommand",r=>Dt(r,!0,!1,!1));m("\\providecommand",r=>Dt(r,!0,!0,!0));m("\\message",r=>{var e=r.consumeArgs(1)[0];return console.log(e.reverse().map(t=>t.text).join("")),""});m("\\errmessage",r=>{var e=r.consumeArgs(1)[0];return console.error(e.reverse().map(t=>t.text).join("")),""});m("\\show",r=>{var e=r.popToken(),t=e.text;return console.log(e,r.macros.get(t),L0[t],$.math[t],$.text[t]),""});m("\\bgroup","{");m("\\egroup","}");m("~","\\nobreakspace");m("\\lq","`");m("\\rq","'");m("\\aa","\\r a");m("\\AA","\\r A");m("\\textcopyright","\\html@mathml{\\textcircled{c}}{\\char`©}");m("\\copyright","\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}");m("\\textregistered","\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`®}");m("ℬ","\\mathscr{B}");m("ℰ","\\mathscr{E}");m("ℱ","\\mathscr{F}");m("ℋ","\\mathscr{H}");m("ℐ","\\mathscr{I}");m("ℒ","\\mathscr{L}");m("ℳ","\\mathscr{M}");m("ℛ","\\mathscr{R}");m("ℭ","\\mathfrak{C}");m("ℌ","\\mathfrak{H}");m("ℨ","\\mathfrak{Z}");m("\\Bbbk","\\Bbb{k}");m("·","\\cdotp");m("\\llap","\\mathllap{\\textrm{#1}}");m("\\rlap","\\mathrlap{\\textrm{#1}}");m("\\clap","\\mathclap{\\textrm{#1}}");m("\\mathstrut","\\vphantom{(}");m("\\underbar","\\underline{\\text{#1}}");m("\\not",'\\html@mathml{\\mathrel{\\mathrlap\\@not}}{\\char"338}');m("\\neq","\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`≠}}");m("\\ne","\\neq");m("≠","\\neq");m("\\notin","\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`∉}}");m("∉","\\notin");m("≘","\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`≘}}");m("≙","\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`≘}}");m("≚","\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`≚}}");m("≛","\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`≛}}");m("≝","\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`≝}}");m("≞","\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`≞}}");m("≟","\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`≟}}");m("⟂","\\perp");m("‼","\\mathclose{!\\mkern-0.8mu!}");m("∌","\\notni");m("⌜","\\ulcorner");m("⌝","\\urcorner");m("⌞","\\llcorner");m("⌟","\\lrcorner");m("©","\\copyright");m("®","\\textregistered");m("️","\\textregistered");m("\\ulcorner",'\\html@mathml{\\@ulcorner}{\\mathop{\\char"231c}}');m("\\urcorner",'\\html@mathml{\\@urcorner}{\\mathop{\\char"231d}}');m("\\llcorner",'\\html@mathml{\\@llcorner}{\\mathop{\\char"231e}}');m("\\lrcorner",'\\html@mathml{\\@lrcorner}{\\mathop{\\char"231f}}');m("\\vdots","{\\varvdots\\rule{0pt}{15pt}}");m("⋮","\\vdots");m("\\varGamma","\\mathit{\\Gamma}");m("\\varDelta","\\mathit{\\Delta}");m("\\varTheta","\\mathit{\\Theta}");m("\\varLambda","\\mathit{\\Lambda}");m("\\varXi","\\mathit{\\Xi}");m("\\varPi","\\mathit{\\Pi}");m("\\varSigma","\\mathit{\\Sigma}");m("\\varUpsilon","\\mathit{\\Upsilon}");m("\\varPhi","\\mathit{\\Phi}");m("\\varPsi","\\mathit{\\Psi}");m("\\varOmega","\\mathit{\\Omega}");m("\\substack","\\begin{subarray}{c}#1\\end{subarray}");m("\\colon","\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu\\relax");m("\\boxed","\\fbox{$\\displaystyle{#1}$}");m("\\iff","\\DOTSB\\;\\Longleftrightarrow\\;");m("\\implies","\\DOTSB\\;\\Longrightarrow\\;");m("\\impliedby","\\DOTSB\\;\\Longleftarrow\\;");m("\\dddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ...}}{#1}}");m("\\ddddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ....}}{#1}}");var dr={",":"\\dotsc","\\not":"\\dotsb","+":"\\dotsb","=":"\\dotsb","<":"\\dotsb",">":"\\dotsb","-":"\\dotsb","*":"\\dotsb",":":"\\dotsb","\\DOTSB":"\\dotsb","\\coprod":"\\dotsb","\\bigvee":"\\dotsb","\\bigwedge":"\\dotsb","\\biguplus":"\\dotsb","\\bigcap":"\\dotsb","\\bigcup":"\\dotsb","\\prod":"\\dotsb","\\sum":"\\dotsb","\\bigotimes":"\\dotsb","\\bigoplus":"\\dotsb","\\bigodot":"\\dotsb","\\bigsqcup":"\\dotsb","\\And":"\\dotsb","\\longrightarrow":"\\dotsb","\\Longrightarrow":"\\dotsb","\\longleftarrow":"\\dotsb","\\Longleftarrow":"\\dotsb","\\longleftrightarrow":"\\dotsb","\\Longleftrightarrow":"\\dotsb","\\mapsto":"\\dotsb","\\longmapsto":"\\dotsb","\\hookrightarrow":"\\dotsb","\\doteq":"\\dotsb","\\mathbin":"\\dotsb","\\mathrel":"\\dotsb","\\relbar":"\\dotsb","\\Relbar":"\\dotsb","\\xrightarrow":"\\dotsb","\\xleftarrow":"\\dotsb","\\DOTSI":"\\dotsi","\\int":"\\dotsi","\\oint":"\\dotsi","\\iint":"\\dotsi","\\iiint":"\\dotsi","\\iiiint":"\\dotsi","\\idotsint":"\\dotsi","\\DOTSX":"\\dotsx"};m("\\dots",function(r){var e="\\dotso",t=r.expandAfterFuture().text;return t in dr?e=dr[t]:(t.slice(0,4)==="\\not"||t in $.math&&["bin","rel"].includes($.math[t].group))&&(e="\\dotsb"),e});var Ct={")":!0,"]":!0,"\\rbrack":!0,"\\}":!0,"\\rbrace":!0,"\\rangle":!0,"\\rceil":!0,"\\rfloor":!0,"\\rgroup":!0,"\\rmoustache":!0,"\\right":!0,"\\bigr":!0,"\\biggr":!0,"\\Bigr":!0,"\\Biggr":!0,$:!0,";":!0,".":!0,",":!0};m("\\dotso",function(r){var e=r.future().text;return e in Ct?"\\ldots\\,":"\\ldots"});m("\\dotsc",function(r){var e=r.future().text;return e in Ct&&e!==","?"\\ldots\\,":"\\ldots"});m("\\cdots",function(r){var e=r.future().text;return e in Ct?"\\@cdots\\,":"\\@cdots"});m("\\dotsb","\\cdots");m("\\dotsm","\\cdots");m("\\dotsi","\\!\\cdots");m("\\dotsx","\\ldots\\,");m("\\DOTSI","\\relax");m("\\DOTSB","\\relax");m("\\DOTSX","\\relax");m("\\tmspace","\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax");m("\\,","\\tmspace+{3mu}{.1667em}");m("\\thinspace","\\,");m("\\>","\\mskip{4mu}");m("\\:","\\tmspace+{4mu}{.2222em}");m("\\medspace","\\:");m("\\;","\\tmspace+{5mu}{.2777em}");m("\\thickspace","\\;");m("\\!","\\tmspace-{3mu}{.1667em}");m("\\negthinspace","\\!");m("\\negmedspace","\\tmspace-{4mu}{.2222em}");m("\\negthickspace","\\tmspace-{5mu}{.277em}");m("\\enspace","\\kern.5em ");m("\\enskip","\\hskip.5em\\relax");m("\\quad","\\hskip1em\\relax");m("\\qquad","\\hskip2em\\relax");m("\\tag","\\@ifstar\\tag@literal\\tag@paren");m("\\tag@paren","\\tag@literal{({#1})}");m("\\tag@literal",r=>{if(r.macros.get("\\df@tag"))throw new M("Multiple \\tag");return"\\gdef\\df@tag{\\text{#1}}"});m("\\bmod","\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}");m("\\pod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)");m("\\pmod","\\pod{{\\rm mod}\\mkern6mu#1}");m("\\mod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1");m("\\newline","\\\\\\relax");m("\\TeX","\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}");var sa=A(x0["Main-Regular"][84][1]-.7*x0["Main-Regular"][65][1]);m("\\LaTeX","\\textrm{\\html@mathml{"+("L\\kern-.36em\\raisebox{"+sa+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{LaTeX}}");m("\\KaTeX","\\textrm{\\html@mathml{"+("K\\kern-.17em\\raisebox{"+sa+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{KaTeX}}");m("\\hspace","\\@ifstar\\@hspacer\\@hspace");m("\\@hspace","\\hskip #1\\relax");m("\\@hspacer","\\rule{0pt}{0pt}\\hskip #1\\relax");m("\\ordinarycolon",":");m("\\vcentcolon","\\mathrel{\\mathop\\ordinarycolon}");m("\\dblcolon",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}');m("\\coloneqq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}');m("\\Coloneqq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}');m("\\coloneq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}');m("\\Coloneq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}');m("\\eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}');m("\\Eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}');m("\\eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}');m("\\Eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}');m("\\colonapprox",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}');m("\\Colonapprox",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}');m("\\colonsim",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}');m("\\Colonsim",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}');m("∷","\\dblcolon");m("∹","\\eqcolon");m("≔","\\coloneqq");m("≕","\\eqqcolon");m("⩴","\\Coloneqq");m("\\ratio","\\vcentcolon");m("\\coloncolon","\\dblcolon");m("\\colonequals","\\coloneqq");m("\\coloncolonequals","\\Coloneqq");m("\\equalscolon","\\eqqcolon");m("\\equalscoloncolon","\\Eqqcolon");m("\\colonminus","\\coloneq");m("\\coloncolonminus","\\Coloneq");m("\\minuscolon","\\eqcolon");m("\\minuscoloncolon","\\Eqcolon");m("\\coloncolonapprox","\\Colonapprox");m("\\coloncolonsim","\\Colonsim");m("\\simcolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}");m("\\simcoloncolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}");m("\\approxcolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}");m("\\approxcoloncolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}");m("\\notni","\\html@mathml{\\not\\ni}{\\mathrel{\\char`∌}}");m("\\limsup","\\DOTSB\\operatorname*{lim\\,sup}");m("\\liminf","\\DOTSB\\operatorname*{lim\\,inf}");m("\\injlim","\\DOTSB\\operatorname*{inj\\,lim}");m("\\projlim","\\DOTSB\\operatorname*{proj\\,lim}");m("\\varlimsup","\\DOTSB\\operatorname*{\\overline{lim}}");m("\\varliminf","\\DOTSB\\operatorname*{\\underline{lim}}");m("\\varinjlim","\\DOTSB\\operatorname*{\\underrightarrow{lim}}");m("\\varprojlim","\\DOTSB\\operatorname*{\\underleftarrow{lim}}");m("\\gvertneqq","\\html@mathml{\\@gvertneqq}{≩}");m("\\lvertneqq","\\html@mathml{\\@lvertneqq}{≨}");m("\\ngeqq","\\html@mathml{\\@ngeqq}{≱}");m("\\ngeqslant","\\html@mathml{\\@ngeqslant}{≱}");m("\\nleqq","\\html@mathml{\\@nleqq}{≰}");m("\\nleqslant","\\html@mathml{\\@nleqslant}{≰}");m("\\nshortmid","\\html@mathml{\\@nshortmid}{∤}");m("\\nshortparallel","\\html@mathml{\\@nshortparallel}{∦}");m("\\nsubseteqq","\\html@mathml{\\@nsubseteqq}{⊈}");m("\\nsupseteqq","\\html@mathml{\\@nsupseteqq}{⊉}");m("\\varsubsetneq","\\html@mathml{\\@varsubsetneq}{⊊}");m("\\varsubsetneqq","\\html@mathml{\\@varsubsetneqq}{⫋}");m("\\varsupsetneq","\\html@mathml{\\@varsupsetneq}{⊋}");m("\\varsupsetneqq","\\html@mathml{\\@varsupsetneqq}{⫌}");m("\\imath","\\html@mathml{\\@imath}{ı}");m("\\jmath","\\html@mathml{\\@jmath}{ȷ}");m("\\llbracket","\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`⟦}}");m("\\rrbracket","\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`⟧}}");m("⟦","\\llbracket");m("⟧","\\rrbracket");m("\\lBrace","\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`⦃}}");m("\\rBrace","\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`⦄}}");m("⦃","\\lBrace");m("⦄","\\rBrace");m("\\minuso","\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`⦵}}");m("⦵","\\minuso");m("\\darr","\\downarrow");m("\\dArr","\\Downarrow");m("\\Darr","\\Downarrow");m("\\lang","\\langle");m("\\rang","\\rangle");m("\\uarr","\\uparrow");m("\\uArr","\\Uparrow");m("\\Uarr","\\Uparrow");m("\\N","\\mathbb{N}");m("\\R","\\mathbb{R}");m("\\Z","\\mathbb{Z}");m("\\alef","\\aleph");m("\\alefsym","\\aleph");m("\\Alpha","\\mathrm{A}");m("\\Beta","\\mathrm{B}");m("\\bull","\\bullet");m("\\Chi","\\mathrm{X}");m("\\clubs","\\clubsuit");m("\\cnums","\\mathbb{C}");m("\\Complex","\\mathbb{C}");m("\\Dagger","\\ddagger");m("\\diamonds","\\diamondsuit");m("\\empty","\\emptyset");m("\\Epsilon","\\mathrm{E}");m("\\Eta","\\mathrm{H}");m("\\exist","\\exists");m("\\harr","\\leftrightarrow");m("\\hArr","\\Leftrightarrow");m("\\Harr","\\Leftrightarrow");m("\\hearts","\\heartsuit");m("\\image","\\Im");m("\\infin","\\infty");m("\\Iota","\\mathrm{I}");m("\\isin","\\in");m("\\Kappa","\\mathrm{K}");m("\\larr","\\leftarrow");m("\\lArr","\\Leftarrow");m("\\Larr","\\Leftarrow");m("\\lrarr","\\leftrightarrow");m("\\lrArr","\\Leftrightarrow");m("\\Lrarr","\\Leftrightarrow");m("\\Mu","\\mathrm{M}");m("\\natnums","\\mathbb{N}");m("\\Nu","\\mathrm{N}");m("\\Omicron","\\mathrm{O}");m("\\plusmn","\\pm");m("\\rarr","\\rightarrow");m("\\rArr","\\Rightarrow");m("\\Rarr","\\Rightarrow");m("\\real","\\Re");m("\\reals","\\mathbb{R}");m("\\Reals","\\mathbb{R}");m("\\Rho","\\mathrm{P}");m("\\sdot","\\cdot");m("\\sect","\\S");m("\\spades","\\spadesuit");m("\\sub","\\subset");m("\\sube","\\subseteq");m("\\supe","\\supseteq");m("\\Tau","\\mathrm{T}");m("\\thetasym","\\vartheta");m("\\weierp","\\wp");m("\\Zeta","\\mathrm{Z}");m("\\argmin","\\DOTSB\\operatorname*{arg\\,min}");m("\\argmax","\\DOTSB\\operatorname*{arg\\,max}");m("\\plim","\\DOTSB\\mathop{\\operatorname{plim}}\\limits");m("\\bra","\\mathinner{\\langle{#1}|}");m("\\ket","\\mathinner{|{#1}\\rangle}");m("\\braket","\\mathinner{\\langle{#1}\\rangle}");m("\\Bra","\\left\\langle#1\\right|");m("\\Ket","\\left|#1\\right\\rangle");var la=r=>e=>{var t=e.consumeArg().tokens,a=e.consumeArg().tokens,n=e.consumeArg().tokens,s=e.consumeArg().tokens,u=e.macros.get("|"),h=e.macros.get("\\|");e.macros.beginGroup();var c=y=>x=>{r&&(x.macros.set("|",u),n.length&&x.macros.set("\\|",h));var w=y;if(!y&&n.length){var z=x.future();z.text==="|"&&(x.popToken(),w=!0)}return{tokens:w?n:a,numArgs:0}};e.macros.set("|",c(!1)),n.length&&e.macros.set("\\|",c(!0));var p=e.consumeArg().tokens,g=e.expandTokens([...s,...p,...t]);return e.macros.endGroup(),{tokens:g.reverse(),numArgs:0}};m("\\bra@ket",la(!1));m("\\bra@set",la(!0));m("\\Braket","\\bra@ket{\\left\\langle}{\\,\\middle\\vert\\,}{\\,\\middle\\vert\\,}{\\right\\rangle}");m("\\Set","\\bra@set{\\left\\{\\:}{\\;\\middle\\vert\\;}{\\;\\middle\\Vert\\;}{\\:\\right\\}}");m("\\set","\\bra@set{\\{\\,}{\\mid}{}{\\,\\}}");m("\\angln","{\\angl n}");m("\\blue","\\textcolor{##6495ed}{#1}");m("\\orange","\\textcolor{##ffa500}{#1}");m("\\pink","\\textcolor{##ff00af}{#1}");m("\\red","\\textcolor{##df0030}{#1}");m("\\green","\\textcolor{##28ae7b}{#1}");m("\\gray","\\textcolor{gray}{#1}");m("\\purple","\\textcolor{##9d38bd}{#1}");m("\\blueA","\\textcolor{##ccfaff}{#1}");m("\\blueB","\\textcolor{##80f6ff}{#1}");m("\\blueC","\\textcolor{##63d9ea}{#1}");m("\\blueD","\\textcolor{##11accd}{#1}");m("\\blueE","\\textcolor{##0c7f99}{#1}");m("\\tealA","\\textcolor{##94fff5}{#1}");m("\\tealB","\\textcolor{##26edd5}{#1}");m("\\tealC","\\textcolor{##01d1c1}{#1}");m("\\tealD","\\textcolor{##01a995}{#1}");m("\\tealE","\\textcolor{##208170}{#1}");m("\\greenA","\\textcolor{##b6ffb0}{#1}");m("\\greenB","\\textcolor{##8af281}{#1}");m("\\greenC","\\textcolor{##74cf70}{#1}");m("\\greenD","\\textcolor{##1fab54}{#1}");m("\\greenE","\\textcolor{##0d923f}{#1}");m("\\goldA","\\textcolor{##ffd0a9}{#1}");m("\\goldB","\\textcolor{##ffbb71}{#1}");m("\\goldC","\\textcolor{##ff9c39}{#1}");m("\\goldD","\\textcolor{##e07d10}{#1}");m("\\goldE","\\textcolor{##a75a05}{#1}");m("\\redA","\\textcolor{##fca9a9}{#1}");m("\\redB","\\textcolor{##ff8482}{#1}");m("\\redC","\\textcolor{##f9685d}{#1}");m("\\redD","\\textcolor{##e84d39}{#1}");m("\\redE","\\textcolor{##bc2612}{#1}");m("\\maroonA","\\textcolor{##ffbde0}{#1}");m("\\maroonB","\\textcolor{##ff92c6}{#1}");m("\\maroonC","\\textcolor{##ed5fa6}{#1}");m("\\maroonD","\\textcolor{##ca337c}{#1}");m("\\maroonE","\\textcolor{##9e034e}{#1}");m("\\purpleA","\\textcolor{##ddd7ff}{#1}");m("\\purpleB","\\textcolor{##c6b9fc}{#1}");m("\\purpleC","\\textcolor{##aa87ff}{#1}");m("\\purpleD","\\textcolor{##7854ab}{#1}");m("\\purpleE","\\textcolor{##543b78}{#1}");m("\\mintA","\\textcolor{##f5f9e8}{#1}");m("\\mintB","\\textcolor{##edf2df}{#1}");m("\\mintC","\\textcolor{##e0e5cc}{#1}");m("\\grayA","\\textcolor{##f6f7f7}{#1}");m("\\grayB","\\textcolor{##f0f1f2}{#1}");m("\\grayC","\\textcolor{##e3e5e6}{#1}");m("\\grayD","\\textcolor{##d6d8da}{#1}");m("\\grayE","\\textcolor{##babec2}{#1}");m("\\grayF","\\textcolor{##888d93}{#1}");m("\\grayG","\\textcolor{##626569}{#1}");m("\\grayH","\\textcolor{##3b3e40}{#1}");m("\\grayI","\\textcolor{##21242c}{#1}");m("\\kaBlue","\\textcolor{##314453}{#1}");m("\\kaGreen","\\textcolor{##71B307}{#1}");var ua={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0};class l4{constructor(e,t,a){this.settings=void 0,this.expansionCount=void 0,this.lexer=void 0,this.macros=void 0,this.stack=void 0,this.mode=void 0,this.settings=t,this.expansionCount=0,this.feed(e),this.macros=new i4(s4,t.macros),this.mode=a,this.stack=[]}feed(e){this.lexer=new mr(e,this.settings)}switchMode(e){this.mode=e}beginGroup(){this.macros.beginGroup()}endGroup(){this.macros.endGroup()}endGroups(){this.macros.endGroups()}future(){return this.stack.length===0&&this.pushToken(this.lexer.lex()),this.stack[this.stack.length-1]}popToken(){return this.future(),this.stack.pop()}pushToken(e){this.stack.push(e)}pushTokens(e){this.stack.push(...e)}scanArgument(e){var t,a,n;if(e){if(this.consumeSpaces(),this.future().text!=="[")return null;t=this.popToken(),{tokens:n,end:a}=this.consumeArg(["]"])}else({tokens:n,start:t,end:a}=this.consumeArg());return this.pushToken(new m0("EOF",a.loc)),this.pushTokens(n),new m0("",u0.range(t,a))}consumeSpaces(){for(;;){var e=this.future();if(e.text===" ")this.stack.pop();else break}}consumeArg(e){var t=[],a=e&&e.length>0;a||this.consumeSpaces();var n=this.future(),s,u=0,h=0;do{if(s=this.popToken(),t.push(s),s.text==="{")++u;else if(s.text==="}"){if(--u,u===-1)throw new M("Extra }",s)}else if(s.text==="EOF")throw new M("Unexpected end of input in a macro argument, expected '"+(e&&a?e[h]:"}")+"'",s);if(e&&a)if((u===0||u===1&&e[h]==="{")&&s.text===e[h]){if(++h,h===e.length){t.splice(-h,h);break}}else h=0}while(u!==0||a);return n.text==="{"&&t[t.length-1].text==="}"&&(t.pop(),t.shift()),t.reverse(),{tokens:t,start:n,end:s}}consumeArgs(e,t){if(t){if(t.length!==e+1)throw new M("The length of delimiters doesn't match the number of args!");for(var a=t[0],n=0;nthis.settings.maxExpand)throw new M("Too many expansions: infinite loop or need to increase maxExpand setting")}expandOnce(e){var t=this.popToken(),a=t.text,n=t.noexpand?null:this._getExpansion(a);if(n==null||e&&n.unexpandable){if(e&&n==null&&a[0]==="\\"&&!this.isDefined(a))throw new M("Undefined control sequence: "+a);return this.pushToken(t),!1}this.countExpansion(1);var s=n.tokens,u=this.consumeArgs(n.numArgs,n.delimiters);if(n.numArgs){s=s.slice();for(var h=s.length-1;h>=0;--h){var c=s[h];if(c.text==="#"){if(h===0)throw new M("Incomplete placeholder at end of macro body",c);if(c=s[--h],c.text==="#")s.splice(h+1,1);else if(/^[1-9]$/.test(c.text))s.splice(h,2,...u[+c.text-1]);else throw new M("Not a valid argument number",c)}}}return this.pushTokens(s),s.length}expandAfterFuture(){return this.expandOnce(),this.future()}expandNextToken(){for(;;)if(this.expandOnce()===!1){var e=this.stack.pop();return e.treatAsRelax&&(e.text="\\relax"),e}throw new Error}expandMacro(e){return this.macros.has(e)?this.expandTokens([new m0(e)]):void 0}expandTokens(e){var t=[],a=this.stack.length;for(this.pushTokens(e);this.stack.length>a;)if(this.expandOnce(!0)===!1){var n=this.stack.pop();n.treatAsRelax&&(n.noexpand=!1,n.treatAsRelax=!1),t.push(n)}return this.countExpansion(t.length),t}expandMacroAsText(e){var t=this.expandMacro(e);return t&&t.map(a=>a.text).join("")}_getExpansion(e){var t=this.macros.get(e);if(t==null)return t;if(e.length===1){var a=this.lexer.catcodes[e];if(a!=null&&a!==13)return}var n=typeof t=="function"?t(this):t;if(typeof n=="string"){var s=0;if(n.indexOf("#")!==-1)for(var u=n.replace(/##/g,"");u.indexOf("#"+(s+1))!==-1;)++s;for(var h=new mr(n,this.settings),c=[],p=h.lex();p.text!=="EOF";)c.push(p),p=h.lex();c.reverse();var g={tokens:c,numArgs:s};return g}return n}isDefined(e){return this.macros.has(e)||L0.hasOwnProperty(e)||$.math.hasOwnProperty(e)||$.text.hasOwnProperty(e)||ua.hasOwnProperty(e)}isExpandable(e){var t=this.macros.get(e);return t!=null?typeof t=="string"||typeof t=="function"||!t.unexpandable:L0.hasOwnProperty(e)&&!L0[e].primitive}}var fr=/^[₊₋₌₍₎₀₁₂₃₄₅₆₇₈₉ₐₑₕᵢⱼₖₗₘₙₒₚᵣₛₜᵤᵥₓᵦᵧᵨᵩᵪ]/,Me=Object.freeze({"₊":"+","₋":"-","₌":"=","₍":"(","₎":")","₀":"0","₁":"1","₂":"2","₃":"3","₄":"4","₅":"5","₆":"6","₇":"7","₈":"8","₉":"9","ₐ":"a","ₑ":"e","ₕ":"h","ᵢ":"i","ⱼ":"j","ₖ":"k","ₗ":"l","ₘ":"m","ₙ":"n","ₒ":"o","ₚ":"p","ᵣ":"r","ₛ":"s","ₜ":"t","ᵤ":"u","ᵥ":"v","ₓ":"x","ᵦ":"β","ᵧ":"γ","ᵨ":"ρ","ᵩ":"ϕ","ᵪ":"χ","⁺":"+","⁻":"-","⁼":"=","⁽":"(","⁾":")","⁰":"0","¹":"1","²":"2","³":"3","⁴":"4","⁵":"5","⁶":"6","⁷":"7","⁸":"8","⁹":"9","ᴬ":"A","ᴮ":"B","ᴰ":"D","ᴱ":"E","ᴳ":"G","ᴴ":"H","ᴵ":"I","ᴶ":"J","ᴷ":"K","ᴸ":"L","ᴹ":"M","ᴺ":"N","ᴼ":"O","ᴾ":"P","ᴿ":"R","ᵀ":"T","ᵁ":"U","ⱽ":"V","ᵂ":"W","ᵃ":"a","ᵇ":"b","ᶜ":"c","ᵈ":"d","ᵉ":"e","ᶠ":"f","ᵍ":"g",ʰ:"h","ⁱ":"i",ʲ:"j","ᵏ":"k",ˡ:"l","ᵐ":"m",ⁿ:"n","ᵒ":"o","ᵖ":"p",ʳ:"r",ˢ:"s","ᵗ":"t","ᵘ":"u","ᵛ":"v",ʷ:"w",ˣ:"x",ʸ:"y","ᶻ":"z","ᵝ":"β","ᵞ":"γ","ᵟ":"δ","ᵠ":"ϕ","ᵡ":"χ","ᶿ":"θ"}),at={"́":{text:"\\'",math:"\\acute"},"̀":{text:"\\`",math:"\\grave"},"̈":{text:'\\"',math:"\\ddot"},"̃":{text:"\\~",math:"\\tilde"},"̄":{text:"\\=",math:"\\bar"},"̆":{text:"\\u",math:"\\breve"},"̌":{text:"\\v",math:"\\check"},"̂":{text:"\\^",math:"\\hat"},"̇":{text:"\\.",math:"\\dot"},"̊":{text:"\\r",math:"\\mathring"},"̋":{text:"\\H"},"̧":{text:"\\c"}},pr={á:"á",à:"à",ä:"ä",ǟ:"ǟ",ã:"ã",ā:"ā",ă:"ă",ắ:"ắ",ằ:"ằ",ẵ:"ẵ",ǎ:"ǎ",â:"â",ấ:"ấ",ầ:"ầ",ẫ:"ẫ",ȧ:"ȧ",ǡ:"ǡ",å:"å",ǻ:"ǻ",ḃ:"ḃ",ć:"ć",ḉ:"ḉ",č:"č",ĉ:"ĉ",ċ:"ċ",ç:"ç",ď:"ď",ḋ:"ḋ",ḑ:"ḑ",é:"é",è:"è",ë:"ë",ẽ:"ẽ",ē:"ē",ḗ:"ḗ",ḕ:"ḕ",ĕ:"ĕ",ḝ:"ḝ",ě:"ě",ê:"ê",ế:"ế",ề:"ề",ễ:"ễ",ė:"ė",ȩ:"ȩ",ḟ:"ḟ",ǵ:"ǵ",ḡ:"ḡ",ğ:"ğ",ǧ:"ǧ",ĝ:"ĝ",ġ:"ġ",ģ:"ģ",ḧ:"ḧ",ȟ:"ȟ",ĥ:"ĥ",ḣ:"ḣ",ḩ:"ḩ",í:"í",ì:"ì",ï:"ï",ḯ:"ḯ",ĩ:"ĩ",ī:"ī",ĭ:"ĭ",ǐ:"ǐ",î:"î",ǰ:"ǰ",ĵ:"ĵ",ḱ:"ḱ",ǩ:"ǩ",ķ:"ķ",ĺ:"ĺ",ľ:"ľ",ļ:"ļ",ḿ:"ḿ",ṁ:"ṁ",ń:"ń",ǹ:"ǹ",ñ:"ñ",ň:"ň",ṅ:"ṅ",ņ:"ņ",ó:"ó",ò:"ò",ö:"ö",ȫ:"ȫ",õ:"õ",ṍ:"ṍ",ṏ:"ṏ",ȭ:"ȭ",ō:"ō",ṓ:"ṓ",ṑ:"ṑ",ŏ:"ŏ",ǒ:"ǒ",ô:"ô",ố:"ố",ồ:"ồ",ỗ:"ỗ",ȯ:"ȯ",ȱ:"ȱ",ő:"ő",ṕ:"ṕ",ṗ:"ṗ",ŕ:"ŕ",ř:"ř",ṙ:"ṙ",ŗ:"ŗ",ś:"ś",ṥ:"ṥ",š:"š",ṧ:"ṧ",ŝ:"ŝ",ṡ:"ṡ",ş:"ş",ẗ:"ẗ",ť:"ť",ṫ:"ṫ",ţ:"ţ",ú:"ú",ù:"ù",ü:"ü",ǘ:"ǘ",ǜ:"ǜ",ǖ:"ǖ",ǚ:"ǚ",ũ:"ũ",ṹ:"ṹ",ū:"ū",ṻ:"ṻ",ŭ:"ŭ",ǔ:"ǔ",û:"û",ů:"ů",ű:"ű",ṽ:"ṽ",ẃ:"ẃ",ẁ:"ẁ",ẅ:"ẅ",ŵ:"ŵ",ẇ:"ẇ",ẘ:"ẘ",ẍ:"ẍ",ẋ:"ẋ",ý:"ý",ỳ:"ỳ",ÿ:"ÿ",ỹ:"ỹ",ȳ:"ȳ",ŷ:"ŷ",ẏ:"ẏ",ẙ:"ẙ",ź:"ź",ž:"ž",ẑ:"ẑ",ż:"ż",Á:"Á",À:"À",Ä:"Ä",Ǟ:"Ǟ",Ã:"Ã",Ā:"Ā",Ă:"Ă",Ắ:"Ắ",Ằ:"Ằ",Ẵ:"Ẵ",Ǎ:"Ǎ",Â:"Â",Ấ:"Ấ",Ầ:"Ầ",Ẫ:"Ẫ",Ȧ:"Ȧ",Ǡ:"Ǡ",Å:"Å",Ǻ:"Ǻ",Ḃ:"Ḃ",Ć:"Ć",Ḉ:"Ḉ",Č:"Č",Ĉ:"Ĉ",Ċ:"Ċ",Ç:"Ç",Ď:"Ď",Ḋ:"Ḋ",Ḑ:"Ḑ",É:"É",È:"È",Ë:"Ë",Ẽ:"Ẽ",Ē:"Ē",Ḗ:"Ḗ",Ḕ:"Ḕ",Ĕ:"Ĕ",Ḝ:"Ḝ",Ě:"Ě",Ê:"Ê",Ế:"Ế",Ề:"Ề",Ễ:"Ễ",Ė:"Ė",Ȩ:"Ȩ",Ḟ:"Ḟ",Ǵ:"Ǵ",Ḡ:"Ḡ",Ğ:"Ğ",Ǧ:"Ǧ",Ĝ:"Ĝ",Ġ:"Ġ",Ģ:"Ģ",Ḧ:"Ḧ",Ȟ:"Ȟ",Ĥ:"Ĥ",Ḣ:"Ḣ",Ḩ:"Ḩ",Í:"Í",Ì:"Ì",Ï:"Ï",Ḯ:"Ḯ",Ĩ:"Ĩ",Ī:"Ī",Ĭ:"Ĭ",Ǐ:"Ǐ",Î:"Î",İ:"İ",Ĵ:"Ĵ",Ḱ:"Ḱ",Ǩ:"Ǩ",Ķ:"Ķ",Ĺ:"Ĺ",Ľ:"Ľ",Ļ:"Ļ",Ḿ:"Ḿ",Ṁ:"Ṁ",Ń:"Ń",Ǹ:"Ǹ",Ñ:"Ñ",Ň:"Ň",Ṅ:"Ṅ",Ņ:"Ņ",Ó:"Ó",Ò:"Ò",Ö:"Ö",Ȫ:"Ȫ",Õ:"Õ",Ṍ:"Ṍ",Ṏ:"Ṏ",Ȭ:"Ȭ",Ō:"Ō",Ṓ:"Ṓ",Ṑ:"Ṑ",Ŏ:"Ŏ",Ǒ:"Ǒ",Ô:"Ô",Ố:"Ố",Ồ:"Ồ",Ỗ:"Ỗ",Ȯ:"Ȯ",Ȱ:"Ȱ",Ő:"Ő",Ṕ:"Ṕ",Ṗ:"Ṗ",Ŕ:"Ŕ",Ř:"Ř",Ṙ:"Ṙ",Ŗ:"Ŗ",Ś:"Ś",Ṥ:"Ṥ",Š:"Š",Ṧ:"Ṧ",Ŝ:"Ŝ",Ṡ:"Ṡ",Ş:"Ş",Ť:"Ť",Ṫ:"Ṫ",Ţ:"Ţ",Ú:"Ú",Ù:"Ù",Ü:"Ü",Ǘ:"Ǘ",Ǜ:"Ǜ",Ǖ:"Ǖ",Ǚ:"Ǚ",Ũ:"Ũ",Ṹ:"Ṹ",Ū:"Ū",Ṻ:"Ṻ",Ŭ:"Ŭ",Ǔ:"Ǔ",Û:"Û",Ů:"Ů",Ű:"Ű",Ṽ:"Ṽ",Ẃ:"Ẃ",Ẁ:"Ẁ",Ẅ:"Ẅ",Ŵ:"Ŵ",Ẇ:"Ẇ",Ẍ:"Ẍ",Ẋ:"Ẋ",Ý:"Ý",Ỳ:"Ỳ",Ÿ:"Ÿ",Ỹ:"Ỹ",Ȳ:"Ȳ",Ŷ:"Ŷ",Ẏ:"Ẏ",Ź:"Ź",Ž:"Ž",Ẑ:"Ẑ",Ż:"Ż",ά:"ά",ὰ:"ὰ",ᾱ:"ᾱ",ᾰ:"ᾰ",έ:"έ",ὲ:"ὲ",ή:"ή",ὴ:"ὴ",ί:"ί",ὶ:"ὶ",ϊ:"ϊ",ΐ:"ΐ",ῒ:"ῒ",ῑ:"ῑ",ῐ:"ῐ",ό:"ό",ὸ:"ὸ",ύ:"ύ",ὺ:"ὺ",ϋ:"ϋ",ΰ:"ΰ",ῢ:"ῢ",ῡ:"ῡ",ῠ:"ῠ",ώ:"ώ",ὼ:"ὼ",Ύ:"Ύ",Ὺ:"Ὺ",Ϋ:"Ϋ",Ῡ:"Ῡ",Ῠ:"Ῠ",Ώ:"Ώ",Ὼ:"Ὼ"};class He{constructor(e,t){this.mode=void 0,this.gullet=void 0,this.settings=void 0,this.leftrightDepth=void 0,this.nextToken=void 0,this.mode="math",this.gullet=new l4(e,t,this.mode),this.settings=t,this.leftrightDepth=0}expect(e,t){if(t===void 0&&(t=!0),this.fetch().text!==e)throw new M("Expected '"+e+"', got '"+this.fetch().text+"'",this.fetch());t&&this.consume()}consume(){this.nextToken=null}fetch(){return this.nextToken==null&&(this.nextToken=this.gullet.expandNextToken()),this.nextToken}switchMode(e){this.mode=e,this.gullet.switchMode(e)}parse(){this.settings.globalGroup||this.gullet.beginGroup(),this.settings.colorIsTextColor&&this.gullet.macros.set("\\color","\\textcolor");try{var e=this.parseExpression(!1);return this.expect("EOF"),this.settings.globalGroup||this.gullet.endGroup(),e}finally{this.gullet.endGroups()}}subparse(e){var t=this.nextToken;this.consume(),this.gullet.pushToken(new m0("}")),this.gullet.pushTokens(e);var a=this.parseExpression(!1);return this.expect("}"),this.nextToken=t,a}parseExpression(e,t){for(var a=[];;){this.mode==="math"&&this.consumeSpaces();var n=this.fetch();if(He.endOfExpression.indexOf(n.text)!==-1||t&&n.text===t||e&&L0[n.text]&&L0[n.text].infix)break;var s=this.parseAtom(t);if(s){if(s.type==="internal")continue}else break;a.push(s)}return this.mode==="text"&&this.formLigatures(a),this.handleInfixNodes(a)}handleInfixNodes(e){for(var t=-1,a,n=0;n=0&&this.settings.reportNonstrict("unicodeTextInMathMode",'Latin-1/Unicode text character "'+t[0]+'" used in math mode',e);var h=$[this.mode][t].group,c=u0.range(e),p;if(Za.hasOwnProperty(h)){var g=h;p={type:"atom",mode:this.mode,family:g,loc:c,text:t}}else p={type:h,mode:this.mode,loc:c,text:t};u=p}else if(t.charCodeAt(0)>=128)this.settings.strict&&(gr(t.charCodeAt(0))?this.mode==="math"&&this.settings.reportNonstrict("unicodeTextInMathMode",'Unicode text character "'+t[0]+'" used in math mode',e):this.settings.reportNonstrict("unknownSymbol",'Unrecognized Unicode character "'+t[0]+'"'+(" ("+t.charCodeAt(0)+")"),e)),u={type:"textord",mode:"text",loc:u0.range(e),text:t};else return null;if(this.consume(),s)for(var y=0;y2?n[2]:void 0;for(i&&S(n[0],n[1],i)&&(t=1);++r-1?i[o?n[a]:a]:void 0}}var On=Math.max;function Nn(e,n,r){var t=e==null?0:e.length;if(!t)return-1;var i=r==null?0:wn(r);return i<0&&(i=On(t+i,0)),$e(e,C(n),i)}var U=kn(Nn);function Ln(e,n){return e==null?e:en(e,ve(n),ye)}function Pn(e,n){return e&&pe(e,ve(n))}function _n(e,n){return e>n}var Cn=Object.prototype,In=Cn.hasOwnProperty;function Rn(e,n){return e!=null&&In.call(e,n)}function Ne(e,n){return e!=null&&De(e,n,Rn)}function j(e,n){var r={};return n=C(n),pe(e,function(t,i,o){nn(r,i,n(t,i,o))}),r}function y(e){return e&&e.length?me(e,xe,_n):void 0}function Z(e,n){return e&&e.length?me(e,C(n),He):void 0}function Tn(e,n,r,t){if(!M(e))return e;n=we(n,e);for(var i=-1,o=n.length,a=o-1,u=e;u!=null&&++in||o&&a&&d&&!u&&!s||t&&a&&d||!r&&d||!i)return 1;if(!t&&!o&&!s&&e=u)return d;var s=r[t];return d*(s=="desc"?-1:1)}}return e.index-n.index}function Bn(e,n,r){n.length?n=V(n,function(o){return ke(o)?function(a){return be(a,o.length===1?o[0]:o)}:o}):n=[xe];var t=-1;n=V(n,tn(C));var i=Ue(e,function(o,a,u){var d=V(n,function(s){return s(o)});return{criteria:d,index:++t,value:o}});return Sn(i,function(o,a){return An(o,a,r)})}function jn(e,n){return Mn(e,n,function(r,t){return We(e,t)})}var A=bn(function(e,n){return e==null?{}:jn(e,n)}),Gn=Math.ceil,Vn=Math.max;function Yn(e,n,r,t){for(var i=-1,o=Vn(Gn((n-e)/(r||1)),0),a=Array(o);o--;)a[++i]=e,e+=r;return a}function $n(e){return function(n,r,t){return t&&typeof t!="number"&&S(n,r,t)&&(r=t=void 0),n=T(n),r===void 0?(r=n,n=0):r=T(r),t=t===void 0?n1&&S(e,n[0],n[1])?n=[]:r>2&&S(n[0],n[1],n[2])&&(n=[n[0]]),Bn(e,Xe(n),[])}),Dn=0;function J(e){var n=++Dn;return ze(e)+n}function qn(e,n,r){for(var t=-1,i=e.length,o=n.length,a={};++t0;--u)if(a=n[u].dequeue(),a){t=t.concat(Y(e,n,r,a,!0));break}}}return t}function Y(e,n,r,t,i){var o=i?[]:void 0;return f(e.inEdges(t.v),function(a){var u=e.edge(a),d=e.node(a.v);i&&o.push({v:a.v,w:a.w}),d.out-=u,H(n,r,d)}),f(e.outEdges(t.v),function(a){var u=e.edge(a),d=a.w,s=e.node(d);s.in-=u,H(n,r,s)}),e.removeNode(t.v),o}function Jn(e,n){var r=new g,t=0,i=0;f(e.nodes(),function(u){r.setNode(u,{v:u,in:0,out:0})}),f(e.edges(),function(u){var d=r.edge(u.v,u.w)||0,s=n(u),c=d+s;r.setEdge(u.v,u.w,c),i=Math.max(i,r.node(u.v).out+=s),t=Math.max(t,r.node(u.w).in+=s)});var o=k(i+t+3).map(function(){return new Xn}),a=t+1;return f(r.nodes(),function(u){H(o,a,r.node(u))}),{graph:r,buckets:o,zeroIdx:a}}function H(e,n,r){r.out?r.in?e[r.out-r.in+n].enqueue(r):e[e.length-1].enqueue(r):e[0].enqueue(r)}function Kn(e){var n=e.graph().acyclicer==="greedy"?Un(e,r(e)):Qn(e);f(n,function(t){var i=e.edge(t);e.removeEdge(t),i.forwardName=t.name,i.reversed=!0,e.setEdge(t.w,t.v,i,J("rev"))});function r(t){return function(i){return t.edge(i).weight}}}function Qn(e){var n=[],r={},t={};function i(o){Object.prototype.hasOwnProperty.call(t,o)||(t[o]=!0,r[o]=!0,f(e.outEdges(o),function(a){Object.prototype.hasOwnProperty.call(r,a.w)?n.push(a):i(a.w)}),delete r[o])}return f(e.nodes(),i),n}function er(e){f(e.edges(),function(n){var r=e.edge(n);if(r.reversed){e.removeEdge(n);var t=r.forwardName;delete r.reversed,delete r.forwardName,e.setEdge(n.w,n.v,r,t)}})}function N(e,n,r,t){var i;do i=J(t);while(e.hasNode(i));return r.dummy=n,e.setNode(i,r),i}function nr(e){var n=new g().setGraph(e.graph());return f(e.nodes(),function(r){n.setNode(r,e.node(r))}),f(e.edges(),function(r){var t=n.edge(r.v,r.w)||{weight:0,minlen:1},i=e.edge(r);n.setEdge(r.v,r.w,{weight:t.weight+i.weight,minlen:Math.max(t.minlen,i.minlen)})}),n}function Le(e){var n=new g({multigraph:e.isMultigraph()}).setGraph(e.graph());return f(e.nodes(),function(r){e.children(r).length||n.setNode(r,e.node(r))}),f(e.edges(),function(r){n.setEdge(r,e.edge(r))}),n}function ae(e,n){var r=e.x,t=e.y,i=n.x-r,o=n.y-t,a=e.width/2,u=e.height/2;if(!i&&!o)throw new Error("Not possible to find intersection inside of the rectangle");var d,s;return Math.abs(o)*a>Math.abs(i)*u?(o<0&&(u=-u),d=u*i/o,s=u):(i<0&&(a=-a),d=a,s=a*o/i),{x:r+d,y:t+s}}function G(e){var n=w(k(Pe(e)+1),function(){return[]});return f(e.nodes(),function(r){var t=e.node(r),i=t.rank;m(i)||(n[i][t.order]=r)}),n}function rr(e){var n=P(w(e.nodes(),function(r){return e.node(r).rank}));f(e.nodes(),function(r){var t=e.node(r);Ne(t,"rank")&&(t.rank-=n)})}function tr(e){var n=P(w(e.nodes(),function(o){return e.node(o).rank})),r=[];f(e.nodes(),function(o){var a=e.node(o).rank-n;r[a]||(r[a]=[]),r[a].push(o)});var t=0,i=e.graph().nodeRankFactor;f(r,function(o,a){m(o)&&a%i!==0?--t:t&&f(o,function(u){e.node(u).rank+=t})})}function oe(e,n,r,t){var i={width:0,height:0};return arguments.length>=4&&(i.rank=r,i.order=t),N(e,"border",i,n)}function Pe(e){return y(w(e.nodes(),function(n){var r=e.node(n).rank;if(!m(r))return r}))}function ir(e,n){var r={lhs:[],rhs:[]};return f(e,function(t){n(t)?r.lhs.push(t):r.rhs.push(t)}),r}function ar(e,n){return n()}function or(e){function n(r){var t=e.children(r),i=e.node(r);if(t.length&&f(t,n),Object.prototype.hasOwnProperty.call(i,"minRank")){i.borderLeft=[],i.borderRight=[];for(var o=i.minRank,a=i.maxRank+1;oa.lim&&(u=a,d=!0);var s=I(n.edges(),function(c){return d===se(e,e.node(c.v),u)&&d!==se(e,e.node(c.w),u)});return Z(s,function(c){return _(n,c)})}function Ae(e,n,r,t){var i=r.v,o=r.w;e.removeEdge(i,o),e.setEdge(t.v,t.w,{}),ee(e),Q(e,n),xr(e,n)}function xr(e,n){var r=U(e.nodes(),function(i){return!n.node(i).parent}),t=gr(e,r);t=t.slice(1),f(t,function(i){var o=e.node(i).parent,a=n.edge(i,o),u=!1;a||(a=n.edge(o,i),u=!0),n.node(i).rank=n.node(o).rank+(u?a.minlen:-a.minlen)})}function Er(e,n,r){return e.hasEdge(n,r)}function se(e,n,r){return r.low<=n.lim&&n.lim<=r.lim}function kr(e){switch(e.graph().ranker){case"network-simplex":fe(e);break;case"tight-tree":Nr(e);break;case"longest-path":Or(e);break;default:fe(e)}}var Or=K;function Nr(e){K(e),Ce(e)}function fe(e){x(e)}function Lr(e){var n=N(e,"root",{},"_root"),r=Pr(e),t=y(E(r))-1,i=2*t+1;e.graph().nestingRoot=n,f(e.edges(),function(a){e.edge(a).minlen*=i});var o=_r(e)+1;f(e.children(),function(a){Be(e,n,i,o,t,r,a)}),e.graph().nodeRankFactor=i}function Be(e,n,r,t,i,o,a){var u=e.children(a);if(!u.length){a!==n&&e.setEdge(n,a,{weight:0,minlen:r});return}var d=oe(e,"_bt"),s=oe(e,"_bb"),c=e.node(a);e.setParent(d,a),c.borderTop=d,e.setParent(s,a),c.borderBottom=s,f(u,function(l){Be(e,n,r,t,i,o,l);var h=e.node(l),v=h.borderTop?h.borderTop:l,p=h.borderBottom?h.borderBottom:l,b=h.borderTop?t:2*t,L=v!==p?1:i-o[a]+1;e.setEdge(d,v,{weight:b,minlen:L,nestingEdge:!0}),e.setEdge(p,s,{weight:b,minlen:L,nestingEdge:!0})}),e.parent(a)||e.setEdge(n,d,{weight:0,minlen:i+o[a]})}function Pr(e){var n={};function r(t,i){var o=e.children(t);o&&o.length&&f(o,function(a){r(a,i+1)}),n[t]=i}return f(e.children(),function(t){r(t,1)}),n}function _r(e){return B(e.edges(),function(n,r){return n+e.edge(r).weight},0)}function Cr(e){var n=e.graph();e.removeNode(n.nestingRoot),delete n.nestingRoot,f(e.edges(),function(r){var t=e.edge(r);t.nestingEdge&&e.removeEdge(r)})}function Ir(e,n,r){var t={},i;f(r,function(o){for(var a=e.parent(o),u,d;a;){if(u=e.parent(a),u?(d=t[u],t[u]=a):(d=i,i=a),d&&d!==a){n.setEdge(d,a);return}a=u}})}function Rr(e,n,r){var t=Tr(e),i=new g({compound:!0}).setGraph({root:t}).setDefaultNodeLabel(function(o){return e.node(o)});return f(e.nodes(),function(o){var a=e.node(o),u=e.parent(o);(a.rank===n||a.minRank<=n&&n<=a.maxRank)&&(i.setNode(o),i.setParent(o,u||t),f(e[r](o),function(d){var s=d.v===o?d.w:d.v,c=i.edge(s,o),l=m(c)?0:c.weight;i.setEdge(s,o,{weight:e.edge(d).weight+l})}),Object.prototype.hasOwnProperty.call(a,"minRank")&&i.setNode(o,{borderLeft:a.borderLeft[n],borderRight:a.borderRight[n]}))}),i}function Tr(e){for(var n;e.hasNode(n=J("_root")););return n}function Mr(e,n){for(var r=0,t=1;t0;)c%2&&(l+=u[c+1]),c=c-1>>1,u[c]+=s.weight;d+=s.weight*l})),d}function Fr(e){var n={},r=I(e.nodes(),function(u){return!e.children(u).length}),t=y(w(r,function(u){return e.node(u).rank})),i=w(k(t+1),function(){return[]});function o(u){if(!Ne(n,u)){n[u]=!0;var d=e.node(u);i[d.rank].push(u),f(e.successors(u),o)}}var a=R(r,function(u){return e.node(u).rank});return f(a,o),i}function Ar(e,n){return w(n,function(r){var t=e.inEdges(r);if(t.length){var i=B(t,function(o,a){var u=e.edge(a),d=e.node(a.v);return{sum:o.sum+u.weight*d.order,weight:o.weight+u.weight}},{sum:0,weight:0});return{v:r,barycenter:i.sum/i.weight,weight:i.weight}}else return{v:r}})}function Br(e,n){var r={};f(e,function(i,o){var a=r[i.v]={indegree:0,in:[],out:[],vs:[i.v],i:o};m(i.barycenter)||(a.barycenter=i.barycenter,a.weight=i.weight)}),f(n.edges(),function(i){var o=r[i.v],a=r[i.w];!m(o)&&!m(a)&&(a.indegree++,o.out.push(r[i.w]))});var t=I(r,function(i){return!i.indegree});return jr(t)}function jr(e){var n=[];function r(o){return function(a){a.merged||(m(a.barycenter)||m(o.barycenter)||a.barycenter>=o.barycenter)&&Gr(o,a)}}function t(o){return function(a){a.in.push(o),--a.indegree===0&&e.push(a)}}for(;e.length;){var i=e.pop();n.push(i),f(i.in.reverse(),r(i)),f(i.out,t(i))}return w(I(n,function(o){return!o.merged}),function(o){return A(o,["vs","i","barycenter","weight"])})}function Gr(e,n){var r=0,t=0;e.weight&&(r+=e.barycenter*e.weight,t+=e.weight),n.weight&&(r+=n.barycenter*n.weight,t+=n.weight),e.vs=n.vs.concat(e.vs),e.barycenter=r/t,e.weight=t,e.i=Math.min(n.i,e.i),n.merged=!0}function Vr(e,n){var r=ir(e,function(c){return Object.prototype.hasOwnProperty.call(c,"barycenter")}),t=r.lhs,i=R(r.rhs,function(c){return-c.i}),o=[],a=0,u=0,d=0;t.sort(Yr(!!n)),d=ce(o,i,d),f(t,function(c){d+=c.vs.length,o.push(c.vs),a+=c.barycenter*c.weight,u+=c.weight,d=ce(o,i,d)});var s={vs:O(o)};return u&&(s.barycenter=a/u,s.weight=u),s}function ce(e,n,r){for(var t;n.length&&(t=F(n)).i<=r;)n.pop(),e.push(t.vs),r++;return r}function Yr(e){return function(n,r){return n.barycenterr.barycenter?1:e?r.i-n.i:n.i-r.i}}function je(e,n,r,t){var i=e.children(n),o=e.node(n),a=o?o.borderLeft:void 0,u=o?o.borderRight:void 0,d={};a&&(i=I(i,function(p){return p!==a&&p!==u}));var s=Ar(e,i);f(s,function(p){if(e.children(p.v).length){var b=je(e,p.v,r,t);d[p.v]=b,Object.prototype.hasOwnProperty.call(b,"barycenter")&&Dr(p,b)}});var c=Br(s,r);$r(c,d);var l=Vr(c,t);if(a&&(l.vs=O([a,l.vs,u]),e.predecessors(a).length)){var h=e.node(e.predecessors(a)[0]),v=e.node(e.predecessors(u)[0]);Object.prototype.hasOwnProperty.call(l,"barycenter")||(l.barycenter=0,l.weight=0),l.barycenter=(l.barycenter*l.weight+h.order+v.order)/(l.weight+2),l.weight+=2}return l}function $r(e,n){f(e,function(r){r.vs=O(r.vs.map(function(t){return n[t]?n[t].vs:t}))})}function Dr(e,n){m(e.barycenter)?(e.barycenter=n.barycenter,e.weight=n.weight):(e.barycenter=(e.barycenter*e.weight+n.barycenter*n.weight)/(e.weight+n.weight),e.weight+=n.weight)}function qr(e){var n=Pe(e),r=le(e,k(1,n+1),"inEdges"),t=le(e,k(n-1,-1,-1),"outEdges"),i=Fr(e);he(e,i);for(var o=Number.POSITIVE_INFINITY,a,u=0,d=0;d<4;++u,++d){Wr(u%2?r:t,u%4>=2),i=G(e);var s=Mr(e,i);sa||u>n[d].lim));for(s=d,d=t;(d=e.parent(d))!==s;)o.push(d);return{path:i.concat(o.reverse()),lca:s}}function Hr(e){var n={},r=0;function t(i){var o=r;f(e.children(i),t),n[i]={low:o,lim:r++}}return f(e.children(),t),n}function Ur(e,n){var r={};function t(i,o){var a=0,u=0,d=i.length,s=F(o);return f(o,function(c,l){var h=Jr(e,c),v=h?e.node(h).order:d;(h||c===s)&&(f(o.slice(u,l+1),function(p){f(e.predecessors(p),function(b){var L=e.node(b),ne=L.order;(nes)&&Ge(r,h,c)})})}function i(o,a){var u=-1,d,s=0;return f(a,function(c,l){if(e.node(c).dummy==="border"){var h=e.predecessors(c);h.length&&(d=e.node(h[0]).order,t(a,s,l,u,d),s=l,u=d)}t(a,s,a.length,d,o.length)}),a}return B(n,i),r}function Jr(e,n){if(e.node(n).dummy)return U(e.predecessors(n),function(r){return e.node(r).dummy})}function Ge(e,n,r){if(n>r){var t=n;n=r,r=t}Object.prototype.hasOwnProperty.call(e,n)||Object.defineProperty(e,n,{enumerable:!0,configurable:!0,value:{},writable:!0});var i=e[n];Object.defineProperty(i,r,{enumerable:!0,configurable:!0,value:!0,writable:!0})}function Kr(e,n,r){if(n>r){var t=n;n=r,r=t}return!!e[n]&&Object.prototype.hasOwnProperty.call(e[n],r)}function Qr(e,n,r,t){var i={},o={},a={};return f(n,function(u){f(u,function(d,s){i[d]=d,o[d]=d,a[d]=s})}),f(n,function(u){var d=-1;f(u,function(s){var c=t(s);if(c.length){c=R(c,function(b){return a[b]});for(var l=(c.length-1)/2,h=Math.floor(l),v=Math.ceil(l);h<=v;++h){var p=c[h];o[s]===s&&d{var t=r(" buildLayoutGraph",()=>yt(e));r(" runLayout",()=>ft(t,r)),r(" updateInputGraph",()=>ct(e,t))})}function ft(e,n){n(" makeSpaceForEdgeLabels",()=>xt(e)),n(" removeSelfEdges",()=>It(e)),n(" acyclic",()=>Kn(e)),n(" nestingGraph.run",()=>Lr(e)),n(" rank",()=>kr(Le(e))),n(" injectEdgeLabelProxies",()=>Et(e)),n(" removeEmptyRanks",()=>tr(e)),n(" nestingGraph.cleanup",()=>Cr(e)),n(" normalizeRanks",()=>rr(e)),n(" assignRankMinMax",()=>kt(e)),n(" removeEdgeLabelProxies",()=>Ot(e)),n(" normalize.run",()=>cr(e)),n(" parentDummyChains",()=>Xr(e)),n(" addBorderSegments",()=>or(e)),n(" order",()=>qr(e)),n(" insertSelfEdges",()=>Rt(e)),n(" adjustCoordinateSystem",()=>ur(e)),n(" position",()=>dt(e)),n(" positionSelfEdges",()=>Tt(e)),n(" removeBorderNodes",()=>Ct(e)),n(" normalize.undo",()=>hr(e)),n(" fixupEdgeLabelCoords",()=>Pt(e)),n(" undoCoordinateSystem",()=>dr(e)),n(" translateGraph",()=>Nt(e)),n(" assignNodeIntersects",()=>Lt(e)),n(" reversePoints",()=>_t(e)),n(" acyclic.undo",()=>er(e))}function ct(e,n){f(e.nodes(),function(r){var t=e.node(r),i=n.node(r);t&&(t.x=i.x,t.y=i.y,n.children(r).length&&(t.width=i.width,t.height=i.height))}),f(e.edges(),function(r){var t=e.edge(r),i=n.edge(r);t.points=i.points,Object.prototype.hasOwnProperty.call(i,"x")&&(t.x=i.x,t.y=i.y)}),e.graph().width=n.graph().width,e.graph().height=n.graph().height}var lt=["nodesep","edgesep","ranksep","marginx","marginy"],ht={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},vt=["acyclicer","ranker","rankdir","align"],pt=["width","height"],wt={width:0,height:0},bt=["minlen","weight","width","height","labeloffset"],mt={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},gt=["labelpos"];function yt(e){var n=new g({multigraph:!0,compound:!0}),r=W(e.graph());return n.setGraph(z({},ht,q(r,lt),A(r,vt))),f(e.nodes(),function(t){var i=W(e.node(t));n.setNode(t,En(q(i,pt),wt)),n.setParent(t,e.parent(t))}),f(e.edges(),function(t){var i=W(e.edge(t));n.setEdge(t,z({},mt,q(i,bt),A(i,gt)))}),n}function xt(e){var n=e.graph();n.ranksep/=2,f(e.edges(),function(r){var t=e.edge(r);t.minlen*=2,t.labelpos.toLowerCase()!=="c"&&(n.rankdir==="TB"||n.rankdir==="BT"?t.width+=t.labeloffset:t.height+=t.labeloffset)})}function Et(e){f(e.edges(),function(n){var r=e.edge(n);if(r.width&&r.height){var t=e.node(n.v),i=e.node(n.w),o={rank:(i.rank-t.rank)/2+t.rank,e:n};N(e,"edge-proxy",o,"_ep")}})}function kt(e){var n=0;f(e.nodes(),function(r){var t=e.node(r);t.borderTop&&(t.minRank=e.node(t.borderTop).rank,t.maxRank=e.node(t.borderBottom).rank,n=y(n,t.maxRank))}),e.graph().maxRank=n}function Ot(e){f(e.nodes(),function(n){var r=e.node(n);r.dummy==="edge-proxy"&&(e.edge(r.e).labelRank=r.rank,e.removeNode(n))})}function Nt(e){var n=Number.POSITIVE_INFINITY,r=0,t=Number.POSITIVE_INFINITY,i=0,o=e.graph(),a=o.marginx||0,u=o.marginy||0;function d(s){var c=s.x,l=s.y,h=s.width,v=s.height;n=Math.min(n,c-h/2),r=Math.max(r,c+h/2),t=Math.min(t,l-v/2),i=Math.max(i,l+v/2)}f(e.nodes(),function(s){d(e.node(s))}),f(e.edges(),function(s){var c=e.edge(s);Object.prototype.hasOwnProperty.call(c,"x")&&d(c)}),n-=a,t-=u,f(e.nodes(),function(s){var c=e.node(s);c.x-=n,c.y-=t}),f(e.edges(),function(s){var c=e.edge(s);f(c.points,function(l){l.x-=n,l.y-=t}),Object.prototype.hasOwnProperty.call(c,"x")&&(c.x-=n),Object.prototype.hasOwnProperty.call(c,"y")&&(c.y-=t)}),o.width=r-n+a,o.height=i-t+u}function Lt(e){f(e.edges(),function(n){var r=e.edge(n),t=e.node(n.v),i=e.node(n.w),o,a;r.points?(o=r.points[0],a=r.points[r.points.length-1]):(r.points=[],o=i,a=t),r.points.unshift(ae(t,o)),r.points.push(ae(i,a))})}function Pt(e){f(e.edges(),function(n){var r=e.edge(n);if(Object.prototype.hasOwnProperty.call(r,"x"))switch((r.labelpos==="l"||r.labelpos==="r")&&(r.width-=r.labeloffset),r.labelpos){case"l":r.x-=r.width/2+r.labeloffset;break;case"r":r.x+=r.width/2+r.labeloffset;break}})}function _t(e){f(e.edges(),function(n){var r=e.edge(n);r.reversed&&r.points.reverse()})}function Ct(e){f(e.nodes(),function(n){if(e.children(n).length){var r=e.node(n),t=e.node(r.borderTop),i=e.node(r.borderBottom),o=e.node(F(r.borderLeft)),a=e.node(F(r.borderRight));r.width=Math.abs(a.x-o.x),r.height=Math.abs(i.y-t.y),r.x=o.x+r.width/2,r.y=t.y+r.height/2}}),f(e.nodes(),function(n){e.node(n).dummy==="border"&&e.removeNode(n)})}function It(e){f(e.edges(),function(n){if(n.v===n.w){var r=e.node(n.v);r.selfEdges||(r.selfEdges=[]),r.selfEdges.push({e:n,label:e.edge(n)}),e.removeEdge(n)}})}function Rt(e){var n=G(e);f(n,function(r){var t=0;f(r,function(i,o){var a=e.node(i);a.order=o+t,f(a.selfEdges,function(u){N(e,"selfedge",{width:u.label.width,height:u.label.height,rank:a.rank,order:o+ ++t,e:u.e,label:u.label},"_se")}),delete a.selfEdges})})}function Tt(e){f(e.nodes(),function(n){var r=e.node(n);if(r.dummy==="selfedge"){var t=e.node(r.e.v),i=t.x+t.width/2,o=t.y,a=r.x-i,u=t.height/2;e.setEdge(r.e,r.label),e.removeNode(n),r.label.points=[{x:i+2*a/3,y:o-u},{x:i+5*a/6,y:o-u},{x:i+a,y:o},{x:i+5*a/6,y:o+u},{x:i+2*a/3,y:o+u}],r.label.x=r.x,r.label.y=r.y}})}function q(e,n){return j(A(e,n),Number)}function W(e){var n={};return f(e,function(r,t){n[t.toLowerCase()]=r}),n}export{Bt as l}; diff --git a/_astro/linear.B94hpPI-.js b/_astro/linear.B94hpPI-.js new file mode 100644 index 00000000..fb05ad7a --- /dev/null +++ b/_astro/linear.B94hpPI-.js @@ -0,0 +1 @@ +import{aK as j,aL as p,aM as w,aN as q,aO as k}from"./mermaid.core.LbQlJBBQ.js";import{i as D}from"./init.Gi6I4Gst.js";import{e as M,f as F,a as z,b as B}from"./defaultLocale.C4B-KCzX.js";function g(n,r){return n==null||r==null?NaN:nr?1:n>=r?0:NaN}function I(n,r){return n==null||r==null?NaN:rn?1:r>=n?0:NaN}function R(n){let r,t,e;n.length!==2?(r=g,t=(o,c)=>g(n(o),c),e=(o,c)=>n(o)-c):(r=n===g||n===I?n:O,t=n,e=n);function u(o,c,i=0,h=o.length){if(i>>1;t(o[l],c)<0?i=l+1:h=l}while(i>>1;t(o[l],c)<=0?i=l+1:h=l}while(ii&&e(o[l-1],c)>-e(o[l],c)?l-1:l}return{left:u,center:a,right:f}}function O(){return 0}function P(n){return n===null?NaN:+n}const V=R(g),$=V.right;R(P).center;const x=Math.sqrt(50),K=Math.sqrt(10),L=Math.sqrt(2);function v(n,r,t){const e=(r-n)/Math.max(0,t),u=Math.floor(Math.log10(e)),f=e/Math.pow(10,u),a=f>=x?10:f>=K?5:f>=L?2:1;let o,c,i;return u<0?(i=Math.pow(10,-u)/a,o=Math.round(n*i),c=Math.round(r*i),o/ir&&--c,i=-i):(i=Math.pow(10,u)*a,o=Math.round(n/i),c=Math.round(r/i),o*ir&&--c),c0))return[];if(n===r)return[n];const e=r=u))return[];const o=f-u+1,c=new Array(o);if(e)if(a<0)for(let i=0;ir&&(t=n,n=r,r=t),function(e){return Math.max(n,Math.min(r,e))}}function nn(n,r,t){var e=n[0],u=n[1],f=r[0],a=r[1];return u2?rn:nn,c=i=null,l}function l(s){return s==null||isNaN(s=+s)?f:(c||(c=o(n.map(e),r,t)))(e(a(s)))}return l.invert=function(s){return a(u((i||(i=o(r,n.map(e),p)))(s)))},l.domain=function(s){return arguments.length?(n=Array.from(s,_),h()):n.slice()},l.range=function(s){return arguments.length?(r=Array.from(s),h()):r.slice()},l.rangeRound=function(s){return r=Array.from(s),t=U,h()},l.clamp=function(s){return arguments.length?(a=s?!0:m,h()):a!==m},l.interpolate=function(s){return arguments.length?(t=s,h()):t},l.unknown=function(s){return arguments.length?(f=s,l):f},function(s,S){return e=s,u=S,h()}}function un(){return tn()(m,m)}function an(n,r,t,e){var u=C(n,r,t),f;switch(e=F(e??",f"),e.type){case"s":{var a=Math.max(Math.abs(n),Math.abs(r));return e.precision==null&&!isNaN(f=X(u,a))&&(e.precision=f),z(e,a)}case"":case"e":case"g":case"p":case"r":{e.precision==null&&!isNaN(f=Y(u,Math.max(Math.abs(n),Math.abs(r))))&&(e.precision=f-(e.type==="e"));break}case"f":case"%":{e.precision==null&&!isNaN(f=W(u))&&(e.precision=f-(e.type==="%")*2);break}}return B(e)}function on(n){var r=n.domain;return n.ticks=function(t){var e=r();return T(e[0],e[e.length-1],t??10)},n.tickFormat=function(t,e){var u=r();return an(u[0],u[u.length-1],t??10,e)},n.nice=function(t){t==null&&(t=10);var e=r(),u=0,f=e.length-1,a=e[u],o=e[f],c,i,h=10;for(o0;){if(i=y(a,o,t),i===c)return e[u]=a,e[f]=o,r(e);if(i>0)a=Math.floor(a/i)*i,o=Math.ceil(o/i)*i;else if(i<0)a=Math.ceil(a*i)/i,o=Math.floor(o*i)/i;else break;c=i}return n},n}function fn(){var n=un();return n.copy=function(){return en(n,fn())},D.apply(n,arguments),on(n)}export{en as a,R as b,un as c,fn as l,C as t}; diff --git a/_astro/mermaid.core.LbQlJBBQ.js b/_astro/mermaid.core.LbQlJBBQ.js new file mode 100644 index 00000000..0cc564aa --- /dev/null +++ b/_astro/mermaid.core.LbQlJBBQ.js @@ -0,0 +1,256 @@ +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["_astro/dagre-6UL2VRFP.u7dJjEIW.js","_astro/graph.wNZOIPAH.js","_astro/_baseUniq.CLojSEzq.js","_astro/layout.DwDnTkfW.js","_astro/min.D5TVP8RA.js","_astro/clone.DKHdMD-Z.js","_astro/page._rMDHl_T.js","_astro/cose-bilkent-S5V4N54A.XbIyOKxw.js","_astro/cytoscape.esm.DtBltrT8.js","_astro/c4Diagram-YG6GDRKO.Dnzr4dCc.js","_astro/chunk-TZMSLE5B.t1iciHUx.js","_astro/flowDiagram-NV44I4VS.PKUPp6Gy.js","_astro/chunk-FMBD7UC4.Tjciooq0.js","_astro/chunk-55IACEB6.b7ueBidu.js","_astro/chunk-QN33PNHL.BI3h-IJf.js","_astro/channel.y7_wL4g7.js","_astro/erDiagram-Q2GNP2WA.mcAILrwl.js","_astro/gitGraphDiagram-NY62KEGX.DrvSVcW5.js","_astro/chunk-4BX2VUAB.CV908Kae.js","_astro/chunk-QZHKN3VN.B7dpA8ra.js","_astro/treemap-KMMF4GRG.BHoxrBMR.js","_astro/ganttDiagram-JELNMOA3.DeRSi4dw.js","_astro/linear.B94hpPI-.js","_astro/init.Gi6I4Gst.js","_astro/defaultLocale.C4B-KCzX.js","_astro/infoDiagram-WHAUD3N6.DII4lMba.js","_astro/pieDiagram-ADFJNKIX.DGAq4_qk.js","_astro/arc.DI4loXX0.js","_astro/ordinal.BYWQX77i.js","_astro/quadrantDiagram-AYHSOK5B.C9eleybL.js","_astro/xychartDiagram-PRI3JC2R.Cow3WGXm.js","_astro/requirementDiagram-UZGBJVZJ.Yoxak5pj.js","_astro/sequenceDiagram-WL72ISMW.DjG2Q87q.js","_astro/classDiagram-2ON5EDUG.ChOIO5pY.js","_astro/chunk-B4BG7PRW.B0Ch1pGH.js","_astro/classDiagram-v2-WZHVMYZB.ChOIO5pY.js","_astro/stateDiagram-FKZM4ZOC.B-V3SeMq.js","_astro/chunk-DI55MBZ5.DiMe6WwJ.js","_astro/stateDiagram-v2-4FDKWEC3.DqTJjzBS.js","_astro/journeyDiagram-XKPGCS4Q.DFKcAErE.js","_astro/timeline-definition-IT6M3QCI.-Sq8Di49.js","_astro/mindmap-definition-VGOIOE7T.CAV3lRvW.js","_astro/kanban-definition-3W4ZIXB7.Dgxll3cG.js","_astro/sankeyDiagram-TZEHDZUN.C-hlWUgz.js","_astro/diagram-S2PKOQOG.Cn_-o7eu.js","_astro/diagram-QEK2KX5R.rXmDqRow.js","_astro/blockDiagram-VD42YOAC.BtxH3WKO.js","_astro/architectureDiagram-VXUJARFQ.DZJJY8Mz.js","_astro/diagram-PSM6KHXK.0TbXjUWG.js"])))=>i.map(i=>d[i]); +import{_ as pt}from"./page._rMDHl_T.js";var Dl={name:"mermaid",version:"11.12.2",description:"Markdown-ish syntax for generating flowcharts, mindmaps, sequence diagrams, class diagrams, gantt charts, git graphs and more.",type:"module",module:"./dist/mermaid.core.mjs",types:"./dist/mermaid.d.ts",exports:{".":{types:"./dist/mermaid.d.ts",import:"./dist/mermaid.core.mjs",default:"./dist/mermaid.core.mjs"},"./*":"./*"},keywords:["diagram","markdown","flowchart","sequence diagram","gantt","class diagram","git graph","mindmap","packet diagram","c4 diagram","er diagram","pie chart","pie diagram","quadrant chart","requirement diagram","graph"],scripts:{clean:"rimraf dist",dev:"pnpm -w dev","docs:code":"typedoc src/defaultConfig.ts src/config.ts src/mermaid.ts && prettier --write ./src/docs/config/setup","docs:build":"rimraf ../../docs && pnpm docs:code && pnpm docs:spellcheck && tsx scripts/docs.cli.mts","docs:verify":"pnpm docs:code && pnpm docs:spellcheck && tsx scripts/docs.cli.mts --verify","docs:pre:vitepress":"pnpm --filter ./src/docs prefetch && rimraf src/vitepress && pnpm docs:code && tsx scripts/docs.cli.mts --vitepress && pnpm --filter ./src/vitepress install --no-frozen-lockfile --ignore-scripts","docs:build:vitepress":"pnpm docs:pre:vitepress && (cd src/vitepress && pnpm run build) && cpy --flat src/docs/landing/ ./src/vitepress/.vitepress/dist/landing","docs:dev":'pnpm docs:pre:vitepress && concurrently "pnpm --filter ./src/vitepress dev" "tsx scripts/docs.cli.mts --watch --vitepress"',"docs:dev:docker":'pnpm docs:pre:vitepress && concurrently "pnpm --filter ./src/vitepress dev:docker" "tsx scripts/docs.cli.mts --watch --vitepress"',"docs:serve":"pnpm docs:build:vitepress && vitepress serve src/vitepress","docs:spellcheck":'cspell "src/docs/**/*.md"',"docs:release-version":"tsx scripts/update-release-version.mts","docs:verify-version":"tsx scripts/update-release-version.mts --verify","types:build-config":"tsx scripts/create-types-from-json-schema.mts","types:verify-config":"tsx scripts/create-types-from-json-schema.mts --verify",checkCircle:"npx madge --circular ./src",prepublishOnly:"pnpm docs:verify-version"},repository:{type:"git",url:"https://github.com/mermaid-js/mermaid"},author:"Knut Sveidqvist",license:"MIT",standard:{ignore:["**/parser/*.js","dist/**/*.js","cypress/**/*.js"],globals:["page"]},dependencies:{"@braintree/sanitize-url":"^7.1.1","@iconify/utils":"^3.0.1","@mermaid-js/parser":"workspace:^","@types/d3":"^7.4.3",cytoscape:"^3.29.3","cytoscape-cose-bilkent":"^4.1.0","cytoscape-fcose":"^2.2.0",d3:"^7.9.0","d3-sankey":"^0.12.3","dagre-d3-es":"7.0.13",dayjs:"^1.11.18",dompurify:"^3.2.5",katex:"^0.16.22",khroma:"^2.1.0","lodash-es":"^4.17.21",marked:"^16.2.1",roughjs:"^4.6.6",stylis:"^4.3.6","ts-dedent":"^2.2.0",uuid:"^11.1.0"},devDependencies:{"@adobe/jsonschema2md":"^8.0.5","@iconify/types":"^2.0.0","@types/cytoscape":"^3.21.9","@types/cytoscape-fcose":"^2.2.4","@types/d3-sankey":"^0.12.4","@types/d3-scale":"^4.0.9","@types/d3-scale-chromatic":"^3.1.0","@types/d3-selection":"^3.0.11","@types/d3-shape":"^3.1.7","@types/jsdom":"^21.1.7","@types/katex":"^0.16.7","@types/lodash-es":"^4.17.12","@types/micromatch":"^4.0.9","@types/stylis":"^4.2.7","@types/uuid":"^10.0.0",ajv:"^8.17.1",canvas:"^3.1.2",chokidar:"3.6.0",concurrently:"^9.1.2","csstree-validator":"^4.0.1",globby:"^14.1.0",jison:"^0.4.18","js-base64":"^3.7.8",jsdom:"^26.1.0","json-schema-to-typescript":"^15.0.4",micromatch:"^4.0.8","path-browserify":"^1.0.1",prettier:"^3.5.3",remark:"^15.0.1","remark-frontmatter":"^5.0.0","remark-gfm":"^4.0.1",rimraf:"^6.0.1","start-server-and-test":"^2.0.13","type-fest":"^4.35.0",typedoc:"^0.28.12","typedoc-plugin-markdown":"^4.8.1",typescript:"~5.7.3","unist-util-flatmap":"^1.0.0","unist-util-visit":"^5.0.0",vitepress:"^1.6.4","vitepress-plugin-search":"1.0.4-alpha.22"},files:["dist/","README.md"],publishConfig:{access:"public"}};function jm(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var pn={exports:{}},Ym=pn.exports,Ol;function Um(){return Ol||(Ol=1,(function(e,t){(function(r,i){e.exports=i()})(Ym,(function(){var r=1e3,i=6e4,n=36e5,a="millisecond",s="second",o="minute",l="hour",c="day",h="week",u="month",f="quarter",d="year",g="date",m="Invalid Date",y=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,x=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,b={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(A){var B=["th","st","nd","rd"],T=A%100;return"["+A+(B[(T-20)%10]||B[T]||B[0])+"]"}},_=function(A,B,T){var $=String(A);return!$||$.length>=B?A:""+Array(B+1-$.length).join(T)+A},k={s:_,z:function(A){var B=-A.utcOffset(),T=Math.abs(B),$=Math.floor(T/60),M=T%60;return(B<=0?"+":"-")+_($,2,"0")+":"+_(M,2,"0")},m:function A(B,T){if(B.date()1)return A(V[0])}else{var K=B.name;L[K]=B,M=K}return!$&&M&&(w=M),M||!$&&w},O=function(A,B){if(D(A))return A.clone();var T=typeof B=="object"?B:{};return T.date=A,T.args=arguments,new N(T)},E=k;E.l=I,E.i=D,E.w=function(A,B){return O(A,{locale:B.$L,utc:B.$u,x:B.$x,$offset:B.$offset})};var N=(function(){function A(T){this.$L=I(T.locale,null,!0),this.parse(T),this.$x=this.$x||T.x||{},this[S]=!0}var B=A.prototype;return B.parse=function(T){this.$d=(function($){var M=$.date,q=$.utc;if(M===null)return new Date(NaN);if(E.u(M))return new Date;if(M instanceof Date)return new Date(M);if(typeof M=="string"&&!/Z$/i.test(M)){var V=M.match(y);if(V){var K=V[2]-1||0,J=(V[7]||"0").substring(0,3);return q?new Date(Date.UTC(V[1],K,V[3]||1,V[4]||0,V[5]||0,V[6]||0,J)):new Date(V[1],K,V[3]||1,V[4]||0,V[5]||0,V[6]||0,J)}}return new Date(M)})(T),this.init()},B.init=function(){var T=this.$d;this.$y=T.getFullYear(),this.$M=T.getMonth(),this.$D=T.getDate(),this.$W=T.getDay(),this.$H=T.getHours(),this.$m=T.getMinutes(),this.$s=T.getSeconds(),this.$ms=T.getMilliseconds()},B.$utils=function(){return E},B.isValid=function(){return this.$d.toString()!==m},B.isSame=function(T,$){var M=O(T);return this.startOf($)<=M&&M<=this.endOf($)},B.isAfter=function(T,$){return O(T)mh(e,"name",{value:t,configurable:!0}),Xm=(e,t)=>{for(var r in t)mh(e,r,{get:t[r],enumerable:!0})},Be={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},F={trace:p((...e)=>{},"trace"),debug:p((...e)=>{},"debug"),info:p((...e)=>{},"info"),warn:p((...e)=>{},"warn"),error:p((...e)=>{},"error"),fatal:p((...e)=>{},"fatal")},go=p(function(e="fatal"){let t=Be.fatal;typeof e=="string"?e.toLowerCase()in Be&&(t=Be[e]):typeof e=="number"&&(t=e),F.trace=()=>{},F.debug=()=>{},F.info=()=>{},F.warn=()=>{},F.error=()=>{},F.fatal=()=>{},t<=Be.fatal&&(F.fatal=console.error?console.error.bind(console,Jt("FATAL"),"color: orange"):console.log.bind(console,"\x1B[35m",Jt("FATAL"))),t<=Be.error&&(F.error=console.error?console.error.bind(console,Jt("ERROR"),"color: orange"):console.log.bind(console,"\x1B[31m",Jt("ERROR"))),t<=Be.warn&&(F.warn=console.warn?console.warn.bind(console,Jt("WARN"),"color: orange"):console.log.bind(console,"\x1B[33m",Jt("WARN"))),t<=Be.info&&(F.info=console.info?console.info.bind(console,Jt("INFO"),"color: lightblue"):console.log.bind(console,"\x1B[34m",Jt("INFO"))),t<=Be.debug&&(F.debug=console.debug?console.debug.bind(console,Jt("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",Jt("DEBUG"))),t<=Be.trace&&(F.trace=console.debug?console.debug.bind(console,Jt("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",Jt("TRACE")))},"setLogLevel"),Jt=p(e=>`%c${Vm().format("ss.SSS")} : ${e} : `,"format");const gn={min:{r:0,g:0,b:0,s:0,l:0,a:0},max:{r:255,g:255,b:255,h:360,s:100,l:100,a:1},clamp:{r:e=>e>=255?255:e<0?0:e,g:e=>e>=255?255:e<0?0:e,b:e=>e>=255?255:e<0?0:e,h:e=>e%360,s:e=>e>=100?100:e<0?0:e,l:e=>e>=100?100:e<0?0:e,a:e=>e>=1?1:e<0?0:e},toLinear:e=>{const t=e/255;return e>.03928?Math.pow((t+.055)/1.055,2.4):t/12.92},hue2rgb:(e,t,r)=>(r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+(t-e)*6*r:r<1/2?t:r<2/3?e+(t-e)*(2/3-r)*6:e),hsl2rgb:({h:e,s:t,l:r},i)=>{if(!t)return r*2.55;e/=360,t/=100,r/=100;const n=r<.5?r*(1+t):r+t-r*t,a=2*r-n;switch(i){case"r":return gn.hue2rgb(a,n,e+1/3)*255;case"g":return gn.hue2rgb(a,n,e)*255;case"b":return gn.hue2rgb(a,n,e-1/3)*255}},rgb2hsl:({r:e,g:t,b:r},i)=>{e/=255,t/=255,r/=255;const n=Math.max(e,t,r),a=Math.min(e,t,r),s=(n+a)/2;if(i==="l")return s*100;if(n===a)return 0;const o=n-a,l=s>.5?o/(2-n-a):o/(n+a);if(i==="s")return l*100;switch(n){case e:return((t-r)/o+(tt>r?Math.min(t,Math.max(r,e)):Math.min(r,Math.max(t,e)),round:e=>Math.round(e*1e10)/1e10},Km={dec2hex:e=>{const t=Math.round(e).toString(16);return t.length>1?t:`0${t}`}},st={channel:gn,lang:Zm,unit:Km},ze={};for(let e=0;e<=255;e++)ze[e]=st.unit.dec2hex(e);const Ft={ALL:0,RGB:1,HSL:2};class Qm{constructor(){this.type=Ft.ALL}get(){return this.type}set(t){if(this.type&&this.type!==t)throw new Error("Cannot change both RGB and HSL channels at the same time");this.type=t}reset(){this.type=Ft.ALL}is(t){return this.type===t}}class Jm{constructor(t,r){this.color=r,this.changed=!1,this.data=t,this.type=new Qm}set(t,r){return this.color=r,this.changed=!1,this.data=t,this.type.type=Ft.ALL,this}_ensureHSL(){const t=this.data,{h:r,s:i,l:n}=t;r===void 0&&(t.h=st.channel.rgb2hsl(t,"h")),i===void 0&&(t.s=st.channel.rgb2hsl(t,"s")),n===void 0&&(t.l=st.channel.rgb2hsl(t,"l"))}_ensureRGB(){const t=this.data,{r,g:i,b:n}=t;r===void 0&&(t.r=st.channel.hsl2rgb(t,"r")),i===void 0&&(t.g=st.channel.hsl2rgb(t,"g")),n===void 0&&(t.b=st.channel.hsl2rgb(t,"b"))}get r(){const t=this.data,r=t.r;return!this.type.is(Ft.HSL)&&r!==void 0?r:(this._ensureHSL(),st.channel.hsl2rgb(t,"r"))}get g(){const t=this.data,r=t.g;return!this.type.is(Ft.HSL)&&r!==void 0?r:(this._ensureHSL(),st.channel.hsl2rgb(t,"g"))}get b(){const t=this.data,r=t.b;return!this.type.is(Ft.HSL)&&r!==void 0?r:(this._ensureHSL(),st.channel.hsl2rgb(t,"b"))}get h(){const t=this.data,r=t.h;return!this.type.is(Ft.RGB)&&r!==void 0?r:(this._ensureRGB(),st.channel.rgb2hsl(t,"h"))}get s(){const t=this.data,r=t.s;return!this.type.is(Ft.RGB)&&r!==void 0?r:(this._ensureRGB(),st.channel.rgb2hsl(t,"s"))}get l(){const t=this.data,r=t.l;return!this.type.is(Ft.RGB)&&r!==void 0?r:(this._ensureRGB(),st.channel.rgb2hsl(t,"l"))}get a(){return this.data.a}set r(t){this.type.set(Ft.RGB),this.changed=!0,this.data.r=t}set g(t){this.type.set(Ft.RGB),this.changed=!0,this.data.g=t}set b(t){this.type.set(Ft.RGB),this.changed=!0,this.data.b=t}set h(t){this.type.set(Ft.HSL),this.changed=!0,this.data.h=t}set s(t){this.type.set(Ft.HSL),this.changed=!0,this.data.s=t}set l(t){this.type.set(Ft.HSL),this.changed=!0,this.data.l=t}set a(t){this.changed=!0,this.data.a=t}}const ua=new Jm({r:0,g:0,b:0,a:0},"transparent"),$r={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:e=>{if(e.charCodeAt(0)!==35)return;const t=e.match($r.re);if(!t)return;const r=t[1],i=parseInt(r,16),n=r.length,a=n%4===0,s=n>4,o=s?1:17,l=s?8:4,c=a?0:-1,h=s?255:15;return ua.set({r:(i>>l*(c+3)&h)*o,g:(i>>l*(c+2)&h)*o,b:(i>>l*(c+1)&h)*o,a:a?(i&h)*o/255:1},e)},stringify:e=>{const{r:t,g:r,b:i,a:n}=e;return n<1?`#${ze[Math.round(t)]}${ze[Math.round(r)]}${ze[Math.round(i)]}${ze[Math.round(n*255)]}`:`#${ze[Math.round(t)]}${ze[Math.round(r)]}${ze[Math.round(i)]}`}},nr={re:/^hsla?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(?:deg|grad|rad|turn)?)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(%)?))?\s*?\)$/i,hueRe:/^(.+?)(deg|grad|rad|turn)$/i,_hue2deg:e=>{const t=e.match(nr.hueRe);if(t){const[,r,i]=t;switch(i){case"grad":return st.channel.clamp.h(parseFloat(r)*.9);case"rad":return st.channel.clamp.h(parseFloat(r)*180/Math.PI);case"turn":return st.channel.clamp.h(parseFloat(r)*360)}}return st.channel.clamp.h(parseFloat(e))},parse:e=>{const t=e.charCodeAt(0);if(t!==104&&t!==72)return;const r=e.match(nr.re);if(!r)return;const[,i,n,a,s,o]=r;return ua.set({h:nr._hue2deg(i),s:st.channel.clamp.s(parseFloat(n)),l:st.channel.clamp.l(parseFloat(a)),a:s?st.channel.clamp.a(o?parseFloat(s)/100:parseFloat(s)):1},e)},stringify:e=>{const{h:t,s:r,l:i,a:n}=e;return n<1?`hsla(${st.lang.round(t)}, ${st.lang.round(r)}%, ${st.lang.round(i)}%, ${n})`:`hsl(${st.lang.round(t)}, ${st.lang.round(r)}%, ${st.lang.round(i)}%)`}},bi={colors:{aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyanaqua:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",transparent:"#00000000",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},parse:e=>{e=e.toLowerCase();const t=bi.colors[e];if(t)return $r.parse(t)},stringify:e=>{const t=$r.stringify(e);for(const r in bi.colors)if(bi.colors[r]===t)return r}},hi={re:/^rgba?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?)))?\s*?\)$/i,parse:e=>{const t=e.charCodeAt(0);if(t!==114&&t!==82)return;const r=e.match(hi.re);if(!r)return;const[,i,n,a,s,o,l,c,h]=r;return ua.set({r:st.channel.clamp.r(n?parseFloat(i)*2.55:parseFloat(i)),g:st.channel.clamp.g(s?parseFloat(a)*2.55:parseFloat(a)),b:st.channel.clamp.b(l?parseFloat(o)*2.55:parseFloat(o)),a:c?st.channel.clamp.a(h?parseFloat(c)/100:parseFloat(c)):1},e)},stringify:e=>{const{r:t,g:r,b:i,a:n}=e;return n<1?`rgba(${st.lang.round(t)}, ${st.lang.round(r)}, ${st.lang.round(i)}, ${st.lang.round(n)})`:`rgb(${st.lang.round(t)}, ${st.lang.round(r)}, ${st.lang.round(i)})`}},we={format:{keyword:bi,hex:$r,rgb:hi,rgba:hi,hsl:nr,hsla:nr},parse:e=>{if(typeof e!="string")return e;const t=$r.parse(e)||hi.parse(e)||nr.parse(e)||bi.parse(e);if(t)return t;throw new Error(`Unsupported color format: "${e}"`)},stringify:e=>!e.changed&&e.color?e.color:e.type.is(Ft.HSL)||e.data.r===void 0?nr.stringify(e):e.a<1||!Number.isInteger(e.r)||!Number.isInteger(e.g)||!Number.isInteger(e.b)?hi.stringify(e):$r.stringify(e)},yh=(e,t)=>{const r=we.parse(e);for(const i in t)r[i]=st.channel.clamp[i](t[i]);return we.stringify(r)},_i=(e,t,r=0,i=1)=>{if(typeof e!="number")return yh(e,{a:t});const n=ua.set({r:st.channel.clamp.r(e),g:st.channel.clamp.g(t),b:st.channel.clamp.b(r),a:st.channel.clamp.a(i)});return we.stringify(n)},t0=e=>{const{r:t,g:r,b:i}=we.parse(e),n=.2126*st.channel.toLinear(t)+.7152*st.channel.toLinear(r)+.0722*st.channel.toLinear(i);return st.lang.round(n)},e0=e=>t0(e)>=.5,Pi=e=>!e0(e),xh=(e,t,r)=>{const i=we.parse(e),n=i[t],a=st.channel.clamp[t](n+r);return n!==a&&(i[t]=a),we.stringify(i)},H=(e,t)=>xh(e,"l",t),et=(e,t)=>xh(e,"l",-t),v=(e,t)=>{const r=we.parse(e),i={};for(const n in t)t[n]&&(i[n]=r[n]+t[n]);return yh(e,i)},r0=(e,t,r=50)=>{const{r:i,g:n,b:a,a:s}=we.parse(e),{r:o,g:l,b:c,a:h}=we.parse(t),u=r/100,f=u*2-1,d=s-h,m=((f*d===-1?f:(f+d)/(1+f*d))+1)/2,y=1-m,x=i*m+o*y,b=n*m+l*y,_=a*m+c*y,k=s*u+h*(1-u);return _i(x,b,_,k)},z=(e,t=100)=>{const r=we.parse(e);return r.r=255-r.r,r.g=255-r.g,r.b=255-r.b,r0(r,e,t)};/*! @license DOMPurify 3.3.1 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.3.1/LICENSE */const{entries:bh,setPrototypeOf:Rl,isFrozen:i0,getPrototypeOf:n0,getOwnPropertyDescriptor:a0}=Object;let{freeze:jt,seal:te,create:gs}=Object,{apply:ms,construct:ys}=typeof Reflect<"u"&&Reflect;jt||(jt=function(t){return t});te||(te=function(t){return t});ms||(ms=function(t,r){for(var i=arguments.length,n=new Array(i>2?i-2:0),a=2;a1?r-1:0),n=1;n1?r-1:0),n=1;n2&&arguments[2]!==void 0?arguments[2]:mn;Rl&&Rl(e,null);let i=t.length;for(;i--;){let n=t[i];if(typeof n=="string"){const a=r(n);a!==n&&(i0(t)||(t[i]=a),n=a)}e[n]=!0}return e}function u0(e){for(let t=0;t/gm),m0=te(/\$\{[\w\W]*/gm),y0=te(/^data-[\-\w.\u00B7-\uFFFF]+$/),x0=te(/^aria-[\-\w]+$/),_h=te(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),b0=te(/^(?:\w+script|data):/i),_0=te(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Ch=te(/^html$/i),C0=te(/^[a-z][.\w]*(-[.\w]+)+$/i);var ql=Object.freeze({__proto__:null,ARIA_ATTR:x0,ATTR_WHITESPACE:_0,CUSTOM_ELEMENT:C0,DATA_ATTR:y0,DOCTYPE_NAME:Ch,ERB_EXPR:g0,IS_ALLOWED_URI:_h,IS_SCRIPT_OR_DATA:b0,MUSTACHE_EXPR:p0,TMPLIT_EXPR:m0});const ri={element:1,text:3,progressingInstruction:7,comment:8,document:9},w0=function(){return typeof window>"u"?null:window},k0=function(t,r){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let i=null;const n="data-tt-policy-suffix";r&&r.hasAttribute(n)&&(i=r.getAttribute(n));const a="dompurify"+(i?"#"+i:"");try{return t.createPolicy(a,{createHTML(s){return s},createScriptURL(s){return s}})}catch{return console.warn("TrustedTypes policy "+a+" could not be created."),null}},Hl=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function wh(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:w0();const t=tt=>wh(tt);if(t.version="3.3.1",t.removed=[],!e||!e.document||e.document.nodeType!==ri.document||!e.Element)return t.isSupported=!1,t;let{document:r}=e;const i=r,n=i.currentScript,{DocumentFragment:a,HTMLTemplateElement:s,Node:o,Element:l,NodeFilter:c,NamedNodeMap:h=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:u,DOMParser:f,trustedTypes:d}=e,g=l.prototype,m=ei(g,"cloneNode"),y=ei(g,"remove"),x=ei(g,"nextSibling"),b=ei(g,"childNodes"),_=ei(g,"parentNode");if(typeof s=="function"){const tt=r.createElement("template");tt.content&&tt.content.ownerDocument&&(r=tt.content.ownerDocument)}let k,w="";const{implementation:L,createNodeIterator:S,createDocumentFragment:D,getElementsByTagName:I}=r,{importNode:O}=i;let E=Hl();t.isSupported=typeof bh=="function"&&typeof _=="function"&&L&&L.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:N,ERB_EXPR:R,TMPLIT_EXPR:A,DATA_ATTR:B,ARIA_ATTR:T,IS_SCRIPT_OR_DATA:$,ATTR_WHITESPACE:M,CUSTOM_ELEMENT:q}=ql;let{IS_ALLOWED_URI:V}=ql,K=null;const J=ot({},[...Pl,...Za,...Ka,...Qa,...Nl]);let Z=null;const ct=ot({},[...zl,...Ja,...Wl,...rn]);let at=Object.seal(gs(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),_t=null,Ct=null;const Nt=Object.seal(gs(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let ie=!0,xt=!0,ne=!1,Ne=!0,ae=!1,Vi=!0,Qe=!1,Pa=!1,Na=!1,wr=!1,Xi=!1,Zi=!1,yl=!0,xl=!1;const Rm="user-content-";let za=!0,Zr=!1,kr={},pe=null;const Wa=ot({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let bl=null;const _l=ot({},["audio","video","img","source","image","track"]);let qa=null;const Cl=ot({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Ki="http://www.w3.org/1998/Math/MathML",Qi="http://www.w3.org/2000/svg",Te="http://www.w3.org/1999/xhtml";let vr=Te,Ha=!1,ja=null;const Im=ot({},[Ki,Qi,Te],Va);let Ji=ot({},["mi","mo","mn","ms","mtext"]),tn=ot({},["annotation-xml"]);const Pm=ot({},["title","style","font","a","script"]);let Kr=null;const Nm=["application/xhtml+xml","text/html"],zm="text/html";let vt=null,Sr=null;const Wm=r.createElement("form"),wl=function(C){return C instanceof RegExp||C instanceof Function},Ya=function(){let C=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(Sr&&Sr===C)){if((!C||typeof C!="object")&&(C={}),C=ye(C),Kr=Nm.indexOf(C.PARSER_MEDIA_TYPE)===-1?zm:C.PARSER_MEDIA_TYPE,vt=Kr==="application/xhtml+xml"?Va:mn,K=se(C,"ALLOWED_TAGS")?ot({},C.ALLOWED_TAGS,vt):J,Z=se(C,"ALLOWED_ATTR")?ot({},C.ALLOWED_ATTR,vt):ct,ja=se(C,"ALLOWED_NAMESPACES")?ot({},C.ALLOWED_NAMESPACES,Va):Im,qa=se(C,"ADD_URI_SAFE_ATTR")?ot(ye(Cl),C.ADD_URI_SAFE_ATTR,vt):Cl,bl=se(C,"ADD_DATA_URI_TAGS")?ot(ye(_l),C.ADD_DATA_URI_TAGS,vt):_l,pe=se(C,"FORBID_CONTENTS")?ot({},C.FORBID_CONTENTS,vt):Wa,_t=se(C,"FORBID_TAGS")?ot({},C.FORBID_TAGS,vt):ye({}),Ct=se(C,"FORBID_ATTR")?ot({},C.FORBID_ATTR,vt):ye({}),kr=se(C,"USE_PROFILES")?C.USE_PROFILES:!1,ie=C.ALLOW_ARIA_ATTR!==!1,xt=C.ALLOW_DATA_ATTR!==!1,ne=C.ALLOW_UNKNOWN_PROTOCOLS||!1,Ne=C.ALLOW_SELF_CLOSE_IN_ATTR!==!1,ae=C.SAFE_FOR_TEMPLATES||!1,Vi=C.SAFE_FOR_XML!==!1,Qe=C.WHOLE_DOCUMENT||!1,wr=C.RETURN_DOM||!1,Xi=C.RETURN_DOM_FRAGMENT||!1,Zi=C.RETURN_TRUSTED_TYPE||!1,Na=C.FORCE_BODY||!1,yl=C.SANITIZE_DOM!==!1,xl=C.SANITIZE_NAMED_PROPS||!1,za=C.KEEP_CONTENT!==!1,Zr=C.IN_PLACE||!1,V=C.ALLOWED_URI_REGEXP||_h,vr=C.NAMESPACE||Te,Ji=C.MATHML_TEXT_INTEGRATION_POINTS||Ji,tn=C.HTML_INTEGRATION_POINTS||tn,at=C.CUSTOM_ELEMENT_HANDLING||{},C.CUSTOM_ELEMENT_HANDLING&&wl(C.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(at.tagNameCheck=C.CUSTOM_ELEMENT_HANDLING.tagNameCheck),C.CUSTOM_ELEMENT_HANDLING&&wl(C.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(at.attributeNameCheck=C.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),C.CUSTOM_ELEMENT_HANDLING&&typeof C.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(at.allowCustomizedBuiltInElements=C.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),ae&&(xt=!1),Xi&&(wr=!0),kr&&(K=ot({},Nl),Z=[],kr.html===!0&&(ot(K,Pl),ot(Z,zl)),kr.svg===!0&&(ot(K,Za),ot(Z,Ja),ot(Z,rn)),kr.svgFilters===!0&&(ot(K,Ka),ot(Z,Ja),ot(Z,rn)),kr.mathMl===!0&&(ot(K,Qa),ot(Z,Wl),ot(Z,rn))),C.ADD_TAGS&&(typeof C.ADD_TAGS=="function"?Nt.tagCheck=C.ADD_TAGS:(K===J&&(K=ye(K)),ot(K,C.ADD_TAGS,vt))),C.ADD_ATTR&&(typeof C.ADD_ATTR=="function"?Nt.attributeCheck=C.ADD_ATTR:(Z===ct&&(Z=ye(Z)),ot(Z,C.ADD_ATTR,vt))),C.ADD_URI_SAFE_ATTR&&ot(qa,C.ADD_URI_SAFE_ATTR,vt),C.FORBID_CONTENTS&&(pe===Wa&&(pe=ye(pe)),ot(pe,C.FORBID_CONTENTS,vt)),C.ADD_FORBID_CONTENTS&&(pe===Wa&&(pe=ye(pe)),ot(pe,C.ADD_FORBID_CONTENTS,vt)),za&&(K["#text"]=!0),Qe&&ot(K,["html","head","body"]),K.table&&(ot(K,["tbody"]),delete _t.tbody),C.TRUSTED_TYPES_POLICY){if(typeof C.TRUSTED_TYPES_POLICY.createHTML!="function")throw ti('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof C.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw ti('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');k=C.TRUSTED_TYPES_POLICY,w=k.createHTML("")}else k===void 0&&(k=k0(d,n)),k!==null&&typeof w=="string"&&(w=k.createHTML(""));jt&&jt(C),Sr=C}},kl=ot({},[...Za,...Ka,...f0]),vl=ot({},[...Qa,...d0]),qm=function(C){let P=_(C);(!P||!P.tagName)&&(P={namespaceURI:vr,tagName:"template"});const X=mn(C.tagName),mt=mn(P.tagName);return ja[C.namespaceURI]?C.namespaceURI===Qi?P.namespaceURI===Te?X==="svg":P.namespaceURI===Ki?X==="svg"&&(mt==="annotation-xml"||Ji[mt]):!!kl[X]:C.namespaceURI===Ki?P.namespaceURI===Te?X==="math":P.namespaceURI===Qi?X==="math"&&tn[mt]:!!vl[X]:C.namespaceURI===Te?P.namespaceURI===Qi&&!tn[mt]||P.namespaceURI===Ki&&!Ji[mt]?!1:!vl[X]&&(Pm[X]||!kl[X]):!!(Kr==="application/xhtml+xml"&&ja[C.namespaceURI]):!1},ge=function(C){Qr(t.removed,{element:C});try{_(C).removeChild(C)}catch{y(C)}},Je=function(C,P){try{Qr(t.removed,{attribute:P.getAttributeNode(C),from:P})}catch{Qr(t.removed,{attribute:null,from:P})}if(P.removeAttribute(C),C==="is")if(wr||Xi)try{ge(P)}catch{}else try{P.setAttribute(C,"")}catch{}},Sl=function(C){let P=null,X=null;if(Na)C=""+C;else{const wt=Xa(C,/^[\r\n\t ]+/);X=wt&&wt[0]}Kr==="application/xhtml+xml"&&vr===Te&&(C=''+C+"");const mt=k?k.createHTML(C):C;if(vr===Te)try{P=new f().parseFromString(mt,Kr)}catch{}if(!P||!P.documentElement){P=L.createDocument(vr,"template",null);try{P.documentElement.innerHTML=Ha?w:mt}catch{}}const $t=P.body||P.documentElement;return C&&X&&$t.insertBefore(r.createTextNode(X),$t.childNodes[0]||null),vr===Te?I.call(P,Qe?"html":"body")[0]:Qe?P.documentElement:$t},Tl=function(C){return S.call(C.ownerDocument||C,C,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},Ua=function(C){return C instanceof u&&(typeof C.nodeName!="string"||typeof C.textContent!="string"||typeof C.removeChild!="function"||!(C.attributes instanceof h)||typeof C.removeAttribute!="function"||typeof C.setAttribute!="function"||typeof C.namespaceURI!="string"||typeof C.insertBefore!="function"||typeof C.hasChildNodes!="function")},Al=function(C){return typeof o=="function"&&C instanceof o};function Ae(tt,C,P){en(tt,X=>{X.call(t,C,P,Sr)})}const Ll=function(C){let P=null;if(Ae(E.beforeSanitizeElements,C,null),Ua(C))return ge(C),!0;const X=vt(C.nodeName);if(Ae(E.uponSanitizeElement,C,{tagName:X,allowedTags:K}),Vi&&C.hasChildNodes()&&!Al(C.firstElementChild)&&zt(/<[/\w!]/g,C.innerHTML)&&zt(/<[/\w!]/g,C.textContent)||C.nodeType===ri.progressingInstruction||Vi&&C.nodeType===ri.comment&&zt(/<[/\w]/g,C.data))return ge(C),!0;if(!(Nt.tagCheck instanceof Function&&Nt.tagCheck(X))&&(!K[X]||_t[X])){if(!_t[X]&&Ml(X)&&(at.tagNameCheck instanceof RegExp&&zt(at.tagNameCheck,X)||at.tagNameCheck instanceof Function&&at.tagNameCheck(X)))return!1;if(za&&!pe[X]){const mt=_(C)||C.parentNode,$t=b(C)||C.childNodes;if($t&&mt){const wt=$t.length;for(let Ut=wt-1;Ut>=0;--Ut){const Le=m($t[Ut],!0);Le.__removalCount=(C.__removalCount||0)+1,mt.insertBefore(Le,x(C))}}}return ge(C),!0}return C instanceof l&&!qm(C)||(X==="noscript"||X==="noembed"||X==="noframes")&&zt(/<\/no(script|embed|frames)/i,C.innerHTML)?(ge(C),!0):(ae&&C.nodeType===ri.text&&(P=C.textContent,en([N,R,A],mt=>{P=Jr(P,mt," ")}),C.textContent!==P&&(Qr(t.removed,{element:C.cloneNode()}),C.textContent=P)),Ae(E.afterSanitizeElements,C,null),!1)},Bl=function(C,P,X){if(yl&&(P==="id"||P==="name")&&(X in r||X in Wm))return!1;if(!(xt&&!Ct[P]&&zt(B,P))){if(!(ie&&zt(T,P))){if(!(Nt.attributeCheck instanceof Function&&Nt.attributeCheck(P,C))){if(!Z[P]||Ct[P]){if(!(Ml(C)&&(at.tagNameCheck instanceof RegExp&&zt(at.tagNameCheck,C)||at.tagNameCheck instanceof Function&&at.tagNameCheck(C))&&(at.attributeNameCheck instanceof RegExp&&zt(at.attributeNameCheck,P)||at.attributeNameCheck instanceof Function&&at.attributeNameCheck(P,C))||P==="is"&&at.allowCustomizedBuiltInElements&&(at.tagNameCheck instanceof RegExp&&zt(at.tagNameCheck,X)||at.tagNameCheck instanceof Function&&at.tagNameCheck(X))))return!1}else if(!qa[P]){if(!zt(V,Jr(X,M,""))){if(!((P==="src"||P==="xlink:href"||P==="href")&&C!=="script"&&l0(X,"data:")===0&&bl[C])){if(!(ne&&!zt($,Jr(X,M,"")))){if(X)return!1}}}}}}}return!0},Ml=function(C){return C!=="annotation-xml"&&Xa(C,q)},El=function(C){Ae(E.beforeSanitizeAttributes,C,null);const{attributes:P}=C;if(!P||Ua(C))return;const X={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Z,forceKeepAttr:void 0};let mt=P.length;for(;mt--;){const $t=P[mt],{name:wt,namespaceURI:Ut,value:Le}=$t,Tr=vt(wt),Ga=Le;let Bt=wt==="value"?Ga:c0(Ga);if(X.attrName=Tr,X.attrValue=Bt,X.keepAttr=!0,X.forceKeepAttr=void 0,Ae(E.uponSanitizeAttribute,C,X),Bt=X.attrValue,xl&&(Tr==="id"||Tr==="name")&&(Je(wt,C),Bt=Rm+Bt),Vi&&zt(/((--!?|])>)|<\/(style|title|textarea)/i,Bt)){Je(wt,C);continue}if(Tr==="attributename"&&Xa(Bt,"href")){Je(wt,C);continue}if(X.forceKeepAttr)continue;if(!X.keepAttr){Je(wt,C);continue}if(!Ne&&zt(/\/>/i,Bt)){Je(wt,C);continue}ae&&en([N,R,A],Fl=>{Bt=Jr(Bt,Fl," ")});const $l=vt(C.nodeName);if(!Bl($l,Tr,Bt)){Je(wt,C);continue}if(k&&typeof d=="object"&&typeof d.getAttributeType=="function"&&!Ut)switch(d.getAttributeType($l,Tr)){case"TrustedHTML":{Bt=k.createHTML(Bt);break}case"TrustedScriptURL":{Bt=k.createScriptURL(Bt);break}}if(Bt!==Ga)try{Ut?C.setAttributeNS(Ut,wt,Bt):C.setAttribute(wt,Bt),Ua(C)?ge(C):Il(t.removed)}catch{Je(wt,C)}}Ae(E.afterSanitizeAttributes,C,null)},Hm=function tt(C){let P=null;const X=Tl(C);for(Ae(E.beforeSanitizeShadowDOM,C,null);P=X.nextNode();)Ae(E.uponSanitizeShadowNode,P,null),Ll(P),El(P),P.content instanceof a&&tt(P.content);Ae(E.afterSanitizeShadowDOM,C,null)};return t.sanitize=function(tt){let C=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},P=null,X=null,mt=null,$t=null;if(Ha=!tt,Ha&&(tt=""),typeof tt!="string"&&!Al(tt))if(typeof tt.toString=="function"){if(tt=tt.toString(),typeof tt!="string")throw ti("dirty is not a string, aborting")}else throw ti("toString is not a function");if(!t.isSupported)return tt;if(Pa||Ya(C),t.removed=[],typeof tt=="string"&&(Zr=!1),Zr){if(tt.nodeName){const Le=vt(tt.nodeName);if(!K[Le]||_t[Le])throw ti("root node is forbidden and cannot be sanitized in-place")}}else if(tt instanceof o)P=Sl(""),X=P.ownerDocument.importNode(tt,!0),X.nodeType===ri.element&&X.nodeName==="BODY"||X.nodeName==="HTML"?P=X:P.appendChild(X);else{if(!wr&&!ae&&!Qe&&tt.indexOf("<")===-1)return k&&Zi?k.createHTML(tt):tt;if(P=Sl(tt),!P)return wr?null:Zi?w:""}P&&Na&&ge(P.firstChild);const wt=Tl(Zr?tt:P);for(;mt=wt.nextNode();)Ll(mt),El(mt),mt.content instanceof a&&Hm(mt.content);if(Zr)return tt;if(wr){if(Xi)for($t=D.call(P.ownerDocument);P.firstChild;)$t.appendChild(P.firstChild);else $t=P;return(Z.shadowroot||Z.shadowrootmode)&&($t=O.call(i,$t,!0)),$t}let Ut=Qe?P.outerHTML:P.innerHTML;return Qe&&K["!doctype"]&&P.ownerDocument&&P.ownerDocument.doctype&&P.ownerDocument.doctype.name&&zt(Ch,P.ownerDocument.doctype.name)&&(Ut=" +`+Ut),ae&&en([N,R,A],Le=>{Ut=Jr(Ut,Le," ")}),k&&Zi?k.createHTML(Ut):Ut},t.setConfig=function(){let tt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Ya(tt),Pa=!0},t.clearConfig=function(){Sr=null,Pa=!1},t.isValidAttribute=function(tt,C,P){Sr||Ya({});const X=vt(tt),mt=vt(C);return Bl(X,mt,P)},t.addHook=function(tt,C){typeof C=="function"&&Qr(E[tt],C)},t.removeHook=function(tt,C){if(C!==void 0){const P=s0(E[tt],C);return P===-1?void 0:o0(E[tt],P,1)[0]}return Il(E[tt])},t.removeHooks=function(tt){E[tt]=[]},t.removeAllHooks=function(){E=Hl()},t}var Or=wh(),kh=/^-{3}\s*[\n\r](.*?)[\n\r]-{3}\s*[\n\r]+/s,Ci=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,v0=/\s*%%.*\n/gm,vh=class extends Error{static{p(this,"UnknownDiagramError")}constructor(e){super(e),this.name="UnknownDiagramError"}},hr={},mo=p(function(e,t){e=e.replace(kh,"").replace(Ci,"").replace(v0,` +`);for(const[r,{detector:i}]of Object.entries(hr))if(i(e,t))return r;throw new vh(`No diagram type detected matching given configuration for text: ${e}`)},"detectType"),xs=p((...e)=>{for(const{id:t,detector:r,loader:i}of e)Sh(t,r,i)},"registerLazyLoadedDiagrams"),Sh=p((e,t,r)=>{hr[e]&&F.warn(`Detector with key ${e} already exists. Overwriting.`),hr[e]={detector:t,loader:r},F.debug(`Detector with key ${e} added${r?" with loader":""}`)},"addDetector"),S0=p(e=>hr[e].loader,"getDiagramLoader"),bs=p((e,t,{depth:r=2,clobber:i=!1}={})=>{const n={depth:r,clobber:i};return Array.isArray(t)&&!Array.isArray(e)?(t.forEach(a=>bs(e,a,n)),e):Array.isArray(t)&&Array.isArray(e)?(t.forEach(a=>{e.includes(a)||e.push(a)}),e):e===void 0||r<=0?e!=null&&typeof e=="object"&&typeof t=="object"?Object.assign(e,t):t:(t!==void 0&&typeof e=="object"&&typeof t=="object"&&Object.keys(t).forEach(a=>{typeof t[a]=="object"&&(e[a]===void 0||typeof e[a]=="object")?(e[a]===void 0&&(e[a]=Array.isArray(t[a])?[]:{}),e[a]=bs(e[a],t[a],{depth:r-1,clobber:i})):(i||typeof e[a]!="object"&&typeof t[a]!="object")&&(e[a]=t[a])}),e)},"assignWithDepth"),Tt=bs,fa="#ffffff",da="#f2f2f2",Wt=p((e,t)=>t?v(e,{s:-40,l:10}):v(e,{s:-40,l:-10}),"mkBorder"),T0=class{static{p(this,"Theme")}constructor(){this.background="#f4f4f4",this.primaryColor="#fff4dd",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px"}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||v(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||v(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Wt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Wt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Wt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Wt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||z(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||z(this.tertiaryColor),this.lineColor=this.lineColor||z(this.background),this.arrowheadColor=this.arrowheadColor||z(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?et(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||et(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||z(this.lineColor),this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||H(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.vertLineColor=this.vertLineColor||"navy",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.darkMode?(this.rowOdd=this.rowOdd||et(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||et(this.mainBkg,10)):(this.rowOdd=this.rowOdd||H(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||H(this.mainBkg,5)),this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||this.tertiaryColor,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||v(this.primaryColor,{h:30}),this.cScale4=this.cScale4||v(this.primaryColor,{h:60}),this.cScale5=this.cScale5||v(this.primaryColor,{h:90}),this.cScale6=this.cScale6||v(this.primaryColor,{h:120}),this.cScale7=this.cScale7||v(this.primaryColor,{h:150}),this.cScale8=this.cScale8||v(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||v(this.primaryColor,{h:270}),this.cScale10=this.cScale10||v(this.primaryColor,{h:300}),this.cScale11=this.cScale11||v(this.primaryColor,{h:330}),this.darkMode)for(let t=0;t{this[r]=e[r]}),this.updateColors(),t.forEach(r=>{this[r]=e[r]})}},A0=p(e=>{const t=new T0;return t.calculate(e),t},"getThemeVariables"),L0=class{static{p(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=H(this.primaryColor,16),this.tertiaryColor=v(this.primaryColor,{h:-160}),this.primaryBorderColor=z(this.background),this.secondaryBorderColor=Wt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Wt(this.tertiaryColor,this.darkMode),this.primaryTextColor=z(this.primaryColor),this.secondaryTextColor=z(this.secondaryColor),this.tertiaryTextColor=z(this.tertiaryColor),this.lineColor=z(this.background),this.textColor=z(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=H(z("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=_i(255,255,255,.25),this.arrowheadColor="calculated",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="#181818",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#F9FFFE",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="calculated",this.activationBkgColor="calculated",this.sequenceNumberColor="black",this.sectionBkgColor=et("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=et(this.sectionBkgColor,10),this.taskBorderColor=_i(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=_i(255,255,255,50),this.activeTaskBkgColor="#81B1DB",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="grey",this.critBorderColor="#E83737",this.critBkgColor="#E83737",this.taskTextDarkColor="calculated",this.todayLineColor="#DB5757",this.vertLineColor="#00BFFF",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd=this.rowOdd||H(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||et(this.mainBkg,10),this.labelColor="calculated",this.errorBkgColor="#a44141",this.errorTextColor="#ddd"}updateColors(){this.secondBkg=H(this.mainBkg,16),this.lineColor=this.mainContrastColor,this.arrowheadColor=this.mainContrastColor,this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.edgeLabelBackground=H(this.labelBackground,25),this.actorBorder=this.border1,this.actorBkg=this.mainBkg,this.actorTextColor=this.mainContrastColor,this.actorLineColor=this.actorBorder,this.signalColor=this.mainContrastColor,this.signalTextColor=this.mainContrastColor,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.mainContrastColor,this.loopTextColor=this.mainContrastColor,this.noteBorderColor=this.secondaryBorderColor,this.noteBkgColor=this.secondBkg,this.noteTextColor=this.secondaryTextColor,this.activationBorderColor=this.border1,this.activationBkgColor=this.secondBkg,this.altSectionBkgColor=this.background,this.taskBkgColor=H(this.mainBkg,23),this.taskTextColor=this.darkTextColor,this.taskTextLightColor=this.mainContrastColor,this.taskTextOutsideColor=this.taskTextLightColor,this.gridColor=this.mainContrastColor,this.doneTaskBkgColor=this.mainContrastColor,this.taskTextDarkColor=this.darkTextColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#555",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#f4f4f4",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=v(this.primaryColor,{h:64}),this.fillType3=v(this.secondaryColor,{h:64}),this.fillType4=v(this.primaryColor,{h:-64}),this.fillType5=v(this.secondaryColor,{h:-64}),this.fillType6=v(this.primaryColor,{h:128}),this.fillType7=v(this.secondaryColor,{h:128}),this.cScale1=this.cScale1||"#0b0000",this.cScale2=this.cScale2||"#4d1037",this.cScale3=this.cScale3||"#3f5258",this.cScale4=this.cScale4||"#4f2f1b",this.cScale5=this.cScale5||"#6e0a0a",this.cScale6=this.cScale6||"#3b0048",this.cScale7=this.cScale7||"#995a01",this.cScale8=this.cScale8||"#154706",this.cScale9=this.cScale9||"#161722",this.cScale10=this.cScale10||"#00296f",this.cScale11=this.cScale11||"#01629c",this.cScale12=this.cScale12||"#010029",this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||v(this.primaryColor,{h:30}),this.cScale4=this.cScale4||v(this.primaryColor,{h:60}),this.cScale5=this.cScale5||v(this.primaryColor,{h:90}),this.cScale6=this.cScale6||v(this.primaryColor,{h:120}),this.cScale7=this.cScale7||v(this.primaryColor,{h:150}),this.cScale8=this.cScale8||v(this.primaryColor,{h:210}),this.cScale9=this.cScale9||v(this.primaryColor,{h:270}),this.cScale10=this.cScale10||v(this.primaryColor,{h:300}),this.cScale11=this.cScale11||v(this.primaryColor,{h:330});for(let e=0;e{this[r]=e[r]}),this.updateColors(),t.forEach(r=>{this[r]=e[r]})}},B0=p(e=>{const t=new L0;return t.calculate(e),t},"getThemeVariables"),M0=class{static{p(this,"Theme")}constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=v(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=v(this.primaryColor,{h:-160}),this.primaryBorderColor=Wt(this.primaryColor,this.darkMode),this.secondaryBorderColor=Wt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Wt(this.tertiaryColor,this.darkMode),this.primaryTextColor=z(this.primaryColor),this.secondaryTextColor=z(this.secondaryColor),this.tertiaryTextColor=z(this.tertiaryColor),this.lineColor=z(this.background),this.textColor=z(this.background),this.background="white",this.mainBkg="#ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",this.border2="#aaaa33",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="rgba(232,232,232, 0.8)",this.textColor="#333",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="calculated",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="calculated",this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor="calculated",this.taskTextOutsideColor=this.taskTextDarkColor,this.taskTextClickableColor="calculated",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBorderColor="calculated",this.critBkgColor="calculated",this.todayLineColor="calculated",this.vertLineColor="calculated",this.sectionBkgColor=_i(102,102,255,.49),this.altSectionBkgColor="white",this.sectionBkgColor2="#fff400",this.taskBorderColor="#534fbc",this.taskBkgColor="#8a90dd",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="#534fbc",this.activeTaskBkgColor="#bfc7ff",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.vertLineColor="navy",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd="calculated",this.rowEven="calculated",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.updateColors()}updateColors(){this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||v(this.primaryColor,{h:30}),this.cScale4=this.cScale4||v(this.primaryColor,{h:60}),this.cScale5=this.cScale5||v(this.primaryColor,{h:90}),this.cScale6=this.cScale6||v(this.primaryColor,{h:120}),this.cScale7=this.cScale7||v(this.primaryColor,{h:150}),this.cScale8=this.cScale8||v(this.primaryColor,{h:210}),this.cScale9=this.cScale9||v(this.primaryColor,{h:270}),this.cScale10=this.cScale10||v(this.primaryColor,{h:300}),this.cScale11=this.cScale11||v(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||et(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||et(this.tertiaryColor,40);for(let e=0;e{this[r]==="calculated"&&(this[r]=void 0)}),typeof e!="object"){this.updateColors();return}const t=Object.keys(e);t.forEach(r=>{this[r]=e[r]}),this.updateColors(),t.forEach(r=>{this[r]=e[r]})}},E0=p(e=>{const t=new M0;return t.calculate(e),t},"getThemeVariables"),$0=class{static{p(this,"Theme")}constructor(){this.background="#f4f4f4",this.primaryColor="#cde498",this.secondaryColor="#cdffb2",this.background="white",this.mainBkg="#cde498",this.secondBkg="#cdffb2",this.lineColor="green",this.border1="#13540c",this.border2="#6eaa49",this.arrowheadColor="green",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.tertiaryColor=H("#cde498",10),this.primaryBorderColor=Wt(this.primaryColor,this.darkMode),this.secondaryBorderColor=Wt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Wt(this.tertiaryColor,this.darkMode),this.primaryTextColor=z(this.primaryColor),this.secondaryTextColor=z(this.secondaryColor),this.tertiaryTextColor=z(this.primaryColor),this.lineColor=z(this.background),this.textColor=z(this.background),this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#333",this.edgeLabelBackground="#e8e8e8",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="#333",this.signalTextColor="#333",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="#326932",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="#6eaa49",this.altSectionBkgColor="white",this.sectionBkgColor2="#6eaa49",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="#487e3a",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.vertLineColor="#00BFFF",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}updateColors(){this.actorBorder=et(this.mainBkg,20),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.actorLineColor=this.actorBorder,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||v(this.primaryColor,{h:30}),this.cScale4=this.cScale4||v(this.primaryColor,{h:60}),this.cScale5=this.cScale5||v(this.primaryColor,{h:90}),this.cScale6=this.cScale6||v(this.primaryColor,{h:120}),this.cScale7=this.cScale7||v(this.primaryColor,{h:150}),this.cScale8=this.cScale8||v(this.primaryColor,{h:210}),this.cScale9=this.cScale9||v(this.primaryColor,{h:270}),this.cScale10=this.cScale10||v(this.primaryColor,{h:300}),this.cScale11=this.cScale11||v(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||et(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||et(this.tertiaryColor,40);for(let e=0;e{this[r]=e[r]}),this.updateColors(),t.forEach(r=>{this[r]=e[r]})}},F0=p(e=>{const t=new $0;return t.calculate(e),t},"getThemeVariables"),D0=class{static{p(this,"Theme")}constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=H(this.contrast,55),this.background="#ffffff",this.tertiaryColor=v(this.primaryColor,{h:-160}),this.primaryBorderColor=Wt(this.primaryColor,this.darkMode),this.secondaryBorderColor=Wt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Wt(this.tertiaryColor,this.darkMode),this.primaryTextColor=z(this.primaryColor),this.secondaryTextColor=z(this.secondaryColor),this.tertiaryTextColor=z(this.tertiaryColor),this.lineColor=z(this.background),this.textColor=z(this.background),this.mainBkg="#eee",this.secondBkg="calculated",this.lineColor="#666",this.border1="#999",this.border2="calculated",this.note="#ffa",this.text="#333",this.critical="#d42",this.done="#bbb",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="white",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor=this.actorBorder,this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="calculated",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="white",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBkgColor="calculated",this.critBorderColor="calculated",this.todayLineColor="calculated",this.vertLineColor="calculated",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd=this.rowOdd||H(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||"#f4f4f4",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}updateColors(){this.secondBkg=H(this.contrast,55),this.border2=this.contrast,this.actorBorder=H(this.border1,23),this.actorBkg=this.mainBkg,this.actorTextColor=this.text,this.actorLineColor=this.actorBorder,this.signalColor=this.text,this.signalTextColor=this.text,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.text,this.loopTextColor=this.text,this.noteBorderColor="#999",this.noteBkgColor="#666",this.noteTextColor="#fff",this.cScale0=this.cScale0||"#555",this.cScale1=this.cScale1||"#F4F4F4",this.cScale2=this.cScale2||"#555",this.cScale3=this.cScale3||"#BBB",this.cScale4=this.cScale4||"#777",this.cScale5=this.cScale5||"#999",this.cScale6=this.cScale6||"#DDD",this.cScale7=this.cScale7||"#FFF",this.cScale8=this.cScale8||"#DDD",this.cScale9=this.cScale9||"#BBB",this.cScale10=this.cScale10||"#999",this.cScale11=this.cScale11||"#777";for(let e=0;e{this[r]=e[r]}),this.updateColors(),t.forEach(r=>{this[r]=e[r]})}},O0=p(e=>{const t=new D0;return t.calculate(e),t},"getThemeVariables"),Fe={base:{getThemeVariables:A0},dark:{getThemeVariables:B0},default:{getThemeVariables:E0},forest:{getThemeVariables:F0},neutral:{getThemeVariables:O0}},me={flowchart:{useMaxWidth:!0,titleTopMargin:25,subGraphTitleMargin:{top:0,bottom:0},diagramPadding:8,htmlLabels:!0,nodeSpacing:50,rankSpacing:50,curve:"basis",padding:15,defaultRenderer:"dagre-wrapper",wrappingWidth:200,inheritDir:!1},sequence:{useMaxWidth:!0,hideUnusedParticipants:!1,activationWidth:10,diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",mirrorActors:!0,forceMenus:!1,bottomMarginAdj:1,rightAngles:!1,showSequenceNumbers:!1,actorFontSize:14,actorFontFamily:'"Open Sans", sans-serif',actorFontWeight:400,noteFontSize:14,noteFontFamily:'"trebuchet ms", verdana, arial, sans-serif',noteFontWeight:400,noteAlign:"center",messageFontSize:16,messageFontFamily:'"trebuchet ms", verdana, arial, sans-serif',messageFontWeight:400,wrap:!1,wrapPadding:10,labelBoxWidth:50,labelBoxHeight:20},gantt:{useMaxWidth:!0,titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,rightPadding:75,leftPadding:75,gridLineStartPadding:35,fontSize:11,sectionFontSize:11,numberSectionStyles:4,axisFormat:"%Y-%m-%d",topAxis:!1,displayMode:"",weekday:"sunday"},journey:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,maxLabelWidth:360,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],titleColor:"",titleFontFamily:'"trebuchet ms", verdana, arial, sans-serif',titleFontSize:"4ex"},class:{useMaxWidth:!0,titleTopMargin:25,arrowMarkerAbsolute:!1,dividerMargin:10,padding:5,textHeight:10,defaultRenderer:"dagre-wrapper",htmlLabels:!1,hideEmptyMembersBox:!1},state:{useMaxWidth:!0,titleTopMargin:25,dividerMargin:10,sizeUnit:5,padding:8,textHeight:10,titleShift:-15,noteMargin:10,forkWidth:70,forkHeight:7,miniPadding:2,fontSizeFactor:5.02,fontSize:24,labelHeight:16,edgeLengthFactor:"20",compositTitleSize:35,radius:5,defaultRenderer:"dagre-wrapper"},er:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:20,layoutDirection:"TB",minEntityWidth:100,minEntityHeight:75,entityPadding:15,nodeSpacing:140,rankSpacing:80,stroke:"gray",fill:"honeydew",fontSize:12},pie:{useMaxWidth:!0,textPosition:.75},quadrantChart:{useMaxWidth:!0,chartWidth:500,chartHeight:500,titleFontSize:20,titlePadding:10,quadrantPadding:5,xAxisLabelPadding:5,yAxisLabelPadding:5,xAxisLabelFontSize:16,yAxisLabelFontSize:16,quadrantLabelFontSize:16,quadrantTextTopPadding:5,pointTextPadding:5,pointLabelFontSize:12,pointRadius:5,xAxisPosition:"top",yAxisPosition:"left",quadrantInternalBorderStrokeWidth:1,quadrantExternalBorderStrokeWidth:2},xyChart:{useMaxWidth:!0,width:700,height:500,titleFontSize:20,titlePadding:10,showDataLabel:!1,showTitle:!0,xAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2},yAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2},chartOrientation:"vertical",plotReservedSpacePercent:50},requirement:{useMaxWidth:!0,rect_fill:"#f9f9f9",text_color:"#333",rect_border_size:"0.5px",rect_border_color:"#bbb",rect_min_width:200,rect_min_height:200,fontSize:14,rect_padding:10,line_height:20},mindmap:{useMaxWidth:!0,padding:10,maxNodeWidth:200,layoutAlgorithm:"cose-bilkent"},kanban:{useMaxWidth:!0,padding:8,sectionWidth:200,ticketBaseUrl:""},timeline:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],disableMulticolor:!1},gitGraph:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:8,nodeLabel:{width:75,height:100,x:-25,y:0},mainBranchName:"main",mainBranchOrder:0,showCommitLabel:!0,showBranches:!0,rotateCommitLabel:!0,parallelCommits:!1,arrowMarkerAbsolute:!1},c4:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,c4ShapeMargin:50,c4ShapePadding:20,width:216,height:60,boxMargin:10,c4ShapeInRow:4,nextLinePaddingX:0,c4BoundaryInRow:2,personFontSize:14,personFontFamily:'"Open Sans", sans-serif',personFontWeight:"normal",external_personFontSize:14,external_personFontFamily:'"Open Sans", sans-serif',external_personFontWeight:"normal",systemFontSize:14,systemFontFamily:'"Open Sans", sans-serif',systemFontWeight:"normal",external_systemFontSize:14,external_systemFontFamily:'"Open Sans", sans-serif',external_systemFontWeight:"normal",system_dbFontSize:14,system_dbFontFamily:'"Open Sans", sans-serif',system_dbFontWeight:"normal",external_system_dbFontSize:14,external_system_dbFontFamily:'"Open Sans", sans-serif',external_system_dbFontWeight:"normal",system_queueFontSize:14,system_queueFontFamily:'"Open Sans", sans-serif',system_queueFontWeight:"normal",external_system_queueFontSize:14,external_system_queueFontFamily:'"Open Sans", sans-serif',external_system_queueFontWeight:"normal",boundaryFontSize:14,boundaryFontFamily:'"Open Sans", sans-serif',boundaryFontWeight:"normal",messageFontSize:12,messageFontFamily:'"Open Sans", sans-serif',messageFontWeight:"normal",containerFontSize:14,containerFontFamily:'"Open Sans", sans-serif',containerFontWeight:"normal",external_containerFontSize:14,external_containerFontFamily:'"Open Sans", sans-serif',external_containerFontWeight:"normal",container_dbFontSize:14,container_dbFontFamily:'"Open Sans", sans-serif',container_dbFontWeight:"normal",external_container_dbFontSize:14,external_container_dbFontFamily:'"Open Sans", sans-serif',external_container_dbFontWeight:"normal",container_queueFontSize:14,container_queueFontFamily:'"Open Sans", sans-serif',container_queueFontWeight:"normal",external_container_queueFontSize:14,external_container_queueFontFamily:'"Open Sans", sans-serif',external_container_queueFontWeight:"normal",componentFontSize:14,componentFontFamily:'"Open Sans", sans-serif',componentFontWeight:"normal",external_componentFontSize:14,external_componentFontFamily:'"Open Sans", sans-serif',external_componentFontWeight:"normal",component_dbFontSize:14,component_dbFontFamily:'"Open Sans", sans-serif',component_dbFontWeight:"normal",external_component_dbFontSize:14,external_component_dbFontFamily:'"Open Sans", sans-serif',external_component_dbFontWeight:"normal",component_queueFontSize:14,component_queueFontFamily:'"Open Sans", sans-serif',component_queueFontWeight:"normal",external_component_queueFontSize:14,external_component_queueFontFamily:'"Open Sans", sans-serif',external_component_queueFontWeight:"normal",wrap:!0,wrapPadding:10,person_bg_color:"#08427B",person_border_color:"#073B6F",external_person_bg_color:"#686868",external_person_border_color:"#8A8A8A",system_bg_color:"#1168BD",system_border_color:"#3C7FC0",system_db_bg_color:"#1168BD",system_db_border_color:"#3C7FC0",system_queue_bg_color:"#1168BD",system_queue_border_color:"#3C7FC0",external_system_bg_color:"#999999",external_system_border_color:"#8A8A8A",external_system_db_bg_color:"#999999",external_system_db_border_color:"#8A8A8A",external_system_queue_bg_color:"#999999",external_system_queue_border_color:"#8A8A8A",container_bg_color:"#438DD5",container_border_color:"#3C7FC0",container_db_bg_color:"#438DD5",container_db_border_color:"#3C7FC0",container_queue_bg_color:"#438DD5",container_queue_border_color:"#3C7FC0",external_container_bg_color:"#B3B3B3",external_container_border_color:"#A6A6A6",external_container_db_bg_color:"#B3B3B3",external_container_db_border_color:"#A6A6A6",external_container_queue_bg_color:"#B3B3B3",external_container_queue_border_color:"#A6A6A6",component_bg_color:"#85BBF0",component_border_color:"#78A8D8",component_db_bg_color:"#85BBF0",component_db_border_color:"#78A8D8",component_queue_bg_color:"#85BBF0",component_queue_border_color:"#78A8D8",external_component_bg_color:"#CCCCCC",external_component_border_color:"#BFBFBF",external_component_db_bg_color:"#CCCCCC",external_component_db_border_color:"#BFBFBF",external_component_queue_bg_color:"#CCCCCC",external_component_queue_border_color:"#BFBFBF"},sankey:{useMaxWidth:!0,width:600,height:400,linkColor:"gradient",nodeAlignment:"justify",showValues:!0,prefix:"",suffix:""},block:{useMaxWidth:!0,padding:8},packet:{useMaxWidth:!0,rowHeight:32,bitWidth:32,bitsPerRow:32,showBits:!0,paddingX:5,paddingY:5},architecture:{useMaxWidth:!0,padding:40,iconSize:80,fontSize:16},radar:{useMaxWidth:!0,width:600,height:600,marginTop:50,marginRight:50,marginBottom:50,marginLeft:50,axisScaleFactor:1,axisLabelFactor:1.05,curveTension:.17},theme:"default",look:"classic",handDrawnSeed:0,layout:"dagre",maxTextSize:5e4,maxEdges:500,darkMode:!1,fontFamily:'"trebuchet ms", verdana, arial, sans-serif;',logLevel:5,securityLevel:"strict",startOnLoad:!0,arrowMarkerAbsolute:!1,secure:["secure","securityLevel","startOnLoad","maxTextSize","suppressErrorRendering","maxEdges"],legacyMathML:!1,forceLegacyMathML:!1,deterministicIds:!1,fontSize:16,markdownAutoWrap:!0,suppressErrorRendering:!1},Th={...me,deterministicIDSeed:void 0,elk:{mergeEdges:!1,nodePlacementStrategy:"BRANDES_KOEPF",forceNodeModelOrder:!1,considerModelOrder:"NODES_AND_EDGES"},themeCSS:void 0,themeVariables:Fe.default.getThemeVariables(),sequence:{...me.sequence,messageFont:p(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont"),noteFont:p(function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},"noteFont"),actorFont:p(function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}},"actorFont")},class:{hideEmptyMembersBox:!1},gantt:{...me.gantt,tickInterval:void 0,useWidth:void 0},c4:{...me.c4,useWidth:void 0,personFont:p(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},"personFont"),flowchart:{...me.flowchart,inheritDir:!1},external_personFont:p(function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},"external_personFont"),systemFont:p(function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},"systemFont"),external_systemFont:p(function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},"external_systemFont"),system_dbFont:p(function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},"system_dbFont"),external_system_dbFont:p(function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},"external_system_dbFont"),system_queueFont:p(function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},"system_queueFont"),external_system_queueFont:p(function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},"external_system_queueFont"),containerFont:p(function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},"containerFont"),external_containerFont:p(function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},"external_containerFont"),container_dbFont:p(function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},"container_dbFont"),external_container_dbFont:p(function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},"external_container_dbFont"),container_queueFont:p(function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},"container_queueFont"),external_container_queueFont:p(function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},"external_container_queueFont"),componentFont:p(function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},"componentFont"),external_componentFont:p(function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},"external_componentFont"),component_dbFont:p(function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},"component_dbFont"),external_component_dbFont:p(function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},"external_component_dbFont"),component_queueFont:p(function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},"component_queueFont"),external_component_queueFont:p(function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},"external_component_queueFont"),boundaryFont:p(function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},"boundaryFont"),messageFont:p(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont")},pie:{...me.pie,useWidth:984},xyChart:{...me.xyChart,useWidth:void 0},requirement:{...me.requirement,useWidth:void 0},packet:{...me.packet},radar:{...me.radar},treemap:{useMaxWidth:!0,padding:10,diagramPadding:8,showValues:!0,nodeWidth:100,nodeHeight:40,borderWidth:1,valueFontSize:12,labelFontSize:14,valueFormat:","}},Ah=p((e,t="")=>Object.keys(e).reduce((r,i)=>Array.isArray(e[i])?r:typeof e[i]=="object"&&e[i]!==null?[...r,t+i,...Ah(e[i],"")]:[...r,t+i],[]),"keyify"),R0=new Set(Ah(Th,"")),Lh=Th,Bn=p(e=>{if(F.debug("sanitizeDirective called with",e),!(typeof e!="object"||e==null)){if(Array.isArray(e)){e.forEach(t=>Bn(t));return}for(const t of Object.keys(e)){if(F.debug("Checking key",t),t.startsWith("__")||t.includes("proto")||t.includes("constr")||!R0.has(t)||e[t]==null){F.debug("sanitize deleting key: ",t),delete e[t];continue}if(typeof e[t]=="object"){F.debug("sanitizing object",t),Bn(e[t]);continue}const r=["themeCSS","fontFamily","altFontFamily"];for(const i of r)t.includes(i)&&(F.debug("sanitizing css option",t),e[t]=I0(e[t]))}if(e.themeVariables)for(const t of Object.keys(e.themeVariables)){const r=e.themeVariables[t];r?.match&&!r.match(/^[\d "#%(),.;A-Za-z]+$/)&&(e.themeVariables[t]="")}F.debug("After sanitization",e)}},"sanitizeDirective"),I0=p(e=>{let t=0,r=0;for(const i of e){if(t{let r=Tt({},e),i={};for(const n of t)Eh(n),i=Tt(i,n);if(r=Tt(r,i),i.theme&&i.theme in Fe){const n=Tt({},Mn),a=Tt(n.themeVariables||{},i.themeVariables);r.theme&&r.theme in Fe&&(r.themeVariables=Fe[r.theme].getThemeVariables(a))}return wi=r,$h(wi),wi},"updateCurrentConfig"),P0=p(e=>(Vt=Tt({},Rr),Vt=Tt(Vt,e),e.theme&&Fe[e.theme]&&(Vt.themeVariables=Fe[e.theme].getThemeVariables(e.themeVariables)),pa(Vt,ur),Vt),"setSiteConfig"),N0=p(e=>{Mn=Tt({},e)},"saveConfigFromInitialize"),z0=p(e=>(Vt=Tt(Vt,e),pa(Vt,ur),Vt),"updateSiteConfig"),Bh=p(()=>Tt({},Vt),"getSiteConfig"),Mh=p(e=>($h(e),Tt(wi,e),Ot()),"setConfig"),Ot=p(()=>Tt({},wi),"getConfig"),Eh=p(e=>{e&&(["secure",...Vt.secure??[]].forEach(t=>{Object.hasOwn(e,t)&&(F.debug(`Denied attempt to modify a secure key ${t}`,e[t]),delete e[t])}),Object.keys(e).forEach(t=>{t.startsWith("__")&&delete e[t]}),Object.keys(e).forEach(t=>{typeof e[t]=="string"&&(e[t].includes("<")||e[t].includes(">")||e[t].includes("url(data:"))&&delete e[t],typeof e[t]=="object"&&Eh(e[t])}))},"sanitize"),W0=p(e=>{Bn(e),e.fontFamily&&!e.themeVariables?.fontFamily&&(e.themeVariables={...e.themeVariables,fontFamily:e.fontFamily}),ur.push(e),pa(Vt,ur)},"addDirective"),En=p((e=Vt)=>{ur=[],pa(e,ur)},"reset"),q0={LAZY_LOAD_DEPRECATED:"The configuration options lazyLoadedDiagrams and loadExternalDiagramsAtStartup are deprecated. Please use registerExternalDiagrams instead."},jl={},H0=p(e=>{jl[e]||(F.warn(q0[e]),jl[e]=!0)},"issueWarning"),$h=p(e=>{e&&(e.lazyLoadedDiagrams||e.loadExternalDiagramsAtStartup)&&H0("LAZY_LOAD_DEPRECATED")},"checkConfig"),NL=p(()=>{let e={};Mn&&(e=Tt(e,Mn));for(const t of ur)e=Tt(e,t);return e},"getUserDefinedConfig"),Ni=//gi,j0=p(e=>e?Oh(e).replace(/\\n/g,"#br#").split("#br#"):[""],"getRows"),Y0=(()=>{let e=!1;return()=>{e||(Fh(),e=!0)}})();function Fh(){const e="data-temp-href-target";Or.addHook("beforeSanitizeAttributes",t=>{t.tagName==="A"&&t.hasAttribute("target")&&t.setAttribute(e,t.getAttribute("target")??"")}),Or.addHook("afterSanitizeAttributes",t=>{t.tagName==="A"&&t.hasAttribute(e)&&(t.setAttribute("target",t.getAttribute(e)??""),t.removeAttribute(e),t.getAttribute("target")==="_blank"&&t.setAttribute("rel","noopener"))})}p(Fh,"setupDompurifyHooks");var Dh=p(e=>(Y0(),Or.sanitize(e)),"removeScript"),Yl=p((e,t)=>{if(t.flowchart?.htmlLabels!==!1){const r=t.securityLevel;r==="antiscript"||r==="strict"?e=Dh(e):r!=="loose"&&(e=Oh(e),e=e.replace(//g,">"),e=e.replace(/=/g,"="),e=X0(e))}return e},"sanitizeMore"),ee=p((e,t)=>e&&(t.dompurifyConfig?e=Or.sanitize(Yl(e,t),t.dompurifyConfig).toString():e=Or.sanitize(Yl(e,t),{FORBID_TAGS:["style"]}).toString(),e),"sanitizeText"),U0=p((e,t)=>typeof e=="string"?ee(e,t):e.flat().map(r=>ee(r,t)),"sanitizeTextOrArray"),G0=p(e=>Ni.test(e),"hasBreaks"),V0=p(e=>e.split(Ni),"splitBreaks"),X0=p(e=>e.replace(/#br#/g,"
"),"placeholderToBreak"),Oh=p(e=>e.replace(Ni,"#br#"),"breakToPlaceholder"),Z0=p(e=>{let t="";return e&&(t=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,t=CSS.escape(t)),t},"getUrl"),Lt=p(e=>!(e===!1||["false","null","0"].includes(String(e).trim().toLowerCase())),"evaluate"),K0=p(function(...e){const t=e.filter(r=>!isNaN(r));return Math.max(...t)},"getMax"),Q0=p(function(...e){const t=e.filter(r=>!isNaN(r));return Math.min(...t)},"getMin"),Ul=p(function(e){const t=e.split(/(,)/),r=[];for(let i=0;i0&&i+1Math.max(0,e.split(t).length-1),"countOccurrence"),J0=p((e,t)=>{const r=_s(e,"~"),i=_s(t,"~");return r===1&&i===1},"shouldCombineSets"),ty=p(e=>{const t=_s(e,"~");let r=!1;if(t<=1)return e;t%2!==0&&e.startsWith("~")&&(e=e.substring(1),r=!0);const i=[...e];let n=i.indexOf("~"),a=i.lastIndexOf("~");for(;n!==-1&&a!==-1&&n!==a;)i[n]="<",i[a]=">",n=i.indexOf("~"),a=i.lastIndexOf("~");return r&&i.unshift("~"),i.join("")},"processSet"),Gl=p(()=>window.MathMLElement!==void 0,"isMathMLSupported"),Cs=/\$\$(.*)\$\$/g,Ir=p(e=>(e.match(Cs)?.length??0)>0,"hasKatex"),zL=p(async(e,t)=>{const r=document.createElement("div");r.innerHTML=await yo(e,t),r.id="katex-temp",r.style.visibility="hidden",r.style.position="absolute",r.style.top="0",document.querySelector("body")?.insertAdjacentElement("beforeend",r);const n={width:r.clientWidth,height:r.clientHeight};return r.remove(),n},"calculateMathMLDimensions"),ey=p(async(e,t)=>{if(!Ir(e))return e;if(!(Gl()||t.legacyMathML||t.forceLegacyMathML))return e.replace(Cs,"MathML is unsupported in this environment.");{const{default:r}=await pt(async()=>{const{default:n}=await import("./katex.XbL3y5x-.js");return{default:n}},[]),i=t.forceLegacyMathML||!Gl()&&t.legacyMathML?"htmlAndMathml":"mathml";return e.split(Ni).map(n=>Ir(n)?`
${n}
`:`
${n}
`).join("").replace(Cs,(n,a)=>r.renderToString(a,{throwOnError:!0,displayMode:!0,output:i}).replace(/\n/g," ").replace(//g,""))}},"renderKatexUnsanitized"),yo=p(async(e,t)=>ee(await ey(e,t),t),"renderKatexSanitized"),jr={getRows:j0,sanitizeText:ee,sanitizeTextOrArray:U0,hasBreaks:G0,splitBreaks:V0,lineBreakRegex:Ni,removeScript:Dh,getUrl:Z0,evaluate:Lt,getMax:K0,getMin:Q0},ry=p(function(e,t){for(let r of t)e.attr(r[0],r[1])},"d3Attrs"),iy=p(function(e,t,r){let i=new Map;return r?(i.set("width","100%"),i.set("style",`max-width: ${t}px;`)):(i.set("height",e),i.set("width",t)),i},"calculateSvgSizeAttrs"),Rh=p(function(e,t,r,i){const n=iy(t,r,i);ry(e,n)},"configureSvgSize"),ny=p(function(e,t,r,i){const n=t.node().getBBox(),a=n.width,s=n.height;F.info(`SVG bounds: ${a}x${s}`,n);let o=0,l=0;F.info(`Graph bounds: ${o}x${l}`,e),o=a+r*2,l=s+r*2,F.info(`Calculated bounds: ${o}x${l}`),Rh(t,l,o,i);const c=`${n.x-r} ${n.y-r} ${n.width+2*r} ${n.height+2*r}`;t.attr("viewBox",c)},"setupGraphViewbox"),yn={},ay=p((e,t,r)=>{let i="";return e in yn&&yn[e]?i=yn[e](r):F.warn(`No theme found for ${e}`),` & { + font-family: ${r.fontFamily}; + font-size: ${r.fontSize}; + fill: ${r.textColor} + } + @keyframes edge-animation-frame { + from { + stroke-dashoffset: 0; + } + } + @keyframes dash { + to { + stroke-dashoffset: 0; + } + } + & .edge-animation-slow { + stroke-dasharray: 9,5 !important; + stroke-dashoffset: 900; + animation: dash 50s linear infinite; + stroke-linecap: round; + } + & .edge-animation-fast { + stroke-dasharray: 9,5 !important; + stroke-dashoffset: 900; + animation: dash 20s linear infinite; + stroke-linecap: round; + } + /* Classes common for multiple diagrams */ + + & .error-icon { + fill: ${r.errorBkgColor}; + } + & .error-text { + fill: ${r.errorTextColor}; + stroke: ${r.errorTextColor}; + } + + & .edge-thickness-normal { + stroke-width: 1px; + } + & .edge-thickness-thick { + stroke-width: 3.5px + } + & .edge-pattern-solid { + stroke-dasharray: 0; + } + & .edge-thickness-invisible { + stroke-width: 0; + fill: none; + } + & .edge-pattern-dashed{ + stroke-dasharray: 3; + } + .edge-pattern-dotted { + stroke-dasharray: 2; + } + + & .marker { + fill: ${r.lineColor}; + stroke: ${r.lineColor}; + } + & .marker.cross { + stroke: ${r.lineColor}; + } + + & svg { + font-family: ${r.fontFamily}; + font-size: ${r.fontSize}; + } + & p { + margin: 0 + } + + ${i} + + ${t} +`},"getStyles"),sy=p((e,t)=>{t!==void 0&&(yn[e]=t)},"addStylesForDiagram"),oy=ay,Ih={};Xm(Ih,{clear:()=>ly,getAccDescription:()=>fy,getAccTitle:()=>hy,getDiagramTitle:()=>py,setAccDescription:()=>uy,setAccTitle:()=>cy,setDiagramTitle:()=>dy});var xo="",bo="",_o="",Co=p(e=>ee(e,Ot()),"sanitizeText"),ly=p(()=>{xo="",_o="",bo=""},"clear"),cy=p(e=>{xo=Co(e).replace(/^\s+/g,"")},"setAccTitle"),hy=p(()=>xo,"getAccTitle"),uy=p(e=>{_o=Co(e).replace(/\n\s+/g,` +`)},"setAccDescription"),fy=p(()=>_o,"getAccDescription"),dy=p(e=>{bo=Co(e)},"setDiagramTitle"),py=p(()=>bo,"getDiagramTitle"),Vl=F,gy=go,ft=Ot,WL=Mh,qL=Rr,wo=p(e=>ee(e,ft()),"sanitizeText"),my=ny,yy=p(()=>Ih,"getCommonDb"),$n={},Fn=p((e,t,r)=>{$n[e]&&Vl.warn(`Diagram with id ${e} already registered. Overwriting.`),$n[e]=t,r&&Sh(e,r),sy(e,t.styles),t.injectUtils?.(Vl,gy,ft,wo,my,yy(),()=>{})},"registerDiagram"),ws=p(e=>{if(e in $n)return $n[e];throw new xy(e)},"getDiagram"),xy=class extends Error{static{p(this,"DiagramNotFoundError")}constructor(e){super(`Diagram ${e} not found.`)}},by={value:()=>{}};function Ph(){for(var e=0,t=arguments.length,r={},i;e=0&&(i=r.slice(n+1),r=r.slice(0,n)),r&&!t.hasOwnProperty(r))throw new Error("unknown type: "+r);return{type:r,name:i}})}xn.prototype=Ph.prototype={constructor:xn,on:function(e,t){var r=this._,i=_y(e+"",r),n,a=-1,s=i.length;if(arguments.length<2){for(;++a0)for(var r=new Array(n),i=0,n,a;i=0&&(t=e.slice(0,r))!=="xmlns"&&(e=e.slice(r+1)),Zl.hasOwnProperty(t)?{space:Zl[t],local:e}:e}function wy(e){return function(){var t=this.ownerDocument,r=this.namespaceURI;return r===ks&&t.documentElement.namespaceURI===ks?t.createElement(e):t.createElementNS(r,e)}}function ky(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function Nh(e){var t=ga(e);return(t.local?ky:wy)(t)}function vy(){}function ko(e){return e==null?vy:function(){return this.querySelector(e)}}function Sy(e){typeof e!="function"&&(e=ko(e));for(var t=this._groups,r=t.length,i=new Array(r),n=0;n=_&&(_=b+1);!(w=y[_])&&++_=0;)(s=i[n])&&(a&&s.compareDocumentPosition(a)^4&&a.parentNode.insertBefore(s,a),a=s);return this}function Zy(e){e||(e=Ky);function t(u,f){return u&&f?e(u.__data__,f.__data__):!u-!f}for(var r=this._groups,i=r.length,n=new Array(i),a=0;at?1:e>=t?0:NaN}function Qy(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function Jy(){return Array.from(this)}function tx(){for(var e=this._groups,t=0,r=e.length;t1?this.each((t==null?ux:typeof t=="function"?dx:fx)(e,t,r??"")):Pr(this.node(),e)}function Pr(e,t){return e.style.getPropertyValue(t)||jh(e).getComputedStyle(e,null).getPropertyValue(t)}function gx(e){return function(){delete this[e]}}function mx(e,t){return function(){this[e]=t}}function yx(e,t){return function(){var r=t.apply(this,arguments);r==null?delete this[e]:this[e]=r}}function xx(e,t){return arguments.length>1?this.each((t==null?gx:typeof t=="function"?yx:mx)(e,t)):this.node()[e]}function Yh(e){return e.trim().split(/^|\s+/)}function vo(e){return e.classList||new Uh(e)}function Uh(e){this._node=e,this._names=Yh(e.getAttribute("class")||"")}Uh.prototype={add:function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function Gh(e,t){for(var r=vo(e),i=-1,n=t.length;++i=0&&(r=t.slice(i+1),t=t.slice(0,i)),{type:t,name:r}})}function Ux(e){return function(){var t=this.__on;if(t){for(var r=0,i=-1,n=t.length,a;r>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?nn(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?nn(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=eb.exec(e))?new Zt(t[1],t[2],t[3],1):(t=rb.exec(e))?new Zt(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=ib.exec(e))?nn(t[1],t[2],t[3],t[4]):(t=nb.exec(e))?nn(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=ab.exec(e))?ic(t[1],t[2]/100,t[3]/100,1):(t=sb.exec(e))?ic(t[1],t[2]/100,t[3]/100,t[4]):Kl.hasOwnProperty(e)?tc(Kl[e]):e==="transparent"?new Zt(NaN,NaN,NaN,0):null}function tc(e){return new Zt(e>>16&255,e>>8&255,e&255,1)}function nn(e,t,r,i){return i<=0&&(e=t=r=NaN),new Zt(e,t,r,i)}function cb(e){return e instanceof Wi||(e=Ai(e)),e?(e=e.rgb(),new Zt(e.r,e.g,e.b,e.opacity)):new Zt}function vs(e,t,r,i){return arguments.length===1?cb(e):new Zt(e,t,r,i??1)}function Zt(e,t,r,i){this.r=+e,this.g=+t,this.b=+r,this.opacity=+i}So(Zt,vs,Kh(Wi,{brighter(e){return e=e==null?On:Math.pow(On,e),new Zt(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Si:Math.pow(Si,e),new Zt(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Zt(cr(this.r),cr(this.g),cr(this.b),Rn(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:ec,formatHex:ec,formatHex8:hb,formatRgb:rc,toString:rc}));function ec(){return`#${ar(this.r)}${ar(this.g)}${ar(this.b)}`}function hb(){return`#${ar(this.r)}${ar(this.g)}${ar(this.b)}${ar((isNaN(this.opacity)?1:this.opacity)*255)}`}function rc(){const e=Rn(this.opacity);return`${e===1?"rgb(":"rgba("}${cr(this.r)}, ${cr(this.g)}, ${cr(this.b)}${e===1?")":`, ${e})`}`}function Rn(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function cr(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function ar(e){return e=cr(e),(e<16?"0":"")+e.toString(16)}function ic(e,t,r,i){return i<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new ce(e,t,r,i)}function Qh(e){if(e instanceof ce)return new ce(e.h,e.s,e.l,e.opacity);if(e instanceof Wi||(e=Ai(e)),!e)return new ce;if(e instanceof ce)return e;e=e.rgb();var t=e.r/255,r=e.g/255,i=e.b/255,n=Math.min(t,r,i),a=Math.max(t,r,i),s=NaN,o=a-n,l=(a+n)/2;return o?(t===a?s=(r-i)/o+(r0&&l<1?0:s,new ce(s,o,l,e.opacity)}function ub(e,t,r,i){return arguments.length===1?Qh(e):new ce(e,t,r,i??1)}function ce(e,t,r,i){this.h=+e,this.s=+t,this.l=+r,this.opacity=+i}So(ce,ub,Kh(Wi,{brighter(e){return e=e==null?On:Math.pow(On,e),new ce(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Si:Math.pow(Si,e),new ce(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,i=r+(r<.5?r:1-r)*t,n=2*r-i;return new Zt(ts(e>=240?e-240:e+120,n,i),ts(e,n,i),ts(e<120?e+240:e-120,n,i),this.opacity)},clamp(){return new ce(nc(this.h),an(this.s),an(this.l),Rn(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=Rn(this.opacity);return`${e===1?"hsl(":"hsla("}${nc(this.h)}, ${an(this.s)*100}%, ${an(this.l)*100}%${e===1?")":`, ${e})`}`}}));function nc(e){return e=(e||0)%360,e<0?e+360:e}function an(e){return Math.max(0,Math.min(1,e||0))}function ts(e,t,r){return(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)*255}const To=e=>()=>e;function Jh(e,t){return function(r){return e+r*t}}function fb(e,t,r){return e=Math.pow(e,r),t=Math.pow(t,r)-e,r=1/r,function(i){return Math.pow(e+i*t,r)}}function HL(e,t){var r=t-e;return r?Jh(e,r>180||r<-180?r-360*Math.round(r/360):r):To(isNaN(e)?t:e)}function db(e){return(e=+e)==1?tu:function(t,r){return r-t?fb(t,r,e):To(isNaN(t)?r:t)}}function tu(e,t){var r=t-e;return r?Jh(e,r):To(isNaN(e)?t:e)}const ac=(function e(t){var r=db(t);function i(n,a){var s=r((n=vs(n)).r,(a=vs(a)).r),o=r(n.g,a.g),l=r(n.b,a.b),c=tu(n.opacity,a.opacity);return function(h){return n.r=s(h),n.g=o(h),n.b=l(h),n.opacity=c(h),n+""}}return i.gamma=e,i})(1);function We(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}var Ss=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,es=new RegExp(Ss.source,"g");function pb(e){return function(){return e}}function gb(e){return function(t){return e(t)+""}}function mb(e,t){var r=Ss.lastIndex=es.lastIndex=0,i,n,a,s=-1,o=[],l=[];for(e=e+"",t=t+"";(i=Ss.exec(e))&&(n=es.exec(t));)(a=n.index)>r&&(a=t.slice(r,a),o[s]?o[s]+=a:o[++s]=a),(i=i[0])===(n=n[0])?o[s]?o[s]+=n:o[++s]=n:(o[++s]=null,l.push({i:s,x:We(i,n)})),r=es.lastIndex;return r180?h+=360:h-c>180&&(c+=360),f.push({i:u.push(n(u)+"rotate(",null,i)-2,x:We(c,h)})):h&&u.push(n(u)+"rotate("+h+i)}function o(c,h,u,f){c!==h?f.push({i:u.push(n(u)+"skewX(",null,i)-2,x:We(c,h)}):h&&u.push(n(u)+"skewX("+h+i)}function l(c,h,u,f,d,g){if(c!==u||h!==f){var m=d.push(n(d)+"scale(",null,",",null,")");g.push({i:m-4,x:We(c,u)},{i:m-2,x:We(h,f)})}else(u!==1||f!==1)&&d.push(n(d)+"scale("+u+","+f+")")}return function(c,h){var u=[],f=[];return c=e(c),h=e(h),a(c.translateX,c.translateY,h.translateX,h.translateY,u,f),s(c.rotate,h.rotate,u,f),o(c.skewX,h.skewX,u,f),l(c.scaleX,c.scaleY,h.scaleX,h.scaleY,u,f),c=h=null,function(d){for(var g=-1,m=f.length,y;++g=0&&e._call.call(void 0,t),e=e._next;--Nr}function oc(){fr=(Pn=Li.now())+ma,Nr=ui=0;try{wb()}finally{Nr=0,vb(),fr=0}}function kb(){var e=Li.now(),t=e-Pn;t>iu&&(ma-=t,Pn=e)}function vb(){for(var e,t=In,r,i=1/0;t;)t._call?(i>t._time&&(i=t._time),e=t,t=t._next):(r=t._next,t._next=null,t=e?e._next=r:In=r);fi=e,As(i)}function As(e){if(!Nr){ui&&(ui=clearTimeout(ui));var t=e-fr;t>24?(e<1/0&&(ui=setTimeout(oc,e-Li.now()-ma)),ii&&(ii=clearInterval(ii))):(ii||(Pn=Li.now(),ii=setInterval(kb,iu)),Nr=1,nu(oc))}}function lc(e,t,r){var i=new Nn;return t=t==null?0:+t,i.restart(n=>{i.stop(),e(n+t)},t,r),i}var Sb=Ph("start","end","cancel","interrupt"),Tb=[],su=0,cc=1,Ls=2,bn=3,hc=4,Bs=5,_n=6;function ya(e,t,r,i,n,a){var s=e.__transition;if(!s)e.__transition={};else if(r in s)return;Ab(e,r,{name:t,index:i,group:n,on:Sb,tween:Tb,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:su})}function Lo(e,t){var r=de(e,t);if(r.state>su)throw new Error("too late; already scheduled");return r}function ve(e,t){var r=de(e,t);if(r.state>bn)throw new Error("too late; already running");return r}function de(e,t){var r=e.__transition;if(!r||!(r=r[t]))throw new Error("transition not found");return r}function Ab(e,t,r){var i=e.__transition,n;i[t]=r,r.timer=au(a,0,r.time);function a(c){r.state=cc,r.timer.restart(s,r.delay,r.time),r.delay<=c&&s(c-r.delay)}function s(c){var h,u,f,d;if(r.state!==cc)return l();for(h in i)if(d=i[h],d.name===r.name){if(d.state===bn)return lc(s);d.state===hc?(d.state=_n,d.timer.stop(),d.on.call("interrupt",e,e.__data__,d.index,d.group),delete i[h]):+hLs&&i.state=0&&(t=t.slice(0,r)),!t||t==="start"})}function n1(e,t,r){var i,n,a=i1(t)?Lo:ve;return function(){var s=a(this,e),o=s.on;o!==i&&(n=(i=o).copy()).on(t,r),s.on=n}}function a1(e,t){var r=this._id;return arguments.length<2?de(this.node(),r).on.on(e):this.each(n1(r,e,t))}function s1(e){return function(){var t=this.parentNode;for(var r in this.__transition)if(+r!==e)return;t&&t.removeChild(this)}}function o1(){return this.on("end.remove",s1(this._id))}function l1(e){var t=this._name,r=this._id;typeof e!="function"&&(e=ko(e));for(var i=this._groups,n=i.length,a=new Array(n),s=0;s=0))throw new Error(`invalid digits: ${e}`);if(t>15)return hu;const r=10**t;return function(i){this._+=i[0];for(let n=1,a=i.length;ner)if(!(Math.abs(u*l-c*h)>er)||!a)this._append`L${this._x1=t},${this._y1=r}`;else{let d=i-s,g=n-o,m=l*l+c*c,y=d*d+g*g,x=Math.sqrt(m),b=Math.sqrt(f),_=a*Math.tan((Ms-Math.acos((m+f-y)/(2*x*b)))/2),k=_/b,w=_/x;Math.abs(k-1)>er&&this._append`L${t+k*h},${r+k*u}`,this._append`A${a},${a},0,0,${+(u*d>h*g)},${this._x1=t+w*l},${this._y1=r+w*c}`}}arc(t,r,i,n,a,s){if(t=+t,r=+r,i=+i,s=!!s,i<0)throw new Error(`negative radius: ${i}`);let o=i*Math.cos(n),l=i*Math.sin(n),c=t+o,h=r+l,u=1^s,f=s?n-a:a-n;this._x1===null?this._append`M${c},${h}`:(Math.abs(this._x1-c)>er||Math.abs(this._y1-h)>er)&&this._append`L${c},${h}`,i&&(f<0&&(f=f%Es+Es),f>F1?this._append`A${i},${i},0,1,${u},${t-o},${r-l}A${i},${i},0,1,${u},${this._x1=c},${this._y1=h}`:f>er&&this._append`A${i},${i},0,${+(f>=Ms)},${u},${this._x1=t+i*Math.cos(a)},${this._y1=r+i*Math.sin(a)}`)}rect(t,r,i,n){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}h${i=+i}v${+n}h${-i}Z`}toString(){return this._}}function Ar(e){return function(){return e}}const jL=Math.abs,YL=Math.atan2,UL=Math.cos,GL=Math.max,VL=Math.min,XL=Math.sin,ZL=Math.sqrt,uc=1e-12,Mo=Math.PI,fc=Mo/2,KL=2*Mo;function QL(e){return e>1?0:e<-1?Mo:Math.acos(e)}function JL(e){return e>=1?fc:e<=-1?-fc:Math.asin(e)}function R1(e){let t=3;return e.digits=function(r){if(!arguments.length)return t;if(r==null)t=null;else{const i=Math.floor(r);if(!(i>=0))throw new RangeError(`invalid digits: ${r}`);t=i}return e},()=>new O1(t)}function I1(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function uu(e){this._context=e}uu.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function zn(e){return new uu(e)}function P1(e){return e[0]}function N1(e){return e[1]}function z1(e,t){var r=Ar(!0),i=null,n=zn,a=null,s=R1(o);e=typeof e=="function"?e:e===void 0?P1:Ar(e),t=typeof t=="function"?t:t===void 0?N1:Ar(t);function o(l){var c,h=(l=I1(l)).length,u,f=!1,d;for(i==null&&(a=n(d=s())),c=0;c<=h;++c)!(c0)for(var i=e[0],n=t[0],a=e[r]-i,s=t[r]-n,o=-1,l;++o<=r;)l=o/r,this._basis.point(this._beta*e[o]+(1-this._beta)*(i+l*a),this._beta*t[o]+(1-this._beta)*(n+l*s));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}};const H1=(function e(t){function r(i){return t===1?new xa(i):new yu(i,t)}return r.beta=function(i){return e(+i)},r})(.85);function qn(e,t,r){e._context.bezierCurveTo(e._x1+e._k*(e._x2-e._x0),e._y1+e._k*(e._y2-e._y0),e._x2+e._k*(e._x1-t),e._y2+e._k*(e._y1-r),e._x2,e._y2)}function Eo(e,t){this._context=e,this._k=(1-t)/6}Eo.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:qn(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2,this._x1=e,this._y1=t;break;case 2:this._point=3;default:qn(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const xu=(function e(t){function r(i){return new Eo(i,t)}return r.tension=function(i){return e(+i)},r})(0);function $o(e,t){this._context=e,this._k=(1-t)/6}$o.prototype={areaStart:je,areaEnd:je,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:qn(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const j1=(function e(t){function r(i){return new $o(i,t)}return r.tension=function(i){return e(+i)},r})(0);function Fo(e,t){this._context=e,this._k=(1-t)/6}Fo.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:qn(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const Y1=(function e(t){function r(i){return new Fo(i,t)}return r.tension=function(i){return e(+i)},r})(0);function Do(e,t,r){var i=e._x1,n=e._y1,a=e._x2,s=e._y2;if(e._l01_a>uc){var o=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,l=3*e._l01_a*(e._l01_a+e._l12_a);i=(i*o-e._x0*e._l12_2a+e._x2*e._l01_2a)/l,n=(n*o-e._y0*e._l12_2a+e._y2*e._l01_2a)/l}if(e._l23_a>uc){var c=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,h=3*e._l23_a*(e._l23_a+e._l12_a);a=(a*c+e._x1*e._l23_2a-t*e._l12_2a)/h,s=(s*c+e._y1*e._l23_2a-r*e._l12_2a)/h}e._context.bezierCurveTo(i,n,a,s,e._x2,e._y2)}function bu(e,t){this._context=e,this._alpha=t}bu.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,i=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3;default:Do(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const _u=(function e(t){function r(i){return t?new bu(i,t):new Eo(i,0)}return r.alpha=function(i){return e(+i)},r})(.5);function Cu(e,t){this._context=e,this._alpha=t}Cu.prototype={areaStart:je,areaEnd:je,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,i=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:Do(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const U1=(function e(t){function r(i){return t?new Cu(i,t):new $o(i,0)}return r.alpha=function(i){return e(+i)},r})(.5);function wu(e,t){this._context=e,this._alpha=t}wu.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,i=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Do(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const G1=(function e(t){function r(i){return t?new wu(i,t):new Fo(i,0)}return r.alpha=function(i){return e(+i)},r})(.5);function ku(e){this._context=e}ku.prototype={areaStart:je,areaEnd:je,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function V1(e){return new ku(e)}function dc(e){return e<0?-1:1}function pc(e,t,r){var i=e._x1-e._x0,n=t-e._x1,a=(e._y1-e._y0)/(i||n<0&&-0),s=(r-e._y1)/(n||i<0&&-0),o=(a*n+s*i)/(i+n);return(dc(a)+dc(s))*Math.min(Math.abs(a),Math.abs(s),.5*Math.abs(o))||0}function gc(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function rs(e,t,r){var i=e._x0,n=e._y0,a=e._x1,s=e._y1,o=(a-i)/3;e._context.bezierCurveTo(i+o,n+o*t,a-o,s-o*r,a,s)}function Hn(e){this._context=e}Hn.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:rs(this,this._t0,gc(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var r=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,rs(this,gc(this,r=pc(this,e,t)),r);break;default:rs(this,this._t0,r=pc(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function vu(e){this._context=new Su(e)}(vu.prototype=Object.create(Hn.prototype)).point=function(e,t){Hn.prototype.point.call(this,t,e)};function Su(e){this._context=e}Su.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,r,i,n,a){this._context.bezierCurveTo(t,e,i,r,a,n)}};function Tu(e){return new Hn(e)}function Au(e){return new vu(e)}function Lu(e){this._context=e}Lu.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,r=e.length;if(r)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),r===2)this._context.lineTo(e[1],t[1]);else for(var i=mc(e),n=mc(t),a=0,s=1;s=0;--t)n[t]=(s[t]-n[t+1])/a[t];for(a[r-1]=(e[r]+n[r-1])/2,t=0;t=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var r=this._x*(1-this._t)+e*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,t)}break}}this._x=e,this._y=t}};function Mu(e){return new ba(e,.5)}function Eu(e){return new ba(e,0)}function $u(e){return new ba(e,1)}function di(e,t,r){this.k=e,this.x=t,this.y=r}di.prototype={constructor:di,scale:function(e){return e===1?this:new di(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new di(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};di.prototype;var X1=p(e=>{const{securityLevel:t}=ft();let r=ht("body");if(t==="sandbox"){const a=ht(`#i${e}`).node()?.contentDocument??document;r=ht(a.body)}return r.select(`#${e}`)},"selectSvgElement");function Oo(e){return typeof e>"u"||e===null}p(Oo,"isNothing");function Fu(e){return typeof e=="object"&&e!==null}p(Fu,"isObject");function Du(e){return Array.isArray(e)?e:Oo(e)?[]:[e]}p(Du,"toArray");function Ou(e,t){var r,i,n,a;if(t)for(a=Object.keys(t),r=0,i=a.length;ro&&(a=" ... ",t=i-o+a.length),r-i>o&&(s=" ...",r=i+o-s.length),{str:a+e.slice(t,r).replace(/\t/g,"→")+s,pos:i-t+a.length}}p(wn,"getLine");function kn(e,t){return At.repeat(" ",t-e.length)+e}p(kn,"padStart");function Pu(e,t){if(t=Object.create(t||null),!e.buffer)return null;t.maxLength||(t.maxLength=79),typeof t.indent!="number"&&(t.indent=1),typeof t.linesBefore!="number"&&(t.linesBefore=3),typeof t.linesAfter!="number"&&(t.linesAfter=2);for(var r=/\r?\n|\r|\0/g,i=[0],n=[],a,s=-1;a=r.exec(e.buffer);)n.push(a.index),i.push(a.index+a[0].length),e.position<=a.index&&s<0&&(s=i.length-2);s<0&&(s=i.length-1);var o="",l,c,h=Math.min(e.line+t.linesAfter,n.length).toString().length,u=t.maxLength-(t.indent+h+3);for(l=1;l<=t.linesBefore&&!(s-l<0);l++)c=wn(e.buffer,i[s-l],n[s-l],e.position-(i[s]-i[s-l]),u),o=At.repeat(" ",t.indent)+kn((e.line-l+1).toString(),h)+" | "+c.str+` +`+o;for(c=wn(e.buffer,i[s],n[s],e.position,u),o+=At.repeat(" ",t.indent)+kn((e.line+1).toString(),h)+" | "+c.str+` +`,o+=At.repeat("-",t.indent+h+3+c.pos)+`^ +`,l=1;l<=t.linesAfter&&!(s+l>=n.length);l++)c=wn(e.buffer,i[s+l],n[s+l],e.position-(i[s]-i[s+l]),u),o+=At.repeat(" ",t.indent)+kn((e.line+l+1).toString(),h)+" | "+c.str+` +`;return o.replace(/\n$/,"")}p(Pu,"makeSnippet");var r2=Pu,i2=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],n2=["scalar","sequence","mapping"];function Nu(e){var t={};return e!==null&&Object.keys(e).forEach(function(r){e[r].forEach(function(i){t[String(i)]=r})}),t}p(Nu,"compileStyleAliases");function zu(e,t){if(t=t||{},Object.keys(t).forEach(function(r){if(i2.indexOf(r)===-1)throw new Xt('Unknown option "'+r+'" is met in definition of "'+e+'" YAML type.')}),this.options=t,this.tag=e,this.kind=t.kind||null,this.resolve=t.resolve||function(){return!0},this.construct=t.construct||function(r){return r},this.instanceOf=t.instanceOf||null,this.predicate=t.predicate||null,this.represent=t.represent||null,this.representName=t.representName||null,this.defaultStyle=t.defaultStyle||null,this.multi=t.multi||!1,this.styleAliases=Nu(t.styleAliases||null),n2.indexOf(this.kind)===-1)throw new Xt('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}p(zu,"Type$1");var Rt=zu;function $s(e,t){var r=[];return e[t].forEach(function(i){var n=r.length;r.forEach(function(a,s){a.tag===i.tag&&a.kind===i.kind&&a.multi===i.multi&&(n=s)}),r[n]=i}),r}p($s,"compileList");function Wu(){var e={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},t,r;function i(n){n.multi?(e.multi[n.kind].push(n),e.multi.fallback.push(n)):e[n.kind][n.tag]=e.fallback[n.tag]=n}for(p(i,"collectType"),t=0,r=arguments.length;t=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},"binary"),octal:p(function(e){return e>=0?"0o"+e.toString(8):"-0o"+e.toString(8).slice(1)},"octal"),decimal:p(function(e){return e.toString(10)},"decimal"),hexadecimal:p(function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)},"hexadecimal")},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),d2=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function tf(e){return!(e===null||!d2.test(e)||e[e.length-1]==="_")}p(tf,"resolveYamlFloat");function ef(e){var t,r;return t=e.replace(/_/g,"").toLowerCase(),r=t[0]==="-"?-1:1,"+-".indexOf(t[0])>=0&&(t=t.slice(1)),t===".inf"?r===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:t===".nan"?NaN:r*parseFloat(t,10)}p(ef,"constructYamlFloat");var p2=/^[-+]?[0-9]+e/;function rf(e,t){var r;if(isNaN(e))switch(t){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(t){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(t){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(At.isNegativeZero(e))return"-0.0";return r=e.toString(10),p2.test(r)?r.replace("e",".e"):r}p(rf,"representYamlFloat");function nf(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1!==0||At.isNegativeZero(e))}p(nf,"isFloat");var g2=new Rt("tag:yaml.org,2002:float",{kind:"scalar",resolve:tf,construct:ef,predicate:nf,represent:rf,defaultStyle:"lowercase"}),af=c2.extend({implicit:[h2,u2,f2,g2]}),m2=af,sf=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),of=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function lf(e){return e===null?!1:sf.exec(e)!==null||of.exec(e)!==null}p(lf,"resolveYamlTimestamp");function cf(e){var t,r,i,n,a,s,o,l=0,c=null,h,u,f;if(t=sf.exec(e),t===null&&(t=of.exec(e)),t===null)throw new Error("Date resolve error");if(r=+t[1],i=+t[2]-1,n=+t[3],!t[4])return new Date(Date.UTC(r,i,n));if(a=+t[4],s=+t[5],o=+t[6],t[7]){for(l=t[7].slice(0,3);l.length<3;)l+="0";l=+l}return t[9]&&(h=+t[10],u=+(t[11]||0),c=(h*60+u)*6e4,t[9]==="-"&&(c=-c)),f=new Date(Date.UTC(r,i,n,a,s,o,l)),c&&f.setTime(f.getTime()-c),f}p(cf,"constructYamlTimestamp");function hf(e){return e.toISOString()}p(hf,"representYamlTimestamp");var y2=new Rt("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:lf,construct:cf,instanceOf:Date,represent:hf});function uf(e){return e==="<<"||e===null}p(uf,"resolveYamlMerge");var x2=new Rt("tag:yaml.org,2002:merge",{kind:"scalar",resolve:uf}),Io=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/= +\r`;function ff(e){if(e===null)return!1;var t,r,i=0,n=e.length,a=Io;for(r=0;r64)){if(t<0)return!1;i+=6}return i%8===0}p(ff,"resolveYamlBinary");function df(e){var t,r,i=e.replace(/[\r\n=]/g,""),n=i.length,a=Io,s=0,o=[];for(t=0;t>16&255),o.push(s>>8&255),o.push(s&255)),s=s<<6|a.indexOf(i.charAt(t));return r=n%4*6,r===0?(o.push(s>>16&255),o.push(s>>8&255),o.push(s&255)):r===18?(o.push(s>>10&255),o.push(s>>2&255)):r===12&&o.push(s>>4&255),new Uint8Array(o)}p(df,"constructYamlBinary");function pf(e){var t="",r=0,i,n,a=e.length,s=Io;for(i=0;i>18&63],t+=s[r>>12&63],t+=s[r>>6&63],t+=s[r&63]),r=(r<<8)+e[i];return n=a%3,n===0?(t+=s[r>>18&63],t+=s[r>>12&63],t+=s[r>>6&63],t+=s[r&63]):n===2?(t+=s[r>>10&63],t+=s[r>>4&63],t+=s[r<<2&63],t+=s[64]):n===1&&(t+=s[r>>2&63],t+=s[r<<4&63],t+=s[64],t+=s[64]),t}p(pf,"representYamlBinary");function gf(e){return Object.prototype.toString.call(e)==="[object Uint8Array]"}p(gf,"isBinary");var b2=new Rt("tag:yaml.org,2002:binary",{kind:"scalar",resolve:ff,construct:df,predicate:gf,represent:pf}),_2=Object.prototype.hasOwnProperty,C2=Object.prototype.toString;function mf(e){if(e===null)return!0;var t=[],r,i,n,a,s,o=e;for(r=0,i=o.length;r>10)+55296,(e-65536&1023)+56320)}p(Mf,"charFromCodepoint");var Ef=new Array(256),$f=new Array(256);for(tr=0;tr<256;tr++)Ef[tr]=Ds(tr)?1:0,$f[tr]=Ds(tr);var tr;function Ff(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||wf,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}p(Ff,"State$1");function Po(e,t){var r={name:e.filename,buffer:e.input.slice(0,-1),position:e.position,line:e.line,column:e.position-e.lineStart};return r.snippet=r2(r),new Xt(t,r)}p(Po,"generateError");function Q(e,t){throw Po(e,t)}p(Q,"throwError");function Bi(e,t){e.onWarning&&e.onWarning.call(null,Po(e,t))}p(Bi,"throwWarning");var xc={YAML:p(function(t,r,i){var n,a,s;t.version!==null&&Q(t,"duplication of %YAML directive"),i.length!==1&&Q(t,"YAML directive accepts exactly one argument"),n=/^([0-9]+)\.([0-9]+)$/.exec(i[0]),n===null&&Q(t,"ill-formed argument of the YAML directive"),a=parseInt(n[1],10),s=parseInt(n[2],10),a!==1&&Q(t,"unacceptable YAML version of the document"),t.version=i[0],t.checkLineBreaks=s<2,s!==1&&s!==2&&Bi(t,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:p(function(t,r,i){var n,a;i.length!==2&&Q(t,"TAG directive accepts exactly two arguments"),n=i[0],a=i[1],Sf.test(n)||Q(t,"ill-formed tag handle (first argument) of the TAG directive"),Ye.call(t.tagMap,n)&&Q(t,'there is a previously declared suffix for "'+n+'" tag handle'),Tf.test(a)||Q(t,"ill-formed tag prefix (second argument) of the TAG directive");try{a=decodeURIComponent(a)}catch{Q(t,"tag prefix is malformed: "+a)}t.tagMap[n]=a},"handleTagDirective")};function De(e,t,r,i){var n,a,s,o;if(t1&&(e.result+=At.repeat(` +`,t-1))}p(Ca,"writeFoldedLines");function Df(e,t,r){var i,n,a,s,o,l,c,h,u=e.kind,f=e.result,d;if(d=e.input.charCodeAt(e.position),qt(d)||sr(d)||d===35||d===38||d===42||d===33||d===124||d===62||d===39||d===34||d===37||d===64||d===96||(d===63||d===45)&&(n=e.input.charCodeAt(e.position+1),qt(n)||r&&sr(n)))return!1;for(e.kind="scalar",e.result="",a=s=e.position,o=!1;d!==0;){if(d===58){if(n=e.input.charCodeAt(e.position+1),qt(n)||r&&sr(n))break}else if(d===35){if(i=e.input.charCodeAt(e.position-1),qt(i))break}else{if(e.position===e.lineStart&&qi(e)||r&&sr(d))break;if(ue(d))if(l=e.line,c=e.lineStart,h=e.lineIndent,bt(e,!1,-1),e.lineIndent>=t){o=!0,d=e.input.charCodeAt(e.position);continue}else{e.position=s,e.line=l,e.lineStart=c,e.lineIndent=h;break}}o&&(De(e,a,s,!1),Ca(e,e.line-l),a=s=e.position,o=!1),He(d)||(s=e.position+1),d=e.input.charCodeAt(++e.position)}return De(e,a,s,!1),e.result?!0:(e.kind=u,e.result=f,!1)}p(Df,"readPlainScalar");function Of(e,t){var r,i,n;if(r=e.input.charCodeAt(e.position),r!==39)return!1;for(e.kind="scalar",e.result="",e.position++,i=n=e.position;(r=e.input.charCodeAt(e.position))!==0;)if(r===39)if(De(e,i,e.position,!0),r=e.input.charCodeAt(++e.position),r===39)i=e.position,e.position++,n=e.position;else return!0;else ue(r)?(De(e,i,n,!0),Ca(e,bt(e,!1,t)),i=n=e.position):e.position===e.lineStart&&qi(e)?Q(e,"unexpected end of the document within a single quoted scalar"):(e.position++,n=e.position);Q(e,"unexpected end of the stream within a single quoted scalar")}p(Of,"readSingleQuotedScalar");function Rf(e,t){var r,i,n,a,s,o;if(o=e.input.charCodeAt(e.position),o!==34)return!1;for(e.kind="scalar",e.result="",e.position++,r=i=e.position;(o=e.input.charCodeAt(e.position))!==0;){if(o===34)return De(e,r,e.position,!0),e.position++,!0;if(o===92){if(De(e,r,e.position,!0),o=e.input.charCodeAt(++e.position),ue(o))bt(e,!1,t);else if(o<256&&Ef[o])e.result+=$f[o],e.position++;else if((s=Lf(o))>0){for(n=s,a=0;n>0;n--)o=e.input.charCodeAt(++e.position),(s=Af(o))>=0?a=(a<<4)+s:Q(e,"expected hexadecimal character");e.result+=Mf(a),e.position++}else Q(e,"unknown escape sequence");r=i=e.position}else ue(o)?(De(e,r,i,!0),Ca(e,bt(e,!1,t)),r=i=e.position):e.position===e.lineStart&&qi(e)?Q(e,"unexpected end of the document within a double quoted scalar"):(e.position++,i=e.position)}Q(e,"unexpected end of the stream within a double quoted scalar")}p(Rf,"readDoubleQuotedScalar");function If(e,t){var r=!0,i,n,a,s=e.tag,o,l=e.anchor,c,h,u,f,d,g=Object.create(null),m,y,x,b;if(b=e.input.charCodeAt(e.position),b===91)h=93,d=!1,o=[];else if(b===123)h=125,d=!0,o={};else return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=o),b=e.input.charCodeAt(++e.position);b!==0;){if(bt(e,!0,t),b=e.input.charCodeAt(e.position),b===h)return e.position++,e.tag=s,e.anchor=l,e.kind=d?"mapping":"sequence",e.result=o,!0;r?b===44&&Q(e,"expected the node content, but found ','"):Q(e,"missed comma between flow collection entries"),y=m=x=null,u=f=!1,b===63&&(c=e.input.charCodeAt(e.position+1),qt(c)&&(u=f=!0,e.position++,bt(e,!0,t))),i=e.line,n=e.lineStart,a=e.position,dr(e,t,Yn,!1,!0),y=e.tag,m=e.result,bt(e,!0,t),b=e.input.charCodeAt(e.position),(f||e.line===i)&&b===58&&(u=!0,b=e.input.charCodeAt(++e.position),bt(e,!0,t),dr(e,t,Yn,!1,!0),x=e.result),d?or(e,o,g,y,m,x,i,n,a):u?o.push(or(e,null,g,y,m,x,i,n,a)):o.push(m),bt(e,!0,t),b=e.input.charCodeAt(e.position),b===44?(r=!0,b=e.input.charCodeAt(++e.position)):r=!1}Q(e,"unexpected end of the stream within a flow collection")}p(If,"readFlowCollection");function Pf(e,t){var r,i,n=is,a=!1,s=!1,o=t,l=0,c=!1,h,u;if(u=e.input.charCodeAt(e.position),u===124)i=!1;else if(u===62)i=!0;else return!1;for(e.kind="scalar",e.result="";u!==0;)if(u=e.input.charCodeAt(++e.position),u===43||u===45)is===n?n=u===43?yc:A2:Q(e,"repeat of a chomping mode identifier");else if((h=Bf(u))>=0)h===0?Q(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):s?Q(e,"repeat of an indentation width identifier"):(o=t+h-1,s=!0);else break;if(He(u)){do u=e.input.charCodeAt(++e.position);while(He(u));if(u===35)do u=e.input.charCodeAt(++e.position);while(!ue(u)&&u!==0)}for(;u!==0;){for(_a(e),e.lineIndent=0,u=e.input.charCodeAt(e.position);(!s||e.lineIndento&&(o=e.lineIndent),ue(u)){l++;continue}if(e.lineIndentt)&&l!==0)Q(e,"bad indentation of a sequence entry");else if(e.lineIndentt)&&(y&&(s=e.line,o=e.lineStart,l=e.position),dr(e,t,Un,!0,n)&&(y?g=e.result:m=e.result),y||(or(e,u,f,d,g,m,s,o,l),d=g=m=null),bt(e,!0,-1),b=e.input.charCodeAt(e.position)),(e.line===a||e.lineIndent>t)&&b!==0)Q(e,"bad indentation of a mapping entry");else if(e.lineIndentt?l=1:e.lineIndent===t?l=0:e.lineIndentt?l=1:e.lineIndent===t?l=0:e.lineIndent tag; it should be "scalar", not "'+e.kind+'"'),u=0,f=e.implicitTypes.length;u"),e.result!==null&&g.kind!==e.kind&&Q(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+g.kind+'", not "'+e.kind+'"'),g.resolve(e.result,e.tag)?(e.result=g.construct(e.result,e.tag),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):Q(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")}return e.listener!==null&&e.listener("close",e),e.tag!==null||e.anchor!==null||h}p(dr,"composeNode");function Hf(e){var t=e.position,r,i,n,a=!1,s;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap=Object.create(null),e.anchorMap=Object.create(null);(s=e.input.charCodeAt(e.position))!==0&&(bt(e,!0,-1),s=e.input.charCodeAt(e.position),!(e.lineIndent>0||s!==37));){for(a=!0,s=e.input.charCodeAt(++e.position),r=e.position;s!==0&&!qt(s);)s=e.input.charCodeAt(++e.position);for(i=e.input.slice(r,e.position),n=[],i.length<1&&Q(e,"directive name must not be less than one character in length");s!==0;){for(;He(s);)s=e.input.charCodeAt(++e.position);if(s===35){do s=e.input.charCodeAt(++e.position);while(s!==0&&!ue(s));break}if(ue(s))break;for(r=e.position;s!==0&&!qt(s);)s=e.input.charCodeAt(++e.position);n.push(e.input.slice(r,e.position))}s!==0&&_a(e),Ye.call(xc,i)?xc[i](e,i,n):Bi(e,'unknown document directive "'+i+'"')}if(bt(e,!0,-1),e.lineIndent===0&&e.input.charCodeAt(e.position)===45&&e.input.charCodeAt(e.position+1)===45&&e.input.charCodeAt(e.position+2)===45?(e.position+=3,bt(e,!0,-1)):a&&Q(e,"directives end mark is expected"),dr(e,e.lineIndent-1,Un,!1,!0),bt(e,!0,-1),e.checkLineBreaks&&B2.test(e.input.slice(t,e.position))&&Bi(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&qi(e)){e.input.charCodeAt(e.position)===46&&(e.position+=3,bt(e,!0,-1));return}if(e.position"u"&&(r=t,t=null);var i=No(e,r);if(typeof t!="function")return i;for(var n=0,a=i.length;n=55296&&r<=56319&&t+1=56320&&i<=57343)?(r-55296)*1024+i-56320+65536:r}p(Er,"codePointAt");function Wo(e){var t=/^\n* /;return t.test(e)}p(Wo,"needIndentIndicator");var nd=1,Ws=2,ad=3,sd=4,Br=5;function od(e,t,r,i,n,a,s,o){var l,c=0,h=null,u=!1,f=!1,d=i!==-1,g=-1,m=rd(Er(e,0))&&id(Er(e,e.length-1));if(t||s)for(l=0;l=65536?l+=2:l++){if(c=Er(e,l),!Wr(c))return Br;m=m&&zs(c,h,o),h=c}else{for(l=0;l=65536?l+=2:l++){if(c=Er(e,l),c===Mi)u=!0,d&&(f=f||l-g-1>i&&e[g+1]!==" ",g=l);else if(!Wr(c))return Br;m=m&&zs(c,h,o),h=c}f=f||d&&l-g-1>i&&e[g+1]!==" "}return!u&&!f?m&&!s&&!n(e)?nd:a===Ei?Br:Ws:r>9&&Wo(e)?Br:s?a===Ei?Br:Ws:f?sd:ad}p(od,"chooseScalarStyle");function ld(e,t,r,i,n){e.dump=(function(){if(t.length===0)return e.quotingType===Ei?'""':"''";if(!e.noCompatMode&&(Z2.indexOf(t)!==-1||K2.test(t)))return e.quotingType===Ei?'"'+t+'"':"'"+t+"'";var a=e.indent*Math.max(1,r),s=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-a),o=i||e.flowLevel>-1&&r>=e.flowLevel;function l(c){return ed(e,c)}switch(p(l,"testAmbiguity"),od(t,o,e.indent,s,l,e.quotingType,e.forceQuotes&&!i,n)){case nd:return t;case Ws:return"'"+t.replace(/'/g,"''")+"'";case ad:return"|"+qs(t,e.indent)+Hs(Ps(t,a));case sd:return">"+qs(t,e.indent)+Hs(Ps(cd(t,s),a));case Br:return'"'+hd(t)+'"';default:throw new Xt("impossible error: invalid scalar style")}})()}p(ld,"writeScalar");function qs(e,t){var r=Wo(e)?String(t):"",i=e[e.length-1]===` +`,n=i&&(e[e.length-2]===` +`||e===` +`),a=n?"+":i?"":"-";return r+a+` +`}p(qs,"blockHeader");function Hs(e){return e[e.length-1]===` +`?e.slice(0,-1):e}p(Hs,"dropEndingNewline");function cd(e,t){for(var r=/(\n+)([^\n]*)/g,i=(function(){var c=e.indexOf(` +`);return c=c!==-1?c:e.length,r.lastIndex=c,js(e.slice(0,c),t)})(),n=e[0]===` +`||e[0]===" ",a,s;s=r.exec(e);){var o=s[1],l=s[2];a=l[0]===" ",i+=o+(!n&&!a&&l!==""?` +`:"")+js(l,t),n=a}return i}p(cd,"foldString");function js(e,t){if(e===""||e[0]===" ")return e;for(var r=/ [^ ]/g,i,n=0,a,s=0,o=0,l="";i=r.exec(e);)o=i.index,o-n>t&&(a=s>n?s:o,l+=` +`+e.slice(n,a),n=a+1),s=o;return l+=` +`,e.length-n>t&&s>n?l+=e.slice(n,s)+` +`+e.slice(s+1):l+=e.slice(n),l.slice(1)}p(js,"foldLine");function hd(e){for(var t="",r=0,i,n=0;n=65536?n+=2:n++)r=Er(e,n),i=Pt[r],!i&&Wr(r)?(t+=e[n],r>=65536&&(t+=e[n+1])):t+=i||Jf(r);return t}p(hd,"escapeString");function ud(e,t,r){var i="",n=e.tag,a,s,o;for(a=0,s=r.length;a"u"&&ke(e,t,null,!1,!1))&&(i!==""&&(i+=","+(e.condenseFlow?"":" ")),i+=e.dump);e.tag=n,e.dump="["+i+"]"}p(ud,"writeFlowSequence");function Ys(e,t,r,i){var n="",a=e.tag,s,o,l;for(s=0,o=r.length;s"u"&&ke(e,t+1,null,!0,!0,!1,!0))&&((!i||n!=="")&&(n+=Vn(e,t)),e.dump&&Mi===e.dump.charCodeAt(0)?n+="-":n+="- ",n+=e.dump);e.tag=a,e.dump=n||"[]"}p(Ys,"writeBlockSequence");function fd(e,t,r){var i="",n=e.tag,a=Object.keys(r),s,o,l,c,h;for(s=0,o=a.length;s1024&&(h+="? "),h+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),ke(e,t,c,!1,!1)&&(h+=e.dump,i+=h));e.tag=n,e.dump="{"+i+"}"}p(fd,"writeFlowMapping");function dd(e,t,r,i){var n="",a=e.tag,s=Object.keys(r),o,l,c,h,u,f;if(e.sortKeys===!0)s.sort();else if(typeof e.sortKeys=="function")s.sort(e.sortKeys);else if(e.sortKeys)throw new Xt("sortKeys must be a boolean or a function");for(o=0,l=s.length;o1024,u&&(e.dump&&Mi===e.dump.charCodeAt(0)?f+="?":f+="? "),f+=e.dump,u&&(f+=Vn(e,t)),ke(e,t+1,h,!0,u)&&(e.dump&&Mi===e.dump.charCodeAt(0)?f+=":":f+=": ",f+=e.dump,n+=f));e.tag=a,e.dump=n||"{}"}p(dd,"writeBlockMapping");function Us(e,t,r){var i,n,a,s,o,l;for(n=r?e.explicitTypes:e.implicitTypes,a=0,s=n.length;a tag resolver accepts not "'+l+'" style');e.dump=i}return!0}return!1}p(Us,"detectType");function ke(e,t,r,i,n,a,s){e.tag=null,e.dump=r,Us(e,r,!1)||Us(e,r,!0);var o=Yf.call(e.dump),l=i,c;i&&(i=e.flowLevel<0||e.flowLevel>t);var h=o==="[object Object]"||o==="[object Array]",u,f;if(h&&(u=e.duplicates.indexOf(r),f=u!==-1),(e.tag!==null&&e.tag!=="?"||f||e.indent!==2&&t>0)&&(n=!1),f&&e.usedDuplicates[u])e.dump="*ref_"+u;else{if(h&&f&&!e.usedDuplicates[u]&&(e.usedDuplicates[u]=!0),o==="[object Object]")i&&Object.keys(e.dump).length!==0?(dd(e,t,e.dump,n),f&&(e.dump="&ref_"+u+e.dump)):(fd(e,t,e.dump),f&&(e.dump="&ref_"+u+" "+e.dump));else if(o==="[object Array]")i&&e.dump.length!==0?(e.noArrayIndent&&!s&&t>0?Ys(e,t-1,e.dump,n):Ys(e,t,e.dump,n),f&&(e.dump="&ref_"+u+e.dump)):(ud(e,t,e.dump),f&&(e.dump="&ref_"+u+" "+e.dump));else if(o==="[object String]")e.tag!=="?"&&ld(e,e.dump,t,a,l);else{if(o==="[object Undefined]")return!1;if(e.skipInvalid)return!1;throw new Xt("unacceptable kind of an object to dump "+o)}e.tag!==null&&e.tag!=="?"&&(c=encodeURI(e.tag[0]==="!"?e.tag.slice(1):e.tag).replace(/!/g,"%21"),e.tag[0]==="!"?c="!"+c:c.slice(0,18)==="tag:yaml.org,2002:"?c="!!"+c.slice(18):c="!<"+c+">",e.dump=c+" "+e.dump)}return!0}p(ke,"writeNode");function pd(e,t){var r=[],i=[],n,a;for(Xn(e,r,i),n=0,a=i.length;nArray.isArray(e)?{x:e[0],y:e[1]}:e,"pointTransformer"),i_=p(e=>({x:p(function(t,r,i){let n=0;const a=yt(i[0]).x=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(Dt,e.arrowTypeEnd)){const{angle:d,deltaX:g}=pi(i[i.length-1],i[i.length-2]);n=Dt[e.arrowTypeEnd]*Math.cos(d)*(g>=0?1:-1)}const s=Math.abs(yt(t).x-yt(i[i.length-1]).x),o=Math.abs(yt(t).y-yt(i[i.length-1]).y),l=Math.abs(yt(t).x-yt(i[0]).x),c=Math.abs(yt(t).y-yt(i[0]).y),h=Dt[e.arrowTypeStart],u=Dt[e.arrowTypeEnd],f=1;if(s0&&o0&&c=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(Dt,e.arrowTypeEnd)){const{angle:d,deltaY:g}=pi(i[i.length-1],i[i.length-2]);n=Dt[e.arrowTypeEnd]*Math.abs(Math.sin(d))*(g>=0?1:-1)}const s=Math.abs(yt(t).y-yt(i[i.length-1]).y),o=Math.abs(yt(t).x-yt(i[i.length-1]).x),l=Math.abs(yt(t).y-yt(i[0]).y),c=Math.abs(yt(t).x-yt(i[0]).x),h=Dt[e.arrowTypeStart],u=Dt[e.arrowTypeEnd],f=1;if(s0&&o0&&c{const t=e?.subGraphTitleMargin?.top??0,r=e?.subGraphTitleMargin?.bottom??0,i=t+r;return{subGraphTitleTopMargin:t,subGraphTitleBottomMargin:r,subGraphTitleTotalMargin:i}},"getSubGraphTitleMargins"),n_=p(e=>{const{handDrawnSeed:t}=ft();return{fill:e,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:e,seed:t}},"solidStateFill"),Yr=p(e=>{const t=a_([...e.cssCompiledStyles||[],...e.cssStyles||[],...e.labelStyle||[]]);return{stylesMap:t,stylesArray:[...t]}},"compileStyles"),a_=p(e=>{const t=new Map;return e.forEach(r=>{const[i,n]=r.split(":");t.set(i.trim(),n?.trim())}),t},"styles2Map"),gd=p(e=>e==="color"||e==="font-size"||e==="font-family"||e==="font-weight"||e==="font-style"||e==="text-decoration"||e==="text-align"||e==="text-transform"||e==="line-height"||e==="letter-spacing"||e==="word-spacing"||e==="text-shadow"||e==="text-overflow"||e==="white-space"||e==="word-wrap"||e==="word-break"||e==="overflow-wrap"||e==="hyphens","isLabelStyle"),U=p(e=>{const{stylesArray:t}=Yr(e),r=[],i=[],n=[],a=[];return t.forEach(s=>{const o=s[0];gd(o)?r.push(s.join(":")+" !important"):(i.push(s.join(":")+" !important"),o.includes("stroke")&&n.push(s.join(":")+" !important"),o==="fill"&&a.push(s.join(":")+" !important"))}),{labelStyles:r.join(";"),nodeStyles:i.join(";"),stylesArray:t,borderStyles:n,backgroundStyles:a}},"styles2String"),Y=p((e,t)=>{const{themeVariables:r,handDrawnSeed:i}=ft(),{nodeBorder:n,mainBkg:a}=r,{stylesMap:s}=Yr(e);return Object.assign({roughness:.7,fill:s.get("fill")||a,fillStyle:"hachure",fillWeight:4,hachureGap:5.2,stroke:s.get("stroke")||n,seed:i,strokeWidth:s.get("stroke-width")?.replace("px","")||1.3,fillLineDash:[0,0],strokeLineDash:s_(s.get("stroke-dasharray"))},t)},"userNodeOverrides"),s_=p(e=>{if(!e)return[0,0];const t=e.trim().split(/\s+/).map(Number);if(t.length===1){const n=isNaN(t[0])?0:t[0];return[n,n]}const r=isNaN(t[0])?0:t[0],i=isNaN(t[1])?0:t[1];return[r,i]},"getStrokeDashArray"),ni={},St={},_c;function o_(){return _c||(_c=1,Object.defineProperty(St,"__esModule",{value:!0}),St.BLANK_URL=St.relativeFirstCharacters=St.whitespaceEscapeCharsRegex=St.urlSchemeRegex=St.ctrlCharactersRegex=St.htmlCtrlEntityRegex=St.htmlEntitiesRegex=St.invalidProtocolRegex=void 0,St.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im,St.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g,St.htmlCtrlEntityRegex=/&(newline|tab);/gi,St.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,St.urlSchemeRegex=/^.+(:|:)/gim,St.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g,St.relativeFirstCharacters=[".","/"],St.BLANK_URL="about:blank"),St}var Cc;function l_(){if(Cc)return ni;Cc=1,Object.defineProperty(ni,"__esModule",{value:!0}),ni.sanitizeUrl=void 0;var e=o_();function t(s){return e.relativeFirstCharacters.indexOf(s[0])>-1}function r(s){var o=s.replace(e.ctrlCharactersRegex,"");return o.replace(e.htmlEntitiesRegex,function(l,c){return String.fromCharCode(c)})}function i(s){return URL.canParse(s)}function n(s){try{return decodeURIComponent(s)}catch{return s}}function a(s){if(!s)return e.BLANK_URL;var o,l=n(s.trim());do l=r(l).replace(e.htmlCtrlEntityRegex,"").replace(e.ctrlCharactersRegex,"").replace(e.whitespaceEscapeCharsRegex,"").trim(),l=n(l),o=l.match(e.ctrlCharactersRegex)||l.match(e.htmlEntitiesRegex)||l.match(e.htmlCtrlEntityRegex)||l.match(e.whitespaceEscapeCharsRegex);while(o&&o.length>0);var c=l;if(!c)return e.BLANK_URL;if(t(c))return c;var h=c.trimStart(),u=h.match(e.urlSchemeRegex);if(!u)return c;var f=u[0].toLowerCase().trim();if(e.invalidProtocolRegex.test(f))return e.BLANK_URL;var d=h.replace(/\\/g,"/");if(f==="mailto:"||f.includes("://"))return d;if(f==="http:"||f==="https:"){if(!i(d))return e.BLANK_URL;var g=new URL(d);return g.protocol=g.protocol.toLowerCase(),g.hostname=g.hostname.toLowerCase(),g.toString()}return d}return ni.sanitizeUrl=a,ni}var c_=l_(),md=typeof global=="object"&&global&&global.Object===Object&&global,h_=typeof self=="object"&&self&&self.Object===Object&&self,Se=md||h_||Function("return this")(),Zn=Se.Symbol,yd=Object.prototype,u_=yd.hasOwnProperty,f_=yd.toString,ai=Zn?Zn.toStringTag:void 0;function d_(e){var t=u_.call(e,ai),r=e[ai];try{e[ai]=void 0;var i=!0}catch{}var n=f_.call(e);return i&&(t?e[ai]=r:delete e[ai]),n}var p_=Object.prototype,g_=p_.toString;function m_(e){return g_.call(e)}var y_="[object Null]",x_="[object Undefined]",wc=Zn?Zn.toStringTag:void 0;function Ur(e){return e==null?e===void 0?x_:y_:wc&&wc in Object(e)?d_(e):m_(e)}function yr(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var b_="[object AsyncFunction]",__="[object Function]",C_="[object GeneratorFunction]",w_="[object Proxy]";function Ho(e){if(!yr(e))return!1;var t=Ur(e);return t==__||t==C_||t==b_||t==w_}var ns=Se["__core-js_shared__"],kc=(function(){var e=/[^.]+$/.exec(ns&&ns.keys&&ns.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""})();function k_(e){return!!kc&&kc in e}var v_=Function.prototype,S_=v_.toString;function xr(e){if(e!=null){try{return S_.call(e)}catch{}try{return e+""}catch{}}return""}var T_=/[\\^$.*+?()[\]{}|]/g,A_=/^\[object .+?Constructor\]$/,L_=Function.prototype,B_=Object.prototype,M_=L_.toString,E_=B_.hasOwnProperty,$_=RegExp("^"+M_.call(E_).replace(T_,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function F_(e){if(!yr(e)||k_(e))return!1;var t=Ho(e)?$_:A_;return t.test(xr(e))}function D_(e,t){return e?.[t]}function br(e,t){var r=D_(e,t);return F_(r)?r:void 0}var Fi=br(Object,"create");function O_(){this.__data__=Fi?Fi(null):{},this.size=0}function R_(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var I_="__lodash_hash_undefined__",P_=Object.prototype,N_=P_.hasOwnProperty;function z_(e){var t=this.__data__;if(Fi){var r=t[e];return r===I_?void 0:r}return N_.call(t,e)?t[e]:void 0}var W_=Object.prototype,q_=W_.hasOwnProperty;function H_(e){var t=this.__data__;return Fi?t[e]!==void 0:q_.call(t,e)}var j_="__lodash_hash_undefined__";function Y_(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=Fi&&t===void 0?j_:t,this}function pr(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t-1}function Q_(e,t){var r=this.__data__,i=ka(r,e);return i<0?(++this.size,r.push([e,t])):r[i][1]=t,this}function Pe(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t-1&&e%1==0&&e<=SC}function Ta(e){return e!=null&&wd(e.length)&&!Ho(e)}function TC(e){return ji(e)&&Ta(e)}function AC(){return!1}var kd=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Mc=kd&&typeof module=="object"&&module&&!module.nodeType&&module,LC=Mc&&Mc.exports===kd,Ec=LC?Se.Buffer:void 0,BC=Ec?Ec.isBuffer:void 0,Yo=BC||AC,MC="[object Object]",EC=Function.prototype,$C=Object.prototype,vd=EC.toString,FC=$C.hasOwnProperty,DC=vd.call(Object);function OC(e){if(!ji(e)||Ur(e)!=MC)return!1;var t=_d(e);if(t===null)return!0;var r=FC.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&vd.call(r)==DC}var RC="[object Arguments]",IC="[object Array]",PC="[object Boolean]",NC="[object Date]",zC="[object Error]",WC="[object Function]",qC="[object Map]",HC="[object Number]",jC="[object Object]",YC="[object RegExp]",UC="[object Set]",GC="[object String]",VC="[object WeakMap]",XC="[object ArrayBuffer]",ZC="[object DataView]",KC="[object Float32Array]",QC="[object Float64Array]",JC="[object Int8Array]",tw="[object Int16Array]",ew="[object Int32Array]",rw="[object Uint8Array]",iw="[object Uint8ClampedArray]",nw="[object Uint16Array]",aw="[object Uint32Array]",gt={};gt[KC]=gt[QC]=gt[JC]=gt[tw]=gt[ew]=gt[rw]=gt[iw]=gt[nw]=gt[aw]=!0;gt[RC]=gt[IC]=gt[XC]=gt[PC]=gt[ZC]=gt[NC]=gt[zC]=gt[WC]=gt[qC]=gt[HC]=gt[jC]=gt[YC]=gt[UC]=gt[GC]=gt[VC]=!1;function sw(e){return ji(e)&&wd(e.length)&&!!gt[Ur(e)]}function ow(e){return function(t){return e(t)}}var Sd=typeof exports=="object"&&exports&&!exports.nodeType&&exports,ki=Sd&&typeof module=="object"&&module&&!module.nodeType&&module,lw=ki&&ki.exports===Sd,as=lw&&md.process,$c=(function(){try{var e=ki&&ki.require&&ki.require("util").types;return e||as&&as.binding&&as.binding("util")}catch{}})(),Fc=$c&&$c.isTypedArray,Uo=Fc?ow(Fc):sw;function Vs(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}var cw=Object.prototype,hw=cw.hasOwnProperty;function uw(e,t,r){var i=e[t];(!(hw.call(e,t)&&wa(i,r))||r===void 0&&!(t in e))&&jo(e,t,r)}function fw(e,t,r,i){var n=!r;r||(r={});for(var a=-1,s=t.length;++a-1&&e%1==0&&e0){if(++t>=Bw)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var Fw=$w(Lw);function Dw(e,t){return Fw(Tw(e,t,Bd),e+"")}function Ow(e,t,r){if(!yr(r))return!1;var i=typeof t;return(i=="number"?Ta(r)&&Td(t,r.length):i=="string"&&t in r)?wa(r[t],e):!1}function Rw(e){return Dw(function(t,r){var i=-1,n=r.length,a=n>1?r[n-1]:void 0,s=n>2?r[2]:void 0;for(a=e.length>3&&typeof a=="function"?(n--,a):void 0,s&&Ow(r[0],r[1],s)&&(a=n<3?void 0:a,n=1),t=Object(t);++io.args);Bn(s),i=Tt(i,[...s])}else i=r.args;if(!i)return;let n=mo(e,t);const a="config";return i[a]!==void 0&&(n==="flowchart-v2"&&(n="flowchart"),i[n]=i[a],delete i[a]),i},"detectInit"),Md=p(function(e,t=null){try{const r=new RegExp(`[%]{2}(?![{]${zw.source})(?=[}][%]{2}).* +`,"ig");e=e.trim().replace(r,"").replace(/'/gm,'"'),F.debug(`Detecting diagram directive${t!==null?" type:"+t:""} based on the text:${e}`);let i;const n=[];for(;(i=Ci.exec(e))!==null;)if(i.index===Ci.lastIndex&&Ci.lastIndex++,i&&!t||t&&i[1]?.match(t)||t&&i[2]?.match(t)){const a=i[1]?i[1]:i[2],s=i[3]?i[3].trim():i[4]?JSON.parse(i[4].trim()):null;n.push({type:a,args:s})}return n.length===0?{type:e,args:null}:n.length===1?n[0]:n}catch(r){return F.error(`ERROR: ${r.message} - Unable to parse directive type: '${t}' based on the text: '${e}'`),{type:void 0,args:null}}},"detectDirective"),qw=p(function(e){return e.replace(Ci,"")},"removeDirectives"),Hw=p(function(e,t){for(const[r,i]of t.entries())if(i.match(e))return r;return-1},"isSubstringInArray");function Go(e,t){if(!e)return t;const r=`curve${e.charAt(0).toUpperCase()+e.slice(1)}`;return Nw[r]??t}p(Go,"interpolateToCurve");function Ed(e,t){const r=e.trim();if(r)return t.securityLevel!=="loose"?c_.sanitizeUrl(r):r}p(Ed,"formatUrl");var jw=p((e,...t)=>{const r=e.split("."),i=r.length-1,n=r[i];let a=window;for(let s=0;s{r+=Vo(n,t),t=n});const i=r/2;return Xo(e,i)}p($d,"traverseEdge");function Fd(e){return e.length===1?e[0]:$d(e)}p(Fd,"calcLabelPosition");var Oc=p((e,t=2)=>{const r=Math.pow(10,t);return Math.round(e*r)/r},"roundNumber"),Xo=p((e,t)=>{let r,i=t;for(const n of e){if(r){const a=Vo(n,r);if(a===0)return r;if(a=1)return{x:n.x,y:n.y};if(s>0&&s<1)return{x:Oc((1-s)*r.x+s*n.x,5),y:Oc((1-s)*r.y+s*n.y,5)}}}r=n}throw new Error("Could not find a suitable point for the given distance")},"calculatePoint"),Yw=p((e,t,r)=>{F.info(`our points ${JSON.stringify(t)}`),t[0]!==r&&(t=t.reverse());const n=Xo(t,25),a=e?10:5,s=Math.atan2(t[0].y-n.y,t[0].x-n.x),o={x:0,y:0};return o.x=Math.sin(s)*a+(t[0].x+n.x)/2,o.y=-Math.cos(s)*a+(t[0].y+n.y)/2,o},"calcCardinalityPosition");function Dd(e,t,r){const i=structuredClone(r);F.info("our points",i),t!=="start_left"&&t!=="start_right"&&i.reverse();const n=25+e,a=Xo(i,n),s=10+e*.5,o=Math.atan2(i[0].y-a.y,i[0].x-a.x),l={x:0,y:0};return t==="start_left"?(l.x=Math.sin(o+Math.PI)*s+(i[0].x+a.x)/2,l.y=-Math.cos(o+Math.PI)*s+(i[0].y+a.y)/2):t==="end_right"?(l.x=Math.sin(o-Math.PI)*s+(i[0].x+a.x)/2-5,l.y=-Math.cos(o-Math.PI)*s+(i[0].y+a.y)/2-5):t==="end_left"?(l.x=Math.sin(o)*s+(i[0].x+a.x)/2-5,l.y=-Math.cos(o)*s+(i[0].y+a.y)/2-5):(l.x=Math.sin(o)*s+(i[0].x+a.x)/2,l.y=-Math.cos(o)*s+(i[0].y+a.y)/2),l}p(Dd,"calcTerminalLabelPosition");function Od(e){let t="",r="";for(const i of e)i!==void 0&&(i.startsWith("color:")||i.startsWith("text-align:")?r=r+i+";":t=t+i+";");return{style:t,labelStyle:r}}p(Od,"getStylesFromArray");var Rc=0,Uw=p(()=>(Rc++,"id-"+Math.random().toString(36).substr(2,12)+"-"+Rc),"generateId");function Rd(e){let t="";const r="0123456789abcdef",i=r.length;for(let n=0;nRd(e.length),"random"),Vw=p(function(){return{x:0,y:0,fill:void 0,anchor:"start",style:"#666",width:100,height:100,textMargin:0,rx:0,ry:0,valign:void 0,text:""}},"getTextObj"),Xw=p(function(e,t){const r=t.text.replace(jr.lineBreakRegex," "),[,i]=Aa(t.fontSize),n=e.append("text");n.attr("x",t.x),n.attr("y",t.y),n.style("text-anchor",t.anchor),n.style("font-family",t.fontFamily),n.style("font-size",i),n.style("font-weight",t.fontWeight),n.attr("fill",t.fill),t.class!==void 0&&n.attr("class",t.class);const a=n.append("tspan");return a.attr("x",t.x+t.textMargin*2),a.attr("fill",t.fill),a.text(r),n},"drawSimpleText"),Zw=Hi((e,t,r)=>{if(!e||(r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"
"},r),jr.lineBreakRegex.test(e)))return e;const i=e.split(" ").filter(Boolean),n=[];let a="";return i.forEach((s,o)=>{const l=Re(`${s} `,r),c=Re(a,r);if(l>t){const{hyphenatedStrings:f,remainingWord:d}=Kw(s,t,"-",r);n.push(a,...f),a=d}else c+l>=t?(n.push(a),a=s):a=[a,s].filter(Boolean).join(" ");o+1===i.length&&n.push(a)}),n.filter(s=>s!=="").join(r.joinWith)},(e,t,r)=>`${e}${t}${r.fontSize}${r.fontWeight}${r.fontFamily}${r.joinWith}`),Kw=Hi((e,t,r="-",i)=>{i=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},i);const n=[...e],a=[];let s="";return n.forEach((o,l)=>{const c=`${s}${o}`;if(Re(c,i)>=t){const u=l+1,f=n.length===u,d=`${c}${r}`;a.push(f?c:d),s=""}else s=c}),{hyphenatedStrings:a,remainingWord:s}},(e,t,r="-",i)=>`${e}${t}${r}${i.fontSize}${i.fontWeight}${i.fontFamily}`);function Id(e,t){return Zo(e,t).height}p(Id,"calculateTextHeight");function Re(e,t){return Zo(e,t).width}p(Re,"calculateTextWidth");var Zo=Hi((e,t)=>{const{fontSize:r=12,fontFamily:i="Arial",fontWeight:n=400}=t;if(!e)return{width:0,height:0};const[,a]=Aa(r),s=["sans-serif",i],o=e.split(jr.lineBreakRegex),l=[],c=ht("body");if(!c.remove)return{width:0,height:0,lineHeight:0};const h=c.append("svg");for(const f of s){let d=0;const g={width:0,height:0,lineHeight:0};for(const m of o){const y=Vw();y.text=m||Pw;const x=Xw(h,y).style("font-size",a).style("font-weight",n).style("font-family",f),b=(x._groups||x)[0][0].getBBox();if(b.width===0&&b.height===0)throw new Error("svg element not in render tree");g.width=Math.round(Math.max(g.width,b.width)),d=Math.round(b.height),g.height+=d,g.lineHeight=Math.round(Math.max(g.lineHeight,d))}l.push(g)}h.remove();const u=isNaN(l[1].height)||isNaN(l[1].width)||isNaN(l[1].lineHeight)||l[0].height>l[1].height&&l[0].width>l[1].width&&l[0].lineHeight>l[1].lineHeight?0:1;return l[u]},(e,t)=>`${e}${t.fontSize}${t.fontWeight}${t.fontFamily}`),Qw=class{constructor(e=!1,t){this.count=0,this.count=t?t.length:0,this.next=e?()=>this.count++:()=>Date.now()}static{p(this,"InitIDGenerator")}},on,Jw=p(function(e){return on=on||document.createElement("div"),e=escape(e).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),on.innerHTML=e,unescape(on.textContent)},"entityDecode");function Ko(e){return"str"in e}p(Ko,"isDetailedError");var tk=p((e,t,r,i)=>{if(!i)return;const n=e.node()?.getBBox();n&&e.append("text").text(i).attr("text-anchor","middle").attr("x",n.x+n.width/2).attr("y",-r).attr("class",t)},"insertTitle"),Aa=p(e=>{if(typeof e=="number")return[e,e+"px"];const t=parseInt(e??"",10);return Number.isNaN(t)?[void 0,void 0]:e===String(t)?[t,e+"px"]:[t,e]},"parseFontSize");function Qo(e,t){return Iw({},e,t)}p(Qo,"cleanAndMerge");var he={assignWithDepth:Tt,wrapLabel:Zw,calculateTextHeight:Id,calculateTextWidth:Re,calculateTextDimensions:Zo,cleanAndMerge:Qo,detectInit:Ww,detectDirective:Md,isSubstringInArray:Hw,interpolateToCurve:Go,calcLabelPosition:Fd,calcCardinalityPosition:Yw,calcTerminalLabelPosition:Dd,formatUrl:Ed,getStylesFromArray:Od,generateId:Uw,random:Gw,runFunc:jw,entityDecode:Jw,insertTitle:tk,isLabelCoordinateInPath:Pd,parseFontSize:Aa,InitIDGenerator:Qw},ek=p(function(e){let t=e;return t=t.replace(/style.*:\S*#.*;/g,function(r){return r.substring(0,r.length-1)}),t=t.replace(/classDef.*:\S*#.*;/g,function(r){return r.substring(0,r.length-1)}),t=t.replace(/#\w+;/g,function(r){const i=r.substring(1,r.length-1);return/^\+?\d+$/.test(i)?"fl°°"+i+"¶ß":"fl°"+i+"¶ß"}),t},"encodeEntities"),_r=p(function(e){return e.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")},"decodeEntities"),tB=p((e,t,{counter:r=0,prefix:i,suffix:n},a)=>a||`${i?`${i}_`:""}${e}_${t}_${r}${n?`_${n}`:""}`,"getEdgeId");function It(e){return e??null}p(It,"handleUndefinedAttr");function Pd(e,t){const r=Math.round(e.x),i=Math.round(e.y),n=t.replace(/(\d+\.\d+)/g,a=>Math.round(parseFloat(a)).toString());return n.includes(r.toString())||n.includes(i.toString())}p(Pd,"isLabelCoordinateInPath");const rk=Object.freeze({left:0,top:0,width:16,height:16}),ta=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),Nd=Object.freeze({...rk,...ta}),ik=Object.freeze({...Nd,body:"",hidden:!1}),nk=Object.freeze({width:null,height:null}),ak=Object.freeze({...nk,...ta}),sk=(e,t,r,i="")=>{const n=e.split(":");if(e.slice(0,1)==="@"){if(n.length<2||n.length>3)return null;i=n.shift().slice(1)}if(n.length>3||!n.length)return null;if(n.length>1){const o=n.pop(),l=n.pop(),c={provider:n.length>0?n[0]:i,prefix:l,name:o};return ss(c)?c:null}const a=n[0],s=a.split("-");if(s.length>1){const o={provider:i,prefix:s.shift(),name:s.join("-")};return ss(o)?o:null}if(r&&i===""){const o={provider:i,prefix:"",name:a};return ss(o,r)?o:null}return null},ss=(e,t)=>e?!!((t&&e.prefix===""||e.prefix)&&e.name):!1;function ok(e,t){const r={};!e.hFlip!=!t.hFlip&&(r.hFlip=!0),!e.vFlip!=!t.vFlip&&(r.vFlip=!0);const i=((e.rotate||0)+(t.rotate||0))%4;return i&&(r.rotate=i),r}function Ic(e,t){const r=ok(e,t);for(const i in ik)i in ta?i in e&&!(i in r)&&(r[i]=ta[i]):i in t?r[i]=t[i]:i in e&&(r[i]=e[i]);return r}function lk(e,t){const r=e.icons,i=e.aliases||Object.create(null),n=Object.create(null);function a(s){if(r[s])return n[s]=[];if(!(s in n)){n[s]=null;const o=i[s]&&i[s].parent,l=o&&a(o);l&&(n[s]=[o].concat(l))}return n[s]}return(t||Object.keys(r).concat(Object.keys(i))).forEach(a),n}function Pc(e,t,r){const i=e.icons,n=e.aliases||Object.create(null);let a={};function s(o){a=Ic(i[o]||n[o],a)}return s(t),r.forEach(s),Ic(e,a)}function ck(e,t){if(e.icons[t])return Pc(e,t,[]);const r=lk(e,[t])[t];return r?Pc(e,t,r):null}const hk=/(-?[0-9.]*[0-9]+[0-9.]*)/g,uk=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function Nc(e,t,r){if(t===1)return e;if(r=r||100,typeof e=="number")return Math.ceil(e*t*r)/r;if(typeof e!="string")return e;const i=e.split(hk);if(i===null||!i.length)return e;const n=[];let a=i.shift(),s=uk.test(a);for(;;){if(s){const o=parseFloat(a);isNaN(o)?n.push(a):n.push(Math.ceil(o*t*r)/r)}else n.push(a);if(a=i.shift(),a===void 0)return n.join("");s=!s}}function fk(e,t="defs"){let r="";const i=e.indexOf("<"+t);for(;i>=0;){const n=e.indexOf(">",i),a=e.indexOf("",a);if(s===-1)break;r+=e.slice(n+1,a).trim(),e=e.slice(0,i).trim()+e.slice(s+1)}return{defs:r,content:e}}function dk(e,t){return e?""+e+""+t:t}function pk(e,t,r){const i=fk(e);return dk(i.defs,t+i.content+r)}const gk=e=>e==="unset"||e==="undefined"||e==="none";function mk(e,t){const r={...Nd,...e},i={...ak,...t},n={left:r.left,top:r.top,width:r.width,height:r.height};let a=r.body;[r,i].forEach(m=>{const y=[],x=m.hFlip,b=m.vFlip;let _=m.rotate;x?b?_+=2:(y.push("translate("+(n.width+n.left).toString()+" "+(0-n.top).toString()+")"),y.push("scale(-1 1)"),n.top=n.left=0):b&&(y.push("translate("+(0-n.left).toString()+" "+(n.height+n.top).toString()+")"),y.push("scale(1 -1)"),n.top=n.left=0);let k;switch(_<0&&(_-=Math.floor(_/4)*4),_=_%4,_){case 1:k=n.height/2+n.top,y.unshift("rotate(90 "+k.toString()+" "+k.toString()+")");break;case 2:y.unshift("rotate(180 "+(n.width/2+n.left).toString()+" "+(n.height/2+n.top).toString()+")");break;case 3:k=n.width/2+n.left,y.unshift("rotate(-90 "+k.toString()+" "+k.toString()+")");break}_%2===1&&(n.left!==n.top&&(k=n.left,n.left=n.top,n.top=k),n.width!==n.height&&(k=n.width,n.width=n.height,n.height=k)),y.length&&(a=pk(a,'',""))});const s=i.width,o=i.height,l=n.width,c=n.height;let h,u;s===null?(u=o===null?"1em":o==="auto"?c:o,h=Nc(u,l/c)):(h=s==="auto"?l:s,u=o===null?Nc(h,c/l):o==="auto"?c:o);const f={},d=(m,y)=>{gk(y)||(f[m]=y.toString())};d("width",h),d("height",u);const g=[n.left,n.top,l,c];return f.viewBox=g.join(" "),{attributes:f,viewBox:g,body:a}}const yk=/\sid="(\S+)"/g,zc=new Map;function xk(e){e=e.replace(/[0-9]+$/,"")||"a";const t=zc.get(e)||0;return zc.set(e,t+1),t?`${e}${t}`:e}function bk(e){const t=[];let r;for(;r=yk.exec(e);)t.push(r[1]);if(!t.length)return e;const i="suffix"+(Math.random()*16777216|Date.now()).toString(16);return t.forEach(n=>{const a=xk(n),s=n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+s+')([")]|\\.[a-z])',"g"),"$1"+a+i+"$3")}),e=e.replace(new RegExp(i,"g"),""),e}function _k(e,t){let r=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const i in t)r+=" "+i+'="'+t[i]+'"';return'"+e+""}function Jo(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Cr=Jo();function zd(e){Cr=e}var vi={exec:()=>null};function ut(e,t=""){let r=typeof e=="string"?e:e.source,i={replace:(n,a)=>{let s=typeof a=="string"?a:a.source;return s=s.replace(Ht.caret,"$1"),r=r.replace(n,s),i},getRegex:()=>new RegExp(r,t)};return i}var Ck=(()=>{try{return!!new RegExp("(?<=1)(?/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^
/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>new RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i")},wk=/^(?:[ \t]*(?:\n|$))+/,kk=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,vk=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Yi=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Sk=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,tl=/(?:[*+-]|\d{1,9}[.)])/,Wd=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,qd=ut(Wd).replace(/bull/g,tl).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),Tk=ut(Wd).replace(/bull/g,tl).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),el=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,Ak=/^[^\n]+/,rl=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,Lk=ut(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",rl).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Bk=ut(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,tl).getRegex(),La="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",il=/|$))/,Mk=ut("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",il).replace("tag",La).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Hd=ut(el).replace("hr",Yi).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",La).getRegex(),Ek=ut(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Hd).getRegex(),nl={blockquote:Ek,code:kk,def:Lk,fences:vk,heading:Sk,hr:Yi,html:Mk,lheading:qd,list:Bk,newline:wk,paragraph:Hd,table:vi,text:Ak},Wc=ut("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Yi).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",La).getRegex(),$k={...nl,lheading:Tk,table:Wc,paragraph:ut(el).replace("hr",Yi).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Wc).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",La).getRegex()},Fk={...nl,html:ut(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",il).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:vi,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:ut(el).replace("hr",Yi).replace("heading",` *#{1,6} *[^ +]`).replace("lheading",qd).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},Dk=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Ok=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,jd=/^( {2,}|\\)\n(?!\s*$)/,Rk=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\`+)[^`]+\k(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",Ck?"(?`+)[^`]+\k(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),Gd=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,Wk=ut(Gd,"u").replace(/punct/g,Ba).getRegex(),qk=ut(Gd,"u").replace(/punct/g,Ud).getRegex(),Vd="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",Hk=ut(Vd,"gu").replace(/notPunctSpace/g,Yd).replace(/punctSpace/g,al).replace(/punct/g,Ba).getRegex(),jk=ut(Vd,"gu").replace(/notPunctSpace/g,Nk).replace(/punctSpace/g,Pk).replace(/punct/g,Ud).getRegex(),Yk=ut("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,Yd).replace(/punctSpace/g,al).replace(/punct/g,Ba).getRegex(),Uk=ut(/\\(punct)/,"gu").replace(/punct/g,Ba).getRegex(),Gk=ut(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),Vk=ut(il).replace("(?:-->|$)","-->").getRegex(),Xk=ut("^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^").replace("comment",Vk).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),ea=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,Zk=ut(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",ea).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Xd=ut(/^!?\[(label)\]\[(ref)\]/).replace("label",ea).replace("ref",rl).getRegex(),Zd=ut(/^!?\[(ref)\](?:\[\])?/).replace("ref",rl).getRegex(),Kk=ut("reflink|nolink(?!\\()","g").replace("reflink",Xd).replace("nolink",Zd).getRegex(),qc=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,sl={_backpedal:vi,anyPunctuation:Uk,autolink:Gk,blockSkip:zk,br:jd,code:Ok,del:vi,emStrongLDelim:Wk,emStrongRDelimAst:Hk,emStrongRDelimUnd:Yk,escape:Dk,link:Zk,nolink:Zd,punctuation:Ik,reflink:Xd,reflinkSearch:Kk,tag:Xk,text:Rk,url:vi},Qk={...sl,link:ut(/^!?\[(label)\]\((.*?)\)/).replace("label",ea).getRegex(),reflink:ut(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",ea).getRegex()},Xs={...sl,emStrongRDelimAst:jk,emStrongLDelim:qk,url:ut(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",qc).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:ut(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\":">",'"':""","'":"'"},Hc=e=>tv[e];function xe(e,t){if(t){if(Ht.escapeTest.test(e))return e.replace(Ht.escapeReplace,Hc)}else if(Ht.escapeTestNoEncode.test(e))return e.replace(Ht.escapeReplaceNoEncode,Hc);return e}function jc(e){try{e=encodeURI(e).replace(Ht.percentDecode,"%")}catch{return null}return e}function Yc(e,t){let r=e.replace(Ht.findPipe,(a,s,o)=>{let l=!1,c=s;for(;--c>=0&&o[c]==="\\";)l=!l;return l?"|":" |"}),i=r.split(Ht.splitPipe),n=0;if(i[0].trim()||i.shift(),i.length>0&&!i.at(-1)?.trim()&&i.pop(),t)if(i.length>t)i.splice(t);else for(;i.length0?-2:-1}function Uc(e,t,r,i,n){let a=t.href,s=t.title||null,o=e[1].replace(n.other.outputLinkReplace,"$1");i.state.inLink=!0;let l={type:e[0].charAt(0)==="!"?"image":"link",raw:r,href:a,title:s,text:o,tokens:i.inlineTokens(o)};return i.state.inLink=!1,l}function rv(e,t,r){let i=e.match(r.other.indentCodeCompensation);if(i===null)return t;let n=i[1];return t.split(` +`).map(a=>{let s=a.match(r.other.beginningSpace);if(s===null)return a;let[o]=s;return o.length>=n.length?a.slice(n.length):a}).join(` +`)}var ra=class{options;rules;lexer;constructor(t){this.options=t||Cr}space(t){let r=this.rules.block.newline.exec(t);if(r&&r[0].length>0)return{type:"space",raw:r[0]}}code(t){let r=this.rules.block.code.exec(t);if(r){let i=r[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:r[0],codeBlockStyle:"indented",text:this.options.pedantic?i:oi(i,` +`)}}}fences(t){let r=this.rules.block.fences.exec(t);if(r){let i=r[0],n=rv(i,r[3]||"",this.rules);return{type:"code",raw:i,lang:r[2]?r[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):r[2],text:n}}}heading(t){let r=this.rules.block.heading.exec(t);if(r){let i=r[2].trim();if(this.rules.other.endingHash.test(i)){let n=oi(i,"#");(this.options.pedantic||!n||this.rules.other.endingSpaceChar.test(n))&&(i=n.trim())}return{type:"heading",raw:r[0],depth:r[1].length,text:i,tokens:this.lexer.inline(i)}}}hr(t){let r=this.rules.block.hr.exec(t);if(r)return{type:"hr",raw:oi(r[0],` +`)}}blockquote(t){let r=this.rules.block.blockquote.exec(t);if(r){let i=oi(r[0],` +`).split(` +`),n="",a="",s=[];for(;i.length>0;){let o=!1,l=[],c;for(c=0;c1,a={type:"list",raw:"",ordered:n,start:n?+i.slice(0,-1):"",loose:!1,items:[]};i=n?`\\d{1,9}\\${i.slice(-1)}`:`\\${i}`,this.options.pedantic&&(i=n?i:"[*+-]");let s=this.rules.other.listItemRegex(i),o=!1;for(;t;){let c=!1,h="",u="";if(!(r=s.exec(t))||this.rules.block.hr.test(t))break;h=r[0],t=t.substring(h.length);let f=r[2].split(` +`,1)[0].replace(this.rules.other.listReplaceTabs,b=>" ".repeat(3*b.length)),d=t.split(` +`,1)[0],g=!f.trim(),m=0;if(this.options.pedantic?(m=2,u=f.trimStart()):g?m=r[1].length+1:(m=r[2].search(this.rules.other.nonSpaceChar),m=m>4?1:m,u=f.slice(m),m+=r[1].length),g&&this.rules.other.blankLine.test(d)&&(h+=d+` +`,t=t.substring(d.length+1),c=!0),!c){let b=this.rules.other.nextBulletRegex(m),_=this.rules.other.hrRegex(m),k=this.rules.other.fencesBeginRegex(m),w=this.rules.other.headingBeginRegex(m),L=this.rules.other.htmlBeginRegex(m);for(;t;){let S=t.split(` +`,1)[0],D;if(d=S,this.options.pedantic?(d=d.replace(this.rules.other.listReplaceNesting," "),D=d):D=d.replace(this.rules.other.tabCharGlobal," "),k.test(d)||w.test(d)||L.test(d)||b.test(d)||_.test(d))break;if(D.search(this.rules.other.nonSpaceChar)>=m||!d.trim())u+=` +`+D.slice(m);else{if(g||f.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||k.test(f)||w.test(f)||_.test(f))break;u+=` +`+d}!g&&!d.trim()&&(g=!0),h+=S+` +`,t=t.substring(S.length+1),f=D.slice(m)}}a.loose||(o?a.loose=!0:this.rules.other.doubleBlankLine.test(h)&&(o=!0));let y=null,x;this.options.gfm&&(y=this.rules.other.listIsTask.exec(u),y&&(x=y[0]!=="[ ] ",u=u.replace(this.rules.other.listReplaceTask,""))),a.items.push({type:"list_item",raw:h,task:!!y,checked:x,loose:!1,text:u,tokens:[]}),a.raw+=h}let l=a.items.at(-1);if(l)l.raw=l.raw.trimEnd(),l.text=l.text.trimEnd();else return;a.raw=a.raw.trimEnd();for(let c=0;cf.type==="space"),u=h.length>0&&h.some(f=>this.rules.other.anyLine.test(f.raw));a.loose=u}if(a.loose)for(let c=0;c({text:l,tokens:this.lexer.inline(l),header:!1,align:s.align[c]})));return s}}lheading(t){let r=this.rules.block.lheading.exec(t);if(r)return{type:"heading",raw:r[0],depth:r[2].charAt(0)==="="?1:2,text:r[1],tokens:this.lexer.inline(r[1])}}paragraph(t){let r=this.rules.block.paragraph.exec(t);if(r){let i=r[1].charAt(r[1].length-1)===` +`?r[1].slice(0,-1):r[1];return{type:"paragraph",raw:r[0],text:i,tokens:this.lexer.inline(i)}}}text(t){let r=this.rules.block.text.exec(t);if(r)return{type:"text",raw:r[0],text:r[0],tokens:this.lexer.inline(r[0])}}escape(t){let r=this.rules.inline.escape.exec(t);if(r)return{type:"escape",raw:r[0],text:r[1]}}tag(t){let r=this.rules.inline.tag.exec(t);if(r)return!this.lexer.state.inLink&&this.rules.other.startATag.test(r[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(r[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(r[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(r[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:r[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:r[0]}}link(t){let r=this.rules.inline.link.exec(t);if(r){let i=r[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(i)){if(!this.rules.other.endAngleBracket.test(i))return;let s=oi(i.slice(0,-1),"\\");if((i.length-s.length)%2===0)return}else{let s=ev(r[2],"()");if(s===-2)return;if(s>-1){let o=(r[0].indexOf("!")===0?5:4)+r[1].length+s;r[2]=r[2].substring(0,s),r[0]=r[0].substring(0,o).trim(),r[3]=""}}let n=r[2],a="";if(this.options.pedantic){let s=this.rules.other.pedanticHrefTitle.exec(n);s&&(n=s[1],a=s[3])}else a=r[3]?r[3].slice(1,-1):"";return n=n.trim(),this.rules.other.startAngleBracket.test(n)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(i)?n=n.slice(1):n=n.slice(1,-1)),Uc(r,{href:n&&n.replace(this.rules.inline.anyPunctuation,"$1"),title:a&&a.replace(this.rules.inline.anyPunctuation,"$1")},r[0],this.lexer,this.rules)}}reflink(t,r){let i;if((i=this.rules.inline.reflink.exec(t))||(i=this.rules.inline.nolink.exec(t))){let n=(i[2]||i[1]).replace(this.rules.other.multipleSpaceGlobal," "),a=r[n.toLowerCase()];if(!a){let s=i[0].charAt(0);return{type:"text",raw:s,text:s}}return Uc(i,a,i[0],this.lexer,this.rules)}}emStrong(t,r,i=""){let n=this.rules.inline.emStrongLDelim.exec(t);if(!(!n||n[3]&&i.match(this.rules.other.unicodeAlphaNumeric))&&(!(n[1]||n[2])||!i||this.rules.inline.punctuation.exec(i))){let a=[...n[0]].length-1,s,o,l=a,c=0,h=n[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(h.lastIndex=0,r=r.slice(-1*t.length+a);(n=h.exec(r))!=null;){if(s=n[1]||n[2]||n[3]||n[4]||n[5]||n[6],!s)continue;if(o=[...s].length,n[3]||n[4]){l+=o;continue}else if((n[5]||n[6])&&a%3&&!((a+o)%3)){c+=o;continue}if(l-=o,l>0)continue;o=Math.min(o,o+l+c);let u=[...n[0]][0].length,f=t.slice(0,a+n.index+u+o);if(Math.min(a,o)%2){let g=f.slice(1,-1);return{type:"em",raw:f,text:g,tokens:this.lexer.inlineTokens(g)}}let d=f.slice(2,-2);return{type:"strong",raw:f,text:d,tokens:this.lexer.inlineTokens(d)}}}}codespan(t){let r=this.rules.inline.code.exec(t);if(r){let i=r[2].replace(this.rules.other.newLineCharGlobal," "),n=this.rules.other.nonSpaceChar.test(i),a=this.rules.other.startingSpaceChar.test(i)&&this.rules.other.endingSpaceChar.test(i);return n&&a&&(i=i.substring(1,i.length-1)),{type:"codespan",raw:r[0],text:i}}}br(t){let r=this.rules.inline.br.exec(t);if(r)return{type:"br",raw:r[0]}}del(t){let r=this.rules.inline.del.exec(t);if(r)return{type:"del",raw:r[0],text:r[2],tokens:this.lexer.inlineTokens(r[2])}}autolink(t){let r=this.rules.inline.autolink.exec(t);if(r){let i,n;return r[2]==="@"?(i=r[1],n="mailto:"+i):(i=r[1],n=i),{type:"link",raw:r[0],text:i,href:n,tokens:[{type:"text",raw:i,text:i}]}}}url(t){let r;if(r=this.rules.inline.url.exec(t)){let i,n;if(r[2]==="@")i=r[0],n="mailto:"+i;else{let a;do a=r[0],r[0]=this.rules.inline._backpedal.exec(r[0])?.[0]??"";while(a!==r[0]);i=r[0],r[1]==="www."?n="http://"+r[0]:n=r[0]}return{type:"link",raw:r[0],text:i,href:n,tokens:[{type:"text",raw:i,text:i}]}}}inlineText(t){let r=this.rules.inline.text.exec(t);if(r){let i=this.lexer.state.inRawBlock;return{type:"text",raw:r[0],text:r[0],escaped:i}}}},oe=class Zs{tokens;options;state;tokenizer;inlineQueue;constructor(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||Cr,this.options.tokenizer=this.options.tokenizer||new ra,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let r={other:Ht,block:ln.normal,inline:si.normal};this.options.pedantic?(r.block=ln.pedantic,r.inline=si.pedantic):this.options.gfm&&(r.block=ln.gfm,this.options.breaks?r.inline=si.breaks:r.inline=si.gfm),this.tokenizer.rules=r}static get rules(){return{block:ln,inline:si}}static lex(t,r){return new Zs(r).lex(t)}static lexInline(t,r){return new Zs(r).inlineTokens(t)}lex(t){t=t.replace(Ht.carriageReturn,` +`),this.blockTokens(t,this.tokens);for(let r=0;r(n=s.call({lexer:this},t,r))?(t=t.substring(n.raw.length),r.push(n),!0):!1))continue;if(n=this.tokenizer.space(t)){t=t.substring(n.raw.length);let s=r.at(-1);n.raw.length===1&&s!==void 0?s.raw+=` +`:r.push(n);continue}if(n=this.tokenizer.code(t)){t=t.substring(n.raw.length);let s=r.at(-1);s?.type==="paragraph"||s?.type==="text"?(s.raw+=(s.raw.endsWith(` +`)?"":` +`)+n.raw,s.text+=` +`+n.text,this.inlineQueue.at(-1).src=s.text):r.push(n);continue}if(n=this.tokenizer.fences(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.heading(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.hr(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.blockquote(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.list(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.html(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.def(t)){t=t.substring(n.raw.length);let s=r.at(-1);s?.type==="paragraph"||s?.type==="text"?(s.raw+=(s.raw.endsWith(` +`)?"":` +`)+n.raw,s.text+=` +`+n.raw,this.inlineQueue.at(-1).src=s.text):this.tokens.links[n.tag]||(this.tokens.links[n.tag]={href:n.href,title:n.title},r.push(n));continue}if(n=this.tokenizer.table(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.lheading(t)){t=t.substring(n.raw.length),r.push(n);continue}let a=t;if(this.options.extensions?.startBlock){let s=1/0,o=t.slice(1),l;this.options.extensions.startBlock.forEach(c=>{l=c.call({lexer:this},o),typeof l=="number"&&l>=0&&(s=Math.min(s,l))}),s<1/0&&s>=0&&(a=t.substring(0,s+1))}if(this.state.top&&(n=this.tokenizer.paragraph(a))){let s=r.at(-1);i&&s?.type==="paragraph"?(s.raw+=(s.raw.endsWith(` +`)?"":` +`)+n.raw,s.text+=` +`+n.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=s.text):r.push(n),i=a.length!==t.length,t=t.substring(n.raw.length);continue}if(n=this.tokenizer.text(t)){t=t.substring(n.raw.length);let s=r.at(-1);s?.type==="text"?(s.raw+=(s.raw.endsWith(` +`)?"":` +`)+n.raw,s.text+=` +`+n.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=s.text):r.push(n);continue}if(t){let s="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(s);break}else throw new Error(s)}}return this.state.top=!0,r}inline(t,r=[]){return this.inlineQueue.push({src:t,tokens:r}),r}inlineTokens(t,r=[]){let i=t,n=null;if(this.tokens.links){let l=Object.keys(this.tokens.links);if(l.length>0)for(;(n=this.tokenizer.rules.inline.reflinkSearch.exec(i))!=null;)l.includes(n[0].slice(n[0].lastIndexOf("[")+1,-1))&&(i=i.slice(0,n.index)+"["+"a".repeat(n[0].length-2)+"]"+i.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(n=this.tokenizer.rules.inline.anyPunctuation.exec(i))!=null;)i=i.slice(0,n.index)+"++"+i.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let a;for(;(n=this.tokenizer.rules.inline.blockSkip.exec(i))!=null;)a=n[2]?n[2].length:0,i=i.slice(0,n.index+a)+"["+"a".repeat(n[0].length-a-2)+"]"+i.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);i=this.options.hooks?.emStrongMask?.call({lexer:this},i)??i;let s=!1,o="";for(;t;){s||(o=""),s=!1;let l;if(this.options.extensions?.inline?.some(h=>(l=h.call({lexer:this},t,r))?(t=t.substring(l.raw.length),r.push(l),!0):!1))continue;if(l=this.tokenizer.escape(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.tag(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.link(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(l.raw.length);let h=r.at(-1);l.type==="text"&&h?.type==="text"?(h.raw+=l.raw,h.text+=l.text):r.push(l);continue}if(l=this.tokenizer.emStrong(t,i,o)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.codespan(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.br(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.del(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.autolink(t)){t=t.substring(l.raw.length),r.push(l);continue}if(!this.state.inLink&&(l=this.tokenizer.url(t))){t=t.substring(l.raw.length),r.push(l);continue}let c=t;if(this.options.extensions?.startInline){let h=1/0,u=t.slice(1),f;this.options.extensions.startInline.forEach(d=>{f=d.call({lexer:this},u),typeof f=="number"&&f>=0&&(h=Math.min(h,f))}),h<1/0&&h>=0&&(c=t.substring(0,h+1))}if(l=this.tokenizer.inlineText(c)){t=t.substring(l.raw.length),l.raw.slice(-1)!=="_"&&(o=l.raw.slice(-1)),s=!0;let h=r.at(-1);h?.type==="text"?(h.raw+=l.raw,h.text+=l.text):r.push(l);continue}if(t){let h="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(h);break}else throw new Error(h)}}return r}},ia=class{options;parser;constructor(t){this.options=t||Cr}space(t){return""}code({text:t,lang:r,escaped:i}){let n=(r||"").match(Ht.notSpaceStart)?.[0],a=t.replace(Ht.endingNewline,"")+` +`;return n?'
'+(i?a:xe(a,!0))+`
+`:"
"+(i?a:xe(a,!0))+`
+`}blockquote({tokens:t}){return`
+${this.parser.parse(t)}
+`}html({text:t}){return t}def(t){return""}heading({tokens:t,depth:r}){return`${this.parser.parseInline(t)} +`}hr(t){return`
+`}list(t){let r=t.ordered,i=t.start,n="";for(let o=0;o +`+n+" +`}listitem(t){let r="";if(t.task){let i=this.checkbox({checked:!!t.checked});t.loose?t.tokens[0]?.type==="paragraph"?(t.tokens[0].text=i+" "+t.tokens[0].text,t.tokens[0].tokens&&t.tokens[0].tokens.length>0&&t.tokens[0].tokens[0].type==="text"&&(t.tokens[0].tokens[0].text=i+" "+xe(t.tokens[0].tokens[0].text),t.tokens[0].tokens[0].escaped=!0)):t.tokens.unshift({type:"text",raw:i+" ",text:i+" ",escaped:!0}):r+=i+" "}return r+=this.parser.parse(t.tokens,!!t.loose),`
  • ${r}
  • +`}checkbox({checked:t}){return"'}paragraph({tokens:t}){return`

    ${this.parser.parseInline(t)}

    +`}table(t){let r="",i="";for(let a=0;a${n}`),` + +`+r+` +`+n+`
    +`}tablerow({text:t}){return` +${t} +`}tablecell(t){let r=this.parser.parseInline(t.tokens),i=t.header?"th":"td";return(t.align?`<${i} align="${t.align}">`:`<${i}>`)+r+` +`}strong({tokens:t}){return`${this.parser.parseInline(t)}`}em({tokens:t}){return`${this.parser.parseInline(t)}`}codespan({text:t}){return`${xe(t,!0)}`}br(t){return"
    "}del({tokens:t}){return`${this.parser.parseInline(t)}`}link({href:t,title:r,tokens:i}){let n=this.parser.parseInline(i),a=jc(t);if(a===null)return n;t=a;let s='
    ",s}image({href:t,title:r,text:i,tokens:n}){n&&(i=this.parser.parseInline(n,this.parser.textRenderer));let a=jc(t);if(a===null)return xe(i);t=a;let s=`${i}{let o=a[s].flat(1/0);i=i.concat(this.walkTokens(o,r))}):a.tokens&&(i=i.concat(this.walkTokens(a.tokens,r)))}}return i}use(...t){let r=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(i=>{let n={...i};if(n.async=this.defaults.async||n.async||!1,i.extensions&&(i.extensions.forEach(a=>{if(!a.name)throw new Error("extension name required");if("renderer"in a){let s=r.renderers[a.name];s?r.renderers[a.name]=function(...o){let l=a.renderer.apply(this,o);return l===!1&&(l=s.apply(this,o)),l}:r.renderers[a.name]=a.renderer}if("tokenizer"in a){if(!a.level||a.level!=="block"&&a.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let s=r[a.level];s?s.unshift(a.tokenizer):r[a.level]=[a.tokenizer],a.start&&(a.level==="block"?r.startBlock?r.startBlock.push(a.start):r.startBlock=[a.start]:a.level==="inline"&&(r.startInline?r.startInline.push(a.start):r.startInline=[a.start]))}"childTokens"in a&&a.childTokens&&(r.childTokens[a.name]=a.childTokens)}),n.extensions=r),i.renderer){let a=this.defaults.renderer||new ia(this.defaults);for(let s in i.renderer){if(!(s in a))throw new Error(`renderer '${s}' does not exist`);if(["options","parser"].includes(s))continue;let o=s,l=i.renderer[o],c=a[o];a[o]=(...h)=>{let u=l.apply(a,h);return u===!1&&(u=c.apply(a,h)),u||""}}n.renderer=a}if(i.tokenizer){let a=this.defaults.tokenizer||new ra(this.defaults);for(let s in i.tokenizer){if(!(s in a))throw new Error(`tokenizer '${s}' does not exist`);if(["options","rules","lexer"].includes(s))continue;let o=s,l=i.tokenizer[o],c=a[o];a[o]=(...h)=>{let u=l.apply(a,h);return u===!1&&(u=c.apply(a,h)),u}}n.tokenizer=a}if(i.hooks){let a=this.defaults.hooks||new gi;for(let s in i.hooks){if(!(s in a))throw new Error(`hook '${s}' does not exist`);if(["options","block"].includes(s))continue;let o=s,l=i.hooks[o],c=a[o];gi.passThroughHooks.has(s)?a[o]=h=>{if(this.defaults.async&&gi.passThroughHooksRespectAsync.has(s))return(async()=>{let f=await l.call(a,h);return c.call(a,f)})();let u=l.call(a,h);return c.call(a,u)}:a[o]=(...h)=>{if(this.defaults.async)return(async()=>{let f=await l.apply(a,h);return f===!1&&(f=await c.apply(a,h)),f})();let u=l.apply(a,h);return u===!1&&(u=c.apply(a,h)),u}}n.hooks=a}if(i.walkTokens){let a=this.defaults.walkTokens,s=i.walkTokens;n.walkTokens=function(o){let l=[];return l.push(s.call(this,o)),a&&(l=l.concat(a.call(this,o))),l}}this.defaults={...this.defaults,...n}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,r){return oe.lex(t,r??this.defaults)}parser(t,r){return le.parse(t,r??this.defaults)}parseMarkdown(t){return(r,i)=>{let n={...i},a={...this.defaults,...n},s=this.onError(!!a.silent,!!a.async);if(this.defaults.async===!0&&n.async===!1)return s(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof r>"u"||r===null)return s(new Error("marked(): input parameter is undefined or null"));if(typeof r!="string")return s(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(r)+", string expected"));if(a.hooks&&(a.hooks.options=a,a.hooks.block=t),a.async)return(async()=>{let o=a.hooks?await a.hooks.preprocess(r):r,l=await(a.hooks?await a.hooks.provideLexer():t?oe.lex:oe.lexInline)(o,a),c=a.hooks?await a.hooks.processAllTokens(l):l;a.walkTokens&&await Promise.all(this.walkTokens(c,a.walkTokens));let h=await(a.hooks?await a.hooks.provideParser():t?le.parse:le.parseInline)(c,a);return a.hooks?await a.hooks.postprocess(h):h})().catch(s);try{a.hooks&&(r=a.hooks.preprocess(r));let o=(a.hooks?a.hooks.provideLexer():t?oe.lex:oe.lexInline)(r,a);a.hooks&&(o=a.hooks.processAllTokens(o)),a.walkTokens&&this.walkTokens(o,a.walkTokens);let l=(a.hooks?a.hooks.provideParser():t?le.parse:le.parseInline)(o,a);return a.hooks&&(l=a.hooks.postprocess(l)),l}catch(o){return s(o)}}}onError(t,r){return i=>{if(i.message+=` +Please report this to https://github.com/markedjs/marked.`,t){let n="

    An error occurred:

    "+xe(i.message+"",!0)+"
    ";return r?Promise.resolve(n):n}if(r)return Promise.reject(i);throw i}}},gr=new iv;function dt(e,t){return gr.parse(e,t)}dt.options=dt.setOptions=function(e){return gr.setOptions(e),dt.defaults=gr.defaults,zd(dt.defaults),dt};dt.getDefaults=Jo;dt.defaults=Cr;dt.use=function(...e){return gr.use(...e),dt.defaults=gr.defaults,zd(dt.defaults),dt};dt.walkTokens=function(e,t){return gr.walkTokens(e,t)};dt.parseInline=gr.parseInline;dt.Parser=le;dt.parser=le.parse;dt.Renderer=ia;dt.TextRenderer=ol;dt.Lexer=oe;dt.lexer=oe.lex;dt.Tokenizer=ra;dt.Hooks=gi;dt.parse=dt;dt.options;dt.setOptions;dt.use;dt.walkTokens;dt.parseInline;le.parse;oe.lex;function Kd(e){for(var t=[],r=1;r?',height:80,width:80},Qs=new Map,Qd=new Map,av=p(e=>{for(const t of e){if(!t.name)throw new Error('Invalid icon loader. Must have a "name" property with non-empty string value.');if(F.debug("Registering icon pack:",t.name),"loader"in t)Qd.set(t.name,t.loader);else if("icons"in t)Qs.set(t.name,t.icons);else throw F.error("Invalid icon loader:",t),new Error('Invalid icon loader. Must have either "icons" or "loader" property.')}},"registerIconPacks"),Jd=p(async(e,t)=>{const r=sk(e,!0,t!==void 0);if(!r)throw new Error(`Invalid icon name: ${e}`);const i=r.prefix||t;if(!i)throw new Error(`Icon name must contain a prefix: ${e}`);let n=Qs.get(i);if(!n){const s=Qd.get(i);if(!s)throw new Error(`Icon set not found: ${r.prefix}`);try{n={...await s(),prefix:i},Qs.set(i,n)}catch(o){throw F.error(o),new Error(`Failed to load icon set: ${r.prefix}`)}}const a=ck(n,r.name);if(!a)throw new Error(`Icon not found: ${e}`);return a},"getRegisteredIconData"),sv=p(async e=>{try{return await Jd(e),!0}catch{return!1}},"isIconAvailable"),Ui=p(async(e,t,r)=>{let i;try{i=await Jd(e,t?.fallbackPrefix)}catch(s){F.error(s),i=nv}const n=mk(i,t),a=_k(bk(n.body),{...n.attributes,...r});return ee(a,Ot())},"getIconSVG");function tp(e,{markdownAutoWrap:t}){const i=e.replace(//g,` +`).replace(/\n{2,}/g,` +`),n=Kd(i);return t===!1?n.replace(/ /g," "):n}p(tp,"preprocessMarkdown");function ep(e,t={}){const r=tp(e,t),i=dt.lexer(r),n=[[]];let a=0;function s(o,l="normal"){o.type==="text"?o.text.split(` +`).forEach((h,u)=>{u!==0&&(a++,n.push([])),h.split(" ").forEach(f=>{f=f.replace(/'/g,"'"),f&&n[a].push({content:f,type:l})})}):o.type==="strong"||o.type==="em"?o.tokens.forEach(c=>{s(c,o.type)}):o.type==="html"&&n[a].push({content:o.text,type:"normal"})}return p(s,"processNode"),i.forEach(o=>{o.type==="paragraph"?o.tokens?.forEach(l=>{s(l)}):o.type==="html"?n[a].push({content:o.text,type:"normal"}):n[a].push({content:o.raw,type:"normal"})}),n}p(ep,"markdownToLines");function rp(e,{markdownAutoWrap:t}={}){const r=dt.lexer(e);function i(n){return n.type==="text"?t===!1?n.text.replace(/\n */g,"
    ").replace(/ /g," "):n.text.replace(/\n */g,"
    "):n.type==="strong"?`${n.tokens?.map(i).join("")}`:n.type==="em"?`${n.tokens?.map(i).join("")}`:n.type==="paragraph"?`

    ${n.tokens?.map(i).join("")}

    `:n.type==="space"?"":n.type==="html"?`${n.text}`:n.type==="escape"?n.text:(F.warn(`Unsupported markdown: ${n.type}`),n.raw)}return p(i,"output"),r.map(i).join("")}p(rp,"markdownToHTML");function ip(e){return Intl.Segmenter?[...new Intl.Segmenter().segment(e)].map(t=>t.segment):[...e]}p(ip,"splitTextToChars");function np(e,t){const r=ip(t.content);return ll(e,[],r,t.type)}p(np,"splitWordToFitWidth");function ll(e,t,r,i){if(r.length===0)return[{content:t.join(""),type:i},{content:"",type:i}];const[n,...a]=r,s=[...t,n];return e([{content:s.join(""),type:i}])?ll(e,s,a,i):(t.length===0&&n&&(t.push(n),r.shift()),[{content:t.join(""),type:i},{content:r.join(""),type:i}])}p(ll,"splitWordToFitWidthRecursion");function ap(e,t){if(e.some(({content:r})=>r.includes(` +`)))throw new Error("splitLineToFitWidth does not support newlines in the line");return na(e,t)}p(ap,"splitLineToFitWidth");function na(e,t,r=[],i=[]){if(e.length===0)return i.length>0&&r.push(i),r.length>0?r:[];let n="";e[0].content===" "&&(n=" ",e.shift());const a=e.shift()??{content:" ",type:"normal"},s=[...i];if(n!==""&&s.push({content:n,type:"normal"}),s.push(a),t(s))return na(e,t,r,s);if(i.length>0)r.push(i),e.unshift(a);else if(a.content){const[o,l]=np(t,a);r.push([o]),l.content&&e.unshift(l)}return na(e,t,r)}p(na,"splitLineToFitWidthRecursion");function Js(e,t){t&&e.attr("style",t)}p(Js,"applyStyle");async function sp(e,t,r,i,n=!1,a=Ot()){const s=e.append("foreignObject");s.attr("width",`${10*r}px`),s.attr("height",`${10*r}px`);const o=s.append("xhtml:div"),l=Ir(t.label)?await yo(t.label.replace(jr.lineBreakRegex,` +`),a):ee(t.label,a),c=t.isNode?"nodeLabel":"edgeLabel",h=o.append("span");h.html(l),Js(h,t.labelStyle),h.attr("class",`${c} ${i}`),Js(o,t.labelStyle),o.style("display","table-cell"),o.style("white-space","nowrap"),o.style("line-height","1.5"),o.style("max-width",r+"px"),o.style("text-align","center"),o.attr("xmlns","http://www.w3.org/1999/xhtml"),n&&o.attr("class","labelBkg");let u=o.node().getBoundingClientRect();return u.width===r&&(o.style("display","table"),o.style("white-space","break-spaces"),o.style("width",r+"px"),u=o.node().getBoundingClientRect()),s.node()}p(sp,"addHtmlSpan");function Ma(e,t,r){return e.append("tspan").attr("class","text-outer-tspan").attr("x",0).attr("y",t*r-.1+"em").attr("dy",r+"em")}p(Ma,"createTspan");function op(e,t,r){const i=e.append("text"),n=Ma(i,1,t);Ea(n,r);const a=n.node().getComputedTextLength();return i.remove(),a}p(op,"computeWidthOfText");function ov(e,t,r){const i=e.append("text"),n=Ma(i,1,t);Ea(n,[{content:r,type:"normal"}]);const a=n.node()?.getBoundingClientRect();return a&&i.remove(),a}p(ov,"computeDimensionOfText");function lp(e,t,r,i=!1){const a=t.append("g"),s=a.insert("rect").attr("class","background").attr("style","stroke: none"),o=a.append("text").attr("y","-10.1");let l=0;for(const c of r){const h=p(f=>op(a,1.1,f)<=e,"checkWidth"),u=h(c)?[c]:ap(c,h);for(const f of u){const d=Ma(o,l,1.1);Ea(d,f),l++}}if(i){const c=o.node().getBBox(),h=2;return s.attr("x",c.x-h).attr("y",c.y-h).attr("width",c.width+2*h).attr("height",c.height+2*h),a.node()}else return o.node()}p(lp,"createFormattedText");function Ea(e,t){e.text(""),t.forEach((r,i)=>{const n=e.append("tspan").attr("font-style",r.type==="em"?"italic":"normal").attr("class","text-inner-tspan").attr("font-weight",r.type==="strong"?"bold":"normal");i===0?n.text(r.content):n.text(" "+r.content)})}p(Ea,"updateTextContentAndStyles");async function cp(e,t={}){const r=[];e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,(n,a,s)=>(r.push((async()=>{const o=`${a}:${s}`;return await sv(o)?await Ui(o,void 0,{class:"label-icon"}):``})()),n));const i=await Promise.all(r);return e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,()=>i.shift()??"")}p(cp,"replaceIconSubstring");var Xe=p(async(e,t="",{style:r="",isTitle:i=!1,classes:n="",useHtmlLabels:a=!0,isNode:s=!0,width:o=200,addSvgBackground:l=!1}={},c)=>{if(F.debug("XYZ createText",t,r,i,n,a,s,"addSvgBackground: ",l),a){const h=rp(t,c),u=await cp(_r(h),c),f=t.replace(/\\\\/g,"\\"),d={isNode:s,label:Ir(t)?f:u,labelStyle:r.replace("fill:","color:")};return await sp(e,d,o,n,l,c)}else{const h=t.replace(//g,"
    "),u=ep(h.replace("
    ","
    "),c),f=lp(o,e,u,t?l:!1);if(s){/stroke:/.exec(r)&&(r=r.replace("stroke:","lineColor:"));const d=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");ht(f).attr("style",d)}else{const d=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:");ht(f).select("rect").attr("style",d.replace(/background:/g,"fill:"));const g=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");ht(f).select("text").attr("style",g)}return f}},"createText");function os(e,t,r){if(e&&e.length){const[i,n]=t,a=Math.PI/180*r,s=Math.cos(a),o=Math.sin(a);for(const l of e){const[c,h]=l;l[0]=(c-i)*s-(h-n)*o+i,l[1]=(c-i)*o+(h-n)*s+n}}}function lv(e,t){return e[0]===t[0]&&e[1]===t[1]}function cv(e,t,r,i=1){const n=r,a=Math.max(t,.1),s=e[0]&&e[0][0]&&typeof e[0][0]=="number"?[e]:e,o=[0,0];if(n)for(const c of s)os(c,o,n);const l=(function(c,h,u){const f=[];for(const b of c){const _=[...b];lv(_[0],_[_.length-1])||_.push([_[0][0],_[0][1]]),_.length>2&&f.push(_)}const d=[];h=Math.max(h,.1);const g=[];for(const b of f)for(let _=0;_b.ymin<_.ymin?-1:b.ymin>_.ymin?1:b.x<_.x?-1:b.x>_.x?1:b.ymax===_.ymax?0:(b.ymax-_.ymax)/Math.abs(b.ymax-_.ymax))),!g.length)return d;let m=[],y=g[0].ymin,x=0;for(;m.length||g.length;){if(g.length){let b=-1;for(let _=0;_y);_++)b=_;g.splice(0,b+1).forEach((_=>{m.push({s:y,edge:_})}))}if(m=m.filter((b=>!(b.edge.ymax<=y))),m.sort(((b,_)=>b.edge.x===_.edge.x?0:(b.edge.x-_.edge.x)/Math.abs(b.edge.x-_.edge.x))),(u!==1||x%h==0)&&m.length>1)for(let b=0;b=m.length)break;const k=m[b].edge,w=m[_].edge;d.push([[Math.round(k.x),y],[Math.round(w.x),y]])}y+=u,m.forEach((b=>{b.edge.x=b.edge.x+u*b.edge.islope})),x++}return d})(s,a,i);if(n){for(const c of s)os(c,o,-n);(function(c,h,u){const f=[];c.forEach((d=>f.push(...d))),os(f,h,u)})(l,o,-n)}return l}function Gi(e,t){var r;const i=t.hachureAngle+90;let n=t.hachureGap;n<0&&(n=4*t.strokeWidth),n=Math.round(Math.max(n,.1));let a=1;return t.roughness>=1&&(((r=t.randomizer)===null||r===void 0?void 0:r.next())||Math.random())>.7&&(a=n),cv(e,n,i,a||1)}class cl{constructor(t){this.helper=t}fillPolygons(t,r){return this._fillPolygons(t,r)}_fillPolygons(t,r){const i=Gi(t,r);return{type:"fillSketch",ops:this.renderLines(i,r)}}renderLines(t,r){const i=[];for(const n of t)i.push(...this.helper.doubleLineOps(n[0][0],n[0][1],n[1][0],n[1][1],r));return i}}function $a(e){const t=e[0],r=e[1];return Math.sqrt(Math.pow(t[0]-r[0],2)+Math.pow(t[1]-r[1],2))}class hv extends cl{fillPolygons(t,r){let i=r.hachureGap;i<0&&(i=4*r.strokeWidth),i=Math.max(i,.1);const n=Gi(t,Object.assign({},r,{hachureGap:i})),a=Math.PI/180*r.hachureAngle,s=[],o=.5*i*Math.cos(a),l=.5*i*Math.sin(a);for(const[c,h]of n)$a([c,h])&&s.push([[c[0]-o,c[1]+l],[...h]],[[c[0]+o,c[1]-l],[...h]]);return{type:"fillSketch",ops:this.renderLines(s,r)}}}class uv extends cl{fillPolygons(t,r){const i=this._fillPolygons(t,r),n=Object.assign({},r,{hachureAngle:r.hachureAngle+90}),a=this._fillPolygons(t,n);return i.ops=i.ops.concat(a.ops),i}}class fv{constructor(t){this.helper=t}fillPolygons(t,r){const i=Gi(t,r=Object.assign({},r,{hachureAngle:0}));return this.dotsOnLines(i,r)}dotsOnLines(t,r){const i=[];let n=r.hachureGap;n<0&&(n=4*r.strokeWidth),n=Math.max(n,.1);let a=r.fillWeight;a<0&&(a=r.strokeWidth/2);const s=n/4;for(const o of t){const l=$a(o),c=l/n,h=Math.ceil(c)-1,u=l-h*n,f=(o[0][0]+o[1][0])/2-n/4,d=Math.min(o[0][1],o[1][1]);for(let g=0;g{const o=$a(s),l=Math.floor(o/(i+n)),c=(o+n-l*(i+n))/2;let h=s[0],u=s[1];h[0]>u[0]&&(h=s[1],u=s[0]);const f=Math.atan((u[1]-h[1])/(u[0]-h[0]));for(let d=0;d{const s=$a(a),o=Math.round(s/(2*r));let l=a[0],c=a[1];l[0]>c[0]&&(l=a[1],c=a[0]);const h=Math.atan((c[1]-l[1])/(c[0]-l[0]));for(let u=0;uh%2?c+r:c+t));a.push({key:"C",data:l}),t=l[4],r=l[5];break}case"Q":a.push({key:"Q",data:[...o]}),t=o[2],r=o[3];break;case"q":{const l=o.map(((c,h)=>h%2?c+r:c+t));a.push({key:"Q",data:l}),t=l[2],r=l[3];break}case"A":a.push({key:"A",data:[...o]}),t=o[5],r=o[6];break;case"a":t+=o[5],r+=o[6],a.push({key:"A",data:[o[0],o[1],o[2],o[3],o[4],t,r]});break;case"H":a.push({key:"H",data:[...o]}),t=o[0];break;case"h":t+=o[0],a.push({key:"H",data:[t]});break;case"V":a.push({key:"V",data:[...o]}),r=o[0];break;case"v":r+=o[0],a.push({key:"V",data:[r]});break;case"S":a.push({key:"S",data:[...o]}),t=o[2],r=o[3];break;case"s":{const l=o.map(((c,h)=>h%2?c+r:c+t));a.push({key:"S",data:l}),t=l[2],r=l[3];break}case"T":a.push({key:"T",data:[...o]}),t=o[0],r=o[1];break;case"t":t+=o[0],r+=o[1],a.push({key:"T",data:[t,r]});break;case"Z":case"z":a.push({key:"Z",data:[]}),t=i,r=n}return a}function up(e){const t=[];let r="",i=0,n=0,a=0,s=0,o=0,l=0;for(const{key:c,data:h}of e){switch(c){case"M":t.push({key:"M",data:[...h]}),[i,n]=h,[a,s]=h;break;case"C":t.push({key:"C",data:[...h]}),i=h[4],n=h[5],o=h[2],l=h[3];break;case"L":t.push({key:"L",data:[...h]}),[i,n]=h;break;case"H":i=h[0],t.push({key:"L",data:[i,n]});break;case"V":n=h[0],t.push({key:"L",data:[i,n]});break;case"S":{let u=0,f=0;r==="C"||r==="S"?(u=i+(i-o),f=n+(n-l)):(u=i,f=n),t.push({key:"C",data:[u,f,...h]}),o=h[0],l=h[1],i=h[2],n=h[3];break}case"T":{const[u,f]=h;let d=0,g=0;r==="Q"||r==="T"?(d=i+(i-o),g=n+(n-l)):(d=i,g=n);const m=i+2*(d-i)/3,y=n+2*(g-n)/3,x=u+2*(d-u)/3,b=f+2*(g-f)/3;t.push({key:"C",data:[m,y,x,b,u,f]}),o=d,l=g,i=u,n=f;break}case"Q":{const[u,f,d,g]=h,m=i+2*(u-i)/3,y=n+2*(f-n)/3,x=d+2*(u-d)/3,b=g+2*(f-g)/3;t.push({key:"C",data:[m,y,x,b,d,g]}),o=u,l=f,i=d,n=g;break}case"A":{const u=Math.abs(h[0]),f=Math.abs(h[1]),d=h[2],g=h[3],m=h[4],y=h[5],x=h[6];u===0||f===0?(t.push({key:"C",data:[i,n,y,x,y,x]}),i=y,n=x):(i!==y||n!==x)&&(fp(i,n,y,x,u,f,d,g,m).forEach((function(b){t.push({key:"C",data:b})})),i=y,n=x);break}case"Z":t.push({key:"Z",data:[]}),i=a,n=s}r=c}return t}function li(e,t,r){return[e*Math.cos(r)-t*Math.sin(r),e*Math.sin(r)+t*Math.cos(r)]}function fp(e,t,r,i,n,a,s,o,l,c){const h=(u=s,Math.PI*u/180);var u;let f=[],d=0,g=0,m=0,y=0;if(c)[d,g,m,y]=c;else{[e,t]=li(e,t,-h),[r,i]=li(r,i,-h);const R=(e-r)/2,A=(t-i)/2;let B=R*R/(n*n)+A*A/(a*a);B>1&&(B=Math.sqrt(B),n*=B,a*=B);const T=n*n,$=a*a,M=T*$-T*A*A-$*R*R,q=T*A*A+$*R*R,V=(o===l?-1:1)*Math.sqrt(Math.abs(M/q));m=V*n*A/a+(e+r)/2,y=V*-a*R/n+(t+i)/2,d=Math.asin(parseFloat(((t-y)/a).toFixed(9))),g=Math.asin(parseFloat(((i-y)/a).toFixed(9))),eg&&(d-=2*Math.PI),!l&&g>d&&(g-=2*Math.PI)}let x=g-d;if(Math.abs(x)>120*Math.PI/180){const R=g,A=r,B=i;g=l&&g>d?d+120*Math.PI/180*1:d+120*Math.PI/180*-1,f=fp(r=m+n*Math.cos(g),i=y+a*Math.sin(g),A,B,n,a,s,0,l,[g,R,m,y])}x=g-d;const b=Math.cos(d),_=Math.sin(d),k=Math.cos(g),w=Math.sin(g),L=Math.tan(x/4),S=4/3*n*L,D=4/3*a*L,I=[e,t],O=[e+S*_,t-D*b],E=[r+S*w,i-D*k],N=[r,i];if(O[0]=2*I[0]-O[0],O[1]=2*I[1]-O[1],c)return[O,E,N].concat(f);{f=[O,E,N].concat(f);const R=[];for(let A=0;A2){const n=[];for(let a=0;a2*Math.PI&&(d=0,g=2*Math.PI);const m=2*Math.PI/l.curveStepCount,y=Math.min(m/2,(g-d)/2),x=Jc(y,c,h,u,f,d,g,1,l);if(!l.disableMultiStroke){const b=Jc(y,c,h,u,f,d,g,1.5,l);x.push(...b)}return s&&(o?x.push(...Ue(c,h,c+u*Math.cos(d),h+f*Math.sin(d),l),...Ue(c,h,c+u*Math.cos(g),h+f*Math.sin(g),l)):x.push({op:"lineTo",data:[c,h]},{op:"lineTo",data:[c+u*Math.cos(d),h+f*Math.sin(d)]})),{type:"path",ops:x}}function Zc(e,t){const r=up(hp(hl(e))),i=[];let n=[0,0],a=[0,0];for(const{key:s,data:o}of r)switch(s){case"M":a=[o[0],o[1]],n=[o[0],o[1]];break;case"L":i.push(...Ue(a[0],a[1],o[0],o[1],t)),a=[o[0],o[1]];break;case"C":{const[l,c,h,u,f,d]=o;i.push(...bv(l,c,h,u,f,d,a,t)),a=[f,d];break}case"Z":i.push(...Ue(a[0],a[1],n[0],n[1],t)),a=[n[0],n[1]]}return{type:"path",ops:i}}function hs(e,t){const r=[];for(const i of e)if(i.length){const n=t.maxRandomnessOffset||0,a=i.length;if(a>2){r.push({op:"move",data:[i[0][0]+nt(n,t),i[0][1]+nt(n,t)]});for(let s=1;s500?.4:-.0016668*l+1.233334;let h=n.maxRandomnessOffset||0;h*h*100>o&&(h=l/10);const u=h/2,f=.2+.2*gp(n);let d=n.bowing*n.maxRandomnessOffset*(i-t)/200,g=n.bowing*n.maxRandomnessOffset*(e-r)/200;d=nt(d,n,c),g=nt(g,n,c);const m=[],y=()=>nt(u,n,c),x=()=>nt(h,n,c),b=n.preserveVertices;return s?m.push({op:"move",data:[e+(b?0:y()),t+(b?0:y())]}):m.push({op:"move",data:[e+(b?0:nt(h,n,c)),t+(b?0:nt(h,n,c))]}),s?m.push({op:"bcurveTo",data:[d+e+(r-e)*f+y(),g+t+(i-t)*f+y(),d+e+2*(r-e)*f+y(),g+t+2*(i-t)*f+y(),r+(b?0:y()),i+(b?0:y())]}):m.push({op:"bcurveTo",data:[d+e+(r-e)*f+x(),g+t+(i-t)*f+x(),d+e+2*(r-e)*f+x(),g+t+2*(i-t)*f+x(),r+(b?0:x()),i+(b?0:x())]}),m}function hn(e,t,r){if(!e.length)return[];const i=[];i.push([e[0][0]+nt(t,r),e[0][1]+nt(t,r)]),i.push([e[0][0]+nt(t,r),e[0][1]+nt(t,r)]);for(let n=1;n3){const a=[],s=1-r.curveTightness;n.push({op:"move",data:[e[1][0],e[1][1]]});for(let o=1;o+21&&n.push(o)):n.push(o),n.push(e[t+3])}else{const l=e[t+0],c=e[t+1],h=e[t+2],u=e[t+3],f=rr(l,c,.5),d=rr(c,h,.5),g=rr(h,u,.5),m=rr(f,d,.5),y=rr(d,g,.5),x=rr(m,y,.5);ro([l,f,m,x],0,r,n),ro([x,y,g,u],0,r,n)}var a,s;return n}function Cv(e,t){return oa(e,0,e.length,t)}function oa(e,t,r,i,n){const a=n||[],s=e[t],o=e[r-1];let l=0,c=1;for(let h=t+1;hl&&(l=u,c=h)}return Math.sqrt(l)>i?(oa(e,t,c+1,i,a),oa(e,c,r,i,a)):(a.length||a.push(s),a.push(o)),a}function us(e,t=.15,r){const i=[],n=(e.length-1)/3;for(let a=0;a0?oa(i,0,i.length,r):i}const Kt="none";class la{constructor(t){this.defaultOptions={maxRandomnessOffset:2,roughness:1,bowing:1,stroke:"#000",strokeWidth:1,curveTightness:0,curveFitting:.95,curveStepCount:9,fillStyle:"hachure",fillWeight:-1,hachureAngle:-41,hachureGap:-1,dashOffset:-1,dashGap:-1,zigzagOffset:-1,seed:0,disableMultiStroke:!1,disableMultiStrokeFill:!1,preserveVertices:!1,fillShapeRoughnessGain:.8},this.config=t||{},this.config.options&&(this.defaultOptions=this._o(this.config.options))}static newSeed(){return Math.floor(Math.random()*2**31)}_o(t){return t?Object.assign({},this.defaultOptions,t):this.defaultOptions}_d(t,r,i){return{shape:t,sets:r||[],options:i||this.defaultOptions}}line(t,r,i,n,a){const s=this._o(a);return this._d("line",[dp(t,r,i,n,s)],s)}rectangle(t,r,i,n,a){const s=this._o(a),o=[],l=xv(t,r,i,n,s);if(s.fill){const c=[[t,r],[t+i,r],[t+i,r+n],[t,r+n]];s.fillStyle==="solid"?o.push(hs([c],s)):o.push(Lr([c],s))}return s.stroke!==Kt&&o.push(l),this._d("rectangle",o,s)}ellipse(t,r,i,n,a){const s=this._o(a),o=[],l=pp(i,n,s),c=to(t,r,s,l);if(s.fill)if(s.fillStyle==="solid"){const h=to(t,r,s,l).opset;h.type="fillPath",o.push(h)}else o.push(Lr([c.estimatedPoints],s));return s.stroke!==Kt&&o.push(c.opset),this._d("ellipse",o,s)}circle(t,r,i,n){const a=this.ellipse(t,r,i,i,n);return a.shape="circle",a}linearPath(t,r){const i=this._o(r);return this._d("linearPath",[vn(t,!1,i)],i)}arc(t,r,i,n,a,s,o=!1,l){const c=this._o(l),h=[],u=Xc(t,r,i,n,a,s,o,!0,c);if(o&&c.fill)if(c.fillStyle==="solid"){const f=Object.assign({},c);f.disableMultiStroke=!0;const d=Xc(t,r,i,n,a,s,!0,!1,f);d.type="fillPath",h.push(d)}else h.push((function(f,d,g,m,y,x,b){const _=f,k=d;let w=Math.abs(g/2),L=Math.abs(m/2);w+=nt(.01*w,b),L+=nt(.01*L,b);let S=y,D=x;for(;S<0;)S+=2*Math.PI,D+=2*Math.PI;D-S>2*Math.PI&&(S=0,D=2*Math.PI);const I=(D-S)/b.curveStepCount,O=[];for(let E=S;E<=D;E+=I)O.push([_+w*Math.cos(E),k+L*Math.sin(E)]);return O.push([_+w*Math.cos(D),k+L*Math.sin(D)]),O.push([_,k]),Lr([O],b)})(t,r,i,n,a,s,c));return c.stroke!==Kt&&h.push(u),this._d("arc",h,c)}curve(t,r){const i=this._o(r),n=[],a=Vc(t,i);if(i.fill&&i.fill!==Kt)if(i.fillStyle==="solid"){const s=Vc(t,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));n.push({type:"fillPath",ops:this._mergedShape(s.ops)})}else{const s=[],o=t;if(o.length){const l=typeof o[0][0]=="number"?[o]:o;for(const c of l)c.length<3?s.push(...c):c.length===3?s.push(...us(th([c[0],c[0],c[1],c[2]]),10,(1+i.roughness)/2)):s.push(...us(th(c),10,(1+i.roughness)/2))}s.length&&n.push(Lr([s],i))}return i.stroke!==Kt&&n.push(a),this._d("curve",n,i)}polygon(t,r){const i=this._o(r),n=[],a=vn(t,!0,i);return i.fill&&(i.fillStyle==="solid"?n.push(hs([t],i)):n.push(Lr([t],i))),i.stroke!==Kt&&n.push(a),this._d("polygon",n,i)}path(t,r){const i=this._o(r),n=[];if(!t)return this._d("path",n,i);t=(t||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");const a=i.fill&&i.fill!=="transparent"&&i.fill!==Kt,s=i.stroke!==Kt,o=!!(i.simplification&&i.simplification<1),l=(function(h,u,f){const d=up(hp(hl(h))),g=[];let m=[],y=[0,0],x=[];const b=()=>{x.length>=4&&m.push(...us(x,u)),x=[]},_=()=>{b(),m.length&&(g.push(m),m=[])};for(const{key:w,data:L}of d)switch(w){case"M":_(),y=[L[0],L[1]],m.push(y);break;case"L":b(),m.push([L[0],L[1]]);break;case"C":if(!x.length){const S=m.length?m[m.length-1]:y;x.push([S[0],S[1]])}x.push([L[0],L[1]]),x.push([L[2],L[3]]),x.push([L[4],L[5]]);break;case"Z":b(),m.push([y[0],y[1]])}if(_(),!f)return g;const k=[];for(const w of g){const L=Cv(w,f);L.length&&k.push(L)}return k})(t,1,o?4-4*(i.simplification||1):(1+i.roughness)/2),c=Zc(t,i);if(a)if(i.fillStyle==="solid")if(l.length===1){const h=Zc(t,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));n.push({type:"fillPath",ops:this._mergedShape(h.ops)})}else n.push(hs(l,i));else n.push(Lr(l,i));return s&&(o?l.forEach((h=>{n.push(vn(h,!1,i))})):n.push(c)),this._d("path",n,i)}opsToPath(t,r){let i="";for(const n of t.ops){const a=typeof r=="number"&&r>=0?n.data.map((s=>+s.toFixed(r))):n.data;switch(n.op){case"move":i+=`M${a[0]} ${a[1]} `;break;case"bcurveTo":i+=`C${a[0]} ${a[1]}, ${a[2]} ${a[3]}, ${a[4]} ${a[5]} `;break;case"lineTo":i+=`L${a[0]} ${a[1]} `}}return i.trim()}toPaths(t){const r=t.sets||[],i=t.options||this.defaultOptions,n=[];for(const a of r){let s=null;switch(a.type){case"path":s={d:this.opsToPath(a),stroke:i.stroke,strokeWidth:i.strokeWidth,fill:Kt};break;case"fillPath":s={d:this.opsToPath(a),stroke:Kt,strokeWidth:0,fill:i.fill||Kt};break;case"fillSketch":s=this.fillSketch(a,i)}s&&n.push(s)}return n}fillSketch(t,r){let i=r.fillWeight;return i<0&&(i=r.strokeWidth/2),{d:this.opsToPath(t),stroke:r.fill||Kt,strokeWidth:i,fill:Kt}}_mergedShape(t){return t.filter(((r,i)=>i===0||r.op!=="move"))}}class wv{constructor(t,r){this.canvas=t,this.ctx=this.canvas.getContext("2d"),this.gen=new la(r)}draw(t){const r=t.sets||[],i=t.options||this.getDefaultOptions(),n=this.ctx,a=t.options.fixedDecimalPlaceDigits;for(const s of r)switch(s.type){case"path":n.save(),n.strokeStyle=i.stroke==="none"?"transparent":i.stroke,n.lineWidth=i.strokeWidth,i.strokeLineDash&&n.setLineDash(i.strokeLineDash),i.strokeLineDashOffset&&(n.lineDashOffset=i.strokeLineDashOffset),this._drawToContext(n,s,a),n.restore();break;case"fillPath":{n.save(),n.fillStyle=i.fill||"";const o=t.shape==="curve"||t.shape==="polygon"||t.shape==="path"?"evenodd":"nonzero";this._drawToContext(n,s,a,o),n.restore();break}case"fillSketch":this.fillSketch(n,s,i)}}fillSketch(t,r,i){let n=i.fillWeight;n<0&&(n=i.strokeWidth/2),t.save(),i.fillLineDash&&t.setLineDash(i.fillLineDash),i.fillLineDashOffset&&(t.lineDashOffset=i.fillLineDashOffset),t.strokeStyle=i.fill||"",t.lineWidth=n,this._drawToContext(t,r,i.fixedDecimalPlaceDigits),t.restore()}_drawToContext(t,r,i,n="nonzero"){t.beginPath();for(const a of r.ops){const s=typeof i=="number"&&i>=0?a.data.map((o=>+o.toFixed(i))):a.data;switch(a.op){case"move":t.moveTo(s[0],s[1]);break;case"bcurveTo":t.bezierCurveTo(s[0],s[1],s[2],s[3],s[4],s[5]);break;case"lineTo":t.lineTo(s[0],s[1])}}r.type==="fillPath"?t.fill(n):t.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(t,r,i,n,a){const s=this.gen.line(t,r,i,n,a);return this.draw(s),s}rectangle(t,r,i,n,a){const s=this.gen.rectangle(t,r,i,n,a);return this.draw(s),s}ellipse(t,r,i,n,a){const s=this.gen.ellipse(t,r,i,n,a);return this.draw(s),s}circle(t,r,i,n){const a=this.gen.circle(t,r,i,n);return this.draw(a),a}linearPath(t,r){const i=this.gen.linearPath(t,r);return this.draw(i),i}polygon(t,r){const i=this.gen.polygon(t,r);return this.draw(i),i}arc(t,r,i,n,a,s,o=!1,l){const c=this.gen.arc(t,r,i,n,a,s,o,l);return this.draw(c),c}curve(t,r){const i=this.gen.curve(t,r);return this.draw(i),i}path(t,r){const i=this.gen.path(t,r);return this.draw(i),i}}const un="http://www.w3.org/2000/svg";class kv{constructor(t,r){this.svg=t,this.gen=new la(r)}draw(t){const r=t.sets||[],i=t.options||this.getDefaultOptions(),n=this.svg.ownerDocument||window.document,a=n.createElementNS(un,"g"),s=t.options.fixedDecimalPlaceDigits;for(const o of r){let l=null;switch(o.type){case"path":l=n.createElementNS(un,"path"),l.setAttribute("d",this.opsToPath(o,s)),l.setAttribute("stroke",i.stroke),l.setAttribute("stroke-width",i.strokeWidth+""),l.setAttribute("fill","none"),i.strokeLineDash&&l.setAttribute("stroke-dasharray",i.strokeLineDash.join(" ").trim()),i.strokeLineDashOffset&&l.setAttribute("stroke-dashoffset",`${i.strokeLineDashOffset}`);break;case"fillPath":l=n.createElementNS(un,"path"),l.setAttribute("d",this.opsToPath(o,s)),l.setAttribute("stroke","none"),l.setAttribute("stroke-width","0"),l.setAttribute("fill",i.fill||""),t.shape!=="curve"&&t.shape!=="polygon"||l.setAttribute("fill-rule","evenodd");break;case"fillSketch":l=this.fillSketch(n,o,i)}l&&a.appendChild(l)}return a}fillSketch(t,r,i){let n=i.fillWeight;n<0&&(n=i.strokeWidth/2);const a=t.createElementNS(un,"path");return a.setAttribute("d",this.opsToPath(r,i.fixedDecimalPlaceDigits)),a.setAttribute("stroke",i.fill||""),a.setAttribute("stroke-width",n+""),a.setAttribute("fill","none"),i.fillLineDash&&a.setAttribute("stroke-dasharray",i.fillLineDash.join(" ").trim()),i.fillLineDashOffset&&a.setAttribute("stroke-dashoffset",`${i.fillLineDashOffset}`),a}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(t,r){return this.gen.opsToPath(t,r)}line(t,r,i,n,a){const s=this.gen.line(t,r,i,n,a);return this.draw(s)}rectangle(t,r,i,n,a){const s=this.gen.rectangle(t,r,i,n,a);return this.draw(s)}ellipse(t,r,i,n,a){const s=this.gen.ellipse(t,r,i,n,a);return this.draw(s)}circle(t,r,i,n){const a=this.gen.circle(t,r,i,n);return this.draw(a)}linearPath(t,r){const i=this.gen.linearPath(t,r);return this.draw(i)}polygon(t,r){const i=this.gen.polygon(t,r);return this.draw(i)}arc(t,r,i,n,a,s,o=!1,l){const c=this.gen.arc(t,r,i,n,a,s,o,l);return this.draw(c)}curve(t,r){const i=this.gen.curve(t,r);return this.draw(i)}path(t,r){const i=this.gen.path(t,r);return this.draw(i)}}var j={canvas:(e,t)=>new wv(e,t),svg:(e,t)=>new kv(e,t),generator:e=>new la(e),newSeed:()=>la.newSeed()},it=p(async(e,t,r)=>{let i;const n=t.useHtmlLabels||Lt(ft()?.htmlLabels);r?i=r:i="node default";const a=e.insert("g").attr("class",i).attr("id",t.domId||t.id),s=a.insert("g").attr("class","label").attr("style",It(t.labelStyle));let o;t.label===void 0?o="":o=typeof t.label=="string"?t.label:t.label[0];const l=await Xe(s,ee(_r(o),ft()),{useHtmlLabels:n,width:t.width||ft().flowchart?.wrappingWidth,cssClasses:"markdown-node-label",style:t.labelStyle,addSvgBackground:!!t.icon||!!t.img});let c=l.getBBox();const h=(t?.padding??0)/2;if(n){const u=l.children[0],f=ht(l),d=u.getElementsByTagName("img");if(d){const g=o.replace(/]*>/g,"").trim()==="";await Promise.all([...d].map(m=>new Promise(y=>{function x(){if(m.style.display="flex",m.style.flexDirection="column",g){const b=ft().fontSize?ft().fontSize:window.getComputedStyle(document.body).fontSize,_=5,[k=Lh.fontSize]=Aa(b),w=k*_+"px";m.style.minWidth=w,m.style.maxWidth=w}else m.style.width="100%";y(m)}p(x,"setupImage"),setTimeout(()=>{m.complete&&x()}),m.addEventListener("error",x),m.addEventListener("load",x)})))}c=u.getBoundingClientRect(),f.attr("width",c.width),f.attr("height",c.height)}return n?s.attr("transform","translate("+-c.width/2+", "+-c.height/2+")"):s.attr("transform","translate(0, "+-c.height/2+")"),t.centerLabel&&s.attr("transform","translate("+-c.width/2+", "+-c.height/2+")"),s.insert("rect",":first-child"),{shapeSvg:a,bbox:c,halfPadding:h,label:s}},"labelHelper"),fs=p(async(e,t,r)=>{const i=r.useHtmlLabels||Lt(ft()?.flowchart?.htmlLabels),n=e.insert("g").attr("class","label").attr("style",r.labelStyle||""),a=await Xe(n,ee(_r(t),ft()),{useHtmlLabels:i,width:r.width||ft()?.flowchart?.wrappingWidth,style:r.labelStyle,addSvgBackground:!!r.icon||!!r.img});let s=a.getBBox();const o=r.padding/2;if(Lt(ft()?.flowchart?.htmlLabels)){const l=a.children[0],c=ht(a);s=l.getBoundingClientRect(),c.attr("width",s.width),c.attr("height",s.height)}return i?n.attr("transform","translate("+-s.width/2+", "+-s.height/2+")"):n.attr("transform","translate(0, "+-s.height/2+")"),r.centerLabel&&n.attr("transform","translate("+-s.width/2+", "+-s.height/2+")"),n.insert("rect",":first-child"),{shapeSvg:e,bbox:s,halfPadding:o,label:n}},"insertLabel"),G=p((e,t)=>{const r=t.node().getBBox();e.width=r.width,e.height=r.height},"updateNodeBounds"),rt=p((e,t)=>(e.look==="handDrawn"?"rough-node":"node")+" "+e.cssClasses+" "+(t||""),"getNodeClasses");function lt(e){const t=e.map((r,i)=>`${i===0?"M":"L"}${r.x},${r.y}`);return t.push("Z"),t.join(" ")}p(lt,"createPathFromPoints");function Ge(e,t,r,i,n,a){const s=[],l=r-e,c=i-t,h=l/a,u=2*Math.PI/h,f=t+c/2;for(let d=0;d<=50;d++){const g=d/50,m=e+g*l,y=f+n*Math.sin(u*(m-e));s.push({x:m,y})}return s}p(Ge,"generateFullSineWavePoints");function Oi(e,t,r,i,n,a){const s=[],o=n*Math.PI/180,h=(a*Math.PI/180-o)/(i-1);for(let u=0;u{var r=e.x,i=e.y,n=t.x-r,a=t.y-i,s=e.width/2,o=e.height/2,l,c;return Math.abs(a)*s>Math.abs(n)*o?(a<0&&(o=-o),l=a===0?0:o*n/a,c=o):(n<0&&(s=-s),l=s,c=n===0?0:s*a/n),{x:r+l,y:i+c}},"intersectRect"),Vr=vv;function mp(e,t){t&&e.attr("style",t)}p(mp,"applyStyle");async function yp(e){const t=ht(document.createElementNS("http://www.w3.org/2000/svg","foreignObject")),r=t.append("xhtml:div"),i=ft();let n=e.label;e.label&&Ir(e.label)&&(n=await yo(e.label.replace(jr.lineBreakRegex,` +`),i));const s='"+n+"";return r.html(ee(s,i)),mp(r,e.labelStyle),r.style("display","inline-block"),r.style("padding-right","1px"),r.style("white-space","nowrap"),r.attr("xmlns","http://www.w3.org/1999/xhtml"),t.node()}p(yp,"addHtmlLabel");var Sv=p(async(e,t,r,i)=>{let n=e||"";if(typeof n=="object"&&(n=n[0]),Lt(ft().flowchart.htmlLabels)){n=n.replace(/\\n|\n/g,"
    "),F.info("vertexText"+n);const a={isNode:i,label:_r(n).replace(/fa[blrs]?:fa-[\w-]+/g,o=>``),labelStyle:t&&t.replace("fill:","color:")};return await yp(a)}else{const a=document.createElementNS("http://www.w3.org/2000/svg","text");a.setAttribute("style",t.replace("color:","fill:"));let s=[];typeof n=="string"?s=n.split(/\\n|\n|/gi):Array.isArray(n)?s=n:s=[];for(const o of s){const 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"),r?l.setAttribute("class","title-row"):l.setAttribute("class","row"),l.textContent=o.trim(),a.appendChild(l)}return a}},"createLabel"),lr=Sv,Ze=p((e,t,r,i,n)=>["M",e+n,t,"H",e+r-n,"A",n,n,0,0,1,e+r,t+n,"V",t+i-n,"A",n,n,0,0,1,e+r-n,t+i,"H",e+n,"A",n,n,0,0,1,e,t+i-n,"V",t+n,"A",n,n,0,0,1,e+n,t,"Z"].join(" "),"createRoundedRectPathD"),xp=p(async(e,t)=>{F.info("Creating subgraph rect for ",t.id,t);const r=ft(),{themeVariables:i,handDrawnSeed:n}=r,{clusterBkg:a,clusterBorder:s}=i,{labelStyles:o,nodeStyles:l,borderStyles:c,backgroundStyles:h}=U(t),u=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.id).attr("data-look",t.look),f=Lt(r.flowchart.htmlLabels),d=u.insert("g").attr("class","cluster-label "),g=await Xe(d,t.label,{style:t.labelStyle,useHtmlLabels:f,isNode:!0});let m=g.getBBox();if(Lt(r.flowchart.htmlLabels)){const S=g.children[0],D=ht(g);m=S.getBoundingClientRect(),D.attr("width",m.width),D.attr("height",m.height)}const y=t.width<=m.width+t.padding?m.width+t.padding:t.width;t.width<=m.width+t.padding?t.diff=(y-t.width)/2-t.padding:t.diff=-t.padding;const x=t.height,b=t.x-y/2,_=t.y-x/2;F.trace("Data ",t,JSON.stringify(t));let k;if(t.look==="handDrawn"){const S=j.svg(u),D=Y(t,{roughness:.7,fill:a,stroke:s,fillWeight:3,seed:n}),I=S.path(Ze(b,_,y,x,0),D);k=u.insert(()=>(F.debug("Rough node insert CXC",I),I),":first-child"),k.select("path:nth-child(2)").attr("style",c.join(";")),k.select("path").attr("style",h.join(";").replace("fill","stroke"))}else k=u.insert("rect",":first-child"),k.attr("style",l).attr("rx",t.rx).attr("ry",t.ry).attr("x",b).attr("y",_).attr("width",y).attr("height",x);const{subGraphTitleTopMargin:w}=qo(r);if(d.attr("transform",`translate(${t.x-m.width/2}, ${t.y-t.height/2+w})`),o){const S=d.select("span");S&&S.attr("style",o)}const L=k.node().getBBox();return t.offsetX=0,t.width=L.width,t.height=L.height,t.offsetY=m.height-t.padding/2,t.intersect=function(S){return Vr(t,S)},{cluster:u,labelBBox:m}},"rect"),Tv=p((e,t)=>{const r=e.insert("g").attr("class","note-cluster").attr("id",t.id),i=r.insert("rect",":first-child"),n=0*t.padding,a=n/2;i.attr("rx",t.rx).attr("ry",t.ry).attr("x",t.x-t.width/2-a).attr("y",t.y-t.height/2-a).attr("width",t.width+n).attr("height",t.height+n).attr("fill","none");const s=i.node().getBBox();return t.width=s.width,t.height=s.height,t.intersect=function(o){return Vr(t,o)},{cluster:r,labelBBox:{width:0,height:0}}},"noteGroup"),Av=p(async(e,t)=>{const r=ft(),{themeVariables:i,handDrawnSeed:n}=r,{altBackground:a,compositeBackground:s,compositeTitleBackground:o,nodeBorder:l}=i,c=e.insert("g").attr("class",t.cssClasses).attr("id",t.id).attr("data-id",t.id).attr("data-look",t.look),h=c.insert("g",":first-child"),u=c.insert("g").attr("class","cluster-label");let f=c.append("rect");const d=u.node().appendChild(await lr(t.label,t.labelStyle,void 0,!0));let g=d.getBBox();if(Lt(r.flowchart.htmlLabels)){const I=d.children[0],O=ht(d);g=I.getBoundingClientRect(),O.attr("width",g.width),O.attr("height",g.height)}const m=0*t.padding,y=m/2,x=(t.width<=g.width+t.padding?g.width+t.padding:t.width)+m;t.width<=g.width+t.padding?t.diff=(x-t.width)/2-t.padding:t.diff=-t.padding;const b=t.height+m,_=t.height+m-g.height-6,k=t.x-x/2,w=t.y-b/2;t.width=x;const L=t.y-t.height/2-y+g.height+2;let S;if(t.look==="handDrawn"){const I=t.cssClasses.includes("statediagram-cluster-alt"),O=j.svg(c),E=t.rx||t.ry?O.path(Ze(k,w,x,b,10),{roughness:.7,fill:o,fillStyle:"solid",stroke:l,seed:n}):O.rectangle(k,w,x,b,{seed:n});S=c.insert(()=>E,":first-child");const N=O.rectangle(k,L,x,_,{fill:I?a:s,fillStyle:I?"hachure":"solid",stroke:l,seed:n});S=c.insert(()=>E,":first-child"),f=c.insert(()=>N)}else S=h.insert("rect",":first-child"),S.attr("class","outer").attr("x",k).attr("y",w).attr("width",x).attr("height",b).attr("data-look",t.look),f.attr("class","inner").attr("x",k).attr("y",L).attr("width",x).attr("height",_);u.attr("transform",`translate(${t.x-g.width/2}, ${w+1-(Lt(r.flowchart.htmlLabels)?0:3)})`);const D=S.node().getBBox();return t.height=D.height,t.offsetX=0,t.offsetY=g.height-t.padding/2,t.labelBBox=g,t.intersect=function(I){return Vr(t,I)},{cluster:c,labelBBox:g}},"roundedWithTitle"),Lv=p(async(e,t)=>{F.info("Creating subgraph rect for ",t.id,t);const r=ft(),{themeVariables:i,handDrawnSeed:n}=r,{clusterBkg:a,clusterBorder:s}=i,{labelStyles:o,nodeStyles:l,borderStyles:c,backgroundStyles:h}=U(t),u=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.id).attr("data-look",t.look),f=Lt(r.flowchart.htmlLabels),d=u.insert("g").attr("class","cluster-label "),g=await Xe(d,t.label,{style:t.labelStyle,useHtmlLabels:f,isNode:!0,width:t.width});let m=g.getBBox();if(Lt(r.flowchart.htmlLabels)){const S=g.children[0],D=ht(g);m=S.getBoundingClientRect(),D.attr("width",m.width),D.attr("height",m.height)}const y=t.width<=m.width+t.padding?m.width+t.padding:t.width;t.width<=m.width+t.padding?t.diff=(y-t.width)/2-t.padding:t.diff=-t.padding;const x=t.height,b=t.x-y/2,_=t.y-x/2;F.trace("Data ",t,JSON.stringify(t));let k;if(t.look==="handDrawn"){const S=j.svg(u),D=Y(t,{roughness:.7,fill:a,stroke:s,fillWeight:4,seed:n}),I=S.path(Ze(b,_,y,x,t.rx),D);k=u.insert(()=>(F.debug("Rough node insert CXC",I),I),":first-child"),k.select("path:nth-child(2)").attr("style",c.join(";")),k.select("path").attr("style",h.join(";").replace("fill","stroke"))}else k=u.insert("rect",":first-child"),k.attr("style",l).attr("rx",t.rx).attr("ry",t.ry).attr("x",b).attr("y",_).attr("width",y).attr("height",x);const{subGraphTitleTopMargin:w}=qo(r);if(d.attr("transform",`translate(${t.x-m.width/2}, ${t.y-t.height/2+w})`),o){const S=d.select("span");S&&S.attr("style",o)}const L=k.node().getBBox();return t.offsetX=0,t.width=L.width,t.height=L.height,t.offsetY=m.height-t.padding/2,t.intersect=function(S){return Vr(t,S)},{cluster:u,labelBBox:m}},"kanbanSection"),Bv=p((e,t)=>{const r=ft(),{themeVariables:i,handDrawnSeed:n}=r,{nodeBorder:a}=i,s=e.insert("g").attr("class",t.cssClasses).attr("id",t.id).attr("data-look",t.look),o=s.insert("g",":first-child"),l=0*t.padding,c=t.width+l;t.diff=-t.padding;const h=t.height+l,u=t.x-c/2,f=t.y-h/2;t.width=c;let d;if(t.look==="handDrawn"){const y=j.svg(s).rectangle(u,f,c,h,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:a,seed:n});d=s.insert(()=>y,":first-child")}else d=o.insert("rect",":first-child"),d.attr("class","divider").attr("x",u).attr("y",f).attr("width",c).attr("height",h).attr("data-look",t.look);const g=d.node().getBBox();return t.height=g.height,t.offsetX=0,t.offsetY=0,t.intersect=function(m){return Vr(t,m)},{cluster:s,labelBBox:{}}},"divider"),Mv=xp,Ev={rect:xp,squareRect:Mv,roundedWithTitle:Av,noteGroup:Tv,divider:Bv,kanbanSection:Lv},bp=new Map,$v=p(async(e,t)=>{const r=t.shape||"rect",i=await Ev[r](e,t);return bp.set(t.id,i),i},"insertCluster"),sB=p(()=>{bp=new Map},"clear");function _p(e,t){return e.intersect(t)}p(_p,"intersectNode");var Fv=_p;function Cp(e,t,r,i){var n=e.x,a=e.y,s=n-i.x,o=a-i.y,l=Math.sqrt(t*t*o*o+r*r*s*s),c=Math.abs(t*r*s/l);i.x0}p(io,"sameSign");var Ov=vp;function Sp(e,t,r){let i=e.x,n=e.y,a=[],s=Number.POSITIVE_INFINITY,o=Number.POSITIVE_INFINITY;typeof t.forEach=="function"?t.forEach(function(h){s=Math.min(s,h.x),o=Math.min(o,h.y)}):(s=Math.min(s,t.x),o=Math.min(o,t.y));let l=i-e.width/2-s,c=n-e.height/2-o;for(let h=0;h1&&a.sort(function(h,u){let f=h.x-r.x,d=h.y-r.y,g=Math.sqrt(f*f+d*d),m=u.x-r.x,y=u.y-r.y,x=Math.sqrt(m*m+y*y);return gh,":first-child");return u.attr("class","anchor").attr("style",It(o)),G(t,u),t.intersect=function(f){return F.info("Circle intersect",t,s,f),W.circle(t,s,f)},a}p(Tp,"anchor");function no(e,t,r,i,n,a,s){const l=(e+r)/2,c=(t+i)/2,h=Math.atan2(i-t,r-e),u=(r-e)/2,f=(i-t)/2,d=u/n,g=f/a,m=Math.sqrt(d**2+g**2);if(m>1)throw new Error("The given radii are too small to create an arc between the points.");const y=Math.sqrt(1-m**2),x=l+y*a*Math.sin(h)*(s?-1:1),b=c-y*n*Math.cos(h)*(s?-1:1),_=Math.atan2((t-b)/a,(e-x)/n);let w=Math.atan2((i-b)/a,(r-x)/n)-_;s&&w<0&&(w+=2*Math.PI),!s&&w>0&&(w-=2*Math.PI);const L=[];for(let S=0;S<20;S++){const D=S/19,I=_+D*w,O=x+n*Math.cos(I),E=b+a*Math.sin(I);L.push({x:O,y:E})}return L}p(no,"generateArcPoints");async function Ap(e,t){const{labelStyles:r,nodeStyles:i}=U(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await it(e,t,rt(t)),s=a.width+t.padding+20,o=a.height+t.padding,l=o/2,c=l/(2.5+o/50),{cssStyles:h}=t,u=[{x:s/2,y:-o/2},{x:-s/2,y:-o/2},...no(-s/2,-o/2,-s/2,o/2,c,l,!1),{x:s/2,y:o/2},...no(s/2,o/2,s/2,-o/2,c,l,!0)],f=j.svg(n),d=Y(t,{});t.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const g=lt(u),m=f.path(g,d),y=n.insert(()=>m,":first-child");return y.attr("class","basic label-container"),h&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",h),i&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",i),y.attr("transform",`translate(${c/2}, 0)`),G(t,y),t.intersect=function(x){return W.polygon(t,u,x)},n}p(Ap,"bowTieRect");function Ke(e,t,r,i){return e.insert("polygon",":first-child").attr("points",i.map(function(n){return n.x+","+n.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-t/2+","+r/2+")")}p(Ke,"insertPolygonShape");async function Lp(e,t){const{labelStyles:r,nodeStyles:i}=U(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await it(e,t,rt(t)),s=a.height+t.padding,o=12,l=a.width+t.padding+o,c=0,h=l,u=-s,f=0,d=[{x:c+o,y:u},{x:h,y:u},{x:h,y:f},{x:c,y:f},{x:c,y:u+o},{x:c+o,y:u}];let g;const{cssStyles:m}=t;if(t.look==="handDrawn"){const y=j.svg(n),x=Y(t,{}),b=lt(d),_=y.path(b,x);g=n.insert(()=>_,":first-child").attr("transform",`translate(${-l/2}, ${s/2})`),m&&g.attr("style",m)}else g=Ke(n,l,s,d);return i&&g.attr("style",i),G(t,g),t.intersect=function(y){return W.polygon(t,d,y)},n}p(Lp,"card");function Bp(e,t){const{nodeStyles:r}=U(t);t.label="";const i=e.insert("g").attr("class",rt(t)).attr("id",t.domId??t.id),{cssStyles:n}=t,a=Math.max(28,t.width??0),s=[{x:0,y:a/2},{x:a/2,y:0},{x:0,y:-a/2},{x:-a/2,y:0}],o=j.svg(i),l=Y(t,{});t.look!=="handDrawn"&&(l.roughness=0,l.fillStyle="solid");const c=lt(s),h=o.path(c,l),u=i.insert(()=>h,":first-child");return n&&t.look!=="handDrawn"&&u.selectAll("path").attr("style",n),r&&t.look!=="handDrawn"&&u.selectAll("path").attr("style",r),t.width=28,t.height=28,t.intersect=function(f){return W.polygon(t,s,f)},i}p(Bp,"choice");async function ul(e,t,r){const{labelStyles:i,nodeStyles:n}=U(t);t.labelStyle=i;const{shapeSvg:a,bbox:s,halfPadding:o}=await it(e,t,rt(t)),l=r?.padding??o,c=s.width/2+l;let h;const{cssStyles:u}=t;if(t.look==="handDrawn"){const f=j.svg(a),d=Y(t,{}),g=f.circle(0,0,c*2,d);h=a.insert(()=>g,":first-child"),h.attr("class","basic label-container").attr("style",It(u))}else h=a.insert("circle",":first-child").attr("class","basic label-container").attr("style",n).attr("r",c).attr("cx",0).attr("cy",0);return G(t,h),t.calcIntersect=function(f,d){const g=f.width/2;return W.circle(f,g,d)},t.intersect=function(f){return F.info("Circle intersect",t,c,f),W.circle(t,c,f)},a}p(ul,"circle");function Mp(e){const t=Math.cos(Math.PI/4),r=Math.sin(Math.PI/4),i=e*2,n={x:i/2*t,y:i/2*r},a={x:-(i/2)*t,y:i/2*r},s={x:-(i/2)*t,y:-(i/2)*r},o={x:i/2*t,y:-(i/2)*r};return`M ${a.x},${a.y} L ${o.x},${o.y} + M ${n.x},${n.y} L ${s.x},${s.y}`}p(Mp,"createLine");function Ep(e,t){const{labelStyles:r,nodeStyles:i}=U(t);t.labelStyle=r,t.label="";const n=e.insert("g").attr("class",rt(t)).attr("id",t.domId??t.id),a=Math.max(30,t?.width??0),{cssStyles:s}=t,o=j.svg(n),l=Y(t,{});t.look!=="handDrawn"&&(l.roughness=0,l.fillStyle="solid");const c=o.circle(0,0,a*2,l),h=Mp(a),u=o.path(h,l),f=n.insert(()=>c,":first-child");return f.insert(()=>u),s&&t.look!=="handDrawn"&&f.selectAll("path").attr("style",s),i&&t.look!=="handDrawn"&&f.selectAll("path").attr("style",i),G(t,f),t.intersect=function(d){return F.info("crossedCircle intersect",t,{radius:a,point:d}),W.circle(t,a,d)},n}p(Ep,"crossedCircle");function Ee(e,t,r,i=100,n=0,a=180){const s=[],o=n*Math.PI/180,h=(a*Math.PI/180-o)/(i-1);for(let u=0;u_,":first-child").attr("stroke-opacity",0),k.insert(()=>x,":first-child"),k.attr("class","text"),h&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",h),i&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",i),k.attr("transform",`translate(${c}, 0)`),s.attr("transform",`translate(${-o/2+c-(a.x-(a.left??0))},${-l/2+(t.padding??0)/2-(a.y-(a.top??0))})`),G(t,k),t.intersect=function(w){return W.polygon(t,f,w)},n}p($p,"curlyBraceLeft");function $e(e,t,r,i=100,n=0,a=180){const s=[],o=n*Math.PI/180,h=(a*Math.PI/180-o)/(i-1);for(let u=0;u_,":first-child").attr("stroke-opacity",0),k.insert(()=>x,":first-child"),k.attr("class","text"),h&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",h),i&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",i),k.attr("transform",`translate(${-c}, 0)`),s.attr("transform",`translate(${-o/2+(t.padding??0)/2-(a.x-(a.left??0))},${-l/2+(t.padding??0)/2-(a.y-(a.top??0))})`),G(t,k),t.intersect=function(w){return W.polygon(t,f,w)},n}p(Fp,"curlyBraceRight");function Mt(e,t,r,i=100,n=0,a=180){const s=[],o=n*Math.PI/180,h=(a*Math.PI/180-o)/(i-1);for(let u=0;uS,":first-child").attr("stroke-opacity",0),D.insert(()=>b,":first-child"),D.insert(()=>w,":first-child"),D.attr("class","text"),h&&t.look!=="handDrawn"&&D.selectAll("path").attr("style",h),i&&t.look!=="handDrawn"&&D.selectAll("path").attr("style",i),D.attr("transform",`translate(${c-c/4}, 0)`),s.attr("transform",`translate(${-o/2+(t.padding??0)/2-(a.x-(a.left??0))},${-l/2+(t.padding??0)/2-(a.y-(a.top??0))})`),G(t,D),t.intersect=function(I){return W.polygon(t,d,I)},n}p(Dp,"curlyBraces");async function Op(e,t){const{labelStyles:r,nodeStyles:i}=U(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await it(e,t,rt(t)),s=80,o=20,l=Math.max(s,(a.width+(t.padding??0)*2)*1.25,t?.width??0),c=Math.max(o,a.height+(t.padding??0)*2,t?.height??0),h=c/2,{cssStyles:u}=t,f=j.svg(n),d=Y(t,{});t.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const g=l,m=c,y=g-h,x=m/4,b=[{x:y,y:0},{x,y:0},{x:0,y:m/2},{x,y:m},{x:y,y:m},...Oi(-y,-m/2,h,50,270,90)],_=lt(b),k=f.path(_,d),w=n.insert(()=>k,":first-child");return w.attr("class","basic label-container"),u&&t.look!=="handDrawn"&&w.selectChildren("path").attr("style",u),i&&t.look!=="handDrawn"&&w.selectChildren("path").attr("style",i),w.attr("transform",`translate(${-l/2}, ${-c/2})`),G(t,w),t.intersect=function(L){return W.polygon(t,b,L)},n}p(Op,"curvedTrapezoid");var Iv=p((e,t,r,i,n,a)=>[`M${e},${t+a}`,`a${n},${a} 0,0,0 ${r},0`,`a${n},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${n},${a} 0,0,0 ${r},0`,`l0,${-i}`].join(" "),"createCylinderPathD"),Pv=p((e,t,r,i,n,a)=>[`M${e},${t+a}`,`M${e+r},${t+a}`,`a${n},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${n},${a} 0,0,0 ${r},0`,`l0,${-i}`].join(" "),"createOuterCylinderPathD"),Nv=p((e,t,r,i,n,a)=>[`M${e-r/2},${-i/2}`,`a${n},${a} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD");async function Rp(e,t){const{labelStyles:r,nodeStyles:i}=U(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:s}=await it(e,t,rt(t)),o=Math.max(a.width+t.padding,t.width??0),l=o/2,c=l/(2.5+o/50),h=Math.max(a.height+c+t.padding,t.height??0);let u;const{cssStyles:f}=t;if(t.look==="handDrawn"){const d=j.svg(n),g=Pv(0,0,o,h,l,c),m=Nv(0,c,o,h,l,c),y=d.path(g,Y(t,{})),x=d.path(m,Y(t,{fill:"none"}));u=n.insert(()=>x,":first-child"),u=n.insert(()=>y,":first-child"),u.attr("class","basic label-container"),f&&u.attr("style",f)}else{const d=Iv(0,0,o,h,l,c);u=n.insert("path",":first-child").attr("d",d).attr("class","basic label-container").attr("style",It(f)).attr("style",i)}return u.attr("label-offset-y",c),u.attr("transform",`translate(${-o/2}, ${-(h/2+c)})`),G(t,u),s.attr("transform",`translate(${-(a.width/2)-(a.x-(a.left??0))}, ${-(a.height/2)+(t.padding??0)/1.5-(a.y-(a.top??0))})`),t.intersect=function(d){const g=W.rect(t,d),m=g.x-(t.x??0);if(l!=0&&(Math.abs(m)<(t.width??0)/2||Math.abs(m)==(t.width??0)/2&&Math.abs(g.y-(t.y??0))>(t.height??0)/2-c)){let y=c*c*(1-m*m/(l*l));y>0&&(y=Math.sqrt(y)),y=c-y,d.y-(t.y??0)>0&&(y=-y),g.y+=y}return g},n}p(Rp,"cylinder");async function Ip(e,t){const{labelStyles:r,nodeStyles:i}=U(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:s}=await it(e,t,rt(t)),o=a.width+t.padding,l=a.height+t.padding,c=l*.2,h=-o/2,u=-l/2-c/2,{cssStyles:f}=t,d=j.svg(n),g=Y(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const m=[{x:h,y:u+c},{x:-h,y:u+c},{x:-h,y:-u},{x:h,y:-u},{x:h,y:u},{x:-h,y:u},{x:-h,y:u+c}],y=d.polygon(m.map(b=>[b.x,b.y]),g),x=n.insert(()=>y,":first-child");return x.attr("class","basic label-container"),f&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",f),i&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",i),s.attr("transform",`translate(${h+(t.padding??0)/2-(a.x-(a.left??0))}, ${u+c+(t.padding??0)/2-(a.y-(a.top??0))})`),G(t,x),t.intersect=function(b){return W.rect(t,b)},n}p(Ip,"dividedRectangle");async function Pp(e,t){const{labelStyles:r,nodeStyles:i}=U(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,halfPadding:s}=await it(e,t,rt(t)),l=a.width/2+s+5,c=a.width/2+s;let h;const{cssStyles:u}=t;if(t.look==="handDrawn"){const f=j.svg(n),d=Y(t,{roughness:.2,strokeWidth:2.5}),g=Y(t,{roughness:.2,strokeWidth:1.5}),m=f.circle(0,0,l*2,d),y=f.circle(0,0,c*2,g);h=n.insert("g",":first-child"),h.attr("class",It(t.cssClasses)).attr("style",It(u)),h.node()?.appendChild(m),h.node()?.appendChild(y)}else{h=n.insert("g",":first-child");const f=h.insert("circle",":first-child"),d=h.insert("circle");h.attr("class","basic label-container").attr("style",i),f.attr("class","outer-circle").attr("style",i).attr("r",l).attr("cx",0).attr("cy",0),d.attr("class","inner-circle").attr("style",i).attr("r",c).attr("cx",0).attr("cy",0)}return G(t,h),t.intersect=function(f){return F.info("DoubleCircle intersect",t,l,f),W.circle(t,l,f)},n}p(Pp,"doublecircle");function Np(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:n}=U(t);t.label="",t.labelStyle=i;const a=e.insert("g").attr("class",rt(t)).attr("id",t.domId??t.id),s=7,{cssStyles:o}=t,l=j.svg(a),{nodeBorder:c}=r,h=Y(t,{fillStyle:"solid"});t.look!=="handDrawn"&&(h.roughness=0);const u=l.circle(0,0,s*2,h),f=a.insert(()=>u,":first-child");return f.selectAll("path").attr("style",`fill: ${c} !important;`),o&&o.length>0&&t.look!=="handDrawn"&&f.selectAll("path").attr("style",o),n&&t.look!=="handDrawn"&&f.selectAll("path").attr("style",n),G(t,f),t.intersect=function(d){return F.info("filledCircle intersect",t,{radius:s,point:d}),W.circle(t,s,d)},a}p(Np,"filledCircle");async function zp(e,t){const{labelStyles:r,nodeStyles:i}=U(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:s}=await it(e,t,rt(t)),o=a.width+(t.padding??0),l=o+a.height,c=o+a.height,h=[{x:0,y:-l},{x:c,y:-l},{x:c/2,y:0}],{cssStyles:u}=t,f=j.svg(n),d=Y(t,{});t.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const g=lt(h),m=f.path(g,d),y=n.insert(()=>m,":first-child").attr("transform",`translate(${-l/2}, ${l/2})`);return u&&t.look!=="handDrawn"&&y.selectChildren("path").attr("style",u),i&&t.look!=="handDrawn"&&y.selectChildren("path").attr("style",i),t.width=o,t.height=l,G(t,y),s.attr("transform",`translate(${-a.width/2-(a.x-(a.left??0))}, ${-l/2+(t.padding??0)/2+(a.y-(a.top??0))})`),t.intersect=function(x){return F.info("Triangle intersect",t,h,x),W.polygon(t,h,x)},n}p(zp,"flippedTriangle");function Wp(e,t,{dir:r,config:{state:i,themeVariables:n}}){const{nodeStyles:a}=U(t);t.label="";const s=e.insert("g").attr("class",rt(t)).attr("id",t.domId??t.id),{cssStyles:o}=t;let l=Math.max(70,t?.width??0),c=Math.max(10,t?.height??0);r==="LR"&&(l=Math.max(10,t?.width??0),c=Math.max(70,t?.height??0));const h=-1*l/2,u=-1*c/2,f=j.svg(s),d=Y(t,{stroke:n.lineColor,fill:n.lineColor});t.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const g=f.rectangle(h,u,l,c,d),m=s.insert(()=>g,":first-child");o&&t.look!=="handDrawn"&&m.selectAll("path").attr("style",o),a&&t.look!=="handDrawn"&&m.selectAll("path").attr("style",a),G(t,m);const y=i?.padding??0;return t.width&&t.height&&(t.width+=y/2||0,t.height+=y/2||0),t.intersect=function(x){return W.rect(t,x)},s}p(Wp,"forkJoin");async function qp(e,t){const{labelStyles:r,nodeStyles:i}=U(t);t.labelStyle=r;const n=80,a=50,{shapeSvg:s,bbox:o}=await it(e,t,rt(t)),l=Math.max(n,o.width+(t.padding??0)*2,t?.width??0),c=Math.max(a,o.height+(t.padding??0)*2,t?.height??0),h=c/2,{cssStyles:u}=t,f=j.svg(s),d=Y(t,{});t.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const g=[{x:-l/2,y:-c/2},{x:l/2-h,y:-c/2},...Oi(-l/2+h,0,h,50,90,270),{x:l/2-h,y:c/2},{x:-l/2,y:c/2}],m=lt(g),y=f.path(m,d),x=s.insert(()=>y,":first-child");return x.attr("class","basic label-container"),u&&t.look!=="handDrawn"&&x.selectChildren("path").attr("style",u),i&&t.look!=="handDrawn"&&x.selectChildren("path").attr("style",i),G(t,x),t.intersect=function(b){return F.info("Pill intersect",t,{radius:h,point:b}),W.polygon(t,g,b)},s}p(qp,"halfRoundedRectangle");async function Hp(e,t){const{labelStyles:r,nodeStyles:i}=U(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await it(e,t,rt(t)),s=a.height+(t.padding??0),o=a.width+(t.padding??0)*2.5,{cssStyles:l}=t,c=j.svg(n),h=Y(t,{});t.look!=="handDrawn"&&(h.roughness=0,h.fillStyle="solid");let u=o/2;const f=u/6;u=u+f;const d=s/2,g=d/2,m=u-g,y=[{x:-m,y:-d},{x:0,y:-d},{x:m,y:-d},{x:u,y:0},{x:m,y:d},{x:0,y:d},{x:-m,y:d},{x:-u,y:0}],x=lt(y),b=c.path(x,h),_=n.insert(()=>b,":first-child");return _.attr("class","basic label-container"),l&&t.look!=="handDrawn"&&_.selectChildren("path").attr("style",l),i&&t.look!=="handDrawn"&&_.selectChildren("path").attr("style",i),t.width=o,t.height=s,G(t,_),t.intersect=function(k){return W.polygon(t,y,k)},n}p(Hp,"hexagon");async function jp(e,t){const{labelStyles:r,nodeStyles:i}=U(t);t.label="",t.labelStyle=r;const{shapeSvg:n}=await it(e,t,rt(t)),a=Math.max(30,t?.width??0),s=Math.max(30,t?.height??0),{cssStyles:o}=t,l=j.svg(n),c=Y(t,{});t.look!=="handDrawn"&&(c.roughness=0,c.fillStyle="solid");const h=[{x:0,y:0},{x:a,y:0},{x:0,y:s},{x:a,y:s}],u=lt(h),f=l.path(u,c),d=n.insert(()=>f,":first-child");return d.attr("class","basic label-container"),o&&t.look!=="handDrawn"&&d.selectChildren("path").attr("style",o),i&&t.look!=="handDrawn"&&d.selectChildren("path").attr("style",i),d.attr("transform",`translate(${-a/2}, ${-s/2})`),G(t,d),t.intersect=function(g){return F.info("Pill intersect",t,{points:h}),W.polygon(t,h,g)},n}p(jp,"hourglass");async function Yp(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:n}=U(t);t.labelStyle=n;const a=t.assetHeight??48,s=t.assetWidth??48,o=Math.max(a,s),l=i?.wrappingWidth;t.width=Math.max(o,l??0);const{shapeSvg:c,bbox:h,label:u}=await it(e,t,"icon-shape default"),f=t.pos==="t",d=o,g=o,{nodeBorder:m}=r,{stylesMap:y}=Yr(t),x=-g/2,b=-d/2,_=t.label?8:0,k=j.svg(c),w=Y(t,{stroke:"none",fill:"none"});t.look!=="handDrawn"&&(w.roughness=0,w.fillStyle="solid");const L=k.rectangle(x,b,g,d,w),S=Math.max(g,h.width),D=d+h.height+_,I=k.rectangle(-S/2,-D/2,S,D,{...w,fill:"transparent",stroke:"none"}),O=c.insert(()=>L,":first-child"),E=c.insert(()=>I);if(t.icon){const N=c.append("g");N.html(`${await Ui(t.icon,{height:o,width:o,fallbackPrefix:""})}`);const R=N.node().getBBox(),A=R.width,B=R.height,T=R.x,$=R.y;N.attr("transform",`translate(${-A/2-T},${f?h.height/2+_/2-B/2-$:-h.height/2-_/2-B/2-$})`),N.attr("style",`color: ${y.get("stroke")??m};`)}return u.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${f?-D/2:D/2-h.height})`),O.attr("transform",`translate(0,${f?h.height/2+_/2:-h.height/2-_/2})`),G(t,E),t.intersect=function(N){if(F.info("iconSquare intersect",t,N),!t.label)return W.rect(t,N);const R=t.x??0,A=t.y??0,B=t.height??0;let T=[];return f?T=[{x:R-h.width/2,y:A-B/2},{x:R+h.width/2,y:A-B/2},{x:R+h.width/2,y:A-B/2+h.height+_},{x:R+g/2,y:A-B/2+h.height+_},{x:R+g/2,y:A+B/2},{x:R-g/2,y:A+B/2},{x:R-g/2,y:A-B/2+h.height+_},{x:R-h.width/2,y:A-B/2+h.height+_}]:T=[{x:R-g/2,y:A-B/2},{x:R+g/2,y:A-B/2},{x:R+g/2,y:A-B/2+d},{x:R+h.width/2,y:A-B/2+d},{x:R+h.width/2/2,y:A+B/2},{x:R-h.width/2,y:A+B/2},{x:R-h.width/2,y:A-B/2+d},{x:R-g/2,y:A-B/2+d}],W.polygon(t,T,N)},c}p(Yp,"icon");async function Up(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:n}=U(t);t.labelStyle=n;const a=t.assetHeight??48,s=t.assetWidth??48,o=Math.max(a,s),l=i?.wrappingWidth;t.width=Math.max(o,l??0);const{shapeSvg:c,bbox:h,label:u}=await it(e,t,"icon-shape default"),f=20,d=t.label?8:0,g=t.pos==="t",{nodeBorder:m,mainBkg:y}=r,{stylesMap:x}=Yr(t),b=j.svg(c),_=Y(t,{});t.look!=="handDrawn"&&(_.roughness=0,_.fillStyle="solid");const k=x.get("fill");_.stroke=k??y;const w=c.append("g");t.icon&&w.html(`${await Ui(t.icon,{height:o,width:o,fallbackPrefix:""})}`);const L=w.node().getBBox(),S=L.width,D=L.height,I=L.x,O=L.y,E=Math.max(S,D)*Math.SQRT2+f*2,N=b.circle(0,0,E,_),R=Math.max(E,h.width),A=E+h.height+d,B=b.rectangle(-R/2,-A/2,R,A,{..._,fill:"transparent",stroke:"none"}),T=c.insert(()=>N,":first-child"),$=c.insert(()=>B);return w.attr("transform",`translate(${-S/2-I},${g?h.height/2+d/2-D/2-O:-h.height/2-d/2-D/2-O})`),w.attr("style",`color: ${x.get("stroke")??m};`),u.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${g?-A/2:A/2-h.height})`),T.attr("transform",`translate(0,${g?h.height/2+d/2:-h.height/2-d/2})`),G(t,$),t.intersect=function(M){return F.info("iconSquare intersect",t,M),W.rect(t,M)},c}p(Up,"iconCircle");async function Gp(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:n}=U(t);t.labelStyle=n;const a=t.assetHeight??48,s=t.assetWidth??48,o=Math.max(a,s),l=i?.wrappingWidth;t.width=Math.max(o,l??0);const{shapeSvg:c,bbox:h,halfPadding:u,label:f}=await it(e,t,"icon-shape default"),d=t.pos==="t",g=o+u*2,m=o+u*2,{nodeBorder:y,mainBkg:x}=r,{stylesMap:b}=Yr(t),_=-m/2,k=-g/2,w=t.label?8:0,L=j.svg(c),S=Y(t,{});t.look!=="handDrawn"&&(S.roughness=0,S.fillStyle="solid");const D=b.get("fill");S.stroke=D??x;const I=L.path(Ze(_,k,m,g,5),S),O=Math.max(m,h.width),E=g+h.height+w,N=L.rectangle(-O/2,-E/2,O,E,{...S,fill:"transparent",stroke:"none"}),R=c.insert(()=>I,":first-child").attr("class","icon-shape2"),A=c.insert(()=>N);if(t.icon){const B=c.append("g");B.html(`${await Ui(t.icon,{height:o,width:o,fallbackPrefix:""})}`);const T=B.node().getBBox(),$=T.width,M=T.height,q=T.x,V=T.y;B.attr("transform",`translate(${-$/2-q},${d?h.height/2+w/2-M/2-V:-h.height/2-w/2-M/2-V})`),B.attr("style",`color: ${b.get("stroke")??y};`)}return f.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${d?-E/2:E/2-h.height})`),R.attr("transform",`translate(0,${d?h.height/2+w/2:-h.height/2-w/2})`),G(t,A),t.intersect=function(B){if(F.info("iconSquare intersect",t,B),!t.label)return W.rect(t,B);const T=t.x??0,$=t.y??0,M=t.height??0;let q=[];return d?q=[{x:T-h.width/2,y:$-M/2},{x:T+h.width/2,y:$-M/2},{x:T+h.width/2,y:$-M/2+h.height+w},{x:T+m/2,y:$-M/2+h.height+w},{x:T+m/2,y:$+M/2},{x:T-m/2,y:$+M/2},{x:T-m/2,y:$-M/2+h.height+w},{x:T-h.width/2,y:$-M/2+h.height+w}]:q=[{x:T-m/2,y:$-M/2},{x:T+m/2,y:$-M/2},{x:T+m/2,y:$-M/2+g},{x:T+h.width/2,y:$-M/2+g},{x:T+h.width/2/2,y:$+M/2},{x:T-h.width/2,y:$+M/2},{x:T-h.width/2,y:$-M/2+g},{x:T-m/2,y:$-M/2+g}],W.polygon(t,q,B)},c}p(Gp,"iconRounded");async function Vp(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:n}=U(t);t.labelStyle=n;const a=t.assetHeight??48,s=t.assetWidth??48,o=Math.max(a,s),l=i?.wrappingWidth;t.width=Math.max(o,l??0);const{shapeSvg:c,bbox:h,halfPadding:u,label:f}=await it(e,t,"icon-shape default"),d=t.pos==="t",g=o+u*2,m=o+u*2,{nodeBorder:y,mainBkg:x}=r,{stylesMap:b}=Yr(t),_=-m/2,k=-g/2,w=t.label?8:0,L=j.svg(c),S=Y(t,{});t.look!=="handDrawn"&&(S.roughness=0,S.fillStyle="solid");const D=b.get("fill");S.stroke=D??x;const I=L.path(Ze(_,k,m,g,.1),S),O=Math.max(m,h.width),E=g+h.height+w,N=L.rectangle(-O/2,-E/2,O,E,{...S,fill:"transparent",stroke:"none"}),R=c.insert(()=>I,":first-child"),A=c.insert(()=>N);if(t.icon){const B=c.append("g");B.html(`${await Ui(t.icon,{height:o,width:o,fallbackPrefix:""})}`);const T=B.node().getBBox(),$=T.width,M=T.height,q=T.x,V=T.y;B.attr("transform",`translate(${-$/2-q},${d?h.height/2+w/2-M/2-V:-h.height/2-w/2-M/2-V})`),B.attr("style",`color: ${b.get("stroke")??y};`)}return f.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${d?-E/2:E/2-h.height})`),R.attr("transform",`translate(0,${d?h.height/2+w/2:-h.height/2-w/2})`),G(t,A),t.intersect=function(B){if(F.info("iconSquare intersect",t,B),!t.label)return W.rect(t,B);const T=t.x??0,$=t.y??0,M=t.height??0;let q=[];return d?q=[{x:T-h.width/2,y:$-M/2},{x:T+h.width/2,y:$-M/2},{x:T+h.width/2,y:$-M/2+h.height+w},{x:T+m/2,y:$-M/2+h.height+w},{x:T+m/2,y:$+M/2},{x:T-m/2,y:$+M/2},{x:T-m/2,y:$-M/2+h.height+w},{x:T-h.width/2,y:$-M/2+h.height+w}]:q=[{x:T-m/2,y:$-M/2},{x:T+m/2,y:$-M/2},{x:T+m/2,y:$-M/2+g},{x:T+h.width/2,y:$-M/2+g},{x:T+h.width/2/2,y:$+M/2},{x:T-h.width/2,y:$+M/2},{x:T-h.width/2,y:$-M/2+g},{x:T-m/2,y:$-M/2+g}],W.polygon(t,q,B)},c}p(Vp,"iconSquare");async function Xp(e,t,{config:{flowchart:r}}){const i=new Image;i.src=t?.img??"",await i.decode();const n=Number(i.naturalWidth.toString().replace("px","")),a=Number(i.naturalHeight.toString().replace("px",""));t.imageAspectRatio=n/a;const{labelStyles:s}=U(t);t.labelStyle=s;const o=r?.wrappingWidth;t.defaultWidth=r?.wrappingWidth;const l=Math.max(t.label?o??0:0,t?.assetWidth??n),c=t.constraint==="on"&&t?.assetHeight?t.assetHeight*t.imageAspectRatio:l,h=t.constraint==="on"?c/t.imageAspectRatio:t?.assetHeight??a;t.width=Math.max(c,o??0);const{shapeSvg:u,bbox:f,label:d}=await it(e,t,"image-shape default"),g=t.pos==="t",m=-c/2,y=-h/2,x=t.label?8:0,b=j.svg(u),_=Y(t,{});t.look!=="handDrawn"&&(_.roughness=0,_.fillStyle="solid");const k=b.rectangle(m,y,c,h,_),w=Math.max(c,f.width),L=h+f.height+x,S=b.rectangle(-w/2,-L/2,w,L,{..._,fill:"none",stroke:"none"}),D=u.insert(()=>k,":first-child"),I=u.insert(()=>S);if(t.img){const O=u.append("image");O.attr("href",t.img),O.attr("width",c),O.attr("height",h),O.attr("preserveAspectRatio","none"),O.attr("transform",`translate(${-c/2},${g?L/2-h:-L/2})`)}return d.attr("transform",`translate(${-f.width/2-(f.x-(f.left??0))},${g?-h/2-f.height/2-x/2:h/2-f.height/2+x/2})`),D.attr("transform",`translate(0,${g?f.height/2+x/2:-f.height/2-x/2})`),G(t,I),t.intersect=function(O){if(F.info("iconSquare intersect",t,O),!t.label)return W.rect(t,O);const E=t.x??0,N=t.y??0,R=t.height??0;let A=[];return g?A=[{x:E-f.width/2,y:N-R/2},{x:E+f.width/2,y:N-R/2},{x:E+f.width/2,y:N-R/2+f.height+x},{x:E+c/2,y:N-R/2+f.height+x},{x:E+c/2,y:N+R/2},{x:E-c/2,y:N+R/2},{x:E-c/2,y:N-R/2+f.height+x},{x:E-f.width/2,y:N-R/2+f.height+x}]:A=[{x:E-c/2,y:N-R/2},{x:E+c/2,y:N-R/2},{x:E+c/2,y:N-R/2+h},{x:E+f.width/2,y:N-R/2+h},{x:E+f.width/2/2,y:N+R/2},{x:E-f.width/2,y:N+R/2},{x:E-f.width/2,y:N-R/2+h},{x:E-c/2,y:N-R/2+h}],W.polygon(t,A,O)},u}p(Xp,"imageSquare");async function Zp(e,t){const{labelStyles:r,nodeStyles:i}=U(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await it(e,t,rt(t)),s=Math.max(a.width+(t.padding??0)*2,t?.width??0),o=Math.max(a.height+(t.padding??0)*2,t?.height??0),l=[{x:0,y:0},{x:s,y:0},{x:s+3*o/6,y:-o},{x:-3*o/6,y:-o}];let c;const{cssStyles:h}=t;if(t.look==="handDrawn"){const u=j.svg(n),f=Y(t,{}),d=lt(l),g=u.path(d,f);c=n.insert(()=>g,":first-child").attr("transform",`translate(${-s/2}, ${o/2})`),h&&c.attr("style",h)}else c=Ke(n,s,o,l);return i&&c.attr("style",i),t.width=s,t.height=o,G(t,c),t.intersect=function(u){return W.polygon(t,l,u)},n}p(Zp,"inv_trapezoid");async function Fa(e,t,r){const{labelStyles:i,nodeStyles:n}=U(t);t.labelStyle=i;const{shapeSvg:a,bbox:s}=await it(e,t,rt(t)),o=Math.max(s.width+r.labelPaddingX*2,t?.width||0),l=Math.max(s.height+r.labelPaddingY*2,t?.height||0),c=-o/2,h=-l/2;let u,{rx:f,ry:d}=t;const{cssStyles:g}=t;if(r?.rx&&r.ry&&(f=r.rx,d=r.ry),t.look==="handDrawn"){const m=j.svg(a),y=Y(t,{}),x=f||d?m.path(Ze(c,h,o,l,f||0),y):m.rectangle(c,h,o,l,y);u=a.insert(()=>x,":first-child"),u.attr("class","basic label-container").attr("style",It(g))}else u=a.insert("rect",":first-child"),u.attr("class","basic label-container").attr("style",n).attr("rx",It(f)).attr("ry",It(d)).attr("x",c).attr("y",h).attr("width",o).attr("height",l);return G(t,u),t.calcIntersect=function(m,y){return W.rect(m,y)},t.intersect=function(m){return W.rect(t,m)},a}p(Fa,"drawRect");async function Kp(e,t){const{shapeSvg:r,bbox:i,label:n}=await it(e,t,"label"),a=r.insert("rect",":first-child");return a.attr("width",.1).attr("height",.1),r.attr("class","label edgeLabel"),n.attr("transform",`translate(${-(i.width/2)-(i.x-(i.left??0))}, ${-(i.height/2)-(i.y-(i.top??0))})`),G(t,a),t.intersect=function(l){return W.rect(t,l)},r}p(Kp,"labelRect");async function Qp(e,t){const{labelStyles:r,nodeStyles:i}=U(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await it(e,t,rt(t)),s=Math.max(a.width+(t.padding??0),t?.width??0),o=Math.max(a.height+(t.padding??0),t?.height??0),l=[{x:0,y:0},{x:s+3*o/6,y:0},{x:s,y:-o},{x:-(3*o)/6,y:-o}];let c;const{cssStyles:h}=t;if(t.look==="handDrawn"){const u=j.svg(n),f=Y(t,{}),d=lt(l),g=u.path(d,f);c=n.insert(()=>g,":first-child").attr("transform",`translate(${-s/2}, ${o/2})`),h&&c.attr("style",h)}else c=Ke(n,s,o,l);return i&&c.attr("style",i),t.width=s,t.height=o,G(t,c),t.intersect=function(u){return W.polygon(t,l,u)},n}p(Qp,"lean_left");async function Jp(e,t){const{labelStyles:r,nodeStyles:i}=U(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await it(e,t,rt(t)),s=Math.max(a.width+(t.padding??0),t?.width??0),o=Math.max(a.height+(t.padding??0),t?.height??0),l=[{x:-3*o/6,y:0},{x:s,y:0},{x:s+3*o/6,y:-o},{x:0,y:-o}];let c;const{cssStyles:h}=t;if(t.look==="handDrawn"){const u=j.svg(n),f=Y(t,{}),d=lt(l),g=u.path(d,f);c=n.insert(()=>g,":first-child").attr("transform",`translate(${-s/2}, ${o/2})`),h&&c.attr("style",h)}else c=Ke(n,s,o,l);return i&&c.attr("style",i),t.width=s,t.height=o,G(t,c),t.intersect=function(u){return W.polygon(t,l,u)},n}p(Jp,"lean_right");function tg(e,t){const{labelStyles:r,nodeStyles:i}=U(t);t.label="",t.labelStyle=r;const n=e.insert("g").attr("class",rt(t)).attr("id",t.domId??t.id),{cssStyles:a}=t,s=Math.max(35,t?.width??0),o=Math.max(35,t?.height??0),l=7,c=[{x:s,y:0},{x:0,y:o+l/2},{x:s-2*l,y:o+l/2},{x:0,y:2*o},{x:s,y:o-l/2},{x:2*l,y:o-l/2}],h=j.svg(n),u=Y(t,{});t.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");const f=lt(c),d=h.path(f,u),g=n.insert(()=>d,":first-child");return a&&t.look!=="handDrawn"&&g.selectAll("path").attr("style",a),i&&t.look!=="handDrawn"&&g.selectAll("path").attr("style",i),g.attr("transform",`translate(-${s/2},${-o})`),G(t,g),t.intersect=function(m){return F.info("lightningBolt intersect",t,m),W.polygon(t,c,m)},n}p(tg,"lightningBolt");var zv=p((e,t,r,i,n,a,s)=>[`M${e},${t+a}`,`a${n},${a} 0,0,0 ${r},0`,`a${n},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${n},${a} 0,0,0 ${r},0`,`l0,${-i}`,`M${e},${t+a+s}`,`a${n},${a} 0,0,0 ${r},0`].join(" "),"createCylinderPathD"),Wv=p((e,t,r,i,n,a,s)=>[`M${e},${t+a}`,`M${e+r},${t+a}`,`a${n},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${n},${a} 0,0,0 ${r},0`,`l0,${-i}`,`M${e},${t+a+s}`,`a${n},${a} 0,0,0 ${r},0`].join(" "),"createOuterCylinderPathD"),qv=p((e,t,r,i,n,a)=>[`M${e-r/2},${-i/2}`,`a${n},${a} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD");async function eg(e,t){const{labelStyles:r,nodeStyles:i}=U(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:s}=await it(e,t,rt(t)),o=Math.max(a.width+(t.padding??0),t.width??0),l=o/2,c=l/(2.5+o/50),h=Math.max(a.height+c+(t.padding??0),t.height??0),u=h*.1;let f;const{cssStyles:d}=t;if(t.look==="handDrawn"){const g=j.svg(n),m=Wv(0,0,o,h,l,c,u),y=qv(0,c,o,h,l,c),x=Y(t,{}),b=g.path(m,x),_=g.path(y,x);n.insert(()=>_,":first-child").attr("class","line"),f=n.insert(()=>b,":first-child"),f.attr("class","basic label-container"),d&&f.attr("style",d)}else{const g=zv(0,0,o,h,l,c,u);f=n.insert("path",":first-child").attr("d",g).attr("class","basic label-container").attr("style",It(d)).attr("style",i)}return f.attr("label-offset-y",c),f.attr("transform",`translate(${-o/2}, ${-(h/2+c)})`),G(t,f),s.attr("transform",`translate(${-(a.width/2)-(a.x-(a.left??0))}, ${-(a.height/2)+c-(a.y-(a.top??0))})`),t.intersect=function(g){const m=W.rect(t,g),y=m.x-(t.x??0);if(l!=0&&(Math.abs(y)<(t.width??0)/2||Math.abs(y)==(t.width??0)/2&&Math.abs(m.y-(t.y??0))>(t.height??0)/2-c)){let x=c*c*(1-y*y/(l*l));x>0&&(x=Math.sqrt(x)),x=c-x,g.y-(t.y??0)>0&&(x=-x),m.y+=x}return m},n}p(eg,"linedCylinder");async function rg(e,t){const{labelStyles:r,nodeStyles:i}=U(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:s}=await it(e,t,rt(t)),o=Math.max(a.width+(t.padding??0)*2,t?.width??0),l=Math.max(a.height+(t.padding??0)*2,t?.height??0),c=l/4,h=l+c,{cssStyles:u}=t,f=j.svg(n),d=Y(t,{});t.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const g=[{x:-o/2-o/2*.1,y:-h/2},{x:-o/2-o/2*.1,y:h/2},...Ge(-o/2-o/2*.1,h/2,o/2+o/2*.1,h/2,c,.8),{x:o/2+o/2*.1,y:-h/2},{x:-o/2-o/2*.1,y:-h/2},{x:-o/2,y:-h/2},{x:-o/2,y:h/2*1.1},{x:-o/2,y:-h/2}],m=f.polygon(g.map(x=>[x.x,x.y]),d),y=n.insert(()=>m,":first-child");return y.attr("class","basic label-container"),u&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",u),i&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",i),y.attr("transform",`translate(0,${-c/2})`),s.attr("transform",`translate(${-o/2+(t.padding??0)+o/2*.1/2-(a.x-(a.left??0))},${-l/2+(t.padding??0)-c/2-(a.y-(a.top??0))})`),G(t,y),t.intersect=function(x){return W.polygon(t,g,x)},n}p(rg,"linedWaveEdgedRect");async function ig(e,t){const{labelStyles:r,nodeStyles:i}=U(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:s}=await it(e,t,rt(t)),o=Math.max(a.width+(t.padding??0)*2,t?.width??0),l=Math.max(a.height+(t.padding??0)*2,t?.height??0),c=5,h=-o/2,u=-l/2,{cssStyles:f}=t,d=j.svg(n),g=Y(t,{}),m=[{x:h-c,y:u+c},{x:h-c,y:u+l+c},{x:h+o-c,y:u+l+c},{x:h+o-c,y:u+l},{x:h+o,y:u+l},{x:h+o,y:u+l-c},{x:h+o+c,y:u+l-c},{x:h+o+c,y:u-c},{x:h+c,y:u-c},{x:h+c,y:u},{x:h,y:u},{x:h,y:u+c}],y=[{x:h,y:u+c},{x:h+o-c,y:u+c},{x:h+o-c,y:u+l},{x:h+o,y:u+l},{x:h+o,y:u},{x:h,y:u}];t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const x=lt(m),b=d.path(x,g),_=lt(y),k=d.path(_,{...g,fill:"none"}),w=n.insert(()=>k,":first-child");return w.insert(()=>b,":first-child"),w.attr("class","basic label-container"),f&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",f),i&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",i),s.attr("transform",`translate(${-(a.width/2)-c-(a.x-(a.left??0))}, ${-(a.height/2)+c-(a.y-(a.top??0))})`),G(t,w),t.intersect=function(L){return W.polygon(t,m,L)},n}p(ig,"multiRect");async function ng(e,t){const{labelStyles:r,nodeStyles:i}=U(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:s}=await it(e,t,rt(t)),o=Math.max(a.width+(t.padding??0)*2,t?.width??0),l=Math.max(a.height+(t.padding??0)*2,t?.height??0),c=l/4,h=l+c,u=-o/2,f=-h/2,d=5,{cssStyles:g}=t,m=Ge(u-d,f+h+d,u+o-d,f+h+d,c,.8),y=m?.[m.length-1],x=[{x:u-d,y:f+d},{x:u-d,y:f+h+d},...m,{x:u+o-d,y:y.y-d},{x:u+o,y:y.y-d},{x:u+o,y:y.y-2*d},{x:u+o+d,y:y.y-2*d},{x:u+o+d,y:f-d},{x:u+d,y:f-d},{x:u+d,y:f},{x:u,y:f},{x:u,y:f+d}],b=[{x:u,y:f+d},{x:u+o-d,y:f+d},{x:u+o-d,y:y.y-d},{x:u+o,y:y.y-d},{x:u+o,y:f},{x:u,y:f}],_=j.svg(n),k=Y(t,{});t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const w=lt(x),L=_.path(w,k),S=lt(b),D=_.path(S,k),I=n.insert(()=>L,":first-child");return I.insert(()=>D),I.attr("class","basic label-container"),g&&t.look!=="handDrawn"&&I.selectAll("path").attr("style",g),i&&t.look!=="handDrawn"&&I.selectAll("path").attr("style",i),I.attr("transform",`translate(0,${-c/2})`),s.attr("transform",`translate(${-(a.width/2)-d-(a.x-(a.left??0))}, ${-(a.height/2)+d-c/2-(a.y-(a.top??0))})`),G(t,I),t.intersect=function(O){return W.polygon(t,x,O)},n}p(ng,"multiWaveEdgedRectangle");async function ag(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:n}=U(t);t.labelStyle=i,t.useHtmlLabels||Ot().flowchart?.htmlLabels!==!1||(t.centerLabel=!0);const{shapeSvg:s,bbox:o,label:l}=await it(e,t,rt(t)),c=Math.max(o.width+(t.padding??0)*2,t?.width??0),h=Math.max(o.height+(t.padding??0)*2,t?.height??0),u=-c/2,f=-h/2,{cssStyles:d}=t,g=j.svg(s),m=Y(t,{fill:r.noteBkgColor,stroke:r.noteBorderColor});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const y=g.rectangle(u,f,c,h,m),x=s.insert(()=>y,":first-child");return x.attr("class","basic label-container"),d&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",d),n&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",n),l.attr("transform",`translate(${-o.width/2-(o.x-(o.left??0))}, ${-(o.height/2)-(o.y-(o.top??0))})`),G(t,x),t.intersect=function(b){return W.rect(t,b)},s}p(ag,"note");var Hv=p((e,t,r)=>[`M${e+r/2},${t}`,`L${e+r},${t-r/2}`,`L${e+r/2},${t-r}`,`L${e},${t-r/2}`,"Z"].join(" "),"createDecisionBoxPathD");async function sg(e,t){const{labelStyles:r,nodeStyles:i}=U(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await it(e,t,rt(t)),s=a.width+t.padding,o=a.height+t.padding,l=s+o,c=.5,h=[{x:l/2,y:0},{x:l,y:-l/2},{x:l/2,y:-l},{x:0,y:-l/2}];let u;const{cssStyles:f}=t;if(t.look==="handDrawn"){const d=j.svg(n),g=Y(t,{}),m=Hv(0,0,l),y=d.path(m,g);u=n.insert(()=>y,":first-child").attr("transform",`translate(${-l/2+c}, ${l/2})`),f&&u.attr("style",f)}else u=Ke(n,l,l,h),u.attr("transform",`translate(${-l/2+c}, ${l/2})`);return i&&u.attr("style",i),G(t,u),t.calcIntersect=function(d,g){const m=d.width,y=[{x:m/2,y:0},{x:m,y:-m/2},{x:m/2,y:-m},{x:0,y:-m/2}],x=W.polygon(d,y,g);return{x:x.x-.5,y:x.y-.5}},t.intersect=function(d){return this.calcIntersect(t,d)},n}p(sg,"question");async function og(e,t){const{labelStyles:r,nodeStyles:i}=U(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:s}=await it(e,t,rt(t)),o=Math.max(a.width+(t.padding??0),t?.width??0),l=Math.max(a.height+(t.padding??0),t?.height??0),c=-o/2,h=-l/2,u=h/2,f=[{x:c+u,y:h},{x:c,y:0},{x:c+u,y:-h},{x:-c,y:-h},{x:-c,y:h}],{cssStyles:d}=t,g=j.svg(n),m=Y(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const y=lt(f),x=g.path(y,m),b=n.insert(()=>x,":first-child");return b.attr("class","basic label-container"),d&&t.look!=="handDrawn"&&b.selectAll("path").attr("style",d),i&&t.look!=="handDrawn"&&b.selectAll("path").attr("style",i),b.attr("transform",`translate(${-u/2},0)`),s.attr("transform",`translate(${-u/2-a.width/2-(a.x-(a.left??0))}, ${-(a.height/2)-(a.y-(a.top??0))})`),G(t,b),t.intersect=function(_){return W.polygon(t,f,_)},n}p(og,"rect_left_inv_arrow");async function lg(e,t){const{labelStyles:r,nodeStyles:i}=U(t);t.labelStyle=r;let n;t.cssClasses?n="node "+t.cssClasses:n="node default";const a=e.insert("g").attr("class",n).attr("id",t.domId||t.id),s=a.insert("g"),o=a.insert("g").attr("class","label").attr("style",i),l=t.description,c=t.label,h=o.node().appendChild(await lr(c,t.labelStyle,!0,!0));let u={width:0,height:0};if(Lt(ft()?.flowchart?.htmlLabels)){const D=h.children[0],I=ht(h);u=D.getBoundingClientRect(),I.attr("width",u.width),I.attr("height",u.height)}F.info("Text 2",l);const f=l||[],d=h.getBBox(),g=o.node().appendChild(await lr(f.join?f.join("
    "):f,t.labelStyle,!0,!0)),m=g.children[0],y=ht(g);u=m.getBoundingClientRect(),y.attr("width",u.width),y.attr("height",u.height);const x=(t.padding||0)/2;ht(g).attr("transform","translate( "+(u.width>d.width?0:(d.width-u.width)/2)+", "+(d.height+x+5)+")"),ht(h).attr("transform","translate( "+(u.width(F.debug("Rough node insert CXC",O),E),":first-child"),L=a.insert(()=>(F.debug("Rough node insert CXC",O),O),":first-child")}else L=s.insert("rect",":first-child"),S=s.insert("line"),L.attr("class","outer title-state").attr("style",i).attr("x",-u.width/2-x).attr("y",-u.height/2-x).attr("width",u.width+(t.padding||0)).attr("height",u.height+(t.padding||0)),S.attr("class","divider").attr("x1",-u.width/2-x).attr("x2",u.width/2+x).attr("y1",-u.height/2-x+d.height+x).attr("y2",-u.height/2-x+d.height+x);return G(t,L),t.intersect=function(D){return W.rect(t,D)},a}p(lg,"rectWithTitle");function mi(e,t,r,i,n,a,s){const l=(e+r)/2,c=(t+i)/2,h=Math.atan2(i-t,r-e),u=(r-e)/2,f=(i-t)/2,d=u/n,g=f/a,m=Math.sqrt(d**2+g**2);if(m>1)throw new Error("The given radii are too small to create an arc between the points.");const y=Math.sqrt(1-m**2),x=l+y*a*Math.sin(h)*(s?-1:1),b=c-y*n*Math.cos(h)*(s?-1:1),_=Math.atan2((t-b)/a,(e-x)/n);let w=Math.atan2((i-b)/a,(r-x)/n)-_;s&&w<0&&(w+=2*Math.PI),!s&&w>0&&(w-=2*Math.PI);const L=[];for(let S=0;S<20;S++){const D=S/19,I=_+D*w,O=x+n*Math.cos(I),E=b+a*Math.sin(I);L.push({x:O,y:E})}return L}p(mi,"generateArcPoints");async function cg(e,t){const{labelStyles:r,nodeStyles:i}=U(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await it(e,t,rt(t)),s=t?.padding??0,o=t?.padding??0,l=(t?.width?t?.width:a.width)+s*2,c=(t?.height?t?.height:a.height)+o*2,h=t.radius||5,u=t.taper||5,{cssStyles:f}=t,d=j.svg(n),g=Y(t,{});t.stroke&&(g.stroke=t.stroke),t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const m=[{x:-l/2+u,y:-c/2},{x:l/2-u,y:-c/2},...mi(l/2-u,-c/2,l/2,-c/2+u,h,h,!0),{x:l/2,y:-c/2+u},{x:l/2,y:c/2-u},...mi(l/2,c/2-u,l/2-u,c/2,h,h,!0),{x:l/2-u,y:c/2},{x:-l/2+u,y:c/2},...mi(-l/2+u,c/2,-l/2,c/2-u,h,h,!0),{x:-l/2,y:c/2-u},{x:-l/2,y:-c/2+u},...mi(-l/2,-c/2+u,-l/2+u,-c/2,h,h,!0)],y=lt(m),x=d.path(y,g),b=n.insert(()=>x,":first-child");return b.attr("class","basic label-container outer-path"),f&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",f),i&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",i),G(t,b),t.intersect=function(_){return W.polygon(t,m,_)},n}p(cg,"roundedRect");async function hg(e,t){const{labelStyles:r,nodeStyles:i}=U(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:s}=await it(e,t,rt(t)),o=t?.padding??0,l=Math.max(a.width+(t.padding??0)*2,t?.width??0),c=Math.max(a.height+(t.padding??0)*2,t?.height??0),h=-a.width/2-o,u=-a.height/2-o,{cssStyles:f}=t,d=j.svg(n),g=Y(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const m=[{x:h,y:u},{x:h+l+8,y:u},{x:h+l+8,y:u+c},{x:h-8,y:u+c},{x:h-8,y:u},{x:h,y:u},{x:h,y:u+c}],y=d.polygon(m.map(b=>[b.x,b.y]),g),x=n.insert(()=>y,":first-child");return x.attr("class","basic label-container").attr("style",It(f)),i&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",i),f&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",i),s.attr("transform",`translate(${-l/2+4+(t.padding??0)-(a.x-(a.left??0))},${-c/2+(t.padding??0)-(a.y-(a.top??0))})`),G(t,x),t.intersect=function(b){return W.rect(t,b)},n}p(hg,"shadedProcess");async function ug(e,t){const{labelStyles:r,nodeStyles:i}=U(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:s}=await it(e,t,rt(t)),o=Math.max(a.width+(t.padding??0)*2,t?.width??0),l=Math.max(a.height+(t.padding??0)*2,t?.height??0),c=-o/2,h=-l/2,{cssStyles:u}=t,f=j.svg(n),d=Y(t,{});t.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const g=[{x:c,y:h},{x:c,y:h+l},{x:c+o,y:h+l},{x:c+o,y:h-l/2}],m=lt(g),y=f.path(m,d),x=n.insert(()=>y,":first-child");return x.attr("class","basic label-container"),u&&t.look!=="handDrawn"&&x.selectChildren("path").attr("style",u),i&&t.look!=="handDrawn"&&x.selectChildren("path").attr("style",i),x.attr("transform",`translate(0, ${l/4})`),s.attr("transform",`translate(${-o/2+(t.padding??0)-(a.x-(a.left??0))}, ${-l/4+(t.padding??0)-(a.y-(a.top??0))})`),G(t,x),t.intersect=function(b){return W.polygon(t,g,b)},n}p(ug,"slopedRect");async function fg(e,t){const r={rx:0,ry:0,labelPaddingX:t.labelPaddingX??(t?.padding||0)*2,labelPaddingY:(t?.padding||0)*1};return Fa(e,t,r)}p(fg,"squareRect");async function dg(e,t){const{labelStyles:r,nodeStyles:i}=U(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await it(e,t,rt(t)),s=a.height+t.padding,o=a.width+s/4+t.padding,l=s/2,{cssStyles:c}=t,h=j.svg(n),u=Y(t,{});t.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");const f=[{x:-o/2+l,y:-s/2},{x:o/2-l,y:-s/2},...Oi(-o/2+l,0,l,50,90,270),{x:o/2-l,y:s/2},...Oi(o/2-l,0,l,50,270,450)],d=lt(f),g=h.path(d,u),m=n.insert(()=>g,":first-child");return m.attr("class","basic label-container outer-path"),c&&t.look!=="handDrawn"&&m.selectChildren("path").attr("style",c),i&&t.look!=="handDrawn"&&m.selectChildren("path").attr("style",i),G(t,m),t.intersect=function(y){return W.polygon(t,f,y)},n}p(dg,"stadium");async function pg(e,t){return Fa(e,t,{rx:5,ry:5})}p(pg,"state");function gg(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:n}=U(t);t.labelStyle=i;const{cssStyles:a}=t,{lineColor:s,stateBorder:o,nodeBorder:l}=r,c=e.insert("g").attr("class","node default").attr("id",t.domId||t.id),h=j.svg(c),u=Y(t,{});t.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");const f=h.circle(0,0,14,{...u,stroke:s,strokeWidth:2}),d=o??l,g=h.circle(0,0,5,{...u,fill:d,stroke:d,strokeWidth:2,fillStyle:"solid"}),m=c.insert(()=>f,":first-child");return m.insert(()=>g),a&&m.selectAll("path").attr("style",a),n&&m.selectAll("path").attr("style",n),G(t,m),t.intersect=function(y){return W.circle(t,7,y)},c}p(gg,"stateEnd");function mg(e,t,{config:{themeVariables:r}}){const{lineColor:i}=r,n=e.insert("g").attr("class","node default").attr("id",t.domId||t.id);let a;if(t.look==="handDrawn"){const o=j.svg(n).circle(0,0,14,n_(i));a=n.insert(()=>o),a.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14)}else a=n.insert("circle",":first-child"),a.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14);return G(t,a),t.intersect=function(s){return W.circle(t,7,s)},n}p(mg,"stateStart");async function yg(e,t){const{labelStyles:r,nodeStyles:i}=U(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await it(e,t,rt(t)),s=(t?.padding||0)/2,o=a.width+t.padding,l=a.height+t.padding,c=-a.width/2-s,h=-a.height/2-s,u=[{x:0,y:0},{x:o,y:0},{x:o,y:-l},{x:0,y:-l},{x:0,y:0},{x:-8,y:0},{x:o+8,y:0},{x:o+8,y:-l},{x:-8,y:-l},{x:-8,y:0}];if(t.look==="handDrawn"){const f=j.svg(n),d=Y(t,{}),g=f.rectangle(c-8,h,o+16,l,d),m=f.line(c,h,c,h+l,d),y=f.line(c+o,h,c+o,h+l,d);n.insert(()=>m,":first-child"),n.insert(()=>y,":first-child");const x=n.insert(()=>g,":first-child"),{cssStyles:b}=t;x.attr("class","basic label-container").attr("style",It(b)),G(t,x)}else{const f=Ke(n,o,l,u);i&&f.attr("style",i),G(t,f)}return t.intersect=function(f){return W.polygon(t,u,f)},n}p(yg,"subroutine");async function xg(e,t){const{labelStyles:r,nodeStyles:i}=U(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await it(e,t,rt(t)),s=Math.max(a.width+(t.padding??0)*2,t?.width??0),o=Math.max(a.height+(t.padding??0)*2,t?.height??0),l=-s/2,c=-o/2,h=.2*o,u=.2*o,{cssStyles:f}=t,d=j.svg(n),g=Y(t,{}),m=[{x:l-h/2,y:c},{x:l+s+h/2,y:c},{x:l+s+h/2,y:c+o},{x:l-h/2,y:c+o}],y=[{x:l+s-h/2,y:c+o},{x:l+s+h/2,y:c+o},{x:l+s+h/2,y:c+o-u}];t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const x=lt(m),b=d.path(x,g),_=lt(y),k=d.path(_,{...g,fillStyle:"solid"}),w=n.insert(()=>k,":first-child");return w.insert(()=>b,":first-child"),w.attr("class","basic label-container"),f&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",f),i&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",i),G(t,w),t.intersect=function(L){return W.polygon(t,m,L)},n}p(xg,"taggedRect");async function bg(e,t){const{labelStyles:r,nodeStyles:i}=U(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:s}=await it(e,t,rt(t)),o=Math.max(a.width+(t.padding??0)*2,t?.width??0),l=Math.max(a.height+(t.padding??0)*2,t?.height??0),c=l/4,h=.2*o,u=.2*l,f=l+c,{cssStyles:d}=t,g=j.svg(n),m=Y(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const y=[{x:-o/2-o/2*.1,y:f/2},...Ge(-o/2-o/2*.1,f/2,o/2+o/2*.1,f/2,c,.8),{x:o/2+o/2*.1,y:-f/2},{x:-o/2-o/2*.1,y:-f/2}],x=-o/2+o/2*.1,b=-f/2-u*.4,_=[{x:x+o-h,y:(b+l)*1.4},{x:x+o,y:b+l-u},{x:x+o,y:(b+l)*.9},...Ge(x+o,(b+l)*1.3,x+o-h,(b+l)*1.5,-l*.03,.5)],k=lt(y),w=g.path(k,m),L=lt(_),S=g.path(L,{...m,fillStyle:"solid"}),D=n.insert(()=>S,":first-child");return D.insert(()=>w,":first-child"),D.attr("class","basic label-container"),d&&t.look!=="handDrawn"&&D.selectAll("path").attr("style",d),i&&t.look!=="handDrawn"&&D.selectAll("path").attr("style",i),D.attr("transform",`translate(0,${-c/2})`),s.attr("transform",`translate(${-o/2+(t.padding??0)-(a.x-(a.left??0))},${-l/2+(t.padding??0)-c/2-(a.y-(a.top??0))})`),G(t,D),t.intersect=function(I){return W.polygon(t,y,I)},n}p(bg,"taggedWaveEdgedRectangle");async function _g(e,t){const{labelStyles:r,nodeStyles:i}=U(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await it(e,t,rt(t)),s=Math.max(a.width+t.padding,t?.width||0),o=Math.max(a.height+t.padding,t?.height||0),l=-s/2,c=-o/2,h=n.insert("rect",":first-child");return h.attr("class","text").attr("style",i).attr("rx",0).attr("ry",0).attr("x",l).attr("y",c).attr("width",s).attr("height",o),G(t,h),t.intersect=function(u){return W.rect(t,u)},n}p(_g,"text");var jv=p((e,t,r,i,n,a)=>`M${e},${t} + a${n},${a} 0,0,1 0,${-i} + l${r},0 + a${n},${a} 0,0,1 0,${i} + M${r},${-i} + a${n},${a} 0,0,0 0,${i} + l${-r},0`,"createCylinderPathD"),Yv=p((e,t,r,i,n,a)=>[`M${e},${t}`,`M${e+r},${t}`,`a${n},${a} 0,0,0 0,${-i}`,`l${-r},0`,`a${n},${a} 0,0,0 0,${i}`,`l${r},0`].join(" "),"createOuterCylinderPathD"),Uv=p((e,t,r,i,n,a)=>[`M${e+r/2},${-i/2}`,`a${n},${a} 0,0,0 0,${i}`].join(" "),"createInnerCylinderPathD");async function Cg(e,t){const{labelStyles:r,nodeStyles:i}=U(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:s,halfPadding:o}=await it(e,t,rt(t)),l=t.look==="neo"?o*2:o,c=a.height+l,h=c/2,u=h/(2.5+c/50),f=a.width+u+l,{cssStyles:d}=t;let g;if(t.look==="handDrawn"){const m=j.svg(n),y=Yv(0,0,f,c,u,h),x=Uv(0,0,f,c,u,h),b=m.path(y,Y(t,{})),_=m.path(x,Y(t,{fill:"none"}));g=n.insert(()=>_,":first-child"),g=n.insert(()=>b,":first-child"),g.attr("class","basic label-container"),d&&g.attr("style",d)}else{const m=jv(0,0,f,c,u,h);g=n.insert("path",":first-child").attr("d",m).attr("class","basic label-container").attr("style",It(d)).attr("style",i),g.attr("class","basic label-container"),d&&g.selectAll("path").attr("style",d),i&&g.selectAll("path").attr("style",i)}return g.attr("label-offset-x",u),g.attr("transform",`translate(${-f/2}, ${c/2} )`),s.attr("transform",`translate(${-(a.width/2)-u-(a.x-(a.left??0))}, ${-(a.height/2)-(a.y-(a.top??0))})`),G(t,g),t.intersect=function(m){const y=W.rect(t,m),x=y.y-(t.y??0);if(h!=0&&(Math.abs(x)<(t.height??0)/2||Math.abs(x)==(t.height??0)/2&&Math.abs(y.x-(t.x??0))>(t.width??0)/2-u)){let b=u*u*(1-x*x/(h*h));b!=0&&(b=Math.sqrt(Math.abs(b))),b=u-b,m.x-(t.x??0)>0&&(b=-b),y.x+=b}return y},n}p(Cg,"tiltedCylinder");async function wg(e,t){const{labelStyles:r,nodeStyles:i}=U(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await it(e,t,rt(t)),s=a.width+t.padding,o=a.height+t.padding,l=[{x:-3*o/6,y:0},{x:s+3*o/6,y:0},{x:s,y:-o},{x:0,y:-o}];let c;const{cssStyles:h}=t;if(t.look==="handDrawn"){const u=j.svg(n),f=Y(t,{}),d=lt(l),g=u.path(d,f);c=n.insert(()=>g,":first-child").attr("transform",`translate(${-s/2}, ${o/2})`),h&&c.attr("style",h)}else c=Ke(n,s,o,l);return i&&c.attr("style",i),t.width=s,t.height=o,G(t,c),t.intersect=function(u){return W.polygon(t,l,u)},n}p(wg,"trapezoid");async function kg(e,t){const{labelStyles:r,nodeStyles:i}=U(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await it(e,t,rt(t)),s=60,o=20,l=Math.max(s,a.width+(t.padding??0)*2,t?.width??0),c=Math.max(o,a.height+(t.padding??0)*2,t?.height??0),{cssStyles:h}=t,u=j.svg(n),f=Y(t,{});t.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");const d=[{x:-l/2*.8,y:-c/2},{x:l/2*.8,y:-c/2},{x:l/2,y:-c/2*.6},{x:l/2,y:c/2},{x:-l/2,y:c/2},{x:-l/2,y:-c/2*.6}],g=lt(d),m=u.path(g,f),y=n.insert(()=>m,":first-child");return y.attr("class","basic label-container"),h&&t.look!=="handDrawn"&&y.selectChildren("path").attr("style",h),i&&t.look!=="handDrawn"&&y.selectChildren("path").attr("style",i),G(t,y),t.intersect=function(x){return W.polygon(t,d,x)},n}p(kg,"trapezoidalPentagon");async function vg(e,t){const{labelStyles:r,nodeStyles:i}=U(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:s}=await it(e,t,rt(t)),o=Lt(ft().flowchart?.htmlLabels),l=a.width+(t.padding??0),c=l+a.height,h=l+a.height,u=[{x:0,y:0},{x:h,y:0},{x:h/2,y:-c}],{cssStyles:f}=t,d=j.svg(n),g=Y(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const m=lt(u),y=d.path(m,g),x=n.insert(()=>y,":first-child").attr("transform",`translate(${-c/2}, ${c/2})`);return f&&t.look!=="handDrawn"&&x.selectChildren("path").attr("style",f),i&&t.look!=="handDrawn"&&x.selectChildren("path").attr("style",i),t.width=l,t.height=c,G(t,x),s.attr("transform",`translate(${-a.width/2-(a.x-(a.left??0))}, ${c/2-(a.height+(t.padding??0)/(o?2:1)-(a.y-(a.top??0)))})`),t.intersect=function(b){return F.info("Triangle intersect",t,u,b),W.polygon(t,u,b)},n}p(vg,"triangle");async function Sg(e,t){const{labelStyles:r,nodeStyles:i}=U(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:s}=await it(e,t,rt(t)),o=Math.max(a.width+(t.padding??0)*2,t?.width??0),l=Math.max(a.height+(t.padding??0)*2,t?.height??0),c=l/8,h=l+c,{cssStyles:u}=t,d=70-o,g=d>0?d/2:0,m=j.svg(n),y=Y(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const x=[{x:-o/2-g,y:h/2},...Ge(-o/2-g,h/2,o/2+g,h/2,c,.8),{x:o/2+g,y:-h/2},{x:-o/2-g,y:-h/2}],b=lt(x),_=m.path(b,y),k=n.insert(()=>_,":first-child");return k.attr("class","basic label-container"),u&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",u),i&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",i),k.attr("transform",`translate(0,${-c/2})`),s.attr("transform",`translate(${-o/2+(t.padding??0)-(a.x-(a.left??0))},${-l/2+(t.padding??0)-c-(a.y-(a.top??0))})`),G(t,k),t.intersect=function(w){return W.polygon(t,x,w)},n}p(Sg,"waveEdgedRectangle");async function Tg(e,t){const{labelStyles:r,nodeStyles:i}=U(t);t.labelStyle=r;const{shapeSvg:n,bbox:a}=await it(e,t,rt(t)),s=100,o=50,l=Math.max(a.width+(t.padding??0)*2,t?.width??0),c=Math.max(a.height+(t.padding??0)*2,t?.height??0),h=l/c;let u=l,f=c;u>f*h?f=u/h:u=f*h,u=Math.max(u,s),f=Math.max(f,o);const d=Math.min(f*.2,f/4),g=f+d*2,{cssStyles:m}=t,y=j.svg(n),x=Y(t,{});t.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");const b=[{x:-u/2,y:g/2},...Ge(-u/2,g/2,u/2,g/2,d,1),{x:u/2,y:-g/2},...Ge(u/2,-g/2,-u/2,-g/2,d,-1)],_=lt(b),k=y.path(_,x),w=n.insert(()=>k,":first-child");return w.attr("class","basic label-container"),m&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",m),i&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",i),G(t,w),t.intersect=function(L){return W.polygon(t,b,L)},n}p(Tg,"waveRectangle");async function Ag(e,t){const{labelStyles:r,nodeStyles:i}=U(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,label:s}=await it(e,t,rt(t)),o=Math.max(a.width+(t.padding??0)*2,t?.width??0),l=Math.max(a.height+(t.padding??0)*2,t?.height??0),c=5,h=-o/2,u=-l/2,{cssStyles:f}=t,d=j.svg(n),g=Y(t,{}),m=[{x:h-c,y:u-c},{x:h-c,y:u+l},{x:h+o,y:u+l},{x:h+o,y:u-c}],y=`M${h-c},${u-c} L${h+o},${u-c} L${h+o},${u+l} L${h-c},${u+l} L${h-c},${u-c} + M${h-c},${u} L${h+o},${u} + M${h},${u-c} L${h},${u+l}`;t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const x=d.path(y,g),b=n.insert(()=>x,":first-child");return b.attr("transform",`translate(${c/2}, ${c/2})`),b.attr("class","basic label-container"),f&&t.look!=="handDrawn"&&b.selectAll("path").attr("style",f),i&&t.look!=="handDrawn"&&b.selectAll("path").attr("style",i),s.attr("transform",`translate(${-(a.width/2)+c/2-(a.x-(a.left??0))}, ${-(a.height/2)+c/2-(a.y-(a.top??0))})`),G(t,b),t.intersect=function(_){return W.polygon(t,m,_)},n}p(Ag,"windowPane");async function fl(e,t){const r=t;if(r.alias&&(t.label=r.alias),t.look==="handDrawn"){const{themeVariables:J}=Ot(),{background:Z}=J,ct={...t,id:t.id+"-background",look:"default",cssStyles:["stroke: none",`fill: ${Z}`]};await fl(e,ct)}const i=Ot();t.useHtmlLabels=i.htmlLabels;let n=i.er?.diagramPadding??10,a=i.er?.entityPadding??6;const{cssStyles:s}=t,{labelStyles:o,nodeStyles:l}=U(t);if(r.attributes.length===0&&t.label){const J={rx:0,ry:0,labelPaddingX:n,labelPaddingY:n*1.5};Re(t.label,i)+J.labelPaddingX*20){const J=u.width+n*2-(m+y+x+b);m+=J/w,y+=J/w,x>0&&(x+=J/w),b>0&&(b+=J/w)}const S=m+y+x+b,D=j.svg(h),I=Y(t,{});t.look!=="handDrawn"&&(I.roughness=0,I.fillStyle="solid");let O=0;g.length>0&&(O=g.reduce((J,Z)=>J+(Z?.rowHeight??0),0));const E=Math.max(L.width+n*2,t?.width||0,S),N=Math.max((O??0)+u.height,t?.height||0),R=-E/2,A=-N/2;h.selectAll("g:not(:first-child)").each((J,Z,ct)=>{const at=ht(ct[Z]),_t=at.attr("transform");let Ct=0,Nt=0;if(_t){const xt=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(_t);xt&&(Ct=parseFloat(xt[1]),Nt=parseFloat(xt[2]),at.attr("class").includes("attribute-name")?Ct+=m:at.attr("class").includes("attribute-keys")?Ct+=m+y:at.attr("class").includes("attribute-comment")&&(Ct+=m+y+x))}at.attr("transform",`translate(${R+n/2+Ct}, ${Nt+A+u.height+a/2})`)}),h.select(".name").attr("transform","translate("+-u.width/2+", "+(A+a/2)+")");const B=D.rectangle(R,A,E,N,I),T=h.insert(()=>B,":first-child").attr("style",s.join("")),{themeVariables:$}=Ot(),{rowEven:M,rowOdd:q,nodeBorder:V}=$;d.push(0);for(const[J,Z]of g.entries()){const at=(J+1)%2===0&&Z.yOffset!==0,_t=D.rectangle(R,u.height+A+Z?.yOffset,E,Z?.rowHeight,{...I,fill:at?M:q,stroke:V});h.insert(()=>_t,"g.label").attr("style",s.join("")).attr("class",`row-rect-${at?"even":"odd"}`)}let K=D.line(R,u.height+A,E+R,u.height+A,I);h.insert(()=>K).attr("class","divider"),K=D.line(m+R,u.height+A,m+R,N+A,I),h.insert(()=>K).attr("class","divider"),_&&(K=D.line(m+y+R,u.height+A,m+y+R,N+A,I),h.insert(()=>K).attr("class","divider")),k&&(K=D.line(m+y+x+R,u.height+A,m+y+x+R,N+A,I),h.insert(()=>K).attr("class","divider"));for(const J of d)K=D.line(R,u.height+A+J,E+R,u.height+A+J,I),h.insert(()=>K).attr("class","divider");if(G(t,T),l&&t.look!=="handDrawn"){const Z=l.split(";")?.filter(ct=>ct.includes("stroke"))?.map(ct=>`${ct}`).join("; ");h.selectAll("path").attr("style",Z??""),h.selectAll(".row-rect-even path").attr("style",l)}return t.intersect=function(J){return W.rect(t,J)},h}p(fl,"erBox");async function Mr(e,t,r,i=0,n=0,a=[],s=""){const o=e.insert("g").attr("class",`label ${a.join(" ")}`).attr("transform",`translate(${i}, ${n})`).attr("style",s);t!==Ul(t)&&(t=Ul(t),t=t.replaceAll("<","<").replaceAll(">",">"));const l=o.node().appendChild(await Xe(o,t,{width:Re(t,r)+100,style:s,useHtmlLabels:r.htmlLabels},r));if(t.includes("<")||t.includes(">")){let h=l.children[0];for(h.textContent=h.textContent.replaceAll("<","<").replaceAll(">",">");h.childNodes[0];)h=h.childNodes[0],h.textContent=h.textContent.replaceAll("<","<").replaceAll(">",">")}let c=l.getBBox();if(Lt(r.htmlLabels)){const h=l.children[0];h.style.textAlign="start";const u=ht(l);c=h.getBoundingClientRect(),u.attr("width",c.width),u.attr("height",c.height)}return c}p(Mr,"addText");async function Lg(e,t,r,i,n=r.class.padding??12){const a=i?0:3,s=e.insert("g").attr("class",rt(t)).attr("id",t.domId||t.id);let o=null,l=null,c=null,h=null,u=0,f=0,d=0;if(o=s.insert("g").attr("class","annotation-group text"),t.annotations.length>0){const b=t.annotations[0];await yi(o,{text:`«${b}»`},0),u=o.node().getBBox().height}l=s.insert("g").attr("class","label-group text"),await yi(l,t,0,["font-weight: bolder"]);const g=l.node().getBBox();f=g.height,c=s.insert("g").attr("class","members-group text");let m=0;for(const b of t.members){const _=await yi(c,b,m,[b.parseClassifier()]);m+=_+a}d=c.node().getBBox().height,d<=0&&(d=n/2),h=s.insert("g").attr("class","methods-group text");let y=0;for(const b of t.methods){const _=await yi(h,b,y,[b.parseClassifier()]);y+=_+a}let x=s.node().getBBox();if(o!==null){const b=o.node().getBBox();o.attr("transform",`translate(${-b.width/2})`)}return l.attr("transform",`translate(${-g.width/2}, ${u})`),x=s.node().getBBox(),c.attr("transform",`translate(0, ${u+f+n*2})`),x=s.node().getBBox(),h.attr("transform",`translate(0, ${u+f+(d?d+n*4:n*2)})`),x=s.node().getBBox(),{shapeSvg:s,bbox:x}}p(Lg,"textHelper");async function yi(e,t,r,i=[]){const n=e.insert("g").attr("class","label").attr("style",i.join("; ")),a=Ot();let s="useHtmlLabels"in t?t.useHtmlLabels:Lt(a.htmlLabels)??!0,o="";"text"in t?o=t.text:o=t.label,!s&&o.startsWith("\\")&&(o=o.substring(1)),Ir(o)&&(s=!0);const l=await Xe(n,wo(_r(o)),{width:Re(o,a)+50,classes:"markdown-node-label",useHtmlLabels:s},a);let c,h=1;if(s){const u=l.children[0],f=ht(l);h=u.innerHTML.split("
    ").length,u.innerHTML.includes("")&&(h+=u.innerHTML.split("").length-1);const d=u.getElementsByTagName("img");if(d){const g=o.replace(/]*>/g,"").trim()==="";await Promise.all([...d].map(m=>new Promise(y=>{function x(){if(m.style.display="flex",m.style.flexDirection="column",g){const b=a.fontSize?.toString()??window.getComputedStyle(document.body).fontSize,k=parseInt(b,10)*5+"px";m.style.minWidth=k,m.style.maxWidth=k}else m.style.width="100%";y(m)}p(x,"setupImage"),setTimeout(()=>{m.complete&&x()}),m.addEventListener("error",x),m.addEventListener("load",x)})))}c=u.getBoundingClientRect(),f.attr("width",c.width),f.attr("height",c.height)}else{i.includes("font-weight: bolder")&&ht(l).selectAll("tspan").attr("font-weight",""),h=l.children.length;const u=l.children[0];(l.textContent===""||l.textContent.includes(">"))&&(u.textContent=o[0]+o.substring(1).replaceAll(">",">").replaceAll("<","<").trim(),o[1]===" "&&(u.textContent=u.textContent[0]+" "+u.textContent.substring(1))),u.textContent==="undefined"&&(u.textContent=""),c=l.getBBox()}return n.attr("transform","translate(0,"+(-c.height/(2*h)+r)+")"),c.height}p(yi,"addText");async function Bg(e,t){const r=ft(),i=r.class.padding??12,n=i,a=t.useHtmlLabels??Lt(r.htmlLabels)??!0,s=t;s.annotations=s.annotations??[],s.members=s.members??[],s.methods=s.methods??[];const{shapeSvg:o,bbox:l}=await Lg(e,t,r,a,n),{labelStyles:c,nodeStyles:h}=U(t);t.labelStyle=c,t.cssStyles=s.styles||"";const u=s.styles?.join(";")||h||"";t.cssStyles||(t.cssStyles=u.replaceAll("!important","").split(";"));const f=s.members.length===0&&s.methods.length===0&&!r.class?.hideEmptyMembersBox,d=j.svg(o),g=Y(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const m=l.width;let y=l.height;s.members.length===0&&s.methods.length===0?y+=n:s.members.length>0&&s.methods.length===0&&(y+=n*2);const x=-m/2,b=-y/2,_=d.rectangle(x-i,b-i-(f?i:s.members.length===0&&s.methods.length===0?-i/2:0),m+2*i,y+2*i+(f?i*2:s.members.length===0&&s.methods.length===0?-i:0),g),k=o.insert(()=>_,":first-child");k.attr("class","basic label-container");const w=k.node().getBBox();o.selectAll(".text").each((I,O,E)=>{const N=ht(E[O]),R=N.attr("transform");let A=0;if(R){const M=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(R);M&&(A=parseFloat(M[2]))}let B=A+b+i-(f?i:s.members.length===0&&s.methods.length===0?-i/2:0);a||(B-=4);let T=x;(N.attr("class").includes("label-group")||N.attr("class").includes("annotation-group"))&&(T=-N.node()?.getBBox().width/2||0,o.selectAll("text").each(function($,M,q){window.getComputedStyle(q[M]).textAnchor==="middle"&&(T=0)})),N.attr("transform",`translate(${T}, ${B})`)});const L=o.select(".annotation-group").node().getBBox().height-(f?i/2:0)||0,S=o.select(".label-group").node().getBBox().height-(f?i/2:0)||0,D=o.select(".members-group").node().getBBox().height-(f?i/2:0)||0;if(s.members.length>0||s.methods.length>0||f){const I=d.line(w.x,L+S+b+i,w.x+w.width,L+S+b+i,g);o.insert(()=>I).attr("class","divider").attr("style",u)}if(f||s.members.length>0||s.methods.length>0){const I=d.line(w.x,L+S+D+b+n*2+i,w.x+w.width,L+S+D+b+i+n*2,g);o.insert(()=>I).attr("class","divider").attr("style",u)}if(s.look!=="handDrawn"&&o.selectAll("path").attr("style",u),k.select(":nth-child(2)").attr("style",u),o.selectAll(".divider").select("path").attr("style",u),t.labelStyle?o.selectAll("span").attr("style",t.labelStyle):o.selectAll("span").attr("style",u),!a){const I=RegExp(/color\s*:\s*([^;]*)/),O=I.exec(u);if(O){const E=O[0].replace("color","fill");o.selectAll("tspan").attr("style",E)}else if(c){const E=I.exec(c);if(E){const N=E[0].replace("color","fill");o.selectAll("tspan").attr("style",N)}}}return G(t,k),t.intersect=function(I){return W.rect(t,I)},o}p(Bg,"classBox");async function Mg(e,t){const{labelStyles:r,nodeStyles:i}=U(t);t.labelStyle=r;const n=t,a=t,s=20,o=20,l="verifyMethod"in t,c=rt(t),h=e.insert("g").attr("class",c).attr("id",t.domId??t.id);let u;l?u=await be(h,`<<${n.type}>>`,0,t.labelStyle):u=await be(h,"<<Element>>",0,t.labelStyle);let f=u;const d=await be(h,n.name,f,t.labelStyle+"; font-weight: bold;");if(f+=d+o,l){const L=await be(h,`${n.requirementId?`ID: ${n.requirementId}`:""}`,f,t.labelStyle);f+=L;const S=await be(h,`${n.text?`Text: ${n.text}`:""}`,f,t.labelStyle);f+=S;const D=await be(h,`${n.risk?`Risk: ${n.risk}`:""}`,f,t.labelStyle);f+=D,await be(h,`${n.verifyMethod?`Verification: ${n.verifyMethod}`:""}`,f,t.labelStyle)}else{const L=await be(h,`${a.type?`Type: ${a.type}`:""}`,f,t.labelStyle);f+=L,await be(h,`${a.docRef?`Doc Ref: ${a.docRef}`:""}`,f,t.labelStyle)}const g=(h.node()?.getBBox().width??200)+s,m=(h.node()?.getBBox().height??200)+s,y=-g/2,x=-m/2,b=j.svg(h),_=Y(t,{});t.look!=="handDrawn"&&(_.roughness=0,_.fillStyle="solid");const k=b.rectangle(y,x,g,m,_),w=h.insert(()=>k,":first-child");if(w.attr("class","basic label-container").attr("style",i),h.selectAll(".label").each((L,S,D)=>{const I=ht(D[S]),O=I.attr("transform");let E=0,N=0;if(O){const T=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(O);T&&(E=parseFloat(T[1]),N=parseFloat(T[2]))}const R=N-m/2;let A=y+s/2;(S===0||S===1)&&(A=E),I.attr("transform",`translate(${A}, ${R+s})`)}),f>u+d+o){const L=b.line(y,x+u+d+o,y+g,x+u+d+o,_);h.insert(()=>L).attr("style",i)}return G(t,w),t.intersect=function(L){return W.rect(t,L)},h}p(Mg,"requirementBox");async function be(e,t,r,i=""){if(t==="")return 0;const n=e.insert("g").attr("class","label").attr("style",i),a=ft(),s=a.htmlLabels??!0,o=await Xe(n,wo(_r(t)),{width:Re(t,a)+50,classes:"markdown-node-label",useHtmlLabels:s,style:i},a);let l;if(s){const c=o.children[0],h=ht(o);l=c.getBoundingClientRect(),h.attr("width",l.width),h.attr("height",l.height)}else{const c=o.children[0];for(const h of c.children)h.textContent=h.textContent.replaceAll(">",">").replaceAll("<","<"),i&&h.setAttribute("style",i);l=o.getBBox(),l.height+=6}return n.attr("transform",`translate(${-l.width/2},${-l.height/2+r})`),l.height}p(be,"addText");var Gv=p(e=>{switch(e){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 Eg(e,t,{config:r}){const{labelStyles:i,nodeStyles:n}=U(t);t.labelStyle=i||"";const a=10,s=t.width;t.width=(t.width??200)-10;const{shapeSvg:o,bbox:l,label:c}=await it(e,t,rt(t)),h=t.padding||10;let u="",f;"ticket"in t&&t.ticket&&r?.kanban?.ticketBaseUrl&&(u=r?.kanban?.ticketBaseUrl.replace("#TICKET#",t.ticket),f=o.insert("svg:a",":first-child").attr("class","kanban-ticket-link").attr("xlink:href",u).attr("target","_blank"));const d={useHtmlLabels:t.useHtmlLabels,labelStyle:t.labelStyle||"",width:t.width,img:t.img,padding:t.padding||8,centerLabel:!1};let g,m;f?{label:g,bbox:m}=await fs(f,"ticket"in t&&t.ticket||"",d):{label:g,bbox:m}=await fs(o,"ticket"in t&&t.ticket||"",d);const{label:y,bbox:x}=await fs(o,"assigned"in t&&t.assigned||"",d);t.width=s;const b=10,_=t?.width||0,k=Math.max(m.height,x.height)/2,w=Math.max(l.height+b*2,t?.height||0)+k,L=-_/2,S=-w/2;c.attr("transform","translate("+(h-_/2)+", "+(-k-l.height/2)+")"),g.attr("transform","translate("+(h-_/2)+", "+(-k+l.height/2)+")"),y.attr("transform","translate("+(h+_/2-x.width-2*a)+", "+(-k+l.height/2)+")");let D;const{rx:I,ry:O}=t,{cssStyles:E}=t;if(t.look==="handDrawn"){const N=j.svg(o),R=Y(t,{}),A=I||O?N.path(Ze(L,S,_,w,I||0),R):N.rectangle(L,S,_,w,R);D=o.insert(()=>A,":first-child"),D.attr("class","basic label-container").attr("style",E||null)}else{D=o.insert("rect",":first-child"),D.attr("class","basic label-container __APA__").attr("style",n).attr("rx",I??5).attr("ry",O??5).attr("x",L).attr("y",S).attr("width",_).attr("height",w);const N="priority"in t&&t.priority;if(N){const R=o.append("line"),A=L+2,B=S+Math.floor((I??0)/2),T=S+w-Math.floor((I??0)/2);R.attr("x1",A).attr("y1",B).attr("x2",A).attr("y2",T).attr("stroke-width","4").attr("stroke",Gv(N))}}return G(t,D),t.height=w,t.intersect=function(N){return W.rect(t,N)},o}p(Eg,"kanbanItem");async function $g(e,t){const{labelStyles:r,nodeStyles:i}=U(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,halfPadding:s,label:o}=await it(e,t,rt(t)),l=a.width+10*s,c=a.height+8*s,h=.15*l,{cssStyles:u}=t,f=a.width+20,d=a.height+20,g=Math.max(l,f),m=Math.max(c,d);o.attr("transform",`translate(${-a.width/2}, ${-a.height/2})`);let y;const x=`M0 0 + a${h},${h} 1 0,0 ${g*.25},${-1*m*.1} + a${h},${h} 1 0,0 ${g*.25},0 + a${h},${h} 1 0,0 ${g*.25},0 + a${h},${h} 1 0,0 ${g*.25},${m*.1} + + a${h},${h} 1 0,0 ${g*.15},${m*.33} + a${h*.8},${h*.8} 1 0,0 0,${m*.34} + a${h},${h} 1 0,0 ${-1*g*.15},${m*.33} + + a${h},${h} 1 0,0 ${-1*g*.25},${m*.15} + a${h},${h} 1 0,0 ${-1*g*.25},0 + a${h},${h} 1 0,0 ${-1*g*.25},0 + a${h},${h} 1 0,0 ${-1*g*.25},${-1*m*.15} + + a${h},${h} 1 0,0 ${-1*g*.1},${-1*m*.33} + a${h*.8},${h*.8} 1 0,0 0,${-1*m*.34} + a${h},${h} 1 0,0 ${g*.1},${-1*m*.33} + H0 V0 Z`;if(t.look==="handDrawn"){const b=j.svg(n),_=Y(t,{}),k=b.path(x,_);y=n.insert(()=>k,":first-child"),y.attr("class","basic label-container").attr("style",It(u))}else y=n.insert("path",":first-child").attr("class","basic label-container").attr("style",i).attr("d",x);return y.attr("transform",`translate(${-g/2}, ${-m/2})`),G(t,y),t.calcIntersect=function(b,_){return W.rect(b,_)},t.intersect=function(b){return F.info("Bang intersect",t,b),W.rect(t,b)},n}p($g,"bang");async function Fg(e,t){const{labelStyles:r,nodeStyles:i}=U(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,halfPadding:s,label:o}=await it(e,t,rt(t)),l=a.width+2*s,c=a.height+2*s,h=.15*l,u=.25*l,f=.35*l,d=.2*l,{cssStyles:g}=t;let m;const y=`M0 0 + a${h},${h} 0 0,1 ${l*.25},${-1*l*.1} + a${f},${f} 1 0,1 ${l*.4},${-1*l*.1} + a${u},${u} 1 0,1 ${l*.35},${l*.2} + + a${h},${h} 1 0,1 ${l*.15},${c*.35} + a${d},${d} 1 0,1 ${-1*l*.15},${c*.65} + + a${u},${h} 1 0,1 ${-1*l*.25},${l*.15} + a${f},${f} 1 0,1 ${-1*l*.5},0 + a${h},${h} 1 0,1 ${-1*l*.25},${-1*l*.15} + + a${h},${h} 1 0,1 ${-1*l*.1},${-1*c*.35} + a${d},${d} 1 0,1 ${l*.1},${-1*c*.65} + H0 V0 Z`;if(t.look==="handDrawn"){const x=j.svg(n),b=Y(t,{}),_=x.path(y,b);m=n.insert(()=>_,":first-child"),m.attr("class","basic label-container").attr("style",It(g))}else m=n.insert("path",":first-child").attr("class","basic label-container").attr("style",i).attr("d",y);return o.attr("transform",`translate(${-a.width/2}, ${-a.height/2})`),m.attr("transform",`translate(${-l/2}, ${-c/2})`),G(t,m),t.calcIntersect=function(x,b){return W.rect(x,b)},t.intersect=function(x){return F.info("Cloud intersect",t,x),W.rect(t,x)},n}p(Fg,"cloud");async function Dg(e,t){const{labelStyles:r,nodeStyles:i}=U(t);t.labelStyle=r;const{shapeSvg:n,bbox:a,halfPadding:s,label:o}=await it(e,t,rt(t)),l=a.width+8*s,c=a.height+2*s,h=5,u=` + M${-l/2} ${c/2-h} + v${-c+2*h} + q0,-${h} ${h},-${h} + h${l-2*h} + q${h},0 ${h},${h} + v${c-2*h} + q0,${h} -${h},${h} + h${-l+2*h} + q-${h},0 -${h},-${h} + Z + `,f=n.append("path").attr("id","node-"+t.id).attr("class","node-bkg node-"+t.type).attr("style",i).attr("d",u);return n.append("line").attr("class","node-line-").attr("x1",-l/2).attr("y1",c/2).attr("x2",l/2).attr("y2",c/2),o.attr("transform",`translate(${-a.width/2}, ${-a.height/2})`),n.append(()=>o.node()),G(t,f),t.calcIntersect=function(d,g){return W.rect(d,g)},t.intersect=function(d){return W.rect(t,d)},n}p(Dg,"defaultMindmapNode");async function Og(e,t){const r={padding:t.padding??0};return ul(e,t,r)}p(Og,"mindmapCircle");var Vv=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:fg},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:cg},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:dg},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:yg},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:Rp},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:ul},{semanticName:"Bang",name:"Bang",shortName:"bang",description:"Bang",aliases:["bang"],handler:$g},{semanticName:"Cloud",name:"Cloud",shortName:"cloud",description:"cloud",aliases:["cloud"],handler:Fg},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:sg},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:Hp},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:Jp},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:Qp},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:wg},{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:Zp},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:Pp},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:_g},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:Lp},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:hg},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:mg},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:gg},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:Wp},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:jp},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:$p},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:Fp},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:Dp},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:tg},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:Sg},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:qp},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:Cg},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:eg},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:Op},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:Ip},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:vg},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:Ag},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:Np},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:kg},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:zp},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:ug},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:ng},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:ig},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:Ap},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:Ep},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:bg},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:xg},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:Tg},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:og},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:rg}],Xv=p(()=>{const t=[...Object.entries({state:pg,choice:Bp,note:ag,rectWithTitle:lg,labelRect:Kp,iconSquare:Vp,iconCircle:Up,icon:Yp,iconRounded:Gp,imageSquare:Xp,anchor:Tp,kanbanItem:Eg,mindmapCircle:Og,defaultMindmapNode:Dg,classBox:Bg,erBox:fl,requirementBox:Mg}),...Vv.flatMap(r=>[r.shortName,..."aliases"in r?r.aliases:[],..."internalAliases"in r?r.internalAliases:[]].map(n=>[n,r.handler]))];return Object.fromEntries(t)},"generateShapeMap"),Rg=Xv();function Zv(e){return e in Rg}p(Zv,"isValidShape");var Da=new Map;async function Ig(e,t,r){let i,n;t.shape==="rect"&&(t.rx&&t.ry?t.shape="roundedRect":t.shape="squareRect");const a=t.shape?Rg[t.shape]:void 0;if(!a)throw new Error(`No such shape: ${t.shape}. Please check your syntax.`);if(t.link){let s;r.config.securityLevel==="sandbox"?s="_top":t.linkTarget&&(s=t.linkTarget||"_blank"),i=e.insert("svg:a").attr("xlink:href",t.link).attr("target",s??null),n=await a(i,t,r)}else n=await a(e,t,r),i=n;return t.tooltip&&n.attr("title",t.tooltip),Da.set(t.id,i),t.haveCallback&&i.attr("class",i.attr("class")+" clickable"),i}p(Ig,"insertNode");var oB=p((e,t)=>{Da.set(t.id,e)},"setNodeElem"),lB=p(()=>{Da.clear()},"clear"),cB=p(e=>{const t=Da.get(e.id);F.trace("Transforming node",e.diff,e,"translate("+(e.x-e.width/2-5)+", "+e.width/2+")");const r=8,i=e.diff||0;return e.clusterNode?t.attr("transform","translate("+(e.x+i-e.width/2)+", "+(e.y-e.height/2-r)+")"):t.attr("transform","translate("+e.x+", "+e.y+")"),i},"positionNode"),Kv=p((e,t,r,i,n,a)=>{t.arrowTypeStart&&eh(e,"start",t.arrowTypeStart,r,i,n,a),t.arrowTypeEnd&&eh(e,"end",t.arrowTypeEnd,r,i,n,a)},"addEdgeMarkers"),Qv={arrow_cross:{type:"cross",fill:!1},arrow_point:{type:"point",fill:!0},arrow_barb:{type:"barb",fill:!0},arrow_circle:{type:"circle",fill:!1},aggregation:{type:"aggregation",fill:!1},extension:{type:"extension",fill:!1},composition:{type:"composition",fill:!0},dependency:{type:"dependency",fill:!0},lollipop:{type:"lollipop",fill:!1},only_one:{type:"onlyOne",fill:!1},zero_or_one:{type:"zeroOrOne",fill:!1},one_or_more:{type:"oneOrMore",fill:!1},zero_or_more:{type:"zeroOrMore",fill:!1},requirement_arrow:{type:"requirement_arrow",fill:!1},requirement_contains:{type:"requirement_contains",fill:!1}},eh=p((e,t,r,i,n,a,s)=>{const o=Qv[r];if(!o){F.warn(`Unknown arrow type: ${r}`);return}const l=o.type,h=`${n}_${a}-${l}${t==="start"?"Start":"End"}`;if(s&&s.trim()!==""){const u=s.replace(/[^\dA-Za-z]/g,"_"),f=`${h}_${u}`;if(!document.getElementById(f)){const d=document.getElementById(h);if(d){const g=d.cloneNode(!0);g.id=f,g.querySelectorAll("path, circle, line").forEach(y=>{y.setAttribute("stroke",s),o.fill&&y.setAttribute("fill",s)}),d.parentNode?.appendChild(g)}}e.attr(`marker-${t}`,`url(${i}#${f})`)}else e.attr(`marker-${t}`,`url(${i}#${h})`)},"addEdgeMarker"),ca=new Map,Et=new Map,hB=p(()=>{ca.clear(),Et.clear()},"clear"),fn=p(e=>e?e.reduce((r,i)=>r+";"+i,""):"","getLabelStyles"),Jv=p(async(e,t)=>{let r=Lt(ft().flowchart.htmlLabels);const{labelStyles:i}=U(t);t.labelStyle=i;const n=await Xe(e,t.label,{style:t.labelStyle,useHtmlLabels:r,addSvgBackground:!0,isNode:!1});F.info("abc82",t,t.labelType);const a=e.insert("g").attr("class","edgeLabel"),s=a.insert("g").attr("class","label").attr("data-id",t.id);s.node().appendChild(n);let o=n.getBBox();if(r){const c=n.children[0],h=ht(n);o=c.getBoundingClientRect(),h.attr("width",o.width),h.attr("height",o.height)}s.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"),ca.set(t.id,a),t.width=o.width,t.height=o.height;let l;if(t.startLabelLeft){const c=await lr(t.startLabelLeft,fn(t.labelStyle)),h=e.insert("g").attr("class","edgeTerminals"),u=h.insert("g").attr("class","inner");l=u.node().appendChild(c);const f=c.getBBox();u.attr("transform","translate("+-f.width/2+", "+-f.height/2+")"),Et.get(t.id)||Et.set(t.id,{}),Et.get(t.id).startLeft=h,xi(l,t.startLabelLeft)}if(t.startLabelRight){const c=await lr(t.startLabelRight,fn(t.labelStyle)),h=e.insert("g").attr("class","edgeTerminals"),u=h.insert("g").attr("class","inner");l=h.node().appendChild(c),u.node().appendChild(c);const f=c.getBBox();u.attr("transform","translate("+-f.width/2+", "+-f.height/2+")"),Et.get(t.id)||Et.set(t.id,{}),Et.get(t.id).startRight=h,xi(l,t.startLabelRight)}if(t.endLabelLeft){const c=await lr(t.endLabelLeft,fn(t.labelStyle)),h=e.insert("g").attr("class","edgeTerminals"),u=h.insert("g").attr("class","inner");l=u.node().appendChild(c);const f=c.getBBox();u.attr("transform","translate("+-f.width/2+", "+-f.height/2+")"),h.node().appendChild(c),Et.get(t.id)||Et.set(t.id,{}),Et.get(t.id).endLeft=h,xi(l,t.endLabelLeft)}if(t.endLabelRight){const c=await lr(t.endLabelRight,fn(t.labelStyle)),h=e.insert("g").attr("class","edgeTerminals"),u=h.insert("g").attr("class","inner");l=u.node().appendChild(c);const f=c.getBBox();u.attr("transform","translate("+-f.width/2+", "+-f.height/2+")"),h.node().appendChild(c),Et.get(t.id)||Et.set(t.id,{}),Et.get(t.id).endRight=h,xi(l,t.endLabelRight)}return n},"insertEdgeLabel");function xi(e,t){ft().flowchart.htmlLabels&&e&&(e.style.width=t.length*9+"px",e.style.height="12px")}p(xi,"setTerminalWidth");var tS=p((e,t)=>{F.debug("Moving label abc88 ",e.id,e.label,ca.get(e.id),t);let r=t.updatedPath?t.updatedPath:t.originalPath;const i=ft(),{subGraphTitleTotalMargin:n}=qo(i);if(e.label){const a=ca.get(e.id);let s=e.x,o=e.y;if(r){const l=he.calcLabelPosition(r);F.debug("Moving label "+e.label+" from (",s,",",o,") to (",l.x,",",l.y,") abc88"),t.updatedPath&&(s=l.x,o=l.y)}a.attr("transform",`translate(${s}, ${o+n/2})`)}if(e.startLabelLeft){const a=Et.get(e.id).startLeft;let s=e.x,o=e.y;if(r){const l=he.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_left",r);s=l.x,o=l.y}a.attr("transform",`translate(${s}, ${o})`)}if(e.startLabelRight){const a=Et.get(e.id).startRight;let s=e.x,o=e.y;if(r){const l=he.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_right",r);s=l.x,o=l.y}a.attr("transform",`translate(${s}, ${o})`)}if(e.endLabelLeft){const a=Et.get(e.id).endLeft;let s=e.x,o=e.y;if(r){const l=he.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_left",r);s=l.x,o=l.y}a.attr("transform",`translate(${s}, ${o})`)}if(e.endLabelRight){const a=Et.get(e.id).endRight;let s=e.x,o=e.y;if(r){const l=he.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_right",r);s=l.x,o=l.y}a.attr("transform",`translate(${s}, ${o})`)}},"positionEdgeLabel"),eS=p((e,t)=>{const r=e.x,i=e.y,n=Math.abs(t.x-r),a=Math.abs(t.y-i),s=e.width/2,o=e.height/2;return n>=s||a>=o},"outsideNode"),rS=p((e,t,r)=>{F.debug(`intersection calc abc89: + outsidePoint: ${JSON.stringify(t)} + insidePoint : ${JSON.stringify(r)} + node : x:${e.x} y:${e.y} w:${e.width} h:${e.height}`);const i=e.x,n=e.y,a=Math.abs(i-r.x),s=e.width/2;let o=r.xMath.abs(i-t.x)*l){let u=r.y{F.warn("abc88 cutPathAtIntersect",e,t);let r=[],i=e[0],n=!1;return e.forEach(a=>{if(F.info("abc88 checking point",a,t),!eS(t,a)&&!n){const s=rS(t,i,a);F.debug("abc88 inside",a,i,s),F.debug("abc88 intersection",s,t);let o=!1;r.forEach(l=>{o=o||l.x===s.x&&l.y===s.y}),r.some(l=>l.x===s.x&&l.y===s.y)?F.warn("abc88 no intersect",s,r):r.push(s),n=!0}else F.warn("abc88 outside",a,i),i=a,n||r.push(a)}),F.debug("returning points",r),r},"cutPathAtIntersect");function Pg(e){const t=[],r=[];for(let i=1;i5&&Math.abs(a.y-n.y)>5||n.y===a.y&&a.x===s.x&&Math.abs(a.x-n.x)>5&&Math.abs(a.y-s.y)>5)&&(t.push(a),r.push(i))}return{cornerPoints:t,cornerPointPositions:r}}p(Pg,"extractCornerPoints");var ih=p(function(e,t,r){const i=t.x-e.x,n=t.y-e.y,a=Math.sqrt(i*i+n*n),s=r/a;return{x:t.x-s*i,y:t.y-s*n}},"findAdjacentPoint"),iS=p(function(e){const{cornerPointPositions:t}=Pg(e),r=[];for(let i=0;i10&&Math.abs(a.y-n.y)>=10){F.debug("Corner point fixing",Math.abs(a.x-n.x),Math.abs(a.y-n.y));const d=5;s.x===o.x?f={x:c<0?o.x-d+u:o.x+d-u,y:h<0?o.y-u:o.y+u}:f={x:c<0?o.x-u:o.x+u,y:h<0?o.y-d+u:o.y+d-u}}else F.debug("Corner point skipping fixing",Math.abs(a.x-n.x),Math.abs(a.y-n.y));r.push(f,l)}else r.push(e[i]);return r},"fixCorners"),nS=p((e,t,r)=>{const i=e-t-r,n=2,a=2,s=n+a,o=Math.floor(i/s),l=Array(o).fill(`${n} ${a}`).join(" ");return`0 ${t} ${l} ${r}`},"generateDashArray"),aS=p(function(e,t,r,i,n,a,s,o=!1){const{handDrawnSeed:l}=ft();let c=t.points,h=!1;const u=n;var f=a;const d=[];for(const A in t.cssCompiledStyles)gd(A)||d.push(t.cssCompiledStyles[A]);F.debug("UIO intersect check",t.points,f.x,u.x),f.intersect&&u.intersect&&!o&&(c=c.slice(1,t.points.length-1),c.unshift(u.intersect(c[0])),F.debug("Last point UIO",t.start,"-->",t.end,c[c.length-1],f,f.intersect(c[c.length-1])),c.push(f.intersect(c[c.length-1])));const g=btoa(JSON.stringify(c));t.toCluster&&(F.info("to cluster abc88",r.get(t.toCluster)),c=rh(t.points,r.get(t.toCluster).node),h=!0),t.fromCluster&&(F.debug("from cluster abc88",r.get(t.fromCluster),JSON.stringify(c,null,2)),c=rh(c.reverse(),r.get(t.fromCluster).node).reverse(),h=!0);let m=c.filter(A=>!Number.isNaN(A.y));m=iS(m);let y=Cn;switch(y=zn,t.curve){case"linear":y=zn;break;case"basis":y=Cn;break;case"cardinal":y=xu;break;case"bumpX":y=du;break;case"bumpY":y=pu;break;case"catmullRom":y=_u;break;case"monotoneX":y=Tu;break;case"monotoneY":y=Au;break;case"natural":y=Bu;break;case"step":y=Mu;break;case"stepAfter":y=$u;break;case"stepBefore":y=Eu;break;default:y=Cn}const{x,y:b}=i_(t),_=z1().x(x).y(b).curve(y);let k;switch(t.thickness){case"normal":k="edge-thickness-normal";break;case"thick":k="edge-thickness-thick";break;case"invisible":k="edge-thickness-invisible";break;default:k="edge-thickness-normal"}switch(t.pattern){case"solid":k+=" edge-pattern-solid";break;case"dotted":k+=" edge-pattern-dotted";break;case"dashed":k+=" edge-pattern-dashed";break;default:k+=" edge-pattern-solid"}let w,L=t.curve==="rounded"?Ng(zg(m,t),5):_(m);const S=Array.isArray(t.style)?t.style:[t.style];let D=S.find(A=>A?.startsWith("stroke:")),I=!1;if(t.look==="handDrawn"){const A=j.svg(e);Object.assign([],m);const B=A.path(L,{roughness:.3,seed:l});k+=" transition",w=ht(B).select("path").attr("id",t.id).attr("class"," "+k+(t.classes?" "+t.classes:"")).attr("style",S?S.reduce(($,M)=>$+";"+M,""):"");let T=w.attr("d");w.attr("d",T),e.node().appendChild(w.node())}else{const A=d.join(";"),B=S?S.reduce((J,Z)=>J+Z+";",""):"";let T="";t.animate&&(T=" edge-animation-fast"),t.animation&&(T=" edge-animation-"+t.animation);const $=(A?A+";"+B+";":B)+";"+(S?S.reduce((J,Z)=>J+";"+Z,""):"");w=e.append("path").attr("d",L).attr("id",t.id).attr("class"," "+k+(t.classes?" "+t.classes:"")+(T??"")).attr("style",$),D=$.match(/stroke:([^;]+)/)?.[1],I=t.animate===!0||!!t.animation||A.includes("animation");const M=w.node(),q=typeof M.getTotalLength=="function"?M.getTotalLength():0,V=bc[t.arrowTypeStart]||0,K=bc[t.arrowTypeEnd]||0;if(t.look==="neo"&&!I){const Z=`stroke-dasharray: ${t.pattern==="dotted"||t.pattern==="dashed"?nS(q,V,K):`0 ${V} ${q-V-K} ${K}`}; stroke-dashoffset: 0;`;w.attr("style",Z+w.attr("style"))}}w.attr("data-edge",!0),w.attr("data-et","edge"),w.attr("data-id",t.id),w.attr("data-points",g),t.showPoints&&m.forEach(A=>{e.append("circle").style("stroke","red").style("fill","red").attr("r",1).attr("cx",A.x).attr("cy",A.y)});let O="";(ft().flowchart.arrowMarkerAbsolute||ft().state.arrowMarkerAbsolute)&&(O=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,O=O.replace(/\(/g,"\\(").replace(/\)/g,"\\)")),F.info("arrowTypeStart",t.arrowTypeStart),F.info("arrowTypeEnd",t.arrowTypeEnd),Kv(w,t,O,s,i,D);const E=Math.floor(c.length/2),N=c[E];he.isLabelCoordinateInPath(N,w.attr("d"))||(h=!0);let R={};return h&&(R.updatedPath=c),R.originalPath=t.points,R},"insertEdge");function Ng(e,t){if(e.length<2)return"";let r="";const i=e.length,n=1e-5;for(let a=0;a({...n}));if(e.length>=2&&Dt[t.arrowTypeStart]){const n=Dt[t.arrowTypeStart],a=e[0],s=e[1],{angle:o}=ao(a,s),l=n*Math.cos(o),c=n*Math.sin(o);r[0].x=a.x+l,r[0].y=a.y+c}const i=e.length;if(i>=2&&Dt[t.arrowTypeEnd]){const n=Dt[t.arrowTypeEnd],a=e[i-1],s=e[i-2],{angle:o}=ao(s,a),l=n*Math.cos(o),c=n*Math.sin(o);r[i-1].x=a.x-l,r[i-1].y=a.y-c}return r}p(zg,"applyMarkerOffsetsToPoints");var sS=p((e,t,r,i)=>{t.forEach(n=>{wS[n](e,r,i)})},"insertMarkers"),oS=p((e,t,r)=>{F.trace("Making markers for ",r),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionStart").attr("class","marker extension "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 1,7 L18,13 V 1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionEnd").attr("class","marker extension "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z")},"extension"),lS=p((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionStart").attr("class","marker composition "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionEnd").attr("class","marker composition "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"composition"),cS=p((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationStart").attr("class","marker aggregation "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationEnd").attr("class","marker aggregation "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"aggregation"),hS=p((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyStart").attr("class","marker dependency "+t).attr("refX",6).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyEnd").attr("class","marker dependency "+t).attr("refX",13).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")},"dependency"),uS=p((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopStart").attr("class","marker lollipop "+t).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopEnd").attr("class","marker lollipop "+t).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6)},"lollipop"),fS=p((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-pointEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-pointStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",4.5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 5 L 10 10 L 10 0 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},"point"),dS=p((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-circleEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",11).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-circleStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",-1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},"circle"),pS=p((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-crossEnd").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",12).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-crossStart").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",-1).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0")},"cross"),gS=p((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"barb"),mS=p((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneStart").attr("class","marker onlyOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M9,0 L9,18 M15,0 L15,18"),e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneEnd").attr("class","marker onlyOne "+t).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M3,0 L3,18 M9,0 L9,18")},"only_one"),yS=p((e,t,r)=>{const i=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneStart").attr("class","marker zeroOrOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");i.append("circle").attr("fill","white").attr("cx",21).attr("cy",9).attr("r",6),i.append("path").attr("d","M9,0 L9,18");const n=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+t).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");n.append("circle").attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),n.append("path").attr("d","M21,0 L21,18")},"zero_or_one"),xS=p((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreStart").attr("class","marker oneOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27"),e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreEnd").attr("class","marker oneOrMore "+t).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18")},"one_or_more"),bS=p((e,t,r)=>{const i=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");i.append("circle").attr("fill","white").attr("cx",48).attr("cy",18).attr("r",6),i.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18");const n=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+t).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");n.append("circle").attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),n.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")},"zero_or_more"),_S=p((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("path").attr("d",`M0,0 + L20,10 + M20,10 + L0,20`)},"requirement_arrow"),CS=p((e,t,r)=>{const i=e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("g");i.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),i.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),i.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10)},"requirement_contains"),wS={extension:oS,composition:lS,aggregation:cS,dependency:hS,lollipop:uS,point:fS,circle:dS,cross:pS,barb:gS,only_one:mS,zero_or_one:yS,one_or_more:xS,zero_or_more:bS,requirement_arrow:_S,requirement_contains:CS},kS=sS,vS={common:jr,getConfig:Ot,insertCluster:$v,insertEdge:aS,insertEdgeLabel:Jv,insertMarkers:kS,insertNode:Ig,interpolateToCurve:Go,labelHelper:it,log:F,positionEdgeLabel:tS},Ri={},Wg=p(e=>{for(const t of e)Ri[t.name]=t},"registerLayoutLoaders"),SS=p(()=>{Wg([{name:"dagre",loader:p(async()=>await pt(()=>import("./dagre-6UL2VRFP.u7dJjEIW.js"),__vite__mapDeps([0,1,2,3,4,5,6])),"loader")},{name:"cose-bilkent",loader:p(async()=>await pt(()=>import("./cose-bilkent-S5V4N54A.XbIyOKxw.js"),__vite__mapDeps([7,8,6])),"loader")}])},"registerDefaultLayoutLoaders");SS();var uB=p(async(e,t)=>{if(!(e.layoutAlgorithm in Ri))throw new Error(`Unknown layout algorithm: ${e.layoutAlgorithm}`);const r=Ri[e.layoutAlgorithm];return(await r.loader()).render(e,t,vS,{algorithm:r.algorithm})},"render"),fB=p((e="",{fallback:t="dagre"}={})=>{if(e in Ri)return e;if(t in Ri)return F.warn(`Layout algorithm ${e} is not registered. Using ${t} as fallback.`),t;throw new Error(`Both layout algorithms ${e} and ${t} are not registered.`)},"getRegisteredLayoutAlgorithm"),qg="comm",Hg="rule",jg="decl",TS="@import",AS="@namespace",LS="@keyframes",BS="@layer",Yg=Math.abs,dl=String.fromCharCode;function Ug(e){return e.trim()}function Tn(e,t,r){return e.replace(t,r)}function MS(e,t,r){return e.indexOf(t,r)}function Dr(e,t){return e.charCodeAt(t)|0}function qr(e,t,r){return e.slice(t,r)}function _e(e){return e.length}function ES(e){return e.length}function dn(e,t){return t.push(e),e}var Oa=1,Hr=1,Gg=0,re=0,kt=0,Xr="";function pl(e,t,r,i,n,a,s,o){return{value:e,root:t,parent:r,type:i,props:n,children:a,line:Oa,column:Hr,length:s,return:"",siblings:o}}function $S(){return kt}function FS(){return kt=re>0?Dr(Xr,--re):0,Hr--,kt===10&&(Hr=1,Oa--),kt}function fe(){return kt=re2||Ii(kt)>3?"":" "}function IS(e,t){for(;--t&&fe()&&!(kt<48||kt>102||kt>57&&kt<65||kt>70&&kt<97););return Ra(e,An()+(t<6&&qe()==32&&fe()==32))}function so(e){for(;fe();)switch(kt){case e:return re;case 34:case 39:e!==34&&e!==39&&so(kt);break;case 40:e===41&&so(e);break;case 92:fe();break}return re}function PS(e,t){for(;fe()&&e+kt!==57;)if(e+kt===84&&qe()===47)break;return"/*"+Ra(t,re-1)+"*"+dl(e===47?e:fe())}function NS(e){for(;!Ii(qe());)fe();return Ra(e,re)}function zS(e){return OS(Ln("",null,null,null,[""],e=DS(e),0,[0],e))}function Ln(e,t,r,i,n,a,s,o,l){for(var c=0,h=0,u=s,f=0,d=0,g=0,m=1,y=1,x=1,b=0,_="",k=n,w=a,L=i,S=_;y;)switch(g=b,b=fe()){case 40:if(g!=108&&Dr(S,u-1)==58){MS(S+=Tn(ds(b),"&","&\f"),"&\f",Yg(c?o[c-1]:0))!=-1&&(x=-1);break}case 34:case 39:case 91:S+=ds(b);break;case 9:case 10:case 13:case 32:S+=RS(g);break;case 92:S+=IS(An()-1,7);continue;case 47:switch(qe()){case 42:case 47:dn(WS(PS(fe(),An()),t,r,l),l),(Ii(g||1)==5||Ii(qe()||1)==5)&&_e(S)&&qr(S,-1,void 0)!==" "&&(S+=" ");break;default:S+="/"}break;case 123*m:o[c++]=_e(S)*x;case 125*m:case 59:case 0:switch(b){case 0:case 125:y=0;case 59+h:x==-1&&(S=Tn(S,/\f/g,"")),d>0&&(_e(S)-u||m===0&&g===47)&&dn(d>32?ah(S+";",i,r,u-1,l):ah(Tn(S," ","")+";",i,r,u-2,l),l);break;case 59:S+=";";default:if(dn(L=nh(S,t,r,c,h,n,o,_,k=[],w=[],u,a),a),b===123)if(h===0)Ln(S,t,L,L,k,a,u,o,w);else{switch(f){case 99:if(Dr(S,3)===110)break;case 108:if(Dr(S,2)===97)break;default:h=0;case 100:case 109:case 115:}h?Ln(e,L,L,i&&dn(nh(e,L,L,0,0,n,o,_,n,k=[],u,w),w),n,w,u,o,i?k:w):Ln(S,L,L,L,[""],w,0,o,w)}}c=h=d=0,m=x=1,_=S="",u=s;break;case 58:u=1+_e(S),d=g;default:if(m<1){if(b==123)--m;else if(b==125&&m++==0&&FS()==125)continue}switch(S+=dl(b),b*m){case 38:x=h>0?1:(S+="\f",-1);break;case 44:o[c++]=(_e(S)-1)*x,x=1;break;case 64:qe()===45&&(S+=ds(fe())),f=qe(),h=u=_e(_=S+=NS(An())),b++;break;case 45:g===45&&_e(S)==2&&(m=0)}}return a}function nh(e,t,r,i,n,a,s,o,l,c,h,u){for(var f=n-1,d=n===0?a:[""],g=ES(d),m=0,y=0,x=0;m0?d[b]+" "+_:Tn(_,/&\f/g,d[b])))&&(l[x++]=k);return pl(e,t,r,n===0?Hg:o,l,c,h,u)}function WS(e,t,r,i){return pl(e,t,r,qg,dl($S()),qr(e,2,-2),0,i)}function ah(e,t,r,i,n){return pl(e,t,r,jg,qr(e,0,i),qr(e,i+1,-1),i,n)}function oo(e,t){for(var r="",i=0;i/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(e),"detector"),nT=p(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./c4Diagram-YG6GDRKO.Dnzr4dCc.js");return{diagram:t}},__vite__mapDeps([9,10,6]));return{id:Vg,diagram:e}},"loader"),aT={id:Vg,detector:iT,loader:nT},sT=aT,Xg="flowchart",oT=p((e,t)=>t?.flowchart?.defaultRenderer==="dagre-wrapper"||t?.flowchart?.defaultRenderer==="elk"?!1:/^\s*graph/.test(e),"detector"),lT=p(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./flowDiagram-NV44I4VS.PKUPp6Gy.js");return{diagram:t}},__vite__mapDeps([11,12,13,14,15,6]));return{id:Xg,diagram:e}},"loader"),cT={id:Xg,detector:oT,loader:lT},hT=cT,Zg="flowchart-v2",uT=p((e,t)=>t?.flowchart?.defaultRenderer==="dagre-d3"?!1:(t?.flowchart?.defaultRenderer==="elk"&&(t.layout="elk"),/^\s*graph/.test(e)&&t?.flowchart?.defaultRenderer==="dagre-wrapper"?!0:/^\s*flowchart/.test(e)),"detector"),fT=p(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./flowDiagram-NV44I4VS.PKUPp6Gy.js");return{diagram:t}},__vite__mapDeps([11,12,13,14,15,6]));return{id:Zg,diagram:e}},"loader"),dT={id:Zg,detector:uT,loader:fT},pT=dT,Kg="er",gT=p(e=>/^\s*erDiagram/.test(e),"detector"),mT=p(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./erDiagram-Q2GNP2WA.mcAILrwl.js");return{diagram:t}},__vite__mapDeps([16,13,14,15,6]));return{id:Kg,diagram:e}},"loader"),yT={id:Kg,detector:gT,loader:mT},xT=yT,Qg="gitGraph",bT=p(e=>/^\s*gitGraph/.test(e),"detector"),_T=p(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./gitGraphDiagram-NY62KEGX.DrvSVcW5.js");return{diagram:t}},__vite__mapDeps([17,18,19,20,6,4,2]));return{id:Qg,diagram:e}},"loader"),CT={id:Qg,detector:bT,loader:_T},wT=CT,Jg="gantt",kT=p(e=>/^\s*gantt/.test(e),"detector"),vT=p(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./ganttDiagram-JELNMOA3.DeRSi4dw.js");return{diagram:t}},__vite__mapDeps([21,22,23,24,6]));return{id:Jg,diagram:e}},"loader"),ST={id:Jg,detector:kT,loader:vT},TT=ST,tm="info",AT=p(e=>/^\s*info/.test(e),"detector"),LT=p(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./infoDiagram-WHAUD3N6.DII4lMba.js");return{diagram:t}},__vite__mapDeps([25,20,6,4,2]));return{id:tm,diagram:e}},"loader"),BT={id:tm,detector:AT,loader:LT},em="pie",MT=p(e=>/^\s*pie/.test(e),"detector"),ET=p(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./pieDiagram-ADFJNKIX.DGAq4_qk.js");return{diagram:t}},__vite__mapDeps([26,18,20,6,4,2,27,28,23]));return{id:em,diagram:e}},"loader"),$T={id:em,detector:MT,loader:ET},rm="quadrantChart",FT=p(e=>/^\s*quadrantChart/.test(e),"detector"),DT=p(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./quadrantDiagram-AYHSOK5B.C9eleybL.js");return{diagram:t}},__vite__mapDeps([29,22,23,24,6]));return{id:rm,diagram:e}},"loader"),OT={id:rm,detector:FT,loader:DT},RT=OT,im="xychart",IT=p(e=>/^\s*xychart(-beta)?/.test(e),"detector"),PT=p(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./xychartDiagram-PRI3JC2R.Cow3WGXm.js");return{diagram:t}},__vite__mapDeps([30,23,28,22,24,6]));return{id:im,diagram:e}},"loader"),NT={id:im,detector:IT,loader:PT},zT=NT,nm="requirement",WT=p(e=>/^\s*requirement(Diagram)?/.test(e),"detector"),qT=p(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./requirementDiagram-UZGBJVZJ.Yoxak5pj.js");return{diagram:t}},__vite__mapDeps([31,13,14,6]));return{id:nm,diagram:e}},"loader"),HT={id:nm,detector:WT,loader:qT},jT=HT,am="sequence",YT=p(e=>/^\s*sequenceDiagram/.test(e),"detector"),UT=p(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./sequenceDiagram-WL72ISMW.DjG2Q87q.js");return{diagram:t}},__vite__mapDeps([32,10,19,6]));return{id:am,diagram:e}},"loader"),GT={id:am,detector:YT,loader:UT},VT=GT,sm="class",XT=p((e,t)=>t?.class?.defaultRenderer==="dagre-wrapper"?!1:/^\s*classDiagram/.test(e),"detector"),ZT=p(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./classDiagram-2ON5EDUG.ChOIO5pY.js");return{diagram:t}},__vite__mapDeps([33,34,12,13,14,6]));return{id:sm,diagram:e}},"loader"),KT={id:sm,detector:XT,loader:ZT},QT=KT,om="classDiagram",JT=p((e,t)=>/^\s*classDiagram/.test(e)&&t?.class?.defaultRenderer==="dagre-wrapper"?!0:/^\s*classDiagram-v2/.test(e),"detector"),tA=p(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./classDiagram-v2-WZHVMYZB.ChOIO5pY.js");return{diagram:t}},__vite__mapDeps([35,34,12,13,14,6]));return{id:om,diagram:e}},"loader"),eA={id:om,detector:JT,loader:tA},rA=eA,lm="state",iA=p((e,t)=>t?.state?.defaultRenderer==="dagre-wrapper"?!1:/^\s*stateDiagram/.test(e),"detector"),nA=p(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./stateDiagram-FKZM4ZOC.B-V3SeMq.js");return{diagram:t}},__vite__mapDeps([36,37,13,14,1,2,3,4,6]));return{id:lm,diagram:e}},"loader"),aA={id:lm,detector:iA,loader:nA},sA=aA,cm="stateDiagram",oA=p((e,t)=>!!(/^\s*stateDiagram-v2/.test(e)||/^\s*stateDiagram/.test(e)&&t?.state?.defaultRenderer==="dagre-wrapper"),"detector"),lA=p(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./stateDiagram-v2-4FDKWEC3.DqTJjzBS.js");return{diagram:t}},__vite__mapDeps([38,37,13,14,6]));return{id:cm,diagram:e}},"loader"),cA={id:cm,detector:oA,loader:lA},hA=cA,hm="journey",uA=p(e=>/^\s*journey/.test(e),"detector"),fA=p(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./journeyDiagram-XKPGCS4Q.DFKcAErE.js");return{diagram:t}},__vite__mapDeps([39,10,12,27,6]));return{id:hm,diagram:e}},"loader"),dA={id:hm,detector:uA,loader:fA},pA=dA,gA=p((e,t,r)=>{F.debug(`rendering svg for syntax error +`);const i=X1(t),n=i.append("g");i.attr("viewBox","0 0 2412 512"),Rh(i,100,512,!0),n.append("path").attr("class","error-icon").attr("d","m411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z"),n.append("path").attr("class","error-icon").attr("d","m459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z"),n.append("path").attr("class","error-icon").attr("d","m340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z"),n.append("path").attr("class","error-icon").attr("d","m400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.164-16,16v32c0,8.836 7.156,16 16,16z"),n.append("path").attr("class","error-icon").attr("d","m496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z"),n.append("path").attr("class","error-icon").attr("d","m436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z"),n.append("text").attr("class","error-text").attr("x",1440).attr("y",250).attr("font-size","150px").style("text-anchor","middle").text("Syntax error in text"),n.append("text").attr("class","error-text").attr("x",1250).attr("y",400).attr("font-size","100px").style("text-anchor","middle").text(`mermaid version ${r}`)},"draw"),um={draw:gA},mA=um,yA={db:{},renderer:um,parser:{parse:p(()=>{},"parse")}},xA=yA,fm="flowchart-elk",bA=p((e,t={})=>/^\s*flowchart-elk/.test(e)||/^\s*(flowchart|graph)/.test(e)&&t?.flowchart?.defaultRenderer==="elk"?(t.layout="elk",!0):!1,"detector"),_A=p(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./flowDiagram-NV44I4VS.PKUPp6Gy.js");return{diagram:t}},__vite__mapDeps([11,12,13,14,15,6]));return{id:fm,diagram:e}},"loader"),CA={id:fm,detector:bA,loader:_A},wA=CA,dm="timeline",kA=p(e=>/^\s*timeline/.test(e),"detector"),vA=p(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./timeline-definition-IT6M3QCI.-Sq8Di49.js");return{diagram:t}},__vite__mapDeps([40,27,6]));return{id:dm,diagram:e}},"loader"),SA={id:dm,detector:kA,loader:vA},TA=SA,pm="mindmap",AA=p(e=>/^\s*mindmap/.test(e),"detector"),LA=p(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./mindmap-definition-VGOIOE7T.CAV3lRvW.js");return{diagram:t}},__vite__mapDeps([41,13,14,6]));return{id:pm,diagram:e}},"loader"),BA={id:pm,detector:AA,loader:LA},MA=BA,gm="kanban",EA=p(e=>/^\s*kanban/.test(e),"detector"),$A=p(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./kanban-definition-3W4ZIXB7.Dgxll3cG.js");return{diagram:t}},__vite__mapDeps([42,12,6]));return{id:gm,diagram:e}},"loader"),FA={id:gm,detector:EA,loader:$A},DA=FA,mm="sankey",OA=p(e=>/^\s*sankey(-beta)?/.test(e),"detector"),RA=p(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./sankeyDiagram-TZEHDZUN.C-hlWUgz.js");return{diagram:t}},__vite__mapDeps([43,28,23,6]));return{id:mm,diagram:e}},"loader"),IA={id:mm,detector:OA,loader:RA},PA=IA,ym="packet",NA=p(e=>/^\s*packet(-beta)?/.test(e),"detector"),zA=p(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./diagram-S2PKOQOG.Cn_-o7eu.js");return{diagram:t}},__vite__mapDeps([44,18,20,6,4,2]));return{id:ym,diagram:e}},"loader"),WA={id:ym,detector:NA,loader:zA},xm="radar",qA=p(e=>/^\s*radar-beta/.test(e),"detector"),HA=p(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./diagram-QEK2KX5R.rXmDqRow.js");return{diagram:t}},__vite__mapDeps([45,18,20,6,4,2]));return{id:xm,diagram:e}},"loader"),jA={id:xm,detector:qA,loader:HA},bm="block",YA=p(e=>/^\s*block(-beta)?/.test(e),"detector"),UA=p(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./blockDiagram-VD42YOAC.BtxH3WKO.js");return{diagram:t}},__vite__mapDeps([46,12,5,1,2,15,6]));return{id:bm,diagram:e}},"loader"),GA={id:bm,detector:YA,loader:UA},VA=GA,_m="architecture",XA=p(e=>/^\s*architecture/.test(e),"detector"),ZA=p(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./architectureDiagram-VXUJARFQ.DZJJY8Mz.js");return{diagram:t}},__vite__mapDeps([47,18,20,6,4,2,8]));return{id:_m,diagram:e}},"loader"),KA={id:_m,detector:XA,loader:ZA},QA=KA,Cm="treemap",JA=p(e=>/^\s*treemap/.test(e),"detector"),tL=p(async()=>{const{diagram:e}=await pt(async()=>{const{diagram:t}=await import("./diagram-PSM6KHXK.0TbXjUWG.js");return{diagram:t}},__vite__mapDeps([48,14,18,20,6,4,2,24,28,23]));return{id:Cm,diagram:e}},"loader"),eL={id:Cm,detector:JA,loader:tL},fh=!1,Ia=p(()=>{fh||(fh=!0,Fn("error",xA,e=>e.toLowerCase().trim()==="error"),Fn("---",{db:{clear:p(()=>{},"clear")},styles:{},renderer:{draw:p(()=>{},"draw")},parser:{parse:p(()=>{throw new Error("Diagrams beginning with --- are not valid. If you were trying to use a YAML front-matter, please ensure that you've correctly opened and closed the YAML front-matter with un-indented `---` blocks")},"parse")},init:p(()=>null,"init")},e=>e.toLowerCase().trimStart().startsWith("---")),xs(wA,MA,QA),xs(sT,DA,rA,QT,xT,TT,BT,$T,jT,VT,pT,hT,TA,wT,hA,sA,pA,RT,PA,WA,zT,VA,jA,eL))},"addDiagrams"),rL=p(async()=>{F.debug("Loading registered diagrams");const t=(await Promise.allSettled(Object.entries(hr).map(async([r,{detector:i,loader:n}])=>{if(n)try{ws(r)}catch{try{const{diagram:a,id:s}=await n();Fn(s,a,i)}catch(a){throw F.error(`Failed to load external diagram with key ${r}. Removing from detectors.`),delete hr[r],a}}}))).filter(r=>r.status==="rejected");if(t.length>0){F.error(`Failed to load ${t.length} external diagrams`);for(const r of t)F.error(r);throw new Error(`Failed to load ${t.length} external diagrams`)}},"loadRegisteredDiagrams"),iL="graphics-document document";function wm(e,t){e.attr("role",iL),t!==""&&e.attr("aria-roledescription",t)}p(wm,"setA11yDiagramInfo");function km(e,t,r,i){if(e.insert!==void 0){if(r){const n=`chart-desc-${i}`;e.attr("aria-describedby",n),e.insert("desc",":first-child").attr("id",n).text(r)}if(t){const n=`chart-title-${i}`;e.attr("aria-labelledby",n),e.insert("title",":first-child").attr("id",n).text(t)}}}p(km,"addSVGa11yTitleDescription");var fo=class vm{constructor(t,r,i,n,a){this.type=t,this.text=r,this.db=i,this.parser=n,this.renderer=a}static{p(this,"Diagram")}static async fromText(t,r={}){const i=Ot(),n=mo(t,i);t=ek(t)+` +`;try{ws(n)}catch{const c=S0(n);if(!c)throw new vh(`Diagram ${n} not found.`);const{id:h,diagram:u}=await c();Fn(h,u)}const{db:a,parser:s,renderer:o,init:l}=ws(n);return s.parser&&(s.parser.yy=a),a.clear?.(),l?.(i),r.title&&a.setDiagramTitle?.(r.title),await s.parse(t),new vm(n,t,a,s,o)}async render(t,r){await this.renderer.draw(this.text,t,r,this)}getParser(){return this.parser}getType(){return this.type}},dh=[],nL=p(()=>{dh.forEach(e=>{e()}),dh=[]},"attachFunctions"),aL=p(e=>e.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments");function Sm(e){const t=e.match(kh);if(!t)return{text:e,metadata:{}};let r=r_(t[1],{schema:e_})??{};r=typeof r=="object"&&!Array.isArray(r)?r:{};const i={};return r.displayMode&&(i.displayMode=r.displayMode.toString()),r.title&&(i.title=r.title.toString()),r.config&&(i.config=r.config),{text:e.slice(t[0].length),metadata:i}}p(Sm,"extractFrontMatter");var sL=p(e=>e.replace(/\r\n?/g,` +`).replace(/<(\w+)([^>]*)>/g,(t,r,i)=>"<"+r+i.replace(/="([^"]*)"/g,"='$1'")+">"),"cleanupText"),oL=p(e=>{const{text:t,metadata:r}=Sm(e),{displayMode:i,title:n,config:a={}}=r;return i&&(a.gantt||(a.gantt={}),a.gantt.displayMode=i),{title:n,config:a,text:t}},"processFrontmatter"),lL=p(e=>{const t=he.detectInit(e)??{},r=he.detectDirective(e,"wrap");return Array.isArray(r)?t.wrap=r.some(({type:i})=>i==="wrap"):r?.type==="wrap"&&(t.wrap=!0),{text:qw(e),directive:t}},"processDirectives");function gl(e){const t=sL(e),r=oL(t),i=lL(r.text),n=Qo(r.config,i.directive);return e=aL(i.text),{code:e,title:r.title,config:n}}p(gl,"preprocessDiagram");function Tm(e){const t=new TextEncoder().encode(e),r=Array.from(t,i=>String.fromCodePoint(i)).join("");return btoa(r)}p(Tm,"toBase64");var cL=5e4,hL="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa",uL="sandbox",fL="loose",dL="http://www.w3.org/2000/svg",pL="http://www.w3.org/1999/xlink",gL="http://www.w3.org/1999/xhtml",mL="100%",yL="100%",xL="border:0;margin:0;",bL="margin:0",_L="allow-top-navigation-by-user-activation allow-popups",CL='The "iframe" tag is not supported by your browser.',wL=["foreignobject"],kL=["dominant-baseline"];function ml(e){const t=gl(e);return En(),W0(t.config??{}),t}p(ml,"processAndSetConfigs");async function Am(e,t){Ia();try{const{code:r,config:i}=ml(e);return{diagramType:(await Bm(r)).type,config:i}}catch(r){if(t?.suppressErrors)return!1;throw r}}p(Am,"parse");var ph=p((e,t,r=[])=>` +.${e} ${t} { ${r.join(" !important; ")} !important; }`,"cssImportantStyles"),vL=p((e,t=new Map)=>{let r="";if(e.themeCSS!==void 0&&(r+=` +${e.themeCSS}`),e.fontFamily!==void 0&&(r+=` +:root { --mermaid-font-family: ${e.fontFamily}}`),e.altFontFamily!==void 0&&(r+=` +:root { --mermaid-alt-font-family: ${e.altFontFamily}}`),t instanceof Map){const s=e.htmlLabels??e.flowchart?.htmlLabels?["> *","span"]:["rect","polygon","ellipse","circle","path"];t.forEach(o=>{uh(o.styles)||s.forEach(l=>{r+=ph(o.id,l,o.styles)}),uh(o.textStyles)||(r+=ph(o.id,"tspan",(o?.textStyles||[]).map(l=>l.replace("color","fill"))))})}return r},"createCssStyles"),SL=p((e,t,r,i)=>{const n=vL(e,r),a=oy(t,n,e.themeVariables);return oo(zS(`${i}{${a}}`),qS)},"createUserStyles"),TL=p((e="",t,r)=>{let i=e;return!r&&!t&&(i=i.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,'marker-end="url(#')),i=_r(i),i=i.replace(/
    /g,"
    "),i},"cleanUpSvgCode"),AL=p((e="",t)=>{const r=t?.viewBox?.baseVal?.height?t.viewBox.baseVal.height+"px":yL,i=Tm(`${e}`);return``},"putIntoIFrame"),gh=p((e,t,r,i,n)=>{const a=e.append("div");a.attr("id",r),i&&a.attr("style",i);const s=a.append("svg").attr("id",t).attr("width","100%").attr("xmlns",dL);return n&&s.attr("xmlns:xlink",n),s.append("g"),e},"appendDivSvgG");function po(e,t){return e.append("iframe").attr("id",t).attr("style","width: 100%; height: 100%;").attr("sandbox","")}p(po,"sandboxedIframe");var LL=p((e,t,r,i)=>{e.getElementById(t)?.remove(),e.getElementById(r)?.remove(),e.getElementById(i)?.remove()},"removeExistingElements"),BL=p(async function(e,t,r){Ia();const i=ml(t);t=i.code;const n=Ot();F.debug(n),t.length>(n?.maxTextSize??cL)&&(t=hL);const a="#"+e,s="i"+e,o="#"+s,l="d"+e,c="#"+l,h=p(()=>{const R=ht(f?o:c).node();R&&"remove"in R&&R.remove()},"removeTempElements");let u=ht("body");const f=n.securityLevel===uL,d=n.securityLevel===fL,g=n.fontFamily;if(r!==void 0){if(r&&(r.innerHTML=""),f){const N=po(ht(r),s);u=ht(N.nodes()[0].contentDocument.body),u.node().style.margin=0}else u=ht(r);gh(u,e,l,`font-family: ${g}`,pL)}else{if(LL(document,e,l,s),f){const N=po(ht("body"),s);u=ht(N.nodes()[0].contentDocument.body),u.node().style.margin=0}else u=ht("body");gh(u,e,l)}let m,y;try{m=await fo.fromText(t,{title:i.title})}catch(N){if(n.suppressErrorRendering)throw h(),N;m=await fo.fromText("error"),y=N}const x=u.select(c).node(),b=m.type,_=x.firstChild,k=_.firstChild,w=m.renderer.getClasses?.(t,m),L=SL(n,b,w,a),S=document.createElement("style");S.innerHTML=L,_.insertBefore(S,k);try{await m.renderer.draw(t,e,Dl.version,m)}catch(N){throw n.suppressErrorRendering?h():mA.draw(t,e,Dl.version),N}const D=u.select(`${c} svg`),I=m.db.getAccTitle?.(),O=m.db.getAccDescription?.();Mm(b,D,I,O),u.select(`[id="${e}"]`).selectAll("foreignobject > *").attr("xmlns",gL);let E=u.select(c).node().innerHTML;if(F.debug("config.arrowMarkerAbsolute",n.arrowMarkerAbsolute),E=TL(E,f,Lt(n.arrowMarkerAbsolute)),f){const N=u.select(c+" svg").node();E=AL(E,N)}else d||(E=Or.sanitize(E,{ADD_TAGS:wL,ADD_ATTR:kL,HTML_INTEGRATION_POINTS:{foreignobject:!0}}));if(nL(),y)throw y;return h(),{diagramType:b,svg:E,bindFunctions:m.db.bindFunctions}},"render");function Lm(e={}){const t=Tt({},e);t?.fontFamily&&!t.themeVariables?.fontFamily&&(t.themeVariables||(t.themeVariables={}),t.themeVariables.fontFamily=t.fontFamily),N0(t),t?.theme&&t.theme in Fe?t.themeVariables=Fe[t.theme].getThemeVariables(t.themeVariables):t&&(t.themeVariables=Fe.default.getThemeVariables(t.themeVariables));const r=typeof t=="object"?P0(t):Bh();go(r.logLevel),Ia()}p(Lm,"initialize");var Bm=p((e,t={})=>{const{code:r}=gl(e);return fo.fromText(r,t)},"getDiagramFromText");function Mm(e,t,r,i){wm(t,e),km(t,r,i,t.attr("id"))}p(Mm,"addA11yInfo");var mr=Object.freeze({render:BL,parse:Am,getDiagramFromText:Bm,initialize:Lm,getConfig:Ot,setConfig:Mh,getSiteConfig:Bh,updateSiteConfig:z0,reset:p(()=>{En()},"reset"),globalReset:p(()=>{En(Rr)},"globalReset"),defaultConfig:Rr});go(Ot().logLevel);En(Ot());var ML=p((e,t,r)=>{F.warn(e),Ko(e)?(r&&r(e.str,e.hash),t.push({...e,message:e.str,error:e})):(r&&r(e),e instanceof Error&&t.push({str:e.message,message:e.message,hash:e.name,error:e}))},"handleError"),Em=p(async function(e={querySelector:".mermaid"}){try{await EL(e)}catch(t){if(Ko(t)&&F.error(t.str),Ie.parseError&&Ie.parseError(t),!e.suppressErrors)throw F.error("Use the suppressErrors option to suppress these errors"),t}},"run"),EL=p(async function({postRenderCallback:e,querySelector:t,nodes:r}={querySelector:".mermaid"}){const i=mr.getConfig();F.debug(`${e?"":"No "}Callback function found`);let n;if(r)n=r;else if(t)n=document.querySelectorAll(t);else throw new Error("Nodes and querySelector are both undefined");F.debug(`Found ${n.length} diagrams`),i?.startOnLoad!==void 0&&(F.debug("Start On Load: "+i?.startOnLoad),mr.updateSiteConfig({startOnLoad:i?.startOnLoad}));const a=new he.InitIDGenerator(i.deterministicIds,i.deterministicIDSeed);let s;const o=[];for(const l of Array.from(n)){if(F.info("Rendering diagram: "+l.id),l.getAttribute("data-processed"))continue;l.setAttribute("data-processed","true");const c=`mermaid-${a.next()}`;s=l.innerHTML,s=Kd(he.entityDecode(s)).trim().replace(//gi,"
    ");const h=he.detectInit(s);h&&F.debug("Detected early reinit: ",h);try{const{svg:u,bindFunctions:f}=await Om(c,s,l);l.innerHTML=u,e&&await e(c),f&&f(l)}catch(u){ML(u,o,Ie.parseError)}}if(o.length>0)throw o[0]},"runThrowsErrors"),$m=p(function(e){mr.initialize(e)},"initialize"),$L=p(async function(e,t,r){F.warn("mermaid.init is deprecated. Please use run instead."),e&&$m(e);const i={postRenderCallback:r,querySelector:".mermaid"};typeof t=="string"?i.querySelector=t:t&&(t instanceof HTMLElement?i.nodes=[t]:i.nodes=t),await Em(i)},"init"),FL=p(async(e,{lazyLoad:t=!0}={})=>{Ia(),xs(...e),t===!1&&await rL()},"registerExternalDiagrams"),Fm=p(function(){if(Ie.startOnLoad){const{startOnLoad:e}=mr.getConfig();e&&Ie.run().catch(t=>F.error("Mermaid failed to initialize",t))}},"contentLoaded");typeof document<"u"&&window.addEventListener("load",Fm,!1);var DL=p(function(e){Ie.parseError=e},"setParseErrorHandler"),ha=[],ps=!1,Dm=p(async()=>{if(!ps){for(ps=!0;ha.length>0;){const e=ha.shift();if(e)try{await e()}catch(t){F.error("Error executing queue",t)}}ps=!1}},"executeQueue"),OL=p(async(e,t)=>new Promise((r,i)=>{const n=p(()=>new Promise((a,s)=>{mr.parse(e,t).then(o=>{a(o),r(o)},o=>{F.error("Error parsing",o),Ie.parseError?.(o),s(o),i(o)})}),"performCall");ha.push(n),Dm().catch(i)}),"parse"),Om=p((e,t,r)=>new Promise((i,n)=>{const a=p(()=>new Promise((s,o)=>{mr.render(e,t,r).then(l=>{s(l),i(l)},l=>{F.error("Error parsing",l),Ie.parseError?.(l),o(l),n(l)})}),"performCall");ha.push(a),Dm().catch(n)}),"render"),RL=p(()=>Object.keys(hr).map(e=>({id:e})),"getRegisteredDiagramsMetadata"),Ie={startOnLoad:!0,mermaidAPI:mr,parse:OL,render:Om,init:$L,run:Em,registerExternalDiagrams:FL,registerLayoutLoaders:Wg,initialize:$m,parseError:void 0,contentLoaded:Fm,setParseErrorHandler:DL,detectType:mo,registerIconPacks:av,getRegisteredDiagramsMetadata:RL},IL=Ie;/*! Check if previously processed *//*! + * Wait for document loaded before starting the execution + */const dB=Object.freeze(Object.defineProperty({__proto__:null,default:IL},Symbol.toStringTag,{value:"Module"}));export{Ih as $,_i as A,Xm as B,my as C,Qo as D,Ot as E,Lh as F,Gw as G,X1 as H,Dl as I,e_ as J,E0 as K,Ir as L,zL as M,Aa as N,Z0 as O,yo as P,Ul as Q,z1 as R,Cn as S,Uw as T,Ni as U,ny as V,Pi as W,H as X,et as Y,Pw as Z,p as _,hy as a,Yo as a$,R1 as a0,Mo as a1,UL as a2,XL as a3,Ar as a4,fc as a5,uc as a6,KL as a7,ZL as a8,VL as a9,ov as aA,I1 as aB,NL as aC,Ta as aD,Jn as aE,Bd as aF,jm as aG,Ui as aH,av as aI,nv as aJ,To as aK,We as aL,ac as aM,mb as aN,Ai as aO,fw as aP,Ad as aQ,_d as aR,mC as aS,Zn as aT,yC as aU,ji as aV,ir as aW,ow as aX,$c as aY,yr as aZ,xC as a_,jL as aa,YL as ab,JL as ac,GL as ad,QL as ae,$v as af,Ig as ag,cB as ah,i_ as ai,Lt as aj,Xe as ak,qo as al,cp as am,_r as an,Od as ao,st as ap,we as aq,kS as ar,lB as as,hB as at,sB as au,G as av,oB as aw,aS as ax,tS as ay,Jv as az,cy as b,gC as b0,CC as b1,Gr as b2,uw as b3,Dw as b4,TC as b5,Aw as b6,Ho as b7,uh as b8,U as b9,ho as bA,dB as bB,gd as ba,Zt as bb,cb as bc,So as bd,Kh as be,Wi as bf,tu as bg,HL as bh,Vm as bi,Fw as bj,Tw as bk,Ow as bl,wa as bm,dC as bn,jo as bo,Td as bp,Iw as bq,Ur as br,xw as bs,US as bt,Hi as bu,Qn as bv,Ve as bw,Ac as bx,Uo as by,wd as bz,ft as c,ht as d,Rh as e,Tt as f,fy as g,Re as h,ee as i,c_ as j,jr as k,F as l,Id as m,WL as n,fB as o,dy as p,py as q,uB as r,uy as s,r_ as t,he as u,Zv as v,Zw as w,tB as x,ly as y,qL as z}; diff --git a/_astro/min.D5TVP8RA.js b/_astro/min.D5TVP8RA.js new file mode 100644 index 00000000..0ef480f7 --- /dev/null +++ b/_astro/min.D5TVP8RA.js @@ -0,0 +1 @@ +import{b,a as m,c as d,d as h,i as l}from"./_baseUniq.CLojSEzq.js";import{aD as g,aE as o,aF as p}from"./mermaid.core.LbQlJBBQ.js";function L(a){var n=a==null?0:a.length;return n?b(a):[]}function v(a,n){var s=-1,t=g(a)?Array(a.length):[];return m(a,function(f,i,e){t[++s]=n(f,i,e)}),t}function M(a,n){var s=o(a)?d:v;return s(a,h(n))}function x(a,n){return a"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");$=crypto.getRandomValues.bind(crypto)}return $(me)}const _e=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),ie={randomUUID:_e};function be(e,r,i){if(ie.randomUUID&&!e)return ie.randomUUID();e=e||{};const l=e.random??e.rng?.()??Ee();if(l.length<16)throw new Error("Random bytes length must be >= 16");return l[6]=l[6]&15|64,l[8]=l[8]&63|128,ye(l)}var W=(function(){var e=c(function(L,n,t,o){for(t=t||{},o=L.length;o--;t[L[o]]=n);return t},"o"),r=[1,4],i=[1,13],l=[1,12],p=[1,15],h=[1,16],f=[1,20],E=[1,19],u=[6,7,8],z=[1,26],X=[1,24],Y=[1,25],b=[6,7,11],q=[1,6,13,15,16,19,22],J=[1,33],K=[1,34],C=[1,6,7,11,13,15,16,19,22],V={trace:c(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mindMap:4,spaceLines:5,SPACELINE:6,NL:7,MINDMAP:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,node:14,ICON:15,CLASS:16,nodeWithId:17,nodeWithoutId:18,NODE_DSTART:19,NODE_DESCR:20,NODE_DEND:21,NODE_ID:22,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"MINDMAP",11:"EOF",13:"SPACELIST",15:"ICON",16:"CLASS",19:"NODE_DSTART",20:"NODE_DESCR",21:"NODE_DEND",22:"NODE_ID"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,2],[12,2],[12,2],[12,1],[12,1],[12,1],[12,1],[12,1],[14,1],[14,1],[18,3],[17,1],[17,4]],performAction:c(function(n,t,o,a,g,s,I){var d=s.length-1;switch(g){case 6:case 7:return a;case 8:a.getLogger().trace("Stop NL ");break;case 9:a.getLogger().trace("Stop EOF ");break;case 11:a.getLogger().trace("Stop NL2 ");break;case 12:a.getLogger().trace("Stop EOF2 ");break;case 15:a.getLogger().info("Node: ",s[d].id),a.addNode(s[d-1].length,s[d].id,s[d].descr,s[d].type);break;case 16:a.getLogger().trace("Icon: ",s[d]),a.decorateNode({icon:s[d]});break;case 17:case 21:a.decorateNode({class:s[d]});break;case 18:a.getLogger().trace("SPACELIST");break;case 19:a.getLogger().trace("Node: ",s[d].id),a.addNode(0,s[d].id,s[d].descr,s[d].type);break;case 20:a.decorateNode({icon:s[d]});break;case 25:a.getLogger().trace("node found ..",s[d-2]),this.$={id:s[d-1],descr:s[d-1],type:a.getType(s[d-2],s[d])};break;case 26:this.$={id:s[d],descr:s[d],type:a.nodeType.DEFAULT};break;case 27:a.getLogger().trace("node found ..",s[d-3]),this.$={id:s[d-3],descr:s[d-1],type:a.getType(s[d-2],s[d])};break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:r},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:r},{6:i,7:[1,10],9:9,12:11,13:l,14:14,15:p,16:h,17:17,18:18,19:f,22:E},e(u,[2,3]),{1:[2,2]},e(u,[2,4]),e(u,[2,5]),{1:[2,6],6:i,12:21,13:l,14:14,15:p,16:h,17:17,18:18,19:f,22:E},{6:i,9:22,12:11,13:l,14:14,15:p,16:h,17:17,18:18,19:f,22:E},{6:z,7:X,10:23,11:Y},e(b,[2,22],{17:17,18:18,14:27,15:[1,28],16:[1,29],19:f,22:E}),e(b,[2,18]),e(b,[2,19]),e(b,[2,20]),e(b,[2,21]),e(b,[2,23]),e(b,[2,24]),e(b,[2,26],{19:[1,30]}),{20:[1,31]},{6:z,7:X,10:32,11:Y},{1:[2,7],6:i,12:21,13:l,14:14,15:p,16:h,17:17,18:18,19:f,22:E},e(q,[2,14],{7:J,11:K}),e(C,[2,8]),e(C,[2,9]),e(C,[2,10]),e(b,[2,15]),e(b,[2,16]),e(b,[2,17]),{20:[1,35]},{21:[1,36]},e(q,[2,13],{7:J,11:K}),e(C,[2,11]),e(C,[2,12]),{21:[1,37]},e(b,[2,25]),e(b,[2,27])],defaultActions:{2:[2,1],6:[2,2]},parseError:c(function(n,t){if(t.recoverable)this.trace(n);else{var o=new Error(n);throw o.hash=t,o}},"parseError"),parse:c(function(n){var t=this,o=[0],a=[],g=[null],s=[],I=this.table,d="",w=0,Q=0,se=2,Z=1,re=s.slice.call(arguments,1),y=Object.create(this.lexer),x={yy:{}};for(var F in this.yy)Object.prototype.hasOwnProperty.call(this.yy,F)&&(x.yy[F]=this.yy[F]);y.setInput(n,x.yy),x.yy.lexer=y,x.yy.parser=this,typeof y.yylloc>"u"&&(y.yylloc={});var B=y.yylloc;s.push(B);var oe=y.options&&y.options.ranges;typeof x.yy.parseError=="function"?this.parseError=x.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ae(S){o.length=o.length-2*S,g.length=g.length-S,s.length=s.length-S}c(ae,"popStack");function ee(){var S;return S=a.pop()||y.lex()||Z,typeof S!="number"&&(S instanceof Array&&(a=S,S=a.pop()),S=t.symbols_[S]||S),S}c(ee,"lex");for(var _,v,D,j,T={},A,N,te,U;;){if(v=o[o.length-1],this.defaultActions[v]?D=this.defaultActions[v]:((_===null||typeof _>"u")&&(_=ee()),D=I[v]&&I[v][_]),typeof D>"u"||!D.length||!D[0]){var G="";U=[];for(A in I[v])this.terminals_[A]&&A>se&&U.push("'"+this.terminals_[A]+"'");y.showPosition?G="Parse error on line "+(w+1)+`: +`+y.showPosition()+` +Expecting `+U.join(", ")+", got '"+(this.terminals_[_]||_)+"'":G="Parse error on line "+(w+1)+": Unexpected "+(_==Z?"end of input":"'"+(this.terminals_[_]||_)+"'"),this.parseError(G,{text:y.match,token:this.terminals_[_]||_,line:y.yylineno,loc:B,expected:U})}if(D[0]instanceof Array&&D.length>1)throw new Error("Parse Error: multiple actions possible at state: "+v+", token: "+_);switch(D[0]){case 1:o.push(_),g.push(y.yytext),s.push(y.yylloc),o.push(D[1]),_=null,Q=y.yyleng,d=y.yytext,w=y.yylineno,B=y.yylloc;break;case 2:if(N=this.productions_[D[1]][1],T.$=g[g.length-N],T._$={first_line:s[s.length-(N||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(N||1)].first_column,last_column:s[s.length-1].last_column},oe&&(T._$.range=[s[s.length-(N||1)].range[0],s[s.length-1].range[1]]),j=this.performAction.apply(T,[d,Q,w,x.yy,D[1],g,s].concat(re)),typeof j<"u")return j;N&&(o=o.slice(0,-1*N*2),g=g.slice(0,-1*N),s=s.slice(0,-1*N)),o.push(this.productions_[D[1]][0]),g.push(T.$),s.push(T._$),te=I[o[o.length-2]][o[o.length-1]],o.push(te);break;case 3:return!0}}return!0},"parse")},ne=(function(){var L={EOF:1,parseError:c(function(t,o){if(this.yy.parser)this.yy.parser.parseError(t,o);else throw new Error(t)},"parseError"),setInput:c(function(n,t){return this.yy=t||this.yy||{},this._input=n,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:c(function(){var n=this._input[0];this.yytext+=n,this.yyleng++,this.offset++,this.match+=n,this.matched+=n;var t=n.match(/(?:\r\n?|\n).*/g);return t?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),n},"input"),unput:c(function(n){var t=n.length,o=n.split(/(?:\r\n?|\n)/g);this._input=n+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var a=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),o.length-1&&(this.yylineno-=o.length-1);var g=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:o?(o.length===a.length?this.yylloc.first_column:0)+a[a.length-o.length].length-o[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[g[0],g[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},"unput"),more:c(function(){return this._more=!0,this},"more"),reject:c(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:c(function(n){this.unput(this.match.slice(n))},"less"),pastInput:c(function(){var n=this.matched.substr(0,this.matched.length-this.match.length);return(n.length>20?"...":"")+n.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:c(function(){var n=this.match;return n.length<20&&(n+=this._input.substr(0,20-n.length)),(n.substr(0,20)+(n.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:c(function(){var n=this.pastInput(),t=new Array(n.length+1).join("-");return n+this.upcomingInput()+` +`+t+"^"},"showPosition"),test_match:c(function(n,t){var o,a,g;if(this.options.backtrack_lexer&&(g={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&&(g.yylloc.range=this.yylloc.range.slice(0))),a=n[0].match(/(?:\r\n?|\n).*/g),a&&(this.yylineno+=a.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:a?a[a.length-1].length-a[a.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+n[0].length},this.yytext+=n[0],this.match+=n[0],this.matches=n,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(n[0].length),this.matched+=n[0],o=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),o)return o;if(this._backtrack){for(var s in g)this[s]=g[s];return!1}return!1},"test_match"),next:c(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var n,t,o,a;this._more||(this.yytext="",this.match="");for(var g=this._currentRules(),s=0;st[0].length)){if(t=o,a=s,this.options.backtrack_lexer){if(n=this.test_match(o,g[s]),n!==!1)return n;if(this._backtrack){t=!1;continue}else return!1}else if(!this.options.flex)break}return t?(n=this.test_match(t,g[a]),n!==!1?n:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:c(function(){var t=this.next();return t||this.lex()},"lex"),begin:c(function(t){this.conditionStack.push(t)},"begin"),popState:c(function(){var t=this.conditionStack.length-1;return t>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:c(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:c(function(t){return t=this.conditionStack.length-1-Math.abs(t||0),t>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:c(function(t){this.begin(t)},"pushState"),stateStackSize:c(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:c(function(t,o,a,g){switch(a){case 0:return t.getLogger().trace("Found comment",o.yytext),6;case 1:return 8;case 2:this.begin("CLASS");break;case 3:return this.popState(),16;case 4:this.popState();break;case 5:t.getLogger().trace("Begin icon"),this.begin("ICON");break;case 6:return t.getLogger().trace("SPACELINE"),6;case 7:return 7;case 8:return 15;case 9:t.getLogger().trace("end icon"),this.popState();break;case 10:return t.getLogger().trace("Exploding node"),this.begin("NODE"),19;case 11:return t.getLogger().trace("Cloud"),this.begin("NODE"),19;case 12:return t.getLogger().trace("Explosion Bang"),this.begin("NODE"),19;case 13:return t.getLogger().trace("Cloud Bang"),this.begin("NODE"),19;case 14:return this.begin("NODE"),19;case 15:return this.begin("NODE"),19;case 16:return this.begin("NODE"),19;case 17:return this.begin("NODE"),19;case 18:return 13;case 19:return 22;case 20:return 11;case 21:this.begin("NSTR2");break;case 22:return"NODE_DESCR";case 23:this.popState();break;case 24:t.getLogger().trace("Starting NSTR"),this.begin("NSTR");break;case 25:return t.getLogger().trace("description:",o.yytext),"NODE_DESCR";case 26:this.popState();break;case 27:return this.popState(),t.getLogger().trace("node end ))"),"NODE_DEND";case 28:return this.popState(),t.getLogger().trace("node end )"),"NODE_DEND";case 29:return this.popState(),t.getLogger().trace("node end ...",o.yytext),"NODE_DEND";case 30:return this.popState(),t.getLogger().trace("node end (("),"NODE_DEND";case 31:return this.popState(),t.getLogger().trace("node end (-"),"NODE_DEND";case 32:return this.popState(),t.getLogger().trace("node end (-"),"NODE_DEND";case 33:return this.popState(),t.getLogger().trace("node end (("),"NODE_DEND";case 34:return this.popState(),t.getLogger().trace("node end (("),"NODE_DEND";case 35:return t.getLogger().trace("Long description:",o.yytext),20;case 36:return t.getLogger().trace("Long description:",o.yytext),20}},"anonymous"),rules:[/^(?:\s*%%.*)/i,/^(?:mindmap\b)/i,/^(?::::)/i,/^(?:.+)/i,/^(?:\n)/i,/^(?:::icon\()/i,/^(?:[\s]+[\n])/i,/^(?:[\n]+)/i,/^(?:[^\)]+)/i,/^(?:\))/i,/^(?:-\))/i,/^(?:\(-)/i,/^(?:\)\))/i,/^(?:\))/i,/^(?:\(\()/i,/^(?:\{\{)/i,/^(?:\()/i,/^(?:\[)/i,/^(?:[\s]+)/i,/^(?:[^\(\[\n\)\{\}]+)/i,/^(?:$)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:[^"]+)/i,/^(?:["])/i,/^(?:[\)]\))/i,/^(?:[\)])/i,/^(?:[\]])/i,/^(?:\}\})/i,/^(?:\(-)/i,/^(?:-\))/i,/^(?:\(\()/i,/^(?:\()/i,/^(?:[^\)\]\(\}]+)/i,/^(?:.+(?!\(\())/i],conditions:{CLASS:{rules:[3,4],inclusive:!1},ICON:{rules:[8,9],inclusive:!1},NSTR2:{rules:[22,23],inclusive:!1},NSTR:{rules:[25,26],inclusive:!1},NODE:{rules:[21,24,27,28,29,30,31,32,33,34,35,36],inclusive:!1},INITIAL:{rules:[0,1,2,5,6,7,10,11,12,13,14,15,16,17,18,19,20],inclusive:!0}}};return L})();V.lexer=ne;function R(){this.yy={}}return c(R,"Parser"),R.prototype=V,V.Parser=R,new R})();W.parser=W;var Se=W,k={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},De=class{constructor(){this.nodes=[],this.count=0,this.elements={},this.getLogger=this.getLogger.bind(this),this.nodeType=k,this.clear(),this.getType=this.getType.bind(this),this.getElementById=this.getElementById.bind(this),this.getParent=this.getParent.bind(this),this.getMindmap=this.getMindmap.bind(this),this.addNode=this.addNode.bind(this),this.decorateNode=this.decorateNode.bind(this)}static{c(this,"MindmapDB")}clear(){this.nodes=[],this.count=0,this.elements={},this.baseLevel=void 0}getParent(e){for(let r=this.nodes.length-1;r>=0;r--)if(this.nodes[r].level0?this.nodes[0]:null}addNode(e,r,i,l){O.info("addNode",e,r,i,l);let p=!1;this.nodes.length===0?(this.baseLevel=e,e=0,p=!0):this.baseLevel!==void 0&&(e=e-this.baseLevel,p=!1);const h=H();let f=h.mindmap?.padding??M.mindmap.padding;switch(l){case this.nodeType.ROUNDED_RECT:case this.nodeType.RECT:case this.nodeType.HEXAGON:f*=2;break}const E={id:this.count++,nodeId:P(r,h),level:e,descr:P(i,h),type:l,children:[],width:h.mindmap?.maxNodeWidth??M.mindmap.maxNodeWidth,padding:f,isRoot:p},u=this.getParent(e);if(u)u.children.push(E),this.nodes.push(E);else if(p)this.nodes.push(E);else throw new Error(`There can be only one root. No parent could be found for ("${E.descr}")`)}getType(e,r){switch(O.debug("In get type",e,r),e){case"[":return this.nodeType.RECT;case"(":return r===")"?this.nodeType.ROUNDED_RECT:this.nodeType.CLOUD;case"((":return this.nodeType.CIRCLE;case")":return this.nodeType.CLOUD;case"))":return this.nodeType.BANG;case"{{":return this.nodeType.HEXAGON;default:return this.nodeType.DEFAULT}}setElementForId(e,r){this.elements[e]=r}getElementById(e){return this.elements[e]}decorateNode(e){if(!e)return;const r=H(),i=this.nodes[this.nodes.length-1];e.icon&&(i.icon=P(e.icon,r)),e.class&&(i.class=P(e.class,r))}type2Str(e){switch(e){case this.nodeType.DEFAULT:return"no-border";case this.nodeType.RECT:return"rect";case this.nodeType.ROUNDED_RECT:return"rounded-rect";case this.nodeType.CIRCLE:return"circle";case this.nodeType.CLOUD:return"cloud";case this.nodeType.BANG:return"bang";case this.nodeType.HEXAGON:return"hexgon";default:return"no-border"}}assignSections(e,r){if(e.level===0?e.section=void 0:e.section=r,e.children)for(const[i,l]of e.children.entries()){const p=e.level===0?i:r;this.assignSections(l,p)}}flattenNodes(e,r){const i=["mindmap-node"];e.isRoot===!0?i.push("section-root","section--1"):e.section!==void 0&&i.push(`section-${e.section}`),e.class&&i.push(e.class);const l=i.join(" "),p=c(f=>{switch(f){case k.CIRCLE:return"mindmapCircle";case k.RECT:return"rect";case k.ROUNDED_RECT:return"rounded";case k.CLOUD:return"cloud";case k.BANG:return"bang";case k.HEXAGON:return"hexagon";case k.DEFAULT:return"defaultMindmapNode";case k.NO_BORDER:default:return"rect"}},"getShapeFromType"),h={id:e.id.toString(),domId:"node_"+e.id.toString(),label:e.descr,isGroup:!1,shape:p(e.type),width:e.width,height:e.height??0,padding:e.padding,cssClasses:l,cssStyles:[],look:"default",icon:e.icon,x:e.x,y:e.y,level:e.level,nodeId:e.nodeId,type:e.type,section:e.section};if(r.push(h),e.children)for(const f of e.children)this.flattenNodes(f,r)}generateEdges(e,r){if(e.children)for(const i of e.children){let l="edge";i.section!==void 0&&(l+=` section-edge-${i.section}`);const p=e.level+1;l+=` edge-depth-${p}`;const h={id:`edge_${e.id}_${i.id}`,start:e.id.toString(),end:i.id.toString(),type:"normal",curve:"basis",thickness:"normal",look:"default",classes:l,depth:e.level,section:i.section};r.push(h),this.generateEdges(i,r)}}getData(){const e=this.getMindmap(),r=H(),l=ge().layout!==void 0,p=r;if(l||(p.layout="cose-bilkent"),!e)return{nodes:[],edges:[],config:p};O.debug("getData: mindmapRoot",e,r),this.assignSections(e);const h=[],f=[];this.flattenNodes(e,h),this.generateEdges(e,f),O.debug(`getData: processed ${h.length} nodes and ${f.length} edges`);const E=new Map;for(const u of h)E.set(u.id,{shape:u.shape,width:u.width,height:u.height,padding:u.padding});return{nodes:h,edges:f,config:p,rootNode:e,markers:["point"],direction:"TB",nodeSpacing:50,rankSpacing:50,shapes:Object.fromEntries(E),type:"mindmap",diagramId:"mindmap-"+be()}}getLogger(){return O}},Ne=c(async(e,r,i,l)=>{O.debug(`Rendering mindmap diagram +`+e);const p=l.db,h=p.getData(),f=ce(r,h.config.securityLevel);h.type=l.type,h.layoutAlgorithm=he(h.config.layout,{fallback:"cose-bilkent"}),h.diagramId=r,p.getMindmap()&&(h.nodes.forEach(u=>{u.shape==="rounded"?(u.radius=15,u.taper=15,u.stroke="none",u.width=0,u.padding=15):u.shape==="circle"?u.padding=10:u.shape==="rect"&&(u.width=0,u.padding=10)}),await de(h,f),le(f,h.config.mindmap?.padding??M.mindmap.padding,"mindmapDiagram",h.config.mindmap?.useMaxWidth??M.mindmap.useMaxWidth))},"draw"),ke={draw:Ne},Le=c(e=>{let r="";for(let i=0;i` + .edge { + stroke-width: 3; + } + ${Le(e)} + .section-root rect, .section-root path, .section-root circle, .section-root polygon { + fill: ${e.git0}; + } + .section-root text { + fill: ${e.gitBranchLabel0}; + } + .section-root span { + color: ${e.gitBranchLabel0}; + } + .section-2 span { + color: ${e.gitBranchLabel0}; + } + .icon-container { + height:100%; + display: flex; + justify-content: center; + align-items: center; + } + .edge { + fill: none; + } + .mindmap-node-label { + dy: 1em; + alignment-baseline: middle; + text-anchor: middle; + dominant-baseline: middle; + text-align: center; + } +`,"getStyles"),ve=xe,Re={get db(){return new De},renderer:ke,parser:Se,styles:ve};export{Re as diagram}; diff --git a/_astro/ordinal.BYWQX77i.js b/_astro/ordinal.BYWQX77i.js new file mode 100644 index 00000000..1f7977b7 --- /dev/null +++ b/_astro/ordinal.BYWQX77i.js @@ -0,0 +1 @@ +import{i as a}from"./init.Gi6I4Gst.js";class o extends Map{constructor(n,t=g){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:t}}),n!=null)for(const[r,s]of n)this.set(r,s)}get(n){return super.get(c(this,n))}has(n){return super.has(c(this,n))}set(n,t){return super.set(l(this,n),t)}delete(n){return super.delete(p(this,n))}}function c({_intern:e,_key:n},t){const r=n(t);return e.has(r)?e.get(r):t}function l({_intern:e,_key:n},t){const r=n(t);return e.has(r)?e.get(r):(e.set(r,t),t)}function p({_intern:e,_key:n},t){const r=n(t);return e.has(r)&&(t=e.get(r),e.delete(r)),t}function g(e){return e!==null&&typeof e=="object"?e.valueOf():e}const f=Symbol("implicit");function h(){var e=new o,n=[],t=[],r=f;function s(u){let i=e.get(u);if(i===void 0){if(r!==f)return r;e.set(u,i=n.push(u)-1)}return t[i%t.length]}return s.domain=function(u){if(!arguments.length)return n.slice();n=[],e=new o;for(const i of u)e.has(i)||e.set(i,n.push(i)-1);return s},s.range=function(u){return arguments.length?(t=Array.from(u),s):t.slice()},s.unknown=function(u){return arguments.length?(r=u,s):r},s.copy=function(){return h(n,t).unknown(r)},a.apply(s,arguments),s}export{h as o}; diff --git a/_astro/page._rMDHl_T.js b/_astro/page._rMDHl_T.js new file mode 100644 index 00000000..64e86170 --- /dev/null +++ b/_astro/page._rMDHl_T.js @@ -0,0 +1,79 @@ +const k="modulepreload",y=function(n){return"/"+n},g={},v=function(c,d,u){let l=Promise.resolve();if(d&&d.length>0){let r=function(t){return Promise.all(t.map(a=>Promise.resolve(a).then(m=>({status:"fulfilled",value:m}),m=>({status:"rejected",reason:m}))))};document.getElementsByTagName("link");const e=document.querySelector("meta[property=csp-nonce]"),i=e?.nonce||e?.getAttribute("nonce");l=r(d.map(t=>{if(t=y(t),t in g)return;g[t]=!0;const a=t.endsWith(".css"),m=a?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${t}"]${m}`))return;const s=document.createElement("link");if(s.rel=a?"stylesheet":k,a||(s.as="script"),s.crossOrigin="",s.href=t,i&&s.setAttribute("nonce",i),document.head.appendChild(s),a)return new Promise((p,b)=>{s.addEventListener("load",p),s.addEventListener("error",()=>b(new Error(`Unable to preload CSS for ${t}`)))})}))}function o(r){const e=new Event("vite:preloadError",{cancelable:!0});if(e.payload=r,window.dispatchEvent(e),!e.defaultPrevented)throw r}return l.then(r=>{for(const e of r||[])e.status==="rejected"&&o(e.reason);return c().catch(o)})},h=()=>document.querySelectorAll("pre.mermaid").length>0;h()?(console.log("[astro-mermaid] Mermaid diagrams detected, loading mermaid.js..."),v(()=>import("./mermaid.core.LbQlJBBQ.js").then(n=>n.bB),[]).then(async({default:n})=>{const c=[];if(c&&c.length>0){console.log("[astro-mermaid] Registering",c.length,"icon packs");const o=c.map(r=>({name:r.name,loader:new Function("return "+r.loader)()}));await n.registerIconPacks(o)}const d={startOnLoad:!1,theme:"default"},u={light:"default",dark:"dark"};async function l(){console.log("[astro-mermaid] Initializing mermaid diagrams...");const o=document.querySelectorAll("pre.mermaid");if(console.log("[astro-mermaid] Found",o.length,"mermaid diagrams"),o.length===0)return;let r=d.theme;{const e=document.documentElement.getAttribute("data-theme"),i=document.body.getAttribute("data-theme");r=u[e||i]||d.theme,console.log("[astro-mermaid] Using theme:",r,"from",e?"html":"body")}n.initialize({...d,theme:r,gitGraph:{mainBranchName:"main",showCommitLabel:!0,showBranches:!0,rotateCommitLabel:!0}});for(const e of o){if(e.hasAttribute("data-processed"))continue;e.hasAttribute("data-diagram")||e.setAttribute("data-diagram",e.textContent||"");const i=e.getAttribute("data-diagram")||"",t="mermaid-"+Math.random().toString(36).slice(2,11);console.log("[astro-mermaid] Rendering diagram:",t);try{const a=document.getElementById(t);a&&a.remove();const{svg:m}=await n.render(t,i);e.innerHTML=m,e.setAttribute("data-processed","true"),console.log("[astro-mermaid] Successfully rendered diagram:",t)}catch(a){console.error("[astro-mermaid] Mermaid rendering error for diagram:",t,a),e.innerHTML=`
    + Error rendering diagram:
    + ${a.message||"Unknown error"} +
    `,e.setAttribute("data-processed","true")}}}l();{const o=new MutationObserver(r=>{for(const e of r)e.type==="attributes"&&e.attributeName==="data-theme"&&(document.querySelectorAll("pre.mermaid[data-processed]").forEach(i=>{i.removeAttribute("data-processed")}),l())});o.observe(document.documentElement,{attributes:!0,attributeFilter:["data-theme"]}),o.observe(document.body,{attributes:!0,attributeFilter:["data-theme"]})}document.addEventListener("astro:after-swap",()=>{h()&&l()})}).catch(n=>{console.error("[astro-mermaid] Failed to load mermaid:",n)})):console.log("[astro-mermaid] No mermaid diagrams found on this page, skipping mermaid.js load");const f=document.createElement("style");f.textContent=` + /* Prevent layout shifts by setting minimum height */ + pre.mermaid { + display: flex; + justify-content: center; + align-items: center; + margin: 2rem 0; + padding: 1rem; + background-color: transparent; + border: none; + overflow: auto; + min-height: 200px; /* Prevent layout shift */ + position: relative; + } + + /* Loading state with skeleton loader */ + pre.mermaid:not([data-processed]) { + background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%); + background-size: 200% 100%; + animation: shimmer 1.5s infinite; + } + + /* Dark mode skeleton loader */ + [data-theme="dark"] pre.mermaid:not([data-processed]) { + background: linear-gradient(90deg, #2a2a2a 25%, #3a3a3a 50%, #2a2a2a 75%); + background-size: 200% 100%; + } + + @keyframes shimmer { + 0% { + background-position: -200% 0; + } + 100% { + background-position: 200% 0; + } + } + + /* Show processed diagrams with smooth transition */ + pre.mermaid[data-processed] { + animation: none; + background: transparent; + min-height: auto; /* Allow natural height after render */ + } + + /* Ensure responsive sizing for mermaid SVGs */ + pre.mermaid svg { + max-width: 100%; + height: auto; + } + + /* Optional: Add subtle background for better visibility */ + @media (prefers-color-scheme: dark) { + pre.mermaid[data-processed] { + background-color: rgba(255, 255, 255, 0.02); + border-radius: 0.5rem; + } + } + + @media (prefers-color-scheme: light) { + pre.mermaid[data-processed] { + background-color: rgba(0, 0, 0, 0.02); + border-radius: 0.5rem; + } + } + + /* Respect user's color scheme preference */ + [data-theme="dark"] pre.mermaid[data-processed] { + background-color: rgba(255, 255, 255, 0.02); + border-radius: 0.5rem; + } + + [data-theme="light"] pre.mermaid[data-processed] { + background-color: rgba(0, 0, 0, 0.02); + border-radius: 0.5rem; + } + `;document.head.appendChild(f);export{v as _}; diff --git a/_astro/pieDiagram-ADFJNKIX.DGAq4_qk.js b/_astro/pieDiagram-ADFJNKIX.DGAq4_qk.js new file mode 100644 index 00000000..e81f98e7 --- /dev/null +++ b/_astro/pieDiagram-ADFJNKIX.DGAq4_qk.js @@ -0,0 +1,30 @@ +import{a4 as S,a7 as F,aB as j,_ as p,g as q,s as H,a as Z,b as J,q as K,p as Q,l as z,c as X,D as Y,H as ee,N as te,e as ae,y as re,F as ne}from"./mermaid.core.LbQlJBBQ.js";import{p as ie}from"./chunk-4BX2VUAB.CV908Kae.js";import{p as se}from"./treemap-KMMF4GRG.BHoxrBMR.js";import{d as I}from"./arc.DI4loXX0.js";import{o as le}from"./ordinal.BYWQX77i.js";import"./page._rMDHl_T.js";import"./min.D5TVP8RA.js";import"./_baseUniq.CLojSEzq.js";import"./init.Gi6I4Gst.js";function oe(e,a){return ae?1:a>=e?0:NaN}function ce(e){return e}function ue(){var e=ce,a=oe,f=null,y=S(0),s=S(F),o=S(0);function l(t){var n,c=(t=j(t)).length,d,x,h=0,u=new Array(c),i=new Array(c),v=+y.apply(this,arguments),w=Math.min(F,Math.max(-F,s.apply(this,arguments)-v)),m,C=Math.min(Math.abs(w)/c,o.apply(this,arguments)),$=C*(w<0?-1:1),g;for(n=0;n0&&(h+=g);for(a!=null?u.sort(function(A,D){return a(i[A],i[D])}):f!=null&&u.sort(function(A,D){return f(t[A],t[D])}),n=0,x=h?(w-c*$)/h:0;n0?g*x:0)+$,i[d]={data:t[d],index:n,value:g,startAngle:v,endAngle:m,padAngle:C};return i}return l.value=function(t){return arguments.length?(e=typeof t=="function"?t:S(+t),l):e},l.sortValues=function(t){return arguments.length?(a=t,f=null,l):a},l.sort=function(t){return arguments.length?(f=t,a=null,l):f},l.startAngle=function(t){return arguments.length?(y=typeof t=="function"?t:S(+t),l):y},l.endAngle=function(t){return arguments.length?(s=typeof t=="function"?t:S(+t),l):s},l.padAngle=function(t){return arguments.length?(o=typeof t=="function"?t:S(+t),l):o},l}var pe=ne.pie,N={sections:new Map,showData:!1},T=N.sections,G=N.showData,de=structuredClone(pe),ge=p(()=>structuredClone(de),"getConfig"),fe=p(()=>{T=new Map,G=N.showData,re()},"clear"),me=p(({label:e,value:a})=>{if(a<0)throw new Error(`"${e}" has invalid value: ${a}. Negative values are not allowed in pie charts. All slice values must be >= 0.`);T.has(e)||(T.set(e,a),z.debug(`added new section: ${e}, with value: ${a}`))},"addSection"),he=p(()=>T,"getSections"),ve=p(e=>{G=e},"setShowData"),Se=p(()=>G,"getShowData"),L={getConfig:ge,clear:fe,setDiagramTitle:Q,getDiagramTitle:K,setAccTitle:J,getAccTitle:Z,setAccDescription:H,getAccDescription:q,addSection:me,getSections:he,setShowData:ve,getShowData:Se},ye=p((e,a)=>{ie(e,a),a.setShowData(e.showData),e.sections.map(a.addSection)},"populateDb"),xe={parse:p(async e=>{const a=await se("pie",e);z.debug(a),ye(a,L)},"parse")},we=p(e=>` + .pieCircle{ + stroke: ${e.pieStrokeColor}; + stroke-width : ${e.pieStrokeWidth}; + opacity : ${e.pieOpacity}; + } + .pieOuterCircle{ + stroke: ${e.pieOuterStrokeColor}; + stroke-width: ${e.pieOuterStrokeWidth}; + fill: none; + } + .pieTitleText { + text-anchor: middle; + font-size: ${e.pieTitleTextSize}; + fill: ${e.pieTitleTextColor}; + font-family: ${e.fontFamily}; + } + .slice { + font-family: ${e.fontFamily}; + fill: ${e.pieSectionTextColor}; + font-size:${e.pieSectionTextSize}; + // fill: white; + } + .legend text { + fill: ${e.pieLegendTextColor}; + font-family: ${e.fontFamily}; + font-size: ${e.pieLegendTextSize}; + } +`,"getStyles"),Ae=we,De=p(e=>{const a=[...e.values()].reduce((s,o)=>s+o,0),f=[...e.entries()].map(([s,o])=>({label:s,value:o})).filter(s=>s.value/a*100>=1).sort((s,o)=>o.value-s.value);return ue().value(s=>s.value)(f)},"createPieArcs"),Ce=p((e,a,f,y)=>{z.debug(`rendering pie chart +`+e);const s=y.db,o=X(),l=Y(s.getConfig(),o.pie),t=40,n=18,c=4,d=450,x=d,h=ee(a),u=h.append("g");u.attr("transform","translate("+x/2+","+d/2+")");const{themeVariables:i}=o;let[v]=te(i.pieOuterStrokeWidth);v??=2;const w=l.textPosition,m=Math.min(x,d)/2-t,C=I().innerRadius(0).outerRadius(m),$=I().innerRadius(m*w).outerRadius(m*w);u.append("circle").attr("cx",0).attr("cy",0).attr("r",m+v/2).attr("class","pieOuterCircle");const g=s.getSections(),A=De(g),D=[i.pie1,i.pie2,i.pie3,i.pie4,i.pie5,i.pie6,i.pie7,i.pie8,i.pie9,i.pie10,i.pie11,i.pie12];let b=0;g.forEach(r=>{b+=r});const W=A.filter(r=>(r.data.value/b*100).toFixed(0)!=="0"),E=le(D);u.selectAll("mySlices").data(W).enter().append("path").attr("d",C).attr("fill",r=>E(r.data.label)).attr("class","pieCircle"),u.selectAll("mySlices").data(W).enter().append("text").text(r=>(r.data.value/b*100).toFixed(0)+"%").attr("transform",r=>"translate("+$.centroid(r)+")").style("text-anchor","middle").attr("class","slice"),u.append("text").text(s.getDiagramTitle()).attr("x",0).attr("y",-400/2).attr("class","pieTitleText");const O=[...g.entries()].map(([r,M])=>({label:r,value:M})),k=u.selectAll(".legend").data(O).enter().append("g").attr("class","legend").attr("transform",(r,M)=>{const R=n+c,B=R*O.length/2,V=12*n,U=M*R-B;return"translate("+V+","+U+")"});k.append("rect").attr("width",n).attr("height",n).style("fill",r=>E(r.label)).style("stroke",r=>E(r.label)),k.append("text").attr("x",n+c).attr("y",n-c).text(r=>s.getShowData()?`${r.label} [${r.value}]`:r.label);const _=Math.max(...k.selectAll("text").nodes().map(r=>r?.getBoundingClientRect().width??0)),P=x+t+n+c+_;h.attr("viewBox",`0 0 ${P} ${d}`),ae(h,d,P,l.useMaxWidth)},"draw"),$e={draw:Ce},We={parser:xe,db:L,renderer:$e,styles:Ae};export{We as diagram}; diff --git a/_astro/quadrantDiagram-AYHSOK5B.C9eleybL.js b/_astro/quadrantDiagram-AYHSOK5B.C9eleybL.js new file mode 100644 index 00000000..ec94305a --- /dev/null +++ b/_astro/quadrantDiagram-AYHSOK5B.C9eleybL.js @@ -0,0 +1,7 @@ +import{_ as r,s as be,g as Se,q as te,p as _e,a as Ae,b as ke,c as Et,l as qt,d as vt,e as Fe,y as Pe,F as D,K as ve,i as Ce}from"./mermaid.core.LbQlJBBQ.js";import{l as $t}from"./linear.B94hpPI-.js";import"./page._rMDHl_T.js";import"./init.Gi6I4Gst.js";import"./defaultLocale.C4B-KCzX.js";var Ct=(function(){var t=r(function(M,s,l,u){for(l=l||{},u=M.length;u--;l[M[u]]=s);return l},"o"),a=[1,3],p=[1,4],f=[1,5],o=[1,6],x=[1,7],_=[1,4,5,10,12,13,14,18,25,35,37,39,41,42,48,50,51,52,53,54,55,56,57,60,61,63,64,65,66,67],h=[1,4,5,10,12,13,14,18,25,28,35,37,39,41,42,48,50,51,52,53,54,55,56,57,60,61,63,64,65,66,67],c=[55,56,57],S=[2,36],m=[1,37],b=[1,36],y=[1,38],T=[1,35],q=[1,43],g=[1,41],rt=[1,14],ct=[1,23],dt=[1,18],ut=[1,19],xt=[1,20],ot=[1,21],bt=[1,22],lt=[1,24],i=[1,25],Dt=[1,26],zt=[1,27],Vt=[1,28],It=[1,29],W=[1,32],U=[1,33],k=[1,34],F=[1,39],P=[1,40],v=[1,42],C=[1,44],O=[1,62],H=[1,61],L=[4,5,8,10,12,13,14,18,44,47,49,55,56,57,63,64,65,66,67],wt=[1,65],Bt=[1,66],Rt=[1,67],Nt=[1,68],Wt=[1,69],Ut=[1,70],Qt=[1,71],Ot=[1,72],Ht=[1,73],Xt=[1,74],Mt=[1,75],Yt=[1,76],I=[4,5,6,7,8,9,10,11,12,13,14,15,18],G=[1,90],K=[1,91],Z=[1,92],J=[1,99],$=[1,93],tt=[1,96],et=[1,94],it=[1,95],at=[1,97],nt=[1,98],St=[1,102],jt=[10,55,56,57],R=[4,5,6,8,10,11,13,17,18,19,20,55,56,57],_t={trace:r(function(){},"trace"),yy:{},symbols_:{error:2,idStringToken:3,ALPHA:4,NUM:5,NODE_STRING:6,DOWN:7,MINUS:8,DEFAULT:9,COMMA:10,COLON:11,AMP:12,BRKT:13,MULT:14,UNICODE_TEXT:15,styleComponent:16,UNIT:17,SPACE:18,STYLE:19,PCT:20,idString:21,style:22,stylesOpt:23,classDefStatement:24,CLASSDEF:25,start:26,eol:27,QUADRANT:28,document:29,line:30,statement:31,axisDetails:32,quadrantDetails:33,points:34,title:35,title_value:36,acc_title:37,acc_title_value:38,acc_descr:39,acc_descr_value:40,acc_descr_multiline_value:41,section:42,text:43,point_start:44,point_x:45,point_y:46,class_name:47,"X-AXIS":48,"AXIS-TEXT-DELIMITER":49,"Y-AXIS":50,QUADRANT_1:51,QUADRANT_2:52,QUADRANT_3:53,QUADRANT_4:54,NEWLINE:55,SEMI:56,EOF:57,alphaNumToken:58,textNoTagsToken:59,STR:60,MD_STR:61,alphaNum:62,PUNCTUATION:63,PLUS:64,EQUALS:65,DOT:66,UNDERSCORE:67,$accept:0,$end:1},terminals_:{2:"error",4:"ALPHA",5:"NUM",6:"NODE_STRING",7:"DOWN",8:"MINUS",9:"DEFAULT",10:"COMMA",11:"COLON",12:"AMP",13:"BRKT",14:"MULT",15:"UNICODE_TEXT",17:"UNIT",18:"SPACE",19:"STYLE",20:"PCT",25:"CLASSDEF",28:"QUADRANT",35:"title",36:"title_value",37:"acc_title",38:"acc_title_value",39:"acc_descr",40:"acc_descr_value",41:"acc_descr_multiline_value",42:"section",44:"point_start",45:"point_x",46:"point_y",47:"class_name",48:"X-AXIS",49:"AXIS-TEXT-DELIMITER",50:"Y-AXIS",51:"QUADRANT_1",52:"QUADRANT_2",53:"QUADRANT_3",54:"QUADRANT_4",55:"NEWLINE",56:"SEMI",57:"EOF",60:"STR",61:"MD_STR",63:"PUNCTUATION",64:"PLUS",65:"EQUALS",66:"DOT",67:"UNDERSCORE"},productions_:[0,[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[21,1],[21,2],[22,1],[22,2],[23,1],[23,3],[24,5],[26,2],[26,2],[26,2],[29,0],[29,2],[30,2],[31,0],[31,1],[31,2],[31,1],[31,1],[31,1],[31,2],[31,2],[31,2],[31,1],[31,1],[34,4],[34,5],[34,5],[34,6],[32,4],[32,3],[32,2],[32,4],[32,3],[32,2],[33,2],[33,2],[33,2],[33,2],[27,1],[27,1],[27,1],[43,1],[43,2],[43,1],[43,1],[62,1],[62,2],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[59,1],[59,1],[59,1]],performAction:r(function(s,l,u,d,A,e,ht){var n=e.length-1;switch(A){case 23:this.$=e[n];break;case 24:this.$=e[n-1]+""+e[n];break;case 26:this.$=e[n-1]+e[n];break;case 27:this.$=[e[n].trim()];break;case 28:e[n-2].push(e[n].trim()),this.$=e[n-2];break;case 29:this.$=e[n-4],d.addClass(e[n-2],e[n]);break;case 37:this.$=[];break;case 42:this.$=e[n].trim(),d.setDiagramTitle(this.$);break;case 43:this.$=e[n].trim(),d.setAccTitle(this.$);break;case 44:case 45:this.$=e[n].trim(),d.setAccDescription(this.$);break;case 46:d.addSection(e[n].substr(8)),this.$=e[n].substr(8);break;case 47:d.addPoint(e[n-3],"",e[n-1],e[n],[]);break;case 48:d.addPoint(e[n-4],e[n-3],e[n-1],e[n],[]);break;case 49:d.addPoint(e[n-4],"",e[n-2],e[n-1],e[n]);break;case 50:d.addPoint(e[n-5],e[n-4],e[n-2],e[n-1],e[n]);break;case 51:d.setXAxisLeftText(e[n-2]),d.setXAxisRightText(e[n]);break;case 52:e[n-1].text+=" ⟶ ",d.setXAxisLeftText(e[n-1]);break;case 53:d.setXAxisLeftText(e[n]);break;case 54:d.setYAxisBottomText(e[n-2]),d.setYAxisTopText(e[n]);break;case 55:e[n-1].text+=" ⟶ ",d.setYAxisBottomText(e[n-1]);break;case 56:d.setYAxisBottomText(e[n]);break;case 57:d.setQuadrant1Text(e[n]);break;case 58:d.setQuadrant2Text(e[n]);break;case 59:d.setQuadrant3Text(e[n]);break;case 60:d.setQuadrant4Text(e[n]);break;case 64:this.$={text:e[n],type:"text"};break;case 65:this.$={text:e[n-1].text+""+e[n],type:e[n-1].type};break;case 66:this.$={text:e[n],type:"text"};break;case 67:this.$={text:e[n],type:"markdown"};break;case 68:this.$=e[n];break;case 69:this.$=e[n-1]+""+e[n];break}},"anonymous"),table:[{18:a,26:1,27:2,28:p,55:f,56:o,57:x},{1:[3]},{18:a,26:8,27:2,28:p,55:f,56:o,57:x},{18:a,26:9,27:2,28:p,55:f,56:o,57:x},t(_,[2,33],{29:10}),t(h,[2,61]),t(h,[2,62]),t(h,[2,63]),{1:[2,30]},{1:[2,31]},t(c,S,{30:11,31:12,24:13,32:15,33:16,34:17,43:30,58:31,1:[2,32],4:m,5:b,10:y,12:T,13:q,14:g,18:rt,25:ct,35:dt,37:ut,39:xt,41:ot,42:bt,48:lt,50:i,51:Dt,52:zt,53:Vt,54:It,60:W,61:U,63:k,64:F,65:P,66:v,67:C}),t(_,[2,34]),{27:45,55:f,56:o,57:x},t(c,[2,37]),t(c,S,{24:13,32:15,33:16,34:17,43:30,58:31,31:46,4:m,5:b,10:y,12:T,13:q,14:g,18:rt,25:ct,35:dt,37:ut,39:xt,41:ot,42:bt,48:lt,50:i,51:Dt,52:zt,53:Vt,54:It,60:W,61:U,63:k,64:F,65:P,66:v,67:C}),t(c,[2,39]),t(c,[2,40]),t(c,[2,41]),{36:[1,47]},{38:[1,48]},{40:[1,49]},t(c,[2,45]),t(c,[2,46]),{18:[1,50]},{4:m,5:b,10:y,12:T,13:q,14:g,43:51,58:31,60:W,61:U,63:k,64:F,65:P,66:v,67:C},{4:m,5:b,10:y,12:T,13:q,14:g,43:52,58:31,60:W,61:U,63:k,64:F,65:P,66:v,67:C},{4:m,5:b,10:y,12:T,13:q,14:g,43:53,58:31,60:W,61:U,63:k,64:F,65:P,66:v,67:C},{4:m,5:b,10:y,12:T,13:q,14:g,43:54,58:31,60:W,61:U,63:k,64:F,65:P,66:v,67:C},{4:m,5:b,10:y,12:T,13:q,14:g,43:55,58:31,60:W,61:U,63:k,64:F,65:P,66:v,67:C},{4:m,5:b,10:y,12:T,13:q,14:g,43:56,58:31,60:W,61:U,63:k,64:F,65:P,66:v,67:C},{4:m,5:b,8:O,10:y,12:T,13:q,14:g,18:H,44:[1,57],47:[1,58],58:60,59:59,63:k,64:F,65:P,66:v,67:C},t(L,[2,64]),t(L,[2,66]),t(L,[2,67]),t(L,[2,70]),t(L,[2,71]),t(L,[2,72]),t(L,[2,73]),t(L,[2,74]),t(L,[2,75]),t(L,[2,76]),t(L,[2,77]),t(L,[2,78]),t(L,[2,79]),t(L,[2,80]),t(_,[2,35]),t(c,[2,38]),t(c,[2,42]),t(c,[2,43]),t(c,[2,44]),{3:64,4:wt,5:Bt,6:Rt,7:Nt,8:Wt,9:Ut,10:Qt,11:Ot,12:Ht,13:Xt,14:Mt,15:Yt,21:63},t(c,[2,53],{59:59,58:60,4:m,5:b,8:O,10:y,12:T,13:q,14:g,18:H,49:[1,77],63:k,64:F,65:P,66:v,67:C}),t(c,[2,56],{59:59,58:60,4:m,5:b,8:O,10:y,12:T,13:q,14:g,18:H,49:[1,78],63:k,64:F,65:P,66:v,67:C}),t(c,[2,57],{59:59,58:60,4:m,5:b,8:O,10:y,12:T,13:q,14:g,18:H,63:k,64:F,65:P,66:v,67:C}),t(c,[2,58],{59:59,58:60,4:m,5:b,8:O,10:y,12:T,13:q,14:g,18:H,63:k,64:F,65:P,66:v,67:C}),t(c,[2,59],{59:59,58:60,4:m,5:b,8:O,10:y,12:T,13:q,14:g,18:H,63:k,64:F,65:P,66:v,67:C}),t(c,[2,60],{59:59,58:60,4:m,5:b,8:O,10:y,12:T,13:q,14:g,18:H,63:k,64:F,65:P,66:v,67:C}),{45:[1,79]},{44:[1,80]},t(L,[2,65]),t(L,[2,81]),t(L,[2,82]),t(L,[2,83]),{3:82,4:wt,5:Bt,6:Rt,7:Nt,8:Wt,9:Ut,10:Qt,11:Ot,12:Ht,13:Xt,14:Mt,15:Yt,18:[1,81]},t(I,[2,23]),t(I,[2,1]),t(I,[2,2]),t(I,[2,3]),t(I,[2,4]),t(I,[2,5]),t(I,[2,6]),t(I,[2,7]),t(I,[2,8]),t(I,[2,9]),t(I,[2,10]),t(I,[2,11]),t(I,[2,12]),t(c,[2,52],{58:31,43:83,4:m,5:b,10:y,12:T,13:q,14:g,60:W,61:U,63:k,64:F,65:P,66:v,67:C}),t(c,[2,55],{58:31,43:84,4:m,5:b,10:y,12:T,13:q,14:g,60:W,61:U,63:k,64:F,65:P,66:v,67:C}),{46:[1,85]},{45:[1,86]},{4:G,5:K,6:Z,8:J,11:$,13:tt,16:89,17:et,18:it,19:at,20:nt,22:88,23:87},t(I,[2,24]),t(c,[2,51],{59:59,58:60,4:m,5:b,8:O,10:y,12:T,13:q,14:g,18:H,63:k,64:F,65:P,66:v,67:C}),t(c,[2,54],{59:59,58:60,4:m,5:b,8:O,10:y,12:T,13:q,14:g,18:H,63:k,64:F,65:P,66:v,67:C}),t(c,[2,47],{22:88,16:89,23:100,4:G,5:K,6:Z,8:J,11:$,13:tt,17:et,18:it,19:at,20:nt}),{46:[1,101]},t(c,[2,29],{10:St}),t(jt,[2,27],{16:103,4:G,5:K,6:Z,8:J,11:$,13:tt,17:et,18:it,19:at,20:nt}),t(R,[2,25]),t(R,[2,13]),t(R,[2,14]),t(R,[2,15]),t(R,[2,16]),t(R,[2,17]),t(R,[2,18]),t(R,[2,19]),t(R,[2,20]),t(R,[2,21]),t(R,[2,22]),t(c,[2,49],{10:St}),t(c,[2,48],{22:88,16:89,23:104,4:G,5:K,6:Z,8:J,11:$,13:tt,17:et,18:it,19:at,20:nt}),{4:G,5:K,6:Z,8:J,11:$,13:tt,16:89,17:et,18:it,19:at,20:nt,22:105},t(R,[2,26]),t(c,[2,50],{10:St}),t(jt,[2,28],{16:103,4:G,5:K,6:Z,8:J,11:$,13:tt,17:et,18:it,19:at,20:nt})],defaultActions:{8:[2,30],9:[2,31]},parseError:r(function(s,l){if(l.recoverable)this.trace(s);else{var u=new Error(s);throw u.hash=l,u}},"parseError"),parse:r(function(s){var l=this,u=[0],d=[],A=[null],e=[],ht=this.table,n="",gt=0,Gt=0,ye=2,Kt=1,Te=e.slice.call(arguments,1),E=Object.create(this.lexer),Y={yy:{}};for(var At in this.yy)Object.prototype.hasOwnProperty.call(this.yy,At)&&(Y.yy[At]=this.yy[At]);E.setInput(s,Y.yy),Y.yy.lexer=E,Y.yy.parser=this,typeof E.yylloc>"u"&&(E.yylloc={});var kt=E.yylloc;e.push(kt);var qe=E.options&&E.options.ranges;typeof Y.yy.parseError=="function"?this.parseError=Y.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function me(B){u.length=u.length-2*B,A.length=A.length-B,e.length=e.length-B}r(me,"popStack");function Zt(){var B;return B=d.pop()||E.lex()||Kt,typeof B!="number"&&(B instanceof Array&&(d=B,B=d.pop()),B=l.symbols_[B]||B),B}r(Zt,"lex");for(var w,j,N,Ft,st={},pt,X,Jt,yt;;){if(j=u[u.length-1],this.defaultActions[j]?N=this.defaultActions[j]:((w===null||typeof w>"u")&&(w=Zt()),N=ht[j]&&ht[j][w]),typeof N>"u"||!N.length||!N[0]){var Pt="";yt=[];for(pt in ht[j])this.terminals_[pt]&&pt>ye&&yt.push("'"+this.terminals_[pt]+"'");E.showPosition?Pt="Parse error on line "+(gt+1)+`: +`+E.showPosition()+` +Expecting `+yt.join(", ")+", got '"+(this.terminals_[w]||w)+"'":Pt="Parse error on line "+(gt+1)+": Unexpected "+(w==Kt?"end of input":"'"+(this.terminals_[w]||w)+"'"),this.parseError(Pt,{text:E.match,token:this.terminals_[w]||w,line:E.yylineno,loc:kt,expected:yt})}if(N[0]instanceof Array&&N.length>1)throw new Error("Parse Error: multiple actions possible at state: "+j+", token: "+w);switch(N[0]){case 1:u.push(w),A.push(E.yytext),e.push(E.yylloc),u.push(N[1]),w=null,Gt=E.yyleng,n=E.yytext,gt=E.yylineno,kt=E.yylloc;break;case 2:if(X=this.productions_[N[1]][1],st.$=A[A.length-X],st._$={first_line:e[e.length-(X||1)].first_line,last_line:e[e.length-1].last_line,first_column:e[e.length-(X||1)].first_column,last_column:e[e.length-1].last_column},qe&&(st._$.range=[e[e.length-(X||1)].range[0],e[e.length-1].range[1]]),Ft=this.performAction.apply(st,[n,Gt,gt,Y.yy,N[1],A,e].concat(Te)),typeof Ft<"u")return Ft;X&&(u=u.slice(0,-1*X*2),A=A.slice(0,-1*X),e=e.slice(0,-1*X)),u.push(this.productions_[N[1]][0]),A.push(st.$),e.push(st._$),Jt=ht[u[u.length-2]][u[u.length-1]],u.push(Jt);break;case 3:return!0}}return!0},"parse")},pe=(function(){var M={EOF:1,parseError:r(function(l,u){if(this.yy.parser)this.yy.parser.parseError(l,u);else throw new Error(l)},"parseError"),setInput:r(function(s,l){return this.yy=l||this.yy||{},this._input=s,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:r(function(){var s=this._input[0];this.yytext+=s,this.yyleng++,this.offset++,this.match+=s,this.matched+=s;var l=s.match(/(?:\r\n?|\n).*/g);return l?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),s},"input"),unput:r(function(s){var l=s.length,u=s.split(/(?:\r\n?|\n)/g);this._input=s+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-l),this.offset-=l;var d=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),u.length-1&&(this.yylineno-=u.length-1);var A=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:u?(u.length===d.length?this.yylloc.first_column:0)+d[d.length-u.length].length-u[0].length:this.yylloc.first_column-l},this.options.ranges&&(this.yylloc.range=[A[0],A[0]+this.yyleng-l]),this.yyleng=this.yytext.length,this},"unput"),more:r(function(){return this._more=!0,this},"more"),reject:r(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:r(function(s){this.unput(this.match.slice(s))},"less"),pastInput:r(function(){var s=this.matched.substr(0,this.matched.length-this.match.length);return(s.length>20?"...":"")+s.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:r(function(){var s=this.match;return s.length<20&&(s+=this._input.substr(0,20-s.length)),(s.substr(0,20)+(s.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:r(function(){var s=this.pastInput(),l=new Array(s.length+1).join("-");return s+this.upcomingInput()+` +`+l+"^"},"showPosition"),test_match:r(function(s,l){var u,d,A;if(this.options.backtrack_lexer&&(A={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&&(A.yylloc.range=this.yylloc.range.slice(0))),d=s[0].match(/(?:\r\n?|\n).*/g),d&&(this.yylineno+=d.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:d?d[d.length-1].length-d[d.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+s[0].length},this.yytext+=s[0],this.match+=s[0],this.matches=s,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(s[0].length),this.matched+=s[0],u=this.performAction.call(this,this.yy,this,l,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),u)return u;if(this._backtrack){for(var e in A)this[e]=A[e];return!1}return!1},"test_match"),next:r(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var s,l,u,d;this._more||(this.yytext="",this.match="");for(var A=this._currentRules(),e=0;el[0].length)){if(l=u,d=e,this.options.backtrack_lexer){if(s=this.test_match(u,A[e]),s!==!1)return s;if(this._backtrack){l=!1;continue}else return!1}else if(!this.options.flex)break}return l?(s=this.test_match(l,A[d]),s!==!1?s:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:r(function(){var l=this.next();return l||this.lex()},"lex"),begin:r(function(l){this.conditionStack.push(l)},"begin"),popState:r(function(){var l=this.conditionStack.length-1;return l>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:r(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:r(function(l){return l=this.conditionStack.length-1-Math.abs(l||0),l>=0?this.conditionStack[l]:"INITIAL"},"topState"),pushState:r(function(l){this.begin(l)},"pushState"),stateStackSize:r(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:r(function(l,u,d,A){switch(d){case 0:break;case 1:break;case 2:return 55;case 3:break;case 4:return this.begin("title"),35;case 5:return this.popState(),"title_value";case 6:return this.begin("acc_title"),37;case 7:return this.popState(),"acc_title_value";case 8:return this.begin("acc_descr"),39;case 9:return this.popState(),"acc_descr_value";case 10:this.begin("acc_descr_multiline");break;case 11:this.popState();break;case 12:return"acc_descr_multiline_value";case 13:return 48;case 14:return 50;case 15:return 49;case 16:return 51;case 17:return 52;case 18:return 53;case 19:return 54;case 20:return 25;case 21:this.begin("md_string");break;case 22:return"MD_STR";case 23:this.popState();break;case 24:this.begin("string");break;case 25:this.popState();break;case 26:return"STR";case 27:this.begin("class_name");break;case 28:return this.popState(),47;case 29:return this.begin("point_start"),44;case 30:return this.begin("point_x"),45;case 31:this.popState();break;case 32:this.popState(),this.begin("point_y");break;case 33:return this.popState(),46;case 34:return 28;case 35:return 4;case 36:return 11;case 37:return 64;case 38:return 10;case 39:return 65;case 40:return 65;case 41:return 14;case 42:return 13;case 43:return 67;case 44:return 66;case 45:return 12;case 46:return 8;case 47:return 5;case 48:return 18;case 49:return 56;case 50:return 63;case 51:return 57}},"anonymous"),rules:[/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:title\b)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?: *x-axis *)/i,/^(?: *y-axis *)/i,/^(?: *--+> *)/i,/^(?: *quadrant-1 *)/i,/^(?: *quadrant-2 *)/i,/^(?: *quadrant-3 *)/i,/^(?: *quadrant-4 *)/i,/^(?:classDef\b)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?::::)/i,/^(?:^\w+)/i,/^(?:\s*:\s*\[\s*)/i,/^(?:(1)|(0(.\d+)?))/i,/^(?:\s*\] *)/i,/^(?:\s*,\s*)/i,/^(?:(1)|(0(.\d+)?))/i,/^(?: *quadrantChart *)/i,/^(?:[A-Za-z]+)/i,/^(?::)/i,/^(?:\+)/i,/^(?:,)/i,/^(?:=)/i,/^(?:=)/i,/^(?:\*)/i,/^(?:#)/i,/^(?:[\_])/i,/^(?:\.)/i,/^(?:&)/i,/^(?:-)/i,/^(?:[0-9]+)/i,/^(?:\s)/i,/^(?:;)/i,/^(?:[!"#$%&'*+,-.`?\\_/])/i,/^(?:$)/i],conditions:{class_name:{rules:[28],inclusive:!1},point_y:{rules:[33],inclusive:!1},point_x:{rules:[32],inclusive:!1},point_start:{rules:[30,31],inclusive:!1},acc_descr_multiline:{rules:[11,12],inclusive:!1},acc_descr:{rules:[9],inclusive:!1},acc_title:{rules:[7],inclusive:!1},title:{rules:[5],inclusive:!1},md_string:{rules:[22,23],inclusive:!1},string:{rules:[25,26],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,6,8,10,13,14,15,16,17,18,19,20,21,24,27,29,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51],inclusive:!0}}};return M})();_t.lexer=pe;function ft(){this.yy={}}return r(ft,"Parser"),ft.prototype=_t,_t.Parser=ft,new ft})();Ct.parser=Ct;var Le=Ct,V=ve(),Ee=class{constructor(){this.classes=new Map,this.config=this.getDefaultConfig(),this.themeConfig=this.getDefaultThemeConfig(),this.data=this.getDefaultData()}static{r(this,"QuadrantBuilder")}getDefaultData(){return{titleText:"",quadrant1Text:"",quadrant2Text:"",quadrant3Text:"",quadrant4Text:"",xAxisLeftText:"",xAxisRightText:"",yAxisBottomText:"",yAxisTopText:"",points:[]}}getDefaultConfig(){return{showXAxis:!0,showYAxis:!0,showTitle:!0,chartHeight:D.quadrantChart?.chartWidth||500,chartWidth:D.quadrantChart?.chartHeight||500,titlePadding:D.quadrantChart?.titlePadding||10,titleFontSize:D.quadrantChart?.titleFontSize||20,quadrantPadding:D.quadrantChart?.quadrantPadding||5,xAxisLabelPadding:D.quadrantChart?.xAxisLabelPadding||5,yAxisLabelPadding:D.quadrantChart?.yAxisLabelPadding||5,xAxisLabelFontSize:D.quadrantChart?.xAxisLabelFontSize||16,yAxisLabelFontSize:D.quadrantChart?.yAxisLabelFontSize||16,quadrantLabelFontSize:D.quadrantChart?.quadrantLabelFontSize||16,quadrantTextTopPadding:D.quadrantChart?.quadrantTextTopPadding||5,pointTextPadding:D.quadrantChart?.pointTextPadding||5,pointLabelFontSize:D.quadrantChart?.pointLabelFontSize||12,pointRadius:D.quadrantChart?.pointRadius||5,xAxisPosition:D.quadrantChart?.xAxisPosition||"top",yAxisPosition:D.quadrantChart?.yAxisPosition||"left",quadrantInternalBorderStrokeWidth:D.quadrantChart?.quadrantInternalBorderStrokeWidth||1,quadrantExternalBorderStrokeWidth:D.quadrantChart?.quadrantExternalBorderStrokeWidth||2}}getDefaultThemeConfig(){return{quadrant1Fill:V.quadrant1Fill,quadrant2Fill:V.quadrant2Fill,quadrant3Fill:V.quadrant3Fill,quadrant4Fill:V.quadrant4Fill,quadrant1TextFill:V.quadrant1TextFill,quadrant2TextFill:V.quadrant2TextFill,quadrant3TextFill:V.quadrant3TextFill,quadrant4TextFill:V.quadrant4TextFill,quadrantPointFill:V.quadrantPointFill,quadrantPointTextFill:V.quadrantPointTextFill,quadrantXAxisTextFill:V.quadrantXAxisTextFill,quadrantYAxisTextFill:V.quadrantYAxisTextFill,quadrantTitleFill:V.quadrantTitleFill,quadrantInternalBorderStrokeFill:V.quadrantInternalBorderStrokeFill,quadrantExternalBorderStrokeFill:V.quadrantExternalBorderStrokeFill}}clear(){this.config=this.getDefaultConfig(),this.themeConfig=this.getDefaultThemeConfig(),this.data=this.getDefaultData(),this.classes=new Map,qt.info("clear called")}setData(t){this.data={...this.data,...t}}addPoints(t){this.data.points=[...t,...this.data.points]}addClass(t,a){this.classes.set(t,a)}setConfig(t){qt.trace("setConfig called with: ",t),this.config={...this.config,...t}}setThemeConfig(t){qt.trace("setThemeConfig called with: ",t),this.themeConfig={...this.themeConfig,...t}}calculateSpace(t,a,p,f){const o=this.config.xAxisLabelPadding*2+this.config.xAxisLabelFontSize,x={top:t==="top"&&a?o:0,bottom:t==="bottom"&&a?o:0},_=this.config.yAxisLabelPadding*2+this.config.yAxisLabelFontSize,h={left:this.config.yAxisPosition==="left"&&p?_:0,right:this.config.yAxisPosition==="right"&&p?_:0},c=this.config.titleFontSize+this.config.titlePadding*2,S={top:f?c:0},m=this.config.quadrantPadding+h.left,b=this.config.quadrantPadding+x.top+S.top,y=this.config.chartWidth-this.config.quadrantPadding*2-h.left-h.right,T=this.config.chartHeight-this.config.quadrantPadding*2-x.top-x.bottom-S.top,q=y/2,g=T/2;return{xAxisSpace:x,yAxisSpace:h,titleSpace:S,quadrantSpace:{quadrantLeft:m,quadrantTop:b,quadrantWidth:y,quadrantHalfWidth:q,quadrantHeight:T,quadrantHalfHeight:g}}}getAxisLabels(t,a,p,f){const{quadrantSpace:o,titleSpace:x}=f,{quadrantHalfHeight:_,quadrantHeight:h,quadrantLeft:c,quadrantHalfWidth:S,quadrantTop:m,quadrantWidth:b}=o,y=!!this.data.xAxisRightText,T=!!this.data.yAxisTopText,q=[];return this.data.xAxisLeftText&&a&&q.push({text:this.data.xAxisLeftText,fill:this.themeConfig.quadrantXAxisTextFill,x:c+(y?S/2:0),y:t==="top"?this.config.xAxisLabelPadding+x.top:this.config.xAxisLabelPadding+m+h+this.config.quadrantPadding,fontSize:this.config.xAxisLabelFontSize,verticalPos:y?"center":"left",horizontalPos:"top",rotation:0}),this.data.xAxisRightText&&a&&q.push({text:this.data.xAxisRightText,fill:this.themeConfig.quadrantXAxisTextFill,x:c+S+(y?S/2:0),y:t==="top"?this.config.xAxisLabelPadding+x.top:this.config.xAxisLabelPadding+m+h+this.config.quadrantPadding,fontSize:this.config.xAxisLabelFontSize,verticalPos:y?"center":"left",horizontalPos:"top",rotation:0}),this.data.yAxisBottomText&&p&&q.push({text:this.data.yAxisBottomText,fill:this.themeConfig.quadrantYAxisTextFill,x:this.config.yAxisPosition==="left"?this.config.yAxisLabelPadding:this.config.yAxisLabelPadding+c+b+this.config.quadrantPadding,y:m+h-(T?_/2:0),fontSize:this.config.yAxisLabelFontSize,verticalPos:T?"center":"left",horizontalPos:"top",rotation:-90}),this.data.yAxisTopText&&p&&q.push({text:this.data.yAxisTopText,fill:this.themeConfig.quadrantYAxisTextFill,x:this.config.yAxisPosition==="left"?this.config.yAxisLabelPadding:this.config.yAxisLabelPadding+c+b+this.config.quadrantPadding,y:m+_-(T?_/2:0),fontSize:this.config.yAxisLabelFontSize,verticalPos:T?"center":"left",horizontalPos:"top",rotation:-90}),q}getQuadrants(t){const{quadrantSpace:a}=t,{quadrantHalfHeight:p,quadrantLeft:f,quadrantHalfWidth:o,quadrantTop:x}=a,_=[{text:{text:this.data.quadrant1Text,fill:this.themeConfig.quadrant1TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:f+o,y:x,width:o,height:p,fill:this.themeConfig.quadrant1Fill},{text:{text:this.data.quadrant2Text,fill:this.themeConfig.quadrant2TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:f,y:x,width:o,height:p,fill:this.themeConfig.quadrant2Fill},{text:{text:this.data.quadrant3Text,fill:this.themeConfig.quadrant3TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:f,y:x+p,width:o,height:p,fill:this.themeConfig.quadrant3Fill},{text:{text:this.data.quadrant4Text,fill:this.themeConfig.quadrant4TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:f+o,y:x+p,width:o,height:p,fill:this.themeConfig.quadrant4Fill}];for(const h of _)h.text.x=h.x+h.width/2,this.data.points.length===0?(h.text.y=h.y+h.height/2,h.text.horizontalPos="middle"):(h.text.y=h.y+this.config.quadrantTextTopPadding,h.text.horizontalPos="top");return _}getQuadrantPoints(t){const{quadrantSpace:a}=t,{quadrantHeight:p,quadrantLeft:f,quadrantTop:o,quadrantWidth:x}=a,_=$t().domain([0,1]).range([f,x+f]),h=$t().domain([0,1]).range([p+o,o]);return this.data.points.map(S=>{const m=this.classes.get(S.className);return m&&(S={...m,...S}),{x:_(S.x),y:h(S.y),fill:S.color??this.themeConfig.quadrantPointFill,radius:S.radius??this.config.pointRadius,text:{text:S.text,fill:this.themeConfig.quadrantPointTextFill,x:_(S.x),y:h(S.y)+this.config.pointTextPadding,verticalPos:"center",horizontalPos:"top",fontSize:this.config.pointLabelFontSize,rotation:0},strokeColor:S.strokeColor??this.themeConfig.quadrantPointFill,strokeWidth:S.strokeWidth??"0px"}})}getBorders(t){const a=this.config.quadrantExternalBorderStrokeWidth/2,{quadrantSpace:p}=t,{quadrantHalfHeight:f,quadrantHeight:o,quadrantLeft:x,quadrantHalfWidth:_,quadrantTop:h,quadrantWidth:c}=p;return[{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:x-a,y1:h,x2:x+c+a,y2:h},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:x+c,y1:h+a,x2:x+c,y2:h+o-a},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:x-a,y1:h+o,x2:x+c+a,y2:h+o},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:x,y1:h+a,x2:x,y2:h+o-a},{strokeFill:this.themeConfig.quadrantInternalBorderStrokeFill,strokeWidth:this.config.quadrantInternalBorderStrokeWidth,x1:x+_,y1:h+a,x2:x+_,y2:h+o-a},{strokeFill:this.themeConfig.quadrantInternalBorderStrokeFill,strokeWidth:this.config.quadrantInternalBorderStrokeWidth,x1:x+a,y1:h+f,x2:x+c-a,y2:h+f}]}getTitle(t){if(t)return{text:this.data.titleText,fill:this.themeConfig.quadrantTitleFill,fontSize:this.config.titleFontSize,horizontalPos:"top",verticalPos:"center",rotation:0,y:this.config.titlePadding,x:this.config.chartWidth/2}}build(){const t=this.config.showXAxis&&!!(this.data.xAxisLeftText||this.data.xAxisRightText),a=this.config.showYAxis&&!!(this.data.yAxisTopText||this.data.yAxisBottomText),p=this.config.showTitle&&!!this.data.titleText,f=this.data.points.length>0?"bottom":this.config.xAxisPosition,o=this.calculateSpace(f,t,a,p);return{points:this.getQuadrantPoints(o),quadrants:this.getQuadrants(o),axisLabels:this.getAxisLabels(f,t,a,o),borderLines:this.getBorders(o),title:this.getTitle(p)}}},Tt=class extends Error{static{r(this,"InvalidStyleError")}constructor(t,a,p){super(`value for ${t} ${a} is invalid, please use a valid ${p}`),this.name="InvalidStyleError"}};function Lt(t){return!/^#?([\dA-Fa-f]{6}|[\dA-Fa-f]{3})$/.test(t)}r(Lt,"validateHexCode");function ee(t){return!/^\d+$/.test(t)}r(ee,"validateNumber");function ie(t){return!/^\d+px$/.test(t)}r(ie,"validateSizeInPixels");var De=Et();function Q(t){return Ce(t.trim(),De)}r(Q,"textSanitizer");var z=new Ee;function ae(t){z.setData({quadrant1Text:Q(t.text)})}r(ae,"setQuadrant1Text");function ne(t){z.setData({quadrant2Text:Q(t.text)})}r(ne,"setQuadrant2Text");function se(t){z.setData({quadrant3Text:Q(t.text)})}r(se,"setQuadrant3Text");function re(t){z.setData({quadrant4Text:Q(t.text)})}r(re,"setQuadrant4Text");function oe(t){z.setData({xAxisLeftText:Q(t.text)})}r(oe,"setXAxisLeftText");function le(t){z.setData({xAxisRightText:Q(t.text)})}r(le,"setXAxisRightText");function he(t){z.setData({yAxisTopText:Q(t.text)})}r(he,"setYAxisTopText");function ce(t){z.setData({yAxisBottomText:Q(t.text)})}r(ce,"setYAxisBottomText");function mt(t){const a={};for(const p of t){const[f,o]=p.trim().split(/\s*:\s*/);if(f==="radius"){if(ee(o))throw new Tt(f,o,"number");a.radius=parseInt(o)}else if(f==="color"){if(Lt(o))throw new Tt(f,o,"hex code");a.color=o}else if(f==="stroke-color"){if(Lt(o))throw new Tt(f,o,"hex code");a.strokeColor=o}else if(f==="stroke-width"){if(ie(o))throw new Tt(f,o,"number of pixels (eg. 10px)");a.strokeWidth=o}else throw new Error(`style named ${f} is not supported.`)}return a}r(mt,"parseStyles");function de(t,a,p,f,o){const x=mt(o);z.addPoints([{x:p,y:f,text:Q(t.text),className:a,...x}])}r(de,"addPoint");function ue(t,a){z.addClass(t,mt(a))}r(ue,"addClass");function xe(t){z.setConfig({chartWidth:t})}r(xe,"setWidth");function fe(t){z.setConfig({chartHeight:t})}r(fe,"setHeight");function ge(){const t=Et(),{themeVariables:a,quadrantChart:p}=t;return p&&z.setConfig(p),z.setThemeConfig({quadrant1Fill:a.quadrant1Fill,quadrant2Fill:a.quadrant2Fill,quadrant3Fill:a.quadrant3Fill,quadrant4Fill:a.quadrant4Fill,quadrant1TextFill:a.quadrant1TextFill,quadrant2TextFill:a.quadrant2TextFill,quadrant3TextFill:a.quadrant3TextFill,quadrant4TextFill:a.quadrant4TextFill,quadrantPointFill:a.quadrantPointFill,quadrantPointTextFill:a.quadrantPointTextFill,quadrantXAxisTextFill:a.quadrantXAxisTextFill,quadrantYAxisTextFill:a.quadrantYAxisTextFill,quadrantExternalBorderStrokeFill:a.quadrantExternalBorderStrokeFill,quadrantInternalBorderStrokeFill:a.quadrantInternalBorderStrokeFill,quadrantTitleFill:a.quadrantTitleFill}),z.setData({titleText:te()}),z.build()}r(ge,"getQuadrantData");var ze=r(function(){z.clear(),Pe()},"clear"),Ve={setWidth:xe,setHeight:fe,setQuadrant1Text:ae,setQuadrant2Text:ne,setQuadrant3Text:se,setQuadrant4Text:re,setXAxisLeftText:oe,setXAxisRightText:le,setYAxisTopText:he,setYAxisBottomText:ce,parseStyles:mt,addPoint:de,addClass:ue,getQuadrantData:ge,clear:ze,setAccTitle:ke,getAccTitle:Ae,setDiagramTitle:_e,getDiagramTitle:te,getAccDescription:Se,setAccDescription:be},Ie=r((t,a,p,f)=>{function o(i){return i==="top"?"hanging":"middle"}r(o,"getDominantBaseLine");function x(i){return i==="left"?"start":"middle"}r(x,"getTextAnchor");function _(i){return`translate(${i.x}, ${i.y}) rotate(${i.rotation||0})`}r(_,"getTransformation");const h=Et();qt.debug(`Rendering quadrant chart +`+t);const c=h.securityLevel;let S;c==="sandbox"&&(S=vt("#i"+a));const b=(c==="sandbox"?vt(S.nodes()[0].contentDocument.body):vt("body")).select(`[id="${a}"]`),y=b.append("g").attr("class","main"),T=h.quadrantChart?.chartWidth??500,q=h.quadrantChart?.chartHeight??500;Fe(b,q,T,h.quadrantChart?.useMaxWidth??!0),b.attr("viewBox","0 0 "+T+" "+q),f.db.setHeight(q),f.db.setWidth(T);const g=f.db.getQuadrantData(),rt=y.append("g").attr("class","quadrants"),ct=y.append("g").attr("class","border"),dt=y.append("g").attr("class","data-points"),ut=y.append("g").attr("class","labels"),xt=y.append("g").attr("class","title");g.title&&xt.append("text").attr("x",0).attr("y",0).attr("fill",g.title.fill).attr("font-size",g.title.fontSize).attr("dominant-baseline",o(g.title.horizontalPos)).attr("text-anchor",x(g.title.verticalPos)).attr("transform",_(g.title)).text(g.title.text),g.borderLines&&ct.selectAll("line").data(g.borderLines).enter().append("line").attr("x1",i=>i.x1).attr("y1",i=>i.y1).attr("x2",i=>i.x2).attr("y2",i=>i.y2).style("stroke",i=>i.strokeFill).style("stroke-width",i=>i.strokeWidth);const ot=rt.selectAll("g.quadrant").data(g.quadrants).enter().append("g").attr("class","quadrant");ot.append("rect").attr("x",i=>i.x).attr("y",i=>i.y).attr("width",i=>i.width).attr("height",i=>i.height).attr("fill",i=>i.fill),ot.append("text").attr("x",0).attr("y",0).attr("fill",i=>i.text.fill).attr("font-size",i=>i.text.fontSize).attr("dominant-baseline",i=>o(i.text.horizontalPos)).attr("text-anchor",i=>x(i.text.verticalPos)).attr("transform",i=>_(i.text)).text(i=>i.text.text),ut.selectAll("g.label").data(g.axisLabels).enter().append("g").attr("class","label").append("text").attr("x",0).attr("y",0).text(i=>i.text).attr("fill",i=>i.fill).attr("font-size",i=>i.fontSize).attr("dominant-baseline",i=>o(i.horizontalPos)).attr("text-anchor",i=>x(i.verticalPos)).attr("transform",i=>_(i));const lt=dt.selectAll("g.data-point").data(g.points).enter().append("g").attr("class","data-point");lt.append("circle").attr("cx",i=>i.x).attr("cy",i=>i.y).attr("r",i=>i.radius).attr("fill",i=>i.fill).attr("stroke",i=>i.strokeColor).attr("stroke-width",i=>i.strokeWidth),lt.append("text").attr("x",0).attr("y",0).text(i=>i.text.text).attr("fill",i=>i.text.fill).attr("font-size",i=>i.text.fontSize).attr("dominant-baseline",i=>o(i.text.horizontalPos)).attr("text-anchor",i=>x(i.text.verticalPos)).attr("transform",i=>_(i.text))},"draw"),we={draw:Ie},Qe={parser:Le,db:Ve,renderer:we,styles:r(()=>"","styles")};export{Qe as diagram}; diff --git a/_astro/requirementDiagram-UZGBJVZJ.Yoxak5pj.js b/_astro/requirementDiagram-UZGBJVZJ.Yoxak5pj.js new file mode 100644 index 00000000..04e77f65 --- /dev/null +++ b/_astro/requirementDiagram-UZGBJVZJ.Yoxak5pj.js @@ -0,0 +1,64 @@ +import{g as je}from"./chunk-55IACEB6.b7ueBidu.js";import{s as Ge}from"./chunk-QN33PNHL.BI3h-IJf.js";import{_ as o,b as ze,a as Xe,s as Je,g as Ze,p as et,q as tt,c as ke,l as Ne,y as st,B as it,o as rt,r as nt,u as at}from"./mermaid.core.LbQlJBBQ.js";import"./page._rMDHl_T.js";var qe=(function(){var e=o(function(P,i,a,c){for(a=a||{},c=P.length;c--;a[P[c]]=i);return a},"o"),u=[1,3],h=[1,4],r=[1,5],n=[1,6],E=[5,6,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],g=[1,22],R=[2,7],_=[1,26],b=[1,27],N=[1,28],q=[1,29],A=[1,33],C=[1,34],V=[1,35],v=[1,36],x=[1,37],L=[1,38],D=[1,24],O=[1,31],w=[1,32],M=[1,30],d=[1,39],p=[1,40],m=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],$=[1,61],X=[89,90],Ae=[5,8,9,11,13,21,22,23,24,27,29,41,42,43,44,45,46,54,61,63,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],Ee=[27,29],Ce=[1,70],Ve=[1,71],ve=[1,72],xe=[1,73],Le=[1,74],De=[1,75],Oe=[1,76],Z=[1,83],U=[1,80],ee=[1,84],te=[1,85],se=[1,86],ie=[1,87],re=[1,88],ne=[1,89],ae=[1,90],le=[1,91],ce=[1,92],de=[5,8,9,11,13,21,22,23,24,27,41,42,43,44,45,46,54,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],Y=[63,64],we=[1,101],Me=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,76,77,89,90],T=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],B=[1,110],Q=[1,106],H=[1,107],K=[1,108],W=[1,109],j=[1,111],oe=[1,116],he=[1,117],ue=[1,114],fe=[1,115],_e={trace:o(function(){},"trace"),yy:{},symbols_:{error:2,start:3,directive:4,NEWLINE:5,RD:6,diagram:7,EOF:8,acc_title:9,acc_title_value:10,acc_descr:11,acc_descr_value:12,acc_descr_multiline_value:13,requirementDef:14,elementDef:15,relationshipDef:16,direction:17,styleStatement:18,classDefStatement:19,classStatement:20,direction_tb:21,direction_bt:22,direction_rl:23,direction_lr:24,requirementType:25,requirementName:26,STRUCT_START:27,requirementBody:28,STYLE_SEPARATOR:29,idList:30,ID:31,COLONSEP:32,id:33,TEXT:34,text:35,RISK:36,riskLevel:37,VERIFYMTHD:38,verifyType:39,STRUCT_STOP:40,REQUIREMENT:41,FUNCTIONAL_REQUIREMENT:42,INTERFACE_REQUIREMENT:43,PERFORMANCE_REQUIREMENT:44,PHYSICAL_REQUIREMENT:45,DESIGN_CONSTRAINT:46,LOW_RISK:47,MED_RISK:48,HIGH_RISK:49,VERIFY_ANALYSIS:50,VERIFY_DEMONSTRATION:51,VERIFY_INSPECTION:52,VERIFY_TEST:53,ELEMENT:54,elementName:55,elementBody:56,TYPE:57,type:58,DOCREF:59,ref:60,END_ARROW_L:61,relationship:62,LINE:63,END_ARROW_R:64,CONTAINS:65,COPIES:66,DERIVES:67,SATISFIES:68,VERIFIES:69,REFINES:70,TRACES:71,CLASSDEF:72,stylesOpt:73,CLASS:74,ALPHA:75,COMMA:76,STYLE:77,style:78,styleComponent:79,NUM:80,COLON:81,UNIT:82,SPACE:83,BRKT:84,PCT:85,MINUS:86,LABEL:87,SEMICOLON:88,unqString:89,qString:90,$accept:0,$end:1},terminals_:{2:"error",5:"NEWLINE",6:"RD",8:"EOF",9:"acc_title",10:"acc_title_value",11:"acc_descr",12:"acc_descr_value",13:"acc_descr_multiline_value",21:"direction_tb",22:"direction_bt",23:"direction_rl",24:"direction_lr",27:"STRUCT_START",29:"STYLE_SEPARATOR",31:"ID",32:"COLONSEP",34:"TEXT",36:"RISK",38:"VERIFYMTHD",40:"STRUCT_STOP",41:"REQUIREMENT",42:"FUNCTIONAL_REQUIREMENT",43:"INTERFACE_REQUIREMENT",44:"PERFORMANCE_REQUIREMENT",45:"PHYSICAL_REQUIREMENT",46:"DESIGN_CONSTRAINT",47:"LOW_RISK",48:"MED_RISK",49:"HIGH_RISK",50:"VERIFY_ANALYSIS",51:"VERIFY_DEMONSTRATION",52:"VERIFY_INSPECTION",53:"VERIFY_TEST",54:"ELEMENT",57:"TYPE",59:"DOCREF",61:"END_ARROW_L",63:"LINE",64:"END_ARROW_R",65:"CONTAINS",66:"COPIES",67:"DERIVES",68:"SATISFIES",69:"VERIFIES",70:"REFINES",71:"TRACES",72:"CLASSDEF",74:"CLASS",75:"ALPHA",76:"COMMA",77:"STYLE",80:"NUM",81:"COLON",82:"UNIT",83:"SPACE",84:"BRKT",85:"PCT",86:"MINUS",87:"LABEL",88:"SEMICOLON",89:"unqString",90:"qString"},productions_:[0,[3,3],[3,2],[3,4],[4,2],[4,2],[4,1],[7,0],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[17,1],[17,1],[17,1],[17,1],[14,5],[14,7],[28,5],[28,5],[28,5],[28,5],[28,2],[28,1],[25,1],[25,1],[25,1],[25,1],[25,1],[25,1],[37,1],[37,1],[37,1],[39,1],[39,1],[39,1],[39,1],[15,5],[15,7],[56,5],[56,5],[56,2],[56,1],[16,5],[16,5],[62,1],[62,1],[62,1],[62,1],[62,1],[62,1],[62,1],[19,3],[20,3],[20,3],[30,1],[30,3],[30,1],[30,3],[18,3],[73,1],[73,3],[78,1],[78,2],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[26,1],[26,1],[33,1],[33,1],[35,1],[35,1],[55,1],[55,1],[58,1],[58,1],[60,1],[60,1]],performAction:o(function(i,a,c,s,f,t,me){var l=t.length-1;switch(f){case 4:this.$=t[l].trim(),s.setAccTitle(this.$);break;case 5:case 6:this.$=t[l].trim(),s.setAccDescription(this.$);break;case 7:this.$=[];break;case 17:s.setDirection("TB");break;case 18:s.setDirection("BT");break;case 19:s.setDirection("RL");break;case 20:s.setDirection("LR");break;case 21:s.addRequirement(t[l-3],t[l-4]);break;case 22:s.addRequirement(t[l-5],t[l-6]),s.setClass([t[l-5]],t[l-3]);break;case 23:s.setNewReqId(t[l-2]);break;case 24:s.setNewReqText(t[l-2]);break;case 25:s.setNewReqRisk(t[l-2]);break;case 26:s.setNewReqVerifyMethod(t[l-2]);break;case 29:this.$=s.RequirementType.REQUIREMENT;break;case 30:this.$=s.RequirementType.FUNCTIONAL_REQUIREMENT;break;case 31:this.$=s.RequirementType.INTERFACE_REQUIREMENT;break;case 32:this.$=s.RequirementType.PERFORMANCE_REQUIREMENT;break;case 33:this.$=s.RequirementType.PHYSICAL_REQUIREMENT;break;case 34:this.$=s.RequirementType.DESIGN_CONSTRAINT;break;case 35:this.$=s.RiskLevel.LOW_RISK;break;case 36:this.$=s.RiskLevel.MED_RISK;break;case 37:this.$=s.RiskLevel.HIGH_RISK;break;case 38:this.$=s.VerifyType.VERIFY_ANALYSIS;break;case 39:this.$=s.VerifyType.VERIFY_DEMONSTRATION;break;case 40:this.$=s.VerifyType.VERIFY_INSPECTION;break;case 41:this.$=s.VerifyType.VERIFY_TEST;break;case 42:s.addElement(t[l-3]);break;case 43:s.addElement(t[l-5]),s.setClass([t[l-5]],t[l-3]);break;case 44:s.setNewElementType(t[l-2]);break;case 45:s.setNewElementDocRef(t[l-2]);break;case 48:s.addRelationship(t[l-2],t[l],t[l-4]);break;case 49:s.addRelationship(t[l-2],t[l-4],t[l]);break;case 50:this.$=s.Relationships.CONTAINS;break;case 51:this.$=s.Relationships.COPIES;break;case 52:this.$=s.Relationships.DERIVES;break;case 53:this.$=s.Relationships.SATISFIES;break;case 54:this.$=s.Relationships.VERIFIES;break;case 55:this.$=s.Relationships.REFINES;break;case 56:this.$=s.Relationships.TRACES;break;case 57:this.$=t[l-2],s.defineClass(t[l-1],t[l]);break;case 58:s.setClass(t[l-1],t[l]);break;case 59:s.setClass([t[l-2]],t[l]);break;case 60:case 62:this.$=[t[l]];break;case 61:case 63:this.$=t[l-2].concat([t[l]]);break;case 64:this.$=t[l-2],s.setCssStyle(t[l-1],t[l]);break;case 65:this.$=[t[l]];break;case 66:t[l-2].push(t[l]),this.$=t[l-2];break;case 68:this.$=t[l-1]+t[l];break}},"anonymous"),table:[{3:1,4:2,6:u,9:h,11:r,13:n},{1:[3]},{3:8,4:2,5:[1,7],6:u,9:h,11:r,13:n},{5:[1,9]},{10:[1,10]},{12:[1,11]},e(E,[2,6]),{3:12,4:2,6:u,9:h,11:r,13:n},{1:[2,2]},{4:17,5:g,7:13,8:R,9:h,11:r,13:n,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:_,22:b,23:N,24:q,25:23,33:25,41:A,42:C,43:V,44:v,45:x,46:L,54:D,72:O,74:w,77:M,89:d,90:p},e(E,[2,4]),e(E,[2,5]),{1:[2,1]},{8:[1,41]},{4:17,5:g,7:42,8:R,9:h,11:r,13:n,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:_,22:b,23:N,24:q,25:23,33:25,41:A,42:C,43:V,44:v,45:x,46:L,54:D,72:O,74:w,77:M,89:d,90:p},{4:17,5:g,7:43,8:R,9:h,11:r,13:n,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:_,22:b,23:N,24:q,25:23,33:25,41:A,42:C,43:V,44:v,45:x,46:L,54:D,72:O,74:w,77:M,89:d,90:p},{4:17,5:g,7:44,8:R,9:h,11:r,13:n,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:_,22:b,23:N,24:q,25:23,33:25,41:A,42:C,43:V,44:v,45:x,46:L,54:D,72:O,74:w,77:M,89:d,90:p},{4:17,5:g,7:45,8:R,9:h,11:r,13:n,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:_,22:b,23:N,24:q,25:23,33:25,41:A,42:C,43:V,44:v,45:x,46:L,54:D,72:O,74:w,77:M,89:d,90:p},{4:17,5:g,7:46,8:R,9:h,11:r,13:n,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:_,22:b,23:N,24:q,25:23,33:25,41:A,42:C,43:V,44:v,45:x,46:L,54:D,72:O,74:w,77:M,89:d,90:p},{4:17,5:g,7:47,8:R,9:h,11:r,13:n,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:_,22:b,23:N,24:q,25:23,33:25,41:A,42:C,43:V,44:v,45:x,46:L,54:D,72:O,74:w,77:M,89:d,90:p},{4:17,5:g,7:48,8:R,9:h,11:r,13:n,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:_,22:b,23:N,24:q,25:23,33:25,41:A,42:C,43:V,44:v,45:x,46:L,54:D,72:O,74:w,77:M,89:d,90:p},{4:17,5:g,7:49,8:R,9:h,11:r,13:n,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:_,22:b,23:N,24:q,25:23,33:25,41:A,42:C,43:V,44:v,45:x,46:L,54:D,72:O,74:w,77:M,89:d,90:p},{4:17,5:g,7:50,8:R,9:h,11:r,13:n,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:_,22:b,23:N,24:q,25:23,33:25,41:A,42:C,43:V,44:v,45:x,46:L,54:D,72:O,74:w,77:M,89:d,90:p},{26:51,89:[1,52],90:[1,53]},{55:54,89:[1,55],90:[1,56]},{29:[1,59],61:[1,57],63:[1,58]},e(m,[2,17]),e(m,[2,18]),e(m,[2,19]),e(m,[2,20]),{30:60,33:62,75:$,89:d,90:p},{30:63,33:62,75:$,89:d,90:p},{30:64,33:62,75:$,89:d,90:p},e(X,[2,29]),e(X,[2,30]),e(X,[2,31]),e(X,[2,32]),e(X,[2,33]),e(X,[2,34]),e(Ae,[2,81]),e(Ae,[2,82]),{1:[2,3]},{8:[2,8]},{8:[2,9]},{8:[2,10]},{8:[2,11]},{8:[2,12]},{8:[2,13]},{8:[2,14]},{8:[2,15]},{8:[2,16]},{27:[1,65],29:[1,66]},e(Ee,[2,79]),e(Ee,[2,80]),{27:[1,67],29:[1,68]},e(Ee,[2,85]),e(Ee,[2,86]),{62:69,65:Ce,66:Ve,67:ve,68:xe,69:Le,70:De,71:Oe},{62:77,65:Ce,66:Ve,67:ve,68:xe,69:Le,70:De,71:Oe},{30:78,33:62,75:$,89:d,90:p},{73:79,75:Z,76:U,78:81,79:82,80:ee,81:te,82:se,83:ie,84:re,85:ne,86:ae,87:le,88:ce},e(de,[2,60]),e(de,[2,62]),{73:93,75:Z,76:U,78:81,79:82,80:ee,81:te,82:se,83:ie,84:re,85:ne,86:ae,87:le,88:ce},{30:94,33:62,75:$,76:U,89:d,90:p},{5:[1,95]},{30:96,33:62,75:$,89:d,90:p},{5:[1,97]},{30:98,33:62,75:$,89:d,90:p},{63:[1,99]},e(Y,[2,50]),e(Y,[2,51]),e(Y,[2,52]),e(Y,[2,53]),e(Y,[2,54]),e(Y,[2,55]),e(Y,[2,56]),{64:[1,100]},e(m,[2,59],{76:U}),e(m,[2,64],{76:we}),{33:103,75:[1,102],89:d,90:p},e(Me,[2,65],{79:104,75:Z,80:ee,81:te,82:se,83:ie,84:re,85:ne,86:ae,87:le,88:ce}),e(T,[2,67]),e(T,[2,69]),e(T,[2,70]),e(T,[2,71]),e(T,[2,72]),e(T,[2,73]),e(T,[2,74]),e(T,[2,75]),e(T,[2,76]),e(T,[2,77]),e(T,[2,78]),e(m,[2,57],{76:we}),e(m,[2,58],{76:U}),{5:B,28:105,31:Q,34:H,36:K,38:W,40:j},{27:[1,112],76:U},{5:oe,40:he,56:113,57:ue,59:fe},{27:[1,118],76:U},{33:119,89:d,90:p},{33:120,89:d,90:p},{75:Z,78:121,79:82,80:ee,81:te,82:se,83:ie,84:re,85:ne,86:ae,87:le,88:ce},e(de,[2,61]),e(de,[2,63]),e(T,[2,68]),e(m,[2,21]),{32:[1,122]},{32:[1,123]},{32:[1,124]},{32:[1,125]},{5:B,28:126,31:Q,34:H,36:K,38:W,40:j},e(m,[2,28]),{5:[1,127]},e(m,[2,42]),{32:[1,128]},{32:[1,129]},{5:oe,40:he,56:130,57:ue,59:fe},e(m,[2,47]),{5:[1,131]},e(m,[2,48]),e(m,[2,49]),e(Me,[2,66],{79:104,75:Z,80:ee,81:te,82:se,83:ie,84:re,85:ne,86:ae,87:le,88:ce}),{33:132,89:d,90:p},{35:133,89:[1,134],90:[1,135]},{37:136,47:[1,137],48:[1,138],49:[1,139]},{39:140,50:[1,141],51:[1,142],52:[1,143],53:[1,144]},e(m,[2,27]),{5:B,28:145,31:Q,34:H,36:K,38:W,40:j},{58:146,89:[1,147],90:[1,148]},{60:149,89:[1,150],90:[1,151]},e(m,[2,46]),{5:oe,40:he,56:152,57:ue,59:fe},{5:[1,153]},{5:[1,154]},{5:[2,83]},{5:[2,84]},{5:[1,155]},{5:[2,35]},{5:[2,36]},{5:[2,37]},{5:[1,156]},{5:[2,38]},{5:[2,39]},{5:[2,40]},{5:[2,41]},e(m,[2,22]),{5:[1,157]},{5:[2,87]},{5:[2,88]},{5:[1,158]},{5:[2,89]},{5:[2,90]},e(m,[2,43]),{5:B,28:159,31:Q,34:H,36:K,38:W,40:j},{5:B,28:160,31:Q,34:H,36:K,38:W,40:j},{5:B,28:161,31:Q,34:H,36:K,38:W,40:j},{5:B,28:162,31:Q,34:H,36:K,38:W,40:j},{5:oe,40:he,56:163,57:ue,59:fe},{5:oe,40:he,56:164,57:ue,59:fe},e(m,[2,23]),e(m,[2,24]),e(m,[2,25]),e(m,[2,26]),e(m,[2,44]),e(m,[2,45])],defaultActions:{8:[2,2],12:[2,1],41:[2,3],42:[2,8],43:[2,9],44:[2,10],45:[2,11],46:[2,12],47:[2,13],48:[2,14],49:[2,15],50:[2,16],134:[2,83],135:[2,84],137:[2,35],138:[2,36],139:[2,37],141:[2,38],142:[2,39],143:[2,40],144:[2,41],147:[2,87],148:[2,88],150:[2,89],151:[2,90]},parseError:o(function(i,a){if(a.recoverable)this.trace(i);else{var c=new Error(i);throw c.hash=a,c}},"parseError"),parse:o(function(i){var a=this,c=[0],s=[],f=[null],t=[],me=this.table,l="",Re=0,Fe=0,Qe=2,Pe=1,He=t.slice.call(arguments,1),y=Object.create(this.lexer),G={yy:{}};for(var Se in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Se)&&(G.yy[Se]=this.yy[Se]);y.setInput(i,G.yy),G.yy.lexer=y,G.yy.parser=this,typeof y.yylloc>"u"&&(y.yylloc={});var Ie=y.yylloc;t.push(Ie);var Ke=y.options&&y.options.ranges;typeof G.yy.parseError=="function"?this.parseError=G.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function We(I){c.length=c.length-2*I,f.length=f.length-I,t.length=t.length-I}o(We,"popStack");function $e(){var I;return I=s.pop()||y.lex()||Pe,typeof I!="number"&&(I instanceof Array&&(s=I,I=s.pop()),I=a.symbols_[I]||I),I}o($e,"lex");for(var S,z,k,be,J={},ye,F,Ue,ge;;){if(z=c[c.length-1],this.defaultActions[z]?k=this.defaultActions[z]:((S===null||typeof S>"u")&&(S=$e()),k=me[z]&&me[z][S]),typeof k>"u"||!k.length||!k[0]){var Te="";ge=[];for(ye in me[z])this.terminals_[ye]&&ye>Qe&&ge.push("'"+this.terminals_[ye]+"'");y.showPosition?Te="Parse error on line "+(Re+1)+`: +`+y.showPosition()+` +Expecting `+ge.join(", ")+", got '"+(this.terminals_[S]||S)+"'":Te="Parse error on line "+(Re+1)+": Unexpected "+(S==Pe?"end of input":"'"+(this.terminals_[S]||S)+"'"),this.parseError(Te,{text:y.match,token:this.terminals_[S]||S,line:y.yylineno,loc:Ie,expected:ge})}if(k[0]instanceof Array&&k.length>1)throw new Error("Parse Error: multiple actions possible at state: "+z+", token: "+S);switch(k[0]){case 1:c.push(S),f.push(y.yytext),t.push(y.yylloc),c.push(k[1]),S=null,Fe=y.yyleng,l=y.yytext,Re=y.yylineno,Ie=y.yylloc;break;case 2:if(F=this.productions_[k[1]][1],J.$=f[f.length-F],J._$={first_line:t[t.length-(F||1)].first_line,last_line:t[t.length-1].last_line,first_column:t[t.length-(F||1)].first_column,last_column:t[t.length-1].last_column},Ke&&(J._$.range=[t[t.length-(F||1)].range[0],t[t.length-1].range[1]]),be=this.performAction.apply(J,[l,Fe,Re,G.yy,k[1],f,t].concat(He)),typeof be<"u")return be;F&&(c=c.slice(0,-1*F*2),f=f.slice(0,-1*F),t=t.slice(0,-1*F)),c.push(this.productions_[k[1]][0]),f.push(J.$),t.push(J._$),Ue=me[c[c.length-2]][c[c.length-1]],c.push(Ue);break;case 3:return!0}}return!0},"parse")},Be=(function(){var P={EOF:1,parseError:o(function(a,c){if(this.yy.parser)this.yy.parser.parseError(a,c);else throw new Error(a)},"parseError"),setInput:o(function(i,a){return this.yy=a||this.yy||{},this._input=i,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:o(function(){var i=this._input[0];this.yytext+=i,this.yyleng++,this.offset++,this.match+=i,this.matched+=i;var a=i.match(/(?:\r\n?|\n).*/g);return a?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),i},"input"),unput:o(function(i){var a=i.length,c=i.split(/(?:\r\n?|\n)/g);this._input=i+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-a),this.offset-=a;var s=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),c.length-1&&(this.yylineno-=c.length-1);var f=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:c?(c.length===s.length?this.yylloc.first_column:0)+s[s.length-c.length].length-c[0].length:this.yylloc.first_column-a},this.options.ranges&&(this.yylloc.range=[f[0],f[0]+this.yyleng-a]),this.yyleng=this.yytext.length,this},"unput"),more:o(function(){return this._more=!0,this},"more"),reject:o(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:o(function(i){this.unput(this.match.slice(i))},"less"),pastInput:o(function(){var i=this.matched.substr(0,this.matched.length-this.match.length);return(i.length>20?"...":"")+i.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:o(function(){var i=this.match;return i.length<20&&(i+=this._input.substr(0,20-i.length)),(i.substr(0,20)+(i.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:o(function(){var i=this.pastInput(),a=new Array(i.length+1).join("-");return i+this.upcomingInput()+` +`+a+"^"},"showPosition"),test_match:o(function(i,a){var c,s,f;if(this.options.backtrack_lexer&&(f={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&&(f.yylloc.range=this.yylloc.range.slice(0))),s=i[0].match(/(?:\r\n?|\n).*/g),s&&(this.yylineno+=s.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:s?s[s.length-1].length-s[s.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+i[0].length},this.yytext+=i[0],this.match+=i[0],this.matches=i,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(i[0].length),this.matched+=i[0],c=this.performAction.call(this,this.yy,this,a,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),c)return c;if(this._backtrack){for(var t in f)this[t]=f[t];return!1}return!1},"test_match"),next:o(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var i,a,c,s;this._more||(this.yytext="",this.match="");for(var f=this._currentRules(),t=0;ta[0].length)){if(a=c,s=t,this.options.backtrack_lexer){if(i=this.test_match(c,f[t]),i!==!1)return i;if(this._backtrack){a=!1;continue}else return!1}else if(!this.options.flex)break}return a?(i=this.test_match(a,f[s]),i!==!1?i:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:o(function(){var a=this.next();return a||this.lex()},"lex"),begin:o(function(a){this.conditionStack.push(a)},"begin"),popState:o(function(){var a=this.conditionStack.length-1;return a>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:o(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:o(function(a){return a=this.conditionStack.length-1-Math.abs(a||0),a>=0?this.conditionStack[a]:"INITIAL"},"topState"),pushState:o(function(a){this.begin(a)},"pushState"),stateStackSize:o(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:o(function(a,c,s,f){switch(s){case 0:return"title";case 1:return this.begin("acc_title"),9;case 2:return this.popState(),"acc_title_value";case 3:return this.begin("acc_descr"),11;case 4:return this.popState(),"acc_descr_value";case 5:this.begin("acc_descr_multiline");break;case 6:this.popState();break;case 7:return"acc_descr_multiline_value";case 8:return 21;case 9:return 22;case 10:return 23;case 11:return 24;case 12:return 5;case 13:break;case 14:break;case 15:break;case 16:return 8;case 17:return 6;case 18:return 27;case 19:return 40;case 20:return 29;case 21:return 32;case 22:return 31;case 23:return 34;case 24:return 36;case 25:return 38;case 26:return 41;case 27:return 42;case 28:return 43;case 29:return 44;case 30:return 45;case 31:return 46;case 32:return 47;case 33:return 48;case 34:return 49;case 35:return 50;case 36:return 51;case 37:return 52;case 38:return 53;case 39:return 54;case 40:return 65;case 41:return 66;case 42:return 67;case 43:return 68;case 44:return 69;case 45:return 70;case 46:return 71;case 47:return 57;case 48:return 59;case 49:return this.begin("style"),77;case 50:return 75;case 51:return 81;case 52:return 88;case 53:return"PERCENT";case 54:return 86;case 55:return 84;case 56:break;case 57:this.begin("string");break;case 58:this.popState();break;case 59:return this.begin("style"),72;case 60:return this.begin("style"),74;case 61:return 61;case 62:return 64;case 63:return 63;case 64:this.begin("string");break;case 65:this.popState();break;case 66:return"qString";case 67:return c.yytext=c.yytext.trim(),89;case 68:return 75;case 69:return 80;case 70:return 76}},"anonymous"),rules:[/^(?:title\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:(\r?\n)+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:$)/i,/^(?:requirementDiagram\b)/i,/^(?:\{)/i,/^(?:\})/i,/^(?::{3})/i,/^(?::)/i,/^(?:id\b)/i,/^(?:text\b)/i,/^(?:risk\b)/i,/^(?:verifyMethod\b)/i,/^(?:requirement\b)/i,/^(?:functionalRequirement\b)/i,/^(?:interfaceRequirement\b)/i,/^(?:performanceRequirement\b)/i,/^(?:physicalRequirement\b)/i,/^(?:designConstraint\b)/i,/^(?:low\b)/i,/^(?:medium\b)/i,/^(?:high\b)/i,/^(?:analysis\b)/i,/^(?:demonstration\b)/i,/^(?:inspection\b)/i,/^(?:test\b)/i,/^(?:element\b)/i,/^(?:contains\b)/i,/^(?:copies\b)/i,/^(?:derives\b)/i,/^(?:satisfies\b)/i,/^(?:verifies\b)/i,/^(?:refines\b)/i,/^(?:traces\b)/i,/^(?:type\b)/i,/^(?:docref\b)/i,/^(?:style\b)/i,/^(?:\w+)/i,/^(?::)/i,/^(?:;)/i,/^(?:%)/i,/^(?:-)/i,/^(?:#)/i,/^(?: )/i,/^(?:["])/i,/^(?:\n)/i,/^(?:classDef\b)/i,/^(?:class\b)/i,/^(?:<-)/i,/^(?:->)/i,/^(?:-)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[\w][^:,\r\n\{\<\>\-\=]*)/i,/^(?:\w+)/i,/^(?:[0-9]+)/i,/^(?:,)/i],conditions:{acc_descr_multiline:{rules:[6,7,68,69,70],inclusive:!1},acc_descr:{rules:[4,68,69,70],inclusive:!1},acc_title:{rules:[2,68,69,70],inclusive:!1},style:{rules:[50,51,52,53,54,55,56,57,58,68,69,70],inclusive:!1},unqString:{rules:[68,69,70],inclusive:!1},token:{rules:[68,69,70],inclusive:!1},string:{rules:[65,66,68,69,70],inclusive:!1},INITIAL:{rules:[0,1,3,5,8,9,10,11,12,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,59,60,61,62,63,64,67,68,69,70],inclusive:!0}}};return P})();_e.lexer=Be;function pe(){this.yy={}}return o(pe,"Parser"),pe.prototype=_e,_e.Parser=pe,new pe})();qe.parser=qe;var lt=qe,ct=class{constructor(){this.relations=[],this.latestRequirement=this.getInitialRequirement(),this.requirements=new Map,this.latestElement=this.getInitialElement(),this.elements=new Map,this.classes=new Map,this.direction="TB",this.RequirementType={REQUIREMENT:"Requirement",FUNCTIONAL_REQUIREMENT:"Functional Requirement",INTERFACE_REQUIREMENT:"Interface Requirement",PERFORMANCE_REQUIREMENT:"Performance Requirement",PHYSICAL_REQUIREMENT:"Physical Requirement",DESIGN_CONSTRAINT:"Design Constraint"},this.RiskLevel={LOW_RISK:"Low",MED_RISK:"Medium",HIGH_RISK:"High"},this.VerifyType={VERIFY_ANALYSIS:"Analysis",VERIFY_DEMONSTRATION:"Demonstration",VERIFY_INSPECTION:"Inspection",VERIFY_TEST:"Test"},this.Relationships={CONTAINS:"contains",COPIES:"copies",DERIVES:"derives",SATISFIES:"satisfies",VERIFIES:"verifies",REFINES:"refines",TRACES:"traces"},this.setAccTitle=ze,this.getAccTitle=Xe,this.setAccDescription=Je,this.getAccDescription=Ze,this.setDiagramTitle=et,this.getDiagramTitle=tt,this.getConfig=o(()=>ke().requirement,"getConfig"),this.clear(),this.setDirection=this.setDirection.bind(this),this.addRequirement=this.addRequirement.bind(this),this.setNewReqId=this.setNewReqId.bind(this),this.setNewReqRisk=this.setNewReqRisk.bind(this),this.setNewReqText=this.setNewReqText.bind(this),this.setNewReqVerifyMethod=this.setNewReqVerifyMethod.bind(this),this.addElement=this.addElement.bind(this),this.setNewElementType=this.setNewElementType.bind(this),this.setNewElementDocRef=this.setNewElementDocRef.bind(this),this.addRelationship=this.addRelationship.bind(this),this.setCssStyle=this.setCssStyle.bind(this),this.setClass=this.setClass.bind(this),this.defineClass=this.defineClass.bind(this),this.setAccTitle=this.setAccTitle.bind(this),this.setAccDescription=this.setAccDescription.bind(this)}static{o(this,"RequirementDB")}getDirection(){return this.direction}setDirection(e){this.direction=e}resetLatestRequirement(){this.latestRequirement=this.getInitialRequirement()}resetLatestElement(){this.latestElement=this.getInitialElement()}getInitialRequirement(){return{requirementId:"",text:"",risk:"",verifyMethod:"",name:"",type:"",cssStyles:[],classes:["default"]}}getInitialElement(){return{name:"",type:"",docRef:"",cssStyles:[],classes:["default"]}}addRequirement(e,u){return this.requirements.has(e)||this.requirements.set(e,{name:e,type:u,requirementId:this.latestRequirement.requirementId,text:this.latestRequirement.text,risk:this.latestRequirement.risk,verifyMethod:this.latestRequirement.verifyMethod,cssStyles:[],classes:["default"]}),this.resetLatestRequirement(),this.requirements.get(e)}getRequirements(){return this.requirements}setNewReqId(e){this.latestRequirement!==void 0&&(this.latestRequirement.requirementId=e)}setNewReqText(e){this.latestRequirement!==void 0&&(this.latestRequirement.text=e)}setNewReqRisk(e){this.latestRequirement!==void 0&&(this.latestRequirement.risk=e)}setNewReqVerifyMethod(e){this.latestRequirement!==void 0&&(this.latestRequirement.verifyMethod=e)}addElement(e){return this.elements.has(e)||(this.elements.set(e,{name:e,type:this.latestElement.type,docRef:this.latestElement.docRef,cssStyles:[],classes:["default"]}),Ne.info("Added new element: ",e)),this.resetLatestElement(),this.elements.get(e)}getElements(){return this.elements}setNewElementType(e){this.latestElement!==void 0&&(this.latestElement.type=e)}setNewElementDocRef(e){this.latestElement!==void 0&&(this.latestElement.docRef=e)}addRelationship(e,u,h){this.relations.push({type:e,src:u,dst:h})}getRelationships(){return this.relations}clear(){this.relations=[],this.resetLatestRequirement(),this.requirements=new Map,this.resetLatestElement(),this.elements=new Map,this.classes=new Map,st()}setCssStyle(e,u){for(const h of e){const r=this.requirements.get(h)??this.elements.get(h);if(!u||!r)return;for(const n of u)n.includes(",")?r.cssStyles.push(...n.split(",")):r.cssStyles.push(n)}}setClass(e,u){for(const h of e){const r=this.requirements.get(h)??this.elements.get(h);if(r)for(const n of u){r.classes.push(n);const E=this.classes.get(n)?.styles;E&&r.cssStyles.push(...E)}}}defineClass(e,u){for(const h of e){let r=this.classes.get(h);r===void 0&&(r={id:h,styles:[],textStyles:[]},this.classes.set(h,r)),u&&u.forEach(function(n){if(/color/.exec(n)){const E=n.replace("fill","bgFill");r.textStyles.push(E)}r.styles.push(n)}),this.requirements.forEach(n=>{n.classes.includes(h)&&n.cssStyles.push(...u.flatMap(E=>E.split(",")))}),this.elements.forEach(n=>{n.classes.includes(h)&&n.cssStyles.push(...u.flatMap(E=>E.split(",")))})}}getClasses(){return this.classes}getData(){const e=ke(),u=[],h=[];for(const r of this.requirements.values()){const n=r;n.id=r.name,n.cssStyles=r.cssStyles,n.cssClasses=r.classes.join(" "),n.shape="requirementBox",n.look=e.look,u.push(n)}for(const r of this.elements.values()){const n=r;n.shape="requirementBox",n.look=e.look,n.id=r.name,n.cssStyles=r.cssStyles,n.cssClasses=r.classes.join(" "),u.push(n)}for(const r of this.relations){let n=0;const E=r.type===this.Relationships.CONTAINS,g={id:`${r.src}-${r.dst}-${n}`,start:this.requirements.get(r.src)?.name??this.elements.get(r.src)?.name,end:this.requirements.get(r.dst)?.name??this.elements.get(r.dst)?.name,label:`<<${r.type}>>`,classes:"relationshipLine",style:["fill:none",E?"":"stroke-dasharray: 10,7"],labelpos:"c",thickness:"normal",type:"normal",pattern:E?"normal":"dashed",arrowTypeStart:E?"requirement_contains":"",arrowTypeEnd:E?"":"requirement_arrow",look:e.look};h.push(g),n++}return{nodes:u,edges:h,other:{},config:e,direction:this.getDirection()}}},ot=o(e=>` + + marker { + fill: ${e.relationColor}; + stroke: ${e.relationColor}; + } + + marker.cross { + stroke: ${e.lineColor}; + } + + svg { + font-family: ${e.fontFamily}; + font-size: ${e.fontSize}; + } + + .reqBox { + fill: ${e.requirementBackground}; + fill-opacity: 1.0; + stroke: ${e.requirementBorderColor}; + stroke-width: ${e.requirementBorderSize}; + } + + .reqTitle, .reqLabel{ + fill: ${e.requirementTextColor}; + } + .reqLabelBox { + fill: ${e.relationLabelBackground}; + fill-opacity: 1.0; + } + + .req-title-line { + stroke: ${e.requirementBorderColor}; + stroke-width: ${e.requirementBorderSize}; + } + .relationshipLine { + stroke: ${e.relationColor}; + stroke-width: 1; + } + .relationshipLabel { + fill: ${e.relationLabelColor}; + } + .divider { + stroke: ${e.nodeBorder}; + stroke-width: 1; + } + .label { + font-family: ${e.fontFamily}; + color: ${e.nodeTextColor||e.textColor}; + } + .label text,span { + fill: ${e.nodeTextColor||e.textColor}; + color: ${e.nodeTextColor||e.textColor}; + } + .labelBkg { + background-color: ${e.edgeLabelBackground}; + } + +`,"getStyles"),ht=ot,Ye={};it(Ye,{draw:()=>ut});var ut=o(async function(e,u,h,r){Ne.info("REF0:"),Ne.info("Drawing requirement diagram (unified)",u);const{securityLevel:n,state:E,layout:g}=ke(),R=r.db.getData(),_=je(u,n);R.type=r.type,R.layoutAlgorithm=rt(g),R.nodeSpacing=E?.nodeSpacing??50,R.rankSpacing=E?.rankSpacing??50,R.markers=["requirement_contains","requirement_arrow"],R.diagramId=u,await nt(R,_);const b=8;at.insertTitle(_,"requirementDiagramTitleText",E?.titleTopMargin??25,r.db.getDiagramTitle()),Ge(_,b,"requirementDiagram",E?.useMaxWidth??!0)},"draw"),pt={parser:lt,get db(){return new ct},renderer:Ye,styles:ht};export{pt as diagram}; diff --git a/_astro/sankeyDiagram-TZEHDZUN.C-hlWUgz.js b/_astro/sankeyDiagram-TZEHDZUN.C-hlWUgz.js new file mode 100644 index 00000000..aa5ba903 --- /dev/null +++ b/_astro/sankeyDiagram-TZEHDZUN.C-hlWUgz.js @@ -0,0 +1,10 @@ +import{_ as g,p as mt,q as kt,s as _t,g as xt,b as vt,a as bt,c as ot,z as wt,d as G,V as St,y as Lt,k as Et}from"./mermaid.core.LbQlJBBQ.js";import{o as At}from"./ordinal.BYWQX77i.js";import"./page._rMDHl_T.js";import"./init.Gi6I4Gst.js";function Tt(t){for(var n=t.length/6|0,i=new Array(n),a=0;a=a)&&(i=a);else{let a=-1;for(let h of t)(h=n(h,++a,t))!=null&&(i=h)&&(i=h)}return i}function dt(t,n){let i;if(n===void 0)for(const a of t)a!=null&&(i>a||i===void 0&&a>=a)&&(i=a);else{let a=-1;for(let h of t)(h=n(h,++a,t))!=null&&(i>h||i===void 0&&h>=h)&&(i=h)}return i}function J(t,n){let i=0;if(n===void 0)for(let a of t)(a=+a)&&(i+=a);else{let a=-1;for(let h of t)(h=+n(h,++a,t))&&(i+=h)}return i}function Nt(t){return t.target.depth}function It(t){return t.depth}function Pt(t,n){return n-1-t.height}function gt(t,n){return t.sourceLinks.length?t.depth:n-1}function Ct(t){return t.targetLinks.length?t.depth:t.sourceLinks.length?dt(t.sourceLinks,Nt)-1:0}function Y(t){return function(){return t}}function lt(t,n){return q(t.source,n.source)||t.index-n.index}function ct(t,n){return q(t.target,n.target)||t.index-n.index}function q(t,n){return t.y0-n.y0}function tt(t){return t.value}function Ot(t){return t.index}function zt(t){return t.nodes}function Dt(t){return t.links}function ut(t,n){const i=t.get(n);if(!i)throw new Error("missing: "+n);return i}function ht({nodes:t}){for(const n of t){let i=n.y0,a=i;for(const h of n.sourceLinks)h.y0=i+h.width/2,i+=h.width;for(const h of n.targetLinks)h.y1=a+h.width/2,a+=h.width}}function $t(){let t=0,n=0,i=1,a=1,h=24,b=8,p,k=Ot,s=gt,o,l,_=zt,x=Dt,y=6;function v(){const e={nodes:_.apply(null,arguments),links:x.apply(null,arguments)};return M(e),T(e),N(e),C(e),S(e),ht(e),e}v.update=function(e){return ht(e),e},v.nodeId=function(e){return arguments.length?(k=typeof e=="function"?e:Y(e),v):k},v.nodeAlign=function(e){return arguments.length?(s=typeof e=="function"?e:Y(e),v):s},v.nodeSort=function(e){return arguments.length?(o=e,v):o},v.nodeWidth=function(e){return arguments.length?(h=+e,v):h},v.nodePadding=function(e){return arguments.length?(b=p=+e,v):b},v.nodes=function(e){return arguments.length?(_=typeof e=="function"?e:Y(e),v):_},v.links=function(e){return arguments.length?(x=typeof e=="function"?e:Y(e),v):x},v.linkSort=function(e){return arguments.length?(l=e,v):l},v.size=function(e){return arguments.length?(t=n=0,i=+e[0],a=+e[1],v):[i-t,a-n]},v.extent=function(e){return arguments.length?(t=+e[0][0],i=+e[1][0],n=+e[0][1],a=+e[1][1],v):[[t,n],[i,a]]},v.iterations=function(e){return arguments.length?(y=+e,v):y};function M({nodes:e,links:f}){for(const[c,r]of e.entries())r.index=c,r.sourceLinks=[],r.targetLinks=[];const u=new Map(e.map((c,r)=>[k(c,r,e),c]));for(const[c,r]of f.entries()){r.index=c;let{source:m,target:w}=r;typeof m!="object"&&(m=r.source=ut(u,m)),typeof w!="object"&&(w=r.target=ut(u,w)),m.sourceLinks.push(r),w.targetLinks.push(r)}if(l!=null)for(const{sourceLinks:c,targetLinks:r}of e)c.sort(l),r.sort(l)}function T({nodes:e}){for(const f of e)f.value=f.fixedValue===void 0?Math.max(J(f.sourceLinks,tt),J(f.targetLinks,tt)):f.fixedValue}function N({nodes:e}){const f=e.length;let u=new Set(e),c=new Set,r=0;for(;u.size;){for(const m of u){m.depth=r;for(const{target:w}of m.sourceLinks)c.add(w)}if(++r>f)throw new Error("circular link");u=c,c=new Set}}function C({nodes:e}){const f=e.length;let u=new Set(e),c=new Set,r=0;for(;u.size;){for(const m of u){m.height=r;for(const{source:w}of m.targetLinks)c.add(w)}if(++r>f)throw new Error("circular link");u=c,c=new Set}}function D({nodes:e}){const f=at(e,r=>r.depth)+1,u=(i-t-h)/(f-1),c=new Array(f);for(const r of e){const m=Math.max(0,Math.min(f-1,Math.floor(s.call(null,r,f))));r.layer=m,r.x0=t+m*u,r.x1=r.x0+h,c[m]?c[m].push(r):c[m]=[r]}if(o)for(const r of c)r.sort(o);return c}function B(e){const f=dt(e,u=>(a-n-(u.length-1)*p)/J(u,tt));for(const u of e){let c=n;for(const r of u){r.y0=c,r.y1=c+r.value*f,c=r.y1+p;for(const m of r.sourceLinks)m.width=m.value*f}c=(a-c+p)/(u.length+1);for(let r=0;ru.length)-1)),B(f);for(let u=0;u0))continue;let F=(L/R-w.y0)*f;w.y0+=F,w.y1+=F,E(w)}o===void 0&&m.sort(q),O(m,u)}}function j(e,f,u){for(let c=e.length,r=c-2;r>=0;--r){const m=e[r];for(const w of m){let L=0,R=0;for(const{target:U,value:Z}of w.sourceLinks){let W=Z*(U.layer-w.layer);L+=I(w,U)*W,R+=W}if(!(R>0))continue;let F=(L/R-w.y0)*f;w.y0+=F,w.y1+=F,E(w)}o===void 0&&m.sort(q),O(m,u)}}function O(e,f){const u=e.length>>1,c=e[u];d(e,c.y0-p,u-1,f),z(e,c.y1+p,u+1,f),d(e,a,e.length-1,f),z(e,n,0,f)}function z(e,f,u,c){for(;u1e-6&&(r.y0+=m,r.y1+=m),f=r.y1+p}}function d(e,f,u,c){for(;u>=0;--u){const r=e[u],m=(r.y1-f)*c;m>1e-6&&(r.y0-=m,r.y1-=m),f=r.y0-p}}function E({sourceLinks:e,targetLinks:f}){if(l===void 0){for(const{source:{sourceLinks:u}}of f)u.sort(ct);for(const{target:{targetLinks:u}}of e)u.sort(lt)}}function A(e){if(l===void 0)for(const{sourceLinks:f,targetLinks:u}of e)f.sort(ct),u.sort(lt)}function $(e,f){let u=e.y0-(e.sourceLinks.length-1)*p/2;for(const{target:c,width:r}of e.sourceLinks){if(c===f)break;u+=r+p}for(const{source:c,width:r}of f.targetLinks){if(c===e)break;u-=r}return u}function I(e,f){let u=f.y0-(f.targetLinks.length-1)*p/2;for(const{source:c,width:r}of f.targetLinks){if(c===e)break;u+=r+p}for(const{target:c,width:r}of e.sourceLinks){if(c===f)break;u-=r}return u}return v}var et=Math.PI,nt=2*et,V=1e-6,jt=nt-V;function it(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function pt(){return new it}it.prototype=pt.prototype={constructor:it,moveTo:function(t,n){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+n)},closePath:function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,n){this._+="L"+(this._x1=+t)+","+(this._y1=+n)},quadraticCurveTo:function(t,n,i,a){this._+="Q"+ +t+","+ +n+","+(this._x1=+i)+","+(this._y1=+a)},bezierCurveTo:function(t,n,i,a,h,b){this._+="C"+ +t+","+ +n+","+ +i+","+ +a+","+(this._x1=+h)+","+(this._y1=+b)},arcTo:function(t,n,i,a,h){t=+t,n=+n,i=+i,a=+a,h=+h;var b=this._x1,p=this._y1,k=i-t,s=a-n,o=b-t,l=p-n,_=o*o+l*l;if(h<0)throw new Error("negative radius: "+h);if(this._x1===null)this._+="M"+(this._x1=t)+","+(this._y1=n);else if(_>V)if(!(Math.abs(l*k-s*o)>V)||!h)this._+="L"+(this._x1=t)+","+(this._y1=n);else{var x=i-b,y=a-p,v=k*k+s*s,M=x*x+y*y,T=Math.sqrt(v),N=Math.sqrt(_),C=h*Math.tan((et-Math.acos((v+_-M)/(2*T*N)))/2),D=C/N,B=C/T;Math.abs(D-1)>V&&(this._+="L"+(t+D*o)+","+(n+D*l)),this._+="A"+h+","+h+",0,0,"+ +(l*x>o*y)+","+(this._x1=t+B*k)+","+(this._y1=n+B*s)}},arc:function(t,n,i,a,h,b){t=+t,n=+n,i=+i,b=!!b;var p=i*Math.cos(a),k=i*Math.sin(a),s=t+p,o=n+k,l=1^b,_=b?a-h:h-a;if(i<0)throw new Error("negative radius: "+i);this._x1===null?this._+="M"+s+","+o:(Math.abs(this._x1-s)>V||Math.abs(this._y1-o)>V)&&(this._+="L"+s+","+o),i&&(_<0&&(_=_%nt+nt),_>jt?this._+="A"+i+","+i+",0,1,"+l+","+(t-p)+","+(n-k)+"A"+i+","+i+",0,1,"+l+","+(this._x1=s)+","+(this._y1=o):_>V&&(this._+="A"+i+","+i+",0,"+ +(_>=et)+","+l+","+(this._x1=t+i*Math.cos(h))+","+(this._y1=n+i*Math.sin(h))))},rect:function(t,n,i,a){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+n)+"h"+ +i+"v"+ +a+"h"+-i+"Z"},toString:function(){return this._}};function ft(t){return function(){return t}}function Bt(t){return t[0]}function Rt(t){return t[1]}var Vt=Array.prototype.slice;function Ft(t){return t.source}function Ut(t){return t.target}function Wt(t){var n=Ft,i=Ut,a=Bt,h=Rt,b=null;function p(){var k,s=Vt.call(arguments),o=n.apply(this,s),l=i.apply(this,s);if(b||(b=k=pt()),t(b,+a.apply(this,(s[0]=o,s)),+h.apply(this,s),+a.apply(this,(s[0]=l,s)),+h.apply(this,s)),k)return b=null,k+""||null}return p.source=function(k){return arguments.length?(n=k,p):n},p.target=function(k){return arguments.length?(i=k,p):i},p.x=function(k){return arguments.length?(a=typeof k=="function"?k:ft(+k),p):a},p.y=function(k){return arguments.length?(h=typeof k=="function"?k:ft(+k),p):h},p.context=function(k){return arguments.length?(b=k??null,p):b},p}function Gt(t,n,i,a,h){t.moveTo(n,i),t.bezierCurveTo(n=(n+a)/2,i,n,h,a,h)}function Yt(){return Wt(Gt)}function qt(t){return[t.source.x1,t.y0]}function Ht(t){return[t.target.x0,t.y1]}function Xt(){return Yt().source(qt).target(Ht)}var st=(function(){var t=g(function(k,s,o,l){for(o=o||{},l=k.length;l--;o[k[l]]=s);return o},"o"),n=[1,9],i=[1,10],a=[1,5,10,12],h={trace:g(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SANKEY:4,NEWLINE:5,csv:6,opt_eof:7,record:8,csv_tail:9,EOF:10,"field[source]":11,COMMA:12,"field[target]":13,"field[value]":14,field:15,escaped:16,non_escaped:17,DQUOTE:18,ESCAPED_TEXT:19,NON_ESCAPED_TEXT:20,$accept:0,$end:1},terminals_:{2:"error",4:"SANKEY",5:"NEWLINE",10:"EOF",11:"field[source]",12:"COMMA",13:"field[target]",14:"field[value]",18:"DQUOTE",19:"ESCAPED_TEXT",20:"NON_ESCAPED_TEXT"},productions_:[0,[3,4],[6,2],[9,2],[9,0],[7,1],[7,0],[8,5],[15,1],[15,1],[16,3],[17,1]],performAction:g(function(s,o,l,_,x,y,v){var M=y.length-1;switch(x){case 7:const T=_.findOrCreateNode(y[M-4].trim().replaceAll('""','"')),N=_.findOrCreateNode(y[M-2].trim().replaceAll('""','"')),C=parseFloat(y[M].trim());_.addLink(T,N,C);break;case 8:case 9:case 11:this.$=y[M];break;case 10:this.$=y[M-1];break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},{5:[1,3]},{6:4,8:5,15:6,16:7,17:8,18:n,20:i},{1:[2,6],7:11,10:[1,12]},t(i,[2,4],{9:13,5:[1,14]}),{12:[1,15]},t(a,[2,8]),t(a,[2,9]),{19:[1,16]},t(a,[2,11]),{1:[2,1]},{1:[2,5]},t(i,[2,2]),{6:17,8:5,15:6,16:7,17:8,18:n,20:i},{15:18,16:7,17:8,18:n,20:i},{18:[1,19]},t(i,[2,3]),{12:[1,20]},t(a,[2,10]),{15:21,16:7,17:8,18:n,20:i},t([1,5,10],[2,7])],defaultActions:{11:[2,1],12:[2,5]},parseError:g(function(s,o){if(o.recoverable)this.trace(s);else{var l=new Error(s);throw l.hash=o,l}},"parseError"),parse:g(function(s){var o=this,l=[0],_=[],x=[null],y=[],v=this.table,M="",T=0,N=0,C=2,D=1,B=y.slice.call(arguments,1),S=Object.create(this.lexer),P={yy:{}};for(var j in this.yy)Object.prototype.hasOwnProperty.call(this.yy,j)&&(P.yy[j]=this.yy[j]);S.setInput(s,P.yy),P.yy.lexer=S,P.yy.parser=this,typeof S.yylloc>"u"&&(S.yylloc={});var O=S.yylloc;y.push(O);var z=S.options&&S.options.ranges;typeof P.yy.parseError=="function"?this.parseError=P.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function d(L){l.length=l.length-2*L,x.length=x.length-L,y.length=y.length-L}g(d,"popStack");function E(){var L;return L=_.pop()||S.lex()||D,typeof L!="number"&&(L instanceof Array&&(_=L,L=_.pop()),L=o.symbols_[L]||L),L}g(E,"lex");for(var A,$,I,e,f={},u,c,r,m;;){if($=l[l.length-1],this.defaultActions[$]?I=this.defaultActions[$]:((A===null||typeof A>"u")&&(A=E()),I=v[$]&&v[$][A]),typeof I>"u"||!I.length||!I[0]){var w="";m=[];for(u in v[$])this.terminals_[u]&&u>C&&m.push("'"+this.terminals_[u]+"'");S.showPosition?w="Parse error on line "+(T+1)+`: +`+S.showPosition()+` +Expecting `+m.join(", ")+", got '"+(this.terminals_[A]||A)+"'":w="Parse error on line "+(T+1)+": Unexpected "+(A==D?"end of input":"'"+(this.terminals_[A]||A)+"'"),this.parseError(w,{text:S.match,token:this.terminals_[A]||A,line:S.yylineno,loc:O,expected:m})}if(I[0]instanceof Array&&I.length>1)throw new Error("Parse Error: multiple actions possible at state: "+$+", token: "+A);switch(I[0]){case 1:l.push(A),x.push(S.yytext),y.push(S.yylloc),l.push(I[1]),A=null,N=S.yyleng,M=S.yytext,T=S.yylineno,O=S.yylloc;break;case 2:if(c=this.productions_[I[1]][1],f.$=x[x.length-c],f._$={first_line:y[y.length-(c||1)].first_line,last_line:y[y.length-1].last_line,first_column:y[y.length-(c||1)].first_column,last_column:y[y.length-1].last_column},z&&(f._$.range=[y[y.length-(c||1)].range[0],y[y.length-1].range[1]]),e=this.performAction.apply(f,[M,N,T,P.yy,I[1],x,y].concat(B)),typeof e<"u")return e;c&&(l=l.slice(0,-1*c*2),x=x.slice(0,-1*c),y=y.slice(0,-1*c)),l.push(this.productions_[I[1]][0]),x.push(f.$),y.push(f._$),r=v[l[l.length-2]][l[l.length-1]],l.push(r);break;case 3:return!0}}return!0},"parse")},b=(function(){var k={EOF:1,parseError:g(function(o,l){if(this.yy.parser)this.yy.parser.parseError(o,l);else throw new Error(o)},"parseError"),setInput:g(function(s,o){return this.yy=o||this.yy||{},this._input=s,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:g(function(){var s=this._input[0];this.yytext+=s,this.yyleng++,this.offset++,this.match+=s,this.matched+=s;var o=s.match(/(?:\r\n?|\n).*/g);return o?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),s},"input"),unput:g(function(s){var o=s.length,l=s.split(/(?:\r\n?|\n)/g);this._input=s+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-o),this.offset-=o;var _=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),l.length-1&&(this.yylineno-=l.length-1);var x=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:l?(l.length===_.length?this.yylloc.first_column:0)+_[_.length-l.length].length-l[0].length:this.yylloc.first_column-o},this.options.ranges&&(this.yylloc.range=[x[0],x[0]+this.yyleng-o]),this.yyleng=this.yytext.length,this},"unput"),more:g(function(){return this._more=!0,this},"more"),reject:g(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:g(function(s){this.unput(this.match.slice(s))},"less"),pastInput:g(function(){var s=this.matched.substr(0,this.matched.length-this.match.length);return(s.length>20?"...":"")+s.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:g(function(){var s=this.match;return s.length<20&&(s+=this._input.substr(0,20-s.length)),(s.substr(0,20)+(s.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:g(function(){var s=this.pastInput(),o=new Array(s.length+1).join("-");return s+this.upcomingInput()+` +`+o+"^"},"showPosition"),test_match:g(function(s,o){var l,_,x;if(this.options.backtrack_lexer&&(x={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&&(x.yylloc.range=this.yylloc.range.slice(0))),_=s[0].match(/(?:\r\n?|\n).*/g),_&&(this.yylineno+=_.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:_?_[_.length-1].length-_[_.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+s[0].length},this.yytext+=s[0],this.match+=s[0],this.matches=s,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(s[0].length),this.matched+=s[0],l=this.performAction.call(this,this.yy,this,o,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),l)return l;if(this._backtrack){for(var y in x)this[y]=x[y];return!1}return!1},"test_match"),next:g(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var s,o,l,_;this._more||(this.yytext="",this.match="");for(var x=this._currentRules(),y=0;yo[0].length)){if(o=l,_=y,this.options.backtrack_lexer){if(s=this.test_match(l,x[y]),s!==!1)return s;if(this._backtrack){o=!1;continue}else return!1}else if(!this.options.flex)break}return o?(s=this.test_match(o,x[_]),s!==!1?s:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:g(function(){var o=this.next();return o||this.lex()},"lex"),begin:g(function(o){this.conditionStack.push(o)},"begin"),popState:g(function(){var o=this.conditionStack.length-1;return o>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:g(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:g(function(o){return o=this.conditionStack.length-1-Math.abs(o||0),o>=0?this.conditionStack[o]:"INITIAL"},"topState"),pushState:g(function(o){this.begin(o)},"pushState"),stateStackSize:g(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:g(function(o,l,_,x){switch(_){case 0:return this.pushState("csv"),4;case 1:return this.pushState("csv"),4;case 2:return 10;case 3:return 5;case 4:return 12;case 5:return this.pushState("escaped_text"),18;case 6:return 20;case 7:return this.popState("escaped_text"),18;case 8:return 19}},"anonymous"),rules:[/^(?:sankey-beta\b)/i,/^(?:sankey\b)/i,/^(?:$)/i,/^(?:((\u000D\u000A)|(\u000A)))/i,/^(?:(\u002C))/i,/^(?:(\u0022))/i,/^(?:([\u0020-\u0021\u0023-\u002B\u002D-\u007E])*)/i,/^(?:(\u0022)(?!(\u0022)))/i,/^(?:(([\u0020-\u0021\u0023-\u002B\u002D-\u007E])|(\u002C)|(\u000D)|(\u000A)|(\u0022)(\u0022))*)/i],conditions:{csv:{rules:[2,3,4,5,6,7,8],inclusive:!1},escaped_text:{rules:[7,8],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8],inclusive:!0}}};return k})();h.lexer=b;function p(){this.yy={}}return g(p,"Parser"),p.prototype=h,h.Parser=p,new p})();st.parser=st;var H=st,Q=[],K=[],X=new Map,Qt=g(()=>{Q=[],K=[],X=new Map,Lt()},"clear"),Kt=class{constructor(t,n,i=0){this.source=t,this.target=n,this.value=i}static{g(this,"SankeyLink")}},Zt=g((t,n,i)=>{Q.push(new Kt(t,n,i))},"addLink"),Jt=class{constructor(t){this.ID=t}static{g(this,"SankeyNode")}},te=g(t=>{t=Et.sanitizeText(t,ot());let n=X.get(t);return n===void 0&&(n=new Jt(t),X.set(t,n),K.push(n)),n},"findOrCreateNode"),ee=g(()=>K,"getNodes"),ne=g(()=>Q,"getLinks"),ie=g(()=>({nodes:K.map(t=>({id:t.ID})),links:Q.map(t=>({source:t.source.ID,target:t.target.ID,value:t.value}))}),"getGraph"),se={nodesMap:X,getConfig:g(()=>ot().sankey,"getConfig"),getNodes:ee,getLinks:ne,getGraph:ie,addLink:Zt,findOrCreateNode:te,getAccTitle:bt,setAccTitle:vt,getAccDescription:xt,setAccDescription:_t,getDiagramTitle:kt,setDiagramTitle:mt,clear:Qt},yt=class rt{static{g(this,"Uid")}static{this.count=0}static next(n){return new rt(n+ ++rt.count)}constructor(n){this.id=n,this.href=`#${n}`}toString(){return"url("+this.href+")"}},re={left:It,right:Pt,center:Ct,justify:gt},oe=g(function(t,n,i,a){const{securityLevel:h,sankey:b}=ot(),p=wt.sankey;let k;h==="sandbox"&&(k=G("#i"+n));const s=h==="sandbox"?G(k.nodes()[0].contentDocument.body):G("body"),o=h==="sandbox"?s.select(`[id="${n}"]`):G(`[id="${n}"]`),l=b?.width??p.width,_=b?.height??p.width,x=b?.useMaxWidth??p.useMaxWidth,y=b?.nodeAlignment??p.nodeAlignment,v=b?.prefix??p.prefix,M=b?.suffix??p.suffix,T=b?.showValues??p.showValues,N=a.db.getGraph(),C=re[y];$t().nodeId(d=>d.id).nodeWidth(10).nodePadding(10+(T?15:0)).nodeAlign(C).extent([[0,0],[l,_]])(N);const S=At(Mt);o.append("g").attr("class","nodes").selectAll(".node").data(N.nodes).join("g").attr("class","node").attr("id",d=>(d.uid=yt.next("node-")).id).attr("transform",function(d){return"translate("+d.x0+","+d.y0+")"}).attr("x",d=>d.x0).attr("y",d=>d.y0).append("rect").attr("height",d=>d.y1-d.y0).attr("width",d=>d.x1-d.x0).attr("fill",d=>S(d.id));const P=g(({id:d,value:E})=>T?`${d} +${v}${Math.round(E*100)/100}${M}`:d,"getText");o.append("g").attr("class","node-labels").attr("font-size",14).selectAll("text").data(N.nodes).join("text").attr("x",d=>d.x0(d.y1+d.y0)/2).attr("dy",`${T?"0":"0.35"}em`).attr("text-anchor",d=>d.x0(E.uid=yt.next("linearGradient-")).id).attr("gradientUnits","userSpaceOnUse").attr("x1",E=>E.source.x1).attr("x2",E=>E.target.x0);d.append("stop").attr("offset","0%").attr("stop-color",E=>S(E.source.id)),d.append("stop").attr("offset","100%").attr("stop-color",E=>S(E.target.id))}let z;switch(O){case"gradient":z=g(d=>d.uid,"coloring");break;case"source":z=g(d=>S(d.source.id),"coloring");break;case"target":z=g(d=>S(d.target.id),"coloring");break;default:z=O}j.append("path").attr("d",Xt()).attr("stroke",z).attr("stroke-width",d=>Math.max(1,d.width)),St(void 0,o,0,x)},"draw"),ae={draw:oe},le=g(t=>t.replaceAll(/^[^\S\n\r]+|[^\S\n\r]+$/g,"").replaceAll(/([\n\r])+/g,` +`).trim(),"prepareTextForParsing"),ce=g(t=>`.label { + font-family: ${t.fontFamily}; + }`,"getStyles"),ue=ce,he=H.parse.bind(H);H.parse=t=>he(le(t));var pe={styles:ue,parser:H,db:se,renderer:ae};export{pe as diagram}; diff --git a/_astro/scroller.CbJqCWlR.js b/_astro/scroller.CbJqCWlR.js new file mode 100644 index 00000000..cda6e9f3 --- /dev/null +++ b/_astro/scroller.CbJqCWlR.js @@ -0,0 +1 @@ +const o=()=>{};let t=!1;try{const e=Object.defineProperty({},"passive",{get(){t=!0}});window.addEventListener("scroll",o,e),window.removeEventListener("scroll",o,e)}catch{}const s=t?{passive:!0}:!1;function n(e){return window.addEventListener("scroll",e,s),()=>window.removeEventListener("scroll",e)}export{n as o}; diff --git a/_astro/sequenceDiagram-WL72ISMW.DjG2Q87q.js b/_astro/sequenceDiagram-WL72ISMW.DjG2Q87q.js new file mode 100644 index 00000000..4578d88d --- /dev/null +++ b/_astro/sequenceDiagram-WL72ISMW.DjG2Q87q.js @@ -0,0 +1,145 @@ +import{a as me,b as Kt,g as ct,d as we,c as Xt,e as Jt}from"./chunk-TZMSLE5B.t1iciHUx.js";import{_ as f,n as ve,c as st,d as Nt,l as Q,j as ae,e as Ie,f as Le,k as I,b as ee,s as _e,p as Ae,a as ke,g as Pe,q as Ne,t as Se,J as Me,y as Re,i as St,u as W,L as z,M as Lt,N as re,Z as De,O as Ce,P as ie,E as zt}from"./mermaid.core.LbQlJBBQ.js";import{I as Oe}from"./chunk-QZHKN3VN.B7dpA8ra.js";import"./page._rMDHl_T.js";var Ht=(function(){var e=f(function(pt,v,A,L){for(A=A||{},L=pt.length;L--;A[pt[L]]=v);return A},"o"),t=[1,2],n=[1,3],s=[1,4],r=[2,4],i=[1,9],c=[1,11],h=[1,13],o=[1,14],a=[1,16],p=[1,17],g=[1,18],x=[1,24],y=[1,25],m=[1,26],w=[1,27],k=[1,28],N=[1,29],S=[1,30],O=[1,31],B=[1,32],q=[1,33],H=[1,34],Z=[1,35],at=[1,36],U=[1,37],G=[1,38],F=[1,39],D=[1,41],$=[1,42],K=[1,43],j=[1,44],rt=[1,45],R=[1,46],E=[1,4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,47,48,49,50,52,53,55,60,61,62,63,71],_=[2,71],X=[4,5,16,50,52,53],tt=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,50,52,53,55,60,61,62,63,71],M=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,49,50,52,53,55,60,61,62,63,71],Bt=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,48,50,52,53,55,60,61,62,63,71],Qt=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,47,50,52,53,55,60,61,62,63,71],ot=[69,70,71],lt=[1,127],Vt={trace:f(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SPACE:4,NEWLINE:5,SD:6,document:7,line:8,statement:9,box_section:10,box_line:11,participant_statement:12,create:13,box:14,restOfLine:15,end:16,signal:17,autonumber:18,NUM:19,off:20,activate:21,actor:22,deactivate:23,note_statement:24,links_statement:25,link_statement:26,properties_statement:27,details_statement:28,title:29,legacy_title:30,acc_title:31,acc_title_value:32,acc_descr:33,acc_descr_value:34,acc_descr_multiline_value:35,loop:36,rect:37,opt:38,alt:39,else_sections:40,par:41,par_sections:42,par_over:43,critical:44,option_sections:45,break:46,option:47,and:48,else:49,participant:50,AS:51,participant_actor:52,destroy:53,actor_with_config:54,note:55,placement:56,text2:57,over:58,actor_pair:59,links:60,link:61,properties:62,details:63,spaceList:64,",":65,left_of:66,right_of:67,signaltype:68,"+":69,"-":70,ACTOR:71,config_object:72,CONFIG_START:73,CONFIG_CONTENT:74,CONFIG_END:75,SOLID_OPEN_ARROW:76,DOTTED_OPEN_ARROW:77,SOLID_ARROW:78,BIDIRECTIONAL_SOLID_ARROW:79,DOTTED_ARROW:80,BIDIRECTIONAL_DOTTED_ARROW:81,SOLID_CROSS:82,DOTTED_CROSS:83,SOLID_POINT:84,DOTTED_POINT:85,TXT:86,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NEWLINE",6:"SD",13:"create",14:"box",15:"restOfLine",16:"end",18:"autonumber",19:"NUM",20:"off",21:"activate",23:"deactivate",29:"title",30:"legacy_title",31:"acc_title",32:"acc_title_value",33:"acc_descr",34:"acc_descr_value",35:"acc_descr_multiline_value",36:"loop",37:"rect",38:"opt",39:"alt",41:"par",43:"par_over",44:"critical",46:"break",47:"option",48:"and",49:"else",50:"participant",51:"AS",52:"participant_actor",53:"destroy",55:"note",58:"over",60:"links",61:"link",62:"properties",63:"details",65:",",66:"left_of",67:"right_of",69:"+",70:"-",71:"ACTOR",73:"CONFIG_START",74:"CONFIG_CONTENT",75:"CONFIG_END",76:"SOLID_OPEN_ARROW",77:"DOTTED_OPEN_ARROW",78:"SOLID_ARROW",79:"BIDIRECTIONAL_SOLID_ARROW",80:"DOTTED_ARROW",81:"BIDIRECTIONAL_DOTTED_ARROW",82:"SOLID_CROSS",83:"DOTTED_CROSS",84:"SOLID_POINT",85:"DOTTED_POINT",86:"TXT"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[10,0],[10,2],[11,2],[11,1],[11,1],[9,1],[9,2],[9,4],[9,2],[9,4],[9,3],[9,3],[9,2],[9,3],[9,3],[9,2],[9,2],[9,2],[9,2],[9,2],[9,1],[9,1],[9,2],[9,2],[9,1],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[45,1],[45,4],[42,1],[42,4],[40,1],[40,4],[12,5],[12,3],[12,5],[12,3],[12,3],[12,3],[24,4],[24,4],[25,3],[26,3],[27,3],[28,3],[64,2],[64,1],[59,3],[59,1],[56,1],[56,1],[17,5],[17,5],[17,4],[54,2],[72,3],[22,1],[68,1],[68,1],[68,1],[68,1],[68,1],[68,1],[68,1],[68,1],[68,1],[68,1],[57,1]],performAction:f(function(v,A,L,b,C,d,vt){var u=d.length-1;switch(C){case 3:return b.apply(d[u]),d[u];case 4:case 9:this.$=[];break;case 5:case 10:d[u-1].push(d[u]),this.$=d[u-1];break;case 6:case 7:case 11:case 12:this.$=d[u];break;case 8:case 13:this.$=[];break;case 15:d[u].type="createParticipant",this.$=d[u];break;case 16:d[u-1].unshift({type:"boxStart",boxData:b.parseBoxData(d[u-2])}),d[u-1].push({type:"boxEnd",boxText:d[u-2]}),this.$=d[u-1];break;case 18:this.$={type:"sequenceIndex",sequenceIndex:Number(d[u-2]),sequenceIndexStep:Number(d[u-1]),sequenceVisible:!0,signalType:b.LINETYPE.AUTONUMBER};break;case 19:this.$={type:"sequenceIndex",sequenceIndex:Number(d[u-1]),sequenceIndexStep:1,sequenceVisible:!0,signalType:b.LINETYPE.AUTONUMBER};break;case 20:this.$={type:"sequenceIndex",sequenceVisible:!1,signalType:b.LINETYPE.AUTONUMBER};break;case 21:this.$={type:"sequenceIndex",sequenceVisible:!0,signalType:b.LINETYPE.AUTONUMBER};break;case 22:this.$={type:"activeStart",signalType:b.LINETYPE.ACTIVE_START,actor:d[u-1].actor};break;case 23:this.$={type:"activeEnd",signalType:b.LINETYPE.ACTIVE_END,actor:d[u-1].actor};break;case 29:b.setDiagramTitle(d[u].substring(6)),this.$=d[u].substring(6);break;case 30:b.setDiagramTitle(d[u].substring(7)),this.$=d[u].substring(7);break;case 31:this.$=d[u].trim(),b.setAccTitle(this.$);break;case 32:case 33:this.$=d[u].trim(),b.setAccDescription(this.$);break;case 34:d[u-1].unshift({type:"loopStart",loopText:b.parseMessage(d[u-2]),signalType:b.LINETYPE.LOOP_START}),d[u-1].push({type:"loopEnd",loopText:d[u-2],signalType:b.LINETYPE.LOOP_END}),this.$=d[u-1];break;case 35:d[u-1].unshift({type:"rectStart",color:b.parseMessage(d[u-2]),signalType:b.LINETYPE.RECT_START}),d[u-1].push({type:"rectEnd",color:b.parseMessage(d[u-2]),signalType:b.LINETYPE.RECT_END}),this.$=d[u-1];break;case 36:d[u-1].unshift({type:"optStart",optText:b.parseMessage(d[u-2]),signalType:b.LINETYPE.OPT_START}),d[u-1].push({type:"optEnd",optText:b.parseMessage(d[u-2]),signalType:b.LINETYPE.OPT_END}),this.$=d[u-1];break;case 37:d[u-1].unshift({type:"altStart",altText:b.parseMessage(d[u-2]),signalType:b.LINETYPE.ALT_START}),d[u-1].push({type:"altEnd",signalType:b.LINETYPE.ALT_END}),this.$=d[u-1];break;case 38:d[u-1].unshift({type:"parStart",parText:b.parseMessage(d[u-2]),signalType:b.LINETYPE.PAR_START}),d[u-1].push({type:"parEnd",signalType:b.LINETYPE.PAR_END}),this.$=d[u-1];break;case 39:d[u-1].unshift({type:"parStart",parText:b.parseMessage(d[u-2]),signalType:b.LINETYPE.PAR_OVER_START}),d[u-1].push({type:"parEnd",signalType:b.LINETYPE.PAR_END}),this.$=d[u-1];break;case 40:d[u-1].unshift({type:"criticalStart",criticalText:b.parseMessage(d[u-2]),signalType:b.LINETYPE.CRITICAL_START}),d[u-1].push({type:"criticalEnd",signalType:b.LINETYPE.CRITICAL_END}),this.$=d[u-1];break;case 41:d[u-1].unshift({type:"breakStart",breakText:b.parseMessage(d[u-2]),signalType:b.LINETYPE.BREAK_START}),d[u-1].push({type:"breakEnd",optText:b.parseMessage(d[u-2]),signalType:b.LINETYPE.BREAK_END}),this.$=d[u-1];break;case 43:this.$=d[u-3].concat([{type:"option",optionText:b.parseMessage(d[u-1]),signalType:b.LINETYPE.CRITICAL_OPTION},d[u]]);break;case 45:this.$=d[u-3].concat([{type:"and",parText:b.parseMessage(d[u-1]),signalType:b.LINETYPE.PAR_AND},d[u]]);break;case 47:this.$=d[u-3].concat([{type:"else",altText:b.parseMessage(d[u-1]),signalType:b.LINETYPE.ALT_ELSE},d[u]]);break;case 48:d[u-3].draw="participant",d[u-3].type="addParticipant",d[u-3].description=b.parseMessage(d[u-1]),this.$=d[u-3];break;case 49:d[u-1].draw="participant",d[u-1].type="addParticipant",this.$=d[u-1];break;case 50:d[u-3].draw="actor",d[u-3].type="addParticipant",d[u-3].description=b.parseMessage(d[u-1]),this.$=d[u-3];break;case 51:d[u-1].draw="actor",d[u-1].type="addParticipant",this.$=d[u-1];break;case 52:d[u-1].type="destroyParticipant",this.$=d[u-1];break;case 53:d[u-1].draw="participant",d[u-1].type="addParticipant",this.$=d[u-1];break;case 54:this.$=[d[u-1],{type:"addNote",placement:d[u-2],actor:d[u-1].actor,text:d[u]}];break;case 55:d[u-2]=[].concat(d[u-1],d[u-1]).slice(0,2),d[u-2][0]=d[u-2][0].actor,d[u-2][1]=d[u-2][1].actor,this.$=[d[u-1],{type:"addNote",placement:b.PLACEMENT.OVER,actor:d[u-2].slice(0,2),text:d[u]}];break;case 56:this.$=[d[u-1],{type:"addLinks",actor:d[u-1].actor,text:d[u]}];break;case 57:this.$=[d[u-1],{type:"addALink",actor:d[u-1].actor,text:d[u]}];break;case 58:this.$=[d[u-1],{type:"addProperties",actor:d[u-1].actor,text:d[u]}];break;case 59:this.$=[d[u-1],{type:"addDetails",actor:d[u-1].actor,text:d[u]}];break;case 62:this.$=[d[u-2],d[u]];break;case 63:this.$=d[u];break;case 64:this.$=b.PLACEMENT.LEFTOF;break;case 65:this.$=b.PLACEMENT.RIGHTOF;break;case 66:this.$=[d[u-4],d[u-1],{type:"addMessage",from:d[u-4].actor,to:d[u-1].actor,signalType:d[u-3],msg:d[u],activate:!0},{type:"activeStart",signalType:b.LINETYPE.ACTIVE_START,actor:d[u-1].actor}];break;case 67:this.$=[d[u-4],d[u-1],{type:"addMessage",from:d[u-4].actor,to:d[u-1].actor,signalType:d[u-3],msg:d[u]},{type:"activeEnd",signalType:b.LINETYPE.ACTIVE_END,actor:d[u-4].actor}];break;case 68:this.$=[d[u-3],d[u-1],{type:"addMessage",from:d[u-3].actor,to:d[u-1].actor,signalType:d[u-2],msg:d[u]}];break;case 69:this.$={type:"addParticipant",actor:d[u-1],config:d[u]};break;case 70:this.$=d[u-1].trim();break;case 71:this.$={type:"addParticipant",actor:d[u]};break;case 72:this.$=b.LINETYPE.SOLID_OPEN;break;case 73:this.$=b.LINETYPE.DOTTED_OPEN;break;case 74:this.$=b.LINETYPE.SOLID;break;case 75:this.$=b.LINETYPE.BIDIRECTIONAL_SOLID;break;case 76:this.$=b.LINETYPE.DOTTED;break;case 77:this.$=b.LINETYPE.BIDIRECTIONAL_DOTTED;break;case 78:this.$=b.LINETYPE.SOLID_CROSS;break;case 79:this.$=b.LINETYPE.DOTTED_CROSS;break;case 80:this.$=b.LINETYPE.SOLID_POINT;break;case 81:this.$=b.LINETYPE.DOTTED_POINT;break;case 82:this.$=b.parseMessage(d[u].trim().substring(1));break}},"anonymous"),table:[{3:1,4:t,5:n,6:s},{1:[3]},{3:5,4:t,5:n,6:s},{3:6,4:t,5:n,6:s},e([1,4,5,13,14,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,50,52,53,55,60,61,62,63,71],r,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:i,5:c,8:8,9:10,12:12,13:h,14:o,17:15,18:a,21:p,22:40,23:g,24:19,25:20,26:21,27:22,28:23,29:x,30:y,31:m,33:w,35:k,36:N,37:S,38:O,39:B,41:q,43:H,44:Z,46:at,50:U,52:G,53:F,55:D,60:$,61:K,62:j,63:rt,71:R},e(E,[2,5]),{9:47,12:12,13:h,14:o,17:15,18:a,21:p,22:40,23:g,24:19,25:20,26:21,27:22,28:23,29:x,30:y,31:m,33:w,35:k,36:N,37:S,38:O,39:B,41:q,43:H,44:Z,46:at,50:U,52:G,53:F,55:D,60:$,61:K,62:j,63:rt,71:R},e(E,[2,7]),e(E,[2,8]),e(E,[2,14]),{12:48,50:U,52:G,53:F},{15:[1,49]},{5:[1,50]},{5:[1,53],19:[1,51],20:[1,52]},{22:54,71:R},{22:55,71:R},{5:[1,56]},{5:[1,57]},{5:[1,58]},{5:[1,59]},{5:[1,60]},e(E,[2,29]),e(E,[2,30]),{32:[1,61]},{34:[1,62]},e(E,[2,33]),{15:[1,63]},{15:[1,64]},{15:[1,65]},{15:[1,66]},{15:[1,67]},{15:[1,68]},{15:[1,69]},{15:[1,70]},{22:71,54:72,71:[1,73]},{22:74,71:R},{22:75,71:R},{68:76,76:[1,77],77:[1,78],78:[1,79],79:[1,80],80:[1,81],81:[1,82],82:[1,83],83:[1,84],84:[1,85],85:[1,86]},{56:87,58:[1,88],66:[1,89],67:[1,90]},{22:91,71:R},{22:92,71:R},{22:93,71:R},{22:94,71:R},e([5,51,65,76,77,78,79,80,81,82,83,84,85,86],_),e(E,[2,6]),e(E,[2,15]),e(X,[2,9],{10:95}),e(E,[2,17]),{5:[1,97],19:[1,96]},{5:[1,98]},e(E,[2,21]),{5:[1,99]},{5:[1,100]},e(E,[2,24]),e(E,[2,25]),e(E,[2,26]),e(E,[2,27]),e(E,[2,28]),e(E,[2,31]),e(E,[2,32]),e(tt,r,{7:101}),e(tt,r,{7:102}),e(tt,r,{7:103}),e(M,r,{40:104,7:105}),e(Bt,r,{42:106,7:107}),e(Bt,r,{7:107,42:108}),e(Qt,r,{45:109,7:110}),e(tt,r,{7:111}),{5:[1,113],51:[1,112]},{5:[1,114]},e([5,51],_,{72:115,73:[1,116]}),{5:[1,118],51:[1,117]},{5:[1,119]},{22:122,69:[1,120],70:[1,121],71:R},e(ot,[2,72]),e(ot,[2,73]),e(ot,[2,74]),e(ot,[2,75]),e(ot,[2,76]),e(ot,[2,77]),e(ot,[2,78]),e(ot,[2,79]),e(ot,[2,80]),e(ot,[2,81]),{22:123,71:R},{22:125,59:124,71:R},{71:[2,64]},{71:[2,65]},{57:126,86:lt},{57:128,86:lt},{57:129,86:lt},{57:130,86:lt},{4:[1,133],5:[1,135],11:132,12:134,16:[1,131],50:U,52:G,53:F},{5:[1,136]},e(E,[2,19]),e(E,[2,20]),e(E,[2,22]),e(E,[2,23]),{4:i,5:c,8:8,9:10,12:12,13:h,14:o,16:[1,137],17:15,18:a,21:p,22:40,23:g,24:19,25:20,26:21,27:22,28:23,29:x,30:y,31:m,33:w,35:k,36:N,37:S,38:O,39:B,41:q,43:H,44:Z,46:at,50:U,52:G,53:F,55:D,60:$,61:K,62:j,63:rt,71:R},{4:i,5:c,8:8,9:10,12:12,13:h,14:o,16:[1,138],17:15,18:a,21:p,22:40,23:g,24:19,25:20,26:21,27:22,28:23,29:x,30:y,31:m,33:w,35:k,36:N,37:S,38:O,39:B,41:q,43:H,44:Z,46:at,50:U,52:G,53:F,55:D,60:$,61:K,62:j,63:rt,71:R},{4:i,5:c,8:8,9:10,12:12,13:h,14:o,16:[1,139],17:15,18:a,21:p,22:40,23:g,24:19,25:20,26:21,27:22,28:23,29:x,30:y,31:m,33:w,35:k,36:N,37:S,38:O,39:B,41:q,43:H,44:Z,46:at,50:U,52:G,53:F,55:D,60:$,61:K,62:j,63:rt,71:R},{16:[1,140]},{4:i,5:c,8:8,9:10,12:12,13:h,14:o,16:[2,46],17:15,18:a,21:p,22:40,23:g,24:19,25:20,26:21,27:22,28:23,29:x,30:y,31:m,33:w,35:k,36:N,37:S,38:O,39:B,41:q,43:H,44:Z,46:at,49:[1,141],50:U,52:G,53:F,55:D,60:$,61:K,62:j,63:rt,71:R},{16:[1,142]},{4:i,5:c,8:8,9:10,12:12,13:h,14:o,16:[2,44],17:15,18:a,21:p,22:40,23:g,24:19,25:20,26:21,27:22,28:23,29:x,30:y,31:m,33:w,35:k,36:N,37:S,38:O,39:B,41:q,43:H,44:Z,46:at,48:[1,143],50:U,52:G,53:F,55:D,60:$,61:K,62:j,63:rt,71:R},{16:[1,144]},{16:[1,145]},{4:i,5:c,8:8,9:10,12:12,13:h,14:o,16:[2,42],17:15,18:a,21:p,22:40,23:g,24:19,25:20,26:21,27:22,28:23,29:x,30:y,31:m,33:w,35:k,36:N,37:S,38:O,39:B,41:q,43:H,44:Z,46:at,47:[1,146],50:U,52:G,53:F,55:D,60:$,61:K,62:j,63:rt,71:R},{4:i,5:c,8:8,9:10,12:12,13:h,14:o,16:[1,147],17:15,18:a,21:p,22:40,23:g,24:19,25:20,26:21,27:22,28:23,29:x,30:y,31:m,33:w,35:k,36:N,37:S,38:O,39:B,41:q,43:H,44:Z,46:at,50:U,52:G,53:F,55:D,60:$,61:K,62:j,63:rt,71:R},{15:[1,148]},e(E,[2,49]),e(E,[2,53]),{5:[2,69]},{74:[1,149]},{15:[1,150]},e(E,[2,51]),e(E,[2,52]),{22:151,71:R},{22:152,71:R},{57:153,86:lt},{57:154,86:lt},{57:155,86:lt},{65:[1,156],86:[2,63]},{5:[2,56]},{5:[2,82]},{5:[2,57]},{5:[2,58]},{5:[2,59]},e(E,[2,16]),e(X,[2,10]),{12:157,50:U,52:G,53:F},e(X,[2,12]),e(X,[2,13]),e(E,[2,18]),e(E,[2,34]),e(E,[2,35]),e(E,[2,36]),e(E,[2,37]),{15:[1,158]},e(E,[2,38]),{15:[1,159]},e(E,[2,39]),e(E,[2,40]),{15:[1,160]},e(E,[2,41]),{5:[1,161]},{75:[1,162]},{5:[1,163]},{57:164,86:lt},{57:165,86:lt},{5:[2,68]},{5:[2,54]},{5:[2,55]},{22:166,71:R},e(X,[2,11]),e(M,r,{7:105,40:167}),e(Bt,r,{7:107,42:168}),e(Qt,r,{7:110,45:169}),e(E,[2,48]),{5:[2,70]},e(E,[2,50]),{5:[2,66]},{5:[2,67]},{86:[2,62]},{16:[2,47]},{16:[2,45]},{16:[2,43]}],defaultActions:{5:[2,1],6:[2,2],89:[2,64],90:[2,65],115:[2,69],126:[2,56],127:[2,82],128:[2,57],129:[2,58],130:[2,59],153:[2,68],154:[2,54],155:[2,55],162:[2,70],164:[2,66],165:[2,67],166:[2,62],167:[2,47],168:[2,45],169:[2,43]},parseError:f(function(v,A){if(A.recoverable)this.trace(v);else{var L=new Error(v);throw L.hash=A,L}},"parseError"),parse:f(function(v){var A=this,L=[0],b=[],C=[null],d=[],vt=this.table,u="",At=0,Zt=0,ye=2,$t=1,Te=d.slice.call(arguments,1),Y=Object.create(this.lexer),ft={yy:{}};for(var Yt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Yt)&&(ft.yy[Yt]=this.yy[Yt]);Y.setInput(v,ft.yy),ft.yy.lexer=Y,ft.yy.parser=this,typeof Y.yylloc>"u"&&(Y.yylloc={});var Wt=Y.yylloc;d.push(Wt);var Ee=Y.options&&Y.options.ranges;typeof ft.yy.parseError=="function"?this.parseError=ft.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function be(et){L.length=L.length-2*et,C.length=C.length-et,d.length=d.length-et}f(be,"popStack");function jt(){var et;return et=b.pop()||Y.lex()||$t,typeof et!="number"&&(et instanceof Array&&(b=et,et=b.pop()),et=A.symbols_[et]||et),et}f(jt,"lex");for(var J,yt,it,Ft,bt={},kt,ht,te,Pt;;){if(yt=L[L.length-1],this.defaultActions[yt]?it=this.defaultActions[yt]:((J===null||typeof J>"u")&&(J=jt()),it=vt[yt]&&vt[yt][J]),typeof it>"u"||!it.length||!it[0]){var qt="";Pt=[];for(kt in vt[yt])this.terminals_[kt]&&kt>ye&&Pt.push("'"+this.terminals_[kt]+"'");Y.showPosition?qt="Parse error on line "+(At+1)+`: +`+Y.showPosition()+` +Expecting `+Pt.join(", ")+", got '"+(this.terminals_[J]||J)+"'":qt="Parse error on line "+(At+1)+": Unexpected "+(J==$t?"end of input":"'"+(this.terminals_[J]||J)+"'"),this.parseError(qt,{text:Y.match,token:this.terminals_[J]||J,line:Y.yylineno,loc:Wt,expected:Pt})}if(it[0]instanceof Array&&it.length>1)throw new Error("Parse Error: multiple actions possible at state: "+yt+", token: "+J);switch(it[0]){case 1:L.push(J),C.push(Y.yytext),d.push(Y.yylloc),L.push(it[1]),J=null,Zt=Y.yyleng,u=Y.yytext,At=Y.yylineno,Wt=Y.yylloc;break;case 2:if(ht=this.productions_[it[1]][1],bt.$=C[C.length-ht],bt._$={first_line:d[d.length-(ht||1)].first_line,last_line:d[d.length-1].last_line,first_column:d[d.length-(ht||1)].first_column,last_column:d[d.length-1].last_column},Ee&&(bt._$.range=[d[d.length-(ht||1)].range[0],d[d.length-1].range[1]]),Ft=this.performAction.apply(bt,[u,Zt,At,ft.yy,it[1],C,d].concat(Te)),typeof Ft<"u")return Ft;ht&&(L=L.slice(0,-1*ht*2),C=C.slice(0,-1*ht),d=d.slice(0,-1*ht)),L.push(this.productions_[it[1]][0]),C.push(bt.$),d.push(bt._$),te=vt[L[L.length-2]][L[L.length-1]],L.push(te);break;case 3:return!0}}return!0},"parse")},fe=(function(){var pt={EOF:1,parseError:f(function(A,L){if(this.yy.parser)this.yy.parser.parseError(A,L);else throw new Error(A)},"parseError"),setInput:f(function(v,A){return this.yy=A||this.yy||{},this._input=v,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:f(function(){var v=this._input[0];this.yytext+=v,this.yyleng++,this.offset++,this.match+=v,this.matched+=v;var A=v.match(/(?:\r\n?|\n).*/g);return A?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),v},"input"),unput:f(function(v){var A=v.length,L=v.split(/(?:\r\n?|\n)/g);this._input=v+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-A),this.offset-=A;var b=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),L.length-1&&(this.yylineno-=L.length-1);var C=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:L?(L.length===b.length?this.yylloc.first_column:0)+b[b.length-L.length].length-L[0].length:this.yylloc.first_column-A},this.options.ranges&&(this.yylloc.range=[C[0],C[0]+this.yyleng-A]),this.yyleng=this.yytext.length,this},"unput"),more:f(function(){return this._more=!0,this},"more"),reject:f(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:f(function(v){this.unput(this.match.slice(v))},"less"),pastInput:f(function(){var v=this.matched.substr(0,this.matched.length-this.match.length);return(v.length>20?"...":"")+v.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:f(function(){var v=this.match;return v.length<20&&(v+=this._input.substr(0,20-v.length)),(v.substr(0,20)+(v.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:f(function(){var v=this.pastInput(),A=new Array(v.length+1).join("-");return v+this.upcomingInput()+` +`+A+"^"},"showPosition"),test_match:f(function(v,A){var L,b,C;if(this.options.backtrack_lexer&&(C={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&&(C.yylloc.range=this.yylloc.range.slice(0))),b=v[0].match(/(?:\r\n?|\n).*/g),b&&(this.yylineno+=b.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:b?b[b.length-1].length-b[b.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+v[0].length},this.yytext+=v[0],this.match+=v[0],this.matches=v,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(v[0].length),this.matched+=v[0],L=this.performAction.call(this,this.yy,this,A,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),L)return L;if(this._backtrack){for(var d in C)this[d]=C[d];return!1}return!1},"test_match"),next:f(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var v,A,L,b;this._more||(this.yytext="",this.match="");for(var C=this._currentRules(),d=0;dA[0].length)){if(A=L,b=d,this.options.backtrack_lexer){if(v=this.test_match(L,C[d]),v!==!1)return v;if(this._backtrack){A=!1;continue}else return!1}else if(!this.options.flex)break}return A?(v=this.test_match(A,C[b]),v!==!1?v:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:f(function(){var A=this.next();return A||this.lex()},"lex"),begin:f(function(A){this.conditionStack.push(A)},"begin"),popState:f(function(){var A=this.conditionStack.length-1;return A>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:f(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:f(function(A){return A=this.conditionStack.length-1-Math.abs(A||0),A>=0?this.conditionStack[A]:"INITIAL"},"topState"),pushState:f(function(A){this.begin(A)},"pushState"),stateStackSize:f(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:f(function(A,L,b,C){switch(b){case 0:return 5;case 1:break;case 2:break;case 3:break;case 4:break;case 5:break;case 6:return 19;case 7:return this.begin("CONFIG"),73;case 8:return 74;case 9:return this.popState(),this.popState(),75;case 10:return L.yytext=L.yytext.trim(),71;case 11:return L.yytext=L.yytext.trim(),this.begin("ALIAS"),71;case 12:return this.begin("LINE"),14;case 13:return this.begin("ID"),50;case 14:return this.begin("ID"),52;case 15:return 13;case 16:return this.begin("ID"),53;case 17:return L.yytext=L.yytext.trim(),this.begin("ALIAS"),71;case 18:return this.popState(),this.popState(),this.begin("LINE"),51;case 19:return this.popState(),this.popState(),5;case 20:return this.begin("LINE"),36;case 21:return this.begin("LINE"),37;case 22:return this.begin("LINE"),38;case 23:return this.begin("LINE"),39;case 24:return this.begin("LINE"),49;case 25:return this.begin("LINE"),41;case 26:return this.begin("LINE"),43;case 27:return this.begin("LINE"),48;case 28:return this.begin("LINE"),44;case 29:return this.begin("LINE"),47;case 30:return this.begin("LINE"),46;case 31:return this.popState(),15;case 32:return 16;case 33:return 66;case 34:return 67;case 35:return 60;case 36:return 61;case 37:return 62;case 38:return 63;case 39:return 58;case 40:return 55;case 41:return this.begin("ID"),21;case 42:return this.begin("ID"),23;case 43:return 29;case 44:return 30;case 45:return this.begin("acc_title"),31;case 46:return this.popState(),"acc_title_value";case 47:return this.begin("acc_descr"),33;case 48:return this.popState(),"acc_descr_value";case 49:this.begin("acc_descr_multiline");break;case 50:this.popState();break;case 51:return"acc_descr_multiline_value";case 52:return 6;case 53:return 18;case 54:return 20;case 55:return 65;case 56:return 5;case 57:return L.yytext=L.yytext.trim(),71;case 58:return 78;case 59:return 79;case 60:return 80;case 61:return 81;case 62:return 76;case 63:return 77;case 64:return 82;case 65:return 83;case 66:return 84;case 67:return 85;case 68:return 86;case 69:return 86;case 70:return 69;case 71:return 70;case 72:return 5;case 73:return"INVALID"}},"anonymous"),rules:[/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[0-9]+(?=[ \n]+))/i,/^(?:@\{)/i,/^(?:[^\}]+)/i,/^(?:\})/i,/^(?:[^\<->\->:\n,;@\s]+(?=@\{))/i,/^(?:[^\<->\->:\n,;@]+?([\-]*[^\<->\->:\n,;@]+?)*?(?=((?!\n)\s)+as(?!\n)\s|[#\n;]|$))/i,/^(?:box\b)/i,/^(?:participant\b)/i,/^(?:actor\b)/i,/^(?:create\b)/i,/^(?:destroy\b)/i,/^(?:[^<\->\->:\n,;]+?([\-]*[^<\->\->:\n,;]+?)*?(?=((?!\n)\s)+as(?!\n)\s|[#\n;]|$))/i,/^(?:as\b)/i,/^(?:(?:))/i,/^(?:loop\b)/i,/^(?:rect\b)/i,/^(?:opt\b)/i,/^(?:alt\b)/i,/^(?:else\b)/i,/^(?:par\b)/i,/^(?:par_over\b)/i,/^(?:and\b)/i,/^(?:critical\b)/i,/^(?:option\b)/i,/^(?:break\b)/i,/^(?:(?:[:]?(?:no)?wrap)?[^#\n;]*)/i,/^(?:end\b)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:links\b)/i,/^(?:link\b)/i,/^(?:properties\b)/i,/^(?:details\b)/i,/^(?:over\b)/i,/^(?:note\b)/i,/^(?:activate\b)/i,/^(?:deactivate\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:title:\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:sequenceDiagram\b)/i,/^(?:autonumber\b)/i,/^(?:off\b)/i,/^(?:,)/i,/^(?:;)/i,/^(?:[^+<\->\->:\n,;]+((?!(-x|--x|-\)|--\)))[\-]*[^\+<\->\->:\n,;]+)*)/i,/^(?:->>)/i,/^(?:<<->>)/i,/^(?:-->>)/i,/^(?:<<-->>)/i,/^(?:->)/i,/^(?:-->)/i,/^(?:-[x])/i,/^(?:--[x])/i,/^(?:-[\)])/i,/^(?:--[\)])/i,/^(?::(?:(?:no)?wrap)?[^#\n;]*)/i,/^(?::)/i,/^(?:\+)/i,/^(?:-)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[50,51],inclusive:!1},acc_descr:{rules:[48],inclusive:!1},acc_title:{rules:[46],inclusive:!1},ID:{rules:[2,3,7,10,11,17],inclusive:!1},ALIAS:{rules:[2,3,18,19],inclusive:!1},LINE:{rules:[2,3,31],inclusive:!1},CONFIG:{rules:[8,9],inclusive:!1},CONFIG_DATA:{rules:[],inclusive:!1},INITIAL:{rules:[0,1,3,4,5,6,12,13,14,15,16,20,21,22,23,24,25,26,27,28,29,30,32,33,34,35,36,37,38,39,40,41,42,43,44,45,47,49,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73],inclusive:!0}}};return pt})();Vt.lexer=fe;function _t(){this.yy={}}return f(_t,"Parser"),_t.prototype=Vt,Vt.Parser=_t,new _t})();Ht.parser=Ht;var Be=Ht,Ve={SOLID:0,DOTTED:1,NOTE:2,SOLID_CROSS:3,DOTTED_CROSS:4,SOLID_OPEN:5,DOTTED_OPEN:6,LOOP_START:10,LOOP_END:11,ALT_START:12,ALT_ELSE:13,ALT_END:14,OPT_START:15,OPT_END:16,ACTIVE_START:17,ACTIVE_END:18,PAR_START:19,PAR_AND:20,PAR_END:21,RECT_START:22,RECT_END:23,SOLID_POINT:24,DOTTED_POINT:25,AUTONUMBER:26,CRITICAL_START:27,CRITICAL_OPTION:28,CRITICAL_END:29,BREAK_START:30,BREAK_END:31,PAR_OVER_START:32,BIDIRECTIONAL_SOLID:33,BIDIRECTIONAL_DOTTED:34},Ye={FILLED:0,OPEN:1},We={LEFTOF:0,RIGHTOF:1,OVER:2},Mt={ACTOR:"actor",CONTROL:"control",DATABASE:"database",ENTITY:"entity"},Fe=class{constructor(){this.state=new Oe(()=>({prevActor:void 0,actors:new Map,createdActors:new Map,destroyedActors:new Map,boxes:[],messages:[],notes:[],sequenceNumbersEnabled:!1,wrapEnabled:void 0,currentBox:void 0,lastCreated:void 0,lastDestroyed:void 0})),this.setAccTitle=ee,this.setAccDescription=_e,this.setDiagramTitle=Ae,this.getAccTitle=ke,this.getAccDescription=Pe,this.getDiagramTitle=Ne,this.apply=this.apply.bind(this),this.parseBoxData=this.parseBoxData.bind(this),this.parseMessage=this.parseMessage.bind(this),this.clear(),this.setWrap(st().wrap),this.LINETYPE=Ve,this.ARROWTYPE=Ye,this.PLACEMENT=We}static{f(this,"SequenceDB")}addBox(e){this.state.records.boxes.push({name:e.text,wrap:e.wrap??this.autoWrap(),fill:e.color,actorKeys:[]}),this.state.records.currentBox=this.state.records.boxes.slice(-1)[0]}addActor(e,t,n,s,r){let i=this.state.records.currentBox,c;if(r!==void 0){let o;r.includes(` +`)?o=r+` +`:o=`{ +`+r+` +}`,c=Se(o,{schema:Me})}s=c?.type??s;const h=this.state.records.actors.get(e);if(h){if(this.state.records.currentBox&&h.box&&this.state.records.currentBox!==h.box)throw new Error(`A same participant should only be defined in one Box: ${h.name} can't be in '${h.box.name}' and in '${this.state.records.currentBox.name}' at the same time.`);if(i=h.box?h.box:this.state.records.currentBox,h.box=i,h&&t===h.name&&n==null)return}if(n?.text==null&&(n={text:t,type:s}),(s==null||n.text==null)&&(n={text:t,type:s}),this.state.records.actors.set(e,{box:i,name:t,description:n.text,wrap:n.wrap??this.autoWrap(),prevActor:this.state.records.prevActor,links:{},properties:{},actorCnt:null,rectData:null,type:s??"participant"}),this.state.records.prevActor){const o=this.state.records.actors.get(this.state.records.prevActor);o&&(o.nextActor=e)}this.state.records.currentBox&&this.state.records.currentBox.actorKeys.push(e),this.state.records.prevActor=e}activationCount(e){let t,n=0;if(!e)return 0;for(t=0;t>-",token:"->>-",line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["'ACTIVE_PARTICIPANT'"]},c}return this.state.records.messages.push({id:this.state.records.messages.length.toString(),from:e,to:t,message:n?.text??"",wrap:n?.wrap??this.autoWrap(),type:s,activate:r}),!0}hasAtLeastOneBox(){return this.state.records.boxes.length>0}hasAtLeastOneBoxWithTitle(){return this.state.records.boxes.some(e=>e.name)}getMessages(){return this.state.records.messages}getBoxes(){return this.state.records.boxes}getActors(){return this.state.records.actors}getCreatedActors(){return this.state.records.createdActors}getDestroyedActors(){return this.state.records.destroyedActors}getActor(e){return this.state.records.actors.get(e)}getActorKeys(){return[...this.state.records.actors.keys()]}enableSequenceNumbers(){this.state.records.sequenceNumbersEnabled=!0}disableSequenceNumbers(){this.state.records.sequenceNumbersEnabled=!1}showSequenceNumbers(){return this.state.records.sequenceNumbersEnabled}setWrap(e){this.state.records.wrapEnabled=e}extractWrap(e){if(e===void 0)return{};e=e.trim();const t=/^:?wrap:/.exec(e)!==null?!0:/^:?nowrap:/.exec(e)!==null?!1:void 0;return{cleanedText:(t===void 0?e:e.replace(/^:?(?:no)?wrap:/,"")).trim(),wrap:t}}autoWrap(){return this.state.records.wrapEnabled!==void 0?this.state.records.wrapEnabled:st().sequence?.wrap??!1}clear(){this.state.reset(),Re()}parseMessage(e){const t=e.trim(),{wrap:n,cleanedText:s}=this.extractWrap(t),r={text:s,wrap:n};return Q.debug(`parseMessage: ${JSON.stringify(r)}`),r}parseBoxData(e){const t=/^((?:rgba?|hsla?)\s*\(.*\)|\w*)(.*)$/.exec(e);let n=t?.[1]?t[1].trim():"transparent",s=t?.[2]?t[2].trim():void 0;if(window?.CSS)window.CSS.supports("color",n)||(n="transparent",s=e.trim());else{const c=new Option().style;c.color=n,c.color!==n&&(n="transparent",s=e.trim())}const{wrap:r,cleanedText:i}=this.extractWrap(s);return{text:i?St(i,st()):void 0,color:n,wrap:r}}addNote(e,t,n){const s={actor:e,placement:t,message:n.text,wrap:n.wrap??this.autoWrap()},r=[].concat(e,e);this.state.records.notes.push(s),this.state.records.messages.push({id:this.state.records.messages.length.toString(),from:r[0],to:r[1],message:n.text,wrap:n.wrap??this.autoWrap(),type:this.LINETYPE.NOTE,placement:t})}addLinks(e,t){const n=this.getActor(e);try{let s=St(t.text,st());s=s.replace(/=/g,"="),s=s.replace(/&/g,"&");const r=JSON.parse(s);this.insertLinks(n,r)}catch(s){Q.error("error while parsing actor link text",s)}}addALink(e,t){const n=this.getActor(e);try{const s={};let r=St(t.text,st());const i=r.indexOf("@");r=r.replace(/=/g,"="),r=r.replace(/&/g,"&");const c=r.slice(0,i-1).trim(),h=r.slice(i+1).trim();s[c]=h,this.insertLinks(n,s)}catch(s){Q.error("error while parsing actor link text",s)}}insertLinks(e,t){if(e.links==null)e.links=t;else for(const n in t)e.links[n]=t[n]}addProperties(e,t){const n=this.getActor(e);try{const s=St(t.text,st()),r=JSON.parse(s);this.insertProperties(n,r)}catch(s){Q.error("error while parsing actor properties text",s)}}insertProperties(e,t){if(e.properties==null)e.properties=t;else for(const n in t)e.properties[n]=t[n]}boxEnd(){this.state.records.currentBox=void 0}addDetails(e,t){const n=this.getActor(e),s=document.getElementById(t.text);try{const r=s.innerHTML,i=JSON.parse(r);i.properties&&this.insertProperties(n,i.properties),i.links&&this.insertLinks(n,i.links)}catch(r){Q.error("error while parsing actor details text",r)}}getActorProperty(e,t){if(e?.properties!==void 0)return e.properties[t]}apply(e){if(Array.isArray(e))e.forEach(t=>{this.apply(t)});else switch(e.type){case"sequenceIndex":this.state.records.messages.push({id:this.state.records.messages.length.toString(),from:void 0,to:void 0,message:{start:e.sequenceIndex,step:e.sequenceIndexStep,visible:e.sequenceVisible},wrap:!1,type:e.signalType});break;case"addParticipant":this.addActor(e.actor,e.actor,e.description,e.draw,e.config);break;case"createParticipant":if(this.state.records.actors.has(e.actor))throw new Error("It is not possible to have actors with the same id, even if one is destroyed before the next is created. Use 'AS' aliases to simulate the behavior");this.state.records.lastCreated=e.actor,this.addActor(e.actor,e.actor,e.description,e.draw,e.config),this.state.records.createdActors.set(e.actor,this.state.records.messages.length);break;case"destroyParticipant":this.state.records.lastDestroyed=e.actor,this.state.records.destroyedActors.set(e.actor,this.state.records.messages.length);break;case"activeStart":this.addSignal(e.actor,void 0,void 0,e.signalType);break;case"activeEnd":this.addSignal(e.actor,void 0,void 0,e.signalType);break;case"addNote":this.addNote(e.actor,e.placement,e.text);break;case"addLinks":this.addLinks(e.actor,e.text);break;case"addALink":this.addALink(e.actor,e.text);break;case"addProperties":this.addProperties(e.actor,e.text);break;case"addDetails":this.addDetails(e.actor,e.text);break;case"addMessage":if(this.state.records.lastCreated){if(e.to!==this.state.records.lastCreated)throw new Error("The created participant "+this.state.records.lastCreated.name+" does not have an associated creating message after its declaration. Please check the sequence diagram.");this.state.records.lastCreated=void 0}else if(this.state.records.lastDestroyed){if(e.to!==this.state.records.lastDestroyed&&e.from!==this.state.records.lastDestroyed)throw new Error("The destroyed participant "+this.state.records.lastDestroyed.name+" does not have an associated destroying message after its declaration. Please check the sequence diagram.");this.state.records.lastDestroyed=void 0}this.addSignal(e.from,e.to,e.msg,e.signalType,e.activate);break;case"boxStart":this.addBox(e.boxData);break;case"boxEnd":this.boxEnd();break;case"loopStart":this.addSignal(void 0,void 0,e.loopText,e.signalType);break;case"loopEnd":this.addSignal(void 0,void 0,void 0,e.signalType);break;case"rectStart":this.addSignal(void 0,void 0,e.color,e.signalType);break;case"rectEnd":this.addSignal(void 0,void 0,void 0,e.signalType);break;case"optStart":this.addSignal(void 0,void 0,e.optText,e.signalType);break;case"optEnd":this.addSignal(void 0,void 0,void 0,e.signalType);break;case"altStart":this.addSignal(void 0,void 0,e.altText,e.signalType);break;case"else":this.addSignal(void 0,void 0,e.altText,e.signalType);break;case"altEnd":this.addSignal(void 0,void 0,void 0,e.signalType);break;case"setAccTitle":ee(e.text);break;case"parStart":this.addSignal(void 0,void 0,e.parText,e.signalType);break;case"and":this.addSignal(void 0,void 0,e.parText,e.signalType);break;case"parEnd":this.addSignal(void 0,void 0,void 0,e.signalType);break;case"criticalStart":this.addSignal(void 0,void 0,e.criticalText,e.signalType);break;case"option":this.addSignal(void 0,void 0,e.optionText,e.signalType);break;case"criticalEnd":this.addSignal(void 0,void 0,void 0,e.signalType);break;case"breakStart":this.addSignal(void 0,void 0,e.breakText,e.signalType);break;case"breakEnd":this.addSignal(void 0,void 0,void 0,e.signalType);break}}getConfig(){return st().sequence}},qe=f(e=>`.actor { + stroke: ${e.actorBorder}; + fill: ${e.actorBkg}; + } + + text.actor > tspan { + fill: ${e.actorTextColor}; + stroke: none; + } + + .actor-line { + stroke: ${e.actorLineColor}; + } + + .innerArc { + stroke-width: 1.5; + stroke-dasharray: none; + } + + .messageLine0 { + stroke-width: 1.5; + stroke-dasharray: none; + stroke: ${e.signalColor}; + } + + .messageLine1 { + stroke-width: 1.5; + stroke-dasharray: 2, 2; + stroke: ${e.signalColor}; + } + + #arrowhead path { + fill: ${e.signalColor}; + stroke: ${e.signalColor}; + } + + .sequenceNumber { + fill: ${e.sequenceNumberColor}; + } + + #sequencenumber { + fill: ${e.signalColor}; + } + + #crosshead path { + fill: ${e.signalColor}; + stroke: ${e.signalColor}; + } + + .messageText { + fill: ${e.signalTextColor}; + stroke: none; + } + + .labelBox { + stroke: ${e.labelBoxBorderColor}; + fill: ${e.labelBoxBkgColor}; + } + + .labelText, .labelText > tspan { + fill: ${e.labelTextColor}; + stroke: none; + } + + .loopText, .loopText > tspan { + fill: ${e.loopTextColor}; + stroke: none; + } + + .loopLine { + stroke-width: 2px; + stroke-dasharray: 2, 2; + stroke: ${e.labelBoxBorderColor}; + fill: ${e.labelBoxBorderColor}; + } + + .note { + //stroke: #decc93; + stroke: ${e.noteBorderColor}; + fill: ${e.noteBkgColor}; + } + + .noteText, .noteText > tspan { + fill: ${e.noteTextColor}; + stroke: none; + } + + .activation0 { + fill: ${e.activationBkgColor}; + stroke: ${e.activationBorderColor}; + } + + .activation1 { + fill: ${e.activationBkgColor}; + stroke: ${e.activationBorderColor}; + } + + .activation2 { + fill: ${e.activationBkgColor}; + stroke: ${e.activationBorderColor}; + } + + .actorPopupMenu { + position: absolute; + } + + .actorPopupMenuPanel { + position: absolute; + fill: ${e.actorBkg}; + box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2); + filter: drop-shadow(3px 5px 2px rgb(0 0 0 / 0.4)); +} + .actor-man line { + stroke: ${e.actorBorder}; + fill: ${e.actorBkg}; + } + .actor-man circle, line { + stroke: ${e.actorBorder}; + fill: ${e.actorBkg}; + stroke-width: 2px; + } + +`,"getStyles"),ze=qe,Tt=36,gt="actor-top",xt="actor-bottom",Dt="actor-box",ut="actor-man",It=f(function(e,t){return we(e,t)},"drawRect"),He=f(function(e,t,n,s,r){if(t.links===void 0||t.links===null||Object.keys(t.links).length===0)return{height:0,width:0};const i=t.links,c=t.actorCnt,h=t.rectData;var o="none";r&&(o="block !important");const a=e.append("g");a.attr("id","actor"+c+"_popup"),a.attr("class","actorPopupMenu"),a.attr("display",o);var p="";h.class!==void 0&&(p=" "+h.class);let g=h.width>n?h.width:n;const x=a.append("rect");if(x.attr("class","actorPopupMenuPanel"+p),x.attr("x",h.x),x.attr("y",h.height),x.attr("fill",h.fill),x.attr("stroke",h.stroke),x.attr("width",g),x.attr("height",h.height),x.attr("rx",h.rx),x.attr("ry",h.ry),i!=null){var y=20;for(let k in i){var m=a.append("a"),w=ae.sanitizeUrl(i[k]);m.attr("xlink:href",w),m.attr("target","_blank"),ps(s)(k,m,h.x+10,h.height+y,g,20,{class:"actor"},s),y+=30}}return x.attr("height",y),{height:h.height+y,width:g}},"drawPopup"),Ct=f(function(e){return"var pu = document.getElementById('"+e+"'); if (pu != null) { pu.style.display = pu.style.display == 'block' ? 'none' : 'block'; }"},"popupMenuToggle"),Rt=f(async function(e,t,n=null){let s=e.append("foreignObject");const r=await ie(t.text,zt()),c=s.append("xhtml:div").attr("style","width: fit-content;").attr("xmlns","http://www.w3.org/1999/xhtml").html(r).node().getBoundingClientRect();if(s.attr("height",Math.round(c.height)).attr("width",Math.round(c.width)),t.class==="noteText"){const h=e.node().firstChild;h.setAttribute("height",c.height+2*t.textMargin);const o=h.getBBox();s.attr("x",Math.round(o.x+o.width/2-c.width/2)).attr("y",Math.round(o.y+o.height/2-c.height/2))}else if(n){let{startx:h,stopx:o,starty:a}=n;if(h>o){const p=h;h=o,o=p}s.attr("x",Math.round(h+Math.abs(h-o)/2-c.width/2)),t.class==="loopText"?s.attr("y",Math.round(a)):s.attr("y",Math.round(a-c.height))}return[s]},"drawKatex"),wt=f(function(e,t){let n=0,s=0;const r=t.text.split(I.lineBreakRegex),[i,c]=re(t.fontSize);let h=[],o=0,a=f(()=>t.y,"yfunc");if(t.valign!==void 0&&t.textMargin!==void 0&&t.textMargin>0)switch(t.valign){case"top":case"start":a=f(()=>Math.round(t.y+t.textMargin),"yfunc");break;case"middle":case"center":a=f(()=>Math.round(t.y+(n+s+t.textMargin)/2),"yfunc");break;case"bottom":case"end":a=f(()=>Math.round(t.y+(n+s+2*t.textMargin)-t.textMargin),"yfunc");break}if(t.anchor!==void 0&&t.textMargin!==void 0&&t.width!==void 0)switch(t.anchor){case"left":case"start":t.x=Math.round(t.x+t.textMargin),t.anchor="start",t.dominantBaseline="middle",t.alignmentBaseline="middle";break;case"middle":case"center":t.x=Math.round(t.x+t.width/2),t.anchor="middle",t.dominantBaseline="middle",t.alignmentBaseline="middle";break;case"right":case"end":t.x=Math.round(t.x+t.width-t.textMargin),t.anchor="end",t.dominantBaseline="middle",t.alignmentBaseline="middle";break}for(let[p,g]of r.entries()){t.textMargin!==void 0&&t.textMargin===0&&i!==void 0&&(o=p*i);const x=e.append("text");x.attr("x",t.x),x.attr("y",a()),t.anchor!==void 0&&x.attr("text-anchor",t.anchor).attr("dominant-baseline",t.dominantBaseline).attr("alignment-baseline",t.alignmentBaseline),t.fontFamily!==void 0&&x.style("font-family",t.fontFamily),c!==void 0&&x.style("font-size",c),t.fontWeight!==void 0&&x.style("font-weight",t.fontWeight),t.fill!==void 0&&x.attr("fill",t.fill),t.class!==void 0&&x.attr("class",t.class),t.dy!==void 0?x.attr("dy",t.dy):o!==0&&x.attr("dy",o);const y=g||De;if(t.tspan){const m=x.append("tspan");m.attr("x",t.x),t.fill!==void 0&&m.attr("fill",t.fill),m.text(y)}else x.text(y);t.valign!==void 0&&t.textMargin!==void 0&&t.textMargin>0&&(s+=(x._groups||x)[0][0].getBBox().height,n=s),h.push(x)}return h},"drawText"),ne=f(function(e,t){function n(r,i,c,h,o){return r+","+i+" "+(r+c)+","+i+" "+(r+c)+","+(i+h-o)+" "+(r+c-o*1.2)+","+(i+h)+" "+r+","+(i+h)}f(n,"genPoints");const s=e.append("polygon");return s.attr("points",n(t.x,t.y,t.width,t.height,7)),s.attr("class","labelBox"),t.y=t.y+t.height/2,wt(e,t),s},"drawLabel"),P=-1,oe=f((e,t,n,s)=>{e.select&&n.forEach(r=>{const i=t.get(r),c=e.select("#actor"+i.actorCnt);!s.mirrorActors&&i.stopy?c.attr("y2",i.stopy+i.height/2):s.mirrorActors&&c.attr("y2",i.stopy)})},"fixLifeLineHeights"),Ue=f(function(e,t,n,s){const r=s?t.stopy:t.starty,i=t.x+t.width/2,c=r+t.height,h=e.append("g").lower();var o=h;s||(P++,Object.keys(t.links||{}).length&&!n.forceMenus&&o.attr("onclick",Ct(`actor${P}_popup`)).attr("cursor","pointer"),o.append("line").attr("id","actor"+P).attr("x1",i).attr("y1",c).attr("x2",i).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",t.name),o=h.append("g"),t.actorCnt=P,t.links!=null&&o.attr("id","root-"+P));const a=ct();var p="actor";t.properties?.class?p=t.properties.class:a.fill="#eaeaea",s?p+=` ${xt}`:p+=` ${gt}`,a.x=t.x,a.y=r,a.width=t.width,a.height=t.height,a.class=p,a.rx=3,a.ry=3,a.name=t.name;const g=It(o,a);if(t.rectData=a,t.properties?.icon){const y=t.properties.icon.trim();y.charAt(0)==="@"?Xt(o,a.x+a.width-20,a.y+10,y.substr(1)):Jt(o,a.x+a.width-20,a.y+10,y)}dt(n,z(t.description))(t.description,o,a.x,a.y,a.width,a.height,{class:`actor ${Dt}`},n);let x=t.height;if(g.node){const y=g.node().getBBox();t.height=y.height,x=y.height}return x},"drawActorTypeParticipant"),Ge=f(function(e,t,n,s){const r=s?t.stopy:t.starty,i=t.x+t.width/2,c=r+t.height,h=e.append("g").lower();var o=h;s||(P++,Object.keys(t.links||{}).length&&!n.forceMenus&&o.attr("onclick",Ct(`actor${P}_popup`)).attr("cursor","pointer"),o.append("line").attr("id","actor"+P).attr("x1",i).attr("y1",c).attr("x2",i).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",t.name),o=h.append("g"),t.actorCnt=P,t.links!=null&&o.attr("id","root-"+P));const a=ct();var p="actor";t.properties?.class?p=t.properties.class:a.fill="#eaeaea",s?p+=` ${xt}`:p+=` ${gt}`,a.x=t.x,a.y=r,a.width=t.width,a.height=t.height,a.class=p,a.name=t.name;const g=6,x={...a,x:a.x+-g,y:a.y+ +g,class:"actor"},y=It(o,a);if(It(o,x),t.rectData=a,t.properties?.icon){const w=t.properties.icon.trim();w.charAt(0)==="@"?Xt(o,a.x+a.width-20,a.y+10,w.substr(1)):Jt(o,a.x+a.width-20,a.y+10,w)}dt(n,z(t.description))(t.description,o,a.x-g,a.y+g,a.width,a.height,{class:`actor ${Dt}`},n);let m=t.height;if(y.node){const w=y.node().getBBox();t.height=w.height,m=w.height}return m},"drawActorTypeCollections"),Ke=f(function(e,t,n,s){const r=s?t.stopy:t.starty,i=t.x+t.width/2,c=r+t.height,h=e.append("g").lower();let o=h;s||(P++,Object.keys(t.links||{}).length&&!n.forceMenus&&o.attr("onclick",Ct(`actor${P}_popup`)).attr("cursor","pointer"),o.append("line").attr("id","actor"+P).attr("x1",i).attr("y1",c).attr("x2",i).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",t.name),o=h.append("g"),t.actorCnt=P,t.links!=null&&o.attr("id","root-"+P));const a=ct();let p="actor";t.properties?.class?p=t.properties.class:a.fill="#eaeaea",s?p+=` ${xt}`:p+=` ${gt}`,a.x=t.x,a.y=r,a.width=t.width,a.height=t.height,a.class=p,a.name=t.name;const g=a.height/2,x=g/(2.5+a.height/50),y=o.append("g"),m=o.append("g");if(y.append("path").attr("d",`M ${a.x},${a.y+g} + a ${x},${g} 0 0 0 0,${a.height} + h ${a.width-2*x} + a ${x},${g} 0 0 0 0,-${a.height} + Z + `).attr("class",p),m.append("path").attr("d",`M ${a.x},${a.y+g} + a ${x},${g} 0 0 0 0,${a.height}`).attr("stroke","#666").attr("stroke-width","1px").attr("class",p),y.attr("transform",`translate(${x}, ${-(a.height/2)})`),m.attr("transform",`translate(${a.width-x}, ${-a.height/2})`),t.rectData=a,t.properties?.icon){const N=t.properties.icon.trim(),S=a.x+a.width-20,O=a.y+10;N.charAt(0)==="@"?Xt(o,S,O,N.substr(1)):Jt(o,S,O,N)}dt(n,z(t.description))(t.description,o,a.x,a.y,a.width,a.height,{class:`actor ${Dt}`},n);let w=t.height;const k=y.select("path:last-child");if(k.node()){const N=k.node().getBBox();t.height=N.height,w=N.height}return w},"drawActorTypeQueue"),Xe=f(function(e,t,n,s){const r=s?t.stopy:t.starty,i=t.x+t.width/2,c=r+75,h=e.append("g").lower();s||(P++,h.append("line").attr("id","actor"+P).attr("x1",i).attr("y1",c).attr("x2",i).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",t.name),t.actorCnt=P);const o=e.append("g");let a=ut;s?a+=` ${xt}`:a+=` ${gt}`,o.attr("class",a),o.attr("name",t.name);const p=ct();p.x=t.x,p.y=r,p.fill="#eaeaea",p.width=t.width,p.height=t.height,p.class="actor";const g=t.x+t.width/2,x=r+30,y=18;o.append("defs").append("marker").attr("id","filled-head-control").attr("refX",11).attr("refY",5.8).attr("markerWidth",20).attr("markerHeight",28).attr("orient","172.5").append("path").attr("d","M 14.4 5.6 L 7.2 10.4 L 8.8 5.6 L 7.2 0.8 Z"),o.append("circle").attr("cx",g).attr("cy",x).attr("r",y).attr("fill","#eaeaf7").attr("stroke","#666").attr("stroke-width",1.2),o.append("line").attr("marker-end","url(#filled-head-control)").attr("transform",`translate(${g}, ${x-y})`);const m=o.node().getBBox();return t.height=m.height+2*(n?.sequence?.labelBoxHeight??0),dt(n,z(t.description))(t.description,o,p.x,p.y+y+(s?5:10),p.width,p.height,{class:`actor ${ut}`},n),t.height},"drawActorTypeControl"),Je=f(function(e,t,n,s){const r=s?t.stopy:t.starty,i=t.x+t.width/2,c=r+75,h=e.append("g").lower(),o=e.append("g");let a=ut;s?a+=` ${xt}`:a+=` ${gt}`,o.attr("class",a),o.attr("name",t.name);const p=ct();p.x=t.x,p.y=r,p.fill="#eaeaea",p.width=t.width,p.height=t.height,p.class="actor";const g=t.x+t.width/2,x=r+(s?10:25),y=18;o.append("circle").attr("cx",g).attr("cy",x).attr("r",y).attr("width",t.width).attr("height",t.height),o.append("line").attr("x1",g-y).attr("x2",g+y).attr("y1",x+y).attr("y2",x+y).attr("stroke","#333").attr("stroke-width",2);const m=o.node().getBBox();return t.height=m.height+(n?.sequence?.labelBoxHeight??0),s||(P++,h.append("line").attr("id","actor"+P).attr("x1",i).attr("y1",c).attr("x2",i).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",t.name),t.actorCnt=P),dt(n,z(t.description))(t.description,o,p.x,p.y+(s?(x-r+y-5)/2:(x+y-r)/2),p.width,p.height,{class:`actor ${ut}`},n),s?o.attr("transform",`translate(0, ${y/2})`):o.attr("transform",`translate(0, ${y/2})`),t.height},"drawActorTypeEntity"),Qe=f(function(e,t,n,s){const r=s?t.stopy:t.starty,i=t.x+t.width/2,c=r+t.height+2*n.boxTextMargin,h=e.append("g").lower();let o=h;s||(P++,Object.keys(t.links||{}).length&&!n.forceMenus&&o.attr("onclick",Ct(`actor${P}_popup`)).attr("cursor","pointer"),o.append("line").attr("id","actor"+P).attr("x1",i).attr("y1",c).attr("x2",i).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",t.name),o=h.append("g"),t.actorCnt=P,t.links!=null&&o.attr("id","root-"+P));const a=ct();let p="actor";t.properties?.class?p=t.properties.class:a.fill="#eaeaea",s?p+=` ${xt}`:p+=` ${gt}`,a.x=t.x,a.y=r,a.width=t.width,a.height=t.height,a.class=p,a.name=t.name,a.x=t.x,a.y=r;const g=a.width/4,x=a.width/4,y=g/2,m=y/(2.5+g/50),w=o.append("g"),k=` + M ${a.x},${a.y+m} + a ${y},${m} 0 0 0 ${g},0 + a ${y},${m} 0 0 0 -${g},0 + l 0,${x-2*m} + a ${y},${m} 0 0 0 ${g},0 + l 0,-${x-2*m} +`;w.append("path").attr("d",k).attr("fill","#eaeaea").attr("stroke","#000").attr("stroke-width",1).attr("class",p),s?w.attr("transform",`translate(${g*1.5}, ${a.height/4-2*m})`):w.attr("transform",`translate(${g*1.5}, ${(a.height+m)/4})`),t.rectData=a,dt(n,z(t.description))(t.description,o,a.x,a.y+(s?(a.height+x)/4:(a.height+m)/2),a.width,a.height,{class:`actor ${Dt}`},n);const N=w.select("path:last-child");if(N.node()){const S=N.node().getBBox();t.height=S.height+(n.sequence.labelBoxHeight??0)}return t.height},"drawActorTypeDatabase"),Ze=f(function(e,t,n,s){const r=s?t.stopy:t.starty,i=t.x+t.width/2,c=r+80,h=30,o=e.append("g").lower();s||(P++,o.append("line").attr("id","actor"+P).attr("x1",i).attr("y1",c).attr("x2",i).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",t.name),t.actorCnt=P);const a=e.append("g");let p=ut;s?p+=` ${xt}`:p+=` ${gt}`,a.attr("class",p),a.attr("name",t.name);const g=ct();g.x=t.x,g.y=r,g.fill="#eaeaea",g.width=t.width,g.height=t.height,g.class="actor",a.append("line").attr("id","actor-man-torso"+P).attr("x1",t.x+t.width/2-h*2.5).attr("y1",r+10).attr("x2",t.x+t.width/2-15).attr("y2",r+10),a.append("line").attr("id","actor-man-arms"+P).attr("x1",t.x+t.width/2-h*2.5).attr("y1",r+0).attr("x2",t.x+t.width/2-h*2.5).attr("y2",r+20),a.append("circle").attr("cx",t.x+t.width/2).attr("cy",r+10).attr("r",h);const x=a.node().getBBox();return t.height=x.height+(n.sequence.labelBoxHeight??0),dt(n,z(t.description))(t.description,a,g.x,g.y+(s?h/2-4:h/2+3),g.width,g.height,{class:`actor ${ut}`},n),s?a.attr("transform",`translate(0,${h/2+7})`):a.attr("transform",`translate(0,${h/2+7})`),t.height},"drawActorTypeBoundary"),$e=f(function(e,t,n,s){const r=s?t.stopy:t.starty,i=t.x+t.width/2,c=r+80,h=e.append("g").lower();s||(P++,h.append("line").attr("id","actor"+P).attr("x1",i).attr("y1",c).attr("x2",i).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",t.name),t.actorCnt=P);const o=e.append("g");let a=ut;s?a+=` ${xt}`:a+=` ${gt}`,o.attr("class",a),o.attr("name",t.name);const p=ct();p.x=t.x,p.y=r,p.fill="#eaeaea",p.width=t.width,p.height=t.height,p.class="actor",p.rx=3,p.ry=3,o.append("line").attr("id","actor-man-torso"+P).attr("x1",i).attr("y1",r+25).attr("x2",i).attr("y2",r+45),o.append("line").attr("id","actor-man-arms"+P).attr("x1",i-Tt/2).attr("y1",r+33).attr("x2",i+Tt/2).attr("y2",r+33),o.append("line").attr("x1",i-Tt/2).attr("y1",r+60).attr("x2",i).attr("y2",r+45),o.append("line").attr("x1",i).attr("y1",r+45).attr("x2",i+Tt/2-2).attr("y2",r+60);const g=o.append("circle");g.attr("cx",t.x+t.width/2),g.attr("cy",r+10),g.attr("r",15),g.attr("width",t.width),g.attr("height",t.height);const x=o.node().getBBox();return t.height=x.height,dt(n,z(t.description))(t.description,o,p.x,p.y+35,p.width,p.height,{class:`actor ${ut}`},n),t.height},"drawActorTypeActor"),je=f(async function(e,t,n,s){switch(t.type){case"actor":return await $e(e,t,n,s);case"participant":return await Ue(e,t,n,s);case"boundary":return await Ze(e,t,n,s);case"control":return await Xe(e,t,n,s);case"entity":return await Je(e,t,n,s);case"database":return await Qe(e,t,n,s);case"collections":return await Ge(e,t,n,s);case"queue":return await Ke(e,t,n,s)}},"drawActor"),ts=f(function(e,t,n){const r=e.append("g");ce(r,t),t.name&&dt(n)(t.name,r,t.x,t.y+n.boxTextMargin+(t.textMaxHeight||0)/2,t.width,0,{class:"text"},n),r.lower()},"drawBox"),es=f(function(e){return e.append("g")},"anchorElement"),ss=f(function(e,t,n,s,r){const i=ct(),c=t.anchored;i.x=t.startx,i.y=t.starty,i.class="activation"+r%3,i.width=t.stopx-t.startx,i.height=n-t.starty,It(c,i)},"drawActivation"),as=f(async function(e,t,n,s){const{boxMargin:r,boxTextMargin:i,labelBoxHeight:c,labelBoxWidth:h,messageFontFamily:o,messageFontSize:a,messageFontWeight:p}=s,g=e.append("g"),x=f(function(w,k,N,S){return g.append("line").attr("x1",w).attr("y1",k).attr("x2",N).attr("y2",S).attr("class","loopLine")},"drawLoopLine");x(t.startx,t.starty,t.stopx,t.starty),x(t.stopx,t.starty,t.stopx,t.stopy),x(t.startx,t.stopy,t.stopx,t.stopy),x(t.startx,t.starty,t.startx,t.stopy),t.sections!==void 0&&t.sections.forEach(function(w){x(t.startx,w.y,t.stopx,w.y).style("stroke-dasharray","3, 3")});let y=Kt();y.text=n,y.x=t.startx,y.y=t.starty,y.fontFamily=o,y.fontSize=a,y.fontWeight=p,y.anchor="middle",y.valign="middle",y.tspan=!1,y.width=h||50,y.height=c||20,y.textMargin=i,y.class="labelText",ne(g,y),y=le(),y.text=t.title,y.x=t.startx+h/2+(t.stopx-t.startx)/2,y.y=t.starty+r+i,y.anchor="middle",y.valign="middle",y.textMargin=i,y.class="loopText",y.fontFamily=o,y.fontSize=a,y.fontWeight=p,y.wrap=!0;let m=z(y.text)?await Rt(g,y,t):wt(g,y);if(t.sectionTitles!==void 0){for(const[w,k]of Object.entries(t.sectionTitles))if(k.message){y.text=k.message,y.x=t.startx+(t.stopx-t.startx)/2,y.y=t.sections[w].y+r+i,y.class="loopText",y.anchor="middle",y.valign="middle",y.tspan=!1,y.fontFamily=o,y.fontSize=a,y.fontWeight=p,y.wrap=t.wrap,z(y.text)?(t.starty=t.sections[w].y,await Rt(g,y,t)):wt(g,y);let N=Math.round(m.map(S=>(S._groups||S)[0][0].getBBox().height).reduce((S,O)=>S+O));t.sections[w].height+=N-(r+i)}}return t.height=Math.round(t.stopy-t.starty),g},"drawLoop"),ce=f(function(e,t){me(e,t)},"drawBackgroundRect"),rs=f(function(e){e.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"),is=f(function(e){e.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"),ns=f(function(e){e.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"),os=f(function(e){e.append("defs").append("marker").attr("id","arrowhead").attr("refX",7.9).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto-start-reverse").append("path").attr("d","M -1 0 L 10 5 L 0 10 z")},"insertArrowHead"),cs=f(function(e){e.append("defs").append("marker").attr("id","filled-head").attr("refX",15.5).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"insertArrowFilledHead"),ls=f(function(e){e.append("defs").append("marker").attr("id","sequencenumber").attr("refX",15).attr("refY",15).attr("markerWidth",60).attr("markerHeight",40).attr("orient","auto").append("circle").attr("cx",15).attr("cy",15).attr("r",6)},"insertSequenceNumber"),hs=f(function(e){e.append("defs").append("marker").attr("id","crosshead").attr("markerWidth",15).attr("markerHeight",8).attr("orient","auto").attr("refX",4).attr("refY",4.5).append("path").attr("fill","none").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1pt").attr("d","M 1,2 L 6,7 M 6,2 L 1,7")},"insertArrowCrossHead"),le=f(function(){return{x:0,y:0,fill:void 0,anchor:void 0,style:"#666",width:void 0,height:void 0,textMargin:0,rx:0,ry:0,tspan:!0,valign:void 0}},"getTextObj"),ds=f(function(){return{x:0,y:0,fill:"#EDF2AE",stroke:"#666",width:100,anchor:"start",height:100,rx:0,ry:0}},"getNoteRect"),dt=(function(){function e(i,c,h,o,a,p,g){const x=c.append("text").attr("x",h+a/2).attr("y",o+p/2+5).style("text-anchor","middle").text(i);r(x,g)}f(e,"byText");function t(i,c,h,o,a,p,g,x){const{actorFontSize:y,actorFontFamily:m,actorFontWeight:w}=x,[k,N]=re(y),S=i.split(I.lineBreakRegex);for(let O=0;Oe.height||0))+(this.loops.length===0?0:this.loops.map(e=>e.height||0).reduce((e,t)=>e+t))+(this.messages.length===0?0:this.messages.map(e=>e.height||0).reduce((e,t)=>e+t))+(this.notes.length===0?0:this.notes.map(e=>e.height||0).reduce((e,t)=>e+t))},"getHeight"),clear:f(function(){this.actors=[],this.boxes=[],this.loops=[],this.messages=[],this.notes=[]},"clear"),addBox:f(function(e){this.boxes.push(e)},"addBox"),addActor:f(function(e){this.actors.push(e)},"addActor"),addLoop:f(function(e){this.loops.push(e)},"addLoop"),addMessage:f(function(e){this.messages.push(e)},"addMessage"),addNote:f(function(e){this.notes.push(e)},"addNote"),lastActor:f(function(){return this.actors[this.actors.length-1]},"lastActor"),lastLoop:f(function(){return this.loops[this.loops.length-1]},"lastLoop"),lastMessage:f(function(){return this.messages[this.messages.length-1]},"lastMessage"),lastNote:f(function(){return this.notes[this.notes.length-1]},"lastNote"),actors:[],boxes:[],loops:[],messages:[],notes:[]},init:f(function(){this.sequenceItems=[],this.activations=[],this.models.clear(),this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},this.verticalPos=0,pe(st())},"init"),updateVal:f(function(e,t,n,s){e[t]===void 0?e[t]=n:e[t]=s(n,e[t])},"updateVal"),updateBounds:f(function(e,t,n,s){const r=this;let i=0;function c(h){return f(function(a){i++;const p=r.sequenceItems.length-i+1;r.updateVal(a,"starty",t-p*l.boxMargin,Math.min),r.updateVal(a,"stopy",s+p*l.boxMargin,Math.max),r.updateVal(T.data,"startx",e-p*l.boxMargin,Math.min),r.updateVal(T.data,"stopx",n+p*l.boxMargin,Math.max),h!=="activation"&&(r.updateVal(a,"startx",e-p*l.boxMargin,Math.min),r.updateVal(a,"stopx",n+p*l.boxMargin,Math.max),r.updateVal(T.data,"starty",t-p*l.boxMargin,Math.min),r.updateVal(T.data,"stopy",s+p*l.boxMargin,Math.max))},"updateItemBounds")}f(c,"updateFn"),this.sequenceItems.forEach(c()),this.activations.forEach(c("activation"))},"updateBounds"),insert:f(function(e,t,n,s){const r=I.getMin(e,n),i=I.getMax(e,n),c=I.getMin(t,s),h=I.getMax(t,s);this.updateVal(T.data,"startx",r,Math.min),this.updateVal(T.data,"starty",c,Math.min),this.updateVal(T.data,"stopx",i,Math.max),this.updateVal(T.data,"stopy",h,Math.max),this.updateBounds(r,c,i,h)},"insert"),newActivation:f(function(e,t,n){const s=n.get(e.from),r=Ot(e.from).length||0,i=s.x+s.width/2+(r-1)*l.activationWidth/2;this.activations.push({startx:i,starty:this.verticalPos+2,stopx:i+l.activationWidth,stopy:void 0,actor:e.from,anchored:V.anchorElement(t)})},"newActivation"),endActivation:f(function(e){const t=this.activations.map(function(n){return n.actor}).lastIndexOf(e.from);return this.activations.splice(t,1)[0]},"endActivation"),createLoop:f(function(e={message:void 0,wrap:!1,width:void 0},t){return{startx:void 0,starty:this.verticalPos,stopx:void 0,stopy:void 0,title:e.message,wrap:e.wrap,width:e.width,height:0,fill:t}},"createLoop"),newLoop:f(function(e={message:void 0,wrap:!1,width:void 0},t){this.sequenceItems.push(this.createLoop(e,t))},"newLoop"),endLoop:f(function(){return this.sequenceItems.pop()},"endLoop"),isLoopOverlap:f(function(){return this.sequenceItems.length?this.sequenceItems[this.sequenceItems.length-1].overlap:!1},"isLoopOverlap"),addSectionToLoop:f(function(e){const t=this.sequenceItems.pop();t.sections=t.sections||[],t.sectionTitles=t.sectionTitles||[],t.sections.push({y:T.getVerticalPos(),height:0}),t.sectionTitles.push(e),this.sequenceItems.push(t)},"addSectionToLoop"),saveVerticalPos:f(function(){this.isLoopOverlap()&&(this.savedVerticalPos=this.verticalPos)},"saveVerticalPos"),resetVerticalPos:f(function(){this.isLoopOverlap()&&(this.verticalPos=this.savedVerticalPos)},"resetVerticalPos"),bumpVerticalPos:f(function(e){this.verticalPos=this.verticalPos+e,this.data.stopy=I.getMax(this.data.stopy,this.verticalPos)},"bumpVerticalPos"),getVerticalPos:f(function(){return this.verticalPos},"getVerticalPos"),getBounds:f(function(){return{bounds:this.data,models:this.models}},"getBounds")},us=f(async function(e,t){T.bumpVerticalPos(l.boxMargin),t.height=l.boxMargin,t.starty=T.getVerticalPos();const n=ct();n.x=t.startx,n.y=t.starty,n.width=t.width||l.width,n.class="note";const s=e.append("g"),r=V.drawRect(s,n),i=Kt();i.x=t.startx,i.y=t.starty,i.width=n.width,i.dy="1em",i.text=t.message,i.class="noteText",i.fontFamily=l.noteFontFamily,i.fontSize=l.noteFontSize,i.fontWeight=l.noteFontWeight,i.anchor=l.noteAlign,i.textMargin=l.noteMargin,i.valign="center";const c=z(i.text)?await Rt(s,i):wt(s,i),h=Math.round(c.map(o=>(o._groups||o)[0][0].getBBox().height).reduce((o,a)=>o+a));r.attr("height",h+2*l.noteMargin),t.height+=h+2*l.noteMargin,T.bumpVerticalPos(h+2*l.noteMargin),t.stopy=t.starty+h+2*l.noteMargin,t.stopx=t.startx+n.width,T.insert(t.startx,t.starty,t.stopx,t.stopy),T.models.addNote(t)},"drawNote"),Et=f(e=>({fontFamily:e.messageFontFamily,fontSize:e.messageFontSize,fontWeight:e.messageFontWeight}),"messageFont"),mt=f(e=>({fontFamily:e.noteFontFamily,fontSize:e.noteFontSize,fontWeight:e.noteFontWeight}),"noteFont"),Ut=f(e=>({fontFamily:e.actorFontFamily,fontSize:e.actorFontSize,fontWeight:e.actorFontWeight}),"actorFont");async function he(e,t){T.bumpVerticalPos(10);const{startx:n,stopx:s,message:r}=t,i=I.splitBreaks(r).length,c=z(r),h=c?await Lt(r,st()):W.calculateTextDimensions(r,Et(l));if(!c){const g=h.height/i;t.height+=g,T.bumpVerticalPos(g)}let o,a=h.height-10;const p=h.width;if(n===s){o=T.getVerticalPos()+a,l.rightAngles||(a+=l.boxMargin,o=T.getVerticalPos()+a),a+=30;const g=I.getMax(p/2,l.width/2);T.insert(n-g,T.getVerticalPos()-10+a,s+g,T.getVerticalPos()+30+a)}else a+=l.boxMargin,o=T.getVerticalPos()+a,T.insert(n,o-10,s,o);return T.bumpVerticalPos(a),t.height+=a,t.stopy=t.starty+t.height,T.insert(t.fromBounds,t.starty,t.toBounds,t.stopy),o}f(he,"boundMessage");var gs=f(async function(e,t,n,s){const{startx:r,stopx:i,starty:c,message:h,type:o,sequenceIndex:a,sequenceVisible:p}=t,g=W.calculateTextDimensions(h,Et(l)),x=Kt();x.x=r,x.y=c+10,x.width=i-r,x.class="messageText",x.dy="1em",x.text=h,x.fontFamily=l.messageFontFamily,x.fontSize=l.messageFontSize,x.fontWeight=l.messageFontWeight,x.anchor=l.messageAlign,x.valign="center",x.textMargin=l.wrapPadding,x.tspan=!1,z(x.text)?await Rt(e,x,{startx:r,stopx:i,starty:n}):wt(e,x);const y=g.width;let m;r===i?l.rightAngles?m=e.append("path").attr("d",`M ${r},${n} H ${r+I.getMax(l.width/2,y/2)} V ${n+25} H ${r}`):m=e.append("path").attr("d","M "+r+","+n+" C "+(r+60)+","+(n-10)+" "+(r+60)+","+(n+30)+" "+r+","+(n+20)):(m=e.append("line"),m.attr("x1",r),m.attr("y1",n),m.attr("x2",i),m.attr("y2",n)),o===s.db.LINETYPE.DOTTED||o===s.db.LINETYPE.DOTTED_CROSS||o===s.db.LINETYPE.DOTTED_POINT||o===s.db.LINETYPE.DOTTED_OPEN||o===s.db.LINETYPE.BIDIRECTIONAL_DOTTED?(m.style("stroke-dasharray","3, 3"),m.attr("class","messageLine1")):m.attr("class","messageLine0");let w="";l.arrowMarkerAbsolute&&(w=Ce(!0)),m.attr("stroke-width",2),m.attr("stroke","none"),m.style("fill","none"),(o===s.db.LINETYPE.SOLID||o===s.db.LINETYPE.DOTTED)&&m.attr("marker-end","url("+w+"#arrowhead)"),(o===s.db.LINETYPE.BIDIRECTIONAL_SOLID||o===s.db.LINETYPE.BIDIRECTIONAL_DOTTED)&&(m.attr("marker-start","url("+w+"#arrowhead)"),m.attr("marker-end","url("+w+"#arrowhead)")),(o===s.db.LINETYPE.SOLID_POINT||o===s.db.LINETYPE.DOTTED_POINT)&&m.attr("marker-end","url("+w+"#filled-head)"),(o===s.db.LINETYPE.SOLID_CROSS||o===s.db.LINETYPE.DOTTED_CROSS)&&m.attr("marker-end","url("+w+"#crosshead)"),(p||l.showSequenceNumbers)&&((o===s.db.LINETYPE.BIDIRECTIONAL_SOLID||o===s.db.LINETYPE.BIDIRECTIONAL_DOTTED)&&(rr&&(r=a.height),a.width+h.x>i&&(i=a.width+h.x)}return{maxHeight:r,maxWidth:i}},"drawActorsPopup"),pe=f(function(e){Le(l,e),e.fontFamily&&(l.actorFontFamily=l.noteFontFamily=l.messageFontFamily=e.fontFamily),e.fontSize&&(l.actorFontSize=l.noteFontSize=l.messageFontSize=e.fontSize),e.fontWeight&&(l.actorFontWeight=l.noteFontWeight=l.messageFontWeight=e.fontWeight)},"setConf"),Ot=f(function(e){return T.activations.filter(function(t){return t.actor===e})},"actorActivations"),se=f(function(e,t){const n=t.get(e),s=Ot(e),r=s.reduce(function(c,h){return I.getMin(c,h.startx)},n.x+n.width/2-1),i=s.reduce(function(c,h){return I.getMax(c,h.stopx)},n.x+n.width/2+1);return[r,i]},"activationBounds");function nt(e,t,n,s,r){T.bumpVerticalPos(n);let i=s;if(t.id&&t.message&&e[t.id]){const c=e[t.id].width,h=Et(l);t.message=W.wrapLabel(`[${t.message}]`,c-2*l.wrapPadding,h),t.width=c,t.wrap=!0;const o=W.calculateTextDimensions(t.message,h),a=I.getMax(o.height,l.labelBoxHeight);i=s+a,Q.debug(`${a} - ${t.message}`)}r(t),T.bumpVerticalPos(i)}f(nt,"adjustLoopHeightForWrap");function ue(e,t,n,s,r,i,c){function h(p,g){p.x{E.add(_.from),E.add(_.to)}),m=m.filter(_=>E.has(_))}xs(a,p,g,m,0,w,!1);const B=await bs(w,p,O,s);V.insertArrowHead(a),V.insertArrowCrossHead(a),V.insertArrowFilledHead(a),V.insertSequenceNumber(a);function q(E,_){const X=T.endActivation(E);X.starty+18>_&&(X.starty=_-6,_+=12),V.drawActivation(a,X,_,l,Ot(E.from).length),T.insert(X.startx,_-10,X.stopx,_)}f(q,"activeEnd");let H=1,Z=1;const at=[],U=[];let G=0;for(const E of w){let _,X,tt;switch(E.type){case s.db.LINETYPE.NOTE:T.resetVerticalPos(),X=E.noteModel,await us(a,X);break;case s.db.LINETYPE.ACTIVE_START:T.newActivation(E,a,p);break;case s.db.LINETYPE.ACTIVE_END:q(E,T.getVerticalPos());break;case s.db.LINETYPE.LOOP_START:nt(B,E,l.boxMargin,l.boxMargin+l.boxTextMargin,M=>T.newLoop(M));break;case s.db.LINETYPE.LOOP_END:_=T.endLoop(),await V.drawLoop(a,_,"loop",l),T.bumpVerticalPos(_.stopy-T.getVerticalPos()),T.models.addLoop(_);break;case s.db.LINETYPE.RECT_START:nt(B,E,l.boxMargin,l.boxMargin,M=>T.newLoop(void 0,M.message));break;case s.db.LINETYPE.RECT_END:_=T.endLoop(),U.push(_),T.models.addLoop(_),T.bumpVerticalPos(_.stopy-T.getVerticalPos());break;case s.db.LINETYPE.OPT_START:nt(B,E,l.boxMargin,l.boxMargin+l.boxTextMargin,M=>T.newLoop(M));break;case s.db.LINETYPE.OPT_END:_=T.endLoop(),await V.drawLoop(a,_,"opt",l),T.bumpVerticalPos(_.stopy-T.getVerticalPos()),T.models.addLoop(_);break;case s.db.LINETYPE.ALT_START:nt(B,E,l.boxMargin,l.boxMargin+l.boxTextMargin,M=>T.newLoop(M));break;case s.db.LINETYPE.ALT_ELSE:nt(B,E,l.boxMargin+l.boxTextMargin,l.boxMargin,M=>T.addSectionToLoop(M));break;case s.db.LINETYPE.ALT_END:_=T.endLoop(),await V.drawLoop(a,_,"alt",l),T.bumpVerticalPos(_.stopy-T.getVerticalPos()),T.models.addLoop(_);break;case s.db.LINETYPE.PAR_START:case s.db.LINETYPE.PAR_OVER_START:nt(B,E,l.boxMargin,l.boxMargin+l.boxTextMargin,M=>T.newLoop(M)),T.saveVerticalPos();break;case s.db.LINETYPE.PAR_AND:nt(B,E,l.boxMargin+l.boxTextMargin,l.boxMargin,M=>T.addSectionToLoop(M));break;case s.db.LINETYPE.PAR_END:_=T.endLoop(),await V.drawLoop(a,_,"par",l),T.bumpVerticalPos(_.stopy-T.getVerticalPos()),T.models.addLoop(_);break;case s.db.LINETYPE.AUTONUMBER:H=E.message.start||H,Z=E.message.step||Z,E.message.visible?s.db.enableSequenceNumbers():s.db.disableSequenceNumbers();break;case s.db.LINETYPE.CRITICAL_START:nt(B,E,l.boxMargin,l.boxMargin+l.boxTextMargin,M=>T.newLoop(M));break;case s.db.LINETYPE.CRITICAL_OPTION:nt(B,E,l.boxMargin+l.boxTextMargin,l.boxMargin,M=>T.addSectionToLoop(M));break;case s.db.LINETYPE.CRITICAL_END:_=T.endLoop(),await V.drawLoop(a,_,"critical",l),T.bumpVerticalPos(_.stopy-T.getVerticalPos()),T.models.addLoop(_);break;case s.db.LINETYPE.BREAK_START:nt(B,E,l.boxMargin,l.boxMargin+l.boxTextMargin,M=>T.newLoop(M));break;case s.db.LINETYPE.BREAK_END:_=T.endLoop(),await V.drawLoop(a,_,"break",l),T.bumpVerticalPos(_.stopy-T.getVerticalPos()),T.models.addLoop(_);break;default:try{tt=E.msgModel,tt.starty=T.getVerticalPos(),tt.sequenceIndex=H,tt.sequenceVisible=s.db.showSequenceNumbers();const M=await he(a,tt);ue(E,tt,M,G,p,g,x),at.push({messageModel:tt,lineStartY:M}),T.models.addMessage(tt)}catch(M){Q.error("error while drawing message",M)}}[s.db.LINETYPE.SOLID_OPEN,s.db.LINETYPE.DOTTED_OPEN,s.db.LINETYPE.SOLID,s.db.LINETYPE.DOTTED,s.db.LINETYPE.SOLID_CROSS,s.db.LINETYPE.DOTTED_CROSS,s.db.LINETYPE.SOLID_POINT,s.db.LINETYPE.DOTTED_POINT,s.db.LINETYPE.BIDIRECTIONAL_SOLID,s.db.LINETYPE.BIDIRECTIONAL_DOTTED].includes(E.type)&&(H=H+Z),G++}Q.debug("createdActors",g),Q.debug("destroyedActors",x),await Gt(a,p,m,!1);for(const E of at)await gs(a,E.messageModel,E.lineStartY,s);l.mirrorActors&&await Gt(a,p,m,!0),U.forEach(E=>V.drawBackgroundRect(a,E)),oe(a,p,m,l);for(const E of T.models.boxes){E.height=T.getVerticalPos()-E.y,T.insert(E.x,E.y,E.x+E.width,E.height);const _=l.boxMargin*2;E.startx=E.x-_,E.starty=E.y-_*.25,E.stopx=E.startx+E.width+2*_,E.stopy=E.starty+E.height+_*.75,E.stroke="rgb(0,0,0, 0.5)",V.drawBox(a,E,l)}N&&T.bumpVerticalPos(l.boxMargin);const F=de(a,p,m,o),{bounds:D}=T.getBounds();D.startx===void 0&&(D.startx=0),D.starty===void 0&&(D.starty=0),D.stopx===void 0&&(D.stopx=0),D.stopy===void 0&&(D.stopy=0);let $=D.stopy-D.starty;${const c=Et(l);let h=i.actorKeys.reduce((g,x)=>g+=e.get(x).width+(e.get(x).margin||0),0);const o=l.boxMargin*8;h+=o,h-=2*l.boxTextMargin,i.wrap&&(i.name=W.wrapLabel(i.name,h-2*l.wrapPadding,c));const a=W.calculateTextDimensions(i.name,c);r=I.getMax(a.height,r);const p=I.getMax(h,a.width+2*l.wrapPadding);if(i.margin=l.boxTextMargin,hi.textMaxHeight=r),I.getMax(s,l.height)}f(xe,"calculateActorMargins");var Ts=f(async function(e,t,n){const s=t.get(e.from),r=t.get(e.to),i=s.x,c=r.x,h=e.wrap&&e.message;let o=z(e.message)?await Lt(e.message,st()):W.calculateTextDimensions(h?W.wrapLabel(e.message,l.width,mt(l)):e.message,mt(l));const a={width:h?l.width:I.getMax(l.width,o.width+2*l.noteMargin),height:0,startx:s.x,stopx:0,starty:0,stopy:0,message:e.message};return e.placement===n.db.PLACEMENT.RIGHTOF?(a.width=h?I.getMax(l.width,o.width):I.getMax(s.width/2+r.width/2,o.width+2*l.noteMargin),a.startx=i+(s.width+l.actorMargin)/2):e.placement===n.db.PLACEMENT.LEFTOF?(a.width=h?I.getMax(l.width,o.width+2*l.noteMargin):I.getMax(s.width/2+r.width/2,o.width+2*l.noteMargin),a.startx=i-a.width+(s.width-l.actorMargin)/2):e.to===e.from?(o=W.calculateTextDimensions(h?W.wrapLabel(e.message,I.getMax(l.width,s.width),mt(l)):e.message,mt(l)),a.width=h?I.getMax(l.width,s.width):I.getMax(s.width,l.width,o.width+2*l.noteMargin),a.startx=i+(s.width-a.width)/2):(a.width=Math.abs(i+s.width/2-(c+r.width/2))+l.actorMargin,a.startx=i2,g=f(w=>h?-w:w,"adjustValue");e.from===e.to?a=o:(e.activate&&!p&&(a+=g(l.activationWidth/2-1)),[n.db.LINETYPE.SOLID_OPEN,n.db.LINETYPE.DOTTED_OPEN].includes(e.type)||(a+=g(3)),[n.db.LINETYPE.BIDIRECTIONAL_SOLID,n.db.LINETYPE.BIDIRECTIONAL_DOTTED].includes(e.type)&&(o-=g(3)));const x=[s,r,i,c],y=Math.abs(o-a);e.wrap&&e.message&&(e.message=W.wrapLabel(e.message,I.getMax(y+2*l.wrapPadding,l.width),Et(l)));const m=W.calculateTextDimensions(e.message,Et(l));return{width:I.getMax(e.wrap?0:m.width+2*l.wrapPadding,y+2*l.wrapPadding,l.width),height:0,startx:o,stopx:a,starty:0,stopy:0,message:e.message,type:e.type,wrap:e.wrap,fromBounds:Math.min.apply(null,x),toBounds:Math.max.apply(null,x)}},"buildMessageModel"),bs=f(async function(e,t,n,s){const r={},i=[];let c,h,o;for(const a of e){switch(a.type){case s.db.LINETYPE.LOOP_START:case s.db.LINETYPE.ALT_START:case s.db.LINETYPE.OPT_START:case s.db.LINETYPE.PAR_START:case s.db.LINETYPE.PAR_OVER_START:case s.db.LINETYPE.CRITICAL_START:case s.db.LINETYPE.BREAK_START:i.push({id:a.id,msg:a.message,from:Number.MAX_SAFE_INTEGER,to:Number.MIN_SAFE_INTEGER,width:0});break;case s.db.LINETYPE.ALT_ELSE:case s.db.LINETYPE.PAR_AND:case s.db.LINETYPE.CRITICAL_OPTION:a.message&&(c=i.pop(),r[c.id]=c,r[a.id]=c,i.push(c));break;case s.db.LINETYPE.LOOP_END:case s.db.LINETYPE.ALT_END:case s.db.LINETYPE.OPT_END:case s.db.LINETYPE.PAR_END:case s.db.LINETYPE.CRITICAL_END:case s.db.LINETYPE.BREAK_END:c=i.pop(),r[c.id]=c;break;case s.db.LINETYPE.ACTIVE_START:{const g=t.get(a.from?a.from:a.to.actor),x=Ot(a.from?a.from:a.to.actor).length,y=g.x+g.width/2+(x-1)*l.activationWidth/2,m={startx:y,stopx:y+l.activationWidth,actor:a.from,enabled:!0};T.activations.push(m)}break;case s.db.LINETYPE.ACTIVE_END:{const g=T.activations.map(x=>x.actor).lastIndexOf(a.from);T.activations.splice(g,1).splice(0,1)}break}a.placement!==void 0?(h=await Ts(a,t,s),a.noteModel=h,i.forEach(g=>{c=g,c.from=I.getMin(c.from,h.startx),c.to=I.getMax(c.to,h.startx+h.width),c.width=I.getMax(c.width,Math.abs(c.from-c.to))-l.labelBoxWidth})):(o=Es(a,t,s),a.msgModel=o,o.startx&&o.stopx&&i.length>0&&i.forEach(g=>{if(c=g,o.startx===o.stopx){const x=t.get(a.from),y=t.get(a.to);c.from=I.getMin(x.x-o.width/2,x.x-x.width/2,c.from),c.to=I.getMax(y.x+o.width/2,y.x+x.width/2,c.to),c.width=I.getMax(c.width,Math.abs(c.to-c.from))-l.labelBoxWidth}else c.from=I.getMin(o.startx,c.from),c.to=I.getMax(o.stopx,c.to),c.width=I.getMax(c.width,o.width)-l.labelBoxWidth}))}return T.activations=[],Q.debug("Loop type widths:",r),r},"calculateLoopBounds"),ms={bounds:T,drawActors:Gt,drawActorsPopup:de,setConf:pe,draw:fs},_s={parser:Be,get db(){return new Fe},renderer:ms,styles:ze,init:f(e=>{e.sequence||(e.sequence={}),e.wrap&&(e.sequence.wrap=e.wrap,ve({sequence:{wrap:e.wrap}}))},"init")};export{_s as diagram}; diff --git a/_astro/stateDiagram-FKZM4ZOC.B-V3SeMq.js b/_astro/stateDiagram-FKZM4ZOC.B-V3SeMq.js new file mode 100644 index 00000000..f0d75742 --- /dev/null +++ b/_astro/stateDiagram-FKZM4ZOC.B-V3SeMq.js @@ -0,0 +1 @@ +import{s as G,a as W,S as N}from"./chunk-DI55MBZ5.DiMe6WwJ.js";import{_ as f,c as t,d as H,l as S,e as P,k as z,R as _,S as U,O as C,u as F}from"./mermaid.core.LbQlJBBQ.js";import{G as O}from"./graph.wNZOIPAH.js";import{l as J}from"./layout.DwDnTkfW.js";import"./chunk-55IACEB6.b7ueBidu.js";import"./chunk-QN33PNHL.BI3h-IJf.js";import"./page._rMDHl_T.js";import"./_baseUniq.CLojSEzq.js";import"./min.D5TVP8RA.js";var X=f(e=>e.append("circle").attr("class","start-state").attr("r",t().state.sizeUnit).attr("cx",t().state.padding+t().state.sizeUnit).attr("cy",t().state.padding+t().state.sizeUnit),"drawStartState"),D=f(e=>e.append("line").style("stroke","grey").style("stroke-dasharray","3").attr("x1",t().state.textHeight).attr("class","divider").attr("x2",t().state.textHeight*2).attr("y1",0).attr("y2",0),"drawDivider"),Y=f((e,i)=>{const d=e.append("text").attr("x",2*t().state.padding).attr("y",t().state.textHeight+2*t().state.padding).attr("font-size",t().state.fontSize).attr("class","state-title").text(i.id),c=d.node().getBBox();return e.insert("rect",":first-child").attr("x",t().state.padding).attr("y",t().state.padding).attr("width",c.width+2*t().state.padding).attr("height",c.height+2*t().state.padding).attr("rx",t().state.radius),d},"drawSimpleState"),I=f((e,i)=>{const d=f(function(g,B,m){const E=g.append("tspan").attr("x",2*t().state.padding).text(B);m||E.attr("dy",t().state.textHeight)},"addTspan"),n=e.append("text").attr("x",2*t().state.padding).attr("y",t().state.textHeight+1.3*t().state.padding).attr("font-size",t().state.fontSize).attr("class","state-title").text(i.descriptions[0]).node().getBBox(),l=n.height,x=e.append("text").attr("x",t().state.padding).attr("y",l+t().state.padding*.4+t().state.dividerMargin+t().state.textHeight).attr("class","state-description");let a=!0,s=!0;i.descriptions.forEach(function(g){a||(d(x,g,s),s=!1),a=!1});const w=e.append("line").attr("x1",t().state.padding).attr("y1",t().state.padding+l+t().state.dividerMargin/2).attr("y2",t().state.padding+l+t().state.dividerMargin/2).attr("class","descr-divider"),p=x.node().getBBox(),o=Math.max(p.width,n.width);return w.attr("x2",o+3*t().state.padding),e.insert("rect",":first-child").attr("x",t().state.padding).attr("y",t().state.padding).attr("width",o+2*t().state.padding).attr("height",p.height+l+2*t().state.padding).attr("rx",t().state.radius),e},"drawDescrState"),$=f((e,i,d)=>{const c=t().state.padding,n=2*t().state.padding,l=e.node().getBBox(),x=l.width,a=l.x,s=e.append("text").attr("x",0).attr("y",t().state.titleShift).attr("font-size",t().state.fontSize).attr("class","state-title").text(i.id),p=s.node().getBBox().width+n;let o=Math.max(p,x);o===x&&(o=o+n);let g;const B=e.node().getBBox();i.doc,g=a-c,p>x&&(g=(x-o)/2+c),Math.abs(a-B.x)x&&(g=a-(p-x)/2);const m=1-t().state.textHeight;return e.insert("rect",":first-child").attr("x",g).attr("y",m).attr("class",d?"alt-composit":"composit").attr("width",o).attr("height",B.height+t().state.textHeight+t().state.titleShift+1).attr("rx","0"),s.attr("x",g+c),p<=x&&s.attr("x",a+(o-n)/2-p/2+c),e.insert("rect",":first-child").attr("x",g).attr("y",t().state.titleShift-t().state.textHeight-t().state.padding).attr("width",o).attr("height",t().state.textHeight*3).attr("rx",t().state.radius),e.insert("rect",":first-child").attr("x",g).attr("y",t().state.titleShift-t().state.textHeight-t().state.padding).attr("width",o).attr("height",B.height+3+2*t().state.textHeight).attr("rx",t().state.radius),e},"addTitleAndBox"),q=f(e=>(e.append("circle").attr("class","end-state-outer").attr("r",t().state.sizeUnit+t().state.miniPadding).attr("cx",t().state.padding+t().state.sizeUnit+t().state.miniPadding).attr("cy",t().state.padding+t().state.sizeUnit+t().state.miniPadding),e.append("circle").attr("class","end-state-inner").attr("r",t().state.sizeUnit).attr("cx",t().state.padding+t().state.sizeUnit+2).attr("cy",t().state.padding+t().state.sizeUnit+2)),"drawEndState"),Z=f((e,i)=>{let d=t().state.forkWidth,c=t().state.forkHeight;if(i.parentId){let n=d;d=c,c=n}return e.append("rect").style("stroke","black").style("fill","black").attr("width",d).attr("height",c).attr("x",t().state.padding).attr("y",t().state.padding)},"drawForkJoinState"),j=f((e,i,d,c)=>{let n=0;const l=c.append("text");l.style("text-anchor","start"),l.attr("class","noteText");let x=e.replace(/\r\n/g,"
    ");x=x.replace(/\n/g,"
    ");const a=x.split(z.lineBreakRegex);let s=1.25*t().state.noteMargin;for(const w of a){const p=w.trim();if(p.length>0){const o=l.append("tspan");if(o.text(p),s===0){const g=o.node().getBBox();s+=g.height}n+=s,o.attr("x",i+t().state.noteMargin),o.attr("y",d+n+1.25*t().state.noteMargin)}}return{textWidth:l.node().getBBox().width,textHeight:n}},"_drawLongText"),K=f((e,i)=>{i.attr("class","state-note");const d=i.append("rect").attr("x",0).attr("y",t().state.padding),c=i.append("g"),{textWidth:n,textHeight:l}=j(e,0,0,c);return d.attr("height",l+2*t().state.noteMargin),d.attr("width",n+t().state.noteMargin*2),d},"drawNote"),L=f(function(e,i){const d=i.id,c={id:d,label:i.id,width:0,height:0},n=e.append("g").attr("id",d).attr("class","stateGroup");i.type==="start"&&X(n),i.type==="end"&&q(n),(i.type==="fork"||i.type==="join")&&Z(n,i),i.type==="note"&&K(i.note.text,n),i.type==="divider"&&D(n),i.type==="default"&&i.descriptions.length===0&&Y(n,i),i.type==="default"&&i.descriptions.length>0&&I(n,i);const l=n.node().getBBox();return c.width=l.width+2*t().state.padding,c.height=l.height+2*t().state.padding,c},"drawState"),R=0,Q=f(function(e,i,d){const c=f(function(s){switch(s){case N.relationType.AGGREGATION:return"aggregation";case N.relationType.EXTENSION:return"extension";case N.relationType.COMPOSITION:return"composition";case N.relationType.DEPENDENCY:return"dependency"}},"getRelationType");i.points=i.points.filter(s=>!Number.isNaN(s.y));const n=i.points,l=_().x(function(s){return s.x}).y(function(s){return s.y}).curve(U),x=e.append("path").attr("d",l(n)).attr("id","edge"+R).attr("class","transition");let a="";if(t().state.arrowMarkerAbsolute&&(a=C(!0)),x.attr("marker-end","url("+a+"#"+c(N.relationType.DEPENDENCY)+"End)"),d.title!==void 0){const s=e.append("g").attr("class","stateLabel"),{x:w,y:p}=F.calcLabelPosition(i.points),o=z.getRows(d.title);let g=0;const B=[];let m=0,E=0;for(let u=0;u<=o.length;u++){const h=s.append("text").attr("text-anchor","middle").text(o[u]).attr("x",w).attr("y",p+g),y=h.node().getBBox();m=Math.max(m,y.width),E=Math.min(E,y.x),S.info(y.x,w,p+g),g===0&&(g=h.node().getBBox().height,S.info("Title height",g,p)),B.push(h)}let k=g*o.length;if(o.length>1){const u=(o.length-1)*g*.5;B.forEach((h,y)=>h.attr("y",p+y*g-u)),k=g*o.length}const r=s.node().getBBox();s.insert("rect",":first-child").attr("class","box").attr("x",w-m/2-t().state.padding/2).attr("y",p-k/2-t().state.padding/2-3.5).attr("width",m+t().state.padding).attr("height",k+t().state.padding),S.info(r)}R++},"drawEdge"),b,T={},V=f(function(){},"setConf"),tt=f(function(e){e.append("defs").append("marker").attr("id","dependencyEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"insertMarkers"),et=f(function(e,i,d,c){b=t().state;const n=t().securityLevel;let l;n==="sandbox"&&(l=H("#i"+i));const x=n==="sandbox"?H(l.nodes()[0].contentDocument.body):H("body"),a=n==="sandbox"?l.nodes()[0].contentDocument:document;S.debug("Rendering diagram "+e);const s=x.select(`[id='${i}']`);tt(s);const w=c.db.getRootDoc();A(w,s,void 0,!1,x,a,c);const p=b.padding,o=s.node().getBBox(),g=o.width+p*2,B=o.height+p*2,m=g*1.75;P(s,B,m,b.useMaxWidth),s.attr("viewBox",`${o.x-b.padding} ${o.y-b.padding} `+g+" "+B)},"draw"),at=f(e=>e?e.length*b.fontSizeFactor:1,"getLabelWidth"),A=f((e,i,d,c,n,l,x)=>{const a=new O({compound:!0,multigraph:!0});let s,w=!0;for(s=0;s{const y=h.parentElement;let v=0,M=0;y&&(y.parentElement&&(v=y.parentElement.getBBox().width),M=parseInt(y.getAttribute("data-x-shift"),10),Number.isNaN(M)&&(M=0)),h.setAttribute("x1",0-M+8),h.setAttribute("x2",v-M-8)})):S.debug("No Node "+r+": "+JSON.stringify(a.node(r)))});let E=m.getBBox();a.edges().forEach(function(r){r!==void 0&&a.edge(r)!==void 0&&(S.debug("Edge "+r.v+" -> "+r.w+": "+JSON.stringify(a.edge(r))),Q(i,a.edge(r),a.edge(r).relation))}),E=m.getBBox();const k={id:d||"root",label:d||"root",width:0,height:0};return k.width=E.width+2*b.padding,k.height=E.height+2*b.padding,S.debug("Doc rendered",k,a),k},"renderDoc"),it={setConf:V,draw:et},pt={parser:W,get db(){return new N(1)},renderer:it,styles:G,init:f(e=>{e.state||(e.state={}),e.state.arrowMarkerAbsolute=e.arrowMarkerAbsolute},"init")};export{pt as diagram}; diff --git a/_astro/stateDiagram-v2-4FDKWEC3.DqTJjzBS.js b/_astro/stateDiagram-v2-4FDKWEC3.DqTJjzBS.js new file mode 100644 index 00000000..f54437a9 --- /dev/null +++ b/_astro/stateDiagram-v2-4FDKWEC3.DqTJjzBS.js @@ -0,0 +1 @@ +import{s as e,b as r,a,S as s}from"./chunk-DI55MBZ5.DiMe6WwJ.js";import{_ as i}from"./mermaid.core.LbQlJBBQ.js";import"./chunk-55IACEB6.b7ueBidu.js";import"./chunk-QN33PNHL.BI3h-IJf.js";import"./page._rMDHl_T.js";var p={parser:a,get db(){return new s(2)},renderer:r,styles:e,init:i(t=>{t.state||(t.state={}),t.state.arrowMarkerAbsolute=t.arrowMarkerAbsolute},"init")};export{p as diagram}; diff --git a/_astro/timeline-definition-IT6M3QCI.-Sq8Di49.js b/_astro/timeline-definition-IT6M3QCI.-Sq8Di49.js new file mode 100644 index 00000000..9fd69057 --- /dev/null +++ b/_astro/timeline-definition-IT6M3QCI.-Sq8Di49.js @@ -0,0 +1,61 @@ +import{_ as s,c as xt,l as E,d as j,V as kt,W as vt,X as _t,Y as bt,B as wt,$ as St,y as Et}from"./mermaid.core.LbQlJBBQ.js";import{d as nt}from"./arc.DI4loXX0.js";import"./page._rMDHl_T.js";var Q=(function(){var n=s(function(x,r,a,c){for(a=a||{},c=x.length;c--;a[x[c]]=r);return a},"o"),t=[6,8,10,11,12,14,16,17,20,21],e=[1,9],l=[1,10],i=[1,11],d=[1,12],h=[1,13],f=[1,16],m=[1,17],p={trace:s(function(){},"trace"),yy:{},symbols_:{error:2,start:3,timeline:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,title:11,acc_title:12,acc_title_value:13,acc_descr:14,acc_descr_value:15,acc_descr_multiline_value:16,section:17,period_statement:18,event_statement:19,period:20,event:21,$accept:0,$end:1},terminals_:{2:"error",4:"timeline",6:"EOF",8:"SPACE",10:"NEWLINE",11:"title",12:"acc_title",13:"acc_title_value",14:"acc_descr",15:"acc_descr_value",16:"acc_descr_multiline_value",17:"section",20:"period",21:"event"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,1],[9,1],[18,1],[19,1]],performAction:s(function(r,a,c,u,y,o,w){var v=o.length-1;switch(y){case 1:return o[v-1];case 2:this.$=[];break;case 3:o[v-1].push(o[v]),this.$=o[v-1];break;case 4:case 5:this.$=o[v];break;case 6:case 7:this.$=[];break;case 8:u.getCommonDb().setDiagramTitle(o[v].substr(6)),this.$=o[v].substr(6);break;case 9:this.$=o[v].trim(),u.getCommonDb().setAccTitle(this.$);break;case 10:case 11:this.$=o[v].trim(),u.getCommonDb().setAccDescription(this.$);break;case 12:u.addSection(o[v].substr(8)),this.$=o[v].substr(8);break;case 15:u.addTask(o[v],0,""),this.$=o[v];break;case 16:u.addEvent(o[v].substr(2)),this.$=o[v];break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},n(t,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:e,12:l,14:i,16:d,17:h,18:14,19:15,20:f,21:m},n(t,[2,7],{1:[2,1]}),n(t,[2,3]),{9:18,11:e,12:l,14:i,16:d,17:h,18:14,19:15,20:f,21:m},n(t,[2,5]),n(t,[2,6]),n(t,[2,8]),{13:[1,19]},{15:[1,20]},n(t,[2,11]),n(t,[2,12]),n(t,[2,13]),n(t,[2,14]),n(t,[2,15]),n(t,[2,16]),n(t,[2,4]),n(t,[2,9]),n(t,[2,10])],defaultActions:{},parseError:s(function(r,a){if(a.recoverable)this.trace(r);else{var c=new Error(r);throw c.hash=a,c}},"parseError"),parse:s(function(r){var a=this,c=[0],u=[],y=[null],o=[],w=this.table,v="",N=0,P=0,W=2,U=1,H=o.slice.call(arguments,1),g=Object.create(this.lexer),b={yy:{}};for(var L in this.yy)Object.prototype.hasOwnProperty.call(this.yy,L)&&(b.yy[L]=this.yy[L]);g.setInput(r,b.yy),b.yy.lexer=g,b.yy.parser=this,typeof g.yylloc>"u"&&(g.yylloc={});var $=g.yylloc;o.push($);var z=g.options&&g.options.ranges;typeof b.yy.parseError=="function"?this.parseError=b.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Z(T){c.length=c.length-2*T,y.length=y.length-T,o.length=o.length-T}s(Z,"popStack");function tt(){var T;return T=u.pop()||g.lex()||U,typeof T!="number"&&(T instanceof Array&&(u=T,T=u.pop()),T=a.symbols_[T]||T),T}s(tt,"lex");for(var S,A,I,J,R={},B,M,et,O;;){if(A=c[c.length-1],this.defaultActions[A]?I=this.defaultActions[A]:((S===null||typeof S>"u")&&(S=tt()),I=w[A]&&w[A][S]),typeof I>"u"||!I.length||!I[0]){var K="";O=[];for(B in w[A])this.terminals_[B]&&B>W&&O.push("'"+this.terminals_[B]+"'");g.showPosition?K="Parse error on line "+(N+1)+`: +`+g.showPosition()+` +Expecting `+O.join(", ")+", got '"+(this.terminals_[S]||S)+"'":K="Parse error on line "+(N+1)+": Unexpected "+(S==U?"end of input":"'"+(this.terminals_[S]||S)+"'"),this.parseError(K,{text:g.match,token:this.terminals_[S]||S,line:g.yylineno,loc:$,expected:O})}if(I[0]instanceof Array&&I.length>1)throw new Error("Parse Error: multiple actions possible at state: "+A+", token: "+S);switch(I[0]){case 1:c.push(S),y.push(g.yytext),o.push(g.yylloc),c.push(I[1]),S=null,P=g.yyleng,v=g.yytext,N=g.yylineno,$=g.yylloc;break;case 2:if(M=this.productions_[I[1]][1],R.$=y[y.length-M],R._$={first_line:o[o.length-(M||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(M||1)].first_column,last_column:o[o.length-1].last_column},z&&(R._$.range=[o[o.length-(M||1)].range[0],o[o.length-1].range[1]]),J=this.performAction.apply(R,[v,P,N,b.yy,I[1],y,o].concat(H)),typeof J<"u")return J;M&&(c=c.slice(0,-1*M*2),y=y.slice(0,-1*M),o=o.slice(0,-1*M)),c.push(this.productions_[I[1]][0]),y.push(R.$),o.push(R._$),et=w[c[c.length-2]][c[c.length-1]],c.push(et);break;case 3:return!0}}return!0},"parse")},k=(function(){var x={EOF:1,parseError:s(function(a,c){if(this.yy.parser)this.yy.parser.parseError(a,c);else throw new Error(a)},"parseError"),setInput:s(function(r,a){return this.yy=a||this.yy||{},this._input=r,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:s(function(){var r=this._input[0];this.yytext+=r,this.yyleng++,this.offset++,this.match+=r,this.matched+=r;var a=r.match(/(?:\r\n?|\n).*/g);return a?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),r},"input"),unput:s(function(r){var a=r.length,c=r.split(/(?:\r\n?|\n)/g);this._input=r+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-a),this.offset-=a;var u=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),c.length-1&&(this.yylineno-=c.length-1);var y=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:c?(c.length===u.length?this.yylloc.first_column:0)+u[u.length-c.length].length-c[0].length:this.yylloc.first_column-a},this.options.ranges&&(this.yylloc.range=[y[0],y[0]+this.yyleng-a]),this.yyleng=this.yytext.length,this},"unput"),more:s(function(){return this._more=!0,this},"more"),reject:s(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:s(function(r){this.unput(this.match.slice(r))},"less"),pastInput:s(function(){var r=this.matched.substr(0,this.matched.length-this.match.length);return(r.length>20?"...":"")+r.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:s(function(){var r=this.match;return r.length<20&&(r+=this._input.substr(0,20-r.length)),(r.substr(0,20)+(r.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:s(function(){var r=this.pastInput(),a=new Array(r.length+1).join("-");return r+this.upcomingInput()+` +`+a+"^"},"showPosition"),test_match:s(function(r,a){var c,u,y;if(this.options.backtrack_lexer&&(y={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&&(y.yylloc.range=this.yylloc.range.slice(0))),u=r[0].match(/(?:\r\n?|\n).*/g),u&&(this.yylineno+=u.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:u?u[u.length-1].length-u[u.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+r[0].length},this.yytext+=r[0],this.match+=r[0],this.matches=r,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(r[0].length),this.matched+=r[0],c=this.performAction.call(this,this.yy,this,a,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),c)return c;if(this._backtrack){for(var o in y)this[o]=y[o];return!1}return!1},"test_match"),next:s(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var r,a,c,u;this._more||(this.yytext="",this.match="");for(var y=this._currentRules(),o=0;oa[0].length)){if(a=c,u=o,this.options.backtrack_lexer){if(r=this.test_match(c,y[o]),r!==!1)return r;if(this._backtrack){a=!1;continue}else return!1}else if(!this.options.flex)break}return a?(r=this.test_match(a,y[u]),r!==!1?r:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:s(function(){var a=this.next();return a||this.lex()},"lex"),begin:s(function(a){this.conditionStack.push(a)},"begin"),popState:s(function(){var a=this.conditionStack.length-1;return a>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:s(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:s(function(a){return a=this.conditionStack.length-1-Math.abs(a||0),a>=0?this.conditionStack[a]:"INITIAL"},"topState"),pushState:s(function(a){this.begin(a)},"pushState"),stateStackSize:s(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:s(function(a,c,u,y){switch(u){case 0:break;case 1:break;case 2:return 10;case 3:break;case 4:break;case 5:return 4;case 6:return 11;case 7:return this.begin("acc_title"),12;case 8:return this.popState(),"acc_title_value";case 9:return this.begin("acc_descr"),14;case 10:return this.popState(),"acc_descr_value";case 11:this.begin("acc_descr_multiline");break;case 12:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:return 17;case 15:return 21;case 16:return 20;case 17:return 6;case 18:return"INVALID"}},"anonymous"),rules:[/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:timeline\b)/i,/^(?:title\s[^\n]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:section\s[^:\n]+)/i,/^(?::\s(?:[^:\n]|:(?!\s))+)/i,/^(?:[^#:\n]+)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,9,11,14,15,16,17,18],inclusive:!0}}};return x})();p.lexer=k;function _(){this.yy={}}return s(_,"Parser"),_.prototype=p,p.Parser=_,new _})();Q.parser=Q;var Tt=Q,at={};wt(at,{addEvent:()=>yt,addSection:()=>ht,addTask:()=>pt,addTaskOrg:()=>gt,clear:()=>ct,default:()=>It,getCommonDb:()=>ot,getSections:()=>dt,getTasks:()=>ut});var F="",lt=0,X=[],G=[],V=[],ot=s(()=>St,"getCommonDb"),ct=s(function(){X.length=0,G.length=0,F="",V.length=0,Et()},"clear"),ht=s(function(n){F=n,X.push(n)},"addSection"),dt=s(function(){return X},"getSections"),ut=s(function(){let n=it();const t=100;let e=0;for(;!n&&ee.id===lt-1).events.push(n)},"addEvent"),gt=s(function(n){const t={section:F,type:F,description:n,task:n,classes:[]};G.push(t)},"addTaskOrg"),it=s(function(){const n=s(function(e){return V[e].processed},"compileTask");let t=!0;for(const[e,l]of V.entries())n(e),t=t&&l.processed;return t},"compileTasks"),It={clear:ct,getCommonDb:ot,addSection:ht,getSections:dt,getTasks:ut,addTask:pt,addTaskOrg:gt,addEvent:yt},Nt=12,q=s(function(n,t){const e=n.append("rect");return e.attr("x",t.x),e.attr("y",t.y),e.attr("fill",t.fill),e.attr("stroke",t.stroke),e.attr("width",t.width),e.attr("height",t.height),e.attr("rx",t.rx),e.attr("ry",t.ry),t.class!==void 0&&e.attr("class",t.class),e},"drawRect"),Lt=s(function(n,t){const l=n.append("circle").attr("cx",t.cx).attr("cy",t.cy).attr("class","face").attr("r",15).attr("stroke-width",2).attr("overflow","visible"),i=n.append("g");i.append("circle").attr("cx",t.cx-15/3).attr("cy",t.cy-15/3).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),i.append("circle").attr("cx",t.cx+15/3).attr("cy",t.cy-15/3).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666");function d(m){const p=nt().startAngle(Math.PI/2).endAngle(3*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);m.append("path").attr("class","mouth").attr("d",p).attr("transform","translate("+t.cx+","+(t.cy+2)+")")}s(d,"smile");function h(m){const p=nt().startAngle(3*Math.PI/2).endAngle(5*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);m.append("path").attr("class","mouth").attr("d",p).attr("transform","translate("+t.cx+","+(t.cy+7)+")")}s(h,"sad");function f(m){m.append("line").attr("class","mouth").attr("stroke",2).attr("x1",t.cx-5).attr("y1",t.cy+7).attr("x2",t.cx+5).attr("y2",t.cy+7).attr("class","mouth").attr("stroke-width","1px").attr("stroke","#666")}return s(f,"ambivalent"),t.score>3?d(i):t.score<3?h(i):f(i),l},"drawFace"),$t=s(function(n,t){const e=n.append("circle");return e.attr("cx",t.cx),e.attr("cy",t.cy),e.attr("class","actor-"+t.pos),e.attr("fill",t.fill),e.attr("stroke",t.stroke),e.attr("r",t.r),e.class!==void 0&&e.attr("class",e.class),t.title!==void 0&&e.append("title").text(t.title),e},"drawCircle"),ft=s(function(n,t){const e=t.text.replace(//gi," "),l=n.append("text");l.attr("x",t.x),l.attr("y",t.y),l.attr("class","legend"),l.style("text-anchor",t.anchor),t.class!==void 0&&l.attr("class",t.class);const i=l.append("tspan");return i.attr("x",t.x+t.textMargin*2),i.text(e),l},"drawText"),Mt=s(function(n,t){function e(i,d,h,f,m){return i+","+d+" "+(i+h)+","+d+" "+(i+h)+","+(d+f-m)+" "+(i+h-m*1.2)+","+(d+f)+" "+i+","+(d+f)}s(e,"genPoints");const l=n.append("polygon");l.attr("points",e(t.x,t.y,50,20,7)),l.attr("class","labelBox"),t.y=t.y+t.labelMargin,t.x=t.x+.5*t.labelMargin,ft(n,t)},"drawLabel"),Ht=s(function(n,t,e){const l=n.append("g"),i=Y();i.x=t.x,i.y=t.y,i.fill=t.fill,i.width=e.width,i.height=e.height,i.class="journey-section section-type-"+t.num,i.rx=3,i.ry=3,q(l,i),mt(e)(t.text,l,i.x,i.y,i.width,i.height,{class:"journey-section section-type-"+t.num},e,t.colour)},"drawSection"),rt=-1,Pt=s(function(n,t,e){const l=t.x+e.width/2,i=n.append("g");rt++,i.append("line").attr("id","task"+rt).attr("x1",l).attr("y1",t.y).attr("x2",l).attr("y2",450).attr("class","task-line").attr("stroke-width","1px").attr("stroke-dasharray","4 2").attr("stroke","#666"),Lt(i,{cx:l,cy:300+(5-t.score)*30,score:t.score});const h=Y();h.x=t.x,h.y=t.y,h.fill=t.fill,h.width=e.width,h.height=e.height,h.class="task task-type-"+t.num,h.rx=3,h.ry=3,q(i,h),mt(e)(t.task,i,h.x,h.y,h.width,h.height,{class:"task"},e,t.colour)},"drawTask"),At=s(function(n,t){q(n,{x:t.startx,y:t.starty,width:t.stopx-t.startx,height:t.stopy-t.starty,fill:t.fill,class:"rect"}).lower()},"drawBackgroundRect"),Ct=s(function(){return{x:0,y:0,fill:void 0,"text-anchor":"start",width:100,height:100,textMargin:0,rx:0,ry:0}},"getTextObj"),Y=s(function(){return{x:0,y:0,width:100,anchor:"start",height:100,rx:0,ry:0}},"getNoteRect"),mt=(function(){function n(i,d,h,f,m,p,k,_){const x=d.append("text").attr("x",h+m/2).attr("y",f+p/2+5).style("font-color",_).style("text-anchor","middle").text(i);l(x,k)}s(n,"byText");function t(i,d,h,f,m,p,k,_,x){const{taskFontSize:r,taskFontFamily:a}=_,c=i.split(//gi);for(let u=0;u)/).reverse(),i,d=[],h=1.1,f=e.attr("y"),m=parseFloat(e.attr("dy")),p=e.text(null).append("tspan").attr("x",0).attr("y",f).attr("dy",m+"em");for(let k=0;kt||i==="
    ")&&(d.pop(),p.text(d.join(" ").trim()),i==="
    "?d=[""]:d=[i],p=e.append("tspan").attr("x",0).attr("y",f).attr("dy",h+"em").text(i))})}s(D,"wrap");var Ft=s(function(n,t,e,l){const i=e%Nt-1,d=n.append("g");t.section=i,d.attr("class",(t.class?t.class+" ":"")+"timeline-node "+("section-"+i));const h=d.append("g"),f=d.append("g"),p=f.append("text").text(t.descr).attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle").call(D,t.width).node().getBBox(),k=l.fontSize?.replace?l.fontSize.replace("px",""):l.fontSize;return t.height=p.height+k*1.1*.5+t.padding,t.height=Math.max(t.height,t.maxHeight),t.width=t.width+2*t.padding,f.attr("transform","translate("+t.width/2+", "+t.padding/2+")"),Wt(h,t,i,l),t},"drawNode"),Vt=s(function(n,t,e){const l=n.append("g"),d=l.append("text").text(t.descr).attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle").call(D,t.width).node().getBBox(),h=e.fontSize?.replace?e.fontSize.replace("px",""):e.fontSize;return l.remove(),d.height+h*1.1*.5+t.padding},"getVirtualNodeHeight"),Wt=s(function(n,t,e){n.append("path").attr("id","node-"+t.id).attr("class","node-bkg node-"+t.type).attr("d",`M0 ${t.height-5} v${-t.height+10} q0,-5 5,-5 h${t.width-10} q5,0 5,5 v${t.height-5} H0 Z`),n.append("line").attr("class","node-line-"+e).attr("x1",0).attr("y1",t.height).attr("x2",t.width).attr("y2",t.height)},"defaultBkg"),C={drawRect:q,drawCircle:$t,drawSection:Ht,drawText:ft,drawLabel:Mt,drawTask:Pt,drawBackgroundRect:At,getTextObj:Ct,getNoteRect:Y,initGraphics:Rt,drawNode:Ft,getVirtualNodeHeight:Vt},zt=s(function(n,t,e,l){const i=xt(),d=i.timeline?.leftMargin??50;E.debug("timeline",l.db);const h=i.securityLevel;let f;h==="sandbox"&&(f=j("#i"+t));const p=(h==="sandbox"?j(f.nodes()[0].contentDocument.body):j("body")).select("#"+t);p.append("g");const k=l.db.getTasks(),_=l.db.getCommonDb().getDiagramTitle();E.debug("task",k),C.initGraphics(p);const x=l.db.getSections();E.debug("sections",x);let r=0,a=0,c=0,u=0,y=50+d,o=50;u=50;let w=0,v=!0;x.forEach(function(H){const g={number:w,descr:H,section:w,width:150,padding:20,maxHeight:r},b=C.getVirtualNodeHeight(p,g,i);E.debug("sectionHeight before draw",b),r=Math.max(r,b+20)});let N=0,P=0;E.debug("tasks.length",k.length);for(const[H,g]of k.entries()){const b={number:H,descr:g,section:g.section,width:150,padding:20,maxHeight:a},L=C.getVirtualNodeHeight(p,b,i);E.debug("taskHeight before draw",L),a=Math.max(a,L+20),N=Math.max(N,g.events.length);let $=0;for(const z of g.events){const Z={descr:z,section:g.section,number:g.section,width:150,padding:20,maxHeight:50};$+=C.getVirtualNodeHeight(p,Z,i)}g.events.length>0&&($+=(g.events.length-1)*10),P=Math.max(P,$)}E.debug("maxSectionHeight before draw",r),E.debug("maxTaskHeight before draw",a),x&&x.length>0?x.forEach(H=>{const g=k.filter(z=>z.section===H),b={number:w,descr:H,section:w,width:200*Math.max(g.length,1)-50,padding:20,maxHeight:r};E.debug("sectionNode",b);const L=p.append("g"),$=C.drawNode(L,b,w,i);E.debug("sectionNode output",$),L.attr("transform",`translate(${y}, ${u})`),o+=r+50,g.length>0&&st(p,g,w,y,o,a,i,N,P,r,!1),y+=200*Math.max(g.length,1),o=u,w++}):(v=!1,st(p,k,w,y,o,a,i,N,P,r,!0));const W=p.node().getBBox();E.debug("bounds",W),_&&p.append("text").text(_).attr("x",W.width/2-d).attr("font-size","4ex").attr("font-weight","bold").attr("y",20),c=v?r+a+150:a+100,p.append("g").attr("class","lineWrapper").append("line").attr("x1",d).attr("y1",c).attr("x2",W.width+3*d).attr("y2",c).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#arrowhead)"),kt(void 0,p,i.timeline?.padding??50,i.timeline?.useMaxWidth??!1)},"draw"),st=s(function(n,t,e,l,i,d,h,f,m,p,k){for(const _ of t){const x={descr:_.task,section:e,number:e,width:150,padding:20,maxHeight:d};E.debug("taskNode",x);const r=n.append("g").attr("class","taskWrapper"),c=C.drawNode(r,x,e,h).height;if(E.debug("taskHeight after draw",c),r.attr("transform",`translate(${l}, ${i})`),d=Math.max(d,c),_.events){const u=n.append("g").attr("class","lineWrapper");let y=d;i+=100,y=y+Bt(n,_.events,e,l,i,h),i-=100,u.append("line").attr("x1",l+190/2).attr("y1",i+d).attr("x2",l+190/2).attr("y2",i+d+100+m+100).attr("stroke-width",2).attr("stroke","black").attr("marker-end","url(#arrowhead)").attr("stroke-dasharray","5,5")}l=l+200,k&&!h.timeline?.disableMulticolor&&e++}i=i-10},"drawTasks"),Bt=s(function(n,t,e,l,i,d){let h=0;const f=i;i=i+100;for(const m of t){const p={descr:m,section:e,number:e,width:150,padding:20,maxHeight:50};E.debug("eventNode",p);const k=n.append("g").attr("class","eventWrapper"),x=C.drawNode(k,p,e,d).height;h=h+x,k.attr("transform",`translate(${l}, ${i})`),i=i+10+x}return i=f,h},"drawEvents"),Ot={setConf:s(()=>{},"setConf"),draw:zt},jt=s(n=>{let t="";for(let e=0;e` + .edge { + stroke-width: 3; + } + ${jt(n)} + .section-root rect, .section-root path, .section-root circle { + fill: ${n.git0}; + } + .section-root text { + fill: ${n.gitBranchLabel0}; + } + .icon-container { + height:100%; + display: flex; + justify-content: center; + align-items: center; + } + .edge { + fill: none; + } + .eventWrapper { + filter: brightness(120%); + } +`,"getStyles"),qt=Gt,Kt={db:at,renderer:Ot,parser:Tt,styles:qt};export{Kt as diagram}; diff --git a/_astro/track.DGDW7xQ4_1TLm9l.webp b/_astro/track.DGDW7xQ4_1TLm9l.webp new file mode 100644 index 00000000..29a07026 Binary files /dev/null and b/_astro/track.DGDW7xQ4_1TLm9l.webp differ diff --git a/_astro/tracking.CFeMHI6Z_Z1PUd5p.webp b/_astro/tracking.CFeMHI6Z_Z1PUd5p.webp new file mode 100644 index 00000000..2065d4da Binary files /dev/null and b/_astro/tracking.CFeMHI6Z_Z1PUd5p.webp differ diff --git a/_astro/treemap-KMMF4GRG.BHoxrBMR.js b/_astro/treemap-KMMF4GRG.BHoxrBMR.js new file mode 100644 index 00000000..8aa1d723 --- /dev/null +++ b/_astro/treemap-KMMF4GRG.BHoxrBMR.js @@ -0,0 +1,128 @@ +import{_ as wt}from"./page._rMDHl_T.js";import{m as st,f as $d,d as Sd}from"./min.D5TVP8RA.js";import{b as xd,l as kd,d as Id,m as Cd,r as fo,n as rs}from"./_baseUniq.CLojSEzq.js";import{b8 as wd}from"./mermaid.core.LbQlJBBQ.js";function _d(t,e){return xd(st(t,e))}function Nd(t,e){return t&&t.length?kd(t,Id(e)):[]}function le(t){return typeof t=="object"&&t!==null&&typeof t.$type=="string"}function ze(t){return typeof t=="object"&&t!==null&&typeof t.$refText=="string"}function bd(t){return typeof t=="object"&&t!==null&&typeof t.name=="string"&&typeof t.type=="string"&&typeof t.path=="string"}function Kr(t){return typeof t=="object"&&t!==null&&le(t.container)&&ze(t.reference)&&typeof t.message=="string"}class Yu{constructor(){this.subtypes={},this.allSubtypes={}}isInstance(e,n){return le(e)&&this.isSubtype(e.$type,n)}isSubtype(e,n){if(e===n)return!0;let r=this.subtypes[e];r||(r=this.subtypes[e]={});const i=r[n];if(i!==void 0)return i;{const s=this.computeIsSubtype(e,n);return r[n]=s,s}}getAllSubTypes(e){const n=this.allSubtypes[e];if(n)return n;{const r=this.getAllTypes(),i=[];for(const s of r)this.isSubtype(s,e)&&i.push(s);return this.allSubtypes[e]=i,i}}}function tr(t){return typeof t=="object"&&t!==null&&Array.isArray(t.content)}function Xu(t){return typeof t=="object"&&t!==null&&typeof t.tokenType=="object"}function Ju(t){return tr(t)&&typeof t.fullText=="string"}class ne{constructor(e,n){this.startFn=e,this.nextFn=n}iterator(){const e={state:this.startFn(),next:()=>this.nextFn(e.state),[Symbol.iterator]:()=>e};return e}[Symbol.iterator](){return this.iterator()}isEmpty(){return!!this.iterator().next().done}count(){const e=this.iterator();let n=0,r=e.next();for(;!r.done;)n++,r=e.next();return n}toArray(){const e=[],n=this.iterator();let r;do r=n.next(),r.value!==void 0&&e.push(r.value);while(!r.done);return e}toSet(){return new Set(this)}toMap(e,n){const r=this.map(i=>[e?e(i):i,n?n(i):i]);return new Map(r)}toString(){return this.join()}concat(e){return new ne(()=>({first:this.startFn(),firstDone:!1,iterator:e[Symbol.iterator]()}),n=>{let r;if(!n.firstDone){do if(r=this.nextFn(n.first),!r.done)return r;while(!r.done);n.firstDone=!0}do if(r=n.iterator.next(),!r.done)return r;while(!r.done);return Ae})}join(e=","){const n=this.iterator();let r="",i,s=!1;do i=n.next(),i.done||(s&&(r+=e),r+=Od(i.value)),s=!0;while(!i.done);return r}indexOf(e,n=0){const r=this.iterator();let i=0,s=r.next();for(;!s.done;){if(i>=n&&s.value===e)return i;s=r.next(),i++}return-1}every(e){const n=this.iterator();let r=n.next();for(;!r.done;){if(!e(r.value))return!1;r=n.next()}return!0}some(e){const n=this.iterator();let r=n.next();for(;!r.done;){if(e(r.value))return!0;r=n.next()}return!1}forEach(e){const n=this.iterator();let r=0,i=n.next();for(;!i.done;)e(i.value,r),i=n.next(),r++}map(e){return new ne(this.startFn,n=>{const{done:r,value:i}=this.nextFn(n);return r?Ae:{done:!1,value:e(i)}})}filter(e){return new ne(this.startFn,n=>{let r;do if(r=this.nextFn(n),!r.done&&e(r.value))return r;while(!r.done);return Ae})}nonNullable(){return this.filter(e=>e!=null)}reduce(e,n){const r=this.iterator();let i=n,s=r.next();for(;!s.done;)i===void 0?i=s.value:i=e(i,s.value),s=r.next();return i}reduceRight(e,n){return this.recursiveReduce(this.iterator(),e,n)}recursiveReduce(e,n,r){const i=e.next();if(i.done)return r;const s=this.recursiveReduce(e,n,r);return s===void 0?i.value:n(s,i.value)}find(e){const n=this.iterator();let r=n.next();for(;!r.done;){if(e(r.value))return r.value;r=n.next()}}findIndex(e){const n=this.iterator();let r=0,i=n.next();for(;!i.done;){if(e(i.value))return r;i=n.next(),r++}return-1}includes(e){const n=this.iterator();let r=n.next();for(;!r.done;){if(r.value===e)return!0;r=n.next()}return!1}flatMap(e){return new ne(()=>({this:this.startFn()}),n=>{do{if(n.iterator){const s=n.iterator.next();if(s.done)n.iterator=void 0;else return s}const{done:r,value:i}=this.nextFn(n.this);if(!r){const s=e(i);if(si(s))n.iterator=s[Symbol.iterator]();else return{done:!1,value:s}}}while(n.iterator);return Ae})}flat(e){if(e===void 0&&(e=1),e<=0)return this;const n=e>1?this.flat(e-1):this;return new ne(()=>({this:n.startFn()}),r=>{do{if(r.iterator){const a=r.iterator.next();if(a.done)r.iterator=void 0;else return a}const{done:i,value:s}=n.nextFn(r.this);if(!i)if(si(s))r.iterator=s[Symbol.iterator]();else return{done:!1,value:s}}while(r.iterator);return Ae})}head(){const n=this.iterator().next();if(!n.done)return n.value}tail(e=1){return new ne(()=>{const n=this.startFn();for(let r=0;r({size:0,state:this.startFn()}),n=>(n.size++,n.size>e?Ae:this.nextFn(n.state)))}distinct(e){return new ne(()=>({set:new Set,internalState:this.startFn()}),n=>{let r;do if(r=this.nextFn(n.internalState),!r.done){const i=e?e(r.value):r.value;if(!n.set.has(i))return n.set.add(i),r}while(!r.done);return Ae})}exclude(e,n){const r=new Set;for(const i of e){const s=n?n(i):i;r.add(s)}return this.filter(i=>{const s=n?n(i):i;return!r.has(s)})}}function Od(t){return typeof t=="string"?t:typeof t>"u"?"undefined":typeof t.toString=="function"?t.toString():Object.prototype.toString.call(t)}function si(t){return!!t&&typeof t[Symbol.iterator]=="function"}const Ld=new ne(()=>{},()=>Ae),Ae=Object.freeze({done:!0,value:void 0});function re(...t){if(t.length===1){const e=t[0];if(e instanceof ne)return e;if(si(e))return new ne(()=>e[Symbol.iterator](),n=>n.next());if(typeof e.length=="number")return new ne(()=>({index:0}),n=>n.index1?new ne(()=>({collIndex:0,arrIndex:0}),e=>{do{if(e.iterator){const n=e.iterator.next();if(!n.done)return n;e.iterator=void 0}if(e.array){if(e.arrIndex({iterators:r?.includeRoot?[[e][Symbol.iterator]()]:[n(e)[Symbol.iterator]()],pruned:!1}),i=>{for(i.pruned&&(i.iterators.pop(),i.pruned=!1);i.iterators.length>0;){const a=i.iterators[i.iterators.length-1].next();if(a.done)i.iterators.pop();else return i.iterators.push(n(a.value)[Symbol.iterator]()),a}return Ae})}iterator(){const e={state:this.startFn(),next:()=>this.nextFn(e.state),prune:()=>{e.state.pruned=!0},[Symbol.iterator]:()=>e};return e}}var Ps;(function(t){function e(s){return s.reduce((a,o)=>a+o,0)}t.sum=e;function n(s){return s.reduce((a,o)=>a*o,0)}t.product=n;function r(s){return s.reduce((a,o)=>Math.min(a,o))}t.min=r;function i(s){return s.reduce((a,o)=>Math.max(a,o))}t.max=i})(Ps||(Ps={}));function Ms(t){return new Aa(t,e=>tr(e)?e.content:[],{includeRoot:!0})}function Pd(t,e){for(;t.container;)if(t=t.container,t===e)return!0;return!1}function Ds(t){return{start:{character:t.startColumn-1,line:t.startLine-1},end:{character:t.endColumn,line:t.endLine-1}}}function ai(t){if(!t)return;const{offset:e,end:n,range:r}=t;return{range:r,offset:e,end:n,length:n-e}}var rt;(function(t){t[t.Before=0]="Before",t[t.After=1]="After",t[t.OverlapFront=2]="OverlapFront",t[t.OverlapBack=3]="OverlapBack",t[t.Inside=4]="Inside",t[t.Outside=5]="Outside"})(rt||(rt={}));function Md(t,e){if(t.end.linee.end.line||t.start.line===e.end.line&&t.start.character>=e.end.character)return rt.After;const n=t.start.line>e.start.line||t.start.line===e.start.line&&t.start.character>=e.start.character,r=t.end.linert.After}const Fd=/^[\w\p{L}]$/u;function Gd(t,e){if(t){const n=Ud(t,!0);if(n&&ho(n,e))return n;if(Ju(t)){const r=t.content.findIndex(i=>!i.hidden);for(let i=r-1;i>=0;i--){const s=t.content[i];if(ho(s,e))return s}}}}function ho(t,e){return Xu(t)&&e.includes(t.tokenType.name)}function Ud(t,e=!0){for(;t.container;){const n=t.container;let r=n.content.indexOf(t);for(;r>0;){r--;const i=n.content[r];if(e||!i.hidden)return i}t=n}}class Zu extends Error{constructor(e,n){super(e?`${n} at ${e.range.start.line}:${e.range.start.character}`:n)}}function lr(t){throw new Error("Error! The input value was not handled.")}const Rr="AbstractRule",Ar="AbstractType",is="Condition",po="TypeDefinition",ss="ValueLiteral",yn="AbstractElement";function Bd(t){return F.isInstance(t,yn)}const Er="ArrayLiteral",$r="ArrayType",Tn="BooleanLiteral";function jd(t){return F.isInstance(t,Tn)}const vn="Conjunction";function Kd(t){return F.isInstance(t,vn)}const Rn="Disjunction";function Hd(t){return F.isInstance(t,Rn)}const Sr="Grammar",as="GrammarImport",An="InferredType";function Qu(t){return F.isInstance(t,An)}const En="Interface";function ec(t){return F.isInstance(t,En)}const os="NamedArgument",$n="Negation";function Vd(t){return F.isInstance(t,$n)}const xr="NumberLiteral",kr="Parameter",Sn="ParameterReference";function Wd(t){return F.isInstance(t,Sn)}const xn="ParserRule";function Ne(t){return F.isInstance(t,xn)}const Ir="ReferenceType",Hr="ReturnType";function zd(t){return F.isInstance(t,Hr)}const kn="SimpleType";function qd(t){return F.isInstance(t,kn)}const Cr="StringLiteral",Yt="TerminalRule";function Ut(t){return F.isInstance(t,Yt)}const In="Type";function tc(t){return F.isInstance(t,In)}const ls="TypeAttribute",wr="UnionType",Cn="Action";function _i(t){return F.isInstance(t,Cn)}const wn="Alternatives";function nc(t){return F.isInstance(t,wn)}const _n="Assignment";function Ot(t){return F.isInstance(t,_n)}const Nn="CharacterRange";function Yd(t){return F.isInstance(t,Nn)}const bn="CrossReference";function Ea(t){return F.isInstance(t,bn)}const On="EndOfFile";function Xd(t){return F.isInstance(t,On)}const Ln="Group";function $a(t){return F.isInstance(t,Ln)}const Pn="Keyword";function Lt(t){return F.isInstance(t,Pn)}const Mn="NegatedToken";function Jd(t){return F.isInstance(t,Mn)}const Dn="RegexToken";function Zd(t){return F.isInstance(t,Dn)}const Fn="RuleCall";function Pt(t){return F.isInstance(t,Fn)}const Gn="TerminalAlternatives";function Qd(t){return F.isInstance(t,Gn)}const Un="TerminalGroup";function eh(t){return F.isInstance(t,Un)}const Bn="TerminalRuleCall";function th(t){return F.isInstance(t,Bn)}const jn="UnorderedGroup";function rc(t){return F.isInstance(t,jn)}const Kn="UntilToken";function nh(t){return F.isInstance(t,Kn)}const Hn="Wildcard";function rh(t){return F.isInstance(t,Hn)}class ic extends Yu{getAllTypes(){return[yn,Rr,Ar,Cn,wn,Er,$r,_n,Tn,Nn,is,vn,bn,Rn,On,Sr,as,Ln,An,En,Pn,os,Mn,$n,xr,kr,Sn,xn,Ir,Dn,Hr,Fn,kn,Cr,Gn,Un,Yt,Bn,In,ls,po,wr,jn,Kn,ss,Hn]}computeIsSubtype(e,n){switch(e){case Cn:case wn:case _n:case Nn:case bn:case On:case Ln:case Pn:case Mn:case Dn:case Fn:case Gn:case Un:case Bn:case jn:case Kn:case Hn:return this.isSubtype(yn,n);case Er:case xr:case Cr:return this.isSubtype(ss,n);case $r:case Ir:case kn:case wr:return this.isSubtype(po,n);case Tn:return this.isSubtype(is,n)||this.isSubtype(ss,n);case vn:case Rn:case $n:case Sn:return this.isSubtype(is,n);case An:case En:case In:return this.isSubtype(Ar,n);case xn:return this.isSubtype(Rr,n)||this.isSubtype(Ar,n);case Yt:return this.isSubtype(Rr,n);default:return!1}}getReferenceType(e){const n=`${e.container.$type}:${e.property}`;switch(n){case"Action:type":case"CrossReference:type":case"Interface:superTypes":case"ParserRule:returnType":case"SimpleType:typeRef":return Ar;case"Grammar:hiddenTokens":case"ParserRule:hiddenTokens":case"RuleCall:rule":return Rr;case"Grammar:usedGrammars":return Sr;case"NamedArgument:parameter":case"ParameterReference:parameter":return kr;case"TerminalRuleCall:rule":return Yt;default:throw new Error(`${n} is not a valid reference id.`)}}getTypeMetaData(e){switch(e){case yn:return{name:yn,properties:[{name:"cardinality"},{name:"lookahead"}]};case Er:return{name:Er,properties:[{name:"elements",defaultValue:[]}]};case $r:return{name:$r,properties:[{name:"elementType"}]};case Tn:return{name:Tn,properties:[{name:"true",defaultValue:!1}]};case vn:return{name:vn,properties:[{name:"left"},{name:"right"}]};case Rn:return{name:Rn,properties:[{name:"left"},{name:"right"}]};case Sr:return{name:Sr,properties:[{name:"definesHiddenTokens",defaultValue:!1},{name:"hiddenTokens",defaultValue:[]},{name:"imports",defaultValue:[]},{name:"interfaces",defaultValue:[]},{name:"isDeclared",defaultValue:!1},{name:"name"},{name:"rules",defaultValue:[]},{name:"types",defaultValue:[]},{name:"usedGrammars",defaultValue:[]}]};case as:return{name:as,properties:[{name:"path"}]};case An:return{name:An,properties:[{name:"name"}]};case En:return{name:En,properties:[{name:"attributes",defaultValue:[]},{name:"name"},{name:"superTypes",defaultValue:[]}]};case os:return{name:os,properties:[{name:"calledByName",defaultValue:!1},{name:"parameter"},{name:"value"}]};case $n:return{name:$n,properties:[{name:"value"}]};case xr:return{name:xr,properties:[{name:"value"}]};case kr:return{name:kr,properties:[{name:"name"}]};case Sn:return{name:Sn,properties:[{name:"parameter"}]};case xn:return{name:xn,properties:[{name:"dataType"},{name:"definesHiddenTokens",defaultValue:!1},{name:"definition"},{name:"entry",defaultValue:!1},{name:"fragment",defaultValue:!1},{name:"hiddenTokens",defaultValue:[]},{name:"inferredType"},{name:"name"},{name:"parameters",defaultValue:[]},{name:"returnType"},{name:"wildcard",defaultValue:!1}]};case Ir:return{name:Ir,properties:[{name:"referenceType"}]};case Hr:return{name:Hr,properties:[{name:"name"}]};case kn:return{name:kn,properties:[{name:"primitiveType"},{name:"stringType"},{name:"typeRef"}]};case Cr:return{name:Cr,properties:[{name:"value"}]};case Yt:return{name:Yt,properties:[{name:"definition"},{name:"fragment",defaultValue:!1},{name:"hidden",defaultValue:!1},{name:"name"},{name:"type"}]};case In:return{name:In,properties:[{name:"name"},{name:"type"}]};case ls:return{name:ls,properties:[{name:"defaultValue"},{name:"isOptional",defaultValue:!1},{name:"name"},{name:"type"}]};case wr:return{name:wr,properties:[{name:"types",defaultValue:[]}]};case Cn:return{name:Cn,properties:[{name:"cardinality"},{name:"feature"},{name:"inferredType"},{name:"lookahead"},{name:"operator"},{name:"type"}]};case wn:return{name:wn,properties:[{name:"cardinality"},{name:"elements",defaultValue:[]},{name:"lookahead"}]};case _n:return{name:_n,properties:[{name:"cardinality"},{name:"feature"},{name:"lookahead"},{name:"operator"},{name:"terminal"}]};case Nn:return{name:Nn,properties:[{name:"cardinality"},{name:"left"},{name:"lookahead"},{name:"right"}]};case bn:return{name:bn,properties:[{name:"cardinality"},{name:"deprecatedSyntax",defaultValue:!1},{name:"lookahead"},{name:"terminal"},{name:"type"}]};case On:return{name:On,properties:[{name:"cardinality"},{name:"lookahead"}]};case Ln:return{name:Ln,properties:[{name:"cardinality"},{name:"elements",defaultValue:[]},{name:"guardCondition"},{name:"lookahead"}]};case Pn:return{name:Pn,properties:[{name:"cardinality"},{name:"lookahead"},{name:"value"}]};case Mn:return{name:Mn,properties:[{name:"cardinality"},{name:"lookahead"},{name:"terminal"}]};case Dn:return{name:Dn,properties:[{name:"cardinality"},{name:"lookahead"},{name:"regex"}]};case Fn:return{name:Fn,properties:[{name:"arguments",defaultValue:[]},{name:"cardinality"},{name:"lookahead"},{name:"rule"}]};case Gn:return{name:Gn,properties:[{name:"cardinality"},{name:"elements",defaultValue:[]},{name:"lookahead"}]};case Un:return{name:Un,properties:[{name:"cardinality"},{name:"elements",defaultValue:[]},{name:"lookahead"}]};case Bn:return{name:Bn,properties:[{name:"cardinality"},{name:"lookahead"},{name:"rule"}]};case jn:return{name:jn,properties:[{name:"cardinality"},{name:"elements",defaultValue:[]},{name:"lookahead"}]};case Kn:return{name:Kn,properties:[{name:"cardinality"},{name:"lookahead"},{name:"terminal"}]};case Hn:return{name:Hn,properties:[{name:"cardinality"},{name:"lookahead"}]};default:return{name:e,properties:[]}}}}const F=new ic;function ih(t){for(const[e,n]of Object.entries(t))e.startsWith("$")||(Array.isArray(n)?n.forEach((r,i)=>{le(r)&&(r.$container=t,r.$containerProperty=e,r.$containerIndex=i)}):le(n)&&(n.$container=t,n.$containerProperty=e))}function Ni(t,e){let n=t;for(;n;){if(e(n))return n;n=n.$container}}function pt(t){const n=Fs(t).$document;if(!n)throw new Error("AST node has no document.");return n}function Fs(t){for(;t.$container;)t=t.$container;return t}function Sa(t,e){if(!t)throw new Error("Node must be an AstNode.");const n=e?.range;return new ne(()=>({keys:Object.keys(t),keyIndex:0,arrayIndex:0}),r=>{for(;r.keyIndexSa(n,e))}function Jt(t,e){if(!t)throw new Error("Root node must be an AstNode.");return new Aa(t,n=>Sa(n,e),{includeRoot:!0})}function mo(t,e){var n;if(!e)return!0;const r=(n=t.$cstNode)===null||n===void 0?void 0:n.range;return r?Dd(r,e):!1}function sc(t){return new ne(()=>({keys:Object.keys(t),keyIndex:0,arrayIndex:0}),e=>{for(;e.keyIndex=this.input.length)throw Error("Unexpected end of input");this.idx++}loc(e){return{begin:e,end:this.idx}}}class bi{visitChildren(e){for(const n in e){const r=e[n];e.hasOwnProperty(n)&&(r.type!==void 0?this.visit(r):Array.isArray(r)&&r.forEach(i=>{this.visit(i)},this))}}visit(e){switch(e.type){case"Pattern":this.visitPattern(e);break;case"Flags":this.visitFlags(e);break;case"Disjunction":this.visitDisjunction(e);break;case"Alternative":this.visitAlternative(e);break;case"StartAnchor":this.visitStartAnchor(e);break;case"EndAnchor":this.visitEndAnchor(e);break;case"WordBoundary":this.visitWordBoundary(e);break;case"NonWordBoundary":this.visitNonWordBoundary(e);break;case"Lookahead":this.visitLookahead(e);break;case"NegativeLookahead":this.visitNegativeLookahead(e);break;case"Character":this.visitCharacter(e);break;case"Set":this.visitSet(e);break;case"Group":this.visitGroup(e);break;case"GroupBackReference":this.visitGroupBackReference(e);break;case"Quantifier":this.visitQuantifier(e);break}this.visitChildren(e)}visitPattern(e){}visitFlags(e){}visitDisjunction(e){}visitAlternative(e){}visitStartAnchor(e){}visitEndAnchor(e){}visitWordBoundary(e){}visitNonWordBoundary(e){}visitLookahead(e){}visitNegativeLookahead(e){}visitCharacter(e){}visitSet(e){}visitGroup(e){}visitGroupBackReference(e){}visitQuantifier(e){}}const uh=/\r?\n/gm,ch=new oc;class fh extends bi{constructor(){super(...arguments),this.isStarting=!0,this.endRegexpStack=[],this.multiline=!1}get endRegex(){return this.endRegexpStack.join("")}reset(e){this.multiline=!1,this.regex=e,this.startRegexp="",this.isStarting=!0,this.endRegexpStack=[]}visitGroup(e){e.quantifier&&(this.isStarting=!1,this.endRegexpStack=[])}visitCharacter(e){const n=String.fromCharCode(e.value);if(!this.multiline&&n===` +`&&(this.multiline=!0),e.quantifier)this.isStarting=!1,this.endRegexpStack=[];else{const r=Oi(n);this.endRegexpStack.push(r),this.isStarting&&(this.startRegexp+=r)}}visitSet(e){if(!this.multiline){const n=this.regex.substring(e.loc.begin,e.loc.end),r=new RegExp(n);this.multiline=!!` +`.match(r)}if(e.quantifier)this.isStarting=!1,this.endRegexpStack=[];else{const n=this.regex.substring(e.loc.begin,e.loc.end);this.endRegexpStack.push(n),this.isStarting&&(this.startRegexp+=n)}}visitChildren(e){e.type==="Group"&&e.quantifier||super.visitChildren(e)}}const cs=new fh;function dh(t){try{return typeof t=="string"&&(t=new RegExp(t)),t=t.toString(),cs.reset(t),cs.visit(ch.pattern(t)),cs.multiline}catch{return!1}}const hh=`\f +\r \v              \u2028\u2029   \uFEFF`.split("");function Gs(t){const e=typeof t=="string"?new RegExp(t):t;return hh.some(n=>e.test(n))}function Oi(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function ph(t){return Array.prototype.map.call(t,e=>/\w/.test(e)?`[${e.toLowerCase()}${e.toUpperCase()}]`:Oi(e)).join("")}function mh(t,e){const n=gh(t),r=e.match(n);return!!r&&r[0].length>0}function gh(t){typeof t=="string"&&(t=new RegExp(t));const e=t,n=t.source;let r=0;function i(){let s="",a;function o(u){s+=n.substr(r,u),r+=u}function l(u){s+="(?:"+n.substr(r,u)+"|$)",r+=u}for(;r",r)-r+1);break;default:l(2);break}break;case"[":a=/\[(?:\\.|.)*?\]/g,a.lastIndex=r,a=a.exec(n)||[],l(a[0].length);break;case"|":case"^":case"$":case"*":case"+":case"?":o(1);break;case"{":a=/\{\d+,?\d*\}/g,a.lastIndex=r,a=a.exec(n),a?o(a[0].length):l(1);break;case"(":if(n[r+1]==="?")switch(n[r+2]){case":":s+="(?:",r+=3,s+=i()+"|$)";break;case"=":s+="(?=",r+=3,s+=i()+")";break;case"!":a=r,r+=3,i(),s+=n.substr(a,r-a);break;case"<":switch(n[r+3]){case"=":case"!":a=r,r+=4,i(),s+=n.substr(a,r-a);break;default:o(n.indexOf(">",r)-r+1),s+=i()+"|$)";break}break}else o(1),s+=i()+"|$)";break;case")":return++r,s;default:l(1);break}return s}return new RegExp(i(),t.flags)}function yh(t){return t.rules.find(e=>Ne(e)&&e.entry)}function Th(t){return t.rules.filter(e=>Ut(e)&&e.hidden)}function lc(t,e){const n=new Set,r=yh(t);if(!r)return new Set(t.rules);const i=[r].concat(Th(t));for(const a of i)uc(a,n,e);const s=new Set;for(const a of t.rules)(n.has(a.name)||Ut(a)&&a.hidden)&&s.add(a);return s}function uc(t,e,n){e.add(t.name),ur(t).forEach(r=>{if(Pt(r)||n){const i=r.rule.ref;i&&!e.has(i.name)&&uc(i,e,n)}})}function vh(t){if(t.terminal)return t.terminal;if(t.type.ref){const e=fc(t.type.ref);return e?.terminal}}function Rh(t){return t.hidden&&!Gs(Ca(t))}function Ah(t,e){return!t||!e?[]:xa(t,e,t.astNode,!0)}function cc(t,e,n){if(!t||!e)return;const r=xa(t,e,t.astNode,!0);if(r.length!==0)return n!==void 0?n=Math.max(0,Math.min(n,r.length-1)):n=0,r[n]}function xa(t,e,n,r){if(!r){const i=Ni(t.grammarSource,Ot);if(i&&i.feature===e)return[t]}return tr(t)&&t.astNode===n?t.content.flatMap(i=>xa(i,e,n,!1)):[]}function Eh(t,e,n){if(!t)return;const r=$h(t,e,t?.astNode);if(r.length!==0)return n!==void 0?n=Math.max(0,Math.min(n,r.length-1)):n=0,r[n]}function $h(t,e,n){if(t.astNode!==n)return[];if(Lt(t.grammarSource)&&t.grammarSource.value===e)return[t];const r=Ms(t).iterator();let i;const s=[];do if(i=r.next(),!i.done){const a=i.value;a.astNode===n?Lt(a.grammarSource)&&a.grammarSource.value===e&&s.push(a):r.prune()}while(!i.done);return s}function Sh(t){var e;const n=t.astNode;for(;n===((e=t.container)===null||e===void 0?void 0:e.astNode);){const r=Ni(t.grammarSource,Ot);if(r)return r;t=t.container}}function fc(t){let e=t;return Qu(e)&&(_i(e.$container)?e=e.$container.$container:Ne(e.$container)?e=e.$container:lr(e.$container)),dc(t,e,new Map)}function dc(t,e,n){var r;function i(s,a){let o;return Ni(s,Ot)||(o=dc(a,a,n)),n.set(t,o),o}if(n.has(t))return n.get(t);n.set(t,void 0);for(const s of ur(e)){if(Ot(s)&&s.feature.toLowerCase()==="name")return n.set(t,s),s;if(Pt(s)&&Ne(s.rule.ref))return i(s,s.rule.ref);if(qd(s)&&(!((r=s.typeRef)===null||r===void 0)&&r.ref))return i(s,s.typeRef.ref)}}function hc(t){return pc(t,new Set)}function pc(t,e){if(e.has(t))return!0;e.add(t);for(const n of ur(t))if(Pt(n)){if(!n.rule.ref||Ne(n.rule.ref)&&!pc(n.rule.ref,e))return!1}else{if(Ot(n))return!1;if(_i(n))return!1}return!!t.definition}function ka(t){if(t.inferredType)return t.inferredType.name;if(t.dataType)return t.dataType;if(t.returnType){const e=t.returnType.ref;if(e){if(Ne(e))return e.name;if(ec(e)||tc(e))return e.name}}}function Ia(t){var e;if(Ne(t))return hc(t)?t.name:(e=ka(t))!==null&&e!==void 0?e:t.name;if(ec(t)||tc(t)||zd(t))return t.name;if(_i(t)){const n=xh(t);if(n)return n}else if(Qu(t))return t.name;throw new Error("Cannot get name of Unknown Type")}function xh(t){var e;if(t.inferredType)return t.inferredType.name;if(!((e=t.type)===null||e===void 0)&&e.ref)return Ia(t.type.ref)}function kh(t){var e,n,r;return Ut(t)?(n=(e=t.type)===null||e===void 0?void 0:e.name)!==null&&n!==void 0?n:"string":(r=ka(t))!==null&&r!==void 0?r:t.name}function Ca(t){const e={s:!1,i:!1,u:!1},n=un(t.definition,e),r=Object.entries(e).filter(([,i])=>i).map(([i])=>i).join("");return new RegExp(n,r)}const wa=/[\s\S]/.source;function un(t,e){if(Qd(t))return Ih(t);if(eh(t))return Ch(t);if(Yd(t))return Nh(t);if(th(t)){const n=t.rule.ref;if(!n)throw new Error("Missing rule reference.");return at(un(n.definition),{cardinality:t.cardinality,lookahead:t.lookahead})}else{if(Jd(t))return _h(t);if(nh(t))return wh(t);if(Zd(t)){const n=t.regex.lastIndexOf("/"),r=t.regex.substring(1,n),i=t.regex.substring(n+1);return e&&(e.i=i.includes("i"),e.s=i.includes("s"),e.u=i.includes("u")),at(r,{cardinality:t.cardinality,lookahead:t.lookahead,wrap:!1})}else{if(rh(t))return at(wa,{cardinality:t.cardinality,lookahead:t.lookahead});throw new Error(`Invalid terminal element: ${t?.$type}`)}}}function Ih(t){return at(t.elements.map(e=>un(e)).join("|"),{cardinality:t.cardinality,lookahead:t.lookahead})}function Ch(t){return at(t.elements.map(e=>un(e)).join(""),{cardinality:t.cardinality,lookahead:t.lookahead})}function wh(t){return at(`${wa}*?${un(t.terminal)}`,{cardinality:t.cardinality,lookahead:t.lookahead})}function _h(t){return at(`(?!${un(t.terminal)})${wa}*?`,{cardinality:t.cardinality,lookahead:t.lookahead})}function Nh(t){return t.right?at(`[${fs(t.left)}-${fs(t.right)}]`,{cardinality:t.cardinality,lookahead:t.lookahead,wrap:!1}):at(fs(t.left),{cardinality:t.cardinality,lookahead:t.lookahead,wrap:!1})}function fs(t){return Oi(t.value)}function at(t,e){var n;return(e.wrap!==!1||e.lookahead)&&(t=`(${(n=e.lookahead)!==null&&n!==void 0?n:""}${t})`),e.cardinality?`${t}${e.cardinality}`:t}function bh(t){const e=[],n=t.Grammar;for(const r of n.rules)Ut(r)&&Rh(r)&&dh(Ca(r))&&e.push(r.name);return{multilineCommentRules:e,nameRegexp:Fd}}var mc=typeof global=="object"&&global&&global.Object===Object&&global,Oh=typeof self=="object"&&self&&self.Object===Object&&self,Ye=mc||Oh||Function("return this")(),be=Ye.Symbol,gc=Object.prototype,Lh=gc.hasOwnProperty,Ph=gc.toString,pn=be?be.toStringTag:void 0;function Mh(t){var e=Lh.call(t,pn),n=t[pn];try{t[pn]=void 0;var r=!0}catch{}var i=Ph.call(t);return r&&(e?t[pn]=n:delete t[pn]),i}var Dh=Object.prototype,Fh=Dh.toString;function Gh(t){return Fh.call(t)}var Uh="[object Null]",Bh="[object Undefined]",To=be?be.toStringTag:void 0;function Rt(t){return t==null?t===void 0?Bh:Uh:To&&To in Object(t)?Mh(t):Gh(t)}function Be(t){return t!=null&&typeof t=="object"}var jh="[object Symbol]";function Li(t){return typeof t=="symbol"||Be(t)&&Rt(t)==jh}function Pi(t,e){for(var n=-1,r=t==null?0:t.length,i=Array(r);++n0){if(++e>=vp)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}function $p(t){return function(){return t}}var ui=(function(){try{var t=jt(Object,"defineProperty");return t({},"",{}),t}catch{}})(),Sp=ui?function(t,e){return ui(t,"toString",{configurable:!0,enumerable:!1,value:$p(e),writable:!0})}:en,xp=Ep(Sp);function Tc(t,e){for(var n=-1,r=t==null?0:t.length;++n-1}var Cp=9007199254740991,wp=/^(?:0|[1-9]\d*)$/;function Di(t,e){var n=typeof t;return e=e??Cp,!!e&&(n=="number"||n!="symbol"&&wp.test(t))&&t>-1&&t%1==0&&t-1&&t%1==0&&t<=Op}function Xe(t){return t!=null&&Oa(t.length)&&!ct(t)}function Ac(t,e,n){if(!Oe(n))return!1;var r=typeof e;return(r=="number"?Xe(n)&&Di(e,n.length):r=="string"&&e in n)?cr(n[e],t):!1}function Lp(t){return ba(function(e,n){var r=-1,i=n.length,s=i>1?n[i-1]:void 0,a=i>2?n[2]:void 0;for(s=t.length>3&&typeof s=="function"?(i--,s):void 0,a&&Ac(n[0],n[1],a)&&(s=i<3?void 0:s,i=1),e=Object(e);++r-1}function Vm(t,e){var n=this.__data__,r=Bi(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this}function ft(t){var e=-1,n=t==null?0:t.length;for(this.clear();++ei?0:i+e),n=n>i?i:n,n<0&&(n+=i),i=e>n?0:n-e>>>0,e>>>=0;for(var s=Array(i);++ro))return!1;var u=s.get(t),c=s.get(e);if(u&&c)return u==e&&c==t;var f=-1,d=!0,h=n&By?new tn:void 0;for(s.set(t,e),s.set(e,t);++f2?e[2]:void 0;for(i&&Ac(e[0],e[1],i)&&(r=1);++n=NT&&(s=Ka,a=!1,e=new tn(e));e:for(;++i-1?i[s?e[a]:a]:void 0}}var DT=Math.max;function FT(t,e,n){var r=t==null?0:t.length;if(!r)return-1;var i=n==null?0:Mi(n);return i<0&&(i=DT(r+i,0)),vc(t,Je(e),i)}var rn=MT(FT);function je(t){return t&&t.length?t[0]:void 0}function GT(t,e){var n=-1,r=Xe(t)?Array(t.length):[];return Kt(t,function(i,s,a){r[++n]=e(i,s,a)}),r}function I(t,e){var n=P(t)?Pi:GT;return n(t,Je(e))}function _e(t,e){return Ua(I(t,e))}var UT=Object.prototype,BT=UT.hasOwnProperty,jT=wT(function(t,e,n){BT.call(t,n)?t[n].push(e):Na(t,n,[e])}),KT=Object.prototype,HT=KT.hasOwnProperty;function VT(t,e){return t!=null&&HT.call(t,e)}function C(t,e){return t!=null&&Bc(t,e,VT)}var WT="[object String]";function pe(t){return typeof t=="string"||!P(t)&&Be(t)&&Rt(t)==WT}function zT(t,e){return Pi(e,function(n){return t[n]})}function J(t){return t==null?[]:zT(t,Le(t))}var qT=Math.max;function de(t,e,n,r){t=Xe(t)?t:J(t),n=n?Mi(n):0;var i=t.length;return n<0&&(n=qT(i+n,0)),pe(t)?n<=i&&t.indexOf(e,n)>-1:!!i&&_a(t,e,n)>-1}function Yo(t,e,n){var r=t==null?0:t.length;if(!r)return-1;var i=0;return _a(t,e,i)}var YT="[object Map]",XT="[object Set]",JT=Object.prototype,ZT=JT.hasOwnProperty;function U(t){if(t==null)return!0;if(Xe(t)&&(P(t)||typeof t=="string"||typeof t.splice=="function"||nr(t)||La(t)||Gi(t)))return!t.length;var e=we(t);if(e==YT||e==XT)return!t.size;if(dr(t))return!Ic(t).length;for(var n in t)if(ZT.call(t,n))return!1;return!0}var QT="[object RegExp]";function ev(t){return Be(t)&&Rt(t)==QT}var Xo=mt&&mt.isRegExp,ot=Xo?Ui(Xo):ev;function lt(t){return t===void 0}var tv="Expected a function";function nv(t){if(typeof t!="function")throw new TypeError(tv);return function(){var e=arguments;switch(e.length){case 0:return!t.call(this);case 1:return!t.call(this,e[0]);case 2:return!t.call(this,e[0],e[1]);case 3:return!t.call(this,e[0],e[1],e[2])}return!t.apply(this,e)}}function rv(t,e,n,r){if(!Oe(t))return t;e=Ki(e,t);for(var i=-1,s=e.length,a=s-1,o=t;o!=null&&++i=uv){var u=lv(t);if(u)return Ha(u);a=!1,i=Ka,l=new tn}else l=o;e:for(;++r{n.accept(e)})}}class ce extends Ze{constructor(e){super([]),this.idx=1,$e(this,Ke(e,n=>n!==void 0))}set definition(e){}get definition(){return this.referencedRule!==void 0?this.referencedRule.definition:[]}accept(e){e.visit(this)}}class cn extends Ze{constructor(e){super(e.definition),this.orgText="",$e(this,Ke(e,n=>n!==void 0))}}class me extends Ze{constructor(e){super(e.definition),this.ignoreAmbiguities=!1,$e(this,Ke(e,n=>n!==void 0))}}let ie=class extends Ze{constructor(e){super(e.definition),this.idx=1,$e(this,Ke(e,n=>n!==void 0))}};class xe extends Ze{constructor(e){super(e.definition),this.idx=1,$e(this,Ke(e,n=>n!==void 0))}}class ke extends Ze{constructor(e){super(e.definition),this.idx=1,$e(this,Ke(e,n=>n!==void 0))}}class z extends Ze{constructor(e){super(e.definition),this.idx=1,$e(this,Ke(e,n=>n!==void 0))}}class ge extends Ze{constructor(e){super(e.definition),this.idx=1,$e(this,Ke(e,n=>n!==void 0))}}class ye extends Ze{get definition(){return this._definition}set definition(e){this._definition=e}constructor(e){super(e.definition),this.idx=1,this.ignoreAmbiguities=!1,this.hasPredicates=!1,$e(this,Ke(e,n=>n!==void 0))}}class j{constructor(e){this.idx=1,$e(this,Ke(e,n=>n!==void 0))}accept(e){e.visit(this)}}function hv(t){return I(t,Wr)}function Wr(t){function e(n){return I(n,Wr)}if(t instanceof ce){const n={type:"NonTerminal",name:t.nonTerminalName,idx:t.idx};return pe(t.label)&&(n.label=t.label),n}else{if(t instanceof me)return{type:"Alternative",definition:e(t.definition)};if(t instanceof ie)return{type:"Option",idx:t.idx,definition:e(t.definition)};if(t instanceof xe)return{type:"RepetitionMandatory",idx:t.idx,definition:e(t.definition)};if(t instanceof ke)return{type:"RepetitionMandatoryWithSeparator",idx:t.idx,separator:Wr(new j({terminalType:t.separator})),definition:e(t.definition)};if(t instanceof ge)return{type:"RepetitionWithSeparator",idx:t.idx,separator:Wr(new j({terminalType:t.separator})),definition:e(t.definition)};if(t instanceof z)return{type:"Repetition",idx:t.idx,definition:e(t.definition)};if(t instanceof ye)return{type:"Alternation",idx:t.idx,definition:e(t.definition)};if(t instanceof j){const n={type:"Terminal",name:t.terminalType.name,label:fv(t.terminalType),idx:t.idx};pe(t.label)&&(n.terminalLabel=t.label);const r=t.terminalType.PATTERN;return t.terminalType.PATTERN&&(n.pattern=ot(r)?r.source:r),n}else{if(t instanceof cn)return{type:"Rule",name:t.name,orgText:t.orgText,definition:e(t.definition)};throw Error("non exhaustive match")}}}class fn{visit(e){const n=e;switch(n.constructor){case ce:return this.visitNonTerminal(n);case me:return this.visitAlternative(n);case ie:return this.visitOption(n);case xe:return this.visitRepetitionMandatory(n);case ke:return this.visitRepetitionMandatoryWithSeparator(n);case ge:return this.visitRepetitionWithSeparator(n);case z:return this.visitRepetition(n);case ye:return this.visitAlternation(n);case j:return this.visitTerminal(n);case cn:return this.visitRule(n);default:throw Error("non exhaustive match")}}visitNonTerminal(e){}visitAlternative(e){}visitOption(e){}visitRepetition(e){}visitRepetitionMandatory(e){}visitRepetitionMandatoryWithSeparator(e){}visitRepetitionWithSeparator(e){}visitAlternation(e){}visitTerminal(e){}visitRule(e){}}function pv(t){return t instanceof me||t instanceof ie||t instanceof z||t instanceof xe||t instanceof ke||t instanceof ge||t instanceof j||t instanceof cn}function fi(t,e=[]){return t instanceof ie||t instanceof z||t instanceof ge?!0:t instanceof ye?Hc(t.definition,r=>fi(r,e)):t instanceof ce&&de(e,t)?!1:t instanceof Ze?(t instanceof ce&&e.push(t),Ue(t.definition,r=>fi(r,e))):!1}function mv(t){return t instanceof ye}function We(t){if(t instanceof ce)return"SUBRULE";if(t instanceof ie)return"OPTION";if(t instanceof ye)return"OR";if(t instanceof xe)return"AT_LEAST_ONE";if(t instanceof ke)return"AT_LEAST_ONE_SEP";if(t instanceof ge)return"MANY_SEP";if(t instanceof z)return"MANY";if(t instanceof j)return"CONSUME";throw Error("non exhaustive match")}class Wi{walk(e,n=[]){w(e.definition,(r,i)=>{const s=te(e.definition,i+1);if(r instanceof ce)this.walkProdRef(r,s,n);else if(r instanceof j)this.walkTerminal(r,s,n);else if(r instanceof me)this.walkFlat(r,s,n);else if(r instanceof ie)this.walkOption(r,s,n);else if(r instanceof xe)this.walkAtLeastOne(r,s,n);else if(r instanceof ke)this.walkAtLeastOneSep(r,s,n);else if(r instanceof ge)this.walkManySep(r,s,n);else if(r instanceof z)this.walkMany(r,s,n);else if(r instanceof ye)this.walkOr(r,s,n);else throw Error("non exhaustive match")})}walkTerminal(e,n,r){}walkProdRef(e,n,r){}walkFlat(e,n,r){const i=n.concat(r);this.walk(e,i)}walkOption(e,n,r){const i=n.concat(r);this.walk(e,i)}walkAtLeastOne(e,n,r){const i=[new ie({definition:e.definition})].concat(n,r);this.walk(e,i)}walkAtLeastOneSep(e,n,r){const i=Jo(e,n,r);this.walk(e,i)}walkMany(e,n,r){const i=[new ie({definition:e.definition})].concat(n,r);this.walk(e,i)}walkManySep(e,n,r){const i=Jo(e,n,r);this.walk(e,i)}walkOr(e,n,r){const i=n.concat(r);w(e.definition,s=>{const a=new me({definition:[s]});this.walk(a,i)})}}function Jo(t,e,n){return[new ie({definition:[new j({terminalType:t.separator})].concat(t.definition)})].concat(e,n)}function mr(t){if(t instanceof ce)return mr(t.referencedRule);if(t instanceof j)return Tv(t);if(pv(t))return gv(t);if(mv(t))return yv(t);throw Error("non exhaustive match")}function gv(t){let e=[];const n=t.definition;let r=0,i=n.length>r,s,a=!0;for(;i&&a;)s=n[r],a=fi(s),e=e.concat(mr(s)),r=r+1,i=n.length>r;return za(e)}function yv(t){const e=I(t.definition,n=>mr(n));return za(Ge(e))}function Tv(t){return[t.terminalType]}const qc="_~IN~_";class vv extends Wi{constructor(e){super(),this.topProd=e,this.follows={}}startWalking(){return this.walk(this.topProd),this.follows}walkTerminal(e,n,r){}walkProdRef(e,n,r){const i=Av(e.referencedRule,e.idx)+this.topProd.name,s=n.concat(r),a=new me({definition:s}),o=mr(a);this.follows[i]=o}}function Rv(t){const e={};return w(t,n=>{const r=new vv(n).startWalking();$e(e,r)}),e}function Av(t,e){return t.name+e+qc}let zr={};const Ev=new oc;function zi(t){const e=t.toString();if(zr.hasOwnProperty(e))return zr[e];{const n=Ev.pattern(e);return zr[e]=n,n}}function $v(){zr={}}const Yc="Complement Sets are not supported for first char optimization",di=`Unable to use "first char" lexer optimizations: +`;function Sv(t,e=!1){try{const n=zi(t);return Vs(n.value,{},n.flags.ignoreCase)}catch(n){if(n.message===Yc)e&&Vc(`${di} Unable to optimize: < ${t.toString()} > + Complement Sets cannot be automatically optimized. + This will disable the lexer's first char optimizations. + See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#COMPLEMENT for details.`);else{let r="";e&&(r=` + This will disable the lexer's first char optimizations. + See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#REGEXP_PARSING for details.`),Hs(`${di} + Failed parsing: < ${t.toString()} > + Using the @chevrotain/regexp-to-ast library + Please open an issue at: https://github.com/chevrotain/chevrotain/issues`+r)}}return[]}function Vs(t,e,n){switch(t.type){case"Disjunction":for(let i=0;i{if(typeof l=="number")br(l,e,n);else{const u=l;if(n===!0)for(let c=u.from;c<=u.to;c++)br(c,e,n);else{for(let c=u.from;c<=u.to&&c=Wn){const c=u.from>=Wn?u.from:Wn,f=u.to,d=gt(c),h=gt(f);for(let m=d;m<=h;m++)e[m]=m}}}});break;case"Group":Vs(a.value,e,n);break;default:throw Error("Non Exhaustive Match")}const o=a.quantifier!==void 0&&a.quantifier.atLeast===0;if(a.type==="Group"&&Ws(a)===!1||a.type!=="Group"&&o===!1)break}break;default:throw Error("non exhaustive match!")}return J(e)}function br(t,e,n){const r=gt(t);e[r]=r,n===!0&&xv(t,e)}function xv(t,e){const n=String.fromCharCode(t),r=n.toUpperCase();if(r!==n){const i=gt(r.charCodeAt(0));e[i]=i}else{const i=n.toLowerCase();if(i!==n){const s=gt(i.charCodeAt(0));e[s]=s}}}function Zo(t,e){return rn(t.value,n=>{if(typeof n=="number")return de(e,n);{const r=n;return rn(e,i=>r.from<=i&&i<=r.to)!==void 0}})}function Ws(t){const e=t.quantifier;return e&&e.atLeast===0?!0:t.value?P(t.value)?Ue(t.value,Ws):Ws(t.value):!1}class kv extends bi{constructor(e){super(),this.targetCharCodes=e,this.found=!1}visitChildren(e){if(this.found!==!0){switch(e.type){case"Lookahead":this.visitLookahead(e);return;case"NegativeLookahead":this.visitNegativeLookahead(e);return}super.visitChildren(e)}}visitCharacter(e){de(this.targetCharCodes,e.value)&&(this.found=!0)}visitSet(e){e.complement?Zo(e,this.targetCharCodes)===void 0&&(this.found=!0):Zo(e,this.targetCharCodes)!==void 0&&(this.found=!0)}}function qa(t,e){if(e instanceof RegExp){const n=zi(e),r=new kv(t);return r.visit(n),r.found}else return rn(e,n=>de(t,n.charCodeAt(0)))!==void 0}const Dt="PATTERN",Vn="defaultMode",Or="modes";let Xc=typeof new RegExp("(?:)").sticky=="boolean";function Iv(t,e){e=Wa(e,{useSticky:Xc,debug:!1,safeMode:!1,positionTracking:"full",lineTerminatorCharacters:["\r",` +`],tracer:(E,v)=>v()});const n=e.tracer;n("initCharCodeToOptimizedIndexMap",()=>{Xv()});let r;n("Reject Lexer.NA",()=>{r=Vi(t,E=>E[Dt]===he.NA)});let i=!1,s;n("Transform Patterns",()=>{i=!1,s=I(r,E=>{const v=E[Dt];if(ot(v)){const x=v.source;return x.length===1&&x!=="^"&&x!=="$"&&x!=="."&&!v.ignoreCase?x:x.length===2&&x[0]==="\\"&&!de(["d","D","s","S","t","r","n","t","0","c","b","B","f","v","w","W"],x[1])?x[1]:e.useSticky?el(v):Qo(v)}else{if(ct(v))return i=!0,{exec:v};if(typeof v=="object")return i=!0,v;if(typeof v=="string"){if(v.length===1)return v;{const x=v.replace(/[\\^$.*+?()[\]{}|]/g,"\\$&"),M=new RegExp(x);return e.useSticky?el(M):Qo(M)}}else throw Error("non exhaustive match")}})});let a,o,l,u,c;n("misc mapping",()=>{a=I(r,E=>E.tokenTypeIdx),o=I(r,E=>{const v=E.GROUP;if(v!==he.SKIPPED){if(pe(v))return v;if(lt(v))return!1;throw Error("non exhaustive match")}}),l=I(r,E=>{const v=E.LONGER_ALT;if(v)return P(v)?I(v,M=>Yo(r,M)):[Yo(r,v)]}),u=I(r,E=>E.PUSH_MODE),c=I(r,E=>C(E,"POP_MODE"))});let f;n("Line Terminator Handling",()=>{const E=Qc(e.lineTerminatorCharacters);f=I(r,v=>!1),e.positionTracking!=="onlyOffset"&&(f=I(r,v=>C(v,"LINE_BREAKS")?!!v.LINE_BREAKS:Zc(v,E)===!1&&qa(E,v.PATTERN)))});let d,h,m,g;n("Misc Mapping #2",()=>{d=I(r,Jc),h=I(s,zv),m=Se(r,(E,v)=>{const x=v.GROUP;return pe(x)&&x!==he.SKIPPED&&(E[x]=[]),E},{}),g=I(s,(E,v)=>({pattern:s[v],longerAlt:l[v],canLineTerminator:f[v],isCustom:d[v],short:h[v],group:o[v],push:u[v],pop:c[v],tokenTypeIdx:a[v],tokenType:r[v]}))});let R=!0,y=[];return e.safeMode||n("First Char Optimization",()=>{y=Se(r,(E,v,x)=>{if(typeof v.PATTERN=="string"){const M=v.PATTERN.charCodeAt(0),ae=gt(M);ms(E,ae,g[x])}else if(P(v.START_CHARS_HINT)){let M;w(v.START_CHARS_HINT,ae=>{const Me=typeof ae=="string"?ae.charCodeAt(0):ae,Te=gt(Me);M!==Te&&(M=Te,ms(E,Te,g[x]))})}else if(ot(v.PATTERN))if(v.PATTERN.unicode)R=!1,e.ensureOptimizations&&Hs(`${di} Unable to analyze < ${v.PATTERN.toString()} > pattern. + The regexp unicode flag is not currently supported by the regexp-to-ast library. + This will disable the lexer's first char optimizations. + For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNICODE_OPTIMIZE`);else{const M=Sv(v.PATTERN,e.ensureOptimizations);U(M)&&(R=!1),w(M,ae=>{ms(E,ae,g[x])})}else e.ensureOptimizations&&Hs(`${di} TokenType: <${v.name}> is using a custom token pattern without providing parameter. + This will disable the lexer's first char optimizations. + For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_OPTIMIZE`),R=!1;return E},[])}),{emptyGroups:m,patternIdxToConfig:g,charCodeToPatternIdxToConfig:y,hasCustom:i,canBeOptimized:R}}function Cv(t,e){let n=[];const r=_v(t);n=n.concat(r.errors);const i=Nv(r.valid),s=i.valid;return n=n.concat(i.errors),n=n.concat(wv(s)),n=n.concat(Gv(s)),n=n.concat(Uv(s,e)),n=n.concat(Bv(s)),n}function wv(t){let e=[];const n=Pe(t,r=>ot(r[Dt]));return e=e.concat(Ov(n)),e=e.concat(Mv(n)),e=e.concat(Dv(n)),e=e.concat(Fv(n)),e=e.concat(Lv(n)),e}function _v(t){const e=Pe(t,i=>!C(i,Dt)),n=I(e,i=>({message:"Token Type: ->"+i.name+"<- missing static 'PATTERN' property",type:q.MISSING_PATTERN,tokenTypes:[i]})),r=Hi(t,e);return{errors:n,valid:r}}function Nv(t){const e=Pe(t,i=>{const s=i[Dt];return!ot(s)&&!ct(s)&&!C(s,"exec")&&!pe(s)}),n=I(e,i=>({message:"Token Type: ->"+i.name+"<- static 'PATTERN' can only be a RegExp, a Function matching the {CustomPatternMatcherFunc} type or an Object matching the {ICustomPattern} interface.",type:q.INVALID_PATTERN,tokenTypes:[i]})),r=Hi(t,e);return{errors:n,valid:r}}const bv=/[^\\][$]/;function Ov(t){class e extends bi{constructor(){super(...arguments),this.found=!1}visitEndAnchor(s){this.found=!0}}const n=Pe(t,i=>{const s=i.PATTERN;try{const a=zi(s),o=new e;return o.visit(a),o.found}catch{return bv.test(s.source)}});return I(n,i=>({message:`Unexpected RegExp Anchor Error: + Token Type: ->`+i.name+`<- static 'PATTERN' cannot contain end of input anchor '$' + See chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS for details.`,type:q.EOI_ANCHOR_FOUND,tokenTypes:[i]}))}function Lv(t){const e=Pe(t,r=>r.PATTERN.test(""));return I(e,r=>({message:"Token Type: ->"+r.name+"<- static 'PATTERN' must not match an empty string",type:q.EMPTY_MATCH_PATTERN,tokenTypes:[r]}))}const Pv=/[^\\[][\^]|^\^/;function Mv(t){class e extends bi{constructor(){super(...arguments),this.found=!1}visitStartAnchor(s){this.found=!0}}const n=Pe(t,i=>{const s=i.PATTERN;try{const a=zi(s),o=new e;return o.visit(a),o.found}catch{return Pv.test(s.source)}});return I(n,i=>({message:`Unexpected RegExp Anchor Error: + Token Type: ->`+i.name+`<- static 'PATTERN' cannot contain start of input anchor '^' + See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS for details.`,type:q.SOI_ANCHOR_FOUND,tokenTypes:[i]}))}function Dv(t){const e=Pe(t,r=>{const i=r[Dt];return i instanceof RegExp&&(i.multiline||i.global)});return I(e,r=>({message:"Token Type: ->"+r.name+"<- static 'PATTERN' may NOT contain global('g') or multiline('m')",type:q.UNSUPPORTED_FLAGS_FOUND,tokenTypes:[r]}))}function Fv(t){const e=[];let n=I(t,s=>Se(t,(a,o)=>(s.PATTERN.source===o.PATTERN.source&&!de(e,o)&&o.PATTERN!==he.NA&&(e.push(o),a.push(o)),a),[]));n=pr(n);const r=Pe(n,s=>s.length>1);return I(r,s=>{const a=I(s,l=>l.name);return{message:`The same RegExp pattern ->${je(s).PATTERN}<-has been used in all of the following Token Types: ${a.join(", ")} <-`,type:q.DUPLICATE_PATTERNS_FOUND,tokenTypes:s}})}function Gv(t){const e=Pe(t,r=>{if(!C(r,"GROUP"))return!1;const i=r.GROUP;return i!==he.SKIPPED&&i!==he.NA&&!pe(i)});return I(e,r=>({message:"Token Type: ->"+r.name+"<- static 'GROUP' can only be Lexer.SKIPPED/Lexer.NA/A String",type:q.INVALID_GROUP_TYPE_FOUND,tokenTypes:[r]}))}function Uv(t,e){const n=Pe(t,i=>i.PUSH_MODE!==void 0&&!de(e,i.PUSH_MODE));return I(n,i=>({message:`Token Type: ->${i.name}<- static 'PUSH_MODE' value cannot refer to a Lexer Mode ->${i.PUSH_MODE}<-which does not exist`,type:q.PUSH_MODE_DOES_NOT_EXIST,tokenTypes:[i]}))}function Bv(t){const e=[],n=Se(t,(r,i,s)=>{const a=i.PATTERN;return a===he.NA||(pe(a)?r.push({str:a,idx:s,tokenType:i}):ot(a)&&Kv(a)&&r.push({str:a.source,idx:s,tokenType:i})),r},[]);return w(t,(r,i)=>{w(n,({str:s,idx:a,tokenType:o})=>{if(i${o.name}<- can never be matched. +Because it appears AFTER the Token Type ->${r.name}<-in the lexer's definition. +See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNREACHABLE`;e.push({message:l,type:q.UNREACHABLE_PATTERN,tokenTypes:[r,o]})}})}),e}function jv(t,e){if(ot(e)){const n=e.exec(t);return n!==null&&n.index===0}else{if(ct(e))return e(t,0,[],{});if(C(e,"exec"))return e.exec(t,0,[],{});if(typeof e=="string")return e===t;throw Error("non exhaustive match")}}function Kv(t){return rn([".","\\","[","]","|","^","$","(",")","?","*","+","{"],n=>t.source.indexOf(n)!==-1)===void 0}function Qo(t){const e=t.ignoreCase?"i":"";return new RegExp(`^(?:${t.source})`,e)}function el(t){const e=t.ignoreCase?"iy":"y";return new RegExp(`${t.source}`,e)}function Hv(t,e,n){const r=[];return C(t,Vn)||r.push({message:"A MultiMode Lexer cannot be initialized without a <"+Vn+`> property in its definition +`,type:q.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE}),C(t,Or)||r.push({message:"A MultiMode Lexer cannot be initialized without a <"+Or+`> property in its definition +`,type:q.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY}),C(t,Or)&&C(t,Vn)&&!C(t.modes,t.defaultMode)&&r.push({message:`A MultiMode Lexer cannot be initialized with a ${Vn}: <${t.defaultMode}>which does not exist +`,type:q.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST}),C(t,Or)&&w(t.modes,(i,s)=>{w(i,(a,o)=>{if(lt(a))r.push({message:`A Lexer cannot be initialized using an undefined Token Type. Mode:<${s}> at index: <${o}> +`,type:q.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED});else if(C(a,"LONGER_ALT")){const l=P(a.LONGER_ALT)?a.LONGER_ALT:[a.LONGER_ALT];w(l,u=>{!lt(u)&&!de(i,u)&&r.push({message:`A MultiMode Lexer cannot be initialized with a longer_alt <${u.name}> on token <${a.name}> outside of mode <${s}> +`,type:q.MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE})})}})}),r}function Vv(t,e,n){const r=[];let i=!1;const s=pr(Ge(J(t.modes))),a=Vi(s,l=>l[Dt]===he.NA),o=Qc(n);return e&&w(a,l=>{const u=Zc(l,o);if(u!==!1){const f={message:Yv(l,u),type:u.issue,tokenType:l};r.push(f)}else C(l,"LINE_BREAKS")?l.LINE_BREAKS===!0&&(i=!0):qa(o,l.PATTERN)&&(i=!0)}),e&&!i&&r.push({message:`Warning: No LINE_BREAKS Found. + This Lexer has been defined to track line and column information, + But none of the Token Types can be identified as matching a line terminator. + See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#LINE_BREAKS + for details.`,type:q.NO_LINE_BREAKS_FLAGS}),r}function Wv(t){const e={},n=Le(t);return w(n,r=>{const i=t[r];if(P(i))e[r]=[];else throw Error("non exhaustive match")}),e}function Jc(t){const e=t.PATTERN;if(ot(e))return!1;if(ct(e))return!0;if(C(e,"exec"))return!0;if(pe(e))return!1;throw Error("non exhaustive match")}function zv(t){return pe(t)&&t.length===1?t.charCodeAt(0):!1}const qv={test:function(t){const e=t.length;for(let n=this.lastIndex;n Token Type + Root cause: ${e.errMsg}. + For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#IDENTIFY_TERMINATOR`;if(e.issue===q.CUSTOM_LINE_BREAK)return`Warning: A Custom Token Pattern should specify the option. + The problem is in the <${t.name}> Token Type + For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_LINE_BREAK`;throw Error("non exhaustive match")}function Qc(t){return I(t,n=>pe(n)?n.charCodeAt(0):n)}function ms(t,e,n){t[e]===void 0?t[e]=[n]:t[e].push(n)}const Wn=256;let qr=[];function gt(t){return t255?255+~~(t/255):t}}function gr(t,e){const n=t.tokenTypeIdx;return n===e.tokenTypeIdx?!0:e.isParent===!0&&e.categoryMatchesMap[n]===!0}function hi(t,e){return t.tokenTypeIdx===e.tokenTypeIdx}let tl=1;const ef={};function yr(t){const e=Jv(t);Zv(e),eR(e),Qv(e),w(e,n=>{n.isParent=n.categoryMatches.length>0})}function Jv(t){let e=se(t),n=t,r=!0;for(;r;){n=pr(Ge(I(n,s=>s.CATEGORIES)));const i=Hi(n,e);e=e.concat(i),U(i)?r=!1:n=i}return e}function Zv(t){w(t,e=>{nf(e)||(ef[tl]=e,e.tokenTypeIdx=tl++),nl(e)&&!P(e.CATEGORIES)&&(e.CATEGORIES=[e.CATEGORIES]),nl(e)||(e.CATEGORIES=[]),tR(e)||(e.categoryMatches=[]),nR(e)||(e.categoryMatchesMap={})})}function Qv(t){w(t,e=>{e.categoryMatches=[],w(e.categoryMatchesMap,(n,r)=>{e.categoryMatches.push(ef[r].tokenTypeIdx)})})}function eR(t){w(t,e=>{tf([],e)})}function tf(t,e){w(t,n=>{e.categoryMatchesMap[n.tokenTypeIdx]=!0}),w(e.CATEGORIES,n=>{const r=t.concat(e);de(r,n)||tf(r,n)})}function nf(t){return C(t,"tokenTypeIdx")}function nl(t){return C(t,"CATEGORIES")}function tR(t){return C(t,"categoryMatches")}function nR(t){return C(t,"categoryMatchesMap")}function rR(t){return C(t,"tokenTypeIdx")}const zs={buildUnableToPopLexerModeMessage(t){return`Unable to pop Lexer Mode after encountering Token ->${t.image}<- The Mode Stack is empty`},buildUnexpectedCharactersMessage(t,e,n,r,i){return`unexpected character: ->${t.charAt(e)}<- at offset: ${e}, skipped ${n} characters.`}};var q;(function(t){t[t.MISSING_PATTERN=0]="MISSING_PATTERN",t[t.INVALID_PATTERN=1]="INVALID_PATTERN",t[t.EOI_ANCHOR_FOUND=2]="EOI_ANCHOR_FOUND",t[t.UNSUPPORTED_FLAGS_FOUND=3]="UNSUPPORTED_FLAGS_FOUND",t[t.DUPLICATE_PATTERNS_FOUND=4]="DUPLICATE_PATTERNS_FOUND",t[t.INVALID_GROUP_TYPE_FOUND=5]="INVALID_GROUP_TYPE_FOUND",t[t.PUSH_MODE_DOES_NOT_EXIST=6]="PUSH_MODE_DOES_NOT_EXIST",t[t.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE=7]="MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE",t[t.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY=8]="MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY",t[t.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST=9]="MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST",t[t.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED=10]="LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED",t[t.SOI_ANCHOR_FOUND=11]="SOI_ANCHOR_FOUND",t[t.EMPTY_MATCH_PATTERN=12]="EMPTY_MATCH_PATTERN",t[t.NO_LINE_BREAKS_FLAGS=13]="NO_LINE_BREAKS_FLAGS",t[t.UNREACHABLE_PATTERN=14]="UNREACHABLE_PATTERN",t[t.IDENTIFY_TERMINATOR=15]="IDENTIFY_TERMINATOR",t[t.CUSTOM_LINE_BREAK=16]="CUSTOM_LINE_BREAK",t[t.MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE=17]="MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE"})(q||(q={}));const zn={deferDefinitionErrorsHandling:!1,positionTracking:"full",lineTerminatorsPattern:/\n|\r\n?/g,lineTerminatorCharacters:[` +`,"\r"],ensureOptimizations:!1,safeMode:!1,errorMessageProvider:zs,traceInitPerf:!1,skipValidations:!1,recoveryEnabled:!0};Object.freeze(zn);class he{constructor(e,n=zn){if(this.lexerDefinition=e,this.lexerDefinitionErrors=[],this.lexerDefinitionWarning=[],this.patternIdxToConfig={},this.charCodeToPatternIdxToConfig={},this.modes=[],this.emptyGroups={},this.trackStartLines=!0,this.trackEndLines=!0,this.hasCustom=!1,this.canModeBeOptimized={},this.TRACE_INIT=(i,s)=>{if(this.traceInitPerf===!0){this.traceInitIndent++;const a=new Array(this.traceInitIndent+1).join(" ");this.traceInitIndent <${i}>`);const{time:o,value:l}=Wc(s),u=o>10?console.warn:console.log;return this.traceInitIndent time: ${o}ms`),this.traceInitIndent--,l}else return s()},typeof n=="boolean")throw Error(`The second argument to the Lexer constructor is now an ILexerConfig Object. +a boolean 2nd argument is no longer supported`);this.config=$e({},zn,n);const r=this.config.traceInitPerf;r===!0?(this.traceInitMaxIdent=1/0,this.traceInitPerf=!0):typeof r=="number"&&(this.traceInitMaxIdent=r,this.traceInitPerf=!0),this.traceInitIndent=-1,this.TRACE_INIT("Lexer Constructor",()=>{let i,s=!0;this.TRACE_INIT("Lexer Config handling",()=>{if(this.config.lineTerminatorsPattern===zn.lineTerminatorsPattern)this.config.lineTerminatorsPattern=qv;else if(this.config.lineTerminatorCharacters===zn.lineTerminatorCharacters)throw Error(`Error: Missing property on the Lexer config. + For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#MISSING_LINE_TERM_CHARS`);if(n.safeMode&&n.ensureOptimizations)throw Error('"safeMode" and "ensureOptimizations" flags are mutually exclusive.');this.trackStartLines=/full|onlyStart/i.test(this.config.positionTracking),this.trackEndLines=/full/i.test(this.config.positionTracking),P(e)?i={modes:{defaultMode:se(e)},defaultMode:Vn}:(s=!1,i=se(e))}),this.config.skipValidations===!1&&(this.TRACE_INIT("performRuntimeChecks",()=>{this.lexerDefinitionErrors=this.lexerDefinitionErrors.concat(Hv(i,this.trackStartLines,this.config.lineTerminatorCharacters))}),this.TRACE_INIT("performWarningRuntimeChecks",()=>{this.lexerDefinitionWarning=this.lexerDefinitionWarning.concat(Vv(i,this.trackStartLines,this.config.lineTerminatorCharacters))})),i.modes=i.modes?i.modes:{},w(i.modes,(o,l)=>{i.modes[l]=Vi(o,u=>lt(u))});const a=Le(i.modes);if(w(i.modes,(o,l)=>{this.TRACE_INIT(`Mode: <${l}> processing`,()=>{if(this.modes.push(l),this.config.skipValidations===!1&&this.TRACE_INIT("validatePatterns",()=>{this.lexerDefinitionErrors=this.lexerDefinitionErrors.concat(Cv(o,a))}),U(this.lexerDefinitionErrors)){yr(o);let u;this.TRACE_INIT("analyzeTokenTypes",()=>{u=Iv(o,{lineTerminatorCharacters:this.config.lineTerminatorCharacters,positionTracking:n.positionTracking,ensureOptimizations:n.ensureOptimizations,safeMode:n.safeMode,tracer:this.TRACE_INIT})}),this.patternIdxToConfig[l]=u.patternIdxToConfig,this.charCodeToPatternIdxToConfig[l]=u.charCodeToPatternIdxToConfig,this.emptyGroups=$e({},this.emptyGroups,u.emptyGroups),this.hasCustom=u.hasCustom||this.hasCustom,this.canModeBeOptimized[l]=u.canBeOptimized}})}),this.defaultMode=i.defaultMode,!U(this.lexerDefinitionErrors)&&!this.config.deferDefinitionErrorsHandling){const l=I(this.lexerDefinitionErrors,u=>u.message).join(`----------------------- +`);throw new Error(`Errors detected in definition of Lexer: +`+l)}w(this.lexerDefinitionWarning,o=>{Vc(o.message)}),this.TRACE_INIT("Choosing sub-methods implementations",()=>{if(Xc?(this.chopInput=en,this.match=this.matchWithTest):(this.updateLastIndex=X,this.match=this.matchWithExec),s&&(this.handleModes=X),this.trackStartLines===!1&&(this.computeNewColumn=en),this.trackEndLines===!1&&(this.updateTokenEndLineColumnLocation=X),/full/i.test(this.config.positionTracking))this.createTokenInstance=this.createFullToken;else if(/onlyStart/i.test(this.config.positionTracking))this.createTokenInstance=this.createStartOnlyToken;else if(/onlyOffset/i.test(this.config.positionTracking))this.createTokenInstance=this.createOffsetOnlyToken;else throw Error(`Invalid config option: "${this.config.positionTracking}"`);this.hasCustom?(this.addToken=this.addTokenUsingPush,this.handlePayload=this.handlePayloadWithCustom):(this.addToken=this.addTokenUsingMemberAccess,this.handlePayload=this.handlePayloadNoCustom)}),this.TRACE_INIT("Failed Optimization Warnings",()=>{const o=Se(this.canModeBeOptimized,(l,u,c)=>(u===!1&&l.push(c),l),[]);if(n.ensureOptimizations&&!U(o))throw Error(`Lexer Modes: < ${o.join(", ")} > cannot be optimized. + Disable the "ensureOptimizations" lexer config flag to silently ignore this and run the lexer in an un-optimized mode. + Or inspect the console log for details on how to resolve these issues.`)}),this.TRACE_INIT("clearRegExpParserCache",()=>{$v()}),this.TRACE_INIT("toFastProperties",()=>{zc(this)})})}tokenize(e,n=this.defaultMode){if(!U(this.lexerDefinitionErrors)){const i=I(this.lexerDefinitionErrors,s=>s.message).join(`----------------------- +`);throw new Error(`Unable to Tokenize because Errors detected in definition of Lexer: +`+i)}return this.tokenizeInternal(e,n)}tokenizeInternal(e,n){let r,i,s,a,o,l,u,c,f,d,h,m,g,R,y;const E=e,v=E.length;let x=0,M=0;const ae=this.hasCustom?0:Math.floor(e.length/10),Me=new Array(ae),Te=[];let Ve=this.trackStartLines?1:void 0,Ie=this.trackStartLines?1:void 0;const $=Wv(this.emptyGroups),T=this.trackStartLines,k=this.config.lineTerminatorsPattern;let S=0,O=[],b=[];const N=[],ve=[];Object.freeze(ve);let Z;function W(){return O}function It(oe){const Ce=gt(oe),zt=b[Ce];return zt===void 0?ve:zt}const Ed=oe=>{if(N.length===1&&oe.tokenType.PUSH_MODE===void 0){const Ce=this.config.errorMessageProvider.buildUnableToPopLexerModeMessage(oe);Te.push({offset:oe.startOffset,line:oe.startLine,column:oe.startColumn,length:oe.image.length,message:Ce})}else{N.pop();const Ce=nn(N);O=this.patternIdxToConfig[Ce],b=this.charCodeToPatternIdxToConfig[Ce],S=O.length;const zt=this.canModeBeOptimized[Ce]&&this.config.safeMode===!1;b&&zt?Z=It:Z=W}};function lo(oe){N.push(oe),b=this.charCodeToPatternIdxToConfig[oe],O=this.patternIdxToConfig[oe],S=O.length,S=O.length;const Ce=this.canModeBeOptimized[oe]&&this.config.safeMode===!1;b&&Ce?Z=It:Z=W}lo.call(this,n);let De;const uo=this.config.recoveryEnabled;for(;xl.length){l=a,u=c,De=et;break}}}break}}if(l!==null){if(f=l.length,d=De.group,d!==void 0&&(h=De.tokenTypeIdx,m=this.createTokenInstance(l,x,h,De.tokenType,Ve,Ie,f),this.handlePayload(m,u),d===!1?M=this.addToken(Me,M,m):$[d].push(m)),e=this.chopInput(e,f),x=x+f,Ie=this.computeNewColumn(Ie,f),T===!0&&De.canLineTerminator===!0){let Re=0,Qe,ht;k.lastIndex=0;do Qe=k.test(l),Qe===!0&&(ht=k.lastIndex-1,Re++);while(Qe===!0);Re!==0&&(Ve=Ve+Re,Ie=f-ht,this.updateTokenEndLineColumnLocation(m,d,ht,Re,Ve,Ie,f))}this.handleModes(De,Ed,lo,m)}else{const Re=x,Qe=Ve,ht=Ie;let et=uo===!1;for(;et===!1&&x ${Qt(t)} <--`:`token of type --> ${t.name} <--`} but found --> '${e.image}' <--`},buildNotAllInputParsedMessage({firstRedundant:t,ruleName:e}){return"Redundant input, expecting EOF but found: "+t.image},buildNoViableAltMessage({expectedPathsPerAlt:t,actual:e,previous:n,customUserDescription:r,ruleName:i}){const s="Expecting: ",o=` +but found: '`+je(e).image+"'";if(r)return s+r+o;{const l=Se(t,(d,h)=>d.concat(h),[]),u=I(l,d=>`[${I(d,h=>Qt(h)).join(", ")}]`),f=`one of these possible Token sequences: +${I(u,(d,h)=>` ${h+1}. ${d}`).join(` +`)}`;return s+f+o}},buildEarlyExitMessage({expectedIterationPaths:t,actual:e,customUserDescription:n,ruleName:r}){const i="Expecting: ",a=` +but found: '`+je(e).image+"'";if(n)return i+n+a;{const l=`expecting at least one iteration which starts with one of these possible Token sequences:: + <${I(t,u=>`[${I(u,c=>Qt(c)).join(",")}]`).join(" ,")}>`;return i+l+a}}};Object.freeze(Xt);const aR={buildRuleNotFoundError(t,e){return"Invalid grammar, reference to a rule which is not defined: ->"+e.nonTerminalName+`<- +inside top level rule: ->`+t.name+"<-"}},bt={buildDuplicateFoundError(t,e){function n(c){return c instanceof j?c.terminalType.name:c instanceof ce?c.nonTerminalName:""}const r=t.name,i=je(e),s=i.idx,a=We(i),o=n(i),l=s>0;let u=`->${a}${l?s:""}<- ${o?`with argument: ->${o}<-`:""} + appears more than once (${e.length} times) in the top level rule: ->${r}<-. + For further details see: https://chevrotain.io/docs/FAQ.html#NUMERICAL_SUFFIXES + `;return u=u.replace(/[ \t]+/g," "),u=u.replace(/\s\s+/g,` +`),u},buildNamespaceConflictError(t){return`Namespace conflict found in grammar. +The grammar has both a Terminal(Token) and a Non-Terminal(Rule) named: <${t.name}>. +To resolve this make sure each Terminal and Non-Terminal names are unique +This is easy to accomplish by using the convention that Terminal names start with an uppercase letter +and Non-Terminal names start with a lower case letter.`},buildAlternationPrefixAmbiguityError(t){const e=I(t.prefixPath,i=>Qt(i)).join(", "),n=t.alternation.idx===0?"":t.alternation.idx;return`Ambiguous alternatives: <${t.ambiguityIndices.join(" ,")}> due to common lookahead prefix +in inside <${t.topLevelRule.name}> Rule, +<${e}> may appears as a prefix path in all these alternatives. +See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#COMMON_PREFIX +For Further details.`},buildAlternationAmbiguityError(t){const e=I(t.prefixPath,i=>Qt(i)).join(", "),n=t.alternation.idx===0?"":t.alternation.idx;let r=`Ambiguous Alternatives Detected: <${t.ambiguityIndices.join(" ,")}> in inside <${t.topLevelRule.name}> Rule, +<${e}> may appears as a prefix path in all these alternatives. +`;return r=r+`See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#AMBIGUOUS_ALTERNATIVES +For Further details.`,r},buildEmptyRepetitionError(t){let e=We(t.repetition);return t.repetition.idx!==0&&(e+=t.repetition.idx),`The repetition <${e}> within Rule <${t.topLevelRule.name}> can never consume any tokens. +This could lead to an infinite loop.`},buildTokenNameError(t){return"deprecated"},buildEmptyAlternationError(t){return`Ambiguous empty alternative: <${t.emptyChoiceIdx+1}> in inside <${t.topLevelRule.name}> Rule. +Only the last alternative may be an empty alternative.`},buildTooManyAlternativesError(t){return`An Alternation cannot have more than 256 alternatives: + inside <${t.topLevelRule.name}> Rule. + has ${t.alternation.definition.length+1} alternatives.`},buildLeftRecursionError(t){const e=t.topLevelRule.name,n=I(t.leftRecursionPath,s=>s.name),r=`${e} --> ${n.concat([e]).join(" --> ")}`;return`Left Recursion found in grammar. +rule: <${e}> can be invoked from itself (directly or indirectly) +without consuming any Tokens. The grammar path that causes this is: + ${r} + To fix this refactor your grammar to remove the left recursion. +see: https://en.wikipedia.org/wiki/LL_parser#Left_factoring.`},buildInvalidRuleNameError(t){return"deprecated"},buildDuplicateRuleNameError(t){let e;return t.topLevelRule instanceof cn?e=t.topLevelRule.name:e=t.topLevelRule,`Duplicate definition, rule: ->${e}<- is already defined in the grammar: ->${t.grammarName}<-`}};function oR(t,e){const n=new lR(t,e);return n.resolveRefs(),n.errors}class lR extends fn{constructor(e,n){super(),this.nameToTopRule=e,this.errMsgProvider=n,this.errors=[]}resolveRefs(){w(J(this.nameToTopRule),e=>{this.currTopLevel=e,e.accept(this)})}visitNonTerminal(e){const n=this.nameToTopRule[e.nonTerminalName];if(n)e.referencedRule=n;else{const r=this.errMsgProvider.buildRuleNotFoundError(this.currTopLevel,e);this.errors.push({message:r,type:fe.UNRESOLVED_SUBRULE_REF,ruleName:this.currTopLevel.name,unresolvedRefName:e.nonTerminalName})}}}class uR extends Wi{constructor(e,n){super(),this.topProd=e,this.path=n,this.possibleTokTypes=[],this.nextProductionName="",this.nextProductionOccurrence=0,this.found=!1,this.isAtEndOfPath=!1}startWalking(){if(this.found=!1,this.path.ruleStack[0]!==this.topProd.name)throw Error("The path does not start with the walker's top Rule!");return this.ruleStack=se(this.path.ruleStack).reverse(),this.occurrenceStack=se(this.path.occurrenceStack).reverse(),this.ruleStack.pop(),this.occurrenceStack.pop(),this.updateExpectedNext(),this.walk(this.topProd),this.possibleTokTypes}walk(e,n=[]){this.found||super.walk(e,n)}walkProdRef(e,n,r){if(e.referencedRule.name===this.nextProductionName&&e.idx===this.nextProductionOccurrence){const i=n.concat(r);this.updateExpectedNext(),this.walk(e.referencedRule,i)}}updateExpectedNext(){U(this.ruleStack)?(this.nextProductionName="",this.nextProductionOccurrence=0,this.isAtEndOfPath=!0):(this.nextProductionName=this.ruleStack.pop(),this.nextProductionOccurrence=this.occurrenceStack.pop())}}class cR extends uR{constructor(e,n){super(e,n),this.path=n,this.nextTerminalName="",this.nextTerminalOccurrence=0,this.nextTerminalName=this.path.lastTok.name,this.nextTerminalOccurrence=this.path.lastTokOccurrence}walkTerminal(e,n,r){if(this.isAtEndOfPath&&e.terminalType.name===this.nextTerminalName&&e.idx===this.nextTerminalOccurrence&&!this.found){const i=n.concat(r),s=new me({definition:i});this.possibleTokTypes=mr(s),this.found=!0}}}class qi extends Wi{constructor(e,n){super(),this.topRule=e,this.occurrence=n,this.result={token:void 0,occurrence:void 0,isEndOfRule:void 0}}startWalking(){return this.walk(this.topRule),this.result}}class fR extends qi{walkMany(e,n,r){if(e.idx===this.occurrence){const i=je(n.concat(r));this.result.isEndOfRule=i===void 0,i instanceof j&&(this.result.token=i.terminalType,this.result.occurrence=i.idx)}else super.walkMany(e,n,r)}}class fl extends qi{walkManySep(e,n,r){if(e.idx===this.occurrence){const i=je(n.concat(r));this.result.isEndOfRule=i===void 0,i instanceof j&&(this.result.token=i.terminalType,this.result.occurrence=i.idx)}else super.walkManySep(e,n,r)}}class dR extends qi{walkAtLeastOne(e,n,r){if(e.idx===this.occurrence){const i=je(n.concat(r));this.result.isEndOfRule=i===void 0,i instanceof j&&(this.result.token=i.terminalType,this.result.occurrence=i.idx)}else super.walkAtLeastOne(e,n,r)}}class dl extends qi{walkAtLeastOneSep(e,n,r){if(e.idx===this.occurrence){const i=je(n.concat(r));this.result.isEndOfRule=i===void 0,i instanceof j&&(this.result.token=i.terminalType,this.result.occurrence=i.idx)}else super.walkAtLeastOneSep(e,n,r)}}function qs(t,e,n=[]){n=se(n);let r=[],i=0;function s(o){return o.concat(te(t,i+1))}function a(o){const l=qs(s(o),e,n);return r.concat(l)}for(;n.length{U(l.definition)===!1&&(r=a(l.definition))}),r;if(o instanceof j)n.push(o.terminalType);else throw Error("non exhaustive match")}i++}return r.push({partialPath:n,suffixDef:te(t,i)}),r}function of(t,e,n,r){const i="EXIT_NONE_TERMINAL",s=[i],a="EXIT_ALTERNATIVE";let o=!1;const l=e.length,u=l-r-1,c=[],f=[];for(f.push({idx:-1,def:t,ruleStack:[],occurrenceStack:[]});!U(f);){const d=f.pop();if(d===a){o&&nn(f).idx<=u&&f.pop();continue}const h=d.def,m=d.idx,g=d.ruleStack,R=d.occurrenceStack;if(U(h))continue;const y=h[0];if(y===i){const E={idx:m,def:te(h),ruleStack:sr(g),occurrenceStack:sr(R)};f.push(E)}else if(y instanceof j)if(m=0;E--){const v=y.definition[E],x={idx:m,def:v.definition.concat(te(h)),ruleStack:g,occurrenceStack:R};f.push(x),f.push(a)}else if(y instanceof me)f.push({idx:m,def:y.definition.concat(te(h)),ruleStack:g,occurrenceStack:R});else if(y instanceof cn)f.push(hR(y,m,g,R));else throw Error("non exhaustive match")}return c}function hR(t,e,n,r){const i=se(n);i.push(t.name);const s=se(r);return s.push(1),{idx:e,def:t.definition,ruleStack:i,occurrenceStack:s}}var H;(function(t){t[t.OPTION=0]="OPTION",t[t.REPETITION=1]="REPETITION",t[t.REPETITION_MANDATORY=2]="REPETITION_MANDATORY",t[t.REPETITION_MANDATORY_WITH_SEPARATOR=3]="REPETITION_MANDATORY_WITH_SEPARATOR",t[t.REPETITION_WITH_SEPARATOR=4]="REPETITION_WITH_SEPARATOR",t[t.ALTERNATION=5]="ALTERNATION"})(H||(H={}));function Xa(t){if(t instanceof ie||t==="Option")return H.OPTION;if(t instanceof z||t==="Repetition")return H.REPETITION;if(t instanceof xe||t==="RepetitionMandatory")return H.REPETITION_MANDATORY;if(t instanceof ke||t==="RepetitionMandatoryWithSeparator")return H.REPETITION_MANDATORY_WITH_SEPARATOR;if(t instanceof ge||t==="RepetitionWithSeparator")return H.REPETITION_WITH_SEPARATOR;if(t instanceof ye||t==="Alternation")return H.ALTERNATION;throw Error("non exhaustive match")}function hl(t){const{occurrence:e,rule:n,prodType:r,maxLookahead:i}=t,s=Xa(r);return s===H.ALTERNATION?Yi(e,n,i):Xi(e,n,s,i)}function pR(t,e,n,r,i,s){const a=Yi(t,e,n),o=cf(a)?hi:gr;return s(a,r,o,i)}function mR(t,e,n,r,i,s){const a=Xi(t,e,i,n),o=cf(a)?hi:gr;return s(a[0],o,r)}function gR(t,e,n,r){const i=t.length,s=Ue(t,a=>Ue(a,o=>o.length===1));if(e)return function(a){const o=I(a,l=>l.GATE);for(let l=0;lGe(l)),o=Se(a,(l,u,c)=>(w(u,f=>{C(l,f.tokenTypeIdx)||(l[f.tokenTypeIdx]=c),w(f.categoryMatches,d=>{C(l,d)||(l[d]=c)})}),l),{});return function(){const l=this.LA(1);return o[l.tokenTypeIdx]}}else return function(){for(let a=0;as.length===1),i=t.length;if(r&&!n){const s=Ge(t);if(s.length===1&&U(s[0].categoryMatches)){const o=s[0].tokenTypeIdx;return function(){return this.LA(1).tokenTypeIdx===o}}else{const a=Se(s,(o,l,u)=>(o[l.tokenTypeIdx]=!0,w(l.categoryMatches,c=>{o[c]=!0}),o),[]);return function(){const o=this.LA(1);return a[o.tokenTypeIdx]===!0}}}else return function(){e:for(let s=0;sqs([a],1)),r=pl(n.length),i=I(n,a=>{const o={};return w(a,l=>{const u=gs(l.partialPath);w(u,c=>{o[c]=!0})}),o});let s=n;for(let a=1;a<=e;a++){const o=s;s=pl(o.length);for(let l=0;l{const y=gs(R.partialPath);w(y,E=>{i[l][E]=!0})})}}}}return r}function Yi(t,e,n,r){const i=new lf(t,H.ALTERNATION,r);return e.accept(i),uf(i.result,n)}function Xi(t,e,n,r){const i=new lf(t,n);e.accept(i);const s=i.result,o=new TR(e,t,n).startWalking(),l=new me({definition:s}),u=new me({definition:o});return uf([l,u],r)}function Ys(t,e){e:for(let n=0;n{const i=e[r];return n===i||i.categoryMatchesMap[n.tokenTypeIdx]})}function cf(t){return Ue(t,e=>Ue(e,n=>Ue(n,r=>U(r.categoryMatches))))}function AR(t){const e=t.lookaheadStrategy.validate({rules:t.rules,tokenTypes:t.tokenTypes,grammarName:t.grammarName});return I(e,n=>Object.assign({type:fe.CUSTOM_LOOKAHEAD_VALIDATION},n))}function ER(t,e,n,r){const i=_e(t,l=>$R(l,n)),s=PR(t,e,n),a=_e(t,l=>NR(l,n)),o=_e(t,l=>kR(l,t,r,n));return i.concat(s,a,o)}function $R(t,e){const n=new xR;t.accept(n);const r=n.allProductions,i=jT(r,SR),s=Ke(i,o=>o.length>1);return I(J(s),o=>{const l=je(o),u=e.buildDuplicateFoundError(t,o),c=We(l),f={message:u,type:fe.DUPLICATE_PRODUCTIONS,ruleName:t.name,dslName:c,occurrence:l.idx},d=ff(l);return d&&(f.parameter=d),f})}function SR(t){return`${We(t)}_#_${t.idx}_#_${ff(t)}`}function ff(t){return t instanceof j?t.terminalType.name:t instanceof ce?t.nonTerminalName:""}class xR extends fn{constructor(){super(...arguments),this.allProductions=[]}visitNonTerminal(e){this.allProductions.push(e)}visitOption(e){this.allProductions.push(e)}visitRepetitionWithSeparator(e){this.allProductions.push(e)}visitRepetitionMandatory(e){this.allProductions.push(e)}visitRepetitionMandatoryWithSeparator(e){this.allProductions.push(e)}visitRepetition(e){this.allProductions.push(e)}visitAlternation(e){this.allProductions.push(e)}visitTerminal(e){this.allProductions.push(e)}}function kR(t,e,n,r){const i=[];if(Se(e,(a,o)=>o.name===t.name?a+1:a,0)>1){const a=r.buildDuplicateRuleNameError({topLevelRule:t,grammarName:n});i.push({message:a,type:fe.DUPLICATE_RULE_NAME,ruleName:t.name})}return i}function IR(t,e,n){const r=[];let i;return de(e,t)||(i=`Invalid rule override, rule: ->${t}<- cannot be overridden in the grammar: ->${n}<-as it is not defined in any of the super grammars `,r.push({message:i,type:fe.INVALID_RULE_OVERRIDE,ruleName:t})),r}function df(t,e,n,r=[]){const i=[],s=Yr(e.definition);if(U(s))return[];{const a=t.name;de(s,t)&&i.push({message:n.buildLeftRecursionError({topLevelRule:t,leftRecursionPath:r}),type:fe.LEFT_RECURSION,ruleName:a});const l=Hi(s,r.concat([t])),u=_e(l,c=>{const f=se(r);return f.push(c),df(t,c,n,f)});return i.concat(u)}}function Yr(t){let e=[];if(U(t))return e;const n=je(t);if(n instanceof ce)e.push(n.referencedRule);else if(n instanceof me||n instanceof ie||n instanceof xe||n instanceof ke||n instanceof ge||n instanceof z)e=e.concat(Yr(n.definition));else if(n instanceof ye)e=Ge(I(n.definition,s=>Yr(s.definition)));else if(!(n instanceof j))throw Error("non exhaustive match");const r=fi(n),i=t.length>1;if(r&&i){const s=te(t);return e.concat(Yr(s))}else return e}class Ja extends fn{constructor(){super(...arguments),this.alternations=[]}visitAlternation(e){this.alternations.push(e)}}function CR(t,e){const n=new Ja;t.accept(n);const r=n.alternations;return _e(r,s=>{const a=sr(s.definition);return _e(a,(o,l)=>{const u=of([o],[],gr,1);return U(u)?[{message:e.buildEmptyAlternationError({topLevelRule:t,alternation:s,emptyChoiceIdx:l}),type:fe.NONE_LAST_EMPTY_ALT,ruleName:t.name,occurrence:s.idx,alternative:l+1}]:[]})})}function wR(t,e,n){const r=new Ja;t.accept(r);let i=r.alternations;return i=Vi(i,a=>a.ignoreAmbiguities===!0),_e(i,a=>{const o=a.idx,l=a.maxLookahead||e,u=Yi(o,t,l,a),c=OR(u,a,t,n),f=LR(u,a,t,n);return c.concat(f)})}class _R extends fn{constructor(){super(...arguments),this.allProductions=[]}visitRepetitionWithSeparator(e){this.allProductions.push(e)}visitRepetitionMandatory(e){this.allProductions.push(e)}visitRepetitionMandatoryWithSeparator(e){this.allProductions.push(e)}visitRepetition(e){this.allProductions.push(e)}}function NR(t,e){const n=new Ja;t.accept(n);const r=n.alternations;return _e(r,s=>s.definition.length>255?[{message:e.buildTooManyAlternativesError({topLevelRule:t,alternation:s}),type:fe.TOO_MANY_ALTS,ruleName:t.name,occurrence:s.idx}]:[])}function bR(t,e,n){const r=[];return w(t,i=>{const s=new _R;i.accept(s);const a=s.allProductions;w(a,o=>{const l=Xa(o),u=o.maxLookahead||e,c=o.idx,d=Xi(c,i,l,u)[0];if(U(Ge(d))){const h=n.buildEmptyRepetitionError({topLevelRule:i,repetition:o});r.push({message:h,type:fe.NO_NON_EMPTY_LOOKAHEAD,ruleName:i.name})}})}),r}function OR(t,e,n,r){const i=[],s=Se(t,(o,l,u)=>(e.definition[u].ignoreAmbiguities===!0||w(l,c=>{const f=[u];w(t,(d,h)=>{u!==h&&Ys(d,c)&&e.definition[h].ignoreAmbiguities!==!0&&f.push(h)}),f.length>1&&!Ys(i,c)&&(i.push(c),o.push({alts:f,path:c}))}),o),[]);return I(s,o=>{const l=I(o.alts,c=>c+1);return{message:r.buildAlternationAmbiguityError({topLevelRule:n,alternation:e,ambiguityIndices:l,prefixPath:o.path}),type:fe.AMBIGUOUS_ALTS,ruleName:n.name,occurrence:e.idx,alternatives:o.alts}})}function LR(t,e,n,r){const i=Se(t,(a,o,l)=>{const u=I(o,c=>({idx:l,path:c}));return a.concat(u)},[]);return pr(_e(i,a=>{if(e.definition[a.idx].ignoreAmbiguities===!0)return[];const l=a.idx,u=a.path,c=Pe(i,d=>e.definition[d.idx].ignoreAmbiguities!==!0&&d.idx{const h=[d.idx+1,l+1],m=e.idx===0?"":e.idx;return{message:r.buildAlternationPrefixAmbiguityError({topLevelRule:n,alternation:e,ambiguityIndices:h,prefixPath:d.path}),type:fe.AMBIGUOUS_PREFIX_ALTS,ruleName:n.name,occurrence:m,alternatives:h}})}))}function PR(t,e,n){const r=[],i=I(e,s=>s.name);return w(t,s=>{const a=s.name;if(de(i,a)){const o=n.buildNamespaceConflictError(s);r.push({message:o,type:fe.CONFLICT_TOKENS_RULES_NAMESPACE,ruleName:a})}}),r}function MR(t){const e=Wa(t,{errMsgProvider:aR}),n={};return w(t.rules,r=>{n[r.name]=r}),oR(n,e.errMsgProvider)}function DR(t){return t=Wa(t,{errMsgProvider:bt}),ER(t.rules,t.tokenTypes,t.errMsgProvider,t.grammarName)}const hf="MismatchedTokenException",pf="NoViableAltException",mf="EarlyExitException",gf="NotAllInputParsedException",yf=[hf,pf,mf,gf];Object.freeze(yf);function pi(t){return de(yf,t.name)}class Ji extends Error{constructor(e,n){super(e),this.token=n,this.resyncedTokens=[],Object.setPrototypeOf(this,new.target.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}}class Tf extends Ji{constructor(e,n,r){super(e,n),this.previousToken=r,this.name=hf}}class FR extends Ji{constructor(e,n,r){super(e,n),this.previousToken=r,this.name=pf}}class GR extends Ji{constructor(e,n){super(e,n),this.name=gf}}class UR extends Ji{constructor(e,n,r){super(e,n),this.previousToken=r,this.name=mf}}const ys={},vf="InRuleRecoveryException";class BR extends Error{constructor(e){super(e),this.name=vf}}class jR{initRecoverable(e){this.firstAfterRepMap={},this.resyncFollows={},this.recoveryEnabled=C(e,"recoveryEnabled")?e.recoveryEnabled:ut.recoveryEnabled,this.recoveryEnabled&&(this.attemptInRepetitionRecovery=KR)}getTokenToInsert(e){const n=Ya(e,"",NaN,NaN,NaN,NaN,NaN,NaN);return n.isInsertedInRecovery=!0,n}canTokenTypeBeInsertedInRecovery(e){return!0}canTokenTypeBeDeletedInRecovery(e){return!0}tryInRepetitionRecovery(e,n,r,i){const s=this.findReSyncTokenType(),a=this.exportLexerState(),o=[];let l=!1;const u=this.LA(1);let c=this.LA(1);const f=()=>{const d=this.LA(0),h=this.errorMessageProvider.buildMismatchTokenMessage({expected:i,actual:u,previous:d,ruleName:this.getCurrRuleFullName()}),m=new Tf(h,u,this.LA(0));m.resyncedTokens=sr(o),this.SAVE_ERROR(m)};for(;!l;)if(this.tokenMatcher(c,i)){f();return}else if(r.call(this)){f(),e.apply(this,n);return}else this.tokenMatcher(c,s)?l=!0:(c=this.SKIP_TOKEN(),this.addToResyncTokens(c,o));this.importLexerState(a)}shouldInRepetitionRecoveryBeTried(e,n,r){return!(r===!1||this.tokenMatcher(this.LA(1),e)||this.isBackTracking()||this.canPerformInRuleRecovery(e,this.getFollowsForInRuleRecovery(e,n)))}getFollowsForInRuleRecovery(e,n){const r=this.getCurrentGrammarPath(e,n);return this.getNextPossibleTokenTypes(r)}tryInRuleRecovery(e,n){if(this.canRecoverWithSingleTokenInsertion(e,n))return this.getTokenToInsert(e);if(this.canRecoverWithSingleTokenDeletion(e)){const r=this.SKIP_TOKEN();return this.consumeToken(),r}throw new BR("sad sad panda")}canPerformInRuleRecovery(e,n){return this.canRecoverWithSingleTokenInsertion(e,n)||this.canRecoverWithSingleTokenDeletion(e)}canRecoverWithSingleTokenInsertion(e,n){if(!this.canTokenTypeBeInsertedInRecovery(e)||U(n))return!1;const r=this.LA(1);return rn(n,s=>this.tokenMatcher(r,s))!==void 0}canRecoverWithSingleTokenDeletion(e){return this.canTokenTypeBeDeletedInRecovery(e)?this.tokenMatcher(this.LA(2),e):!1}isInCurrentRuleReSyncSet(e){const n=this.getCurrFollowKey(),r=this.getFollowSetFromFollowKey(n);return de(r,e)}findReSyncTokenType(){const e=this.flattenFollowSet();let n=this.LA(1),r=2;for(;;){const i=rn(e,s=>af(n,s));if(i!==void 0)return i;n=this.LA(r),r++}}getCurrFollowKey(){if(this.RULE_STACK.length===1)return ys;const e=this.getLastExplicitRuleShortName(),n=this.getLastExplicitRuleOccurrenceIndex(),r=this.getPreviousExplicitRuleShortName();return{ruleName:this.shortRuleNameToFullName(e),idxInCallingRule:n,inRule:this.shortRuleNameToFullName(r)}}buildFullFollowKeyStack(){const e=this.RULE_STACK,n=this.RULE_OCCURRENCE_STACK;return I(e,(r,i)=>i===0?ys:{ruleName:this.shortRuleNameToFullName(r),idxInCallingRule:n[i],inRule:this.shortRuleNameToFullName(e[i-1])})}flattenFollowSet(){const e=I(this.buildFullFollowKeyStack(),n=>this.getFollowSetFromFollowKey(n));return Ge(e)}getFollowSetFromFollowKey(e){if(e===ys)return[yt];const n=e.ruleName+e.idxInCallingRule+qc+e.inRule;return this.resyncFollows[n]}addToResyncTokens(e,n){return this.tokenMatcher(e,yt)||n.push(e),n}reSyncTo(e){const n=[];let r=this.LA(1);for(;this.tokenMatcher(r,e)===!1;)r=this.SKIP_TOKEN(),this.addToResyncTokens(r,n);return sr(n)}attemptInRepetitionRecovery(e,n,r,i,s,a,o){}getCurrentGrammarPath(e,n){const r=this.getHumanReadableRuleStack(),i=se(this.RULE_OCCURRENCE_STACK);return{ruleStack:r,occurrenceStack:i,lastTok:e,lastTokOccurrence:n}}getHumanReadableRuleStack(){return I(this.RULE_STACK,e=>this.shortRuleNameToFullName(e))}}function KR(t,e,n,r,i,s,a){const o=this.getKeyForAutomaticLookahead(r,i);let l=this.firstAfterRepMap[o];if(l===void 0){const d=this.getCurrRuleFullName(),h=this.getGAstProductions()[d];l=new s(h,i).startWalking(),this.firstAfterRepMap[o]=l}let u=l.token,c=l.occurrence;const f=l.isEndOfRule;this.RULE_STACK.length===1&&f&&u===void 0&&(u=yt,c=1),!(u===void 0||c===void 0)&&this.shouldInRepetitionRecoveryBeTried(u,c,a)&&this.tryInRepetitionRecovery(t,e,n,u)}const HR=4,At=8,Rf=1<df(n,n,bt))}validateEmptyOrAlternatives(e){return _e(e,n=>CR(n,bt))}validateAmbiguousAlternationAlternatives(e,n){return _e(e,r=>wR(r,n,bt))}validateSomeNonEmptyLookaheadPath(e,n){return bR(e,n,bt)}buildLookaheadForAlternation(e){return pR(e.prodOccurrence,e.rule,e.maxLookahead,e.hasPredicates,e.dynamicTokensEnabled,gR)}buildLookaheadForOptional(e){return mR(e.prodOccurrence,e.rule,e.maxLookahead,e.dynamicTokensEnabled,Xa(e.prodType),yR)}}class VR{initLooksAhead(e){this.dynamicTokensEnabled=C(e,"dynamicTokensEnabled")?e.dynamicTokensEnabled:ut.dynamicTokensEnabled,this.maxLookahead=C(e,"maxLookahead")?e.maxLookahead:ut.maxLookahead,this.lookaheadStrategy=C(e,"lookaheadStrategy")?e.lookaheadStrategy:new Za({maxLookahead:this.maxLookahead}),this.lookAheadFuncsCache=new Map}preComputeLookaheadFunctions(e){w(e,n=>{this.TRACE_INIT(`${n.name} Rule Lookahead`,()=>{const{alternation:r,repetition:i,option:s,repetitionMandatory:a,repetitionMandatoryWithSeparator:o,repetitionWithSeparator:l}=zR(n);w(r,u=>{const c=u.idx===0?"":u.idx;this.TRACE_INIT(`${We(u)}${c}`,()=>{const f=this.lookaheadStrategy.buildLookaheadForAlternation({prodOccurrence:u.idx,rule:n,maxLookahead:u.maxLookahead||this.maxLookahead,hasPredicates:u.hasPredicates,dynamicTokensEnabled:this.dynamicTokensEnabled}),d=Ts(this.fullRuleNameToShort[n.name],Rf,u.idx);this.setLaFuncCache(d,f)})}),w(i,u=>{this.computeLookaheadFunc(n,u.idx,Xs,"Repetition",u.maxLookahead,We(u))}),w(s,u=>{this.computeLookaheadFunc(n,u.idx,Af,"Option",u.maxLookahead,We(u))}),w(a,u=>{this.computeLookaheadFunc(n,u.idx,Js,"RepetitionMandatory",u.maxLookahead,We(u))}),w(o,u=>{this.computeLookaheadFunc(n,u.idx,Xr,"RepetitionMandatoryWithSeparator",u.maxLookahead,We(u))}),w(l,u=>{this.computeLookaheadFunc(n,u.idx,Zs,"RepetitionWithSeparator",u.maxLookahead,We(u))})})})}computeLookaheadFunc(e,n,r,i,s,a){this.TRACE_INIT(`${a}${n===0?"":n}`,()=>{const o=this.lookaheadStrategy.buildLookaheadForOptional({prodOccurrence:n,rule:e,maxLookahead:s||this.maxLookahead,dynamicTokensEnabled:this.dynamicTokensEnabled,prodType:i}),l=Ts(this.fullRuleNameToShort[e.name],r,n);this.setLaFuncCache(l,o)})}getKeyForAutomaticLookahead(e,n){const r=this.getLastExplicitRuleShortName();return Ts(r,e,n)}getLaFuncFromCache(e){return this.lookAheadFuncsCache.get(e)}setLaFuncCache(e,n){this.lookAheadFuncsCache.set(e,n)}}class WR extends fn{constructor(){super(...arguments),this.dslMethods={option:[],alternation:[],repetition:[],repetitionWithSeparator:[],repetitionMandatory:[],repetitionMandatoryWithSeparator:[]}}reset(){this.dslMethods={option:[],alternation:[],repetition:[],repetitionWithSeparator:[],repetitionMandatory:[],repetitionMandatoryWithSeparator:[]}}visitOption(e){this.dslMethods.option.push(e)}visitRepetitionWithSeparator(e){this.dslMethods.repetitionWithSeparator.push(e)}visitRepetitionMandatory(e){this.dslMethods.repetitionMandatory.push(e)}visitRepetitionMandatoryWithSeparator(e){this.dslMethods.repetitionMandatoryWithSeparator.push(e)}visitRepetition(e){this.dslMethods.repetition.push(e)}visitAlternation(e){this.dslMethods.alternation.push(e)}}const Lr=new WR;function zR(t){Lr.reset(),t.accept(Lr);const e=Lr.dslMethods;return Lr.reset(),e}function ml(t,e){isNaN(t.startOffset)===!0?(t.startOffset=e.startOffset,t.endOffset=e.endOffset):t.endOffseta.msg);throw Error(`Errors Detected in CST Visitor <${this.constructor.name}>: + ${s.join(` + +`).replace(/\n/g,` + `)}`)}}};return n.prototype=r,n.prototype.constructor=n,n._RULE_NAMES=e,n}function QR(t,e,n){const r=function(){};Ef(r,t+"BaseSemanticsWithDefaults");const i=Object.create(n.prototype);return w(e,s=>{i[s]=JR}),r.prototype=i,r.prototype.constructor=r,r}var Qs;(function(t){t[t.REDUNDANT_METHOD=0]="REDUNDANT_METHOD",t[t.MISSING_METHOD=1]="MISSING_METHOD"})(Qs||(Qs={}));function eA(t,e){return tA(t,e)}function tA(t,e){const n=Pe(e,i=>ct(t[i])===!1),r=I(n,i=>({msg:`Missing visitor method: <${i}> on ${t.constructor.name} CST Visitor.`,type:Qs.MISSING_METHOD,methodName:i}));return pr(r)}class nA{initTreeBuilder(e){if(this.CST_STACK=[],this.outputCst=e.outputCst,this.nodeLocationTracking=C(e,"nodeLocationTracking")?e.nodeLocationTracking:ut.nodeLocationTracking,!this.outputCst)this.cstInvocationStateUpdate=X,this.cstFinallyStateUpdate=X,this.cstPostTerminal=X,this.cstPostNonTerminal=X,this.cstPostRule=X;else if(/full/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=gl,this.setNodeLocationFromNode=gl,this.cstPostRule=X,this.setInitialNodeLocation=this.setInitialNodeLocationFullRecovery):(this.setNodeLocationFromToken=X,this.setNodeLocationFromNode=X,this.cstPostRule=this.cstPostRuleFull,this.setInitialNodeLocation=this.setInitialNodeLocationFullRegular);else if(/onlyOffset/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=ml,this.setNodeLocationFromNode=ml,this.cstPostRule=X,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRecovery):(this.setNodeLocationFromToken=X,this.setNodeLocationFromNode=X,this.cstPostRule=this.cstPostRuleOnlyOffset,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRegular);else if(/none/i.test(this.nodeLocationTracking))this.setNodeLocationFromToken=X,this.setNodeLocationFromNode=X,this.cstPostRule=X,this.setInitialNodeLocation=X;else throw Error(`Invalid config option: "${e.nodeLocationTracking}"`)}setInitialNodeLocationOnlyOffsetRecovery(e){e.location={startOffset:NaN,endOffset:NaN}}setInitialNodeLocationOnlyOffsetRegular(e){e.location={startOffset:this.LA(1).startOffset,endOffset:NaN}}setInitialNodeLocationFullRecovery(e){e.location={startOffset:NaN,startLine:NaN,startColumn:NaN,endOffset:NaN,endLine:NaN,endColumn:NaN}}setInitialNodeLocationFullRegular(e){const n=this.LA(1);e.location={startOffset:n.startOffset,startLine:n.startLine,startColumn:n.startColumn,endOffset:NaN,endLine:NaN,endColumn:NaN}}cstInvocationStateUpdate(e){const n={name:e,children:Object.create(null)};this.setInitialNodeLocation(n),this.CST_STACK.push(n)}cstFinallyStateUpdate(){this.CST_STACK.pop()}cstPostRuleFull(e){const n=this.LA(0),r=e.location;r.startOffset<=n.startOffset?(r.endOffset=n.endOffset,r.endLine=n.endLine,r.endColumn=n.endColumn):(r.startOffset=NaN,r.startLine=NaN,r.startColumn=NaN)}cstPostRuleOnlyOffset(e){const n=this.LA(0),r=e.location;r.startOffset<=n.startOffset?r.endOffset=n.endOffset:r.startOffset=NaN}cstPostTerminal(e,n){const r=this.CST_STACK[this.CST_STACK.length-1];qR(r,n,e),this.setNodeLocationFromToken(r.location,n)}cstPostNonTerminal(e,n){const r=this.CST_STACK[this.CST_STACK.length-1];YR(r,n,e),this.setNodeLocationFromNode(r.location,e.location)}getBaseCstVisitorConstructor(){if(lt(this.baseCstVisitorConstructor)){const e=ZR(this.className,Le(this.gastProductionsCache));return this.baseCstVisitorConstructor=e,e}return this.baseCstVisitorConstructor}getBaseCstVisitorConstructorWithDefaults(){if(lt(this.baseCstVisitorWithDefaultsConstructor)){const e=QR(this.className,Le(this.gastProductionsCache),this.getBaseCstVisitorConstructor());return this.baseCstVisitorWithDefaultsConstructor=e,e}return this.baseCstVisitorWithDefaultsConstructor}getLastExplicitRuleShortName(){const e=this.RULE_STACK;return e[e.length-1]}getPreviousExplicitRuleShortName(){const e=this.RULE_STACK;return e[e.length-2]}getLastExplicitRuleOccurrenceIndex(){const e=this.RULE_OCCURRENCE_STACK;return e[e.length-1]}}class rA{initLexerAdapter(){this.tokVector=[],this.tokVectorLength=0,this.currIdx=-1}set input(e){if(this.selfAnalysisDone!==!0)throw Error("Missing invocation at the end of the Parser's constructor.");this.reset(),this.tokVector=e,this.tokVectorLength=e.length}get input(){return this.tokVector}SKIP_TOKEN(){return this.currIdx<=this.tokVector.length-2?(this.consumeToken(),this.LA(1)):gi}LA(e){const n=this.currIdx+e;return n<0||this.tokVectorLength<=n?gi:this.tokVector[n]}consumeToken(){this.currIdx++}exportLexerState(){return this.currIdx}importLexerState(e){this.currIdx=e}resetLexerState(){this.currIdx=-1}moveToTerminatedState(){this.currIdx=this.tokVector.length-1}getLexerPosition(){return this.exportLexerState()}}class iA{ACTION(e){return e.call(this)}consume(e,n,r){return this.consumeInternal(n,e,r)}subrule(e,n,r){return this.subruleInternal(n,e,r)}option(e,n){return this.optionInternal(n,e)}or(e,n){return this.orInternal(n,e)}many(e,n){return this.manyInternal(e,n)}atLeastOne(e,n){return this.atLeastOneInternal(e,n)}CONSUME(e,n){return this.consumeInternal(e,0,n)}CONSUME1(e,n){return this.consumeInternal(e,1,n)}CONSUME2(e,n){return this.consumeInternal(e,2,n)}CONSUME3(e,n){return this.consumeInternal(e,3,n)}CONSUME4(e,n){return this.consumeInternal(e,4,n)}CONSUME5(e,n){return this.consumeInternal(e,5,n)}CONSUME6(e,n){return this.consumeInternal(e,6,n)}CONSUME7(e,n){return this.consumeInternal(e,7,n)}CONSUME8(e,n){return this.consumeInternal(e,8,n)}CONSUME9(e,n){return this.consumeInternal(e,9,n)}SUBRULE(e,n){return this.subruleInternal(e,0,n)}SUBRULE1(e,n){return this.subruleInternal(e,1,n)}SUBRULE2(e,n){return this.subruleInternal(e,2,n)}SUBRULE3(e,n){return this.subruleInternal(e,3,n)}SUBRULE4(e,n){return this.subruleInternal(e,4,n)}SUBRULE5(e,n){return this.subruleInternal(e,5,n)}SUBRULE6(e,n){return this.subruleInternal(e,6,n)}SUBRULE7(e,n){return this.subruleInternal(e,7,n)}SUBRULE8(e,n){return this.subruleInternal(e,8,n)}SUBRULE9(e,n){return this.subruleInternal(e,9,n)}OPTION(e){return this.optionInternal(e,0)}OPTION1(e){return this.optionInternal(e,1)}OPTION2(e){return this.optionInternal(e,2)}OPTION3(e){return this.optionInternal(e,3)}OPTION4(e){return this.optionInternal(e,4)}OPTION5(e){return this.optionInternal(e,5)}OPTION6(e){return this.optionInternal(e,6)}OPTION7(e){return this.optionInternal(e,7)}OPTION8(e){return this.optionInternal(e,8)}OPTION9(e){return this.optionInternal(e,9)}OR(e){return this.orInternal(e,0)}OR1(e){return this.orInternal(e,1)}OR2(e){return this.orInternal(e,2)}OR3(e){return this.orInternal(e,3)}OR4(e){return this.orInternal(e,4)}OR5(e){return this.orInternal(e,5)}OR6(e){return this.orInternal(e,6)}OR7(e){return this.orInternal(e,7)}OR8(e){return this.orInternal(e,8)}OR9(e){return this.orInternal(e,9)}MANY(e){this.manyInternal(0,e)}MANY1(e){this.manyInternal(1,e)}MANY2(e){this.manyInternal(2,e)}MANY3(e){this.manyInternal(3,e)}MANY4(e){this.manyInternal(4,e)}MANY5(e){this.manyInternal(5,e)}MANY6(e){this.manyInternal(6,e)}MANY7(e){this.manyInternal(7,e)}MANY8(e){this.manyInternal(8,e)}MANY9(e){this.manyInternal(9,e)}MANY_SEP(e){this.manySepFirstInternal(0,e)}MANY_SEP1(e){this.manySepFirstInternal(1,e)}MANY_SEP2(e){this.manySepFirstInternal(2,e)}MANY_SEP3(e){this.manySepFirstInternal(3,e)}MANY_SEP4(e){this.manySepFirstInternal(4,e)}MANY_SEP5(e){this.manySepFirstInternal(5,e)}MANY_SEP6(e){this.manySepFirstInternal(6,e)}MANY_SEP7(e){this.manySepFirstInternal(7,e)}MANY_SEP8(e){this.manySepFirstInternal(8,e)}MANY_SEP9(e){this.manySepFirstInternal(9,e)}AT_LEAST_ONE(e){this.atLeastOneInternal(0,e)}AT_LEAST_ONE1(e){return this.atLeastOneInternal(1,e)}AT_LEAST_ONE2(e){this.atLeastOneInternal(2,e)}AT_LEAST_ONE3(e){this.atLeastOneInternal(3,e)}AT_LEAST_ONE4(e){this.atLeastOneInternal(4,e)}AT_LEAST_ONE5(e){this.atLeastOneInternal(5,e)}AT_LEAST_ONE6(e){this.atLeastOneInternal(6,e)}AT_LEAST_ONE7(e){this.atLeastOneInternal(7,e)}AT_LEAST_ONE8(e){this.atLeastOneInternal(8,e)}AT_LEAST_ONE9(e){this.atLeastOneInternal(9,e)}AT_LEAST_ONE_SEP(e){this.atLeastOneSepFirstInternal(0,e)}AT_LEAST_ONE_SEP1(e){this.atLeastOneSepFirstInternal(1,e)}AT_LEAST_ONE_SEP2(e){this.atLeastOneSepFirstInternal(2,e)}AT_LEAST_ONE_SEP3(e){this.atLeastOneSepFirstInternal(3,e)}AT_LEAST_ONE_SEP4(e){this.atLeastOneSepFirstInternal(4,e)}AT_LEAST_ONE_SEP5(e){this.atLeastOneSepFirstInternal(5,e)}AT_LEAST_ONE_SEP6(e){this.atLeastOneSepFirstInternal(6,e)}AT_LEAST_ONE_SEP7(e){this.atLeastOneSepFirstInternal(7,e)}AT_LEAST_ONE_SEP8(e){this.atLeastOneSepFirstInternal(8,e)}AT_LEAST_ONE_SEP9(e){this.atLeastOneSepFirstInternal(9,e)}RULE(e,n,r=yi){if(de(this.definedRulesNames,e)){const a={message:bt.buildDuplicateRuleNameError({topLevelRule:e,grammarName:this.className}),type:fe.DUPLICATE_RULE_NAME,ruleName:e};this.definitionErrors.push(a)}this.definedRulesNames.push(e);const i=this.defineRule(e,n,r);return this[e]=i,i}OVERRIDE_RULE(e,n,r=yi){const i=IR(e,this.definedRulesNames,this.className);this.definitionErrors=this.definitionErrors.concat(i);const s=this.defineRule(e,n,r);return this[e]=s,s}BACKTRACK(e,n){return function(){this.isBackTrackingStack.push(1);const r=this.saveRecogState();try{return e.apply(this,n),!0}catch(i){if(pi(i))return!1;throw i}finally{this.reloadRecogState(r),this.isBackTrackingStack.pop()}}}getGAstProductions(){return this.gastProductionsCache}getSerializedGastProductions(){return hv(J(this.gastProductionsCache))}}class sA{initRecognizerEngine(e,n){if(this.className=this.constructor.name,this.shortRuleNameToFull={},this.fullRuleNameToShort={},this.ruleShortNameIdx=256,this.tokenMatcher=hi,this.subruleIdx=0,this.definedRulesNames=[],this.tokensMap={},this.isBackTrackingStack=[],this.RULE_STACK=[],this.RULE_OCCURRENCE_STACK=[],this.gastProductionsCache={},C(n,"serializedGrammar"))throw Error(`The Parser's configuration can no longer contain a property. + See: https://chevrotain.io/docs/changes/BREAKING_CHANGES.html#_6-0-0 + For Further details.`);if(P(e)){if(U(e))throw Error(`A Token Vocabulary cannot be empty. + Note that the first argument for the parser constructor + is no longer a Token vector (since v4.0).`);if(typeof e[0].startOffset=="number")throw Error(`The Parser constructor no longer accepts a token vector as the first argument. + See: https://chevrotain.io/docs/changes/BREAKING_CHANGES.html#_4-0-0 + For Further details.`)}if(P(e))this.tokensMap=Se(e,(s,a)=>(s[a.name]=a,s),{});else if(C(e,"modes")&&Ue(Ge(J(e.modes)),rR)){const s=Ge(J(e.modes)),a=za(s);this.tokensMap=Se(a,(o,l)=>(o[l.name]=l,o),{})}else if(Oe(e))this.tokensMap=se(e);else throw new Error(" argument must be An Array of Token constructors, A dictionary of Token constructors or an IMultiModeLexerDefinition");this.tokensMap.EOF=yt;const r=C(e,"modes")?Ge(J(e.modes)):J(e),i=Ue(r,s=>U(s.categoryMatches));this.tokenMatcher=i?hi:gr,yr(J(this.tokensMap))}defineRule(e,n,r){if(this.selfAnalysisDone)throw Error(`Grammar rule <${e}> may not be defined after the 'performSelfAnalysis' method has been called' +Make sure that all grammar rule definitions are done before 'performSelfAnalysis' is called.`);const i=C(r,"resyncEnabled")?r.resyncEnabled:yi.resyncEnabled,s=C(r,"recoveryValueFunc")?r.recoveryValueFunc:yi.recoveryValueFunc,a=this.ruleShortNameIdx<a.call(this)&&o.call(this)}}else s=e;if(i.call(this)===!0)return s.call(this)}atLeastOneInternal(e,n){const r=this.getKeyForAutomaticLookahead(Js,e);return this.atLeastOneInternalLogic(e,n,r)}atLeastOneInternalLogic(e,n,r){let i=this.getLaFuncFromCache(r),s;if(typeof n!="function"){s=n.DEF;const a=n.GATE;if(a!==void 0){const o=i;i=()=>a.call(this)&&o.call(this)}}else s=n;if(i.call(this)===!0){let a=this.doSingleRepetition(s);for(;i.call(this)===!0&&a===!0;)a=this.doSingleRepetition(s)}else throw this.raiseEarlyExitException(e,H.REPETITION_MANDATORY,n.ERR_MSG);this.attemptInRepetitionRecovery(this.atLeastOneInternal,[e,n],i,Js,e,dR)}atLeastOneSepFirstInternal(e,n){const r=this.getKeyForAutomaticLookahead(Xr,e);this.atLeastOneSepFirstInternalLogic(e,n,r)}atLeastOneSepFirstInternalLogic(e,n,r){const i=n.DEF,s=n.SEP;if(this.getLaFuncFromCache(r).call(this)===!0){i.call(this);const o=()=>this.tokenMatcher(this.LA(1),s);for(;this.tokenMatcher(this.LA(1),s)===!0;)this.CONSUME(s),i.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,s,o,i,dl],o,Xr,e,dl)}else throw this.raiseEarlyExitException(e,H.REPETITION_MANDATORY_WITH_SEPARATOR,n.ERR_MSG)}manyInternal(e,n){const r=this.getKeyForAutomaticLookahead(Xs,e);return this.manyInternalLogic(e,n,r)}manyInternalLogic(e,n,r){let i=this.getLaFuncFromCache(r),s;if(typeof n!="function"){s=n.DEF;const o=n.GATE;if(o!==void 0){const l=i;i=()=>o.call(this)&&l.call(this)}}else s=n;let a=!0;for(;i.call(this)===!0&&a===!0;)a=this.doSingleRepetition(s);this.attemptInRepetitionRecovery(this.manyInternal,[e,n],i,Xs,e,fR,a)}manySepFirstInternal(e,n){const r=this.getKeyForAutomaticLookahead(Zs,e);this.manySepFirstInternalLogic(e,n,r)}manySepFirstInternalLogic(e,n,r){const i=n.DEF,s=n.SEP;if(this.getLaFuncFromCache(r).call(this)===!0){i.call(this);const o=()=>this.tokenMatcher(this.LA(1),s);for(;this.tokenMatcher(this.LA(1),s)===!0;)this.CONSUME(s),i.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,s,o,i,fl],o,Zs,e,fl)}}repetitionSepSecondInternal(e,n,r,i,s){for(;r();)this.CONSUME(n),i.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,n,r,i,s],r,Xr,e,s)}doSingleRepetition(e){const n=this.getLexerPosition();return e.call(this),this.getLexerPosition()>n}orInternal(e,n){const r=this.getKeyForAutomaticLookahead(Rf,n),i=P(e)?e:e.DEF,a=this.getLaFuncFromCache(r).call(this,i);if(a!==void 0)return i[a].ALT.call(this);this.raiseNoAltException(n,e.ERR_MSG)}ruleFinallyStateUpdate(){if(this.RULE_STACK.pop(),this.RULE_OCCURRENCE_STACK.pop(),this.cstFinallyStateUpdate(),this.RULE_STACK.length===0&&this.isAtEndOfInput()===!1){const e=this.LA(1),n=this.errorMessageProvider.buildNotAllInputParsedMessage({firstRedundant:e,ruleName:this.getCurrRuleFullName()});this.SAVE_ERROR(new GR(n,e))}}subruleInternal(e,n,r){let i;try{const s=r!==void 0?r.ARGS:void 0;return this.subruleIdx=n,i=e.apply(this,s),this.cstPostNonTerminal(i,r!==void 0&&r.LABEL!==void 0?r.LABEL:e.ruleName),i}catch(s){throw this.subruleInternalError(s,r,e.ruleName)}}subruleInternalError(e,n,r){throw pi(e)&&e.partialCstResult!==void 0&&(this.cstPostNonTerminal(e.partialCstResult,n!==void 0&&n.LABEL!==void 0?n.LABEL:r),delete e.partialCstResult),e}consumeInternal(e,n,r){let i;try{const s=this.LA(1);this.tokenMatcher(s,e)===!0?(this.consumeToken(),i=s):this.consumeInternalError(e,s,r)}catch(s){i=this.consumeInternalRecovery(e,n,s)}return this.cstPostTerminal(r!==void 0&&r.LABEL!==void 0?r.LABEL:e.name,i),i}consumeInternalError(e,n,r){let i;const s=this.LA(0);throw r!==void 0&&r.ERR_MSG?i=r.ERR_MSG:i=this.errorMessageProvider.buildMismatchTokenMessage({expected:e,actual:n,previous:s,ruleName:this.getCurrRuleFullName()}),this.SAVE_ERROR(new Tf(i,n,s))}consumeInternalRecovery(e,n,r){if(this.recoveryEnabled&&r.name==="MismatchedTokenException"&&!this.isBackTracking()){const i=this.getFollowsForInRuleRecovery(e,n);try{return this.tryInRuleRecovery(e,i)}catch(s){throw s.name===vf?r:s}}else throw r}saveRecogState(){const e=this.errors,n=se(this.RULE_STACK);return{errors:e,lexerState:this.exportLexerState(),RULE_STACK:n,CST_STACK:this.CST_STACK}}reloadRecogState(e){this.errors=e.errors,this.importLexerState(e.lexerState),this.RULE_STACK=e.RULE_STACK}ruleInvocationStateUpdate(e,n,r){this.RULE_OCCURRENCE_STACK.push(r),this.RULE_STACK.push(e),this.cstInvocationStateUpdate(n)}isBackTracking(){return this.isBackTrackingStack.length!==0}getCurrRuleFullName(){const e=this.getLastExplicitRuleShortName();return this.shortRuleNameToFull[e]}shortRuleNameToFullName(e){return this.shortRuleNameToFull[e]}isAtEndOfInput(){return this.tokenMatcher(this.LA(1),yt)}reset(){this.resetLexerState(),this.subruleIdx=0,this.isBackTrackingStack=[],this.errors=[],this.RULE_STACK=[],this.CST_STACK=[],this.RULE_OCCURRENCE_STACK=[]}}class aA{initErrorHandler(e){this._errors=[],this.errorMessageProvider=C(e,"errorMessageProvider")?e.errorMessageProvider:ut.errorMessageProvider}SAVE_ERROR(e){if(pi(e))return e.context={ruleStack:this.getHumanReadableRuleStack(),ruleOccurrenceStack:se(this.RULE_OCCURRENCE_STACK)},this._errors.push(e),e;throw Error("Trying to save an Error which is not a RecognitionException")}get errors(){return se(this._errors)}set errors(e){this._errors=e}raiseEarlyExitException(e,n,r){const i=this.getCurrRuleFullName(),s=this.getGAstProductions()[i],o=Xi(e,s,n,this.maxLookahead)[0],l=[];for(let c=1;c<=this.maxLookahead;c++)l.push(this.LA(c));const u=this.errorMessageProvider.buildEarlyExitMessage({expectedIterationPaths:o,actual:l,previous:this.LA(0),customUserDescription:r,ruleName:i});throw this.SAVE_ERROR(new UR(u,this.LA(1),this.LA(0)))}raiseNoAltException(e,n){const r=this.getCurrRuleFullName(),i=this.getGAstProductions()[r],s=Yi(e,i,this.maxLookahead),a=[];for(let u=1;u<=this.maxLookahead;u++)a.push(this.LA(u));const o=this.LA(0),l=this.errorMessageProvider.buildNoViableAltMessage({expectedPathsPerAlt:s,actual:a,previous:o,customUserDescription:n,ruleName:this.getCurrRuleFullName()});throw this.SAVE_ERROR(new FR(l,this.LA(1),o))}}class oA{initContentAssist(){}computeContentAssist(e,n){const r=this.gastProductionsCache[e];if(lt(r))throw Error(`Rule ->${e}<- does not exist in this grammar.`);return of([r],n,this.tokenMatcher,this.maxLookahead)}getNextPossibleTokenTypes(e){const n=je(e.ruleStack),i=this.getGAstProductions()[n];return new cR(i,e).startWalking()}}const Zi={description:"This Object indicates the Parser is during Recording Phase"};Object.freeze(Zi);const yl=!0,Tl=Math.pow(2,At)-1,$f=sf({name:"RECORDING_PHASE_TOKEN",pattern:he.NA});yr([$f]);const Sf=Ya($f,`This IToken indicates the Parser is in Recording Phase + See: https://chevrotain.io/docs/guide/internals.html#grammar-recording for details`,-1,-1,-1,-1,-1,-1);Object.freeze(Sf);const lA={name:`This CSTNode indicates the Parser is in Recording Phase + See: https://chevrotain.io/docs/guide/internals.html#grammar-recording for details`,children:{}};class uA{initGastRecorder(e){this.recordingProdStack=[],this.RECORDING_PHASE=!1}enableRecording(){this.RECORDING_PHASE=!0,this.TRACE_INIT("Enable Recording",()=>{for(let e=0;e<10;e++){const n=e>0?e:"";this[`CONSUME${n}`]=function(r,i){return this.consumeInternalRecord(r,e,i)},this[`SUBRULE${n}`]=function(r,i){return this.subruleInternalRecord(r,e,i)},this[`OPTION${n}`]=function(r){return this.optionInternalRecord(r,e)},this[`OR${n}`]=function(r){return this.orInternalRecord(r,e)},this[`MANY${n}`]=function(r){this.manyInternalRecord(e,r)},this[`MANY_SEP${n}`]=function(r){this.manySepFirstInternalRecord(e,r)},this[`AT_LEAST_ONE${n}`]=function(r){this.atLeastOneInternalRecord(e,r)},this[`AT_LEAST_ONE_SEP${n}`]=function(r){this.atLeastOneSepFirstInternalRecord(e,r)}}this.consume=function(e,n,r){return this.consumeInternalRecord(n,e,r)},this.subrule=function(e,n,r){return this.subruleInternalRecord(n,e,r)},this.option=function(e,n){return this.optionInternalRecord(n,e)},this.or=function(e,n){return this.orInternalRecord(n,e)},this.many=function(e,n){this.manyInternalRecord(e,n)},this.atLeastOne=function(e,n){this.atLeastOneInternalRecord(e,n)},this.ACTION=this.ACTION_RECORD,this.BACKTRACK=this.BACKTRACK_RECORD,this.LA=this.LA_RECORD})}disableRecording(){this.RECORDING_PHASE=!1,this.TRACE_INIT("Deleting Recording methods",()=>{const e=this;for(let n=0;n<10;n++){const r=n>0?n:"";delete e[`CONSUME${r}`],delete e[`SUBRULE${r}`],delete e[`OPTION${r}`],delete e[`OR${r}`],delete e[`MANY${r}`],delete e[`MANY_SEP${r}`],delete e[`AT_LEAST_ONE${r}`],delete e[`AT_LEAST_ONE_SEP${r}`]}delete e.consume,delete e.subrule,delete e.option,delete e.or,delete e.many,delete e.atLeastOne,delete e.ACTION,delete e.BACKTRACK,delete e.LA})}ACTION_RECORD(e){}BACKTRACK_RECORD(e,n){return()=>!0}LA_RECORD(e){return gi}topLevelRuleRecord(e,n){try{const r=new cn({definition:[],name:e});return r.name=e,this.recordingProdStack.push(r),n.call(this),this.recordingProdStack.pop(),r}catch(r){if(r.KNOWN_RECORDER_ERROR!==!0)try{r.message=r.message+` + This error was thrown during the "grammar recording phase" For more info see: + https://chevrotain.io/docs/guide/internals.html#grammar-recording`}catch{throw r}throw r}}optionInternalRecord(e,n){return mn.call(this,ie,e,n)}atLeastOneInternalRecord(e,n){mn.call(this,xe,n,e)}atLeastOneSepFirstInternalRecord(e,n){mn.call(this,ke,n,e,yl)}manyInternalRecord(e,n){mn.call(this,z,n,e)}manySepFirstInternalRecord(e,n){mn.call(this,ge,n,e,yl)}orInternalRecord(e,n){return cA.call(this,e,n)}subruleInternalRecord(e,n,r){if(mi(n),!e||C(e,"ruleName")===!1){const o=new Error(` argument is invalid expecting a Parser method reference but got: <${JSON.stringify(e)}> + inside top level rule: <${this.recordingProdStack[0].name}>`);throw o.KNOWN_RECORDER_ERROR=!0,o}const i=nn(this.recordingProdStack),s=e.ruleName,a=new ce({idx:n,nonTerminalName:s,label:r?.LABEL,referencedRule:void 0});return i.definition.push(a),this.outputCst?lA:Zi}consumeInternalRecord(e,n,r){if(mi(n),!nf(e)){const a=new Error(` argument is invalid expecting a TokenType reference but got: <${JSON.stringify(e)}> + inside top level rule: <${this.recordingProdStack[0].name}>`);throw a.KNOWN_RECORDER_ERROR=!0,a}const i=nn(this.recordingProdStack),s=new j({idx:n,terminalType:e,label:r?.LABEL});return i.definition.push(s),Sf}}function mn(t,e,n,r=!1){mi(n);const i=nn(this.recordingProdStack),s=ct(e)?e:e.DEF,a=new t({definition:[],idx:n});return r&&(a.separator=e.SEP),C(e,"MAX_LOOKAHEAD")&&(a.maxLookahead=e.MAX_LOOKAHEAD),this.recordingProdStack.push(a),s.call(this),i.definition.push(a),this.recordingProdStack.pop(),Zi}function cA(t,e){mi(e);const n=nn(this.recordingProdStack),r=P(t)===!1,i=r===!1?t:t.DEF,s=new ye({definition:[],idx:e,ignoreAmbiguities:r&&t.IGNORE_AMBIGUITIES===!0});C(t,"MAX_LOOKAHEAD")&&(s.maxLookahead=t.MAX_LOOKAHEAD);const a=Hc(i,o=>ct(o.GATE));return s.hasPredicates=a,n.definition.push(s),w(i,o=>{const l=new me({definition:[]});s.definition.push(l),C(o,"IGNORE_AMBIGUITIES")?l.ignoreAmbiguities=o.IGNORE_AMBIGUITIES:C(o,"GATE")&&(l.ignoreAmbiguities=!0),this.recordingProdStack.push(l),o.ALT.call(this),this.recordingProdStack.pop()}),Zi}function vl(t){return t===0?"":`${t}`}function mi(t){if(t<0||t>Tl){const e=new Error(`Invalid DSL Method idx value: <${t}> + Idx value must be a none negative value smaller than ${Tl+1}`);throw e.KNOWN_RECORDER_ERROR=!0,e}}class fA{initPerformanceTracer(e){if(C(e,"traceInitPerf")){const n=e.traceInitPerf,r=typeof n=="number";this.traceInitMaxIdent=r?n:1/0,this.traceInitPerf=r?n>0:n}else this.traceInitMaxIdent=0,this.traceInitPerf=ut.traceInitPerf;this.traceInitIndent=-1}TRACE_INIT(e,n){if(this.traceInitPerf===!0){this.traceInitIndent++;const r=new Array(this.traceInitIndent+1).join(" ");this.traceInitIndent <${e}>`);const{time:i,value:s}=Wc(n),a=i>10?console.warn:console.log;return this.traceInitIndent time: ${i}ms`),this.traceInitIndent--,s}else return n()}}function dA(t,e){e.forEach(n=>{const r=n.prototype;Object.getOwnPropertyNames(r).forEach(i=>{if(i==="constructor")return;const s=Object.getOwnPropertyDescriptor(r,i);s&&(s.get||s.set)?Object.defineProperty(t.prototype,i,s):t.prototype[i]=n.prototype[i]})})}const gi=Ya(yt,"",NaN,NaN,NaN,NaN,NaN,NaN);Object.freeze(gi);const ut=Object.freeze({recoveryEnabled:!1,maxLookahead:3,dynamicTokensEnabled:!1,outputCst:!0,errorMessageProvider:Xt,nodeLocationTracking:"none",traceInitPerf:!1,skipValidations:!1}),yi=Object.freeze({recoveryValueFunc:()=>{},resyncEnabled:!0});var fe;(function(t){t[t.INVALID_RULE_NAME=0]="INVALID_RULE_NAME",t[t.DUPLICATE_RULE_NAME=1]="DUPLICATE_RULE_NAME",t[t.INVALID_RULE_OVERRIDE=2]="INVALID_RULE_OVERRIDE",t[t.DUPLICATE_PRODUCTIONS=3]="DUPLICATE_PRODUCTIONS",t[t.UNRESOLVED_SUBRULE_REF=4]="UNRESOLVED_SUBRULE_REF",t[t.LEFT_RECURSION=5]="LEFT_RECURSION",t[t.NONE_LAST_EMPTY_ALT=6]="NONE_LAST_EMPTY_ALT",t[t.AMBIGUOUS_ALTS=7]="AMBIGUOUS_ALTS",t[t.CONFLICT_TOKENS_RULES_NAMESPACE=8]="CONFLICT_TOKENS_RULES_NAMESPACE",t[t.INVALID_TOKEN_NAME=9]="INVALID_TOKEN_NAME",t[t.NO_NON_EMPTY_LOOKAHEAD=10]="NO_NON_EMPTY_LOOKAHEAD",t[t.AMBIGUOUS_PREFIX_ALTS=11]="AMBIGUOUS_PREFIX_ALTS",t[t.TOO_MANY_ALTS=12]="TOO_MANY_ALTS",t[t.CUSTOM_LOOKAHEAD_VALIDATION=13]="CUSTOM_LOOKAHEAD_VALIDATION"})(fe||(fe={}));function Rl(t=void 0){return function(){return t}}class Tr{static performSelfAnalysis(e){throw Error("The **static** `performSelfAnalysis` method has been deprecated. \nUse the **instance** method with the same name instead.")}performSelfAnalysis(){this.TRACE_INIT("performSelfAnalysis",()=>{let e;this.selfAnalysisDone=!0;const n=this.className;this.TRACE_INIT("toFastProps",()=>{zc(this)}),this.TRACE_INIT("Grammar Recording",()=>{try{this.enableRecording(),w(this.definedRulesNames,i=>{const a=this[i].originalGrammarAction;let o;this.TRACE_INIT(`${i} Rule`,()=>{o=this.topLevelRuleRecord(i,a)}),this.gastProductionsCache[i]=o})}finally{this.disableRecording()}});let r=[];if(this.TRACE_INIT("Grammar Resolving",()=>{r=MR({rules:J(this.gastProductionsCache)}),this.definitionErrors=this.definitionErrors.concat(r)}),this.TRACE_INIT("Grammar Validations",()=>{if(U(r)&&this.skipValidations===!1){const i=DR({rules:J(this.gastProductionsCache),tokenTypes:J(this.tokensMap),errMsgProvider:bt,grammarName:n}),s=AR({lookaheadStrategy:this.lookaheadStrategy,rules:J(this.gastProductionsCache),tokenTypes:J(this.tokensMap),grammarName:n});this.definitionErrors=this.definitionErrors.concat(i,s)}}),U(this.definitionErrors)&&(this.recoveryEnabled&&this.TRACE_INIT("computeAllProdsFollows",()=>{const i=Rv(J(this.gastProductionsCache));this.resyncFollows=i}),this.TRACE_INIT("ComputeLookaheadFunctions",()=>{var i,s;(s=(i=this.lookaheadStrategy).initialize)===null||s===void 0||s.call(i,{rules:J(this.gastProductionsCache)}),this.preComputeLookaheadFunctions(J(this.gastProductionsCache))})),!Tr.DEFER_DEFINITION_ERRORS_HANDLING&&!U(this.definitionErrors))throw e=I(this.definitionErrors,i=>i.message),new Error(`Parser Definition Errors detected: + ${e.join(` +------------------------------- +`)}`)})}constructor(e,n){this.definitionErrors=[],this.selfAnalysisDone=!1;const r=this;if(r.initErrorHandler(n),r.initLexerAdapter(),r.initLooksAhead(n),r.initRecognizerEngine(e,n),r.initRecoverable(n),r.initTreeBuilder(n),r.initContentAssist(),r.initGastRecorder(n),r.initPerformanceTracer(n),C(n,"ignoredIssues"))throw new Error(`The IParserConfig property has been deprecated. + Please use the flag on the relevant DSL method instead. + See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#IGNORING_AMBIGUITIES + For further details.`);this.skipValidations=C(n,"skipValidations")?n.skipValidations:ut.skipValidations}}Tr.DEFER_DEFINITION_ERRORS_HANDLING=!1;dA(Tr,[jR,VR,nA,rA,sA,iA,aA,oA,uA,fA]);class hA extends Tr{constructor(e,n=ut){const r=se(n);r.outputCst=!1,super(e,r)}}function sn(t,e,n){return`${t.name}_${e}_${n}`}const Tt=1,pA=2,xf=4,kf=5,vr=7,mA=8,gA=9,yA=10,TA=11,If=12;class Qa{constructor(e){this.target=e}isEpsilon(){return!1}}class eo extends Qa{constructor(e,n){super(e),this.tokenType=n}}class Cf extends Qa{constructor(e){super(e)}isEpsilon(){return!0}}class to extends Qa{constructor(e,n,r){super(e),this.rule=n,this.followState=r}isEpsilon(){return!0}}function vA(t){const e={decisionMap:{},decisionStates:[],ruleToStartState:new Map,ruleToStopState:new Map,states:[]};RA(e,t);const n=t.length;for(let r=0;rwf(t,e,a));return dn(t,e,r,n,...i)}function kA(t,e,n){const r=Q(t,e,n,{type:Tt});Et(t,r);const i=dn(t,e,r,n,Ht(t,e,n));return IA(t,e,n,i)}function Ht(t,e,n){const r=Cd(st(n.definition,i=>wf(t,e,i)),i=>i!==void 0);return r.length===1?r[0]:r.length===0?void 0:wA(t,r)}function _f(t,e,n,r,i){const s=r.left,a=r.right,o=Q(t,e,n,{type:TA});Et(t,o);const l=Q(t,e,n,{type:If});return s.loopback=o,l.loopback=o,t.decisionMap[sn(e,i?"RepetitionMandatoryWithSeparator":"RepetitionMandatory",n.idx)]=o,Y(a,o),i===void 0?(Y(o,s),Y(o,l)):(Y(o,l),Y(o,i.left),Y(i.right,s)),{left:s,right:l}}function Nf(t,e,n,r,i){const s=r.left,a=r.right,o=Q(t,e,n,{type:yA});Et(t,o);const l=Q(t,e,n,{type:If}),u=Q(t,e,n,{type:gA});return o.loopback=u,l.loopback=u,Y(o,s),Y(o,l),Y(a,u),i!==void 0?(Y(u,l),Y(u,i.left),Y(i.right,s)):Y(u,o),t.decisionMap[sn(e,i?"RepetitionWithSeparator":"Repetition",n.idx)]=o,{left:o,right:l}}function IA(t,e,n,r){const i=r.left,s=r.right;return Y(i,s),t.decisionMap[sn(e,"Option",n.idx)]=i,r}function Et(t,e){return t.decisionStates.push(e),e.decision=t.decisionStates.length-1,e.decision}function dn(t,e,n,r,...i){const s=Q(t,e,r,{type:mA,start:n});n.end=s;for(const o of i)o!==void 0?(Y(n,o.left),Y(o.right,s)):Y(n,s);const a={left:n,right:s};return t.decisionMap[sn(e,CA(r),r.idx)]=n,a}function CA(t){if(t instanceof ye)return"Alternation";if(t instanceof ie)return"Option";if(t instanceof z)return"Repetition";if(t instanceof ge)return"RepetitionWithSeparator";if(t instanceof xe)return"RepetitionMandatory";if(t instanceof ke)return"RepetitionMandatoryWithSeparator";throw new Error("Invalid production type encountered")}function wA(t,e){const n=e.length;for(let s=0;se.alt)}get key(){let e="";for(const n in this.map)e+=n+":";return e}}function bf(t,e=!0){return`${e?`a${t.alt}`:""}s${t.state.stateNumber}:${t.stack.map(n=>n.stateNumber.toString()).join("_")}`}function OA(t,e){const n={};return r=>{const i=r.toString();let s=n[i];return s!==void 0||(s={atnStartState:t,decision:e,states:{}},n[i]=s),s}}class Of{constructor(){this.predicates=[]}is(e){return e>=this.predicates.length||this.predicates[e]}set(e,n){this.predicates[e]=n}toString(){let e="";const n=this.predicates.length;for(let r=0;rconsole.log(r))}initialize(e){this.atn=vA(e.rules),this.dfas=PA(this.atn)}validateAmbiguousAlternationAlternatives(){return[]}validateEmptyOrAlternatives(){return[]}buildLookaheadForAlternation(e){const{prodOccurrence:n,rule:r,hasPredicates:i,dynamicTokensEnabled:s}=e,a=this.dfas,o=this.logging,l=sn(r,"Alternation",n),c=this.atn.decisionMap[l].decision,f=st(hl({maxLookahead:1,occurrence:n,prodType:"Alternation",rule:r}),d=>st(d,h=>h[0]));if(El(f,!1)&&!s){const d=fo(f,(h,m,g)=>(rs(m,R=>{R&&(h[R.tokenTypeIdx]=g,rs(R.categoryMatches,y=>{h[y]=g}))}),h),{});return i?function(h){var m;const g=this.LA(1),R=d[g.tokenTypeIdx];if(h!==void 0&&R!==void 0){const y=(m=h[R])===null||m===void 0?void 0:m.GATE;if(y!==void 0&&y.call(this)===!1)return}return R}:function(){const h=this.LA(1);return d[h.tokenTypeIdx]}}else return i?function(d){const h=new Of,m=d===void 0?0:d.length;for(let R=0;Rst(d,h=>h[0]));if(El(f)&&f[0][0]&&!s){const d=f[0],h=$d(d);if(h.length===1&&wd(h[0].categoryMatches)){const g=h[0].tokenTypeIdx;return function(){return this.LA(1).tokenTypeIdx===g}}else{const m=fo(h,(g,R)=>(R!==void 0&&(g[R.tokenTypeIdx]=!0,rs(R.categoryMatches,y=>{g[y]=!0})),g),{});return function(){const g=this.LA(1);return m[g.tokenTypeIdx]===!0}}}return function(){const d=vs.call(this,a,c,Al,o);return typeof d=="object"?!1:d===0}}}function El(t,e=!0){const n=new Set;for(const r of t){const i=new Set;for(const s of r){if(s===void 0){if(e)break;return!1}const a=[s.tokenTypeIdx].concat(s.categoryMatches);for(const o of a)if(n.has(o)){if(!i.has(o))return!1}else n.add(o),i.add(o)}}return!0}function PA(t){const e=t.decisionStates.length,n=Array(e);for(let r=0;rQt(i)).join(", "),n=t.production.idx===0?"":t.production.idx;let r=`Ambiguous Alternatives Detected: <${t.ambiguityIndices.join(", ")}> in <${UA(t.production)}${n}> inside <${t.topLevelRule.name}> Rule, +<${e}> may appears as a prefix path in all these alternatives. +`;return r=r+`See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#AMBIGUOUS_ALTERNATIVES +For Further details.`,r}function UA(t){if(t instanceof ce)return"SUBRULE";if(t instanceof ie)return"OPTION";if(t instanceof ye)return"OR";if(t instanceof xe)return"AT_LEAST_ONE";if(t instanceof ke)return"AT_LEAST_ONE_SEP";if(t instanceof ge)return"MANY_SEP";if(t instanceof z)return"MANY";if(t instanceof j)return"CONSUME";throw Error("non exhaustive match")}function BA(t,e,n){const r=_d(e.configs.elements,s=>s.state.transitions),i=Nd(r.filter(s=>s instanceof eo).map(s=>s.tokenType),s=>s.tokenTypeIdx);return{actualToken:n,possibleTokenTypes:i,tokenPath:t}}function jA(t,e){return t.edges[e.tokenTypeIdx]}function KA(t,e,n){const r=new ea,i=[];for(const a of t.elements){if(n.is(a.alt)===!1)continue;if(a.state.type===vr){i.push(a);continue}const o=a.state.transitions.length;for(let l=0;l0&&!qA(s))for(const a of i)s.add(a);return s}function HA(t,e){if(t instanceof eo&&af(e,t.tokenType))return t.target}function VA(t,e){let n;for(const r of t.elements)if(e.is(r.alt)===!0){if(n===void 0)n=r.alt;else if(n!==r.alt)return}return n}function Lf(t){return{configs:t,edges:{},isAcceptState:!1,prediction:-1}}function $l(t,e,n,r){return r=Pf(t,r),e.edges[n.tokenTypeIdx]=r,r}function Pf(t,e){if(e===Ti)return e;const n=e.configs.key,r=t.states[n];return r!==void 0?r:(e.configs.finalize(),t.states[n]=e,e)}function WA(t){const e=new ea,n=t.transitions.length;for(let r=0;r0){const i=[...t.stack],a={state:i.pop(),alt:t.alt,stack:i};vi(a,e)}else e.add(t);return}n.epsilonOnlyTransitions||e.add(t);const r=n.transitions.length;for(let i=0;i1)return!0;return!1}function QA(t){for(const e of Array.from(t.values()))if(Object.keys(e).length===1)return!0;return!1}var Sl;(function(t){function e(n){return typeof n=="string"}t.is=e})(Sl||(Sl={}));var ta;(function(t){function e(n){return typeof n=="string"}t.is=e})(ta||(ta={}));var xl;(function(t){t.MIN_VALUE=-2147483648,t.MAX_VALUE=2147483647;function e(n){return typeof n=="number"&&t.MIN_VALUE<=n&&n<=t.MAX_VALUE}t.is=e})(xl||(xl={}));var Ri;(function(t){t.MIN_VALUE=0,t.MAX_VALUE=2147483647;function e(n){return typeof n=="number"&&t.MIN_VALUE<=n&&n<=t.MAX_VALUE}t.is=e})(Ri||(Ri={}));var D;(function(t){function e(r,i){return r===Number.MAX_VALUE&&(r=Ri.MAX_VALUE),i===Number.MAX_VALUE&&(i=Ri.MAX_VALUE),{line:r,character:i}}t.create=e;function n(r){let i=r;return p.objectLiteral(i)&&p.uinteger(i.line)&&p.uinteger(i.character)}t.is=n})(D||(D={}));var L;(function(t){function e(r,i,s,a){if(p.uinteger(r)&&p.uinteger(i)&&p.uinteger(s)&&p.uinteger(a))return{start:D.create(r,i),end:D.create(s,a)};if(D.is(r)&&D.is(i))return{start:r,end:i};throw new Error(`Range#create called with invalid arguments[${r}, ${i}, ${s}, ${a}]`)}t.create=e;function n(r){let i=r;return p.objectLiteral(i)&&D.is(i.start)&&D.is(i.end)}t.is=n})(L||(L={}));var Ai;(function(t){function e(r,i){return{uri:r,range:i}}t.create=e;function n(r){let i=r;return p.objectLiteral(i)&&L.is(i.range)&&(p.string(i.uri)||p.undefined(i.uri))}t.is=n})(Ai||(Ai={}));var kl;(function(t){function e(r,i,s,a){return{targetUri:r,targetRange:i,targetSelectionRange:s,originSelectionRange:a}}t.create=e;function n(r){let i=r;return p.objectLiteral(i)&&L.is(i.targetRange)&&p.string(i.targetUri)&&L.is(i.targetSelectionRange)&&(L.is(i.originSelectionRange)||p.undefined(i.originSelectionRange))}t.is=n})(kl||(kl={}));var na;(function(t){function e(r,i,s,a){return{red:r,green:i,blue:s,alpha:a}}t.create=e;function n(r){const i=r;return p.objectLiteral(i)&&p.numberRange(i.red,0,1)&&p.numberRange(i.green,0,1)&&p.numberRange(i.blue,0,1)&&p.numberRange(i.alpha,0,1)}t.is=n})(na||(na={}));var Il;(function(t){function e(r,i){return{range:r,color:i}}t.create=e;function n(r){const i=r;return p.objectLiteral(i)&&L.is(i.range)&&na.is(i.color)}t.is=n})(Il||(Il={}));var Cl;(function(t){function e(r,i,s){return{label:r,textEdit:i,additionalTextEdits:s}}t.create=e;function n(r){const i=r;return p.objectLiteral(i)&&p.string(i.label)&&(p.undefined(i.textEdit)||on.is(i))&&(p.undefined(i.additionalTextEdits)||p.typedArray(i.additionalTextEdits,on.is))}t.is=n})(Cl||(Cl={}));var wl;(function(t){t.Comment="comment",t.Imports="imports",t.Region="region"})(wl||(wl={}));var _l;(function(t){function e(r,i,s,a,o,l){const u={startLine:r,endLine:i};return p.defined(s)&&(u.startCharacter=s),p.defined(a)&&(u.endCharacter=a),p.defined(o)&&(u.kind=o),p.defined(l)&&(u.collapsedText=l),u}t.create=e;function n(r){const i=r;return p.objectLiteral(i)&&p.uinteger(i.startLine)&&p.uinteger(i.startLine)&&(p.undefined(i.startCharacter)||p.uinteger(i.startCharacter))&&(p.undefined(i.endCharacter)||p.uinteger(i.endCharacter))&&(p.undefined(i.kind)||p.string(i.kind))}t.is=n})(_l||(_l={}));var ra;(function(t){function e(r,i){return{location:r,message:i}}t.create=e;function n(r){let i=r;return p.defined(i)&&Ai.is(i.location)&&p.string(i.message)}t.is=n})(ra||(ra={}));var Nl;(function(t){t.Error=1,t.Warning=2,t.Information=3,t.Hint=4})(Nl||(Nl={}));var bl;(function(t){t.Unnecessary=1,t.Deprecated=2})(bl||(bl={}));var Ol;(function(t){function e(n){const r=n;return p.objectLiteral(r)&&p.string(r.href)}t.is=e})(Ol||(Ol={}));var Ei;(function(t){function e(r,i,s,a,o,l){let u={range:r,message:i};return p.defined(s)&&(u.severity=s),p.defined(a)&&(u.code=a),p.defined(o)&&(u.source=o),p.defined(l)&&(u.relatedInformation=l),u}t.create=e;function n(r){var i;let s=r;return p.defined(s)&&L.is(s.range)&&p.string(s.message)&&(p.number(s.severity)||p.undefined(s.severity))&&(p.integer(s.code)||p.string(s.code)||p.undefined(s.code))&&(p.undefined(s.codeDescription)||p.string((i=s.codeDescription)===null||i===void 0?void 0:i.href))&&(p.string(s.source)||p.undefined(s.source))&&(p.undefined(s.relatedInformation)||p.typedArray(s.relatedInformation,ra.is))}t.is=n})(Ei||(Ei={}));var an;(function(t){function e(r,i,...s){let a={title:r,command:i};return p.defined(s)&&s.length>0&&(a.arguments=s),a}t.create=e;function n(r){let i=r;return p.defined(i)&&p.string(i.title)&&p.string(i.command)}t.is=n})(an||(an={}));var on;(function(t){function e(s,a){return{range:s,newText:a}}t.replace=e;function n(s,a){return{range:{start:s,end:s},newText:a}}t.insert=n;function r(s){return{range:s,newText:""}}t.del=r;function i(s){const a=s;return p.objectLiteral(a)&&p.string(a.newText)&&L.is(a.range)}t.is=i})(on||(on={}));var ia;(function(t){function e(r,i,s){const a={label:r};return i!==void 0&&(a.needsConfirmation=i),s!==void 0&&(a.description=s),a}t.create=e;function n(r){const i=r;return p.objectLiteral(i)&&p.string(i.label)&&(p.boolean(i.needsConfirmation)||i.needsConfirmation===void 0)&&(p.string(i.description)||i.description===void 0)}t.is=n})(ia||(ia={}));var ln;(function(t){function e(n){const r=n;return p.string(r)}t.is=e})(ln||(ln={}));var Ll;(function(t){function e(s,a,o){return{range:s,newText:a,annotationId:o}}t.replace=e;function n(s,a,o){return{range:{start:s,end:s},newText:a,annotationId:o}}t.insert=n;function r(s,a){return{range:s,newText:"",annotationId:a}}t.del=r;function i(s){const a=s;return on.is(a)&&(ia.is(a.annotationId)||ln.is(a.annotationId))}t.is=i})(Ll||(Ll={}));var sa;(function(t){function e(r,i){return{textDocument:r,edits:i}}t.create=e;function n(r){let i=r;return p.defined(i)&&ca.is(i.textDocument)&&Array.isArray(i.edits)}t.is=n})(sa||(sa={}));var aa;(function(t){function e(r,i,s){let a={kind:"create",uri:r};return i!==void 0&&(i.overwrite!==void 0||i.ignoreIfExists!==void 0)&&(a.options=i),s!==void 0&&(a.annotationId=s),a}t.create=e;function n(r){let i=r;return i&&i.kind==="create"&&p.string(i.uri)&&(i.options===void 0||(i.options.overwrite===void 0||p.boolean(i.options.overwrite))&&(i.options.ignoreIfExists===void 0||p.boolean(i.options.ignoreIfExists)))&&(i.annotationId===void 0||ln.is(i.annotationId))}t.is=n})(aa||(aa={}));var oa;(function(t){function e(r,i,s,a){let o={kind:"rename",oldUri:r,newUri:i};return s!==void 0&&(s.overwrite!==void 0||s.ignoreIfExists!==void 0)&&(o.options=s),a!==void 0&&(o.annotationId=a),o}t.create=e;function n(r){let i=r;return i&&i.kind==="rename"&&p.string(i.oldUri)&&p.string(i.newUri)&&(i.options===void 0||(i.options.overwrite===void 0||p.boolean(i.options.overwrite))&&(i.options.ignoreIfExists===void 0||p.boolean(i.options.ignoreIfExists)))&&(i.annotationId===void 0||ln.is(i.annotationId))}t.is=n})(oa||(oa={}));var la;(function(t){function e(r,i,s){let a={kind:"delete",uri:r};return i!==void 0&&(i.recursive!==void 0||i.ignoreIfNotExists!==void 0)&&(a.options=i),s!==void 0&&(a.annotationId=s),a}t.create=e;function n(r){let i=r;return i&&i.kind==="delete"&&p.string(i.uri)&&(i.options===void 0||(i.options.recursive===void 0||p.boolean(i.options.recursive))&&(i.options.ignoreIfNotExists===void 0||p.boolean(i.options.ignoreIfNotExists)))&&(i.annotationId===void 0||ln.is(i.annotationId))}t.is=n})(la||(la={}));var ua;(function(t){function e(n){let r=n;return r&&(r.changes!==void 0||r.documentChanges!==void 0)&&(r.documentChanges===void 0||r.documentChanges.every(i=>p.string(i.kind)?aa.is(i)||oa.is(i)||la.is(i):sa.is(i)))}t.is=e})(ua||(ua={}));var Pl;(function(t){function e(r){return{uri:r}}t.create=e;function n(r){let i=r;return p.defined(i)&&p.string(i.uri)}t.is=n})(Pl||(Pl={}));var Ml;(function(t){function e(r,i){return{uri:r,version:i}}t.create=e;function n(r){let i=r;return p.defined(i)&&p.string(i.uri)&&p.integer(i.version)}t.is=n})(Ml||(Ml={}));var ca;(function(t){function e(r,i){return{uri:r,version:i}}t.create=e;function n(r){let i=r;return p.defined(i)&&p.string(i.uri)&&(i.version===null||p.integer(i.version))}t.is=n})(ca||(ca={}));var Dl;(function(t){function e(r,i,s,a){return{uri:r,languageId:i,version:s,text:a}}t.create=e;function n(r){let i=r;return p.defined(i)&&p.string(i.uri)&&p.string(i.languageId)&&p.integer(i.version)&&p.string(i.text)}t.is=n})(Dl||(Dl={}));var fa;(function(t){t.PlainText="plaintext",t.Markdown="markdown";function e(n){const r=n;return r===t.PlainText||r===t.Markdown}t.is=e})(fa||(fa={}));var ar;(function(t){function e(n){const r=n;return p.objectLiteral(n)&&fa.is(r.kind)&&p.string(r.value)}t.is=e})(ar||(ar={}));var Fl;(function(t){t.Text=1,t.Method=2,t.Function=3,t.Constructor=4,t.Field=5,t.Variable=6,t.Class=7,t.Interface=8,t.Module=9,t.Property=10,t.Unit=11,t.Value=12,t.Enum=13,t.Keyword=14,t.Snippet=15,t.Color=16,t.File=17,t.Reference=18,t.Folder=19,t.EnumMember=20,t.Constant=21,t.Struct=22,t.Event=23,t.Operator=24,t.TypeParameter=25})(Fl||(Fl={}));var Gl;(function(t){t.PlainText=1,t.Snippet=2})(Gl||(Gl={}));var Ul;(function(t){t.Deprecated=1})(Ul||(Ul={}));var Bl;(function(t){function e(r,i,s){return{newText:r,insert:i,replace:s}}t.create=e;function n(r){const i=r;return i&&p.string(i.newText)&&L.is(i.insert)&&L.is(i.replace)}t.is=n})(Bl||(Bl={}));var jl;(function(t){t.asIs=1,t.adjustIndentation=2})(jl||(jl={}));var Kl;(function(t){function e(n){const r=n;return r&&(p.string(r.detail)||r.detail===void 0)&&(p.string(r.description)||r.description===void 0)}t.is=e})(Kl||(Kl={}));var Hl;(function(t){function e(n){return{label:n}}t.create=e})(Hl||(Hl={}));var Vl;(function(t){function e(n,r){return{items:n||[],isIncomplete:!!r}}t.create=e})(Vl||(Vl={}));var $i;(function(t){function e(r){return r.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}t.fromPlainText=e;function n(r){const i=r;return p.string(i)||p.objectLiteral(i)&&p.string(i.language)&&p.string(i.value)}t.is=n})($i||($i={}));var Wl;(function(t){function e(n){let r=n;return!!r&&p.objectLiteral(r)&&(ar.is(r.contents)||$i.is(r.contents)||p.typedArray(r.contents,$i.is))&&(n.range===void 0||L.is(n.range))}t.is=e})(Wl||(Wl={}));var zl;(function(t){function e(n,r){return r?{label:n,documentation:r}:{label:n}}t.create=e})(zl||(zl={}));var ql;(function(t){function e(n,r,...i){let s={label:n};return p.defined(r)&&(s.documentation=r),p.defined(i)?s.parameters=i:s.parameters=[],s}t.create=e})(ql||(ql={}));var Yl;(function(t){t.Text=1,t.Read=2,t.Write=3})(Yl||(Yl={}));var Xl;(function(t){function e(n,r){let i={range:n};return p.number(r)&&(i.kind=r),i}t.create=e})(Xl||(Xl={}));var Jl;(function(t){t.File=1,t.Module=2,t.Namespace=3,t.Package=4,t.Class=5,t.Method=6,t.Property=7,t.Field=8,t.Constructor=9,t.Enum=10,t.Interface=11,t.Function=12,t.Variable=13,t.Constant=14,t.String=15,t.Number=16,t.Boolean=17,t.Array=18,t.Object=19,t.Key=20,t.Null=21,t.EnumMember=22,t.Struct=23,t.Event=24,t.Operator=25,t.TypeParameter=26})(Jl||(Jl={}));var Zl;(function(t){t.Deprecated=1})(Zl||(Zl={}));var Ql;(function(t){function e(n,r,i,s,a){let o={name:n,kind:r,location:{uri:s,range:i}};return a&&(o.containerName=a),o}t.create=e})(Ql||(Ql={}));var eu;(function(t){function e(n,r,i,s){return s!==void 0?{name:n,kind:r,location:{uri:i,range:s}}:{name:n,kind:r,location:{uri:i}}}t.create=e})(eu||(eu={}));var tu;(function(t){function e(r,i,s,a,o,l){let u={name:r,detail:i,kind:s,range:a,selectionRange:o};return l!==void 0&&(u.children=l),u}t.create=e;function n(r){let i=r;return i&&p.string(i.name)&&p.number(i.kind)&&L.is(i.range)&&L.is(i.selectionRange)&&(i.detail===void 0||p.string(i.detail))&&(i.deprecated===void 0||p.boolean(i.deprecated))&&(i.children===void 0||Array.isArray(i.children))&&(i.tags===void 0||Array.isArray(i.tags))}t.is=n})(tu||(tu={}));var nu;(function(t){t.Empty="",t.QuickFix="quickfix",t.Refactor="refactor",t.RefactorExtract="refactor.extract",t.RefactorInline="refactor.inline",t.RefactorRewrite="refactor.rewrite",t.Source="source",t.SourceOrganizeImports="source.organizeImports",t.SourceFixAll="source.fixAll"})(nu||(nu={}));var Si;(function(t){t.Invoked=1,t.Automatic=2})(Si||(Si={}));var ru;(function(t){function e(r,i,s){let a={diagnostics:r};return i!=null&&(a.only=i),s!=null&&(a.triggerKind=s),a}t.create=e;function n(r){let i=r;return p.defined(i)&&p.typedArray(i.diagnostics,Ei.is)&&(i.only===void 0||p.typedArray(i.only,p.string))&&(i.triggerKind===void 0||i.triggerKind===Si.Invoked||i.triggerKind===Si.Automatic)}t.is=n})(ru||(ru={}));var iu;(function(t){function e(r,i,s){let a={title:r},o=!0;return typeof i=="string"?(o=!1,a.kind=i):an.is(i)?a.command=i:a.edit=i,o&&s!==void 0&&(a.kind=s),a}t.create=e;function n(r){let i=r;return i&&p.string(i.title)&&(i.diagnostics===void 0||p.typedArray(i.diagnostics,Ei.is))&&(i.kind===void 0||p.string(i.kind))&&(i.edit!==void 0||i.command!==void 0)&&(i.command===void 0||an.is(i.command))&&(i.isPreferred===void 0||p.boolean(i.isPreferred))&&(i.edit===void 0||ua.is(i.edit))}t.is=n})(iu||(iu={}));var su;(function(t){function e(r,i){let s={range:r};return p.defined(i)&&(s.data=i),s}t.create=e;function n(r){let i=r;return p.defined(i)&&L.is(i.range)&&(p.undefined(i.command)||an.is(i.command))}t.is=n})(su||(su={}));var au;(function(t){function e(r,i){return{tabSize:r,insertSpaces:i}}t.create=e;function n(r){let i=r;return p.defined(i)&&p.uinteger(i.tabSize)&&p.boolean(i.insertSpaces)}t.is=n})(au||(au={}));var ou;(function(t){function e(r,i,s){return{range:r,target:i,data:s}}t.create=e;function n(r){let i=r;return p.defined(i)&&L.is(i.range)&&(p.undefined(i.target)||p.string(i.target))}t.is=n})(ou||(ou={}));var lu;(function(t){function e(r,i){return{range:r,parent:i}}t.create=e;function n(r){let i=r;return p.objectLiteral(i)&&L.is(i.range)&&(i.parent===void 0||t.is(i.parent))}t.is=n})(lu||(lu={}));var uu;(function(t){t.namespace="namespace",t.type="type",t.class="class",t.enum="enum",t.interface="interface",t.struct="struct",t.typeParameter="typeParameter",t.parameter="parameter",t.variable="variable",t.property="property",t.enumMember="enumMember",t.event="event",t.function="function",t.method="method",t.macro="macro",t.keyword="keyword",t.modifier="modifier",t.comment="comment",t.string="string",t.number="number",t.regexp="regexp",t.operator="operator",t.decorator="decorator"})(uu||(uu={}));var cu;(function(t){t.declaration="declaration",t.definition="definition",t.readonly="readonly",t.static="static",t.deprecated="deprecated",t.abstract="abstract",t.async="async",t.modification="modification",t.documentation="documentation",t.defaultLibrary="defaultLibrary"})(cu||(cu={}));var fu;(function(t){function e(n){const r=n;return p.objectLiteral(r)&&(r.resultId===void 0||typeof r.resultId=="string")&&Array.isArray(r.data)&&(r.data.length===0||typeof r.data[0]=="number")}t.is=e})(fu||(fu={}));var du;(function(t){function e(r,i){return{range:r,text:i}}t.create=e;function n(r){const i=r;return i!=null&&L.is(i.range)&&p.string(i.text)}t.is=n})(du||(du={}));var hu;(function(t){function e(r,i,s){return{range:r,variableName:i,caseSensitiveLookup:s}}t.create=e;function n(r){const i=r;return i!=null&&L.is(i.range)&&p.boolean(i.caseSensitiveLookup)&&(p.string(i.variableName)||i.variableName===void 0)}t.is=n})(hu||(hu={}));var pu;(function(t){function e(r,i){return{range:r,expression:i}}t.create=e;function n(r){const i=r;return i!=null&&L.is(i.range)&&(p.string(i.expression)||i.expression===void 0)}t.is=n})(pu||(pu={}));var mu;(function(t){function e(r,i){return{frameId:r,stoppedLocation:i}}t.create=e;function n(r){const i=r;return p.defined(i)&&L.is(r.stoppedLocation)}t.is=n})(mu||(mu={}));var da;(function(t){t.Type=1,t.Parameter=2;function e(n){return n===1||n===2}t.is=e})(da||(da={}));var ha;(function(t){function e(r){return{value:r}}t.create=e;function n(r){const i=r;return p.objectLiteral(i)&&(i.tooltip===void 0||p.string(i.tooltip)||ar.is(i.tooltip))&&(i.location===void 0||Ai.is(i.location))&&(i.command===void 0||an.is(i.command))}t.is=n})(ha||(ha={}));var gu;(function(t){function e(r,i,s){const a={position:r,label:i};return s!==void 0&&(a.kind=s),a}t.create=e;function n(r){const i=r;return p.objectLiteral(i)&&D.is(i.position)&&(p.string(i.label)||p.typedArray(i.label,ha.is))&&(i.kind===void 0||da.is(i.kind))&&i.textEdits===void 0||p.typedArray(i.textEdits,on.is)&&(i.tooltip===void 0||p.string(i.tooltip)||ar.is(i.tooltip))&&(i.paddingLeft===void 0||p.boolean(i.paddingLeft))&&(i.paddingRight===void 0||p.boolean(i.paddingRight))}t.is=n})(gu||(gu={}));var yu;(function(t){function e(n){return{kind:"snippet",value:n}}t.createSnippet=e})(yu||(yu={}));var Tu;(function(t){function e(n,r,i,s){return{insertText:n,filterText:r,range:i,command:s}}t.create=e})(Tu||(Tu={}));var vu;(function(t){function e(n){return{items:n}}t.create=e})(vu||(vu={}));var Ru;(function(t){t.Invoked=0,t.Automatic=1})(Ru||(Ru={}));var Au;(function(t){function e(n,r){return{range:n,text:r}}t.create=e})(Au||(Au={}));var Eu;(function(t){function e(n,r){return{triggerKind:n,selectedCompletionInfo:r}}t.create=e})(Eu||(Eu={}));var $u;(function(t){function e(n){const r=n;return p.objectLiteral(r)&&ta.is(r.uri)&&p.string(r.name)}t.is=e})($u||($u={}));var Su;(function(t){function e(s,a,o,l){return new eE(s,a,o,l)}t.create=e;function n(s){let a=s;return!!(p.defined(a)&&p.string(a.uri)&&(p.undefined(a.languageId)||p.string(a.languageId))&&p.uinteger(a.lineCount)&&p.func(a.getText)&&p.func(a.positionAt)&&p.func(a.offsetAt))}t.is=n;function r(s,a){let o=s.getText(),l=i(a,(c,f)=>{let d=c.range.start.line-f.range.start.line;return d===0?c.range.start.character-f.range.start.character:d}),u=o.length;for(let c=l.length-1;c>=0;c--){let f=l[c],d=s.offsetAt(f.range.start),h=s.offsetAt(f.range.end);if(h<=u)o=o.substring(0,d)+f.newText+o.substring(h,o.length);else throw new Error("Overlapping edit");u=d}return o}t.applyEdits=r;function i(s,a){if(s.length<=1)return s;const o=s.length/2|0,l=s.slice(0,o),u=s.slice(o);i(l,a),i(u,a);let c=0,f=0,d=0;for(;c0&&e.push(n.length),this._lineOffsets=e}return this._lineOffsets}positionAt(e){e=Math.max(Math.min(e,this._content.length),0);let n=this.getLineOffsets(),r=0,i=n.length;if(i===0)return D.create(0,e);for(;re?i=a:r=a+1}let s=r-1;return D.create(s,e-n[s])}offsetAt(e){let n=this.getLineOffsets();if(e.line>=n.length)return this._content.length;if(e.line<0)return 0;let r=n[e.line],i=e.line+1"u"}t.undefined=r;function i(h){return h===!0||h===!1}t.boolean=i;function s(h){return e.call(h)==="[object String]"}t.string=s;function a(h){return e.call(h)==="[object Number]"}t.number=a;function o(h,m,g){return e.call(h)==="[object Number]"&&m<=h&&h<=g}t.numberRange=o;function l(h){return e.call(h)==="[object Number]"&&-2147483648<=h&&h<=2147483647}t.integer=l;function u(h){return e.call(h)==="[object Number]"&&0<=h&&h<=2147483647}t.uinteger=u;function c(h){return e.call(h)==="[object Function]"}t.func=c;function f(h){return h!==null&&typeof h=="object"}t.objectLiteral=f;function d(h,m){return Array.isArray(h)&&h.every(m)}t.typedArray=d})(p||(p={}));class tE{constructor(){this.nodeStack=[]}get current(){var e;return(e=this.nodeStack[this.nodeStack.length-1])!==null&&e!==void 0?e:this.rootNode}buildRootNode(e){return this.rootNode=new Df(e),this.rootNode.root=this.rootNode,this.nodeStack=[this.rootNode],this.rootNode}buildCompositeNode(e){const n=new io;return n.grammarSource=e,n.root=this.rootNode,this.current.content.push(n),this.nodeStack.push(n),n}buildLeafNode(e,n){const r=new pa(e.startOffset,e.image.length,Ds(e),e.tokenType,!n);return r.grammarSource=n,r.root=this.rootNode,this.current.content.push(r),r}removeNode(e){const n=e.container;if(n){const r=n.content.indexOf(e);r>=0&&n.content.splice(r,1)}}addHiddenNodes(e){const n=[];for(const s of e){const a=new pa(s.startOffset,s.image.length,Ds(s),s.tokenType,!0);a.root=this.rootNode,n.push(a)}let r=this.current,i=!1;if(r.content.length>0){r.content.push(...n);return}for(;r.container;){const s=r.container.content.indexOf(r);if(s>0){r.container.content.splice(s,0,...n),i=!0;break}r=r.container}i||this.rootNode.content.unshift(...n)}construct(e){const n=this.current;typeof e.$type=="string"&&(this.current.astNode=e),e.$cstNode=n;const r=this.nodeStack.pop();r?.content.length===0&&this.removeNode(r)}}class Mf{get parent(){return this.container}get feature(){return this.grammarSource}get hidden(){return!1}get astNode(){var e,n;const r=typeof((e=this._astNode)===null||e===void 0?void 0:e.$type)=="string"?this._astNode:(n=this.container)===null||n===void 0?void 0:n.astNode;if(!r)throw new Error("This node has no associated AST element");return r}set astNode(e){this._astNode=e}get element(){return this.astNode}get text(){return this.root.fullText.substring(this.offset,this.end)}}class pa extends Mf{get offset(){return this._offset}get length(){return this._length}get end(){return this._offset+this._length}get hidden(){return this._hidden}get tokenType(){return this._tokenType}get range(){return this._range}constructor(e,n,r,i,s=!1){super(),this._hidden=s,this._offset=e,this._tokenType=i,this._length=n,this._range=r}}class io extends Mf{constructor(){super(...arguments),this.content=new so(this)}get children(){return this.content}get offset(){var e,n;return(n=(e=this.firstNonHiddenNode)===null||e===void 0?void 0:e.offset)!==null&&n!==void 0?n:0}get length(){return this.end-this.offset}get end(){var e,n;return(n=(e=this.lastNonHiddenNode)===null||e===void 0?void 0:e.end)!==null&&n!==void 0?n:0}get range(){const e=this.firstNonHiddenNode,n=this.lastNonHiddenNode;if(e&&n){if(this._rangeCache===void 0){const{range:r}=e,{range:i}=n;this._rangeCache={start:r.start,end:i.end.line=0;e--){const n=this.content[e];if(!n.hidden)return n}return this.content[this.content.length-1]}}class so extends Array{constructor(e){super(),this.parent=e,Object.setPrototypeOf(this,so.prototype)}push(...e){return this.addParents(e),super.push(...e)}unshift(...e){return this.addParents(e),super.unshift(...e)}splice(e,n,...r){return this.addParents(r),super.splice(e,n,...r)}addParents(e){for(const n of e)n.container=this.parent}}class Df extends io{get text(){return this._text.substring(this.offset,this.end)}get fullText(){return this._text}constructor(e){super(),this._text="",this._text=e??""}}const ma=Symbol("Datatype");function Rs(t){return t.$type===ma}const xu="​",Ff=t=>t.endsWith(xu)?t:t+xu;class Gf{constructor(e){this._unorderedGroups=new Map,this.allRules=new Map,this.lexer=e.parser.Lexer;const n=this.lexer.definition,r=e.LanguageMetaData.mode==="production";this.wrapper=new aE(n,Object.assign(Object.assign({},e.parser.ParserConfig),{skipValidations:r,errorMessageProvider:e.parser.ParserErrorMessageProvider}))}alternatives(e,n){this.wrapper.wrapOr(e,n)}optional(e,n){this.wrapper.wrapOption(e,n)}many(e,n){this.wrapper.wrapMany(e,n)}atLeastOne(e,n){this.wrapper.wrapAtLeastOne(e,n)}getRule(e){return this.allRules.get(e)}isRecording(){return this.wrapper.IS_RECORDING}get unorderedGroups(){return this._unorderedGroups}getRuleStack(){return this.wrapper.RULE_STACK}finalize(){this.wrapper.wrapSelfAnalysis()}}class nE extends Gf{get current(){return this.stack[this.stack.length-1]}constructor(e){super(e),this.nodeBuilder=new tE,this.stack=[],this.assignmentMap=new Map,this.linker=e.references.Linker,this.converter=e.parser.ValueConverter,this.astReflection=e.shared.AstReflection}rule(e,n){const r=this.computeRuleType(e),i=this.wrapper.DEFINE_RULE(Ff(e.name),this.startImplementation(r,n).bind(this));return this.allRules.set(e.name,i),e.entry&&(this.mainRule=i),i}computeRuleType(e){if(!e.fragment){if(hc(e))return ma;{const n=ka(e);return n??e.name}}}parse(e,n={}){this.nodeBuilder.buildRootNode(e);const r=this.lexerResult=this.lexer.tokenize(e);this.wrapper.input=r.tokens;const i=n.rule?this.allRules.get(n.rule):this.mainRule;if(!i)throw new Error(n.rule?`No rule found with name '${n.rule}'`:"No main rule available.");const s=i.call(this.wrapper,{});return this.nodeBuilder.addHiddenNodes(r.hidden),this.unorderedGroups.clear(),this.lexerResult=void 0,{value:s,lexerErrors:r.errors,lexerReport:r.report,parserErrors:this.wrapper.errors}}startImplementation(e,n){return r=>{const i=!this.isRecording()&&e!==void 0;if(i){const a={$type:e};this.stack.push(a),e===ma&&(a.value="")}let s;try{s=n(r)}catch{s=void 0}return s===void 0&&i&&(s=this.construct()),s}}extractHiddenTokens(e){const n=this.lexerResult.hidden;if(!n.length)return[];const r=e.startOffset;for(let i=0;ir)return n.splice(0,i);return n.splice(0,n.length)}consume(e,n,r){const i=this.wrapper.wrapConsume(e,n);if(!this.isRecording()&&this.isValidToken(i)){const s=this.extractHiddenTokens(i);this.nodeBuilder.addHiddenNodes(s);const a=this.nodeBuilder.buildLeafNode(i,r),{assignment:o,isCrossRef:l}=this.getAssignment(r),u=this.current;if(o){const c=Lt(r)?i.image:this.converter.convert(i.image,a);this.assign(o.operator,o.feature,c,a,l)}else if(Rs(u)){let c=i.image;Lt(r)||(c=this.converter.convert(c,a).toString()),u.value+=c}}}isValidToken(e){return!e.isInsertedInRecovery&&!isNaN(e.startOffset)&&typeof e.endOffset=="number"&&!isNaN(e.endOffset)}subrule(e,n,r,i,s){let a;!this.isRecording()&&!r&&(a=this.nodeBuilder.buildCompositeNode(i));const o=this.wrapper.wrapSubrule(e,n,s);!this.isRecording()&&a&&a.length>0&&this.performSubruleAssignment(o,i,a)}performSubruleAssignment(e,n,r){const{assignment:i,isCrossRef:s}=this.getAssignment(n);if(i)this.assign(i.operator,i.feature,e,r,s);else if(!i){const a=this.current;if(Rs(a))a.value+=e.toString();else if(typeof e=="object"&&e){const l=this.assignWithoutOverride(e,a);this.stack.pop(),this.stack.push(l)}}}action(e,n){if(!this.isRecording()){let r=this.current;if(n.feature&&n.operator){r=this.construct(),this.nodeBuilder.removeNode(r.$cstNode),this.nodeBuilder.buildCompositeNode(n).content.push(r.$cstNode);const s={$type:e};this.stack.push(s),this.assign(n.operator,n.feature,r,r.$cstNode,!1)}else r.$type=e}}construct(){if(this.isRecording())return;const e=this.current;return ih(e),this.nodeBuilder.construct(e),this.stack.pop(),Rs(e)?this.converter.convert(e.value,e.$cstNode):(sh(this.astReflection,e),e)}getAssignment(e){if(!this.assignmentMap.has(e)){const n=Ni(e,Ot);this.assignmentMap.set(e,{assignment:n,isCrossRef:n?Ea(n.terminal):!1})}return this.assignmentMap.get(e)}assign(e,n,r,i,s){const a=this.current;let o;switch(s&&typeof r=="string"?o=this.linker.buildReference(a,n,i,r):o=r,e){case"=":{a[n]=o;break}case"?=":{a[n]=!0;break}case"+=":Array.isArray(a[n])||(a[n]=[]),a[n].push(o)}}assignWithoutOverride(e,n){for(const[i,s]of Object.entries(n)){const a=e[i];a===void 0?e[i]=s:Array.isArray(a)&&Array.isArray(s)&&(s.push(...a),e[i]=s)}const r=e.$cstNode;return r&&(r.astNode=void 0,e.$cstNode=void 0),e}get definitionErrors(){return this.wrapper.definitionErrors}}class rE{buildMismatchTokenMessage(e){return Xt.buildMismatchTokenMessage(e)}buildNotAllInputParsedMessage(e){return Xt.buildNotAllInputParsedMessage(e)}buildNoViableAltMessage(e){return Xt.buildNoViableAltMessage(e)}buildEarlyExitMessage(e){return Xt.buildEarlyExitMessage(e)}}class Uf extends rE{buildMismatchTokenMessage({expected:e,actual:n}){return`Expecting ${e.LABEL?"`"+e.LABEL+"`":e.name.endsWith(":KW")?`keyword '${e.name.substring(0,e.name.length-3)}'`:`token of type '${e.name}'`} but found \`${n.image}\`.`}buildNotAllInputParsedMessage({firstRedundant:e}){return`Expecting end of file but found \`${e.image}\`.`}}class iE extends Gf{constructor(){super(...arguments),this.tokens=[],this.elementStack=[],this.lastElementStack=[],this.nextTokenIndex=0,this.stackSize=0}action(){}construct(){}parse(e){this.resetState();const n=this.lexer.tokenize(e,{mode:"partial"});return this.tokens=n.tokens,this.wrapper.input=[...this.tokens],this.mainRule.call(this.wrapper,{}),this.unorderedGroups.clear(),{tokens:this.tokens,elementStack:[...this.lastElementStack],tokenIndex:this.nextTokenIndex}}rule(e,n){const r=this.wrapper.DEFINE_RULE(Ff(e.name),this.startImplementation(n).bind(this));return this.allRules.set(e.name,r),e.entry&&(this.mainRule=r),r}resetState(){this.elementStack=[],this.lastElementStack=[],this.nextTokenIndex=0,this.stackSize=0}startImplementation(e){return n=>{const r=this.keepStackSize();try{e(n)}finally{this.resetStackSize(r)}}}removeUnexpectedElements(){this.elementStack.splice(this.stackSize)}keepStackSize(){const e=this.elementStack.length;return this.stackSize=e,e}resetStackSize(e){this.removeUnexpectedElements(),this.stackSize=e}consume(e,n,r){this.wrapper.wrapConsume(e,n),this.isRecording()||(this.lastElementStack=[...this.elementStack,r],this.nextTokenIndex=this.currIdx+1)}subrule(e,n,r,i,s){this.before(i),this.wrapper.wrapSubrule(e,n,s),this.after(i)}before(e){this.isRecording()||this.elementStack.push(e)}after(e){if(!this.isRecording()){const n=this.elementStack.lastIndexOf(e);n>=0&&this.elementStack.splice(n)}}get currIdx(){return this.wrapper.currIdx}}const sE={recoveryEnabled:!0,nodeLocationTracking:"full",skipValidations:!0,errorMessageProvider:new Uf};class aE extends hA{constructor(e,n){const r=n&&"maxLookahead"in n;super(e,Object.assign(Object.assign(Object.assign({},sE),{lookaheadStrategy:r?new Za({maxLookahead:n.maxLookahead}):new LA({logging:n.skipValidations?()=>{}:void 0})}),n))}get IS_RECORDING(){return this.RECORDING_PHASE}DEFINE_RULE(e,n){return this.RULE(e,n)}wrapSelfAnalysis(){this.performSelfAnalysis()}wrapConsume(e,n){return this.consume(e,n)}wrapSubrule(e,n,r){return this.subrule(e,n,{ARGS:[r]})}wrapOr(e,n){this.or(e,n)}wrapOption(e,n){this.option(e,n)}wrapMany(e,n){this.many(e,n)}wrapAtLeastOne(e,n){this.atLeastOne(e,n)}}function Bf(t,e,n){return oE({parser:e,tokens:n,ruleNames:new Map},t),e}function oE(t,e){const n=lc(e,!1),r=re(e.rules).filter(Ne).filter(i=>n.has(i));for(const i of r){const s=Object.assign(Object.assign({},t),{consume:1,optional:1,subrule:1,many:1,or:1});t.parser.rule(i,Ft(s,i.definition))}}function Ft(t,e,n=!1){let r;if(Lt(e))r=pE(t,e);else if(_i(e))r=lE(t,e);else if(Ot(e))r=Ft(t,e.terminal);else if(Ea(e))r=jf(t,e);else if(Pt(e))r=uE(t,e);else if(nc(e))r=fE(t,e);else if(rc(e))r=dE(t,e);else if($a(e))r=hE(t,e);else if(Xd(e)){const i=t.consume++;r=()=>t.parser.consume(i,yt,e)}else throw new Zu(e.$cstNode,`Unexpected element type: ${e.$type}`);return Kf(t,n?void 0:xi(e),r,e.cardinality)}function lE(t,e){const n=Ia(e);return()=>t.parser.action(n,e)}function uE(t,e){const n=e.rule.ref;if(Ne(n)){const r=t.subrule++,i=n.fragment,s=e.arguments.length>0?cE(n,e.arguments):()=>({});return a=>t.parser.subrule(r,Hf(t,n),i,e,s(a))}else if(Ut(n)){const r=t.consume++,i=ga(t,n.name);return()=>t.parser.consume(r,i,e)}else if(n)lr();else throw new Zu(e.$cstNode,`Undefined rule: ${e.rule.$refText}`)}function cE(t,e){const n=e.map(r=>it(r.value));return r=>{const i={};for(let s=0;se(r)||n(r)}else if(Kd(t)){const e=it(t.left),n=it(t.right);return r=>e(r)&&n(r)}else if(Vd(t)){const e=it(t.value);return n=>!e(n)}else if(Wd(t)){const e=t.parameter.ref.name;return n=>n!==void 0&&n[e]===!0}else if(jd(t)){const e=!!t.true;return()=>e}lr()}function fE(t,e){if(e.elements.length===1)return Ft(t,e.elements[0]);{const n=[];for(const i of e.elements){const s={ALT:Ft(t,i,!0)},a=xi(i);a&&(s.GATE=it(a)),n.push(s)}const r=t.or++;return i=>t.parser.alternatives(r,n.map(s=>{const a={ALT:()=>s.ALT(i)},o=s.GATE;return o&&(a.GATE=()=>o(i)),a}))}}function dE(t,e){if(e.elements.length===1)return Ft(t,e.elements[0]);const n=[];for(const o of e.elements){const l={ALT:Ft(t,o,!0)},u=xi(o);u&&(l.GATE=it(u)),n.push(l)}const r=t.or++,i=(o,l)=>{const u=l.getRuleStack().join("-");return`uGroup_${o}_${u}`},s=o=>t.parser.alternatives(r,n.map((l,u)=>{const c={ALT:()=>!0},f=t.parser;c.ALT=()=>{if(l.ALT(o),!f.isRecording()){const h=i(r,f);f.unorderedGroups.get(h)||f.unorderedGroups.set(h,[]);const m=f.unorderedGroups.get(h);typeof m?.[u]>"u"&&(m[u]=!0)}};const d=l.GATE;return d?c.GATE=()=>d(o):c.GATE=()=>{const h=f.unorderedGroups.get(i(r,f));return!h?.[u]},c})),a=Kf(t,xi(e),s,"*");return o=>{a(o),t.parser.isRecording()||t.parser.unorderedGroups.delete(i(r,t.parser))}}function hE(t,e){const n=e.elements.map(r=>Ft(t,r));return r=>n.forEach(i=>i(r))}function xi(t){if($a(t))return t.guardCondition}function jf(t,e,n=e.terminal){if(n)if(Pt(n)&&Ne(n.rule.ref)){const r=n.rule.ref,i=t.subrule++;return s=>t.parser.subrule(i,Hf(t,r),!1,e,s)}else if(Pt(n)&&Ut(n.rule.ref)){const r=t.consume++,i=ga(t,n.rule.ref.name);return()=>t.parser.consume(r,i,e)}else if(Lt(n)){const r=t.consume++,i=ga(t,n.value);return()=>t.parser.consume(r,i,e)}else throw new Error("Could not build cross reference parser");else{if(!e.type.ref)throw new Error("Could not resolve reference to type: "+e.type.$refText);const r=fc(e.type.ref),i=r?.terminal;if(!i)throw new Error("Could not find name assignment for type: "+Ia(e.type.ref));return jf(t,e,i)}}function pE(t,e){const n=t.consume++,r=t.tokens[e.value];if(!r)throw new Error("Could not find token for keyword: "+e.value);return()=>t.parser.consume(n,r,e)}function Kf(t,e,n,r){const i=e&&it(e);if(!r)if(i){const s=t.or++;return a=>t.parser.alternatives(s,[{ALT:()=>n(a),GATE:()=>i(a)},{ALT:Rl(),GATE:()=>!i(a)}])}else return n;if(r==="*"){const s=t.many++;return a=>t.parser.many(s,{DEF:()=>n(a),GATE:i?()=>i(a):void 0})}else if(r==="+"){const s=t.many++;if(i){const a=t.or++;return o=>t.parser.alternatives(a,[{ALT:()=>t.parser.atLeastOne(s,{DEF:()=>n(o)}),GATE:()=>i(o)},{ALT:Rl(),GATE:()=>!i(o)}])}else return a=>t.parser.atLeastOne(s,{DEF:()=>n(a)})}else if(r==="?"){const s=t.optional++;return a=>t.parser.optional(s,{DEF:()=>n(a),GATE:i?()=>i(a):void 0})}else lr()}function Hf(t,e){const n=mE(t,e),r=t.parser.getRule(n);if(!r)throw new Error(`Rule "${n}" not found."`);return r}function mE(t,e){if(Ne(e))return e.name;if(t.ruleNames.has(e))return t.ruleNames.get(e);{let n=e,r=n.$container,i=e.$type;for(;!Ne(r);)($a(r)||nc(r)||rc(r))&&(i=r.elements.indexOf(n).toString()+":"+i),n=r,r=r.$container;return i=r.name+":"+i,t.ruleNames.set(e,i),i}}function ga(t,e){const n=t.tokens[e];if(!n)throw new Error(`Token "${e}" not found."`);return n}function gE(t){const e=t.Grammar,n=t.parser.Lexer,r=new iE(t);return Bf(e,r,n.definition),r.finalize(),r}function yE(t){const e=TE(t);return e.finalize(),e}function TE(t){const e=t.Grammar,n=t.parser.Lexer,r=new nE(t);return Bf(e,r,n.definition)}class Vf{constructor(){this.diagnostics=[]}buildTokens(e,n){const r=re(lc(e,!1)),i=this.buildTerminalTokens(r),s=this.buildKeywordTokens(r,i,n);return i.forEach(a=>{const o=a.PATTERN;typeof o=="object"&&o&&"test"in o&&Gs(o)?s.unshift(a):s.push(a)}),s}flushLexingReport(e){return{diagnostics:this.popDiagnostics()}}popDiagnostics(){const e=[...this.diagnostics];return this.diagnostics=[],e}buildTerminalTokens(e){return e.filter(Ut).filter(n=>!n.fragment).map(n=>this.buildTerminalToken(n)).toArray()}buildTerminalToken(e){const n=Ca(e),r=this.requiresCustomPattern(n)?this.regexPatternFunction(n):n,i={name:e.name,PATTERN:r};return typeof r=="function"&&(i.LINE_BREAKS=!0),e.hidden&&(i.GROUP=Gs(n)?he.SKIPPED:"hidden"),i}requiresCustomPattern(e){return e.flags.includes("u")||e.flags.includes("s")?!0:!!(e.source.includes("?<=")||e.source.includes("?(n.lastIndex=i,n.exec(r))}buildKeywordTokens(e,n,r){return e.filter(Ne).flatMap(i=>ur(i).filter(Lt)).distinct(i=>i.value).toArray().sort((i,s)=>s.value.length-i.value.length).map(i=>this.buildKeywordToken(i,n,!!r?.caseInsensitive))}buildKeywordToken(e,n,r){const i=this.buildKeywordPattern(e,r),s={name:e.value,PATTERN:i,LONGER_ALT:this.findLongerAlt(e,n)};return typeof i=="function"&&(s.LINE_BREAKS=!0),s}buildKeywordPattern(e,n){return n?new RegExp(ph(e.value)):e.value}findLongerAlt(e,n){return n.reduce((r,i)=>{const s=i?.PATTERN;return s?.source&&mh("^"+s.source+"$",e.value)&&r.push(i),r},[])}}class Wf{convert(e,n){let r=n.grammarSource;if(Ea(r)&&(r=vh(r)),Pt(r)){const i=r.rule.ref;if(!i)throw new Error("This cst node was not parsed by a rule.");return this.runConverter(i,e,n)}return e}runConverter(e,n,r){var i;switch(e.name.toUpperCase()){case"INT":return tt.convertInt(n);case"STRING":return tt.convertString(n);case"ID":return tt.convertID(n)}switch((i=kh(e))===null||i===void 0?void 0:i.toLowerCase()){case"number":return tt.convertNumber(n);case"boolean":return tt.convertBoolean(n);case"bigint":return tt.convertBigint(n);case"date":return tt.convertDate(n);default:return n}}}var tt;(function(t){function e(u){let c="";for(let f=1;fe(l))}return ee.stringArray=a,ee}var Nt={},Cu;function qf(){if(Cu)return Nt;Cu=1,Object.defineProperty(Nt,"__esModule",{value:!0}),Nt.Emitter=Nt.Event=void 0;const t=zf();var e;(function(i){const s={dispose(){}};i.None=function(){return s}})(e||(Nt.Event=e={}));class n{add(s,a=null,o){this._callbacks||(this._callbacks=[],this._contexts=[]),this._callbacks.push(s),this._contexts.push(a),Array.isArray(o)&&o.push({dispose:()=>this.remove(s,a)})}remove(s,a=null){if(!this._callbacks)return;let o=!1;for(let l=0,u=this._callbacks.length;l{this._callbacks||(this._callbacks=new n),this._options&&this._options.onFirstListenerAdd&&this._callbacks.isEmpty()&&this._options.onFirstListenerAdd(this),this._callbacks.add(s,a);const l={dispose:()=>{this._callbacks&&(this._callbacks.remove(s,a),l.dispose=r._noop,this._options&&this._options.onLastListenerRemove&&this._callbacks.isEmpty()&&this._options.onLastListenerRemove(this))}};return Array.isArray(o)&&o.push(l),l}),this._event}fire(s){this._callbacks&&this._callbacks.invoke.call(this._callbacks,s)}dispose(){this._callbacks&&(this._callbacks.dispose(),this._callbacks=void 0)}}return Nt.Emitter=r,r._noop=function(){},Nt}var wu;function RE(){if(wu)return _t;wu=1,Object.defineProperty(_t,"__esModule",{value:!0}),_t.CancellationTokenSource=_t.CancellationToken=void 0;const t=zf(),e=vE(),n=qf();var r;(function(o){o.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:n.Event.None}),o.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:n.Event.None});function l(u){const c=u;return c&&(c===o.None||c===o.Cancelled||e.boolean(c.isCancellationRequested)&&!!c.onCancellationRequested)}o.is=l})(r||(_t.CancellationToken=r={}));const i=Object.freeze(function(o,l){const u=(0,t.default)().timer.setTimeout(o.bind(l),0);return{dispose(){u.dispose()}}});class s{constructor(){this._isCancelled=!1}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?i:(this._emitter||(this._emitter=new n.Emitter),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=void 0)}}class a{get token(){return this._token||(this._token=new s),this._token}cancel(){this._token?this._token.cancel():this._token=r.Cancelled}dispose(){this._token?this._token instanceof s&&this._token.dispose():this._token=r.None}}return _t.CancellationTokenSource=a,_t}var V=RE();function AE(){return new Promise(t=>{typeof setImmediate>"u"?setTimeout(t,0):setImmediate(t)})}let Jr=0,EE=10;function $E(){return Jr=performance.now(),new V.CancellationTokenSource}const ki=Symbol("OperationCancelled");function Qi(t){return t===ki}async function Ee(t){if(t===V.CancellationToken.None)return;const e=performance.now();if(e-Jr>=EE&&(Jr=e,await AE(),Jr=performance.now()),t.isCancellationRequested)throw ki}class ao{constructor(){this.promise=new Promise((e,n)=>{this.resolve=r=>(e(r),this),this.reject=r=>(n(r),this)})}}class or{constructor(e,n,r,i){this._uri=e,this._languageId=n,this._version=r,this._content=i,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(e){if(e){const n=this.offsetAt(e.start),r=this.offsetAt(e.end);return this._content.substring(n,r)}return this._content}update(e,n){for(const r of e)if(or.isIncremental(r)){const i=Xf(r.range),s=this.offsetAt(i.start),a=this.offsetAt(i.end);this._content=this._content.substring(0,s)+r.text+this._content.substring(a,this._content.length);const o=Math.max(i.start.line,0),l=Math.max(i.end.line,0);let u=this._lineOffsets;const c=_u(r.text,!1,s);if(l-o===c.length)for(let d=0,h=c.length;de?i=a:r=a+1}const s=r-1;return e=this.ensureBeforeEOL(e,n[s]),{line:s,character:e-n[s]}}offsetAt(e){const n=this.getLineOffsets();if(e.line>=n.length)return this._content.length;if(e.line<0)return 0;const r=n[e.line];if(e.character<=0)return r;const i=e.line+1n&&Yf(this._content.charCodeAt(e-1));)e--;return e}get lineCount(){return this.getLineOffsets().length}static isIncremental(e){const n=e;return n!=null&&typeof n.text=="string"&&n.range!==void 0&&(n.rangeLength===void 0||typeof n.rangeLength=="number")}static isFull(e){const n=e;return n!=null&&typeof n.text=="string"&&n.range===void 0&&n.rangeLength===void 0}}var ya;(function(t){function e(i,s,a,o){return new or(i,s,a,o)}t.create=e;function n(i,s,a){if(i instanceof or)return i.update(s,a),i;throw new Error("TextDocument.update: document must be created by TextDocument.create")}t.update=n;function r(i,s){const a=i.getText(),o=Ta(s.map(SE),(c,f)=>{const d=c.range.start.line-f.range.start.line;return d===0?c.range.start.character-f.range.start.character:d});let l=0;const u=[];for(const c of o){const f=i.offsetAt(c.range.start);if(fl&&u.push(a.substring(l,f)),c.newText.length&&u.push(c.newText),l=i.offsetAt(c.range.end)}return u.push(a.substr(l)),u.join("")}t.applyEdits=r})(ya||(ya={}));function Ta(t,e){if(t.length<=1)return t;const n=t.length/2|0,r=t.slice(0,n),i=t.slice(n);Ta(r,e),Ta(i,e);let s=0,a=0,o=0;for(;sn.line||e.line===n.line&&e.character>n.character?{start:n,end:e}:t}function SE(t){const e=Xf(t.range);return e!==t.range?{newText:t.newText,range:e}:t}var Jf;(()=>{var t={470:i=>{function s(l){if(typeof l!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(l))}function a(l,u){for(var c,f="",d=0,h=-1,m=0,g=0;g<=l.length;++g){if(g2){var R=f.lastIndexOf("/");if(R!==f.length-1){R===-1?(f="",d=0):d=(f=f.slice(0,R)).length-1-f.lastIndexOf("/"),h=g,m=0;continue}}else if(f.length===2||f.length===1){f="",d=0,h=g,m=0;continue}}u&&(f.length>0?f+="/..":f="..",d=2)}else f.length>0?f+="/"+l.slice(h+1,g):f=l.slice(h+1,g),d=g-h-1;h=g,m=0}else c===46&&m!==-1?++m:m=-1}return f}var o={resolve:function(){for(var l,u="",c=!1,f=arguments.length-1;f>=-1&&!c;f--){var d;f>=0?d=arguments[f]:(l===void 0&&(l=process.cwd()),d=l),s(d),d.length!==0&&(u=d+"/"+u,c=d.charCodeAt(0)===47)}return u=a(u,!c),c?u.length>0?"/"+u:"/":u.length>0?u:"."},normalize:function(l){if(s(l),l.length===0)return".";var u=l.charCodeAt(0)===47,c=l.charCodeAt(l.length-1)===47;return(l=a(l,!u)).length!==0||u||(l="."),l.length>0&&c&&(l+="/"),u?"/"+l:l},isAbsolute:function(l){return s(l),l.length>0&&l.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var l,u=0;u0&&(l===void 0?l=c:l+="/"+c)}return l===void 0?".":o.normalize(l)},relative:function(l,u){if(s(l),s(u),l===u||(l=o.resolve(l))===(u=o.resolve(u)))return"";for(var c=1;cg){if(u.charCodeAt(h+y)===47)return u.slice(h+y+1);if(y===0)return u.slice(h+y)}else d>g&&(l.charCodeAt(c+y)===47?R=y:y===0&&(R=0));break}var E=l.charCodeAt(c+y);if(E!==u.charCodeAt(h+y))break;E===47&&(R=y)}var v="";for(y=c+R+1;y<=f;++y)y!==f&&l.charCodeAt(y)!==47||(v.length===0?v+="..":v+="/..");return v.length>0?v+u.slice(h+R):(h+=R,u.charCodeAt(h)===47&&++h,u.slice(h))},_makeLong:function(l){return l},dirname:function(l){if(s(l),l.length===0)return".";for(var u=l.charCodeAt(0),c=u===47,f=-1,d=!0,h=l.length-1;h>=1;--h)if((u=l.charCodeAt(h))===47){if(!d){f=h;break}}else d=!1;return f===-1?c?"/":".":c&&f===1?"//":l.slice(0,f)},basename:function(l,u){if(u!==void 0&&typeof u!="string")throw new TypeError('"ext" argument must be a string');s(l);var c,f=0,d=-1,h=!0;if(u!==void 0&&u.length>0&&u.length<=l.length){if(u.length===l.length&&u===l)return"";var m=u.length-1,g=-1;for(c=l.length-1;c>=0;--c){var R=l.charCodeAt(c);if(R===47){if(!h){f=c+1;break}}else g===-1&&(h=!1,g=c+1),m>=0&&(R===u.charCodeAt(m)?--m==-1&&(d=c):(m=-1,d=g))}return f===d?d=g:d===-1&&(d=l.length),l.slice(f,d)}for(c=l.length-1;c>=0;--c)if(l.charCodeAt(c)===47){if(!h){f=c+1;break}}else d===-1&&(h=!1,d=c+1);return d===-1?"":l.slice(f,d)},extname:function(l){s(l);for(var u=-1,c=0,f=-1,d=!0,h=0,m=l.length-1;m>=0;--m){var g=l.charCodeAt(m);if(g!==47)f===-1&&(d=!1,f=m+1),g===46?u===-1?u=m:h!==1&&(h=1):u!==-1&&(h=-1);else if(!d){c=m+1;break}}return u===-1||f===-1||h===0||h===1&&u===f-1&&u===c+1?"":l.slice(u,f)},format:function(l){if(l===null||typeof l!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof l);return(function(u,c){var f=c.dir||c.root,d=c.base||(c.name||"")+(c.ext||"");return f?f===c.root?f+d:f+"/"+d:d})(0,l)},parse:function(l){s(l);var u={root:"",dir:"",base:"",ext:"",name:""};if(l.length===0)return u;var c,f=l.charCodeAt(0),d=f===47;d?(u.root="/",c=1):c=0;for(var h=-1,m=0,g=-1,R=!0,y=l.length-1,E=0;y>=c;--y)if((f=l.charCodeAt(y))!==47)g===-1&&(R=!1,g=y+1),f===46?h===-1?h=y:E!==1&&(E=1):h!==-1&&(E=-1);else if(!R){m=y+1;break}return h===-1||g===-1||E===0||E===1&&h===g-1&&h===m+1?g!==-1&&(u.base=u.name=m===0&&d?l.slice(1,g):l.slice(m,g)):(m===0&&d?(u.name=l.slice(1,h),u.base=l.slice(1,g)):(u.name=l.slice(m,h),u.base=l.slice(m,g)),u.ext=l.slice(h,g)),m>0?u.dir=l.slice(0,m-1):d&&(u.dir="/"),u},sep:"/",delimiter:":",win32:null,posix:null};o.posix=o,i.exports=o}},e={};function n(i){var s=e[i];if(s!==void 0)return s.exports;var a=e[i]={exports:{}};return t[i](a,a.exports,n),a.exports}n.d=(i,s)=>{for(var a in s)n.o(s,a)&&!n.o(i,a)&&Object.defineProperty(i,a,{enumerable:!0,get:s[a]})},n.o=(i,s)=>Object.prototype.hasOwnProperty.call(i,s),n.r=i=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(i,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(i,"__esModule",{value:!0})};var r={};(()=>{let i;n.r(r),n.d(r,{URI:()=>d,Utils:()=>Ie}),typeof process=="object"?i=process.platform==="win32":typeof navigator=="object"&&(i=navigator.userAgent.indexOf("Windows")>=0);const s=/^\w[\w\d+.-]*$/,a=/^\//,o=/^\/\//;function l($,T){if(!$.scheme&&T)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${$.authority}", path: "${$.path}", query: "${$.query}", fragment: "${$.fragment}"}`);if($.scheme&&!s.test($.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if($.path){if($.authority){if(!a.test($.path))throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character')}else if(o.test($.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}}const u="",c="/",f=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class d{static isUri(T){return T instanceof d||!!T&&typeof T.authority=="string"&&typeof T.fragment=="string"&&typeof T.path=="string"&&typeof T.query=="string"&&typeof T.scheme=="string"&&typeof T.fsPath=="string"&&typeof T.with=="function"&&typeof T.toString=="function"}scheme;authority;path;query;fragment;constructor(T,k,S,O,b,N=!1){typeof T=="object"?(this.scheme=T.scheme||u,this.authority=T.authority||u,this.path=T.path||u,this.query=T.query||u,this.fragment=T.fragment||u):(this.scheme=(function(ve,Z){return ve||Z?ve:"file"})(T,N),this.authority=k||u,this.path=(function(ve,Z){switch(ve){case"https":case"http":case"file":Z?Z[0]!==c&&(Z=c+Z):Z=c}return Z})(this.scheme,S||u),this.query=O||u,this.fragment=b||u,l(this,N))}get fsPath(){return E(this)}with(T){if(!T)return this;let{scheme:k,authority:S,path:O,query:b,fragment:N}=T;return k===void 0?k=this.scheme:k===null&&(k=u),S===void 0?S=this.authority:S===null&&(S=u),O===void 0?O=this.path:O===null&&(O=u),b===void 0?b=this.query:b===null&&(b=u),N===void 0?N=this.fragment:N===null&&(N=u),k===this.scheme&&S===this.authority&&O===this.path&&b===this.query&&N===this.fragment?this:new m(k,S,O,b,N)}static parse(T,k=!1){const S=f.exec(T);return S?new m(S[2]||u,ae(S[4]||u),ae(S[5]||u),ae(S[7]||u),ae(S[9]||u),k):new m(u,u,u,u,u)}static file(T){let k=u;if(i&&(T=T.replace(/\\/g,c)),T[0]===c&&T[1]===c){const S=T.indexOf(c,2);S===-1?(k=T.substring(2),T=c):(k=T.substring(2,S),T=T.substring(S)||c)}return new m("file",k,T,u,u)}static from(T){const k=new m(T.scheme,T.authority,T.path,T.query,T.fragment);return l(k,!0),k}toString(T=!1){return v(this,T)}toJSON(){return this}static revive(T){if(T){if(T instanceof d)return T;{const k=new m(T);return k._formatted=T.external,k._fsPath=T._sep===h?T.fsPath:null,k}}return T}}const h=i?1:void 0;class m extends d{_formatted=null;_fsPath=null;get fsPath(){return this._fsPath||(this._fsPath=E(this)),this._fsPath}toString(T=!1){return T?v(this,!0):(this._formatted||(this._formatted=v(this,!1)),this._formatted)}toJSON(){const T={$mid:1};return this._fsPath&&(T.fsPath=this._fsPath,T._sep=h),this._formatted&&(T.external=this._formatted),this.path&&(T.path=this.path),this.scheme&&(T.scheme=this.scheme),this.authority&&(T.authority=this.authority),this.query&&(T.query=this.query),this.fragment&&(T.fragment=this.fragment),T}}const g={58:"%3A",47:"%2F",63:"%3F",35:"%23",91:"%5B",93:"%5D",64:"%40",33:"%21",36:"%24",38:"%26",39:"%27",40:"%28",41:"%29",42:"%2A",43:"%2B",44:"%2C",59:"%3B",61:"%3D",32:"%20"};function R($,T,k){let S,O=-1;for(let b=0;b<$.length;b++){const N=$.charCodeAt(b);if(N>=97&&N<=122||N>=65&&N<=90||N>=48&&N<=57||N===45||N===46||N===95||N===126||T&&N===47||k&&N===91||k&&N===93||k&&N===58)O!==-1&&(S+=encodeURIComponent($.substring(O,b)),O=-1),S!==void 0&&(S+=$.charAt(b));else{S===void 0&&(S=$.substr(0,b));const ve=g[N];ve!==void 0?(O!==-1&&(S+=encodeURIComponent($.substring(O,b)),O=-1),S+=ve):O===-1&&(O=b)}}return O!==-1&&(S+=encodeURIComponent($.substring(O))),S!==void 0?S:$}function y($){let T;for(let k=0;k<$.length;k++){const S=$.charCodeAt(k);S===35||S===63?(T===void 0&&(T=$.substr(0,k)),T+=g[S]):T!==void 0&&(T+=$[k])}return T!==void 0?T:$}function E($,T){let k;return k=$.authority&&$.path.length>1&&$.scheme==="file"?`//${$.authority}${$.path}`:$.path.charCodeAt(0)===47&&($.path.charCodeAt(1)>=65&&$.path.charCodeAt(1)<=90||$.path.charCodeAt(1)>=97&&$.path.charCodeAt(1)<=122)&&$.path.charCodeAt(2)===58?$.path[1].toLowerCase()+$.path.substr(2):$.path,i&&(k=k.replace(/\//g,"\\")),k}function v($,T){const k=T?y:R;let S="",{scheme:O,authority:b,path:N,query:ve,fragment:Z}=$;if(O&&(S+=O,S+=":"),(b||O==="file")&&(S+=c,S+=c),b){let W=b.indexOf("@");if(W!==-1){const It=b.substr(0,W);b=b.substr(W+1),W=It.lastIndexOf(":"),W===-1?S+=k(It,!1,!1):(S+=k(It.substr(0,W),!1,!1),S+=":",S+=k(It.substr(W+1),!1,!0)),S+="@"}b=b.toLowerCase(),W=b.lastIndexOf(":"),W===-1?S+=k(b,!1,!0):(S+=k(b.substr(0,W),!1,!0),S+=b.substr(W))}if(N){if(N.length>=3&&N.charCodeAt(0)===47&&N.charCodeAt(2)===58){const W=N.charCodeAt(1);W>=65&&W<=90&&(N=`/${String.fromCharCode(W+32)}:${N.substr(3)}`)}else if(N.length>=2&&N.charCodeAt(1)===58){const W=N.charCodeAt(0);W>=65&&W<=90&&(N=`${String.fromCharCode(W+32)}:${N.substr(2)}`)}S+=k(N,!0,!1)}return ve&&(S+="?",S+=k(ve,!1,!1)),Z&&(S+="#",S+=T?Z:R(Z,!1,!1)),S}function x($){try{return decodeURIComponent($)}catch{return $.length>3?$.substr(0,3)+x($.substr(3)):$}}const M=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function ae($){return $.match(M)?$.replace(M,(T=>x(T))):$}var Me=n(470);const Te=Me.posix||Me,Ve="/";var Ie;(function($){$.joinPath=function(T,...k){return T.with({path:Te.join(T.path,...k)})},$.resolvePath=function(T,...k){let S=T.path,O=!1;S[0]!==Ve&&(S=Ve+S,O=!0);let b=Te.resolve(S,...k);return O&&b[0]===Ve&&!T.authority&&(b=b.substring(1)),T.with({path:b})},$.dirname=function(T){if(T.path.length===0||T.path===Ve)return T;let k=Te.dirname(T.path);return k.length===1&&k.charCodeAt(0)===46&&(k=""),T.with({path:k})},$.basename=function(T){return Te.basename(T.path)},$.extname=function(T){return Te.extname(T.path)}})(Ie||(Ie={}))})(),Jf=r})();const{URI:Gt,Utils:gn}=Jf;var vt;(function(t){t.basename=gn.basename,t.dirname=gn.dirname,t.extname=gn.extname,t.joinPath=gn.joinPath,t.resolvePath=gn.resolvePath;function e(i,s){return i?.toString()===s?.toString()}t.equals=e;function n(i,s){const a=typeof i=="string"?i:i.path,o=typeof s=="string"?s:s.path,l=a.split("/").filter(h=>h.length>0),u=o.split("/").filter(h=>h.length>0);let c=0;for(;ci??(i=ya.create(e.toString(),r.getServices(e).LanguageMetaData.languageId,0,n??""))}}class kE{constructor(e){this.documentMap=new Map,this.langiumDocumentFactory=e.workspace.LangiumDocumentFactory,this.serviceRegistry=e.ServiceRegistry}get all(){return re(this.documentMap.values())}addDocument(e){const n=e.uri.toString();if(this.documentMap.has(n))throw new Error(`A document with the URI '${n}' is already present.`);this.documentMap.set(n,e)}getDocument(e){const n=e.toString();return this.documentMap.get(n)}async getOrCreateDocument(e,n){let r=this.getDocument(e);return r||(r=await this.langiumDocumentFactory.fromUri(e,n),this.addDocument(r),r)}createDocument(e,n,r){if(r)return this.langiumDocumentFactory.fromString(n,e,r).then(i=>(this.addDocument(i),i));{const i=this.langiumDocumentFactory.fromString(n,e);return this.addDocument(i),i}}hasDocument(e){return this.documentMap.has(e.toString())}invalidateDocument(e){const n=e.toString(),r=this.documentMap.get(n);return r&&(this.serviceRegistry.getServices(e).references.Linker.unlink(r),r.state=K.Changed,r.precomputedScopes=void 0,r.diagnostics=void 0),r}deleteDocument(e){const n=e.toString(),r=this.documentMap.get(n);return r&&(r.state=K.Changed,this.documentMap.delete(n)),r}}const As=Symbol("ref_resolving");class IE{constructor(e){this.reflection=e.shared.AstReflection,this.langiumDocuments=()=>e.shared.workspace.LangiumDocuments,this.scopeProvider=e.references.ScopeProvider,this.astNodeLocator=e.workspace.AstNodeLocator}async link(e,n=V.CancellationToken.None){for(const r of Jt(e.parseResult.value))await Ee(n),sc(r).forEach(i=>this.doLink(i,e))}doLink(e,n){var r;const i=e.reference;if(i._ref===void 0){i._ref=As;try{const s=this.getCandidate(e);if(Kr(s))i._ref=s;else if(i._nodeDescription=s,this.langiumDocuments().hasDocument(s.documentUri)){const a=this.loadAstNode(s);i._ref=a??this.createLinkingError(e,s)}else i._ref=void 0}catch(s){console.error(`An error occurred while resolving reference to '${i.$refText}':`,s);const a=(r=s.message)!==null&&r!==void 0?r:String(s);i._ref=Object.assign(Object.assign({},e),{message:`An error occurred while resolving reference to '${i.$refText}': ${a}`})}n.references.push(i)}}unlink(e){for(const n of e.references)delete n._ref,delete n._nodeDescription;e.references=[]}getCandidate(e){const r=this.scopeProvider.getScope(e).getElement(e.reference.$refText);return r??this.createLinkingError(e)}buildReference(e,n,r,i){const s=this,a={$refNode:r,$refText:i,get ref(){var o;if(le(this._ref))return this._ref;if(bd(this._nodeDescription)){const l=s.loadAstNode(this._nodeDescription);this._ref=l??s.createLinkingError({reference:a,container:e,property:n},this._nodeDescription)}else if(this._ref===void 0){this._ref=As;const l=Fs(e).$document,u=s.getLinkedNode({reference:a,container:e,property:n});if(u.error&&l&&l.state=e.end)return s.ref}}if(r){const i=this.nameProvider.getNameNode(r);if(i&&(i===e||Pd(e,i)))return r}}}findDeclarationNode(e){const n=this.findDeclaration(e);if(n?.$cstNode){const r=this.nameProvider.getNameNode(n);return r??n.$cstNode}}findReferences(e,n){const r=[];if(n.includeDeclaration){const s=this.getReferenceToSelf(e);s&&r.push(s)}let i=this.index.findAllReferences(e,this.nodeLocator.getAstNodePath(e));return n.documentUri&&(i=i.filter(s=>vt.equals(s.sourceUri,n.documentUri))),r.push(...i),re(r)}getReferenceToSelf(e){const n=this.nameProvider.getNameNode(e);if(n){const r=pt(e),i=this.nodeLocator.getAstNodePath(e);return{sourceUri:r.uri,sourcePath:i,targetUri:r.uri,targetPath:i,segment:ai(n),local:!0}}}}class Ii{constructor(e){if(this.map=new Map,e)for(const[n,r]of e)this.add(n,r)}get size(){return Ps.sum(re(this.map.values()).map(e=>e.length))}clear(){this.map.clear()}delete(e,n){if(n===void 0)return this.map.delete(e);{const r=this.map.get(e);if(r){const i=r.indexOf(n);if(i>=0)return r.length===1?this.map.delete(e):r.splice(i,1),!0}return!1}}get(e){var n;return(n=this.map.get(e))!==null&&n!==void 0?n:[]}has(e,n){if(n===void 0)return this.map.has(e);{const r=this.map.get(e);return r?r.indexOf(n)>=0:!1}}add(e,n){return this.map.has(e)?this.map.get(e).push(n):this.map.set(e,[n]),this}addAll(e,n){return this.map.has(e)?this.map.get(e).push(...n):this.map.set(e,Array.from(n)),this}forEach(e){this.map.forEach((n,r)=>n.forEach(i=>e(i,r,this)))}[Symbol.iterator](){return this.entries().iterator()}entries(){return re(this.map.entries()).flatMap(([e,n])=>n.map(r=>[e,r]))}keys(){return re(this.map.keys())}values(){return re(this.map.values()).flat()}entriesGroupedByKey(){return re(this.map.entries())}}class Nu{get size(){return this.map.size}constructor(e){if(this.map=new Map,this.inverse=new Map,e)for(const[n,r]of e)this.set(n,r)}clear(){this.map.clear(),this.inverse.clear()}set(e,n){return this.map.set(e,n),this.inverse.set(n,e),this}get(e){return this.map.get(e)}getKey(e){return this.inverse.get(e)}delete(e){const n=this.map.get(e);return n!==void 0?(this.map.delete(e),this.inverse.delete(n),!0):!1}}class NE{constructor(e){this.nameProvider=e.references.NameProvider,this.descriptions=e.workspace.AstNodeDescriptionProvider}async computeExports(e,n=V.CancellationToken.None){return this.computeExportsForNode(e.parseResult.value,e,void 0,n)}async computeExportsForNode(e,n,r=Sa,i=V.CancellationToken.None){const s=[];this.exportNode(e,s,n);for(const a of r(e))await Ee(i),this.exportNode(a,s,n);return s}exportNode(e,n,r){const i=this.nameProvider.getName(e);i&&n.push(this.descriptions.createDescription(e,i,r))}async computeLocalScopes(e,n=V.CancellationToken.None){const r=e.parseResult.value,i=new Ii;for(const s of ur(r))await Ee(n),this.processNode(s,e,i);return i}processNode(e,n,r){const i=e.$container;if(i){const s=this.nameProvider.getName(e);s&&r.add(i,this.descriptions.createDescription(e,s,n))}}}class bu{constructor(e,n,r){var i;this.elements=e,this.outerScope=n,this.caseInsensitive=(i=r?.caseInsensitive)!==null&&i!==void 0?i:!1}getAllElements(){return this.outerScope?this.elements.concat(this.outerScope.getAllElements()):this.elements}getElement(e){const n=this.caseInsensitive?this.elements.find(r=>r.name.toLowerCase()===e.toLowerCase()):this.elements.find(r=>r.name===e);if(n)return n;if(this.outerScope)return this.outerScope.getElement(e)}}class bE{constructor(e,n,r){var i;this.elements=new Map,this.caseInsensitive=(i=r?.caseInsensitive)!==null&&i!==void 0?i:!1;for(const s of e){const a=this.caseInsensitive?s.name.toLowerCase():s.name;this.elements.set(a,s)}this.outerScope=n}getElement(e){const n=this.caseInsensitive?e.toLowerCase():e,r=this.elements.get(n);if(r)return r;if(this.outerScope)return this.outerScope.getElement(e)}getAllElements(){let e=re(this.elements.values());return this.outerScope&&(e=e.concat(this.outerScope.getAllElements())),e}}class Zf{constructor(){this.toDispose=[],this.isDisposed=!1}onDispose(e){this.toDispose.push(e)}dispose(){this.throwIfDisposed(),this.clear(),this.isDisposed=!0,this.toDispose.forEach(e=>e.dispose())}throwIfDisposed(){if(this.isDisposed)throw new Error("This cache has already been disposed")}}class OE extends Zf{constructor(){super(...arguments),this.cache=new Map}has(e){return this.throwIfDisposed(),this.cache.has(e)}set(e,n){this.throwIfDisposed(),this.cache.set(e,n)}get(e,n){if(this.throwIfDisposed(),this.cache.has(e))return this.cache.get(e);if(n){const r=n();return this.cache.set(e,r),r}else return}delete(e){return this.throwIfDisposed(),this.cache.delete(e)}clear(){this.throwIfDisposed(),this.cache.clear()}}class LE extends Zf{constructor(e){super(),this.cache=new Map,this.converter=e??(n=>n)}has(e,n){return this.throwIfDisposed(),this.cacheForContext(e).has(n)}set(e,n,r){this.throwIfDisposed(),this.cacheForContext(e).set(n,r)}get(e,n,r){this.throwIfDisposed();const i=this.cacheForContext(e);if(i.has(n))return i.get(n);if(r){const s=r();return i.set(n,s),s}else return}delete(e,n){return this.throwIfDisposed(),this.cacheForContext(e).delete(n)}clear(e){if(this.throwIfDisposed(),e){const n=this.converter(e);this.cache.delete(n)}else this.cache.clear()}cacheForContext(e){const n=this.converter(e);let r=this.cache.get(n);return r||(r=new Map,this.cache.set(n,r)),r}}class PE extends OE{constructor(e,n){super(),n?(this.toDispose.push(e.workspace.DocumentBuilder.onBuildPhase(n,()=>{this.clear()})),this.toDispose.push(e.workspace.DocumentBuilder.onUpdate((r,i)=>{i.length>0&&this.clear()}))):this.toDispose.push(e.workspace.DocumentBuilder.onUpdate(()=>{this.clear()}))}}class ME{constructor(e){this.reflection=e.shared.AstReflection,this.nameProvider=e.references.NameProvider,this.descriptions=e.workspace.AstNodeDescriptionProvider,this.indexManager=e.shared.workspace.IndexManager,this.globalScopeCache=new PE(e.shared)}getScope(e){const n=[],r=this.reflection.getReferenceType(e),i=pt(e.container).precomputedScopes;if(i){let a=e.container;do{const o=i.get(a);o.length>0&&n.push(re(o).filter(l=>this.reflection.isSubtype(l.type,r))),a=a.$container}while(a)}let s=this.getGlobalScope(r,e);for(let a=n.length-1;a>=0;a--)s=this.createScope(n[a],s);return s}createScope(e,n,r){return new bu(re(e),n,r)}createScopeForNodes(e,n,r){const i=re(e).map(s=>{const a=this.nameProvider.getName(s);if(a)return this.descriptions.createDescription(s,a)}).nonNullable();return new bu(i,n,r)}getGlobalScope(e,n){return this.globalScopeCache.get(e,()=>new bE(this.indexManager.allElements(e)))}}function DE(t){return typeof t.$comment=="string"}function Ou(t){return typeof t=="object"&&!!t&&("$ref"in t||"$error"in t)}class FE{constructor(e){this.ignoreProperties=new Set(["$container","$containerProperty","$containerIndex","$document","$cstNode"]),this.langiumDocuments=e.shared.workspace.LangiumDocuments,this.astNodeLocator=e.workspace.AstNodeLocator,this.nameProvider=e.references.NameProvider,this.commentProvider=e.documentation.CommentProvider}serialize(e,n){const r=n??{},i=n?.replacer,s=(o,l)=>this.replacer(o,l,r),a=i?(o,l)=>i(o,l,s):s;try{return this.currentDocument=pt(e),JSON.stringify(e,a,n?.space)}finally{this.currentDocument=void 0}}deserialize(e,n){const r=n??{},i=JSON.parse(e);return this.linkNode(i,i,r),i}replacer(e,n,{refText:r,sourceText:i,textRegions:s,comments:a,uriConverter:o}){var l,u,c,f;if(!this.ignoreProperties.has(e))if(ze(n)){const d=n.ref,h=r?n.$refText:void 0;if(d){const m=pt(d);let g="";this.currentDocument&&this.currentDocument!==m&&(o?g=o(m.uri,n):g=m.uri.toString());const R=this.astNodeLocator.getAstNodePath(d);return{$ref:`${g}#${R}`,$refText:h}}else return{$error:(u=(l=n.error)===null||l===void 0?void 0:l.message)!==null&&u!==void 0?u:"Could not resolve reference",$refText:h}}else if(le(n)){let d;if(s&&(d=this.addAstNodeRegionWithAssignmentsTo(Object.assign({},n)),(!e||n.$document)&&d?.$textRegion&&(d.$textRegion.documentURI=(c=this.currentDocument)===null||c===void 0?void 0:c.uri.toString())),i&&!e&&(d??(d=Object.assign({},n)),d.$sourceText=(f=n.$cstNode)===null||f===void 0?void 0:f.text),a){d??(d=Object.assign({},n));const h=this.commentProvider.getComment(n);h&&(d.$comment=h.replace(/\r/g,""))}return d??n}else return n}addAstNodeRegionWithAssignmentsTo(e){const n=r=>({offset:r.offset,end:r.end,length:r.length,range:r.range});if(e.$cstNode){const r=e.$textRegion=n(e.$cstNode),i=r.assignments={};return Object.keys(e).filter(s=>!s.startsWith("$")).forEach(s=>{const a=Ah(e.$cstNode,s).map(n);a.length!==0&&(i[s]=a)}),e}}linkNode(e,n,r,i,s,a){for(const[l,u]of Object.entries(e))if(Array.isArray(u))for(let c=0;c{await this.handleException(()=>e.call(n,r,i,s),"An error occurred during validation",i,r)}}async handleException(e,n,r,i){try{await e()}catch(s){if(Qi(s))throw s;console.error(`${n}:`,s),s instanceof Error&&s.stack&&console.error(s.stack);const a=s instanceof Error?s.message:String(s);r("error",`${n}: ${a}`,{node:i})}}addEntry(e,n){if(e==="AstNode"){this.entries.add("AstNode",n);return}for(const r of this.reflection.getAllSubTypes(e))this.entries.add(r,n)}getChecks(e,n){let r=re(this.entries.get(e)).concat(this.entries.get("AstNode"));return n&&(r=r.filter(i=>n.includes(i.category))),r.map(i=>i.check)}registerBeforeDocument(e,n=this){this.entriesBefore.push(this.wrapPreparationException(e,"An error occurred during set-up of the validation",n))}registerAfterDocument(e,n=this){this.entriesAfter.push(this.wrapPreparationException(e,"An error occurred during tear-down of the validation",n))}wrapPreparationException(e,n,r){return async(i,s,a,o)=>{await this.handleException(()=>e.call(r,i,s,a,o),n,s,i)}}get checksBefore(){return this.entriesBefore}get checksAfter(){return this.entriesAfter}}class BE{constructor(e){this.validationRegistry=e.validation.ValidationRegistry,this.metadata=e.LanguageMetaData}async validateDocument(e,n={},r=V.CancellationToken.None){const i=e.parseResult,s=[];if(await Ee(r),(!n.categories||n.categories.includes("built-in"))&&(this.processLexingErrors(i,s,n),n.stopAfterLexingErrors&&s.some(a=>{var o;return((o=a.data)===null||o===void 0?void 0:o.code)===Fe.LexingError})||(this.processParsingErrors(i,s,n),n.stopAfterParsingErrors&&s.some(a=>{var o;return((o=a.data)===null||o===void 0?void 0:o.code)===Fe.ParsingError}))||(this.processLinkingErrors(e,s,n),n.stopAfterLinkingErrors&&s.some(a=>{var o;return((o=a.data)===null||o===void 0?void 0:o.code)===Fe.LinkingError}))))return s;try{s.push(...await this.validateAst(i.value,n,r))}catch(a){if(Qi(a))throw a;console.error("An error occurred during validation:",a)}return await Ee(r),s}processLexingErrors(e,n,r){var i,s,a;const o=[...e.lexerErrors,...(s=(i=e.lexerReport)===null||i===void 0?void 0:i.diagnostics)!==null&&s!==void 0?s:[]];for(const l of o){const u=(a=l.severity)!==null&&a!==void 0?a:"error",c={severity:Es(u),range:{start:{line:l.line-1,character:l.column-1},end:{line:l.line-1,character:l.column+l.length-1}},message:l.message,data:KE(u),source:this.getSource()};n.push(c)}}processParsingErrors(e,n,r){for(const i of e.parserErrors){let s;if(isNaN(i.token.startOffset)){if("previousToken"in i){const a=i.previousToken;if(isNaN(a.startOffset)){const o={line:0,character:0};s={start:o,end:o}}else{const o={line:a.endLine-1,character:a.endColumn};s={start:o,end:o}}}}else s=Ds(i.token);if(s){const a={severity:Es("error"),range:s,message:i.message,data:qn(Fe.ParsingError),source:this.getSource()};n.push(a)}}}processLinkingErrors(e,n,r){for(const i of e.references){const s=i.error;if(s){const a={node:s.container,property:s.property,index:s.index,data:{code:Fe.LinkingError,containerType:s.container.$type,property:s.property,refText:s.reference.$refText}};n.push(this.toDiagnostic("error",s.message,a))}}}async validateAst(e,n,r=V.CancellationToken.None){const i=[],s=(a,o,l)=>{i.push(this.toDiagnostic(a,o,l))};return await this.validateAstBefore(e,n,s,r),await this.validateAstNodes(e,n,s,r),await this.validateAstAfter(e,n,s,r),i}async validateAstBefore(e,n,r,i=V.CancellationToken.None){var s;const a=this.validationRegistry.checksBefore;for(const o of a)await Ee(i),await o(e,r,(s=n.categories)!==null&&s!==void 0?s:[],i)}async validateAstNodes(e,n,r,i=V.CancellationToken.None){await Promise.all(Jt(e).map(async s=>{await Ee(i);const a=this.validationRegistry.getChecks(s.$type,n.categories);for(const o of a)await o(s,r,i)}))}async validateAstAfter(e,n,r,i=V.CancellationToken.None){var s;const a=this.validationRegistry.checksAfter;for(const o of a)await Ee(i),await o(e,r,(s=n.categories)!==null&&s!==void 0?s:[],i)}toDiagnostic(e,n,r){return{message:n,range:jE(r),severity:Es(e),code:r.code,codeDescription:r.codeDescription,tags:r.tags,relatedInformation:r.relatedInformation,data:r.data,source:this.getSource()}}getSource(){return this.metadata.languageId}}function jE(t){if(t.range)return t.range;let e;return typeof t.property=="string"?e=cc(t.node.$cstNode,t.property,t.index):typeof t.keyword=="string"&&(e=Eh(t.node.$cstNode,t.keyword,t.index)),e??(e=t.node.$cstNode),e?e.range:{start:{line:0,character:0},end:{line:0,character:0}}}function Es(t){switch(t){case"error":return 1;case"warning":return 2;case"info":return 3;case"hint":return 4;default:throw new Error("Invalid diagnostic severity: "+t)}}function KE(t){switch(t){case"error":return qn(Fe.LexingError);case"warning":return qn(Fe.LexingWarning);case"info":return qn(Fe.LexingInfo);case"hint":return qn(Fe.LexingHint);default:throw new Error("Invalid diagnostic severity: "+t)}}var Fe;(function(t){t.LexingError="lexing-error",t.LexingWarning="lexing-warning",t.LexingInfo="lexing-info",t.LexingHint="lexing-hint",t.ParsingError="parsing-error",t.LinkingError="linking-error"})(Fe||(Fe={}));class HE{constructor(e){this.astNodeLocator=e.workspace.AstNodeLocator,this.nameProvider=e.references.NameProvider}createDescription(e,n,r){const i=r??pt(e);n??(n=this.nameProvider.getName(e));const s=this.astNodeLocator.getAstNodePath(e);if(!n)throw new Error(`Node at path ${s} has no name.`);let a;const o=()=>{var l;return a??(a=ai((l=this.nameProvider.getNameNode(e))!==null&&l!==void 0?l:e.$cstNode))};return{node:e,name:n,get nameSegment(){return o()},selectionSegment:ai(e.$cstNode),type:e.$type,documentUri:i.uri,path:s}}}class VE{constructor(e){this.nodeLocator=e.workspace.AstNodeLocator}async createDescriptions(e,n=V.CancellationToken.None){const r=[],i=e.parseResult.value;for(const s of Jt(i))await Ee(n),sc(s).filter(a=>!Kr(a)).forEach(a=>{const o=this.createDescription(a);o&&r.push(o)});return r}createDescription(e){const n=e.reference.$nodeDescription,r=e.reference.$refNode;if(!n||!r)return;const i=pt(e.container).uri;return{sourceUri:i,sourcePath:this.nodeLocator.getAstNodePath(e.container),targetUri:n.documentUri,targetPath:n.path,segment:ai(r),local:vt.equals(n.documentUri,i)}}}class WE{constructor(){this.segmentSeparator="/",this.indexSeparator="@"}getAstNodePath(e){if(e.$container){const n=this.getAstNodePath(e.$container),r=this.getPathSegment(e);return n+this.segmentSeparator+r}return""}getPathSegment({$containerProperty:e,$containerIndex:n}){if(!e)throw new Error("Missing '$containerProperty' in AST node.");return n!==void 0?e+this.indexSeparator+n:e}getAstNode(e,n){return n.split(this.segmentSeparator).reduce((i,s)=>{if(!i||s.length===0)return i;const a=s.indexOf(this.indexSeparator);if(a>0){const o=s.substring(0,a),l=parseInt(s.substring(a+1)),u=i[o];return u?.[l]}return i[s]},e)}}var zE=qf();class qE{constructor(e){this._ready=new ao,this.settings={},this.workspaceConfig=!1,this.onConfigurationSectionUpdateEmitter=new zE.Emitter,this.serviceRegistry=e.ServiceRegistry}get ready(){return this._ready.promise}initialize(e){var n,r;this.workspaceConfig=(r=(n=e.capabilities.workspace)===null||n===void 0?void 0:n.configuration)!==null&&r!==void 0?r:!1}async initialized(e){if(this.workspaceConfig){if(e.register){const n=this.serviceRegistry.all;e.register({section:n.map(r=>this.toSectionName(r.LanguageMetaData.languageId))})}if(e.fetchConfiguration){const n=this.serviceRegistry.all.map(i=>({section:this.toSectionName(i.LanguageMetaData.languageId)})),r=await e.fetchConfiguration(n);n.forEach((i,s)=>{this.updateSectionConfiguration(i.section,r[s])})}}this._ready.resolve()}updateConfiguration(e){e.settings&&Object.keys(e.settings).forEach(n=>{const r=e.settings[n];this.updateSectionConfiguration(n,r),this.onConfigurationSectionUpdateEmitter.fire({section:n,configuration:r})})}updateSectionConfiguration(e,n){this.settings[e]=n}async getConfiguration(e,n){await this.ready;const r=this.toSectionName(e);if(this.settings[r])return this.settings[r][n]}toSectionName(e){return`${e}`}get onConfigurationSectionUpdate(){return this.onConfigurationSectionUpdateEmitter.event}}var er;(function(t){function e(n){return{dispose:async()=>await n()}}t.create=e})(er||(er={}));class YE{constructor(e){this.updateBuildOptions={validation:{categories:["built-in","fast"]}},this.updateListeners=[],this.buildPhaseListeners=new Ii,this.documentPhaseListeners=new Ii,this.buildState=new Map,this.documentBuildWaiters=new Map,this.currentState=K.Changed,this.langiumDocuments=e.workspace.LangiumDocuments,this.langiumDocumentFactory=e.workspace.LangiumDocumentFactory,this.textDocuments=e.workspace.TextDocuments,this.indexManager=e.workspace.IndexManager,this.serviceRegistry=e.ServiceRegistry}async build(e,n={},r=V.CancellationToken.None){var i,s;for(const a of e){const o=a.uri.toString();if(a.state===K.Validated){if(typeof n.validation=="boolean"&&n.validation)a.state=K.IndexedReferences,a.diagnostics=void 0,this.buildState.delete(o);else if(typeof n.validation=="object"){const l=this.buildState.get(o),u=(i=l?.result)===null||i===void 0?void 0:i.validationChecks;if(u){const f=((s=n.validation.categories)!==null&&s!==void 0?s:Ci.all).filter(d=>!u.includes(d));f.length>0&&(this.buildState.set(o,{completed:!1,options:{validation:Object.assign(Object.assign({},n.validation),{categories:f})},result:l.result}),a.state=K.IndexedReferences)}}}else this.buildState.delete(o)}this.currentState=K.Changed,await this.emitUpdate(e.map(a=>a.uri),[]),await this.buildDocuments(e,n,r)}async update(e,n,r=V.CancellationToken.None){this.currentState=K.Changed;for(const a of n)this.langiumDocuments.deleteDocument(a),this.buildState.delete(a.toString()),this.indexManager.remove(a);for(const a of e){if(!this.langiumDocuments.invalidateDocument(a)){const l=this.langiumDocumentFactory.fromModel({$type:"INVALID"},a);l.state=K.Changed,this.langiumDocuments.addDocument(l)}this.buildState.delete(a.toString())}const i=re(e).concat(n).map(a=>a.toString()).toSet();this.langiumDocuments.all.filter(a=>!i.has(a.uri.toString())&&this.shouldRelink(a,i)).forEach(a=>{this.serviceRegistry.getServices(a.uri).references.Linker.unlink(a),a.state=Math.min(a.state,K.ComputedScopes),a.diagnostics=void 0}),await this.emitUpdate(e,n),await Ee(r);const s=this.sortDocuments(this.langiumDocuments.all.filter(a=>{var o;return a.stater(e,n)))}sortDocuments(e){let n=0,r=e.length-1;for(;n=0&&!this.hasTextDocument(e[r]);)r--;nr.error!==void 0)?!0:this.indexManager.isAffected(e,n)}onUpdate(e){return this.updateListeners.push(e),er.create(()=>{const n=this.updateListeners.indexOf(e);n>=0&&this.updateListeners.splice(n,1)})}async buildDocuments(e,n,r){this.prepareBuild(e,n),await this.runCancelable(e,K.Parsed,r,s=>this.langiumDocumentFactory.update(s,r)),await this.runCancelable(e,K.IndexedContent,r,s=>this.indexManager.updateContent(s,r)),await this.runCancelable(e,K.ComputedScopes,r,async s=>{const a=this.serviceRegistry.getServices(s.uri).references.ScopeComputation;s.precomputedScopes=await a.computeLocalScopes(s,r)}),await this.runCancelable(e,K.Linked,r,s=>this.serviceRegistry.getServices(s.uri).references.Linker.link(s,r)),await this.runCancelable(e,K.IndexedReferences,r,s=>this.indexManager.updateReferences(s,r));const i=e.filter(s=>this.shouldValidate(s));await this.runCancelable(i,K.Validated,r,s=>this.validate(s,r));for(const s of e){const a=this.buildState.get(s.uri.toString());a&&(a.completed=!0)}}prepareBuild(e,n){for(const r of e){const i=r.uri.toString(),s=this.buildState.get(i);(!s||s.completed)&&this.buildState.set(i,{completed:!1,options:n,result:s?.result})}}async runCancelable(e,n,r,i){const s=e.filter(o=>o.stateo.state===n);await this.notifyBuildPhase(a,n,r),this.currentState=n}onBuildPhase(e,n){return this.buildPhaseListeners.add(e,n),er.create(()=>{this.buildPhaseListeners.delete(e,n)})}onDocumentPhase(e,n){return this.documentPhaseListeners.add(e,n),er.create(()=>{this.documentPhaseListeners.delete(e,n)})}waitUntil(e,n,r){let i;if(n&&"path"in n?i=n:r=n,r??(r=V.CancellationToken.None),i){const s=this.langiumDocuments.getDocument(i);if(s&&s.state>e)return Promise.resolve(i)}return this.currentState>=e?Promise.resolve(void 0):r.isCancellationRequested?Promise.reject(ki):new Promise((s,a)=>{const o=this.onBuildPhase(e,()=>{if(o.dispose(),l.dispose(),i){const u=this.langiumDocuments.getDocument(i);s(u?.uri)}else s(void 0)}),l=r.onCancellationRequested(()=>{o.dispose(),l.dispose(),a(ki)})})}async notifyDocumentPhase(e,n,r){const s=this.documentPhaseListeners.get(n).slice();for(const a of s)try{await a(e,r)}catch(o){if(!Qi(o))throw o}}async notifyBuildPhase(e,n,r){if(e.length===0)return;const s=this.buildPhaseListeners.get(n).slice();for(const a of s)await Ee(r),await a(e,r)}shouldValidate(e){return!!this.getBuildOptions(e).validation}async validate(e,n){var r,i;const s=this.serviceRegistry.getServices(e.uri).validation.DocumentValidator,a=this.getBuildOptions(e).validation,o=typeof a=="object"?a:void 0,l=await s.validateDocument(e,o,n);e.diagnostics?e.diagnostics.push(...l):e.diagnostics=l;const u=this.buildState.get(e.uri.toString());if(u){(r=u.result)!==null&&r!==void 0||(u.result={});const c=(i=o?.categories)!==null&&i!==void 0?i:Ci.all;u.result.validationChecks?u.result.validationChecks.push(...c):u.result.validationChecks=[...c]}}getBuildOptions(e){var n,r;return(r=(n=this.buildState.get(e.uri.toString()))===null||n===void 0?void 0:n.options)!==null&&r!==void 0?r:{}}}class XE{constructor(e){this.symbolIndex=new Map,this.symbolByTypeIndex=new LE,this.referenceIndex=new Map,this.documents=e.workspace.LangiumDocuments,this.serviceRegistry=e.ServiceRegistry,this.astReflection=e.AstReflection}findAllReferences(e,n){const r=pt(e).uri,i=[];return this.referenceIndex.forEach(s=>{s.forEach(a=>{vt.equals(a.targetUri,r)&&a.targetPath===n&&i.push(a)})}),re(i)}allElements(e,n){let r=re(this.symbolIndex.keys());return n&&(r=r.filter(i=>!n||n.has(i))),r.map(i=>this.getFileDescriptions(i,e)).flat()}getFileDescriptions(e,n){var r;return n?this.symbolByTypeIndex.get(e,n,()=>{var s;return((s=this.symbolIndex.get(e))!==null&&s!==void 0?s:[]).filter(o=>this.astReflection.isSubtype(o.type,n))}):(r=this.symbolIndex.get(e))!==null&&r!==void 0?r:[]}remove(e){const n=e.toString();this.symbolIndex.delete(n),this.symbolByTypeIndex.clear(n),this.referenceIndex.delete(n)}async updateContent(e,n=V.CancellationToken.None){const i=await this.serviceRegistry.getServices(e.uri).references.ScopeComputation.computeExports(e,n),s=e.uri.toString();this.symbolIndex.set(s,i),this.symbolByTypeIndex.clear(s)}async updateReferences(e,n=V.CancellationToken.None){const i=await this.serviceRegistry.getServices(e.uri).workspace.ReferenceDescriptionProvider.createDescriptions(e,n);this.referenceIndex.set(e.uri.toString(),i)}isAffected(e,n){const r=this.referenceIndex.get(e.uri.toString());return r?r.some(i=>!i.local&&n.has(i.targetUri.toString())):!1}}class JE{constructor(e){this.initialBuildOptions={},this._ready=new ao,this.serviceRegistry=e.ServiceRegistry,this.langiumDocuments=e.workspace.LangiumDocuments,this.documentBuilder=e.workspace.DocumentBuilder,this.fileSystemProvider=e.workspace.FileSystemProvider,this.mutex=e.workspace.WorkspaceLock}get ready(){return this._ready.promise}get workspaceFolders(){return this.folders}initialize(e){var n;this.folders=(n=e.workspaceFolders)!==null&&n!==void 0?n:void 0}initialized(e){return this.mutex.write(n=>{var r;return this.initializeWorkspace((r=this.folders)!==null&&r!==void 0?r:[],n)})}async initializeWorkspace(e,n=V.CancellationToken.None){const r=await this.performStartup(e);await Ee(n),await this.documentBuilder.build(r,this.initialBuildOptions,n)}async performStartup(e){const n=this.serviceRegistry.all.flatMap(s=>s.LanguageMetaData.fileExtensions),r=[],i=s=>{r.push(s),this.langiumDocuments.hasDocument(s.uri)||this.langiumDocuments.addDocument(s)};return await this.loadAdditionalDocuments(e,i),await Promise.all(e.map(s=>[s,this.getRootFolder(s)]).map(async s=>this.traverseFolder(...s,n,i))),this._ready.resolve(),r}loadAdditionalDocuments(e,n){return Promise.resolve()}getRootFolder(e){return Gt.parse(e.uri)}async traverseFolder(e,n,r,i){const s=await this.fileSystemProvider.readDirectory(n);await Promise.all(s.map(async a=>{if(this.includeEntry(e,a,r)){if(a.isDirectory)await this.traverseFolder(e,a.uri,r,i);else if(a.isFile){const o=await this.langiumDocuments.getOrCreateDocument(a.uri);i(o)}}}))}includeEntry(e,n,r){const i=vt.basename(n.uri);if(i.startsWith("."))return!1;if(n.isDirectory)return i!=="node_modules"&&i!=="out";if(n.isFile){const s=vt.extname(n.uri);return r.includes(s)}return!1}}class ZE{buildUnexpectedCharactersMessage(e,n,r,i,s){return zs.buildUnexpectedCharactersMessage(e,n,r,i,s)}buildUnableToPopLexerModeMessage(e){return zs.buildUnableToPopLexerModeMessage(e)}}const QE={mode:"full"};class e${constructor(e){this.errorMessageProvider=e.parser.LexerErrorMessageProvider,this.tokenBuilder=e.parser.TokenBuilder;const n=this.tokenBuilder.buildTokens(e.Grammar,{caseInsensitive:e.LanguageMetaData.caseInsensitive});this.tokenTypes=this.toTokenTypeDictionary(n);const r=Lu(n)?Object.values(n):n,i=e.LanguageMetaData.mode==="production";this.chevrotainLexer=new he(r,{positionTracking:"full",skipValidations:i,errorMessageProvider:this.errorMessageProvider})}get definition(){return this.tokenTypes}tokenize(e,n=QE){var r,i,s;const a=this.chevrotainLexer.tokenize(e);return{tokens:a.tokens,errors:a.errors,hidden:(r=a.groups.hidden)!==null&&r!==void 0?r:[],report:(s=(i=this.tokenBuilder).flushLexingReport)===null||s===void 0?void 0:s.call(i,e)}}toTokenTypeDictionary(e){if(Lu(e))return e;const n=Qf(e)?Object.values(e.modes).flat():e,r={};return n.forEach(i=>r[i.name]=i),r}}function t$(t){return Array.isArray(t)&&(t.length===0||"name"in t[0])}function Qf(t){return t&&"modes"in t&&"defaultMode"in t}function Lu(t){return!t$(t)&&!Qf(t)}function n$(t,e,n){let r,i;typeof t=="string"?(i=e,r=n):(i=t.range.start,r=e),i||(i=D.create(0,0));const s=ed(t),a=oo(r),o=s$({lines:s,position:i,options:a});return c$({index:0,tokens:o,position:i})}function r$(t,e){const n=oo(e),r=ed(t);if(r.length===0)return!1;const i=r[0],s=r[r.length-1],a=n.start,o=n.end;return!!a?.exec(i)&&!!o?.exec(s)}function ed(t){let e="";return typeof t=="string"?e=t:e=t.text,e.split(uh)}const Pu=/\s*(@([\p{L}][\p{L}\p{N}]*)?)/uy,i$=/\{(@[\p{L}][\p{L}\p{N}]*)(\s*)([^\r\n}]+)?\}/gu;function s$(t){var e,n,r;const i=[];let s=t.position.line,a=t.position.character;for(let o=0;o=c.length){if(i.length>0){const h=D.create(s,a);i.push({type:"break",content:"",range:L.create(h,h)})}}else{Pu.lastIndex=f;const h=Pu.exec(c);if(h){const m=h[0],g=h[1],R=D.create(s,a+f),y=D.create(s,a+f+m.length);i.push({type:"tag",content:g,range:L.create(R,y)}),f+=m.length,f=va(c,f)}if(f0&&i[i.length-1].type==="break"?i.slice(0,-1):i}function a$(t,e,n,r){const i=[];if(t.length===0){const s=D.create(n,r),a=D.create(n,r+e.length);i.push({type:"text",content:e,range:L.create(s,a)})}else{let s=0;for(const o of t){const l=o.index,u=e.substring(s,l);u.length>0&&i.push({type:"text",content:e.substring(s,l),range:L.create(D.create(n,s+r),D.create(n,l+r))});let c=u.length+1;const f=o[1];if(i.push({type:"inline-tag",content:f,range:L.create(D.create(n,s+c+r),D.create(n,s+c+f.length+r))}),c+=f.length,o.length===4){c+=o[2].length;const d=o[3];i.push({type:"text",content:d,range:L.create(D.create(n,s+c+r),D.create(n,s+c+d.length+r))})}else i.push({type:"text",content:"",range:L.create(D.create(n,s+c+r),D.create(n,s+c+r))});s=l+o[0].length}const a=e.substring(s);a.length>0&&i.push({type:"text",content:a,range:L.create(D.create(n,s+r),D.create(n,s+r+a.length))})}return i}const o$=/\S/,l$=/\s*$/;function va(t,e){const n=t.substring(e).match(o$);return n?e+n.index:t.length}function u$(t){const e=t.match(l$);if(e&&typeof e.index=="number")return e.index}function c$(t){var e,n,r,i;const s=D.create(t.position.line,t.position.character);if(t.tokens.length===0)return new Mu([],L.create(s,s));const a=[];for(;t.indexn.name===e)}getTags(e){return this.getAllTags().filter(n=>n.name===e)}getAllTags(){return this.elements.filter(e=>"name"in e)}toString(){let e="";for(const n of this.elements)if(e.length===0)e=n.toString();else{const r=n.toString();e+=Du(e)+r}return e.trim()}toMarkdown(e){let n="";for(const r of this.elements)if(n.length===0)n=r.toMarkdown(e);else{const i=r.toMarkdown(e);n+=Du(n)+i}return n.trim()}}class Ss{constructor(e,n,r,i){this.name=e,this.content=n,this.inline=r,this.range=i}toString(){let e=`@${this.name}`;const n=this.content.toString();return this.content.inlines.length===1?e=`${e} ${n}`:this.content.inlines.length>1&&(e=`${e} +${n}`),this.inline?`{${e}}`:e}toMarkdown(e){var n,r;return(r=(n=e?.renderTag)===null||n===void 0?void 0:n.call(e,this))!==null&&r!==void 0?r:this.toMarkdownDefault(e)}toMarkdownDefault(e){const n=this.content.toMarkdown(e);if(this.inline){const s=p$(this.name,n,e??{});if(typeof s=="string")return s}let r="";e?.tag==="italic"||e?.tag===void 0?r="*":e?.tag==="bold"?r="**":e?.tag==="bold-italic"&&(r="***");let i=`${r}@${this.name}${r}`;return this.content.inlines.length===1?i=`${i} — ${n}`:this.content.inlines.length>1&&(i=`${i} +${n}`),this.inline?`{${i}}`:i}}function p$(t,e,n){var r,i;if(t==="linkplain"||t==="linkcode"||t==="link"){const s=e.indexOf(" ");let a=e;if(s>0){const l=va(e,s);a=e.substring(l),e=e.substring(0,s)}return(t==="linkcode"||t==="link"&&n.link==="code")&&(a=`\`${a}\``),(i=(r=n.renderLink)===null||r===void 0?void 0:r.call(n,e,a))!==null&&i!==void 0?i:m$(e,a)}}function m$(t,e){try{return Gt.parse(t,!0),`[${e}](${t})`}catch{return t}}class Ra{constructor(e,n){this.inlines=e,this.range=n}toString(){let e="";for(let n=0;nr.range.start.line&&(e+=` +`)}return e}toMarkdown(e){let n="";for(let r=0;ri.range.start.line&&(n+=` +`)}return n}}class id{constructor(e,n){this.text=e,this.range=n}toString(){return this.text}toMarkdown(){return this.text}}function Du(t){return t.endsWith(` +`)?` +`:` + +`}class g${constructor(e){this.indexManager=e.shared.workspace.IndexManager,this.commentProvider=e.documentation.CommentProvider}getDocumentation(e){const n=this.commentProvider.getComment(e);if(n&&r$(n))return n$(n).toMarkdown({renderLink:(i,s)=>this.documentationLinkRenderer(e,i,s),renderTag:i=>this.documentationTagRenderer(e,i)})}documentationLinkRenderer(e,n,r){var i;const s=(i=this.findNameInPrecomputedScopes(e,n))!==null&&i!==void 0?i:this.findNameInGlobalScope(e,n);if(s&&s.nameSegment){const a=s.nameSegment.range.start.line+1,o=s.nameSegment.range.start.character+1,l=s.documentUri.with({fragment:`L${a},${o}`});return`[${r}](${l.toString()})`}else return}documentationTagRenderer(e,n){}findNameInPrecomputedScopes(e,n){const i=pt(e).precomputedScopes;if(!i)return;let s=e;do{const o=i.get(s).find(l=>l.name===n);if(o)return o;s=s.$container}while(s)}findNameInGlobalScope(e,n){return this.indexManager.allElements().find(i=>i.name===n)}}class y${constructor(e){this.grammarConfig=()=>e.parser.GrammarConfig}getComment(e){var n;return DE(e)?e.$comment:(n=Gd(e.$cstNode,this.grammarConfig().multilineCommentRules))===null||n===void 0?void 0:n.text}}class T${constructor(e){this.syncParser=e.parser.LangiumParser}parse(e,n){return Promise.resolve(this.syncParser.parse(e))}}class v${constructor(){this.previousTokenSource=new V.CancellationTokenSource,this.writeQueue=[],this.readQueue=[],this.done=!0}write(e){this.cancelWrite();const n=$E();return this.previousTokenSource=n,this.enqueue(this.writeQueue,e,n.token)}read(e){return this.enqueue(this.readQueue,e)}enqueue(e,n,r=V.CancellationToken.None){const i=new ao,s={action:n,deferred:i,cancellationToken:r};return e.push(s),this.performNextOperation(),i.promise}async performNextOperation(){if(!this.done)return;const e=[];if(this.writeQueue.length>0)e.push(this.writeQueue.shift());else if(this.readQueue.length>0)e.push(...this.readQueue.splice(0,this.readQueue.length));else return;this.done=!1,await Promise.all(e.map(async({action:n,deferred:r,cancellationToken:i})=>{try{const s=await Promise.resolve().then(()=>n(i));r.resolve(s)}catch(s){Qi(s)?r.resolve(void 0):r.reject(s)}})),this.done=!0,this.performNextOperation()}cancelWrite(){this.previousTokenSource.cancel()}}class R${constructor(e){this.grammarElementIdMap=new Nu,this.tokenTypeIdMap=new Nu,this.grammar=e.Grammar,this.lexer=e.parser.Lexer,this.linker=e.references.Linker}dehydrate(e){return{lexerErrors:e.lexerErrors,lexerReport:e.lexerReport?this.dehydrateLexerReport(e.lexerReport):void 0,parserErrors:e.parserErrors.map(n=>Object.assign(Object.assign({},n),{message:n.message})),value:this.dehydrateAstNode(e.value,this.createDehyrationContext(e.value))}}dehydrateLexerReport(e){return e}createDehyrationContext(e){const n=new Map,r=new Map;for(const i of Jt(e))n.set(i,{});if(e.$cstNode)for(const i of Ms(e.$cstNode))r.set(i,{});return{astNodes:n,cstNodes:r}}dehydrateAstNode(e,n){const r=n.astNodes.get(e);r.$type=e.$type,r.$containerIndex=e.$containerIndex,r.$containerProperty=e.$containerProperty,e.$cstNode!==void 0&&(r.$cstNode=this.dehydrateCstNode(e.$cstNode,n));for(const[i,s]of Object.entries(e))if(!i.startsWith("$"))if(Array.isArray(s)){const a=[];r[i]=a;for(const o of s)le(o)?a.push(this.dehydrateAstNode(o,n)):ze(o)?a.push(this.dehydrateReference(o,n)):a.push(o)}else le(s)?r[i]=this.dehydrateAstNode(s,n):ze(s)?r[i]=this.dehydrateReference(s,n):s!==void 0&&(r[i]=s);return r}dehydrateReference(e,n){const r={};return r.$refText=e.$refText,e.$refNode&&(r.$refNode=n.cstNodes.get(e.$refNode)),r}dehydrateCstNode(e,n){const r=n.cstNodes.get(e);return Ju(e)?r.fullText=e.fullText:r.grammarSource=this.getGrammarElementId(e.grammarSource),r.hidden=e.hidden,r.astNode=n.astNodes.get(e.astNode),tr(e)?r.content=e.content.map(i=>this.dehydrateCstNode(i,n)):Xu(e)&&(r.tokenType=e.tokenType.name,r.offset=e.offset,r.length=e.length,r.startLine=e.range.start.line,r.startColumn=e.range.start.character,r.endLine=e.range.end.line,r.endColumn=e.range.end.character),r}hydrate(e){const n=e.value,r=this.createHydrationContext(n);return"$cstNode"in n&&this.hydrateCstNode(n.$cstNode,r),{lexerErrors:e.lexerErrors,lexerReport:e.lexerReport,parserErrors:e.parserErrors,value:this.hydrateAstNode(n,r)}}createHydrationContext(e){const n=new Map,r=new Map;for(const s of Jt(e))n.set(s,{});let i;if(e.$cstNode)for(const s of Ms(e.$cstNode)){let a;"fullText"in s?(a=new Df(s.fullText),i=a):"content"in s?a=new io:"tokenType"in s&&(a=this.hydrateCstLeafNode(s)),a&&(r.set(s,a),a.root=i)}return{astNodes:n,cstNodes:r}}hydrateAstNode(e,n){const r=n.astNodes.get(e);r.$type=e.$type,r.$containerIndex=e.$containerIndex,r.$containerProperty=e.$containerProperty,e.$cstNode&&(r.$cstNode=n.cstNodes.get(e.$cstNode));for(const[i,s]of Object.entries(e))if(!i.startsWith("$"))if(Array.isArray(s)){const a=[];r[i]=a;for(const o of s)le(o)?a.push(this.setParent(this.hydrateAstNode(o,n),r)):ze(o)?a.push(this.hydrateReference(o,r,i,n)):a.push(o)}else le(s)?r[i]=this.setParent(this.hydrateAstNode(s,n),r):ze(s)?r[i]=this.hydrateReference(s,r,i,n):s!==void 0&&(r[i]=s);return r}setParent(e,n){return e.$container=n,e}hydrateReference(e,n,r,i){return this.linker.buildReference(n,r,i.cstNodes.get(e.$refNode),e.$refText)}hydrateCstNode(e,n,r=0){const i=n.cstNodes.get(e);if(typeof e.grammarSource=="number"&&(i.grammarSource=this.getGrammarElement(e.grammarSource)),i.astNode=n.astNodes.get(e.astNode),tr(i))for(const s of e.content){const a=this.hydrateCstNode(s,n,r++);i.content.push(a)}return i}hydrateCstLeafNode(e){const n=this.getTokenType(e.tokenType),r=e.offset,i=e.length,s=e.startLine,a=e.startColumn,o=e.endLine,l=e.endColumn,u=e.hidden;return new pa(r,i,{start:{line:s,character:a},end:{line:o,character:l}},n,u)}getTokenType(e){return this.lexer.definition[e]}getGrammarElementId(e){if(e)return this.grammarElementIdMap.size===0&&this.createGrammarElementIdMap(),this.grammarElementIdMap.get(e)}getGrammarElement(e){return this.grammarElementIdMap.size===0&&this.createGrammarElementIdMap(),this.grammarElementIdMap.getKey(e)}createGrammarElementIdMap(){let e=0;for(const n of Jt(this.grammar))Bd(n)&&this.grammarElementIdMap.set(n,e++)}}function $t(t){return{documentation:{CommentProvider:e=>new y$(e),DocumentationProvider:e=>new g$(e)},parser:{AsyncParser:e=>new T$(e),GrammarConfig:e=>bh(e),LangiumParser:e=>yE(e),CompletionParser:e=>gE(e),ValueConverter:()=>new Wf,TokenBuilder:()=>new Vf,Lexer:e=>new e$(e),ParserErrorMessageProvider:()=>new Uf,LexerErrorMessageProvider:()=>new ZE},workspace:{AstNodeLocator:()=>new WE,AstNodeDescriptionProvider:e=>new HE(e),ReferenceDescriptionProvider:e=>new VE(e)},references:{Linker:e=>new IE(e),NameProvider:()=>new wE,ScopeProvider:e=>new ME(e),ScopeComputation:e=>new NE(e),References:e=>new _E(e)},serializer:{Hydrator:e=>new R$(e),JsonSerializer:e=>new FE(e)},validation:{DocumentValidator:e=>new BE(e),ValidationRegistry:e=>new UE(e)},shared:()=>t.shared}}function St(t){return{ServiceRegistry:e=>new GE(e),workspace:{LangiumDocuments:e=>new kE(e),LangiumDocumentFactory:e=>new xE(e),DocumentBuilder:e=>new YE(e),IndexManager:e=>new XE(e),WorkspaceManager:e=>new JE(e),FileSystemProvider:e=>t.fileSystemProvider(e),WorkspaceLock:()=>new v$,ConfigurationProvider:e=>new qE(e)}}}var Fu;(function(t){t.merge=(e,n)=>wi(wi({},e),n)})(Fu||(Fu={}));function ue(t,e,n,r,i,s,a,o,l){const u=[t,e,n,r,i,s,a,o,l].reduce(wi,{});return sd(u)}const A$=Symbol("isProxy");function sd(t,e){const n=new Proxy({},{deleteProperty:()=>!1,set:()=>{throw new Error("Cannot set property on injected service container")},get:(r,i)=>i===A$?!0:Uu(r,i,t,e||n),getOwnPropertyDescriptor:(r,i)=>(Uu(r,i,t,e||n),Object.getOwnPropertyDescriptor(r,i)),has:(r,i)=>i in t,ownKeys:()=>[...Object.getOwnPropertyNames(t)]});return n}const Gu=Symbol();function Uu(t,e,n,r){if(e in t){if(t[e]instanceof Error)throw new Error("Construction failure. Please make sure that your dependencies are constructable.",{cause:t[e]});if(t[e]===Gu)throw new Error('Cycle detected. Please make "'+String(e)+'" lazy. Visit https://langium.org/docs/reference/configuration-services/#resolving-cyclic-dependencies');return t[e]}else if(e in n){const i=n[e];t[e]=Gu;try{t[e]=typeof i=="function"?i(r):sd(i,r)}catch(s){throw t[e]=s instanceof Error?s:void 0,s}return t[e]}else return}function wi(t,e){if(e){for(const[n,r]of Object.entries(e))if(r!==void 0){const i=t[n];i!==null&&r!==null&&typeof i=="object"&&typeof r=="object"?t[n]=wi(i,r):t[n]=r}}return t}class E${readFile(){throw new Error("No file system is available.")}async readDirectory(){return[]}}const xt={fileSystemProvider:()=>new E$},$$={Grammar:()=>{},LanguageMetaData:()=>({caseInsensitive:!1,fileExtensions:[".langium"],languageId:"langium"})},S$={AstReflection:()=>new ic};function x$(){const t=ue(St(xt),S$),e=ue($t({shared:t}),$$);return t.ServiceRegistry.register(e),e}function Vt(t){var e;const n=x$(),r=n.serializer.JsonSerializer.deserialize(t);return n.shared.workspace.LangiumDocumentFactory.fromModel(r,Gt.parse(`memory://${(e=r.name)!==null&&e!==void 0?e:"grammar"}.langium`)),r}var k$=Object.defineProperty,A=(t,e)=>k$(t,"name",{value:e,configurable:!0}),Bu="Statement",Zr="Architecture";function I$(t){return He.isInstance(t,Zr)}A(I$,"isArchitecture");var Mr="Axis",Yn="Branch";function C$(t){return He.isInstance(t,Yn)}A(C$,"isBranch");var Dr="Checkout",Fr="CherryPicking",xs="ClassDefStatement",Xn="Commit";function w$(t){return He.isInstance(t,Xn)}A(w$,"isCommit");var ks="Curve",Is="Edge",Cs="Entry",Jn="GitGraph";function _$(t){return He.isInstance(t,Jn)}A(_$,"isGitGraph");var ws="Group",Qr="Info";function N$(t){return He.isInstance(t,Qr)}A(N$,"isInfo");var Gr="Item",_s="Junction",Zn="Merge";function b$(t){return He.isInstance(t,Zn)}A(b$,"isMerge");var Ns="Option",ei="Packet";function O$(t){return He.isInstance(t,ei)}A(O$,"isPacket");var ti="PacketBlock";function L$(t){return He.isInstance(t,ti)}A(L$,"isPacketBlock");var ni="Pie";function P$(t){return He.isInstance(t,ni)}A(P$,"isPie");var ri="PieSection";function M$(t){return He.isInstance(t,ri)}A(M$,"isPieSection");var bs="Radar",Os="Service",ii="Treemap";function D$(t){return He.isInstance(t,ii)}A(D$,"isTreemap");var Ls="TreemapRow",Ur="Direction",Br="Leaf",jr="Section",ad=class extends Yu{static{A(this,"MermaidAstReflection")}getAllTypes(){return[Zr,Mr,Yn,Dr,Fr,xs,Xn,ks,Ur,Is,Cs,Jn,ws,Qr,Gr,_s,Br,Zn,Ns,ei,ti,ni,ri,bs,jr,Os,Bu,ii,Ls]}computeIsSubtype(t,e){switch(t){case Yn:case Dr:case Fr:case Xn:case Zn:return this.isSubtype(Bu,e);case Ur:return this.isSubtype(Jn,e);case Br:case jr:return this.isSubtype(Gr,e);default:return!1}}getReferenceType(t){const e=`${t.container.$type}:${t.property}`;switch(e){case"Entry:axis":return Mr;default:throw new Error(`${e} is not a valid reference id.`)}}getTypeMetaData(t){switch(t){case Zr:return{name:Zr,properties:[{name:"accDescr"},{name:"accTitle"},{name:"edges",defaultValue:[]},{name:"groups",defaultValue:[]},{name:"junctions",defaultValue:[]},{name:"services",defaultValue:[]},{name:"title"}]};case Mr:return{name:Mr,properties:[{name:"label"},{name:"name"}]};case Yn:return{name:Yn,properties:[{name:"name"},{name:"order"}]};case Dr:return{name:Dr,properties:[{name:"branch"}]};case Fr:return{name:Fr,properties:[{name:"id"},{name:"parent"},{name:"tags",defaultValue:[]}]};case xs:return{name:xs,properties:[{name:"className"},{name:"styleText"}]};case Xn:return{name:Xn,properties:[{name:"id"},{name:"message"},{name:"tags",defaultValue:[]},{name:"type"}]};case ks:return{name:ks,properties:[{name:"entries",defaultValue:[]},{name:"label"},{name:"name"}]};case Is:return{name:Is,properties:[{name:"lhsDir"},{name:"lhsGroup",defaultValue:!1},{name:"lhsId"},{name:"lhsInto",defaultValue:!1},{name:"rhsDir"},{name:"rhsGroup",defaultValue:!1},{name:"rhsId"},{name:"rhsInto",defaultValue:!1},{name:"title"}]};case Cs:return{name:Cs,properties:[{name:"axis"},{name:"value"}]};case Jn:return{name:Jn,properties:[{name:"accDescr"},{name:"accTitle"},{name:"statements",defaultValue:[]},{name:"title"}]};case ws:return{name:ws,properties:[{name:"icon"},{name:"id"},{name:"in"},{name:"title"}]};case Qr:return{name:Qr,properties:[{name:"accDescr"},{name:"accTitle"},{name:"title"}]};case Gr:return{name:Gr,properties:[{name:"classSelector"},{name:"name"}]};case _s:return{name:_s,properties:[{name:"id"},{name:"in"}]};case Zn:return{name:Zn,properties:[{name:"branch"},{name:"id"},{name:"tags",defaultValue:[]},{name:"type"}]};case Ns:return{name:Ns,properties:[{name:"name"},{name:"value",defaultValue:!1}]};case ei:return{name:ei,properties:[{name:"accDescr"},{name:"accTitle"},{name:"blocks",defaultValue:[]},{name:"title"}]};case ti:return{name:ti,properties:[{name:"bits"},{name:"end"},{name:"label"},{name:"start"}]};case ni:return{name:ni,properties:[{name:"accDescr"},{name:"accTitle"},{name:"sections",defaultValue:[]},{name:"showData",defaultValue:!1},{name:"title"}]};case ri:return{name:ri,properties:[{name:"label"},{name:"value"}]};case bs:return{name:bs,properties:[{name:"accDescr"},{name:"accTitle"},{name:"axes",defaultValue:[]},{name:"curves",defaultValue:[]},{name:"options",defaultValue:[]},{name:"title"}]};case Os:return{name:Os,properties:[{name:"icon"},{name:"iconText"},{name:"id"},{name:"in"},{name:"title"}]};case ii:return{name:ii,properties:[{name:"accDescr"},{name:"accTitle"},{name:"title"},{name:"TreemapRows",defaultValue:[]}]};case Ls:return{name:Ls,properties:[{name:"indent"},{name:"item"}]};case Ur:return{name:Ur,properties:[{name:"accDescr"},{name:"accTitle"},{name:"dir"},{name:"statements",defaultValue:[]},{name:"title"}]};case Br:return{name:Br,properties:[{name:"classSelector"},{name:"name"},{name:"value"}]};case jr:return{name:jr,properties:[{name:"classSelector"},{name:"name"}]};default:return{name:t,properties:[]}}}},He=new ad,ju,F$=A(()=>ju??(ju=Vt(`{"$type":"Grammar","isDeclared":true,"name":"Info","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Info","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[],"cardinality":"*"},{"$type":"Keyword","value":"info"},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[],"cardinality":"*"},{"$type":"Group","elements":[{"$type":"Keyword","value":"showInfo"},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[],"cardinality":"*"}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[],"cardinality":"?"}]},"definesHiddenTokens":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","fragment":true,"name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}],"cardinality":"+"},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"}},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"}}]},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@7"}},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@8"}}]},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/"},"fragment":false}],"definesHiddenTokens":false,"hiddenTokens":[],"interfaces":[],"types":[],"usedGrammars":[]}`)),"InfoGrammar"),Ku,G$=A(()=>Ku??(Ku=Vt(`{"$type":"Grammar","isDeclared":true,"name":"Packet","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Packet","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[],"cardinality":"*"},{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"packet"},{"$type":"Keyword","value":"packet-beta"}]},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]},{"$type":"Assignment","feature":"blocks","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}],"cardinality":"*"}]},"definesHiddenTokens":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"PacketBlock","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Assignment","feature":"start","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"-"},{"$type":"Assignment","feature":"end","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}}],"cardinality":"?"}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"+"},{"$type":"Assignment","feature":"bits","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}}]}]},{"$type":"Keyword","value":":"},{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","fragment":true,"name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}],"cardinality":"+"},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"}},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"}}]},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@8"}},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@9"}}]},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/"},"fragment":false}],"definesHiddenTokens":false,"hiddenTokens":[],"interfaces":[],"types":[],"usedGrammars":[]}`)),"PacketGrammar"),Hu,U$=A(()=>Hu??(Hu=Vt(`{"$type":"Grammar","isDeclared":true,"name":"Pie","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Pie","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[],"cardinality":"*"},{"$type":"Keyword","value":"pie"},{"$type":"Assignment","feature":"showData","operator":"?=","terminal":{"$type":"Keyword","value":"showData"},"cardinality":"?"},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]},{"$type":"Assignment","feature":"sections","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}],"cardinality":"*"}]},"definesHiddenTokens":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"PieSection","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]}},{"$type":"Keyword","value":":"},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"FLOAT_PIE","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/-?[0-9]+\\\\.[0-9]+(?!\\\\.)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT_PIE","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/-?(0|[1-9][0-9]*)(?!\\\\.)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER_PIE","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@2"}},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@3"}}]},"fragment":false,"hidden":false},{"$type":"ParserRule","fragment":true,"name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}],"cardinality":"+"},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"}},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"}}]},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@11"}},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@12"}}]},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/"},"fragment":false}],"definesHiddenTokens":false,"hiddenTokens":[],"interfaces":[],"types":[],"usedGrammars":[]}`)),"PieGrammar"),Vu,B$=A(()=>Vu??(Vu=Vt(`{"$type":"Grammar","isDeclared":true,"name":"Architecture","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Architecture","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[],"cardinality":"*"},{"$type":"Keyword","value":"architecture-beta"},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}],"cardinality":"*"}]},"definesHiddenTokens":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","fragment":true,"name":"Statement","definition":{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"groups","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Assignment","feature":"services","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}},{"$type":"Assignment","feature":"junctions","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}},{"$type":"Assignment","feature":"edges","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","fragment":true,"name":"LeftPort","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":":"},{"$type":"Assignment","feature":"lhsDir","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","fragment":true,"name":"RightPort","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"rhsDir","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}},{"$type":"Keyword","value":":"}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","fragment":true,"name":"Arrow","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]},{"$type":"Assignment","feature":"lhsInto","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]},"cardinality":"?"},{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"--"},{"$type":"Group","elements":[{"$type":"Keyword","value":"-"},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@29"},"arguments":[]}},{"$type":"Keyword","value":"-"}]}]},{"$type":"Assignment","feature":"rhsInto","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]},"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Group","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"group"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}},{"$type":"Assignment","feature":"icon","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@28"},"arguments":[]},"cardinality":"?"},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@29"},"arguments":[]},"cardinality":"?"},{"$type":"Group","elements":[{"$type":"Keyword","value":"in"},{"$type":"Assignment","feature":"in","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Service","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"service"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"iconText","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@21"},"arguments":[]}},{"$type":"Assignment","feature":"icon","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@28"},"arguments":[]}}],"cardinality":"?"},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@29"},"arguments":[]},"cardinality":"?"},{"$type":"Group","elements":[{"$type":"Keyword","value":"in"},{"$type":"Assignment","feature":"in","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Junction","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"junction"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"in"},{"$type":"Assignment","feature":"in","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Edge","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"lhsId","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}},{"$type":"Assignment","feature":"lhsGroup","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]},"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]},{"$type":"Assignment","feature":"rhsId","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}},{"$type":"Assignment","feature":"rhsGroup","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]},"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"ARROW_DIRECTION","definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"L"}},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"R"}}]},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"T"}}]},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"B"}}]},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARROW_GROUP","definition":{"$type":"RegexToken","regex":"/\\\\{group\\\\}/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARROW_INTO","definition":{"$type":"RegexToken","regex":"/<|>/"},"fragment":false,"hidden":false},{"$type":"ParserRule","fragment":true,"name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}],"cardinality":"+"},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"}},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"}}]},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@18"}},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@19"}}]},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/"},"fragment":false},{"$type":"TerminalRule","name":"ARCH_ICON","definition":{"$type":"RegexToken","regex":"/\\\\([\\\\w-:]+\\\\)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARCH_TITLE","definition":{"$type":"RegexToken","regex":"/\\\\[[\\\\w ]+\\\\]/"},"fragment":false,"hidden":false}],"definesHiddenTokens":false,"hiddenTokens":[],"interfaces":[],"types":[],"usedGrammars":[]}`)),"ArchitectureGrammar"),Wu,j$=A(()=>Wu??(Wu=Vt(`{"$type":"Grammar","isDeclared":true,"name":"GitGraph","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"GitGraph","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[],"cardinality":"*"},{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"gitGraph"},{"$type":"Group","elements":[{"$type":"Keyword","value":"gitGraph"},{"$type":"Keyword","value":":"}]},{"$type":"Keyword","value":"gitGraph:"},{"$type":"Group","elements":[{"$type":"Keyword","value":"gitGraph"},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]},{"$type":"Keyword","value":":"}]}]},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]},{"$type":"Assignment","feature":"statements","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}}],"cardinality":"*"}]},"definesHiddenTokens":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Statement","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Direction","definition":{"$type":"Assignment","feature":"dir","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"LR"},{"$type":"Keyword","value":"TB"},{"$type":"Keyword","value":"BT"}]}},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Commit","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"commit"},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Keyword","value":"id:"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"msg:","cardinality":"?"},{"$type":"Assignment","feature":"message","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"tag:"},{"$type":"Assignment","feature":"tags","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"type:"},{"$type":"Assignment","feature":"type","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"NORMAL"},{"$type":"Keyword","value":"REVERSE"},{"$type":"Keyword","value":"HIGHLIGHT"}]}}]}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Branch","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"branch"},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@24"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"order:"},{"$type":"Assignment","feature":"order","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Merge","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"merge"},{"$type":"Assignment","feature":"branch","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@24"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}]}},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Keyword","value":"id:"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"tag:"},{"$type":"Assignment","feature":"tags","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"type:"},{"$type":"Assignment","feature":"type","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"NORMAL"},{"$type":"Keyword","value":"REVERSE"},{"$type":"Keyword","value":"HIGHLIGHT"}]}}]}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Checkout","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"checkout"},{"$type":"Keyword","value":"switch"}]},{"$type":"Assignment","feature":"branch","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@24"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"CherryPicking","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"cherry-pick"},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Keyword","value":"id:"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"tag:"},{"$type":"Assignment","feature":"tags","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"parent:"},{"$type":"Assignment","feature":"parent","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","fragment":true,"name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}],"cardinality":"+"},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"}},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"}}]},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@14"}},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@15"}}]},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/"},"fragment":false},{"$type":"TerminalRule","name":"REFERENCE","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\\\w([-\\\\./\\\\w]*[-\\\\w])?/"},"fragment":false,"hidden":false}],"definesHiddenTokens":false,"hiddenTokens":[],"interfaces":[],"types":[],"usedGrammars":[]}`)),"GitGraphGrammar"),zu,K$=A(()=>zu??(zu=Vt(`{"$type":"Grammar","isDeclared":true,"name":"Radar","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Radar","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"},{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"radar-beta"},{"$type":"Keyword","value":"radar-beta:"},{"$type":"Group","elements":[{"$type":"Keyword","value":"radar-beta"},{"$type":"Keyword","value":":"}]}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]},{"$type":"Group","elements":[{"$type":"Keyword","value":"axis"},{"$type":"Assignment","feature":"axes","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"axes","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}}],"cardinality":"*"}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"curve"},{"$type":"Assignment","feature":"curves","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"curves","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}}],"cardinality":"*"}]},{"$type":"Group","elements":[{"$type":"Assignment","feature":"options","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"options","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}}],"cardinality":"*"}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}],"cardinality":"*"}]},"definesHiddenTokens":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","fragment":true,"name":"Label","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[]}},{"$type":"Keyword","value":"]"}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Axis","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[],"cardinality":"?"}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Curve","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[],"cardinality":"?"},{"$type":"Keyword","value":"{"},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]},{"$type":"Keyword","value":"}"}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","fragment":true,"name":"Entries","definition":{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"},{"$type":"Assignment","feature":"entries","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"},{"$type":"Assignment","feature":"entries","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"}]},{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"},{"$type":"Assignment","feature":"entries","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"},{"$type":"Assignment","feature":"entries","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"}]}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"DetailedEntry","returnType":{"$ref":"#/interfaces@0"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"axis","operator":"=","terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@2"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},"deprecatedSyntax":false}},{"$type":"Keyword","value":":","cardinality":"?"},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"NumberEntry","returnType":{"$ref":"#/interfaces@0"},"definition":{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Option","definition":{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Keyword","value":"showLegend"}},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Keyword","value":"ticks"}},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Keyword","value":"max"}},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Keyword","value":"min"}},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Keyword","value":"graticule"}},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}}]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"GRATICULE","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"circle"}},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"polygon"}}]},"fragment":false,"hidden":false},{"$type":"ParserRule","fragment":true,"name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}],"cardinality":"+"},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"}},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"}}]},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@15"}},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@16"}}]},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/"},"fragment":false}],"interfaces":[{"$type":"Interface","name":"Entry","attributes":[{"$type":"TypeAttribute","name":"axis","isOptional":true,"type":{"$type":"ReferenceType","referenceType":{"$type":"SimpleType","typeRef":{"$ref":"#/rules@2"}}}},{"$type":"TypeAttribute","name":"value","type":{"$type":"SimpleType","primitiveType":"number"},"isOptional":false}],"superTypes":[]}],"definesHiddenTokens":false,"hiddenTokens":[],"types":[],"usedGrammars":[]}`)),"RadarGrammar"),qu,H$=A(()=>qu??(qu=Vt(`{"$type":"Grammar","isDeclared":true,"name":"Treemap","rules":[{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}}],"cardinality":"+"},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"}},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"}}]},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/"},"fragment":false,"hidden":false},{"$type":"ParserRule","entry":true,"name":"Treemap","returnType":{"$ref":"#/interfaces@4"},"definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@0"},"arguments":[]},{"$type":"Assignment","feature":"TreemapRows","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]}}],"cardinality":"*"}]},"definesHiddenTokens":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"TREEMAP_KEYWORD","definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"treemap-beta"}},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"treemap"}}]},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"CLASS_DEF","definition":{"$type":"RegexToken","regex":"/classDef\\\\s+([a-zA-Z_][a-zA-Z0-9_]+)(?:\\\\s+([^;\\\\r\\\\n]*))?(?:;)?/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STYLE_SEPARATOR","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":":::"}},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"SEPARATOR","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":":"}},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"COMMA","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":","}},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WS","definition":{"$type":"RegexToken","regex":"/[ \\\\t]+/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"ML_COMMENT","definition":{"$type":"RegexToken","regex":"/\\\\%\\\\%[^\\\\n]*/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"NL","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/"},"fragment":false},{"$type":"ParserRule","name":"TreemapRow","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"indent","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},"cardinality":"?"},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"item","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"ClassDef","dataType":"string","definition":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Item","returnType":{"$ref":"#/interfaces@0"},"definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Section","returnType":{"$ref":"#/interfaces@1"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]},{"$type":"Assignment","feature":"classSelector","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}],"cardinality":"?"}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Leaf","returnType":{"$ref":"#/interfaces@2"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[],"cardinality":"?"},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[],"cardinality":"?"},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]},{"$type":"Assignment","feature":"classSelector","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}],"cardinality":"?"}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"INDENTATION","definition":{"$type":"RegexToken","regex":"/[ \\\\t]{1,}/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID2","definition":{"$type":"RegexToken","regex":"/[a-zA-Z_][a-zA-Z0-9_]*/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER2","definition":{"$type":"RegexToken","regex":"/[0-9_\\\\.\\\\,]+/"},"fragment":false,"hidden":false},{"$type":"ParserRule","name":"MyNumber","dataType":"number","definition":{"$type":"RuleCall","rule":{"$ref":"#/rules@21"},"arguments":[]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"STRING2","definition":{"$type":"RegexToken","regex":"/\\"[^\\"]*\\"|'[^']*'/"},"fragment":false,"hidden":false}],"interfaces":[{"$type":"Interface","name":"Item","attributes":[{"$type":"TypeAttribute","name":"name","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false},{"$type":"TypeAttribute","name":"classSelector","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]},{"$type":"Interface","name":"Section","superTypes":[{"$ref":"#/interfaces@0"}],"attributes":[]},{"$type":"Interface","name":"Leaf","superTypes":[{"$ref":"#/interfaces@0"}],"attributes":[{"$type":"TypeAttribute","name":"value","type":{"$type":"SimpleType","primitiveType":"number"},"isOptional":false}]},{"$type":"Interface","name":"ClassDefStatement","attributes":[{"$type":"TypeAttribute","name":"className","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false},{"$type":"TypeAttribute","name":"styleText","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"Treemap","attributes":[{"$type":"TypeAttribute","name":"TreemapRows","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/rules@14"}}},"isOptional":false},{"$type":"TypeAttribute","name":"title","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accTitle","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accDescr","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]}],"definesHiddenTokens":false,"hiddenTokens":[],"imports":[],"types":[],"usedGrammars":[],"$comment":"/**\\n * Treemap grammar for Langium\\n * Converted from mindmap grammar\\n *\\n * The ML_COMMENT and NL hidden terminals handle whitespace, comments, and newlines\\n * before the treemap keyword, allowing for empty lines and comments before the\\n * treemap declaration.\\n */"}`)),"TreemapGrammar"),V$={languageId:"info",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},W$={languageId:"packet",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},z$={languageId:"pie",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},q$={languageId:"architecture",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},Y$={languageId:"gitGraph",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},X$={languageId:"radar",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},J$={languageId:"treemap",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},Wt={AstReflection:A(()=>new ad,"AstReflection")},Z$={Grammar:A(()=>F$(),"Grammar"),LanguageMetaData:A(()=>V$,"LanguageMetaData"),parser:{}},Q$={Grammar:A(()=>G$(),"Grammar"),LanguageMetaData:A(()=>W$,"LanguageMetaData"),parser:{}},eS={Grammar:A(()=>U$(),"Grammar"),LanguageMetaData:A(()=>z$,"LanguageMetaData"),parser:{}},tS={Grammar:A(()=>B$(),"Grammar"),LanguageMetaData:A(()=>q$,"LanguageMetaData"),parser:{}},nS={Grammar:A(()=>j$(),"Grammar"),LanguageMetaData:A(()=>Y$,"LanguageMetaData"),parser:{}},rS={Grammar:A(()=>K$(),"Grammar"),LanguageMetaData:A(()=>X$,"LanguageMetaData"),parser:{}},iS={Grammar:A(()=>H$(),"Grammar"),LanguageMetaData:A(()=>J$,"LanguageMetaData"),parser:{}},sS=/accDescr(?:[\t ]*:([^\n\r]*)|\s*{([^}]*)})/,aS=/accTitle[\t ]*:([^\n\r]*)/,oS=/title([\t ][^\n\r]*|)/,lS={ACC_DESCR:sS,ACC_TITLE:aS,TITLE:oS},es=class extends Wf{static{A(this,"AbstractMermaidValueConverter")}runConverter(t,e,n){let r=this.runCommonConverter(t,e,n);return r===void 0&&(r=this.runCustomConverter(t,e,n)),r===void 0?super.runConverter(t,e,n):r}runCommonConverter(t,e,n){const r=lS[t.name];if(r===void 0)return;const i=r.exec(e);if(i!==null){if(i[1]!==void 0)return i[1].trim().replace(/[\t ]{2,}/gm," ");if(i[2]!==void 0)return i[2].replace(/^\s*/gm,"").replace(/\s+$/gm,"").replace(/[\t ]{2,}/gm," ").replace(/[\n\r]{2,}/gm,` +`)}}},ts=class extends es{static{A(this,"CommonValueConverter")}runCustomConverter(t,e,n){}},kt=class extends Vf{static{A(this,"AbstractMermaidTokenBuilder")}constructor(t){super(),this.keywords=new Set(t)}buildKeywordTokens(t,e,n){const r=super.buildKeywordTokens(t,e,n);return r.forEach(i=>{this.keywords.has(i.name)&&i.PATTERN!==void 0&&(i.PATTERN=new RegExp(i.PATTERN.toString()+"(?:(?=%%)|(?!\\S))"))}),r}};(class extends kt{static{A(this,"CommonTokenBuilder")}});var uS=class extends kt{static{A(this,"GitGraphTokenBuilder")}constructor(){super(["gitGraph"])}},od={parser:{TokenBuilder:A(()=>new uS,"TokenBuilder"),ValueConverter:A(()=>new ts,"ValueConverter")}};function ld(t=xt){const e=ue(St(t),Wt),n=ue($t({shared:e}),nS,od);return e.ServiceRegistry.register(n),{shared:e,GitGraph:n}}A(ld,"createGitGraphServices");var cS=class extends kt{static{A(this,"InfoTokenBuilder")}constructor(){super(["info","showInfo"])}},ud={parser:{TokenBuilder:A(()=>new cS,"TokenBuilder"),ValueConverter:A(()=>new ts,"ValueConverter")}};function cd(t=xt){const e=ue(St(t),Wt),n=ue($t({shared:e}),Z$,ud);return e.ServiceRegistry.register(n),{shared:e,Info:n}}A(cd,"createInfoServices");var fS=class extends kt{static{A(this,"PacketTokenBuilder")}constructor(){super(["packet"])}},fd={parser:{TokenBuilder:A(()=>new fS,"TokenBuilder"),ValueConverter:A(()=>new ts,"ValueConverter")}};function dd(t=xt){const e=ue(St(t),Wt),n=ue($t({shared:e}),Q$,fd);return e.ServiceRegistry.register(n),{shared:e,Packet:n}}A(dd,"createPacketServices");var dS=class extends kt{static{A(this,"PieTokenBuilder")}constructor(){super(["pie","showData"])}},hS=class extends es{static{A(this,"PieValueConverter")}runCustomConverter(t,e,n){if(t.name==="PIE_SECTION_LABEL")return e.replace(/"/g,"").trim()}},hd={parser:{TokenBuilder:A(()=>new dS,"TokenBuilder"),ValueConverter:A(()=>new hS,"ValueConverter")}};function pd(t=xt){const e=ue(St(t),Wt),n=ue($t({shared:e}),eS,hd);return e.ServiceRegistry.register(n),{shared:e,Pie:n}}A(pd,"createPieServices");var pS=class extends kt{static{A(this,"ArchitectureTokenBuilder")}constructor(){super(["architecture"])}},mS=class extends es{static{A(this,"ArchitectureValueConverter")}runCustomConverter(t,e,n){if(t.name==="ARCH_ICON")return e.replace(/[()]/g,"").trim();if(t.name==="ARCH_TEXT_ICON")return e.replace(/["()]/g,"");if(t.name==="ARCH_TITLE")return e.replace(/[[\]]/g,"").trim()}},md={parser:{TokenBuilder:A(()=>new pS,"TokenBuilder"),ValueConverter:A(()=>new mS,"ValueConverter")}};function gd(t=xt){const e=ue(St(t),Wt),n=ue($t({shared:e}),tS,md);return e.ServiceRegistry.register(n),{shared:e,Architecture:n}}A(gd,"createArchitectureServices");var gS=class extends kt{static{A(this,"RadarTokenBuilder")}constructor(){super(["radar-beta"])}},yd={parser:{TokenBuilder:A(()=>new gS,"TokenBuilder"),ValueConverter:A(()=>new ts,"ValueConverter")}};function Td(t=xt){const e=ue(St(t),Wt),n=ue($t({shared:e}),rS,yd);return e.ServiceRegistry.register(n),{shared:e,Radar:n}}A(Td,"createRadarServices");var yS=class extends kt{static{A(this,"TreemapTokenBuilder")}constructor(){super(["treemap"])}},TS=/classDef\s+([A-Z_a-z]\w+)(?:\s+([^\n\r;]*))?;?/,vS=class extends es{static{A(this,"TreemapValueConverter")}runCustomConverter(t,e,n){if(t.name==="NUMBER2")return parseFloat(e.replace(/,/g,""));if(t.name==="SEPARATOR")return e.substring(1,e.length-1);if(t.name==="STRING2")return e.substring(1,e.length-1);if(t.name==="INDENTATION")return e.length;if(t.name==="ClassDef"){if(typeof e!="string")return e;const r=TS.exec(e);if(r)return{$type:"ClassDefStatement",className:r[1],styleText:r[2]||void 0}}}};function vd(t){const e=t.validation.TreemapValidator,n=t.validation.ValidationRegistry;if(n){const r={Treemap:e.checkSingleRoot.bind(e)};n.register(r,e)}}A(vd,"registerValidationChecks");var RS=class{static{A(this,"TreemapValidator")}checkSingleRoot(t,e){let n;for(const r of t.TreemapRows)r.item&&(n===void 0&&r.indent===void 0?n=0:r.indent===void 0?e("error","Multiple root nodes are not allowed in a treemap.",{node:r,property:"item"}):n!==void 0&&n>=parseInt(r.indent,10)&&e("error","Multiple root nodes are not allowed in a treemap.",{node:r,property:"item"}))}},Rd={parser:{TokenBuilder:A(()=>new yS,"TokenBuilder"),ValueConverter:A(()=>new vS,"ValueConverter")},validation:{TreemapValidator:A(()=>new RS,"TreemapValidator")}};function Ad(t=xt){const e=ue(St(t),Wt),n=ue($t({shared:e}),iS,Rd);return e.ServiceRegistry.register(n),vd(n),{shared:e,Treemap:n}}A(Ad,"createTreemapServices");var nt={},AS={info:A(async()=>{const{createInfoServices:t}=await wt(async()=>{const{createInfoServices:n}=await Promise.resolve().then(()=>SS);return{createInfoServices:n}},void 0),e=t().Info.parser.LangiumParser;nt.info=e},"info"),packet:A(async()=>{const{createPacketServices:t}=await wt(async()=>{const{createPacketServices:n}=await Promise.resolve().then(()=>xS);return{createPacketServices:n}},void 0),e=t().Packet.parser.LangiumParser;nt.packet=e},"packet"),pie:A(async()=>{const{createPieServices:t}=await wt(async()=>{const{createPieServices:n}=await Promise.resolve().then(()=>kS);return{createPieServices:n}},void 0),e=t().Pie.parser.LangiumParser;nt.pie=e},"pie"),architecture:A(async()=>{const{createArchitectureServices:t}=await wt(async()=>{const{createArchitectureServices:n}=await Promise.resolve().then(()=>IS);return{createArchitectureServices:n}},void 0),e=t().Architecture.parser.LangiumParser;nt.architecture=e},"architecture"),gitGraph:A(async()=>{const{createGitGraphServices:t}=await wt(async()=>{const{createGitGraphServices:n}=await Promise.resolve().then(()=>CS);return{createGitGraphServices:n}},void 0),e=t().GitGraph.parser.LangiumParser;nt.gitGraph=e},"gitGraph"),radar:A(async()=>{const{createRadarServices:t}=await wt(async()=>{const{createRadarServices:n}=await Promise.resolve().then(()=>wS);return{createRadarServices:n}},void 0),e=t().Radar.parser.LangiumParser;nt.radar=e},"radar"),treemap:A(async()=>{const{createTreemapServices:t}=await wt(async()=>{const{createTreemapServices:n}=await Promise.resolve().then(()=>_S);return{createTreemapServices:n}},void 0),e=t().Treemap.parser.LangiumParser;nt.treemap=e},"treemap")};async function ES(t,e){const n=AS[t];if(!n)throw new Error(`Unknown diagram type: ${t}`);nt[t]||await n();const i=nt[t].parse(e);if(i.lexerErrors.length>0||i.parserErrors.length>0)throw new $S(i);return i.value}A(ES,"parse");var $S=class extends Error{constructor(t){const e=t.lexerErrors.map(r=>r.message).join(` +`),n=t.parserErrors.map(r=>r.message).join(` +`);super(`Parsing failed: ${e} ${n}`),this.result=t}static{A(this,"MermaidParseError")}};const SS=Object.freeze(Object.defineProperty({__proto__:null,InfoModule:ud,createInfoServices:cd},Symbol.toStringTag,{value:"Module"})),xS=Object.freeze(Object.defineProperty({__proto__:null,PacketModule:fd,createPacketServices:dd},Symbol.toStringTag,{value:"Module"})),kS=Object.freeze(Object.defineProperty({__proto__:null,PieModule:hd,createPieServices:pd},Symbol.toStringTag,{value:"Module"})),IS=Object.freeze(Object.defineProperty({__proto__:null,ArchitectureModule:md,createArchitectureServices:gd},Symbol.toStringTag,{value:"Module"})),CS=Object.freeze(Object.defineProperty({__proto__:null,GitGraphModule:od,createGitGraphServices:ld},Symbol.toStringTag,{value:"Module"})),wS=Object.freeze(Object.defineProperty({__proto__:null,RadarModule:yd,createRadarServices:Td},Symbol.toStringTag,{value:"Module"})),_S=Object.freeze(Object.defineProperty({__proto__:null,TreemapModule:Rd,createTreemapServices:Ad},Symbol.toStringTag,{value:"Module"}));export{ES as p}; diff --git a/_astro/vm.C4h557K-.png b/_astro/vm.C4h557K-.png new file mode 100644 index 00000000..75f8fd78 Binary files /dev/null and b/_astro/vm.C4h557K-.png differ diff --git a/_astro/xychartDiagram-PRI3JC2R.Cow3WGXm.js b/_astro/xychartDiagram-PRI3JC2R.Cow3WGXm.js new file mode 100644 index 00000000..0ba54d43 --- /dev/null +++ b/_astro/xychartDiagram-PRI3JC2R.Cow3WGXm.js @@ -0,0 +1,7 @@ +import{_ as a,s as ei,g as si,q as Lt,p as ni,a as ai,b as ri,l as Et,H as oi,e as hi,y as li,E as xt,D as It,F as ci,K as ui,i as gi,aA as xi,R as Tt}from"./mermaid.core.LbQlJBBQ.js";import{i as di}from"./init.Gi6I4Gst.js";import{o as fi}from"./ordinal.BYWQX77i.js";import{l as Dt}from"./linear.B94hpPI-.js";import"./page._rMDHl_T.js";import"./defaultLocale.C4B-KCzX.js";function pi(t,i,e){t=+t,i=+i,e=(n=arguments.length)<2?(i=t,t=0,1):n<3?1:+e;for(var s=-1,n=Math.max(0,Math.ceil((i-t)/e))|0,x=new Array(n);++s"u"&&(R.yylloc={});var at=R.yylloc;r.push(at);var ti=R.options&&R.options.ranges;typeof Y.yy.parseError=="function"?this.parseError=Y.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ii(V){u.length=u.length-2*V,A.length=A.length-V,r.length=r.length-V}a(ii,"popStack");function kt(){var V;return V=d.pop()||R.lex()||_t,typeof V!="number"&&(V instanceof Array&&(d=V,V=d.pop()),V=c.symbols_[V]||V),V}a(kt,"lex");for(var M,H,B,rt,q={},tt,O,Rt,it;;){if(H=u[u.length-1],this.defaultActions[H]?B=this.defaultActions[H]:((M===null||typeof M>"u")&&(M=kt()),B=j[H]&&j[H][M]),typeof B>"u"||!B.length||!B[0]){var ot="";it=[];for(tt in j[H])this.terminals_[tt]&&tt>Zt&&it.push("'"+this.terminals_[tt]+"'");R.showPosition?ot="Parse error on line "+(J+1)+`: +`+R.showPosition()+` +Expecting `+it.join(", ")+", got '"+(this.terminals_[M]||M)+"'":ot="Parse error on line "+(J+1)+": Unexpected "+(M==_t?"end of input":"'"+(this.terminals_[M]||M)+"'"),this.parseError(ot,{text:R.match,token:this.terminals_[M]||M,line:R.yylineno,loc:at,expected:it})}if(B[0]instanceof Array&&B.length>1)throw new Error("Parse Error: multiple actions possible at state: "+H+", token: "+M);switch(B[0]){case 1:u.push(M),A.push(R.yytext),r.push(R.yylloc),u.push(B[1]),M=null,St=R.yyleng,f=R.yytext,J=R.yylineno,at=R.yylloc;break;case 2:if(O=this.productions_[B[1]][1],q.$=A[A.length-O],q._$={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},ti&&(q._$.range=[r[r.length-(O||1)].range[0],r[r.length-1].range[1]]),rt=this.performAction.apply(q,[f,St,J,Y.yy,B[1],A,r].concat(Jt)),typeof rt<"u")return rt;O&&(u=u.slice(0,-1*O*2),A=A.slice(0,-1*O),r=r.slice(0,-1*O)),u.push(this.productions_[B[1]][0]),A.push(q.$),r.push(q._$),Rt=j[u[u.length-2]][u[u.length-1]],u.push(Rt);break;case 3:return!0}}return!0},"parse")},Ct=(function(){var F={EOF:1,parseError:a(function(c,u){if(this.yy.parser)this.yy.parser.parseError(c,u);else throw new Error(c)},"parseError"),setInput:a(function(o,c){return this.yy=c||this.yy||{},this._input=o,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:a(function(){var o=this._input[0];this.yytext+=o,this.yyleng++,this.offset++,this.match+=o,this.matched+=o;var c=o.match(/(?:\r\n?|\n).*/g);return c?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),o},"input"),unput:a(function(o){var c=o.length,u=o.split(/(?:\r\n?|\n)/g);this._input=o+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-c),this.offset-=c;var d=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),u.length-1&&(this.yylineno-=u.length-1);var A=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:u?(u.length===d.length?this.yylloc.first_column:0)+d[d.length-u.length].length-u[0].length:this.yylloc.first_column-c},this.options.ranges&&(this.yylloc.range=[A[0],A[0]+this.yyleng-c]),this.yyleng=this.yytext.length,this},"unput"),more:a(function(){return this._more=!0,this},"more"),reject:a(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:a(function(o){this.unput(this.match.slice(o))},"less"),pastInput:a(function(){var o=this.matched.substr(0,this.matched.length-this.match.length);return(o.length>20?"...":"")+o.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:a(function(){var o=this.match;return o.length<20&&(o+=this._input.substr(0,20-o.length)),(o.substr(0,20)+(o.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:a(function(){var o=this.pastInput(),c=new Array(o.length+1).join("-");return o+this.upcomingInput()+` +`+c+"^"},"showPosition"),test_match:a(function(o,c){var u,d,A;if(this.options.backtrack_lexer&&(A={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&&(A.yylloc.range=this.yylloc.range.slice(0))),d=o[0].match(/(?:\r\n?|\n).*/g),d&&(this.yylineno+=d.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:d?d[d.length-1].length-d[d.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+o[0].length},this.yytext+=o[0],this.match+=o[0],this.matches=o,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(o[0].length),this.matched+=o[0],u=this.performAction.call(this,this.yy,this,c,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),u)return u;if(this._backtrack){for(var r in A)this[r]=A[r];return!1}return!1},"test_match"),next:a(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var o,c,u,d;this._more||(this.yytext="",this.match="");for(var A=this._currentRules(),r=0;rc[0].length)){if(c=u,d=r,this.options.backtrack_lexer){if(o=this.test_match(u,A[r]),o!==!1)return o;if(this._backtrack){c=!1;continue}else return!1}else if(!this.options.flex)break}return c?(o=this.test_match(c,A[d]),o!==!1?o:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:a(function(){var c=this.next();return c||this.lex()},"lex"),begin:a(function(c){this.conditionStack.push(c)},"begin"),popState:a(function(){var c=this.conditionStack.length-1;return c>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:a(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:a(function(c){return c=this.conditionStack.length-1-Math.abs(c||0),c>=0?this.conditionStack[c]:"INITIAL"},"topState"),pushState:a(function(c){this.begin(c)},"pushState"),stateStackSize:a(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:a(function(c,u,d,A){switch(d){case 0:break;case 1:break;case 2:return this.popState(),34;case 3:return this.popState(),34;case 4:return 34;case 5:break;case 6:return 10;case 7:return this.pushState("acc_title"),19;case 8:return this.popState(),"acc_title_value";case 9:return this.pushState("acc_descr"),21;case 10:return this.popState(),"acc_descr_value";case 11:this.pushState("acc_descr_multiline");break;case 12:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:return 5;case 15:return 5;case 16:return 8;case 17:return this.pushState("axis_data"),"X_AXIS";case 18:return this.pushState("axis_data"),"Y_AXIS";case 19:return this.pushState("axis_band_data"),24;case 20:return 31;case 21:return this.pushState("data"),16;case 22:return this.pushState("data"),18;case 23:return this.pushState("data_inner"),24;case 24:return 27;case 25:return this.popState(),26;case 26:this.popState();break;case 27:this.pushState("string");break;case 28:this.popState();break;case 29:return"STR";case 30:return 24;case 31:return 26;case 32:return 43;case 33:return"COLON";case 34:return 44;case 35:return 28;case 36:return 45;case 37:return 46;case 38:return 48;case 39:return 50;case 40:return 47;case 41:return 41;case 42:return 49;case 43:return 42;case 44:break;case 45:return 35;case 46:return 36}},"anonymous"),rules:[/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:(\r?\n))/i,/^(?:(\r?\n))/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:title\b)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:\{)/i,/^(?:[^\}]*)/i,/^(?:xychart-beta\b)/i,/^(?:xychart\b)/i,/^(?:(?:vertical|horizontal))/i,/^(?:x-axis\b)/i,/^(?:y-axis\b)/i,/^(?:\[)/i,/^(?:-->)/i,/^(?:line\b)/i,/^(?:bar\b)/i,/^(?:\[)/i,/^(?:[+-]?(?:\d+(?:\.\d+)?|\.\d+))/i,/^(?:\])/i,/^(?:(?:`\) \{ this\.pushState\(md_string\); \}\n\(\?:\(\?!`"\)\.\)\+ \{ return MD_STR; \}\n\(\?:`))/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:\[)/i,/^(?:\])/i,/^(?:[A-Za-z]+)/i,/^(?::)/i,/^(?:\+)/i,/^(?:,)/i,/^(?:=)/i,/^(?:\*)/i,/^(?:#)/i,/^(?:[\_])/i,/^(?:\.)/i,/^(?:&)/i,/^(?:-)/i,/^(?:[0-9]+)/i,/^(?:\s+)/i,/^(?:;)/i,/^(?:$)/i],conditions:{data_inner:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,18,21,22,24,25,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},data:{rules:[0,1,3,4,5,6,7,9,11,14,15,16,17,18,21,22,23,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},axis_band_data:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,18,21,22,25,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},axis_data:{rules:[0,1,2,4,5,6,7,9,11,14,15,16,17,18,19,20,21,22,24,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},title:{rules:[],inclusive:!1},md_string:{rules:[],inclusive:!1},string:{rules:[28,29],inclusive:!1},INITIAL:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,18,21,22,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0}}};return F})();$.lexer=Ct;function N(){this.yy={}}return a(N,"Parser"),N.prototype=$,$.Parser=N,new N})();lt.parser=lt;var mi=lt;function ct(t){return t.type==="bar"}a(ct,"isBarPlot");function dt(t){return t.type==="band"}a(dt,"isBandAxisData");function G(t){return t.type==="linear"}a(G,"isLinearAxisData");var Mt=class{constructor(t){this.parentGroup=t}static{a(this,"TextDimensionCalculatorWithFont")}getMaxDimension(t,i){if(!this.parentGroup)return{width:t.reduce((n,x)=>Math.max(x.length,n),0)*i,height:i};const e={width:0,height:0},s=this.parentGroup.append("g").attr("visibility","hidden").attr("font-size",i);for(const n of t){const x=xi(s,1,n),g=x?x.width:n.length*i,m=x?x.height:i;e.width=Math.max(e.width,g),e.height=Math.max(e.height,m)}return s.remove(),e}},vt=.7,Pt=.2,Vt=class{constructor(t,i,e,s){this.axisConfig=t,this.title=i,this.textDimensionCalculator=e,this.axisThemeConfig=s,this.boundingRect={x:0,y:0,width:0,height:0},this.axisPosition="left",this.showTitle=!1,this.showLabel=!1,this.showTick=!1,this.showAxisLine=!1,this.outerPadding=0,this.titleTextHeight=0,this.labelTextHeight=0,this.range=[0,10],this.boundingRect={x:0,y:0,width:0,height:0},this.axisPosition="left"}static{a(this,"BaseAxis")}setRange(t){this.range=t,this.axisPosition==="left"||this.axisPosition==="right"?this.boundingRect.height=t[1]-t[0]:this.boundingRect.width=t[1]-t[0],this.recalculateScale()}getRange(){return[this.range[0]+this.outerPadding,this.range[1]-this.outerPadding]}setAxisPosition(t){this.axisPosition=t,this.setRange(this.range)}getTickDistance(){const t=this.getRange();return Math.abs(t[0]-t[1])/this.getTickValues().length}getAxisOuterPadding(){return this.outerPadding}getLabelDimension(){return this.textDimensionCalculator.getMaxDimension(this.getTickValues().map(t=>t.toString()),this.axisConfig.labelFontSize)}recalculateOuterPaddingToDrawBar(){vt*this.getTickDistance()>this.outerPadding*2&&(this.outerPadding=Math.floor(vt*this.getTickDistance()/2)),this.recalculateScale()}calculateSpaceIfDrawnHorizontally(t){let i=t.height;if(this.axisConfig.showAxisLine&&i>this.axisConfig.axisLineWidth&&(i-=this.axisConfig.axisLineWidth,this.showAxisLine=!0),this.axisConfig.showLabel){const e=this.getLabelDimension(),s=Pt*t.width;this.outerPadding=Math.min(e.width/2,s);const n=e.height+this.axisConfig.labelPadding*2;this.labelTextHeight=e.height,n<=i&&(i-=n,this.showLabel=!0)}if(this.axisConfig.showTick&&i>=this.axisConfig.tickLength&&(this.showTick=!0,i-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title){const e=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),s=e.height+this.axisConfig.titlePadding*2;this.titleTextHeight=e.height,s<=i&&(i-=s,this.showTitle=!0)}this.boundingRect.width=t.width,this.boundingRect.height=t.height-i}calculateSpaceIfDrawnVertical(t){let i=t.width;if(this.axisConfig.showAxisLine&&i>this.axisConfig.axisLineWidth&&(i-=this.axisConfig.axisLineWidth,this.showAxisLine=!0),this.axisConfig.showLabel){const e=this.getLabelDimension(),s=Pt*t.height;this.outerPadding=Math.min(e.height/2,s);const n=e.width+this.axisConfig.labelPadding*2;n<=i&&(i-=n,this.showLabel=!0)}if(this.axisConfig.showTick&&i>=this.axisConfig.tickLength&&(this.showTick=!0,i-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title){const e=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),s=e.height+this.axisConfig.titlePadding*2;this.titleTextHeight=e.height,s<=i&&(i-=s,this.showTitle=!0)}this.boundingRect.width=t.width-i,this.boundingRect.height=t.height}calculateSpace(t){return this.axisPosition==="left"||this.axisPosition==="right"?this.calculateSpaceIfDrawnVertical(t):this.calculateSpaceIfDrawnHorizontally(t),this.recalculateScale(),{width:this.boundingRect.width,height:this.boundingRect.height}}setBoundingBoxXY(t){this.boundingRect.x=t.x,this.boundingRect.y=t.y}getDrawableElementsForLeftAxis(){const t=[];if(this.showAxisLine){const i=this.boundingRect.x+this.boundingRect.width-this.axisConfig.axisLineWidth/2;t.push({type:"path",groupTexts:["left-axis","axisl-line"],data:[{path:`M ${i},${this.boundingRect.y} L ${i},${this.boundingRect.y+this.boundingRect.height} `,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&t.push({type:"text",groupTexts:["left-axis","label"],data:this.getTickValues().map(i=>({text:i.toString(),x:this.boundingRect.x+this.boundingRect.width-(this.showLabel?this.axisConfig.labelPadding:0)-(this.showTick?this.axisConfig.tickLength:0)-(this.showAxisLine?this.axisConfig.axisLineWidth:0),y:this.getScaleValue(i),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"middle",horizontalPos:"right"}))}),this.showTick){const i=this.boundingRect.x+this.boundingRect.width-(this.showAxisLine?this.axisConfig.axisLineWidth:0);t.push({type:"path",groupTexts:["left-axis","ticks"],data:this.getTickValues().map(e=>({path:`M ${i},${this.getScaleValue(e)} L ${i-this.axisConfig.tickLength},${this.getScaleValue(e)}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&t.push({type:"text",groupTexts:["left-axis","title"],data:[{text:this.title,x:this.boundingRect.x+this.axisConfig.titlePadding,y:this.boundingRect.y+this.boundingRect.height/2,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:270,verticalPos:"top",horizontalPos:"center"}]}),t}getDrawableElementsForBottomAxis(){const t=[];if(this.showAxisLine){const i=this.boundingRect.y+this.axisConfig.axisLineWidth/2;t.push({type:"path",groupTexts:["bottom-axis","axis-line"],data:[{path:`M ${this.boundingRect.x},${i} L ${this.boundingRect.x+this.boundingRect.width},${i}`,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&t.push({type:"text",groupTexts:["bottom-axis","label"],data:this.getTickValues().map(i=>({text:i.toString(),x:this.getScaleValue(i),y:this.boundingRect.y+this.axisConfig.labelPadding+(this.showTick?this.axisConfig.tickLength:0)+(this.showAxisLine?this.axisConfig.axisLineWidth:0),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}))}),this.showTick){const i=this.boundingRect.y+(this.showAxisLine?this.axisConfig.axisLineWidth:0);t.push({type:"path",groupTexts:["bottom-axis","ticks"],data:this.getTickValues().map(e=>({path:`M ${this.getScaleValue(e)},${i} L ${this.getScaleValue(e)},${i+this.axisConfig.tickLength}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&t.push({type:"text",groupTexts:["bottom-axis","title"],data:[{text:this.title,x:this.range[0]+(this.range[1]-this.range[0])/2,y:this.boundingRect.y+this.boundingRect.height-this.axisConfig.titlePadding-this.titleTextHeight,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}]}),t}getDrawableElementsForTopAxis(){const t=[];if(this.showAxisLine){const i=this.boundingRect.y+this.boundingRect.height-this.axisConfig.axisLineWidth/2;t.push({type:"path",groupTexts:["top-axis","axis-line"],data:[{path:`M ${this.boundingRect.x},${i} L ${this.boundingRect.x+this.boundingRect.width},${i}`,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&t.push({type:"text",groupTexts:["top-axis","label"],data:this.getTickValues().map(i=>({text:i.toString(),x:this.getScaleValue(i),y:this.boundingRect.y+(this.showTitle?this.titleTextHeight+this.axisConfig.titlePadding*2:0)+this.axisConfig.labelPadding,fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}))}),this.showTick){const i=this.boundingRect.y;t.push({type:"path",groupTexts:["top-axis","ticks"],data:this.getTickValues().map(e=>({path:`M ${this.getScaleValue(e)},${i+this.boundingRect.height-(this.showAxisLine?this.axisConfig.axisLineWidth:0)} L ${this.getScaleValue(e)},${i+this.boundingRect.height-this.axisConfig.tickLength-(this.showAxisLine?this.axisConfig.axisLineWidth:0)}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&t.push({type:"text",groupTexts:["top-axis","title"],data:[{text:this.title,x:this.boundingRect.x+this.boundingRect.width/2,y:this.boundingRect.y+this.axisConfig.titlePadding,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}]}),t}getDrawableElements(){if(this.axisPosition==="left")return this.getDrawableElementsForLeftAxis();if(this.axisPosition==="right")throw Error("Drawing of right axis is not implemented");return this.axisPosition==="bottom"?this.getDrawableElementsForBottomAxis():this.axisPosition==="top"?this.getDrawableElementsForTopAxis():[]}},yi=class extends Vt{static{a(this,"BandAxis")}constructor(t,i,e,s,n){super(t,s,n,i),this.categories=e,this.scale=ht().domain(this.categories).range(this.getRange())}setRange(t){super.setRange(t)}recalculateScale(){this.scale=ht().domain(this.categories).range(this.getRange()).paddingInner(1).paddingOuter(0).align(.5),Et.trace("BandAxis axis final categories, range: ",this.categories,this.getRange())}getTickValues(){return this.categories}getScaleValue(t){return this.scale(t)??this.getRange()[0]}},bi=class extends Vt{static{a(this,"LinearAxis")}constructor(t,i,e,s,n){super(t,s,n,i),this.domain=e,this.scale=Dt().domain(this.domain).range(this.getRange())}getTickValues(){return this.scale.ticks()}recalculateScale(){const t=[...this.domain];this.axisPosition==="left"&&t.reverse(),this.scale=Dt().domain(t).range(this.getRange())}getScaleValue(t){return this.scale(t)}};function ut(t,i,e,s){const n=new Mt(s);return dt(t)?new yi(i,e,t.categories,t.title,n):new bi(i,e,[t.min,t.max],t.title,n)}a(ut,"getAxis");var Ai=class{constructor(t,i,e,s){this.textDimensionCalculator=t,this.chartConfig=i,this.chartData=e,this.chartThemeConfig=s,this.boundingRect={x:0,y:0,width:0,height:0},this.showChartTitle=!1}static{a(this,"ChartTitle")}setBoundingBoxXY(t){this.boundingRect.x=t.x,this.boundingRect.y=t.y}calculateSpace(t){const i=this.textDimensionCalculator.getMaxDimension([this.chartData.title],this.chartConfig.titleFontSize),e=Math.max(i.width,t.width),s=i.height+2*this.chartConfig.titlePadding;return i.width<=e&&i.height<=s&&this.chartConfig.showTitle&&this.chartData.title&&(this.boundingRect.width=e,this.boundingRect.height=s,this.showChartTitle=!0),{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){const t=[];return this.showChartTitle&&t.push({groupTexts:["chart-title"],type:"text",data:[{fontSize:this.chartConfig.titleFontSize,text:this.chartData.title,verticalPos:"middle",horizontalPos:"center",x:this.boundingRect.x+this.boundingRect.width/2,y:this.boundingRect.y+this.boundingRect.height/2,fill:this.chartThemeConfig.titleColor,rotation:0}]}),t}};function Bt(t,i,e,s){const n=new Mt(s);return new Ai(n,t,i,e)}a(Bt,"getChartTitleComponent");var wi=class{constructor(t,i,e,s,n){this.plotData=t,this.xAxis=i,this.yAxis=e,this.orientation=s,this.plotIndex=n}static{a(this,"LinePlot")}getDrawableElement(){const t=this.plotData.data.map(e=>[this.xAxis.getScaleValue(e[0]),this.yAxis.getScaleValue(e[1])]);let i;return this.orientation==="horizontal"?i=Tt().y(e=>e[0]).x(e=>e[1])(t):i=Tt().x(e=>e[0]).y(e=>e[1])(t),i?[{groupTexts:["plot",`line-plot-${this.plotIndex}`],type:"path",data:[{path:i,strokeFill:this.plotData.strokeFill,strokeWidth:this.plotData.strokeWidth}]}]:[]}},Ci=class{constructor(t,i,e,s,n,x){this.barData=t,this.boundingRect=i,this.xAxis=e,this.yAxis=s,this.orientation=n,this.plotIndex=x}static{a(this,"BarPlot")}getDrawableElement(){const t=this.barData.data.map(n=>[this.xAxis.getScaleValue(n[0]),this.yAxis.getScaleValue(n[1])]),e=Math.min(this.xAxis.getAxisOuterPadding()*2,this.xAxis.getTickDistance())*(1-.05),s=e/2;return this.orientation==="horizontal"?[{groupTexts:["plot",`bar-plot-${this.plotIndex}`],type:"rect",data:t.map(n=>({x:this.boundingRect.x,y:n[0]-s,height:e,width:n[1]-this.boundingRect.x,fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill}))}]:[{groupTexts:["plot",`bar-plot-${this.plotIndex}`],type:"rect",data:t.map(n=>({x:n[0]-s,y:n[1],width:e,height:this.boundingRect.y+this.boundingRect.height-n[1],fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill}))}]}},Si=class{constructor(t,i,e){this.chartConfig=t,this.chartData=i,this.chartThemeConfig=e,this.boundingRect={x:0,y:0,width:0,height:0}}static{a(this,"BasePlot")}setAxes(t,i){this.xAxis=t,this.yAxis=i}setBoundingBoxXY(t){this.boundingRect.x=t.x,this.boundingRect.y=t.y}calculateSpace(t){return this.boundingRect.width=t.width,this.boundingRect.height=t.height,{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){if(!(this.xAxis&&this.yAxis))throw Error("Axes must be passed to render Plots");const t=[];for(const[i,e]of this.chartData.plots.entries())switch(e.type){case"line":{const s=new wi(e,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,i);t.push(...s.getDrawableElement())}break;case"bar":{const s=new Ci(e,this.boundingRect,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,i);t.push(...s.getDrawableElement())}break}return t}};function Wt(t,i,e){return new Si(t,i,e)}a(Wt,"getPlotComponent");var _i=class{constructor(t,i,e,s){this.chartConfig=t,this.chartData=i,this.componentStore={title:Bt(t,i,e,s),plot:Wt(t,i,e),xAxis:ut(i.xAxis,t.xAxis,{titleColor:e.xAxisTitleColor,labelColor:e.xAxisLabelColor,tickColor:e.xAxisTickColor,axisLineColor:e.xAxisLineColor},s),yAxis:ut(i.yAxis,t.yAxis,{titleColor:e.yAxisTitleColor,labelColor:e.yAxisLabelColor,tickColor:e.yAxisTickColor,axisLineColor:e.yAxisLineColor},s)}}static{a(this,"Orchestrator")}calculateVerticalSpace(){let t=this.chartConfig.width,i=this.chartConfig.height,e=0,s=0,n=Math.floor(t*this.chartConfig.plotReservedSpacePercent/100),x=Math.floor(i*this.chartConfig.plotReservedSpacePercent/100),g=this.componentStore.plot.calculateSpace({width:n,height:x});t-=g.width,i-=g.height,g=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:i}),s=g.height,i-=g.height,this.componentStore.xAxis.setAxisPosition("bottom"),g=this.componentStore.xAxis.calculateSpace({width:t,height:i}),i-=g.height,this.componentStore.yAxis.setAxisPosition("left"),g=this.componentStore.yAxis.calculateSpace({width:t,height:i}),e=g.width,t-=g.width,t>0&&(n+=t,t=0),i>0&&(x+=i,i=0),this.componentStore.plot.calculateSpace({width:n,height:x}),this.componentStore.plot.setBoundingBoxXY({x:e,y:s}),this.componentStore.xAxis.setRange([e,e+n]),this.componentStore.xAxis.setBoundingBoxXY({x:e,y:s+x}),this.componentStore.yAxis.setRange([s,s+x]),this.componentStore.yAxis.setBoundingBoxXY({x:0,y:s}),this.chartData.plots.some(m=>ct(m))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateHorizontalSpace(){let t=this.chartConfig.width,i=this.chartConfig.height,e=0,s=0,n=0,x=Math.floor(t*this.chartConfig.plotReservedSpacePercent/100),g=Math.floor(i*this.chartConfig.plotReservedSpacePercent/100),m=this.componentStore.plot.calculateSpace({width:x,height:g});t-=m.width,i-=m.height,m=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:i}),e=m.height,i-=m.height,this.componentStore.xAxis.setAxisPosition("left"),m=this.componentStore.xAxis.calculateSpace({width:t,height:i}),t-=m.width,s=m.width,this.componentStore.yAxis.setAxisPosition("top"),m=this.componentStore.yAxis.calculateSpace({width:t,height:i}),i-=m.height,n=e+m.height,t>0&&(x+=t,t=0),i>0&&(g+=i,i=0),this.componentStore.plot.calculateSpace({width:x,height:g}),this.componentStore.plot.setBoundingBoxXY({x:s,y:n}),this.componentStore.yAxis.setRange([s,s+x]),this.componentStore.yAxis.setBoundingBoxXY({x:s,y:e}),this.componentStore.xAxis.setRange([n,n+g]),this.componentStore.xAxis.setBoundingBoxXY({x:0,y:n}),this.chartData.plots.some(S=>ct(S))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateSpace(){this.chartConfig.chartOrientation==="horizontal"?this.calculateHorizontalSpace():this.calculateVerticalSpace()}getDrawableElement(){this.calculateSpace();const t=[];this.componentStore.plot.setAxes(this.componentStore.xAxis,this.componentStore.yAxis);for(const i of Object.values(this.componentStore))t.push(...i.getDrawableElements());return t}},ki=class{static{a(this,"XYChartBuilder")}static build(t,i,e,s){return new _i(t,i,e,s).getDrawableElement()}},Q=0,zt,K=mt(),Z=pt(),b=yt(),gt=Z.plotColorPalette.split(",").map(t=>t.trim()),et=!1,ft=!1;function pt(){const t=ui(),i=xt();return It(t.xyChart,i.themeVariables.xyChart)}a(pt,"getChartDefaultThemeConfig");function mt(){const t=xt();return It(ci.xyChart,t.xyChart)}a(mt,"getChartDefaultConfig");function yt(){return{yAxis:{type:"linear",title:"",min:1/0,max:-1/0},xAxis:{type:"band",title:"",categories:[]},title:"",plots:[]}}a(yt,"getChartDefaultData");function st(t){const i=xt();return gi(t.trim(),i)}a(st,"textSanitizer");function Ft(t){zt=t}a(Ft,"setTmpSVGG");function Ot(t){t==="horizontal"?K.chartOrientation="horizontal":K.chartOrientation="vertical"}a(Ot,"setOrientation");function Xt(t){b.xAxis.title=st(t.text)}a(Xt,"setXAxisTitle");function bt(t,i){b.xAxis={type:"linear",title:b.xAxis.title,min:t,max:i},et=!0}a(bt,"setXAxisRangeData");function Nt(t){b.xAxis={type:"band",title:b.xAxis.title,categories:t.map(i=>st(i.text))},et=!0}a(Nt,"setXAxisBand");function Yt(t){b.yAxis.title=st(t.text)}a(Yt,"setYAxisTitle");function Ht(t,i){b.yAxis={type:"linear",title:b.yAxis.title,min:t,max:i},ft=!0}a(Ht,"setYAxisRangeData");function Ut(t){const i=Math.min(...t),e=Math.max(...t),s=G(b.yAxis)?b.yAxis.min:1/0,n=G(b.yAxis)?b.yAxis.max:-1/0;b.yAxis={type:"linear",title:b.yAxis.title,min:Math.min(s,i),max:Math.max(n,e)}}a(Ut,"setYAxisRangeFromPlotData");function At(t){let i=[];if(t.length===0)return i;if(!et){const e=G(b.xAxis)?b.xAxis.min:1/0,s=G(b.xAxis)?b.xAxis.max:-1/0;bt(Math.min(e,1),Math.max(s,t.length))}if(ft||Ut(t),dt(b.xAxis)&&(i=b.xAxis.categories.map((e,s)=>[e,t[s]])),G(b.xAxis)){const e=b.xAxis.min,s=b.xAxis.max,n=(s-e)/(t.length-1),x=[];for(let g=e;g<=s;g+=n)x.push(`${g}`);i=x.map((g,m)=>[g,t[m]])}return i}a(At,"transformDataWithoutCategory");function wt(t){return gt[t===0?0:t%gt.length]}a(wt,"getPlotColorFromPalette");function $t(t,i){const e=At(i);b.plots.push({type:"line",strokeFill:wt(Q),strokeWidth:2,data:e}),Q++}a($t,"setLineData");function qt(t,i){const e=At(i);b.plots.push({type:"bar",fill:wt(Q),data:e}),Q++}a(qt,"setBarData");function Gt(){if(b.plots.length===0)throw Error("No Plot to render, please provide a plot with some data");return b.title=Lt(),ki.build(K,b,Z,zt)}a(Gt,"getDrawableElem");function jt(){return Z}a(jt,"getChartThemeConfig");function Qt(){return K}a(Qt,"getChartConfig");function Kt(){return b}a(Kt,"getXYChartData");var Ri=a(function(){li(),Q=0,K=mt(),b=yt(),Z=pt(),gt=Z.plotColorPalette.split(",").map(t=>t.trim()),et=!1,ft=!1},"clear"),Ti={getDrawableElem:Gt,clear:Ri,setAccTitle:ri,getAccTitle:ai,setDiagramTitle:ni,getDiagramTitle:Lt,getAccDescription:si,setAccDescription:ei,setOrientation:Ot,setXAxisTitle:Xt,setXAxisRangeData:bt,setXAxisBand:Nt,setYAxisTitle:Yt,setYAxisRangeData:Ht,setLineData:$t,setBarData:qt,setTmpSVGG:Ft,getChartThemeConfig:jt,getChartConfig:Qt,getXYChartData:Kt},Di=a((t,i,e,s)=>{const n=s.db,x=n.getChartThemeConfig(),g=n.getChartConfig(),m=n.getXYChartData().plots[0].data.map(p=>p[1]);function S(p){return p==="top"?"text-before-edge":"middle"}a(S,"getDominantBaseLine");function D(p){return p==="left"?"start":p==="right"?"end":"middle"}a(D,"getTextAnchor");function v(p){return`translate(${p.x}, ${p.y}) rotate(${p.rotation||0})`}a(v,"getTextTransformation"),Et.debug(`Rendering xychart chart +`+t);const w=oi(i),y=w.append("g").attr("class","main"),E=y.append("rect").attr("width",g.width).attr("height",g.height).attr("class","background");hi(w,g.height,g.width,!0),w.attr("viewBox",`0 0 ${g.width} ${g.height}`),E.attr("fill",x.backgroundColor),n.setTmpSVGG(w.append("g").attr("class","mermaid-tmp-group"));const T=n.getDrawableElem(),P={};function I(p){let _=y,l="";for(const[W]of p.entries()){let z=y;W>0&&P[l]&&(z=P[l]),l+=p[W],_=P[l],_||(_=P[l]=z.append("g").attr("class",p[W]))}return _}a(I,"getGroup");for(const p of T){if(p.data.length===0)continue;const _=I(p.groupTexts);switch(p.type){case"rect":if(_.selectAll("rect").data(p.data).enter().append("rect").attr("x",l=>l.x).attr("y",l=>l.y).attr("width",l=>l.width).attr("height",l=>l.height).attr("fill",l=>l.fill).attr("stroke",l=>l.strokeFill).attr("stroke-width",l=>l.strokeWidth),g.showDataLabel)if(g.chartOrientation==="horizontal"){let l=function(h,L){const{data:C,label:k}=h;return L*k.length*W<=C.width-10};a(l,"fitsHorizontally");const W=.7,z=p.data.map((h,L)=>({data:h,label:m[L].toString()})).filter(h=>h.data.width>0&&h.data.height>0),U=z.map(h=>{const{data:L}=h;let C=L.height*.7;for(;!l(h,C)&&C>0;)C-=1;return C}),X=Math.floor(Math.min(...U));_.selectAll("text").data(z).enter().append("text").attr("x",h=>h.data.x+h.data.width-10).attr("y",h=>h.data.y+h.data.height/2).attr("text-anchor","end").attr("dominant-baseline","middle").attr("fill","black").attr("font-size",`${X}px`).text(h=>h.label)}else{let l=function(h,L,C){const{data:k,label:$}=h,N=L*$.length*.7,F=k.x+k.width/2,o=F-N/2,c=F+N/2,u=o>=k.x&&c<=k.x+k.width,d=k.y+C+L<=k.y+k.height;return u&&d};a(l,"fitsInBar");const W=10,z=p.data.map((h,L)=>({data:h,label:m[L].toString()})).filter(h=>h.data.width>0&&h.data.height>0),U=z.map(h=>{const{data:L,label:C}=h;let k=L.width/(C.length*.7);for(;!l(h,k,W)&&k>0;)k-=1;return k}),X=Math.floor(Math.min(...U));_.selectAll("text").data(z).enter().append("text").attr("x",h=>h.data.x+h.data.width/2).attr("y",h=>h.data.y+W).attr("text-anchor","middle").attr("dominant-baseline","hanging").attr("fill","black").attr("font-size",`${X}px`).text(h=>h.label)}break;case"text":_.selectAll("text").data(p.data).enter().append("text").attr("x",0).attr("y",0).attr("fill",l=>l.fill).attr("font-size",l=>l.fontSize).attr("dominant-baseline",l=>S(l.verticalPos)).attr("text-anchor",l=>D(l.horizontalPos)).attr("transform",l=>v(l)).text(l=>l.text);break;case"path":_.selectAll("path").data(p.data).enter().append("path").attr("d",l=>l.path).attr("fill",l=>l.fill?l.fill:"none").attr("stroke",l=>l.strokeFill).attr("stroke-width",l=>l.strokeWidth);break}}},"draw"),vi={draw:Di},Bi={parser:mi,db:Ti,renderer:vi};export{Bi as diagram}; diff --git a/api/gm/index.html b/api/gm/index.html new file mode 100644 index 00000000..d82b8c35 --- /dev/null +++ b/api/gm/index.html @@ -0,0 +1,842 @@ + Privileged APIs - Violentmonkey + +

    Privileged APIs

    Violentmonkey APIs are derived from those in Greasemonkey v3, and most of them work the same way, GM.* Greasemonkey v4-compatible aliases were added in VM2.12.0.

    +

    unsafeWindow

    +

    It’s the original window object of the webpage that allows reading or modifying global variables, necessary when the script is sandboxed, because its window becomes a wrapper that confines modifications like window.foo = 123 to this script’s scope.

    +

    Sandboxing is enabled by default and disabled only if @grant none is specified, just like in Tampermonkey. Note that in older versions of Violentmonkey (before v2.32) sandboxing was also disabled when there were no @grant keys.

    +

    GM_*

    +

    GM_* are a group of special APIs provided by Violentmonkey.

    +

    GM_info

    +

    An object that exposes information about the current userscript.

    +
    • injectInto: "auto" | "page" | "content"

      The injection mode of current script. See @inject-into for more information.

      +
    • isIncognito: boolean

      True when this is an incognito profile (Chrome) or private mode (Firefox).

      +

      @since VM2.15.4

      +
    • platform: VMScriptGMInfoPlatform

      Unlike navigator.userAgent, which can be overriden by other extensions/userscripts +or by devtools in device-emulation mode, GM_info.platform is more reliable as the +data is obtained in the background page of Violentmonkey using a specialized +extension API (browser.runtime.getPlatformInfo and getBrowserInfo).

      +
      • arch: "aarch64" | "arm" | "arm64" | "mips" | "mips64" | "ppc64" | "s390x" | "sparc64" | "x86-32" | "x86-64"

      • browserName: string

      • browserVersion: string

      • fullVersionList?: Array<{...}>

        A copy of navigator.userAgentData.getHighEntropyValues() from the background script +of the extension, so it's not affected by devtools of the web page tab. +Only present in browsers that implement this API (Chromium >= 90).

        +

        @since VM2.27.0

        +
        • brand: string

        • version: string

      • mobile?: boolean

        A copy of navigator.userAgentData.mobile from the background script of the extension, +so it's not affected by devtools of the web page tab. +Only present in browsers that implement this API (Chromium >= 90).

        +

        @since VM2.27.0

        +
      • os: "mac" | "win" | "android" | "cros" | "linux" | "openbsd" | "fuchsia"

    • script: VMScriptGMInfoScriptMeta

      Contains structured fields from the Metadata Block.

      +
      • antifeature?: Array<string>

      • author?: string

      • compatible?: Array<string>

      • connect?: Array<string>

      • description: string

      • downloadURL?: string

      • excludeMatches: Array<string>

      • excludes: Array<string>

      • grant: Array<string>

        Empty is the same as @grant none

        +
      • homepage?: string

        Use homepageURL instead

        +
      • homepageURL?: string

      • icon?: string

      • includes: Array<string>

      • matches: Array<string>

      • name: string

      • namespace: string

      • noframes?: boolean

      • options: {...}

        User options and overrides for the script

        +

        @since VM2.31.1

        +
        • check_for_updates: boolean

        • inject_into: "auto" | "page" | "content"

        • noframes: boolean

        • override: {...}

          • merge_exclude_matches: boolean

            Keep the script's @exclude-match

            +
          • merge_excludes: boolean

            Keep the script's @exclude

            +
          • merge_includes: boolean

            Keep the script's @include

            +
          • merge_matches: boolean

            Keep the script's @match

            +
          • use_exclude_matches: Array<string>

            User overridden @exclude-match

            +
          • use_excludes: Array<string>

            User overridden @exclude

            +
          • use_includes: Array<string>

            User overridden @include

            +
          • use_matches: Array<string>

            User overridden @match

            +
        • run_at: "document-start" | "document-body" | "document-end" | "document-idle"

        • tags: Array<string>

        • user_modified: number

          Last modification by the user; convertible as new Date(user_modified)

          +
      • require: Array<string>

      • resources: Array<{...}>

        • name: string

        • url: string

      • runAt: "" | "document-start" | "document-body" | "document-end" | "document-idle"

      • supportURL?: string

      • unwrap?: boolean

      • updateURL?: string

      • version: string

    • scriptHandler: string

      The name of userscript manager, which should be the string Violentmonkey.

      +
    • scriptMetaStr: string

      The meta block of the script.

      +
    • scriptWillUpdate: boolean

      Whether the script will be updated automatically.

      +
    • userAgent: string

      A safe copy of navigator.userAgent from the content script of the extension, +so it cannot be overridden by other extensions/userscripts, but unlike +GM_info.platform it can be customized in devtools “device emulation” or +“network conditions” for this tab.

      +

      @since VM2.20.2

      +
    • userAgentData?: {...}

      A safe copy of navigator.userAgentData from the content script of the extension, +so it cannot be overridden by other extensions/userscripts, but unlike +GM_info.platform it can be customized in devtools "device emulation" or +"network conditions" for this tab.

      +

      Only present if the browser actually implements it +(currently Chromium-based 90+), +because there's no reliable/official polyfill.

      +

      Violentmonkey implements the official API, +including getHighEntropyValues +function to obtain the extra info asynchronously.

      +

      @since VM2.20.2

      +
      • brands: Array<{...}>

        • brand: string

        • version: string

      • mobile: boolean

      • platform: string

      • getHighEntropyValues: (hints: Array<string>) => Promise<UADataValues>

    • uuid: string

      A unique ID of the script.

      +
    • version: string

      Version of Violentmonkey.

      +
    +

    GM_getValue

    +

    Retrieves a value for current script from storage.

    +
    let value = GM_getValue(key, defaultValue)
    +
      +
    • + key: string +

      The name for value to load.

      +
    • +
    • + defaultValue: any +

      The default value to return if no value exists in the storage.

      +
    • +
    +

    GM_getValues

    +

    Since VM2.19.1

    +

    Retrieves multiple values for current script from storage.

    +
      +
    1. +

      Using an array of keys.

      +
      let values = GM_getValues(['foo', 'bar'])
      + + + + + + + + + + + + + + + + + +
      Keys in storageResult
      foo, bar{ foo: 123, bar: [1, 2, 3] }
      foo{ foo: 123 }
      +
    2. +
    3. +

      Using an object.

      +

      Each key is a name to read from storage, the value is the default to be used in the result if the key was not in storage.

      +
      let values = GM_getValues({ foo: 1, bar: [2] })
      + + + + + + + + + + + + + + + + + +
      Keys in storageResult
      foo, bar{ foo: 123, bar: [1, 2, 3] }
      foo{ foo: 123, bar: [2] }
      +
    4. +
    +

    GM_setValue

    +

    Sets a key / value pair for current script to storage.

    +
    GM_setValue(key, value)
    +
      +
    • + key: string +

      The unique name for value within this script.

      +
    • +
    • + value: any +

      The value to be stored, which must be JSON serializable (string, number, boolean, null, or an array/object consisting of these types) so for example you can’t store DOM elements or objects with cyclic dependencies.

      +
    • +
    +

    GM_setValues

    +

    Since VM2.19.1

    +

    Writes multiple values to current script’s storage.

    +
    GM_setValues({ foo: 1, bar: [1, 2, 3] })
    +
      +
    • + data: Object +

      Each key:value pair in the object will be stored individually, so the example above is basically a more efficient version of GM_setValue('foo', 1); GM_setValue('bar', [1, 2, 3]);

      +

      Must be JSON serializable (see GM_setValue).

      +
    • +
    +

    GM_deleteValue

    +

    Deletes an existing key / value pair for current script from storage.

    +
    GM_deleteValue(key)
    +
      +
    • + key: string +

      The unique name for value within this script.

      +
    • +
    +

    GM_deleteValues

    +

    Since VM2.19.1

    +

    Deletes values with the specified keys in current script’s storage.

    +
    GM_deleteValues(['foo', 'bar'])
    +
      +
    • + keys: string[] +

      Array of keys to delete.

      +
    • +
    +

    GM_listValues

    +

    Returns an array of keys of all available values within this script.

    +
    let arrayOfKeys = GM_listValues()
    +

    GM_addValueChangeListener

    +

    Adds a change listener to the storage and returns the listener ID.

    +
    let listenerId = GM_addValueChangeListener(name, callback)
    +
      +
    • + name: string +

      The name of the observed variable

      +
    • +
    • + callback: (name, oldValue, newValue, remote) => void +
        +
      • + name: string +

        The name of the observed variable

        +
      • +
      • + oldValue: any +

        The old value of the observed variable (undefined if it was created)

        +
      • +
      • + newValue: any +

        The new value of the observed variable (undefined if it was deleted)

        +
      • +
      • + remote: boolean +

        true if modified by the userscript instance of another tab or false for this script instance. Can be used by scripts of different browser tabs to communicate with each other.

        +
      • +
      +
    • +
    +

    GM_removeValueChangeListener

    +

    Removes a change listener by its ID.

    +
    GM_removeValueChangeListener(listenerId)
    +
      +
    • + listenerId: string +
    • +
    +

    GM_getResourceText

    +

    Retrieves a text resource from the metadata block.

    +
    let text = GM_getResourceText(name)
    +
      +
    • + name: string +

      Name of a resource defined in the metadata block.

      +
    • +
    +

    GM_getResourceURL

    +

    Retrieves a blob: or data: URL of a resource from the metadata block.

    +
    let blobUrl = GM_getResourceURL(name);
    +let blobOrDataUrl = GM_getResourceURL(name, isBlobUrl);
    +
      +
    • + name: string +

      Name of a resource defined in the metadata block.

      +
    • +
    • + isBlobUrl: boolean = true - since VM2.13.1 +
        +
      • +

        true returns a blob: URL. It’s short and cacheable, so it’s good for reusing in multiple DOM elements.

        +
      • +
      • +

        false returns a data: URL. It’s long so reusing it in DOM may be less performant due to the lack of caching, but it’s particularly handy for direct synchronous decoding of the data on sites that forbid fetching blob: in their CSP.

        +
      • +
      +
    • +
    +

    Note: when setting this URL as src or href of a DOM element, it may fail on some sites with a particularly strict CSP that forbids blob: or data: URLs. Such sites are rare though. The workaround in Chrome is to use GM_addElement, whereas in Firefox you’ll have to disable CSP either globally via about:config or by using an additional extension that modifies HTTP headers selectively.

    +

    GM_addElement

    +

    Since VM2.13.1

    +

    Appends and returns an element with the specified attributes with the primary purpose of circumventing a strict Content-Security-Policy that forbids adding inline code or style.

    +
    let element1 = GM_addElement(tagName, attributes);
    +let element2 = GM_addElement(parentNode, tagName, attributes);
    +
      +
    • + parentNode?: Node | Element | ShadowRoot +

      The parent node to which the new node will be appended.

      +

      It can be inside ShadowDOM: someElement.shadowRoot.

      +

      When omitted, it’ll be determined automatically:

      +
        +
      1. document.head (<head>) for script, link, style, meta tags.
      2. +
      3. document.body (<body>) for other tags or when there’s no <head>.
      4. +
      5. document.documentElement (<html> or an XML root node) otherwise.
      6. +
      +
    • +
    • + tagName: string +

      A tag name like 'script'.

      +
    • +
    • + attributes?: object +

      The keys are HTML attributes, not DOM properties, except textContent which sets DOM property textContent. The values are strings so if you want to assign a private function to onload you can do it after the element is created.

      +
    • +
    +

    Examples:

    +
    // using a private function in `onload`
    +let el = GM_addElement('script', { src: 'https://....' });
    +el.onload = () => console.log('loaded', el);
    +
    // same as GM_addStyle('a { color:red }')
    +let el = GM_addElement('style', { textContent: 'a { color:red }' });
    +
    // appending to an arbitrary node
    +let el = GM_addElement(parentElement.shadowRoot, 'iframe', { src: url });
    +

    Notes:

    +
      +
    • The element is returned immediately (synchronously) even with GM.addElement, no need for .then(), but you can use it if you want, just once though as it’s auto-removed to avoid recursion. The API is synchronous because Violentmonkey runs scripts only when the root element appears, so there’s always a node to serve as a parent.
    • +
    • Invalid arguments will raise an exception, which can be caught using try {} catch (e) {}, just like standard DOM API document.createElement.
    • +
    +

    GM_addStyle

    +

    Appends and returns a <style> element with the specified CSS.

    +
    let styleElement = GM_addStyle(css);
    +
      +
    • + css: string +

      The CSS code to inject.

      +
    • +
    +

    Older versions of Violentmonkey (prior to 2.12.0) returned an imitation of Promise, +which is still maintained for compatibility, so don’t be surprised if you see code like +GM_addStyle(css).then(el => { /* whatever */ });

    +

    GM_openInTab

    +

    Opens URL in a new tab.

    +
      +
    1. +

      using an object

      +
      let tabControl = GM_openInTab(url, options)
      +
        +
      • + url: string +

        The URL to open in a new tab. URL relative to current page is also allowed.

        +

        Note that Firefox disallows data:, blob:, chrome:, file:, and many about: URLs.

        +
      • +
      • + options?: object +
          +
        • + active: boolean = true +

          Make the new tab active (i.e. open in foreground).

          +
        • +
        • + container?: number - since VM2.12.5, Firefox-only +

          Set tab’s container in Firefox:

          +
            +
          • not specified = reuse script’s tab container
          • +
          • 0 = default (main) container
          • +
          • 1, 2, etc. = internal container index
          • +
          +
        • +
        • + insert: boolean = true - since VM2.11.0 +

          Insert the new tab next to the current tab and set its “openerTab” so when it’s closed the original tab will be focused automatically. When false or not specified, the usual browser behavior is to open the tab at the end of the tab list.

          +
        • +
        • + pinned: boolean = false - since VM2.12.5 +

          Pin the tab (i.e. show without a title at the beginning of the tab list).

          +
        • +
        +
      • +
      +
    2. +
    3. +

      Using a boolean, compatible with Greasemonkey:

      +
      let tabControl = GM_openInTab(url, openInBackground)
      +
        +
      • + openInBackground: boolean +

        Open the tab in background. +Note, this is a reverse of the first usage method so for example true is the same as { active: false }.

        +
      • +
      +
    4. +
    +

    Returns an object with following properties:

    +
      +
    • + onclose?: () => void +

      Сan be assigned to a function. If provided, it will be called when the opened tab is closed.

      +
    • +
    • + closed: boolean +

      Whether the opened tab is closed.

      +
    • +
    • + close: () => void +

      A function to explicitly close the opened tab.

      +
    • +
    +
    let tabControl = GM_openInTab(url);
    +tabControl.onclose = () => console.log('tab is closed');
    +tabControl.close();
    +

    GM_registerMenuCommand

    +

    Registers a command in Violentmonkey popup menu.

    +
    GM_registerMenuCommand('Text', onClick)
    +const id2 = GM_registerMenuCommand('Text2', onClick, { title: 'Two' })
    +const id3 = GM_registerMenuCommand('Text3', onClick, { autoClose: false })
    +

    Returns the command’s caption since VM2.12.5 or id since VM2.15.9.

    +
      +
    • + caption: string +

      This text will be shown in the popup menu.

      +
    • +
    • + onClick: (event) => void +

      When the command is clicked in the menu, this function will run with the following parameter:

      +
        +
      • event: [object Object] - since VM2.13.1 is the event that activated the command so you can check event.button, event.shiftKey, event.key, and so on.
      • +
      +
    • +
    • + options?: object - since VM2.15.9 +
        +
      • + id?: string +

        Default: caption text since VM2.16.2. +Default in 2.15.9-2.16.1: a randomly generated string.

        +
      • +
      • + icon?: string - since VM2.31.1 +

        URL of the icon.

        +
      • +
      • + title?: string +

        A hint shown in the status bar when hovering the command.

        +
      • +
      • + autoClose?: boolean = true +

        Whether to auto-close the popup after the user invoked the command.

        +
      • +
      +
    • +
    +
    +

    TIP

    +

    +

    If you want to add a shortcut, please refer to keyboard shortcut.

    +
    +

    Here’s how you can change the command in-place, thus preserving its relative position in the list of multiple commands:

    +
    const id = 'status';
    +const inplace = id === GM_registerMenuCommand('Enabled', onClick, { id });
    +if (inplace) {
    +  // supported: change the command in-place using the same `id`
    +  GM_registerMenuCommand('Disabled', onClick, { id, title: 'Status' });
    +} else {
    +  // not supported: recreate the commands
    +  GM_unregisterMenuCommand('Enabled');
    +  GM_unregisterMenuCommand('Foo');
    +  GM_unregisterMenuCommand('Bar');
    +  GM_registerMenuCommand('Disabled', onClick);
    +  GM_registerMenuCommand('Foo', onClick2);
    +  GM_registerMenuCommand('Bar', onClick3);
    +}
    +

    GM_unregisterMenuCommand

    +

    Unregisters a command which has been registered to Violentmonkey popup menu.

    +
    GM_unregisterMenuCommand(captionOrId)
    +
      +
    • + captionOrId: string +

      The caption or id of the command to unregister. +See GM_registerMenuCommand for more info.

      +
    • +
    +

    GM_notification

    +

    Shows a desktop notification using the browser.notifications API.

    +
      +
    1. +

      using an object:

      +
      let control = GM_notification(options)
      +
        +
      • + options: object +
          +
        • + text: string +

          Main text of the notification.

          +
        • +
        • + title?: string +

          Title of the notification.

          +
        • +
        • + image?: string +

          URL of an image to show in the notification.

          +
        • +
        • + silent?: boolean = false - since VM2.15.2, Chrome 70 +

          No sounds/vibrations when showing the notification. Only for Chromium-based browsers as of Aug 2023.

          +
        • +
        • + tag?: string - since VM2.15.4 +

          Unique name of the notification, e.g. ‘abc’, same as the web Notification API. Names are scoped to each userscript i.e. your tag won’t clash with another script’s tag.

          +

          The purpose of a tagged notification is to replace an older notification with the same tag, even if it was shown in another tab (or before this tab was navigated elsewhere and your notification had zombieTimeout).

          +
        • +
        • + zombieTimeout?: number = 0 - since VM2.15.4 +

          Number of milliseconds to keep the notification after the userscript “dies”, i.e. when its tab or frame is reloaded/closed/navigated. If not specified or invalid, the default behavior is to immediately remove the notifications.

          +
        • +
        • + zombieUrl?: string - since VM2.16.1 +

          URL to open when a zombie notification is clicked, see zombieTimeout for more info.

          +
        • +
        • + onclick?: () => void +

          Callback when the notification is clicked by user. As of VM2.15.2 it also forces the notification to be visible until clicked in Chrome which by default hides the notification after a few seconds.

          +
        • +
        • + ondone?: () => void +

          Callback when the notification is closed, either by user or by system.

          +
        • +
        +
      • +
      +
    2. +
    3. +

      Using separate parameters, compatible with Greasemonkey:

      +
      GM_notification(text, title, image, onclick)
      +
        +
      • + text: string +

        Main text of the notification.

        +
      • +
      • + title?: string +

        Title of the notification.

        +
      • +
      • + image?: string +

        URL of an image to show in the notification.

        +
      • +
      • + onclick?: () => void +

        Callback when the notification is clicked by user.

        +
      • +
      +
    4. +
    +

    As of VM2.12.8 returns a control object with the following properties:

    +
      +
    • + remove: () => Promise<void> +

      A function to remove the notification.

      +
    • +
    +

    GM_setClipboard

    +

    Sets data to system clipboard.

    +
    GM_setClipboard(data, type)
    +
      +
    • + data: string +

      The data to be copied to system clipboard.

      +
    • +
    • + type: string = 'text/plain' +

      The MIME type of data to copy.

      +
    • +
    +

    GM_xmlhttpRequest

    +

    Makes a request like XMLHttpRequest, with some special capabilities, not restricted by same-origin policy.

    +

    Note: h is lowercase (the historical spelling).

    +
    let control = GM_xmlhttpRequest(details)
    +
      +
    • + details: object +
        +
      • + url: string +

        URL relative to current page is also allowed.

        +
      • +
      • + method?: string +

        Usually GET.

        +
      • +
      • + user?: string +

        User for authentication.

        +
      • +
      • + password?: string +

        Password for authentication.

        +
      • +
      • + overrideMimeType?: string +

        A MIME type to specify with the request.

        +
      • +
      • + headers?: object +

        For example { 'name1': 'value1', 'name2': 'value2' }.

        +

        Some special headers are also allowed:

        +
          +
        • 'Cookie'
        • +
        • 'Host'
        • +
        • 'Origin'
        • +
        • 'Referer'
        • +
        • 'User-Agent'
        • +
        +
      • +
      • + responseType?: string +

        One of the following:

        +
          +
        • 'text' :point_left: default
        • +
        • 'json'
        • +
        • 'blob'
        • +
        • 'arraybuffer'
        • +
        • 'document' (since VM2.12.0)
        • +
        +
      • +
      • + timeout?: number - since VM2.9.5 +

        Time to wait for the request, none by default.

        +
      • +
      • + data?: string | ArrayBuffer | Blob | DataView | FormData | ReadableStream | TypedArray | URLSearchParams +

        Data to send with the request, usually for POST and PUT requests.

        +
      • +
      • + binary?: boolean - since VM2.12.2 +

        Send the data string as a blob. This is for compatibility with Tampermonkey/Greasemonkey, where only string type is allowed in data.

        +
      • +
      • + context?: any +

        Can be an object and will be assigned to context of the response object.

        +
      • +
      • + anonymous?: boolean = false - since VM2.10.1 +

        When set to true, no cookie will be sent with the request and since VM2.12.5 the response cookies will be ignored.

        +

        When absent, an inverted value of Greasemonkey4-compatible withCredentials is used. Note that Violentmonkey sends cookies by default, like Tampermonkey, but unlike Greasemonkey4 (same-origin url only).

        +
      • +
      +

      Event handlers are functions that receive the response object detailed further down below:

      +
        +
      • + onabort?: () => void +
      • +
      • + onerror?: () => void +
      • +
      • + onload?: () => void +
      • +
      • + onloadend?: () => void +
      • +
      • + onloadstart?: () => void - since VM2.12.5 +
      • +
      • + onprogress?: () => void +
      • +
      • + onreadystatechange?: () => void +
      • +
      • + ontimeout?: () => void +
      • +
      • + upload?: Object - since VM2.32.0 +

        Contains event handlers to track upload progress of your data, same as the event handlers above.

        +
      • +
      +
    • +
    +
    +

    NOTE

    +

    +
      +
    • synchronous is not supported.
    • +
    +
    +

    Returns a control object with the following properties:

    +
      +
    • + abort: () => void +

      A function to abort the request.

      +
    • +
    +

    The response object is passed to each event handler with the following properties, most of which are identical to those provided by the standard XMLHttpRequest:

    +
      +
    • + status: number +
    • +
    • + statusText: string +
    • +
    • + readyState: number +
    • +
    • + responseHeaders: string +
    • +
    • + response: string | Blob | ArrayBuffer | Document | object | null +
    • +
    • responseText: string | undefined , only provided when available
    • +
    • responseXML: Document | null - since VM2.13.4 , only provided when available
    • +
    • lengthComputable: boolean , only provided when available
    • +
    • loaded: number , only provided when available
    • +
    • total: number , only provided when available
    • +
    • finalUrl: string , the final URL after redirection
    • +
    • context: any , the same context object you specified in details
    • +
    +

    GM_download

    +

    Since VM2.9.5

    +

    Downloads a URL to a local file.

    +
      +
    1. +

      using an object:

      +
      GM_download(options)
      +
        +
      • +

        options: object :

        +
          +
        • + url: string +

          The URL to download.

          +
        • +
        • + name: string +

          The filename to save to. Folders/subpaths aren’t supported yet.

          +
        • +
        +

        Most GM_xmlhttpRequest options are supported.

        +
          +
        • + headers?: object +
        • +
        • + timeout?: number - since VM2.9.5 +
        • +
        • + context?: any - since VM2.13.4 +
        • +
        • + user?: string - since VM2.13.4 +
        • +
        • + password?: string - since VM2.13.4 +
        • +
        • + anonymous?: boolean = false - since VM2.13.4 +
        • +
        • + onabort?: () => void - since VM2.13.4 +
        • +
        • + onerror?: () => void +
        • +
        • + onload?: () => void +
        • +
        • + onloadend?: () => void - since VM2.13.4 +
        • +
        • + onloadstart?: () => void - since VM2.13.4 +
        • +
        • + onprogress?: () => void +
        • +
        • + onreadystatechange?: () => void - since VM2.13.4 +
        • +
        • + ontimeout?: () => void +
        • +
        +

        The onload event handler is called after the data is downloaded from URL, before writing the file.

        +
      • +
      +
    2. +
    3. +

      using separate parameters:

      +
      GM_download(url, name)
      +
        +
      • + url: string +

        The URL to download.

        +
      • +
      • + name: string +

        The filename to save to. Folders/subpaths aren’t supported yet.

        +
      • +
      +
    4. +
    +

    Returns a control object with the following properties, same as GM_xmlhttpRequest:

    +
      +
    • + abort: () => void +

      A function to abort the request.

      +
    • +
    +

    GM.*

    +

    GM (since VM2.12.0) is a single variable with Greasemonkey4-compatible aliases, the async functions return a Promise that’s resolved with the returned value.

    +

    \ No newline at end of file diff --git a/api/index.html b/api/index.html new file mode 100644 index 00000000..59aa5647 --- /dev/null +++ b/api/index.html @@ -0,0 +1 @@ +Redirecting to: gm/ Redirecting from /api/ to gm/ \ No newline at end of file diff --git a/api/matching/index.html b/api/matching/index.html new file mode 100644 index 00000000..bb37ed92 --- /dev/null +++ b/api/matching/index.html @@ -0,0 +1,139 @@ + Matching - Violentmonkey + +

    Matching

    There are four types of rules: @match / @exclude-match / @include / @exclude in Violentmonkey.

    +

    @match / @exclude-match

    +

    It is recommended to use @match / @exclude-match rather than @include / @exclude because the match rules are safer and more strict.

    +

    @match defines a URL matching rule. @exclude-match defines a match rule but used to exclude the matched URLs, similar to @exclude.

    +

    For more details, see Match Patterns for Chrome extensions.

    +

    Note that match patterns only work on scheme, host and path, i.e. match patterns always ignore query string and hash.

    +

    Since Violentmonkey v2.10.4, some additional rules are accepted:

    +
      +
    • the scheme part accepts http* to match http or https;
    • +
    • the host part accepts wildcards (*) at any position, e.g. www.google.*;
    • +
    • the host part accepts .tld to match any top level domain suffix.
    • +
    +

    Examples:

    +
    // @match *://*/*
    +// @exclude-match *://*.tk/*
    +

    @include / @exclude

    +

    Each @include and @exclude rule can be one of the following:

    +
      +
    • +

      a normal string

      +

      If the string does not start or end with a slash (/), it will be used as a normal string.

      +

      If there are wildcards (*), each of them matches any characters.

      +

      e.g. https://www.google.com/* matches the following:

      +
        +
      • https://www.google.com/
      • +
      • https://www.google.com/any/subview
      • +
      +

      but not the following:

      +
        +
      • http://www.google.com/
      • +
      • https://www.google.com.hk/
      • +
      +

      If there is no wildcard in the string, the rule matches the entire URL.

      +

      e.g. https://www.google.com/ matches only https://www.google.com/ but not https://www.google.com/any/subview.

      +

      The host part accepts .tld to match top level domain suffix.

      +

      e.g. https://www.google.tld/ matches both https://www.google.com/ and https://www.google.co.jp/.

      +
    • +
    • +

      a regular expression

      +

      If the string starts and ends with a slash (/), it will be compiled as a regular expression.

      +

      e.g. /\.google\.com[\.\/]/ matches the following:

      +
        +
      • https://www.google.com/,
      • +
      • https://www.google.com/any/subview
      • +
      • http://www.google.com/
      • +
      • https://www.google.com.hk/
      • +
      +
    • +
    +

    Examples:

    +
    // @include *
    +// @include https://www.google.com/*
    +// @include /\.com\.hk\//
    +// @exclude https://www.google.com/exact/url
    +

    How does a script match?

    +

    In short, a script will execute if it matches any @match or @include rule and does not match any @exclude-match or @exclude rule.

    +

    Here is the long version:

    +
      +
    • If any @exclude-match or @exclude rule matches, the script does not match.
    • +
    • Otherwise if any @match rule is defined, the script matches only if some of the @match rules match.
    • +
    • If no @match rule is defined, we fallback to @include rules and the script matches only if some of the @include rules match.
    • +
    • If neither @match nor @include rule is defined, the script is assumed to match.
    • +
    +
    graph TD
    +    Start([A script]) --> D1{ }
    +
    +    %% Exclude Match Decision
    +    D1 -- "Any `@exclude-match` rule matches?" --> D1_Result{ }
    +    D1_Result -- Yes --> Unmatch
    +    D1_Result -- No --> D2
    +
    +    %% Exclude Decision
    +    D2{ } -- "Any `@exclude` rule matches?" --> D2_Result{ }
    +    D2_Result -- Yes --> Unmatch
    +    D2_Result -- No --> D3
    +
    +    %% Match Defined Decision
    +    D3{ } -- "Any `@match` rule defined?" --> D3_Result{ }
    +
    +    %% Path: Match is defined
    +    D3_Result -- Yes --> D4{ }
    +    D4 -- "Any `@match` rule matches?" --> D4_Result{ }
    +    D4_Result -- Yes --> Match
    +    D4_Result -- No --> Unmatch
    +
    +    %% Path: Match is NOT defined
    +    D3_Result -- No --> D5{ }
    +    D5 -- "Any `@include` rule defined?" --> D5_Result{ }
    +
    +    D5_Result -- No --> Match
    +    D5_Result -- Yes --> D6{ }
    +
    +    D6 -- "Any `@include` rule matches?" --> D6_Result{ }
    +    D6_Result -- Yes --> Match
    +    D6_Result -- No --> Unmatch
    +
    +    %% Final Nodes
    +    Match["Match<br/>(should execute)"]
    +    Unmatch["Unmatch<br/>(should not execute)"]
    +

    Matching SPA sites like fb, github, twitter, youtube

    +

    Userscript extensions use the native behavior of the browser - it runs scripts defined by extensions only during the standard “hard” navigation, not during “soft” navigation via history.pushState or replaceState or #hash changes used by many modern SPA sites.

    +

    You can verify the type by opening devtools network log, then navigate in this tab (e.g. click a link) and look at the type of the request for this navigation: a Document (Chrome) or HTML (Firefox) means “hard” navigation i.e. the browser creates a new environment for the page and loads its HTML from the server including its scripts and userscripts from extensions.

    +

    1. Run your userscript on the entire SPA site:

    +
    // @match *://www.youtube.com/*
    +

    2. Then watch for changes either using vm-url or manually:

    +
    onUrlChange();
    + 
    +if (self.navigation) {
    +  navigation.addEventListener('navigatesuccess', onUrlChange);
    +} else {
    +  let u = location.href;
    +  new MutationObserver(() => u !== (u = location.href) && onUrlChange())
    +    .observe(document, {subtree: true, childList: true});
    +}
    + 
    +function onUrlChange() {
    +  if (!location.pathname.startsWith('/watch')) {
    +    // deactivate();
    +    return;
    +  }
    +  console.log('processing', location.href);
    +  // activate();
    +}

    \ No newline at end of file diff --git a/api/metadata-block/index.html b/api/metadata-block/index.html new file mode 100644 index 00000000..7779ef95 --- /dev/null +++ b/api/metadata-block/index.html @@ -0,0 +1,197 @@ + Metadata Block - Violentmonkey + +

    Metadata Block

    The metadata must follow the format:

    +
    // ==UserScript==
    +// @key value
    +// ==/UserScript==
    +

    Each line of the block must start with //, the first line must be // ==UserScript== and the last line must be // ==/UserScript==.

    +

    Make sure to maintain compatibility with various browsers and extensions that can install userscripts:

    +
      +
    1. Don’t add extraneous text or spaces at the beginning or ending of the metadata comments.
    2. +
    3. Use exactly one space after // in every metadata comment.
    4. +
    5. Put the metadata comment at the very beginning of the file to support engines like ScriptCat.
    6. +
    +

    Violentmonkey 2.12.0 and newer ignores spaces around the metadata comments.

    +

    Violentmonkey 2.26.1 and newer ignores any extraneous text around the metadata comments, just like Tampermonkey or Firemonkey, but there’ll be an error message about the broken syntax when installing or editing the script.

    +

    Some of the keys can be localized for multiple languages, by adding a colon and the locale code to the key, e.g. @name:zh-CN. The locale code is case insensitive.

    +

    Labels:

    +
      +
    • required The key must be set.
    • +
    • multilingual The key can be localized by appending a colon and the locale code, e.g. @name:zh-CN.
    • +
    • multiple The key can be set multiple times.
    • +
    +

    @name

    +

    requiredmultilingual

    +

    The name of the script, shown in script list and menus. It must be unique within a @namespace. If a script is being installed, and a script with the same @namespace and @name already exists, it will be replaced by the new one. Creating a script with same @namespace and @name will cause a conflict error.

    +

    Examples:

    +
    // @name          Violentmonkey Script
    +// @name:zh-CN    暴力猴脚本
    +

    @namespace

    +

    The combination of @namespace and @name is the unique identifier for a userscript. @namespace can be any string, for example the homepage of a group of userscripts by the same author. If not provided the @namespace falls back to an empty string ('').

    +

    Examples:

    +
    // @namespace https://violentmonkey.github.io
    +

    @match / @exclude-match

    +

    multiple

    +

    Define rules to decide whether a script should be executed. It is recommended to use @match instead of @include.

    +

    See more about matching.

    +

    @include / @exclude

    +

    multiple

    +

    The old way to decide whether a script should be executed.

    +

    See more about matching.

    +

    @version

    +

    Version of the script, it can be used to check if a script has new versions. It is composed of several parts, joined by .. Each part must start with numbers, and can be followed by alphabetic characters (although these aren’t used for version comparison).

    +

    Note: If no @version is specified, the script will not be updated automatically.

    +

    Examples:

    +
    // @version 1.0
    + 
    +// @version 1.2a.3
    +

    @description

    +

    multiple

    +

    A brief summary to describe the script.

    +

    Examples:

    +
    // @description         This script rocks.
    +// @description:zh-CN   这个脚本很棒!
    +

    @icon

    +

    Specify an icon for the script.

    +

    Examples:

    +
    // @icon https://my.cdn.com/icon.png
    +

    @require

    +

    multiple

    +

    Require another script to execute before the current one. The value is the URL to the required script, which may be relative to the URL the script is being installed from.

    +

    The required script will be downloaded along with installation and execute before the script.

    +

    Local files are not allowed to be required due to security concern. Also it does not make sense since scripts are supposed to work on different devices.

    +

    Examples:

    +
    // @require https://my.cdn.com/jquery.js
    +

    @resource

    +

    multiple

    +

    Some static resources that can be accessed in the script by GM_getResourceText and GM_getResourceURL. The value is composed of two parts, joined with one or more white spaces. The first part is the name of the resource, no white space is allowed in it. The second part is the URL to the resource, which may be relative to the URL the script is being installed from.

    +

    The resource will be downloaded along with installation and can be accessed when the script executes.

    +

    Examples:

    +
    // @resource logo https://my.cdn.com/logo.png
    +// @resource text https://my.cdn.com/some-text.txt
    +

    @run-at

    +

    Specifies when the script will run.

    +
      +
    • +

      document-start

      +

      Run as early as possible, document.documentElement is present, but may be without either document.head or document.body or both. Other scripts in the page may run earlier, see the note below.

      +
    • +
    • +

      document-body (since v2.12.10)

      +

      Run after document.body appears, possibly with some child elements inside, because detection is asynchronous (using a one-time MutationObserver).

      +
    • +
    • +

      document-end default

      +

      Run when DOMContentLoaded is fired, synchronously. At this time, the basic HTML of the page is ready and other resources like images might still be on the way.

      +
    • +
    • +

      document-idle

      +

      Run after DOMContentLoaded is fired, asynchronously, i.e. after yielding to the previously scheduled callbacks or urgent tasks like rendering. Prefer this mode for scripts that take more than a couple of milliseconds to compile and run (you can see it in devtools performance profiler), so that they don’t delay the moment the page becomes usable.

      +
    • +
    +

    When using document-start in Violentmonkey ManifestV2 there’s a limited method of ensuring the userscript runs before other scripts in the page:

    +
      +
    • the userscript must use the default page injection mode
    • +
    • the user must enable Synchronous page mode (Chrome/Firefox) or Alternative page mode (Firefox only, enabled by default) in Violentmonkey’s advanced settings;
    • +
    • the user didn’t change the injection mode to content in script’s editor or script’s settings or in Violentmonkey’s settings;
    • +
    • the cookies are not explicitly blocked for the site;
    • +
    • it’s not the incognito mode;
    • +
    • Firefox-only: the site doesn’t block script elements via its CSP;
    • +
    +

    @noframes

    +

    When present, the script will execute only in top level document, but not in nested frames.

    +
    // @noframes
    +

    @grant

    +

    multiple

    +

    Specify which special APIs should be granted and can be used when the script executes.

    +
      +
    • +

      If no @grant is present, the script is sandboxed with minimum API access: GM_info, GM.info, and unsafeWindow necessary to modify globals of the webpage. Note that this behavior was only introduced in Violentmonkey 2.32.0 to improve compatibility and match Tampermonkey, whereas previously @grant none was assumed.

      +
    • +
    • +

      In case you don’t need special API or sandboxing

      +
      // @grant none
      +

      Sandbox is disabled in this mode, meaning the script can add/modify globals directly without the need to use unsafeWindow.

      +
    • +
    • +

      In case any special API is used, it must be explicitly granted

      +
      // @grant GM_getValue
      +// @grant GM_setValue
      +

      …or for the new GM.* API methods (Since VM2.12.10):

      +
      // @grant GM.getValue
      +// @grant GM.setValue
      +
    • +
    +

    In addition to GM API the following privileges may be granted:

    +
      +
    • +

      // @grant window.close

      +

      Since VM2.6.2
      +Allows closing the tab via window.close()

      +
    • +
    • +

      // @grant window.focus

      +

      Since VM2.12.10
      +Allows focusing the tab via window.focus() even if the user didn’t interact with it first.

      +
    • +
    +

    @inject-into

    +

    Added in Violentmonkey v2.10.0

    +

    Decide which context the script will be injected into.

    +

    If not set in the metadata block, the default value auto will be used. +However, you can change the default value in Violentmonkey settings.

    +

    Possible values:

    +
      +
    • +

      page

      +

      Inject into context of the web page.

      +

      In this mode, unsafeWindow refers to the window object, +allowing the script to access JavaScript objects of the web page, +just like normal page scripts can.

      +
    • +
    • +

      content

      +

      Inject into context of content scripts.

      +

      In this mode, unsafeWindow refers to the global object in content script. +As a result, the script can access and modify the page’s DOM, +but cannot access JavaScript objects of the web page.

      +
    • +
    • +

      auto default

      +

      Try to inject into context of the web page. If blocked by CSP rules, inject as a content script.

      +
    • +
    +

    @downloadURL

    +

    The URL the script can be downloaded from. Checked for updates automatically at a regular interval, and also manually on user request. Automatically added when using “Install from URL.”

    +

    @supportURL

    +

    If supplied, the question mark icon in the user scripts list will link to this.

    +

    @homepageURL

    +

    If supplied, the home icon in the user scripts list will link to this.

    +

    @unwrap

    +

    Since VM2.13.1.

    +

    If supplied, the script will be injected as is into the global scope of the page, i.e. without our standard wrapper like window.VMxxx=function(){...}.

    +

    The @grant key is ignored so the script won’t have access to GM.* or GM_* API. +The @inject-into key is supported as usual.

    +

    A typical use case is direct access to global page variables declared as const or let. In a standard userscript you would have to create a script element yourself explicitly by using document.createElement or GM_addElement, then transfer the result via a CustomEvent or unsafeWindow.foo.

    +

    Another use case is migration from other extensions that run your JavaScript code as is, without userscript API.

    +

    @top-level-await

    +

    Since VM2.19.2.

    +

    Enables top-level await in your script. Useful when the rest of your script’s code depends on some external event e.g. when waiting for an element using MutationObserver or fetching data from network.

    +
      +
    • Avoid using it to import dependencies that should always run; prefer using @require and @resource.
    • +
    • Can’t be used with @unwrap.
    • +

    \ No newline at end of file diff --git a/content/pages/api/gm.mdx b/content/pages/api/gm.mdx deleted file mode 100644 index a67d6d87..00000000 --- a/content/pages/api/gm.mdx +++ /dev/null @@ -1,725 +0,0 @@ ---- -title: Privileged APIs -date: 2018-04-25 15:15:15 -sidebar: - order: 0 ---- - -Violentmonkey APIs are derived from those in Greasemonkey v3, and most of them work the same way, `GM.*` [Greasemonkey v4-compatible](https://wiki.greasespot.net/Greasemonkey_Manual:API) aliases were added in VM2.12.0. - -## unsafeWindow - -It's the original `window` object of the webpage that allows reading or modifying global variables, necessary when the script is sandboxed, because its `window` becomes a wrapper that confines modifications like `window.foo = 123` to this script's scope. - -Sandboxing is enabled by default and disabled only if `@grant none` is specified, just like in Tampermonkey. Note that in older versions of Violentmonkey (before v2.32) sandboxing was also disabled when there were no `@grant` keys. - -## GM_* - -`GM_*` are a group of special APIs provided by Violentmonkey. - -### GM_info - - - -### GM_getValue - -Retrieves a value for current script from storage. - -```js -let value = GM_getValue(key, defaultValue) -``` - -- - - The name for `value` to load. - -- - - The default value to return if no value exists in the storage. - -### GM_getValues - -*Since VM2.19.1* - -Retrieves multiple values for current script from storage. - -1. **Using an array of keys.** - - ```js - let values = GM_getValues(['foo', 'bar']) - ``` - - | Keys in storage | Result | - |-|-| - | foo, bar | `{ foo: 123, bar: [1, 2, 3] }` | - | foo | `{ foo: 123 }` | - -2. **Using an object.** - - Each key is a name to read from storage, the value is the default to be used in the result if the key was not in storage. - - ```js - let values = GM_getValues({ foo: 1, bar: [2] }) - ``` - - | Keys in storage | Result | - |-|-| - | foo, bar | `{ foo: 123, bar: [1, 2, 3] }` | - | foo | `{ foo: 123, bar: [2] }` | - -### GM_setValue - -Sets a key / value pair for current script to storage. - -```js -GM_setValue(key, value) -``` - -- - - The unique name for `value` within this script. - -- - - The value to be stored, which must be *JSON serializable* (string, number, boolean, null, or an array/object consisting of these types) so for example you can't store DOM elements or objects with cyclic dependencies. - -### GM_setValues - -*Since VM2.19.1* - -Writes multiple values to current script's storage. - -```js -GM_setValues({ foo: 1, bar: [1, 2, 3] }) -``` - -- - - Each `key:value` pair in the object will be stored individually, so the example above is basically a more efficient version of `GM_setValue('foo', 1); GM_setValue('bar', [1, 2, 3]);` - - Must be *JSON serializable* (see [GM_setValue](#gm_setvalue)). - -### GM_deleteValue - -Deletes an existing key / value pair for current script from storage. - -```js -GM_deleteValue(key) -``` - -- - - The unique name for `value` within this script. - -### GM_deleteValues - -*Since VM2.19.1* - -Deletes values with the specified keys in current script's storage. - -```js -GM_deleteValues(['foo', 'bar']) -``` - -- - - Array of keys to delete. - -### GM_listValues - -Returns an array of keys of all available values within this script. - -```js -let arrayOfKeys = GM_listValues() -``` - -### GM_addValueChangeListener - -Adds a change listener to the storage and returns the listener ID. - -```js -let listenerId = GM_addValueChangeListener(name, callback) -``` - -* - - The name of the observed variable - -* - - * - - The name of the observed variable - - * - - The old value of the observed variable (`undefined` if it was created) - - * - - The new value of the observed variable (`undefined` if it was deleted) - - * - - `true` if modified by the userscript instance of another tab or `false` for this script instance. Can be used by scripts of different browser tabs to communicate with each other. - -### GM_removeValueChangeListener - -Removes a change listener by its ID. - -```js -GM_removeValueChangeListener(listenerId) -``` - -- - -### GM_getResourceText - -Retrieves a text resource from the metadata block. - -```js -let text = GM_getResourceText(name) -``` - -- - - Name of a resource defined in the [metadata block](../metadata-block/#resource). - -### GM_getResourceURL - -Retrieves a `blob:` or `data:` URL of a resource from the metadata block. - -```js -let blobUrl = GM_getResourceURL(name); -let blobOrDataUrl = GM_getResourceURL(name, isBlobUrl); -``` - -- - - Name of a resource defined in the [metadata block](../metadata-block/#resource). - -- - - * `true` returns a `blob:` URL. It's short and cacheable, so it's good for reusing in multiple DOM elements. - - * `false` returns a `data:` URL. It's long so reusing it in DOM may be less performant due to the lack of caching, but it's particularly handy for direct synchronous decoding of the data on sites that forbid fetching `blob:` in their CSP. - -Note: when setting this URL as `src` or `href` of a DOM element, it may fail on some sites with a particularly strict CSP that forbids `blob:` or `data:` URLs. Such sites are rare though. The workaround in Chrome is to use `GM_addElement`, whereas in Firefox you'll have to disable CSP either globally via `about:config` or by using an additional extension that modifies HTTP headers selectively. - -### GM_addElement - -*Since VM2.13.1* - -Appends and returns an element with the specified attributes with the primary purpose of circumventing a strict `Content-Security-Policy` that forbids adding inline code or style. - -```js -let element1 = GM_addElement(tagName, attributes); -let element2 = GM_addElement(parentNode, tagName, attributes); -``` - -* - - The parent node to which the new node will be appended. - - It can be inside ShadowDOM: `someElement.shadowRoot`. - - When omitted, it'll be determined automatically: - 1. `document.head` (``) for `script`, `link`, `style`, `meta` tags. - 2. `document.body` (``) for other tags or when there's no ``. - 3. `document.documentElement` (`` or an XML root node) otherwise. - -* - - A tag name like `'script'`. - -* - - The keys are HTML attributes, not DOM properties, except `textContent` which sets DOM property `textContent`. The values are strings so if you want to assign a private function to `onload` you can do it after the element is created. - -Examples: -```js -// using a private function in `onload` -let el = GM_addElement('script', { src: 'https://....' }); -el.onload = () => console.log('loaded', el); -``` -```js -// same as GM_addStyle('a { color:red }') -let el = GM_addElement('style', { textContent: 'a { color:red }' }); -``` -```js -// appending to an arbitrary node -let el = GM_addElement(parentElement.shadowRoot, 'iframe', { src: url }); -``` -Notes: -* The element is returned immediately (synchronously) even with `GM.addElement`, no need for `.then()`, but you can use it if you want, just once though as it's auto-removed to avoid recursion. The API is synchronous because Violentmonkey runs scripts only when the root element appears, so there's always a node to serve as a parent. -* Invalid arguments will raise an exception, which can be caught using `try {} catch (e) {}`, just like standard DOM API `document.createElement`. - -### GM_addStyle - -Appends and returns a ` +

    FAQ

    Why does Violentmonkey require clipboard permission?

    +

    To make GM_setClipboard work on different browsers.

    +

    First of all, the required permission is named clipboardWrite, which means it just allows writing to clipboard, but not reading from clipboard.

    +

    Secondly, there is a function used in userscripts named GM_setClipboard. It writes to clipboard, just exactly what clipboardWrite allows.

    +

    On Chrome, the extension can write to clipboard in the background even without clipboardWrite permission. But on Firefox, this won’t work without the permission. So clipboardWrite permission is required to make the extension work on different browsers.

    +

    Why are third-party sync services used instead of native ones?

    +

    Because browser.storage.sync is designed to sync preferences instead of large data, and it cannot sync data between different browsers. In some browsers there is no such API implemented.

    +

    According to the document, browser.storage.sync is designed to store preferences and sync them to different instances of the same browser with the same user logged in. And something more, up to 100KB of data can be stored and synced.

    +

    So the limitations are:

    +
      +
    1. Up to 100KB of data can be stored, even smaller than size of a feature-rich script.
    2. +
    3. Only sync on the same browser, no share between Chrome and Firefox.
    4. +
    +

    With third-party sync services (Dropbox, Google Drive, etc.):

    +
      +
    1. More data can be stored.
    2. +
    3. Scripts can be shared in Chrome, Firefox, Vivaldi, Maxthon, etc. Your scripts are synced to different browsers if only Violentmonkey is installed.
    4. +
    +

    Where are the userscripts stored?

    +

    They are stored in the local storage area of the browser extension. The storage may have different implementations in different browsers, so we can’t tell exactly where or in what format is the data stored.

    +

    In other words, you won’t be able to find your scripts as normal files in your disk. They may be stored in some database maintained by the browser you use.

    +

    Why is the release minified?

    +

    The short answer for this question is to make the code clean and efficient.

    +

    To be clear, our extension is minified but not obfuscated in release. It is a very common workflow to compile and minify code for web apps, and we are using popular tools that are used all over the world. See this post to learn more about the workflows.


    \ No newline at end of file diff --git a/get-it/index.html b/get-it/index.html new file mode 100644 index 00000000..a1154ac1 --- /dev/null +++ b/get-it/index.html @@ -0,0 +1,40 @@ + Get Violentmonkey - Violentmonkey + +

    Get Violentmonkey

    Violentmonkey is built with WebExtension APIs. It supports a lot of browsers.

    +

    You can either install it from web stores or build from source code.

    +

    WebExtension-compatible browsers

    +

    Chrome, Firefox 57+, Edge, Chromium, Brave, Cent, Orion, Opera 15+, Vivaldi, QQBrowser, etc.

    +

    Stable Release

    + +

    Note

    +
      +
    • Opera users please install from Chrome Web Store because the Opera team no longer reviews the extension because they think Violentmonkey is too complicated and they don’t have time to review it. 😞
    • +
    +

    Beta Release

    +

    The beta version is published more frequently than the stable release, with bug fixes and new features that will be included in the next stable release. +However it may have bugs and lead to data loss. Please back up your data and use it at your own risk.

    + +
    +

    Not above?

    +

    Unfortunately your browser may be unable to support such extensions. +You are welcome to help improve it.


    \ No newline at end of file diff --git a/guide/creating-a-userscript/index.html b/guide/creating-a-userscript/index.html new file mode 100644 index 00000000..e6b0926f --- /dev/null +++ b/guide/creating-a-userscript/index.html @@ -0,0 +1,47 @@ + Creating a userscript - Violentmonkey + +

    Creating a userscript

    Assuming you already know what a userscript is, we will talk about how to create your own userscript here.

    +

    With the help of a userscript manager, such as Violentmonkey, you can easily create your own script.

    +

    Create a userscript for the active tab

    +

    First make sure you have Violentmonkey installed.

    +

    Then you’ll find a monkey icon on the toolbar of your browser.

    +

    Click on the toolbar icon, and then click on the Plus icon to create a new script for the site of the active tab.

    +

    +

    What makes up a userscript

    +

    A userscript consists of two parts: the metadata and your program.

    +

    The metadata declares the basic information of a script:

    +
      +
    • descriptive fields, like name, description, author, etc.;
    • +
    • APIs and permissions, like in which URLs the script is allowed to run;
    • +
    +

    For more details, see Metadata Block and GM functions.

    +
    // ==UserScript==
    +// @name        New script
    +// @namespace   Violentmonkey Scripts
    +// @match       *://*/*
    +// @grant       none
    +// @version     1.0
    +// @author      -
    +// @description 3/8/2020, 8:42:28 PM
    +// ==/UserScript==
    +

    The rest part of the code runs in target webpages as usual JavaScript assets.

    +

    Userscript code

    +

    Please note that the code executes directly in the browser, so the syntax in this script must be supported by the browser natively.

    +

    For example, ESNext features that are not supported by the browser will fail as SyntaxError.

    +

    Modern browsers like Chrome, Firefox, Edge support most of ES 6 features, so it is safe to use most of them if you are not targetting last century users.

    +

    However there are exceptions. For example ES modules won’t work in userscripts because they are supposed to inject into webpage as single-file scripts.

    +

    If you want to write userscripts with some awesome features that are not supported by browsers yet or won’t be supported, such as ES modules, CSS modules, please check out How to use modern syntax in a userscript.


    \ No newline at end of file diff --git a/guide/index.html b/guide/index.html new file mode 100644 index 00000000..37470e2d --- /dev/null +++ b/guide/index.html @@ -0,0 +1 @@ +Redirecting to: creating-a-userscript/ Redirecting from /guide/ to creating-a-userscript/ \ No newline at end of file diff --git a/guide/keyboard-shortcuts/index.html b/guide/keyboard-shortcuts/index.html new file mode 100644 index 00000000..8708ab66 --- /dev/null +++ b/guide/keyboard-shortcuts/index.html @@ -0,0 +1,67 @@ + Keyboard Shortcuts - Violentmonkey + +

    Keyboard Shortcuts

    It is a common case to provide a keyboard shortcut for a function in a userscript.

    +

    We provided an easy way to achieve this by introducing @violentmonkey/shortcut.

    +
    +

    TIP

    +

    +

    @violentmonkey/shortcut is a library provided by the Violentmonkey team, but it is just JavaScript and can be used with other script managers as well. You can find the API reference in its README page.

    +
    +

    Preparation

    +

    Option 1. @require

    +

    Add @violentmonkey/shortcut to the meta block of our script:

    +
    // ==UserScript==
    +// ...
    +// @require https://cdn.jsdelivr.net/npm/@violentmonkey/shortcut@1
    +// ==/UserScript==
    +

    And access all exports under VM.shortcut:

    +
    const { register } = VM.shortcut;
    +

    Option 2. Installation

    +

    Another way to use this library is to install it with NPM and import it. TypeScript IntelliSense should work out of box in this way, but we will need a bundler to compile our script.

    +

    It is highly recommended to use our generator to initiate a userscript project with modern syntax support.

    +

    If we are done with the bundler, we can install @violentmonkey/shortcut as a dependency:

    +
    $ npm i @violentmonkey/shortcut
    +

    And use it in our code:

    +
    import { register } from '@violentmonkey/shortcut';
    +

    Quick Start

    +

    Easily register a keyboard shortcut:

    +
    VM.shortcut.register('c-i', () => {
    +  console.log('You just pressed Ctrl-I');
    +});
    +

    Register a key sequence:

    +
    VM.shortcut.register('c-a c-b', () => {
    +  console.log('You just pressed Ctrl-A Ctrl-B sequence');
    +});
    +

    Disable and enable all key bindings at any time:

    +
    // Disable all key bindings temporarily
    +VM.shortcut.disable();
    + 
    +// Re-enable key bindings
    +VM.shortcut.enable();
    +

    Shortcut for Menu Command

    +

    Register a menu command with a shortcut:

    +
    const shortcut = 'c-g c-g';
    +const name = 'Good Game';
    +const handler = () => alert('Good Game!');
    + 
    +// Register menu command
    +const menuName = `${name} (${VM.shortcut.reprShortcut(shortcut)})`;
    +GM_registerMenuCommand(menuName, handler);
    + 
    +// Register shortcut
    +VM.shortcut.register(shortcut, handler);
    +

    See @violentmonkey/shortcut for more advanced usage.


    \ No newline at end of file diff --git a/guide/observing-dom/index.html b/guide/observing-dom/index.html new file mode 100644 index 00000000..9c9114af --- /dev/null +++ b/guide/observing-dom/index.html @@ -0,0 +1,77 @@ + Observing DOM - Violentmonkey + +

    Observing DOM

    Background

    +

    It is a common case to operate on elements that are created dynamically, which may not be ready even on document-end.

    +

    In earlier userscripts we can see authors using timers to detect DOM elements periodically, which works in most browsers but is less effective, and there is likely obvious lag after the elements appear and before the operations are performed.

    +

    A better way to do stuff when certain element is ready is to use MutationObserver instead of timers. MutationObserver is well supported in modern browsers, including those Violentmonkey works on, as defined here.

    +

    You can stop reading this now if you are familiar with MutationObserver and prefer native APIs.

    +

    Introducing @violentmonkey/dom

    +

    If you are looking for an easy and friendly way to observe elements, @violentmonkey/dom might be what you want.

    +
    +

    TIP

    +

    +

    @violentmonkey/dom is a library provided by the Violentmonkey team. Nevertheless, it is just pure JavaScript and can be used with other script managers.

    +
    +

    Once the library is required, we can use its methods under the VM namespace. See the documentation for more details.

    +

    Requirements

    +

    Add @violentmonkey/dom to the meta block of your script:

    +
    // ==UserScript==
    +// ...
    +// @require https://cdn.jsdelivr.net/npm/@violentmonkey/dom@2
    +// ==/UserScript==
    +

    If the project is initiated from our generator, it’s likely that the dependency is already included.

    +

    Observing

    +

    After preparing the requirements, we can observe elements by VM.observe (doc), which utilizes MutationObserver under the hood.

    +

    For example, prepend <h1>Profile</h1> to the dynamically created <div class="profile">:

    +
    const disconnect = VM.observe(document.body, () => {
    +  // Find the target node
    +  const node = document.querySelector('.profile');
    + 
    +  if (node) {
    +    const h1 = document.createElement('h1');
    +    h1.textContent = 'Profile';
    +    node.prepend(h1);
    + 
    +    // disconnect observer
    +    return true;
    +  }
    +});
    + 
    +// You can also disconnect the observer explicitly when it's not used any more
    +disconnect();
    +

    Note that return true in the end is needed to disconnect the observer once we find the target node. Otherwise the detection continues and makes useless callbacks.

    +

    To observe document.body we must make sure document.body exists. This should not be a problem if @run-at is omitted or set to a value other than document-start.

    +

    (Optionally) Using jQuery

    +

    This is not recommended though, we put it here just in case some people are big fans of jQuery.

    +

    It is quite simple to integrate jQuery with the observer. Before we begin we must include jQuery as a dependency:

    +
    // ==UserScript==
    +// ...
    +// @require https://cdn.jsdelivr.net/npm/@violentmonkey/dom@1
    +// @require https://cdn.jsdelivr.net/npm/jquery@3/dist/jquery.min.js
    +// ==/UserScript==
    +

    Then we can wrap the node with jQuery and operate it the jQuery way:

    +
    VM.observe(document.body, () => {
    +  // Find the target node
    +  const $node = $('.profile');
    + 
    +  if ($node.length) {
    +    $node.prepend('<h1>Profile</h1>');
    + 
    +    // disconnect observer
    +    return true;
    +  }
    +});

    \ No newline at end of file diff --git a/guide/using-modern-syntax/index.html b/guide/using-modern-syntax/index.html new file mode 100644 index 00000000..1c862bf9 --- /dev/null +++ b/guide/using-modern-syntax/index.html @@ -0,0 +1,67 @@ + Modern Syntax - Violentmonkey + +

    Modern Syntax

    Violentmonkey itself is built for modern browsers, to be precise, for Chrome >= 57 and Firefox >= 57. So if your browser has Violentmonkey, it is likely it also supports many ES6 features natively, for example, async / await, block-scoped variables, etc.

    +

    However, there are many more cool features that are not fully supported by browsers, or some features such as TypeScript and ES modules that won’t be supported in userscripts natively.

    +

    In this tutorial we are going to create a project to compile ESNext and other modern syntax to browser compliant code.

    +

    Prerequisites

    +
      +
    • Node >= 18
    • +
    • NPM >= 8.15.0
    • +
    +

    Initialization

    +

    Create a new directory for your script:

    +
    $ mkdir my-script
    +$ cd my-script
    +

    Thanks to npx, we can generate the new project with a one-line command:

    +
    $ npx -p github:violentmonkey/generator-userscript -p yo yo @violentmonkey/userscript
    +

    Under the hood, we use Yeoman to create a project with JavaScript toolchain, compiling source code with Babel, and bundling them with Rollup. See the source code at GitHub.

    +

    Now we should get a project with the following structure:

    +
    ├── dist
    +├── src
    +│  ├── app.tsx
    +│  ├── index.ts
    +│  ├── meta.js
    +│  ├── style.css
    +│  └── style.module.css
    +├── babel.config.js
    +├── package.json
    +├── postcss.config.cjs
    +├── rollup.config.mjs
    +├── tsconfig.json
    +├── uno.config.ts
    +└── README.md
    +

    Source code files are kept in src, and will be compiled to dist/index.user.js.

    +

    src/meta.js contains the metadata of our script, see Metadata Block for more details. Do not add actual code to this file.

    +

    src/index.ts is the entrance of our script, other files in src can be imported.

    +

    Development

    +
    $ npm run dev
    +

    Source code will be watched by the compiler and compiled to dist once changed.

    +

    By installing the compiled userscript from dist, we can test and keep up with the latest code of our userscript. See also How to edit scripts with your favorite editor.

    +

    Building

    +
    $ npm run build
    +

    In this way the source code will be compiled exactly once, and saved in dist.

    +

    The version and author of our userscript will be synced with that in package.json.

    +

    Features

    +

    We have quite a few lovely features enabled by default:

    +
      +
    • TypeScript
    • +
    • CSS modules (applied to files ending with .module.css)
    • +
    • UnoCSS
    • +
    • SolidJS
    • +
    +

    Of course you don’t have to use all these features. If you don’t like them, you can simply ignore them or opt out by removing the plugins.

    +

    To learn more about each feature, check Features in Userscript Generator.


    \ No newline at end of file diff --git a/index.html b/index.html new file mode 100644 index 00000000..8de24007 --- /dev/null +++ b/index.html @@ -0,0 +1,66 @@ + Violentmonkey + +
    Violentmonkey
    An open source userscript manager.
    + +

    Violentmonkey provides userscripts support for browsers.

    +

    Features

    +
      +
    • Powerful +
        +
      • Customize web pages.
      • +
      • Automate your work.
      • +
      +
    • +
    • Data on the cloud +
        +
      • Sync to Dropbox, OneDrive, Google Drive, or a WebDAV service.
      • +
      • Sync between different browsers.
      • +
      +
    • +
    • User-friendly +
        +
      • Keep simple, no need to make choices.
      • +
      • Communicate with external editors.
      • +
      +
    • +
    +
    +

    NOTE

    +

    This extension does not contain any ads and does not modify web pages automatically. +Any changes and modifications on the sites are done by installed scripts. +Therefore, please install only scripts that you trust.

    +
    +
    +

    WARNING

    +

    This extension is no longer supported on Chrome due to its Manifest V2 architecture. While a Manifest V3 rewrite might be considered in the future, it is not planned for the foreseeable future due to the considerable effort involved and the potential for losing existing features.

    +

    As an alternative, consider using Brave browser which is also open source, where you can install it from the Chrome Web Store.

    +
    +

    Installation

    +

    Violentmonkey is built with web extension APIs, thus supports many browsers.

    + +

    View all versions (including Beta) here.

    +

    Contribution

    +

    You are absolutely welcome to contribute to this project by:

    +

    \ No newline at end of file diff --git a/localization/index.html b/localization/index.html new file mode 100644 index 00000000..cfb29ec7 --- /dev/null +++ b/localization/index.html @@ -0,0 +1,41 @@ + Localization - Violentmonkey + +

    Localization

    It is highly recommended to update the translations on Transifex, to utilize the powerful features provided by the platform and for better maintenance.

    +

    We have automated weekly synchronization from Transifex, so the translations will be updated to the code soon.

    + +

    👉🏻 Start translating or fix an existing translation. +

    +

    Pull Requests

    +

    Please consider using Transifex first.

    +
      +
    1. +

      Fork Violentmonkey from GitHub.

      +
    2. +
    3. +

      Copy src/_locales/en/messages.yml into src/_locales/<your_locale>/messages.yml.

      +
    4. +
    5. +

      Translate messages in the created messages.yml or the one you’d like to modify.

      +
      +

      IMPORTANT

      +

      +

      Make sure the modified messages.yml is valid yaml.

      +

      If you are not sure how to do this, please use Transifex instead.

      +
      +
    6. +
    7. +

      Commit changes and create a pull request.

      +
    8. +

    \ No newline at end of file diff --git a/posts/features-in-userscript-generator/index.html b/posts/features-in-userscript-generator/index.html new file mode 100644 index 00000000..cdef77d7 --- /dev/null +++ b/posts/features-in-userscript-generator/index.html @@ -0,0 +1,78 @@ + Features in Userscript Generator - Violentmonkey + +

    Features in Userscript Generator

    Userscript Generator is a Yeoman generator to quickly initiate a new project for a userscript.

    +
    +

    TIP

    +

    +

    See Using modern syntax for the usage.

    +
    +

    In this post we will dive into each feature and see why and how we use it, and whether we have different choices.

    +

    CSS modules

    +

    Both global CSS (e.g. style.css) and CSS modules (e.g. style.module.css) are supported.

    +

    A userscript usually works in different websites which may not be maintained by the script developer. So if the script provides independent UI in the website, it must be careful not to break the website and not to be broken by the website. We have two choices, shadow DOM and CSS modules.

    +
      +
    • Option 1: Shadow DOM +
        +
      • Pros: Neat class names, no repeated prefix.
      • +
      • Cons: It doesn’t always work because the CSS can only be injected inside the shadow DOM root, which may be blocked by the CSP.
      • +
      +
    • +
    • Option 2: CSS modules +
        +
      • Pros: It can bypass the CSP issue because the CSS can be injected with the GM_addStyle API.
      • +
      • Cons: More code required, less readable class names in the DOM.
      • +
      +
    • +
    +

    So if you expect your script to work in many different websites including those protected by CSP, CSS modules might be a better choice. Otherwise use global CSS with shadow DOM for simplicity.

    +

    UnoCSS

    +

    UnoCSS is similar to TailwindCSS but arguably more flexible and reliable.

    +

    At the time of writing, TailwindCSS does not work well for userscripts, because it either injects reset CSS breaking the style of the host, or misses default values leading to invalid CSS output. This is a bug and has occurred before.

    +

    By using UnoCSS or its alternatives, the effort of maintaining CSS code is significantly reduced.

    +

    We just write class names based on what we need, and the CSS code will be generated automatically. If later we don’t need this class name any more, the related CSS code will also be pruned.

    +

    SolidJS

    +

    SolidJS is a light-weight UI library. It has some similarities with React, but much lighter and easier to use for a small project like a userscript.

    +

    However, SolidJS doesn’t have an official UMD or IIFE package. In other words, there is no easy way for us to import SolidJS as a single file resource using @require.

    +

    We have several options here:

    +
      +
    • +

      Option 1: import it and bundle it in the userscript.

      +
        +
      • Pros: Simple to go.
      • +
      • Cons: Bloated userscript size and worse readability.
      • +
      +
    • +
    • +

      Option 2: import it using dynamic import at runtime.

      +
        +
      • Pros: Better readability, smaller file size.
      • +
      • Cons: An obvious delay before the UI appears.
      • +
      • Suggestion: If the delay is acceptable, this might be a good choice.
      • +
      +
    • +
    • +

      Option 3: compile SolidJS as a UMD package and use it in different scripts.

      +

      This is exactly what I have done in the generator. Check the compiled file at jsdelivr and the source code at @violentmonkey/dom.

      +
        +
      • Pros: Good readability, smaller file size, fast loading, reusable common assets between different scripts.
      • +
      • Cons: Need to maintain an extra file, and it might not always be up-to-date.
      • +
      +
    • +
    +

    Absolutely, every decision involves a trade-off, and ultimately, you have to make your own choices.

    +

    Summary

    +

    Thanks to the powerful tools, the development of a userscript is getting much smoother.

    +

    We can use the generator above to quickly create a new userscript with modern tech stack.


    +Published on
    \ No newline at end of file diff --git a/posts/how-to-edit-scripts-with-your-favorite-editor/index.html b/posts/how-to-edit-scripts-with-your-favorite-editor/index.html new file mode 100644 index 00000000..408278c4 --- /dev/null +++ b/posts/how-to-edit-scripts-with-your-favorite-editor/index.html @@ -0,0 +1,66 @@ + How to edit scripts with your favorite editor? - Violentmonkey + +

    How to edit scripts with your favorite editor?

    Since Violentmonkey is lightweight by design with a simple built-in editor featuring just a few customizations in the extension’s options, we encourage you to use an external editor or IDE that’s not restricted by browser quirks like the hardcoded hotkeys or performance limitations.

    +

    ⚡ Simply open the local .user.js file in Violentmonkey and enable tracking, so each time you save the file in your external editor the changes are automatically incorporated.

    +

    Now let’s dive into the details.

    +

    1. One-time preparation

    +
      +
    1. Copy the code of the script from Violentmonkey into your editor.
    2. +
    3. Save it to a file and give it a name ending with .user.js
    4. +
    +

    2. Open .user.js file in Violentmonkey installer

    +

    2.1. Drag .user.js file into any Violentmonkey UI page [Chrome only]

    +
      +
    • +

      Chrome 86 or newer, Violentmonkey 2.16 or newer. This is the most performant method since Chrome 133 that implemented FileSystemObserver API to notify of file changes.

      +
    • +
    • +

      If you assign a hotkey to activate Violentmonkey in the browser’s options for extensions, you can press it while dragging the file.

      +
    • +
    +

    2.2. Drag .user.js file into the browser toolbar or tab label area

    +
      +
    • +

      In Chrome-like browsers you must enable “Allow access to file URLs” in Violentmonkey’s details in chrome://extensions page first. Since this is dangerous (any userscript will be able to read any local file via GM_xmlhttpRequest), you may want to use the other methods instead.

      +
    • +
    • +

      In modern Firefox-like browsers don’t close the tab of this file while tracking as it’s used to read the contents of the file.

      +
    • +
    +

    2.3. Set up a server and navigate to http://localhost:8080/my-script.user.js

    +

    The port number :8080 may be different or even omitted depending on the server you installed.

    +

    A good server is indexzero/http-server. Once you install it, just type http-server -c5 at the directory of your script to start a server. The -c5 option sets cache time for max-age header to 5 seconds (more info), thus forcing a browser to query the server URL every 5 seconds. The caching can be disabled with -c-1 option.

    +

    If you want a UI, there are such servers as well, e.g. HTTP File Server for Windows.

    +

    ⚠ Make sure the hostname is localhost and the script name ends with .user.js.

    +

    3. Enable tracking

    +

    +

    Click Track external edits button to confirm installation and start tracking.

    +

    You can also make it the default button for local files by ticking the checkbox on the right, so it can be invoked via the hotkey shown in parentheses.

    +

    4. Edit the local file and save it

    +

    As long as the installer tab is open it will track your local file and install the new version automatically into Violentmonkey after you save the file. You can save it either manually or by configuring auto-save in the options of your editor.

    +
      +
    • +

      The Stop tracking button may be useful for example when temporarily switching branches in your git repo. When finished, you can click Track external edits again.

      +
    • +
    • +

      The Reload tab option will automatically reload the active tab if it contains a website matched by this script when changes are detected.

      +
    • +
    +

    +

    Known issues

    +
      +
    • Firefox may throttle detection: the older the file is, the longer it takes to detect the changes. See this report.
    • +

    +Published on
    \ No newline at end of file diff --git a/posts/index.html b/posts/index.html new file mode 100644 index 00000000..fb44ca2c --- /dev/null +++ b/posts/index.html @@ -0,0 +1,13 @@ + Posts - Violentmonkey +
    \ No newline at end of file diff --git a/posts/inject-into-context/index.html b/posts/inject-into-context/index.html new file mode 100644 index 00000000..bdecf843 --- /dev/null +++ b/posts/inject-into-context/index.html @@ -0,0 +1,74 @@ + Inject scripts into different contexts - Violentmonkey + +

    Inject scripts into different contexts

    Since Violentmonkey v2.10.0, a new type of metadata named @inject-into is introduced. With its help, scripts can be injected into CSP restricted pages in Firefox now!

    +

    Contexts

    +

    As we know, there are two types of context for a script to execute in:

    +
      +
    • +

      context of a web page

      +

      The context in which all scripts of a web page execute. We will call it “page context” later.

      +
    • +
    • +

      context of content scripts

      +

      The context in which content scripts execute. We will call it “content context” later.

      +
    • +
    +

    Injection Modes

    +

    In earlier versions of Violentmonkey, all scripts will be injected into the page context.

    +

    This works well at most times in Chrome. However, Firefox works differently. All scripts will be blocked in websites with CSP rules blocking inline scripts, like GitHub. See issue #173, #408.

    +

    By introducing @inject-into, userscripts can be injected in Firefox now. In pages with CSP restrictions, we can inject userscripts into the content context.

    +

    Mode: page

    +

    This is the default mode, as the behavior in Violentmonkey v2.9.x.

    +

    unsafeWindow refers to window of the web page.

    +

    Example usage:

    +
    // ==UserScript==
    +// ...
    +// @inject-into page
    +// ==/UserScript==
    + 
    +// `@inject-into` should be set to `page` since we need to access `window` of page context.
    + 
    +// Accessing objects attached to `window` of page
    +alert('Hi, ' + unsafeWindow.context.user);
    +

    Mode: content

    +
    // ==UserScript==
    +// @inject-into content
    +// ==/UserScript==
    +

    In this mode, scripts will be injected into the content context.

    +

    The content context is an isolated world, scripts in this context have no access to JavaScript objects from page context. But they can communicate with DOM APIs such as addEventListener.

    +

    unsafeWindow refers to the global object of content context.

    +

    Scripts requiring access to JavaScript objects in the web page will not work in this mode. For example, unsafeWindow.jQuery becomes inaccessible even if jQuery is introduced in the page.

    +

    Mode: auto

    +
    // ==UserScript==
    +// @inject-into auto
    +// ==/UserScript==
    +

    In this mode, scripts will be injected into the page context if possible. If blocked by CSP, they will be injected into the content context. It is the script author’s job to check the environments.

    +

    Example usage:

    +
    // ==UserScript==
    +// ...
    +// @inject-into auto
    +// ==/UserScript==
    + 
    +// `@inject-into` can be set to `auto` if we don't need to access any JavaScript object from page context.
    + 
    +// Accessing JavaScript objects shared in both contexts
    +alert('The current page link is ' + window.location.href);
    + 
    +// Accessing DOM
    +document.body.style = 'background: orange';
    +

    Violentmonkey Settings

    +

    By default, a script will try to execute in the page context. In Firefox, this may fail in CSP restricted pages.

    +

    You can change the default behavior in the settings tab of Violentmonkey. By changing the default injection mode to auto, scripts that do not depend on traditional unsafeWindow will work again in Firefox.


    +Published on
    \ No newline at end of file diff --git a/posts/inject-scripts-with-blob-urls/index.html b/posts/inject-scripts-with-blob-urls/index.html new file mode 100644 index 00000000..cd486ceb --- /dev/null +++ b/posts/inject-scripts-with-blob-urls/index.html @@ -0,0 +1,74 @@ + Inject scripts with Blob URLs - Violentmonkey + +

    Inject scripts with Blob URLs

    Since Violentmonkey v2.8.15, scripts are injected with Blob URLs instead of textContent in v2.8.13-. Thanks to evilpie, see #246.

    +

    Before

    +

    In earlier versions, scripts are injected like this:

    +
    const s = document.createElement('script');
    +s.textContent = script;
    +document.body.appendChild(s);
    +document.body.removeChild(s);
    +

    This way works well on Chrome but does not work on Firefox 57- when page has a limit on inline script by CSP. See bugzilla.

    +

    Now

    +

    Since Firefox 58, we have a workaround by injecting scripts like this:

    +
    const b = new Blob([script], { type: 'text/javascript' });
    +const u = URL.createObjectURL(b);
    +const s = document.createElement('script');
    +s.src = u;
    +document.body.appendChild(s);
    +document.body.removeChild(s);
    +URL.revokeObjectURL(u);
    +

    Using Blob URLs instead of textContent, scripts can be injected to pages on Firefox 58+ too.

    +

    Problem

    +

    Then we encountered a problem (v2.8.14, #249): sometimes the scripts are not injected at all. After debugging for a while, I figured out what was happening.

    +

    First let’s take a look at the injection procedure:

    +
      +
    1. inject an initializer to context of page script
    2. +
    3. load userscripts from content script
    4. +
    5. post userscripts to the initializer through custom events
    6. +
    7. execute userscripts
    8. +
    +

    The problem is, when the userscripts are loaded and posted to the initializer, the initializer may be not ready yet. As a result, the posted userscripts are discarded.

    +

    But why won’t this happen before?

    +

    Because the textContent way is synchronous while the src way is asynchronous.

    +

    Using the textContent way, the initializer is initialized synchronously when injected. So the initializer is always ready when the userscripts are loaded.

    +

    But when using a Blob URL, the injection becomes asynchronous. Because it has to fetch the real content first. So the initializer may be not ready yet when the userscripts are laoded. Consequently, no userscript is injected.

    +

    Here is a demonstration:

    +
    {
    +  const s = document.createElement('script');
    +  s.textContent = 'console.log(1)';
    +  document.body.appendChild(s);
    +  document.body.removeChild(s);
    +}
    + 
    +{
    +  const s = document.createElement('script');
    +  const b = new Blob(['console.log(2)'], { type: 'text/javascript' });
    +  const u = URL.createObjectURL(b);
    +  s.src = u;
    +  document.body.appendChild(s);
    +  document.body.removeChild(s);
    +  URL.revokeObjectURL(u);
    +}
    + 
    +console.log(3);
    +

    By running the code above in a browser (e.g. Chrome), we got output as below:

    +
    1
    +3
    +2
    +
    +

    Conclusion

    +

    So we just need to ensure that the initializer is ready when posting userscripts to it.

    +

    Finally, it works on Chrome any and Firefox v58+, even on pages with CSP limitations.


    +Published on
    \ No newline at end of file diff --git a/posts/smart-rules-for-blacklist/index.html b/posts/smart-rules-for-blacklist/index.html new file mode 100644 index 00000000..a2dcb935 --- /dev/null +++ b/posts/smart-rules-for-blacklist/index.html @@ -0,0 +1,86 @@ + Smart rules for blacklist - Violentmonkey + +

    Smart rules for blacklist

    Userscripts are injected into web pages according to predefined rules. However, the rules do not always satisfy users for different reasons. In such cases, we need blacklist to exclude some web pages for all scripts.

    +

    Blacklist use cases

    +
      +
    • +

      hostnames

      +

      In most cases, we may want to add simply hostnames to exclude.

      +
    • +
    • +

      @exclude-match rules

      +

      Since match patterns are safer to match URLs, we prefer to use @exclude-match rules to exclude URLs more flexibly.

      +
    • +
    • +

      @exclude rules

      +

      They are commonly supported by userscripts, so we should just keep them work.

      +
    • +
    +

    Blacklist patterns

    +

    Taken all use cases into account, the blacklist may have following patterns:

    +
      +
    • +

      hostnames

      +

      A string without slashes, e.g. example.com, *.example.com.

      +
    • +
    • +

      match patterns

      +

      A string with scheme, hostname and pathname patterns, e.g. *://*/*, https://www.google.com/.

      +
    • +
    • +

      @exclude rules

      +

      A string prefixed with @exclude , e.g. @exclude https://*.

      +
    • +
    • +

      comments

      +

      A string starting with #, will be ignored.

      +
    • +
    +

    Here is a full example for blacklist:

    +
    # hostnames
    +www.google.com
    +
    +# @exclude-match rules
    +*://twitter.com/*
    +
    +# @exclude rules
    +@exclude https://example.com/*
    +
    +

    Whitelist patterns

    +

    For some people who want to disable Violentmonkey for most websites, a whitelist is needed.

    +

    To work as a whitelist, we can use following patterns:

    +
      +
    • +

      @match rules

      +

      A string prefixed with @match , and followed by a match pattern, e.g. @match https://www.google.com/*.

      +
    • +
    • +

      @include rules

      +

      A string prefixed with @include , e.g. @include https://*.

      +
    • +
    +

    If any of the rules above are matched, the URL bypasses the blacklist. +To make it a whitelist, we should block all other URLs by a rule at the end: *.

    +

    Here is a full example for whitelist:

    +
    # match rules
    +@match https://www.google.com/*
    +
    +# include rules
    +@include https://example.com/*
    +
    +# block everything else
    +*
    +

    +Published on
    \ No newline at end of file diff --git a/posts/violentmonkey-workflows/index.html b/posts/violentmonkey-workflows/index.html new file mode 100644 index 00000000..571e0518 --- /dev/null +++ b/posts/violentmonkey-workflows/index.html @@ -0,0 +1,46 @@ + Violentmonkey Workflows - Violentmonkey + +

    Violentmonkey Workflows

    Some facts:

    + +

    This post is trying to clarify the development workflows and how the extension is reviewed before it can be published at CWS (Chrome Web Store), AMO (addons.mozilla.org), Microsoft Edge Addons (MEA), etc.

    +

    Workflows

    +

    Basically we develop Violentmonkey with modern JavaScript syntax (ESNext) and build it with Babel, Webpack and their friends.

    +

    The source code is all kept in src. All the dependencies are imported via standard ES modules from NPM installed packages. The dependencies are installed via yarn so that we can leverage yarn.lock to make sure every developer gets exactly the same dependencies installed.

    +

    Development

    +

    By running yarn dev, we can get the development package in dist, which is unminified. The compiler keeps writing updates to dist once the source code changes.

    +

    The files in development mode contains a lot of code that should not run for users, such as development logs, helpful warnings for developers, etc. That is why the bundles generated during development are much larger (perhaps 10x) than those in the final release and runs much slower.

    +

    Release

    +

    When we are ready for a new release, we run yarn build to compile the source code in production mode, dropping all unnecessary spaces, debugging code, dead code, and optimizing statements to make them shorter.

    +

    All the tools involved in the toolchain are either included in the source code or installed via NPM, in other words they are totally public, and you can always check the code and build your own version.

    +

    Thanks to GitHub actions, the build process is triggered automatically once a tag is created in the repository, completely transparent to users. The action definitions can be found at .github/workflows/release.yml.

    +

    Publication

    +

    After the release package is created by GitHub actions, we download the release package and upload it to different stores.

    +

    There is a review step in all popular stores. In CWS we have to clarify why each permission is required in manifest.json. In AMO and MEA we need to provide the source code and tell the reviewers how our project is built, then the reviewers build the package from scratch and compare it to the version we submitted to make sure they are the same. So if you are installing Violentmonkey from the official links, you don’t need to worry about trackers or malicious code that is not shown in the source code because the reviewers have confirmed they are clean.

    +

    One exception is the beta release for Firefox, which is self-signed and self-hosted, aka. unlisted version — AMO has dropped support for beta versions and recommended the unlisted version for testing purpose since 2018. We serve our beta versions on top of this feature, and the whole process is automated via GitHub actions as mentioned above. The generated package is immediately uploaded to AMO and signed, and then uploaded to GitHub assets.

    +

    Why is the source code compiled?

    +

    Since we are in 2020s, this question should not be asked by a web developer. If you have employed such a guy, trust me, he/she should be fired.

    +

    We are using many lovely features in our project, some from ESNext, and some are popular in development but not supported natively by any browser. So we compile those parts to legacy JavaScript code to make the extension work for more browsers.

    +

    For example, we build UI in Violentmonkey with Vue.js, a popular framework good at building complexed UIs. It depends on quite a few custom annotations which need to be transformed to vanilla JavaScript and CSS so that the browser can understand.

    +

    There are also some constants injected at compilation time so that we don’t need to hard-code them.

    +

    Why is the generated code minified?

    +

    Generally, the larger the code is, the longer it takes for the parser to parse. So it is very common for web apps to minify the code before publication.

    +

    Another reason which is even more important is to strip the debugging related code because it actually runs in browser and slowers the runtime. It may be important for developers to find bugs but useless for normal users.

    +

    This is mainly what code minification does, but not code obfuscation. Code obfuscation usually encodes the minified code to make it harder to read. As a result, it becomes slower because decoding is required before the code can execute. We don’t need this and we have never included such tools in our project.

    +

    How to build the code by yourself?

    +

    If you don’t believe us and want to build the code by yourself, you can clone the Violentmonkey project and follow the build steps in README.


    +Published on
    \ No newline at end of file diff --git a/privacy/index.html b/privacy/index.html new file mode 100644 index 00000000..e594c423 --- /dev/null +++ b/privacy/index.html @@ -0,0 +1,30 @@ + Privacy Policy - Violentmonkey + +

    Privacy Policy

    Effective date: November 7, 2019

    +

    Violentmonkey (“we”) does not collect any of your personal data, period.

    +

    As discussed in this issue, we will not collect any of your usage data, even anonymously.

    +

    Service Providers

    +

    We use popular cloud storage services (Dropbox, Google Drive, OneDrive) to synchronize extension data with your authorization. Your script code and settings may be synced to the cloud service directly, without transit to other servers.

    +

    We do not use Google Analytics or similar technologies to collect your browser information.

    +

    We do not disclose your personal data and extension data to any other third party.

    + +

    Our service may contain links to other sites that are not operated by us. If you click on a third party link, you will be directed to that third party’s site. We strongly advise you to review the Privacy Policy of every site you visit.

    +

    Our service may run userscripts that contain code out of our control. If a userscript is installed, it can run in sites matching the rules in its metadata with high privilege APIs, for instance, sending requests with your credentials. We strongly advise you to only install userscripts that you believe and know, from trusted hosts.

    +

    We have no control over, and assume no responsibility for the content, privacy policies or practices of any third party sites or services.

    +

    Changes To This Privacy Policy

    +

    Changes to this Privacy Policy are effective when they are posted on this page.

    +

    History of changes will be kept in this repository.

    +

    Contact Us

    +

    If you have any questions about this Privacy Policy, please contact us.


    \ No newline at end of file diff --git a/~partytown/partytown-atomics.js b/~partytown/partytown-atomics.js new file mode 100644 index 00000000..3f0eaee6 --- /dev/null +++ b/~partytown/partytown-atomics.js @@ -0,0 +1,2 @@ +/* Partytown 0.11.2 - MIT QwikDev */ +(e=>{const t=()=>{},r=e=>e.length,n=e=>{var t,r,n;try{const r=null===(t=null==e?void 0:e.constructor)||void 0===t?void 0:t.name;if(r)return r}catch(e){}try{const t=null===(n=null===(r=null==e?void 0:e.__zone_symbol__originalInstance)||void 0===r?void 0:r.constructor)||void 0===n?void 0:n.name;if(t)return t}catch(e){}return""},i=(e,t)=>e.startsWith(t),o=e=>!(i(e,"webkit")||i(e,"toJSON")||i(e,"constructor")||i(e,"toString")||i(e,"_")),s=e=>11===e.nodeType&&e.host?"#s":e.nodeName,a=()=>Math.round(Math.random()*Number.MAX_SAFE_INTEGER).toString(36),c={Anchor:"a",DList:"dl",Image:"img",OList:"ol",Paragraph:"p",Quote:"q",TableCaption:"caption",TableCell:"td",TableCol:"colgroup",TableRow:"tr",TableSection:"tbody",UList:"ul"},l={Graphics:"g",SVG:"svg"},u={preserveBehavior:!1},d=Object.freeze((e=>{const t=new Set;let r=[];do{Object.getOwnPropertyNames(r).forEach((e=>{"function"==typeof r[e]&&t.add(e)}))}while((r=Object.getPrototypeOf(r))!==Object.prototype);return Array.from(t)})()),p=Symbol(),m=Symbol(),h=new Map,g=new Map,f={},y=new WeakMap;var v,S,b,w,$,I,N,E,T;!function(e){e[e.MainDataRequestFromWorker=0]="MainDataRequestFromWorker",e[e.MainDataResponseToWorker=1]="MainDataResponseToWorker",e[e.MainInterfacesRequestFromWorker=2]="MainInterfacesRequestFromWorker",e[e.MainInterfacesResponseToWorker=3]="MainInterfacesResponseToWorker",e[e.InitializedWebWorker=4]="InitializedWebWorker",e[e.InitializeEnvironment=5]="InitializeEnvironment",e[e.InitializedEnvironmentScript=6]="InitializedEnvironmentScript",e[e.InitializeNextScript=7]="InitializeNextScript",e[e.InitializedScripts=8]="InitializedScripts",e[e.RefHandlerCallback=9]="RefHandlerCallback",e[e.ForwardMainTrigger=10]="ForwardMainTrigger",e[e.ForwardWorkerAccessRequest=11]="ForwardWorkerAccessRequest",e[e.AsyncAccessRequest=12]="AsyncAccessRequest",e[e.LocationUpdate=13]="LocationUpdate",e[e.DocumentVisibilityState=14]="DocumentVisibilityState",e[e.CustomElementCallback=15]="CustomElementCallback"}(v||(v={})),function(e){e[e.PushState=0]="PushState",e[e.ReplaceState=1]="ReplaceState",e[e.PopState=2]="PopState",e[e.HashChange=3]="HashChange"}(S||(S={})),function(e){e[e.Window=0]="Window",e[e.Element=1]="Element",e[e.AttributeNode=2]="AttributeNode",e[e.TextNode=3]="TextNode",e[e.CDataSectionNode=4]="CDataSectionNode",e[e.Function=5]="Function",e[e.Property=6]="Property",e[e.ProcessingInstructionNode=7]="ProcessingInstructionNode",e[e.CommentNode=8]="CommentNode",e[e.Document=9]="Document",e[e.DocumentTypeNode=10]="DocumentTypeNode",e[e.DocumentFragmentNode=11]="DocumentFragmentNode",e[e.EnvGlobalConstructor=12]="EnvGlobalConstructor"}(b||(b={})),function(e){e.document="d",e.documentElement="e",e.head="h",e.body="b"}(w||(w={})),function(e){e[e.SetValue=0]="SetValue",e[e.GlobalConstructor=1]="GlobalConstructor"}($||($={})),function(e){e[e.Primitive=0]="Primitive",e[e.Array=1]="Array",e[e.Object=2]="Object",e[e.Instance=3]="Instance",e[e.Ref=4]="Ref",e[e.Event=5]="Event",e[e.Function=6]="Function",e[e.NodeList=7]="NodeList",e[e.ArrayBuffer=8]="ArrayBuffer",e[e.ArrayBufferView=9]="ArrayBufferView",e[e.Attr=10]="Attr",e[e.CSSRule=11]="CSSRule",e[e.CSSRuleList=12]="CSSRuleList",e[e.CSSStyleDeclaration=13]="CSSStyleDeclaration",e[e.Error=14]="Error"}(I||(I={})),function(e){e.Body="BODY",e.Comment="#comment",e.Document="#document",e.DocumentElement="HTML",e.DocumentTypeNode="html",e.DocumentFragment="#document-fragment",e.IFrame="IFRAME",e.Head="HEAD",e.Script="SCRIPT",e.Text="#text"}(N||(N={})),function(e){e.errorHandlers="error",e.loadHandlers="load",e[e.src=0]="src",e[e.loadErrorStatus=1]="loadErrorStatus",e[e.cssRules=2]="cssRules",e[e.innerHTML=3]="innerHTML",e[e.url=4]="url",e[e.type=5]="type"}(E||(E={})),function(e){e[e.Blocking=1]="Blocking",e[e.NonBlocking=2]="NonBlocking",e[e.NonBlockingNoSideEffect=3]="NonBlockingNoSideEffect"}(T||(T={}));const C=(e,t)=>{if(e)return(t=y.get(e))||(t=e[p])||A(e,t=a()),t},R=(e,t,r,n,i)=>{if((r=f[e])&&r.U){if(e===t)return r.U;if(n=r.U.document,(i=t.split(".").pop())===w.document)return n;if(i===w.documentElement)return n.documentElement;if(i===w.head)return n.head;if(i===w.body)return n.body}return h.get(t)},A=(e,t,r)=>{e&&(h.set(t,e),e[p]=t,e[m]=r=Date.now(),r>k+5e3&&(h.forEach(((e,t)=>{e[m]{const n=((e,t)=>{return r=e,n={value:t},Object.defineProperty(r,"name",{...n,configurable:!0});var r,n})(class extends f[e].U.HTMLElement{},r[0]);return"connectedCallback,disconnectedCallback,attributeChangedCallback,adoptedCallback".split(",").map((r=>n.prototype[r]=function(...n){t.postMessage([v.CustomElementCallback,e,C(this),r,n])})),n.observedAttributes=r[1],n},B=(e,t,r,o,a,c)=>void 0!==t&&(o=typeof t)?"string"===o||"number"===o||"boolean"===o||null==t?[I.Primitive,t]:"function"===o?[I.Function]:(r=r||new Set)&&Array.isArray(t)?r.has(t)?[I.Array,[]]:r.add(t)&&[I.Array,t.map((t=>B(e,t,r)))]:"object"===o?j(t)?[I.Error,{name:t.name,message:t.message,stack:t.stack}]:""===(a=n(t))?[I.Object,{}]:"Window"===a?[I.Instance,[e,e]]:"HTMLCollection"===a||"NodeList"===a?[I.NodeList,Array.from(t).map((t=>B(e,t,r)[1]))]:a.endsWith("Event")?[I.Event,D(e,t,r)]:"CSSRuleList"===a?[I.CSSRuleList,Array.from(t).map(W)]:i(a,"CSS")&&a.endsWith("Rule")?[I.CSSRule,W(t)]:"CSSStyleDeclaration"===a?[I.CSSStyleDeclaration,D(e,t,r)]:"Attr"===a?[I.Attr,[t.name,t.value]]:t.nodeType?[I.Instance,[e,C(t),s(t),c]]:[I.Object,D(e,t,r,!0,!0)]:void 0:t,D=(e,t,r,i,s,a,c,l)=>{if(a={},!r.has(t))for(c in r.add(t),t)o(c)&&(l="path"===c&&n(t).endsWith("Event")?t.composedPath():t[c],(i||"function"!=typeof l)&&(s||""!==l)&&(a[c]=B(e,l,r)));return a},W=e=>{let t,r={};for(t in e)q.includes(t)&&(r[t]=String(e[t]));return r};let O=null;const j=t=>{var r;return O=(null===(r=e.top)||void 0===r?void 0:r.Error)||O,t instanceof O},U=(t,r,n,i)=>r?(n=r[0],i=r[1],n===I.Primitive?i:n===I.Ref?F(t,i):n===I.Array?i.map((e=>U(t,e))):n===I.Instance?R(i[0],i[1]):n===I.Event?V(z(t,i)):n===I.Object?z(t,i):n===I.ArrayBuffer?i:n===I.ArrayBufferView?new e[r[2]](i):void 0):void 0,F=(e,{V:t,w:r,L:n},i)=>((i=g.get(n))||(i=function(...i){e.postMessage([v.RefHandlerCallback,{V:t,w:r,L:n,R:B(t,this),b:B(t,i)}])},g.set(n,i)),i),V=e=>new("detail"in e?CustomEvent:Event)(e.type,e),z=(e,t,r,n)=>{for(n in r={},t)r[n]=U(e,t[n]);return r},q="cssText,selectorText,href,media,namespaceURI,prefix,name,conditionText".split(","),_=async(e,t)=>{let n,i,o,s,a,c,l={F:t.F},u=r(t.Q),d=0;for(;d{let t=0,r=()=>{f[i]||t++>1e3?e():requestAnimationFrame(r)};r()})),o[0]===$.GlobalConstructor&&o[1]in f[i].U?A(new f[i].U[o[1]](...U(e,o[2])),n.w):(s=R(i,n.w),s?(a=J(e,i,s,o,c,n.r),n.d&&("string"==typeof n.d?A(a,n.d):f[n.d.V]={V:n.d.V,U:{document:a}}),"object"==typeof(p=a)&&p&&p.then&&(a=await a,c&&(l.z=!0)),c&&(l.M=B(i,a,void 0,void 0,void 0,n.w))):l.p=n.w+" not found")}catch(e){c?l.p=String(e.stack||e):console.error(e)}var p;return l},J=(e,t,i,o,s,a)=>{let c,l,u,d,p,m=0,h=r(o);for(;mp[e]=i[e])),p;i=i[l]}else{if(c===$.SetValue)return void(i[u]=U(e,l));if("function"==typeof i[u]&&(d=U(e,l),"define"===u&&"CustomElementRegistry"===n(i)&&(d[1]=H(t,e,d[1])),"insertRule"===u&&d[1]>r(i.cssRules)&&(d[1]=r(i.cssRules)),i=i[u].apply(i,d),"play"===u))return Promise.resolve()}}catch(e){if(s)throw e;console.debug(e)}}return i},G=(e,t)=>{let n,i,o,s=t.V,a=t.U,c=a.document,l='script[type="text/partytown"]:not([data-ptid]):not([data-pterror])',p=l+":not([async]):not([defer])";c&&c.body?(n=c.querySelector(p),n||(n=c.querySelector(l)),n?(n.dataset.ptid=i=C(n,s),o={V:s,w:i},n.src?(o.S=n.src,o.H=n.dataset.ptsrc||n.src):o.j=n.innerHTML,e.postMessage([v.InitializeNextScript,o])):(t.x||(t.x=1,((e,t,n)=>{let i,o,s=n._ptf,a=(n.partytown||{}).forward||[],c=(r,n)=>e.postMessage([v.ForwardMainTrigger,{V:t,q:r,b:B(t,Array.from(n))}]);if(n._ptf=void 0,a.map((e=>{const[t,{preserveBehavior:i}]=(e=>{if("string"==typeof e)return[e,u];const[t,r=u]=e;return[t,{...u,...r}]})(e);o=n,t.split(".").map(((e,t,s)=>{var a;o=o[s[t]]=t+1{let e=null;if(i){const{methodOrProperty:t,thisObject:r}=((e,t)=>{let r=e;for(let e=0;e0?r[t[t.length-1]]:void 0}})(n,s);"function"==typeof t&&(e=(...e)=>t.apply(r,...e))}return(...t)=>{let r;return e&&(r=e(t)),c(s,t),r}})()}))})),s)for(i=0;iG(e,t)))},K=(e,t,r)=>{if(!y.has(r)){y.set(r,t);const n=r.document,i=r.history,o=y.get(r.parent);let s=!1;const a=[],c=e=>{s?e():a.push(e)},l=()=>{e.postMessage([v.InitializeEnvironment,{V:t,J:o,S:n.baseURI,T:n.visibilityState}]),setTimeout((()=>{s=!0,a.forEach((e=>{e()}))}))},u=i.pushState.bind(i),d=i.replaceState.bind(i),p=(r,i,o,s)=>()=>{e.postMessage([v.LocationUpdate,{V:t,type:r,state:i,url:n.baseURI,newUrl:o,oldUrl:s}])};i.pushState=(e,t,r)=>{u(e,t,r),c(p(S.PushState,e,null==r?void 0:r.toString()))},i.replaceState=(e,t,r)=>{d(e,t,r),c(p(S.ReplaceState,e,null==r?void 0:r.toString()))},r.addEventListener("popstate",(e=>{c(p(S.PopState,e.state))})),r.addEventListener("hashchange",(e=>{c(p(S.HashChange,{},e.newURL,e.oldURL))})),r.addEventListener("ptupdate",(()=>{G(e,f[t])})),n.addEventListener("visibilitychange",(()=>e.postMessage([v.DocumentVisibilityState,t,n.visibilityState]))),f[t]={V:t,U:r},"complete"===n.readyState?l():r.addEventListener("load",l)}},Y=()=>{const e=Object.getOwnPropertyNames(M).map((e=>((e,t,r,n)=>{if(r=t.match(/^(HTML|SVG)(.+)Element$/))return n=r[2],"S"==t[0]?e.createElementNS("http://www.w3.org/2000/svg",l[n]||n.slice(0,2).toLowerCase()+n.slice(2)):e.createElement(c[n]||n)})(x,e))).filter((e=>!(!e||"HTMLUnknownElement"===n(e)&&"UNKNOWN"!==e.nodeName.toUpperCase()))).map((e=>[e]));return X(e,[])},X=(e,t)=>{const r=new Set(["Object"]);return e.filter((e=>e[0])).map((e=>{const t=e[0],r=e[1],i=n(t);return[i,M[i].prototype,t,r]})).map((([e,n,i,o])=>Q(r,t,e,n,i,o))),t},Z=(e,t,r)=>{let n=[],i=[e,"Object",n];for(r in t)ee(n,t,r);return i},Q=(e,t,r,i,o,a)=>{if(!e.has(r)){e.add(r);const c=Object.getPrototypeOf(i),l=n(c),u=[],d=Object.getOwnPropertyDescriptors(i);Q(e,t,l,c,o,a);for(const e in d)ee(u,o,e);t.push([r,l,u,a,s(o)])}},ee=(e,t,r,i,s,a)=>{try{o(r)&&isNaN(r[0])&&"all"!==r&&("function"==(s=typeof(i=t[r]))?(String(i).includes("[native")||Object.getPrototypeOf(t)[r])&&e.push([r,b.Function]):"object"===s&&null!=i?"Object"!==(a=n(i))&&"Function"!==a&&self[a]&&e.push([r,i.nodeType||a]):"symbol"!==s&&(r.toUpperCase()===r?e.push([r,b.Property,i]):e.push([r,b.Property])))}catch(e){console.warn(e)}},te=(e,r)=>void 0!==e[r]?new e[r](t):0;let re;(async e=>{const t=new SharedArrayBuffer(1073741824),r=new Int32Array(t);return(n,i)=>{const o=i[0],s=i[1];if(o===v.MainDataRequestFromWorker){const e=(()=>{const e=x.createElement("i"),t=x.createTextNode(""),r=x.createComment(""),n=x.createDocumentFragment(),i=x.createElement("p").attachShadow({mode:"open"}),o=te(M,"IntersectionObserver"),s=te(M,"MutationObserver"),a=te(M,"ResizeObserver"),c=M.performance,l=M.screen,u=[[M.history],[c],[c.navigation],[c.timing],[l],[l.orientation],[M.visualViewport],[o,b.EnvGlobalConstructor],[s,b.EnvGlobalConstructor],[a,b.EnvGlobalConstructor],[t],[r],[n],[i],[e],[e.attributes],[e.classList],[e.dataset],[e.style],[x],[x.doctype]],d=[Z("Window",M),Z("Node",t)],p=function(e){return JSON.stringify(e,((e,t)=>("function"==typeof t&&(t=String(t)).startsWith(e+"(")&&(t="function "+t),"loadScriptsOnMainThread"===e&&(t=t.map((e=>Array.isArray(e)?e:["string"==typeof e?"string":"regexp","string"==typeof e?e:e.source]))),t)))}(L),m={i:p,v:X(u,d),C:new URL(P,M.location)+"",I:origin,$tabId$:M._pttab};return((e,t,r)=>{void 0!==t[r]&&e.push([r,"Object",Object.keys(t[r].prototype).map((e=>[e,b.Property])),b.EnvGlobalConstructor])})(m.v,M,"IntersectionObserverEntry"),m})();e.P=t,n.postMessage([v.MainDataResponseToWorker,e])}else i[0]===v.MainInterfacesRequestFromWorker?n.postMessage([v.MainInterfacesResponseToWorker,Y()]):o===v.ForwardWorkerAccessRequest?e(s,(e=>{const t=JSON.stringify(e),n=t.length;for(let e=0;e{t[0]===v.InitializedWebWorker?K(e,a(),M):(r=f[t[1]])&&(t[0]===v.InitializeNextScript?requestAnimationFrame((()=>G(e,r))):t[0]===v.InitializedEnvironmentScript&&((e,t,r,n,i)=>{(i=t.U.document.querySelector(`[data-ptid="${r}"]`))&&(n?i.dataset.pterror=n:i.type+="-x",delete i.dataset.ptid),G(e,t)})(e,r,t[2],t[3]))})(n,i)}})(((e,t)=>_(re,e).then(t))).then((e=>{e&&(re=new Worker(URL.createObjectURL(new Blob(['/* Partytown 0.11.2 - MIT QwikDev */\n(e=>{var t,r,n,i,o,s,a,c,l;!function(e){e[e.MainDataRequestFromWorker=0]="MainDataRequestFromWorker",e[e.MainDataResponseToWorker=1]="MainDataResponseToWorker",e[e.MainInterfacesRequestFromWorker=2]="MainInterfacesRequestFromWorker",e[e.MainInterfacesResponseToWorker=3]="MainInterfacesResponseToWorker",e[e.InitializedWebWorker=4]="InitializedWebWorker",e[e.InitializeEnvironment=5]="InitializeEnvironment",e[e.InitializedEnvironmentScript=6]="InitializedEnvironmentScript",e[e.InitializeNextScript=7]="InitializeNextScript",e[e.InitializedScripts=8]="InitializedScripts",e[e.RefHandlerCallback=9]="RefHandlerCallback",e[e.ForwardMainTrigger=10]="ForwardMainTrigger",e[e.ForwardWorkerAccessRequest=11]="ForwardWorkerAccessRequest",e[e.AsyncAccessRequest=12]="AsyncAccessRequest",e[e.LocationUpdate=13]="LocationUpdate",e[e.DocumentVisibilityState=14]="DocumentVisibilityState",e[e.CustomElementCallback=15]="CustomElementCallback"}(t||(t={})),function(e){e[e.PushState=0]="PushState",e[e.ReplaceState=1]="ReplaceState",e[e.PopState=2]="PopState",e[e.HashChange=3]="HashChange"}(r||(r={})),function(e){e[e.Window=0]="Window",e[e.Element=1]="Element",e[e.AttributeNode=2]="AttributeNode",e[e.TextNode=3]="TextNode",e[e.CDataSectionNode=4]="CDataSectionNode",e[e.Function=5]="Function",e[e.Property=6]="Property",e[e.ProcessingInstructionNode=7]="ProcessingInstructionNode",e[e.CommentNode=8]="CommentNode",e[e.Document=9]="Document",e[e.DocumentTypeNode=10]="DocumentTypeNode",e[e.DocumentFragmentNode=11]="DocumentFragmentNode",e[e.EnvGlobalConstructor=12]="EnvGlobalConstructor"}(n||(n={})),function(e){e.document="d",e.documentElement="e",e.head="h",e.body="b"}(i||(i={})),function(e){e[e.SetValue=0]="SetValue",e[e.GlobalConstructor=1]="GlobalConstructor"}(o||(o={})),function(e){e[e.Primitive=0]="Primitive",e[e.Array=1]="Array",e[e.Object=2]="Object",e[e.Instance=3]="Instance",e[e.Ref=4]="Ref",e[e.Event=5]="Event",e[e.Function=6]="Function",e[e.NodeList=7]="NodeList",e[e.ArrayBuffer=8]="ArrayBuffer",e[e.ArrayBufferView=9]="ArrayBufferView",e[e.Attr=10]="Attr",e[e.CSSRule=11]="CSSRule",e[e.CSSRuleList=12]="CSSRuleList",e[e.CSSStyleDeclaration=13]="CSSStyleDeclaration",e[e.Error=14]="Error"}(s||(s={})),function(e){e.Body="BODY",e.Comment="#comment",e.Document="#document",e.DocumentElement="HTML",e.DocumentTypeNode="html",e.DocumentFragment="#document-fragment",e.IFrame="IFRAME",e.Head="HEAD",e.Script="SCRIPT",e.Text="#text"}(a||(a={})),function(e){e.errorHandlers="error",e.loadHandlers="load",e[e.src=0]="src",e[e.loadErrorStatus=1]="loadErrorStatus",e[e.cssRules=2]="cssRules",e[e.innerHTML=3]="innerHTML",e[e.url=4]="url",e[e.type=5]="type"}(c||(c={})),function(e){e[e.Blocking=1]="Blocking",e[e.NonBlocking=2]="NonBlocking",e[e.NonBlockingNoSideEffect=3]="NonBlockingNoSideEffect"}(l||(l={}));const u=Symbol(),d=Symbol(),$=Symbol(),p=Symbol(),h=Symbol(),g=Symbol(),m=Symbol(),f=Symbol(),y=new Map,w={},S=new WeakMap,v=[],b={},I={},N=new Map,E=new Map,M="about:blank",T=e=>e.split(","),k=e=>{if(e=b.C+e,new URL(e).origin!=location.origin)throw"Invalid "+e;return e},C=T("clientWidth,clientHeight,clientTop,clientLeft,innerWidth,innerHeight,offsetWidth,offsetHeight,offsetTop,offsetLeft,outerWidth,outerHeight,pageXOffset,pageYOffset,scrollWidth,scrollHeight,scrollTop,scrollLeft"),R=T("childElementCount,children,firstElementChild,lastElementChild,nextElementSibling,previousElementSibling"),L=T("insertBefore,remove,removeChild,replaceChild"),x=T("className,width,height,hidden,innerHTML,innerText,textContent,text"),A=T("setAttribute,setAttributeNS,setProperty"),B=T("addEventListener,dispatchEvent,removeEventListener"),H=B.concat(A,T("add,observe,remove,unobserve")),W=/^[A-Z_]([A-Z0-9-]*[A-Z0-9])?$/,P=()=>{},D=e=>e.length,O=e=>{var t,r,n;try{const r=null===(t=null==e?void 0:e.constructor)||void 0===t?void 0:t.name;if(r)return r}catch(e){}try{const t=null===(n=null===(r=null==e?void 0:e.__zone_symbol__originalInstance)||void 0===r?void 0:r.constructor)||void 0===n?void 0:n.name;if(t)return t}catch(e){}return""},F=[],j=()=>Math.round(Math.random()*Number.MAX_SAFE_INTEGER).toString(36),z="text/partytown",U=(e,t,r)=>Object.defineProperty(e,t,{...r,configurable:!0}),_=(e,t)=>U(e,"name",{value:t}),q=(e,t,r)=>U(e.prototype,t,r),V=(e,t)=>Object.defineProperties(e.prototype,t),G=(e,t,r)=>q(e,t,{value:r,writable:!0});function X(e,t){var r,n;return null!==(n=null===(r=e.loadScriptsOnMainThread)||void 0===r?void 0:r.map((([e,t])=>new RegExp("string"===e?t.replace(/[.*+?^${}()|[\\]\\\\]/g,"\\\\$&"):t))).some((e=>e.test(t))))&&void 0!==n&&n}Object.freeze((e=>{const t=new Set;let r=[];do{Object.getOwnPropertyNames(r).forEach((e=>{"function"==typeof r[e]&&t.add(e)}))}while((r=Object.getPrototypeOf(r))!==Object.prototype);return Array.from(t)})());const Z=(e,t)=>t in e[g],J=(e,t)=>e[g][t],Y=(e,t,r)=>e[g][t]=r,K=(e,t,r,n,i,o)=>{if(!(i=y.get(t))&&r&&I[e]){const s=y.get(o||"");i=I[e].k(r,t,n,s),y.set(t,i)}return i},Q=(e,t)=>G(e,"nodeType",t),ee=(e,t)=>t.map((t=>q(e,t,{get(){let e=te(this,t),r=E.get(e);return r||(r=we(this,[t]),E.set(e,r)),r}}))),te=(e,t,r)=>[e[u],e[d],t,...(r||F).map((e=>String(e&&e[u]?e[d]:e)))].join("."),re=(e,t)=>T(t).map((t=>q(e,t,{get(){return Z(this,t)||Y(this,t,we(this,[t])),J(this,t)},set(e){J(this,t)!==e&&Se(this,[t],e),Y(this,t,e)}}))),ne=e=>C.map((t=>q(e,t,{get(){const e=N.get(te(this,t));if("number"==typeof e)return e;const r=we(this,[t],C);return r&&"object"==typeof r?(Object.entries(r).map((([e,t])=>N.set(te(this,e),t))),r[t]):r}}))),ie=(e,t)=>t.map((t=>{e.prototype[t]=function(...e){let r=te(this,t,e),n=N.get(r);return n||(n=ve(this,[t],e),N.set(r,n)),n}})),oe=(e,t,r,n,i)=>{return void 0!==r&&(i=typeof r)?"string"===i||"boolean"===i||"number"===i||null==r?[s.Primitive,r]:"function"===i?[s.Ref,{V:e,w:t,L:(o=r,(a=S.get(o))||(S.set(o,a=j()),w[a]=o),a)}]:(n=n||new Set)&&Array.isArray(r)?n.has(r)?[s.Array,[]]:n.add(r)&&[s.Array,r.map((r=>oe(e,t,r,n)))]:"object"===i?r[d]?[s.Instance,[r[u],r[d]]]:r instanceof Event?[s.Event,ae(e,t,r,!1,n)]:se&&r instanceof TrustedHTML?[s.Primitive,r.toString()]:r instanceof ArrayBuffer?[s.ArrayBuffer,r]:ArrayBuffer.isView(r)?[s.ArrayBufferView,r.buffer,O(r)]:[s.Object,ae(e,t,r,!0,n)]:void 0:r;var o,a},se="undefined"!=typeof TrustedHTML,ae=(e,t,r,n,i,o,s,a)=>{if(o={},!i.has(r))for(s in i.add(r),r)a=r[s],(n||"function"!=typeof a)&&(o[s]=oe(e,t,a,i));return o},ce=(e,t)=>e?oe(e[u],e[d],t):[s.Primitive,t],le=(e,t,r,n,i,o,a,c)=>{if(n){if(i=n[0],o=n[1],i===s.Primitive||i===s.CSSRule||i===s.CSSRuleList)return o;if(i===s.Ref)return de(r,o);if(i===s.Function)return e&&r.length>0?(...t)=>ve(I[e].U,r,t,l.Blocking):P;if(i===s.Instance)return ue(o);if(i===s.NodeList)return new pe(o.map(ue));if(i===s.Attr)return new he(o);if(i===s.Array)return o.map((n=>le(e,t,r,n)));if(i===s.Error)return new $e(o);for(c in a={},o)a[c]=le(e,t,[...r,c],o[c]);if(i===s.CSSStyleDeclaration)return new I[e].U.CSSStyleDeclaration(e,t,r,a);if(i===s.Event){if("message"===a.type&&a.origin){let e,t=JSON.stringify(a.data),r=v.find((e=>e.m===t));r&&(e=I[r.V],e&&(a.source=e.U,a.origin=e.E.origin))}return new Proxy(new Event(a.type,a),{get:(e,t)=>t in a?a[t]:"function"==typeof e[String(t)]?P:e[String(t)]})}if(i===s.Object)return a}},ue=([e,t,r,n])=>t===e&&I[e]?I[e].U:K(e,t,r,void 0,void 0,n),de=(e,{V:t,w:r,G:n,L:i})=>(w[i]||S.set(w[i]=function(...i){const o=K(t,r,n);return ve(o,e,i)},i),w[i]);class $e extends Error{constructor(e){super(e.message),this.name=e.name,this.message=e.message,this.stack=e.stack}}class pe{constructor(e){(this._=e).map(((e,t)=>this[t]=e))}entries(){return this._.entries()}forEach(e,t){this._.map(e,t)}item(e){return this[e]}keys(){return this._.keys()}get length(){return D(this._)}values(){return this._.values()}[Symbol.iterator](){return this._[Symbol.iterator]()}}const he=class{constructor(e){this.name=e[0],this.value=e[1]}get nodeName(){return this.name}get nodeType(){return 2}},ge=(e,t,r)=>console.warn(`Partytown unable to ${e} cross-origin ${t}: `+r.E),me=[],fe=(e,r,n,i,o,s)=>{if(e[h]){if(me.push({V:e[u],w:e[d],a:[...e[h],...r],d:i,r:o}),n===l.NonBlockingNoSideEffect)b.K([t.AsyncAccessRequest,{F:j(),Q:[...me]}],s?[s instanceof ArrayBuffer?s:s.buffer]:void 0),me.length=0;else if(n===l.Blocking)return ye(!0);b.c=setTimeout(ye,20)}},ye=e=>{if(clearTimeout(b.c),D(me)){const r=me[D(me)-1],n={F:`${j()}.${b.$tabId$}`,Q:[...me]};if(me.length=0,e){const e=((e,r)=>{const n=e.P,i=new Int32Array(n);Atomics.store(i,0,0),e.K([t.ForwardWorkerAccessRequest,r]),Atomics.wait(i,0,0);let o=Atomics.load(i,0),s="",a=0;for(;ab.i.get&&(n=b.i.get(Ie(e,t)))!==m?n:n=fe(e,t,l.Blocking,void 0,r),Se=(e,t,r,n)=>{if(b.i.set){if((n=b.i.set({value:r,prevent:f,...Ie(e,t)}))===f)return;n!==m&&(r=n)}x.some((e=>t.includes(e)))&&(N.clear(),t[t.length-1]),t=[...t,ce(e,r),o.SetValue],fe(e,t,l.NonBlocking)},ve=(e,t,r,n,i,o,s,a)=>b.i.apply&&(s=b.i.apply({args:r,...Ie(e,t)}))!==m?s:(a=t[D(t)-1],t=[...t,ce(e,r)],n=n||(H.includes(a)?l.NonBlocking:l.Blocking),"setAttribute"===a&&Z(e,r[0])?Y(e,r[0],r[1]):L.includes(a)?(N.clear(),E.clear()):A.includes(a)&&(n=l.NonBlocking,N.clear()),s=fe(e,t,n,i,void 0,o)),be=(e,t,r)=>{fe(e,[o.GlobalConstructor,t,ce(e,r)],l.Blocking)},Ie=(e,t)=>({name:t.join("."),continue:m,nodeName:e[$],constructor:O(e),instance:e,window:I[e[u]].U}),Ne=(e,t,r)=>{let n={getItem(n){if(r.A)return ve(e,[t,"getItem"],[n],l.Blocking);ge("get",t,r)},setItem(n,i){r.A?ve(e,[t,"setItem"],[n,i],l.Blocking):ge("set",t,r)},removeItem(n){r.A?ve(e,[t,"removeItem"],[n],l.Blocking):ge("remove",t,r)},key(n){if(r.A)return ve(e,[t,"key"],[n],l.Blocking);ge("key",t,r)},clear(){r.A?ve(e,[t,"clear"],F,l.Blocking):ge("clear",t,r)},get length(){if(r.A)return we(e,[t,"length"]);ge("length",t,r)}};e[t]=new Proxy(n,{get:(e,t)=>Reflect.has(e,t)?Reflect.get(e,t):e.getItem(t),set:(e,t,r)=>(e.setItem(t,r),!0),has:(e,t)=>!!Reflect.has(e,t)||"string"==typeof t&&null!==e.getItem(t),deleteProperty:(e,t)=>(e.removeItem(t),!0)})},Ee=(e,t,r)=>{e[r]=_(class extends t{constructor(e,t,r,n){return super(e,t,r,n||{}),new Proxy(this,{get:(e,t)=>e[t]?e[t]:(e[t]||"string"!=typeof t||e[$][t]||(e[$][t]=we(e,[t])),e[$][t]),set:(e,t,r)=>(e[$][t]=r,Se(e,[t],r),N.clear(),!0)})}setProperty(...e){this[$][e[0]]=e[1],ve(this,["setProperty"],e,l.NonBlocking),e[0],N.clear()}getPropertyValue(e){return this[e]}removeProperty(e){let t=this[$][e];return ve(this,["removeProperty"],[e],l.NonBlocking),N.clear(),this[$][e]=void 0,t}},r)},Me=(e,t)=>{e[t]=_(class{constructor(e){this.ownerNode=e}get cssRules(){const e=this.ownerNode;return new Proxy({},{get(t,r){const n=String(r);return"item"===n?t=>ke(e,t):"length"===n?Te(e).length:isNaN(n)?t[r]:ke(e,n)}})}insertRule(e,t){const r=Te(this.ownerNode);return(t=void 0===t?0:t)>=0&&t<=r.length&&(ve(this.ownerNode,["sheet","insertRule"],[e,t],l.NonBlocking),r.splice(t,0,0)),this.ownerNode,N.clear(),t}deleteRule(e){ve(this.ownerNode,["sheet","deleteRule"],[e],l.NonBlocking),Te(this.ownerNode).splice(e,1),this.ownerNode,N.clear()}get type(){return"text/css"}},t);const r={sheet:{get(){return new e[t](this)}}};V(e.HTMLStyleElement,r)},Te=(e,t)=>((t=J(e,c.cssRules))||(t=we(e,["sheet","cssRules"]),Y(e,c.cssRules,t)),t),ke=(e,t,r)=>(0===(r=Te(e))[t]&&(r[t]=we(e,["sheet","cssRules",parseInt(t,10)])),r[t]),Ce="0.11.2",Re=(e,t,r,n,i)=>{try{e.l=t,Le(e,r)}catch(e){console.error(r,e),i=String(e.stack||e)}return e.l="",i},Le=(e,t,r)=>{e.N=1;let n=((e,t)=>e.replace(/([a-zA-Z0-9_$\\.\\\'\\"\\`])?(\\.\\.\\.)?this(?![a-zA-Z0-9_$:])/g,((e,t,r)=>{const n=(t||"")+(r||"");return null!=t?n+"this":n+"(thi$(this)?window:this)"})))(t);t=`with(this){${n.replace(/\\/\\/# so/g,"//Xso")}\\n;function thi$(t){return t===this}};${(b.i.globalFns||[]).filter((e=>/[a-zA-Z_$][0-9a-zA-Z_$]*/.test(e))).map((e=>`(typeof ${e}==\'function\'&&(this.${e}=${e}))`)).join(";")};`+(r?"\\n//# sourceURL="+r:""),e.A||(t=t.replace(/.postMessage\\(/g,`.postMessage(\'${e.V}\',`)),new Function(t).call(e.U),e.N=0},xe=(e,t,r)=>{(r=J(e,t))&&setTimeout((()=>r.map((e=>e({type:t})))))},Ae=(e,t)=>{for(t=e.E;!t.host&&(t=(e=I[e.J]).E,e.V!==e.J););return t},Be=(e,t,r,n,i,o)=>(n=Ae(e,n),i=new URL(t||"",n),r&&b.i.resolveUrl&&(o=b.i.resolveUrl(i,n,r))?o:i),He=(e,t,r)=>Be(e,t,r)+"",We=(e,t)=>{const r=Ae(e),n=new URL(t||"",r);if(b.i.resolveSendBeaconRequestParameters){const e=b.i.resolveSendBeaconRequestParameters(n,r);if(e)return e}return{}},Pe=()=>`