diff --git a/2026/celery/slides/04-end.md b/2026/celery/slides/04-end.md new file mode 100644 index 0000000..cd4f5ab --- /dev/null +++ b/2026/celery/slides/04-end.md @@ -0,0 +1 @@ +https://gricad-gitlab.univ-grenoble-alpes.fr/tienyoun/presentations diff --git a/2026/celery2/assets/mermaid.js b/2026/celery2/assets/mermaid.js new file mode 100644 index 0000000..ea8e637 --- /dev/null +++ b/2026/celery2/assets/mermaid.js @@ -0,0 +1,404 @@ +/* + Plugin for embedding mermaid.js diagrams in reveal.js presentations + GitHub: https://github.com/dainiak/revealjs-plugins/ + + Author: Alex Dainiak + Web: www.dainiak.com + Email: dainiak@gmail.com + + Processing rules can be added to post-process the diagram SVG DOM subtree. + One can set the id, set or remove classes, or set attributes on the SVG elements. In any combinations: + %%% someCssSelector -> #cssIdToSet .css-class-to-set !.class-to-remove [some-property-to-set=newValue] + If the `->` arrow is used then the modifications are applied to the element itself. + If the `^->` arrow is used then the element is wrapped with a g element and modifications are applied to this g. + If the `_->` arrow is used then a single g is added as the only new child of the element and the modifications are applied to this g. All the former children are moved inside this g. + You can use [n] right after the selector to target a specific element in the list of matching elements. Works even when `:nth-child` does not. + Examples: + %% Apply .fragment class to the first of the mermaid nodes: + %%% g.node[1] -> .fragment + + %% Make the "Start" node a fragment step and red + %%% rect[id*="A"] _-> .fragment .fade-up [data-fragment-index=1] + + %% Remove default class and add new one + %%% #D -> !.node .end-state + */ + +const RevealMermaid = { + id: 'mermaid', + init: async (reveal) => { + const katexVersion = '0.16.27'; + const mermaidVersion = '11.14.0'; + let options = reveal.getConfig().mermaid || {}; + options = { + mathInLabels: options.mathInLabels !== false, + urls: options.urls || { + mermaid: options.urls && options.urls.mermaid || `./assets/mermaid.min.js`, + katex: options.urls && options.urls.katex || `https://cdn.jsdelivr.net/npm/katex@${katexVersion}/dist/katex.min.js`, + katexCss: options.urls && options.urls.katexCss || `https://cdn.jsdelivr.net/npm/katex@${katexVersion}/dist/katex.min.css`, + }, + selectors: { + container: options.selectors && options.selectors.container || '[data-mermaid]', + script: options.selectors && options.selectors.script || 'script[type="text/mermaid"]', + }, + overflowVisible: options.overflowVisible === undefined ? true : options.overflowVisible, + mermaidInit: options.mermaidInit || { + startOnLoad: false, + theme: 'auto', + suppressErrorRendering: true + }, + iconPacks: options.iconPacks || [], + css: { + enabled: options?.css?.enabled !== false, + cssIndices: options?.css?.cssIndices !== false, + indexClassPrefix: options?.css?.indexClassPrefix || 'fragidx-', + debug: options?.css?.debug || false + } + }; + + let scriptsToLoad = [ + { + url: options.urls.mermaid, + condition: + !window.mermaid + && !document.querySelector(`script[src="${options.mermaidUrl}"]`) + }, { + url: options.urls.katex, + condition: + options.mathInLabels + && !window.katex + && !document.querySelector(`script[src="${options.katexUrl}"]`) + },{ + url: options.urls.katexCss, + type: 'text/css', + condition: + !window.vegaEmbed + && !window.katex + } + ]; + + function loadScript(params) { + return new Promise((resolve) => { + if(params.condition !== undefined + && !(params.condition === true || typeof params.condition == 'function' && params.condition.call())) { + return resolve(); + } + + if( params.type === undefined ) + params.type = (params.url && params.url.match(/\.css[^.]*$/)) ? 'text/css' : 'text/javascript'; + + let element; + + if( params.type === 'text/css' ){ + if( params.content ){ + element = document.createElement('style'); + element.textContent = params.content; + } + else { + element = document.createElement('link'); + element.rel = 'stylesheet'; + element.type = 'text/css'; + element.href = params.url; + } + } + else { + element = document.createElement('script'); + element.type = params.type || 'text/javascript'; + if( params.content ) + element.textContent = params.content; + else + element.src = params.url; + } + + if(params.content){ + document.querySelector('head').appendChild(element); + resolve(); + } + else { + element.onload = resolve; + document.querySelector( 'head' ).appendChild(element); + } + }); + } + + + if(!reveal.getSlidesElement().querySelector(options.selectors.container)) + return; + + + // Load mermaid, katex, and katex CSS in parallel (they are independent) + await Promise.all(scriptsToLoad.map(s => loadScript(s))); + + if((options.mermaidInit.theme || 'auto') === 'auto') { + options.mermaidInit.theme = 'default'; + if(document.querySelector( + '[href*="black.css"],[href*="league.css"],[href*="night.css"],[href*="moon.css"],[href*="dracula.css"],[href*="blood.css"]' + )) { + options.mermaidInit.theme = 'dark'; + } + } + + window.mermaid.initialize(options.mermaidInit); + + if(options.iconPacks) { + for(let packName in options.iconPacks) { + window.mermaid.registerIconPacks([ + { + name: packName, + loader: () => + fetch(options.iconPacks[packName]).then((res) => res.json()), + }, + ]); + } + } + + + function dedentAndTrim(str) { + const TAB_WIDTH = 4; + const lines = str.split(/\r?\n/); + let minIndent = Infinity; + + for (const line of lines) { + if (!line.trim()) continue; + let width = 0; + for (const char of line) { + if (char === ' ') width++; + else if (char === '\t') width += TAB_WIDTH; + else break; + } + if (width < minIndent) minIndent = width; + } + + if (minIndent === Infinity) minIndent = 0; + + return lines.map(line => { + let width = 0, i = 0; + for (; i < line.length; i++) { + if (width >= minIndent) break; + const char = line[i]; + if (char === ' ') width++; + else if (char === '\t') width += TAB_WIDTH; + else break; + } + return ' '.repeat(Math.max(0, width - minIndent)) + line.slice(i); + }).join('\n').trim(); + } + + const mermaidContainers = Array.from(reveal.getSlidesElement().querySelectorAll(options.selectors.container)); + + const renderPromises = mermaidContainers.map(async (mermaidContainer) => { + const parent = mermaidContainer.parentNode; + const newDiv = document.createElement('div'); + parent.insertBefore(newDiv, mermaidContainer); + + const mermaidScript = mermaidContainer.querySelector("script"); + if(mermaidScript) { + mermaidScript.textContent = dedentAndTrim(mermaidScript.textContent); + } + + if(!mermaidContainer.id) + mermaidContainer.id = `mermaid-${Math.floor(Math.random() * 1000000)}`; + + let graphDefinition; + const mermaidAttrValue = mermaidContainer.getAttribute('data-mermaid'); + if(mermaidAttrValue && mermaidAttrValue.trim() !== '') { + try { + const response = await fetch(mermaidAttrValue.trim()); + if(!response.ok) + throw new Error(`HTTP ${response.status}: ${response.statusText}`); + graphDefinition = await response.text(); + } catch(error) { + console.warn(`Mermaid Plugin: Failed to fetch diagram from "${mermaidAttrValue}":`, error); + mermaidContainer.remove(); + return; + } + } else { + const scriptEl = mermaidContainer.querySelector(options.selectors.script); + if(!scriptEl) { + console.warn('Mermaid Plugin: No script element or data-mermaid path found in container', mermaidContainer); + mermaidContainer.remove(); + return; + } + graphDefinition = scriptEl.innerHTML; + } + let renderRules = []; + + // 1. Extract Custom CSS Logic + // Regex matches: selector + (one of ->, ^->, _->) + assignment + const ruleRegex = /^\s*%%%\s+(.+?)\s+([\^_]?->)\s+(.+?)\s*$/gm; + + graphDefinition = graphDefinition.replace(ruleRegex, (match, selector, arrow, assignment) => { + renderRules.push({ + selector, + assignment, + type: arrow + }); + return match; + }); + + // 2. Handle Math in Labels + if(options.mathInLabels) { + graphDefinition = graphDefinition.replace(/\\([(\[]).*?\\([)\]])/g, (s) => { + let output = window.katex.renderToString(s.substring(2, s.length - 2), { + output: 'html', + displayMode: s[1] === '[' + }); + return output.replaceAll('"', "'"); + }); + } + + // 3. Render Mermaid + try { + await window.mermaid.parse(graphDefinition, {suppressErrors: false}); + } catch (error) { + console.warn(`Mermaid diagram failed to parse:\n\n${graphDefinition}\n\nError: `, error); + mermaidContainer.remove(); + return; + } + + let svg; + try { + ({ svg } = await window.mermaid.render(mermaidContainer.id, graphDefinition)); + } catch (error) { + console.warn(`Mermaid diagram failed to render:\n\n${graphDefinition}\n\nError: `, error); + mermaidContainer.remove(); + return; + } + newDiv.outerHTML = svg; + const svgElement = parent.querySelector(`#${mermaidContainer.id}`); + + // Copy classes and styles from container + svgElement.classList += " " + mermaidContainer.classList; + const hasStretchClass = mermaidContainer.classList.contains("r-stretch"); + if(hasStretchClass) { + svgElement.style.width = ""; + svgElement.style.height = ""; + svgElement.style.maxWidth = ""; + svgElement.style.maxHeight = ""; + svgElement.style.minWidth = ""; + svgElement.style.minHeight = ""; + } + for (const prop of mermaidContainer.style) { + const value = mermaidContainer.style.getPropertyValue(prop); + if (value && value.trim() !== '') { + svgElement.style.setProperty(prop, value); + } + } + mermaidContainer.remove(); + + // 4. Handle Overflow + if(options.overflowVisible) { + let selector = options.overflowVisible === '*' ? '*' : 'foreignObject'; + svgElement.querySelectorAll(selector).forEach((obj) => { + obj.setAttribute('overflow', 'visible'); + }); + } + + // 5. Apply Custom CSS Logic + if (options.css.enabled && renderRules.length > 0) { + const svgNS = "http://www.w3.org/2000/svg"; + + renderRules.forEach(({ selector, assignment, type }) => { + try { + selector = selector.trim(); + let indexPart = null; + if(/.*\[\d+]$/.exec(selector)) { + const digitPart = /\[\d+]$/.exec(selector)[0]; + indexPart = parseInt(digitPart.match(/\d+/)[0]); + selector = selector.replace(/\[\d+]$/, ''); + } + + const targets = svgElement.querySelectorAll(selector); + targets.forEach((el, idx) => { + if(indexPart !== null && idx + 1 !== indexPart) + return; + + if(options.css.debug) { + console.log(selector, idx + 1, type, el) + } + + let modificationTarget = el; + + // --- LOGIC FOR ARROW TYPES --- + if (type === '^->') { + // 1. OUTER WRAPPER + // Wraps the element in a new and modifies the + const wrapper = document.createElementNS(svgNS, 'g'); + el.parentNode.insertBefore(wrapper, el); + wrapper.appendChild(el); + modificationTarget = wrapper; + + } else if (type === '_->') { + // 2. INNER WRAPPER + // Creates a new inside the element, moves all children into it, + // and modifies that new internal + const innerGroup = document.createElementNS(svgNS, 'g'); + + // Move all existing children of 'el' into 'innerGroup' + while (el.firstChild) { + innerGroup.appendChild(el.firstChild); + } + + el.appendChild(innerGroup); + modificationTarget = innerGroup; + } + // Default '->' falls through here, keeping modificationTarget = el + + const tokens = assignment.match(/(\[.+?\])|(\S+)/g) || []; + + tokens.forEach(token => { + if (token.startsWith('.')) { + modificationTarget.classList.add(token.substring(1)); + } else if (token.startsWith('!.')) { + modificationTarget.classList.remove(token.substring(2)); + } else if (token.startsWith('#')) { + modificationTarget.id = token.substring(1); + } else if (token.startsWith('[')) { + const content = token.substring(1, token.length - 1); + const eqIndex = content.indexOf('='); + + if (eqIndex > -1) { + const key = content.substring(0, eqIndex).trim(); + let val = content.substring(eqIndex + 1).trim(); + + if ((val.startsWith('"') && val.endsWith('"')) || + (val.startsWith("'") && val.endsWith("'"))) { + val = val.substring(1, val.length - 1); + } + + modificationTarget.setAttribute(key, val); + } else { + modificationTarget.setAttribute(content, ''); + } + } + }); + }); + } catch (e) { + console.warn(`Mermaid Plugin: Failed to apply selector "${selector}".`, e); + } + }); + } + + if(options.css.enabled && options.css.cssIndices) { + const cssSelector = '[class*="' + options.css.indexClassPrefix + '"]'; + const fragmentsWithCssIndex = svgElement.querySelectorAll(cssSelector); + + for (let fragment of fragmentsWithCssIndex) { + let s = fragment.getAttribute('class'); + s = s.substring( + s.indexOf(options.css.indexClassPrefix) + options.css.indexClassPrefix.length + ); + s = s.substring(0, Math.max(s.indexOf(' '), s.length)); + fragment.classList.add('fragment'); + fragment.setAttribute('data-fragment-index', s); + } + } + + if(hasStretchClass) + svgElement.style.height = '100%'; + }); + + await Promise.all(renderPromises); + reveal.layout(); + } +}; diff --git a/2026/celery2/assets/mermaid.min.js b/2026/celery2/assets/mermaid.min.js new file mode 100644 index 0000000..d32995d --- /dev/null +++ b/2026/celery2/assets/mermaid.min.js @@ -0,0 +1,3597 @@ +"use strict";var __esbuild_esm_mermaid_nm;(__esbuild_esm_mermaid_nm||={}).mermaid=(()=>{var _Ne=Object.create;var Uv=Object.defineProperty;var LNe=Object.getOwnPropertyDescriptor;var DNe=Object.getOwnPropertyNames;var INe=Object.getPrototypeOf,MNe=Object.prototype.hasOwnProperty;var s=(e,t)=>Uv(e,"name",{value:t,configurable:!0});var F=(e,t)=>()=>(e&&(t=e(e=0)),t);var ho=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),ar=(e,t)=>{for(var r in t)Uv(e,r,{get:t[r],enumerable:!0})},$Y=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of DNe(t))!MNe.call(e,i)&&i!==r&&Uv(e,i,{get:()=>t[i],enumerable:!(n=LNe(t,i))||n.enumerable});return e};var Ms=(e,t,r)=>(r=e!=null?_Ne(INe(e)):{},$Y(t||!e||!e.__esModule?Uv(r,"default",{value:e,enumerable:!0}):r,e)),NNe=e=>$Y(Uv({},"__esModule",{value:!0}),e);var PNe,jg,J_,FY,fk=F(()=>{"use strict";PNe=Object.freeze({left:0,top:0,width:16,height:16}),jg=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),J_=Object.freeze({...PNe,...jg}),FY=Object.freeze({...J_,body:"",hidden:!1})});var ONe,GY,zY=F(()=>{"use strict";fk();ONe=Object.freeze({width:null,height:null}),GY=Object.freeze({...ONe,...jg})});var eL,pk,VY=F(()=>{"use strict";eL=s((e,t,r,n="")=>{let i=e.split(":");if(e.slice(0,1)==="@"){if(i.length<2||i.length>3)return null;n=i.shift().slice(1)}if(i.length>3||!i.length)return null;if(i.length>1){let l=i.pop(),u=i.pop(),h={provider:i.length>0?i[0]:n,prefix:u,name:l};return t&&!pk(h)?null:h}let a=i[0],o=a.split("-");if(o.length>1){let l={provider:n,prefix:o.shift(),name:o.join("-")};return t&&!pk(l)?null:l}if(r&&n===""){let l={provider:n,prefix:"",name:a};return t&&!pk(l,r)?null:l}return null},"stringToIcon"),pk=s((e,t)=>e?!!((t&&e.prefix===""||e.prefix)&&e.name):!1,"validateIconName")});function WY(e,t){let r={};!e.hFlip!=!t.hFlip&&(r.hFlip=!0),!e.vFlip!=!t.vFlip&&(r.vFlip=!0);let n=((e.rotate||0)+(t.rotate||0))%4;return n&&(r.rotate=n),r}var qY=F(()=>{"use strict";s(WY,"mergeIconTransformations")});function tL(e,t){let r=WY(e,t);for(let n in FY)n in jg?n in e&&!(n in r)&&(r[n]=jg[n]):n in t?r[n]=t[n]:n in e&&(r[n]=e[n]);return r}var HY=F(()=>{"use strict";fk();qY();s(tL,"mergeIconData")});function UY(e,t){let r=e.icons,n=e.aliases||Object.create(null),i=Object.create(null);function a(o){if(r[o])return i[o]=[];if(!(o in i)){i[o]=null;let l=n[o]&&n[o].parent,u=l&&a(l);u&&(i[o]=[l].concat(u))}return i[o]}return s(a,"resolve"),(t||Object.keys(r).concat(Object.keys(n))).forEach(a),i}var YY=F(()=>{"use strict";s(UY,"getIconsTree")});function jY(e,t,r){let n=e.icons,i=e.aliases||Object.create(null),a={};function o(l){a=tL(n[l]||i[l],a)}return s(o,"parse"),o(t),r.forEach(o),tL(e,a)}function rL(e,t){if(e.icons[t])return jY(e,t,[]);let r=UY(e,[t])[t];return r?jY(e,t,r):null}var XY=F(()=>{"use strict";HY();YY();s(jY,"internalGetIconData");s(rL,"getIconData")});function nL(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;let n=e.split(BNe);if(n===null||!n.length)return e;let i=[],a=n.shift(),o=$Ne.test(a);for(;;){if(o){let l=parseFloat(a);isNaN(l)?i.push(a):i.push(Math.ceil(l*t*r)/r)}else i.push(a);if(a=n.shift(),a===void 0)return i.join("");o=!o}}var BNe,$Ne,KY=F(()=>{"use strict";BNe=/(-?[0-9.]*[0-9]+[0-9.]*)/g,$Ne=/^-?[0-9.]*[0-9]+[0-9.]*$/g;s(nL,"calculateSize")});function FNe(e,t="defs"){let r="",n=e.indexOf("<"+t);for(;n>=0;){let i=e.indexOf(">",n),a=e.indexOf("",a);if(o===-1)break;r+=e.slice(i+1,a).trim(),e=e.slice(0,n).trim()+e.slice(o+1)}return{defs:r,content:e}}function GNe(e,t){return e?""+e+""+t:t}function ZY(e,t,r){let n=FNe(e);return GNe(n.defs,t+n.content+r)}var QY=F(()=>{"use strict";s(FNe,"splitSVGDefs");s(GNe,"mergeDefsAndContent");s(ZY,"wrapSVGContent")});function iL(e,t){let r={...J_,...e},n={...GY,...t},i={left:r.left,top:r.top,width:r.width,height:r.height},a=r.body;[r,n].forEach(y=>{let v=[],x=y.hFlip,b=y.vFlip,T=y.rotate;x?b?T+=2:(v.push("translate("+(i.width+i.left).toString()+" "+(0-i.top).toString()+")"),v.push("scale(-1 1)"),i.top=i.left=0):b&&(v.push("translate("+(0-i.left).toString()+" "+(i.height+i.top).toString()+")"),v.push("scale(1 -1)"),i.top=i.left=0);let w;switch(T<0&&(T-=Math.floor(T/4)*4),T=T%4,T){case 1:w=i.height/2+i.top,v.unshift("rotate(90 "+w.toString()+" "+w.toString()+")");break;case 2:v.unshift("rotate(180 "+(i.width/2+i.left).toString()+" "+(i.height/2+i.top).toString()+")");break;case 3:w=i.width/2+i.left,v.unshift("rotate(-90 "+w.toString()+" "+w.toString()+")");break}T%2===1&&(i.left!==i.top&&(w=i.left,i.left=i.top,i.top=w),i.width!==i.height&&(w=i.width,i.width=i.height,i.height=w)),v.length&&(a=ZY(a,'',""))});let o=n.width,l=n.height,u=i.width,h=i.height,d,f;o===null?(f=l===null?"1em":l==="auto"?h:l,d=nL(f,u/h)):(d=o==="auto"?u:o,f=l===null?nL(d,h/u):l==="auto"?h:l);let p={},m=s((y,v)=>{zNe(v)||(p[y]=v.toString())},"setAttr");m("width",d),m("height",f);let g=[i.left,i.top,u,h];return p.viewBox=g.join(" "),{attributes:p,viewBox:g,body:a}}var zNe,JY=F(()=>{"use strict";fk();zY();KY();QY();zNe=s(e=>e==="unset"||e==="undefined"||e==="none","isUnsetKeyword");s(iL,"iconToSVG")});function aL(e,t=WNe){let r=[],n;for(;n=VNe.exec(e);)r.push(n[1]);if(!r.length)return e;let i="suffix"+(Math.random()*16777216|Date.now()).toString(16);return r.forEach(a=>{let o=typeof t=="function"?t(a):t+(qNe++).toString(),l=a.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+l+')([")]|\\.[a-z])',"g"),"$1"+o+i+"$3")}),e=e.replace(new RegExp(i,"g"),""),e}var VNe,WNe,qNe,ej=F(()=>{"use strict";VNe=/\sid="(\S+)"/g,WNe="IconifyId"+Date.now().toString(16)+(Math.random()*16777216|0).toString(16),qNe=0;s(aL,"replaceIDs")});function sL(e,t){let r=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(let n in t)r+=" "+n+'="'+t[n]+'"';return'"+e+""}var tj=F(()=>{"use strict";s(sL,"iconToHTML")});var rj=F(()=>{"use strict";VY();XY();JY();ej();tj()});var oL,Gn,Xg=F(()=>{"use strict";oL=s((e,t,{depth:r=2,clobber:n=!1}={})=>{let i={depth:r,clobber:n};return Array.isArray(t)&&!Array.isArray(e)?(t.forEach(a=>oL(e,a,i)),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"&&t[a]!==null&&(e[a]===void 0||typeof e[a]=="object")?(e[a]===void 0&&(e[a]=Array.isArray(t[a])?[]:{}),e[a]=oL(e[a],t[a],{depth:r-1,clobber:n})):(n||typeof e[a]!="object"&&typeof t[a]!="object")&&(e[a]=t[a])}),e)},"assignWithDepth"),Gn=oL});var mk=ho((lL,cL)=>{"use strict";(function(e,t){typeof lL=="object"&&typeof cL<"u"?cL.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self).dayjs=t()})(lL,(function(){"use strict";var e=1e3,t=6e4,r=36e5,n="millisecond",i="second",a="minute",o="hour",l="day",u="week",h="month",d="quarter",f="year",p="date",m="Invalid Date",g=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,y=/\[([^\]]+)]|YYYY|YY|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,v={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:s(function(R){var E=["th","st","nd","rd"],I=R%100;return"["+R+(E[(I-20)%10]||E[I]||E[0])+"]"},"ordinal")},x=s(function(R,E,I){var L=String(R);return!L||L.length>=E?R:""+Array(E+1-L.length).join(I)+R},"m"),b={s:x,z:s(function(R){var E=-R.utcOffset(),I=Math.abs(E),L=Math.floor(I/60),P=I%60;return(E<=0?"+":"-")+x(L,2,"0")+":"+x(P,2,"0")},"z"),m:s(function R(E,I){if(E.date()1)return R(O[0])}else{var $=E.name;w[$]=E,P=$}return!L&&P&&(T=P),P||!L&&T},"t"),A=s(function(R,E){if(k(R))return R.clone();var I=typeof E=="object"?E:{};return I.date=R,I.args=arguments,new N(I)},"O"),M=b;M.l=S,M.i=k,M.w=function(R,E){return A(R,{locale:E.$L,utc:E.$u,x:E.$x,$offset:E.$offset})};var N=(function(){function R(I){this.$L=S(I.locale,null,!0),this.parse(I),this.$x=this.$x||I.x||{},this[C]=!0}s(R,"M");var E=R.prototype;return E.parse=function(I){this.$d=(function(L){var P=L.date,B=L.utc;if(P===null)return new Date(NaN);if(M.u(P))return new Date;if(P instanceof Date)return new Date(P);if(typeof P=="string"&&!/Z$/i.test(P)){var O=P.match(g);if(O){var $=O[2]-1||0,G=(O[7]||"0").substring(0,3);return B?new Date(Date.UTC(O[1],$,O[3]||1,O[4]||0,O[5]||0,O[6]||0,G)):new Date(O[1],$,O[3]||1,O[4]||0,O[5]||0,O[6]||0,G)}}return new Date(P)})(I),this.init()},E.init=function(){var I=this.$d;this.$y=I.getFullYear(),this.$M=I.getMonth(),this.$D=I.getDate(),this.$W=I.getDay(),this.$H=I.getHours(),this.$m=I.getMinutes(),this.$s=I.getSeconds(),this.$ms=I.getMilliseconds()},E.$utils=function(){return M},E.isValid=function(){return this.$d.toString()!==m},E.isSame=function(I,L){var P=A(I);return this.startOf(L)<=P&&P<=this.endOf(L)},E.isAfter=function(I,L){return A(I){"use strict";nj=Ms(mk(),1),gu={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},te={trace:s((...e)=>{},"trace"),debug:s((...e)=>{},"debug"),info:s((...e)=>{},"info"),warn:s((...e)=>{},"warn"),error:s((...e)=>{},"error"),fatal:s((...e)=>{},"fatal")},Yv=s(function(e="fatal"){let t=gu.fatal;typeof e=="string"?e.toLowerCase()in gu&&(t=gu[e]):typeof e=="number"&&(t=e),te.trace=()=>{},te.debug=()=>{},te.info=()=>{},te.warn=()=>{},te.error=()=>{},te.fatal=()=>{},t<=gu.fatal&&(te.fatal=console.error?console.error.bind(console,No("FATAL"),"color: orange"):console.log.bind(console,"\x1B[35m",No("FATAL"))),t<=gu.error&&(te.error=console.error?console.error.bind(console,No("ERROR"),"color: orange"):console.log.bind(console,"\x1B[31m",No("ERROR"))),t<=gu.warn&&(te.warn=console.warn?console.warn.bind(console,No("WARN"),"color: orange"):console.log.bind(console,"\x1B[33m",No("WARN"))),t<=gu.info&&(te.info=console.info?console.info.bind(console,No("INFO"),"color: lightblue"):console.log.bind(console,"\x1B[34m",No("INFO"))),t<=gu.debug&&(te.debug=console.debug?console.debug.bind(console,No("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",No("DEBUG"))),t<=gu.trace&&(te.trace=console.debug?console.debug.bind(console,No("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",No("TRACE")))},"setLogLevel"),No=s(e=>`%c${(0,nj.default)().format("ss.SSS")} : ${e} : `,"format")});var gk,ij,aj=F(()=>{"use strict";gk={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:s(e=>e>=255?255:e<0?0:e,"r"),g:s(e=>e>=255?255:e<0?0:e,"g"),b:s(e=>e>=255?255:e<0?0:e,"b"),h:s(e=>e%360,"h"),s:s(e=>e>=100?100:e<0?0:e,"s"),l:s(e=>e>=100?100:e<0?0:e,"l"),a:s(e=>e>=1?1:e<0?0:e,"a")},toLinear:s(e=>{let t=e/255;return e>.03928?Math.pow((t+.055)/1.055,2.4):t/12.92},"toLinear"),hue2rgb:s((e,t,r)=>(r<0&&(r+=1),r>1&&(r-=1),r<.16666666666666666?e+(t-e)*6*r:r<.5?t:r<.6666666666666666?e+(t-e)*(.6666666666666666-r)*6:e),"hue2rgb"),hsl2rgb:s(({h:e,s:t,l:r},n)=>{if(!t)return r*2.55;e/=360,t/=100,r/=100;let i=r<.5?r*(1+t):r+t-r*t,a=2*r-i;switch(n){case"r":return gk.hue2rgb(a,i,e+.3333333333333333)*255;case"g":return gk.hue2rgb(a,i,e)*255;case"b":return gk.hue2rgb(a,i,e-.3333333333333333)*255}},"hsl2rgb"),rgb2hsl:s(({r:e,g:t,b:r},n)=>{e/=255,t/=255,r/=255;let i=Math.max(e,t,r),a=Math.min(e,t,r),o=(i+a)/2;if(n==="l")return o*100;if(i===a)return 0;let l=i-a,u=o>.5?l/(2-i-a):l/(i+a);if(n==="s")return u*100;switch(i){case e:return((t-r)/l+(t{"use strict";HNe={clamp:s((e,t,r)=>t>r?Math.min(t,Math.max(r,e)):Math.min(r,Math.max(t,e)),"clamp"),round:s(e=>Math.round(e*1e10)/1e10,"round")},sj=HNe});var UNe,lj,cj=F(()=>{"use strict";UNe={dec2hex:s(e=>{let t=Math.round(e).toString(16);return t.length>1?t:`0${t}`},"dec2hex")},lj=UNe});var YNe,ur,Jl=F(()=>{"use strict";aj();oj();cj();YNe={channel:ij,lang:sj,unit:lj},ur=YNe});var yu,Hi,jv=F(()=>{"use strict";Jl();yu={};for(let e=0;e<=255;e++)yu[e]=ur.unit.dec2hex(e);Hi={ALL:0,RGB:1,HSL:2}});var uL,uj,hj=F(()=>{"use strict";jv();uL=class{static{s(this,"Type")}constructor(){this.type=Hi.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=Hi.ALL}is(t){return this.type===t}},uj=uL});var hL,dj,fj=F(()=>{"use strict";Jl();hj();jv();hL=class{static{s(this,"Channels")}constructor(t,r){this.color=r,this.changed=!1,this.data=t,this.type=new uj}set(t,r){return this.color=r,this.changed=!1,this.data=t,this.type.type=Hi.ALL,this}_ensureHSL(){let t=this.data,{h:r,s:n,l:i}=t;r===void 0&&(t.h=ur.channel.rgb2hsl(t,"h")),n===void 0&&(t.s=ur.channel.rgb2hsl(t,"s")),i===void 0&&(t.l=ur.channel.rgb2hsl(t,"l"))}_ensureRGB(){let t=this.data,{r,g:n,b:i}=t;r===void 0&&(t.r=ur.channel.hsl2rgb(t,"r")),n===void 0&&(t.g=ur.channel.hsl2rgb(t,"g")),i===void 0&&(t.b=ur.channel.hsl2rgb(t,"b"))}get r(){let t=this.data,r=t.r;return!this.type.is(Hi.HSL)&&r!==void 0?r:(this._ensureHSL(),ur.channel.hsl2rgb(t,"r"))}get g(){let t=this.data,r=t.g;return!this.type.is(Hi.HSL)&&r!==void 0?r:(this._ensureHSL(),ur.channel.hsl2rgb(t,"g"))}get b(){let t=this.data,r=t.b;return!this.type.is(Hi.HSL)&&r!==void 0?r:(this._ensureHSL(),ur.channel.hsl2rgb(t,"b"))}get h(){let t=this.data,r=t.h;return!this.type.is(Hi.RGB)&&r!==void 0?r:(this._ensureRGB(),ur.channel.rgb2hsl(t,"h"))}get s(){let t=this.data,r=t.s;return!this.type.is(Hi.RGB)&&r!==void 0?r:(this._ensureRGB(),ur.channel.rgb2hsl(t,"s"))}get l(){let t=this.data,r=t.l;return!this.type.is(Hi.RGB)&&r!==void 0?r:(this._ensureRGB(),ur.channel.rgb2hsl(t,"l"))}get a(){return this.data.a}set r(t){this.type.set(Hi.RGB),this.changed=!0,this.data.r=t}set g(t){this.type.set(Hi.RGB),this.changed=!0,this.data.g=t}set b(t){this.type.set(Hi.RGB),this.changed=!0,this.data.b=t}set h(t){this.type.set(Hi.HSL),this.changed=!0,this.data.h=t}set s(t){this.type.set(Hi.HSL),this.changed=!0,this.data.s=t}set l(t){this.type.set(Hi.HSL),this.changed=!0,this.data.l=t}set a(t){this.changed=!0,this.data.a=t}},dj=hL});var jNe,Gh,Xv=F(()=>{"use strict";fj();jNe=new dj({r:0,g:0,b:0,a:0},"transparent"),Gh=jNe});var pj,tp,dL=F(()=>{"use strict";Xv();jv();pj={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:s(e=>{if(e.charCodeAt(0)!==35)return;let t=e.match(pj.re);if(!t)return;let r=t[1],n=parseInt(r,16),i=r.length,a=i%4===0,o=i>4,l=o?1:17,u=o?8:4,h=a?0:-1,d=o?255:15;return Gh.set({r:(n>>u*(h+3)&d)*l,g:(n>>u*(h+2)&d)*l,b:(n>>u*(h+1)&d)*l,a:a?(n&d)*l/255:1},e)},"parse"),stringify:s(e=>{let{r:t,g:r,b:n,a:i}=e;return i<1?`#${yu[Math.round(t)]}${yu[Math.round(r)]}${yu[Math.round(n)]}${yu[Math.round(i*255)]}`:`#${yu[Math.round(t)]}${yu[Math.round(r)]}${yu[Math.round(n)]}`},"stringify")},tp=pj});var yk,Kv,mj=F(()=>{"use strict";Jl();Xv();yk={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:s(e=>{let t=e.match(yk.hueRe);if(t){let[,r,n]=t;switch(n){case"grad":return ur.channel.clamp.h(parseFloat(r)*.9);case"rad":return ur.channel.clamp.h(parseFloat(r)*180/Math.PI);case"turn":return ur.channel.clamp.h(parseFloat(r)*360)}}return ur.channel.clamp.h(parseFloat(e))},"_hue2deg"),parse:s(e=>{let t=e.charCodeAt(0);if(t!==104&&t!==72)return;let r=e.match(yk.re);if(!r)return;let[,n,i,a,o,l]=r;return Gh.set({h:yk._hue2deg(n),s:ur.channel.clamp.s(parseFloat(i)),l:ur.channel.clamp.l(parseFloat(a)),a:o?ur.channel.clamp.a(l?parseFloat(o)/100:parseFloat(o)):1},e)},"parse"),stringify:s(e=>{let{h:t,s:r,l:n,a:i}=e;return i<1?`hsla(${ur.lang.round(t)}, ${ur.lang.round(r)}%, ${ur.lang.round(n)}%, ${i})`:`hsl(${ur.lang.round(t)}, ${ur.lang.round(r)}%, ${ur.lang.round(n)}%)`},"stringify")},Kv=yk});var vk,fL,gj=F(()=>{"use strict";dL();vk={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:s(e=>{e=e.toLowerCase();let t=vk.colors[e];if(t)return tp.parse(t)},"parse"),stringify:s(e=>{let t=tp.stringify(e);for(let r in vk.colors)if(vk.colors[r]===t)return r},"stringify")},fL=vk});var yj,Zv,vj=F(()=>{"use strict";Jl();Xv();yj={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:s(e=>{let t=e.charCodeAt(0);if(t!==114&&t!==82)return;let r=e.match(yj.re);if(!r)return;let[,n,i,a,o,l,u,h,d]=r;return Gh.set({r:ur.channel.clamp.r(i?parseFloat(n)*2.55:parseFloat(n)),g:ur.channel.clamp.g(o?parseFloat(a)*2.55:parseFloat(a)),b:ur.channel.clamp.b(u?parseFloat(l)*2.55:parseFloat(l)),a:h?ur.channel.clamp.a(d?parseFloat(h)/100:parseFloat(h)):1},e)},"parse"),stringify:s(e=>{let{r:t,g:r,b:n,a:i}=e;return i<1?`rgba(${ur.lang.round(t)}, ${ur.lang.round(r)}, ${ur.lang.round(n)}, ${ur.lang.round(i)})`:`rgb(${ur.lang.round(t)}, ${ur.lang.round(r)}, ${ur.lang.round(n)})`},"stringify")},Zv=yj});var XNe,Ui,vu=F(()=>{"use strict";dL();mj();gj();vj();jv();XNe={format:{keyword:fL,hex:tp,rgb:Zv,rgba:Zv,hsl:Kv,hsla:Kv},parse:s(e=>{if(typeof e!="string")return e;let t=tp.parse(e)||Zv.parse(e)||Kv.parse(e)||fL.parse(e);if(t)return t;throw new Error(`Unsupported color format: "${e}"`)},"parse"),stringify:s(e=>!e.changed&&e.color?e.color:e.type.is(Hi.HSL)||e.data.r===void 0?Kv.stringify(e):e.a<1||!Number.isInteger(e.r)||!Number.isInteger(e.g)||!Number.isInteger(e.b)?Zv.stringify(e):tp.stringify(e),"stringify")},Ui=XNe});var KNe,xk,pL=F(()=>{"use strict";Jl();vu();KNe=s((e,t)=>{let r=Ui.parse(e);for(let n in t)r[n]=ur.channel.clamp[n](t[n]);return Ui.stringify(r)},"change"),xk=KNe});var ZNe,Ai,mL=F(()=>{"use strict";Jl();Xv();vu();pL();ZNe=s((e,t,r=0,n=1)=>{if(typeof e!="number")return xk(e,{a:t});let i=Gh.set({r:ur.channel.clamp.r(e),g:ur.channel.clamp.g(t),b:ur.channel.clamp.b(r),a:ur.channel.clamp.a(n)});return Ui.stringify(i)},"rgba"),Ai=ZNe});var QNe,rp,xj=F(()=>{"use strict";Jl();vu();QNe=s((e,t)=>ur.lang.round(Ui.parse(e)[t]),"channel"),rp=QNe});var JNe,bj,Tj=F(()=>{"use strict";Jl();vu();JNe=s(e=>{let{r:t,g:r,b:n}=Ui.parse(e),i=.2126*ur.channel.toLinear(t)+.7152*ur.channel.toLinear(r)+.0722*ur.channel.toLinear(n);return ur.lang.round(i)},"luminance"),bj=JNe});var ePe,Cj,kj=F(()=>{"use strict";Tj();ePe=s(e=>bj(e)>=.5,"isLight"),Cj=ePe});var tPe,gn,wj=F(()=>{"use strict";kj();tPe=s(e=>!Cj(e),"isDark"),gn=tPe});var rPe,Kg,bk=F(()=>{"use strict";Jl();vu();rPe=s((e,t,r)=>{let n=Ui.parse(e),i=n[t],a=ur.channel.clamp[t](i+r);return i!==a&&(n[t]=a),Ui.stringify(n)},"adjustChannel"),Kg=rPe});var nPe,Je,Sj=F(()=>{"use strict";bk();nPe=s((e,t)=>Kg(e,"l",t),"lighten"),Je=nPe});var iPe,et,Ej=F(()=>{"use strict";bk();iPe=s((e,t)=>Kg(e,"l",-t),"darken"),et=iPe});var aPe,Tk,Aj=F(()=>{"use strict";bk();aPe=s((e,t)=>Kg(e,"a",-t),"transparentize"),Tk=aPe});var sPe,fe,Rj=F(()=>{"use strict";vu();pL();sPe=s((e,t)=>{let r=Ui.parse(e),n={};for(let i in t)t[i]&&(n[i]=r[i]+t[i]);return xk(e,n)},"adjust"),fe=sPe});var oPe,_j,Lj=F(()=>{"use strict";vu();mL();oPe=s((e,t,r=50)=>{let{r:n,g:i,b:a,a:o}=Ui.parse(e),{r:l,g:u,b:h,a:d}=Ui.parse(t),f=r/100,p=f*2-1,m=o-d,y=((p*m===-1?p:(p+m)/(1+p*m))+1)/2,v=1-y,x=n*y+l*v,b=i*y+u*v,T=a*y+h*v,w=o*f+d*(1-f);return Ai(x,b,T,w)},"mix"),_j=oPe});var lPe,Ue,Dj=F(()=>{"use strict";vu();Lj();lPe=s((e,t=100)=>{let r=Ui.parse(e);return r.r=255-r.r,r.g=255-r.g,r.b=255-r.b,_j(r,e,t)},"invert"),Ue=lPe});var Ij=F(()=>{"use strict";mL();xj();wj();Sj();Ej();Aj();Rj();Dj()});var Di=F(()=>{"use strict";Ij()});var Ii,Mi,dl=F(()=>{"use strict";Ii="#ffffff",Mi="#f2f2f2"});var or,Po=F(()=>{"use strict";Di();or=s((e,t)=>t?fe(e,{s:-40,l:10}):fe(e,{s:-40,l:-10}),"mkBorder")});var yL,Mj,Nj=F(()=>{"use strict";Di();dl();Po();yL=class{static{s(this,"Theme")}constructor(){this.background="#f4f4f4",this.primaryColor="#fff4dd",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.useGradient=!0,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))"}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||fe(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||fe(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||or(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||or(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||or(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||or(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||Ue(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||Ue(this.tertiaryColor),this.lineColor=this.lineColor||Ue(this.background),this.arrowheadColor=this.arrowheadColor||Ue(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||Ue(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,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||Je(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.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal",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||Je(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||Je(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||fe(this.primaryColor,{h:30}),this.cScale4=this.cScale4||fe(this.primaryColor,{h:60}),this.cScale5=this.cScale5||fe(this.primaryColor,{h:90}),this.cScale6=this.cScale6||fe(this.primaryColor,{h:120}),this.cScale7=this.cScale7||fe(this.primaryColor,{h:150}),this.cScale8=this.cScale8||fe(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||fe(this.primaryColor,{h:270}),this.cScale10=this.cScale10||fe(this.primaryColor,{h:300}),this.cScale11=this.cScale11||fe(this.primaryColor,{h:330}),this.darkMode)for(let r=0;r{this[n]=t[n]}),this.updateColors(),r.forEach(n=>{this[n]=t[n]})}},Mj=s(e=>{let t=new yL;return t.calculate(e),t},"getThemeVariables")});var vL,Pj,Oj=F(()=>{"use strict";Di();Po();vL=class{static{s(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=Je(this.primaryColor,16),this.tertiaryColor=fe(this.primaryColor,{h:-160}),this.primaryBorderColor=Ue(this.background),this.secondaryBorderColor=or(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=or(this.tertiaryColor,this.darkMode),this.primaryTextColor=Ue(this.primaryColor),this.secondaryTextColor=Ue(this.secondaryColor),this.tertiaryTextColor=Ue(this.tertiaryColor),this.lineColor=Ue(this.background),this.textColor=Ue(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=Je(Ue("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=Ai(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.radius=5,this.strokeWidth=1,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.clusterBkg="#302F3D",this.sectionBkgColor=et("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=et(this.sectionBkgColor,10),this.taskBorderColor=Ai(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=Ai(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||Je(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||et(this.mainBkg,10),this.labelColor="calculated",this.errorBkgColor="#a44141",this.errorTextColor="#ddd",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))",this.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal"}updateColors(){this.secondBkg=Je(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=Je(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.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.background,this.taskBkgColor=Je(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=Ue(this.doneTaskBkgColor),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=fe(this.primaryColor,{h:64}),this.fillType3=fe(this.secondaryColor,{h:64}),this.fillType4=fe(this.primaryColor,{h:-64}),this.fillType5=fe(this.secondaryColor,{h:-64}),this.fillType6=fe(this.primaryColor,{h:128}),this.fillType7=fe(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||fe(this.primaryColor,{h:30}),this.cScale4=this.cScale4||fe(this.primaryColor,{h:60}),this.cScale5=this.cScale5||fe(this.primaryColor,{h:90}),this.cScale6=this.cScale6||fe(this.primaryColor,{h:120}),this.cScale7=this.cScale7||fe(this.primaryColor,{h:150}),this.cScale8=this.cScale8||fe(this.primaryColor,{h:210}),this.cScale9=this.cScale9||fe(this.primaryColor,{h:270}),this.cScale10=this.cScale10||fe(this.primaryColor,{h:300}),this.cScale11=this.cScale11||fe(this.primaryColor,{h:330});for(let t=0;t{this[n]=t[n]}),this.updateColors(),r.forEach(n=>{this[n]=t[n]})}},Pj=s(e=>{let t=new vL;return t.calculate(e),t},"getThemeVariables")});var xL,ia,ec=F(()=>{"use strict";Di();Po();dl();xL=class{static{s(this,"Theme")}constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=fe(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=fe(this.primaryColor,{h:-160}),this.primaryBorderColor=or(this.primaryColor,this.darkMode),this.secondaryBorderColor=or(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=or(this.tertiaryColor,this.darkMode),this.primaryTextColor=Ue(this.primaryColor),this.secondaryTextColor=Ue(this.secondaryColor),this.tertiaryTextColor=Ue(this.tertiaryColor),this.lineColor=Ue(this.background),this.textColor=Ue(this.background),this.background="white",this.mainBkg="#ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",this.primaryBorderColor=or(this.primaryColor,this.darkMode),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.radius=5,this.strokeWidth=1,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.clusterBkg="#FBFBFF",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=Ai(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.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal",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.useGradient=!1,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow(1px 2px 2px rgba(185, 185, 185, 1))",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||fe(this.primaryColor,{h:30}),this.cScale4=this.cScale4||fe(this.primaryColor,{h:60}),this.cScale5=this.cScale5||fe(this.primaryColor,{h:90}),this.cScale6=this.cScale6||fe(this.primaryColor,{h:120}),this.cScale7=this.cScale7||fe(this.primaryColor,{h:150}),this.cScale8=this.cScale8||fe(this.primaryColor,{h:210}),this.cScale9=this.cScale9||fe(this.primaryColor,{h:270}),this.cScale10=this.cScale10||fe(this.primaryColor,{h:300}),this.cScale11=this.cScale11||fe(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||et(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||et(this.tertiaryColor,40);for(let t=0;t{this[n]==="calculated"&&(this[n]=void 0)}),typeof t!="object"){this.updateColors();return}let r=Object.keys(t);r.forEach(n=>{this[n]=t[n]}),this.updateColors(),r.forEach(n=>{this[n]=t[n]})}},ia=s(e=>{let t=new xL;return t.calculate(e),t},"getThemeVariables")});var bL,Bj,$j=F(()=>{"use strict";Di();dl();Po();bL=class{static{s(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=Je("#cde498",10),this.primaryBorderColor=or(this.primaryColor,this.darkMode),this.secondaryBorderColor=or(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=or(this.tertiaryColor,this.darkMode),this.primaryTextColor=Ue(this.primaryColor),this.secondaryTextColor=Ue(this.secondaryColor),this.tertiaryTextColor=Ue(this.primaryColor),this.lineColor=Ue(this.background),this.textColor=Ue(this.background),this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,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.noteFontWeight="normal",this.fontWeight="normal",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,0.5))"}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.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||fe(this.primaryColor,{h:30}),this.cScale4=this.cScale4||fe(this.primaryColor,{h:60}),this.cScale5=this.cScale5||fe(this.primaryColor,{h:90}),this.cScale6=this.cScale6||fe(this.primaryColor,{h:120}),this.cScale7=this.cScale7||fe(this.primaryColor,{h:150}),this.cScale8=this.cScale8||fe(this.primaryColor,{h:210}),this.cScale9=this.cScale9||fe(this.primaryColor,{h:270}),this.cScale10=this.cScale10||fe(this.primaryColor,{h:300}),this.cScale11=this.cScale11||fe(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||et(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||et(this.tertiaryColor,40);for(let t=0;t{this[n]=t[n]}),this.updateColors(),r.forEach(n=>{this[n]=t[n]})}},Bj=s(e=>{let t=new bL;return t.calculate(e),t},"getThemeVariables")});var TL,Fj,Gj=F(()=>{"use strict";Di();Po();dl();TL=class{static{s(this,"Theme")}constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=Je(this.contrast,55),this.background="#ffffff",this.tertiaryColor=fe(this.primaryColor,{h:-160}),this.primaryBorderColor=or(this.primaryColor,this.darkMode),this.secondaryBorderColor=or(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=or(this.tertiaryColor,this.darkMode),this.primaryTextColor=Ue(this.primaryColor),this.secondaryTextColor=Ue(this.secondaryColor),this.tertiaryTextColor=Ue(this.tertiaryColor),this.lineColor=Ue(this.background),this.textColor=Ue(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.radius=5,this.strokeWidth=1,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.noteFontWeight="normal",this.fontWeight="normal",this.rowOdd=this.rowOdd||Je(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||"#f4f4f4",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))"}updateColors(){this.secondBkg=Je(this.contrast,55),this.border2=this.contrast,this.actorBorder=Je(this.border1,23),this.actorBkg=this.mainBkg,this.actorTextColor=this.text,this.actorLineColor=this.actorBorder,this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,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 t=0;t{this[n]=t[n]}),this.updateColors(),r.forEach(n=>{this[n]=t[n]})}},Fj=s(e=>{let t=new TL;return t.calculate(e),t},"getThemeVariables")});var CL,zj,Vj=F(()=>{"use strict";Di();Po();dl();CL=class{static{s(this,"Theme")}constructor(){this.background="#ffffff",this.primaryColor="#cccccc",this.mainBkg="#ffffff",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.radius=3,this.strokeWidth=2,this.primaryBorderColor=or(this.primaryColor,this.darkMode),this.fontFamily="arial, sans-serif",this.fontSize="14px",this.nodeBorder="#000000",this.stateBorder="#000000",this.useGradient=!0,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="drop-shadow( 0px 1px 2px rgba(0, 0, 0, 0.25));",this.tertiaryColor="#ffffff",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal"}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||fe(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||fe(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||or(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||or(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||or(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||or(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||Ue(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||Ue(this.tertiaryColor),this.lineColor=this.lineColor||Ue(this.background),this.arrowheadColor=this.arrowheadColor||Ue(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||Ue(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor;let t="#ECECFE",r="#E9E9F1",n=fe(t,{h:180,l:5});if(this.sectionBkgColor=this.sectionBkgColor||n,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||r,this.sectionBkgColor2=this.sectionBkgColor2||t,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||t,this.activeTaskBorderColor=this.activeTaskBorderColor||t,this.activeTaskBkgColor=this.activeTaskBkgColor||Je(t,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.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,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||"#f0f0f0",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||t,this.cScale1=this.cScale1||r,this.cScale2=this.cScale2||n,this.cScale3=this.cScale3||fe(t,{h:30}),this.cScale4=this.cScale4||fe(t,{h:60}),this.cScale5=this.cScale5||fe(t,{h:90}),this.cScale6=this.cScale6||fe(t,{h:120}),this.cScale7=this.cScale7||fe(t,{h:150}),this.cScale8=this.cScale8||fe(t,{h:210,l:150}),this.cScale9=this.cScale9||fe(t,{h:270}),this.cScale10=this.cScale10||fe(t,{h:300}),this.cScale11=this.cScale11||fe(t,{h:330}),this.darkMode)for(let a=0;a{this[n]=t[n]}),this.updateColors(),r.forEach(n=>{this[n]=t[n]})}},zj=s(e=>{let t=new CL;return t.calculate(e),t},"getThemeVariables")});var kL,Wj,qj=F(()=>{"use strict";Di();Po();dl();kL=class{static{s(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=Je(this.primaryColor,16),this.tertiaryColor=fe(this.primaryColor,{h:-160}),this.primaryBorderColor=Ue(this.background),this.secondaryBorderColor=or(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=or(this.tertiaryColor,this.darkMode),this.primaryTextColor=Ue(this.primaryColor),this.secondaryTextColor=Ue(this.secondaryColor),this.tertiaryTextColor=Ue(this.tertiaryColor),this.mainBkg="#2a2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=Je(Ue("#323D47"),10),this.border1="#ccc",this.border2=Ai(255,255,255,.25),this.arrowheadColor=Ue(this.background),this.fontFamily="arial, sans-serif",this.fontSize="14px",this.labelBackground="#181818",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=3,this.strokeWidth=1,this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.fontFamily="arial, sans-serif",this.fontSize="14px",this.useGradient=!0,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,0.2))",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal"}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||fe(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||fe(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||or(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||or(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||or(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||or(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||Ue(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||Ue(this.tertiaryColor),this.lineColor=this.lineColor||Ue(this.background),this.arrowheadColor=this.arrowheadColor||Ue(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.border1,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||Ue(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,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||Je(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||this.primaryBorderColor,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.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,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||"#f0f0f0",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||fe(this.primaryColor,{h:30}),this.cScale4=this.cScale4||fe(this.primaryColor,{h:60}),this.cScale5=this.cScale5||fe(this.primaryColor,{h:90}),this.cScale6=this.cScale6||fe(this.primaryColor,{h:120}),this.cScale7=this.cScale7||fe(this.primaryColor,{h:150}),this.cScale8=this.cScale8||fe(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||fe(this.primaryColor,{h:270}),this.cScale10=this.cScale10||fe(this.primaryColor,{h:300}),this.cScale11=this.cScale11||fe(this.primaryColor,{h:330}),this.darkMode)for(let r=0;r{this[n]=t[n]}),this.updateColors(),r.forEach(n=>{this[n]=t[n]})}},Wj=s(e=>{let t=new kL;return t.calculate(e),t},"getThemeVariables")});var wL,Hj,Uj=F(()=>{"use strict";Di();Po();dl();wL=class{static{s(this,"Theme")}constructor(){this.background="#ffffff",this.primaryColor="#cccccc",this.mainBkg="#ffffff",this.noteBkgColor="#fff5ad",this.noteTextColor="#28253D",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.primaryBorderColor=or("#28253D",this.darkMode),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#28253D",this.stateBorder="#28253D",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.tertiaryColor="#ffffff",this.clusterBkg="#F9F9FB",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.actorBorder="#28253D",this.filterColor="#000000"}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#28253D"),this.secondaryColor=this.secondaryColor||fe(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||fe(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||or(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||or(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||or(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||or(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#FEF9C3",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||Ue(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||Ue(this.tertiaryColor),this.lineColor=this.lineColor||Ue(this.background),this.arrowheadColor=this.arrowheadColor||Ue(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.noteFontWeight=600,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||Ue(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor;let t="#ECECFE",r="#E9E9F1",n=fe(t,{h:180,l:5});this.sectionBkgColor=this.sectionBkgColor||n,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||r,this.sectionBkgColor2=this.sectionBkgColor2||t,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||t,this.activeTaskBorderColor=this.activeTaskBorderColor||t,this.activeTaskBkgColor=this.activeTaskBkgColor||Je(t,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.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,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.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.compositeTitleBackground="#F9F9FB",this.altBackground="#F9F9FB",this.stateEdgeLabelBackground="#FFFFFF",this.fontWeight=600,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",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;for(let a=0;a{this[n]=t[n]}),this.updateColors(),r.forEach(n=>{this[n]=t[n]})}},Hj=s(e=>{let t=new wL;return t.calculate(e),t},"getThemeVariables")});var SL,Yj,jj=F(()=>{"use strict";Di();Po();dl();SL=class{static{s(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=Je(this.primaryColor,16),this.tertiaryColor=fe(this.primaryColor,{h:-160}),this.primaryBorderColor=Ue(this.background),this.secondaryBorderColor=or(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=or(this.tertiaryColor,this.darkMode),this.primaryTextColor=Ue(this.primaryColor),this.secondaryTextColor=Ue(this.secondaryColor),this.tertiaryTextColor=Ue(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=Je(Ue("#323D47"),10),this.border1="#ccc",this.border2=Ai(255,255,255,.25),this.arrowheadColor=Ue(this.background),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.labelBackground="#111113",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.noteBkgColor=this.noteBkgColor??"#FEF9C3",this.noteTextColor=this.noteTextColor??"#28253D",this.THEME_COLOR_LIMIT=12,this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#FFFFFF",this.stateBorder="#FFFFFF",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.clusterBkg="#1E1A2E",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.filterColor="#FFFFFF"}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#FFFFFF"),this.secondaryColor=this.secondaryColor||fe(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||fe(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||or(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||or(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||or(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||or(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||Ue(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||Ue(this.tertiaryColor),this.lineColor=this.lineColor||Ue(this.background),this.arrowheadColor=this.arrowheadColor||Ue(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.border1,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="#FFFFFF",this.signalColor="#FFFFFF",this.labelBoxBorderColor="#BDBCCC",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||Ue(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,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||Je(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.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.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.compositeBackground="#16141F",this.altBackground="#16141F",this.compositeTitleBackground="#16141F",this.stateEdgeLabelBackground="#16141F",this.fontWeight=600,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",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||fe(this.primaryColor,{h:30}),this.cScale4=this.cScale4||fe(this.primaryColor,{h:60}),this.cScale5=this.cScale5||fe(this.primaryColor,{h:90}),this.cScale6=this.cScale6||fe(this.primaryColor,{h:120}),this.cScale7=this.cScale7||fe(this.primaryColor,{h:150}),this.cScale8=this.cScale8||fe(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||fe(this.primaryColor,{h:270}),this.cScale10=this.cScale10||fe(this.primaryColor,{h:300}),this.cScale11=this.cScale11||fe(this.primaryColor,{h:330}),this.darkMode)for(let r=0;r{this[n]=t[n]}),this.updateColors(),r.forEach(n=>{this[n]=t[n]})}},Yj=s(e=>{let t=new SL;return t.calculate(e),t},"getThemeVariables")});var EL,Xj,Kj=F(()=>{"use strict";Di();Po();dl();EL=class{static{s(this,"Theme")}constructor(){this.background="#ffffff",this.primaryColor="#cccccc",this.mainBkg="#ffffff",this.noteBkgColor="#fff5ad",this.noteTextColor="#28253D",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.primaryBorderColor=or(this.primaryColor,this.darkMode),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#28253D",this.stateBorder="#28253D",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.tertiaryColor="#ffffff",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.actorBorder="#28253D",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.borderColorArray=["#E879F9","#2DD4BF","#FB923C","#22D3EE","#4ADE80","#A78BFA","#F87171","#FACC15","#818CF8","#A3E635 ","#38BDF8","#FB7185"],this.bkgColorArray=["#FDF4FF","#F0FDFA","#FFF7ED","#ECFEFF","#F0FDF4","#F5F3FF","#FEF2F2","#FEFCE8","#EEF2FF","#F7FEE7","#F0F9FF","#FFF1F2"],this.filterColor="#000000"}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#28253D"),this.secondaryColor=this.secondaryColor||fe(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||fe(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||or(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||or(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||or(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||or(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||Ue(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||Ue(this.tertiaryColor),this.lineColor=this.lineColor||Ue(this.background),this.arrowheadColor=this.arrowheadColor||Ue(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||Ue(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor;let t="#ECECFE",r="#E9E9F1",n=fe(t,{h:180,l:5});this.sectionBkgColor=this.sectionBkgColor||n,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||r,this.sectionBkgColor2=this.sectionBkgColor2||t,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||t,this.activeTaskBorderColor=this.activeTaskBorderColor||t,this.activeTaskBkgColor=this.activeTaskBkgColor||Je(t,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.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,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.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,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||"#f0f0f0",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||"#f4a8ff",this.cScale1=this.cScale1||"#46ecd5",this.cScale2=this.cScale2||"#ffb86a",this.cScale3=this.cScale3||"#dab2ff",this.cScale4=this.cScale4||"#7bf1a8",this.cScale5=this.cScale5||"#c4b4ff",this.cScale6=this.cScale6||"#ffa2a2",this.cScale7=this.cScale7||"#ffdf20",this.cScale8=this.cScale8||"#a3b3ff",this.cScale9=this.cScale9||"#bbf451",this.cScale10=this.cScale10||"#74d4ff",this.cScale11=this.cScale11||"#ffa1ad";for(let a=0;a{this[n]=t[n]}),this.updateColors(),r.forEach(n=>{this[n]=t[n]})}},Xj=s(e=>{let t=new EL;return t.calculate(e),t},"getThemeVariables")});var AL,Zj,Qj=F(()=>{"use strict";Di();Po();dl();AL=class{static{s(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=Je(this.primaryColor,16),this.tertiaryColor=fe(this.primaryColor,{h:-160}),this.primaryBorderColor=Ue(this.background),this.secondaryBorderColor=or(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=or(this.tertiaryColor,this.darkMode),this.primaryTextColor=Ue(this.primaryColor),this.secondaryTextColor=Ue(this.secondaryColor),this.tertiaryTextColor=Ue(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=Je(Ue("#323D47"),10),this.border1="#ccc",this.border2=Ai(255,255,255,.25),this.arrowheadColor=Ue(this.background),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.labelBackground="#111113",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.noteBkgColor=this.noteBkgColor??"#FEF9C3",this.noteTextColor=this.noteTextColor??"#28253D",this.THEME_COLOR_LIMIT=12,this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#FFFFFF",this.stateBorder="#FFFFFF",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.clusterBkg="#1E1A2E",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.borderColorArray=["#E879F9","#2DD4BF","#FB923C","#22D3EE","#4ADE80","#A78BFA","#F87171","#FACC15","#818CF8","#A3E635 ","#38BDF8","#FB7185"],this.bkgColorArray=[],this.filterColor="#FFFFFF"}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#FFFFFF"),this.secondaryColor=this.secondaryColor||fe(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||fe(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||or(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||or(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||or(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||or(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||Ue(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||Ue(this.tertiaryColor),this.lineColor=this.lineColor||Ue(this.background),this.arrowheadColor=this.arrowheadColor||Ue(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.border1,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="#FFFFFF",this.signalColor="#FFFFFF",this.labelBoxBorderColor="#BDBCCC",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||Ue(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.rootLabelColor="#FFFFFF",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||Je(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.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,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.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,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||"#f0f0f0",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||"#f4a8ff",this.cScale1=this.cScale1||"#46ecd5",this.cScale2=this.cScale2||"#ffb86a",this.cScale3=this.cScale3||"#dab2ff",this.cScale4=this.cScale4||"#7bf1a8",this.cScale5=this.cScale5||"#c4b4ff",this.cScale6=this.cScale6||"#ffa2a2",this.cScale7=this.cScale7||"#ffdf20",this.cScale8=this.cScale8||"#a3b3ff",this.cScale9=this.cScale9||"#bbf451",this.cScale10=this.cScale10||"#74d4ff",this.cScale11=this.cScale11||"#ffa1ad";for(let r=0;r{this[n]=t[n]}),this.updateColors(),r.forEach(n=>{this[n]=t[n]})}},Zj=s(e=>{let t=new AL;return t.calculate(e),t},"getThemeVariables")});var Oo,Ck=F(()=>{"use strict";Nj();Oj();ec();$j();Gj();Vj();qj();Uj();jj();Kj();Qj();Oo={base:{getThemeVariables:Mj},dark:{getThemeVariables:Pj},default:{getThemeVariables:ia},forest:{getThemeVariables:Bj},neutral:{getThemeVariables:Fj},neo:{getThemeVariables:zj},"neo-dark":{getThemeVariables:Wj},redux:{getThemeVariables:Hj},"redux-dark":{getThemeVariables:Yj},"redux-color":{getThemeVariables:Xj},"redux-dark-color":{getThemeVariables:Zj}}});var aa,Jj=F(()=>{"use strict";aa={flowchart:{useMaxWidth:!0,titleTopMargin:25,subGraphTitleMargin:{top:0,bottom:0},diagramPadding:8,htmlLabels:null,nodeSpacing:50,rankSpacing:50,curve:"basis",padding:15,defaultRenderer:"dagre-wrapper",wrappingWidth:200,inheritDir:!1},swimlane:{useMaxWidth:!0,lineHops:"arc",ignoreCrossLaneEdges:!0,optimizeRanksByCrossings:!0,automaticLaneOrdering:!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,hierarchicalNamespaces:!0},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,donutHole:0,legendPosition:"right",highlightSlice:""},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,showDataLabelOutsideBar:!1,showTitle:!0,showLegend:!0,legendFontSize:14,legendPadding:10,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,labelRotation:0},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,labelRotation:0},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"},ishikawa:{useMaxWidth:!0,diagramPadding:20},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:"",nodeWidth:10,nodePadding:12,labelStyle:"legacy"},block:{useMaxWidth:!0,padding:8},packet:{useMaxWidth:!0,rowHeight:32,bitWidth:32,bitsPerRow:32,showBits:!0,paddingX:5,paddingY:5},treeView:{useMaxWidth:!0,rowIndent:10,paddingX:5,paddingY:5,lineThickness:1,showIcons:!1,defaultIconPack:"",filenameIcons:{},extensionIcons:{}},architecture:{useMaxWidth:!0,padding:40,iconSize:80,fontSize:16,randomize:!1,nodeSeparation:75,idealEdgeLengthMultiplier:1.5,edgeElasticity:.45,numIter:2500,seed:1},eventmodeling:{useMaxWidth:!0,padding:30,rowHeight:32},radar:{useMaxWidth:!0,width:600,height:600,marginTop:50,marginRight:50,marginBottom:50,marginLeft:50,axisScaleFactor:1,axisLabelFactor:1.05,curveTension:.17},venn:{useMaxWidth:!0,width:800,height:450,padding:8,useDebugLayout:!1},cynefin:{useMaxWidth:!0,width:800,height:600,padding:40,showDomainDescriptions:!0,boundaryAmplitude:8,seed:0},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}});var eX,tX,rX,hr,Ni=F(()=>{"use strict";Ck();Jj();eX={...aa,deterministicIDSeed:void 0,elk:{mergeEdges:!1,nodePlacementStrategy:"BRANDES_KOEPF",nodePlacementAlignment:"NONE",forceNodeModelOrder:!1,considerModelOrder:"NODES_AND_EDGES",keepEntryNodeOnTop:!1},themeCSS:void 0,themeVariables:Oo.default.getThemeVariables(),sequence:{...aa.sequence,messageFont:s(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont"),noteFont:s(function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},"noteFont"),actorFont:s(function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}},"actorFont")},class:{defaultRenderer:"dagre-wrapper",hideEmptyMembersBox:!1,hierarchicalNamespaces:!0},gantt:{...aa.gantt,tickInterval:void 0,useWidth:void 0},c4:{...aa.c4,useWidth:void 0,personFont:s(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},"personFont"),flowchart:{...aa.flowchart,inheritDir:!1},external_personFont:s(function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},"external_personFont"),systemFont:s(function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},"systemFont"),external_systemFont:s(function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},"external_systemFont"),system_dbFont:s(function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},"system_dbFont"),external_system_dbFont:s(function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},"external_system_dbFont"),system_queueFont:s(function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},"system_queueFont"),external_system_queueFont:s(function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},"external_system_queueFont"),containerFont:s(function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},"containerFont"),external_containerFont:s(function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},"external_containerFont"),container_dbFont:s(function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},"container_dbFont"),external_container_dbFont:s(function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},"external_container_dbFont"),container_queueFont:s(function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},"container_queueFont"),external_container_queueFont:s(function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},"external_container_queueFont"),componentFont:s(function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},"componentFont"),external_componentFont:s(function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},"external_componentFont"),component_dbFont:s(function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},"component_dbFont"),external_component_dbFont:s(function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},"external_component_dbFont"),component_queueFont:s(function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},"component_queueFont"),external_component_queueFont:s(function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},"external_component_queueFont"),boundaryFont:s(function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},"boundaryFont"),messageFont:s(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont")},pie:{...aa.pie,useWidth:984},xyChart:{...aa.xyChart,useWidth:void 0},requirement:{...aa.requirement,useWidth:void 0},packet:{...aa.packet},eventmodeling:{...aa.eventmodeling},treeView:{...aa.treeView,useWidth:void 0},radar:{...aa.radar},railroad:{...aa.railroad,fontSize:void 0,fontFamily:void 0,terminalFill:void 0,terminalStroke:void 0,terminalTextColor:void 0,nonTerminalFill:void 0,nonTerminalStroke:void 0,nonTerminalTextColor:void 0,lineColor:void 0,markerFill:void 0,commentFill:void 0,commentStroke:void 0,commentTextColor:void 0,specialFill:void 0,specialStroke:void 0,ruleNameColor:void 0},ishikawa:{...aa.ishikawa},sankey:{...aa.sankey,nodeColors:void 0},treemap:{useMaxWidth:!0,padding:10,diagramPadding:8,showValues:!0,nodeWidth:100,nodeHeight:40,borderWidth:1,valueFontSize:12,labelFontSize:14,valueFormat:","},venn:{...aa.venn},cynefin:{...aa.cynefin}},tX=s((e,t="")=>Object.keys(e).reduce((r,n)=>Array.isArray(e[n])?r:typeof e[n]=="object"&&e[n]!==null?[...r,t+n,...tX(e[n],"")]:[...r,t+n],[]),"keyify"),rX=new Set(tX(eX,"")),hr=eX});var cPe,uPe,Zg,RL,kk=F(()=>{"use strict";Ni();Tt();cPe={nodeColors:/^#[\da-f]{3,8}$|^rgb\([\d\s%,.]+\)$|^hsl\([\d\s%,.]+\)$|^[a-z]+$/i,filenameIcons:/^[\w-]+(?::[\w-]+)?$/,extensionIcons:/^[\w-]+(?::[\w-]+)?$/},uPe=s((e,t)=>{for(let r of Object.keys(e)){let n=e[r];(r.startsWith("__")||r.includes("proto")||r.includes("constr")||typeof n!="string"||!t.test(n))&&(te.debug("sanitize deleting dictionary entry:",r,n),delete e[r])}},"sanitizeDictionaryConfig"),Zg=s(e=>{if(te.debug("sanitizeDirective called with",e),!(typeof e!="object"||e==null)){if(Array.isArray(e)){e.forEach(t=>Zg(t));return}for(let t of Object.keys(e)){if(te.debug("Checking key",t),t.startsWith("__")||t.includes("proto")||t.includes("constr")||!rX.has(t)||e[t]==null){te.debug("sanitize deleting key: ",t),delete e[t];continue}if(typeof e[t]=="object"){let n=cPe[t];n?uPe(e[t],n):(te.debug("sanitizing object",t),Zg(e[t]));continue}let r=["themeCSS","fontFamily","altFontFamily"];for(let n of r)t.includes(n)&&(te.debug("sanitizing css option",t),e[t]=RL(e[t]))}if(e.themeVariables)for(let t of Object.keys(e.themeVariables)){let r=e.themeVariables[t];r?.match&&!r.match(/^[\d "#%(),.;A-Za-z]+$/)&&(e.themeVariables[t]="")}te.debug("After sanitization",e)}},"sanitizeDirective"),RL=s(e=>{let t=0,r=0;for(let n of e){if(t{"use strict";Xg();Tt();Ck();Ni();kk();zh=Object.freeze(hr),sa=s(e=>!(e===!1||["false","null","0"].includes(String(e).trim().toLowerCase())),"evaluate"),Ns=Gn({},zh),np=[],Qv=Gn({},zh),Sk=s((e,t)=>{let r=Gn({},e),n={};for(let i of t)sX(i),n=Gn(n,i);if(r=Gn(r,n),n.theme&&n.theme in Oo){let i=Gn({},wk),a=Gn(i.themeVariables||{},n.themeVariables);r.theme&&r.theme in Oo&&(r.themeVariables=Oo[r.theme].getThemeVariables(a))}return Qv=r,cX(Qv),Qv},"updateCurrentConfig"),_L=s(e=>(Ns=Gn({},zh),Ns=Gn(Ns,e),e.theme&&Oo[e.theme]&&(Ns.themeVariables=Oo[e.theme].getThemeVariables(e.themeVariables)),Sk(Ns,np),Ns),"setSiteConfig"),iX=s(e=>{wk=Gn({},e)},"saveConfigFromInitialize"),aX=s(e=>(Ns=Gn(Ns,e),Sk(Ns,np),Ns),"updateSiteConfig"),LL=s(()=>Gn({},Ns),"getSiteConfig"),Ek=s(e=>(cX(e),Gn(Qv,e),Lt()),"setConfig"),Lt=s(()=>Gn({},Qv),"getConfig"),sX=s(e=>{e&&(["secure",...Ns.secure??[]].forEach(t=>{Object.hasOwn(e,t)&&(te.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"&&sX(e[t])}))},"sanitize"),oX=s(e=>{Zg(e),e.fontFamily&&!e.themeVariables?.fontFamily&&(e.themeVariables={...e.themeVariables,fontFamily:e.fontFamily}),np.push(e),Sk(Ns,np)},"addDirective"),Jv=s((e=Ns)=>{np=[],Sk(e,np)},"reset"),hPe={LAZY_LOAD_DEPRECATED:"The configuration options lazyLoadedDiagrams and loadExternalDiagramsAtStartup are deprecated. Please use registerExternalDiagrams instead.",FLOWCHART_HTML_LABELS_DEPRECATED:"flowchart.htmlLabels is deprecated. Please use global htmlLabels instead."},nX={},lX=s(e=>{nX[e]||(te.warn(hPe[e]),nX[e]=!0)},"issueWarning"),cX=s(e=>{e&&(e.lazyLoadedDiagrams||e.loadExternalDiagramsAtStartup)&&lX("LAZY_LOAD_DEPRECATED")},"checkConfig"),Ak=s(()=>{let e={};wk&&(e=Gn(e,wk));for(let t of np)e=Gn(e,t);return e},"getUserDefinedConfig"),Yn=s(e=>(e.flowchart?.htmlLabels!=null&&lX("FLOWCHART_HTML_LABELS_DEPRECATED"),sa(e.htmlLabels??e.flowchart?.htmlLabels??!0)),"getEffectiveHtmlLabels")});function ss(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i2&&arguments[2]!==void 0?arguments[2]:_k;uX&&uX(e,null);let n=t.length;for(;n--;){let i=t[n];if(typeof i=="string"){let a=r(i);a!==i&&(dPe(t)||(t[n]=a),i=a)}e[i]=!0}return e}function bPe(e){for(let t=0;t0&&arguments[0]!==void 0?arguments[0]:DPe(),t=s(Ct=>TX(Ct),"DOMPurify");if(t.version="3.4.0",t.removed=[],!e||!e.document||e.document.nodeType!==ix.document||!e.Element)return t.isSupported=!1,t;let{document:r}=e,n=r,i=n.currentScript,{DocumentFragment:a,HTMLTemplateElement:o,Node:l,Element:u,NodeFilter:h,NamedNodeMap:d=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:f,DOMParser:p,trustedTypes:m}=e,g=u.prototype,y=nx(g,"cloneNode"),v=nx(g,"remove"),x=nx(g,"nextSibling"),b=nx(g,"childNodes"),T=nx(g,"parentNode");if(typeof o=="function"){let Ct=r.createElement("template");Ct.content&&Ct.content.ownerDocument&&(r=Ct.content.ownerDocument)}let w,C="",{implementation:k,createNodeIterator:S,createDocumentFragment:A,getElementsByTagName:M}=r,{importNode:N}=n,D=yX();t.isSupported=typeof vX=="function"&&typeof T=="function"&&k&&k.createHTMLDocument!==void 0;let{MUSTACHE_EXPR:R,ERB_EXPR:E,TMPLIT_EXPR:I,DATA_ATTR:L,ARIA_ATTR:P,IS_SCRIPT_OR_DATA:B,ATTR_WHITESPACE:O,CUSTOM_ELEMENT:$}=gX,{IS_ALLOWED_URI:G}=gX,V=null,z=Yr({},[...dX,...ML,...NL,...PL,...fX]),W=null,H=Yr({},[...pX,...OL,...mX,...Rk]),j=Object.seal(ax(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}})),Q=null,U=null,ue=Object.seal(ax(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}})),J=!0,he=!0,se=!1,oe=!0,Se=!1,xe=!0,Ne=!1,Ye=!1,We=!1,pe=!1,_e=!1,Ee=!1,Re=!0,Z=!1,ae="user-content-",ie=!0,le=!1,ve={},ne=null,Me=Yr({},["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"]),re=null,ce=Yr({},["audio","video","img","source","image","track"]),q=null,de=Yr({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),X="http://www.w3.org/1998/Math/MathML",ye="http://www.w3.org/2000/svg",K="http://www.w3.org/1999/xhtml",Ge=K,Ae=!1,$e=null,Oe=Yr({},[X,ye,K],DL),at=Yr({},["mi","mo","mn","ms","mtext"]),Pe=Yr({},["annotation-xml"]),Ke=Yr({},["title","style","font","a","script"]),qe=null,Be=["application/xhtml+xml","text/html"],Xe="text/html",be=null,vt=null,ke=r.createElement("form"),It=s(function(Ie){return Ie instanceof RegExp||Ie instanceof Function},"isRegexOrFunction"),Ft=s(function(){let Ie=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(vt&&vt===Ie)){if((!Ie||typeof Ie!="object")&&(Ie={}),Ie=tc(Ie),qe=Be.indexOf(Ie.PARSER_MEDIA_TYPE)===-1?Xe:Ie.PARSER_MEDIA_TYPE,be=qe==="application/xhtml+xml"?DL:_k,V=fl(Ie,"ALLOWED_TAGS")?Yr({},Ie.ALLOWED_TAGS,be):z,W=fl(Ie,"ALLOWED_ATTR")?Yr({},Ie.ALLOWED_ATTR,be):H,$e=fl(Ie,"ALLOWED_NAMESPACES")?Yr({},Ie.ALLOWED_NAMESPACES,DL):Oe,q=fl(Ie,"ADD_URI_SAFE_ATTR")?Yr(tc(de),Ie.ADD_URI_SAFE_ATTR,be):de,re=fl(Ie,"ADD_DATA_URI_TAGS")?Yr(tc(ce),Ie.ADD_DATA_URI_TAGS,be):ce,ne=fl(Ie,"FORBID_CONTENTS")?Yr({},Ie.FORBID_CONTENTS,be):Me,Q=fl(Ie,"FORBID_TAGS")?Yr({},Ie.FORBID_TAGS,be):tc({}),U=fl(Ie,"FORBID_ATTR")?Yr({},Ie.FORBID_ATTR,be):tc({}),ve=fl(Ie,"USE_PROFILES")?Ie.USE_PROFILES:!1,J=Ie.ALLOW_ARIA_ATTR!==!1,he=Ie.ALLOW_DATA_ATTR!==!1,se=Ie.ALLOW_UNKNOWN_PROTOCOLS||!1,oe=Ie.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Se=Ie.SAFE_FOR_TEMPLATES||!1,xe=Ie.SAFE_FOR_XML!==!1,Ne=Ie.WHOLE_DOCUMENT||!1,pe=Ie.RETURN_DOM||!1,_e=Ie.RETURN_DOM_FRAGMENT||!1,Ee=Ie.RETURN_TRUSTED_TYPE||!1,We=Ie.FORCE_BODY||!1,Re=Ie.SANITIZE_DOM!==!1,Z=Ie.SANITIZE_NAMED_PROPS||!1,ie=Ie.KEEP_CONTENT!==!1,le=Ie.IN_PLACE||!1,G=Ie.ALLOWED_URI_REGEXP||xX,Ge=Ie.NAMESPACE||K,at=Ie.MATHML_TEXT_INTEGRATION_POINTS||at,Pe=Ie.HTML_INTEGRATION_POINTS||Pe,j=Ie.CUSTOM_ELEMENT_HANDLING||ax(null),Ie.CUSTOM_ELEMENT_HANDLING&&It(Ie.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(j.tagNameCheck=Ie.CUSTOM_ELEMENT_HANDLING.tagNameCheck),Ie.CUSTOM_ELEMENT_HANDLING&&It(Ie.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(j.attributeNameCheck=Ie.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),Ie.CUSTOM_ELEMENT_HANDLING&&typeof Ie.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(j.allowCustomizedBuiltInElements=Ie.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Se&&(he=!1),_e&&(pe=!0),ve&&(V=Yr({},fX),W=ax(null),ve.html===!0&&(Yr(V,dX),Yr(W,pX)),ve.svg===!0&&(Yr(V,ML),Yr(W,OL),Yr(W,Rk)),ve.svgFilters===!0&&(Yr(V,NL),Yr(W,OL),Yr(W,Rk)),ve.mathMl===!0&&(Yr(V,PL),Yr(W,mX),Yr(W,Rk))),ue.tagCheck=null,ue.attributeCheck=null,Ie.ADD_TAGS&&(typeof Ie.ADD_TAGS=="function"?ue.tagCheck=Ie.ADD_TAGS:(V===z&&(V=tc(V)),Yr(V,Ie.ADD_TAGS,be))),Ie.ADD_ATTR&&(typeof Ie.ADD_ATTR=="function"?ue.attributeCheck=Ie.ADD_ATTR:(W===H&&(W=tc(W)),Yr(W,Ie.ADD_ATTR,be))),Ie.ADD_URI_SAFE_ATTR&&Yr(q,Ie.ADD_URI_SAFE_ATTR,be),Ie.FORBID_CONTENTS&&(ne===Me&&(ne=tc(ne)),Yr(ne,Ie.FORBID_CONTENTS,be)),Ie.ADD_FORBID_CONTENTS&&(ne===Me&&(ne=tc(ne)),Yr(ne,Ie.ADD_FORBID_CONTENTS,be)),ie&&(V["#text"]=!0),Ne&&Yr(V,["html","head","body"]),V.table&&(Yr(V,["tbody"]),delete Q.tbody),Ie.TRUSTED_TYPES_POLICY){if(typeof Ie.TRUSTED_TYPES_POLICY.createHTML!="function")throw rx('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof Ie.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw rx('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');w=Ie.TRUSTED_TYPES_POLICY,C=w.createHTML("")}else w===void 0&&(w=IPe(m,i)),w!==null&&typeof C=="string"&&(C=w.createHTML(""));as&&as(Ie),vt=Ie}},"_parseConfig"),yt=Yr({},[...ML,...NL,...TPe]),Et=Yr({},[...PL,...CPe]),gt=s(function(Ie){let it=T(Ie);(!it||!it.tagName)&&(it={namespaceURI:Ge,tagName:"template"});let Ve=_k(Ie.tagName),Ze=_k(it.tagName);return $e[Ie.namespaceURI]?Ie.namespaceURI===ye?it.namespaceURI===K?Ve==="svg":it.namespaceURI===X?Ve==="svg"&&(Ze==="annotation-xml"||at[Ze]):!!yt[Ve]:Ie.namespaceURI===X?it.namespaceURI===K?Ve==="math":it.namespaceURI===ye?Ve==="math"&&Pe[Ze]:!!Et[Ve]:Ie.namespaceURI===K?it.namespaceURI===ye&&!Pe[Ze]||it.namespaceURI===X&&!at[Ze]?!1:!Et[Ve]&&(Ke[Ve]||!yt[Ve]):!!(qe==="application/xhtml+xml"&&$e[Ie.namespaceURI]):!1},"_checkValidNamespace"),ge=s(function(Ie){tx(t.removed,{element:Ie});try{T(Ie).removeChild(Ie)}catch{v(Ie)}},"_forceRemove"),nt=s(function(Ie,it){try{tx(t.removed,{attribute:it.getAttributeNode(Ie),from:it})}catch{tx(t.removed,{attribute:null,from:it})}if(it.removeAttribute(Ie),Ie==="is")if(pe||_e)try{ge(it)}catch{}else try{it.setAttribute(Ie,"")}catch{}},"_removeAttribute"),pt=s(function(Ie){let it=null,Ve=null;if(We)Ie=""+Ie;else{let Ut=IL(Ie,/^[\r\n\t ]+/);Ve=Ut&&Ut[0]}qe==="application/xhtml+xml"&&Ge===K&&(Ie=''+Ie+"");let Ze=w?w.createHTML(Ie):Ie;if(Ge===K)try{it=new p().parseFromString(Ze,qe)}catch{}if(!it||!it.documentElement){it=k.createDocument(Ge,"template",null);try{it.documentElement.innerHTML=Ae?C:Ze}catch{}}let bt=it.body||it.documentElement;return Ie&&Ve&&bt.insertBefore(r.createTextNode(Ve),bt.childNodes[0]||null),Ge===K?M.call(it,Ne?"html":"body")[0]:Ne?it.documentElement:bt},"_initDocument"),Qe=s(function(Ie){return S.call(Ie.ownerDocument||Ie,Ie,h.SHOW_ELEMENT|h.SHOW_COMMENT|h.SHOW_TEXT|h.SHOW_PROCESSING_INSTRUCTION|h.SHOW_CDATA_SECTION,null)},"_createNodeIterator"),we=s(function(Ie){return Ie instanceof f&&(typeof Ie.nodeName!="string"||typeof Ie.textContent!="string"||typeof Ie.removeChild!="function"||!(Ie.attributes instanceof d)||typeof Ie.removeAttribute!="function"||typeof Ie.setAttribute!="function"||typeof Ie.namespaceURI!="string"||typeof Ie.insertBefore!="function"||typeof Ie.hasChildNodes!="function")},"_isClobbered"),tt=s(function(Ie){return typeof l=="function"&&Ie instanceof l},"_isNode");function st(Ct,Ie,it){ex(Ct,Ve=>{Ve.call(t,Ie,it,vt)})}s(st,"_executeHooks");let mt=s(function(Ie){let it=null;if(st(D.beforeSanitizeElements,Ie,null),we(Ie))return ge(Ie),!0;let Ve=be(Ie.nodeName);if(st(D.uponSanitizeElement,Ie,{tagName:Ve,allowedTags:V}),xe&&Ie.hasChildNodes()&&!tt(Ie.firstElementChild)&&is(/<[/\w!]/g,Ie.innerHTML)&&is(/<[/\w!]/g,Ie.textContent)||xe&&Ie.namespaceURI===K&&Ve==="style"&&tt(Ie.firstElementChild)||Ie.nodeType===ix.progressingInstruction||xe&&Ie.nodeType===ix.comment&&is(/<[/\w]/g,Ie.data))return ge(Ie),!0;if(Q[Ve]||!(ue.tagCheck instanceof Function&&ue.tagCheck(Ve))&&!V[Ve]){if(!Q[Ve]&&Gt(Ve)&&(j.tagNameCheck instanceof RegExp&&is(j.tagNameCheck,Ve)||j.tagNameCheck instanceof Function&&j.tagNameCheck(Ve)))return!1;if(ie&&!ne[Ve]){let Ze=T(Ie)||Ie.parentNode,bt=b(Ie)||Ie.childNodes;if(bt&&Ze){let Ut=bt.length;for(let ir=Ut-1;ir>=0;--ir){let Yt=y(bt[ir],!0);Yt.__removalCount=(Ie.__removalCount||0)+1,Ze.insertBefore(Yt,x(Ie))}}}return ge(Ie),!0}return Ie instanceof u&&!gt(Ie)||(Ve==="noscript"||Ve==="noembed"||Ve==="noframes")&&is(/<\/no(script|embed|frames)/i,Ie.innerHTML)?(ge(Ie),!0):(Se&&Ie.nodeType===ix.text&&(it=Ie.textContent,ex([R,E,I],Ze=>{it=Qg(it,Ze," ")}),Ie.textContent!==it&&(tx(t.removed,{element:Ie.cloneNode()}),Ie.textContent=it)),st(D.afterSanitizeElements,Ie,null),!1)},"_sanitizeElements"),Bt=s(function(Ie,it,Ve){if(U[it]||Re&&(it==="id"||it==="name")&&(Ve in r||Ve in ke))return!1;if(!(he&&!U[it]&&is(L,it))){if(!(J&&is(P,it))){if(!(ue.attributeCheck instanceof Function&&ue.attributeCheck(it,Ie))){if(!W[it]||U[it]){if(!(Gt(Ie)&&(j.tagNameCheck instanceof RegExp&&is(j.tagNameCheck,Ie)||j.tagNameCheck instanceof Function&&j.tagNameCheck(Ie))&&(j.attributeNameCheck instanceof RegExp&&is(j.attributeNameCheck,it)||j.attributeNameCheck instanceof Function&&j.attributeNameCheck(it,Ie))||it==="is"&&j.allowCustomizedBuiltInElements&&(j.tagNameCheck instanceof RegExp&&is(j.tagNameCheck,Ve)||j.tagNameCheck instanceof Function&&j.tagNameCheck(Ve))))return!1}else if(!q[it]){if(!is(G,Qg(Ve,O,""))){if(!((it==="src"||it==="xlink:href"||it==="href")&&Ie!=="script"&&yPe(Ve,"data:")===0&&re[Ie])){if(!(se&&!is(B,Qg(Ve,O,"")))){if(Ve)return!1}}}}}}}return!0},"_isValidAttribute"),Gt=s(function(Ie){return Ie!=="annotation-xml"&&IL(Ie,$)},"_isBasicCustomElement"),Xt=s(function(Ie){st(D.beforeSanitizeAttributes,Ie,null);let{attributes:it}=Ie;if(!it||we(Ie))return;let Ve={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:W,forceKeepAttr:void 0},Ze=it.length;for(;Ze--;){let bt=it[Ze],{name:Ut,namespaceURI:ir,value:Yt}=bt,zr=be(Ut),wr=Yt,At=Ut==="value"?wr:vPe(wr);if(Ve.attrName=zr,Ve.attrValue=At,Ve.keepAttr=!0,Ve.forceKeepAttr=void 0,st(D.uponSanitizeAttribute,Ie,Ve),At=Ve.attrValue,Z&&(zr==="id"||zr==="name")&&(nt(Ut,Ie),At=ae+At),xe&&is(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,At)){nt(Ut,Ie);continue}if(zr==="attributename"&&IL(At,"href")){nt(Ut,Ie);continue}if(Ve.forceKeepAttr)continue;if(!Ve.keepAttr){nt(Ut,Ie);continue}if(!oe&&is(/\/>/i,At)){nt(Ut,Ie);continue}Se&&ex([R,E,I],Ot=>{At=Qg(At,Ot," ")});let kt=be(Ie.nodeName);if(!Bt(kt,zr,At)){nt(Ut,Ie);continue}if(w&&typeof m=="object"&&typeof m.getAttributeType=="function"&&!ir)switch(m.getAttributeType(kt,zr)){case"TrustedHTML":{At=w.createHTML(At);break}case"TrustedScriptURL":{At=w.createScriptURL(At);break}}if(At!==wr)try{ir?Ie.setAttributeNS(ir,Ut,At):Ie.setAttribute(Ut,At),we(Ie)?ge(Ie):hX(t.removed)}catch{nt(Ut,Ie)}}st(D.afterSanitizeAttributes,Ie,null)},"_sanitizeAttributes"),rr=s(function(Ie){let it=null,Ve=Qe(Ie);for(st(D.beforeSanitizeShadowDOM,Ie,null);it=Ve.nextNode();)st(D.uponSanitizeShadowNode,it,null),mt(it),Xt(it),it.content instanceof a&&rr(it.content);st(D.afterSanitizeShadowDOM,Ie,null)},"_sanitizeShadowDOM");return t.sanitize=function(Ct){let Ie=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},it=null,Ve=null,Ze=null,bt=null;if(Ae=!Ct,Ae&&(Ct=""),typeof Ct!="string"&&!tt(Ct))if(typeof Ct.toString=="function"){if(Ct=Ct.toString(),typeof Ct!="string")throw rx("dirty is not a string, aborting")}else throw rx("toString is not a function");if(!t.isSupported)return Ct;if(Ye||Ft(Ie),t.removed=[],typeof Ct=="string"&&(le=!1),le){if(Ct.nodeName){let Yt=be(Ct.nodeName);if(!V[Yt]||Q[Yt])throw rx("root node is forbidden and cannot be sanitized in-place")}}else if(Ct instanceof l)it=pt(""),Ve=it.ownerDocument.importNode(Ct,!0),Ve.nodeType===ix.element&&Ve.nodeName==="BODY"||Ve.nodeName==="HTML"?it=Ve:it.appendChild(Ve);else{if(!pe&&!Se&&!Ne&&Ct.indexOf("<")===-1)return w&&Ee?w.createHTML(Ct):Ct;if(it=pt(Ct),!it)return pe?null:Ee?C:""}it&&We&&ge(it.firstChild);let Ut=Qe(le?Ct:it);for(;Ze=Ut.nextNode();)mt(Ze),Xt(Ze),Ze.content instanceof a&&rr(Ze.content);if(le)return Ct;if(pe){if(Se){it.normalize();let Yt=it.innerHTML;ex([R,E,I],zr=>{Yt=Qg(Yt,zr," ")}),it.innerHTML=Yt}if(_e)for(bt=A.call(it.ownerDocument);it.firstChild;)bt.appendChild(it.firstChild);else bt=it;return(W.shadowroot||W.shadowrootmode)&&(bt=N.call(n,bt,!0)),bt}let ir=Ne?it.outerHTML:it.innerHTML;return Ne&&V["!doctype"]&&it.ownerDocument&&it.ownerDocument.doctype&&it.ownerDocument.doctype.name&&is(bX,it.ownerDocument.doctype.name)&&(ir=" +`+ir),Se&&ex([R,E,I],Yt=>{ir=Qg(ir,Yt," ")}),w&&Ee?w.createHTML(ir):ir},t.setConfig=function(){let Ct=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Ft(Ct),Ye=!0},t.clearConfig=function(){vt=null,Ye=!1},t.isValidAttribute=function(Ct,Ie,it){vt||Ft({});let Ve=be(Ct),Ze=be(Ie);return Bt(Ve,Ze,it)},t.addHook=function(Ct,Ie){typeof Ie=="function"&&tx(D[Ct],Ie)},t.removeHook=function(Ct,Ie){if(Ie!==void 0){let it=mPe(D[Ct],Ie);return it===-1?void 0:gPe(D[Ct],it,1)[0]}return hX(D[Ct])},t.removeHooks=function(Ct){D[Ct]=[]},t.removeAllHooks=function(){D=yX()},t}var vX,uX,dPe,fPe,pPe,as,Bo,ax,BL,$L,ex,mPe,hX,tx,gPe,_k,DL,IL,Qg,yPe,vPe,fl,is,rx,dX,ML,NL,TPe,PL,CPe,fX,pX,OL,mX,Rk,kPe,wPe,SPe,EPe,APe,xX,RPe,_Pe,bX,LPe,gX,ix,DPe,IPe,yX,Ps,Jg=F(()=>{"use strict";({entries:vX,setPrototypeOf:uX,isFrozen:dPe,getPrototypeOf:fPe,getOwnPropertyDescriptor:pPe}=Object),{freeze:as,seal:Bo,create:ax}=Object,{apply:BL,construct:$L}=typeof Reflect<"u"&&Reflect;as||(as=s(function(t){return t},"freeze"));Bo||(Bo=s(function(t){return t},"seal"));BL||(BL=s(function(t,r){for(var n=arguments.length,i=new Array(n>2?n-2:0),a=2;a1?r-1:0),i=1;i/gm),SPe=Bo(/\$\{[\w\W]*/gm),EPe=Bo(/^data-[\-\w.\u00B7-\uFFFF]+$/),APe=Bo(/^aria-[\-\w]+$/),xX=Bo(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),RPe=Bo(/^(?:\w+script|data):/i),_Pe=Bo(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),bX=Bo(/^html$/i),LPe=Bo(/^[a-z][.\w]*(-[.\w]+)+$/i),gX=Object.freeze({__proto__:null,ARIA_ATTR:APe,ATTR_WHITESPACE:_Pe,CUSTOM_ELEMENT:LPe,DATA_ATTR:EPe,DOCTYPE_NAME:bX,ERB_EXPR:wPe,IS_ALLOWED_URI:xX,IS_SCRIPT_OR_DATA:RPe,MUSTACHE_EXPR:kPe,TMPLIT_EXPR:SPe}),ix={element:1,text:3,progressingInstruction:7,comment:8,document:9},DPe=s(function(){return typeof window>"u"?null:window},"getGlobal"),IPe=s(function(t,r){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let n=null,i="data-tt-policy-suffix";r&&r.hasAttribute(i)&&(n=r.getAttribute(i));let a="dompurify"+(n?"#"+n:"");try{return t.createPolicy(a,{createHTML(o){return o},createScriptURL(o){return o}})}catch{return console.warn("TrustedTypes policy "+a+" could not be created."),null}},"_createTrustedTypesPolicy"),yX=s(function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},"_createHooksMap");s(TX,"createDOMPurify");Ps=TX()});var nZ={};ar(nZ,{ParseError:()=>Pt,SETTINGS_SCHEMA:()=>Vk,__defineFunction:()=>qt,__defineMacro:()=>Te,__defineSymbol:()=>Y,__domTree:()=>rZ,__parse:()=>QK,__renderToDomTree:()=>cw,__renderToHTMLTree:()=>eZ,__setFontMetrics:()=>lK,default:()=>T9e,render:()=>MD,renderToString:()=>ZK,version:()=>tZ});function FPe(e){if(typeof e!="string")return e.enum[0];switch(e){case"boolean":return!1;case"string":return"";case"number":return 0;case"object":return{};default:throw new Error("Unexpected schema type; settings must declare an explicit default.")}}function GPe(e){if(e.default!==void 0)return e.default;var t=Array.isArray(e.type)?e.type[0]:e.type;return FPe(t)}function zPe(e,t,r,n){var i=r[t];e[t]=i!==void 0?n.processor?n.processor(i):i:GPe(n)}function jPe(e){for(var t=0;t=i[0]&&e<=i[1])return r.name}return null}function nK(e){for(var t=0;t=zk[t]&&e<=zk[t+1])return!0;return!1}function aOe(e){return"toText"in e}function cOe(e){if(e instanceof cs)return e;throw new Error("Expected symbolNode but got "+String(e)+".")}function uOe(e){if(e instanceof Uh)return e;throw new Error("Expected span but got "+String(e)+".")}function lK(e,t){ic[e]=t}function TD(e,t,r){if(!ic[t])throw new Error("Font metrics not found for font: "+t+".");var n=e.charCodeAt(0),i=ic[t][n];if(!i&&e[0]in kX&&(n=kX[e[0]].charCodeAt(0),i=ic[t][n]),!i&&r==="text"&&nK(n)&&(i=ic[t][77]),i)return{depth:i[0],height:i[1],italic:i[2],skew:i[3],width:i[4]}}function dOe(e){var t;if(e>=5?t=0:e>=3?t=1:t=2,!FL[t]){var r=FL[t]={cssEmPerMu:Lk.quad[t]/18};for(var n in Lk)Lk.hasOwnProperty(n)&&(r[n]=Lk[n][t])}return FL[t]}function Y(e,t,r,n,i,a){ei[e][i]={font:t,group:r,replace:n},a&&n&&(ei[e][n]=ei[e][i])}function qt(e){for(var{type:t,names:r,props:n,handler:i,htmlBuilder:a,mathmlBuilder:o}=e,l={type:t,numArgs:n.numArgs,argTypes:n.argTypes,allowedInArgument:!!n.allowedInArgument,allowedInText:!!n.allowedInText,allowedInMath:n.allowedInMath===void 0?!0:n.allowedInMath,numOptionalArgs:n.numOptionalArgs||0,infix:!!n.infix,primitive:!!n.primitive,handler:i},u=0;u0&&(a.push(Ok(o,t)),o=[]),a.push(n[l]));o.length>0&&a.push(Ok(o,t));var h;r?(h=Ok(ji(r,t,!0),t),h.classes=["tag"],a.push(h)):i&&a.push(i);var d=Mt(["katex-html"],a);if(d.setAttribute("aria-hidden","true"),h){var f=h.children[0];f.style.height=$t(d.height+d.depth),d.depth&&(f.style.verticalAlign=$t(-d.depth))}return d}function gK(e){return new qh(e)}function VL(e){if(!e)return!1;if(e.type==="mi"&&e.children.length===1){var t=e.children[0];return t instanceof mi&&t.text==="."}else if(e.type==="mo"&&e.children.length===1&&e.getAttribute("separator")==="true"&&e.getAttribute("lspace")==="0em"&&e.getAttribute("rspace")==="0em"){var r=e.children[0];return r instanceof mi&&r.text===","}else return!1}function MX(e,t,r,n,i){var a=mo(e,r),o;a.length===1&&a[0]instanceof Nt&&AOe.has(a[0].type)?o=a[0]:o=new Nt("mrow",a);var l=new Nt("annotation",[new mi(t)]);l.setAttribute("encoding","application/x-tex");var u=new Nt("semantics",[o,l]),h=new Nt("math",[u]);h.setAttribute("xmlns","http://www.w3.org/1998/Math/MathML"),n&&h.setAttribute("display","block");var d=i?"katex":"katex-mathml";return Mt([d],[h])}function $Oe(e){return e in OOe}function Vr(e,t){if(!e||e.type!==t)throw new Error("Expected node of type "+t+", but got "+(e?"node of type "+e.type:String(e)));return e}function rw(e){var t=nw(e);if(!t)throw new Error("Expected node of symbol group type, but got "+(e?"node of type "+e.type:String(e)));return t}function nw(e){return e&&(e.type==="atom"||BOe.hasOwnProperty(e.type))?e:null}function TK(e,t){var r=ji(e.body,t,!0);return Mt([e.mclass],r,t)}function CK(e,t){var r,n=mo(e.body,t);return e.mclass==="minner"?r=new Nt("mpadded",n):e.mclass==="mord"?e.isCharacterBox?(r=n[0],r.type="mi"):r=new Nt("mi",n):(e.isCharacterBox?(r=n[0],r.type="mo"):r=new Nt("mo",n),e.mclass==="mbin"?(r.attributes.lspace="0.22em",r.attributes.rspace="0.22em"):e.mclass==="mpunct"?(r.attributes.lspace="0em",r.attributes.rspace="0.17em"):e.mclass==="mopen"||e.mclass==="mclose"?(r.attributes.lspace="0em",r.attributes.rspace="0em"):e.mclass==="minner"&&(r.attributes.lspace="0.0556em",r.attributes.width="+0.1111em")),r}function VOe(e,t,r){var n=GOe[e];switch(n){case"\\\\cdrightarrow":case"\\\\cdleftarrow":return r.callFunction(n,[t[0]],[t[1]]);case"\\uparrow":case"\\downarrow":{var i=r.callFunction("\\\\cdleft",[t[0]],[]),a={type:"atom",text:n,mode:"math",family:"rel"},o=r.callFunction("\\Big",[a],[]),l=r.callFunction("\\\\cdright",[t[1]],[]),u={type:"ordgroup",mode:"math",body:[i,o,l]};return r.callFunction("\\\\cdparent",[u],[])}case"\\\\cdlongequal":return r.callFunction("\\\\cdlongequal",[],[]);case"\\Vert":{var h={type:"textord",text:"\\Vert",mode:"math"};return r.callFunction("\\Big",[h],[])}default:return{type:"textord",text:" ",mode:"math"}}}function WOe(e){var t=[];for(e.gullet.beginGroup(),e.gullet.macros.set("\\cr","\\\\\\relax"),e.gullet.beginGroup();;){t.push(e.parseExpression(!1,"\\\\")),e.gullet.endGroup(),e.gullet.beginGroup();var r=e.fetch().text;if(r==="&"||r==="\\\\")e.consume();else if(r==="\\end"){t[t.length-1].length===0&&t.pop();break}else throw new Pt("Expected \\\\ or \\cr or \\end",e.nextToken)}for(var n=[],i=[n],a=0;aAV".includes(h))for(var f=0;f<2;f++){for(var p=!0,m=u+1;mAV=|." after @',o[u]);var g=VOe(h,d,e),y={type:"styling",body:[g],mode:"math",style:"display",resetFont:!0};n.push(y),l=OX()}a%2===0?n.push(l):n.shift(),n=[],i.push(n)}e.gullet.endGroup(),e.gullet.endGroup();var v=new Array(i[0].length).fill({type:"align",align:"c",pregap:.25,postgap:.25});return{type:"array",mode:"math",body:i,arraystretch:1,addJot:!0,rowGaps:[null],cols:v,colSeparationType:"CD",hLinesBeforeRow:new Array(i.length+1).fill([])}}function FX(e){return"isMiddle"in e}function aw(e,t){var r=nw(e);if(r&&e9e.has(r.text))return r;throw r?new Pt("Invalid delimiter '"+r.text+"' after '"+t.funcName+"'",e):new Pt("Invalid delimiter type '"+e.type+"'",e)}function GX(e){if(!e.body)throw new Error("Bug: The leftright ParseNode wasn't fully parsed.")}function sc(e){for(var{type:t,names:r,props:n,handler:i,htmlBuilder:a,mathmlBuilder:o}=e,l={type:t,numArgs:n.numArgs||0,allowedInText:!1,numOptionalArgs:0,handler:i},u=0;u1||!d)&&y.pop(),x.length{"use strict";Pt=class e extends Error{static{s(this,"ParseError")}constructor(t,r){var n="KaTeX parse error: "+t,i,a,o=r&&r.loc;if(o&&o.start<=o.end){var l=o.lexer.input;i=o.start,a=o.end,i===l.length?n+=" at end of input: ":n+=" at position "+(i+1)+": ";var u=l.slice(i,a).replace(/[^]/g,"$&\u0332"),h;i>15?h="\u2026"+l.slice(i-15,i):h=l.slice(0,i);var d;a+15e.replace(MPe,"-$1").toLowerCase(),"hyphenate"),PPe={"&":"&",">":">","<":"<",'"':""","'":"'"},OPe=/[&><"']/g,za=s(e=>String(e).replace(OPe,t=>PPe[t]),"escape"),Gk=s(e=>e.type==="ordgroup"||e.type==="color"?e.body.length===1?Gk(e.body[0]):e:e.type==="font"?Gk(e.body):e,"getBaseElem"),BPe=new Set(["mathord","textord","atom"]),ku=s(e=>BPe.has(Gk(e).type),"isCharacterBox"),$Pe=s(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"},"protocolFromUrl"),Vk={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:s(e=>"#"+e,"cliProcessor")},macros:{type:"object",cli:"-m, --macro ",cliDescription:"Define custom macro of the form '\\foo:expansion' (use multiple -m arguments for multiple macros).",cliDefault:[],cliProcessor:s((e,t)=>(t.push(e),t),"cliProcessor")},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:s(e=>Math.max(0,e),"processor"),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:s(e=>Math.max(0,e),"processor"),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:s(e=>Math.max(0,e),"processor"),cli:"-e, --max-expand ",cliProcessor:s(e=>e==="Infinity"?1/0:parseInt(e),"cliProcessor")},globalGroup:{type:"boolean",cli:!1}};s(FPe,"getImplicitDefault");s(GPe,"getDefaultValue");s(zPe,"applySetting");ux=class{static{s(this,"Settings")}constructor(t){t===void 0&&(t={}),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,t=t||{};for(var r of Object.keys(Vk)){var n=Vk[r];n&&zPe(this,r,t,n)}}reportNonstrict(t,r,n){var i=this.strict;if(typeof i=="function"&&(i=i(t,r,n)),!(!i||i==="ignore")){if(i===!0||i==="error")throw new Pt("LaTeX-incompatible input and strict mode is set to 'error': "+(r+" ["+t+"]"),n);i==="warn"?typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(r+" ["+t+"]")):typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+i+"': "+r+" ["+t+"]"))}}useStrictBehavior(t,r,n){var i=this.strict;if(typeof i=="function")try{i=i(t,r,n)}catch{i="error"}return!i||i==="ignore"?!1:i===!0||i==="error"?!0:i==="warn"?(typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(r+" ["+t+"]")),!1):(typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+i+"': "+r+" ["+t+"]")),!1)}isTrusted(t){if("url"in t&&t.url&&!t.protocol){var r=$Pe(t.url);if(r==null)return!1;t.protocol=r}var n=typeof this.trust=="function"?this.trust(t):this.trust;return!!n}},rc=class{static{s(this,"Style")}constructor(t,r,n){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=t,this.size=r,this.cramped=n}sup(){return nc[VPe[this.id]]}sub(){return nc[WPe[this.id]]}fracNum(){return nc[qPe[this.id]]}fracDen(){return nc[HPe[this.id]]}cramp(){return nc[UPe[this.id]]}text(){return nc[YPe[this.id]]}isTight(){return this.size>=2}},xD=0,Wk=1,t0=2,Cu=3,hx=4,$o=5,r0=6,ls=7,nc=[new rc(xD,0,!1),new rc(Wk,0,!0),new rc(t0,1,!1),new rc(Cu,1,!0),new rc(hx,2,!1),new rc($o,2,!0),new rc(r0,3,!1),new rc(ls,3,!0)],VPe=[hx,$o,hx,$o,r0,ls,r0,ls],WPe=[$o,$o,$o,$o,ls,ls,ls,ls],qPe=[t0,Cu,hx,$o,r0,ls,r0,ls],HPe=[Cu,Cu,$o,$o,ls,ls,ls,ls],UPe=[Wk,Wk,Cu,Cu,$o,$o,ls,ls],YPe=[xD,Wk,t0,Cu,t0,Cu,t0,Cu],Pr={DISPLAY:nc[xD],TEXT:nc[t0],SCRIPT:nc[hx],SCRIPTSCRIPT:nc[r0]},JL=[{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]]}];s(jPe,"scriptFromCodepoint");zk=[];JL.forEach(e=>e.blocks.forEach(t=>zk.push(...t)));s(nK,"supportedCodepoint");Yi=s(e=>e+" "+e,"doubleBrushStroke"),e0=80,XPe=s(function(t,r){return"M95,"+(622+t+r)+` +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`+t/2.075+" -"+t+` +c5.3,-9.3,12,-14,20,-14 +H400000v`+(40+t)+`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+t)+" "+r+"h400000v"+(40+t)+"h-400000z"},"sqrtMain"),KPe=s(function(t,r){return"M263,"+(601+t+r)+`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`+t/2.084+" -"+t+` +c4.7,-7.3,11,-11,19,-11 +H40000v`+(40+t)+`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+t)+" "+r+"h400000v"+(40+t)+"h-400000z"},"sqrtSize1"),ZPe=s(function(t,r){return"M983 "+(10+t+r)+` +l`+t/3.13+" -"+t+` +c4,-6.7,10,-10,18,-10 H400000v`+(40+t)+` +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+t)+" "+r+"h400000v"+(40+t)+"h-400000z"},"sqrtSize2"),QPe=s(function(t,r){return"M424,"+(2398+t+r)+` +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`+t/4.223+" -"+t+`c4,-6.7,10,-10,18,-10 H400000 +v`+(40+t)+`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+t)+" "+r+` +h400000v`+(40+t)+"h-400000z"},"sqrtSize3"),JPe=s(function(t,r){return"M473,"+(2713+t+r)+` +c339.3,-1799.3,509.3,-2700,510,-2702 l`+t/5.298+" -"+t+` +c3.3,-7.3,9.3,-11,18,-11 H400000v`+(40+t)+`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+t)+" "+r+"h400000v"+(40+t)+"H1017.7z"},"sqrtSize4"),eOe=s(function(t){var r=t/2;return"M400000 "+t+" H0 L"+r+" 0 l65 45 L145 "+(t-80)+" H400000z"},"phasePath"),tOe=s(function(t,r,n){var i=n-54-r-t;return"M702 "+(t+r)+"H400000"+(40+t)+` +H742v`+i+`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 `+r+"H400000v"+(40+t)+"H742z"},"sqrtTall"),rOe=s(function(t,r,n){r=1e3*r;var i="";switch(t){case"sqrtMain":i=XPe(r,e0);break;case"sqrtSize1":i=KPe(r,e0);break;case"sqrtSize2":i=ZPe(r,e0);break;case"sqrtSize3":i=QPe(r,e0);break;case"sqrtSize4":i=JPe(r,e0);break;case"sqrtTall":i=tOe(r,e0,n)}return i},"sqrtPath"),nOe=s(function(t,r){switch(t){case"\u239C":return Yi("M291 0 H417 V"+r+" H291z");case"\u2223":return Yi("M145 0 H188 V"+r+" H145z");case"\u2225":return Yi("M145 0 H188 V"+r+" H145z")+Yi("M367 0 H410 V"+r+" H367z");case"\u239F":return Yi("M457 0 H583 V"+r+" H457z");case"\u23A2":return Yi("M319 0 H403 V"+r+" H319z");case"\u23A5":return Yi("M263 0 H347 V"+r+" H263z");case"\u23AA":return Yi("M384 0 H504 V"+r+" H384z");case"\u23D0":return Yi("M312 0 H355 V"+r+" H312z");case"\u2016":return Yi("M257 0 H300 V"+r+" H257z")+Yi("M478 0 H521 V"+r+" H478z");default:return""}},"innerPath"),CX={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:Yi("M40 281 V428 H0 V94 H40 V241 H400000 v40z"),leftbracketunder:Yi("M0 0 h120 V290 H399995 v120 H0z"),leftbracketover:Yi("M0 440 h120 V150 H399995 v-120 H0z"),leftmapsto:Yi("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:Yi("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:Yi("M399960 241 V94 h40 V428 h-40 V281 H0 v-40z"),rightbracketunder:Yi("M399995 0 h-120 V290 H0 v120 H400000z"),rightbracketover:Yi("M399995 440 h-120 V150 H0 v-120 H399995z"),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`},iOe=s(function(t,r){switch(t){case"lbrack":return"M403 1759 V84 H666 V0 H319 V1759 v"+r+` v1759 v84 h347 v-84 +H403z M403 1759 V0 H319 V1759 v`+r+" v1759 v84 h84z";case"rbrack":return"M347 1759 V0 H0 V84 H263 V1759 v"+r+` v1759 H0 v84 H347z +M347 1759 V0 H263 V1759 v`+r+" v1759 h84z";case"vert":return"M145 15 v585 v"+r+` v585 c2.667,10,9.667,15,21,15 +c10,0,16.667,-5,20,-15 v-585 v`+-r+` v-585 c-2.667,-10,-9.667,-15,-21,-15 +c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v`+r+" v585 h43z";case"doublevert":return"M145 15 v585 v"+r+` v585 c2.667,10,9.667,15,21,15 +c10,0,16.667,-5,20,-15 v-585 v`+-r+` v-585 c-2.667,-10,-9.667,-15,-21,-15 +c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v`+r+` v585 h43z +M367 15 v585 v`+r+` v585 c2.667,10,9.667,15,21,15 +c10,0,16.667,-5,20,-15 v-585 v`+-r+` v-585 c-2.667,-10,-9.667,-15,-21,-15 +c-10,0,-16.667,5,-20,15z M410 15 H367 v585 v`+r+" v585 h43z";case"lfloor":return"M319 602 V0 H403 V602 v"+r+` v1715 h263 v84 H319z +MM319 602 V0 H403 V602 v`+r+" v1715 H319z";case"rfloor":return"M319 602 V0 H403 V602 v"+r+` v1799 H0 v-84 H319z +MM319 602 V0 H403 V602 v`+r+" v1715 H319z";case"lceil":return"M403 1759 V84 H666 V0 H319 V1759 v"+r+` v602 h84z +M403 1759 V0 H319 V1759 v`+r+" v602 h84z";case"rceil":return"M347 1759 V0 H0 V84 H263 V1759 v"+r+` v602 h84z +M347 1759 V0 h-84 V1759 v`+r+" 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,`+(r+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,-`+(r+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,`+(r+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,-`+(r+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.")}},"tallDelim");s(aOe,"isMathDomNode");qh=class{static{s(this,"DocumentFragment")}constructor(t){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=t,this.classes=[],this.height=0,this.depth=0,this.maxFontSize=0,this.style={}}hasClass(t){return this.classes.includes(t)}toNode(){for(var t=document.createDocumentFragment(),r=0;r{if(aOe(t))return t.toText();throw new Error("Expected MathDomNode with toText, got "+t.constructor.name)}).join("")}},eD={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},sOe={ex:!0,em:!0,mu:!0},iK=s(function(t){return typeof t!="string"&&(t=t.unit),t in eD||t in sOe||t==="ex"},"validUnit"),oi=s(function(t,r){var n;if(t.unit in eD)n=eD[t.unit]/r.fontMetrics().ptPerEm/r.sizeMultiplier;else if(t.unit==="mu")n=r.fontMetrics().cssEmPerMu;else{var i;if(r.style.isTight()?i=r.havingStyle(r.style.text()):i=r,t.unit==="ex")n=i.fontMetrics().xHeight;else if(t.unit==="em")n=i.fontMetrics().quad;else throw new Pt("Invalid unit: '"+t.unit+"'");i!==r&&(n*=i.sizeMultiplier/r.sizeMultiplier)}return Math.min(t.number*n,r.maxSize)},"calculateSize"),$t=s(function(t){return+t.toFixed(4)+"em"},"makeEm"),Hh=s(function(t){return t.filter(r=>r).join(" ")},"createClass"),bD=s(function(t){var r="";for(var n of Object.keys(t)){var i=t[n];i!==void 0&&(r+=NPe(n)+":"+i+";")}return r},"cssStyleToString"),aK=s(function(t,r,n){if(this.classes=t||[],this.attributes={},this.height=0,this.depth=0,this.maxFontSize=0,this.style=n||{},r){r.style.isTight()&&this.classes.push("mtight");var i=r.getColor();i&&(this.style.color=i)}},"initNode"),sK=s(function(t){var r=document.createElement(t);r.className=Hh(this.classes),Object.assign(r.style,this.style);for(var n of Object.keys(this.attributes))r.setAttribute(n,this.attributes[n]);for(var i=0;i/=\x00-\x1f]/,oK=s(function(t){var r="<"+t;this.classes.length&&(r+=' class="'+za(Hh(this.classes))+'"');var n=bD(this.style);n&&(r+=' style="'+za(n)+'"');for(var i of Object.keys(this.attributes)){if(oOe.test(i))throw new Pt("Invalid attribute name '"+i+"'");r+=" "+i+'="'+za(this.attributes[i])+'"'}r+=">";for(var a=0;a",r},"toMarkup"),Uh=class{static{s(this,"Span")}constructor(t,r,n,i){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,this.italic=void 0,aK.call(this,t,n,i),this.children=r||[]}setAttribute(t,r){this.attributes[t]=r}hasClass(t){return this.classes.includes(t)}toNode(){return sK.call(this,"span")}toMarkup(){return oK.call(this,"span")}},n0=class{static{s(this,"Anchor")}constructor(t,r,n,i){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,aK.call(this,r,i),this.children=n||[],this.setAttribute("href",t)}setAttribute(t,r){this.attributes[t]=r}hasClass(t){return this.classes.includes(t)}toNode(){return sK.call(this,"a")}toMarkup(){return oK.call(this,"a")}},tD=class{static{s(this,"Img")}constructor(t,r,n){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=r,this.src=t,this.classes=["mord"],this.height=0,this.depth=0,this.maxFontSize=0,this.style=n}hasClass(t){return this.classes.includes(t)}toNode(){var t=document.createElement("img");return t.src=this.src,t.alt=this.alt,t.className="mord",Object.assign(t.style,this.style),t}toMarkup(){var t=''+za(this.alt)+'0&&(r=document.createElement("span"),r.style.marginRight=$t(this.italic)),this.classes.length>0&&(r=r||document.createElement("span"),r.className=Hh(this.classes)),Object.keys(this.style).length>0&&(r=r||document.createElement("span"),Object.assign(r.style,this.style)),r?(r.appendChild(t),r):t}toMarkup(){var t=!1,r="0&&(n+="margin-right:"+$t(this.italic)+";"),n+=bD(this.style),n&&(t=!0,r+=' style="'+za(n)+'"');var i=za(this.text);return t?(r+=">",r+=i,r+="",r):i}},pl=class{static{s(this,"SvgNode")}constructor(t,r){this.children=void 0,this.attributes=void 0,this.children=t||[],this.attributes=r||{}}toNode(){var t="http://www.w3.org/2000/svg",r=document.createElementNS(t,"svg");for(var n of Object.keys(this.attributes))r.setAttribute(n,this.attributes[n]);for(var i=0;i':''}},dx=class{static{s(this,"LineNode")}constructor(t){this.attributes=void 0,this.attributes=t||{}}toNode(){var t="http://www.w3.org/2000/svg",r=document.createElementNS(t,"line");for(var n of Object.keys(this.attributes))r.setAttribute(n,this.attributes[n]);return r}toMarkup(){var t="e instanceof Uh||e instanceof n0||e instanceof qh,"hasHtmlDomChildren"),ic={"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]}},Lk={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]},kX={\u00C5:"A",\u00D0:"D",\u00DE:"o",\u00E5:"a",\u00F0:"d",\u00FE:"o",\u0410:"A",\u0411:"B",\u0412:"B",\u0413:"F",\u0414:"A",\u0415:"E",\u0416:"K",\u0417:"3",\u0418:"N",\u0419:"N",\u041A:"K",\u041B:"N",\u041C:"M",\u041D:"H",\u041E:"O",\u041F:"N",\u0420:"P",\u0421:"C",\u0422:"T",\u0423:"y",\u0424:"O",\u0425:"X",\u0426:"U",\u0427:"h",\u0428:"W",\u0429:"W",\u042A:"B",\u042B:"X",\u042C:"B",\u042D:"3",\u042E:"X",\u042F:"R",\u0430:"a",\u0431:"b",\u0432:"a",\u0433:"r",\u0434:"y",\u0435:"e",\u0436:"m",\u0437:"e",\u0438:"n",\u0439:"n",\u043A:"n",\u043B:"n",\u043C:"m",\u043D:"n",\u043E:"o",\u043F:"n",\u0440:"p",\u0441:"c",\u0442:"o",\u0443:"y",\u0444:"b",\u0445:"x",\u0446:"n",\u0447:"n",\u0448:"w",\u0449:"w",\u044A:"a",\u044B:"m",\u044C:"a",\u044D:"e",\u044E:"m",\u044F:"r"};s(lK,"setFontMetrics");s(TD,"getCharacterMetrics");FL={};s(dOe,"getGlobalMetrics");ei={math:{},text:{}};s(Y,"defineSymbol");ee="math",Dt="text",me="main",Fe="ams",ti="accent-token",jt="bin",us="close",s0="inner",yr="mathord",Oi="op-token",po="open",px="punct",ze="rel",wu="spacing",He="textord";Y(ee,me,ze,"\u2261","\\equiv",!0);Y(ee,me,ze,"\u227A","\\prec",!0);Y(ee,me,ze,"\u227B","\\succ",!0);Y(ee,me,ze,"\u223C","\\sim",!0);Y(ee,me,ze,"\u22A5","\\perp");Y(ee,me,ze,"\u2AAF","\\preceq",!0);Y(ee,me,ze,"\u2AB0","\\succeq",!0);Y(ee,me,ze,"\u2243","\\simeq",!0);Y(ee,me,ze,"\u2223","\\mid",!0);Y(ee,me,ze,"\u226A","\\ll",!0);Y(ee,me,ze,"\u226B","\\gg",!0);Y(ee,me,ze,"\u224D","\\asymp",!0);Y(ee,me,ze,"\u2225","\\parallel");Y(ee,me,ze,"\u22C8","\\bowtie",!0);Y(ee,me,ze,"\u2323","\\smile",!0);Y(ee,me,ze,"\u2291","\\sqsubseteq",!0);Y(ee,me,ze,"\u2292","\\sqsupseteq",!0);Y(ee,me,ze,"\u2250","\\doteq",!0);Y(ee,me,ze,"\u2322","\\frown",!0);Y(ee,me,ze,"\u220B","\\ni",!0);Y(ee,me,ze,"\u221D","\\propto",!0);Y(ee,me,ze,"\u22A2","\\vdash",!0);Y(ee,me,ze,"\u22A3","\\dashv",!0);Y(ee,me,ze,"\u220B","\\owns");Y(ee,me,px,".","\\ldotp");Y(ee,me,px,"\u22C5","\\cdotp");Y(ee,me,px,"\u22C5","\xB7");Y(Dt,me,He,"\u22C5","\xB7");Y(ee,me,He,"#","\\#");Y(Dt,me,He,"#","\\#");Y(ee,me,He,"&","\\&");Y(Dt,me,He,"&","\\&");Y(ee,me,He,"\u2135","\\aleph",!0);Y(ee,me,He,"\u2200","\\forall",!0);Y(ee,me,He,"\u210F","\\hbar",!0);Y(ee,me,He,"\u2203","\\exists",!0);Y(ee,me,He,"\u2207","\\nabla",!0);Y(ee,me,He,"\u266D","\\flat",!0);Y(ee,me,He,"\u2113","\\ell",!0);Y(ee,me,He,"\u266E","\\natural",!0);Y(ee,me,He,"\u2663","\\clubsuit",!0);Y(ee,me,He,"\u2118","\\wp",!0);Y(ee,me,He,"\u266F","\\sharp",!0);Y(ee,me,He,"\u2662","\\diamondsuit",!0);Y(ee,me,He,"\u211C","\\Re",!0);Y(ee,me,He,"\u2661","\\heartsuit",!0);Y(ee,me,He,"\u2111","\\Im",!0);Y(ee,me,He,"\u2660","\\spadesuit",!0);Y(ee,me,He,"\xA7","\\S",!0);Y(Dt,me,He,"\xA7","\\S");Y(ee,me,He,"\xB6","\\P",!0);Y(Dt,me,He,"\xB6","\\P");Y(ee,me,He,"\u2020","\\dag");Y(Dt,me,He,"\u2020","\\dag");Y(Dt,me,He,"\u2020","\\textdagger");Y(ee,me,He,"\u2021","\\ddag");Y(Dt,me,He,"\u2021","\\ddag");Y(Dt,me,He,"\u2021","\\textdaggerdbl");Y(ee,me,us,"\u23B1","\\rmoustache",!0);Y(ee,me,po,"\u23B0","\\lmoustache",!0);Y(ee,me,us,"\u27EF","\\rgroup",!0);Y(ee,me,po,"\u27EE","\\lgroup",!0);Y(ee,me,jt,"\u2213","\\mp",!0);Y(ee,me,jt,"\u2296","\\ominus",!0);Y(ee,me,jt,"\u228E","\\uplus",!0);Y(ee,me,jt,"\u2293","\\sqcap",!0);Y(ee,me,jt,"\u2217","\\ast");Y(ee,me,jt,"\u2294","\\sqcup",!0);Y(ee,me,jt,"\u25EF","\\bigcirc",!0);Y(ee,me,jt,"\u2219","\\bullet",!0);Y(ee,me,jt,"\u2021","\\ddagger");Y(ee,me,jt,"\u2240","\\wr",!0);Y(ee,me,jt,"\u2A3F","\\amalg");Y(ee,me,jt,"&","\\And");Y(ee,me,ze,"\u27F5","\\longleftarrow",!0);Y(ee,me,ze,"\u21D0","\\Leftarrow",!0);Y(ee,me,ze,"\u27F8","\\Longleftarrow",!0);Y(ee,me,ze,"\u27F6","\\longrightarrow",!0);Y(ee,me,ze,"\u21D2","\\Rightarrow",!0);Y(ee,me,ze,"\u27F9","\\Longrightarrow",!0);Y(ee,me,ze,"\u2194","\\leftrightarrow",!0);Y(ee,me,ze,"\u27F7","\\longleftrightarrow",!0);Y(ee,me,ze,"\u21D4","\\Leftrightarrow",!0);Y(ee,me,ze,"\u27FA","\\Longleftrightarrow",!0);Y(ee,me,ze,"\u21A6","\\mapsto",!0);Y(ee,me,ze,"\u27FC","\\longmapsto",!0);Y(ee,me,ze,"\u2197","\\nearrow",!0);Y(ee,me,ze,"\u21A9","\\hookleftarrow",!0);Y(ee,me,ze,"\u21AA","\\hookrightarrow",!0);Y(ee,me,ze,"\u2198","\\searrow",!0);Y(ee,me,ze,"\u21BC","\\leftharpoonup",!0);Y(ee,me,ze,"\u21C0","\\rightharpoonup",!0);Y(ee,me,ze,"\u2199","\\swarrow",!0);Y(ee,me,ze,"\u21BD","\\leftharpoondown",!0);Y(ee,me,ze,"\u21C1","\\rightharpoondown",!0);Y(ee,me,ze,"\u2196","\\nwarrow",!0);Y(ee,me,ze,"\u21CC","\\rightleftharpoons",!0);Y(ee,Fe,ze,"\u226E","\\nless",!0);Y(ee,Fe,ze,"\uE010","\\@nleqslant");Y(ee,Fe,ze,"\uE011","\\@nleqq");Y(ee,Fe,ze,"\u2A87","\\lneq",!0);Y(ee,Fe,ze,"\u2268","\\lneqq",!0);Y(ee,Fe,ze,"\uE00C","\\@lvertneqq");Y(ee,Fe,ze,"\u22E6","\\lnsim",!0);Y(ee,Fe,ze,"\u2A89","\\lnapprox",!0);Y(ee,Fe,ze,"\u2280","\\nprec",!0);Y(ee,Fe,ze,"\u22E0","\\npreceq",!0);Y(ee,Fe,ze,"\u22E8","\\precnsim",!0);Y(ee,Fe,ze,"\u2AB9","\\precnapprox",!0);Y(ee,Fe,ze,"\u2241","\\nsim",!0);Y(ee,Fe,ze,"\uE006","\\@nshortmid");Y(ee,Fe,ze,"\u2224","\\nmid",!0);Y(ee,Fe,ze,"\u22AC","\\nvdash",!0);Y(ee,Fe,ze,"\u22AD","\\nvDash",!0);Y(ee,Fe,ze,"\u22EA","\\ntriangleleft");Y(ee,Fe,ze,"\u22EC","\\ntrianglelefteq",!0);Y(ee,Fe,ze,"\u228A","\\subsetneq",!0);Y(ee,Fe,ze,"\uE01A","\\@varsubsetneq");Y(ee,Fe,ze,"\u2ACB","\\subsetneqq",!0);Y(ee,Fe,ze,"\uE017","\\@varsubsetneqq");Y(ee,Fe,ze,"\u226F","\\ngtr",!0);Y(ee,Fe,ze,"\uE00F","\\@ngeqslant");Y(ee,Fe,ze,"\uE00E","\\@ngeqq");Y(ee,Fe,ze,"\u2A88","\\gneq",!0);Y(ee,Fe,ze,"\u2269","\\gneqq",!0);Y(ee,Fe,ze,"\uE00D","\\@gvertneqq");Y(ee,Fe,ze,"\u22E7","\\gnsim",!0);Y(ee,Fe,ze,"\u2A8A","\\gnapprox",!0);Y(ee,Fe,ze,"\u2281","\\nsucc",!0);Y(ee,Fe,ze,"\u22E1","\\nsucceq",!0);Y(ee,Fe,ze,"\u22E9","\\succnsim",!0);Y(ee,Fe,ze,"\u2ABA","\\succnapprox",!0);Y(ee,Fe,ze,"\u2246","\\ncong",!0);Y(ee,Fe,ze,"\uE007","\\@nshortparallel");Y(ee,Fe,ze,"\u2226","\\nparallel",!0);Y(ee,Fe,ze,"\u22AF","\\nVDash",!0);Y(ee,Fe,ze,"\u22EB","\\ntriangleright");Y(ee,Fe,ze,"\u22ED","\\ntrianglerighteq",!0);Y(ee,Fe,ze,"\uE018","\\@nsupseteqq");Y(ee,Fe,ze,"\u228B","\\supsetneq",!0);Y(ee,Fe,ze,"\uE01B","\\@varsupsetneq");Y(ee,Fe,ze,"\u2ACC","\\supsetneqq",!0);Y(ee,Fe,ze,"\uE019","\\@varsupsetneqq");Y(ee,Fe,ze,"\u22AE","\\nVdash",!0);Y(ee,Fe,ze,"\u2AB5","\\precneqq",!0);Y(ee,Fe,ze,"\u2AB6","\\succneqq",!0);Y(ee,Fe,ze,"\uE016","\\@nsubseteqq");Y(ee,Fe,jt,"\u22B4","\\unlhd");Y(ee,Fe,jt,"\u22B5","\\unrhd");Y(ee,Fe,ze,"\u219A","\\nleftarrow",!0);Y(ee,Fe,ze,"\u219B","\\nrightarrow",!0);Y(ee,Fe,ze,"\u21CD","\\nLeftarrow",!0);Y(ee,Fe,ze,"\u21CF","\\nRightarrow",!0);Y(ee,Fe,ze,"\u21AE","\\nleftrightarrow",!0);Y(ee,Fe,ze,"\u21CE","\\nLeftrightarrow",!0);Y(ee,Fe,ze,"\u25B3","\\vartriangle");Y(ee,Fe,He,"\u210F","\\hslash");Y(ee,Fe,He,"\u25BD","\\triangledown");Y(ee,Fe,He,"\u25CA","\\lozenge");Y(ee,Fe,He,"\u24C8","\\circledS");Y(ee,Fe,He,"\xAE","\\circledR");Y(Dt,Fe,He,"\xAE","\\circledR");Y(ee,Fe,He,"\u2221","\\measuredangle",!0);Y(ee,Fe,He,"\u2204","\\nexists");Y(ee,Fe,He,"\u2127","\\mho");Y(ee,Fe,He,"\u2132","\\Finv",!0);Y(ee,Fe,He,"\u2141","\\Game",!0);Y(ee,Fe,He,"\u2035","\\backprime");Y(ee,Fe,He,"\u25B2","\\blacktriangle");Y(ee,Fe,He,"\u25BC","\\blacktriangledown");Y(ee,Fe,He,"\u25A0","\\blacksquare");Y(ee,Fe,He,"\u29EB","\\blacklozenge");Y(ee,Fe,He,"\u2605","\\bigstar");Y(ee,Fe,He,"\u2222","\\sphericalangle",!0);Y(ee,Fe,He,"\u2201","\\complement",!0);Y(ee,Fe,He,"\xF0","\\eth",!0);Y(Dt,me,He,"\xF0","\xF0");Y(ee,Fe,He,"\u2571","\\diagup");Y(ee,Fe,He,"\u2572","\\diagdown");Y(ee,Fe,He,"\u25A1","\\square");Y(ee,Fe,He,"\u25A1","\\Box");Y(ee,Fe,He,"\u25CA","\\Diamond");Y(ee,Fe,He,"\xA5","\\yen",!0);Y(Dt,Fe,He,"\xA5","\\yen",!0);Y(ee,Fe,He,"\u2713","\\checkmark",!0);Y(Dt,Fe,He,"\u2713","\\checkmark");Y(ee,Fe,He,"\u2136","\\beth",!0);Y(ee,Fe,He,"\u2138","\\daleth",!0);Y(ee,Fe,He,"\u2137","\\gimel",!0);Y(ee,Fe,He,"\u03DD","\\digamma",!0);Y(ee,Fe,He,"\u03F0","\\varkappa");Y(ee,Fe,po,"\u250C","\\@ulcorner",!0);Y(ee,Fe,us,"\u2510","\\@urcorner",!0);Y(ee,Fe,po,"\u2514","\\@llcorner",!0);Y(ee,Fe,us,"\u2518","\\@lrcorner",!0);Y(ee,Fe,ze,"\u2266","\\leqq",!0);Y(ee,Fe,ze,"\u2A7D","\\leqslant",!0);Y(ee,Fe,ze,"\u2A95","\\eqslantless",!0);Y(ee,Fe,ze,"\u2272","\\lesssim",!0);Y(ee,Fe,ze,"\u2A85","\\lessapprox",!0);Y(ee,Fe,ze,"\u224A","\\approxeq",!0);Y(ee,Fe,jt,"\u22D6","\\lessdot");Y(ee,Fe,ze,"\u22D8","\\lll",!0);Y(ee,Fe,ze,"\u2276","\\lessgtr",!0);Y(ee,Fe,ze,"\u22DA","\\lesseqgtr",!0);Y(ee,Fe,ze,"\u2A8B","\\lesseqqgtr",!0);Y(ee,Fe,ze,"\u2251","\\doteqdot");Y(ee,Fe,ze,"\u2253","\\risingdotseq",!0);Y(ee,Fe,ze,"\u2252","\\fallingdotseq",!0);Y(ee,Fe,ze,"\u223D","\\backsim",!0);Y(ee,Fe,ze,"\u22CD","\\backsimeq",!0);Y(ee,Fe,ze,"\u2AC5","\\subseteqq",!0);Y(ee,Fe,ze,"\u22D0","\\Subset",!0);Y(ee,Fe,ze,"\u228F","\\sqsubset",!0);Y(ee,Fe,ze,"\u227C","\\preccurlyeq",!0);Y(ee,Fe,ze,"\u22DE","\\curlyeqprec",!0);Y(ee,Fe,ze,"\u227E","\\precsim",!0);Y(ee,Fe,ze,"\u2AB7","\\precapprox",!0);Y(ee,Fe,ze,"\u22B2","\\vartriangleleft");Y(ee,Fe,ze,"\u22B4","\\trianglelefteq");Y(ee,Fe,ze,"\u22A8","\\vDash",!0);Y(ee,Fe,ze,"\u22AA","\\Vvdash",!0);Y(ee,Fe,ze,"\u2323","\\smallsmile");Y(ee,Fe,ze,"\u2322","\\smallfrown");Y(ee,Fe,ze,"\u224F","\\bumpeq",!0);Y(ee,Fe,ze,"\u224E","\\Bumpeq",!0);Y(ee,Fe,ze,"\u2267","\\geqq",!0);Y(ee,Fe,ze,"\u2A7E","\\geqslant",!0);Y(ee,Fe,ze,"\u2A96","\\eqslantgtr",!0);Y(ee,Fe,ze,"\u2273","\\gtrsim",!0);Y(ee,Fe,ze,"\u2A86","\\gtrapprox",!0);Y(ee,Fe,jt,"\u22D7","\\gtrdot");Y(ee,Fe,ze,"\u22D9","\\ggg",!0);Y(ee,Fe,ze,"\u2277","\\gtrless",!0);Y(ee,Fe,ze,"\u22DB","\\gtreqless",!0);Y(ee,Fe,ze,"\u2A8C","\\gtreqqless",!0);Y(ee,Fe,ze,"\u2256","\\eqcirc",!0);Y(ee,Fe,ze,"\u2257","\\circeq",!0);Y(ee,Fe,ze,"\u225C","\\triangleq",!0);Y(ee,Fe,ze,"\u223C","\\thicksim");Y(ee,Fe,ze,"\u2248","\\thickapprox");Y(ee,Fe,ze,"\u2AC6","\\supseteqq",!0);Y(ee,Fe,ze,"\u22D1","\\Supset",!0);Y(ee,Fe,ze,"\u2290","\\sqsupset",!0);Y(ee,Fe,ze,"\u227D","\\succcurlyeq",!0);Y(ee,Fe,ze,"\u22DF","\\curlyeqsucc",!0);Y(ee,Fe,ze,"\u227F","\\succsim",!0);Y(ee,Fe,ze,"\u2AB8","\\succapprox",!0);Y(ee,Fe,ze,"\u22B3","\\vartriangleright");Y(ee,Fe,ze,"\u22B5","\\trianglerighteq");Y(ee,Fe,ze,"\u22A9","\\Vdash",!0);Y(ee,Fe,ze,"\u2223","\\shortmid");Y(ee,Fe,ze,"\u2225","\\shortparallel");Y(ee,Fe,ze,"\u226C","\\between",!0);Y(ee,Fe,ze,"\u22D4","\\pitchfork",!0);Y(ee,Fe,ze,"\u221D","\\varpropto");Y(ee,Fe,ze,"\u25C0","\\blacktriangleleft");Y(ee,Fe,ze,"\u2234","\\therefore",!0);Y(ee,Fe,ze,"\u220D","\\backepsilon");Y(ee,Fe,ze,"\u25B6","\\blacktriangleright");Y(ee,Fe,ze,"\u2235","\\because",!0);Y(ee,Fe,ze,"\u22D8","\\llless");Y(ee,Fe,ze,"\u22D9","\\gggtr");Y(ee,Fe,jt,"\u22B2","\\lhd");Y(ee,Fe,jt,"\u22B3","\\rhd");Y(ee,Fe,ze,"\u2242","\\eqsim",!0);Y(ee,me,ze,"\u22C8","\\Join");Y(ee,Fe,ze,"\u2251","\\Doteq",!0);Y(ee,Fe,jt,"\u2214","\\dotplus",!0);Y(ee,Fe,jt,"\u2216","\\smallsetminus");Y(ee,Fe,jt,"\u22D2","\\Cap",!0);Y(ee,Fe,jt,"\u22D3","\\Cup",!0);Y(ee,Fe,jt,"\u2A5E","\\doublebarwedge",!0);Y(ee,Fe,jt,"\u229F","\\boxminus",!0);Y(ee,Fe,jt,"\u229E","\\boxplus",!0);Y(ee,Fe,jt,"\u22C7","\\divideontimes",!0);Y(ee,Fe,jt,"\u22C9","\\ltimes",!0);Y(ee,Fe,jt,"\u22CA","\\rtimes",!0);Y(ee,Fe,jt,"\u22CB","\\leftthreetimes",!0);Y(ee,Fe,jt,"\u22CC","\\rightthreetimes",!0);Y(ee,Fe,jt,"\u22CF","\\curlywedge",!0);Y(ee,Fe,jt,"\u22CE","\\curlyvee",!0);Y(ee,Fe,jt,"\u229D","\\circleddash",!0);Y(ee,Fe,jt,"\u229B","\\circledast",!0);Y(ee,Fe,jt,"\u22C5","\\centerdot");Y(ee,Fe,jt,"\u22BA","\\intercal",!0);Y(ee,Fe,jt,"\u22D2","\\doublecap");Y(ee,Fe,jt,"\u22D3","\\doublecup");Y(ee,Fe,jt,"\u22A0","\\boxtimes",!0);Y(ee,Fe,ze,"\u21E2","\\dashrightarrow",!0);Y(ee,Fe,ze,"\u21E0","\\dashleftarrow",!0);Y(ee,Fe,ze,"\u21C7","\\leftleftarrows",!0);Y(ee,Fe,ze,"\u21C6","\\leftrightarrows",!0);Y(ee,Fe,ze,"\u21DA","\\Lleftarrow",!0);Y(ee,Fe,ze,"\u219E","\\twoheadleftarrow",!0);Y(ee,Fe,ze,"\u21A2","\\leftarrowtail",!0);Y(ee,Fe,ze,"\u21AB","\\looparrowleft",!0);Y(ee,Fe,ze,"\u21CB","\\leftrightharpoons",!0);Y(ee,Fe,ze,"\u21B6","\\curvearrowleft",!0);Y(ee,Fe,ze,"\u21BA","\\circlearrowleft",!0);Y(ee,Fe,ze,"\u21B0","\\Lsh",!0);Y(ee,Fe,ze,"\u21C8","\\upuparrows",!0);Y(ee,Fe,ze,"\u21BF","\\upharpoonleft",!0);Y(ee,Fe,ze,"\u21C3","\\downharpoonleft",!0);Y(ee,me,ze,"\u22B6","\\origof",!0);Y(ee,me,ze,"\u22B7","\\imageof",!0);Y(ee,Fe,ze,"\u22B8","\\multimap",!0);Y(ee,Fe,ze,"\u21AD","\\leftrightsquigarrow",!0);Y(ee,Fe,ze,"\u21C9","\\rightrightarrows",!0);Y(ee,Fe,ze,"\u21C4","\\rightleftarrows",!0);Y(ee,Fe,ze,"\u21A0","\\twoheadrightarrow",!0);Y(ee,Fe,ze,"\u21A3","\\rightarrowtail",!0);Y(ee,Fe,ze,"\u21AC","\\looparrowright",!0);Y(ee,Fe,ze,"\u21B7","\\curvearrowright",!0);Y(ee,Fe,ze,"\u21BB","\\circlearrowright",!0);Y(ee,Fe,ze,"\u21B1","\\Rsh",!0);Y(ee,Fe,ze,"\u21CA","\\downdownarrows",!0);Y(ee,Fe,ze,"\u21BE","\\upharpoonright",!0);Y(ee,Fe,ze,"\u21C2","\\downharpoonright",!0);Y(ee,Fe,ze,"\u21DD","\\rightsquigarrow",!0);Y(ee,Fe,ze,"\u21DD","\\leadsto");Y(ee,Fe,ze,"\u21DB","\\Rrightarrow",!0);Y(ee,Fe,ze,"\u21BE","\\restriction");Y(ee,me,He,"\u2018","`");Y(ee,me,He,"$","\\$");Y(Dt,me,He,"$","\\$");Y(Dt,me,He,"$","\\textdollar");Y(ee,me,He,"%","\\%");Y(Dt,me,He,"%","\\%");Y(ee,me,He,"_","\\_");Y(Dt,me,He,"_","\\_");Y(Dt,me,He,"_","\\textunderscore");Y(ee,me,He,"\u2220","\\angle",!0);Y(ee,me,He,"\u221E","\\infty",!0);Y(ee,me,He,"\u2032","\\prime");Y(ee,me,He,"\u25B3","\\triangle");Y(ee,me,He,"\u0393","\\Gamma",!0);Y(ee,me,He,"\u0394","\\Delta",!0);Y(ee,me,He,"\u0398","\\Theta",!0);Y(ee,me,He,"\u039B","\\Lambda",!0);Y(ee,me,He,"\u039E","\\Xi",!0);Y(ee,me,He,"\u03A0","\\Pi",!0);Y(ee,me,He,"\u03A3","\\Sigma",!0);Y(ee,me,He,"\u03A5","\\Upsilon",!0);Y(ee,me,He,"\u03A6","\\Phi",!0);Y(ee,me,He,"\u03A8","\\Psi",!0);Y(ee,me,He,"\u03A9","\\Omega",!0);Y(ee,me,He,"A","\u0391");Y(ee,me,He,"B","\u0392");Y(ee,me,He,"E","\u0395");Y(ee,me,He,"Z","\u0396");Y(ee,me,He,"H","\u0397");Y(ee,me,He,"I","\u0399");Y(ee,me,He,"K","\u039A");Y(ee,me,He,"M","\u039C");Y(ee,me,He,"N","\u039D");Y(ee,me,He,"O","\u039F");Y(ee,me,He,"P","\u03A1");Y(ee,me,He,"T","\u03A4");Y(ee,me,He,"X","\u03A7");Y(ee,me,He,"\xAC","\\neg",!0);Y(ee,me,He,"\xAC","\\lnot");Y(ee,me,He,"\u22A4","\\top");Y(ee,me,He,"\u22A5","\\bot");Y(ee,me,He,"\u2205","\\emptyset");Y(ee,Fe,He,"\u2205","\\varnothing");Y(ee,me,yr,"\u03B1","\\alpha",!0);Y(ee,me,yr,"\u03B2","\\beta",!0);Y(ee,me,yr,"\u03B3","\\gamma",!0);Y(ee,me,yr,"\u03B4","\\delta",!0);Y(ee,me,yr,"\u03F5","\\epsilon",!0);Y(ee,me,yr,"\u03B6","\\zeta",!0);Y(ee,me,yr,"\u03B7","\\eta",!0);Y(ee,me,yr,"\u03B8","\\theta",!0);Y(ee,me,yr,"\u03B9","\\iota",!0);Y(ee,me,yr,"\u03BA","\\kappa",!0);Y(ee,me,yr,"\u03BB","\\lambda",!0);Y(ee,me,yr,"\u03BC","\\mu",!0);Y(ee,me,yr,"\u03BD","\\nu",!0);Y(ee,me,yr,"\u03BE","\\xi",!0);Y(ee,me,yr,"\u03BF","\\omicron",!0);Y(ee,me,yr,"\u03C0","\\pi",!0);Y(ee,me,yr,"\u03C1","\\rho",!0);Y(ee,me,yr,"\u03C3","\\sigma",!0);Y(ee,me,yr,"\u03C4","\\tau",!0);Y(ee,me,yr,"\u03C5","\\upsilon",!0);Y(ee,me,yr,"\u03D5","\\phi",!0);Y(ee,me,yr,"\u03C7","\\chi",!0);Y(ee,me,yr,"\u03C8","\\psi",!0);Y(ee,me,yr,"\u03C9","\\omega",!0);Y(ee,me,yr,"\u03B5","\\varepsilon",!0);Y(ee,me,yr,"\u03D1","\\vartheta",!0);Y(ee,me,yr,"\u03D6","\\varpi",!0);Y(ee,me,yr,"\u03F1","\\varrho",!0);Y(ee,me,yr,"\u03C2","\\varsigma",!0);Y(ee,me,yr,"\u03C6","\\varphi",!0);Y(ee,me,jt,"\u2217","*",!0);Y(ee,me,jt,"+","+");Y(ee,me,jt,"\u2212","-",!0);Y(ee,me,jt,"\u22C5","\\cdot",!0);Y(ee,me,jt,"\u2218","\\circ",!0);Y(ee,me,jt,"\xF7","\\div",!0);Y(ee,me,jt,"\xB1","\\pm",!0);Y(ee,me,jt,"\xD7","\\times",!0);Y(ee,me,jt,"\u2229","\\cap",!0);Y(ee,me,jt,"\u222A","\\cup",!0);Y(ee,me,jt,"\u2216","\\setminus",!0);Y(ee,me,jt,"\u2227","\\land");Y(ee,me,jt,"\u2228","\\lor");Y(ee,me,jt,"\u2227","\\wedge",!0);Y(ee,me,jt,"\u2228","\\vee",!0);Y(ee,me,He,"\u221A","\\surd");Y(ee,me,po,"\u27E8","\\langle",!0);Y(ee,me,po,"\u2223","\\lvert");Y(ee,me,po,"\u2225","\\lVert");Y(ee,me,us,"?","?");Y(ee,me,us,"!","!");Y(ee,me,us,"\u27E9","\\rangle",!0);Y(ee,me,us,"\u2223","\\rvert");Y(ee,me,us,"\u2225","\\rVert");Y(ee,me,ze,"=","=");Y(ee,me,ze,":",":");Y(ee,me,ze,"\u2248","\\approx",!0);Y(ee,me,ze,"\u2245","\\cong",!0);Y(ee,me,ze,"\u2265","\\ge");Y(ee,me,ze,"\u2265","\\geq",!0);Y(ee,me,ze,"\u2190","\\gets");Y(ee,me,ze,">","\\gt",!0);Y(ee,me,ze,"\u2208","\\in",!0);Y(ee,me,ze,"\uE020","\\@not");Y(ee,me,ze,"\u2282","\\subset",!0);Y(ee,me,ze,"\u2283","\\supset",!0);Y(ee,me,ze,"\u2286","\\subseteq",!0);Y(ee,me,ze,"\u2287","\\supseteq",!0);Y(ee,Fe,ze,"\u2288","\\nsubseteq",!0);Y(ee,Fe,ze,"\u2289","\\nsupseteq",!0);Y(ee,me,ze,"\u22A8","\\models");Y(ee,me,ze,"\u2190","\\leftarrow",!0);Y(ee,me,ze,"\u2264","\\le");Y(ee,me,ze,"\u2264","\\leq",!0);Y(ee,me,ze,"<","\\lt",!0);Y(ee,me,ze,"\u2192","\\rightarrow",!0);Y(ee,me,ze,"\u2192","\\to");Y(ee,Fe,ze,"\u2271","\\ngeq",!0);Y(ee,Fe,ze,"\u2270","\\nleq",!0);Y(ee,me,wu,"\xA0","\\ ");Y(ee,me,wu,"\xA0","\\space");Y(ee,me,wu,"\xA0","\\nobreakspace");Y(Dt,me,wu,"\xA0","\\ ");Y(Dt,me,wu,"\xA0"," ");Y(Dt,me,wu,"\xA0","\\space");Y(Dt,me,wu,"\xA0","\\nobreakspace");Y(ee,me,wu,"","\\nobreak");Y(ee,me,wu,"","\\allowbreak");Y(ee,me,px,",",",");Y(ee,me,px,";",";");Y(ee,Fe,jt,"\u22BC","\\barwedge",!0);Y(ee,Fe,jt,"\u22BB","\\veebar",!0);Y(ee,me,jt,"\u2299","\\odot",!0);Y(ee,me,jt,"\u2295","\\oplus",!0);Y(ee,me,jt,"\u2297","\\otimes",!0);Y(ee,me,He,"\u2202","\\partial",!0);Y(ee,me,jt,"\u2298","\\oslash",!0);Y(ee,Fe,jt,"\u229A","\\circledcirc",!0);Y(ee,Fe,jt,"\u22A1","\\boxdot",!0);Y(ee,me,jt,"\u25B3","\\bigtriangleup");Y(ee,me,jt,"\u25BD","\\bigtriangledown");Y(ee,me,jt,"\u2020","\\dagger");Y(ee,me,jt,"\u22C4","\\diamond");Y(ee,me,jt,"\u22C6","\\star");Y(ee,me,jt,"\u25C3","\\triangleleft");Y(ee,me,jt,"\u25B9","\\triangleright");Y(ee,me,po,"{","\\{");Y(Dt,me,He,"{","\\{");Y(Dt,me,He,"{","\\textbraceleft");Y(ee,me,us,"}","\\}");Y(Dt,me,He,"}","\\}");Y(Dt,me,He,"}","\\textbraceright");Y(ee,me,po,"{","\\lbrace");Y(ee,me,us,"}","\\rbrace");Y(ee,me,po,"[","\\lbrack",!0);Y(Dt,me,He,"[","\\lbrack",!0);Y(ee,me,us,"]","\\rbrack",!0);Y(Dt,me,He,"]","\\rbrack",!0);Y(ee,me,po,"(","\\lparen",!0);Y(ee,me,us,")","\\rparen",!0);Y(Dt,me,He,"<","\\textless",!0);Y(Dt,me,He,">","\\textgreater",!0);Y(ee,me,po,"\u230A","\\lfloor",!0);Y(ee,me,us,"\u230B","\\rfloor",!0);Y(ee,me,po,"\u2308","\\lceil",!0);Y(ee,me,us,"\u2309","\\rceil",!0);Y(ee,me,He,"\\","\\backslash");Y(ee,me,He,"\u2223","|");Y(ee,me,He,"\u2223","\\vert");Y(Dt,me,He,"|","\\textbar",!0);Y(ee,me,He,"\u2225","\\|");Y(ee,me,He,"\u2225","\\Vert");Y(Dt,me,He,"\u2225","\\textbardbl");Y(Dt,me,He,"~","\\textasciitilde");Y(Dt,me,He,"\\","\\textbackslash");Y(Dt,me,He,"^","\\textasciicircum");Y(ee,me,ze,"\u2191","\\uparrow",!0);Y(ee,me,ze,"\u21D1","\\Uparrow",!0);Y(ee,me,ze,"\u2193","\\downarrow",!0);Y(ee,me,ze,"\u21D3","\\Downarrow",!0);Y(ee,me,ze,"\u2195","\\updownarrow",!0);Y(ee,me,ze,"\u21D5","\\Updownarrow",!0);Y(ee,me,Oi,"\u2210","\\coprod");Y(ee,me,Oi,"\u22C1","\\bigvee");Y(ee,me,Oi,"\u22C0","\\bigwedge");Y(ee,me,Oi,"\u2A04","\\biguplus");Y(ee,me,Oi,"\u22C2","\\bigcap");Y(ee,me,Oi,"\u22C3","\\bigcup");Y(ee,me,Oi,"\u222B","\\int");Y(ee,me,Oi,"\u222B","\\intop");Y(ee,me,Oi,"\u222C","\\iint");Y(ee,me,Oi,"\u222D","\\iiint");Y(ee,me,Oi,"\u220F","\\prod");Y(ee,me,Oi,"\u2211","\\sum");Y(ee,me,Oi,"\u2A02","\\bigotimes");Y(ee,me,Oi,"\u2A01","\\bigoplus");Y(ee,me,Oi,"\u2A00","\\bigodot");Y(ee,me,Oi,"\u222E","\\oint");Y(ee,me,Oi,"\u222F","\\oiint");Y(ee,me,Oi,"\u2230","\\oiiint");Y(ee,me,Oi,"\u2A06","\\bigsqcup");Y(ee,me,Oi,"\u222B","\\smallint");Y(Dt,me,s0,"\u2026","\\textellipsis");Y(ee,me,s0,"\u2026","\\mathellipsis");Y(Dt,me,s0,"\u2026","\\ldots",!0);Y(ee,me,s0,"\u2026","\\ldots",!0);Y(ee,me,s0,"\u22EF","\\@cdots",!0);Y(ee,me,s0,"\u22F1","\\ddots",!0);Y(ee,me,He,"\u22EE","\\varvdots");Y(Dt,me,He,"\u22EE","\\varvdots");Y(ee,me,ti,"\u02CA","\\acute");Y(ee,me,ti,"\u02CB","\\grave");Y(ee,me,ti,"\xA8","\\ddot");Y(ee,me,ti,"~","\\tilde");Y(ee,me,ti,"\u02C9","\\bar");Y(ee,me,ti,"\u02D8","\\breve");Y(ee,me,ti,"\u02C7","\\check");Y(ee,me,ti,"^","\\hat");Y(ee,me,ti,"\u20D7","\\vec");Y(ee,me,ti,"\u02D9","\\dot");Y(ee,me,ti,"\u02DA","\\mathring");Y(ee,me,yr,"\uE131","\\@imath");Y(ee,me,yr,"\uE237","\\@jmath");Y(ee,me,He,"\u0131","\u0131");Y(ee,me,He,"\u0237","\u0237");Y(Dt,me,He,"\u0131","\\i",!0);Y(Dt,me,He,"\u0237","\\j",!0);Y(Dt,me,He,"\xDF","\\ss",!0);Y(Dt,me,He,"\xE6","\\ae",!0);Y(Dt,me,He,"\u0153","\\oe",!0);Y(Dt,me,He,"\xF8","\\o",!0);Y(Dt,me,He,"\xC6","\\AE",!0);Y(Dt,me,He,"\u0152","\\OE",!0);Y(Dt,me,He,"\xD8","\\O",!0);Y(Dt,me,ti,"\u02CA","\\'");Y(Dt,me,ti,"\u02CB","\\`");Y(Dt,me,ti,"\u02C6","\\^");Y(Dt,me,ti,"\u02DC","\\~");Y(Dt,me,ti,"\u02C9","\\=");Y(Dt,me,ti,"\u02D8","\\u");Y(Dt,me,ti,"\u02D9","\\.");Y(Dt,me,ti,"\xB8","\\c");Y(Dt,me,ti,"\u02DA","\\r");Y(Dt,me,ti,"\u02C7","\\v");Y(Dt,me,ti,"\xA8",'\\"');Y(Dt,me,ti,"\u02DD","\\H");Y(Dt,me,ti,"\u25EF","\\textcircled");cK={"--":!0,"---":!0,"``":!0,"''":!0};Y(Dt,me,He,"\u2013","--",!0);Y(Dt,me,He,"\u2013","\\textendash");Y(Dt,me,He,"\u2014","---",!0);Y(Dt,me,He,"\u2014","\\textemdash");Y(Dt,me,He,"\u2018","`",!0);Y(Dt,me,He,"\u2018","\\textquoteleft");Y(Dt,me,He,"\u2019","'",!0);Y(Dt,me,He,"\u2019","\\textquoteright");Y(Dt,me,He,"\u201C","``",!0);Y(Dt,me,He,"\u201C","\\textquotedblleft");Y(Dt,me,He,"\u201D","''",!0);Y(Dt,me,He,"\u201D","\\textquotedblright");Y(ee,me,He,"\xB0","\\degree",!0);Y(Dt,me,He,"\xB0","\\degree");Y(Dt,me,He,"\xB0","\\textdegree",!0);Y(ee,me,He,"\xA3","\\pounds");Y(ee,me,He,"\xA3","\\mathsterling",!0);Y(Dt,me,He,"\xA3","\\pounds");Y(Dt,me,He,"\xA3","\\textsterling",!0);Y(ee,Fe,He,"\u2720","\\maltese");Y(Dt,Fe,He,"\u2720","\\maltese");wX='0123456789/@."';for(Dk=0;Dk{var t=e.charCodeAt(0),r=e.charCodeAt(1),n=(t-55296)*1024+(r-56320)+65536;if(119808<=n&&n<120484){var i=Math.floor((n-119808)/26);return IX[i]}else if(120782<=n&&n<=120831){var a=Math.floor((n-120782)/10);return pOe[a]}else{if(n===120485||n===120486)return IX[0];if(120486{if(Hh(e.classes)!==Hh(t.classes)||e.skew!==t.skew||e.maxFontSize!==t.maxFontSize||e.italic!==0&&e.hasClass("mathnormal"))return!1;if(e.classes.length===1){var r=e.classes[0];if(r==="mbin"||r==="mord")return!1}for(var n of Object.keys(e.style))if(e.style[n]!==t.style[n])return!1;for(var i of Object.keys(t.style))if(e.style[i]!==t.style[i])return!1;return!0},"canCombine"),uK=s(e=>{for(var t=0;tr&&(r=o.height),o.depth>n&&(n=o.depth),o.maxFontSize>i&&(i=o.maxFontSize)}t.height=r,t.depth=n,t.maxFontSize=i},"sizeElementFromChildren"),Mt=s(function(t,r,n,i){var a=new Uh(t,r,n,i);return kD(a),a},"makeSpan"),Yh=s((e,t,r,n)=>new Uh(e,t,r,n),"makeSvgSpan"),i0=s(function(t,r,n){var i=Mt([t],[],r);return i.height=Math.max(n||r.fontMetrics().defaultRuleThickness,r.minRuleThickness),i.style.borderBottomWidth=$t(i.height),i.maxFontSize=1,i},"makeLineSpan"),vOe=s(function(t,r,n,i){var a=new n0(t,r,n,i);return kD(a),a},"makeAnchor"),Su=s(function(t){var r=new qh(t);return kD(r),r},"makeFragment"),a0=s(function(t,r){return t instanceof qh?Mt([],[t],r):t},"wrapFragment"),xOe=s(function(t){if(t.positionType==="individualShift"){for(var r=t.children,n=[r[0]],i=-r[0].shift-r[0].elem.depth,a=i,o=1;o{var r=Mt(["mspace"],[],t),n=oi(e,t);return r.style.marginRight=$t(n),r},"makeGlue"),Pk=s((e,t,r)=>{var n,i;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}return t==="textbf"&&r==="textit"?i="BoldItalic":t==="textbf"?i="Bold":r==="textit"?i="Italic":i="Regular",n+"-"+i},"retrieveTextFontName"),oD={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"}},dK={vec:["vec",.471,.714],oiintSize1:["oiintSize1",.957,.499],oiintSize2:["oiintSize2",1.472,.659],oiiintSize1:["oiiintSize1",1.304,.499],oiiintSize2:["oiiintSize2",1.98,.659]},fK=s(function(t,r){var[n,i,a]=dK[t],o=new ac(n),l=new pl([o],{width:$t(i),height:$t(a),style:"width:"+$t(i),viewBox:"0 0 "+1e3*i+" "+1e3*a,preserveAspectRatio:"xMinYMin"}),u=Yh(["overlay"],[l],r);return u.height=a,u.style.height=$t(a),u.style.width=$t(i),u},"staticSvg"),si={number:3,unit:"mu"},ip={number:4,unit:"mu"},Tu={number:5,unit:"mu"},bOe={mord:{mop:si,mbin:ip,mrel:Tu,minner:si},mop:{mord:si,mop:si,mrel:Tu,minner:si},mbin:{mord:ip,mop:ip,mopen:ip,minner:ip},mrel:{mord:Tu,mop:Tu,mopen:Tu,minner:Tu},mopen:{},mclose:{mop:si,mbin:ip,mrel:Tu,minner:si},mpunct:{mord:si,mop:si,mrel:Tu,mopen:si,mclose:si,mpunct:si,minner:si},minner:{mord:si,mop:si,mbin:ip,mrel:Tu,mopen:si,mpunct:si,minner:si}},TOe={mord:{mop:si},mop:{mord:si,mop:si},mbin:{},mrel:{},mopen:{},mclose:{mop:si},mpunct:{},minner:{mop:si}},pK={},Hk={},Uk={};s(qt,"defineFunction");s(sp,"defineFunctionBuilders");Yk=s(function(t){return t.type==="ordgroup"&&t.body.length===1?t.body[0]:t},"normalizeArgument"),Pi=s(function(t){return t.type==="ordgroup"?t.body:[t]},"ordargument"),COe=new Set(["leftmost","mbin","mopen","mrel","mop","mpunct"]),kOe=new Set(["rightmost","mrel","mclose","mpunct"]),wOe={display:Pr.DISPLAY,text:Pr.TEXT,script:Pr.SCRIPT,scriptscript:Pr.SCRIPTSCRIPT},SOe={mord:"mord",mop:"mop",mbin:"mbin",mrel:"mrel",mopen:"mopen",mclose:"mclose",mpunct:"mpunct",minner:"minner"},ji=s(function(t,r,n,i){i===void 0&&(i=[null,null]);for(var a=[],o=0;o{var v=y.classes[0],x=g.classes[0];v==="mbin"&&kOe.has(x)?y.classes[0]="mord":x==="mbin"&&COe.has(v)&&(g.classes[0]="mord")},{node:f},p,m),lD(a,(g,y)=>{var v,x,b=uD(y),T=uD(g),w=b&&T?g.hasClass("mtight")?(v=TOe[b])==null?void 0:v[T]:(x=bOe[b])==null?void 0:x[T]:null;if(w)return hK(w,h)},{node:f},p,m),a},"buildExpression"),lD=s(function(t,r,n,i,a){i&&t.push(i);for(var o=0;op=>{t.splice(f+1,0,p),o++})(o)}i&&t.pop()},"traverseNonSpaceNodes"),mK=s(function(t){return t instanceof qh||t instanceof n0||t instanceof Uh&&t.hasClass("enclosing")?t:null},"checkPartialGroup"),cD=s(function(t,r){var n=mK(t);if(n){var i=n.children;if(i.length){if(r==="right")return cD(i[i.length-1],"right");if(r==="left")return cD(i[0],"left")}}return t},"getOutermostNode"),uD=s(function(t,r){if(!t)return null;r&&(t=cD(t,r));var n=t.classes[0];return SOe[n]||null},"getTypeOfDomTree"),fx=s(function(t,r){var n=["nulldelimiter"].concat(t.baseSizingClasses());return Mt(r.concat(n))},"makeNullDelimiter"),vn=s(function(t,r,n){if(!t)return Mt();if(Hk[t.type]){var i=Hk[t.type](t,r);if(n&&r.size!==n.size){i=Mt(r.sizingClasses(n),[i],r);var a=r.sizeMultiplier/n.sizeMultiplier;i.height*=a,i.depth*=a}return i}else throw new Pt("Got group of unknown type: '"+t.type+"'")},"buildGroup");s(Ok,"buildHTMLUnbreakable");s(hD,"buildHTML");s(gK,"newDocumentFragment");Nt=class{static{s(this,"MathNode")}constructor(t,r,n){this.type=void 0,this.attributes=void 0,this.children=void 0,this.classes=void 0,this.type=t,this.attributes={},this.children=r||[],this.classes=n||[]}setAttribute(t,r){this.attributes[t]=r}getAttribute(t){return this.attributes[t]}toNode(){var t=document.createElementNS("http://www.w3.org/1998/Math/MathML",this.type);for(var r in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,r)&&t.setAttribute(r,this.attributes[r]);this.classes.length>0&&(t.className=Hh(this.classes));for(var n=0;n0&&(t+=' class ="'+za(Hh(this.classes))+'"'),t+=">";for(var n=0;n",t}toText(){return this.children.map(t=>t.toText()).join("")}},mi=class{static{s(this,"TextNode")}constructor(t){this.text=void 0,this.text=t}toNode(){return document.createTextNode(this.text)}toMarkup(){return za(this.toText())}toText(){return this.text}},jk=class{static{s(this,"SpaceNode")}constructor(t){this.width=void 0,this.character=void 0,this.width=t,t>=.05555&&t<=.05556?this.character="\u200A":t>=.1666&&t<=.1667?this.character="\u2009":t>=.2222&&t<=.2223?this.character="\u2005":t>=.2777&&t<=.2778?this.character="\u2005\u200A":t>=-.05556&&t<=-.05555?this.character="\u200A\u2063":t>=-.1667&&t<=-.1666?this.character="\u2009\u2063":t>=-.2223&&t<=-.2222?this.character="\u205F\u2063":t>=-.2778&&t<=-.2777?this.character="\u2005\u2063":this.character=null}toNode(){if(this.character)return document.createTextNode(this.character);var t=document.createElementNS("http://www.w3.org/1998/Math/MathML","mspace");return t.setAttribute("width",$t(this.width)),t}toMarkup(){return this.character?""+this.character+"":''}toText(){return this.character?this.character:" "}},EOe=new Set(["\\imath","\\jmath"]),AOe=new Set(["mrow","mtable"]),Fo=s(function(t,r,n){return ei[r][t]&&ei[r][t].replace&&t.charCodeAt(0)!==55349&&!(cK.hasOwnProperty(t)&&n&&(n.fontFamily&&n.fontFamily.slice(4,6)==="tt"||n.font&&n.font.slice(4,6)==="tt"))&&(t=ei[r][t].replace),new mi(t)},"makeText"),wD=s(function(t){return t.length===1?t[0]:new Nt("mrow",t)},"makeRow"),ROe={mathit:"italic",boldsymbol:s(e=>e.type==="textord"?"bold":"bold-italic","boldsymbol"),mathbf:"bold",mathbb:"double-struck",mathsfit:"sans-serif-italic",mathfrak:"fraktur",mathscr:"script",mathcal:"script",mathsf:"sans-serif",mathtt:"monospace"},SD=s((e,t)=>{if(e.mode==="text"){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 r=t.font;if(!r||r==="mathnormal")return null;var n=e.mode,i=ROe[r];if(i)return typeof i=="function"?i(e):i;var a=e.text;if(EOe.has(a))return null;if(ei[n][a]){var o=ei[n][a].replace;o&&(a=o)}var l=oD[r].fontName;return TD(a,l,n)?oD[r].variant:null},"getVariant");s(VL,"isNumberPunctuation");mo=s(function(t,r,n){if(t.length===1){var i=On(t[0],r);return n&&i instanceof Nt&&i.type==="mo"&&(i.setAttribute("lspace","0em"),i.setAttribute("rspace","0em")),[i]}for(var a=[],o,l=0;l=1&&(o.type==="mn"||VL(o))){var h=u.children[0];h instanceof Nt&&h.type==="mn"&&(h.children=[...o.children,...h.children],a.pop())}else if(o.type==="mi"&&o.children.length===1){var d=o.children[0];if(d instanceof mi&&d.text==="\u0338"&&(u.type==="mo"||u.type==="mi"||u.type==="mn")){var f=u.children[0];f instanceof mi&&f.text.length>0&&(f.text=f.text.slice(0,1)+"\u0338"+f.text.slice(1),a.pop())}}}a.push(u),o=u}return a},"buildExpression"),jh=s(function(t,r,n){return wD(mo(t,r,n))},"buildExpressionRow"),On=s(function(t,r){if(!t)return new Nt("mrow");if(Uk[t.type])return Uk[t.type](t,r);throw new Pt("Got group of unknown type: '"+t.type+"'")},"buildGroup");s(MX,"buildMathML");_Oe=[[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]],NX=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],PX=s(function(t,r){return r.size<2?t:_Oe[t-1][r.size-1]},"sizeAtStyle"),Xk=class e{static{s(this,"Options")}constructor(t){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=t.style,this.color=t.color,this.size=t.size||e.BASESIZE,this.textSize=t.textSize||this.size,this.phantom=!!t.phantom,this.font=t.font||"",this.fontFamily=t.fontFamily||"",this.fontWeight=t.fontWeight||"",this.fontShape=t.fontShape||"",this.sizeMultiplier=NX[this.size-1],this.maxSize=t.maxSize,this.minRuleThickness=t.minRuleThickness,this._fontMetrics=void 0}extend(t){var r={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};return Object.assign(r,t),new e(r)}havingStyle(t){return this.style===t?this:this.extend({style:t,size:PX(this.textSize,t)})}havingCrampedStyle(){return this.havingStyle(this.style.cramp())}havingSize(t){return this.size===t&&this.textSize===t?this:this.extend({style:this.style.text(),size:t,textSize:t,sizeMultiplier:NX[t-1]})}havingBaseStyle(t){t=t||this.style.text();var r=PX(e.BASESIZE,t);return this.size===r&&this.textSize===e.BASESIZE&&this.style===t?this:this.extend({style:t,size:r})}havingBaseSizing(){var t;switch(this.style.id){case 4:case 5:t=3;break;case 6:case 7:t=1;break;default:t=6}return this.extend({style:this.style.text(),size:t})}withColor(t){return this.extend({color:t})}withPhantom(){return this.extend({phantom:!0})}withFont(t){return this.extend({font:t})}withTextFontFamily(t){return this.extend({fontFamily:t,font:""})}withTextFontWeight(t){return this.extend({fontWeight:t,font:""})}withTextFontShape(t){return this.extend({fontShape:t,font:""})}sizingClasses(t){return t.size!==this.size?["sizing","reset-size"+t.size,"size"+this.size]:[]}baseSizingClasses(){return this.size!==e.BASESIZE?["sizing","reset-size"+this.size,"size"+e.BASESIZE]:[]}fontMetrics(){return this._fontMetrics||(this._fontMetrics=dOe(this.size)),this._fontMetrics}getColor(){return this.phantom?"transparent":this.color}};Xk.BASESIZE=6;yK=s(function(t){return new Xk({style:t.displayMode?Pr.DISPLAY:Pr.TEXT,maxSize:t.maxSize,minRuleThickness:t.minRuleThickness})},"optionsFromSettings"),vK=s(function(t,r){if(r.displayMode){var n=["katex-display"];r.leqno&&n.push("leqno"),r.fleqn&&n.push("fleqn"),t=Mt(n,[t])}return t},"displayWrap"),LOe=s(function(t,r,n){var i=yK(n),a;if(n.output==="mathml")return MX(t,r,i,n.displayMode,!0);if(n.output==="html"){var o=hD(t,i);a=Mt(["katex"],[o])}else{var l=MX(t,r,i,n.displayMode,!1),u=hD(t,i);a=Mt(["katex"],[l,u])}return vK(a,n)},"buildTree"),DOe=s(function(t,r,n){var i=yK(n),a=hD(t,i),o=Mt(["katex"],[a]);return vK(o,n)},"buildHTMLTree"),IOe={widehat:"^",widecheck:"\u02C7",widetilde:"~",utilde:"~",overleftarrow:"\u2190",underleftarrow:"\u2190",xleftarrow:"\u2190",overrightarrow:"\u2192",underrightarrow:"\u2192",xrightarrow:"\u2192",underbrace:"\u23DF",overbrace:"\u23DE",underbracket:"\u23B5",overbracket:"\u23B4",overgroup:"\u23E0",undergroup:"\u23E1",overleftrightarrow:"\u2194",underleftrightarrow:"\u2194",xleftrightarrow:"\u2194",Overrightarrow:"\u21D2",xRightarrow:"\u21D2",overleftharpoon:"\u21BC",xleftharpoonup:"\u21BC",overrightharpoon:"\u21C0",xrightharpoonup:"\u21C0",xLeftarrow:"\u21D0",xLeftrightarrow:"\u21D4",xhookleftarrow:"\u21A9",xhookrightarrow:"\u21AA",xmapsto:"\u21A6",xrightharpoondown:"\u21C1",xleftharpoondown:"\u21BD",xrightleftharpoons:"\u21CC",xleftrightharpoons:"\u21CB",xtwoheadleftarrow:"\u219E",xtwoheadrightarrow:"\u21A0",xlongequal:"=",xtofrom:"\u21C4",xrightleftarrows:"\u21C4",xrightequilibrium:"\u21CC",xleftequilibrium:"\u21CB","\\cdrightarrow":"\u2192","\\cdleftarrow":"\u2190","\\cdlongequal":"="},ew=s(function(t){var r=new Nt("mo",[new mi(IOe[t.replace(/^\\/,"")])]);return r.setAttribute("stretchy","true"),r},"stretchyMathML"),MOe={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],overbracket:[["leftbracketover","rightbracketover"],1.6,440],underbracket:[["leftbracketunder","rightbracketunder"],1.6,410],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]},NOe=new Set(["widehat","widecheck","widetilde","utilde"]),tw=s(function(t,r){function n(){var l=4e5,u=t.label.slice(1);if(NOe.has(u)&&"base"in t){var h=t.base.type==="ordgroup"?t.base.body.length:1,d,f,p;if(h>5)u==="widehat"||u==="widecheck"?(d=420,l=2364,p=.42,f=u+"4"):(d=312,l=2340,p=.34,f="tilde4");else{var m=[1,1,2,2,3,3][h];u==="widehat"||u==="widecheck"?(l=[0,1062,2364,2364,2364][m],d=[0,239,300,360,420][m],p=[0,.24,.3,.3,.36,.42][m],f=u+m):(l=[0,600,1033,2339,2340][m],d=[0,260,286,306,312][m],p=[0,.26,.286,.3,.306,.34][m],f="tilde"+m)}var g=new ac(f),y=new pl([g],{width:"100%",height:$t(p),viewBox:"0 0 "+l+" "+d,preserveAspectRatio:"none"});return{span:Yh([],[y],r),minWidth:0,height:p}}else{var v=[],x=MOe[u];if(!x)throw new Error('No SVG data for "'+u+'".');var[b,T,w]=x,C=w/1e3,k=b.length,S,A;if(k===1){if(x.length!==4)throw new Error('Expected 4-tuple for single-path SVG data "'+u+'".');S=["hide-tail"],A=[x[3]]}else if(k===2)S=["halfarrow-left","halfarrow-right"],A=["xMinYMin","xMaxYMin"];else if(k===3)S=["brace-left","brace-center","brace-right"],A=["xMinYMin","xMidYMin","xMaxYMin"];else throw new Error(`Correct katexImagesData or update code here to support + `+k+" children.");for(var M=0;M0&&(i.style.minWidth=$t(a)),i},"stretchySvg"),POe=s(function(t,r,n,i,a){var o,l=t.height+t.depth+n+i;if(/fbox|color|angl/.test(r)){if(o=Mt(["stretchy",r],[],a),r==="fbox"){var u=a.color&&a.getColor();u&&(o.style.borderColor=u)}}else{var h=[];/^[bx]cancel$/.test(r)&&h.push(new dx({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(r)&&h.push(new dx({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"}));var d=new pl(h,{width:"100%",height:$t(l)});o=Yh([],[d],a)}return o.height=l,o.style.height=$t(l),o},"stretchyEnclose"),OOe={bin:1,close:1,inner:1,open:1,punct:1,rel:1},BOe={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1};s($Oe,"isAtom");s(Vr,"assertNodeType");s(rw,"assertSymbolNodeType");s(nw,"checkSymbolNodeType");xK=s(e=>{if(e instanceof cs)return e;if(hOe(e)&&e.children.length===1)return xK(e.children[0])},"getBaseSymbol"),ED=s((e,t)=>{var r,n,i;e&&e.type==="supsub"?(n=Vr(e.base,"accent"),r=n.base,e.base=r,i=uOe(vn(e,t)),e.base=n):(n=Vr(e,"accent"),r=n.base);var a=vn(r,t.havingCrampedStyle()),o=n.isShifty&&ku(r),l=0;if(o){var u,h;l=(u=(h=xK(a))==null?void 0:h.skew)!=null?u:0}var d=n.label==="\\c",f=d?a.height+a.depth:Math.min(a.height,t.fontMetrics().xHeight),p;if(n.isStretchy)p=tw(n,t),p=yn({positionType:"firstBaseline",children:[{type:"elem",elem:a},{type:"elem",elem:p,wrapperClasses:["svg-align"],wrapperStyle:l>0?{width:"calc(100% - "+$t(2*l)+")",marginLeft:$t(2*l)}:void 0}]});else{var m,g;n.label==="\\vec"?(m=fK("vec",t),g=dK.vec[1]):(m=Jk({type:"textord",mode:n.mode,text:n.label},t,"textord"),m=cOe(m),m.italic=0,g=m.width,d&&(f+=m.depth)),p=Mt(["accent-body"],[m]);var y=n.label==="\\textcircled";y&&(p.classes.push("accent-full"),f=a.height);var v=l;y||(v-=g/2),p.style.left=$t(v),n.label==="\\textcircled"&&(p.style.top=".2em"),p=yn({positionType:"firstBaseline",children:[{type:"elem",elem:a},{type:"kern",size:-f},{type:"elem",elem:p}]})}var x=Mt(["mord","accent"],[p],t);return i?(i.children[0]=x,i.height=Math.max(x.height,i.height),i.classes[0]="mord",i):x},"htmlBuilder$a"),bK=s((e,t)=>{var r=e.isStretchy?ew(e.label):new Nt("mo",[Fo(e.label,e.mode)]),n=new Nt("mover",[On(e.base,t),r]);return n.setAttribute("accent","true"),n},"mathmlBuilder$9"),FOe=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map(e=>"\\"+e).join("|"));qt({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:s((e,t)=>{var r=Yk(t[0]),n=!FOe.test(e.funcName),i=!n||e.funcName==="\\widehat"||e.funcName==="\\widetilde"||e.funcName==="\\widecheck";return{type:"accent",mode:e.parser.mode,label:e.funcName,isStretchy:n,isShifty:i,base:r}},"handler"),htmlBuilder:ED,mathmlBuilder:bK});qt({type:"accent",names:["\\'","\\`","\\^","\\~","\\=","\\u","\\.",'\\"',"\\c","\\r","\\H","\\v","\\textcircled"],props:{numArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["primitive"]},handler:s((e,t)=>{var r=t[0],n=e.parser.mode;return n==="math"&&(e.parser.settings.reportNonstrict("mathVsTextAccents","LaTeX's accent "+e.funcName+" works only in text mode"),n="text"),{type:"accent",mode:n,label:e.funcName,isStretchy:!1,isShifty:!0,base:r}},"handler"),htmlBuilder:ED,mathmlBuilder:bK});qt({type:"accentUnder",names:["\\underleftarrow","\\underrightarrow","\\underleftrightarrow","\\undergroup","\\underlinesegment","\\utilde"],props:{numArgs:1},handler:s((e,t)=>{var{parser:r,funcName:n}=e,i=t[0];return{type:"accentUnder",mode:r.mode,label:n,base:i}},"handler"),htmlBuilder:s((e,t)=>{var r=vn(e.base,t),n=tw(e,t),i=e.label==="\\utilde"?.12:0,a=yn({positionType:"top",positionData:r.height,children:[{type:"elem",elem:n,wrapperClasses:["svg-align"]},{type:"kern",size:i},{type:"elem",elem:r}]});return Mt(["mord","accentunder"],[a],t)},"htmlBuilder"),mathmlBuilder:s((e,t)=>{var r=ew(e.label),n=new Nt("munder",[On(e.base,t),r]);return n.setAttribute("accentunder","true"),n},"mathmlBuilder")});Bk=s(e=>{var t=new Nt("mpadded",e?[e]:[]);return t.setAttribute("width","+0.6em"),t.setAttribute("lspace","0.3em"),t},"paddedNode");qt({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(e,t,r){var{parser:n,funcName:i}=e;return{type:"xArrow",mode:n.mode,label:i,body:t[0],below:r[0]}},htmlBuilder(e,t){var r=t.style,n=t.havingStyle(r.sup()),i=a0(vn(e.body,n,t),t),a=e.label.slice(0,2)==="\\x"?"x":"cd";i.classes.push(a+"-arrow-pad");var o;e.below&&(n=t.havingStyle(r.sub()),o=a0(vn(e.below,n,t),t),o.classes.push(a+"-arrow-pad"));var l=tw(e,t),u=-t.fontMetrics().axisHeight+.5*l.height,h=-t.fontMetrics().axisHeight-.5*l.height-.111;(i.depth>.25||e.label==="\\xleftequilibrium")&&(h-=i.depth);var d;if(o){var f=-t.fontMetrics().axisHeight+o.height+.5*l.height+.111;d=yn({positionType:"individualShift",children:[{type:"elem",elem:i,shift:h},{type:"elem",elem:l,shift:u,wrapperClasses:["svg-align"]},{type:"elem",elem:o,shift:f}]})}else d=yn({positionType:"individualShift",children:[{type:"elem",elem:i,shift:h},{type:"elem",elem:l,shift:u,wrapperClasses:["svg-align"]}]});return Mt(["mrel","x-arrow"],[d],t)},mathmlBuilder(e,t){var r=ew(e.label);r.setAttribute("minsize",e.label.charAt(0)==="x"?"1.75em":"3.0em");var n;if(e.body){var i=Bk(On(e.body,t));if(e.below){var a=Bk(On(e.below,t));n=new Nt("munderover",[r,a,i])}else n=new Nt("mover",[r,i])}else if(e.below){var o=Bk(On(e.below,t));n=new Nt("munder",[r,o])}else n=Bk(),n=new Nt("mover",[r,n]);return n}});s(TK,"htmlBuilder$9");s(CK,"mathmlBuilder$8");qt({type:"mclass",names:["\\mathord","\\mathbin","\\mathrel","\\mathopen","\\mathclose","\\mathpunct","\\mathinner"],props:{numArgs:1,primitive:!0},handler(e,t){var{parser:r,funcName:n}=e,i=t[0];return{type:"mclass",mode:r.mode,mclass:"m"+n.slice(5),body:Pi(i),isCharacterBox:ku(i)}},htmlBuilder:TK,mathmlBuilder:CK});iw=s(e=>{var t=e.type==="ordgroup"&&e.body.length?e.body[0]:e;return t.type==="atom"&&(t.family==="bin"||t.family==="rel")?"m"+t.family:"mord"},"binrelClass");qt({type:"mclass",names:["\\@binrel"],props:{numArgs:2},handler(e,t){var{parser:r}=e;return{type:"mclass",mode:r.mode,mclass:iw(t[0]),body:Pi(t[1]),isCharacterBox:ku(t[1])}}});qt({type:"mclass",names:["\\stackrel","\\overset","\\underset"],props:{numArgs:2},handler(e,t){var{parser:r,funcName:n}=e,i=t[1],a=t[0],o;n!=="\\stackrel"?o=iw(i):o="mrel";var l={type:"op",mode:i.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:n!=="\\stackrel",body:Pi(i)},u={type:"supsub",mode:a.mode,base:l,sup:n==="\\underset"?null:a,sub:n==="\\underset"?a:null};return{type:"mclass",mode:r.mode,mclass:o,body:[u],isCharacterBox:ku(u)}},htmlBuilder:TK,mathmlBuilder:CK});qt({type:"pmb",names:["\\pmb"],props:{numArgs:1,allowedInText:!0},handler(e,t){var{parser:r}=e;return{type:"pmb",mode:r.mode,mclass:iw(t[0]),body:Pi(t[0])}},htmlBuilder(e,t){var r=ji(e.body,t,!0),n=Mt([e.mclass],r,t);return n.style.textShadow="0.02em 0.01em 0.04px",n},mathmlBuilder(e,t){var r=mo(e.body,t),n=new Nt("mstyle",r);return n.setAttribute("style","text-shadow: 0.02em 0.01em 0.04px"),n}});GOe={">":"\\\\cdrightarrow","<":"\\\\cdleftarrow","=":"\\\\cdlongequal",A:"\\uparrow",V:"\\downarrow","|":"\\Vert",".":"no arrow"},OX=s(()=>({type:"styling",body:[],mode:"math",style:"display",resetFont:!0}),"newCell"),BX=s(e=>e.type==="textord"&&e.text==="@","isStartOfArrow"),zOe=s((e,t)=>(e.type==="mathord"||e.type==="atom")&&e.text===t,"isLabelEnd");s(VOe,"cdArrow");s(WOe,"parseCD");qt({type:"cdlabel",names:["\\\\cdleft","\\\\cdright"],props:{numArgs:1},handler(e,t){var{parser:r,funcName:n}=e;return{type:"cdlabel",mode:r.mode,side:n.slice(4),label:t[0]}},htmlBuilder(e,t){var r=t.havingStyle(t.style.sup()),n=a0(vn(e.label,r,t),t);return n.classes.push("cd-label-"+e.side),n.style.bottom=$t(.8-n.depth),n.height=0,n.depth=0,n},mathmlBuilder(e,t){var r=new Nt("mrow",[On(e.label,t)]);return r=new Nt("mpadded",[r]),r.setAttribute("width","0"),e.side==="left"&&r.setAttribute("lspace","-1width"),r.setAttribute("voffset","0.7em"),r=new Nt("mstyle",[r]),r.setAttribute("displaystyle","false"),r.setAttribute("scriptlevel","1"),r}});qt({type:"cdlabelparent",names:["\\\\cdparent"],props:{numArgs:1},handler(e,t){var{parser:r}=e;return{type:"cdlabelparent",mode:r.mode,fragment:t[0]}},htmlBuilder(e,t){var r=a0(vn(e.fragment,t),t);return r.classes.push("cd-vert-arrow"),r},mathmlBuilder(e,t){return new Nt("mrow",[On(e.fragment,t)])}});qt({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler(e,t){for(var{parser:r}=e,n=Vr(t[0],"ordgroup"),i=n.body,a="",o=0;o=1114111)throw new Pt("\\@char with invalid code point "+a);return u<=65535?h=String.fromCharCode(u):(u-=65536,h=String.fromCharCode((u>>10)+55296,(u&1023)+56320)),{type:"textord",mode:r.mode,text:h}}});kK=s((e,t)=>{var r=ji(e.body,t.withColor(e.color),!1);return Su(r)},"htmlBuilder$8"),wK=s((e,t)=>{var r=mo(e.body,t.withColor(e.color)),n=new Nt("mstyle",r);return n.setAttribute("mathcolor",e.color),n},"mathmlBuilder$7");qt({type:"color",names:["\\textcolor"],props:{numArgs:2,allowedInText:!0,argTypes:["color","original"]},handler(e,t){var{parser:r}=e,n=Vr(t[0],"color-token").color,i=t[1];return{type:"color",mode:r.mode,color:n,body:Pi(i)}},htmlBuilder:kK,mathmlBuilder:wK});qt({type:"color",names:["\\color"],props:{numArgs:1,allowedInText:!0,argTypes:["color"]},handler(e,t){var{parser:r,breakOnTokenText:n}=e,i=Vr(t[0],"color-token").color;r.gullet.macros.set("\\current@color",i);var a=r.parseExpression(!0,n);return{type:"color",mode:r.mode,color:i,body:a}},htmlBuilder:kK,mathmlBuilder:wK});qt({type:"cr",names:["\\\\"],props:{numArgs:0,numOptionalArgs:0,allowedInText:!0},handler(e,t,r){var{parser:n}=e,i=n.gullet.future().text==="["?n.parseSizeGroup(!0):null,a=!n.settings.displayMode||!n.settings.useStrictBehavior("newLineInDisplayMode","In LaTeX, \\\\ or \\newline does nothing in display mode");return{type:"cr",mode:n.mode,newLine:a,size:i&&Vr(i,"size").value}},htmlBuilder(e,t){var r=Mt(["mspace"],[],t);return e.newLine&&(r.classes.push("newline"),e.size&&(r.style.marginTop=$t(oi(e.size,t)))),r},mathmlBuilder(e,t){var r=new Nt("mspace");return e.newLine&&(r.setAttribute("linebreak","newline"),e.size&&r.setAttribute("height",$t(oi(e.size,t)))),r}});dD={"\\global":"\\global","\\long":"\\\\globallong","\\\\globallong":"\\\\globallong","\\def":"\\gdef","\\gdef":"\\gdef","\\edef":"\\xdef","\\xdef":"\\xdef","\\let":"\\\\globallet","\\futurelet":"\\\\globalfuture"},SK=s(e=>{var t=e.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(t))throw new Pt("Expected a control sequence",e);return t},"checkControlSequence"),qOe=s(e=>{var t=e.gullet.popToken();return t.text==="="&&(t=e.gullet.popToken(),t.text===" "&&(t=e.gullet.popToken())),t},"getRHS"),EK=s((e,t,r,n)=>{var i=e.gullet.macros.get(r.text);i==null&&(r.noexpand=!0,i={tokens:[r],numArgs:0,unexpandable:!e.gullet.isExpandable(r.text)}),e.gullet.macros.set(t,i,n)},"letCommand");qt({type:"internal",names:["\\global","\\long","\\\\globallong"],props:{numArgs:0,allowedInText:!0},handler(e){var{parser:t,funcName:r}=e;t.consumeSpaces();var n=t.fetch();if(dD[n.text])return(r==="\\global"||r==="\\\\globallong")&&(n.text=dD[n.text]),Vr(t.parseFunction(),"internal");throw new Pt("Invalid token after macro prefix",n)}});qt({type:"internal",names:["\\def","\\gdef","\\edef","\\xdef"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:r}=e,n=t.gullet.popToken(),i=n.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(i))throw new Pt("Expected a control sequence",n);for(var a=0,o,l=[[]];t.gullet.future().text!=="{";)if(n=t.gullet.popToken(),n.text==="#"){if(t.gullet.future().text==="{"){o=t.gullet.future(),l[a].push("{");break}if(n=t.gullet.popToken(),!/^[1-9]$/.test(n.text))throw new Pt('Invalid argument number "'+n.text+'"');if(parseInt(n.text)!==a+1)throw new Pt('Argument number "'+n.text+'" out of order');a++,l.push([])}else{if(n.text==="EOF")throw new Pt("Expected a macro definition");l[a].push(n.text)}var{tokens:u}=t.gullet.consumeArg();return o&&u.unshift(o),(r==="\\edef"||r==="\\xdef")&&(u=t.gullet.expandTokens(u),u.reverse()),t.gullet.macros.set(i,{tokens:u,numArgs:a,delimiters:l},r===dD[r]),{type:"internal",mode:t.mode}}});qt({type:"internal",names:["\\let","\\\\globallet"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:r}=e,n=SK(t.gullet.popToken());t.gullet.consumeSpaces();var i=qOe(t);return EK(t,n,i,r==="\\\\globallet"),{type:"internal",mode:t.mode}}});qt({type:"internal",names:["\\futurelet","\\\\globalfuture"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:r}=e,n=SK(t.gullet.popToken()),i=t.gullet.popToken(),a=t.gullet.popToken();return EK(t,n,a,r==="\\\\globalfuture"),t.gullet.pushToken(a),t.gullet.pushToken(i),{type:"internal",mode:t.mode}}});lx=s(function(t,r,n){var i=ei.math[t]&&ei.math[t].replace,a=TD(i||t,r,n);if(!a)throw new Error("Unsupported symbol "+t+" and font size "+r+".");return a},"getMetrics"),AD=s(function(t,r,n,i){var a=n.havingBaseStyle(r),o=Mt(i.concat(a.sizingClasses(n)),[t],n),l=a.sizeMultiplier/n.sizeMultiplier;return o.height*=l,o.depth*=l,o.maxFontSize=a.sizeMultiplier,o},"styleWrap"),AK=s(function(t,r,n){var i=r.havingBaseStyle(n),a=(1-r.sizeMultiplier/i.sizeMultiplier)*r.fontMetrics().axisHeight;t.classes.push("delimcenter"),t.style.top=$t(a),t.height-=a,t.depth+=a},"centerSpan"),HOe=s(function(t,r,n,i,a,o){var l=os(t,"Main-Regular",a,i),u=AD(l,r,i,o);return n&&AK(u,i,r),u},"makeSmallDelim"),UOe=s(function(t,r,n,i){return os(t,"Size"+r+"-Regular",n,i)},"mathrmSize"),RK=s(function(t,r,n,i,a,o){var l=UOe(t,r,a,i),u=AD(Mt(["delimsizing","size"+r],[l],i),Pr.TEXT,i,o);return n&&AK(u,i,Pr.TEXT),u},"makeLargeDelim"),WL=s(function(t,r,n){var i;r==="Size1-Regular"?i="delim-size1":i="delim-size4";var a=Mt(["delimsizinginner",i],[Mt([],[os(t,r,n)])]);return{type:"elem",elem:a}},"makeGlyphSpan"),qL=s(function(t,r,n){var i=ic["Size4-Regular"][t.charCodeAt(0)]?ic["Size4-Regular"][t.charCodeAt(0)][4]:ic["Size1-Regular"][t.charCodeAt(0)][4],a=new ac("inner",nOe(t,Math.round(1e3*r))),o=new pl([a],{width:$t(i),height:$t(r),style:"width:"+$t(i),viewBox:"0 0 "+1e3*i+" "+Math.round(1e3*r),preserveAspectRatio:"xMinYMin"}),l=Yh([],[o],n);return l.height=r,l.style.height=$t(r),l.style.width=$t(i),{type:"elem",elem:l}},"makeInner"),fD=.008,$k={type:"kern",size:-1*fD},YOe=new Set(["|","\\lvert","\\rvert","\\vert"]),jOe=new Set(["\\|","\\lVert","\\rVert","\\Vert"]),_K=s(function(t,r,n,i,a,o){var l,u,h,d,f="",p=0;l=h=d=t,u=null;var m="Size1-Regular";t==="\\uparrow"?h=d="\u23D0":t==="\\Uparrow"?h=d="\u2016":t==="\\downarrow"?l=h="\u23D0":t==="\\Downarrow"?l=h="\u2016":t==="\\updownarrow"?(l="\\uparrow",h="\u23D0",d="\\downarrow"):t==="\\Updownarrow"?(l="\\Uparrow",h="\u2016",d="\\Downarrow"):YOe.has(t)?(h="\u2223",f="vert",p=333):jOe.has(t)?(h="\u2225",f="doublevert",p=556):t==="["||t==="\\lbrack"?(l="\u23A1",h="\u23A2",d="\u23A3",m="Size4-Regular",f="lbrack",p=667):t==="]"||t==="\\rbrack"?(l="\u23A4",h="\u23A5",d="\u23A6",m="Size4-Regular",f="rbrack",p=667):t==="\\lfloor"||t==="\u230A"?(h=l="\u23A2",d="\u23A3",m="Size4-Regular",f="lfloor",p=667):t==="\\lceil"||t==="\u2308"?(l="\u23A1",h=d="\u23A2",m="Size4-Regular",f="lceil",p=667):t==="\\rfloor"||t==="\u230B"?(h=l="\u23A5",d="\u23A6",m="Size4-Regular",f="rfloor",p=667):t==="\\rceil"||t==="\u2309"?(l="\u23A4",h=d="\u23A5",m="Size4-Regular",f="rceil",p=667):t==="("||t==="\\lparen"?(l="\u239B",h="\u239C",d="\u239D",m="Size4-Regular",f="lparen",p=875):t===")"||t==="\\rparen"?(l="\u239E",h="\u239F",d="\u23A0",m="Size4-Regular",f="rparen",p=875):t==="\\{"||t==="\\lbrace"?(l="\u23A7",u="\u23A8",d="\u23A9",h="\u23AA",m="Size4-Regular"):t==="\\}"||t==="\\rbrace"?(l="\u23AB",u="\u23AC",d="\u23AD",h="\u23AA",m="Size4-Regular"):t==="\\lgroup"||t==="\u27EE"?(l="\u23A7",d="\u23A9",h="\u23AA",m="Size4-Regular"):t==="\\rgroup"||t==="\u27EF"?(l="\u23AB",d="\u23AD",h="\u23AA",m="Size4-Regular"):t==="\\lmoustache"||t==="\u23B0"?(l="\u23A7",d="\u23AD",h="\u23AA",m="Size4-Regular"):(t==="\\rmoustache"||t==="\u23B1")&&(l="\u23AB",d="\u23A9",h="\u23AA",m="Size4-Regular");var g=lx(l,m,a),y=g.height+g.depth,v=lx(h,m,a),x=v.height+v.depth,b=lx(d,m,a),T=b.height+b.depth,w=0,C=1;if(u!==null){var k=lx(u,m,a);w=k.height+k.depth,C=2}var S=y+T+w,A=Math.max(0,Math.ceil((r-S)/(C*x))),M=S+A*C*x,N=i.fontMetrics().axisHeight;n&&(N*=i.sizeMultiplier);var D=M/2-N,R=[];if(f.length>0){var E=M-y-T,I=Math.round(M*1e3),L=iOe(f,Math.round(E*1e3)),P=new ac(f,L),B=$t(p/1e3),O=$t(I/1e3),$=new pl([P],{width:B,height:O,viewBox:"0 0 "+p+" "+I}),G=Yh([],[$],i);G.height=I/1e3,G.style.width=B,G.style.height=O,R.push({type:"elem",elem:G})}else{if(R.push(WL(d,m,a)),R.push($k),u===null){var V=M-y-T+2*fD;R.push(qL(h,V,i))}else{var z=(M-y-T-w)/2+2*fD;R.push(qL(h,z,i)),R.push($k),R.push(WL(u,m,a)),R.push($k),R.push(qL(h,z,i))}R.push($k),R.push(WL(l,m,a))}var W=i.havingBaseStyle(Pr.TEXT),H=yn({positionType:"bottom",positionData:D,children:R});return AD(Mt(["delimsizing","mult"],[H],W),Pr.TEXT,i,o)},"makeStackedDelim"),HL=80,UL=.08,YL=s(function(t,r,n,i,a){var o=rOe(t,i,n),l=new ac(t,o),u=new pl([l],{width:"400em",height:$t(r),viewBox:"0 0 400000 "+n,preserveAspectRatio:"xMinYMin slice"});return Yh(["hide-tail"],[u],a)},"sqrtSvg"),XOe=s(function(t,r){var n=r.havingBaseSizing(),i=NK("\\surd",t*n.sizeMultiplier,MK,n),a=n.sizeMultiplier,o=Math.max(0,r.minRuleThickness-r.fontMetrics().sqrtRuleThickness),l,u,h,d,f;return i.type==="small"?(d=1e3+1e3*o+HL,t<1?a=1:t<1.4&&(a=.7),u=(1+o+UL)/a,h=(1+o)/a,l=YL("sqrtMain",u,d,o,r),l.style.minWidth="0.853em",f=.833/a):i.type==="large"?(d=(1e3+HL)*cx[i.size],h=(cx[i.size]+o)/a,u=(cx[i.size]+o+UL)/a,l=YL("sqrtSize"+i.size,u,d,o,r),l.style.minWidth="1.02em",f=1/a):(u=t+o+UL,h=t+o,d=Math.floor(1e3*t+o)+HL,l=YL("sqrtTall",u,d,o,r),l.style.minWidth="0.742em",f=1.056),l.height=h,l.style.height=$t(u),{span:l,advanceWidth:f,ruleWidth:(r.fontMetrics().sqrtRuleThickness+o)*a}},"makeSqrtImage"),LK=new Set(["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","\u230A","\u230B","\\lceil","\\rceil","\u2308","\u2309","\\surd"]),KOe=new Set(["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","\u27EE","\u27EF","\\lmoustache","\\rmoustache","\u23B0","\u23B1"]),DK=new Set(["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"]),cx=[0,1.2,1.8,2.4,3],IK=s(function(t,r,n,i,a){if(t==="<"||t==="\\lt"||t==="\u27E8"?t="\\langle":(t===">"||t==="\\gt"||t==="\u27E9")&&(t="\\rangle"),LK.has(t)||DK.has(t))return RK(t,r,!1,n,i,a);if(KOe.has(t))return _K(t,cx[r],!1,n,i,a);throw new Pt("Illegal delimiter: '"+t+"'")},"makeSizedDelim"),ZOe=[{type:"small",style:Pr.SCRIPTSCRIPT},{type:"small",style:Pr.SCRIPT},{type:"small",style:Pr.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],QOe=[{type:"small",style:Pr.SCRIPTSCRIPT},{type:"small",style:Pr.SCRIPT},{type:"small",style:Pr.TEXT},{type:"stack"}],MK=[{type:"small",style:Pr.SCRIPTSCRIPT},{type:"small",style:Pr.SCRIPT},{type:"small",style:Pr.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}],JOe=s(function(t){if(t.type==="small")return"Main-Regular";if(t.type==="large")return"Size"+t.size+"-Regular";if(t.type==="stack")return"Size4-Regular";var r=t.type;throw new Error("Add support for delim type '"+r+"' here.")},"delimTypeToFont"),NK=s(function(t,r,n,i){for(var a=Math.min(2,3-i.style.size),o=a;or)return l}return n[n.length-1]},"traverseSequence"),pD=s(function(t,r,n,i,a,o){t==="<"||t==="\\lt"||t==="\u27E8"?t="\\langle":(t===">"||t==="\\gt"||t==="\u27E9")&&(t="\\rangle");var l;DK.has(t)?l=ZOe:LK.has(t)?l=MK:l=QOe;var u=NK(t,r,l,i);return u.type==="small"?HOe(t,u.style,n,i,a,o):u.type==="large"?RK(t,u.size,n,i,a,o):_K(t,r,n,i,a,o)},"makeCustomSizedDelim"),jL=s(function(t,r,n,i,a,o){var l=i.fontMetrics().axisHeight*i.sizeMultiplier,u=901,h=5/i.fontMetrics().ptPerEm,d=Math.max(r-l,n+l),f=Math.max(d/500*u,2*d-h);return pD(t,f,!0,i,a,o)},"makeLeftRightDelim"),$X={"\\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}},e9e=new Set(["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","\u230A","\u230B","\\lceil","\\rceil","\u2308","\u2309","<",">","\\langle","\u27E8","\\rangle","\u27E9","\\lt","\\gt","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","\u27EE","\u27EF","\\lmoustache","\\rmoustache","\u23B0","\u23B1","/","\\backslash","|","\\vert","\\|","\\Vert","\\uparrow","\\Uparrow","\\downarrow","\\Downarrow","\\updownarrow","\\Updownarrow","."]);s(FX,"isMiddleDelimNode");s(aw,"checkDelimiter");qt({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:s((e,t)=>{var r=aw(t[0],e);return{type:"delimsizing",mode:e.parser.mode,size:$X[e.funcName].size,mclass:$X[e.funcName].mclass,delim:r.text}},"handler"),htmlBuilder:s((e,t)=>e.delim==="."?Mt([e.mclass]):IK(e.delim,e.size,t,e.mode,[e.mclass]),"htmlBuilder"),mathmlBuilder:s(e=>{var t=[];e.delim!=="."&&t.push(Fo(e.delim,e.mode));var r=new Nt("mo",t);e.mclass==="mopen"||e.mclass==="mclose"?r.setAttribute("fence","true"):r.setAttribute("fence","false"),r.setAttribute("stretchy","true");var n=$t(cx[e.size]);return r.setAttribute("minsize",n),r.setAttribute("maxsize",n),r},"mathmlBuilder")});s(GX,"assertParsed");qt({type:"leftright-right",names:["\\right"],props:{numArgs:1,primitive:!0},handler:s((e,t)=>{var r=e.parser.gullet.macros.get("\\current@color");if(r&&typeof r!="string")throw new Pt("\\current@color set to non-string in \\right");return{type:"leftright-right",mode:e.parser.mode,delim:aw(t[0],e).text,color:r}},"handler")});qt({type:"leftright",names:["\\left"],props:{numArgs:1,primitive:!0},handler:s((e,t)=>{var r=aw(t[0],e),n=e.parser;++n.leftrightDepth;var i=n.parseExpression(!1);--n.leftrightDepth,n.expect("\\right",!1);var a=Vr(n.parseFunction(),"leftright-right");return{type:"leftright",mode:n.mode,body:i,left:r.text,right:a.delim,rightColor:a.color}},"handler"),htmlBuilder:s((e,t)=>{GX(e);for(var r=ji(e.body,t,!0,["mopen","mclose"]),n=0,i=0,a=!1,o=0;o{GX(e);var r=mo(e.body,t);if(e.left!=="."){var n=new Nt("mo",[Fo(e.left,e.mode)]);n.setAttribute("fence","true"),r.unshift(n)}if(e.right!=="."){var i=new Nt("mo",[Fo(e.right,e.mode)]);i.setAttribute("fence","true"),e.rightColor&&i.setAttribute("mathcolor",e.rightColor),r.push(i)}return wD(r)},"mathmlBuilder")});qt({type:"middle",names:["\\middle"],props:{numArgs:1,primitive:!0},handler:s((e,t)=>{var r=aw(t[0],e);if(!e.parser.leftrightDepth)throw new Pt("\\middle without preceding \\left",r);return{type:"middle",mode:e.parser.mode,delim:r.text}},"handler"),htmlBuilder:s((e,t)=>{var r;return e.delim==="."?r=fx(t,[]):(r=IK(e.delim,1,t,e.mode,[]),r.isMiddle={delim:e.delim,options:t}),r},"htmlBuilder"),mathmlBuilder:s((e,t)=>{var r=e.delim==="\\vert"||e.delim==="|"?Fo("|","text"):Fo(e.delim,e.mode),n=new Nt("mo",[r]);return n.setAttribute("fence","true"),n.setAttribute("lspace","0.05em"),n.setAttribute("rspace","0.05em"),n},"mathmlBuilder")});sw=s((e,t)=>{var r=a0(vn(e.body,t),t),n=e.label.slice(1),i=t.sizeMultiplier,a,o,l=ku(e.body);if(n==="sout")a=Mt(["stretchy","sout"]),a.height=t.fontMetrics().defaultRuleThickness/i,o=-.5*t.fontMetrics().xHeight;else if(n==="phase"){var u=oi({number:.6,unit:"pt"},t),h=oi({number:.35,unit:"ex"},t),d=t.havingBaseSizing();i=i/d.sizeMultiplier;var f=r.height+r.depth+u+h;r.style.paddingLeft=$t(f/2+u);var p=Math.floor(1e3*f*i),m=eOe(p),g=new pl([new ac("phase",m)],{width:"400em",height:$t(p/1e3),viewBox:"0 0 400000 "+p,preserveAspectRatio:"xMinYMin slice"});a=Yh(["hide-tail"],[g],t),a.style.height=$t(f),o=r.depth+u+h}else{/cancel/.test(n)?l||r.classes.push("cancel-pad"):n==="angl"?r.classes.push("anglpad"):r.classes.push("boxpad");var y,v,x=0;/box/.test(n)?(x=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness),y=t.fontMetrics().fboxsep+(n==="colorbox"?0:x),v=y):n==="angl"?(x=Math.max(t.fontMetrics().defaultRuleThickness,t.minRuleThickness),y=4*x,v=Math.max(0,.25-r.depth)):(y=l?.2:0,v=y),a=POe(r,n,y,v,t),/fbox|boxed|fcolorbox/.test(n)?(a.style.borderStyle="solid",a.style.borderWidth=$t(x)):n==="angl"&&x!==.049&&(a.style.borderTopWidth=$t(x),a.style.borderRightWidth=$t(x)),o=r.depth+v,e.backgroundColor&&(a.style.backgroundColor=e.backgroundColor,e.borderColor&&(a.style.borderColor=e.borderColor))}var b;if(e.backgroundColor)b=yn({positionType:"individualShift",children:[{type:"elem",elem:a,shift:o},{type:"elem",elem:r,shift:0}]});else{var T=/cancel|phase/.test(n)?["svg-align"]:[];b=yn({positionType:"individualShift",children:[{type:"elem",elem:r,shift:0},{type:"elem",elem:a,shift:o,wrapperClasses:T}]})}return/cancel/.test(n)&&(b.height=r.height,b.depth=r.depth),/cancel/.test(n)&&!l?Mt(["mord","cancel-lap"],[b],t):Mt(["mord"],[b],t)},"htmlBuilder$7"),ow=s((e,t)=>{var r,n=new Nt(e.label.includes("colorbox")?"mpadded":"menclose",[On(e.body,t)]);switch(e.label){case"\\cancel":n.setAttribute("notation","updiagonalstrike");break;case"\\bcancel":n.setAttribute("notation","downdiagonalstrike");break;case"\\phase":n.setAttribute("notation","phasorangle");break;case"\\sout":n.setAttribute("notation","horizontalstrike");break;case"\\fbox":n.setAttribute("notation","box");break;case"\\angl":n.setAttribute("notation","actuarial");break;case"\\fcolorbox":case"\\colorbox":if(r=t.fontMetrics().fboxsep*t.fontMetrics().ptPerEm,n.setAttribute("width","+"+2*r+"pt"),n.setAttribute("height","+"+2*r+"pt"),n.setAttribute("lspace",r+"pt"),n.setAttribute("voffset",r+"pt"),e.label==="\\fcolorbox"){var i=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness);n.setAttribute("style","border: "+$t(i)+" solid "+e.borderColor)}break;case"\\xcancel":n.setAttribute("notation","updiagonalstrike downdiagonalstrike");break}return e.backgroundColor&&n.setAttribute("mathbackground",e.backgroundColor),n},"mathmlBuilder$6");qt({type:"enclose",names:["\\colorbox"],props:{numArgs:2,allowedInText:!0,argTypes:["color","hbox"]},handler(e,t,r){var{parser:n,funcName:i}=e,a=Vr(t[0],"color-token").color,o=t[1];return{type:"enclose",mode:n.mode,label:i,backgroundColor:a,body:o}},htmlBuilder:sw,mathmlBuilder:ow});qt({type:"enclose",names:["\\fcolorbox"],props:{numArgs:3,allowedInText:!0,argTypes:["color","color","hbox"]},handler(e,t,r){var{parser:n,funcName:i}=e,a=Vr(t[0],"color-token").color,o=Vr(t[1],"color-token").color,l=t[2];return{type:"enclose",mode:n.mode,label:i,backgroundColor:o,borderColor:a,body:l}},htmlBuilder:sw,mathmlBuilder:ow});qt({type:"enclose",names:["\\fbox"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!0},handler(e,t){var{parser:r}=e;return{type:"enclose",mode:r.mode,label:"\\fbox",body:t[0]}}});qt({type:"enclose",names:["\\cancel","\\bcancel","\\xcancel","\\phase"],props:{numArgs:1},handler(e,t){var{parser:r,funcName:n}=e,i=t[0];return{type:"enclose",mode:r.mode,label:n,body:i}},htmlBuilder:sw,mathmlBuilder:ow});qt({type:"enclose",names:["\\sout"],props:{numArgs:1,allowedInText:!0},handler(e,t){var{parser:r,funcName:n}=e;r.mode==="math"&&r.settings.reportNonstrict("mathVsSout","LaTeX's \\sout works only in text mode");var i=t[0];return{type:"enclose",mode:r.mode,label:n,body:i}},htmlBuilder:sw,mathmlBuilder:ow});qt({type:"enclose",names:["\\angl"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!1},handler(e,t){var{parser:r}=e;return{type:"enclose",mode:r.mode,label:"\\angl",body:t[0]}}});PK={};s(sc,"defineEnvironment");OK={};s(Te,"defineMacro");Os=class e{static{s(this,"SourceLocation")}constructor(t,r,n){this.lexer=void 0,this.start=void 0,this.end=void 0,this.lexer=t,this.start=r,this.end=n}static range(t,r){return r?!t||!t.loc||!r.loc||t.loc.lexer!==r.loc.lexer?null:new e(t.loc.lexer,t.loc.start,r.loc.end):t&&t.loc}},fo=class e{static{s(this,"Token")}constructor(t,r){this.text=void 0,this.loc=void 0,this.noexpand=void 0,this.treatAsRelax=void 0,this.text=t,this.loc=r}range(t,r){return new e(r,Os.range(this,t))}};s(zX,"getHLines");lw=s(e=>{var t=e.parser.settings;if(!t.displayMode)throw new Pt("{"+e.envName+"} can be used only in display mode.")},"validateAmsEnvironmentContext"),t9e=new Set(["gather","gather*"]);s(RD,"getAutoTag");s(Xh,"parseArray");s(_D,"dCellStyle");oc=s(function(t,r){var n,i,a=t.body.length,o=t.hLinesBeforeRow,l=0,u=new Array(a),h=[],d=Math.max(r.fontMetrics().arrayRuleWidth,r.minRuleThickness),f=1/r.fontMetrics().ptPerEm,p=5*f;if(t.colSeparationType&&t.colSeparationType==="small"){var m=r.havingStyle(Pr.SCRIPT).sizeMultiplier;p=.2778*(m/r.sizeMultiplier)}var g=t.colSeparationType==="CD"?oi({number:3,unit:"ex"},r):12*f,y=3*f,v=t.arraystretch*g,x=.7*v,b=.3*v,T=0;function w(Me){for(var re=0;re0&&(T+=.25),h.push({pos:T,isDashed:Me[re]})}for(s(w,"setHLinePos"),w(o[0]),n=0;n0&&(D+=b,SMe))for(n=0;n=l)){var J=void 0;if(i>0||t.hskipBeforeAndAfter){var he,se;J=(he=(se=W)==null?void 0:se.pregap)!=null?he:p,J!==0&&(L=Mt(["arraycolsep"],[]),L.style.width=$t(J),I.push(L))}var oe=[];for(n=0;n0){for(var Re=i0("hline",r,d),Z=i0("hdashline",r,d),ae=[{type:"elem",elem:Ee,shift:0}];h.length>0;){var ie=h.pop(),le=ie.pos-R;ie.isDashed?ae.push({type:"elem",elem:Z,shift:le}):ae.push({type:"elem",elem:Re,shift:le})}Ee=yn({positionType:"individualShift",children:ae})}if(B.length===0)return Mt(["mord"],[Ee],r);var ve=yn({positionType:"individualShift",children:B}),ne=Mt(["tag"],[ve],r);return Su([Ee,ne])},"htmlBuilder"),r9e={c:"center ",l:"left ",r:"right "},lc=s(function(t,r){for(var n=[],i=new Nt("mtd",[],["mtr-glue"]),a=new Nt("mtd",[],["mml-eqn-num"]),o=0;o0){var g=t.cols,y="",v=!1,x=0,b=g.length;g[0].type==="separator"&&(p+="top ",x=1),g[g.length-1].type==="separator"&&(p+="bottom ",b-=1);for(var T=x;T0?"left ":"",p+=M[M.length-1].length>0?"right ":"";for(var N=1;N0&&m&&(v=1),n[g]={type:"align",align:y,pregap:v,postgap:0}}return o.colSeparationType=m?"align":"alignat",o},"alignedHandler");sc({type:"array",names:["array","darray"],props:{numArgs:1},handler(e,t){var r=nw(t[0]),n=r?[t[0]]:Vr(t[0],"ordgroup").body,i=n.map(function(o){var l=rw(o),u=l.text;if("lcr".includes(u))return{type:"align",align:u};if(u==="|")return{type:"separator",separator:"|"};if(u===":")return{type:"separator",separator:":"};throw new Pt("Unknown column alignment: "+u,o)}),a={cols:i,hskipBeforeAndAfter:!0,maxNumCols:i.length};return Xh(e.parser,a,_D(e.envName))},htmlBuilder:oc,mathmlBuilder:lc});sc({type:"array",names:["matrix","pmatrix","bmatrix","Bmatrix","vmatrix","Vmatrix","matrix*","pmatrix*","bmatrix*","Bmatrix*","vmatrix*","Vmatrix*"],props:{numArgs:0},handler(e){var t={matrix:null,pmatrix:["(",")"],bmatrix:["[","]"],Bmatrix:["\\{","\\}"],vmatrix:["|","|"],Vmatrix:["\\Vert","\\Vert"]}[e.envName.replace("*","")],r="c",n={hskipBeforeAndAfter:!1,cols:[{type:"align",align:r}]};if(e.envName.charAt(e.envName.length-1)==="*"){var i=e.parser;if(i.consumeSpaces(),i.fetch().text==="["){if(i.consume(),i.consumeSpaces(),r=i.fetch().text,!"lcr".includes(r))throw new Pt("Expected l or c or r",i.nextToken);i.consume(),i.consumeSpaces(),i.expect("]"),i.consume(),n.cols=[{type:"align",align:r}]}}var a=Xh(e.parser,n,_D(e.envName)),o=Math.max(0,...a.body.map(l=>l.length));return a.cols=new Array(o).fill({type:"align",align:r}),t?{type:"leftright",mode:e.mode,body:[a],left:t[0],right:t[1],rightColor:void 0}:a},htmlBuilder:oc,mathmlBuilder:lc});sc({type:"array",names:["smallmatrix"],props:{numArgs:0},handler(e){var t={arraystretch:.5},r=Xh(e.parser,t,"script");return r.colSeparationType="small",r},htmlBuilder:oc,mathmlBuilder:lc});sc({type:"array",names:["subarray"],props:{numArgs:1},handler(e,t){var r=nw(t[0]),n=r?[t[0]]:Vr(t[0],"ordgroup").body,i=n.map(function(l){var u=rw(l),h=u.text;if("lc".includes(h))return{type:"align",align:h};throw new Pt("Unknown column alignment: "+h,l)});if(i.length>1)throw new Pt("{subarray} can contain only one column");var a={cols:i,hskipBeforeAndAfter:!1,arraystretch:.5},o=Xh(e.parser,a,"script");if(o.body.length>0&&o.body[0].length>1)throw new Pt("{subarray} can contain only one column");return o},htmlBuilder:oc,mathmlBuilder:lc});sc({type:"array",names:["cases","dcases","rcases","drcases"],props:{numArgs:0},handler(e){var t={arraystretch:1.2,cols:[{type:"align",align:"l",pregap:0,postgap:1},{type:"align",align:"l",pregap:0,postgap:0}]},r=Xh(e.parser,t,_D(e.envName));return{type:"leftright",mode:e.mode,body:[r],left:e.envName.includes("r")?".":"\\{",right:e.envName.includes("r")?"\\}":".",rightColor:void 0}},htmlBuilder:oc,mathmlBuilder:lc});sc({type:"array",names:["align","align*","aligned","split"],props:{numArgs:0},handler:BK,htmlBuilder:oc,mathmlBuilder:lc});sc({type:"array",names:["gathered","gather","gather*"],props:{numArgs:0},handler(e){t9e.has(e.envName)&&lw(e);var t={cols:[{type:"align",align:"c"}],addJot:!0,colSeparationType:"gather",autoTag:RD(e.envName),emptySingleRow:!0,leqno:e.parser.settings.leqno};return Xh(e.parser,t,"display")},htmlBuilder:oc,mathmlBuilder:lc});sc({type:"array",names:["alignat","alignat*","alignedat"],props:{numArgs:1},handler:BK,htmlBuilder:oc,mathmlBuilder:lc});sc({type:"array",names:["equation","equation*"],props:{numArgs:0},handler(e){lw(e);var t={autoTag:RD(e.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,leqno:e.parser.settings.leqno};return Xh(e.parser,t,"display")},htmlBuilder:oc,mathmlBuilder:lc});sc({type:"array",names:["CD"],props:{numArgs:0},handler(e){return lw(e),WOe(e.parser)},htmlBuilder:oc,mathmlBuilder:lc});Te("\\nonumber","\\gdef\\@eqnsw{0}");Te("\\notag","\\nonumber");qt({type:"text",names:["\\hline","\\hdashline"],props:{numArgs:0,allowedInText:!0,allowedInMath:!0},handler(e,t){throw new Pt(e.funcName+" valid only within array environment")}});VX=PK;qt({type:"environment",names:["\\begin","\\end"],props:{numArgs:1,argTypes:["text"]},handler(e,t){var{parser:r,funcName:n}=e,i=t[0];if(i.type!=="ordgroup")throw new Pt("Invalid environment name",i);for(var a="",o=0;o{var r=e.font,n=t.withFont(r);return vn(e.body,n)},"htmlBuilder$5"),FK=s((e,t)=>{var r=e.font,n=t.withFont(r);return On(e.body,n)},"mathmlBuilder$4"),WX={"\\Bbb":"\\mathbb","\\bold":"\\mathbf","\\frak":"\\mathfrak"};qt({type:"font",names:["\\mathrm","\\mathit","\\mathbf","\\mathnormal","\\mathsfit","\\mathbb","\\mathcal","\\mathfrak","\\mathscr","\\mathsf","\\mathtt","\\Bbb","\\bold","\\frak"],props:{numArgs:1,allowedInArgument:!0},handler:s((e,t)=>{var{parser:r,funcName:n}=e,i=Yk(t[0]),a=n;return a in WX&&(a=WX[a]),{type:"font",mode:r.mode,font:a.slice(1),body:i}},"handler"),htmlBuilder:$K,mathmlBuilder:FK});qt({type:"mclass",names:["\\boldsymbol","\\bm"],props:{numArgs:1},handler:s((e,t)=>{var{parser:r}=e,n=t[0];return{type:"mclass",mode:r.mode,mclass:iw(n),body:[{type:"font",mode:r.mode,font:"boldsymbol",body:n}],isCharacterBox:ku(n)}},"handler")});qt({type:"font",names:["\\rm","\\sf","\\tt","\\bf","\\it","\\cal"],props:{numArgs:0,allowedInText:!0},handler:s((e,t)=>{var{parser:r,funcName:n,breakOnTokenText:i}=e,{mode:a}=r,o=r.parseExpression(!0,i);return{type:"font",mode:a,font:"math"+n.slice(1),body:{type:"ordgroup",mode:r.mode,body:o}}},"handler"),htmlBuilder:$K,mathmlBuilder:FK});n9e=s((e,t)=>{var r=t.style,n=r.fracNum(),i=r.fracDen(),a;a=t.havingStyle(n);var o=vn(e.numer,a,t);if(e.continued){var l=8.5/t.fontMetrics().ptPerEm,u=3.5/t.fontMetrics().ptPerEm;o.height=o.height0?g=3*p:g=7*p,y=t.fontMetrics().denom1):(f>0?(m=t.fontMetrics().num2,g=p):(m=t.fontMetrics().num3,g=3*p),y=t.fontMetrics().denom2);var v;if(d){var b=t.fontMetrics().axisHeight;m-o.depth-(b+.5*f){var r=new Nt("mfrac",[On(e.numer,t),On(e.denom,t)]);if(!e.hasBarLine)r.setAttribute("linethickness","0px");else if(e.barSize){var n=oi(e.barSize,t);r.setAttribute("linethickness",$t(n))}if(e.leftDelim!=null||e.rightDelim!=null){var i=[];if(e.leftDelim!=null){var a=new Nt("mo",[new mi(e.leftDelim.replace("\\",""))]);a.setAttribute("fence","true"),i.push(a)}if(i.push(r),e.rightDelim!=null){var o=new Nt("mo",[new mi(e.rightDelim.replace("\\",""))]);o.setAttribute("fence","true"),i.push(o)}return wD(i)}return r},"mathmlBuilder$3"),GK=s((e,t)=>{if(!t)return e;var r={type:"styling",mode:e.mode,style:t,body:[e]};return r},"wrapWithStyle");qt({type:"genfrac",names:["\\cfrac","\\dfrac","\\frac","\\tfrac","\\dbinom","\\binom","\\tbinom","\\\\atopfrac","\\\\bracefrac","\\\\brackfrac"],props:{numArgs:2,allowedInArgument:!0},handler:s((e,t)=>{var{parser:r,funcName:n}=e,i=t[0],a=t[1],o,l=null,u=null;switch(n){case"\\cfrac":case"\\dfrac":case"\\frac":case"\\tfrac":o=!0;break;case"\\\\atopfrac":o=!1;break;case"\\dbinom":case"\\binom":case"\\tbinom":o=!1,l="(",u=")";break;case"\\\\bracefrac":o=!1,l="\\{",u="\\}";break;case"\\\\brackfrac":o=!1,l="[",u="]";break;default:throw new Error("Unrecognized genfrac command")}var h=n==="\\cfrac",d=null;return h||n.startsWith("\\d")?d="display":n.startsWith("\\t")&&(d="text"),GK({type:"genfrac",mode:r.mode,numer:i,denom:a,continued:h,hasBarLine:o,leftDelim:l,rightDelim:u,barSize:null},d)},"handler"),htmlBuilder:n9e,mathmlBuilder:i9e});qt({type:"infix",names:["\\over","\\choose","\\atop","\\brace","\\brack"],props:{numArgs:0,infix:!0},handler(e){var{parser:t,funcName:r,token:n}=e,i;switch(r){case"\\over":i="\\frac";break;case"\\choose":i="\\binom";break;case"\\atop":i="\\\\atopfrac";break;case"\\brace":i="\\\\bracefrac";break;case"\\brack":i="\\\\brackfrac";break;default:throw new Error("Unrecognized infix genfrac command")}return{type:"infix",mode:t.mode,replaceWith:i,token:n}}});qX=["display","text","script","scriptscript"],HX=s(function(t){var r=null;return t.length>0&&(r=t,r=r==="."?null:r),r},"delimFromValue");qt({type:"genfrac",names:["\\genfrac"],props:{numArgs:6,allowedInArgument:!0,argTypes:["math","math","size","text","math","math"]},handler(e,t){var{parser:r}=e,n=t[4],i=t[5],a=Yk(t[0]),o=a.type==="atom"&&a.family==="open"?HX(a.text):null,l=Yk(t[1]),u=l.type==="atom"&&l.family==="close"?HX(l.text):null,h=Vr(t[2],"size"),d,f=null;h.isBlank?d=!0:(f=h.value,d=f.number>0);var p=null,m=t[3];if(m.type==="ordgroup"){if(m.body.length>0){var g=Vr(m.body[0],"textord");p=qX[Number(g.text)]}}else m=Vr(m,"textord"),p=qX[Number(m.text)];return GK({type:"genfrac",mode:r.mode,numer:n,denom:i,continued:!1,hasBarLine:d,barSize:f,leftDelim:o,rightDelim:u},p)}});qt({type:"infix",names:["\\above"],props:{numArgs:1,argTypes:["size"],infix:!0},handler(e,t){var{parser:r,funcName:n,token:i}=e;return{type:"infix",mode:r.mode,replaceWith:"\\\\abovefrac",size:Vr(t[0],"size").value,token:i}}});qt({type:"genfrac",names:["\\\\abovefrac"],props:{numArgs:3,argTypes:["math","size","math"]},handler:s((e,t)=>{var{parser:r,funcName:n}=e,i=t[0],a=Vr(t[1],"infix").size;if(!a)throw new Error("\\\\abovefrac expected size, but got "+String(a));var o=t[2],l=a.number>0;return{type:"genfrac",mode:r.mode,numer:i,denom:o,continued:!1,hasBarLine:l,barSize:a,leftDelim:null,rightDelim:null}},"handler")});zK=s((e,t)=>{var r=t.style,n,i;e.type==="supsub"?(n=e.sup?vn(e.sup,t.havingStyle(r.sup()),t):vn(e.sub,t.havingStyle(r.sub()),t),i=Vr(e.base,"horizBrace")):i=Vr(e,"horizBrace");var a=vn(i.base,t.havingBaseStyle(Pr.DISPLAY)),o=tw(i,t),l;if(i.isOver?l=yn({positionType:"firstBaseline",children:[{type:"elem",elem:a},{type:"kern",size:.1},{type:"elem",elem:o,wrapperClasses:["svg-align"]}]}):l=yn({positionType:"bottom",positionData:a.depth+.1+o.height,children:[{type:"elem",elem:o,wrapperClasses:["svg-align"]},{type:"kern",size:.1},{type:"elem",elem:a}]}),n){var u=Mt(["minner",i.isOver?"mover":"munder"],[l],t);i.isOver?l=yn({positionType:"firstBaseline",children:[{type:"elem",elem:u},{type:"kern",size:.2},{type:"elem",elem:n}]}):l=yn({positionType:"bottom",positionData:u.depth+.2+n.height+n.depth,children:[{type:"elem",elem:n},{type:"kern",size:.2},{type:"elem",elem:u}]})}return Mt(["minner",i.isOver?"mover":"munder"],[l],t)},"htmlBuilder$3"),a9e=s((e,t)=>{var r=ew(e.label);return new Nt(e.isOver?"mover":"munder",[On(e.base,t),r])},"mathmlBuilder$2");qt({type:"horizBrace",names:["\\overbrace","\\underbrace","\\overbracket","\\underbracket"],props:{numArgs:1},handler(e,t){var{parser:r,funcName:n}=e;return{type:"horizBrace",mode:r.mode,label:n,isOver:n.includes("\\over"),base:t[0]}},htmlBuilder:zK,mathmlBuilder:a9e});qt({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:s((e,t)=>{var{parser:r}=e,n=t[1],i=Vr(t[0],"url").url;return r.settings.isTrusted({command:"\\href",url:i})?{type:"href",mode:r.mode,href:i,body:Pi(n)}:r.formatUnsupportedCmd("\\href")},"handler"),htmlBuilder:s((e,t)=>{var r=ji(e.body,t,!1);return vOe(e.href,[],r,t)},"htmlBuilder"),mathmlBuilder:s((e,t)=>{var r=jh(e.body,t);return r instanceof Nt||(r=new Nt("mrow",[r])),r.setAttribute("href",e.href),r},"mathmlBuilder")});qt({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:s((e,t)=>{var{parser:r}=e,n=Vr(t[0],"url").url;if(!r.settings.isTrusted({command:"\\url",url:n}))return r.formatUnsupportedCmd("\\url");for(var i=[],a=0;a{var{parser:r,funcName:n,token:i}=e,a=Vr(t[0],"raw").string,o=t[1];r.settings.strict&&r.settings.reportNonstrict("htmlExtension","HTML extension is disabled on strict mode");var l,u={};switch(n){case"\\htmlClass":u.class=a,l={command:"\\htmlClass",class:a};break;case"\\htmlId":u.id=a,l={command:"\\htmlId",id:a};break;case"\\htmlStyle":u.style=a,l={command:"\\htmlStyle",style:a};break;case"\\htmlData":{for(var h=a.split(","),d=0;d{var r=ji(e.body,t,!1),n=["enclosing"];e.attributes.class&&n.push(...e.attributes.class.trim().split(/\s+/));var i=Mt(n,r,t);for(var a in e.attributes)a!=="class"&&e.attributes.hasOwnProperty(a)&&i.setAttribute(a,e.attributes[a]);return i},"htmlBuilder"),mathmlBuilder:s((e,t)=>jh(e.body,t),"mathmlBuilder")});qt({type:"htmlmathml",names:["\\html@mathml"],props:{numArgs:2,allowedInArgument:!0,allowedInText:!0},handler:s((e,t)=>{var{parser:r}=e;return{type:"htmlmathml",mode:r.mode,html:Pi(t[0]),mathml:Pi(t[1])}},"handler"),htmlBuilder:s((e,t)=>{var r=ji(e.html,t,!1);return Su(r)},"htmlBuilder"),mathmlBuilder:s((e,t)=>jh(e.mathml,t),"mathmlBuilder")});XL=s(function(t){if(/^[-+]? *(\d+(\.\d*)?|\.\d+)$/.test(t))return{number:+t,unit:"bp"};var r=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(t);if(!r)throw new Pt("Invalid size: '"+t+"' in \\includegraphics");var n={number:+(r[1]+r[2]),unit:r[3]};if(!iK(n))throw new Pt("Invalid unit: '"+n.unit+"' in \\includegraphics.");return n},"sizeData");qt({type:"includegraphics",names:["\\includegraphics"],props:{numArgs:1,numOptionalArgs:1,argTypes:["raw","url"],allowedInText:!1},handler:s((e,t,r)=>{var{parser:n}=e,i={number:0,unit:"em"},a={number:.9,unit:"em"},o={number:0,unit:"em"},l="";if(r[0])for(var u=Vr(r[0],"raw").string,h=u.split(","),d=0;d{var r=oi(e.height,t),n=0;e.totalheight.number>0&&(n=oi(e.totalheight,t)-r);var i=0;e.width.number>0&&(i=oi(e.width,t));var a={height:$t(r+n)};i>0&&(a.width=$t(i)),n>0&&(a.verticalAlign=$t(-n));var o=new tD(e.src,e.alt,a);return o.height=r,o.depth=n,o},"htmlBuilder"),mathmlBuilder:s((e,t)=>{var r=new Nt("mglyph",[]);r.setAttribute("alt",e.alt);var n=oi(e.height,t),i=0;if(e.totalheight.number>0&&(i=oi(e.totalheight,t)-n,r.setAttribute("valign",$t(-i))),r.setAttribute("height",$t(n+i)),e.width.number>0){var a=oi(e.width,t);r.setAttribute("width",$t(a))}return r.setAttribute("src",e.src),r},"mathmlBuilder")});qt({type:"kern",names:["\\kern","\\mkern","\\hskip","\\mskip"],props:{numArgs:1,argTypes:["size"],primitive:!0,allowedInText:!0},handler(e,t){var{parser:r,funcName:n}=e,i=Vr(t[0],"size");if(r.settings.strict){var a=n[1]==="m",o=i.value.unit==="mu";a?(o||r.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+n+" supports only mu units, "+("not "+i.value.unit+" units")),r.mode!=="math"&&r.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+n+" works only in math mode")):o&&r.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+n+" doesn't support mu units")}return{type:"kern",mode:r.mode,dimension:i.value}},htmlBuilder(e,t){return hK(e.dimension,t)},mathmlBuilder(e,t){var r=oi(e.dimension,t);return new jk(r)}});qt({type:"lap",names:["\\mathllap","\\mathrlap","\\mathclap"],props:{numArgs:1,allowedInText:!0},handler:s((e,t)=>{var{parser:r,funcName:n}=e,i=t[0];return{type:"lap",mode:r.mode,alignment:n.slice(5),body:i}},"handler"),htmlBuilder:s((e,t)=>{var r;e.alignment==="clap"?(r=Mt([],[vn(e.body,t)]),r=Mt(["inner"],[r],t)):r=Mt(["inner"],[vn(e.body,t)]);var n=Mt(["fix"],[]),i=Mt([e.alignment],[r,n],t),a=Mt(["strut"]);return a.style.height=$t(i.height+i.depth),i.depth&&(a.style.verticalAlign=$t(-i.depth)),i.children.unshift(a),i=Mt(["thinbox"],[i],t),Mt(["mord","vbox"],[i],t)},"htmlBuilder"),mathmlBuilder:s((e,t)=>{var r=new Nt("mpadded",[On(e.body,t)]);if(e.alignment!=="rlap"){var n=e.alignment==="llap"?"-1":"-0.5";r.setAttribute("lspace",n+"width")}return r.setAttribute("width","0px"),r},"mathmlBuilder")});qt({type:"styling",names:["\\(","$"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,t){var{funcName:r,parser:n}=e,i=n.mode;n.switchMode("math");var a=r==="\\("?"\\)":"$",o=n.parseExpression(!1,a);return n.expect(a),n.switchMode(i),{type:"styling",mode:n.mode,style:"text",resetFont:!0,body:o}}});qt({type:"text",names:["\\)","\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,t){throw new Pt("Mismatched "+e.funcName)}});UX=s((e,t)=>{switch(t.style.size){case Pr.DISPLAY.size:return e.display;case Pr.TEXT.size:return e.text;case Pr.SCRIPT.size:return e.script;case Pr.SCRIPTSCRIPT.size:return e.scriptscript;default:return e.text}},"chooseMathStyle");qt({type:"mathchoice",names:["\\mathchoice"],props:{numArgs:4,primitive:!0},handler:s((e,t)=>{var{parser:r}=e;return{type:"mathchoice",mode:r.mode,display:Pi(t[0]),text:Pi(t[1]),script:Pi(t[2]),scriptscript:Pi(t[3])}},"handler"),htmlBuilder:s((e,t)=>{var r=UX(e,t),n=ji(r,t,!1);return Su(n)},"htmlBuilder"),mathmlBuilder:s((e,t)=>{var r=UX(e,t);return jh(r,t)},"mathmlBuilder")});VK=s((e,t,r,n,i,a,o)=>{e=Mt([],[e]);var l=r&&ku(r),u,h;if(t){var d=vn(t,n.havingStyle(i.sup()),n);h={elem:d,kern:Math.max(n.fontMetrics().bigOpSpacing1,n.fontMetrics().bigOpSpacing3-d.depth)}}if(r){var f=vn(r,n.havingStyle(i.sub()),n);u={elem:f,kern:Math.max(n.fontMetrics().bigOpSpacing2,n.fontMetrics().bigOpSpacing4-f.height)}}var p;if(h&&u){var m=n.fontMetrics().bigOpSpacing5+u.elem.height+u.elem.depth+u.kern+e.depth+o;p=yn({positionType:"bottom",positionData:m,children:[{type:"kern",size:n.fontMetrics().bigOpSpacing5},{type:"elem",elem:u.elem,marginLeft:$t(-a)},{type:"kern",size:u.kern},{type:"elem",elem:e},{type:"kern",size:h.kern},{type:"elem",elem:h.elem,marginLeft:$t(a)},{type:"kern",size:n.fontMetrics().bigOpSpacing5}]})}else if(u){var g=e.height-o;p=yn({positionType:"top",positionData:g,children:[{type:"kern",size:n.fontMetrics().bigOpSpacing5},{type:"elem",elem:u.elem,marginLeft:$t(-a)},{type:"kern",size:u.kern},{type:"elem",elem:e}]})}else if(h){var y=e.depth+o;p=yn({positionType:"bottom",positionData:y,children:[{type:"elem",elem:e},{type:"kern",size:h.kern},{type:"elem",elem:h.elem,marginLeft:$t(a)},{type:"kern",size:n.fontMetrics().bigOpSpacing5}]})}else return e;var v=[p];if(u&&a!==0&&!l){var x=Mt(["mspace"],[],n);x.style.marginRight=$t(a),v.unshift(x)}return Mt(["mop","op-limits"],v,n)},"assembleSupSub"),WK=new Set(["\\smallint"]),o0=s((e,t)=>{var r,n,i=!1,a;e.type==="supsub"?(r=e.sup,n=e.sub,a=Vr(e.base,"op"),i=!0):a=Vr(e,"op");var o=t.style,l=!1;o.size===Pr.DISPLAY.size&&a.symbol&&!WK.has(a.name)&&(l=!0);var u,h;if(a.symbol){var d=l?"Size2-Regular":"Size1-Regular",f="";if((a.name==="\\oiint"||a.name==="\\oiiint")&&(f=a.name.slice(1),a.name=f==="oiint"?"\\iint":"\\iiint"),u=os(a.name,d,"math",t,["mop","op-symbol",l?"large-op":"small-op"]),h=u.italic,f.length>0){var p=fK(f+"Size"+(l?"2":"1"),t);u=yn({positionType:"individualShift",children:[{type:"elem",elem:u,shift:0},{type:"elem",elem:p,shift:l?.08:0}]}),a.name="\\"+f,u.classes.unshift("mop"),u.italic=h}}else if(a.body){var m=ji(a.body,t,!0);m.length===1&&m[0]instanceof cs?(u=m[0],u.classes[0]="mop"):u=Mt(["mop"],m,t)}else{for(var g=[],y=1;y{var r;if(e.symbol)r=new Nt("mo",[Fo(e.name,e.mode)]),WK.has(e.name)&&r.setAttribute("largeop","false");else if(e.body)r=new Nt("mo",mo(e.body,t));else{r=new Nt("mi",[new mi(e.name.slice(1))]);var n=new Nt("mo",[Fo("\u2061","text")]);e.parentIsSupSub?r=new Nt("mrow",[r,n]):r=gK([r,n])}return r},"mathmlBuilder$1"),s9e={"\u220F":"\\prod","\u2210":"\\coprod","\u2211":"\\sum","\u22C0":"\\bigwedge","\u22C1":"\\bigvee","\u22C2":"\\bigcap","\u22C3":"\\bigcup","\u2A00":"\\bigodot","\u2A01":"\\bigoplus","\u2A02":"\\bigotimes","\u2A04":"\\biguplus","\u2A06":"\\bigsqcup"};qt({type:"op",names:["\\coprod","\\bigvee","\\bigwedge","\\biguplus","\\bigcap","\\bigcup","\\intop","\\prod","\\sum","\\bigotimes","\\bigoplus","\\bigodot","\\bigsqcup","\\smallint","\u220F","\u2210","\u2211","\u22C0","\u22C1","\u22C2","\u22C3","\u2A00","\u2A01","\u2A02","\u2A04","\u2A06"],props:{numArgs:0},handler:s((e,t)=>{var{parser:r,funcName:n}=e,i=n;return i.length===1&&(i=s9e[i]),{type:"op",mode:r.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:i}},"handler"),htmlBuilder:o0,mathmlBuilder:mx});qt({type:"op",names:["\\mathop"],props:{numArgs:1,primitive:!0},handler:s((e,t)=>{var{parser:r}=e,n=t[0];return{type:"op",mode:r.mode,limits:!1,parentIsSupSub:!1,symbol:!1,body:Pi(n)}},"handler"),htmlBuilder:o0,mathmlBuilder:mx});o9e={"\u222B":"\\int","\u222C":"\\iint","\u222D":"\\iiint","\u222E":"\\oint","\u222F":"\\oiint","\u2230":"\\oiiint"};qt({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(e){var{parser:t,funcName:r}=e;return{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!1,name:r}},htmlBuilder:o0,mathmlBuilder:mx});qt({type:"op",names:["\\det","\\gcd","\\inf","\\lim","\\max","\\min","\\Pr","\\sup"],props:{numArgs:0},handler(e){var{parser:t,funcName:r}=e;return{type:"op",mode:t.mode,limits:!0,parentIsSupSub:!1,symbol:!1,name:r}},htmlBuilder:o0,mathmlBuilder:mx});qt({type:"op",names:["\\int","\\iint","\\iiint","\\oint","\\oiint","\\oiiint","\u222B","\u222C","\u222D","\u222E","\u222F","\u2230"],props:{numArgs:0,allowedInArgument:!0},handler(e){var{parser:t,funcName:r}=e,n=r;return n.length===1&&(n=o9e[n]),{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:n}},htmlBuilder:o0,mathmlBuilder:mx});qK=s((e,t)=>{var r,n,i=!1,a;e.type==="supsub"?(r=e.sup,n=e.sub,a=Vr(e.base,"operatorname"),i=!0):a=Vr(e,"operatorname");var o;if(a.body.length>0){for(var l=a.body.map(f=>{var p="text"in f?f.text:void 0;return typeof p=="string"?{type:"textord",mode:f.mode,text:p}:f}),u=ji(l,t.withFont("mathrm"),!0),h=0;h{for(var r=mo(e.body,t.withFont("mathrm")),n=!0,i=0;id.toText()).join("");r=[new mi(l)]}var u=new Nt("mi",r);u.setAttribute("mathvariant","normal");var h=new Nt("mo",[Fo("\u2061","text")]);return e.parentIsSupSub?new Nt("mrow",[u,h]):gK([u,h])},"mathmlBuilder");qt({type:"operatorname",names:["\\operatorname@","\\operatornamewithlimits"],props:{numArgs:1},handler:s((e,t)=>{var{parser:r,funcName:n}=e,i=t[0];return{type:"operatorname",mode:r.mode,body:Pi(i),alwaysHandleSupSub:n==="\\operatornamewithlimits",limits:!1,parentIsSupSub:!1}},"handler"),htmlBuilder:qK,mathmlBuilder:l9e});Te("\\operatorname","\\@ifstar\\operatornamewithlimits\\operatorname@");sp({type:"ordgroup",htmlBuilder(e,t){return e.semisimple?Su(ji(e.body,t,!1)):Mt(["mord"],ji(e.body,t,!0),t)},mathmlBuilder(e,t){return jh(e.body,t,!0)}});qt({type:"overline",names:["\\overline"],props:{numArgs:1},handler(e,t){var{parser:r}=e,n=t[0];return{type:"overline",mode:r.mode,body:n}},htmlBuilder(e,t){var r=vn(e.body,t.havingCrampedStyle()),n=i0("overline-line",t),i=t.fontMetrics().defaultRuleThickness,a=yn({positionType:"firstBaseline",children:[{type:"elem",elem:r},{type:"kern",size:3*i},{type:"elem",elem:n},{type:"kern",size:i}]});return Mt(["mord","overline"],[a],t)},mathmlBuilder(e,t){var r=new Nt("mo",[new mi("\u203E")]);r.setAttribute("stretchy","true");var n=new Nt("mover",[On(e.body,t),r]);return n.setAttribute("accent","true"),n}});qt({type:"phantom",names:["\\phantom"],props:{numArgs:1,allowedInText:!0},handler:s((e,t)=>{var{parser:r}=e,n=t[0];return{type:"phantom",mode:r.mode,body:Pi(n)}},"handler"),htmlBuilder:s((e,t)=>{var r=ji(e.body,t.withPhantom(),!1);return Su(r)},"htmlBuilder"),mathmlBuilder:s((e,t)=>{var r=mo(e.body,t);return new Nt("mphantom",r)},"mathmlBuilder")});Te("\\hphantom","\\smash{\\phantom{#1}}");qt({type:"vphantom",names:["\\vphantom"],props:{numArgs:1,allowedInText:!0},handler:s((e,t)=>{var{parser:r}=e,n=t[0];return{type:"vphantom",mode:r.mode,body:n}},"handler"),htmlBuilder:s((e,t)=>{var r=Mt(["inner"],[vn(e.body,t.withPhantom())]),n=Mt(["fix"],[]);return Mt(["mord","rlap"],[r,n],t)},"htmlBuilder"),mathmlBuilder:s((e,t)=>{var r=mo(Pi(e.body),t),n=new Nt("mphantom",r),i=new Nt("mpadded",[n]);return i.setAttribute("width","0px"),i},"mathmlBuilder")});qt({type:"raisebox",names:["\\raisebox"],props:{numArgs:2,argTypes:["size","hbox"],allowedInText:!0},handler(e,t){var{parser:r}=e,n=Vr(t[0],"size").value,i=t[1];return{type:"raisebox",mode:r.mode,dy:n,body:i}},htmlBuilder(e,t){var r=vn(e.body,t),n=oi(e.dy,t);return yn({positionType:"shift",positionData:-n,children:[{type:"elem",elem:r}]})},mathmlBuilder(e,t){var r=new Nt("mpadded",[On(e.body,t)]),n=e.dy.number+e.dy.unit;return r.setAttribute("voffset",n),r}});qt({type:"internal",names:["\\relax"],props:{numArgs:0,allowedInText:!0,allowedInArgument:!0},handler(e){var{parser:t}=e;return{type:"internal",mode:t.mode}}});qt({type:"rule",names:["\\rule"],props:{numArgs:2,numOptionalArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["size","size","size"]},handler(e,t,r){var{parser:n}=e,i=r[0],a=Vr(t[0],"size"),o=Vr(t[1],"size");return{type:"rule",mode:n.mode,shift:i&&Vr(i,"size").value,width:a.value,height:o.value}},htmlBuilder(e,t){var r=Mt(["mord","rule"],[],t),n=oi(e.width,t),i=oi(e.height,t),a=e.shift?oi(e.shift,t):0;return r.style.borderRightWidth=$t(n),r.style.borderTopWidth=$t(i),r.style.bottom=$t(a),r.width=n,r.height=i+a,r.depth=-a,r.maxFontSize=i*1.125*t.sizeMultiplier,r},mathmlBuilder(e,t){var r=oi(e.width,t),n=oi(e.height,t),i=e.shift?oi(e.shift,t):0,a=t.color&&t.getColor()||"black",o=new Nt("mspace");o.setAttribute("mathbackground",a),o.setAttribute("width",$t(r)),o.setAttribute("height",$t(n));var l=new Nt("mpadded",[o]);return i>=0?l.setAttribute("height",$t(i)):(l.setAttribute("height",$t(i)),l.setAttribute("depth",$t(-i))),l.setAttribute("voffset",$t(i)),l}});s(HK,"sizingGroup");YX=["\\tiny","\\sixptsize","\\scriptsize","\\footnotesize","\\small","\\normalsize","\\large","\\Large","\\LARGE","\\huge","\\Huge"],c9e=s((e,t)=>{var r=t.havingSize(e.size);return HK(e.body,r,t)},"htmlBuilder");qt({type:"sizing",names:YX,props:{numArgs:0,allowedInText:!0},handler:s((e,t)=>{var{breakOnTokenText:r,funcName:n,parser:i}=e,a=i.parseExpression(!1,r);return{type:"sizing",mode:i.mode,size:YX.indexOf(n)+1,body:a}},"handler"),htmlBuilder:c9e,mathmlBuilder:s((e,t)=>{var r=t.havingSize(e.size),n=mo(e.body,r),i=new Nt("mstyle",n);return i.setAttribute("mathsize",$t(r.sizeMultiplier)),i},"mathmlBuilder")});qt({type:"smash",names:["\\smash"],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:s((e,t,r)=>{var{parser:n}=e,i=!1,a=!1,o=r[0]&&Vr(r[0],"ordgroup");if(o)for(var l,u=0;u{var r=Mt([],[vn(e.body,t)]);if(!e.smashHeight&&!e.smashDepth)return r;if(e.smashHeight&&(r.height=0),e.smashDepth&&(r.depth=0),e.smashHeight&&e.smashDepth)return Mt(["mord","smash"],[r],t);if(r.children)for(var n=0;n{var r=new Nt("mpadded",[On(e.body,t)]);return e.smashHeight&&r.setAttribute("height","0px"),e.smashDepth&&r.setAttribute("depth","0px"),r},"mathmlBuilder")});qt({type:"sqrt",names:["\\sqrt"],props:{numArgs:1,numOptionalArgs:1},handler(e,t,r){var{parser:n}=e,i=r[0],a=t[0];return{type:"sqrt",mode:n.mode,body:a,index:i}},htmlBuilder(e,t){var r=vn(e.body,t.havingCrampedStyle());r.height===0&&(r.height=t.fontMetrics().xHeight),r=a0(r,t);var n=t.fontMetrics(),i=n.defaultRuleThickness,a=i;t.style.idr.height+r.depth+o&&(o=(o+f-r.height-r.depth)/2);var p=u.height-r.height-o-h;r.style.paddingLeft=$t(d);var m=yn({positionType:"firstBaseline",children:[{type:"elem",elem:r,wrapperClasses:["svg-align"]},{type:"kern",size:-(r.height+p)},{type:"elem",elem:u},{type:"kern",size:h}]});if(e.index){var g=t.havingStyle(Pr.SCRIPTSCRIPT),y=vn(e.index,g,t),v=.6*(m.height-m.depth),x=yn({positionType:"shift",positionData:-v,children:[{type:"elem",elem:y}]}),b=Mt(["root"],[x]);return Mt(["mord","sqrt"],[b,m],t)}else return Mt(["mord","sqrt"],[m],t)},mathmlBuilder(e,t){var{body:r,index:n}=e;return n?new Nt("mroot",[On(r,t),On(n,t)]):new Nt("msqrt",[On(r,t)])}});mD={display:Pr.DISPLAY,text:Pr.TEXT,script:Pr.SCRIPT,scriptscript:Pr.SCRIPTSCRIPT};s(u9e,"isStyleStr");qt({type:"styling",names:["\\displaystyle","\\textstyle","\\scriptstyle","\\scriptscriptstyle"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e,t){var{breakOnTokenText:r,funcName:n,parser:i}=e,a=i.parseExpression(!0,r),o=n.slice(1,n.length-5);if(!u9e(o))throw new Error("Unknown style: "+o);return{type:"styling",mode:i.mode,style:o,body:a}},htmlBuilder(e,t){var r=mD[e.style],n=t.havingStyle(r);return e.resetFont&&(n=n.withFont("")),HK(e.body,n,t)},mathmlBuilder(e,t){var r=mD[e.style],n=t.havingStyle(r);e.resetFont&&(n=n.withFont(""));var i=mo(e.body,n),a=new Nt("mstyle",i),o={display:["0","true"],text:["0","false"],script:["1","false"],scriptscript:["2","false"]},l=o[e.style];return a.setAttribute("scriptlevel",l[0]),a.setAttribute("displaystyle",l[1]),a}});h9e=s(function(t,r){var n=t.base;if(n)if(n.type==="op"){var i=n.limits&&(r.style.size===Pr.DISPLAY.size||n.alwaysHandleSupSub);return i?o0:null}else if(n.type==="operatorname"){var a=n.alwaysHandleSupSub&&(r.style.size===Pr.DISPLAY.size||n.limits);return a?qK:null}else{if(n.type==="accent")return ku(n.base)?ED:null;if(n.type==="horizBrace"){var o=!t.sub;return o===n.isOver?zK:null}else return null}else return null},"htmlBuilderDelegate");sp({type:"supsub",htmlBuilder(e,t){var r=h9e(e,t);if(r)return r(e,t);var{base:n,sup:i,sub:a}=e,o=vn(n,t),l,u,h=t.fontMetrics(),d=0,f=0,p=n&&ku(n);if(i){var m=t.havingStyle(t.style.sup());l=vn(i,m,t),p||(d=o.height-m.fontMetrics().supDrop*m.sizeMultiplier/t.sizeMultiplier)}if(a){var g=t.havingStyle(t.style.sub());u=vn(a,g,t),p||(f=o.depth+g.fontMetrics().subDrop*g.sizeMultiplier/t.sizeMultiplier)}var y;t.style===Pr.DISPLAY?y=h.sup1:t.style.cramped?y=h.sup3:y=h.sup2;var v=t.sizeMultiplier,x=$t(.5/h.ptPerEm/v),b=null;if(u){var T=e.base&&e.base.type==="op"&&e.base.name&&(e.base.name==="\\oiint"||e.base.name==="\\oiiint");if(o instanceof cs||T){var w;b=$t(-((w=o.italic)!=null?w:0))}}var C;if(l&&u){d=Math.max(d,y,l.depth+.25*h.xHeight),f=Math.max(f,h.sub2);var k=h.defaultRuleThickness,S=4*k;if(d-l.depth-(u.height-f)0&&(d+=A,f-=A)}var M=[{type:"elem",elem:u,shift:f,marginRight:x,marginLeft:b},{type:"elem",elem:l,shift:-d,marginRight:x}];C=yn({positionType:"individualShift",children:M})}else if(u){f=Math.max(f,h.sub1,u.height-.8*h.xHeight);var N=[{type:"elem",elem:u,marginLeft:b,marginRight:x}];C=yn({positionType:"shift",positionData:f,children:N})}else if(l)d=Math.max(d,y,l.depth+.25*h.xHeight),C=yn({positionType:"shift",positionData:-d,children:[{type:"elem",elem:l,marginRight:x}]});else throw new Error("supsub must have either sup or sub.");var D=uD(o,"right")||"mord";return Mt([D],[o,Mt(["msupsub"],[C])],t)},mathmlBuilder(e,t){var r=!1,n,i;e.base&&e.base.type==="horizBrace"&&(i=!!e.sup,i===e.base.isOver&&(r=!0,n=e.base.isOver)),e.base&&(e.base.type==="op"||e.base.type==="operatorname")&&(e.base.parentIsSupSub=!0);var a=[On(e.base,t)];e.sub&&a.push(On(e.sub,t)),e.sup&&a.push(On(e.sup,t));var o;if(r)o=n?"mover":"munder";else if(e.sub)if(e.sup){var h=e.base;h&&h.type==="op"&&h.limits&&t.style===Pr.DISPLAY||h&&h.type==="operatorname"&&h.alwaysHandleSupSub&&(t.style===Pr.DISPLAY||h.limits)?o="munderover":o="msubsup"}else{var u=e.base;u&&u.type==="op"&&u.limits&&(t.style===Pr.DISPLAY||u.alwaysHandleSupSub)||u&&u.type==="operatorname"&&u.alwaysHandleSupSub&&(u.limits||t.style===Pr.DISPLAY)?o="munder":o="msub"}else{var l=e.base;l&&l.type==="op"&&l.limits&&(t.style===Pr.DISPLAY||l.alwaysHandleSupSub)||l&&l.type==="operatorname"&&l.alwaysHandleSupSub&&(l.limits||t.style===Pr.DISPLAY)?o="mover":o="msup"}return new Nt(o,a)}});sp({type:"atom",htmlBuilder(e,t){return CD(e.text,e.mode,t,["m"+e.family])},mathmlBuilder(e,t){var r=new Nt("mo",[Fo(e.text,e.mode)]);if(e.family==="bin"){var n=SD(e,t);n==="bold-italic"&&r.setAttribute("mathvariant",n)}else e.family==="punct"?r.setAttribute("separator","true"):(e.family==="open"||e.family==="close")&&r.setAttribute("stretchy","false");return r}});UK={mi:"italic",mn:"normal",mtext:"normal"};sp({type:"mathord",htmlBuilder(e,t){return Jk(e,t,"mathord")},mathmlBuilder(e,t){var r=new Nt("mi",[Fo(e.text,e.mode,t)]),n=SD(e,t)||"italic";return n!==UK[r.type]&&r.setAttribute("mathvariant",n),r}});sp({type:"textord",htmlBuilder(e,t){return Jk(e,t,"textord")},mathmlBuilder(e,t){var r=Fo(e.text,e.mode,t),n=SD(e,t)||"normal",i;return e.mode==="text"?i=new Nt("mtext",[r]):/[0-9]/.test(e.text)?i=new Nt("mn",[r]):e.text==="\\prime"?i=new Nt("mo",[r]):i=new Nt("mi",[r]),n!==UK[i.type]&&i.setAttribute("mathvariant",n),i}});KL={"\\nobreak":"nobreak","\\allowbreak":"allowbreak"},ZL={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}};sp({type:"spacing",htmlBuilder(e,t){if(ZL.hasOwnProperty(e.text)){var r=ZL[e.text].className||"";if(e.mode==="text"){var n=Jk(e,t,"textord");return n.classes.push(r),n}else return Mt(["mspace",r],[CD(e.text,e.mode,t)],t)}else{if(KL.hasOwnProperty(e.text))return Mt(["mspace",KL[e.text]],[],t);throw new Pt('Unknown type of space "'+e.text+'"')}},mathmlBuilder(e,t){var r;if(ZL.hasOwnProperty(e.text))r=new Nt("mtext",[new mi("\xA0")]);else{if(KL.hasOwnProperty(e.text))return new Nt("mspace");throw new Pt('Unknown type of space "'+e.text+'"')}return r}});jX=s(()=>{var e=new Nt("mtd",[]);return e.setAttribute("width","50%"),e},"pad");sp({type:"tag",mathmlBuilder(e,t){var r=new Nt("mtable",[new Nt("mtr",[jX(),new Nt("mtd",[jh(e.body,t)]),jX(),new Nt("mtd",[jh(e.tag,t)])])]);return r.setAttribute("width","100%"),r}});XX={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},KX={"\\textbf":"textbf","\\textmd":"textmd"},d9e={"\\textit":"textit","\\textup":"textup"},ZX=s((e,t)=>{var r=e.font;if(r){if(XX[r])return t.withTextFontFamily(XX[r]);if(KX[r])return t.withTextFontWeight(KX[r]);if(r==="\\emph")return t.fontShape==="textit"?t.withTextFontShape("textup"):t.withTextFontShape("textit")}else return t;return t.withTextFontShape(d9e[r])},"optionsWithFont");qt({type:"text",names:["\\text","\\textrm","\\textsf","\\texttt","\\textnormal","\\textbf","\\textmd","\\textit","\\textup","\\emph"],props:{numArgs:1,argTypes:["text"],allowedInArgument:!0,allowedInText:!0},handler(e,t){var{parser:r,funcName:n}=e,i=t[0];return{type:"text",mode:r.mode,body:Pi(i),font:n}},htmlBuilder(e,t){var r=ZX(e,t),n=ji(e.body,r,!0);return Mt(["mord","text"],n,r)},mathmlBuilder(e,t){var r=ZX(e,t);return jh(e.body,r)}});qt({type:"underline",names:["\\underline"],props:{numArgs:1,allowedInText:!0},handler(e,t){var{parser:r}=e;return{type:"underline",mode:r.mode,body:t[0]}},htmlBuilder(e,t){var r=vn(e.body,t),n=i0("underline-line",t),i=t.fontMetrics().defaultRuleThickness,a=yn({positionType:"top",positionData:r.height,children:[{type:"kern",size:i},{type:"elem",elem:n},{type:"kern",size:3*i},{type:"elem",elem:r}]});return Mt(["mord","underline"],[a],t)},mathmlBuilder(e,t){var r=new Nt("mo",[new mi("\u203E")]);r.setAttribute("stretchy","true");var n=new Nt("munder",[On(e.body,t),r]);return n.setAttribute("accentunder","true"),n}});qt({type:"vcenter",names:["\\vcenter"],props:{numArgs:1,argTypes:["original"],allowedInText:!1},handler(e,t){var{parser:r}=e;return{type:"vcenter",mode:r.mode,body:t[0]}},htmlBuilder(e,t){var r=vn(e.body,t),n=t.fontMetrics().axisHeight,i=.5*(r.height-n-(r.depth+n));return yn({positionType:"shift",positionData:i,children:[{type:"elem",elem:r}]})},mathmlBuilder(e,t){var r=new Nt("mpadded",[On(e.body,t)],["vcenter"]);return new Nt("mrow",[r])}});qt({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler(e,t,r){throw new Pt("\\verb ended by end of line instead of matching delimiter")},htmlBuilder(e,t){for(var r=QX(e),n=[],i=t.havingStyle(t.style.text()),a=0;ae.body.replace(/ /g,e.star?"\u2423":"\xA0"),"makeVerb"),Wh=pK,YK=`[ \r + ]`,f9e="\\\\[a-zA-Z@]+",p9e="\\\\[^\uD800-\uDFFF]",m9e="("+f9e+")"+YK+"*",g9e=`\\\\( +|[ \r ]+ +?)[ \r ]*`,gD="[\u0300-\u036F]",y9e=new RegExp(gD+"+$"),v9e="("+YK+"+)|"+(g9e+"|")+"([!-\\[\\]-\u2027\u202A-\uD7FF\uF900-\uFFFF]"+(gD+"*")+"|[\uD800-\uDBFF][\uDC00-\uDFFF]"+(gD+"*")+"|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5"+("|"+m9e)+("|"+p9e+")"),Kk=class{static{s(this,"Lexer")}constructor(t,r){this.input=void 0,this.settings=void 0,this.tokenRegex=void 0,this.catcodes=void 0,this.input=t,this.settings=r,this.tokenRegex=new RegExp(v9e,"g"),this.catcodes={"%":14,"~":13}}setCatcode(t,r){this.catcodes[t]=r}lex(){var t=this.input,r=this.tokenRegex.lastIndex;if(r===t.length)return new fo("EOF",new Os(this,r,r));var n=this.tokenRegex.exec(t);if(n===null||n.index!==r)throw new Pt("Unexpected character: '"+t[r]+"'",new fo(t[r],new Os(this,r,r+1)));var i=n[6]||n[3]||(n[2]?"\\ ":" ");if(this.catcodes[i]===14){var a=t.indexOf(` +`,this.tokenRegex.lastIndex);return a===-1?(this.tokenRegex.lastIndex=t.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=a+1,this.lex()}return new fo(i,new Os(this,r,this.tokenRegex.lastIndex))}},yD=class{static{s(this,"Namespace")}constructor(t,r){t===void 0&&(t={}),r===void 0&&(r={}),this.current=void 0,this.builtins=void 0,this.undefStack=void 0,this.current=r,this.builtins=t,this.undefStack=[]}beginGroup(){this.undefStack.push({})}endGroup(){if(this.undefStack.length===0)throw new Pt("Unbalanced namespace destruction: attempt to pop global namespace; please report this as a bug");var t=this.undefStack.pop();for(var r in t)t.hasOwnProperty(r)&&(t[r]==null?delete this.current[r]:this.current[r]=t[r])}endGroups(){for(;this.undefStack.length>0;)this.endGroup()}has(t){return this.current.hasOwnProperty(t)||this.builtins.hasOwnProperty(t)}get(t){return this.current.hasOwnProperty(t)?this.current[t]:this.builtins[t]}set(t,r,n){if(n===void 0&&(n=!1),n){for(var i=0;i0&&(this.undefStack[this.undefStack.length-1][t]=r)}else{var a=this.undefStack[this.undefStack.length-1];a&&!a.hasOwnProperty(t)&&(a[t]=this.current[t])}r==null?delete this.current[t]:this.current[t]=r}},x9e=OK;Te("\\noexpand",function(e){var t=e.popToken();return e.isExpandable(t.text)&&(t.noexpand=!0,t.treatAsRelax=!0),{tokens:[t],numArgs:0}});Te("\\expandafter",function(e){var t=e.popToken();return e.expandOnce(!0),{tokens:[t],numArgs:0}});Te("\\@firstoftwo",function(e){var t=e.consumeArgs(2);return{tokens:t[0],numArgs:0}});Te("\\@secondoftwo",function(e){var t=e.consumeArgs(2);return{tokens:t[1],numArgs:0}});Te("\\@ifnextchar",function(e){var t=e.consumeArgs(3);e.consumeSpaces();var r=e.future();return t[0].length===1&&t[0][0].text===r.text?{tokens:t[1],numArgs:0}:{tokens:t[2],numArgs:0}});Te("\\@ifstar","\\@ifnextchar *{\\@firstoftwo{#1}}");Te("\\TextOrMath",function(e){var t=e.consumeArgs(2);return e.mode==="text"?{tokens:t[0],numArgs:0}:{tokens:t[1],numArgs:0}});JX={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};Te("\\char",function(e){var t=e.popToken(),r,n=0;if(t.text==="'")r=8,t=e.popToken();else if(t.text==='"')r=16,t=e.popToken();else if(t.text==="`")if(t=e.popToken(),t.text[0]==="\\")n=t.text.charCodeAt(1);else{if(t.text==="EOF")throw new Pt("\\char` missing argument");n=t.text.charCodeAt(0)}else r=10;if(r){if(n=JX[t.text],n==null||n>=r)throw new Pt("Invalid base-"+r+" digit "+t.text);for(var i;(i=JX[e.future().text])!=null&&i{var i=e.consumeArg().tokens;if(i.length!==1)throw new Pt("\\newcommand's first argument must be a macro name");var a=i[0].text,o=e.isDefined(a);if(o&&!t)throw new Pt("\\newcommand{"+a+"} attempting to redefine "+(a+"; use \\renewcommand"));if(!o&&!r)throw new Pt("\\renewcommand{"+a+"} when command "+a+" does not yet exist; use \\newcommand");var l=0;if(i=e.consumeArg().tokens,i.length===1&&i[0].text==="["){for(var u="",h=e.expandNextToken();h.text!=="]"&&h.text!=="EOF";)u+=h.text,h=e.expandNextToken();if(!u.match(/^\s*[0-9]+\s*$/))throw new Pt("Invalid number of arguments: "+u);l=parseInt(u),i=e.consumeArg().tokens}return o&&n||e.macros.set(a,{tokens:i,numArgs:l}),""},"newcommand");Te("\\newcommand",e=>LD(e,!1,!0,!1));Te("\\renewcommand",e=>LD(e,!0,!1,!1));Te("\\providecommand",e=>LD(e,!0,!0,!0));Te("\\message",e=>{var t=e.consumeArgs(1)[0];return console.log(t.reverse().map(r=>r.text).join("")),""});Te("\\errmessage",e=>{var t=e.consumeArgs(1)[0];return console.error(t.reverse().map(r=>r.text).join("")),""});Te("\\show",e=>{var t=e.popToken(),r=t.text;return console.log(t,e.macros.get(r),Wh[r],ei.math[r],ei.text[r]),""});Te("\\bgroup","{");Te("\\egroup","}");Te("~","\\nobreakspace");Te("\\lq","`");Te("\\rq","'");Te("\\aa","\\r a");Te("\\AA","\\r A");Te("\\textcopyright","\\html@mathml{\\textcircled{c}}{\\char`\xA9}");Te("\\copyright","\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}");Te("\\textregistered","\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`\xAE}");Te("\u212C","\\mathscr{B}");Te("\u2130","\\mathscr{E}");Te("\u2131","\\mathscr{F}");Te("\u210B","\\mathscr{H}");Te("\u2110","\\mathscr{I}");Te("\u2112","\\mathscr{L}");Te("\u2133","\\mathscr{M}");Te("\u211B","\\mathscr{R}");Te("\u212D","\\mathfrak{C}");Te("\u210C","\\mathfrak{H}");Te("\u2128","\\mathfrak{Z}");Te("\\Bbbk","\\Bbb{k}");Te("\\llap","\\mathllap{\\textrm{#1}}");Te("\\rlap","\\mathrlap{\\textrm{#1}}");Te("\\clap","\\mathclap{\\textrm{#1}}");Te("\\mathstrut","\\vphantom{(}");Te("\\underbar","\\underline{\\text{#1}}");Te("\\not",'\\html@mathml{\\mathrel{\\mathrlap\\@not}\\nobreak}{\\char"338}');Te("\\neq","\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`\u2260}}");Te("\\ne","\\neq");Te("\u2260","\\neq");Te("\\notin","\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`\u2209}}");Te("\u2209","\\notin");Te("\u2258","\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`\u2258}}");Te("\u2259","\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`\u2258}}");Te("\u225A","\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`\u225A}}");Te("\u225B","\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`\u225B}}");Te("\u225D","\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`\u225D}}");Te("\u225E","\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`\u225E}}");Te("\u225F","\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`\u225F}}");Te("\u27C2","\\perp");Te("\u203C","\\mathclose{!\\mkern-0.8mu!}");Te("\u220C","\\notni");Te("\u231C","\\ulcorner");Te("\u231D","\\urcorner");Te("\u231E","\\llcorner");Te("\u231F","\\lrcorner");Te("\xA9","\\copyright");Te("\xAE","\\textregistered");Te("\\ulcorner",'\\html@mathml{\\@ulcorner}{\\mathop{\\char"231c}}');Te("\\urcorner",'\\html@mathml{\\@urcorner}{\\mathop{\\char"231d}}');Te("\\llcorner",'\\html@mathml{\\@llcorner}{\\mathop{\\char"231e}}');Te("\\lrcorner",'\\html@mathml{\\@lrcorner}{\\mathop{\\char"231f}}');Te("\\vdots","{\\varvdots\\rule{0pt}{15pt}}");Te("\u22EE","\\vdots");Te("\\varGamma","\\mathit{\\Gamma}");Te("\\varDelta","\\mathit{\\Delta}");Te("\\varTheta","\\mathit{\\Theta}");Te("\\varLambda","\\mathit{\\Lambda}");Te("\\varXi","\\mathit{\\Xi}");Te("\\varPi","\\mathit{\\Pi}");Te("\\varSigma","\\mathit{\\Sigma}");Te("\\varUpsilon","\\mathit{\\Upsilon}");Te("\\varPhi","\\mathit{\\Phi}");Te("\\varPsi","\\mathit{\\Psi}");Te("\\varOmega","\\mathit{\\Omega}");Te("\\substack","\\begin{subarray}{c}#1\\end{subarray}");Te("\\colon","\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu\\relax");Te("\\boxed","\\fbox{$\\displaystyle{#1}$}");Te("\\iff","\\DOTSB\\;\\Longleftrightarrow\\;");Te("\\implies","\\DOTSB\\;\\Longrightarrow\\;");Te("\\impliedby","\\DOTSB\\;\\Longleftarrow\\;");Te("\\dddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ...}}{#1}}");Te("\\ddddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ....}}{#1}}");eK={",":"\\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"},b9e=new Set(["bin","rel"]);Te("\\dots",function(e){var t="\\dotso",r=e.expandAfterFuture().text;return r in eK?t=eK[r]:(r.slice(0,4)==="\\not"||r in ei.math&&b9e.has(ei.math[r].group))&&(t="\\dotsb"),t});DD={")":!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};Te("\\dotso",function(e){var t=e.future().text;return t in DD?"\\ldots\\,":"\\ldots"});Te("\\dotsc",function(e){var t=e.future().text;return t in DD&&t!==","?"\\ldots\\,":"\\ldots"});Te("\\cdots",function(e){var t=e.future().text;return t in DD?"\\@cdots\\,":"\\@cdots"});Te("\\dotsb","\\cdots");Te("\\dotsm","\\cdots");Te("\\dotsi","\\!\\cdots");Te("\\dotsx","\\ldots\\,");Te("\\DOTSI","\\relax");Te("\\DOTSB","\\relax");Te("\\DOTSX","\\relax");Te("\\tmspace","\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax");Te("\\,","\\tmspace+{3mu}{.1667em}");Te("\\thinspace","\\,");Te("\\>","\\mskip{4mu}");Te("\\:","\\tmspace+{4mu}{.2222em}");Te("\\medspace","\\:");Te("\\;","\\tmspace+{5mu}{.2777em}");Te("\\thickspace","\\;");Te("\\!","\\tmspace-{3mu}{.1667em}");Te("\\negthinspace","\\!");Te("\\negmedspace","\\tmspace-{4mu}{.2222em}");Te("\\negthickspace","\\tmspace-{5mu}{.277em}");Te("\\enspace","\\kern.5em ");Te("\\enskip","\\hskip.5em\\relax");Te("\\quad","\\hskip1em\\relax");Te("\\qquad","\\hskip2em\\relax");Te("\\tag","\\@ifstar\\tag@literal\\tag@paren");Te("\\tag@paren","\\tag@literal{({#1})}");Te("\\tag@literal",e=>{if(e.macros.get("\\df@tag"))throw new Pt("Multiple \\tag");return"\\gdef\\df@tag{\\text{#1}}"});Te("\\bmod","\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}");Te("\\pod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)");Te("\\pmod","\\pod{{\\rm mod}\\mkern6mu#1}");Te("\\mod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1");Te("\\newline","\\\\\\relax");Te("\\TeX","\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}");jK=$t(ic["Main-Regular"][84][1]-.7*ic["Main-Regular"][65][1]);Te("\\LaTeX","\\textrm{\\html@mathml{"+("L\\kern-.36em\\raisebox{"+jK+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{LaTeX}}");Te("\\KaTeX","\\textrm{\\html@mathml{"+("K\\kern-.17em\\raisebox{"+jK+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{KaTeX}}");Te("\\hspace","\\@ifstar\\@hspacer\\@hspace");Te("\\@hspace","\\hskip #1\\relax");Te("\\@hspacer","\\rule{0pt}{0pt}\\hskip #1\\relax");Te("\\ordinarycolon",":");Te("\\vcentcolon","\\mathrel{\\mathop\\ordinarycolon}");Te("\\dblcolon",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}');Te("\\coloneqq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}');Te("\\Coloneqq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}');Te("\\coloneq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}');Te("\\Coloneq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}');Te("\\eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}');Te("\\Eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}');Te("\\eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}');Te("\\Eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}');Te("\\colonapprox",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}');Te("\\Colonapprox",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}');Te("\\colonsim",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}');Te("\\Colonsim",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}');Te("\u2237","\\dblcolon");Te("\u2239","\\eqcolon");Te("\u2254","\\coloneqq");Te("\u2255","\\eqqcolon");Te("\u2A74","\\Coloneqq");Te("\\ratio","\\vcentcolon");Te("\\coloncolon","\\dblcolon");Te("\\colonequals","\\coloneqq");Te("\\coloncolonequals","\\Coloneqq");Te("\\equalscolon","\\eqqcolon");Te("\\equalscoloncolon","\\Eqqcolon");Te("\\colonminus","\\coloneq");Te("\\coloncolonminus","\\Coloneq");Te("\\minuscolon","\\eqcolon");Te("\\minuscoloncolon","\\Eqcolon");Te("\\coloncolonapprox","\\Colonapprox");Te("\\coloncolonsim","\\Colonsim");Te("\\simcolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}");Te("\\simcoloncolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}");Te("\\approxcolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}");Te("\\approxcoloncolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}");Te("\\notni","\\html@mathml{\\not\\ni}{\\mathrel{\\char`\u220C}}");Te("\\limsup","\\DOTSB\\operatorname*{lim\\,sup}");Te("\\liminf","\\DOTSB\\operatorname*{lim\\,inf}");Te("\\injlim","\\DOTSB\\operatorname*{inj\\,lim}");Te("\\projlim","\\DOTSB\\operatorname*{proj\\,lim}");Te("\\varlimsup","\\DOTSB\\operatorname*{\\overline{lim}}");Te("\\varliminf","\\DOTSB\\operatorname*{\\underline{lim}}");Te("\\varinjlim","\\DOTSB\\operatorname*{\\underrightarrow{lim}}");Te("\\varprojlim","\\DOTSB\\operatorname*{\\underleftarrow{lim}}");Te("\\gvertneqq","\\html@mathml{\\@gvertneqq}{\u2269}");Te("\\lvertneqq","\\html@mathml{\\@lvertneqq}{\u2268}");Te("\\ngeqq","\\html@mathml{\\@ngeqq}{\u2271}");Te("\\ngeqslant","\\html@mathml{\\@ngeqslant}{\u2271}");Te("\\nleqq","\\html@mathml{\\@nleqq}{\u2270}");Te("\\nleqslant","\\html@mathml{\\@nleqslant}{\u2270}");Te("\\nshortmid","\\html@mathml{\\@nshortmid}{\u2224}");Te("\\nshortparallel","\\html@mathml{\\@nshortparallel}{\u2226}");Te("\\nsubseteqq","\\html@mathml{\\@nsubseteqq}{\u2288}");Te("\\nsupseteqq","\\html@mathml{\\@nsupseteqq}{\u2289}");Te("\\varsubsetneq","\\html@mathml{\\@varsubsetneq}{\u228A}");Te("\\varsubsetneqq","\\html@mathml{\\@varsubsetneqq}{\u2ACB}");Te("\\varsupsetneq","\\html@mathml{\\@varsupsetneq}{\u228B}");Te("\\varsupsetneqq","\\html@mathml{\\@varsupsetneqq}{\u2ACC}");Te("\\imath","\\html@mathml{\\@imath}{\u0131}");Te("\\jmath","\\html@mathml{\\@jmath}{\u0237}");Te("\\llbracket","\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`\u27E6}}");Te("\\rrbracket","\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`\u27E7}}");Te("\u27E6","\\llbracket");Te("\u27E7","\\rrbracket");Te("\\lBrace","\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`\u2983}}");Te("\\rBrace","\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`\u2984}}");Te("\u2983","\\lBrace");Te("\u2984","\\rBrace");Te("\\minuso","\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`\u29B5}}");Te("\u29B5","\\minuso");Te("\\darr","\\downarrow");Te("\\dArr","\\Downarrow");Te("\\Darr","\\Downarrow");Te("\\lang","\\langle");Te("\\rang","\\rangle");Te("\\uarr","\\uparrow");Te("\\uArr","\\Uparrow");Te("\\Uarr","\\Uparrow");Te("\\N","\\mathbb{N}");Te("\\R","\\mathbb{R}");Te("\\Z","\\mathbb{Z}");Te("\\alef","\\aleph");Te("\\alefsym","\\aleph");Te("\\Alpha","\\mathrm{A}");Te("\\Beta","\\mathrm{B}");Te("\\bull","\\bullet");Te("\\Chi","\\mathrm{X}");Te("\\clubs","\\clubsuit");Te("\\cnums","\\mathbb{C}");Te("\\Complex","\\mathbb{C}");Te("\\Dagger","\\ddagger");Te("\\diamonds","\\diamondsuit");Te("\\empty","\\emptyset");Te("\\Epsilon","\\mathrm{E}");Te("\\Eta","\\mathrm{H}");Te("\\exist","\\exists");Te("\\harr","\\leftrightarrow");Te("\\hArr","\\Leftrightarrow");Te("\\Harr","\\Leftrightarrow");Te("\\hearts","\\heartsuit");Te("\\image","\\Im");Te("\\infin","\\infty");Te("\\Iota","\\mathrm{I}");Te("\\isin","\\in");Te("\\Kappa","\\mathrm{K}");Te("\\larr","\\leftarrow");Te("\\lArr","\\Leftarrow");Te("\\Larr","\\Leftarrow");Te("\\lrarr","\\leftrightarrow");Te("\\lrArr","\\Leftrightarrow");Te("\\Lrarr","\\Leftrightarrow");Te("\\Mu","\\mathrm{M}");Te("\\natnums","\\mathbb{N}");Te("\\Nu","\\mathrm{N}");Te("\\Omicron","\\mathrm{O}");Te("\\plusmn","\\pm");Te("\\rarr","\\rightarrow");Te("\\rArr","\\Rightarrow");Te("\\Rarr","\\Rightarrow");Te("\\real","\\Re");Te("\\reals","\\mathbb{R}");Te("\\Reals","\\mathbb{R}");Te("\\Rho","\\mathrm{P}");Te("\\sdot","\\cdot");Te("\\sect","\\S");Te("\\spades","\\spadesuit");Te("\\sub","\\subset");Te("\\sube","\\subseteq");Te("\\supe","\\supseteq");Te("\\Tau","\\mathrm{T}");Te("\\thetasym","\\vartheta");Te("\\weierp","\\wp");Te("\\Zeta","\\mathrm{Z}");Te("\\argmin","\\DOTSB\\operatorname*{arg\\,min}");Te("\\argmax","\\DOTSB\\operatorname*{arg\\,max}");Te("\\plim","\\DOTSB\\mathop{\\operatorname{plim}}\\limits");Te("\\bra","\\mathinner{\\langle{#1}|}");Te("\\ket","\\mathinner{|{#1}\\rangle}");Te("\\braket","\\mathinner{\\langle{#1}\\rangle}");Te("\\Bra","\\left\\langle#1\\right|");Te("\\Ket","\\left|#1\\right\\rangle");XK=s(e=>t=>{var r=t.consumeArg().tokens,n=t.consumeArg().tokens,i=t.consumeArg().tokens,a=t.consumeArg().tokens,o=t.macros.get("|"),l=t.macros.get("\\|");t.macros.beginGroup();var u=s(f=>p=>{e&&(p.macros.set("|",o),i.length&&p.macros.set("\\|",l));var m=f;if(!f&&i.length){var g=p.future();g.text==="|"&&(p.popToken(),m=!0)}return{tokens:m?i:n,numArgs:0}},"midMacro");t.macros.set("|",u(!1)),i.length&&t.macros.set("\\|",u(!0));var h=t.consumeArg().tokens,d=t.expandTokens([...a,...h,...r]);return t.macros.endGroup(),{tokens:d.reverse(),numArgs:0}},"braketHelper");Te("\\bra@ket",XK(!1));Te("\\bra@set",XK(!0));Te("\\Braket","\\bra@ket{\\left\\langle}{\\,\\middle\\vert\\,}{\\,\\middle\\vert\\,}{\\right\\rangle}");Te("\\Set","\\bra@set{\\left\\{\\:}{\\;\\middle\\vert\\;}{\\;\\middle\\Vert\\;}{\\:\\right\\}}");Te("\\set","\\bra@set{\\{\\,}{\\mid}{}{\\,\\}}");Te("\\angln","{\\angl n}");Te("\\blue","\\textcolor{##6495ed}{#1}");Te("\\orange","\\textcolor{##ffa500}{#1}");Te("\\pink","\\textcolor{##ff00af}{#1}");Te("\\red","\\textcolor{##df0030}{#1}");Te("\\green","\\textcolor{##28ae7b}{#1}");Te("\\gray","\\textcolor{gray}{#1}");Te("\\purple","\\textcolor{##9d38bd}{#1}");Te("\\blueA","\\textcolor{##ccfaff}{#1}");Te("\\blueB","\\textcolor{##80f6ff}{#1}");Te("\\blueC","\\textcolor{##63d9ea}{#1}");Te("\\blueD","\\textcolor{##11accd}{#1}");Te("\\blueE","\\textcolor{##0c7f99}{#1}");Te("\\tealA","\\textcolor{##94fff5}{#1}");Te("\\tealB","\\textcolor{##26edd5}{#1}");Te("\\tealC","\\textcolor{##01d1c1}{#1}");Te("\\tealD","\\textcolor{##01a995}{#1}");Te("\\tealE","\\textcolor{##208170}{#1}");Te("\\greenA","\\textcolor{##b6ffb0}{#1}");Te("\\greenB","\\textcolor{##8af281}{#1}");Te("\\greenC","\\textcolor{##74cf70}{#1}");Te("\\greenD","\\textcolor{##1fab54}{#1}");Te("\\greenE","\\textcolor{##0d923f}{#1}");Te("\\goldA","\\textcolor{##ffd0a9}{#1}");Te("\\goldB","\\textcolor{##ffbb71}{#1}");Te("\\goldC","\\textcolor{##ff9c39}{#1}");Te("\\goldD","\\textcolor{##e07d10}{#1}");Te("\\goldE","\\textcolor{##a75a05}{#1}");Te("\\redA","\\textcolor{##fca9a9}{#1}");Te("\\redB","\\textcolor{##ff8482}{#1}");Te("\\redC","\\textcolor{##f9685d}{#1}");Te("\\redD","\\textcolor{##e84d39}{#1}");Te("\\redE","\\textcolor{##bc2612}{#1}");Te("\\maroonA","\\textcolor{##ffbde0}{#1}");Te("\\maroonB","\\textcolor{##ff92c6}{#1}");Te("\\maroonC","\\textcolor{##ed5fa6}{#1}");Te("\\maroonD","\\textcolor{##ca337c}{#1}");Te("\\maroonE","\\textcolor{##9e034e}{#1}");Te("\\purpleA","\\textcolor{##ddd7ff}{#1}");Te("\\purpleB","\\textcolor{##c6b9fc}{#1}");Te("\\purpleC","\\textcolor{##aa87ff}{#1}");Te("\\purpleD","\\textcolor{##7854ab}{#1}");Te("\\purpleE","\\textcolor{##543b78}{#1}");Te("\\mintA","\\textcolor{##f5f9e8}{#1}");Te("\\mintB","\\textcolor{##edf2df}{#1}");Te("\\mintC","\\textcolor{##e0e5cc}{#1}");Te("\\grayA","\\textcolor{##f6f7f7}{#1}");Te("\\grayB","\\textcolor{##f0f1f2}{#1}");Te("\\grayC","\\textcolor{##e3e5e6}{#1}");Te("\\grayD","\\textcolor{##d6d8da}{#1}");Te("\\grayE","\\textcolor{##babec2}{#1}");Te("\\grayF","\\textcolor{##888d93}{#1}");Te("\\grayG","\\textcolor{##626569}{#1}");Te("\\grayH","\\textcolor{##3b3e40}{#1}");Te("\\grayI","\\textcolor{##21242c}{#1}");Te("\\kaBlue","\\textcolor{##314453}{#1}");Te("\\kaGreen","\\textcolor{##71B307}{#1}");KK={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0},vD=class{static{s(this,"MacroExpander")}constructor(t,r,n){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=r,this.expansionCount=0,this.feed(t),this.macros=new yD(x9e,r.macros),this.mode=n,this.stack=[]}feed(t){this.lexer=new Kk(t,this.settings)}switchMode(t){this.mode=t}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(t){this.stack.push(t)}pushTokens(t){this.stack.push(...t)}scanArgument(t){var r,n,i;if(t){if(this.consumeSpaces(),this.future().text!=="[")return null;r=this.popToken(),{tokens:i,end:n}=this.consumeArg(["]"])}else({tokens:i,start:r,end:n}=this.consumeArg());return this.pushToken(new fo("EOF",n.loc)),this.pushTokens(i),new fo("",Os.range(r,n))}consumeSpaces(){for(;;){var t=this.future();if(t.text===" ")this.stack.pop();else break}}consumeArg(t){var r=[],n=t&&t.length>0;n||this.consumeSpaces();var i=this.future(),a,o=0,l=0;do{if(a=this.popToken(),r.push(a),a.text==="{")++o;else if(a.text==="}"){if(--o,o===-1)throw new Pt("Extra }",a)}else if(a.text==="EOF")throw new Pt("Unexpected end of input in a macro argument, expected '"+(t&&n?t[l]:"}")+"'",a);if(t&&n)if((o===0||o===1&&t[l]==="{")&&a.text===t[l]){if(++l,l===t.length){r.splice(-l,l);break}}else l=0}while(o!==0||n);return i.text==="{"&&r[r.length-1].text==="}"&&(r.pop(),r.shift()),r.reverse(),{tokens:r,start:i,end:a}}consumeArgs(t,r){if(r){if(r.length!==t+1)throw new Pt("The length of delimiters doesn't match the number of args!");for(var n=r[0],i=0;ithis.settings.maxExpand)throw new Pt("Too many expansions: infinite loop or need to increase maxExpand setting")}expandOnce(t){var r=this.popToken(),n=r.text,i=r.noexpand?null:this._getExpansion(n);if(i==null||t&&i.unexpandable){if(t&&i==null&&n[0]==="\\"&&!this.isDefined(n))throw new Pt("Undefined control sequence: "+n);return this.pushToken(r),!1}this.countExpansion(1);var a=i.tokens,o=this.consumeArgs(i.numArgs,i.delimiters);if(i.numArgs){a=a.slice();for(var l=a.length-1;l>=0;--l){var u=a[l];if(u.text==="#"){if(l===0)throw new Pt("Incomplete placeholder at end of macro body",u);if(u=a[--l],u.text==="#")a.splice(l+1,1);else if(/^[1-9]$/.test(u.text))a.splice(l,2,...o[+u.text-1]);else throw new Pt("Not a valid argument number",u)}}}return this.pushTokens(a),a.length}expandAfterFuture(){return this.expandOnce(),this.future()}expandNextToken(){for(;;)if(this.expandOnce()===!1){var t=this.stack.pop();return t.treatAsRelax&&(t.text="\\relax"),t}}expandMacro(t){return this.macros.has(t)?this.expandTokens([new fo(t)]):void 0}expandTokens(t){var r=[],n=this.stack.length;for(this.pushTokens(t);this.stack.length>n;)if(this.expandOnce(!0)===!1){var i=this.stack.pop();i.treatAsRelax&&(i.noexpand=!1,i.treatAsRelax=!1),r.push(i)}return this.countExpansion(r.length),r}expandMacroAsText(t){var r=this.expandMacro(t);return r&&r.map(n=>n.text).join("")}_getExpansion(t){var r=this.macros.get(t);if(r==null)return r;if(t.length===1){var n=this.lexer.catcodes[t];if(n!=null&&n!==13)return}var i=typeof r=="function"?r(this):r;if(typeof i=="string"){var a=0;if(i.includes("#"))for(var o=i.replace(/##/g,"");o.includes("#"+(a+1));)++a;for(var l=new Kk(i,this.settings),u=[],h=l.lex();h.text!=="EOF";)u.push(h),h=l.lex();u.reverse();var d={tokens:u,numArgs:a};return d}return i}isDefined(t){return this.macros.has(t)||Wh.hasOwnProperty(t)||ei.math.hasOwnProperty(t)||ei.text.hasOwnProperty(t)||KK.hasOwnProperty(t)}isExpandable(t){var r=this.macros.get(t);return r!=null?typeof r=="string"||typeof r=="function"||!r.unexpandable:Wh.hasOwnProperty(t)&&!Wh[t].primitive}},tK=/^[₊₋₌₍₎₀₁₂₃₄₅₆₇₈₉ₐₑₕᵢⱼₖₗₘₙₒₚᵣₛₜᵤᵥₓᵦᵧᵨᵩᵪ]/,Fk=Object.freeze({"\u208A":"+","\u208B":"-","\u208C":"=","\u208D":"(","\u208E":")","\u2080":"0","\u2081":"1","\u2082":"2","\u2083":"3","\u2084":"4","\u2085":"5","\u2086":"6","\u2087":"7","\u2088":"8","\u2089":"9","\u2090":"a","\u2091":"e","\u2095":"h","\u1D62":"i","\u2C7C":"j","\u2096":"k","\u2097":"l","\u2098":"m","\u2099":"n","\u2092":"o","\u209A":"p","\u1D63":"r","\u209B":"s","\u209C":"t","\u1D64":"u","\u1D65":"v","\u2093":"x","\u1D66":"\u03B2","\u1D67":"\u03B3","\u1D68":"\u03C1","\u1D69":"\u03D5","\u1D6A":"\u03C7","\u207A":"+","\u207B":"-","\u207C":"=","\u207D":"(","\u207E":")","\u2070":"0","\xB9":"1","\xB2":"2","\xB3":"3","\u2074":"4","\u2075":"5","\u2076":"6","\u2077":"7","\u2078":"8","\u2079":"9","\u1D2C":"A","\u1D2E":"B","\u1D30":"D","\u1D31":"E","\u1D33":"G","\u1D34":"H","\u1D35":"I","\u1D36":"J","\u1D37":"K","\u1D38":"L","\u1D39":"M","\u1D3A":"N","\u1D3C":"O","\u1D3E":"P","\u1D3F":"R","\u1D40":"T","\u1D41":"U","\u2C7D":"V","\u1D42":"W","\u1D43":"a","\u1D47":"b","\u1D9C":"c","\u1D48":"d","\u1D49":"e","\u1DA0":"f","\u1D4D":"g",\u02B0:"h","\u2071":"i",\u02B2:"j","\u1D4F":"k",\u02E1:"l","\u1D50":"m",\u207F:"n","\u1D52":"o","\u1D56":"p",\u02B3:"r",\u02E2:"s","\u1D57":"t","\u1D58":"u","\u1D5B":"v",\u02B7:"w",\u02E3:"x",\u02B8:"y","\u1DBB":"z","\u1D5D":"\u03B2","\u1D5E":"\u03B3","\u1D5F":"\u03B4","\u1D60":"\u03D5","\u1D61":"\u03C7","\u1DBF":"\u03B8"}),QL={"\u0301":{text:"\\'",math:"\\acute"},"\u0300":{text:"\\`",math:"\\grave"},"\u0308":{text:'\\"',math:"\\ddot"},"\u0303":{text:"\\~",math:"\\tilde"},"\u0304":{text:"\\=",math:"\\bar"},"\u0306":{text:"\\u",math:"\\breve"},"\u030C":{text:"\\v",math:"\\check"},"\u0302":{text:"\\^",math:"\\hat"},"\u0307":{text:"\\.",math:"\\dot"},"\u030A":{text:"\\r",math:"\\mathring"},"\u030B":{text:"\\H"},"\u0327":{text:"\\c"}},rK={\u00E1:"a\u0301",\u00E0:"a\u0300",\u00E4:"a\u0308",\u01DF:"a\u0308\u0304",\u00E3:"a\u0303",\u0101:"a\u0304",\u0103:"a\u0306",\u1EAF:"a\u0306\u0301",\u1EB1:"a\u0306\u0300",\u1EB5:"a\u0306\u0303",\u01CE:"a\u030C",\u00E2:"a\u0302",\u1EA5:"a\u0302\u0301",\u1EA7:"a\u0302\u0300",\u1EAB:"a\u0302\u0303",\u0227:"a\u0307",\u01E1:"a\u0307\u0304",\u00E5:"a\u030A",\u01FB:"a\u030A\u0301",\u1E03:"b\u0307",\u0107:"c\u0301",\u1E09:"c\u0327\u0301",\u010D:"c\u030C",\u0109:"c\u0302",\u010B:"c\u0307",\u00E7:"c\u0327",\u010F:"d\u030C",\u1E0B:"d\u0307",\u1E11:"d\u0327",\u00E9:"e\u0301",\u00E8:"e\u0300",\u00EB:"e\u0308",\u1EBD:"e\u0303",\u0113:"e\u0304",\u1E17:"e\u0304\u0301",\u1E15:"e\u0304\u0300",\u0115:"e\u0306",\u1E1D:"e\u0327\u0306",\u011B:"e\u030C",\u00EA:"e\u0302",\u1EBF:"e\u0302\u0301",\u1EC1:"e\u0302\u0300",\u1EC5:"e\u0302\u0303",\u0117:"e\u0307",\u0229:"e\u0327",\u1E1F:"f\u0307",\u01F5:"g\u0301",\u1E21:"g\u0304",\u011F:"g\u0306",\u01E7:"g\u030C",\u011D:"g\u0302",\u0121:"g\u0307",\u0123:"g\u0327",\u1E27:"h\u0308",\u021F:"h\u030C",\u0125:"h\u0302",\u1E23:"h\u0307",\u1E29:"h\u0327",\u00ED:"i\u0301",\u00EC:"i\u0300",\u00EF:"i\u0308",\u1E2F:"i\u0308\u0301",\u0129:"i\u0303",\u012B:"i\u0304",\u012D:"i\u0306",\u01D0:"i\u030C",\u00EE:"i\u0302",\u01F0:"j\u030C",\u0135:"j\u0302",\u1E31:"k\u0301",\u01E9:"k\u030C",\u0137:"k\u0327",\u013A:"l\u0301",\u013E:"l\u030C",\u013C:"l\u0327",\u1E3F:"m\u0301",\u1E41:"m\u0307",\u0144:"n\u0301",\u01F9:"n\u0300",\u00F1:"n\u0303",\u0148:"n\u030C",\u1E45:"n\u0307",\u0146:"n\u0327",\u00F3:"o\u0301",\u00F2:"o\u0300",\u00F6:"o\u0308",\u022B:"o\u0308\u0304",\u00F5:"o\u0303",\u1E4D:"o\u0303\u0301",\u1E4F:"o\u0303\u0308",\u022D:"o\u0303\u0304",\u014D:"o\u0304",\u1E53:"o\u0304\u0301",\u1E51:"o\u0304\u0300",\u014F:"o\u0306",\u01D2:"o\u030C",\u00F4:"o\u0302",\u1ED1:"o\u0302\u0301",\u1ED3:"o\u0302\u0300",\u1ED7:"o\u0302\u0303",\u022F:"o\u0307",\u0231:"o\u0307\u0304",\u0151:"o\u030B",\u1E55:"p\u0301",\u1E57:"p\u0307",\u0155:"r\u0301",\u0159:"r\u030C",\u1E59:"r\u0307",\u0157:"r\u0327",\u015B:"s\u0301",\u1E65:"s\u0301\u0307",\u0161:"s\u030C",\u1E67:"s\u030C\u0307",\u015D:"s\u0302",\u1E61:"s\u0307",\u015F:"s\u0327",\u1E97:"t\u0308",\u0165:"t\u030C",\u1E6B:"t\u0307",\u0163:"t\u0327",\u00FA:"u\u0301",\u00F9:"u\u0300",\u00FC:"u\u0308",\u01D8:"u\u0308\u0301",\u01DC:"u\u0308\u0300",\u01D6:"u\u0308\u0304",\u01DA:"u\u0308\u030C",\u0169:"u\u0303",\u1E79:"u\u0303\u0301",\u016B:"u\u0304",\u1E7B:"u\u0304\u0308",\u016D:"u\u0306",\u01D4:"u\u030C",\u00FB:"u\u0302",\u016F:"u\u030A",\u0171:"u\u030B",\u1E7D:"v\u0303",\u1E83:"w\u0301",\u1E81:"w\u0300",\u1E85:"w\u0308",\u0175:"w\u0302",\u1E87:"w\u0307",\u1E98:"w\u030A",\u1E8D:"x\u0308",\u1E8B:"x\u0307",\u00FD:"y\u0301",\u1EF3:"y\u0300",\u00FF:"y\u0308",\u1EF9:"y\u0303",\u0233:"y\u0304",\u0177:"y\u0302",\u1E8F:"y\u0307",\u1E99:"y\u030A",\u017A:"z\u0301",\u017E:"z\u030C",\u1E91:"z\u0302",\u017C:"z\u0307",\u00C1:"A\u0301",\u00C0:"A\u0300",\u00C4:"A\u0308",\u01DE:"A\u0308\u0304",\u00C3:"A\u0303",\u0100:"A\u0304",\u0102:"A\u0306",\u1EAE:"A\u0306\u0301",\u1EB0:"A\u0306\u0300",\u1EB4:"A\u0306\u0303",\u01CD:"A\u030C",\u00C2:"A\u0302",\u1EA4:"A\u0302\u0301",\u1EA6:"A\u0302\u0300",\u1EAA:"A\u0302\u0303",\u0226:"A\u0307",\u01E0:"A\u0307\u0304",\u00C5:"A\u030A",\u01FA:"A\u030A\u0301",\u1E02:"B\u0307",\u0106:"C\u0301",\u1E08:"C\u0327\u0301",\u010C:"C\u030C",\u0108:"C\u0302",\u010A:"C\u0307",\u00C7:"C\u0327",\u010E:"D\u030C",\u1E0A:"D\u0307",\u1E10:"D\u0327",\u00C9:"E\u0301",\u00C8:"E\u0300",\u00CB:"E\u0308",\u1EBC:"E\u0303",\u0112:"E\u0304",\u1E16:"E\u0304\u0301",\u1E14:"E\u0304\u0300",\u0114:"E\u0306",\u1E1C:"E\u0327\u0306",\u011A:"E\u030C",\u00CA:"E\u0302",\u1EBE:"E\u0302\u0301",\u1EC0:"E\u0302\u0300",\u1EC4:"E\u0302\u0303",\u0116:"E\u0307",\u0228:"E\u0327",\u1E1E:"F\u0307",\u01F4:"G\u0301",\u1E20:"G\u0304",\u011E:"G\u0306",\u01E6:"G\u030C",\u011C:"G\u0302",\u0120:"G\u0307",\u0122:"G\u0327",\u1E26:"H\u0308",\u021E:"H\u030C",\u0124:"H\u0302",\u1E22:"H\u0307",\u1E28:"H\u0327",\u00CD:"I\u0301",\u00CC:"I\u0300",\u00CF:"I\u0308",\u1E2E:"I\u0308\u0301",\u0128:"I\u0303",\u012A:"I\u0304",\u012C:"I\u0306",\u01CF:"I\u030C",\u00CE:"I\u0302",\u0130:"I\u0307",\u0134:"J\u0302",\u1E30:"K\u0301",\u01E8:"K\u030C",\u0136:"K\u0327",\u0139:"L\u0301",\u013D:"L\u030C",\u013B:"L\u0327",\u1E3E:"M\u0301",\u1E40:"M\u0307",\u0143:"N\u0301",\u01F8:"N\u0300",\u00D1:"N\u0303",\u0147:"N\u030C",\u1E44:"N\u0307",\u0145:"N\u0327",\u00D3:"O\u0301",\u00D2:"O\u0300",\u00D6:"O\u0308",\u022A:"O\u0308\u0304",\u00D5:"O\u0303",\u1E4C:"O\u0303\u0301",\u1E4E:"O\u0303\u0308",\u022C:"O\u0303\u0304",\u014C:"O\u0304",\u1E52:"O\u0304\u0301",\u1E50:"O\u0304\u0300",\u014E:"O\u0306",\u01D1:"O\u030C",\u00D4:"O\u0302",\u1ED0:"O\u0302\u0301",\u1ED2:"O\u0302\u0300",\u1ED6:"O\u0302\u0303",\u022E:"O\u0307",\u0230:"O\u0307\u0304",\u0150:"O\u030B",\u1E54:"P\u0301",\u1E56:"P\u0307",\u0154:"R\u0301",\u0158:"R\u030C",\u1E58:"R\u0307",\u0156:"R\u0327",\u015A:"S\u0301",\u1E64:"S\u0301\u0307",\u0160:"S\u030C",\u1E66:"S\u030C\u0307",\u015C:"S\u0302",\u1E60:"S\u0307",\u015E:"S\u0327",\u0164:"T\u030C",\u1E6A:"T\u0307",\u0162:"T\u0327",\u00DA:"U\u0301",\u00D9:"U\u0300",\u00DC:"U\u0308",\u01D7:"U\u0308\u0301",\u01DB:"U\u0308\u0300",\u01D5:"U\u0308\u0304",\u01D9:"U\u0308\u030C",\u0168:"U\u0303",\u1E78:"U\u0303\u0301",\u016A:"U\u0304",\u1E7A:"U\u0304\u0308",\u016C:"U\u0306",\u01D3:"U\u030C",\u00DB:"U\u0302",\u016E:"U\u030A",\u0170:"U\u030B",\u1E7C:"V\u0303",\u1E82:"W\u0301",\u1E80:"W\u0300",\u1E84:"W\u0308",\u0174:"W\u0302",\u1E86:"W\u0307",\u1E8C:"X\u0308",\u1E8A:"X\u0307",\u00DD:"Y\u0301",\u1EF2:"Y\u0300",\u0178:"Y\u0308",\u1EF8:"Y\u0303",\u0232:"Y\u0304",\u0176:"Y\u0302",\u1E8E:"Y\u0307",\u0179:"Z\u0301",\u017D:"Z\u030C",\u1E90:"Z\u0302",\u017B:"Z\u0307",\u03AC:"\u03B1\u0301",\u1F70:"\u03B1\u0300",\u1FB1:"\u03B1\u0304",\u1FB0:"\u03B1\u0306",\u03AD:"\u03B5\u0301",\u1F72:"\u03B5\u0300",\u03AE:"\u03B7\u0301",\u1F74:"\u03B7\u0300",\u03AF:"\u03B9\u0301",\u1F76:"\u03B9\u0300",\u03CA:"\u03B9\u0308",\u0390:"\u03B9\u0308\u0301",\u1FD2:"\u03B9\u0308\u0300",\u1FD1:"\u03B9\u0304",\u1FD0:"\u03B9\u0306",\u03CC:"\u03BF\u0301",\u1F78:"\u03BF\u0300",\u03CD:"\u03C5\u0301",\u1F7A:"\u03C5\u0300",\u03CB:"\u03C5\u0308",\u03B0:"\u03C5\u0308\u0301",\u1FE2:"\u03C5\u0308\u0300",\u1FE1:"\u03C5\u0304",\u1FE0:"\u03C5\u0306",\u03CE:"\u03C9\u0301",\u1F7C:"\u03C9\u0300",\u038E:"\u03A5\u0301",\u1FEA:"\u03A5\u0300",\u03AB:"\u03A5\u0308",\u1FE9:"\u03A5\u0304",\u1FE8:"\u03A5\u0306",\u038F:"\u03A9\u0301",\u1FFA:"\u03A9\u0300"},Zk=class e{static{s(this,"Parser")}constructor(t,r){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 vD(t,r,this.mode),this.settings=r,this.leftrightDepth=0,this.nextToken=null}expect(t,r){if(r===void 0&&(r=!0),this.fetch().text!==t)throw new Pt("Expected '"+t+"', got '"+this.fetch().text+"'",this.fetch());r&&this.consume()}consume(){this.nextToken=null}fetch(){return this.nextToken==null&&(this.nextToken=this.gullet.expandNextToken()),this.nextToken}switchMode(t){this.mode=t,this.gullet.switchMode(t)}parse(){this.settings.globalGroup||this.gullet.beginGroup(),this.settings.colorIsTextColor&&this.gullet.macros.set("\\color","\\textcolor");try{var t=this.parseExpression(!1);return this.expect("EOF"),this.settings.globalGroup||this.gullet.endGroup(),t}finally{this.gullet.endGroups()}}subparse(t){var r=this.nextToken;this.consume(),this.gullet.pushToken(new fo("}")),this.gullet.pushTokens(t);var n=this.parseExpression(!1);return this.expect("}"),this.nextToken=r,n}parseExpression(t,r){for(var n=[];;){this.mode==="math"&&this.consumeSpaces();var i=this.fetch();if(e.endOfExpression.has(i.text)||r&&i.text===r||t&&Wh[i.text]&&Wh[i.text].infix)break;var a=this.parseAtom(r);if(a){if(a.type==="internal")continue}else break;n.push(a)}return this.mode==="text"&&this.formLigatures(n),this.handleInfixNodes(n)}handleInfixNodes(t){for(var r=-1,n,i=0;i=128)this.settings.strict&&(nK(r.charCodeAt(0))?this.mode==="math"&&this.settings.reportNonstrict("unicodeTextInMathMode",'Unicode text character "'+r[0]+'" used in math mode',t):this.settings.reportNonstrict("unknownSymbol",'Unrecognized Unicode character "'+r[0]+'"'+(" ("+r.charCodeAt(0)+")"),t)),o={type:"textord",mode:"text",loc:Os.range(t),text:r};else return null;if(this.consume(),a)for(var d=0;d{t.tagName==="A"&&t.hasAttribute("target")&&t.setAttribute(e,t.getAttribute("target")??"")}),Ps.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"))})}var op,C9e,k9e,oZ,aZ,vr,S9e,E9e,A9e,R9e,lZ,gx,_9e,L9e,cc,ND,D9e,I9e,sZ,uw,jn,lp,M9e,l0,xt,Gr=F(()=>{"use strict";Jg();mr();op=//gi,C9e=s(e=>e?lZ(e).replace(/\\n/g,"#br#").split("#br#"):[""],"getRows"),k9e=(()=>{let e=!1;return()=>{e||(w9e(),e=!0)}})();s(w9e,"setupDompurifyHooks");oZ=s(e=>(k9e(),Ps.sanitize(e)),"removeScript"),aZ=s((e,t)=>{if(Yn(t)){let r=t.securityLevel;r==="antiscript"||r==="strict"||r==="sandbox"?e=oZ(e):r!=="loose"&&(e=lZ(e),e=e.replace(//g,">"),e=e.replace(/=/g,"="),e=R9e(e))}return e},"sanitizeMore"),vr=s((e,t)=>e&&(t.dompurifyConfig?e=Ps.sanitize(aZ(e,t),t.dompurifyConfig).toString():e=Ps.sanitize(aZ(e,t),{FORBID_TAGS:["style"]}).toString(),e),"sanitizeText"),S9e=s((e,t)=>typeof e=="string"?vr(e,t):e.flat().map(r=>vr(r,t)),"sanitizeTextOrArray"),E9e=s(e=>op.test(e),"hasBreaks"),A9e=s(e=>e.split(op),"splitBreaks"),R9e=s(e=>e.replace(/#br#/g,"
"),"placeholderToBreak"),lZ=s(e=>e.replace(op,"#br#"),"breakToPlaceholder"),gx=s(e=>{let t="";return e&&(t=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,t=CSS.escape(t)),t},"getUrl"),_9e=s(function(...e){let t=e.filter(r=>!isNaN(r));return Math.max(...t)},"getMax"),L9e=s(function(...e){let t=e.filter(r=>!isNaN(r));return Math.min(...t)},"getMin"),cc=s(function(e){let t=e.split(/(,)/),r=[];for(let n=0;n0&&n+1Math.max(0,e.split(t).length-1),"countOccurrence"),D9e=s((e,t)=>{let r=ND(e,"~"),n=ND(t,"~");return r===1&&n===1},"shouldCombineSets"),I9e=s(e=>{let t=ND(e,"~"),r=!1;if(t<=1)return e;t%2!==0&&e.startsWith("~")&&(e=e.substring(1),r=!0);let n=[...e],i=n.indexOf("~"),a=n.lastIndexOf("~");for(;i!==-1&&a!==-1&&i!==a;)n[i]="<",n[a]=">",i=n.indexOf("~"),a=n.lastIndexOf("~");return r&&n.unshift("~"),n.join("")},"processSet"),sZ=s(()=>window.MathMLElement!==void 0,"isMathMLSupported"),uw=/\$\$(.*?)\$\$/g,jn=s(e=>(e.match(uw)?.length??0)>0,"hasKatex"),lp=s(async(e,t)=>{let r=document.createElement("div");r.innerHTML=await l0(e,t),r.id="katex-temp",r.style.visibility="hidden",r.style.position="absolute",r.style.top="0",document.querySelector("body")?.insertAdjacentElement("beforeend",r);let i={width:r.clientWidth,height:r.clientHeight};return r.remove(),i},"calculateMathMLDimensions"),M9e=s(async(e,t)=>{if(!jn(e))return e;if(!(sZ()||t.legacyMathML||t.forceLegacyMathML))return e.replace(uw,"MathML is unsupported in this environment.");{let{default:r}=await Promise.resolve().then(()=>(iZ(),nZ)),n=t.forceLegacyMathML||!sZ()&&t.legacyMathML?"htmlAndMathml":"mathml";return e.split(op).map(i=>jn(i)?`
${i}
`:`
${i}
`).join("").replace(uw,(i,a)=>r.renderToString(a,{throwOnError:!0,displayMode:!0,output:n}).replace(/\n/g," ").replace(//g,""))}return e.replace(uw,"Katex is not supported in @mermaid-js/tiny. Please use the full mermaid library.")},"renderKatexUnsanitized"),l0=s(async(e,t)=>vr(await M9e(e,t),t),"renderKatexSanitized"),xt={getRows:C9e,sanitizeText:vr,sanitizeTextOrArray:S9e,hasBreaks:E9e,splitBreaks:A9e,lineBreakRegex:op,removeScript:oZ,getUrl:gx,evaluate:sa,getMax:_9e,getMin:L9e}});var OD,PD,cZ,c0,uZ,hZ,Va,ml=F(()=>{"use strict";rj();mr();Gr();Tt();OD={body:'?',height:80,width:80},PD=new Map,cZ=new Map,c0=s(e=>{for(let t of e){if(!t.name)throw new Error('Invalid icon loader. Must have a "name" property with non-empty string value.');if(te.debug("Registering icon pack:",t.name),"loader"in t)cZ.set(t.name,t.loader);else if("icons"in t)PD.set(t.name,t.icons);else throw te.error("Invalid icon loader:",t),new Error('Invalid icon loader. Must have either "icons" or "loader" property.')}},"registerIconPacks"),uZ=s(async(e,t)=>{let r=eL(e,!0,t!==void 0);if(!r)throw new Error(`Invalid icon name: ${e}`);let n=r.prefix||t;if(!n)throw new Error(`Icon name must contain a prefix: ${e}`);let i=PD.get(n);if(!i){let o=cZ.get(n);if(!o)throw new Error(`Icon set not found: ${r.prefix}`);try{i={...await o(),prefix:n},PD.set(n,i)}catch(l){throw te.error(l),new Error(`Failed to load icon set: ${r.prefix}`)}}let a=rL(i,r.name);if(!a)throw new Error(`Icon not found: ${e}`);return a},"getRegisteredIconData"),hZ=s(async e=>{try{return await uZ(e),!0}catch{return!1}},"isIconAvailable"),Va=s(async(e,t,r)=>{let n;try{n=await uZ(e,t?.fallbackPrefix)}catch(o){te.error(o),n=OD}let i=iL(n,t),a=sL(aL(i.body),{...i.attributes,...r});return vr(a,Lt())},"getIconSVG")});function hw(e){for(var t=[],r=1;r{"use strict";s(hw,"dedent")});var dw,cp,dZ,fw=F(()=>{"use strict";dw=/^([^\S\n\r]*)-{3}\s*[\n\r](.*?)[\n\r]\1-{3}\s*[\n\r]+/s,cp=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,dZ=/\s*%%.*\n/gm});var u0,$D=F(()=>{"use strict";u0=class extends Error{static{s(this,"UnknownDiagramError")}constructor(t){super(t),this.name="UnknownDiagramError"}}});var Eu,h0,yx,FD,fZ,up=F(()=>{"use strict";Tt();fw();$D();Eu={},h0=s(function(e,t){e=e.replace(dw,"").replace(cp,"").replace(dZ,` +`);for(let[r,{detector:n}]of Object.entries(Eu))if(n(e,t))return r;throw new u0(`No diagram type detected matching given configuration for text: ${e}`)},"detectType"),yx=s((...e)=>{for(let{id:t,detector:r,loader:n}of e)FD(t,r,n)},"registerLazyLoadedDiagrams"),FD=s((e,t,r)=>{Eu[e]&&te.warn(`Detector with key ${e} already exists. Overwriting.`),Eu[e]={detector:t,loader:r},te.debug(`Detector with key ${e} added${r?" with loader":""}`)},"addDetector"),fZ=s(e=>Eu[e].loader,"getDiagramLoader")});var vx,pZ,GD=F(()=>{"use strict";vx=(function(){var e=s(function(ae,ie,le,ve){for(le=le||{},ve=ae.length;ve--;le[ae[ve]]=ie);return le},"o"),t=[1,24],r=[1,25],n=[1,26],i=[1,27],a=[1,28],o=[1,63],l=[1,64],u=[1,65],h=[1,66],d=[1,67],f=[1,68],p=[1,69],m=[1,29],g=[1,30],y=[1,31],v=[1,32],x=[1,33],b=[1,34],T=[1,35],w=[1,36],C=[1,37],k=[1,38],S=[1,39],A=[1,40],M=[1,41],N=[1,42],D=[1,43],R=[1,44],E=[1,45],I=[1,46],L=[1,47],P=[1,48],B=[1,50],O=[1,51],$=[1,52],G=[1,53],V=[1,54],z=[1,55],W=[1,56],H=[1,57],j=[1,58],Q=[1,59],U=[1,60],ue=[14,42],J=[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],he=[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],se=[1,82],oe=[1,83],Se=[1,84],xe=[1,85],Ne=[12,14,42],Ye=[12,14,33,42],We=[12,14,33,42,76,77,79,80],pe=[12,33],_e=[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],Ee={trace:s(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:s(function(ie,le,ve,ne,Me,re,ce){var q=re.length-1;switch(Me){case 3:ne.setDirection("TB");break;case 4:ne.setDirection("BT");break;case 5:ne.setDirection("RL");break;case 6:ne.setDirection("LR");break;case 8:case 9:case 10:case 11:case 12:ne.setC4Type(re[q-3]);break;case 19:ne.setTitle(re[q].substring(6)),this.$=re[q].substring(6);break;case 20:ne.setAccDescription(re[q].substring(15)),this.$=re[q].substring(15);break;case 21:this.$=re[q].trim(),ne.setTitle(this.$);break;case 22:case 23:this.$=re[q].trim(),ne.setAccDescription(this.$);break;case 28:re[q].splice(2,0,"ENTERPRISE"),ne.addPersonOrSystemBoundary(...re[q]),this.$=re[q];break;case 29:re[q].splice(2,0,"SYSTEM"),ne.addPersonOrSystemBoundary(...re[q]),this.$=re[q];break;case 30:ne.addPersonOrSystemBoundary(...re[q]),this.$=re[q];break;case 31:re[q].splice(2,0,"CONTAINER"),ne.addContainerBoundary(...re[q]),this.$=re[q];break;case 32:ne.addDeploymentNode("node",...re[q]),this.$=re[q];break;case 33:ne.addDeploymentNode("nodeL",...re[q]),this.$=re[q];break;case 34:ne.addDeploymentNode("nodeR",...re[q]),this.$=re[q];break;case 35:ne.popBoundaryParseStack();break;case 39:ne.addPersonOrSystem("person",...re[q]),this.$=re[q];break;case 40:ne.addPersonOrSystem("external_person",...re[q]),this.$=re[q];break;case 41:ne.addPersonOrSystem("system",...re[q]),this.$=re[q];break;case 42:ne.addPersonOrSystem("system_db",...re[q]),this.$=re[q];break;case 43:ne.addPersonOrSystem("system_queue",...re[q]),this.$=re[q];break;case 44:ne.addPersonOrSystem("external_system",...re[q]),this.$=re[q];break;case 45:ne.addPersonOrSystem("external_system_db",...re[q]),this.$=re[q];break;case 46:ne.addPersonOrSystem("external_system_queue",...re[q]),this.$=re[q];break;case 47:ne.addContainer("container",...re[q]),this.$=re[q];break;case 48:ne.addContainer("container_db",...re[q]),this.$=re[q];break;case 49:ne.addContainer("container_queue",...re[q]),this.$=re[q];break;case 50:ne.addContainer("external_container",...re[q]),this.$=re[q];break;case 51:ne.addContainer("external_container_db",...re[q]),this.$=re[q];break;case 52:ne.addContainer("external_container_queue",...re[q]),this.$=re[q];break;case 53:ne.addComponent("component",...re[q]),this.$=re[q];break;case 54:ne.addComponent("component_db",...re[q]),this.$=re[q];break;case 55:ne.addComponent("component_queue",...re[q]),this.$=re[q];break;case 56:ne.addComponent("external_component",...re[q]),this.$=re[q];break;case 57:ne.addComponent("external_component_db",...re[q]),this.$=re[q];break;case 58:ne.addComponent("external_component_queue",...re[q]),this.$=re[q];break;case 60:ne.addRel("rel",...re[q]),this.$=re[q];break;case 61:ne.addRel("birel",...re[q]),this.$=re[q];break;case 62:ne.addRel("rel_u",...re[q]),this.$=re[q];break;case 63:ne.addRel("rel_d",...re[q]),this.$=re[q];break;case 64:ne.addRel("rel_l",...re[q]),this.$=re[q];break;case 65:ne.addRel("rel_r",...re[q]),this.$=re[q];break;case 66:ne.addRel("rel_b",...re[q]),this.$=re[q];break;case 67:re[q].splice(0,1),ne.addRel("rel",...re[q]),this.$=re[q];break;case 68:ne.updateElStyle("update_el_style",...re[q]),this.$=re[q];break;case 69:ne.updateRelStyle("update_rel_style",...re[q]),this.$=re[q];break;case 70:ne.updateLayoutConfig("update_layout_config",...re[q]),this.$=re[q];break;case 71:this.$=[re[q]];break;case 72:re[q].unshift(re[q-1]),this.$=re[q];break;case 73:case 75:this.$=re[q].trim();break;case 74:let de={};de[re[q-1].trim()]=re[q].trim(),this.$=de;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:r,24:n,26:i,28:a,29:49,30:61,32:62,34:o,36:l,37:u,38:h,39:d,40:f,41:p,43:23,44:m,45:g,46:y,47:v,48:x,49:b,50:T,51:w,52:C,53:k,54:S,55:A,56:M,57:N,58:D,59:R,60:E,61:I,62:L,63:P,64:B,65:O,66:$,67:G,68:V,69:z,70:W,71:H,72:j,73:Q,74:U},{13:70,19:20,20:21,21:22,22:t,23:r,24:n,26:i,28:a,29:49,30:61,32:62,34:o,36:l,37:u,38:h,39:d,40:f,41:p,43:23,44:m,45:g,46:y,47:v,48:x,49:b,50:T,51:w,52:C,53:k,54:S,55:A,56:M,57:N,58:D,59:R,60:E,61:I,62:L,63:P,64:B,65:O,66:$,67:G,68:V,69:z,70:W,71:H,72:j,73:Q,74:U},{13:71,19:20,20:21,21:22,22:t,23:r,24:n,26:i,28:a,29:49,30:61,32:62,34:o,36:l,37:u,38:h,39:d,40:f,41:p,43:23,44:m,45:g,46:y,47:v,48:x,49:b,50:T,51:w,52:C,53:k,54:S,55:A,56:M,57:N,58:D,59:R,60:E,61:I,62:L,63:P,64:B,65:O,66:$,67:G,68:V,69:z,70:W,71:H,72:j,73:Q,74:U},{13:72,19:20,20:21,21:22,22:t,23:r,24:n,26:i,28:a,29:49,30:61,32:62,34:o,36:l,37:u,38:h,39:d,40:f,41:p,43:23,44:m,45:g,46:y,47:v,48:x,49:b,50:T,51:w,52:C,53:k,54:S,55:A,56:M,57:N,58:D,59:R,60:E,61:I,62:L,63:P,64:B,65:O,66:$,67:G,68:V,69:z,70:W,71:H,72:j,73:Q,74:U},{13:73,19:20,20:21,21:22,22:t,23:r,24:n,26:i,28:a,29:49,30:61,32:62,34:o,36:l,37:u,38:h,39:d,40:f,41:p,43:23,44:m,45:g,46:y,47:v,48:x,49:b,50:T,51:w,52:C,53:k,54:S,55:A,56:M,57:N,58:D,59:R,60:E,61:I,62:L,63:P,64:B,65:O,66:$,67:G,68:V,69:z,70:W,71:H,72:j,73:Q,74:U},{14:[1,74]},e(ue,[2,13],{43:23,29:49,30:61,32:62,20:75,34:o,36:l,37:u,38:h,39:d,40:f,41:p,44:m,45:g,46:y,47:v,48:x,49:b,50:T,51:w,52:C,53:k,54:S,55:A,56:M,57:N,58:D,59:R,60:E,61:I,62:L,63:P,64:B,65:O,66:$,67:G,68:V,69:z,70:W,71:H,72:j,73:Q,74:U}),e(ue,[2,14]),e(J,[2,16],{12:[1,76]}),e(ue,[2,36],{12:[1,77]}),e(he,[2,19]),e(he,[2,20]),{25:[1,78]},{27:[1,79]},e(he,[2,23]),{35:80,75:81,76:se,77:oe,79:Se,80:xe},{35:86,75:81,76:se,77:oe,79:Se,80:xe},{35:87,75:81,76:se,77:oe,79:Se,80:xe},{35:88,75:81,76:se,77:oe,79:Se,80:xe},{35:89,75:81,76:se,77:oe,79:Se,80:xe},{35:90,75:81,76:se,77:oe,79:Se,80:xe},{35:91,75:81,76:se,77:oe,79:Se,80:xe},{35:92,75:81,76:se,77:oe,79:Se,80:xe},{35:93,75:81,76:se,77:oe,79:Se,80:xe},{35:94,75:81,76:se,77:oe,79:Se,80:xe},{35:95,75:81,76:se,77:oe,79:Se,80:xe},{35:96,75:81,76:se,77:oe,79:Se,80:xe},{35:97,75:81,76:se,77:oe,79:Se,80:xe},{35:98,75:81,76:se,77:oe,79:Se,80:xe},{35:99,75:81,76:se,77:oe,79:Se,80:xe},{35:100,75:81,76:se,77:oe,79:Se,80:xe},{35:101,75:81,76:se,77:oe,79:Se,80:xe},{35:102,75:81,76:se,77:oe,79:Se,80:xe},{35:103,75:81,76:se,77:oe,79:Se,80:xe},{35:104,75:81,76:se,77:oe,79:Se,80:xe},e(Ne,[2,59]),{35:105,75:81,76:se,77:oe,79:Se,80:xe},{35:106,75:81,76:se,77:oe,79:Se,80:xe},{35:107,75:81,76:se,77:oe,79:Se,80:xe},{35:108,75:81,76:se,77:oe,79:Se,80:xe},{35:109,75:81,76:se,77:oe,79:Se,80:xe},{35:110,75:81,76:se,77:oe,79:Se,80:xe},{35:111,75:81,76:se,77:oe,79:Se,80:xe},{35:112,75:81,76:se,77:oe,79:Se,80:xe},{35:113,75:81,76:se,77:oe,79:Se,80:xe},{35:114,75:81,76:se,77:oe,79:Se,80:xe},{35:115,75:81,76:se,77:oe,79:Se,80:xe},{20:116,29:49,30:61,32:62,34:o,36:l,37:u,38:h,39:d,40:f,41:p,43:23,44:m,45:g,46:y,47:v,48:x,49:b,50:T,51:w,52:C,53:k,54:S,55:A,56:M,57:N,58:D,59:R,60:E,61:I,62:L,63:P,64:B,65:O,66:$,67:G,68:V,69:z,70:W,71:H,72:j,73:Q,74:U},{12:[1,118],33:[1,117]},{35:119,75:81,76:se,77:oe,79:Se,80:xe},{35:120,75:81,76:se,77:oe,79:Se,80:xe},{35:121,75:81,76:se,77:oe,79:Se,80:xe},{35:122,75:81,76:se,77:oe,79:Se,80:xe},{35:123,75:81,76:se,77:oe,79:Se,80:xe},{35:124,75:81,76:se,77:oe,79:Se,80:xe},{35:125,75:81,76:se,77:oe,79:Se,80:xe},{14:[1,126]},{14:[1,127]},{14:[1,128]},{14:[1,129]},{1:[2,8]},e(ue,[2,15]),e(J,[2,17],{21:22,19:130,22:t,23:r,24:n,26:i,28:a}),e(ue,[2,37],{19:20,20:21,21:22,43:23,29:49,30:61,32:62,13:131,22:t,23:r,24:n,26:i,28:a,34:o,36:l,37:u,38:h,39:d,40:f,41:p,44:m,45:g,46:y,47:v,48:x,49:b,50:T,51:w,52:C,53:k,54:S,55:A,56:M,57:N,58:D,59:R,60:E,61:I,62:L,63:P,64:B,65:O,66:$,67:G,68:V,69:z,70:W,71:H,72:j,73:Q,74:U}),e(he,[2,21]),e(he,[2,22]),e(Ne,[2,39]),e(Ye,[2,71],{75:81,35:132,76:se,77:oe,79:Se,80:xe}),e(We,[2,73]),{78:[1,133]},e(We,[2,75]),e(We,[2,76]),e(Ne,[2,40]),e(Ne,[2,41]),e(Ne,[2,42]),e(Ne,[2,43]),e(Ne,[2,44]),e(Ne,[2,45]),e(Ne,[2,46]),e(Ne,[2,47]),e(Ne,[2,48]),e(Ne,[2,49]),e(Ne,[2,50]),e(Ne,[2,51]),e(Ne,[2,52]),e(Ne,[2,53]),e(Ne,[2,54]),e(Ne,[2,55]),e(Ne,[2,56]),e(Ne,[2,57]),e(Ne,[2,58]),e(Ne,[2,60]),e(Ne,[2,61]),e(Ne,[2,62]),e(Ne,[2,63]),e(Ne,[2,64]),e(Ne,[2,65]),e(Ne,[2,66]),e(Ne,[2,67]),e(Ne,[2,68]),e(Ne,[2,69]),e(Ne,[2,70]),{31:134,42:[1,135]},{12:[1,136]},{33:[1,137]},e(pe,[2,28]),e(pe,[2,29]),e(pe,[2,30]),e(pe,[2,31]),e(pe,[2,32]),e(pe,[2,33]),e(pe,[2,34]),{1:[2,9]},{1:[2,10]},{1:[2,11]},{1:[2,12]},e(J,[2,18]),e(ue,[2,38]),e(Ye,[2,72]),e(We,[2,74]),e(Ne,[2,24]),e(Ne,[2,35]),e(_e,[2,25]),e(_e,[2,26],{12:[1,138]}),e(_e,[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:s(function(ie,le){if(le.recoverable)this.trace(ie);else{var ve=new Error(ie);throw ve.hash=le,ve}},"parseError"),parse:s(function(ie){var le=this,ve=[0],ne=[],Me=[null],re=[],ce=this.table,q="",de=0,X=0,ye=0,K=2,Ge=1,Ae=re.slice.call(arguments,1),$e=Object.create(this.lexer),Oe={yy:{}};for(var at in this.yy)Object.prototype.hasOwnProperty.call(this.yy,at)&&(Oe.yy[at]=this.yy[at]);$e.setInput(ie,Oe.yy),Oe.yy.lexer=$e,Oe.yy.parser=this,typeof $e.yylloc>"u"&&($e.yylloc={});var Pe=$e.yylloc;re.push(Pe);var Ke=$e.options&&$e.options.ranges;typeof Oe.yy.parseError=="function"?this.parseError=Oe.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function qe(Qe){ve.length=ve.length-2*Qe,Me.length=Me.length-Qe,re.length=re.length-Qe}s(qe,"popStack");function Be(){var Qe;return Qe=ne.pop()||$e.lex()||Ge,typeof Qe!="number"&&(Qe instanceof Array&&(ne=Qe,Qe=ne.pop()),Qe=le.symbols_[Qe]||Qe),Qe}s(Be,"lex");for(var Xe,be,vt,ke,It,Ft,yt={},Et,gt,ge,nt;;){if(vt=ve[ve.length-1],this.defaultActions[vt]?ke=this.defaultActions[vt]:((Xe===null||typeof Xe>"u")&&(Xe=Be()),ke=ce[vt]&&ce[vt][Xe]),typeof ke>"u"||!ke.length||!ke[0]){var pt="";nt=[];for(Et in ce[vt])this.terminals_[Et]&&Et>K&&nt.push("'"+this.terminals_[Et]+"'");$e.showPosition?pt="Parse error on line "+(de+1)+`: +`+$e.showPosition()+` +Expecting `+nt.join(", ")+", got '"+(this.terminals_[Xe]||Xe)+"'":pt="Parse error on line "+(de+1)+": Unexpected "+(Xe==Ge?"end of input":"'"+(this.terminals_[Xe]||Xe)+"'"),this.parseError(pt,{text:$e.match,token:this.terminals_[Xe]||Xe,line:$e.yylineno,loc:Pe,expected:nt})}if(ke[0]instanceof Array&&ke.length>1)throw new Error("Parse Error: multiple actions possible at state: "+vt+", token: "+Xe);switch(ke[0]){case 1:ve.push(Xe),Me.push($e.yytext),re.push($e.yylloc),ve.push(ke[1]),Xe=null,be?(Xe=be,be=null):(X=$e.yyleng,q=$e.yytext,de=$e.yylineno,Pe=$e.yylloc,ye>0&&ye--);break;case 2:if(gt=this.productions_[ke[1]][1],yt.$=Me[Me.length-gt],yt._$={first_line:re[re.length-(gt||1)].first_line,last_line:re[re.length-1].last_line,first_column:re[re.length-(gt||1)].first_column,last_column:re[re.length-1].last_column},Ke&&(yt._$.range=[re[re.length-(gt||1)].range[0],re[re.length-1].range[1]]),Ft=this.performAction.apply(yt,[q,X,de,Oe.yy,ke[1],Me,re].concat(Ae)),typeof Ft<"u")return Ft;gt&&(ve=ve.slice(0,-1*gt*2),Me=Me.slice(0,-1*gt),re=re.slice(0,-1*gt)),ve.push(this.productions_[ke[1]][0]),Me.push(yt.$),re.push(yt._$),ge=ce[ve[ve.length-2]][ve[ve.length-1]],ve.push(ge);break;case 3:return!0}}return!0},"parse")},Re=(function(){var ae={EOF:1,parseError:s(function(le,ve){if(this.yy.parser)this.yy.parser.parseError(le,ve);else throw new Error(le)},"parseError"),setInput:s(function(ie,le){return this.yy=le||this.yy||{},this._input=ie,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 ie=this._input[0];this.yytext+=ie,this.yyleng++,this.offset++,this.match+=ie,this.matched+=ie;var le=ie.match(/(?:\r\n?|\n).*/g);return le?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),ie},"input"),unput:s(function(ie){var le=ie.length,ve=ie.split(/(?:\r\n?|\n)/g);this._input=ie+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-le),this.offset-=le;var ne=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),ve.length-1&&(this.yylineno-=ve.length-1);var Me=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:ve?(ve.length===ne.length?this.yylloc.first_column:0)+ne[ne.length-ve.length].length-ve[0].length:this.yylloc.first_column-le},this.options.ranges&&(this.yylloc.range=[Me[0],Me[0]+this.yyleng-le]),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(ie){this.unput(this.match.slice(ie))},"less"),pastInput:s(function(){var ie=this.matched.substr(0,this.matched.length-this.match.length);return(ie.length>20?"...":"")+ie.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:s(function(){var ie=this.match;return ie.length<20&&(ie+=this._input.substr(0,20-ie.length)),(ie.substr(0,20)+(ie.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:s(function(){var ie=this.pastInput(),le=new Array(ie.length+1).join("-");return ie+this.upcomingInput()+` +`+le+"^"},"showPosition"),test_match:s(function(ie,le){var ve,ne,Me;if(this.options.backtrack_lexer&&(Me={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&&(Me.yylloc.range=this.yylloc.range.slice(0))),ne=ie[0].match(/(?:\r\n?|\n).*/g),ne&&(this.yylineno+=ne.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:ne?ne[ne.length-1].length-ne[ne.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+ie[0].length},this.yytext+=ie[0],this.match+=ie[0],this.matches=ie,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(ie[0].length),this.matched+=ie[0],ve=this.performAction.call(this,this.yy,this,le,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),ve)return ve;if(this._backtrack){for(var re in Me)this[re]=Me[re];return!1}return!1},"test_match"),next:s(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var ie,le,ve,ne;this._more||(this.yytext="",this.match="");for(var Me=this._currentRules(),re=0;rele[0].length)){if(le=ve,ne=re,this.options.backtrack_lexer){if(ie=this.test_match(ve,Me[re]),ie!==!1)return ie;if(this._backtrack){le=!1;continue}else return!1}else if(!this.options.flex)break}return le?(ie=this.test_match(le,Me[ne]),ie!==!1?ie:!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 le=this.next();return le||this.lex()},"lex"),begin:s(function(le){this.conditionStack.push(le)},"begin"),popState:s(function(){var le=this.conditionStack.length-1;return le>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(le){return le=this.conditionStack.length-1-Math.abs(le||0),le>=0?this.conditionStack[le]:"INITIAL"},"topState"),pushState:s(function(le){this.begin(le)},"pushState"),stateStackSize:s(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:s(function(le,ve,ne,Me){var re=Me;switch(ne){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;break;case 7:return this.popState(),"acc_title_value";break;case 8:return this.begin("acc_descr"),26;break;case 9:return this.popState(),"acc_descr_value";break;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;break;case 23:return this.begin("person"),44;break;case 24:return this.begin("system_ext_queue"),51;break;case 25:return this.begin("system_ext_db"),50;break;case 26:return this.begin("system_ext"),49;break;case 27:return this.begin("system_queue"),48;break;case 28:return this.begin("system_db"),47;break;case 29:return this.begin("system"),46;break;case 30:return this.begin("boundary"),37;break;case 31:return this.begin("enterprise_boundary"),34;break;case 32:return this.begin("system_boundary"),36;break;case 33:return this.begin("container_ext_queue"),57;break;case 34:return this.begin("container_ext_db"),56;break;case 35:return this.begin("container_ext"),55;break;case 36:return this.begin("container_queue"),54;break;case 37:return this.begin("container_db"),53;break;case 38:return this.begin("container"),52;break;case 39:return this.begin("container_boundary"),38;break;case 40:return this.begin("component_ext_queue"),63;break;case 41:return this.begin("component_ext_db"),62;break;case 42:return this.begin("component_ext"),61;break;case 43:return this.begin("component_queue"),60;break;case 44:return this.begin("component_db"),59;break;case 45:return this.begin("component"),58;break;case 46:return this.begin("node"),39;break;case 47:return this.begin("node"),39;break;case 48:return this.begin("node_l"),40;break;case 49:return this.begin("node_r"),41;break;case 50:return this.begin("rel"),64;break;case 51:return this.begin("birel"),65;break;case 52:return this.begin("rel_u"),66;break;case 53:return this.begin("rel_u"),66;break;case 54:return this.begin("rel_d"),67;break;case 55:return this.begin("rel_d"),67;break;case 56:return this.begin("rel_l"),68;break;case 57:return this.begin("rel_l"),68;break;case 58:return this.begin("rel_r"),69;break;case 59:return this.begin("rel_r"),69;break;case 60:return this.begin("rel_b"),70;break;case 61:return this.begin("rel_index"),71;break;case 62:return this.begin("update_el_style"),72;break;case 63:return this.begin("update_rel_style"),73;break;case 64:return this.begin("update_layout_config"),74;break;case 65:return"EOF_IN_STRUCT";case 66:return this.begin("attribute"),"ATTRIBUTE_EMPTY";break;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";break;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:[65,66,67,68],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 ae})();Ee.lexer=Re;function Z(){this.yy={}}return s(Z,"Parser"),Z.prototype=Ee,Ee.Parser=Z,new Z})();vx.parser=vx;pZ=vx});var N9e,P9e,Br,Go,Dn=F(()=>{"use strict";Tt();N9e=s(function(e,t){for(let r of t)e.attr(r[0],r[1])},"d3Attrs"),P9e=s(function(e,t,r){let n=new Map;return r?(n.set("width","100%"),n.set("style",`max-width: ${t}px;`)):(n.set("height",e),n.set("width",t)),n},"calculateSvgSizeAttrs"),Br=s(function(e,t,r,n){let i=P9e(t,r,n);N9e(e,i)},"configureSvgSize"),Go=s(function(e,t,r,n){let i=t.node().getBBox(),a=i.width,o=i.height;te.info(`SVG bounds: ${a}x${o}`,i);let l=0,u=0;te.info(`Graph bounds: ${l}x${u}`,e),l=a+r*2,u=o+r*2,te.info(`Calculated bounds: ${l}x${u}`),Br(t,u,l,n);let h=`${i.x-r} ${i.y-r} ${i.width+2*r} ${i.height+2*r}`;t.attr("viewBox",h)},"setupGraphViewbox")});function zD(e){return[...e.cssRules].map(t=>t.cssText).join(` +`)}var pw,O9e,mZ,gZ,VD=F(()=>{"use strict";Tt();pw={};s(zD,"cssStyleSheetToString");O9e=s((e,t,r,n)=>{let i="";return e in pw&&pw[e]?i=pw[e]({...r,svgId:n}):te.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: ${r.strokeWidth??1}px; + } + & .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} + .node .neo-node { + stroke: ${r.nodeBorder}; + } + + [data-look="neo"].node rect, [data-look="neo"].cluster rect, [data-look="neo"].node polygon { + stroke: ${r.useGradient?"url("+n+"-gradient)":r.nodeBorder}; + filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${n}-drop-shadow)`):"none"}; + } + [data-look="neo"].swimlane.cluster rect { + filter: none; + } + + + [data-look="neo"].node path { + stroke: ${r.useGradient?"url("+n+"-gradient)":r.nodeBorder}; + stroke-width: ${r.strokeWidth??1}px; + } + + [data-look="neo"].node .outer-path { + filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${n}-drop-shadow)`):"none"}; + } + + [data-look="neo"].node .neo-line path { + stroke: ${r.nodeBorder}; + filter: none; + } + + [data-look="neo"].node circle{ + stroke: ${r.useGradient?"url("+n+"-gradient)":r.nodeBorder}; + filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${n}-drop-shadow)`):"none"}; + } + + [data-look="neo"].node circle .state-start{ + fill: #000000; + } + + [data-look="neo"].icon-shape .icon { + fill: ${r.useGradient?"url("+n+"-gradient)":r.nodeBorder}; + filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${n}-drop-shadow)`):"none"}; + } + + [data-look="neo"].icon-shape .icon-neo path { + stroke: ${r.useGradient?"url("+n+"-gradient)":r.nodeBorder}; + filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${n}-drop-shadow)`):"none"}; + } + + ${t} +`},"getStyles"),mZ=s((e,t)=>{t!==void 0&&(pw[e]=t)},"addStylesForDiagram"),gZ=O9e});var xx={};ar(xx,{clear:()=>gr,getAccDescription:()=>Ar,getAccTitle:()=>Sr,getDiagramTitle:()=>Rr,setAccDescription:()=>Er,setAccTitle:()=>Cr,setDiagramTitle:()=>Mr});var WD,qD,HD,UD,gr,Cr,Sr,Er,Ar,Mr,Rr,An=F(()=>{"use strict";Gr();mr();WD="",qD="",HD="",UD=s(e=>vr(e,Lt()),"sanitizeText"),gr=s(()=>{WD="",HD="",qD=""},"clear"),Cr=s(e=>{WD=UD(e).replace(/^\s+/g,"")},"setAccTitle"),Sr=s(()=>WD,"getAccTitle"),Er=s(e=>{HD=UD(e).replace(/\n\s+/g,` +`)},"setAccDescription"),Ar=s(()=>HD,"getAccDescription"),Mr=s(e=>{qD=UD(e)},"setDiagramTitle"),Rr=s(()=>qD,"getDiagramTitle")});var yZ,B9e,Le,bx,gw,Tx,Cx,$9e,mw,hp,kx,YD,Zt=F(()=>{"use strict";up();Tt();mr();Gr();Dn();VD();An();yZ=te,B9e=Yv,Le=Lt,bx=Ek,gw=zh,Tx=s(e=>vr(e,Le()),"sanitizeText"),Cx=Go,$9e=s(()=>xx,"getCommonDb"),mw={},hp=s((e,t,r)=>{mw[e]&&yZ.warn(`Diagram with id ${e} already registered. Overwriting.`),mw[e]=t,r&&FD(e,r),mZ(e,t.styles),t.injectUtils?.(yZ,B9e,Le,Tx,Cx,$9e(),()=>{})},"registerDiagram"),kx=s(e=>{if(e in mw)return mw[e];throw new YD(e)},"getDiagram"),YD=class extends Error{static{s(this,"DiagramNotFoundError")}constructor(t){super(`Diagram ${t} not found.`)}}});var yw,jD=F(()=>{"use strict";Zt();yw=s(e=>Le()[e],"getRequiredConfig")});var dp,vZ,yl,Kh,hs,gl,uc,wx,XD,KD,vw,xw,xZ,F9e,G9e,z9e,V9e,W9e,q9e,H9e,U9e,Y9e,j9e,X9e,K9e,Z9e,Q9e,J9e,eBe,tBe,bZ,rBe,nBe,TZ,iBe,aBe,sBe,oBe,Zh,lBe,cBe,uBe,hBe,dBe,Sx,ZD=F(()=>{"use strict";Zt();jD();Gr();An();dp=s((e,t)=>{for(let[r,n]of Object.entries(t))if(n!==void 0)if(typeof n=="object"){let[i,a]=Object.entries(n)[0];e[i]=a}else e[r]=n},"assignAttributes"),vZ=s(()=>({alias:"global",label:{text:"global"},type:{text:"global"},tags:null,link:null,parentBoundary:""}),"createGlobalBoundary"),yl=[],Kh=[""],hs="global",gl="",uc=[vZ()],wx=[],XD="",KD=!1,vw=4,xw=2,F9e=s(function(){return xZ},"getC4Type"),G9e=s(function(e){xZ=vr(e,Le())},"setC4Type"),z9e=s(function(e,t,r,n,i,a,o,l,u){if(e==null||t===void 0||t===null||r===void 0||r===null||n===void 0||n===null)return;let h={},d=wx.find(f=>f.from===t&&f.to===r);if(d?h=d:wx.push(h),h.type=e,h.from=t,h.to=r,h.label={text:n},i==null)h.techn={text:""};else if(typeof i=="object"){let[f,p]=Object.entries(i)[0];h[f]={text:p}}else h.techn={text:i};if(a==null)h.descr={text:""};else if(typeof a=="object"){let[f,p]=Object.entries(a)[0];h[f]={text:p}}else h.descr={text:a};dp(h,{sprite:o,tags:l,link:u}),h.wrap=Zh()},"addRel"),V9e=s(function(e,t,r,n,i,a,o){if(t===null||r===null)return;let l={},u=yl.find(h=>h.alias===t);if(u&&t===u.alias?l=u:(l.alias=t,yl.push(l)),r==null?l.label={text:""}:l.label={text:r},n==null)l.descr={text:""};else if(typeof n=="object"){let[h,d]=Object.entries(n)[0];l[h]={text:d}}else l.descr={text:n};dp(l,{sprite:i,tags:a,link:o}),l.typeC4Shape={text:e},l.parentBoundary=hs,l.wrap=Zh()},"addPersonOrSystem"),W9e=s(function(e,t,r,n,i,a,o,l){if(t===null||r===null)return;let u={},h=yl.find(d=>d.alias===t);if(h&&t===h.alias?u=h:(u.alias=t,yl.push(u)),r==null?u.label={text:""}:u.label={text:r},n==null)u.techn={text:""};else if(typeof n=="object"){let[d,f]=Object.entries(n)[0];u[d]={text:f}}else u.techn={text:n};if(i==null)u.descr={text:""};else if(typeof i=="object"){let[d,f]=Object.entries(i)[0];u[d]={text:f}}else u.descr={text:i};dp(u,{sprite:a,tags:o,link:l}),u.wrap=Zh(),u.typeC4Shape={text:e},u.parentBoundary=hs},"addContainer"),q9e=s(function(e,t,r,n,i,a,o,l){if(t===null||r===null)return;let u={},h=yl.find(d=>d.alias===t);if(h&&t===h.alias?u=h:(u.alias=t,yl.push(u)),r==null?u.label={text:""}:u.label={text:r},n==null)u.techn={text:""};else if(typeof n=="object"){let[d,f]=Object.entries(n)[0];u[d]={text:f}}else u.techn={text:n};if(i==null)u.descr={text:""};else if(typeof i=="object"){let[d,f]=Object.entries(i)[0];u[d]={text:f}}else u.descr={text:i};dp(u,{sprite:a,tags:o,link:l}),u.wrap=Zh(),u.typeC4Shape={text:e},u.parentBoundary=hs},"addComponent"),H9e=s(function(e,t,r,n,i){if(e===null||t===null)return;let a={},o=uc.find(l=>l.alias===e);if(o&&e===o.alias?a=o:(a.alias=e,uc.push(a)),t==null?a.label={text:""}:a.label={text:t},r==null)a.type={text:"system"};else if(typeof r=="object"){let[l,u]=Object.entries(r)[0];a[l]={text:u}}else a.type={text:r};dp(a,{tags:n,link:i}),a.parentBoundary=hs,a.wrap=Zh(),gl=hs,hs=e,Kh.push(gl)},"addPersonOrSystemBoundary"),U9e=s(function(e,t,r,n,i){if(e===null||t===null)return;let a={},o=uc.find(l=>l.alias===e);if(o&&e===o.alias?a=o:(a.alias=e,uc.push(a)),t==null?a.label={text:""}:a.label={text:t},r==null)a.type={text:"container"};else if(typeof r=="object"){let[l,u]=Object.entries(r)[0];a[l]={text:u}}else a.type={text:r};dp(a,{tags:n,link:i}),a.parentBoundary=hs,a.wrap=Zh(),gl=hs,hs=e,Kh.push(gl)},"addContainerBoundary"),Y9e=s(function(e,t,r,n,i,a,o,l){if(t===null||r===null)return;let u={},h=uc.find(d=>d.alias===t);if(h&&t===h.alias?u=h:(u.alias=t,uc.push(u)),r==null?u.label={text:""}:u.label={text:r},n==null)u.type={text:"node"};else if(typeof n=="object"){let[d,f]=Object.entries(n)[0];u[d]={text:f}}else u.type={text:n};if(i==null)u.descr={text:""};else if(typeof i=="object"){let[d,f]=Object.entries(i)[0];u[d]={text:f}}else u.descr={text:i};dp(u,{tags:o,link:l}),u.nodeType=e,u.parentBoundary=hs,u.wrap=Zh(),gl=hs,hs=t,Kh.push(gl)},"addDeploymentNode"),j9e=s(function(){hs=gl,Kh.pop(),gl=Kh.pop(),Kh.push(gl)},"popBoundaryParseStack"),X9e=s(function(e,t,r,n,i,a,o,l,u,h,d){let f=yl.find(p=>p.alias===t);if(!(f===void 0&&(f=uc.find(p=>p.alias===t),f===void 0))){if(r!=null)if(typeof r=="object"){let[p,m]=Object.entries(r)[0];f[p]=m}else f.bgColor=r;if(n!=null)if(typeof n=="object"){let[p,m]=Object.entries(n)[0];f[p]=m}else f.fontColor=n;if(i!=null)if(typeof i=="object"){let[p,m]=Object.entries(i)[0];f[p]=m}else f.borderColor=i;if(a!=null)if(typeof a=="object"){let[p,m]=Object.entries(a)[0];f[p]=m}else f.shadowing=a;if(o!=null)if(typeof o=="object"){let[p,m]=Object.entries(o)[0];f[p]=m}else f.shape=o;if(l!=null)if(typeof l=="object"){let[p,m]=Object.entries(l)[0];f[p]=m}else f.sprite=l;if(u!=null)if(typeof u=="object"){let[p,m]=Object.entries(u)[0];f[p]=m}else f.techn=u;if(h!=null)if(typeof h=="object"){let[p,m]=Object.entries(h)[0];f[p]=m}else f.legendText=h;if(d!=null)if(typeof d=="object"){let[p,m]=Object.entries(d)[0];f[p]=m}else f.legendSprite=d}},"updateElStyle"),K9e=s(function(e,t,r,n,i,a,o){let l=wx.find(u=>u.from===t&&u.to===r);if(l!==void 0){if(n!=null)if(typeof n=="object"){let[u,h]=Object.entries(n)[0];l[u]=h}else l.textColor=n;if(i!=null)if(typeof i=="object"){let[u,h]=Object.entries(i)[0];l[u]=h}else l.lineColor=i;if(a!=null)if(typeof a=="object"){let[u,h]=Object.entries(a)[0];l[u]=parseInt(h)}else l.offsetX=parseInt(a);if(o!=null)if(typeof o=="object"){let[u,h]=Object.entries(o)[0];l[u]=parseInt(h)}else l.offsetY=parseInt(o)}},"updateRelStyle"),Z9e=s(function(e,t,r){let n=vw,i=xw;if(typeof t=="object"){let a=Object.values(t)[0];n=parseInt(a)}else n=parseInt(t);if(typeof r=="object"){let a=Object.values(r)[0];i=parseInt(a)}else i=parseInt(r);n>=1&&(vw=n),i>=1&&(xw=i)},"updateLayoutConfig"),Q9e=s(function(){return vw},"getC4ShapeInRow"),J9e=s(function(){return xw},"getC4BoundaryInRow"),eBe=s(function(){return hs},"getCurrentBoundaryParse"),tBe=s(function(){return gl},"getParentBoundaryParse"),bZ=s(function(e){return e==null?yl:yl.filter(t=>t.parentBoundary===e)},"getC4ShapeArray"),rBe=s(function(e){return yl.find(t=>t.alias===e)},"getC4Shape"),nBe=s(function(e){return Object.keys(bZ(e))},"getC4ShapeKeys"),TZ=s(function(e){return e==null?uc:uc.filter(t=>t.parentBoundary===e)},"getBoundaries"),iBe=TZ,aBe=s(function(){return wx},"getRels"),sBe=s(function(){return XD},"getTitle"),oBe=s(function(e){KD=e},"setWrap"),Zh=s(function(){return KD},"autoWrap"),lBe=s(function(){yl=[],uc=[vZ()],gl="",hs="global",Kh=[""],wx=[],Kh=[""],XD="",KD=!1,vw=4,xw=2},"clear"),cBe={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},uBe={FILLED:0,OPEN:1},hBe={LEFTOF:0,RIGHTOF:1,OVER:2},dBe=s(function(e){XD=vr(e,Le())},"setTitle"),Sx={addPersonOrSystem:V9e,addPersonOrSystemBoundary:H9e,addContainer:W9e,addContainerBoundary:U9e,addComponent:q9e,addDeploymentNode:Y9e,popBoundaryParseStack:j9e,addRel:z9e,updateElStyle:X9e,updateRelStyle:K9e,updateLayoutConfig:Z9e,autoWrap:Zh,setWrap:oBe,getC4ShapeArray:bZ,getC4Shape:rBe,getC4ShapeKeys:nBe,getBoundaries:TZ,getBoundarys:iBe,getCurrentBoundaryParse:eBe,getParentBoundaryParse:tBe,getRels:aBe,getTitle:sBe,getC4Type:F9e,getC4ShapeInRow:Q9e,getC4BoundaryInRow:J9e,setAccTitle:Cr,getAccTitle:Sr,getAccDescription:Ar,setAccDescription:Er,getConfig:s(()=>yw("c4"),"getConfig"),clear:lBe,LINETYPE:cBe,ARROWTYPE:uBe,PLACEMENT:hBe,setTitle:dBe,setC4Type:G9e}});var CZ=ho(oa=>{"use strict";Object.defineProperty(oa,"__esModule",{value:!0});oa.BLANK_URL=oa.relativeFirstCharacters=oa.whitespaceEscapeCharsRegex=oa.urlSchemeRegex=oa.ctrlCharactersRegex=oa.htmlCtrlEntityRegex=oa.htmlEntitiesRegex=oa.invalidProtocolRegex=void 0;oa.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im;oa.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g;oa.htmlCtrlEntityRegex=/&(newline|tab);/gi;oa.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim;oa.urlSchemeRegex=/^.+(:|:)/gim;oa.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g;oa.relativeFirstCharacters=[".","/"];oa.BLANK_URL="about:blank"});var d0=ho(QD=>{"use strict";Object.defineProperty(QD,"__esModule",{value:!0});QD.sanitizeUrl=gBe;var Wa=CZ();function fBe(e){return Wa.relativeFirstCharacters.indexOf(e[0])>-1}s(fBe,"isRelativeUrlWithoutProtocol");function pBe(e){var t=e.replace(Wa.ctrlCharactersRegex,"");return t.replace(Wa.htmlEntitiesRegex,function(r,n){return String.fromCharCode(n)})}s(pBe,"decodeHtmlCharacters");function mBe(e){return URL.canParse(e)}s(mBe,"isValidUrl");function kZ(e){try{return decodeURIComponent(e)}catch{return e}}s(kZ,"decodeURI");function gBe(e){if(!e)return Wa.BLANK_URL;var t,r=kZ(e.trim());do r=pBe(r).replace(Wa.htmlCtrlEntityRegex,"").replace(Wa.ctrlCharactersRegex,"").replace(Wa.whitespaceEscapeCharsRegex,"").trim(),r=kZ(r),t=r.match(Wa.ctrlCharactersRegex)||r.match(Wa.htmlEntitiesRegex)||r.match(Wa.htmlCtrlEntityRegex)||r.match(Wa.whitespaceEscapeCharsRegex);while(t&&t.length>0);var n=r;if(!n)return Wa.BLANK_URL;if(fBe(n))return n;var i=n.trimStart(),a=i.match(Wa.urlSchemeRegex);if(!a)return n;var o=a[0].toLowerCase().trim();if(Wa.invalidProtocolRegex.test(o))return Wa.BLANK_URL;var l=i.replace(/\\/g,"/");if(o==="mailto:"||o.includes("://"))return l;if(o==="http:"||o==="https:"){if(!mBe(l))return Wa.BLANK_URL;var u=new URL(l);return u.protocol=u.protocol.toLowerCase(),u.hostname=u.hostname.toLowerCase(),u.toString()}return l}s(gBe,"sanitizeUrl")});function fp(e,t){return e==null||t==null?NaN:et?1:e>=t?0:NaN}var JD=F(()=>{"use strict";s(fp,"ascending")});function e7(e,t){return e==null||t==null?NaN:te?1:t>=e?0:NaN}var wZ=F(()=>{"use strict";s(e7,"descending")});function pp(e){let t,r,n;e.length!==2?(t=fp,r=s((l,u)=>fp(e(l),u),"compare2"),n=s((l,u)=>e(l)-u,"delta")):(t=e===fp||e===e7?e:yBe,r=e,n=e);function i(l,u,h=0,d=l.length){if(h>>1;r(l[f],u)<0?h=f+1:d=f}while(h>>1;r(l[f],u)<=0?h=f+1:d=f}while(hh&&n(l[f-1],u)>-n(l[f],u)?f-1:f}return s(o,"center"),{left:i,center:o,right:a}}function yBe(){return 0}var t7=F(()=>{"use strict";JD();wZ();s(pp,"bisector");s(yBe,"zero")});function r7(e){return e===null?NaN:+e}var SZ=F(()=>{"use strict";s(r7,"number")});var EZ,AZ,vBe,xBe,n7,RZ=F(()=>{"use strict";JD();t7();SZ();EZ=pp(fp),AZ=EZ.right,vBe=EZ.left,xBe=pp(r7).center,n7=AZ});function _Z({_intern:e,_key:t},r){let n=t(r);return e.has(n)?e.get(n):r}function bBe({_intern:e,_key:t},r){let n=t(r);return e.has(n)?e.get(n):(e.set(n,r),r)}function TBe({_intern:e,_key:t},r){let n=t(r);return e.has(n)&&(r=e.get(n),e.delete(n)),r}function CBe(e){return e!==null&&typeof e=="object"?e.valueOf():e}var f0,LZ=F(()=>{"use strict";f0=class extends Map{static{s(this,"InternMap")}constructor(t,r=CBe){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:r}}),t!=null)for(let[n,i]of t)this.set(n,i)}get(t){return super.get(_Z(this,t))}has(t){return super.has(_Z(this,t))}set(t,r){return super.set(bBe(this,t),r)}delete(t){return super.delete(TBe(this,t))}};s(_Z,"intern_get");s(bBe,"intern_set");s(TBe,"intern_delete");s(CBe,"keyof")});function bw(e,t,r){let n=(t-e)/Math.max(0,r),i=Math.floor(Math.log10(n)),a=n/Math.pow(10,i),o=a>=kBe?10:a>=wBe?5:a>=SBe?2:1,l,u,h;return i<0?(h=Math.pow(10,-i)/o,l=Math.round(e*h),u=Math.round(t*h),l/ht&&--u,h=-h):(h=Math.pow(10,i)*o,l=Math.round(e/h),u=Math.round(t/h),l*ht&&--u),u0))return[];if(e===t)return[e];let n=t=i))return[];let l=a-i+1,u=new Array(l);if(n)if(o<0)for(let h=0;h{"use strict";kBe=Math.sqrt(50),wBe=Math.sqrt(10),SBe=Math.sqrt(2);s(bw,"tickSpec");s(Tw,"ticks");s(Ex,"tickIncrement");s(p0,"tickStep")});function Cw(e,t){let r;if(t===void 0)for(let n of e)n!=null&&(r=n)&&(r=n);else{let n=-1;for(let i of e)(i=t(i,++n,e))!=null&&(r=i)&&(r=i)}return r}var IZ=F(()=>{"use strict";s(Cw,"max")});function kw(e,t){let r;if(t===void 0)for(let n of e)n!=null&&(r>n||r===void 0&&n>=n)&&(r=n);else{let n=-1;for(let i of e)(i=t(i,++n,e))!=null&&(r>i||r===void 0&&i>=i)&&(r=i)}return r}var MZ=F(()=>{"use strict";s(kw,"min")});function ww(e,t,r){e=+e,t=+t,r=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+r;for(var n=-1,i=Math.max(0,Math.ceil((t-e)/r))|0,a=new Array(i);++n{"use strict";s(ww,"range")});var Qh=F(()=>{"use strict";RZ();t7();IZ();MZ();NZ();DZ();LZ()});function i7(e){return e}var PZ=F(()=>{"use strict";s(i7,"default")});function EBe(e){return"translate("+e+",0)"}function ABe(e){return"translate(0,"+e+")"}function RBe(e){return t=>+e(t)}function _Be(e,t){return t=Math.max(0,e.bandwidth()-t*2)/2,e.round()&&(t=Math.round(t)),r=>+e(r)+t}function LBe(){return!this.__axis}function BZ(e,t){var r=[],n=null,i=null,a=6,o=6,l=3,u=typeof window<"u"&&window.devicePixelRatio>1?0:.5,h=e===Ew||e===Sw?-1:1,d=e===Sw||e===a7?"x":"y",f=e===Ew||e===s7?EBe:ABe;function p(m){var g=n??(t.ticks?t.ticks.apply(t,r):t.domain()),y=i??(t.tickFormat?t.tickFormat.apply(t,r):i7),v=Math.max(a,0)+l,x=t.range(),b=+x[0]+u,T=+x[x.length-1]+u,w=(t.bandwidth?_Be:RBe)(t.copy(),u),C=m.selection?m.selection():m,k=C.selectAll(".domain").data([null]),S=C.selectAll(".tick").data(g,t).order(),A=S.exit(),M=S.enter().append("g").attr("class","tick"),N=S.select("line"),D=S.select("text");k=k.merge(k.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),S=S.merge(M),N=N.merge(M.append("line").attr("stroke","currentColor").attr(d+"2",h*a)),D=D.merge(M.append("text").attr("fill","currentColor").attr(d,h*v).attr("dy",e===Ew?"0em":e===s7?"0.71em":"0.32em")),m!==C&&(k=k.transition(m),S=S.transition(m),N=N.transition(m),D=D.transition(m),A=A.transition(m).attr("opacity",OZ).attr("transform",function(R){return isFinite(R=w(R))?f(R+u):this.getAttribute("transform")}),M.attr("opacity",OZ).attr("transform",function(R){var E=this.parentNode.__axis;return f((E&&isFinite(E=E(R))?E:w(R))+u)})),A.remove(),k.attr("d",e===Sw||e===a7?o?"M"+h*o+","+b+"H"+u+"V"+T+"H"+h*o:"M"+u+","+b+"V"+T:o?"M"+b+","+h*o+"V"+u+"H"+T+"V"+h*o:"M"+b+","+u+"H"+T),S.attr("opacity",1).attr("transform",function(R){return f(w(R)+u)}),N.attr(d+"2",h*a),D.attr(d,h*v).text(y),C.filter(LBe).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",e===a7?"start":e===Sw?"end":"middle"),C.each(function(){this.__axis=w})}return s(p,"axis"),p.scale=function(m){return arguments.length?(t=m,p):t},p.ticks=function(){return r=Array.from(arguments),p},p.tickArguments=function(m){return arguments.length?(r=m==null?[]:Array.from(m),p):r.slice()},p.tickValues=function(m){return arguments.length?(n=m==null?null:Array.from(m),p):n&&n.slice()},p.tickFormat=function(m){return arguments.length?(i=m,p):i},p.tickSize=function(m){return arguments.length?(a=o=+m,p):a},p.tickSizeInner=function(m){return arguments.length?(a=+m,p):a},p.tickSizeOuter=function(m){return arguments.length?(o=+m,p):o},p.tickPadding=function(m){return arguments.length?(l=+m,p):l},p.offset=function(m){return arguments.length?(u=+m,p):u},p}function o7(e){return BZ(Ew,e)}function l7(e){return BZ(s7,e)}var Ew,a7,s7,Sw,OZ,$Z=F(()=>{"use strict";PZ();Ew=1,a7=2,s7=3,Sw=4,OZ=1e-6;s(EBe,"translateX");s(ABe,"translateY");s(RBe,"number");s(_Be,"center");s(LBe,"entering");s(BZ,"axis");s(o7,"axisTop");s(l7,"axisBottom")});var FZ=F(()=>{"use strict";$Z()});function zZ(){for(var e=0,t=arguments.length,r={},n;e=0&&(n=r.slice(i+1),r=r.slice(0,i)),r&&!t.hasOwnProperty(r))throw new Error("unknown type: "+r);return{type:r,name:n}})}function MBe(e,t){for(var r=0,n=e.length,i;r{"use strict";DBe={value:s(()=>{},"value")};s(zZ,"dispatch");s(Aw,"Dispatch");s(IBe,"parseTypenames");Aw.prototype=zZ.prototype={constructor:Aw,on:s(function(e,t){var r=this._,n=IBe(e+"",r),i,a=-1,o=n.length;if(arguments.length<2){for(;++a0)for(var r=new Array(i),n=0,i,a;n{"use strict";VZ()});var Rw,h7,d7=F(()=>{"use strict";Rw="http://www.w3.org/1999/xhtml",h7={svg:"http://www.w3.org/2000/svg",xhtml:Rw,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"}});function hc(e){var t=e+="",r=t.indexOf(":");return r>=0&&(t=e.slice(0,r))!=="xmlns"&&(e=e.slice(r+1)),h7.hasOwnProperty(t)?{space:h7[t],local:e}:e}var _w=F(()=>{"use strict";d7();s(hc,"default")});function NBe(e){return function(){var t=this.ownerDocument,r=this.namespaceURI;return r===Rw&&t.documentElement.namespaceURI===Rw?t.createElement(e):t.createElementNS(r,e)}}function PBe(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function Ax(e){var t=hc(e);return(t.local?PBe:NBe)(t)}var f7=F(()=>{"use strict";_w();d7();s(NBe,"creatorInherit");s(PBe,"creatorFixed");s(Ax,"default")});function OBe(){}function Jh(e){return e==null?OBe:function(){return this.querySelector(e)}}var Lw=F(()=>{"use strict";s(OBe,"none");s(Jh,"default")});function p7(e){typeof e!="function"&&(e=Jh(e));for(var t=this._groups,r=t.length,n=new Array(r),i=0;i{"use strict";vl();Lw();s(p7,"default")});function m7(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}var qZ=F(()=>{"use strict";s(m7,"array")});function BBe(){return[]}function m0(e){return e==null?BBe:function(){return this.querySelectorAll(e)}}var g7=F(()=>{"use strict";s(BBe,"empty");s(m0,"default")});function $Be(e){return function(){return m7(e.apply(this,arguments))}}function y7(e){typeof e=="function"?e=$Be(e):e=m0(e);for(var t=this._groups,r=t.length,n=[],i=[],a=0;a{"use strict";vl();qZ();g7();s($Be,"arrayAll");s(y7,"default")});function g0(e){return function(){return this.matches(e)}}function Dw(e){return function(t){return t.matches(e)}}var Rx=F(()=>{"use strict";s(g0,"default");s(Dw,"childMatcher")});function GBe(e){return function(){return FBe.call(this.children,e)}}function zBe(){return this.firstElementChild}function v7(e){return this.select(e==null?zBe:GBe(typeof e=="function"?e:Dw(e)))}var FBe,UZ=F(()=>{"use strict";Rx();FBe=Array.prototype.find;s(GBe,"childFind");s(zBe,"childFirst");s(v7,"default")});function WBe(){return Array.from(this.children)}function qBe(e){return function(){return VBe.call(this.children,e)}}function x7(e){return this.selectAll(e==null?WBe:qBe(typeof e=="function"?e:Dw(e)))}var VBe,YZ=F(()=>{"use strict";Rx();VBe=Array.prototype.filter;s(WBe,"children");s(qBe,"childrenFilter");s(x7,"default")});function b7(e){typeof e!="function"&&(e=g0(e));for(var t=this._groups,r=t.length,n=new Array(r),i=0;i{"use strict";vl();Rx();s(b7,"default")});function _x(e){return new Array(e.length)}var T7=F(()=>{"use strict";s(_x,"default")});function C7(){return new gi(this._enter||this._groups.map(_x),this._parents)}function Lx(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}var k7=F(()=>{"use strict";T7();vl();s(C7,"default");s(Lx,"EnterNode");Lx.prototype={constructor:Lx,appendChild:s(function(e){return this._parent.insertBefore(e,this._next)},"appendChild"),insertBefore:s(function(e,t){return this._parent.insertBefore(e,t)},"insertBefore"),querySelector:s(function(e){return this._parent.querySelector(e)},"querySelector"),querySelectorAll:s(function(e){return this._parent.querySelectorAll(e)},"querySelectorAll")}});function w7(e){return function(){return e}}var XZ=F(()=>{"use strict";s(w7,"default")});function HBe(e,t,r,n,i,a){for(var o=0,l,u=t.length,h=a.length;o=T&&(T=b+1);!(C=v[T])&&++T{"use strict";vl();k7();XZ();s(HBe,"bindIndex");s(UBe,"bindKey");s(YBe,"datum");s(S7,"default");s(jBe,"arraylike")});function E7(){return new gi(this._exit||this._groups.map(_x),this._parents)}var ZZ=F(()=>{"use strict";T7();vl();s(E7,"default")});function A7(e,t,r){var n=this.enter(),i=this,a=this.exit();return typeof e=="function"?(n=e(n),n&&(n=n.selection())):n=n.append(e+""),t!=null&&(i=t(i),i&&(i=i.selection())),r==null?a.remove():r(a),n&&i?n.merge(i).order():i}var QZ=F(()=>{"use strict";s(A7,"default")});function R7(e){for(var t=e.selection?e.selection():e,r=this._groups,n=t._groups,i=r.length,a=n.length,o=Math.min(i,a),l=new Array(i),u=0;u{"use strict";vl();s(R7,"default")});function _7(){for(var e=this._groups,t=-1,r=e.length;++t=0;)(o=n[i])&&(a&&o.compareDocumentPosition(a)^4&&a.parentNode.insertBefore(o,a),a=o);return this}var eQ=F(()=>{"use strict";s(_7,"default")});function L7(e){e||(e=XBe);function t(f,p){return f&&p?e(f.__data__,p.__data__):!f-!p}s(t,"compareNode");for(var r=this._groups,n=r.length,i=new Array(n),a=0;at?1:e>=t?0:NaN}var tQ=F(()=>{"use strict";vl();s(L7,"default");s(XBe,"ascending")});function D7(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}var rQ=F(()=>{"use strict";s(D7,"default")});function I7(){return Array.from(this)}var nQ=F(()=>{"use strict";s(I7,"default")});function M7(){for(var e=this._groups,t=0,r=e.length;t{"use strict";s(M7,"default")});function N7(){let e=0;for(let t of this)++e;return e}var aQ=F(()=>{"use strict";s(N7,"default")});function P7(){return!this.node()}var sQ=F(()=>{"use strict";s(P7,"default")});function O7(e){for(var t=this._groups,r=0,n=t.length;r{"use strict";s(O7,"default")});function KBe(e){return function(){this.removeAttribute(e)}}function ZBe(e){return function(){this.removeAttributeNS(e.space,e.local)}}function QBe(e,t){return function(){this.setAttribute(e,t)}}function JBe(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function e$e(e,t){return function(){var r=t.apply(this,arguments);r==null?this.removeAttribute(e):this.setAttribute(e,r)}}function t$e(e,t){return function(){var r=t.apply(this,arguments);r==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,r)}}function B7(e,t){var r=hc(e);if(arguments.length<2){var n=this.node();return r.local?n.getAttributeNS(r.space,r.local):n.getAttribute(r)}return this.each((t==null?r.local?ZBe:KBe:typeof t=="function"?r.local?t$e:e$e:r.local?JBe:QBe)(r,t))}var lQ=F(()=>{"use strict";_w();s(KBe,"attrRemove");s(ZBe,"attrRemoveNS");s(QBe,"attrConstant");s(JBe,"attrConstantNS");s(e$e,"attrFunction");s(t$e,"attrFunctionNS");s(B7,"default")});function Dx(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}var $7=F(()=>{"use strict";s(Dx,"default")});function r$e(e){return function(){this.style.removeProperty(e)}}function n$e(e,t,r){return function(){this.style.setProperty(e,t,r)}}function i$e(e,t,r){return function(){var n=t.apply(this,arguments);n==null?this.style.removeProperty(e):this.style.setProperty(e,n,r)}}function F7(e,t,r){return arguments.length>1?this.each((t==null?r$e:typeof t=="function"?i$e:n$e)(e,t,r??"")):ed(this.node(),e)}function ed(e,t){return e.style.getPropertyValue(t)||Dx(e).getComputedStyle(e,null).getPropertyValue(t)}var G7=F(()=>{"use strict";$7();s(r$e,"styleRemove");s(n$e,"styleConstant");s(i$e,"styleFunction");s(F7,"default");s(ed,"styleValue")});function a$e(e){return function(){delete this[e]}}function s$e(e,t){return function(){this[e]=t}}function o$e(e,t){return function(){var r=t.apply(this,arguments);r==null?delete this[e]:this[e]=r}}function z7(e,t){return arguments.length>1?this.each((t==null?a$e:typeof t=="function"?o$e:s$e)(e,t)):this.node()[e]}var cQ=F(()=>{"use strict";s(a$e,"propertyRemove");s(s$e,"propertyConstant");s(o$e,"propertyFunction");s(z7,"default")});function uQ(e){return e.trim().split(/^|\s+/)}function V7(e){return e.classList||new hQ(e)}function hQ(e){this._node=e,this._names=uQ(e.getAttribute("class")||"")}function dQ(e,t){for(var r=V7(e),n=-1,i=t.length;++n{"use strict";s(uQ,"classArray");s(V7,"classList");s(hQ,"ClassList");hQ.prototype={add:s(function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},"add"),remove:s(function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},"remove"),contains:s(function(e){return this._names.indexOf(e)>=0},"contains")};s(dQ,"classedAdd");s(fQ,"classedRemove");s(l$e,"classedTrue");s(c$e,"classedFalse");s(u$e,"classedFunction");s(W7,"default")});function h$e(){this.textContent=""}function d$e(e){return function(){this.textContent=e}}function f$e(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function q7(e){return arguments.length?this.each(e==null?h$e:(typeof e=="function"?f$e:d$e)(e)):this.node().textContent}var mQ=F(()=>{"use strict";s(h$e,"textRemove");s(d$e,"textConstant");s(f$e,"textFunction");s(q7,"default")});function p$e(){this.innerHTML=""}function m$e(e){return function(){this.innerHTML=e}}function g$e(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function H7(e){return arguments.length?this.each(e==null?p$e:(typeof e=="function"?g$e:m$e)(e)):this.node().innerHTML}var gQ=F(()=>{"use strict";s(p$e,"htmlRemove");s(m$e,"htmlConstant");s(g$e,"htmlFunction");s(H7,"default")});function y$e(){this.nextSibling&&this.parentNode.appendChild(this)}function U7(){return this.each(y$e)}var yQ=F(()=>{"use strict";s(y$e,"raise");s(U7,"default")});function v$e(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Y7(){return this.each(v$e)}var vQ=F(()=>{"use strict";s(v$e,"lower");s(Y7,"default")});function j7(e){var t=typeof e=="function"?e:Ax(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}var xQ=F(()=>{"use strict";f7();s(j7,"default")});function x$e(){return null}function X7(e,t){var r=typeof e=="function"?e:Ax(e),n=t==null?x$e:typeof t=="function"?t:Jh(t);return this.select(function(){return this.insertBefore(r.apply(this,arguments),n.apply(this,arguments)||null)})}var bQ=F(()=>{"use strict";f7();Lw();s(x$e,"constantNull");s(X7,"default")});function b$e(){var e=this.parentNode;e&&e.removeChild(this)}function K7(){return this.each(b$e)}var TQ=F(()=>{"use strict";s(b$e,"remove");s(K7,"default")});function T$e(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function C$e(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Z7(e){return this.select(e?C$e:T$e)}var CQ=F(()=>{"use strict";s(T$e,"selection_cloneShallow");s(C$e,"selection_cloneDeep");s(Z7,"default")});function Q7(e){return arguments.length?this.property("__data__",e):this.node().__data__}var kQ=F(()=>{"use strict";s(Q7,"default")});function k$e(e){return function(t){e.call(this,t,this.__data__)}}function w$e(e){return e.trim().split(/^|\s+/).map(function(t){var r="",n=t.indexOf(".");return n>=0&&(r=t.slice(n+1),t=t.slice(0,n)),{type:t,name:r}})}function S$e(e){return function(){var t=this.__on;if(t){for(var r=0,n=-1,i=t.length,a;r{"use strict";s(k$e,"contextListener");s(w$e,"parseTypenames");s(S$e,"onRemove");s(E$e,"onAdd");s(J7,"default")});function SQ(e,t,r){var n=Dx(e),i=n.CustomEvent;typeof i=="function"?i=new i(t,r):(i=n.document.createEvent("Event"),r?(i.initEvent(t,r.bubbles,r.cancelable),i.detail=r.detail):i.initEvent(t,!1,!1)),e.dispatchEvent(i)}function A$e(e,t){return function(){return SQ(this,e,t)}}function R$e(e,t){return function(){return SQ(this,e,t.apply(this,arguments))}}function e8(e,t){return this.each((typeof t=="function"?R$e:A$e)(e,t))}var EQ=F(()=>{"use strict";$7();s(SQ,"dispatchEvent");s(A$e,"dispatchConstant");s(R$e,"dispatchFunction");s(e8,"default")});function*t8(){for(var e=this._groups,t=0,r=e.length;t{"use strict";s(t8,"default")});function gi(e,t){this._groups=e,this._parents=t}function RQ(){return new gi([[document.documentElement]],r8)}function _$e(){return this}var r8,Au,vl=F(()=>{"use strict";WZ();HZ();UZ();YZ();jZ();KZ();k7();ZZ();QZ();JZ();eQ();tQ();rQ();nQ();iQ();aQ();sQ();oQ();lQ();G7();cQ();pQ();mQ();gQ();yQ();vQ();xQ();bQ();TQ();CQ();kQ();wQ();EQ();AQ();r8=[null];s(gi,"Selection");s(RQ,"selection");s(_$e,"selection_selection");gi.prototype=RQ.prototype={constructor:gi,select:p7,selectAll:y7,selectChild:v7,selectChildren:x7,filter:b7,data:S7,enter:C7,exit:E7,join:A7,merge:R7,selection:_$e,order:_7,sort:L7,call:D7,nodes:I7,node:M7,size:N7,empty:P7,each:O7,attr:B7,style:F7,property:z7,classed:W7,text:q7,html:H7,raise:U7,lower:Y7,append:j7,insert:X7,remove:K7,clone:Z7,datum:Q7,on:J7,dispatch:e8,[Symbol.iterator]:t8};Au=RQ});function lt(e){return typeof e=="string"?new gi([[document.querySelector(e)]],[document.documentElement]):new gi([[e]],r8)}var _Q=F(()=>{"use strict";vl();s(lt,"default")});var xl=F(()=>{"use strict";Rx();_w();_Q();vl();Lw();g7();G7()});var LQ=F(()=>{"use strict"});function td(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function y0(e,t){var r=Object.create(e.prototype);for(var n in t)r[n]=t[n];return r}var n8=F(()=>{"use strict";s(td,"default");s(y0,"extend")});function rd(){}function IQ(){return this.rgb().formatHex()}function B$e(){return this.rgb().formatHex8()}function $$e(){return FQ(this).formatHsl()}function MQ(){return this.rgb().formatRgb()}function Tl(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=L$e.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?NQ(t):r===3?new Sa(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?Iw(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?Iw(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=D$e.exec(e))?new Sa(t[1],t[2],t[3],1):(t=I$e.exec(e))?new Sa(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=M$e.exec(e))?Iw(t[1],t[2],t[3],t[4]):(t=N$e.exec(e))?Iw(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=P$e.exec(e))?BQ(t[1],t[2]/100,t[3]/100,1):(t=O$e.exec(e))?BQ(t[1],t[2]/100,t[3]/100,t[4]):DQ.hasOwnProperty(e)?NQ(DQ[e]):e==="transparent"?new Sa(NaN,NaN,NaN,0):null}function NQ(e){return new Sa(e>>16&255,e>>8&255,e&255,1)}function Iw(e,t,r,n){return n<=0&&(e=t=r=NaN),new Sa(e,t,r,n)}function a8(e){return e instanceof rd||(e=Tl(e)),e?(e=e.rgb(),new Sa(e.r,e.g,e.b,e.opacity)):new Sa}function x0(e,t,r,n){return arguments.length===1?a8(e):new Sa(e,t,r,n??1)}function Sa(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}function PQ(){return`#${mp(this.r)}${mp(this.g)}${mp(this.b)}`}function F$e(){return`#${mp(this.r)}${mp(this.g)}${mp(this.b)}${mp((isNaN(this.opacity)?1:this.opacity)*255)}`}function OQ(){let e=Pw(this.opacity);return`${e===1?"rgb(":"rgba("}${gp(this.r)}, ${gp(this.g)}, ${gp(this.b)}${e===1?")":`, ${e})`}`}function Pw(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function gp(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function mp(e){return e=gp(e),(e<16?"0":"")+e.toString(16)}function BQ(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new bl(e,t,r,n)}function FQ(e){if(e instanceof bl)return new bl(e.h,e.s,e.l,e.opacity);if(e instanceof rd||(e=Tl(e)),!e)return new bl;if(e instanceof bl)return e;e=e.rgb();var t=e.r/255,r=e.g/255,n=e.b/255,i=Math.min(t,r,n),a=Math.max(t,r,n),o=NaN,l=a-i,u=(a+i)/2;return l?(t===a?o=(r-n)/l+(r0&&u<1?0:o,new bl(o,l,u,e.opacity)}function GQ(e,t,r,n){return arguments.length===1?FQ(e):new bl(e,t,r,n??1)}function bl(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}function $Q(e){return e=(e||0)%360,e<0?e+360:e}function Mw(e){return Math.max(0,Math.min(1,e||0))}function i8(e,t,r){return(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)*255}var Ix,Nw,v0,Mx,dc,L$e,D$e,I$e,M$e,N$e,P$e,O$e,DQ,s8=F(()=>{"use strict";n8();s(rd,"Color");Ix=.7,Nw=1/Ix,v0="\\s*([+-]?\\d+)\\s*",Mx="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",dc="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",L$e=/^#([0-9a-f]{3,8})$/,D$e=new RegExp(`^rgb\\(${v0},${v0},${v0}\\)$`),I$e=new RegExp(`^rgb\\(${dc},${dc},${dc}\\)$`),M$e=new RegExp(`^rgba\\(${v0},${v0},${v0},${Mx}\\)$`),N$e=new RegExp(`^rgba\\(${dc},${dc},${dc},${Mx}\\)$`),P$e=new RegExp(`^hsl\\(${Mx},${dc},${dc}\\)$`),O$e=new RegExp(`^hsla\\(${Mx},${dc},${dc},${Mx}\\)$`),DQ={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};td(rd,Tl,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:IQ,formatHex:IQ,formatHex8:B$e,formatHsl:$$e,formatRgb:MQ,toString:MQ});s(IQ,"color_formatHex");s(B$e,"color_formatHex8");s($$e,"color_formatHsl");s(MQ,"color_formatRgb");s(Tl,"color");s(NQ,"rgbn");s(Iw,"rgba");s(a8,"rgbConvert");s(x0,"rgb");s(Sa,"Rgb");td(Sa,x0,y0(rd,{brighter(e){return e=e==null?Nw:Math.pow(Nw,e),new Sa(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Ix:Math.pow(Ix,e),new Sa(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Sa(gp(this.r),gp(this.g),gp(this.b),Pw(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:PQ,formatHex:PQ,formatHex8:F$e,formatRgb:OQ,toString:OQ}));s(PQ,"rgb_formatHex");s(F$e,"rgb_formatHex8");s(OQ,"rgb_formatRgb");s(Pw,"clampa");s(gp,"clampi");s(mp,"hex");s(BQ,"hsla");s(FQ,"hslConvert");s(GQ,"hsl");s(bl,"Hsl");td(bl,GQ,y0(rd,{brighter(e){return e=e==null?Nw:Math.pow(Nw,e),new bl(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Ix:Math.pow(Ix,e),new bl(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,n=r+(r<.5?r:1-r)*t,i=2*r-n;return new Sa(i8(e>=240?e-240:e+120,i,n),i8(e,i,n),i8(e<120?e+240:e-120,i,n),this.opacity)},clamp(){return new bl($Q(this.h),Mw(this.s),Mw(this.l),Pw(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(){let e=Pw(this.opacity);return`${e===1?"hsl(":"hsla("}${$Q(this.h)}, ${Mw(this.s)*100}%, ${Mw(this.l)*100}%${e===1?")":`, ${e})`}`}}));s($Q,"clamph");s(Mw,"clampt");s(i8,"hsl2rgb")});var zQ,VQ,WQ=F(()=>{"use strict";zQ=Math.PI/180,VQ=180/Math.PI});function XQ(e){if(e instanceof fc)return new fc(e.l,e.a,e.b,e.opacity);if(e instanceof Ru)return KQ(e);e instanceof Sa||(e=a8(e));var t=u8(e.r),r=u8(e.g),n=u8(e.b),i=o8((.2225045*t+.7168786*r+.0606169*n)/HQ),a,o;return t===r&&r===n?a=o=i:(a=o8((.4360747*t+.3850649*r+.1430804*n)/qQ),o=o8((.0139322*t+.0971045*r+.7141733*n)/UQ)),new fc(116*i-16,500*(a-i),200*(i-o),e.opacity)}function h8(e,t,r,n){return arguments.length===1?XQ(e):new fc(e,t,r,n??1)}function fc(e,t,r,n){this.l=+e,this.a=+t,this.b=+r,this.opacity=+n}function o8(e){return e>G$e?Math.pow(e,1/3):e/jQ+YQ}function l8(e){return e>b0?e*e*e:jQ*(e-YQ)}function c8(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function u8(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function z$e(e){if(e instanceof Ru)return new Ru(e.h,e.c,e.l,e.opacity);if(e instanceof fc||(e=XQ(e)),e.a===0&&e.b===0)return new Ru(NaN,0{"use strict";n8();s8();WQ();Ow=18,qQ=.96422,HQ=1,UQ=.82521,YQ=4/29,b0=6/29,jQ=3*b0*b0,G$e=b0*b0*b0;s(XQ,"labConvert");s(h8,"lab");s(fc,"Lab");td(fc,h8,y0(rd,{brighter(e){return new fc(this.l+Ow*(e??1),this.a,this.b,this.opacity)},darker(e){return new fc(this.l-Ow*(e??1),this.a,this.b,this.opacity)},rgb(){var e=(this.l+16)/116,t=isNaN(this.a)?e:e+this.a/500,r=isNaN(this.b)?e:e-this.b/200;return t=qQ*l8(t),e=HQ*l8(e),r=UQ*l8(r),new Sa(c8(3.1338561*t-1.6168667*e-.4906146*r),c8(-.9787684*t+1.9161415*e+.033454*r),c8(.0719453*t-.2289914*e+1.4052427*r),this.opacity)}}));s(o8,"xyz2lab");s(l8,"lab2xyz");s(c8,"lrgb2rgb");s(u8,"rgb2lrgb");s(z$e,"hclConvert");s(Nx,"hcl");s(Ru,"Hcl");s(KQ,"hcl2lab");td(Ru,Nx,y0(rd,{brighter(e){return new Ru(this.h,this.c,this.l+Ow*(e??1),this.opacity)},darker(e){return new Ru(this.h,this.c,this.l-Ow*(e??1),this.opacity)},rgb(){return KQ(this).rgb()}}))});var T0=F(()=>{"use strict";s8();ZQ()});function d8(e,t,r,n,i){var a=e*e,o=a*e;return((1-3*e+3*a-o)*t+(4-6*a+3*o)*r+(1+3*e+3*a-3*o)*n+o*i)/6}function f8(e){var t=e.length-1;return function(r){var n=r<=0?r=0:r>=1?(r=1,t-1):Math.floor(r*t),i=e[n],a=e[n+1],o=n>0?e[n-1]:2*i-a,l=n{"use strict";s(d8,"basis");s(f8,"default")});function m8(e){var t=e.length;return function(r){var n=Math.floor(((r%=1)<0?++r:r)*t),i=e[(n+t-1)%t],a=e[n%t],o=e[(n+1)%t],l=e[(n+2)%t];return d8((r-n/t)*t,i,a,o,l)}}var QQ=F(()=>{"use strict";p8();s(m8,"default")});var C0,g8=F(()=>{"use strict";C0=s(e=>()=>e,"default")});function JQ(e,t){return function(r){return e+r*t}}function V$e(e,t,r){return e=Math.pow(e,r),t=Math.pow(t,r)-e,r=1/r,function(n){return Math.pow(e+n*t,r)}}function eJ(e,t){var r=t-e;return r?JQ(e,r>180||r<-180?r-360*Math.round(r/360):r):C0(isNaN(e)?t:e)}function tJ(e){return(e=+e)==1?_u:function(t,r){return r-t?V$e(t,r,e):C0(isNaN(t)?r:t)}}function _u(e,t){var r=t-e;return r?JQ(e,r):C0(isNaN(e)?t:e)}var y8=F(()=>{"use strict";g8();s(JQ,"linear");s(V$e,"exponential");s(eJ,"hue");s(tJ,"gamma");s(_u,"nogamma")});function rJ(e){return function(t){var r=t.length,n=new Array(r),i=new Array(r),a=new Array(r),o,l;for(o=0;o{"use strict";T0();p8();QQ();y8();yp=s((function e(t){var r=tJ(t);function n(i,a){var o=r((i=x0(i)).r,(a=x0(a)).r),l=r(i.g,a.g),u=r(i.b,a.b),h=_u(i.opacity,a.opacity);return function(d){return i.r=o(d),i.g=l(d),i.b=u(d),i.opacity=h(d),i+""}}return s(n,"rgb"),n.gamma=e,n}),"rgbGamma")(1);s(rJ,"rgbSpline");W$e=rJ(f8),q$e=rJ(m8)});function x8(e,t){t||(t=[]);var r=e?Math.min(t.length,e.length):0,n=t.slice(),i;return function(a){for(i=0;i{"use strict";s(x8,"default");s(nJ,"isNumberArray")});function aJ(e,t){var r=t?t.length:0,n=e?Math.min(r,e.length):0,i=new Array(n),a=new Array(r),o;for(o=0;o{"use strict";Bw();s(aJ,"genericArray")});function b8(e,t){var r=new Date;return e=+e,t=+t,function(n){return r.setTime(e*(1-n)+t*n),r}}var oJ=F(()=>{"use strict";s(b8,"default")});function la(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}var Px=F(()=>{"use strict";s(la,"default")});function T8(e,t){var r={},n={},i;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(i in t)i in e?r[i]=nd(e[i],t[i]):n[i]=t[i];return function(a){for(i in r)n[i]=r[i](a);return n}}var lJ=F(()=>{"use strict";Bw();s(T8,"default")});function H$e(e){return function(){return e}}function U$e(e){return function(t){return e(t)+""}}function k0(e,t){var r=k8.lastIndex=C8.lastIndex=0,n,i,a,o=-1,l=[],u=[];for(e=e+"",t=t+"";(n=k8.exec(e))&&(i=C8.exec(t));)(a=i.index)>r&&(a=t.slice(r,a),l[o]?l[o]+=a:l[++o]=a),(n=n[0])===(i=i[0])?l[o]?l[o]+=i:l[++o]=i:(l[++o]=null,u.push({i:o,x:la(n,i)})),r=C8.lastIndex;return r{"use strict";Px();k8=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,C8=new RegExp(k8.source,"g");s(H$e,"zero");s(U$e,"one");s(k0,"default")});function nd(e,t){var r=typeof t,n;return t==null||r==="boolean"?C0(t):(r==="number"?la:r==="string"?(n=Tl(t))?(t=n,yp):k0:t instanceof Tl?yp:t instanceof Date?b8:nJ(t)?x8:Array.isArray(t)?aJ:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?T8:la)(e,t)}var Bw=F(()=>{"use strict";T0();v8();sJ();oJ();Px();lJ();w8();g8();iJ();s(nd,"default")});function $w(e,t){return e=+e,t=+t,function(r){return Math.round(e*(1-r)+t*r)}}var cJ=F(()=>{"use strict";s($w,"default")});function Gw(e,t,r,n,i,a){var o,l,u;return(o=Math.sqrt(e*e+t*t))&&(e/=o,t/=o),(u=e*r+t*n)&&(r-=e*u,n-=t*u),(l=Math.sqrt(r*r+n*n))&&(r/=l,n/=l,u/=l),e*n{"use strict";uJ=180/Math.PI,Fw={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};s(Gw,"default")});function dJ(e){let t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?Fw:Gw(t.a,t.b,t.c,t.d,t.e,t.f)}function fJ(e){return e==null?Fw:(zw||(zw=document.createElementNS("http://www.w3.org/2000/svg","g")),zw.setAttribute("transform",e),(e=zw.transform.baseVal.consolidate())?(e=e.matrix,Gw(e.a,e.b,e.c,e.d,e.e,e.f)):Fw)}var zw,pJ=F(()=>{"use strict";hJ();s(dJ,"parseCss");s(fJ,"parseSvg")});function mJ(e,t,r,n){function i(h){return h.length?h.pop()+" ":""}s(i,"pop");function a(h,d,f,p,m,g){if(h!==f||d!==p){var y=m.push("translate(",null,t,null,r);g.push({i:y-4,x:la(h,f)},{i:y-2,x:la(d,p)})}else(f||p)&&m.push("translate("+f+t+p+r)}s(a,"translate");function o(h,d,f,p){h!==d?(h-d>180?d+=360:d-h>180&&(h+=360),p.push({i:f.push(i(f)+"rotate(",null,n)-2,x:la(h,d)})):d&&f.push(i(f)+"rotate("+d+n)}s(o,"rotate");function l(h,d,f,p){h!==d?p.push({i:f.push(i(f)+"skewX(",null,n)-2,x:la(h,d)}):d&&f.push(i(f)+"skewX("+d+n)}s(l,"skewX");function u(h,d,f,p,m,g){if(h!==f||d!==p){var y=m.push(i(m)+"scale(",null,",",null,")");g.push({i:y-4,x:la(h,f)},{i:y-2,x:la(d,p)})}else(f!==1||p!==1)&&m.push(i(m)+"scale("+f+","+p+")")}return s(u,"scale"),function(h,d){var f=[],p=[];return h=e(h),d=e(d),a(h.translateX,h.translateY,d.translateX,d.translateY,f,p),o(h.rotate,d.rotate,f,p),l(h.skewX,d.skewX,f,p),u(h.scaleX,h.scaleY,d.scaleX,d.scaleY,f,p),h=d=null,function(m){for(var g=-1,y=p.length,v;++g{"use strict";Px();pJ();s(mJ,"interpolateTransform");S8=mJ(dJ,"px, ","px)","deg)"),E8=mJ(fJ,", ",")",")")});function yJ(e){return function(t,r){var n=e((t=Nx(t)).h,(r=Nx(r)).h),i=_u(t.c,r.c),a=_u(t.l,r.l),o=_u(t.opacity,r.opacity);return function(l){return t.h=n(l),t.c=i(l),t.l=a(l),t.opacity=o(l),t+""}}}var A8,Y$e,vJ=F(()=>{"use strict";T0();y8();s(yJ,"hcl");A8=yJ(eJ),Y$e=yJ(_u)});var w0=F(()=>{"use strict";Bw();Px();cJ();w8();gJ();v8();vJ()});function zx(){return vp||(TJ(j$e),vp=Fx.now()+qw)}function j$e(){vp=0}function Gx(){this._call=this._time=this._next=null}function Hw(e,t,r){var n=new Gx;return n.restart(e,t,r),n}function CJ(){zx(),++S0;for(var e=Vw,t;e;)(t=vp-e._time)>=0&&e._call.call(void 0,t),e=e._next;--S0}function xJ(){vp=(Ww=Fx.now())+qw,S0=Bx=0;try{CJ()}finally{S0=0,K$e(),vp=0}}function X$e(){var e=Fx.now(),t=e-Ww;t>bJ&&(qw-=t,Ww=e)}function K$e(){for(var e,t=Vw,r,n=1/0;t;)t._call?(n>t._time&&(n=t._time),e=t,t=t._next):(r=t._next,t._next=null,t=e?e._next=r:Vw=r);$x=e,R8(n)}function R8(e){if(!S0){Bx&&(Bx=clearTimeout(Bx));var t=e-vp;t>24?(e<1/0&&(Bx=setTimeout(xJ,e-Fx.now()-qw)),Ox&&(Ox=clearInterval(Ox))):(Ox||(Ww=Fx.now(),Ox=setInterval(X$e,bJ)),S0=1,TJ(xJ))}}var S0,Bx,Ox,bJ,Vw,$x,Ww,vp,qw,Fx,TJ,_8=F(()=>{"use strict";S0=0,Bx=0,Ox=0,bJ=1e3,Ww=0,vp=0,qw=0,Fx=typeof performance=="object"&&performance.now?performance:Date,TJ=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};s(zx,"now");s(j$e,"clearNow");s(Gx,"Timer");Gx.prototype=Hw.prototype={constructor:Gx,restart:s(function(e,t,r){if(typeof e!="function")throw new TypeError("callback is not a function");r=(r==null?zx():+r)+(t==null?0:+t),!this._next&&$x!==this&&($x?$x._next=this:Vw=this,$x=this),this._call=e,this._time=r,R8()},"restart"),stop:s(function(){this._call&&(this._call=null,this._time=1/0,R8())},"stop")};s(Hw,"timer");s(CJ,"timerFlush");s(xJ,"wake");s(X$e,"poke");s(K$e,"nap");s(R8,"sleep")});function Vx(e,t,r){var n=new Gx;return t=t==null?0:+t,n.restart(i=>{n.stop(),e(i+t)},t,r),n}var kJ=F(()=>{"use strict";_8();s(Vx,"default")});var Uw=F(()=>{"use strict";_8();kJ()});function Lu(e,t,r,n,i,a){var o=e.__transition;if(!o)e.__transition={};else if(r in o)return;J$e(e,r,{name:t,index:n,group:i,on:Z$e,tween:Q$e,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:EJ})}function qx(e,t){var r=Xi(e,t);if(r.state>EJ)throw new Error("too late; already scheduled");return r}function Ea(e,t){var r=Xi(e,t);if(r.state>Yw)throw new Error("too late; already running");return r}function Xi(e,t){var r=e.__transition;if(!r||!(r=r[t]))throw new Error("transition not found");return r}function J$e(e,t,r){var n=e.__transition,i;n[t]=r,r.timer=Hw(a,0,r.time);function a(h){r.state=wJ,r.timer.restart(o,r.delay,r.time),r.delay<=h&&o(h-r.delay)}s(a,"schedule");function o(h){var d,f,p,m;if(r.state!==wJ)return u();for(d in n)if(m=n[d],m.name===r.name){if(m.state===Yw)return Vx(o);m.state===SJ?(m.state=Wx,m.timer.stop(),m.on.call("interrupt",e,e.__data__,m.index,m.group),delete n[d]):+d{"use strict";u7();Uw();Z$e=c7("start","end","cancel","interrupt"),Q$e=[],EJ=0,wJ=1,jw=2,Yw=3,SJ=4,Xw=5,Wx=6;s(Lu,"default");s(qx,"init");s(Ea,"set");s(Xi,"get");s(J$e,"create")});function Hx(e,t){var r=e.__transition,n,i,a=!0,o;if(r){t=t==null?null:t+"";for(o in r){if((n=r[o]).name!==t){a=!1;continue}i=n.state>jw&&n.state{"use strict";Bs();s(Hx,"default")});function L8(e){return this.each(function(){Hx(this,e)})}var RJ=F(()=>{"use strict";AJ();s(L8,"default")});function eFe(e,t){var r,n;return function(){var i=Ea(this,e),a=i.tween;if(a!==r){n=r=a;for(var o=0,l=n.length;o{"use strict";Bs();s(eFe,"tweenRemove");s(tFe,"tweenFunction");s(D8,"default");s(E0,"tweenValue")});function Yx(e,t){var r;return(typeof t=="number"?la:t instanceof Tl?yp:(r=Tl(t))?(t=r,yp):k0)(e,t)}var I8=F(()=>{"use strict";T0();w0();s(Yx,"default")});function rFe(e){return function(){this.removeAttribute(e)}}function nFe(e){return function(){this.removeAttributeNS(e.space,e.local)}}function iFe(e,t,r){var n,i=r+"",a;return function(){var o=this.getAttribute(e);return o===i?null:o===n?a:a=t(n=o,r)}}function aFe(e,t,r){var n,i=r+"",a;return function(){var o=this.getAttributeNS(e.space,e.local);return o===i?null:o===n?a:a=t(n=o,r)}}function sFe(e,t,r){var n,i,a;return function(){var o,l=r(this),u;return l==null?void this.removeAttribute(e):(o=this.getAttribute(e),u=l+"",o===u?null:o===n&&u===i?a:(i=u,a=t(n=o,l)))}}function oFe(e,t,r){var n,i,a;return function(){var o,l=r(this),u;return l==null?void this.removeAttributeNS(e.space,e.local):(o=this.getAttributeNS(e.space,e.local),u=l+"",o===u?null:o===n&&u===i?a:(i=u,a=t(n=o,l)))}}function M8(e,t){var r=hc(e),n=r==="transform"?E8:Yx;return this.attrTween(e,typeof t=="function"?(r.local?oFe:sFe)(r,n,E0(this,"attr."+e,t)):t==null?(r.local?nFe:rFe)(r):(r.local?aFe:iFe)(r,n,t))}var _J=F(()=>{"use strict";w0();xl();Ux();I8();s(rFe,"attrRemove");s(nFe,"attrRemoveNS");s(iFe,"attrConstant");s(aFe,"attrConstantNS");s(sFe,"attrFunction");s(oFe,"attrFunctionNS");s(M8,"default")});function lFe(e,t){return function(r){this.setAttribute(e,t.call(this,r))}}function cFe(e,t){return function(r){this.setAttributeNS(e.space,e.local,t.call(this,r))}}function uFe(e,t){var r,n;function i(){var a=t.apply(this,arguments);return a!==n&&(r=(n=a)&&cFe(e,a)),r}return s(i,"tween"),i._value=t,i}function hFe(e,t){var r,n;function i(){var a=t.apply(this,arguments);return a!==n&&(r=(n=a)&&lFe(e,a)),r}return s(i,"tween"),i._value=t,i}function N8(e,t){var r="attr."+e;if(arguments.length<2)return(r=this.tween(r))&&r._value;if(t==null)return this.tween(r,null);if(typeof t!="function")throw new Error;var n=hc(e);return this.tween(r,(n.local?uFe:hFe)(n,t))}var LJ=F(()=>{"use strict";xl();s(lFe,"attrInterpolate");s(cFe,"attrInterpolateNS");s(uFe,"attrTweenNS");s(hFe,"attrTween");s(N8,"default")});function dFe(e,t){return function(){qx(this,e).delay=+t.apply(this,arguments)}}function fFe(e,t){return t=+t,function(){qx(this,e).delay=t}}function P8(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?dFe:fFe)(t,e)):Xi(this.node(),t).delay}var DJ=F(()=>{"use strict";Bs();s(dFe,"delayFunction");s(fFe,"delayConstant");s(P8,"default")});function pFe(e,t){return function(){Ea(this,e).duration=+t.apply(this,arguments)}}function mFe(e,t){return t=+t,function(){Ea(this,e).duration=t}}function O8(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?pFe:mFe)(t,e)):Xi(this.node(),t).duration}var IJ=F(()=>{"use strict";Bs();s(pFe,"durationFunction");s(mFe,"durationConstant");s(O8,"default")});function gFe(e,t){if(typeof t!="function")throw new Error;return function(){Ea(this,e).ease=t}}function B8(e){var t=this._id;return arguments.length?this.each(gFe(t,e)):Xi(this.node(),t).ease}var MJ=F(()=>{"use strict";Bs();s(gFe,"easeConstant");s(B8,"default")});function yFe(e,t){return function(){var r=t.apply(this,arguments);if(typeof r!="function")throw new Error;Ea(this,e).ease=r}}function $8(e){if(typeof e!="function")throw new Error;return this.each(yFe(this._id,e))}var NJ=F(()=>{"use strict";Bs();s(yFe,"easeVarying");s($8,"default")});function F8(e){typeof e!="function"&&(e=g0(e));for(var t=this._groups,r=t.length,n=new Array(r),i=0;i{"use strict";xl();xp();s(F8,"default")});function G8(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,r=e._groups,n=t.length,i=r.length,a=Math.min(n,i),o=new Array(n),l=0;l{"use strict";xp();s(G8,"default")});function vFe(e){return(e+"").trim().split(/^|\s+/).every(function(t){var r=t.indexOf(".");return r>=0&&(t=t.slice(0,r)),!t||t==="start"})}function xFe(e,t,r){var n,i,a=vFe(t)?qx:Ea;return function(){var o=a(this,e),l=o.on;l!==n&&(i=(n=l).copy()).on(t,r),o.on=i}}function z8(e,t){var r=this._id;return arguments.length<2?Xi(this.node(),r).on.on(e):this.each(xFe(r,e,t))}var BJ=F(()=>{"use strict";Bs();s(vFe,"start");s(xFe,"onFunction");s(z8,"default")});function bFe(e){return function(){var t=this.parentNode;for(var r in this.__transition)if(+r!==e)return;t&&t.removeChild(this)}}function V8(){return this.on("end.remove",bFe(this._id))}var $J=F(()=>{"use strict";s(bFe,"removeFunction");s(V8,"default")});function W8(e){var t=this._name,r=this._id;typeof e!="function"&&(e=Jh(e));for(var n=this._groups,i=n.length,a=new Array(i),o=0;o{"use strict";xl();xp();Bs();s(W8,"default")});function q8(e){var t=this._name,r=this._id;typeof e!="function"&&(e=m0(e));for(var n=this._groups,i=n.length,a=[],o=[],l=0;l{"use strict";xl();xp();Bs();s(q8,"default")});function H8(){return new TFe(this._groups,this._parents)}var TFe,zJ=F(()=>{"use strict";xl();TFe=Au.prototype.constructor;s(H8,"default")});function CFe(e,t){var r,n,i;return function(){var a=ed(this,e),o=(this.style.removeProperty(e),ed(this,e));return a===o?null:a===r&&o===n?i:i=t(r=a,n=o)}}function VJ(e){return function(){this.style.removeProperty(e)}}function kFe(e,t,r){var n,i=r+"",a;return function(){var o=ed(this,e);return o===i?null:o===n?a:a=t(n=o,r)}}function wFe(e,t,r){var n,i,a;return function(){var o=ed(this,e),l=r(this),u=l+"";return l==null&&(u=l=(this.style.removeProperty(e),ed(this,e))),o===u?null:o===n&&u===i?a:(i=u,a=t(n=o,l))}}function SFe(e,t){var r,n,i,a="style."+t,o="end."+a,l;return function(){var u=Ea(this,e),h=u.on,d=u.value[a]==null?l||(l=VJ(t)):void 0;(h!==r||i!==d)&&(n=(r=h).copy()).on(o,i=d),u.on=n}}function U8(e,t,r){var n=(e+="")=="transform"?S8:Yx;return t==null?this.styleTween(e,CFe(e,n)).on("end.style."+e,VJ(e)):typeof t=="function"?this.styleTween(e,wFe(e,n,E0(this,"style."+e,t))).each(SFe(this._id,e)):this.styleTween(e,kFe(e,n,t),r).on("end.style."+e,null)}var WJ=F(()=>{"use strict";w0();xl();Bs();Ux();I8();s(CFe,"styleNull");s(VJ,"styleRemove");s(kFe,"styleConstant");s(wFe,"styleFunction");s(SFe,"styleMaybeRemove");s(U8,"default")});function EFe(e,t,r){return function(n){this.style.setProperty(e,t.call(this,n),r)}}function AFe(e,t,r){var n,i;function a(){var o=t.apply(this,arguments);return o!==i&&(n=(i=o)&&EFe(e,o,r)),n}return s(a,"tween"),a._value=t,a}function Y8(e,t,r){var n="style."+(e+="");if(arguments.length<2)return(n=this.tween(n))&&n._value;if(t==null)return this.tween(n,null);if(typeof t!="function")throw new Error;return this.tween(n,AFe(e,t,r??""))}var qJ=F(()=>{"use strict";s(EFe,"styleInterpolate");s(AFe,"styleTween");s(Y8,"default")});function RFe(e){return function(){this.textContent=e}}function _Fe(e){return function(){var t=e(this);this.textContent=t??""}}function j8(e){return this.tween("text",typeof e=="function"?_Fe(E0(this,"text",e)):RFe(e==null?"":e+""))}var HJ=F(()=>{"use strict";Ux();s(RFe,"textConstant");s(_Fe,"textFunction");s(j8,"default")});function LFe(e){return function(t){this.textContent=e.call(this,t)}}function DFe(e){var t,r;function n(){var i=e.apply(this,arguments);return i!==r&&(t=(r=i)&&LFe(i)),t}return s(n,"tween"),n._value=e,n}function X8(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(e==null)return this.tween(t,null);if(typeof e!="function")throw new Error;return this.tween(t,DFe(e))}var UJ=F(()=>{"use strict";s(LFe,"textInterpolate");s(DFe,"textTween");s(X8,"default")});function K8(){for(var e=this._name,t=this._id,r=Kw(),n=this._groups,i=n.length,a=0;a{"use strict";xp();Bs();s(K8,"default")});function Z8(){var e,t,r=this,n=r._id,i=r.size();return new Promise(function(a,o){var l={value:o},u={value:s(function(){--i===0&&a()},"value")};r.each(function(){var h=Ea(this,n),d=h.on;d!==e&&(t=(e=d).copy(),t._.cancel.push(l),t._.interrupt.push(l),t._.end.push(u)),h.on=t}),i===0&&a()})}var jJ=F(()=>{"use strict";Bs();s(Z8,"default")});function ds(e,t,r,n){this._groups=e,this._parents=t,this._name=r,this._id=n}function XJ(e){return Au().transition(e)}function Kw(){return++IFe}var IFe,Du,xp=F(()=>{"use strict";xl();_J();LJ();DJ();IJ();MJ();NJ();PJ();OJ();BJ();$J();FJ();GJ();zJ();WJ();qJ();HJ();UJ();YJ();Ux();jJ();IFe=0;s(ds,"Transition");s(XJ,"transition");s(Kw,"newId");Du=Au.prototype;ds.prototype=XJ.prototype={constructor:ds,select:W8,selectAll:q8,selectChild:Du.selectChild,selectChildren:Du.selectChildren,filter:F8,merge:G8,selection:H8,transition:K8,call:Du.call,nodes:Du.nodes,node:Du.node,size:Du.size,empty:Du.empty,each:Du.each,on:z8,attr:M8,attrTween:N8,style:U8,styleTween:Y8,text:j8,textTween:X8,remove:V8,tween:D8,delay:P8,duration:O8,ease:B8,easeVarying:$8,end:Z8,[Symbol.iterator]:Du[Symbol.iterator]}});function Zw(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var KJ=F(()=>{"use strict";s(Zw,"cubicInOut")});var Q8=F(()=>{"use strict";KJ()});function NFe(e,t){for(var r;!(r=e.__transition)||!(r=r[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return r}function J8(e){var t,r;e instanceof ds?(t=e._id,e=e._name):(t=Kw(),(r=MFe).time=zx(),e=e==null?null:e+"");for(var n=this._groups,i=n.length,a=0;a{"use strict";xp();Bs();Q8();Uw();MFe={time:null,delay:0,duration:250,ease:Zw};s(NFe,"inherit");s(J8,"default")});var QJ=F(()=>{"use strict";xl();RJ();ZJ();Au.prototype.interrupt=L8;Au.prototype.transition=J8});var Qw=F(()=>{"use strict";QJ()});var JJ=F(()=>{"use strict"});var eee=F(()=>{"use strict"});var tee=F(()=>{"use strict"});function ree(e){return[+e[0],+e[1]]}function PFe(e){return[ree(e[0]),ree(e[1])]}function eI(e){return{type:e}}var pOt,mOt,gOt,yOt,vOt,xOt,nee=F(()=>{"use strict";Qw();JJ();eee();tee();({abs:pOt,max:mOt,min:gOt}=Math);s(ree,"number1");s(PFe,"number2");yOt={name:"x",handles:["w","e"].map(eI),input:s(function(e,t){return e==null?null:[[+e[0],t[0][1]],[+e[1],t[1][1]]]},"input"),output:s(function(e){return e&&[e[0][0],e[1][0]]},"output")},vOt={name:"y",handles:["n","s"].map(eI),input:s(function(e,t){return e==null?null:[[t[0][0],+e[0]],[t[1][0],+e[1]]]},"input"),output:s(function(e){return e&&[e[0][1],e[1][1]]},"output")},xOt={name:"xy",handles:["n","w","e","s","nw","ne","sw","se"].map(eI),input:s(function(e){return e==null?null:PFe(e)},"input"),output:s(function(e){return e},"output")};s(eI,"type")});var iee=F(()=>{"use strict";nee()});function aee(e){this._+=e[0];for(let t=1,r=e.length;t=0))throw new Error(`invalid digits: ${e}`);if(t>15)return aee;let r=10**t;return function(n){this._+=n[0];for(let i=1,a=n.length;i{"use strict";tI=Math.PI,rI=2*tI,bp=1e-6,OFe=rI-bp;s(aee,"append");s(BFe,"appendRound");Tp=class{static{s(this,"Path")}constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?aee:BFe(t)}moveTo(t,r){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,r){this._append`L${this._x1=+t},${this._y1=+r}`}quadraticCurveTo(t,r,n,i){this._append`Q${+t},${+r},${this._x1=+n},${this._y1=+i}`}bezierCurveTo(t,r,n,i,a,o){this._append`C${+t},${+r},${+n},${+i},${this._x1=+a},${this._y1=+o}`}arcTo(t,r,n,i,a){if(t=+t,r=+r,n=+n,i=+i,a=+a,a<0)throw new Error(`negative radius: ${a}`);let o=this._x1,l=this._y1,u=n-t,h=i-r,d=o-t,f=l-r,p=d*d+f*f;if(this._x1===null)this._append`M${this._x1=t},${this._y1=r}`;else if(p>bp)if(!(Math.abs(f*u-h*d)>bp)||!a)this._append`L${this._x1=t},${this._y1=r}`;else{let m=n-o,g=i-l,y=u*u+h*h,v=m*m+g*g,x=Math.sqrt(y),b=Math.sqrt(p),T=a*Math.tan((tI-Math.acos((y+p-v)/(2*x*b)))/2),w=T/b,C=T/x;Math.abs(w-1)>bp&&this._append`L${t+w*d},${r+w*f}`,this._append`A${a},${a},0,0,${+(f*m>d*g)},${this._x1=t+C*u},${this._y1=r+C*h}`}}arc(t,r,n,i,a,o){if(t=+t,r=+r,n=+n,o=!!o,n<0)throw new Error(`negative radius: ${n}`);let l=n*Math.cos(i),u=n*Math.sin(i),h=t+l,d=r+u,f=1^o,p=o?i-a:a-i;this._x1===null?this._append`M${h},${d}`:(Math.abs(this._x1-h)>bp||Math.abs(this._y1-d)>bp)&&this._append`L${h},${d}`,n&&(p<0&&(p=p%rI+rI),p>OFe?this._append`A${n},${n},0,1,${f},${t-l},${r-u}A${n},${n},0,1,${f},${this._x1=h},${this._y1=d}`:p>bp&&this._append`A${n},${n},0,${+(p>=tI)},${f},${this._x1=t+n*Math.cos(a)},${this._y1=r+n*Math.sin(a)}`)}rect(t,r,n,i){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}h${n=+n}v${+i}h${-n}Z`}toString(){return this._}};s(see,"path");see.prototype=Tp.prototype});var nI=F(()=>{"use strict";oee()});var lee=F(()=>{"use strict"});var cee=F(()=>{"use strict"});var uee=F(()=>{"use strict"});var hee=F(()=>{"use strict"});var dee=F(()=>{"use strict"});var fee=F(()=>{"use strict"});var pee=F(()=>{"use strict"});function iI(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function Cp(e,t){if((r=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var r,n=e.slice(0,r);return[n.length>1?n[0]+n.slice(2):n,+e.slice(r+1)]}var jx=F(()=>{"use strict";s(iI,"default");s(Cp,"formatDecimalParts")});function Cl(e){return e=Cp(Math.abs(e)),e?e[1]:NaN}var Xx=F(()=>{"use strict";jx();s(Cl,"default")});function aI(e,t){return function(r,n){for(var i=r.length,a=[],o=0,l=e[0],u=0;i>0&&l>0&&(u+l+1>n&&(l=Math.max(1,n-u)),a.push(r.substring(i-=l,i+l)),!((u+=l+1)>n));)l=e[o=(o+1)%e.length];return a.reverse().join(t)}}var mee=F(()=>{"use strict";s(aI,"default")});function sI(e){return function(t){return t.replace(/[0-9]/g,function(r){return e[+r]})}}var gee=F(()=>{"use strict";s(sI,"default")});function id(e){if(!(t=$Fe.exec(e)))throw new Error("invalid format: "+e);var t;return new Jw({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]})}function Jw(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.type+""}var $Fe,oI=F(()=>{"use strict";$Fe=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;s(id,"formatSpecifier");id.prototype=Jw.prototype;s(Jw,"FormatSpecifier");Jw.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 lI(e){e:for(var t=e.length,r=1,n=-1,i;r0&&(n=0);break}return n>0?e.slice(0,n)+e.slice(i+1):e}var yee=F(()=>{"use strict";s(lI,"default")});function uI(e,t){var r=Cp(e,t);if(!r)return e+"";var n=r[0],i=r[1],a=i-(cI=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,o=n.length;return a===o?n:a>o?n+new Array(a-o+1).join("0"):a>0?n.slice(0,a)+"."+n.slice(a):"0."+new Array(1-a).join("0")+Cp(e,Math.max(0,t+a-1))[0]}var cI,hI=F(()=>{"use strict";jx();s(uI,"default")});function eS(e,t){var r=Cp(e,t);if(!r)return e+"";var n=r[0],i=r[1];return i<0?"0."+new Array(-i).join("0")+n:n.length>i+1?n.slice(0,i+1)+"."+n.slice(i+1):n+new Array(i-n.length+2).join("0")}var vee=F(()=>{"use strict";jx();s(eS,"default")});var dI,xee=F(()=>{"use strict";jx();hI();vee();dI={"%":s((e,t)=>(e*100).toFixed(t),"%"),b:s(e=>Math.round(e).toString(2),"b"),c:s(e=>e+"","c"),d:iI,e:s((e,t)=>e.toExponential(t),"e"),f:s((e,t)=>e.toFixed(t),"f"),g:s((e,t)=>e.toPrecision(t),"g"),o:s(e=>Math.round(e).toString(8),"o"),p:s((e,t)=>eS(e*100,t),"p"),r:eS,s:uI,X:s(e=>Math.round(e).toString(16).toUpperCase(),"X"),x:s(e=>Math.round(e).toString(16),"x")}});function tS(e){return e}var bee=F(()=>{"use strict";s(tS,"default")});function fI(e){var t=e.grouping===void 0||e.thousands===void 0?tS:aI(Tee.call(e.grouping,Number),e.thousands+""),r=e.currency===void 0?"":e.currency[0]+"",n=e.currency===void 0?"":e.currency[1]+"",i=e.decimal===void 0?".":e.decimal+"",a=e.numerals===void 0?tS:sI(Tee.call(e.numerals,String)),o=e.percent===void 0?"%":e.percent+"",l=e.minus===void 0?"\u2212":e.minus+"",u=e.nan===void 0?"NaN":e.nan+"";function h(f){f=id(f);var p=f.fill,m=f.align,g=f.sign,y=f.symbol,v=f.zero,x=f.width,b=f.comma,T=f.precision,w=f.trim,C=f.type;C==="n"?(b=!0,C="g"):dI[C]||(T===void 0&&(T=12),w=!0,C="g"),(v||p==="0"&&m==="=")&&(v=!0,p="0",m="=");var k=y==="$"?r:y==="#"&&/[boxX]/.test(C)?"0"+C.toLowerCase():"",S=y==="$"?n:/[%p]/.test(C)?o:"",A=dI[C],M=/[defgprs%]/.test(C);T=T===void 0?6:/[gprs]/.test(C)?Math.max(1,Math.min(21,T)):Math.max(0,Math.min(20,T));function N(D){var R=k,E=S,I,L,P;if(C==="c")E=A(D)+E,D="";else{D=+D;var B=D<0||1/D<0;if(D=isNaN(D)?u:A(Math.abs(D),T),w&&(D=lI(D)),B&&+D==0&&g!=="+"&&(B=!1),R=(B?g==="("?g:l:g==="-"||g==="("?"":g)+R,E=(C==="s"?Cee[8+cI/3]:"")+E+(B&&g==="("?")":""),M){for(I=-1,L=D.length;++IP||P>57){E=(P===46?i+D.slice(I+1):D.slice(I))+E,D=D.slice(0,I);break}}}b&&!v&&(D=t(D,1/0));var O=R.length+D.length+E.length,$=O>1)+R+D+E+$.slice(O);break;default:D=$+R+D+E;break}return a(D)}return s(N,"format"),N.toString=function(){return f+""},N}s(h,"newFormat");function d(f,p){var m=h((f=id(f),f.type="f",f)),g=Math.max(-8,Math.min(8,Math.floor(Cl(p)/3)))*3,y=Math.pow(10,-g),v=Cee[8+g/3];return function(x){return m(y*x)+v}}return s(d,"formatPrefix"),{format:h,formatPrefix:d}}var Tee,Cee,kee=F(()=>{"use strict";Xx();mee();gee();oI();yee();xee();hI();bee();Tee=Array.prototype.map,Cee=["y","z","a","f","p","n","\xB5","m","","k","M","G","T","P","E","Z","Y"];s(fI,"default")});function pI(e){return rS=fI(e),pc=rS.format,nS=rS.formatPrefix,rS}var rS,pc,nS,wee=F(()=>{"use strict";kee();pI({thousands:",",grouping:[3],currency:["$",""]});s(pI,"defaultLocale")});function iS(e){return Math.max(0,-Cl(Math.abs(e)))}var See=F(()=>{"use strict";Xx();s(iS,"default")});function aS(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Cl(t)/3)))*3-Cl(Math.abs(e)))}var Eee=F(()=>{"use strict";Xx();s(aS,"default")});function sS(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,Cl(t)-Cl(e))+1}var Aee=F(()=>{"use strict";Xx();s(sS,"default")});var mI=F(()=>{"use strict";wee();oI();See();Eee();Aee()});var Ree=F(()=>{"use strict"});function FFe(e){var t=0,r=e.children,n=r&&r.length;if(!n)t=1;else for(;--n>=0;)t+=r[n].value;e.value=t}function gI(){return this.eachAfter(FFe)}var _ee=F(()=>{"use strict";s(FFe,"count");s(gI,"default")});function yI(e,t){let r=-1;for(let n of this)e.call(t,n,++r,this);return this}var Lee=F(()=>{"use strict";s(yI,"default")});function vI(e,t){for(var r=this,n=[r],i,a,o=-1;r=n.pop();)if(e.call(t,r,++o,this),i=r.children)for(a=i.length-1;a>=0;--a)n.push(i[a]);return this}var Dee=F(()=>{"use strict";s(vI,"default")});function xI(e,t){for(var r=this,n=[r],i=[],a,o,l,u=-1;r=n.pop();)if(i.push(r),a=r.children)for(o=0,l=a.length;o{"use strict";s(xI,"default")});function bI(e,t){let r=-1;for(let n of this)if(e.call(t,n,++r,this))return n}var Mee=F(()=>{"use strict";s(bI,"default")});function TI(e){return this.eachAfter(function(t){for(var r=+e(t.data)||0,n=t.children,i=n&&n.length;--i>=0;)r+=n[i].value;t.value=r})}var Nee=F(()=>{"use strict";s(TI,"default")});function CI(e){return this.eachBefore(function(t){t.children&&t.children.sort(e)})}var Pee=F(()=>{"use strict";s(CI,"default")});function kI(e){for(var t=this,r=GFe(t,e),n=[t];t!==r;)t=t.parent,n.push(t);for(var i=n.length;e!==r;)n.splice(i,0,e),e=e.parent;return n}function GFe(e,t){if(e===t)return e;var r=e.ancestors(),n=t.ancestors(),i=null;for(e=r.pop(),t=n.pop();e===t;)i=e,e=r.pop(),t=n.pop();return i}var Oee=F(()=>{"use strict";s(kI,"default");s(GFe,"leastCommonAncestor")});function wI(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t}var Bee=F(()=>{"use strict";s(wI,"default")});function SI(){return Array.from(this)}var $ee=F(()=>{"use strict";s(SI,"default")});function EI(){var e=[];return this.eachBefore(function(t){t.children||e.push(t)}),e}var Fee=F(()=>{"use strict";s(EI,"default")});function AI(){var e=this,t=[];return e.each(function(r){r!==e&&t.push({source:r.parent,target:r})}),t}var Gee=F(()=>{"use strict";s(AI,"default")});function*RI(){var e=this,t,r=[e],n,i,a;do for(t=r.reverse(),r=[];e=t.pop();)if(yield e,n=e.children)for(i=0,a=n.length;i{"use strict";s(RI,"default")});function A0(e,t){e instanceof Map?(e=[void 0,e],t===void 0&&(t=WFe)):t===void 0&&(t=VFe);for(var r=new Kx(e),n,i=[r],a,o,l,u;n=i.pop();)if((o=t(n.data))&&(u=(o=Array.from(o)).length))for(n.children=o,l=u-1;l>=0;--l)i.push(a=o[l]=new Kx(o[l])),a.parent=n,a.depth=n.depth+1;return r.eachBefore(HFe)}function zFe(){return A0(this).eachBefore(qFe)}function VFe(e){return e.children}function WFe(e){return Array.isArray(e)?e[1]:null}function qFe(e){e.data.value!==void 0&&(e.value=e.data.value),e.data=e.data.data}function HFe(e){var t=0;do e.height=t;while((e=e.parent)&&e.height<++t)}function Kx(e){this.data=e,this.depth=this.height=0,this.parent=null}var Vee=F(()=>{"use strict";_ee();Lee();Dee();Iee();Mee();Nee();Pee();Oee();Bee();$ee();Fee();Gee();zee();s(A0,"hierarchy");s(zFe,"node_copy");s(VFe,"objectChildren");s(WFe,"mapChildren");s(qFe,"copyData");s(HFe,"computeHeight");s(Kx,"Node");Kx.prototype=A0.prototype={constructor:Kx,count:gI,each:yI,eachAfter:xI,eachBefore:vI,find:bI,sum:TI,sort:CI,path:kI,ancestors:wI,descendants:SI,leaves:EI,links:AI,copy:zFe,[Symbol.iterator]:RI}});function Wee(e){if(typeof e!="function")throw new Error;return e}var qee=F(()=>{"use strict";s(Wee,"required")});function R0(){return 0}function kp(e){return function(){return e}}var Hee=F(()=>{"use strict";s(R0,"constantZero");s(kp,"default")});function _I(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)}var Uee=F(()=>{"use strict";s(_I,"default")});function LI(e,t,r,n,i){for(var a=e.children,o,l=-1,u=a.length,h=e.value&&(n-t)/e.value;++l{"use strict";s(LI,"default")});function DI(e,t,r,n,i){for(var a=e.children,o,l=-1,u=a.length,h=e.value&&(i-r)/e.value;++l{"use strict";s(DI,"default")});function YFe(e,t,r,n,i,a){for(var o=[],l=t.children,u,h,d=0,f=0,p=l.length,m,g,y=t.value,v,x,b,T,w,C,k;db&&(b=h),k=v*v*C,T=Math.max(b/k,k/x),T>w){v-=h;break}w=T}o.push(u={value:v,dice:m{"use strict";Yee();jee();UFe=(1+Math.sqrt(5))/2;s(YFe,"squarifyRatio");Xee=s((function e(t){function r(n,i,a,o,l){YFe(t,n,i,a,o,l)}return s(r,"squarify"),r.ratio=function(n){return e((n=+n)>1?n:1)},r}),"custom")(UFe)});function oS(){var e=Xee,t=!1,r=1,n=1,i=[0],a=R0,o=R0,l=R0,u=R0,h=R0;function d(p){return p.x0=p.y0=0,p.x1=r,p.y1=n,p.eachBefore(f),i=[0],t&&p.eachBefore(_I),p}s(d,"treemap");function f(p){var m=i[p.depth],g=p.x0+m,y=p.y0+m,v=p.x1-m,x=p.y1-m;v{"use strict";Uee();Kee();qee();Hee();s(oS,"default")});var Qee=F(()=>{"use strict";Vee();Zee()});var Jee=F(()=>{"use strict"});var ete=F(()=>{"use strict"});function ad(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}var Zx=F(()=>{"use strict";s(ad,"initRange")});function go(){var e=new f0,t=[],r=[],n=II;function i(a){let o=e.get(a);if(o===void 0){if(n!==II)return n;e.set(a,o=t.push(a)-1)}return r[o%r.length]}return s(i,"scale"),i.domain=function(a){if(!arguments.length)return t.slice();t=[],e=new f0;for(let o of a)e.has(o)||e.set(o,t.push(o)-1);return i},i.range=function(a){return arguments.length?(r=Array.from(a),i):r.slice()},i.unknown=function(a){return arguments.length?(n=a,i):n},i.copy=function(){return go(t,r).unknown(n)},ad.apply(i,arguments),i}var II,MI=F(()=>{"use strict";Qh();Zx();II=Symbol("implicit");s(go,"ordinal")});function _0(){var e=go().unknown(void 0),t=e.domain,r=e.range,n=0,i=1,a,o,l=!1,u=0,h=0,d=.5;delete e.unknown;function f(){var p=t().length,m=i{"use strict";Qh();Zx();MI();s(_0,"band")});function NI(e){return function(){return e}}var rte=F(()=>{"use strict";s(NI,"constants")});function PI(e){return+e}var nte=F(()=>{"use strict";s(PI,"number")});function L0(e){return e}function OI(e,t){return(t-=e=+e)?function(r){return(r-e)/t}:NI(isNaN(t)?NaN:.5)}function jFe(e,t){var r;return e>t&&(r=e,e=t,t=r),function(n){return Math.max(e,Math.min(t,n))}}function XFe(e,t,r){var n=e[0],i=e[1],a=t[0],o=t[1];return i2?KFe:XFe,u=h=null,f}s(d,"rescale");function f(p){return p==null||isNaN(p=+p)?a:(u||(u=l(e.map(n),t,r)))(n(o(p)))}return s(f,"scale"),f.invert=function(p){return o(i((h||(h=l(t,e.map(n),la)))(p)))},f.domain=function(p){return arguments.length?(e=Array.from(p,PI),d()):e.slice()},f.range=function(p){return arguments.length?(t=Array.from(p),d()):t.slice()},f.rangeRound=function(p){return t=Array.from(p),r=$w,d()},f.clamp=function(p){return arguments.length?(o=p?!0:L0,d()):o!==L0},f.interpolate=function(p){return arguments.length?(r=p,d()):r},f.unknown=function(p){return arguments.length?(a=p,f):a},function(p,m){return n=p,i=m,d()}}function Qx(){return ZFe()(L0,L0)}var ite,BI=F(()=>{"use strict";Qh();w0();rte();nte();ite=[0,1];s(L0,"identity");s(OI,"normalize");s(jFe,"clamper");s(XFe,"bimap");s(KFe,"polymap");s(lS,"copy");s(ZFe,"transformer");s(Qx,"continuous")});function $I(e,t,r,n){var i=p0(e,t,r),a;switch(n=id(n??",f"),n.type){case"s":{var o=Math.max(Math.abs(e),Math.abs(t));return n.precision==null&&!isNaN(a=aS(i,o))&&(n.precision=a),nS(n,o)}case"":case"e":case"g":case"p":case"r":{n.precision==null&&!isNaN(a=sS(i,Math.max(Math.abs(e),Math.abs(t))))&&(n.precision=a-(n.type==="e"));break}case"f":case"%":{n.precision==null&&!isNaN(a=iS(i))&&(n.precision=a-(n.type==="%")*2);break}}return pc(n)}var ate=F(()=>{"use strict";Qh();mI();s($I,"tickFormat")});function QFe(e){var t=e.domain;return e.ticks=function(r){var n=t();return Tw(n[0],n[n.length-1],r??10)},e.tickFormat=function(r,n){var i=t();return $I(i[0],i[i.length-1],r??10,n)},e.nice=function(r){r==null&&(r=10);var n=t(),i=0,a=n.length-1,o=n[i],l=n[a],u,h,d=10;for(l0;){if(h=Ex(o,l,r),h===u)return n[i]=o,n[a]=l,t(n);if(h>0)o=Math.floor(o/h)*h,l=Math.ceil(l/h)*h;else if(h<0)o=Math.ceil(o*h)/h,l=Math.floor(l*h)/h;else break;u=h}return e},e}function kl(){var e=Qx();return e.copy=function(){return lS(e,kl())},ad.apply(e,arguments),QFe(e)}var ste=F(()=>{"use strict";Qh();BI();Zx();ate();s(QFe,"linearish");s(kl,"linear")});function FI(e,t){e=e.slice();var r=0,n=e.length-1,i=e[r],a=e[n],o;return a{"use strict";s(FI,"nice")});function Bn(e,t,r,n){function i(a){return e(a=arguments.length===0?new Date:new Date(+a)),a}return s(i,"interval"),i.floor=a=>(e(a=new Date(+a)),a),i.ceil=a=>(e(a=new Date(a-1)),t(a,1),e(a),a),i.round=a=>{let o=i(a),l=i.ceil(a);return a-o(t(a=new Date(+a),o==null?1:Math.floor(o)),a),i.range=(a,o,l)=>{let u=[];if(a=i.ceil(a),l=l==null?1:Math.floor(l),!(a0))return u;let h;do u.push(h=new Date(+a)),t(a,l),e(a);while(hBn(o=>{if(o>=o)for(;e(o),!a(o);)o.setTime(o-1)},(o,l)=>{if(o>=o)if(l<0)for(;++l<=0;)for(;t(o,-1),!a(o););else for(;--l>=0;)for(;t(o,1),!a(o););}),r&&(i.count=(a,o)=>(GI.setTime(+a),zI.setTime(+o),e(GI),e(zI),Math.floor(r(GI,zI))),i.every=a=>(a=Math.floor(a),!isFinite(a)||!(a>0)?null:a>1?i.filter(n?o=>n(o)%a===0:o=>i.count(0,o)%a===0):i)),i}var GI,zI,Iu=F(()=>{"use strict";GI=new Date,zI=new Date;s(Bn,"timeInterval")});var mc,lte,VI=F(()=>{"use strict";Iu();mc=Bn(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);mc.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?Bn(t=>{t.setTime(Math.floor(t/e)*e)},(t,r)=>{t.setTime(+t+r*e)},(t,r)=>(r-t)/e):mc);lte=mc.range});var yo,cte,WI=F(()=>{"use strict";Iu();yo=Bn(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*1e3)},(e,t)=>(t-e)/1e3,e=>e.getUTCSeconds()),cte=yo.range});var Mu,JFe,cS,eGe,qI=F(()=>{"use strict";Iu();Mu=Bn(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*1e3)},(e,t)=>{e.setTime(+e+t*6e4)},(e,t)=>(t-e)/6e4,e=>e.getMinutes()),JFe=Mu.range,cS=Bn(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*6e4)},(e,t)=>(t-e)/6e4,e=>e.getUTCMinutes()),eGe=cS.range});var Nu,tGe,uS,rGe,HI=F(()=>{"use strict";Iu();Nu=Bn(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*1e3-e.getMinutes()*6e4)},(e,t)=>{e.setTime(+e+t*36e5)},(e,t)=>(t-e)/36e5,e=>e.getHours()),tGe=Nu.range,uS=Bn(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*36e5)},(e,t)=>(t-e)/36e5,e=>e.getUTCHours()),rGe=uS.range});var zo,nGe,eb,iGe,hS,aGe,UI=F(()=>{"use strict";Iu();zo=Bn(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*6e4)/864e5,e=>e.getDate()-1),nGe=zo.range,eb=Bn(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/864e5,e=>e.getUTCDate()-1),iGe=eb.range,hS=Bn(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/864e5,e=>Math.floor(e/864e5)),aGe=hS.range});function Ep(e){return Bn(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,r)=>{t.setDate(t.getDate()+r*7)},(t,r)=>(r-t-(r.getTimezoneOffset()-t.getTimezoneOffset())*6e4)/6048e5)}function Ap(e){return Bn(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,r)=>{t.setUTCDate(t.getUTCDate()+r*7)},(t,r)=>(r-t)/6048e5)}var wl,sd,dS,fS,yc,pS,mS,hte,sGe,oGe,lGe,cGe,uGe,hGe,Rp,D0,dte,fte,od,pte,mte,gte,dGe,fGe,pGe,mGe,gGe,yGe,YI=F(()=>{"use strict";Iu();s(Ep,"timeWeekday");wl=Ep(0),sd=Ep(1),dS=Ep(2),fS=Ep(3),yc=Ep(4),pS=Ep(5),mS=Ep(6),hte=wl.range,sGe=sd.range,oGe=dS.range,lGe=fS.range,cGe=yc.range,uGe=pS.range,hGe=mS.range;s(Ap,"utcWeekday");Rp=Ap(0),D0=Ap(1),dte=Ap(2),fte=Ap(3),od=Ap(4),pte=Ap(5),mte=Ap(6),gte=Rp.range,dGe=D0.range,fGe=dte.range,pGe=fte.range,mGe=od.range,gGe=pte.range,yGe=mte.range});var Pu,vGe,gS,xGe,jI=F(()=>{"use strict";Iu();Pu=Bn(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth()),vGe=Pu.range,gS=Bn(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth()),xGe=gS.range});var vo,bGe,Sl,TGe,XI=F(()=>{"use strict";Iu();vo=Bn(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());vo.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Bn(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,r)=>{t.setFullYear(t.getFullYear()+r*e)});bGe=vo.range,Sl=Bn(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());Sl.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Bn(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,r)=>{t.setUTCFullYear(t.getUTCFullYear()+r*e)});TGe=Sl.range});function vte(e,t,r,n,i,a){let o=[[yo,1,1e3],[yo,5,5*1e3],[yo,15,15*1e3],[yo,30,30*1e3],[a,1,6e4],[a,5,5*6e4],[a,15,15*6e4],[a,30,30*6e4],[i,1,36e5],[i,3,3*36e5],[i,6,6*36e5],[i,12,12*36e5],[n,1,864e5],[n,2,2*864e5],[r,1,6048e5],[t,1,2592e6],[t,3,3*2592e6],[e,1,31536e6]];function l(h,d,f){let p=dv).right(o,p);if(m===o.length)return e.every(p0(h/31536e6,d/31536e6,f));if(m===0)return mc.every(Math.max(p0(h,d,f),1));let[g,y]=o[p/o[m-1][2]{"use strict";Qh();VI();WI();qI();HI();UI();YI();jI();XI();s(vte,"ticker");[kGe,wGe]=vte(Sl,gS,Rp,hS,uS,cS),[KI,ZI]=vte(vo,Pu,wl,zo,Nu,Mu)});var yS=F(()=>{"use strict";VI();WI();qI();HI();UI();YI();jI();XI();xte()});function QI(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function JI(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function tb(e,t,r){return{y:e,m:t,d:r,H:0,M:0,S:0,L:0}}function eM(e){var t=e.dateTime,r=e.date,n=e.time,i=e.periods,a=e.days,o=e.shortDays,l=e.months,u=e.shortMonths,h=rb(i),d=nb(i),f=rb(a),p=nb(a),m=rb(o),g=nb(o),y=rb(l),v=nb(l),x=rb(u),b=nb(u),T={a:B,A:O,b:$,B:G,c:null,d:Ste,e:Ste,f:YGe,g:nze,G:aze,H:qGe,I:HGe,j:UGe,L:Lte,m:jGe,M:XGe,p:V,q:z,Q:Rte,s:_te,S:KGe,u:ZGe,U:QGe,V:JGe,w:eze,W:tze,x:null,X:null,y:rze,Y:ize,Z:sze,"%":Ate},w={a:W,A:H,b:j,B:Q,c:null,d:Ete,e:Ete,f:uze,g:bze,G:Cze,H:oze,I:lze,j:cze,L:Ite,m:hze,M:dze,p:U,q:ue,Q:Rte,s:_te,S:fze,u:pze,U:mze,V:gze,w:yze,W:vze,x:null,X:null,y:xze,Y:Tze,Z:kze,"%":Ate},C={a:N,A:D,b:R,B:E,c:I,d:kte,e:kte,f:GGe,g:Cte,G:Tte,H:wte,I:wte,j:OGe,L:FGe,m:PGe,M:BGe,p:M,q:NGe,Q:VGe,s:WGe,S:$Ge,u:_Ge,U:LGe,V:DGe,w:RGe,W:IGe,x:L,X:P,y:Cte,Y:Tte,Z:MGe,"%":zGe};T.x=k(r,T),T.X=k(n,T),T.c=k(t,T),w.x=k(r,w),w.X=k(n,w),w.c=k(t,w);function k(J,he){return function(se){var oe=[],Se=-1,xe=0,Ne=J.length,Ye,We,pe;for(se instanceof Date||(se=new Date(+se));++Se53)return null;"w"in oe||(oe.w=1),"Z"in oe?(xe=JI(tb(oe.y,0,1)),Ne=xe.getUTCDay(),xe=Ne>4||Ne===0?D0.ceil(xe):D0(xe),xe=eb.offset(xe,(oe.V-1)*7),oe.y=xe.getUTCFullYear(),oe.m=xe.getUTCMonth(),oe.d=xe.getUTCDate()+(oe.w+6)%7):(xe=QI(tb(oe.y,0,1)),Ne=xe.getDay(),xe=Ne>4||Ne===0?sd.ceil(xe):sd(xe),xe=zo.offset(xe,(oe.V-1)*7),oe.y=xe.getFullYear(),oe.m=xe.getMonth(),oe.d=xe.getDate()+(oe.w+6)%7)}else("W"in oe||"U"in oe)&&("w"in oe||(oe.w="u"in oe?oe.u%7:"W"in oe?1:0),Ne="Z"in oe?JI(tb(oe.y,0,1)).getUTCDay():QI(tb(oe.y,0,1)).getDay(),oe.m=0,oe.d="W"in oe?(oe.w+6)%7+oe.W*7-(Ne+5)%7:oe.w+oe.U*7-(Ne+6)%7);return"Z"in oe?(oe.H+=oe.Z/100|0,oe.M+=oe.Z%100,JI(oe)):QI(oe)}}s(S,"newParse");function A(J,he,se,oe){for(var Se=0,xe=he.length,Ne=se.length,Ye,We;Se=Ne)return-1;if(Ye=he.charCodeAt(Se++),Ye===37){if(Ye=he.charAt(Se++),We=C[Ye in bte?he.charAt(Se++):Ye],!We||(oe=We(J,se,oe))<0)return-1}else if(Ye!=se.charCodeAt(oe++))return-1}return oe}s(A,"parseSpecifier");function M(J,he,se){var oe=h.exec(he.slice(se));return oe?(J.p=d.get(oe[0].toLowerCase()),se+oe[0].length):-1}s(M,"parsePeriod");function N(J,he,se){var oe=m.exec(he.slice(se));return oe?(J.w=g.get(oe[0].toLowerCase()),se+oe[0].length):-1}s(N,"parseShortWeekday");function D(J,he,se){var oe=f.exec(he.slice(se));return oe?(J.w=p.get(oe[0].toLowerCase()),se+oe[0].length):-1}s(D,"parseWeekday");function R(J,he,se){var oe=x.exec(he.slice(se));return oe?(J.m=b.get(oe[0].toLowerCase()),se+oe[0].length):-1}s(R,"parseShortMonth");function E(J,he,se){var oe=y.exec(he.slice(se));return oe?(J.m=v.get(oe[0].toLowerCase()),se+oe[0].length):-1}s(E,"parseMonth");function I(J,he,se){return A(J,t,he,se)}s(I,"parseLocaleDateTime");function L(J,he,se){return A(J,r,he,se)}s(L,"parseLocaleDate");function P(J,he,se){return A(J,n,he,se)}s(P,"parseLocaleTime");function B(J){return o[J.getDay()]}s(B,"formatShortWeekday");function O(J){return a[J.getDay()]}s(O,"formatWeekday");function $(J){return u[J.getMonth()]}s($,"formatShortMonth");function G(J){return l[J.getMonth()]}s(G,"formatMonth");function V(J){return i[+(J.getHours()>=12)]}s(V,"formatPeriod");function z(J){return 1+~~(J.getMonth()/3)}s(z,"formatQuarter");function W(J){return o[J.getUTCDay()]}s(W,"formatUTCShortWeekday");function H(J){return a[J.getUTCDay()]}s(H,"formatUTCWeekday");function j(J){return u[J.getUTCMonth()]}s(j,"formatUTCShortMonth");function Q(J){return l[J.getUTCMonth()]}s(Q,"formatUTCMonth");function U(J){return i[+(J.getUTCHours()>=12)]}s(U,"formatUTCPeriod");function ue(J){return 1+~~(J.getUTCMonth()/3)}return s(ue,"formatUTCQuarter"),{format:s(function(J){var he=k(J+="",T);return he.toString=function(){return J},he},"format"),parse:s(function(J){var he=S(J+="",!1);return he.toString=function(){return J},he},"parse"),utcFormat:s(function(J){var he=k(J+="",w);return he.toString=function(){return J},he},"utcFormat"),utcParse:s(function(J){var he=S(J+="",!0);return he.toString=function(){return J},he},"utcParse")}}function cn(e,t,r){var n=e<0?"-":"",i=(n?-e:e)+"",a=i.length;return n+(a[t.toLowerCase(),r]))}function RGe(e,t,r){var n=ca.exec(t.slice(r,r+1));return n?(e.w=+n[0],r+n[0].length):-1}function _Ge(e,t,r){var n=ca.exec(t.slice(r,r+1));return n?(e.u=+n[0],r+n[0].length):-1}function LGe(e,t,r){var n=ca.exec(t.slice(r,r+2));return n?(e.U=+n[0],r+n[0].length):-1}function DGe(e,t,r){var n=ca.exec(t.slice(r,r+2));return n?(e.V=+n[0],r+n[0].length):-1}function IGe(e,t,r){var n=ca.exec(t.slice(r,r+2));return n?(e.W=+n[0],r+n[0].length):-1}function Tte(e,t,r){var n=ca.exec(t.slice(r,r+4));return n?(e.y=+n[0],r+n[0].length):-1}function Cte(e,t,r){var n=ca.exec(t.slice(r,r+2));return n?(e.y=+n[0]+(+n[0]>68?1900:2e3),r+n[0].length):-1}function MGe(e,t,r){var n=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(r,r+6));return n?(e.Z=n[1]?0:-(n[2]+(n[3]||"00")),r+n[0].length):-1}function NGe(e,t,r){var n=ca.exec(t.slice(r,r+1));return n?(e.q=n[0]*3-3,r+n[0].length):-1}function PGe(e,t,r){var n=ca.exec(t.slice(r,r+2));return n?(e.m=n[0]-1,r+n[0].length):-1}function kte(e,t,r){var n=ca.exec(t.slice(r,r+2));return n?(e.d=+n[0],r+n[0].length):-1}function OGe(e,t,r){var n=ca.exec(t.slice(r,r+3));return n?(e.m=0,e.d=+n[0],r+n[0].length):-1}function wte(e,t,r){var n=ca.exec(t.slice(r,r+2));return n?(e.H=+n[0],r+n[0].length):-1}function BGe(e,t,r){var n=ca.exec(t.slice(r,r+2));return n?(e.M=+n[0],r+n[0].length):-1}function $Ge(e,t,r){var n=ca.exec(t.slice(r,r+2));return n?(e.S=+n[0],r+n[0].length):-1}function FGe(e,t,r){var n=ca.exec(t.slice(r,r+3));return n?(e.L=+n[0],r+n[0].length):-1}function GGe(e,t,r){var n=ca.exec(t.slice(r,r+6));return n?(e.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function zGe(e,t,r){var n=SGe.exec(t.slice(r,r+1));return n?r+n[0].length:-1}function VGe(e,t,r){var n=ca.exec(t.slice(r));return n?(e.Q=+n[0],r+n[0].length):-1}function WGe(e,t,r){var n=ca.exec(t.slice(r));return n?(e.s=+n[0],r+n[0].length):-1}function Ste(e,t){return cn(e.getDate(),t,2)}function qGe(e,t){return cn(e.getHours(),t,2)}function HGe(e,t){return cn(e.getHours()%12||12,t,2)}function UGe(e,t){return cn(1+zo.count(vo(e),e),t,3)}function Lte(e,t){return cn(e.getMilliseconds(),t,3)}function YGe(e,t){return Lte(e,t)+"000"}function jGe(e,t){return cn(e.getMonth()+1,t,2)}function XGe(e,t){return cn(e.getMinutes(),t,2)}function KGe(e,t){return cn(e.getSeconds(),t,2)}function ZGe(e){var t=e.getDay();return t===0?7:t}function QGe(e,t){return cn(wl.count(vo(e)-1,e),t,2)}function Dte(e){var t=e.getDay();return t>=4||t===0?yc(e):yc.ceil(e)}function JGe(e,t){return e=Dte(e),cn(yc.count(vo(e),e)+(vo(e).getDay()===4),t,2)}function eze(e){return e.getDay()}function tze(e,t){return cn(sd.count(vo(e)-1,e),t,2)}function rze(e,t){return cn(e.getFullYear()%100,t,2)}function nze(e,t){return e=Dte(e),cn(e.getFullYear()%100,t,2)}function ize(e,t){return cn(e.getFullYear()%1e4,t,4)}function aze(e,t){var r=e.getDay();return e=r>=4||r===0?yc(e):yc.ceil(e),cn(e.getFullYear()%1e4,t,4)}function sze(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+cn(t/60|0,"0",2)+cn(t%60,"0",2)}function Ete(e,t){return cn(e.getUTCDate(),t,2)}function oze(e,t){return cn(e.getUTCHours(),t,2)}function lze(e,t){return cn(e.getUTCHours()%12||12,t,2)}function cze(e,t){return cn(1+eb.count(Sl(e),e),t,3)}function Ite(e,t){return cn(e.getUTCMilliseconds(),t,3)}function uze(e,t){return Ite(e,t)+"000"}function hze(e,t){return cn(e.getUTCMonth()+1,t,2)}function dze(e,t){return cn(e.getUTCMinutes(),t,2)}function fze(e,t){return cn(e.getUTCSeconds(),t,2)}function pze(e){var t=e.getUTCDay();return t===0?7:t}function mze(e,t){return cn(Rp.count(Sl(e)-1,e),t,2)}function Mte(e){var t=e.getUTCDay();return t>=4||t===0?od(e):od.ceil(e)}function gze(e,t){return e=Mte(e),cn(od.count(Sl(e),e)+(Sl(e).getUTCDay()===4),t,2)}function yze(e){return e.getUTCDay()}function vze(e,t){return cn(D0.count(Sl(e)-1,e),t,2)}function xze(e,t){return cn(e.getUTCFullYear()%100,t,2)}function bze(e,t){return e=Mte(e),cn(e.getUTCFullYear()%100,t,2)}function Tze(e,t){return cn(e.getUTCFullYear()%1e4,t,4)}function Cze(e,t){var r=e.getUTCDay();return e=r>=4||r===0?od(e):od.ceil(e),cn(e.getUTCFullYear()%1e4,t,4)}function kze(){return"+0000"}function Ate(){return"%"}function Rte(e){return+e}function _te(e){return Math.floor(+e/1e3)}var bte,ca,SGe,EGe,Nte=F(()=>{"use strict";yS();s(QI,"localDate");s(JI,"utcDate");s(tb,"newDate");s(eM,"formatLocale");bte={"-":"",_:" ",0:"0"},ca=/^\s*\d+/,SGe=/^%/,EGe=/[\\^$*+?|[\]().{}]/g;s(cn,"pad");s(AGe,"requote");s(rb,"formatRe");s(nb,"formatLookup");s(RGe,"parseWeekdayNumberSunday");s(_Ge,"parseWeekdayNumberMonday");s(LGe,"parseWeekNumberSunday");s(DGe,"parseWeekNumberISO");s(IGe,"parseWeekNumberMonday");s(Tte,"parseFullYear");s(Cte,"parseYear");s(MGe,"parseZone");s(NGe,"parseQuarter");s(PGe,"parseMonthNumber");s(kte,"parseDayOfMonth");s(OGe,"parseDayOfYear");s(wte,"parseHour24");s(BGe,"parseMinutes");s($Ge,"parseSeconds");s(FGe,"parseMilliseconds");s(GGe,"parseMicroseconds");s(zGe,"parseLiteralPercent");s(VGe,"parseUnixTimestamp");s(WGe,"parseUnixTimestampSeconds");s(Ste,"formatDayOfMonth");s(qGe,"formatHour24");s(HGe,"formatHour12");s(UGe,"formatDayOfYear");s(Lte,"formatMilliseconds");s(YGe,"formatMicroseconds");s(jGe,"formatMonthNumber");s(XGe,"formatMinutes");s(KGe,"formatSeconds");s(ZGe,"formatWeekdayNumberMonday");s(QGe,"formatWeekNumberSunday");s(Dte,"dISO");s(JGe,"formatWeekNumberISO");s(eze,"formatWeekdayNumberSunday");s(tze,"formatWeekNumberMonday");s(rze,"formatYear");s(nze,"formatYearISO");s(ize,"formatFullYear");s(aze,"formatFullYearISO");s(sze,"formatZone");s(Ete,"formatUTCDayOfMonth");s(oze,"formatUTCHour24");s(lze,"formatUTCHour12");s(cze,"formatUTCDayOfYear");s(Ite,"formatUTCMilliseconds");s(uze,"formatUTCMicroseconds");s(hze,"formatUTCMonthNumber");s(dze,"formatUTCMinutes");s(fze,"formatUTCSeconds");s(pze,"formatUTCWeekdayNumberMonday");s(mze,"formatUTCWeekNumberSunday");s(Mte,"UTCdISO");s(gze,"formatUTCWeekNumberISO");s(yze,"formatUTCWeekdayNumberSunday");s(vze,"formatUTCWeekNumberMonday");s(xze,"formatUTCYear");s(bze,"formatUTCYearISO");s(Tze,"formatUTCFullYear");s(Cze,"formatUTCFullYearISO");s(kze,"formatUTCZone");s(Ate,"formatLiteralPercent");s(Rte,"formatUnixTimestamp");s(_te,"formatUnixTimestampSeconds")});function tM(e){return I0=eM(e),_p=I0.format,Pte=I0.parse,Ote=I0.utcFormat,Bte=I0.utcParse,I0}var I0,_p,Pte,Ote,Bte,$te=F(()=>{"use strict";Nte();tM({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"]});s(tM,"defaultLocale")});var rM=F(()=>{"use strict";$te()});function wze(e){return new Date(e)}function Sze(e){return e instanceof Date?+e:+new Date(+e)}function Fte(e,t,r,n,i,a,o,l,u,h){var d=Qx(),f=d.invert,p=d.domain,m=h(".%L"),g=h(":%S"),y=h("%I:%M"),v=h("%I %p"),x=h("%a %d"),b=h("%b %d"),T=h("%B"),w=h("%Y");function C(k){return(u(k){"use strict";yS();rM();BI();Zx();ote();s(wze,"date");s(Sze,"number");s(Fte,"calendar");s(vS,"time")});var zte=F(()=>{"use strict";tte();ste();MI();Gte()});function nM(e){for(var t=e.length/6|0,r=new Array(t),n=0;n{"use strict";s(nM,"default")});var iM,Wte=F(()=>{"use strict";Vte();iM=nM("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab")});var qte=F(()=>{"use strict";Wte()});function Xn(e){return s(function(){return e},"constant")}var xS=F(()=>{"use strict";s(Xn,"default")});function Ute(e){return e>1?0:e<-1?M0:Math.acos(e)}function sM(e){return e>=1?ib:e<=-1?-ib:Math.asin(e)}var aM,Aa,ld,Hte,bS,El,Lp,ua,M0,ib,N0,TS=F(()=>{"use strict";aM=Math.abs,Aa=Math.atan2,ld=Math.cos,Hte=Math.max,bS=Math.min,El=Math.sin,Lp=Math.sqrt,ua=1e-12,M0=Math.PI,ib=M0/2,N0=2*M0;s(Ute,"acos");s(sM,"asin")});function CS(e){let t=3;return e.digits=function(r){if(!arguments.length)return t;if(r==null)t=null;else{let n=Math.floor(r);if(!(n>=0))throw new RangeError(`invalid digits: ${r}`);t=n}return e},()=>new Tp(t)}var oM=F(()=>{"use strict";nI();s(CS,"withPath")});function Eze(e){return e.innerRadius}function Aze(e){return e.outerRadius}function Rze(e){return e.startAngle}function _ze(e){return e.endAngle}function Lze(e){return e&&e.padAngle}function Dze(e,t,r,n,i,a,o,l){var u=r-e,h=n-t,d=o-i,f=l-a,p=f*u-d*h;if(!(p*pI*I+L*L&&(A=N,M=D),{cx:A,cy:M,x01:-d,y01:-f,x11:A*(i/C-1),y11:M*(i/C-1)}}function Al(){var e=Eze,t=Aze,r=Xn(0),n=null,i=Rze,a=_ze,o=Lze,l=null,u=CS(h);function h(){var d,f,p=+e.apply(this,arguments),m=+t.apply(this,arguments),g=i.apply(this,arguments)-ib,y=a.apply(this,arguments)-ib,v=aM(y-g),x=y>g;if(l||(l=d=u()),mua))l.moveTo(0,0);else if(v>N0-ua)l.moveTo(m*ld(g),m*El(g)),l.arc(0,0,m,g,y,!x),p>ua&&(l.moveTo(p*ld(y),p*El(y)),l.arc(0,0,p,y,g,x));else{var b=g,T=y,w=g,C=y,k=v,S=v,A=o.apply(this,arguments)/2,M=A>ua&&(n?+n.apply(this,arguments):Lp(p*p+m*m)),N=bS(aM(m-p)/2,+r.apply(this,arguments)),D=N,R=N,E,I;if(M>ua){var L=sM(M/p*El(A)),P=sM(M/m*El(A));(k-=L*2)>ua?(L*=x?1:-1,w+=L,C-=L):(k=0,w=C=(g+y)/2),(S-=P*2)>ua?(P*=x?1:-1,b+=P,T-=P):(S=0,b=T=(g+y)/2)}var B=m*ld(b),O=m*El(b),$=p*ld(C),G=p*El(C);if(N>ua){var V=m*ld(T),z=m*El(T),W=p*ld(w),H=p*El(w),j;if(vua?R>ua?(E=kS(W,H,B,O,m,R,x),I=kS(V,z,$,G,m,R,x),l.moveTo(E.cx+E.x01,E.cy+E.y01),Rua)||!(k>ua)?l.lineTo($,G):D>ua?(E=kS($,G,V,z,p,-D,x),I=kS(B,O,W,H,p,-D,x),l.lineTo(E.cx+E.x01,E.cy+E.y01),D{"use strict";xS();TS();oM();s(Eze,"arcInnerRadius");s(Aze,"arcOuterRadius");s(Rze,"arcStartAngle");s(_ze,"arcEndAngle");s(Lze,"arcPadAngle");s(Dze,"intersect");s(kS,"cornerTangents");s(Al,"default")});function ab(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}var nGt,lM=F(()=>{"use strict";nGt=Array.prototype.slice;s(ab,"default")});function jte(e){this._context=e}function vc(e){return new jte(e)}var cM=F(()=>{"use strict";s(jte,"Linear");jte.prototype={areaStart:s(function(){this._line=0},"areaStart"),areaEnd:s(function(){this._line=NaN},"areaEnd"),lineStart:s(function(){this._point=0},"lineStart"),lineEnd:s(function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},"lineEnd"),point:s(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}},"point")};s(vc,"default")});function Xte(e){return e[0]}function Kte(e){return e[1]}var Zte=F(()=>{"use strict";s(Xte,"x");s(Kte,"y")});function Ou(e,t){var r=Xn(!0),n=null,i=vc,a=null,o=CS(l);e=typeof e=="function"?e:e===void 0?Xte:Xn(e),t=typeof t=="function"?t:t===void 0?Kte:Xn(t);function l(u){var h,d=(u=ab(u)).length,f,p=!1,m;for(n==null&&(a=i(m=o())),h=0;h<=d;++h)!(h{"use strict";lM();xS();cM();oM();Zte();s(Ou,"default")});function uM(e,t){return te?1:t>=e?0:NaN}var Jte=F(()=>{"use strict";s(uM,"default")});function hM(e){return e}var ere=F(()=>{"use strict";s(hM,"default")});function wS(){var e=hM,t=uM,r=null,n=Xn(0),i=Xn(N0),a=Xn(0);function o(l){var u,h=(l=ab(l)).length,d,f,p=0,m=new Array(h),g=new Array(h),y=+n.apply(this,arguments),v=Math.min(N0,Math.max(-N0,i.apply(this,arguments)-y)),x,b=Math.min(Math.abs(v)/h,a.apply(this,arguments)),T=b*(v<0?-1:1),w;for(u=0;u0&&(p+=w);for(t!=null?m.sort(function(C,k){return t(g[C],g[k])}):r!=null&&m.sort(function(C,k){return r(l[C],l[k])}),u=0,f=p?(v-h*T)/p:0;u0?w*f:0)+T,g[d]={data:l[d],index:u,value:w,startAngle:y,endAngle:x,padAngle:b};return g}return s(o,"pie"),o.value=function(l){return arguments.length?(e=typeof l=="function"?l:Xn(+l),o):e},o.sortValues=function(l){return arguments.length?(t=l,r=null,o):t},o.sort=function(l){return arguments.length?(r=l,t=null,o):r},o.startAngle=function(l){return arguments.length?(n=typeof l=="function"?l:Xn(+l),o):n},o.endAngle=function(l){return arguments.length?(i=typeof l=="function"?l:Xn(+l),o):i},o.padAngle=function(l){return arguments.length?(a=typeof l=="function"?l:Xn(+l),o):a},o}var tre=F(()=>{"use strict";lM();xS();Jte();ere();TS();s(wS,"default")});function sb(e){return new SS(e,!0)}function ob(e){return new SS(e,!1)}var SS,rre=F(()=>{"use strict";SS=class{static{s(this,"Bump")}constructor(t,r){this._context=t,this._x=r}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(t,r){switch(t=+t,r=+r,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,r):this._context.moveTo(t,r);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,r,t,r):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+r)/2,t,this._y0,t,r);break}}this._x0=t,this._y0=r}};s(sb,"bumpX");s(ob,"bumpY")});function xo(){}var lb=F(()=>{"use strict";s(xo,"default")});function P0(e,t,r){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+r)/6)}function cb(e){this._context=e}function Bu(e){return new cb(e)}var ub=F(()=>{"use strict";s(P0,"point");s(cb,"Basis");cb.prototype={areaStart:s(function(){this._line=0},"areaStart"),areaEnd:s(function(){this._line=NaN},"areaEnd"),lineStart:s(function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},"lineStart"),lineEnd:s(function(){switch(this._point){case 3:P0(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},"lineEnd"),point:s(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;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:P0(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t},"point")};s(Bu,"default")});function nre(e){this._context=e}function ES(e){return new nre(e)}var ire=F(()=>{"use strict";lb();ub();s(nre,"BasisClosed");nre.prototype={areaStart:xo,areaEnd:xo,lineStart:s(function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},"lineStart"),lineEnd:s(function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},"lineEnd"),point:s(function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:P0(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t},"point")};s(ES,"default")});function are(e){this._context=e}function AS(e){return new are(e)}var sre=F(()=>{"use strict";ub();s(are,"BasisOpen");are.prototype={areaStart:s(function(){this._line=0},"areaStart"),areaEnd:s(function(){this._line=NaN},"areaEnd"),lineStart:s(function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},"lineStart"),lineEnd:s(function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},"lineEnd"),point:s(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;var r=(this._x0+4*this._x1+e)/6,n=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(r,n):this._context.moveTo(r,n);break;case 3:this._point=4;default:P0(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t},"point")};s(AS,"default")});function ore(e,t){this._basis=new cb(e),this._beta=t}var dM,lre=F(()=>{"use strict";ub();s(ore,"Bundle");ore.prototype={lineStart:s(function(){this._x=[],this._y=[],this._basis.lineStart()},"lineStart"),lineEnd:s(function(){var e=this._x,t=this._y,r=e.length-1;if(r>0)for(var n=e[0],i=t[0],a=e[r]-n,o=t[r]-i,l=-1,u;++l<=r;)u=l/r,this._basis.point(this._beta*e[l]+(1-this._beta)*(n+u*a),this._beta*t[l]+(1-this._beta)*(i+u*o));this._x=this._y=null,this._basis.lineEnd()},"lineEnd"),point:s(function(e,t){this._x.push(+e),this._y.push(+t)},"point")};dM=s((function e(t){function r(n){return t===1?new cb(n):new ore(n,t)}return s(r,"bundle"),r.beta=function(n){return e(+n)},r}),"custom")(.85)});function O0(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 RS(e,t){this._context=e,this._k=(1-t)/6}var hb,db=F(()=>{"use strict";s(O0,"point");s(RS,"Cardinal");RS.prototype={areaStart:s(function(){this._line=0},"areaStart"),areaEnd:s(function(){this._line=NaN},"areaEnd"),lineStart:s(function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},"lineStart"),lineEnd:s(function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:O0(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},"lineEnd"),point:s(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:O0(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},"point")};hb=s((function e(t){function r(n){return new RS(n,t)}return s(r,"cardinal"),r.tension=function(n){return e(+n)},r}),"custom")(0)});function _S(e,t){this._context=e,this._k=(1-t)/6}var fM,pM=F(()=>{"use strict";lb();db();s(_S,"CardinalClosed");_S.prototype={areaStart:xo,areaEnd:xo,lineStart:s(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},"lineStart"),lineEnd:s(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}}},"lineEnd"),point:s(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:O0(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},"point")};fM=s((function e(t){function r(n){return new _S(n,t)}return s(r,"cardinal"),r.tension=function(n){return e(+n)},r}),"custom")(0)});function LS(e,t){this._context=e,this._k=(1-t)/6}var mM,gM=F(()=>{"use strict";db();s(LS,"CardinalOpen");LS.prototype={areaStart:s(function(){this._line=0},"areaStart"),areaEnd:s(function(){this._line=NaN},"areaEnd"),lineStart:s(function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},"lineStart"),lineEnd:s(function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},"lineEnd"),point:s(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:O0(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},"point")};mM=s((function e(t){function r(n){return new LS(n,t)}return s(r,"cardinal"),r.tension=function(n){return e(+n)},r}),"custom")(0)});function fb(e,t,r){var n=e._x1,i=e._y1,a=e._x2,o=e._y2;if(e._l01_a>ua){var l=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,u=3*e._l01_a*(e._l01_a+e._l12_a);n=(n*l-e._x0*e._l12_2a+e._x2*e._l01_2a)/u,i=(i*l-e._y0*e._l12_2a+e._y2*e._l01_2a)/u}if(e._l23_a>ua){var h=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,d=3*e._l23_a*(e._l23_a+e._l12_a);a=(a*h+e._x1*e._l23_2a-t*e._l12_2a)/d,o=(o*h+e._y1*e._l23_2a-r*e._l12_2a)/d}e._context.bezierCurveTo(n,i,a,o,e._x2,e._y2)}function cre(e,t){this._context=e,this._alpha=t}var pb,DS=F(()=>{"use strict";TS();db();s(fb,"point");s(cre,"CatmullRom");cre.prototype={areaStart:s(function(){this._line=0},"areaStart"),areaEnd:s(function(){this._line=NaN},"areaEnd"),lineStart:s(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},"lineStart"),lineEnd:s(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},"lineEnd"),point:s(function(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,n=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+n*n,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:fb(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},"point")};pb=s((function e(t){function r(n){return t?new cre(n,t):new RS(n,0)}return s(r,"catmullRom"),r.alpha=function(n){return e(+n)},r}),"custom")(.5)});function ure(e,t){this._context=e,this._alpha=t}var yM,hre=F(()=>{"use strict";pM();lb();DS();s(ure,"CatmullRomClosed");ure.prototype={areaStart:xo,areaEnd:xo,lineStart:s(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},"lineStart"),lineEnd:s(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}}},"lineEnd"),point:s(function(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,n=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+n*n,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:fb(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},"point")};yM=s((function e(t){function r(n){return t?new ure(n,t):new _S(n,0)}return s(r,"catmullRom"),r.alpha=function(n){return e(+n)},r}),"custom")(.5)});function dre(e,t){this._context=e,this._alpha=t}var vM,fre=F(()=>{"use strict";gM();DS();s(dre,"CatmullRomOpen");dre.prototype={areaStart:s(function(){this._line=0},"areaStart"),areaEnd:s(function(){this._line=NaN},"areaEnd"),lineStart:s(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},"lineStart"),lineEnd:s(function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},"lineEnd"),point:s(function(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,n=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+n*n,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:fb(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},"point")};vM=s((function e(t){function r(n){return t?new dre(n,t):new LS(n,0)}return s(r,"catmullRom"),r.alpha=function(n){return e(+n)},r}),"custom")(.5)});function pre(e){this._context=e}function IS(e){return new pre(e)}var mre=F(()=>{"use strict";lb();s(pre,"LinearClosed");pre.prototype={areaStart:xo,areaEnd:xo,lineStart:s(function(){this._point=0},"lineStart"),lineEnd:s(function(){this._point&&this._context.closePath()},"lineEnd"),point:s(function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))},"point")};s(IS,"default")});function gre(e){return e<0?-1:1}function yre(e,t,r){var n=e._x1-e._x0,i=t-e._x1,a=(e._y1-e._y0)/(n||i<0&&-0),o=(r-e._y1)/(i||n<0&&-0),l=(a*i+o*n)/(n+i);return(gre(a)+gre(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(l))||0}function vre(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function xM(e,t,r){var n=e._x0,i=e._y0,a=e._x1,o=e._y1,l=(a-n)/3;e._context.bezierCurveTo(n+l,i+l*t,a-l,o-l*r,a,o)}function MS(e){this._context=e}function xre(e){this._context=new bre(e)}function bre(e){this._context=e}function mb(e){return new MS(e)}function gb(e){return new xre(e)}var Tre=F(()=>{"use strict";s(gre,"sign");s(yre,"slope3");s(vre,"slope2");s(xM,"point");s(MS,"MonotoneX");MS.prototype={areaStart:s(function(){this._line=0},"areaStart"),areaEnd:s(function(){this._line=NaN},"areaEnd"),lineStart:s(function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},"lineStart"),lineEnd:s(function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:xM(this,this._t0,vre(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},"lineEnd"),point:s(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,xM(this,vre(this,r=yre(this,e,t)),r);break;default:xM(this,this._t0,r=yre(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}},"point")};s(xre,"MonotoneY");(xre.prototype=Object.create(MS.prototype)).point=function(e,t){MS.prototype.point.call(this,t,e)};s(bre,"ReflectContext");bre.prototype={moveTo:s(function(e,t){this._context.moveTo(t,e)},"moveTo"),closePath:s(function(){this._context.closePath()},"closePath"),lineTo:s(function(e,t){this._context.lineTo(t,e)},"lineTo"),bezierCurveTo:s(function(e,t,r,n,i,a){this._context.bezierCurveTo(t,e,n,r,a,i)},"bezierCurveTo")};s(mb,"monotoneX");s(gb,"monotoneY")});function kre(e){this._context=e}function Cre(e){var t,r=e.length-1,n,i=new Array(r),a=new Array(r),o=new Array(r);for(i[0]=0,a[0]=2,o[0]=e[0]+2*e[1],t=1;t=0;--t)i[t]=(o[t]-i[t+1])/a[t];for(a[r-1]=(e[r]+i[r-1])/2,t=0;t{"use strict";s(kre,"Natural");kre.prototype={areaStart:s(function(){this._line=0},"areaStart"),areaEnd:s(function(){this._line=NaN},"areaEnd"),lineStart:s(function(){this._x=[],this._y=[]},"lineStart"),lineEnd:s(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 n=Cre(e),i=Cre(t),a=0,o=1;o{"use strict";s(NS,"Step");NS.prototype={areaStart:s(function(){this._line=0},"areaStart"),areaEnd:s(function(){this._line=NaN},"areaEnd"),lineStart:s(function(){this._x=this._y=NaN,this._point=0},"lineStart"),lineEnd:s(function(){0=0&&(this._t=1-this._t,this._line=1-this._line)},"lineEnd"),point:s(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},"point")};s($0,"default");s(yb,"stepBefore");s(vb,"stepAfter")});var Ere=F(()=>{"use strict";Yte();Qte();tre();ire();sre();ub();rre();lre();pM();gM();db();hre();fre();DS();mre();cM();Tre();wre();Sre()});var Are=F(()=>{"use strict"});var Rre=F(()=>{"use strict"});function cd(e,t,r){this.k=e,this.x=t,this.y=r}function TM(e){for(;!e.__zoom;)if(!(e=e.parentNode))return bM;return e.__zoom}var bM,CM=F(()=>{"use strict";s(cd,"Transform");cd.prototype={constructor:cd,scale:s(function(e){return e===1?this:new cd(this.k*e,this.x,this.y)},"scale"),translate:s(function(e,t){return e===0&t===0?this:new cd(this.k,this.x+this.k*e,this.y+this.k*t)},"translate"),apply:s(function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},"apply"),applyX:s(function(e){return e*this.k+this.x},"applyX"),applyY:s(function(e){return e*this.k+this.y},"applyY"),invert:s(function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},"invert"),invertX:s(function(e){return(e-this.x)/this.k},"invertX"),invertY:s(function(e){return(e-this.y)/this.k},"invertY"),rescaleX:s(function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},"rescaleX"),rescaleY:s(function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},"rescaleY"),toString:s(function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"},"toString")};bM=new cd(1,0,0);TM.prototype=cd.prototype;s(TM,"transform")});var _re=F(()=>{"use strict"});var Lre=F(()=>{"use strict";Qw();Are();Rre();CM();_re()});var Dre=F(()=>{"use strict";Lre();CM()});var $r=F(()=>{"use strict";Qh();FZ();iee();lee();T0();cee();uee();u7();LQ();hee();Q8();dee();pee();mI();Ree();Qee();w0();nI();Jee();fee();ete();zte();qte();xl();Ere();yS();rM();Uw();Qw();Dre()});var kM,Dp,PS,Ire,OS,BS,Ra,xb,F0,ud=F(()=>{"use strict";kM=Ms(d0(),1);$r();Gr();Dp=s((e,t)=>{let r=e.append("rect");if(r.attr("x",t.x),r.attr("y",t.y),r.attr("fill",t.fill),r.attr("stroke",t.stroke),r.attr("width",t.width),r.attr("height",t.height),t.name&&r.attr("name",t.name),t.rx&&r.attr("rx",t.rx),t.ry&&r.attr("ry",t.ry),t.attrs!==void 0)for(let n in t.attrs)r.attr(n,t.attrs[n]);return t.class&&r.attr("class",t.class),r},"drawRect"),PS=s((e,t)=>{let r={x:t.startx,y:t.starty,width:t.stopx-t.startx,height:t.stopy-t.starty,fill:t.fill,stroke:t.stroke,class:"rect"};Dp(e,r).lower()},"drawBackgroundRect"),Ire=s((e,t)=>{let r=t.text.replace(op," "),n=e.append("text");n.attr("x",t.x),n.attr("y",t.y),n.attr("class","legend"),n.style("text-anchor",t.anchor),t.class&&n.attr("class",t.class);let i=n.append("tspan");return i.attr("x",t.x+t.textMargin*2),i.text(r),n},"drawText"),OS=s((e,t,r,n)=>{let i=e.append("image");i.attr("x",t),i.attr("y",r);let a=(0,kM.sanitizeUrl)(n);i.attr("xlink:href",a)},"drawImage"),BS=s((e,t,r,n)=>{let i=e.append("use");i.attr("x",t),i.attr("y",r);let a=(0,kM.sanitizeUrl)(n);i.attr("xlink:href",`#${a}`)},"drawEmbeddedImage"),Ra=s(()=>({x:0,y:0,width:100,height:100,fill:"#EDF2AE",stroke:"#666",anchor:"start",rx:0,ry:0}),"getNoteRect"),xb=s(()=>({x:0,y:0,width:100,height:100,"text-anchor":"start",style:"#666",textMargin:0,rx:0,ry:0,tspan:!0}),"getTextObj"),F0=s(()=>{let e=lt(".mermaidTooltip");return e.empty()&&(e=lt("body").append("div").attr("class","mermaidTooltip").style("opacity",0).style("position","absolute").style("text-align","center").style("max-width","200px").style("padding","2px").style("font-size","12px").style("background","#ffffde").style("border","1px solid #333").style("border-radius","2px").style("pointer-events","none").style("z-index","100")),e},"createTooltip")});var Mre,wM,Nre,Ize,Mze,Nze,Pze,Oze,Bze,$ze,Fze,Gze,zze,Vze,$u,Rl,Pre=F(()=>{"use strict";Gr();ud();Mre=Ms(d0(),1),wM=s(function(e,t){return Dp(e,t)},"drawRect"),Nre=s(function(e,t,r,n,i,a){let o=e.append("image");o.attr("width",t),o.attr("height",r),o.attr("x",n),o.attr("y",i);let l=a.startsWith("data:image/png;base64")?a:(0,Mre.sanitizeUrl)(a);o.attr("xlink:href",l)},"drawImage"),Ize=s((e,t,r,n)=>{let i=e.append("g"),a=0;for(let o of t){let l=o.textColor?o.textColor:"#444444",u=o.lineColor?o.lineColor:"#444444",h=o.offsetX?parseInt(String(o.offsetX)):0,d=o.offsetY?parseInt(String(o.offsetY)):0,f="";if(a===0){let g=i.append("line");g.attr("x1",o.startPoint.x),g.attr("y1",o.startPoint.y),g.attr("x2",o.endPoint.x),g.attr("y2",o.endPoint.y),g.attr("stroke-width","1"),g.attr("stroke",u),g.style("fill","none"),o.type!=="rel_b"&&g.attr("marker-end","url("+f+"#"+n+"-arrowhead)"),(o.type==="birel"||o.type==="rel_b")&&g.attr("marker-start","url("+f+"#"+n+"-arrowend)"),a=-1}else{let g=i.append("path");g.attr("fill","none").attr("stroke-width","1").attr("stroke",u).attr("d","Mstartx,starty Qcontrolx,controly stopx,stopy ".replaceAll("startx",o.startPoint.x).replaceAll("starty",o.startPoint.y).replaceAll("controlx",o.startPoint.x+(o.endPoint.x-o.startPoint.x)/2-(o.endPoint.x-o.startPoint.x)/4).replaceAll("controly",o.startPoint.y+(o.endPoint.y-o.startPoint.y)/2).replaceAll("stopx",o.endPoint.x).replaceAll("stopy",o.endPoint.y)),o.type!=="rel_b"&&g.attr("marker-end","url("+f+"#"+n+"-arrowhead)"),(o.type==="birel"||o.type==="rel_b")&&g.attr("marker-start","url("+f+"#"+n+"-arrowend)")}let p=o.label.width,m=r.messageFont();$u(r)(o.label.text,i,Math.min(o.startPoint.x,o.endPoint.x)+Math.abs(o.endPoint.x-o.startPoint.x)/2+h,Math.min(o.startPoint.y,o.endPoint.y)+Math.abs(o.endPoint.y-o.startPoint.y)/2+d,p,o.label.height,{fill:l},m),o.techn&&o.techn.text!==""&&(m=r.messageFont(),$u(r)("["+o.techn.text+"]",i,Math.min(o.startPoint.x,o.endPoint.x)+Math.abs(o.endPoint.x-o.startPoint.x)/2+h,Math.min(o.startPoint.y,o.endPoint.y)+Math.abs(o.endPoint.y-o.startPoint.y)/2+r.messageFontSize+5+d,Math.max(p,o.techn.width),o.techn.height,{fill:l,"font-style":"italic"},m))}},"drawRels"),Mze=s(function(e,t,r){let n=e.append("g"),i=t.bgColor?t.bgColor:"none",a=t.borderColor?t.borderColor:"#444444",o=t.fontColor?t.fontColor:"black",l={"stroke-width":1,"stroke-dasharray":"7.0,7.0"};t.nodeType&&(l={"stroke-width":1});let u={x:t.x,y:t.y,fill:i,stroke:a,width:t.width,height:t.height,rx:2.5,ry:2.5,attrs:l};wM(n,u);let h=r.boundaryFont();h.fontWeight="bold",h.fontSize=h.fontSize+2,h.fontColor=o,$u(r)(t.label.text,n,t.x,t.y+t.label.Y,t.width,t.height,{fill:"#444444"},h),t.type&&t.type.text!==""&&(h=r.boundaryFont(),h.fontColor=o,$u(r)(t.type.text,n,t.x,t.y+t.type.Y,t.width,t.height,{fill:"#444444"},h)),t.descr&&t.descr.text!==""&&(h=r.boundaryFont(),h.fontSize=h.fontSize-2,h.fontColor=o,$u(r)(t.descr.text,n,t.x,t.y+t.descr.Y,t.width,t.height,{fill:"#444444"},h))},"drawBoundary"),Nze=s(function(e,t,r){let n=t.bgColor?t.bgColor:r[t.typeC4Shape.text+"_bg_color"],i=t.borderColor?t.borderColor:r[t.typeC4Shape.text+"_border_color"],a=t.fontColor?t.fontColor:"#FFFFFF",o="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":o="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":o="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAAB6ElEQVR4Xu2YLY+EMBCG9+dWr0aj0Wg0Go1Go0+j8Xdv2uTCvv1gpt0ebHKPuhDaeW4605Z9mJvx4AdXUyTUdd08z+u6flmWZRnHsWkafk9DptAwDPu+f0eAYtu2PEaGWuj5fCIZrBAC2eLBAnRCsEkkxmeaJp7iDJ2QMDdHsLg8SxKFEJaAo8lAXnmuOFIhTMpxxKATebo4UiFknuNo4OniSIXQyRxEA3YsnjGCVEjVXD7yLUAqxBGUyPv/Y4W2beMgGuS7kVQIBycH0fD+oi5pezQETxdHKmQKGk1eQEYldK+jw5GxPfZ9z7Mk0Qnhf1W1m3w//EUn5BDmSZsbR44QQLBEqrBHqOrmSKaQAxdnLArCrxZcM7A7ZKs4ioRq8LFC+NpC3WCBJsvpVw5edm9iEXFuyNfxXAgSwfrFQ1c0iNda8AdejvUgnktOtJQQxmcfFzGglc5WVCj7oDgFqU18boeFSs52CUh8LE8BIVQDT1ABrB0HtgSEYlX5doJnCwv9TXocKCaKbnwhdDKPq4lf3SwU3HLq4V/+WYhHVMa/3b4IlfyikAduCkcBc7mQ3/z/Qq/cTuikhkzB12Ae/mcJC9U+Vo8Ej1gWAtgbeGgFsAMHr50BIWOLCbezvhpBFUdY6EJuJ/QDW0XoMX60zZ0AAAAASUVORK5CYII=";break}let l=e.append("g");l.attr("class","person-man");let u=Ra();switch(t.typeC4Shape.text){case"person":case"external_person":case"system":case"external_system":case"container":case"external_container":case"component":case"external_component":u.x=t.x,u.y=t.y,u.fill=n,u.width=t.width,u.height=t.height,u.stroke=i,u.rx=2.5,u.ry=2.5,u.attrs={"stroke-width":.5},wM(l,u);break;case"system_db":case"external_system_db":case"container_db":case"external_container_db":case"component_db":case"external_component_db":l.append("path").attr("fill",n).attr("stroke-width","0.5").attr("stroke",i).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)),l.append("path").attr("fill","none").attr("stroke-width","0.5").attr("stroke",i).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":l.append("path").attr("fill",n).attr("stroke-width","0.5").attr("stroke",i).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)),l.append("path").attr("fill","none").attr("stroke-width","0.5").attr("stroke",i).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 h=Vze(r,t.typeC4Shape.text),d=t.typeC4Shape.width;switch(l.append("text").attr("fill",a).attr("font-family",h.fontFamily).attr("font-size",h.fontSize-2).attr("font-style","italic").attr("lengthAdjust","spacing").attr("textLength",d).attr("x",t.x+t.width/2-d/2).attr("y",t.y+t.typeC4Shape.Y).text("<<"+t.typeC4Shape.text+">>"),t.typeC4Shape.text){case"person":case"external_person":Nre(l,48,48,t.x+t.width/2-24,t.y+t.image.Y,o);break}let f=r[t.typeC4Shape.text+"Font"]();return f.fontWeight="bold",f.fontSize=f.fontSize+2,f.fontColor=a,$u(r)(t.label.text,l,t.x,t.y+t.label.Y,t.width,t.height,{fill:a},f),f=r[t.typeC4Shape.text+"Font"](),f.fontColor=a,t.techn&&t.techn?.text!==""?$u(r)(t.techn.text,l,t.x,t.y+t.techn.Y,t.width,t.height,{fill:a,"font-style":"italic"},f):t.type&&t.type.text!==""&&$u(r)(t.type.text,l,t.x,t.y+t.type.Y,t.width,t.height,{fill:a,"font-style":"italic"},f),t.descr&&t.descr.text!==""&&(f=r.personFont(),f.fontColor=a,$u(r)(t.descr.text,l,t.x,t.y+t.descr.Y,t.width,t.height,{fill:a},f)),t.height},"drawC4Shape"),Pze=s(function(e,t){e.append("defs").append("symbol").attr("id",t+"-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"),Oze=s(function(e,t){e.append("defs").append("symbol").attr("id",t+"-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"),Bze=s(function(e,t){e.append("defs").append("symbol").attr("id",t+"-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"),$ze=s(function(e,t){e.append("defs").append("marker").attr("id",t+"-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"),Fze=s(function(e,t){e.append("defs").append("marker").attr("id",t+"-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"),Gze=s(function(e,t){e.append("defs").append("marker").attr("id",t+"-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"),zze=s(function(e,t){let n=e.append("defs").append("marker").attr("id",t+"-crosshead").attr("markerWidth",15).attr("markerHeight",8).attr("orient","auto").attr("refX",16).attr("refY",4);n.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"),n.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"),Vze=s((e,t)=>({fontFamily:e[t+"FontFamily"],fontSize:e[t+"FontSize"],fontWeight:e[t+"FontWeight"]}),"getC4ShapeFont"),$u=(function(){function e(i,a,o,l,u,h,d){let f=a.append("text").attr("x",o+u/2).attr("y",l+h/2+5).style("text-anchor","middle").text(i);n(f,d)}s(e,"byText");function t(i,a,o,l,u,h,d,f){let{fontSize:p,fontFamily:m,fontWeight:g}=f,y=i.split(xt.lineBreakRegex);for(let v=0;v=0}var Bre=F(()=>{"use strict";s(Ore,"isLength")});function FS(e){return e!=null&&typeof e!="function"&&Ore(e.length)}var SM=F(()=>{"use strict";Bre();s(FS,"isArrayLike")});function $re(e){return e==="__proto__"}var Fre=F(()=>{"use strict";s($re,"isUnsafeProperty")});function hd(e){return e==null||typeof e!="object"&&typeof e!="function"}var bb=F(()=>{"use strict";s(hd,"isPrimitive")});function GS(e){return Object.getOwnPropertySymbols(e).filter(t=>Object.prototype.propertyIsEnumerable.call(e,t))}var EM=F(()=>{"use strict";s(GS,"getSymbols")});function Fu(e){return e==null?e===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}var Tb=F(()=>{"use strict";s(Fu,"getTag")});var Cb,dd,Ip,Mp,Np,kb,wb,Sb,Eb,zS,Ab,G0,Rb,VS,WS,qS,HS,US,YS,jS,XS,KS,ZS=F(()=>{"use strict";Cb="[object RegExp]",dd="[object String]",Ip="[object Number]",Mp="[object Boolean]",Np="[object Arguments]",kb="[object Symbol]",wb="[object Date]",Sb="[object Map]",Eb="[object Set]",zS="[object Array]",Ab="[object ArrayBuffer]",G0="[object Object]",Rb="[object DataView]",VS="[object Uint8Array]",WS="[object Uint8ClampedArray]",qS="[object Uint16Array]",HS="[object Uint32Array]",US="[object Int8Array]",YS="[object Int16Array]",jS="[object Int32Array]",XS="[object Float32Array]",KS="[object Float64Array]"});function z0(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}var QS=F(()=>{"use strict";s(z0,"isTypedArray")});function Gre(e,t){return V0(e,void 0,e,new Map,t)}function V0(e,t,r,n=new Map,i=void 0){let a=i?.(e,t,r,n);if(a!==void 0)return a;if(hd(e))return e;if(n.has(e))return n.get(e);if(Array.isArray(e)){let o=new Array(e.length);n.set(e,o);for(let l=0;l{"use strict";EM();Tb();ZS();bb();QS();s(Gre,"cloneDeepWith");s(V0,"cloneDeepWithImpl");s(Vo,"copyProperties");s(Wze,"isCloneableObject")});function Vre(e,t){return Gre(e,(r,n,i,a)=>{let o=t?.(r,n,i,a);if(o!==void 0)return o;if(typeof e=="object"){if(Fu(e)===G0&&typeof e.constructor!="function"){let l={};return a.set(e,l),Vo(l,e,i,a),l}switch(Object.prototype.toString.call(e)){case Ip:case dd:case Mp:{let l=new e.constructor(e?.valueOf());return Vo(l,e),l}case Np:{let l={};return Vo(l,e),l.length=e.length,l[Symbol.iterator]=e[Symbol.iterator],l}default:return}}})}var Wre=F(()=>{"use strict";zre();Tb();ZS();s(Vre,"cloneDeepWith")});function AM(e){return Vre(e)}var qre=F(()=>{"use strict";Wre();s(AM,"cloneDeep")});function _b(e){return e!==null&&typeof e=="object"&&Fu(e)==="[object Arguments]"}var RM=F(()=>{"use strict";Tb();s(_b,"isArguments")});function Lb(e){return typeof e=="object"&&e!==null}var _M=F(()=>{"use strict";s(Lb,"isObjectLike")});function Hre(e){return Lb(e)&&FS(e)}var Ure=F(()=>{"use strict";SM();_M();s(Hre,"isArrayLikeObject")});function Yre(e){return Array.isArray(e)}var jre=F(()=>{"use strict";s(Yre,"isArray")});function Pp(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError("Expected a function");let r=s(function(...i){let a=t?t.apply(this,i):i[0],o=r.cache;if(o.has(a))return o.get(a);let l=e.apply(this,i);return r.cache=o.set(a,l)||o,l},"memoized"),n=Pp.Cache||Map;return r.cache=new n,r}var Xre=F(()=>{"use strict";s(Pp,"memoize");Pp.Cache=Map});function Kre(){}var Zre=F(()=>{"use strict";s(Kre,"noop")});function Qre(e){let t=e?.constructor,r=typeof t=="function"?t.prototype:Object.prototype;return e===r}var Jre=F(()=>{"use strict";s(Qre,"isPrototype")});function fd(e){return z0(e)}var JS=F(()=>{"use strict";QS();s(fd,"isTypedArray")});function DM(e){if(hd(e))return e;let t=Fu(e);if(!qze(e))return{};if(Yre(e)){let n=Array.from(e);return e.length>0&&typeof e[0]=="string"&&Object.hasOwn(e,"index")&&(n.index=e.index,n.input=e.input),n}if(fd(e)){let n=e,i=n.constructor;return new i(n.buffer,n.byteOffset,n.length)}if(t===Ab)return new ArrayBuffer(e.byteLength);if(t===Rb){let n=e,i=n.buffer,a=n.byteOffset,o=n.byteLength,l=new ArrayBuffer(o),u=new Uint8Array(i,a,o);return new Uint8Array(l).set(u),new DataView(l)}if(t===Mp||t===Ip||t===dd){let n=e.constructor,i=new n(e.valueOf());return t===dd?Uze(i,e):LM(i,e),i}if(t===wb)return new Date(Number(e));if(t===Cb){let n=e,i=new RegExp(n.source,n.flags);return i.lastIndex=n.lastIndex,i}if(t===kb)return Object(Symbol.prototype.valueOf.call(e));if(t===Sb){let n=e,i=new Map;return n.forEach((a,o)=>{i.set(o,a)}),i}if(t===Eb){let n=e,i=new Set;return n.forEach(a=>{i.add(a)}),i}if(t===Np){let n=e,i={};return LM(i,n),i.length=n.length,i[Symbol.iterator]=n[Symbol.iterator],i}let r={};return Yze(r,e),LM(r,e),Hze(r,e),r}function qze(e){switch(Fu(e)){case Np:case zS:case Ab:case Rb:case Mp:case wb:case XS:case KS:case US:case YS:case jS:case Sb:case Ip:case G0:case Cb:case Eb:case dd:case kb:case VS:case WS:case qS:case HS:return!0;default:return!1}}function LM(e,t){for(let r in t)Object.hasOwn(t,r)&&(e[r]=t[r])}function Hze(e,t){let r=Object.getOwnPropertySymbols(t);for(let n=0;n=r)&&(e[n]=t[n])}function Yze(e,t){let r=Object.getPrototypeOf(t);r!==null&&typeof t.constructor=="function"&&Object.setPrototypeOf(e,r)}var ene=F(()=>{"use strict";bb();Tb();ZS();jre();JS();s(DM,"clone");s(qze,"isCloneableObject");s(LM,"copyOwnProperties");s(Hze,"copySymbolProperties");s(Uze,"cloneStringObjectProperties");s(Yze,"copyPrototype")});function eE(e){if(typeof e!="object"||e==null)return!1;if(Object.getPrototypeOf(e)===null)return!0;if(Object.prototype.toString.call(e)!=="[object Object]"){let r=e[Symbol.toStringTag];return r==null||!Object.getOwnPropertyDescriptor(e,Symbol.toStringTag)?.writable?!1:e.toString()===`[object ${r}]`}let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}var tne=F(()=>{"use strict";s(eE,"isPlainObject")});function rne(e){if(hd(e))return e;if(Array.isArray(e)||z0(e)||e instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&e instanceof SharedArrayBuffer)return e.slice(0);let t=Object.getPrototypeOf(e);if(t==null)return Object.assign(Object.create(t),e);let r=t.constructor;if(e instanceof Date||e instanceof Map||e instanceof Set)return new r(e);if(e instanceof RegExp){let n=new r(e);return n.lastIndex=e.lastIndex,n}if(e instanceof DataView)return new r(e.buffer.slice(0));if(e instanceof Error){let n;return e instanceof AggregateError?n=new r(e.errors,e.message,{cause:e.cause}):n=new r(e.message,{cause:e.cause}),n.stack=e.stack,Object.assign(n,e),n}if(typeof File<"u"&&e instanceof File)return new r([e],e.name,{type:e.type,lastModified:e.lastModified});if(typeof e=="object"){let n=Object.create(t);return Object.assign(n,e)}return e}var nne=F(()=>{"use strict";bb();QS();s(rne,"clone")});function ine(e,...t){let r=t.slice(0,-1),n=t[t.length-1],i=e;for(let a=0;a{"use strict";qre();Fre();nne();bb();EM();RM();Ure();_M();tne();JS();s(ine,"mergeWith");s(tE,"mergeWithDeep")});function IM(e,...t){return ine(e,...t,Kre)}var sne=F(()=>{"use strict";ane();Zre();s(IM,"merge")});function rE(e){if(e==null)return!0;if(FS(e))return typeof e.splice!="function"&&typeof e!="string"&&(typeof Buffer>"u"||!Buffer.isBuffer(e))&&!fd(e)&&!_b(e)?!1:e.length===0;if(typeof e=="object"){if(e instanceof Map||e instanceof Set)return e.size===0;let t=Object.keys(e);return Qre(e)?t.filter(r=>r!=="constructor").length===0:t.length===0}return!0}var one=F(()=>{"use strict";RM();SM();JS();Jre();s(rE,"isEmpty")});var nE=F(()=>{"use strict";Xre();ene();sne();one()});function PM(e,t){if(!e)return t;let r=`curve${e.charAt(0).toUpperCase()+e.slice(1)}`;return jze[r]??t}function Qze(e,t){let r=e.trim();if(r)return t.securityLevel!=="loose"?(0,une.sanitizeUrl)(r):r}function fne(e,t){return!e||!t?0:Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}function eVe(e){let t,r=0;e.forEach(i=>{r+=fne(i,t),t=i});let n=r/2;return OM(e,n)}function tVe(e){return e.length===1?e[0]:eVe(e)}function nVe(e,t,r){let n=structuredClone(r);te.info("our points",n),t!=="start_left"&&t!=="start_right"&&n.reverse();let i=25+e,a=OM(n,i),o=10+e*.5,l=Math.atan2(n[0].y-a.y,n[0].x-a.x),u={x:0,y:0};return t==="start_left"?(u.x=Math.sin(l+Math.PI)*o+(n[0].x+a.x)/2,u.y=-Math.cos(l+Math.PI)*o+(n[0].y+a.y)/2):t==="end_right"?(u.x=Math.sin(l-Math.PI)*o+(n[0].x+a.x)/2-5,u.y=-Math.cos(l-Math.PI)*o+(n[0].y+a.y)/2-5):t==="end_left"?(u.x=Math.sin(l)*o+(n[0].x+a.x)/2-5,u.y=-Math.cos(l)*o+(n[0].y+a.y)/2-5):(u.x=Math.sin(l)*o+(n[0].x+a.x)/2,u.y=-Math.cos(l)*o+(n[0].y+a.y)/2),u}function BM(e){let t="",r="";for(let n of e)n!==void 0&&(n.startsWith("color:")||n.startsWith("text-align:")?r=r+n+";":t=t+n+";");return{style:t,labelStyle:r}}function iVe(e){let t="",r="0123456789abcdef",n=r.length;for(let i=0;iMath.round(parseFloat(a)).toString());return i.includes(r.toString())||i.includes(n.toString())}var une,NM,jze,Xze,Kze,hne,dne,Zze,Jze,lne,OM,rVe,cne,$M,FM,aVe,sVe,Op,oVe,Db,MM,iE,lVe,cVe,fs,sr,pne,Wo,xc,Qt=F(()=>{"use strict";une=Ms(d0(),1);$r();Gr();kk();Tt();up();Xg();nE();fw();NM="\u200B",jze={curveBasis:Bu,curveBasisClosed:ES,curveBasisOpen:AS,curveBumpX:sb,curveBumpY:ob,curveBundle:dM,curveCardinalClosed:fM,curveCardinalOpen:mM,curveCardinal:hb,curveCatmullRomClosed:yM,curveCatmullRomOpen:vM,curveCatmullRom:pb,curveLinear:vc,curveLinearClosed:IS,curveMonotoneX:mb,curveMonotoneY:gb,curveNatural:B0,curveStep:$0,curveStepAfter:vb,curveStepBefore:yb},Xze=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,Kze=s(function(e,t){let r=hne(e,/(?:init\b)|(?:initialize\b)/),n={};if(Array.isArray(r)){let o=r.map(l=>l.args);Zg(o),n=Gn(n,[...o])}else n=r.args;if(!n)return;let i=h0(e,t),a="config";return n[a]!==void 0&&(i==="flowchart-v2"&&(i="flowchart"),n[i]=n[a],delete n[a]),n},"detectInit"),hne=s(function(e,t=null){try{let r=new RegExp(`[%]{2}(?![{]${Xze.source})(?=[}][%]{2}).* +`,"ig");e=e.trim().replace(r,"").replace(/'/gm,'"'),te.debug(`Detecting diagram directive${t!==null?" type:"+t:""} based on the text:${e}`);let n,i=[];for(;(n=cp.exec(e))!==null;)if(n.index===cp.lastIndex&&cp.lastIndex++,n&&!t||t&&n[1]?.match(t)||t&&n[2]?.match(t)){let a=n[1]?n[1]:n[2],o=n[3]?n[3].trim():n[4]?JSON.parse(n[4].trim()):null;i.push({type:a,args:o})}return i.length===0?{type:e,args:null}:i.length===1?i[0]:i}catch(r){return te.error(`ERROR: ${r.message} - Unable to parse directive type: '${t}' based on the text: '${e}'`),{type:void 0,args:null}}},"detectDirective"),dne=s(function(e){return e.replace(cp,"")},"removeDirectives"),Zze=s(function(e,t){for(let[r,n]of t.entries())if(n.match(e))return r;return-1},"isSubstringInArray");s(PM,"interpolateToCurve");s(Qze,"formatUrl");Jze=s((e,...t)=>{let r=e.split("."),n=r.length-1,i=r[n],a=window;for(let o=0;o{let r=Math.pow(10,t);return Math.round(e*r)/r},"roundNumber"),OM=s((e,t)=>{let r,n=t;for(let i of e){if(r){let a=fne(i,r);if(a===0)return r;if(a=1)return{x:i.x,y:i.y};if(o>0&&o<1)return{x:lne((1-o)*r.x+o*i.x,5),y:lne((1-o)*r.y+o*i.y,5)}}}r=i}throw new Error("Could not find a suitable point for the given distance")},"calculatePoint"),rVe=s((e,t,r)=>{te.info(`our points ${JSON.stringify(t)}`),t[0]!==r&&(t=t.reverse());let i=OM(t,25),a=e?10:5,o=Math.atan2(t[0].y-i.y,t[0].x-i.x),l={x:0,y:0};return l.x=Math.sin(o)*a+(t[0].x+i.x)/2,l.y=-Math.cos(o)*a+(t[0].y+i.y)/2,l},"calcCardinalityPosition");s(nVe,"calcTerminalLabelPosition");s(BM,"getStylesFromArray");cne=0,$M=s(()=>(cne++,"id-"+Math.random().toString(36).substr(2,12)+"-"+cne),"generateId");s(iVe,"makeRandomHex");FM=s(e=>iVe(e.length),"random"),aVe=s(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"),sVe=s(function(e,t){let r=t.text.replace(xt.lineBreakRegex," "),[,n]=fs(t.fontSize),i=e.append("text");i.attr("x",t.x),i.attr("y",t.y),i.style("text-anchor",t.anchor),i.style("font-family",t.fontFamily),i.style("font-size",n),i.style("font-weight",t.fontWeight),i.attr("fill",t.fill),t.class!==void 0&&i.attr("class",t.class);let a=i.append("tspan");return a.attr("x",t.x+t.textMargin*2),a.attr("fill",t.fill),a.text(r),i},"drawSimpleText"),Op=Pp((e,t,r)=>{if(!e||(r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"
"},r),xt.lineBreakRegex.test(e)))return e;let n=e.split(" ").filter(Boolean),i=[],a="";return n.forEach((o,l)=>{let u=ha(`${o} `,r),h=ha(a,r);if(u>t){let{hyphenatedStrings:p,remainingWord:m}=oVe(o,t,"-",r);i.push(a,...p),a=m}else h+u>=t?(i.push(a),a=o):a=[a,o].filter(Boolean).join(" ");l+1===n.length&&i.push(a)}),i.filter(o=>o!=="").join(r.joinWith)},(e,t,r)=>`${e}${t}${r.fontSize}${r.fontWeight}${r.fontFamily}${r.joinWith}`),oVe=Pp((e,t,r="-",n)=>{n=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},n);let i=[...e],a=[],o="";return i.forEach((l,u)=>{let h=`${o}${l}`;if(ha(h,n)>=t){let f=u+1,p=i.length===f,m=`${h}${r}`;a.push(p?h:m),o=""}else o=h}),{hyphenatedStrings:a,remainingWord:o}},(e,t,r="-",n)=>`${e}${t}${r}${n.fontSize}${n.fontWeight}${n.fontFamily}`);s(aE,"calculateTextHeight");s(ha,"calculateTextWidth");Db=Pp((e,t)=>{let{fontSize:r=12,fontFamily:n="Arial",fontWeight:i=400}=t;if(!e)return{width:0,height:0};let[,a]=fs(r),o=["sans-serif",n],l=e.split(xt.lineBreakRegex),u=[],h=lt("body");if(!h.remove)return{width:0,height:0,lineHeight:0};let d=h.append("svg");for(let p of o){let m=0,g={width:0,height:0,lineHeight:0};for(let y of l){let v=aVe();v.text=y||NM;let x=sVe(d,v).style("font-size",a).style("font-weight",i).style("font-family",p),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)),m=Math.round(b.height),g.height+=m,g.lineHeight=Math.round(Math.max(g.lineHeight,m))}u.push(g)}d.remove();let f=isNaN(u[1].height)||isNaN(u[1].width)||isNaN(u[1].lineHeight)||u[0].height>u[1].height&&u[0].width>u[1].width&&u[0].lineHeight>u[1].lineHeight?0:1;return u[f]},(e,t)=>`${e}${t.fontSize}${t.fontWeight}${t.fontFamily}`),MM=class{constructor(t=!1,r){this.count=0;this.count=r?r.length:0,this.next=t?()=>this.count++:()=>Date.now()}static{s(this,"InitIDGenerator")}},lVe=s(function(e){return iE=iE||document.createElement("div"),e=escape(e).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),iE.innerHTML=e,unescape(iE.textContent)},"entityDecode");s(GM,"isDetailedError");cVe=s((e,t,r,n)=>{if(!n)return;let i=e.node()?.getBBox();i&&e.append("text").text(n).attr("text-anchor","middle").attr("x",i.x+i.width/2).attr("y",-r).attr("class",t)},"insertTitle"),fs=s(e=>{if(typeof e=="number")return[e,e+"px"];let t=parseInt(e??"",10);return Number.isNaN(t)?[void 0,void 0]:e===String(t)?[t,e+"px"]:[t,e]},"parseFontSize");s(Fr,"cleanAndMerge");sr={assignWithDepth:Gn,wrapLabel:Op,calculateTextHeight:aE,calculateTextWidth:ha,calculateTextDimensions:Db,cleanAndMerge:Fr,detectInit:Kze,detectDirective:hne,isSubstringInArray:Zze,interpolateToCurve:PM,calcLabelPosition:tVe,calcCardinalityPosition:rVe,calcTerminalLabelPosition:nVe,formatUrl:Qze,getStylesFromArray:BM,generateId:$M,random:FM,runFunc:Jze,entityDecode:lVe,insertTitle:cVe,isLabelCoordinateInPath:uVe,parseFontSize:fs,InitIDGenerator:MM},pne=s(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){let n=r.substring(1,r.length-1);return/^\+?\d+$/.test(n)?"\uFB02\xB0\xB0"+n+"\xB6\xDF":"\uFB02\xB0"+n+"\xB6\xDF"}),t},"encodeEntities"),Wo=s(function(e){return e.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")},"decodeEntities"),xc=s((e,t,{counter:r=0,prefix:n,suffix:i},a)=>a||`${n?`${n}_`:""}${e}_${t}_${r}${i?`_${i}`:""}`,"getEdgeId");s(rn,"handleUndefinedAttr");s(uVe,"isLabelCoordinateInPath")});var mne,gne=F(()=>{"use strict";$r();mne=s((e,t)=>{if(t==="sandbox"){let n=lt("#i"+e).node()?.contentDocument;if(!n)throw new Error(`Sandbox iframe #i${e} is missing its content document`);return{root:lt(n.body),doc:n}}return{root:lt("body"),doc:document}},"getDiagramRoot")});function _l(e,t,r,n,i){let a=t[e];if(!a.width)if(r)a.text=Op(a.text,i,n),a.textLines=a.text.split(xt.lineBreakRegex).length,a.width=i,a.height=aE(a.text,n);else{let o=a.text.split(xt.lineBreakRegex);a.textLines=o.length;let l=0;a.height=0,a.width=0;for(let u of o)a.width=Math.max(ha(u,n),a.width),l=aE(u,n),a.height=a.height+l}return a}function Tne(e,t,r,n,i){let a=i.db,o=new oE(i);o.data.widthLimit=r.data.widthLimit/Math.min(zM,n.length);for(let[l,u]of n.entries()){let h=0;u.image={width:0,height:0,Y:0},u.sprite&&(u.image.width=48,u.image.height=48,u.image.Y=h,h=u.image.Y+u.image.height);let d=u.wrap&&lr.wrap,f=sE(lr);f.fontSize=f.fontSize+2,f.fontWeight="bold";let p=_l("label",u,d,f,o.data.widthLimit);if(p.Y=h+8,h=p.Y+p.height,u.type&&u.type.text!==""){u.type.text="["+u.type.text+"]";let v=sE(lr),x=_l("type",u,d,v,o.data.widthLimit);x.Y=h+5,h=x.Y+x.height}if(u.descr&&u.descr.text!==""){let v=sE(lr);v.fontSize=v.fontSize-2;let x=_l("descr",u,d,v,o.data.widthLimit);x.Y=h+20,h=x.Y+x.height}if(l==0||l%zM===0){let v=r.data.startx+lr.diagramMarginX,x=r.data.stopy+lr.diagramMarginY+h;o.setData(v,v,x,x)}else{let v=o.data.stopx!==o.data.startx?o.data.stopx+lr.diagramMarginX:o.data.startx,x=o.data.starty;o.setData(v,v,x,x)}o.name=u.alias;let m=a.getC4ShapeArray(u.alias),g=a.getC4ShapeKeys(u.alias);g.length>0&&bne(o,e,m,g),t=u.alias;let y=a.getBoundaries(t);y.length>0&&Tne(e,t,o,y,i),u.alias!=="global"&&xne(e,u,o),r.data.stopy=Math.max(o.data.stopy+lr.c4ShapeMargin,r.data.stopy),r.data.stopx=Math.max(o.data.stopx+lr.c4ShapeMargin,r.data.stopx),Mb=Math.max(Mb,r.data.stopx),Nb=Math.max(Nb,r.data.stopy)}}var Mb,Nb,vne,zM,lr,oE,VM,Ib,sE,hVe,xne,bne,$s,yne,dVe,fVe,pVe,WM,Cne=F(()=>{"use strict";Pre();Tt();GD();Gr();ZD();Zt();jD();Xg();Qt();gne();Dn();Mb=0,Nb=0,vne=4,zM=2;vx.yy=Sx;lr={},oE=class{static{s(this,"Bounds")}constructor(t){this.name="",this.data={},this.data.startx=void 0,this.data.stopx=void 0,this.data.starty=void 0,this.data.stopy=void 0,this.data.widthLimit=void 0,this.nextData={},this.nextData.startx=void 0,this.nextData.stopx=void 0,this.nextData.starty=void 0,this.nextData.stopy=void 0,this.nextData.cnt=0,VM(t.db.getConfig())}setData(t,r,n,i){this.nextData.startx=this.data.startx=t,this.nextData.stopx=this.data.stopx=r,this.nextData.starty=this.data.starty=n,this.nextData.stopy=this.data.stopy=i}updateVal(t,r,n,i){t[r]===void 0?t[r]=n:t[r]=i(n,t[r])}insert(t){this.nextData.cnt=this.nextData.cnt+1;let r=this.nextData.stopx,n=this.data.widthLimit,i=this.nextData.startx===this.nextData.stopx?r+t.margin:r+t.margin*2,a=i+t.width,o=this.nextData.starty+t.margin*2,l=o+t.height;(i>=n||a>=n||this.nextData.cnt>vne)&&(i=this.nextData.startx+t.margin+lr.nextLinePaddingX,o=this.nextData.stopy+t.margin*2,this.nextData.stopx=a=i+t.width,this.nextData.starty=this.nextData.stopy,this.nextData.stopy=l=o+t.height,this.nextData.cnt=1),t.x=i,t.y=o,this.updateVal(this.data,"startx",i,Math.min),this.updateVal(this.data,"starty",o,Math.min),this.updateVal(this.data,"stopx",a,Math.max),this.updateVal(this.data,"stopy",l,Math.max),this.updateVal(this.nextData,"startx",i,Math.min),this.updateVal(this.nextData,"starty",o,Math.min),this.updateVal(this.nextData,"stopx",a,Math.max),this.updateVal(this.nextData,"stopy",l,Math.max)}init(t){this.name="",this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0,widthLimit:void 0},this.nextData={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0,cnt:0},VM(t.db.getConfig())}bumpLastMargin(t){this.data.stopx+=t,this.data.stopy+=t}},VM=s(function(e){Gn(lr,e),e?.fontFamily&&(lr.personFontFamily=lr.systemFontFamily=lr.messageFontFamily=e.fontFamily),e?.fontSize&&(lr.personFontSize=lr.systemFontSize=lr.messageFontSize=e.fontSize),e?.fontWeight&&(lr.personFontWeight=lr.systemFontWeight=lr.messageFontWeight=e.fontWeight)},"setConf"),Ib=s((e,t)=>({fontFamily:e[t+"FontFamily"],fontSize:e[t+"FontSize"],fontWeight:e[t+"FontWeight"]}),"c4ShapeFont"),sE=s(e=>({fontFamily:e.boundaryFontFamily,fontSize:e.boundaryFontSize,fontWeight:e.boundaryFontWeight}),"boundaryFont"),hVe=s(e=>({fontFamily:e.messageFontFamily,fontSize:e.messageFontSize,fontWeight:e.messageFontWeight}),"messageFont");s(_l,"calcC4ShapeTextWH");xne=s(function(e,t,r){let n=r.data.startx,i=r.data.starty;t.x=n,t.y=i,t.width=r.data.stopx-n,t.height=r.data.stopy-i,t.label.y=lr.c4ShapeMargin-35;let a=t.wrap&&lr.wrap,o=sE(lr);o.fontSize=o.fontSize+2,o.fontWeight="bold";let l=ha(t.label.text,o);_l("label",t,a,o,l),Rl.drawBoundary(e,t,lr)},"drawBoundary"),bne=s(function(e,t,r,n){let i=0;for(let a of n){i=0;let o=r[Number(a)],l=Ib(lr,o.typeC4Shape.text);switch(l.fontSize=l.fontSize-2,o.typeC4Shape.width=ha("\xAB"+o.typeC4Shape.text+"\xBB",l),o.typeC4Shape.height=l.fontSize+2,o.typeC4Shape.Y=lr.c4ShapePadding,i=o.typeC4Shape.Y+o.typeC4Shape.height-4,o.image={width:0,height:0,Y:0},o.typeC4Shape.text){case"person":case"external_person":o.image.width=48,o.image.height=48,o.image.Y=i,i=o.image.Y+o.image.height;break}o.sprite&&(o.image.width=48,o.image.height=48,o.image.Y=i,i=o.image.Y+o.image.height);let u=o.wrap&&lr.wrap,h=lr.width-lr.c4ShapePadding*2,d=Ib(lr,o.typeC4Shape.text);d.fontSize=d.fontSize+2,d.fontWeight="bold";let f=_l("label",o,u,d,h);if(f.Y=i+8,i=f.Y+f.height,o.type&&o.type.text!==""){o.type.text="["+o.type.text+"]";let g=Ib(lr,o.typeC4Shape.text),y=_l("type",o,u,g,h);y.Y=i+5,i=y.Y+y.height}else if(o.techn&&o.techn.text!==""){o.techn.text="["+o.techn.text+"]";let g=Ib(lr,o.techn.text),y=_l("techn",o,u,g,h);y.Y=i+5,i=y.Y+y.height}let p=i,m=f.width;if(o.descr&&o.descr.text!==""){let g=Ib(lr,o.typeC4Shape.text),y=_l("descr",o,u,g,h);y.Y=i+20,i=y.Y+y.height,m=Math.max(f.width,y.width),p=i-y.textLines*5}m=m+lr.c4ShapePadding,o.width=Math.max(o.width||lr.width,m,lr.width),o.height=Math.max(o.height||lr.height,p,lr.height),o.margin=o.margin||lr.c4ShapeMargin,e.insert(o),Rl.drawC4Shape(t,o,lr)}e.bumpLastMargin(lr.c4ShapeMargin)},"drawC4ShapeArray"),$s=class{static{s(this,"Point")}constructor(t,r){this.x=t,this.y=r}},yne=s(function(e,t){let r=e.x,n=e.y,i=t.x,a=t.y,o=r+e.width/2,l=n+e.height/2,u=Math.abs(r-i),h=Math.abs(n-a),d=h/u,f=e.height/e.width,p=null;return n==a&&ri?p=new $s(r,l):r==i&&na&&(p=new $s(o,n)),r>i&&n=d?p=new $s(r,l+d*e.width/2):p=new $s(o-u/h*e.height/2,n+e.height):r=d?p=new $s(r+e.width,l+d*e.width/2):p=new $s(o+u/h*e.height/2,n+e.height):ra?f>=d?p=new $s(r+e.width,l-d*e.width/2):p=new $s(o+e.height/2*u/h,n):r>i&&n>a&&(f>=d?p=new $s(r,l-e.width/2*d):p=new $s(o-e.height/2*u/h,n)),p},"getIntersectPoint"),dVe=s(function(e,t){let r={x:0,y:0};r.x=t.x+t.width/2,r.y=t.y+t.height/2;let n=yne(e,r);r.x=e.x+e.width/2,r.y=e.y+e.height/2;let i=yne(t,r);return{startPoint:n,endPoint:i}},"getIntersectPoints"),fVe=s(function(e,t,r,n,i){let a=n.db.getC4Type(),o=0;for(let l of t){o=o+1;let u=l.wrap&&lr.wrap,h=hVe(lr);a==="C4Dynamic"&&(l.label.text=o+": "+l.label.text);let d=ha(l.label.text,h);_l("label",l,u,h,d),l.techn&&l.techn.text!==""&&(d=ha(l.techn.text,h),_l("techn",l,u,h,d)),l.descr&&l.descr.text!==""&&(d=ha(l.descr.text,h),_l("descr",l,u,h,d));let f=r(l.from),p=r(l.to);if(!f||!p)throw new Error(`C4 rel "${l.from}" -> "${l.to}" references an unknown shape`);let m=dVe(f,p);if(!m.startPoint||!m.endPoint)throw new Error(`Could not calculate intersection points for rel "${l.from}" -> "${l.to}"`);l.startPoint=m.startPoint,l.endPoint=m.endPoint}Rl.drawRels(e,t,lr,i)},"drawRels");s(Tne,"drawInsideBoundary");pVe=s(function(e,t,r,n){lr=yw("c4");let i=Le().securityLevel,{root:a}=mne(t,i),o=n.db;o.setWrap(lr.wrap),vne=o.getC4ShapeInRow(),zM=o.getC4BoundaryInRow(),te.debug(`C:${JSON.stringify(lr,null,2)}`);let l=a.select(`[id="${t}"]`);Rl.insertComputerIcon(l,t),Rl.insertDatabaseIcon(l,t),Rl.insertClockIcon(l,t);let u=new oE(n);u.setData(lr.diagramMarginX,lr.diagramMarginX,lr.diagramMarginY,lr.diagramMarginY),u.data.widthLimit=screen.availWidth,Mb=lr.diagramMarginX,Nb=lr.diagramMarginY;let h=o.getTitle(),d=o.getBoundaries("");Tne(l,"",u,d,n),Rl.insertArrowHead(l,t),Rl.insertArrowEnd(l,t),Rl.insertArrowCrossHead(l,t),Rl.insertArrowFilledHead(l,t),fVe(l,o.getRels(),o.getC4Shape,n,t),u.data.stopx=Mb,u.data.stopy=Nb;let f=u.data,p=f.startx,m=f.starty,y=Nb-m+2*lr.diagramMarginY,v=Mb-p,x=v+2*lr.diagramMarginX;h&&l.append("text").text(h).attr("x",v/2-4*lr.diagramMarginX).attr("y",m+lr.diagramMarginY),Br(l,y,x,lr.useMaxWidth);let b=h?60:0;l.attr("viewBox",p-lr.diagramMarginX+" -"+(lr.diagramMarginY+b)+" "+x+" "+(y+b)),te.debug("models:",f)},"draw"),WM={drawPersonOrSystemArray:bne,drawBoundary:xne,setConf:VM,draw:pVe}});var mVe,kne,wne=F(()=>{"use strict";mVe=s(e=>`.person { + stroke: ${e.personBorder}; + fill: ${e.personBkg}; + } +`,"getStyles"),kne=mVe});var Sne={};ar(Sne,{diagram:()=>gVe});var gVe,Ene=F(()=>{"use strict";GD();ZD();Cne();wne();gVe={parser:pZ,db:Sx,renderer:WM,styles:kne,init:s(({c4:e,wrap:t})=>{WM.setConf(e),Sx.setWrap(t)},"init")}});function Wne(e){return typeof e>"u"||e===null}function bVe(e){return typeof e=="object"&&e!==null}function TVe(e){return Array.isArray(e)?e:Wne(e)?[]:[e]}function CVe(e,t){var r,n,i,a;if(t)for(a=Object.keys(t),r=0,n=a.length;rl&&(a=" ... ",t=n-l+a.length),r-n>l&&(o=" ...",r=n+l-o.length),{str:a+e.slice(t,r).replace(/\t/g,"\u2192")+o,pos:n-t+a.length}}function HM(e,t){return Ki.repeat(" ",t-e.length)+e}function DVe(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,n=[0],i=[],a,o=-1;a=r.exec(e.buffer);)i.push(a.index),n.push(a.index+a[0].length),e.position<=a.index&&o<0&&(o=n.length-2);o<0&&(o=n.length-1);var l="",u,h,d=Math.min(e.line+t.linesAfter,i.length).toString().length,f=t.maxLength-(t.indent+d+3);for(u=1;u<=t.linesBefore&&!(o-u<0);u++)h=qM(e.buffer,n[o-u],i[o-u],e.position-(n[o]-n[o-u]),f),l=Ki.repeat(" ",t.indent)+HM((e.line-u+1).toString(),d)+" | "+h.str+` +`+l;for(h=qM(e.buffer,n[o],i[o],e.position,f),l+=Ki.repeat(" ",t.indent)+HM((e.line+1).toString(),d)+" | "+h.str+` +`,l+=Ki.repeat("-",t.indent+d+3+h.pos)+`^ +`,u=1;u<=t.linesAfter&&!(o+u>=i.length);u++)h=qM(e.buffer,n[o+u],i[o+u],e.position-(n[o]-n[o+u]),f),l+=Ki.repeat(" ",t.indent)+HM((e.line+u+1).toString(),d)+" | "+h.str+` +`;return l.replace(/\n$/,"")}function PVe(e){var t={};return e!==null&&Object.keys(e).forEach(function(r){e[r].forEach(function(n){t[String(n)]=r})}),t}function OVe(e,t){if(t=t||{},Object.keys(t).forEach(function(r){if(MVe.indexOf(r)===-1)throw new Fs('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=PVe(t.styleAliases||null),NVe.indexOf(this.kind)===-1)throw new Fs('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}function Rne(e,t){var r=[];return e[t].forEach(function(n){var i=r.length;r.forEach(function(a,o){a.tag===n.tag&&a.kind===n.kind&&a.multi===n.multi&&(i=o)}),r[i]=n}),r}function BVe(){var e={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},t,r;function n(i){i.multi?(e.multi[i.kind].push(i),e.multi.fallback.push(i)):e[i.kind][i.tag]=e.fallback[i.tag]=i}for(s(n,"collectType"),t=0,r=arguments.length;t=0&&(t=t.slice(1)),t===".inf"?r===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:t===".nan"?NaN:r*parseFloat(t,10)}function lWe(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(Ki.isNegativeZero(e))return"-0.0";return r=e.toString(10),oWe.test(r)?r.replace("e",".e"):r}function cWe(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1!==0||Ki.isNegativeZero(e))}function dWe(e){return e===null?!1:Une.exec(e)!==null||Yne.exec(e)!==null}function fWe(e){var t,r,n,i,a,o,l,u=0,h=null,d,f,p;if(t=Une.exec(e),t===null&&(t=Yne.exec(e)),t===null)throw new Error("Date resolve error");if(r=+t[1],n=+t[2]-1,i=+t[3],!t[4])return new Date(Date.UTC(r,n,i));if(a=+t[4],o=+t[5],l=+t[6],t[7]){for(u=t[7].slice(0,3);u.length<3;)u+="0";u=+u}return t[9]&&(d=+t[10],f=+(t[11]||0),h=(d*60+f)*6e4,t[9]==="-"&&(h=-h)),p=new Date(Date.UTC(r,n,i,a,o,l,u)),h&&p.setTime(p.getTime()-h),p}function pWe(e){return e.toISOString()}function gWe(e){return e==="<<"||e===null}function vWe(e){if(e===null)return!1;var t,r,n=0,i=e.length,a=QM;for(r=0;r64)){if(t<0)return!1;n+=6}return n%8===0}function xWe(e){var t,r,n=e.replace(/[\r\n=]/g,""),i=n.length,a=QM,o=0,l=[];for(t=0;t>16&255),l.push(o>>8&255),l.push(o&255)),o=o<<6|a.indexOf(n.charAt(t));return r=i%4*6,r===0?(l.push(o>>16&255),l.push(o>>8&255),l.push(o&255)):r===18?(l.push(o>>10&255),l.push(o>>2&255)):r===12&&l.push(o>>4&255),new Uint8Array(l)}function bWe(e){var t="",r=0,n,i,a=e.length,o=QM;for(n=0;n>18&63],t+=o[r>>12&63],t+=o[r>>6&63],t+=o[r&63]),r=(r<<8)+e[n];return i=a%3,i===0?(t+=o[r>>18&63],t+=o[r>>12&63],t+=o[r>>6&63],t+=o[r&63]):i===2?(t+=o[r>>10&63],t+=o[r>>4&63],t+=o[r<<2&63],t+=o[64]):i===1&&(t+=o[r>>2&63],t+=o[r<<4&63],t+=o[64],t+=o[64]),t}function TWe(e){return Object.prototype.toString.call(e)==="[object Uint8Array]"}function SWe(e){if(e===null)return!0;var t=[],r,n,i,a,o,l=e;for(r=0,n=l.length;r>10)+55296,(e-65536&1023)+56320)}function Jne(e,t,r){t==="__proto__"?Object.defineProperty(e,t,{configurable:!0,enumerable:!0,writable:!0,value:r}):e[t]=r}function qWe(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||jne,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=[]}function rie(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=IVe(r),new Fs(t,r)}function dr(e,t){throw rie(e,t)}function uE(e,t){e.onWarning&&e.onWarning.call(null,rie(e,t))}function pd(e,t,r,n){var i,a,o,l;if(t1&&(e.result+=Ki.repeat(` +`,t-1))}function HWe(e,t,r){var n,i,a,o,l,u,h,d,f=e.kind,p=e.result,m;if(m=e.input.charCodeAt(e.position),Gs(m)||q0(m)||m===35||m===38||m===42||m===33||m===124||m===62||m===39||m===34||m===37||m===64||m===96||(m===63||m===45)&&(i=e.input.charCodeAt(e.position+1),Gs(i)||r&&q0(i)))return!1;for(e.kind="scalar",e.result="",a=o=e.position,l=!1;m!==0;){if(m===58){if(i=e.input.charCodeAt(e.position+1),Gs(i)||r&&q0(i))break}else if(m===35){if(n=e.input.charCodeAt(e.position-1),Gs(n))break}else{if(e.position===e.lineStart&&fE(e)||r&&q0(m))break;if(bc(m))if(u=e.line,h=e.lineStart,d=e.lineIndent,Bi(e,!1,-1),e.lineIndent>=t){l=!0,m=e.input.charCodeAt(e.position);continue}else{e.position=o,e.line=u,e.lineStart=h,e.lineIndent=d;break}}l&&(pd(e,a,o,!1),eN(e,e.line-u),a=o=e.position,l=!1),$p(m)||(o=e.position+1),m=e.input.charCodeAt(++e.position)}return pd(e,a,o,!1),e.result?!0:(e.kind=f,e.result=p,!1)}function UWe(e,t){var r,n,i;if(r=e.input.charCodeAt(e.position),r!==39)return!1;for(e.kind="scalar",e.result="",e.position++,n=i=e.position;(r=e.input.charCodeAt(e.position))!==0;)if(r===39)if(pd(e,n,e.position,!0),r=e.input.charCodeAt(++e.position),r===39)n=e.position,e.position++,i=e.position;else return!0;else bc(r)?(pd(e,n,i,!0),eN(e,Bi(e,!1,t)),n=i=e.position):e.position===e.lineStart&&fE(e)?dr(e,"unexpected end of the document within a single quoted scalar"):(e.position++,i=e.position);dr(e,"unexpected end of the stream within a single quoted scalar")}function YWe(e,t){var r,n,i,a,o,l;if(l=e.input.charCodeAt(e.position),l!==34)return!1;for(e.kind="scalar",e.result="",e.position++,r=n=e.position;(l=e.input.charCodeAt(e.position))!==0;){if(l===34)return pd(e,r,e.position,!0),e.position++,!0;if(l===92){if(pd(e,r,e.position,!0),l=e.input.charCodeAt(++e.position),bc(l))Bi(e,!1,t);else if(l<256&&eie[l])e.result+=tie[l],e.position++;else if((o=zWe(l))>0){for(i=o,a=0;i>0;i--)l=e.input.charCodeAt(++e.position),(o=GWe(l))>=0?a=(a<<4)+o:dr(e,"expected hexadecimal character");e.result+=WWe(a),e.position++}else dr(e,"unknown escape sequence");r=n=e.position}else bc(l)?(pd(e,r,n,!0),eN(e,Bi(e,!1,t)),r=n=e.position):e.position===e.lineStart&&fE(e)?dr(e,"unexpected end of the document within a double quoted scalar"):(e.position++,n=e.position)}dr(e,"unexpected end of the stream within a double quoted scalar")}function jWe(e,t){var r=!0,n,i,a,o=e.tag,l,u=e.anchor,h,d,f,p,m,g=Object.create(null),y,v,x,b;if(b=e.input.charCodeAt(e.position),b===91)d=93,m=!1,l=[];else if(b===123)d=125,m=!0,l={};else return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=l),b=e.input.charCodeAt(++e.position);b!==0;){if(Bi(e,!0,t),b=e.input.charCodeAt(e.position),b===d)return e.position++,e.tag=o,e.anchor=u,e.kind=m?"mapping":"sequence",e.result=l,!0;r?b===44&&dr(e,"expected the node content, but found ','"):dr(e,"missed comma between flow collection entries"),v=y=x=null,f=p=!1,b===63&&(h=e.input.charCodeAt(e.position+1),Gs(h)&&(f=p=!0,e.position++,Bi(e,!0,t))),n=e.line,i=e.lineStart,a=e.position,U0(e,t,lE,!1,!0),v=e.tag,y=e.result,Bi(e,!0,t),b=e.input.charCodeAt(e.position),(p||e.line===n)&&b===58&&(f=!0,b=e.input.charCodeAt(++e.position),Bi(e,!0,t),U0(e,t,lE,!1,!0),x=e.result),m?H0(e,l,g,v,y,x,n,i,a):f?l.push(H0(e,null,g,v,y,x,n,i,a)):l.push(y),Bi(e,!0,t),b=e.input.charCodeAt(e.position),b===44?(r=!0,b=e.input.charCodeAt(++e.position)):r=!1}dr(e,"unexpected end of the stream within a flow collection")}function XWe(e,t){var r,n,i=UM,a=!1,o=!1,l=t,u=0,h=!1,d,f;if(f=e.input.charCodeAt(e.position),f===124)n=!1;else if(f===62)n=!0;else return!1;for(e.kind="scalar",e.result="";f!==0;)if(f=e.input.charCodeAt(++e.position),f===43||f===45)UM===i?i=f===43?_ne:OWe:dr(e,"repeat of a chomping mode identifier");else if((d=VWe(f))>=0)d===0?dr(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):o?dr(e,"repeat of an indentation width identifier"):(l=t+d-1,o=!0);else break;if($p(f)){do f=e.input.charCodeAt(++e.position);while($p(f));if(f===35)do f=e.input.charCodeAt(++e.position);while(!bc(f)&&f!==0)}for(;f!==0;){for(JM(e),e.lineIndent=0,f=e.input.charCodeAt(e.position);(!o||e.lineIndentl&&(l=e.lineIndent),bc(f)){u++;continue}if(e.lineIndentt)&&u!==0)dr(e,"bad indentation of a sequence entry");else if(e.lineIndentt)&&(v&&(o=e.line,l=e.lineStart,u=e.position),U0(e,t,cE,!0,i)&&(v?g=e.result:y=e.result),v||(H0(e,f,p,m,g,y,o,l,u),m=g=y=null),Bi(e,!0,-1),b=e.input.charCodeAt(e.position)),(e.line===a||e.lineIndent>t)&&b!==0)dr(e,"bad indentation of a mapping entry");else if(e.lineIndentt?u=1:e.lineIndent===t?u=0:e.lineIndentt?u=1:e.lineIndent===t?u=0:e.lineIndent tag; it should be "scalar", not "'+e.kind+'"'),f=0,p=e.implicitTypes.length;f"),e.result!==null&&g.kind!==e.kind&&dr(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)):dr(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")}return e.listener!==null&&e.listener("close",e),e.tag!==null||e.anchor!==null||d}function eqe(e){var t=e.position,r,n,i,a=!1,o;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap=Object.create(null),e.anchorMap=Object.create(null);(o=e.input.charCodeAt(e.position))!==0&&(Bi(e,!0,-1),o=e.input.charCodeAt(e.position),!(e.lineIndent>0||o!==37));){for(a=!0,o=e.input.charCodeAt(++e.position),r=e.position;o!==0&&!Gs(o);)o=e.input.charCodeAt(++e.position);for(n=e.input.slice(r,e.position),i=[],n.length<1&&dr(e,"directive name must not be less than one character in length");o!==0;){for(;$p(o);)o=e.input.charCodeAt(++e.position);if(o===35){do o=e.input.charCodeAt(++e.position);while(o!==0&&!bc(o));break}if(bc(o))break;for(r=e.position;o!==0&&!Gs(o);)o=e.input.charCodeAt(++e.position);i.push(e.input.slice(r,e.position))}o!==0&&JM(e),md.call(Ine,n)?Ine[n](e,n,i):uE(e,'unknown document directive "'+n+'"')}if(Bi(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,Bi(e,!0,-1)):a&&dr(e,"directives end mark is expected"),U0(e,e.lineIndent-1,cE,!1,!0),Bi(e,!0,-1),e.checkLineBreaks&&$We.test(e.input.slice(t,e.position))&&uE(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&fE(e)){e.input.charCodeAt(e.position)===46&&(e.position+=3,Bi(e,!0,-1));return}if(e.position"u"&&(r=t,t=null);var n=nie(e,r);if(typeof t!="function")return n;for(var i=0,a=n.length;i=55296&&r<=56319&&t+1=56320&&n<=57343)?(r-55296)*1024+n-56320+65536:r}function die(e){var t=/^\n* /;return t.test(e)}function Lqe(e,t,r,n,i,a,o,l){var u,h=0,d=null,f=!1,p=!1,m=n!==-1,g=-1,y=Rqe(Pb(e,0))&&_qe(Pb(e,e.length-1));if(t||o)for(u=0;u=65536?u+=2:u++){if(h=Pb(e,u),!Fb(h))return W0;y=y&&Bne(h,d,l),d=h}else{for(u=0;u=65536?u+=2:u++){if(h=Pb(e,u),h===Bb)f=!0,m&&(p=p||u-g-1>n&&e[g+1]!==" ",g=u);else if(!Fb(h))return W0;y=y&&Bne(h,d,l),d=h}p=p||m&&u-g-1>n&&e[g+1]!==" "}return!f&&!p?y&&!o&&!i(e)?fie:a===$b?W0:KM:r>9&&die(e)?W0:o?a===$b?W0:KM:p?mie:pie}function Dqe(e,t,r,n,i){e.dump=(function(){if(t.length===0)return e.quotingType===$b?'""':"''";if(!e.noCompatMode&&(Tqe.indexOf(t)!==-1||Cqe.test(t)))return e.quotingType===$b?'"'+t+'"':"'"+t+"'";var a=e.indent*Math.max(1,r),o=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-a),l=n||e.flowLevel>-1&&r>=e.flowLevel;function u(h){return Aqe(e,h)}switch(s(u,"testAmbiguity"),Lqe(t,l,e.indent,o,u,e.quotingType,e.forceQuotes&&!n,i)){case fie:return t;case KM:return"'"+t.replace(/'/g,"''")+"'";case pie:return"|"+$ne(t,e.indent)+Fne(Pne(t,a));case mie:return">"+$ne(t,e.indent)+Fne(Pne(Iqe(t,o),a));case W0:return'"'+Mqe(t)+'"';default:throw new Fs("impossible error: invalid scalar style")}})()}function $ne(e,t){var r=die(e)?String(t):"",n=e[e.length-1]===` +`,i=n&&(e[e.length-2]===` +`||e===` +`),a=i?"+":n?"":"-";return r+a+` +`}function Fne(e){return e[e.length-1]===` +`?e.slice(0,-1):e}function Iqe(e,t){for(var r=/(\n+)([^\n]*)/g,n=(function(){var h=e.indexOf(` +`);return h=h!==-1?h:e.length,r.lastIndex=h,Gne(e.slice(0,h),t)})(),i=e[0]===` +`||e[0]===" ",a,o;o=r.exec(e);){var l=o[1],u=o[2];a=u[0]===" ",n+=l+(!i&&!a&&u!==""?` +`:"")+Gne(u,t),i=a}return n}function Gne(e,t){if(e===""||e[0]===" ")return e;for(var r=/ [^ ]/g,n,i=0,a,o=0,l=0,u="";n=r.exec(e);)l=n.index,l-i>t&&(a=o>i?o:l,u+=` +`+e.slice(i,a),i=a+1),o=l;return u+=` +`,e.length-i>t&&o>i?u+=e.slice(i,o)+` +`+e.slice(o+1):u+=e.slice(i),u.slice(1)}function Mqe(e){for(var t="",r=0,n,i=0;i=65536?i+=2:i++)r=Pb(e,i),n=Ha[r],!n&&Fb(r)?(t+=e[i],r>=65536&&(t+=e[i+1])):t+=n||wqe(r);return t}function Nqe(e,t,r){var n="",i=e.tag,a,o,l;for(a=0,o=r.length;a"u"&&Gu(e,t,null,!1,!1))&&(n!==""&&(n+=","+(e.condenseFlow?"":" ")),n+=e.dump);e.tag=i,e.dump="["+n+"]"}function zne(e,t,r,n){var i="",a=e.tag,o,l,u;for(o=0,l=r.length;o"u"&&Gu(e,t+1,null,!0,!0,!1,!0))&&((!n||i!=="")&&(i+=XM(e,t)),e.dump&&Bb===e.dump.charCodeAt(0)?i+="-":i+="- ",i+=e.dump);e.tag=a,e.dump=i||"[]"}function Pqe(e,t,r){var n="",i=e.tag,a=Object.keys(r),o,l,u,h,d;for(o=0,l=a.length;o1024&&(d+="? "),d+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),Gu(e,t,h,!1,!1)&&(d+=e.dump,n+=d));e.tag=i,e.dump="{"+n+"}"}function Oqe(e,t,r,n){var i="",a=e.tag,o=Object.keys(r),l,u,h,d,f,p;if(e.sortKeys===!0)o.sort();else if(typeof e.sortKeys=="function")o.sort(e.sortKeys);else if(e.sortKeys)throw new Fs("sortKeys must be a boolean or a function");for(l=0,u=o.length;l1024,f&&(e.dump&&Bb===e.dump.charCodeAt(0)?p+="?":p+="? "),p+=e.dump,f&&(p+=XM(e,t)),Gu(e,t+1,d,!0,f)&&(e.dump&&Bb===e.dump.charCodeAt(0)?p+=":":p+=": ",p+=e.dump,i+=p));e.tag=a,e.dump=i||"{}"}function Vne(e,t,r){var n,i,a,o,l,u;for(i=r?e.explicitTypes:e.implicitTypes,a=0,o=i.length;a tag resolver accepts not "'+u+'" style');e.dump=n}return!0}return!1}function Gu(e,t,r,n,i,a,o){e.tag=null,e.dump=r,Vne(e,r,!1)||Vne(e,r,!0);var l=aie.call(e.dump),u=n,h;n&&(n=e.flowLevel<0||e.flowLevel>t);var d=l==="[object Object]"||l==="[object Array]",f,p;if(d&&(f=e.duplicates.indexOf(r),p=f!==-1),(e.tag!==null&&e.tag!=="?"||p||e.indent!==2&&t>0)&&(i=!1),p&&e.usedDuplicates[f])e.dump="*ref_"+f;else{if(d&&p&&!e.usedDuplicates[f]&&(e.usedDuplicates[f]=!0),l==="[object Object]")n&&Object.keys(e.dump).length!==0?(Oqe(e,t,e.dump,i),p&&(e.dump="&ref_"+f+e.dump)):(Pqe(e,t,e.dump),p&&(e.dump="&ref_"+f+" "+e.dump));else if(l==="[object Array]")n&&e.dump.length!==0?(e.noArrayIndent&&!o&&t>0?zne(e,t-1,e.dump,i):zne(e,t,e.dump,i),p&&(e.dump="&ref_"+f+e.dump)):(Nqe(e,t,e.dump),p&&(e.dump="&ref_"+f+" "+e.dump));else if(l==="[object String]")e.tag!=="?"&&Dqe(e,e.dump,t,a,u);else{if(l==="[object Undefined]")return!1;if(e.skipInvalid)return!1;throw new Fs("unacceptable kind of an object to dump "+l)}e.tag!==null&&e.tag!=="?"&&(h=encodeURI(e.tag[0]==="!"?e.tag.slice(1):e.tag).replace(/!/g,"%21"),e.tag[0]==="!"?h="!"+h:h.slice(0,18)==="tag:yaml.org,2002:"?h="!!"+h.slice(18):h="!<"+h+">",e.dump=h+" "+e.dump)}return!0}function Bqe(e,t){var r=[],n=[],i,a;for(ZM(e,r,n),i=0,a=n.length;i{"use strict";s(Wne,"isNothing");s(bVe,"isObject");s(TVe,"toArray");s(CVe,"extend");s(kVe,"repeat");s(wVe,"isNegativeZero");SVe=Wne,EVe=bVe,AVe=TVe,RVe=kVe,_Ve=wVe,LVe=CVe,Ki={isNothing:SVe,isObject:EVe,toArray:AVe,repeat:RVe,isNegativeZero:_Ve,extend:LVe};s(qne,"formatError");s(Ob,"YAMLException$1");Ob.prototype=Object.create(Error.prototype);Ob.prototype.constructor=Ob;Ob.prototype.toString=s(function(t){return this.name+": "+qne(this,t)},"toString");Fs=Ob;s(qM,"getLine");s(HM,"padStart");s(DVe,"makeSnippet");IVe=DVe,MVe=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],NVe=["scalar","sequence","mapping"];s(PVe,"compileStyleAliases");s(OVe,"Type$1");qa=OVe;s(Rne,"compileList");s(BVe,"compileMap");s(YM,"Schema$1");YM.prototype.extend=s(function(t){var r=[],n=[];if(t instanceof qa)n.push(t);else if(Array.isArray(t))n=n.concat(t);else if(t&&(Array.isArray(t.implicit)||Array.isArray(t.explicit)))t.implicit&&(r=r.concat(t.implicit)),t.explicit&&(n=n.concat(t.explicit));else throw new Fs("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");r.forEach(function(a){if(!(a instanceof qa))throw new Fs("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(a.loadKind&&a.loadKind!=="scalar")throw new Fs("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(a.multi)throw new Fs("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),n.forEach(function(a){if(!(a instanceof qa))throw new Fs("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var i=Object.create(YM.prototype);return i.implicit=(this.implicit||[]).concat(r),i.explicit=(this.explicit||[]).concat(n),i.compiledImplicit=Rne(i,"implicit"),i.compiledExplicit=Rne(i,"explicit"),i.compiledTypeMap=BVe(i.compiledImplicit,i.compiledExplicit),i},"extend");$Ve=YM,FVe=new qa("tag:yaml.org,2002:str",{kind:"scalar",construct:s(function(e){return e!==null?e:""},"construct")}),GVe=new qa("tag:yaml.org,2002:seq",{kind:"sequence",construct:s(function(e){return e!==null?e:[]},"construct")}),zVe=new qa("tag:yaml.org,2002:map",{kind:"mapping",construct:s(function(e){return e!==null?e:{}},"construct")}),VVe=new $Ve({explicit:[FVe,GVe,zVe]});s(WVe,"resolveYamlNull");s(qVe,"constructYamlNull");s(HVe,"isNull");UVe=new qa("tag:yaml.org,2002:null",{kind:"scalar",resolve:WVe,construct:qVe,predicate:HVe,represent:{canonical:s(function(){return"~"},"canonical"),lowercase:s(function(){return"null"},"lowercase"),uppercase:s(function(){return"NULL"},"uppercase"),camelcase:s(function(){return"Null"},"camelcase"),empty:s(function(){return""},"empty")},defaultStyle:"lowercase"});s(YVe,"resolveYamlBoolean");s(jVe,"constructYamlBoolean");s(XVe,"isBoolean");KVe=new qa("tag:yaml.org,2002:bool",{kind:"scalar",resolve:YVe,construct:jVe,predicate:XVe,represent:{lowercase:s(function(e){return e?"true":"false"},"lowercase"),uppercase:s(function(e){return e?"TRUE":"FALSE"},"uppercase"),camelcase:s(function(e){return e?"True":"False"},"camelcase")},defaultStyle:"lowercase"});s(ZVe,"isHexCode");s(QVe,"isOctCode");s(JVe,"isDecCode");s(eWe,"resolveYamlInteger");s(tWe,"constructYamlInteger");s(rWe,"isInteger");nWe=new qa("tag:yaml.org,2002:int",{kind:"scalar",resolve:eWe,construct:tWe,predicate:rWe,represent:{binary:s(function(e){return e>=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},"binary"),octal:s(function(e){return e>=0?"0o"+e.toString(8):"-0o"+e.toString(8).slice(1)},"octal"),decimal:s(function(e){return e.toString(10)},"decimal"),hexadecimal:s(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"]}}),iWe=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");s(aWe,"resolveYamlFloat");s(sWe,"constructYamlFloat");oWe=/^[-+]?[0-9]+e/;s(lWe,"representYamlFloat");s(cWe,"isFloat");uWe=new qa("tag:yaml.org,2002:float",{kind:"scalar",resolve:aWe,construct:sWe,predicate:cWe,represent:lWe,defaultStyle:"lowercase"}),Hne=VVe.extend({implicit:[UVe,KVe,nWe,uWe]}),hWe=Hne,Une=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),Yne=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]))?))?$");s(dWe,"resolveYamlTimestamp");s(fWe,"constructYamlTimestamp");s(pWe,"representYamlTimestamp");mWe=new qa("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:dWe,construct:fWe,instanceOf:Date,represent:pWe});s(gWe,"resolveYamlMerge");yWe=new qa("tag:yaml.org,2002:merge",{kind:"scalar",resolve:gWe}),QM=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/= +\r`;s(vWe,"resolveYamlBinary");s(xWe,"constructYamlBinary");s(bWe,"representYamlBinary");s(TWe,"isBinary");CWe=new qa("tag:yaml.org,2002:binary",{kind:"scalar",resolve:vWe,construct:xWe,predicate:TWe,represent:bWe}),kWe=Object.prototype.hasOwnProperty,wWe=Object.prototype.toString;s(SWe,"resolveYamlOmap");s(EWe,"constructYamlOmap");AWe=new qa("tag:yaml.org,2002:omap",{kind:"sequence",resolve:SWe,construct:EWe}),RWe=Object.prototype.toString;s(_We,"resolveYamlPairs");s(LWe,"constructYamlPairs");DWe=new qa("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:_We,construct:LWe}),IWe=Object.prototype.hasOwnProperty;s(MWe,"resolveYamlSet");s(NWe,"constructYamlSet");PWe=new qa("tag:yaml.org,2002:set",{kind:"mapping",resolve:MWe,construct:NWe}),jne=hWe.extend({implicit:[mWe,yWe],explicit:[CWe,AWe,DWe,PWe]}),md=Object.prototype.hasOwnProperty,lE=1,Xne=2,Kne=3,cE=4,UM=1,OWe=2,_ne=3,BWe=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,$We=/[\x85\u2028\u2029]/,FWe=/[,\[\]\{\}]/,Zne=/^(?:!|!!|![a-z\-]+!)$/i,Qne=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;s(Lne,"_class");s(bc,"is_EOL");s($p,"is_WHITE_SPACE");s(Gs,"is_WS_OR_EOL");s(q0,"is_FLOW_INDICATOR");s(GWe,"fromHexCode");s(zWe,"escapedHexLen");s(VWe,"fromDecimalCode");s(Dne,"simpleEscapeSequence");s(WWe,"charFromCodepoint");s(Jne,"setProperty");eie=new Array(256),tie=new Array(256);for(Bp=0;Bp<256;Bp++)eie[Bp]=Dne(Bp)?1:0,tie[Bp]=Dne(Bp);s(qWe,"State$1");s(rie,"generateError");s(dr,"throwError");s(uE,"throwWarning");Ine={YAML:s(function(t,r,n){var i,a,o;t.version!==null&&dr(t,"duplication of %YAML directive"),n.length!==1&&dr(t,"YAML directive accepts exactly one argument"),i=/^([0-9]+)\.([0-9]+)$/.exec(n[0]),i===null&&dr(t,"ill-formed argument of the YAML directive"),a=parseInt(i[1],10),o=parseInt(i[2],10),a!==1&&dr(t,"unacceptable YAML version of the document"),t.version=n[0],t.checkLineBreaks=o<2,o!==1&&o!==2&&uE(t,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:s(function(t,r,n){var i,a;n.length!==2&&dr(t,"TAG directive accepts exactly two arguments"),i=n[0],a=n[1],Zne.test(i)||dr(t,"ill-formed tag handle (first argument) of the TAG directive"),md.call(t.tagMap,i)&&dr(t,'there is a previously declared suffix for "'+i+'" tag handle'),Qne.test(a)||dr(t,"ill-formed tag prefix (second argument) of the TAG directive");try{a=decodeURIComponent(a)}catch{dr(t,"tag prefix is malformed: "+a)}t.tagMap[i]=a},"handleTagDirective")};s(pd,"captureSegment");s(Mne,"mergeMappings");s(H0,"storeMappingPair");s(JM,"readLineBreak");s(Bi,"skipSeparationSpace");s(fE,"testDocumentSeparator");s(eN,"writeFoldedLines");s(HWe,"readPlainScalar");s(UWe,"readSingleQuotedScalar");s(YWe,"readDoubleQuotedScalar");s(jWe,"readFlowCollection");s(XWe,"readBlockScalar");s(Nne,"readBlockSequence");s(KWe,"readBlockMapping");s(ZWe,"readTagProperty");s(QWe,"readAnchorProperty");s(JWe,"readAlias");s(U0,"composeNode");s(eqe,"readDocument");s(nie,"loadDocuments");s(tqe,"loadAll$1");s(rqe,"load$1");nqe=tqe,iqe=rqe,iie={loadAll:nqe,load:iqe},aie=Object.prototype.toString,sie=Object.prototype.hasOwnProperty,tN=65279,aqe=9,Bb=10,sqe=13,oqe=32,lqe=33,cqe=34,jM=35,uqe=37,hqe=38,dqe=39,fqe=42,oie=44,pqe=45,hE=58,mqe=61,gqe=62,yqe=63,vqe=64,lie=91,cie=93,xqe=96,uie=123,bqe=124,hie=125,Ha={};Ha[0]="\\0";Ha[7]="\\a";Ha[8]="\\b";Ha[9]="\\t";Ha[10]="\\n";Ha[11]="\\v";Ha[12]="\\f";Ha[13]="\\r";Ha[27]="\\e";Ha[34]='\\"';Ha[92]="\\\\";Ha[133]="\\N";Ha[160]="\\_";Ha[8232]="\\L";Ha[8233]="\\P";Tqe=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],Cqe=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;s(kqe,"compileStyleMap");s(wqe,"encodeHex");Sqe=1,$b=2;s(Eqe,"State");s(Pne,"indentString");s(XM,"generateNextLine");s(Aqe,"testImplicitResolving");s(dE,"isWhitespace");s(Fb,"isPrintable");s(One,"isNsCharOrWhitespace");s(Bne,"isPlainSafe");s(Rqe,"isPlainSafeFirst");s(_qe,"isPlainSafeLast");s(Pb,"codePointAt");s(die,"needIndentIndicator");fie=1,KM=2,pie=3,mie=4,W0=5;s(Lqe,"chooseScalarStyle");s(Dqe,"writeScalar");s($ne,"blockHeader");s(Fne,"dropEndingNewline");s(Iqe,"foldString");s(Gne,"foldLine");s(Mqe,"escapeString");s(Nqe,"writeFlowSequence");s(zne,"writeBlockSequence");s(Pqe,"writeFlowMapping");s(Oqe,"writeBlockMapping");s(Vne,"detectType");s(Gu,"writeNode");s(Bqe,"getDuplicateReferences");s(ZM,"inspectNode");s($qe,"dump$1");Fqe=$qe,Gqe={dump:Fqe};s(rN,"renamed");gd=Hne,yd=iie.load,hHt=iie.loadAll,dHt=Gqe.dump,fHt=rN("safeLoad","load"),pHt=rN("safeLoadAll","loadAll"),mHt=rN("safeDump","dump")});var yHt,Y0=F(()=>{"use strict";yHt=typeof performance<"u"&&typeof performance.now=="function";globalThis.injected??={includeLargeFeatures:!0,profiling:!1,version:"0.0.0"}});function sN(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}function Tie(e){Gp=e}function kn(e,t=""){let r=typeof e=="string"?e:e.source,n={replace:s((i,a)=>{let o=typeof a=="string"?a:a.source;return o=o.replace(ps.caret,"$1"),r=r.replace(i,o),n},"replace"),getRegex:s(()=>new RegExp(r,t),"getRegex")};return n}function Tc(e,t){if(t){if(ps.escapeTest.test(e))return e.replace(ps.escapeReplace,yie)}else if(ps.escapeTestNoEncode.test(e))return e.replace(ps.escapeReplaceNoEncode,yie);return e}function vie(e){try{e=encodeURI(e).replace(ps.percentDecode,"%")}catch{return null}return e}function xie(e,t){let r=e.replace(ps.findPipe,(a,o,l)=>{let u=!1,h=o;for(;--h>=0&&l[h]==="\\";)u=!u;return u?"|":" |"}),n=r.split(ps.splitPipe),i=0;if(n[0].trim()||n.shift(),n.length>0&&!n.at(-1)?.trim()&&n.pop(),t)if(n.length>t)n.splice(t);else for(;n.length0?-2:-1}function bie(e,t,r,n,i){let a=t.href,o=t.title||null,l=e[1].replace(i.other.outputLinkReplace,"$1");n.state.inLink=!0;let u={type:e[0].charAt(0)==="!"?"image":"link",raw:r,href:a,title:o,text:l,tokens:n.inlineTokens(l)};return n.state.inLink=!1,u}function THe(e,t,r){let n=e.match(r.other.indentCodeCompensation);if(n===null)return t;let i=n[1];return t.split(` +`).map(a=>{let o=a.match(r.other.beginningSpace);if(o===null)return a;let[l]=o;return l.length>=i.length?a.slice(i.length):a}).join(` +`)}function xn(e,t){return Fp.parse(e,t)}var Gp,qb,ps,zqe,Vqe,Wqe,Hb,qqe,oN,Cie,kie,Hqe,lN,Uqe,cN,Yqe,jqe,xE,uN,Xqe,wie,Kqe,hN,gie,Zqe,Qqe,Jqe,eHe,Sie,tHe,bE,dN,Eie,rHe,Aie,nHe,iHe,aHe,Rie,sHe,oHe,_ie,lHe,cHe,uHe,hHe,dHe,fHe,pHe,gE,mHe,Lie,Die,gHe,fN,yHe,nN,vHe,mE,zb,xHe,yie,yE,zu,vE,pN,Vu,Wb,CHe,Fp,bHt,THt,CHt,kHt,wHt,SHt,EHt,Iie=F(()=>{"use strict";s(sN,"L");Gp=sN();s(Tie,"G");qb={exec:s(()=>null,"exec")};s(kn,"h");ps={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,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:s(e=>new RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),"listItemRegex"),nextBulletRegex:s(e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),"nextBulletRegex"),hrRegex:s(e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),"hrRegex"),fencesBeginRegex:s(e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),"fencesBeginRegex"),headingBeginRegex:s(e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),"headingBeginRegex"),htmlBeginRegex:s(e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i"),"htmlBeginRegex")},zqe=/^(?:[ \t]*(?:\n|$))+/,Vqe=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Wqe=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Hb=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,qqe=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,oN=/(?:[*+-]|\d{1,9}[.)])/,Cie=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,kie=kn(Cie).replace(/bull/g,oN).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(),Hqe=kn(Cie).replace(/bull/g,oN).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(),lN=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,Uqe=/^[^\n]+/,cN=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,Yqe=kn(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",cN).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),jqe=kn(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,oN).getRegex(),xE="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",uN=/|$))/,Xqe=kn("^ {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",uN).replace("tag",xE).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),wie=kn(lN).replace("hr",Hb).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",xE).getRegex(),Kqe=kn(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",wie).getRegex(),hN={blockquote:Kqe,code:Vqe,def:Yqe,fences:Wqe,heading:qqe,hr:Hb,html:Xqe,lheading:kie,list:jqe,newline:zqe,paragraph:wie,table:qb,text:Uqe},gie=kn("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Hb).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",xE).getRegex(),Zqe={...hN,lheading:Hqe,table:gie,paragraph:kn(lN).replace("hr",Hb).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",gie).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",xE).getRegex()},Qqe={...hN,html:kn(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",uN).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:qb,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:kn(lN).replace("hr",Hb).replace("heading",` *#{1,6} *[^ +]`).replace("lheading",kie).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},Jqe=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,eHe=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Sie=/^( {2,}|\\)\n(?!\s*$)/,tHe=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\]*?>/g,Rie=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,sHe=kn(Rie,"u").replace(/punct/g,bE).getRegex(),oHe=kn(Rie,"u").replace(/punct/g,Aie).getRegex(),_ie="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",lHe=kn(_ie,"gu").replace(/notPunctSpace/g,Eie).replace(/punctSpace/g,dN).replace(/punct/g,bE).getRegex(),cHe=kn(_ie,"gu").replace(/notPunctSpace/g,iHe).replace(/punctSpace/g,nHe).replace(/punct/g,Aie).getRegex(),uHe=kn("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,Eie).replace(/punctSpace/g,dN).replace(/punct/g,bE).getRegex(),hHe=kn(/\\(punct)/,"gu").replace(/punct/g,bE).getRegex(),dHe=kn(/^<(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(),fHe=kn(uN).replace("(?:-->|$)","-->").getRegex(),pHe=kn("^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^").replace("comment",fHe).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),gE=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`[^`]*`|[^\[\]\\`])*?/,mHe=kn(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",gE).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Lie=kn(/^!?\[(label)\]\[(ref)\]/).replace("label",gE).replace("ref",cN).getRegex(),Die=kn(/^!?\[(ref)\](?:\[\])?/).replace("ref",cN).getRegex(),gHe=kn("reflink|nolink(?!\\()","g").replace("reflink",Lie).replace("nolink",Die).getRegex(),fN={_backpedal:qb,anyPunctuation:hHe,autolink:dHe,blockSkip:aHe,br:Sie,code:eHe,del:qb,emStrongLDelim:sHe,emStrongRDelimAst:lHe,emStrongRDelimUnd:uHe,escape:Jqe,link:mHe,nolink:Die,punctuation:rHe,reflink:Lie,reflinkSearch:gHe,tag:pHe,text:tHe,url:qb},yHe={...fN,link:kn(/^!?\[(label)\]\((.*?)\)/).replace("label",gE).getRegex(),reflink:kn(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",gE).getRegex()},nN={...fN,emStrongRDelimAst:cHe,emStrongLDelim:oHe,url:kn(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").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:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\":">",'"':""","'":"'"},yie=s(e=>xHe[e],"ke");s(Tc,"w");s(vie,"J");s(xie,"V");s(Vb,"z");s(bHe,"ge");s(bie,"fe");s(THe,"Je");yE=class{static{s(this,"y")}options;rules;lexer;constructor(e){this.options=e||Gp}space(e){let t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){let t=this.rules.block.code.exec(e);if(t){let r=t[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?r:Vb(r,` +`)}}}fences(e){let t=this.rules.block.fences.exec(e);if(t){let r=t[0],n=THe(r,t[3]||"",this.rules);return{type:"code",raw:r,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:n}}}heading(e){let t=this.rules.block.heading.exec(e);if(t){let r=t[2].trim();if(this.rules.other.endingHash.test(r)){let n=Vb(r,"#");(this.options.pedantic||!n||this.rules.other.endingSpaceChar.test(n))&&(r=n.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:r,tokens:this.lexer.inline(r)}}}hr(e){let t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:Vb(t[0],` +`)}}blockquote(e){let t=this.rules.block.blockquote.exec(e);if(t){let r=Vb(t[0],` +`).split(` +`),n="",i="",a=[];for(;r.length>0;){let o=!1,l=[],u;for(u=0;u1,i={type:"list",raw:"",ordered:n,start:n?+r.slice(0,-1):"",loose:!1,items:[]};r=n?`\\d{1,9}\\${r.slice(-1)}`:`\\${r}`,this.options.pedantic&&(r=n?r:"[*+-]");let a=this.rules.other.listItemRegex(r),o=!1;for(;e;){let u=!1,h="",d="";if(!(t=a.exec(e))||this.rules.block.hr.test(e))break;h=t[0],e=e.substring(h.length);let f=t[2].split(` +`,1)[0].replace(this.rules.other.listReplaceTabs,x=>" ".repeat(3*x.length)),p=e.split(` +`,1)[0],m=!f.trim(),g=0;if(this.options.pedantic?(g=2,d=f.trimStart()):m?g=t[1].length+1:(g=t[2].search(this.rules.other.nonSpaceChar),g=g>4?1:g,d=f.slice(g),g+=t[1].length),m&&this.rules.other.blankLine.test(p)&&(h+=p+` +`,e=e.substring(p.length+1),u=!0),!u){let x=this.rules.other.nextBulletRegex(g),b=this.rules.other.hrRegex(g),T=this.rules.other.fencesBeginRegex(g),w=this.rules.other.headingBeginRegex(g),C=this.rules.other.htmlBeginRegex(g);for(;e;){let k=e.split(` +`,1)[0],S;if(p=k,this.options.pedantic?(p=p.replace(this.rules.other.listReplaceNesting," "),S=p):S=p.replace(this.rules.other.tabCharGlobal," "),T.test(p)||w.test(p)||C.test(p)||x.test(p)||b.test(p))break;if(S.search(this.rules.other.nonSpaceChar)>=g||!p.trim())d+=` +`+S.slice(g);else{if(m||f.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||T.test(f)||w.test(f)||b.test(f))break;d+=` +`+p}!m&&!p.trim()&&(m=!0),h+=k+` +`,e=e.substring(k.length+1),f=S.slice(g)}}i.loose||(o?i.loose=!0:this.rules.other.doubleBlankLine.test(h)&&(o=!0));let y=null,v;this.options.gfm&&(y=this.rules.other.listIsTask.exec(d),y&&(v=y[0]!=="[ ] ",d=d.replace(this.rules.other.listReplaceTask,""))),i.items.push({type:"list_item",raw:h,task:!!y,checked:v,loose:!1,text:d,tokens:[]}),i.raw+=h}let l=i.items.at(-1);if(l)l.raw=l.raw.trimEnd(),l.text=l.text.trimEnd();else return;i.raw=i.raw.trimEnd();for(let u=0;uf.type==="space"),d=h.length>0&&h.some(f=>this.rules.other.anyLine.test(f.raw));i.loose=d}if(i.loose)for(let u=0;u({text:l,tokens:this.lexer.inline(l),header:!1,align:a.align[u]})));return a}}lheading(e){let t=this.rules.block.lheading.exec(e);if(t)return{type:"heading",raw:t[0],depth:t[2].charAt(0)==="="?1:2,text:t[1],tokens:this.lexer.inline(t[1])}}paragraph(e){let t=this.rules.block.paragraph.exec(e);if(t){let r=t[1].charAt(t[1].length-1)===` +`?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:r,tokens:this.lexer.inline(r)}}}text(e){let t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){let t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:t[1]}}tag(e){let t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){let t=this.rules.inline.link.exec(e);if(t){let r=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(r)){if(!this.rules.other.endAngleBracket.test(r))return;let a=Vb(r.slice(0,-1),"\\");if((r.length-a.length)%2===0)return}else{let a=bHe(t[2],"()");if(a===-2)return;if(a>-1){let o=(t[0].indexOf("!")===0?5:4)+t[1].length+a;t[2]=t[2].substring(0,a),t[0]=t[0].substring(0,o).trim(),t[3]=""}}let n=t[2],i="";if(this.options.pedantic){let a=this.rules.other.pedanticHrefTitle.exec(n);a&&(n=a[1],i=a[3])}else i=t[3]?t[3].slice(1,-1):"";return n=n.trim(),this.rules.other.startAngleBracket.test(n)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(r)?n=n.slice(1):n=n.slice(1,-1)),bie(t,{href:n&&n.replace(this.rules.inline.anyPunctuation,"$1"),title:i&&i.replace(this.rules.inline.anyPunctuation,"$1")},t[0],this.lexer,this.rules)}}reflink(e,t){let r;if((r=this.rules.inline.reflink.exec(e))||(r=this.rules.inline.nolink.exec(e))){let n=(r[2]||r[1]).replace(this.rules.other.multipleSpaceGlobal," "),i=t[n.toLowerCase()];if(!i){let a=r[0].charAt(0);return{type:"text",raw:a,text:a}}return bie(r,i,r[0],this.lexer,this.rules)}}emStrong(e,t,r=""){let n=this.rules.inline.emStrongLDelim.exec(e);if(!(!n||n[3]&&r.match(this.rules.other.unicodeAlphaNumeric))&&(!(n[1]||n[2])||!r||this.rules.inline.punctuation.exec(r))){let i=[...n[0]].length-1,a,o,l=i,u=0,h=n[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(h.lastIndex=0,t=t.slice(-1*e.length+i);(n=h.exec(t))!=null;){if(a=n[1]||n[2]||n[3]||n[4]||n[5]||n[6],!a)continue;if(o=[...a].length,n[3]||n[4]){l+=o;continue}else if((n[5]||n[6])&&i%3&&!((i+o)%3)){u+=o;continue}if(l-=o,l>0)continue;o=Math.min(o,o+l+u);let d=[...n[0]][0].length,f=e.slice(0,i+n.index+d+o);if(Math.min(i,o)%2){let m=f.slice(1,-1);return{type:"em",raw:f,text:m,tokens:this.lexer.inlineTokens(m)}}let p=f.slice(2,-2);return{type:"strong",raw:f,text:p,tokens:this.lexer.inlineTokens(p)}}}}codespan(e){let t=this.rules.inline.code.exec(e);if(t){let r=t[2].replace(this.rules.other.newLineCharGlobal," "),n=this.rules.other.nonSpaceChar.test(r),i=this.rules.other.startingSpaceChar.test(r)&&this.rules.other.endingSpaceChar.test(r);return n&&i&&(r=r.substring(1,r.length-1)),{type:"codespan",raw:t[0],text:r}}}br(e){let t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e){let t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}}autolink(e){let t=this.rules.inline.autolink.exec(e);if(t){let r,n;return t[2]==="@"?(r=t[1],n="mailto:"+r):(r=t[1],n=r),{type:"link",raw:t[0],text:r,href:n,tokens:[{type:"text",raw:r,text:r}]}}}url(e){let t;if(t=this.rules.inline.url.exec(e)){let r,n;if(t[2]==="@")r=t[0],n="mailto:"+r;else{let i;do i=t[0],t[0]=this.rules.inline._backpedal.exec(t[0])?.[0]??"";while(i!==t[0]);r=t[0],t[1]==="www."?n="http://"+t[0]:n=t[0]}return{type:"link",raw:t[0],text:r,href:n,tokens:[{type:"text",raw:r,text:r}]}}}inlineText(e){let t=this.rules.inline.text.exec(e);if(t){let r=this.lexer.state.inRawBlock;return{type:"text",raw:t[0],text:t[0],escaped:r}}}},zu=class iN{static{s(this,"l")}tokens;options;state;tokenizer;inlineQueue;constructor(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||Gp,this.options.tokenizer=this.options.tokenizer||new yE,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:ps,block:mE.normal,inline:zb.normal};this.options.pedantic?(r.block=mE.pedantic,r.inline=zb.pedantic):this.options.gfm&&(r.block=mE.gfm,this.options.breaks?r.inline=zb.breaks:r.inline=zb.gfm),this.tokenizer.rules=r}static get rules(){return{block:mE,inline:zb}}static lex(t,r){return new iN(r).lex(t)}static lexInline(t,r){return new iN(r).inlineTokens(t)}lex(t){t=t.replace(ps.carriageReturn,` +`),this.blockTokens(t,this.tokens);for(let r=0;r(i=o.call({lexer:this},t,r))?(t=t.substring(i.raw.length),r.push(i),!0):!1))continue;if(i=this.tokenizer.space(t)){t=t.substring(i.raw.length);let o=r.at(-1);i.raw.length===1&&o!==void 0?o.raw+=` +`:r.push(i);continue}if(i=this.tokenizer.code(t)){t=t.substring(i.raw.length);let o=r.at(-1);o?.type==="paragraph"||o?.type==="text"?(o.raw+=(o.raw.endsWith(` +`)?"":` +`)+i.raw,o.text+=` +`+i.text,this.inlineQueue.at(-1).src=o.text):r.push(i);continue}if(i=this.tokenizer.fences(t)){t=t.substring(i.raw.length),r.push(i);continue}if(i=this.tokenizer.heading(t)){t=t.substring(i.raw.length),r.push(i);continue}if(i=this.tokenizer.hr(t)){t=t.substring(i.raw.length),r.push(i);continue}if(i=this.tokenizer.blockquote(t)){t=t.substring(i.raw.length),r.push(i);continue}if(i=this.tokenizer.list(t)){t=t.substring(i.raw.length),r.push(i);continue}if(i=this.tokenizer.html(t)){t=t.substring(i.raw.length),r.push(i);continue}if(i=this.tokenizer.def(t)){t=t.substring(i.raw.length);let o=r.at(-1);o?.type==="paragraph"||o?.type==="text"?(o.raw+=(o.raw.endsWith(` +`)?"":` +`)+i.raw,o.text+=` +`+i.raw,this.inlineQueue.at(-1).src=o.text):this.tokens.links[i.tag]||(this.tokens.links[i.tag]={href:i.href,title:i.title},r.push(i));continue}if(i=this.tokenizer.table(t)){t=t.substring(i.raw.length),r.push(i);continue}if(i=this.tokenizer.lheading(t)){t=t.substring(i.raw.length),r.push(i);continue}let a=t;if(this.options.extensions?.startBlock){let o=1/0,l=t.slice(1),u;this.options.extensions.startBlock.forEach(h=>{u=h.call({lexer:this},l),typeof u=="number"&&u>=0&&(o=Math.min(o,u))}),o<1/0&&o>=0&&(a=t.substring(0,o+1))}if(this.state.top&&(i=this.tokenizer.paragraph(a))){let o=r.at(-1);n&&o?.type==="paragraph"?(o.raw+=(o.raw.endsWith(` +`)?"":` +`)+i.raw,o.text+=` +`+i.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=o.text):r.push(i),n=a.length!==t.length,t=t.substring(i.raw.length);continue}if(i=this.tokenizer.text(t)){t=t.substring(i.raw.length);let o=r.at(-1);o?.type==="text"?(o.raw+=(o.raw.endsWith(` +`)?"":` +`)+i.raw,o.text+=` +`+i.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=o.text):r.push(i);continue}if(t){let o="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(o);break}else throw new Error(o)}}return this.state.top=!0,r}inline(t,r=[]){return this.inlineQueue.push({src:t,tokens:r}),r}inlineTokens(t,r=[]){let n=t,i=null;if(this.tokens.links){let l=Object.keys(this.tokens.links);if(l.length>0)for(;(i=this.tokenizer.rules.inline.reflinkSearch.exec(n))!=null;)l.includes(i[0].slice(i[0].lastIndexOf("[")+1,-1))&&(n=n.slice(0,i.index)+"["+"a".repeat(i[0].length-2)+"]"+n.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(i=this.tokenizer.rules.inline.anyPunctuation.exec(n))!=null;)n=n.slice(0,i.index)+"++"+n.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;(i=this.tokenizer.rules.inline.blockSkip.exec(n))!=null;)n=n.slice(0,i.index)+"["+"a".repeat(i[0].length-2)+"]"+n.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);n=this.options.hooks?.emStrongMask?.call({lexer:this},n)??n;let a=!1,o="";for(;t;){a||(o=""),a=!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,n,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 u=t;if(this.options.extensions?.startInline){let h=1/0,d=t.slice(1),f;this.options.extensions.startInline.forEach(p=>{f=p.call({lexer:this},d),typeof f=="number"&&f>=0&&(h=Math.min(h,f))}),h<1/0&&h>=0&&(u=t.substring(0,h+1))}if(l=this.tokenizer.inlineText(u)){t=t.substring(l.raw.length),l.raw.slice(-1)!=="_"&&(o=l.raw.slice(-1)),a=!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}},vE=class{static{s(this,"P")}options;parser;constructor(e){this.options=e||Gp}space(e){return""}code({text:e,lang:t,escaped:r}){let n=(t||"").match(ps.notSpaceStart)?.[0],i=e.replace(ps.endingNewline,"")+` +`;return n?'
'+(r?i:Tc(i,!0))+`
+`:"
"+(r?i:Tc(i,!0))+`
+`}blockquote({tokens:e}){return`
+${this.parser.parse(e)}
+`}html({text:e}){return e}def(e){return""}heading({tokens:e,depth:t}){return`${this.parser.parseInline(e)} +`}hr(e){return`
+`}list(e){let t=e.ordered,r=e.start,n="";for(let o=0;o +`+n+" +`}listitem(e){let t="";if(e.task){let r=this.checkbox({checked:!!e.checked});e.loose?e.tokens[0]?.type==="paragraph"?(e.tokens[0].text=r+" "+e.tokens[0].text,e.tokens[0].tokens&&e.tokens[0].tokens.length>0&&e.tokens[0].tokens[0].type==="text"&&(e.tokens[0].tokens[0].text=r+" "+Tc(e.tokens[0].tokens[0].text),e.tokens[0].tokens[0].escaped=!0)):e.tokens.unshift({type:"text",raw:r+" ",text:r+" ",escaped:!0}):t+=r+" "}return t+=this.parser.parse(e.tokens,!!e.loose),`
  • ${t}
  • +`}checkbox({checked:e}){return"'}paragraph({tokens:e}){return`

    ${this.parser.parseInline(e)}

    +`}table(e){let t="",r="";for(let i=0;i${n}`),` + +`+t+` +`+n+`
    +`}tablerow({text:e}){return` +${e} +`}tablecell(e){let t=this.parser.parseInline(e.tokens),r=e.header?"th":"td";return(e.align?`<${r} align="${e.align}">`:`<${r}>`)+t+` +`}strong({tokens:e}){return`${this.parser.parseInline(e)}`}em({tokens:e}){return`${this.parser.parseInline(e)}`}codespan({text:e}){return`${Tc(e,!0)}`}br(e){return"
    "}del({tokens:e}){return`${this.parser.parseInline(e)}`}link({href:e,title:t,tokens:r}){let n=this.parser.parseInline(r),i=vie(e);if(i===null)return n;e=i;let a='
    ",a}image({href:e,title:t,text:r,tokens:n}){n&&(r=this.parser.parseInline(n,this.parser.textRenderer));let i=vie(e);if(i===null)return Tc(r);e=i;let a=`${r}{let o=i[a].flat(1/0);r=r.concat(this.walkTokens(o,t))}):i.tokens&&(r=r.concat(this.walkTokens(i.tokens,t)))}}return r}use(...e){let t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(r=>{let n={...r};if(n.async=this.defaults.async||n.async||!1,r.extensions&&(r.extensions.forEach(i=>{if(!i.name)throw new Error("extension name required");if("renderer"in i){let a=t.renderers[i.name];a?t.renderers[i.name]=function(...o){let l=i.renderer.apply(this,o);return l===!1&&(l=a.apply(this,o)),l}:t.renderers[i.name]=i.renderer}if("tokenizer"in i){if(!i.level||i.level!=="block"&&i.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let a=t[i.level];a?a.unshift(i.tokenizer):t[i.level]=[i.tokenizer],i.start&&(i.level==="block"?t.startBlock?t.startBlock.push(i.start):t.startBlock=[i.start]:i.level==="inline"&&(t.startInline?t.startInline.push(i.start):t.startInline=[i.start]))}"childTokens"in i&&i.childTokens&&(t.childTokens[i.name]=i.childTokens)}),n.extensions=t),r.renderer){let i=this.defaults.renderer||new vE(this.defaults);for(let a in r.renderer){if(!(a in i))throw new Error(`renderer '${a}' does not exist`);if(["options","parser"].includes(a))continue;let o=a,l=r.renderer[o],u=i[o];i[o]=(...h)=>{let d=l.apply(i,h);return d===!1&&(d=u.apply(i,h)),d||""}}n.renderer=i}if(r.tokenizer){let i=this.defaults.tokenizer||new yE(this.defaults);for(let a in r.tokenizer){if(!(a in i))throw new Error(`tokenizer '${a}' does not exist`);if(["options","rules","lexer"].includes(a))continue;let o=a,l=r.tokenizer[o],u=i[o];i[o]=(...h)=>{let d=l.apply(i,h);return d===!1&&(d=u.apply(i,h)),d}}n.tokenizer=i}if(r.hooks){let i=this.defaults.hooks||new Wb;for(let a in r.hooks){if(!(a in i))throw new Error(`hook '${a}' does not exist`);if(["options","block"].includes(a))continue;let o=a,l=r.hooks[o],u=i[o];Wb.passThroughHooks.has(a)?i[o]=h=>{if(this.defaults.async&&Wb.passThroughHooksRespectAsync.has(a))return Promise.resolve(l.call(i,h)).then(f=>u.call(i,f));let d=l.call(i,h);return u.call(i,d)}:i[o]=(...h)=>{let d=l.apply(i,h);return d===!1&&(d=u.apply(i,h)),d}}n.hooks=i}if(r.walkTokens){let i=this.defaults.walkTokens,a=r.walkTokens;n.walkTokens=function(o){let l=[];return l.push(a.call(this,o)),i&&(l=l.concat(i.call(this,o))),l}}this.defaults={...this.defaults,...n}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return zu.lex(e,t??this.defaults)}parser(e,t){return Vu.parse(e,t??this.defaults)}parseMarkdown(e){return(t,r)=>{let n={...r},i={...this.defaults,...n},a=this.onError(!!i.silent,!!i.async);if(this.defaults.async===!0&&n.async===!1)return a(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 t>"u"||t===null)return a(new Error("marked(): input parameter is undefined or null"));if(typeof t!="string")return a(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(t)+", string expected"));i.hooks&&(i.hooks.options=i,i.hooks.block=e);let o=i.hooks?i.hooks.provideLexer():e?zu.lex:zu.lexInline,l=i.hooks?i.hooks.provideParser():e?Vu.parse:Vu.parseInline;if(i.async)return Promise.resolve(i.hooks?i.hooks.preprocess(t):t).then(u=>o(u,i)).then(u=>i.hooks?i.hooks.processAllTokens(u):u).then(u=>i.walkTokens?Promise.all(this.walkTokens(u,i.walkTokens)).then(()=>u):u).then(u=>l(u,i)).then(u=>i.hooks?i.hooks.postprocess(u):u).catch(a);try{i.hooks&&(t=i.hooks.preprocess(t));let u=o(t,i);i.hooks&&(u=i.hooks.processAllTokens(u)),i.walkTokens&&this.walkTokens(u,i.walkTokens);let h=l(u,i);return i.hooks&&(h=i.hooks.postprocess(h)),h}catch(u){return a(u)}}}onError(e,t){return r=>{if(r.message+=` +Please report this to https://github.com/markedjs/marked.`,e){let n="

    An error occurred:

    "+Tc(r.message+"",!0)+"
    ";return t?Promise.resolve(n):n}if(t)return Promise.reject(r);throw r}}},Fp=new CHe;s(xn,"d");xn.options=xn.setOptions=function(e){return Fp.setOptions(e),xn.defaults=Fp.defaults,Tie(xn.defaults),xn};xn.getDefaults=sN;xn.defaults=Gp;xn.use=function(...e){return Fp.use(...e),xn.defaults=Fp.defaults,Tie(xn.defaults),xn};xn.walkTokens=function(e,t){return Fp.walkTokens(e,t)};xn.parseInline=Fp.parseInline;xn.Parser=Vu;xn.parser=Vu.parse;xn.Renderer=vE;xn.TextRenderer=pN;xn.Lexer=zu;xn.lexer=zu.lex;xn.Tokenizer=yE;xn.Hooks=Wb;xn.parse=xn;bHt=xn.options,THt=xn.setOptions,CHt=xn.use,kHt=xn.walkTokens,wHt=xn.parseInline,SHt=Vu.parse,EHt=zu.lex});function kHe(e,{markdownAutoWrap:t}){let n=e.replace(//g,` +`).replace(/\n{2,}/g,` +`);return hw(n)}function Mie(e){return e.split(/\\n|\n|/gi).map(t=>t.trim().match(/<[^>]+>|[^\s<>]+/g)?.map(r=>({content:r,type:"normal"}))??[])}function Nie(e,t={}){let r=kHe(e,t),n=xn.lexer(r),i=[[]],a=0;function o(l,u="normal"){l.type==="text"?l.text.split(` +`).forEach((d,f)=>{f!==0&&(a++,i.push([])),d.split(" ").forEach(p=>{p=p.replace(/'/g,"'"),p&&i[a].push({content:p,type:u})})}):l.type==="strong"||l.type==="em"?l.tokens.forEach(h=>{o(h,l.type)}):l.type==="html"&&i[a].push({content:l.text,type:"normal"})}return s(o,"processNode"),n.forEach(l=>{l.type==="paragraph"?l.tokens?.forEach(u=>{o(u)}):l.type==="html"?i[a].push({content:l.text,type:"normal"}):i[a].push({content:l.raw,type:"normal"})}),i}function Pie(e){return e?`

    ${e.replace(/\\n|\n/g,"
    ")}

    `:""}function Oie(e,{markdownAutoWrap:t}={}){let r=xn.lexer(e);function n(i){return i.type==="text"?t===!1?i.text.replace(/\n */g,"
    ").replace(/ /g," "):i.text.replace(/\n */g,"
    "):i.type==="strong"?`${i.tokens?.map(n).join("")}`:i.type==="em"?`${i.tokens?.map(n).join("")}`:i.type==="paragraph"?`

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

    `:i.type==="space"?"":i.type==="html"?`${i.text}`:i.type==="escape"?i.text:(te.warn(`Unsupported markdown: ${i.type}`),i.raw)}return s(n,"output"),r.map(n).join("")}var Bie=F(()=>{"use strict";Iie();BD();Tt();s(kHe,"preprocessMarkdown");s(Mie,"nonMarkdownToLines");s(Nie,"markdownToLines");s(Pie,"nonMarkdownToHTML");s(Oie,"markdownToHTML")});function wHe(e){return Intl.Segmenter?[...new Intl.Segmenter().segment(e)].map(t=>t.segment):[...e]}function SHe(e,t){let r=wHe(t.content);return $ie(e,[],r,t.type)}function $ie(e,t,r,n){if(r.length===0)return[{content:t.join(""),type:n},{content:"",type:n}];let[i,...a]=r,o=[...t,i];return e([{content:o.join(""),type:n}])?$ie(e,o,a,n):(t.length===0&&i&&(t.push(i),r.shift()),[{content:t.join(""),type:n},{content:r.join(""),type:n}])}function Fie(e,t){if(e.some(({content:r})=>r.includes(` +`)))throw new Error("splitLineToFitWidth does not support newlines in the line");return mN(e,t)}function mN(e,t,r=[],n=[]){if(e.length===0)return n.length>0&&r.push(n),r.length>0?r:[];let i="";e[0].content===" "&&(i=" ",e.shift());let a=e.shift()??{content:" ",type:"normal"},o=[...n];if(i!==""&&o.push({content:i,type:"normal"}),o.push(a),t(o))return mN(e,t,r,o);if(n.length>0)r.push(n),e.unshift(a);else if(a.content){let[l,u]=SHe(t,a);r.push([l]),u.content&&e.unshift(u)}return mN(e,t,r)}var Gie=F(()=>{"use strict";s(wHe,"splitTextToChars");s(SHe,"splitWordToFitWidth");s($ie,"splitWordToFitWidthRecursion");s(Fie,"splitLineToFitWidth");s(mN,"splitLineToFitWidthRecursion")});function zie(e,t){t&&e.attr("style",t)}async function EHe(e,t,r,n,i=!1,a=Lt()){let o=e.append("foreignObject");o.attr("width",`${Math.min(10*r,Vie)}px`),o.attr("height",`${Math.min(10*r,Vie)}px`);let l=o.append("xhtml:div"),u=jn(t.label)?await l0(t.label.replace(xt.lineBreakRegex,` +`),a):vr(t.label,a),h=t.isNode?"nodeLabel":"edgeLabel",d=l.append("span");d.html(u),zie(d,t.labelStyle),d.attr("class",`${h} ${n}`),zie(l,t.labelStyle),l.style("display","table-cell"),l.style("white-space","nowrap"),l.style("line-height","1.5"),r!==Number.POSITIVE_INFINITY&&(l.style("max-width",r+"px"),l.style("text-align","center")),l.attr("xmlns","http://www.w3.org/1999/xhtml"),i&&l.attr("class","labelBkg");let f=l.node().getBoundingClientRect();return f.width===r&&(l.style("display","table"),l.style("white-space","break-spaces"),l.style("width",r+"px"),f=l.node().getBoundingClientRect()),o.node()}function gN(e,t,r,n=!1){let i=e.append("tspan").attr("class","text-outer-tspan").attr("x",0).attr("y",t*r-.1+"em").attr("dy",r+"em");return n&&i.attr("text-anchor","middle"),i}function AHe(e,t,r){let n=e.append("text"),i=gN(n,1,t);yN(i,r);let a=i.node().getComputedTextLength();return n.remove(),a}function qie(e,t,r){let n=e.append("text"),i=gN(n,1,t);yN(i,[{content:r,type:"normal"}]);let a=i.node()?.getBoundingClientRect();return a&&n.remove(),a}function RHe(e,t,r,n=!1,i=!1){let o=t.append("g"),l=o.insert("rect").attr("class","background").attr("style","stroke: none"),u=o.append("text").attr("y","-10.1");i&&u.attr("text-anchor","middle");let h=0;for(let d of r){let f=s(m=>AHe(o,1.1,m)<=e,"checkWidth"),p=f(d)?[d]:Fie(d,f);for(let m of p){let g=gN(u,h,1.1,i);yN(g,m),h++}}if(n){let d=u.node().getBBox(),f=2;return l.attr("x",d.x-f).attr("y",d.y-f).attr("width",d.width+2*f).attr("height",d.height+2*f),o.node()}else return u.node()}function Wie(e){let t=/&(amp|lt|gt);/g;return e.replace(t,(r,n)=>{switch(n){case"amp":return"&";case"lt":return"<";case"gt":return">";default:return r}})}function yN(e,t){e.text(""),t.forEach((r,n)=>{let i=e.append("tspan").attr("font-style",r.type==="em"?"italic":"normal").attr("class","text-inner-tspan").attr("font-weight",r.type==="strong"?"bold":"normal");n===0?i.text(Wie(r.content)):i.text(" "+Wie(r.content))})}async function _He(e,t={}){let r=[];e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,(i,a,o)=>(r.push((async()=>{let l=`${a}:${o}`;return await hZ(l)?await Va(l,void 0,{class:"label-icon"}):``})()),i));let n=await Promise.all(r);return e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,()=>n.shift()??"")}var Vie,li,qo=F(()=>{"use strict";$r();Gr();Tt();Y0();Bie();Qt();ml();Gie();mr();s(zie,"applyStyle");Vie=16384;s(EHe,"addHtmlSpan");s(gN,"createTspan");s(AHe,"computeWidthOfText");s(qie,"computeDimensionOfText");s(RHe,"createFormattedText");s(Wie,"decodeHTMLEntities");s(yN,"updateTextContentAndStyles");s(_He,"replaceIconSubstring");li=s(async(e,t="",{style:r="",isTitle:n=!1,classes:i="",useHtmlLabels:a=!0,markdown:o=!0,isNode:l=!0,width:u=200,addSvgBackground:h=!1}={},d)=>{if(te.debug("XYZ createText",t,r,n,i,a,l,"addSvgBackground: ",h),a){let f=o?Oie(t,d):Pie(t),p=await _He(Wo(f),d),m=t.replace(/\\\\/g,"\\"),g={isNode:l,label:jn(t)?m:p,labelStyle:r.replace("fill:","color:")};return await EHe(e,g,u,i,h,d)}else{let f=Wo(t.replace(//g,"
    ")),p=o?Nie(f.replace("
    ","
    "),d):Mie(f),m=RHe(u,e,p,t?h:!1,!l);if(l){/stroke:/.exec(r)&&(r=r.replace("stroke:","lineColor:"));let g=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");lt(m).attr("style",g)}else{let g=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:");lt(m).select("rect").attr("style",g.replace(/background:/g,"fill:"));let y=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");lt(m).select("text").attr("style",y)}return n?lt(m).selectAll("tspan.text-outer-tspan").classed("title-row",!0):lt(m).selectAll("tspan.text-outer-tspan").classed("row",!0),m}},"createText")});async function TE(e){let t=e.getElementsByTagName("img");if(!t||t.length===0)return;let r=!Hie(e);await Promise.all([...t].map(n=>new Promise(i=>{function a(){if(n.style.display="flex",n.style.flexDirection="column",r){let o=Le().fontSize?Le().fontSize:window.getComputedStyle(document.body).fontSize,l=5,[u=hr.fontSize]=fs(o),h=u*l+"px";n.style.minWidth=h,n.style.maxWidth=h}else n.style.width="100%";i(n)}s(a,"setupImage"),setTimeout(()=>{n.complete&&a()}),n.addEventListener("error",a),n.addEventListener("load",a)})))}function Hie(e){return e.nodeType===DHe?e.textContent?.trim()!=="":e.nodeType!==LHe||e.tagName.toLowerCase()==="img"?!1:[...e.childNodes].some(Hie)}var LHe,DHe,vN=F(()=>{"use strict";Zt();Ni();Qt();LHe=1,DHe=3;s(TE,"configureLabelImages");s(Hie,"hasTextBesidesImages")});function cr(e){let t=e.map((r,n)=>`${n===0?"M":"L"}${r.x},${r.y}`);return t.push("Z"),t.join(" ")}function Ho(e,t,r,n,i,a){let o=[],u=r-e,h=n-t,d=u/a,f=2*Math.PI/d,p=t+h/2;for(let m=0;m<=50;m++){let g=m/50,y=e+g*u,v=p+i*Math.sin(f*(y-e));o.push({x:y,y:v})}return o}function zp(e,t,r,n,i,a){let o=[],l=i*Math.PI/180,d=(a*Math.PI/180-l)/(n-1);for(let f=0;fu.tagName==="path"),r=document.createElementNS("http://www.w3.org/2000/svg","path"),n=t.map(u=>u.getAttribute("d")).filter(u=>u!==null).join(" ");r.setAttribute("d",n);let i=t.find(u=>u.getAttribute("fill")!=="none"),a=t.find(u=>u.getAttribute("stroke")!=="none"),o=s((u,h)=>u?.getAttribute(h)??void 0,"getAttr");if(i){let u={fill:o(i,"fill"),"fill-opacity":o(i,"fill-opacity")??"1"};Object.entries(u).forEach(([h,d])=>{d&&r.setAttribute(h,d)})}if(a){let u={stroke:o(a,"stroke"),"stroke-width":o(a,"stroke-width")??"1","stroke-opacity":o(a,"stroke-opacity")??"1"};Object.entries(u).forEach(([h,d])=>{d&&r.setAttribute(h,d)})}let l=document.createElementNS("http://www.w3.org/2000/svg","g");return l.appendChild(r),l}var wt,CE,dt,St,Ht=F(()=>{"use strict";qo();Zt();mr();$r();Gr();Qt();vN();Y0();wt=s(async(e,t,r)=>{let n,i=t.useHtmlLabels||sa(Le()?.htmlLabels);r?n=r:n="node default";let a=e.insert("g").attr("class",n).attr("id",t.domId||t.id),o=a.insert("g").attr("class","label").attr("style",rn(t.labelStyle)),l;t.label===void 0?l="":l=typeof t.label=="string"?t.label:t.label[0];let u=!!t.icon||!!t.img,h=t.labelType==="markdown",d=await li(o,vr(Wo(l),Le()),{useHtmlLabels:i,width:t.width||Le().flowchart?.wrappingWidth,classes:h?"markdown-node-label":"",style:t.labelStyle,addSvgBackground:u,markdown:h},Le()),f=(t?.padding??0)/2,p;if(i){let m=d.children[0],g=lt(d);await TE(m),p=m.getBoundingClientRect(),g.attr("width",p.width),g.attr("height",p.height)}else p=d.getBBox();return i?o.attr("transform","translate("+-p.width/2+", "+-p.height/2+")"):o.attr("transform","translate(0, "+-p.height/2+")"),t.centerLabel&&o.attr("transform","translate("+-p.width/2+", "+-p.height/2+")"),o.insert("rect",":first-child"),{shapeSvg:a,bbox:p,halfPadding:f,label:o}},"labelHelper"),CE=s(async(e,t,r)=>{let n=r.useHtmlLabels??Yn(Le()),i=e.insert("g").attr("class","label").attr("style",r.labelStyle||""),a=await li(i,vr(Wo(t),Le()),{useHtmlLabels:n,width:r.width||Le()?.flowchart?.wrappingWidth,style:r.labelStyle,addSvgBackground:!!r.icon||!!r.img}),o=r.padding/2,l;if(Yn(Le())){let u=a.children[0],h=lt(a);l=u.getBoundingClientRect(),h.attr("width",l.width),h.attr("height",l.height)}else l=a.getBBox();return n?i.attr("transform","translate("+-l.width/2+", "+-l.height/2+")"):i.attr("transform","translate(0, "+-l.height/2+")"),r.centerLabel&&i.attr("transform","translate("+-l.width/2+", "+-l.height/2+")"),i.insert("rect",":first-child"),{shapeSvg:e,bbox:l,halfPadding:o,label:i}},"insertLabel"),dt=s((e,t,r)=>{if(r){e.width=r.width,e.height=r.height;return}let n=t.node().getBBox();e.width=n.width,e.height=n.height},"updateNodeBounds"),St=s((e,t)=>(e.look==="handDrawn"?"rough-node":"node")+" "+e.cssClasses+" "+(t||""),"getNodeClasses");s(cr,"createPathFromPoints");s(Ho,"generateFullSineWavePoints");s(zp,"generateCirclePoints");s(xN,"mergePaths")});function IHe(e,t){return e.intersect(t)}var Uie,Yie=F(()=>{"use strict";s(IHe,"intersectNode");Uie=IHe});function MHe(e,t,r,n){var i=e.x,a=e.y,o=i-n.x,l=a-n.y,u=Math.sqrt(t*t*l*l+r*r*o*o),h=Math.abs(t*r*o/u);n.x{"use strict";s(MHe,"intersectEllipse");kE=MHe});function NHe(e,t,r){return kE(e,t,t,r)}var jie,Xie=F(()=>{"use strict";bN();s(NHe,"intersectCircle");jie=NHe});function PHe(e,t,r,n){{let i=t.y-e.y,a=e.x-t.x,o=t.x*e.y-e.x*t.y,l=i*r.x+a*r.y+o,u=i*n.x+a*n.y+o,h=1e-6;if(l!==0&&u!==0&&Kie(l,u))return;let d=n.y-r.y,f=r.x-n.x,p=n.x*r.y-r.x*n.y,m=d*e.x+f*e.y+p,g=d*t.x+f*t.y+p;if(Math.abs(m)0}var Zie,Qie=F(()=>{"use strict";s(PHe,"intersectLine");s(Kie,"sameSign");Zie=PHe});function OHe(e,t,r){let n=e.x,i=e.y,a=[],o=Number.POSITIVE_INFINITY,l=Number.POSITIVE_INFINITY;typeof t.forEach=="function"?t.forEach(function(d){o=Math.min(o,d.x),l=Math.min(l,d.y)}):(o=Math.min(o,t.x),l=Math.min(l,t.y));let u=n-e.width/2-o,h=i-e.height/2-l;for(let d=0;d1&&a.sort(function(d,f){let p=d.x-r.x,m=d.y-r.y,g=Math.sqrt(p*p+m*m),y=f.x-r.x,v=f.y-r.y,x=Math.sqrt(y*y+v*v);return g{"use strict";Qie();s(OHe,"intersectPolygon");Jie=OHe});var BHe,Cc,wE=F(()=>{"use strict";BHe=s((e,t)=>{var r=e.x,n=e.y,i=t.x-r,a=t.y-n,o=e.width/2,l=e.height/2,u,h;return Math.abs(a)*o>Math.abs(i)*l?(a<0&&(l=-l),u=a===0?0:l*i/a,h=l):(i<0&&(o=-o),u=o,h=i===0?0:o*a/i),{x:r+u,y:n+h}},"intersectRect"),Cc=BHe});var ct,tr=F(()=>{"use strict";Yie();Xie();bN();eae();wE();ct={node:Uie,circle:jie,ellipse:kE,polygon:Jie,rect:Cc}});var tae,$He,kc,FHe,Ub,ut,ft,GHe,Kt=F(()=>{"use strict";Zt();tae=s(e=>{let{handDrawnSeed:t}=Le();return{fill:e,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:e,seed:t}},"solidStateFill"),$He=s(e=>Array.isArray(e)?e:e?e.split(";").map(t=>t.trim()).filter(Boolean):[],"normalizeStyleList"),kc=s(e=>{let t=FHe([...e.cssCompiledStyles||[],...e.cssStyles||[],...$He(e.labelStyle)]);return{stylesMap:t,stylesArray:[...t]}},"compileStyles"),FHe=s(e=>{let t=new Map;return e.forEach(r=>{let[n,i]=r.split(":");t.set(n.trim(),i?.trim())}),t},"styles2Map"),Ub=s(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"),ut=s(e=>{let{stylesArray:t}=kc(e),r=[],n=[],i=[],a=[];return t.forEach(o=>{let l=o[0];Ub(l)?r.push(o.join(":")+" !important"):(n.push(o.join(":")+" !important"),l.includes("stroke")&&i.push(o.join(":")+" !important"),l==="fill"&&a.push(o.join(":")+" !important"))}),{labelStyles:r.join(";"),nodeStyles:n.join(";"),stylesArray:t,borderStyles:i,backgroundStyles:a}},"styles2String"),ft=s((e,t)=>{let{themeVariables:r,handDrawnSeed:n}=Le(),{nodeBorder:i,mainBkg:a}=r,{stylesMap:o}=kc(e);return Object.assign({roughness:.7,fill:o.get("fill")||a,fillStyle:"hachure",fillWeight:4,hachureGap:5.2,stroke:o.get("stroke")||i,seed:n,strokeWidth:o.get("stroke-width")?.replace("px","")||1.3,fillLineDash:[0,0],strokeLineDash:GHe(o.get("stroke-dasharray"))},t)},"userNodeOverrides"),GHe=s(e=>{if(!e)return[0,0];let t=e.trim().split(/\s+/).map(Number);if(t.length===1){let i=isNaN(t[0])?0:t[0];return[i,i]}let r=isNaN(t[0])?0:t[0],n=isNaN(t[1])?0:t[1];return[r,n]},"getStrokeDashArray")});function TN(e,t,r){if(e&&e.length){let[n,i]=t,a=Math.PI/180*r,o=Math.cos(a),l=Math.sin(a);for(let u of e){let[h,d]=u;u[0]=(h-n)*o-(d-i)*l+n,u[1]=(h-n)*l+(d-i)*o+i}}}function zHe(e,t){return e[0]===t[0]&&e[1]===t[1]}function VHe(e,t,r,n=1){let i=r,a=Math.max(t,.1),o=e[0]&&e[0][0]&&typeof e[0][0]=="number"?[e]:e,l=[0,0];if(i)for(let h of o)TN(h,l,i);let u=(function(h,d,f){let p=[];for(let b of h){let T=[...b];zHe(T[0],T[T.length-1])||T.push([T[0][0],T[0][1]]),T.length>2&&p.push(T)}let m=[];d=Math.max(d,.1);let g=[];for(let b of p)for(let T=0;Tb.yminT.ymin?1:b.xT.x?1:b.ymax===T.ymax?0:(b.ymax-T.ymax)/Math.abs(b.ymax-T.ymax))),!g.length)return m;let y=[],v=g[0].ymin,x=0;for(;y.length||g.length;){if(g.length){let b=-1;for(let T=0;Tv);T++)b=T;g.splice(0,b+1).forEach((T=>{y.push({s:v,edge:T})}))}if(y=y.filter((b=>!(b.edge.ymax<=v))),y.sort(((b,T)=>b.edge.x===T.edge.x?0:(b.edge.x-T.edge.x)/Math.abs(b.edge.x-T.edge.x))),(f!==1||x%d==0)&&y.length>1)for(let b=0;b=y.length)break;let w=y[b].edge,C=y[T].edge;m.push([[Math.round(w.x),v],[Math.round(C.x),v]])}v+=f,y.forEach((b=>{b.edge.x=b.edge.x+f*b.edge.islope})),x++}return m})(o,a,n);if(i){for(let h of o)TN(h,l,-i);(function(h,d,f){let p=[];h.forEach((m=>p.push(...m))),TN(p,d,f)})(u,l,-i)}return u}function Kb(e,t){var r;let n=t.hachureAngle+90,i=t.hachureGap;i<0&&(i=4*t.strokeWidth),i=Math.round(Math.max(i,.1));let a=1;return t.roughness>=1&&(((r=t.randomizer)===null||r===void 0?void 0:r.next())||Math.random())>.7&&(a=i),VHe(e,i,n,a||1)}function ME(e){let t=e[0],r=e[1];return Math.sqrt(Math.pow(t[0]-r[0],2)+Math.pow(t[1]-r[1],2))}function kN(e,t){return e.type===t}function BN(e){let t=[],r=(function(o){let l=new Array;for(;o!=="";)if(o.match(/^([ \t\r\n,]+)/))o=o.substr(RegExp.$1.length);else if(o.match(/^([aAcChHlLmMqQsStTvVzZ])/))l[l.length]={type:WHe,text:RegExp.$1},o=o.substr(RegExp.$1.length);else{if(!o.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))return[];l[l.length]={type:CN,text:`${parseFloat(RegExp.$1)}`},o=o.substr(RegExp.$1.length)}return l[l.length]={type:rae,text:""},l})(e),n="BOD",i=0,a=r[i];for(;!kN(a,rae);){let o=0,l=[];if(n==="BOD"){if(a.text!=="M"&&a.text!=="m")return BN("M0,0"+e);i++,o=SE[a.text],n=a.text}else kN(a,CN)?o=SE[n]:(i++,o=SE[a.text],n=a.text);if(!(i+od%2?h+r:h+t));a.push({key:"C",data:u}),t=u[4],r=u[5];break}case"Q":a.push({key:"Q",data:[...l]}),t=l[2],r=l[3];break;case"q":{let u=l.map(((h,d)=>d%2?h+r:h+t));a.push({key:"Q",data:u}),t=u[2],r=u[3];break}case"A":a.push({key:"A",data:[...l]}),t=l[5],r=l[6];break;case"a":t+=l[5],r+=l[6],a.push({key:"A",data:[l[0],l[1],l[2],l[3],l[4],t,r]});break;case"H":a.push({key:"H",data:[...l]}),t=l[0];break;case"h":t+=l[0],a.push({key:"H",data:[t]});break;case"V":a.push({key:"V",data:[...l]}),r=l[0];break;case"v":r+=l[0],a.push({key:"V",data:[r]});break;case"S":a.push({key:"S",data:[...l]}),t=l[2],r=l[3];break;case"s":{let u=l.map(((h,d)=>d%2?h+r:h+t));a.push({key:"S",data:u}),t=u[2],r=u[3];break}case"T":a.push({key:"T",data:[...l]}),t=l[0],r=l[1];break;case"t":t+=l[0],r+=l[1],a.push({key:"T",data:[t,r]});break;case"Z":case"z":a.push({key:"Z",data:[]}),t=n,r=i}return a}function hae(e){let t=[],r="",n=0,i=0,a=0,o=0,l=0,u=0;for(let{key:h,data:d}of e){switch(h){case"M":t.push({key:"M",data:[...d]}),[n,i]=d,[a,o]=d;break;case"C":t.push({key:"C",data:[...d]}),n=d[4],i=d[5],l=d[2],u=d[3];break;case"L":t.push({key:"L",data:[...d]}),[n,i]=d;break;case"H":n=d[0],t.push({key:"L",data:[n,i]});break;case"V":i=d[0],t.push({key:"L",data:[n,i]});break;case"S":{let f=0,p=0;r==="C"||r==="S"?(f=n+(n-l),p=i+(i-u)):(f=n,p=i),t.push({key:"C",data:[f,p,...d]}),l=d[0],u=d[1],n=d[2],i=d[3];break}case"T":{let[f,p]=d,m=0,g=0;r==="Q"||r==="T"?(m=n+(n-l),g=i+(i-u)):(m=n,g=i);let y=n+2*(m-n)/3,v=i+2*(g-i)/3,x=f+2*(m-f)/3,b=p+2*(g-p)/3;t.push({key:"C",data:[y,v,x,b,f,p]}),l=m,u=g,n=f,i=p;break}case"Q":{let[f,p,m,g]=d,y=n+2*(f-n)/3,v=i+2*(p-i)/3,x=m+2*(f-m)/3,b=g+2*(p-g)/3;t.push({key:"C",data:[y,v,x,b,m,g]}),l=f,u=p,n=m,i=g;break}case"A":{let f=Math.abs(d[0]),p=Math.abs(d[1]),m=d[2],g=d[3],y=d[4],v=d[5],x=d[6];f===0||p===0?(t.push({key:"C",data:[n,i,v,x,v,x]}),n=v,i=x):(n!==v||i!==x)&&(dae(n,i,v,x,f,p,m,g,y).forEach((function(b){t.push({key:"C",data:b})})),n=v,i=x);break}case"Z":t.push({key:"Z",data:[]}),n=a,i=o}r=h}return t}function Yb(e,t,r){return[e*Math.cos(r)-t*Math.sin(r),e*Math.sin(r)+t*Math.cos(r)]}function dae(e,t,r,n,i,a,o,l,u,h){let d=(f=o,Math.PI*f/180);var f;let p=[],m=0,g=0,y=0,v=0;if(h)[m,g,y,v]=h;else{[e,t]=Yb(e,t,-d),[r,n]=Yb(r,n,-d);let E=(e-r)/2,I=(t-n)/2,L=E*E/(i*i)+I*I/(a*a);L>1&&(L=Math.sqrt(L),i*=L,a*=L);let P=i*i,B=a*a,O=P*B-P*I*I-B*E*E,$=P*I*I+B*E*E,G=(l===u?-1:1)*Math.sqrt(Math.abs(O/$));y=G*i*I/a+(e+r)/2,v=G*-a*E/i+(t+n)/2,m=Math.asin(parseFloat(((t-v)/a).toFixed(9))),g=Math.asin(parseFloat(((n-v)/a).toFixed(9))),eg&&(m-=2*Math.PI),!u&&g>m&&(g-=2*Math.PI)}let x=g-m;if(Math.abs(x)>120*Math.PI/180){let E=g,I=r,L=n;g=u&&g>m?m+120*Math.PI/180*1:m+120*Math.PI/180*-1,p=dae(r=y+i*Math.cos(g),n=v+a*Math.sin(g),I,L,i,a,o,0,u,[g,E,y,v])}x=g-m;let b=Math.cos(m),T=Math.sin(m),w=Math.cos(g),C=Math.sin(g),k=Math.tan(x/4),S=4/3*i*k,A=4/3*a*k,M=[e,t],N=[e+S*T,t-A*b],D=[r+S*C,n-A*w],R=[r,n];if(N[0]=2*M[0]-N[0],N[1]=2*M[1]-N[1],h)return[N,D,R].concat(p);{p=[N,D,R].concat(p);let E=[];for(let I=0;I2){let i=[];for(let a=0;a2*Math.PI&&(m=0,g=2*Math.PI);let y=2*Math.PI/u.curveStepCount,v=Math.min(y/2,(g-m)/2),x=lae(v,h,d,f,p,m,g,1,u);if(!u.disableMultiStroke){let b=lae(v,h,d,f,p,m,g,1.5,u);x.push(...b)}return o&&(l?x.push(...vd(h,d,h+f*Math.cos(m),d+p*Math.sin(m),u),...vd(h,d,h+f*Math.cos(g),d+p*Math.sin(g),u)):x.push({op:"lineTo",data:[h,d]},{op:"lineTo",data:[h+f*Math.cos(m),d+p*Math.sin(m)]})),{type:"path",ops:x}}function aae(e,t){let r=hae(uae(BN(e))),n=[],i=[0,0],a=[0,0];for(let{key:o,data:l}of r)switch(o){case"M":a=[l[0],l[1]],i=[l[0],l[1]];break;case"L":n.push(...vd(a[0],a[1],l[0],l[1],t)),a=[l[0],l[1]];break;case"C":{let[u,h,d,f,p,m]=l;n.push(...UHe(u,h,d,f,p,m,a,t)),a=[p,m];break}case"Z":n.push(...vd(a[0],a[1],i[0],i[1],t)),a=[i[0],i[1]]}return{type:"path",ops:n}}function wN(e,t){let r=[];for(let n of e)if(n.length){let i=t.maxRandomnessOffset||0,a=n.length;if(a>2){r.push({op:"move",data:[n[0][0]+Tr(i,t),n[0][1]+Tr(i,t)]});for(let o=1;o500?.4:-.0016668*u+1.233334;let d=i.maxRandomnessOffset||0;d*d*100>l&&(d=u/10);let f=d/2,p=.2+.2*mae(i),m=i.bowing*i.maxRandomnessOffset*(n-t)/200,g=i.bowing*i.maxRandomnessOffset*(e-r)/200;m=Tr(m,i,h),g=Tr(g,i,h);let y=[],v=s(()=>Tr(f,i,h),"M"),x=s(()=>Tr(d,i,h),"k"),b=i.preserveVertices;return a&&(o?y.push({op:"move",data:[e+(b?0:v()),t+(b?0:v())]}):y.push({op:"move",data:[e+(b?0:Tr(d,i,h)),t+(b?0:Tr(d,i,h))]})),o?y.push({op:"bcurveTo",data:[m+e+(r-e)*p+v(),g+t+(n-t)*p+v(),m+e+2*(r-e)*p+v(),g+t+2*(n-t)*p+v(),r+(b?0:v()),n+(b?0:v())]}):y.push({op:"bcurveTo",data:[m+e+(r-e)*p+x(),g+t+(n-t)*p+x(),m+e+2*(r-e)*p+x(),g+t+2*(n-t)*p+x(),r+(b?0:x()),n+(b?0:x())]}),y}function EE(e,t,r){if(!e.length)return[];let n=[];n.push([e[0][0]+Tr(t,r),e[0][1]+Tr(t,r)]),n.push([e[0][0]+Tr(t,r),e[0][1]+Tr(t,r)]);for(let i=1;i3){let a=[],o=1-r.curveTightness;i.push({op:"move",data:[e[1][0],e[1][1]]});for(let l=1;l+21&&i.push(l)):i.push(l),i.push(e[t+3])}else{let u=e[t+0],h=e[t+1],d=e[t+2],f=e[t+3],p=Vp(u,h,.5),m=Vp(h,d,.5),g=Vp(d,f,.5),y=Vp(p,m,.5),v=Vp(m,g,.5),x=Vp(y,v,.5);NN([u,p,y,x],0,r,i),NN([x,v,g,f],0,r,i)}var a,o;return i}function jHe(e,t){return IE(e,0,e.length,t)}function IE(e,t,r,n,i){let a=i||[],o=e[t],l=e[r-1],u=0,h=1;for(let d=t+1;du&&(u=f,h=d)}return Math.sqrt(u)>n?(IE(e,t,h+1,n,a),IE(e,h,r,n,a)):(a.length||a.push(o),a.push(l)),a}function SN(e,t=.15,r){let n=[],i=(e.length-1)/3;for(let a=0;a0?IE(n,0,n.length,r):n}var Xb,EN,AN,RN,_N,LN,zs,DN,WHe,CN,rae,SE,qHe,bo,X0,PN,AE,ON,ht,Jt=F(()=>{"use strict";s(TN,"t");s(zHe,"e");s(VHe,"s");s(Kb,"n");Xb=class{static{s(this,"o")}constructor(t){this.helper=t}fillPolygons(t,r){return this._fillPolygons(t,r)}_fillPolygons(t,r){let n=Kb(t,r);return{type:"fillSketch",ops:this.renderLines(n,r)}}renderLines(t,r){let n=[];for(let i of t)n.push(...this.helper.doubleLineOps(i[0][0],i[0][1],i[1][0],i[1][1],r));return n}};s(ME,"a");EN=class extends Xb{static{s(this,"h")}fillPolygons(t,r){let n=r.hachureGap;n<0&&(n=4*r.strokeWidth),n=Math.max(n,.1);let i=Kb(t,Object.assign({},r,{hachureGap:n})),a=Math.PI/180*r.hachureAngle,o=[],l=.5*n*Math.cos(a),u=.5*n*Math.sin(a);for(let[h,d]of i)ME([h,d])&&o.push([[h[0]-l,h[1]+u],[...d]],[[h[0]+l,h[1]-u],[...d]]);return{type:"fillSketch",ops:this.renderLines(o,r)}}},AN=class extends Xb{static{s(this,"r")}fillPolygons(t,r){let n=this._fillPolygons(t,r),i=Object.assign({},r,{hachureAngle:r.hachureAngle+90}),a=this._fillPolygons(t,i);return n.ops=n.ops.concat(a.ops),n}},RN=class{static{s(this,"i")}constructor(t){this.helper=t}fillPolygons(t,r){let n=Kb(t,r=Object.assign({},r,{hachureAngle:0}));return this.dotsOnLines(n,r)}dotsOnLines(t,r){let n=[],i=r.hachureGap;i<0&&(i=4*r.strokeWidth),i=Math.max(i,.1);let a=r.fillWeight;a<0&&(a=r.strokeWidth/2);let o=i/4;for(let l of t){let u=ME(l),h=u/i,d=Math.ceil(h)-1,f=u-d*i,p=(l[0][0]+l[1][0])/2-i/4,m=Math.min(l[0][1],l[1][1]);for(let g=0;g{let l=ME(o),u=Math.floor(l/(n+i)),h=(l+i-u*(n+i))/2,d=o[0],f=o[1];d[0]>f[0]&&(d=o[1],f=o[0]);let p=Math.atan((f[1]-d[1])/(f[0]-d[0]));for(let m=0;m{let o=ME(a),l=Math.round(o/(2*r)),u=a[0],h=a[1];u[0]>h[0]&&(u=a[1],h=a[0]);let d=Math.atan((h[1]-u[1])/(h[0]-u[0]));for(let f=0;f2*Math.PI&&(S=0,A=2*Math.PI);let M=(A-S)/b.curveStepCount,N=[];for(let D=S;D<=A;D+=M)N.push([T+C*Math.cos(D),w+k*Math.sin(D)]);return N.push([T+C*Math.cos(A),w+k*Math.sin(A)]),N.push([T,w]),j0([N],b)})(t,r,n,i,a,o,h));return h.stroke!==bo&&d.push(f),this._d("arc",d,h)}curve(t,r){let n=this._o(r),i=[],a=nae(t,n);if(n.fill&&n.fill!==bo)if(n.fillStyle==="solid"){let o=nae(t,Object.assign(Object.assign({},n),{disableMultiStroke:!0,roughness:n.roughness?n.roughness+n.fillShapeRoughnessGain:0}));i.push({type:"fillPath",ops:this._mergedShape(o.ops)})}else{let o=[],l=t;if(l.length){let u=typeof l[0][0]=="number"?[l]:l;for(let h of u)h.length<3?o.push(...h):h.length===3?o.push(...SN(cae([h[0],h[0],h[1],h[2]]),10,(1+n.roughness)/2)):o.push(...SN(cae(h),10,(1+n.roughness)/2))}o.length&&i.push(j0([o],n))}return n.stroke!==bo&&i.push(a),this._d("curve",i,n)}polygon(t,r){let n=this._o(r),i=[],a=RE(t,!0,n);return n.fill&&(n.fillStyle==="solid"?i.push(wN([t],n)):i.push(j0([t],n))),n.stroke!==bo&&i.push(a),this._d("polygon",i,n)}path(t,r){let n=this._o(r),i=[];if(!t)return this._d("path",i,n);t=(t||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");let a=n.fill&&n.fill!=="transparent"&&n.fill!==bo,o=n.stroke!==bo,l=!!(n.simplification&&n.simplification<1),u=(function(d,f,p){let m=hae(uae(BN(d))),g=[],y=[],v=[0,0],x=[],b=s(()=>{x.length>=4&&y.push(...SN(x,f)),x=[]},"i"),T=s(()=>{b(),y.length&&(g.push(y),y=[])},"c");for(let{key:C,data:k}of m)switch(C){case"M":T(),v=[k[0],k[1]],y.push(v);break;case"L":b(),y.push([k[0],k[1]]);break;case"C":if(!x.length){let S=y.length?y[y.length-1]:v;x.push([S[0],S[1]])}x.push([k[0],k[1]]),x.push([k[2],k[3]]),x.push([k[4],k[5]]);break;case"Z":b(),y.push([v[0],v[1]])}if(T(),!p)return g;let w=[];for(let C of g){let k=jHe(C,p);k.length&&w.push(k)}return w})(t,1,l?4-4*(n.simplification||1):(1+n.roughness)/2),h=aae(t,n);if(a)if(n.fillStyle==="solid")if(u.length===1){let d=aae(t,Object.assign(Object.assign({},n),{disableMultiStroke:!0,roughness:n.roughness?n.roughness+n.fillShapeRoughnessGain:0}));i.push({type:"fillPath",ops:this._mergedShape(d.ops)})}else i.push(wN(u,n));else i.push(j0(u,n));return o&&(l?u.forEach((d=>{i.push(RE(d,!1,n))})):i.push(h)),this._d("path",i,n)}opsToPath(t,r){let n="";for(let i of t.ops){let a=typeof r=="number"&&r>=0?i.data.map((o=>+o.toFixed(r))):i.data;switch(i.op){case"move":n+=`M${a[0]} ${a[1]} `;break;case"bcurveTo":n+=`C${a[0]} ${a[1]}, ${a[2]} ${a[3]}, ${a[4]} ${a[5]} `;break;case"lineTo":n+=`L${a[0]} ${a[1]} `}}return n.trim()}toPaths(t){let r=t.sets||[],n=t.options||this.defaultOptions,i=[];for(let a of r){let o=null;switch(a.type){case"path":o={d:this.opsToPath(a),stroke:n.stroke,strokeWidth:n.strokeWidth,fill:bo};break;case"fillPath":o={d:this.opsToPath(a),stroke:bo,strokeWidth:0,fill:n.fill||bo};break;case"fillSketch":o=this.fillSketch(a,n)}o&&i.push(o)}return i}fillSketch(t,r){let n=r.fillWeight;return n<0&&(n=r.strokeWidth/2),{d:this.opsToPath(t),stroke:r.fill||bo,strokeWidth:n,fill:bo}}_mergedShape(t){return t.filter(((r,n)=>n===0||r.op!=="move"))}},PN=class{static{s(this,"st")}constructor(t,r){this.canvas=t,this.ctx=this.canvas.getContext("2d"),this.gen=new X0(r)}draw(t){let r=t.sets||[],n=t.options||this.getDefaultOptions(),i=this.ctx,a=t.options.fixedDecimalPlaceDigits;for(let o of r)switch(o.type){case"path":i.save(),i.strokeStyle=n.stroke==="none"?"transparent":n.stroke,i.lineWidth=n.strokeWidth,n.strokeLineDash&&i.setLineDash(n.strokeLineDash),n.strokeLineDashOffset&&(i.lineDashOffset=n.strokeLineDashOffset),this._drawToContext(i,o,a),i.restore();break;case"fillPath":{i.save(),i.fillStyle=n.fill||"";let l=t.shape==="curve"||t.shape==="polygon"||t.shape==="path"?"evenodd":"nonzero";this._drawToContext(i,o,a,l),i.restore();break}case"fillSketch":this.fillSketch(i,o,n)}}fillSketch(t,r,n){let i=n.fillWeight;i<0&&(i=n.strokeWidth/2),t.save(),n.fillLineDash&&t.setLineDash(n.fillLineDash),n.fillLineDashOffset&&(t.lineDashOffset=n.fillLineDashOffset),t.strokeStyle=n.fill||"",t.lineWidth=i,this._drawToContext(t,r,n.fixedDecimalPlaceDigits),t.restore()}_drawToContext(t,r,n,i="nonzero"){t.beginPath();for(let a of r.ops){let o=typeof n=="number"&&n>=0?a.data.map((l=>+l.toFixed(n))):a.data;switch(a.op){case"move":t.moveTo(o[0],o[1]);break;case"bcurveTo":t.bezierCurveTo(o[0],o[1],o[2],o[3],o[4],o[5]);break;case"lineTo":t.lineTo(o[0],o[1])}}r.type==="fillPath"?t.fill(i):t.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(t,r,n,i,a){let o=this.gen.line(t,r,n,i,a);return this.draw(o),o}rectangle(t,r,n,i,a){let o=this.gen.rectangle(t,r,n,i,a);return this.draw(o),o}ellipse(t,r,n,i,a){let o=this.gen.ellipse(t,r,n,i,a);return this.draw(o),o}circle(t,r,n,i){let a=this.gen.circle(t,r,n,i);return this.draw(a),a}linearPath(t,r){let n=this.gen.linearPath(t,r);return this.draw(n),n}polygon(t,r){let n=this.gen.polygon(t,r);return this.draw(n),n}arc(t,r,n,i,a,o,l=!1,u){let h=this.gen.arc(t,r,n,i,a,o,l,u);return this.draw(h),h}curve(t,r){let n=this.gen.curve(t,r);return this.draw(n),n}path(t,r){let n=this.gen.path(t,r);return this.draw(n),n}},AE="http://www.w3.org/2000/svg",ON=class{static{s(this,"ot")}constructor(t,r){this.svg=t,this.gen=new X0(r)}draw(t){let r=t.sets||[],n=t.options||this.getDefaultOptions(),i=this.svg.ownerDocument||window.document,a=i.createElementNS(AE,"g"),o=t.options.fixedDecimalPlaceDigits;for(let l of r){let u=null;switch(l.type){case"path":u=i.createElementNS(AE,"path"),u.setAttribute("d",this.opsToPath(l,o)),u.setAttribute("stroke",n.stroke),u.setAttribute("stroke-width",n.strokeWidth+""),u.setAttribute("fill","none"),n.strokeLineDash&&u.setAttribute("stroke-dasharray",n.strokeLineDash.join(" ").trim()),n.strokeLineDashOffset&&u.setAttribute("stroke-dashoffset",`${n.strokeLineDashOffset}`);break;case"fillPath":u=i.createElementNS(AE,"path"),u.setAttribute("d",this.opsToPath(l,o)),u.setAttribute("stroke","none"),u.setAttribute("stroke-width","0"),u.setAttribute("fill",n.fill||""),t.shape!=="curve"&&t.shape!=="polygon"||u.setAttribute("fill-rule","evenodd");break;case"fillSketch":u=this.fillSketch(i,l,n)}u&&a.appendChild(u)}return a}fillSketch(t,r,n){let i=n.fillWeight;i<0&&(i=n.strokeWidth/2);let a=t.createElementNS(AE,"path");return a.setAttribute("d",this.opsToPath(r,n.fixedDecimalPlaceDigits)),a.setAttribute("stroke",n.fill||""),a.setAttribute("stroke-width",i+""),a.setAttribute("fill","none"),n.fillLineDash&&a.setAttribute("stroke-dasharray",n.fillLineDash.join(" ").trim()),n.fillLineDashOffset&&a.setAttribute("stroke-dashoffset",`${n.fillLineDashOffset}`),a}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(t,r){return this.gen.opsToPath(t,r)}line(t,r,n,i,a){let o=this.gen.line(t,r,n,i,a);return this.draw(o)}rectangle(t,r,n,i,a){let o=this.gen.rectangle(t,r,n,i,a);return this.draw(o)}ellipse(t,r,n,i,a){let o=this.gen.ellipse(t,r,n,i,a);return this.draw(o)}circle(t,r,n,i){let a=this.gen.circle(t,r,n,i);return this.draw(a)}linearPath(t,r){let n=this.gen.linearPath(t,r);return this.draw(n)}polygon(t,r){let n=this.gen.polygon(t,r);return this.draw(n)}arc(t,r,n,i,a,o,l=!1,u){let h=this.gen.arc(t,r,n,i,a,o,l,u);return this.draw(h)}curve(t,r){let n=this.gen.curve(t,r);return this.draw(n)}path(t,r){let n=this.gen.path(t,r);return this.draw(n)}},ht={canvas:s((e,t)=>new PN(e,t),"canvas"),svg:s((e,t)=>new ON(e,t),"svg"),generator:s(e=>new X0(e),"generator"),newSeed:s(()=>X0.newSeed(),"newSeed")}});function gae(e,t){let{labelStyles:r}=ut(t);t.labelStyle=r;let n=St(t),i=n;n||(i="anchor");let a=e.insert("g").attr("class",i).attr("id",t.domId||t.id),o=1,{cssStyles:l}=t,u=ht.svg(a),h=ft(t,{fill:"black",stroke:"none",fillStyle:"solid"});t.look!=="handDrawn"&&(h.roughness=0);let d=u.circle(0,0,o*2,h),f=a.insert(()=>d,":first-child");return f.attr("class","anchor").attr("style",rn(l)),dt(t,f),t.intersect=function(p){return te.info("Circle intersect",t,o,p),ct.circle(t,o,p)},a}var yae=F(()=>{"use strict";Tt();Ht();tr();Kt();Jt();Qt();s(gae,"anchor")});function vae(e,t,r,n,i,a,o){let u=(e+r)/2,h=(t+n)/2,d=Math.atan2(n-t,r-e),f=(r-e)/2,p=(n-t)/2,m=f/i,g=p/a,y=Math.sqrt(m**2+g**2);if(y>1)throw new Error("The given radii are too small to create an arc between the points.");let v=Math.sqrt(1-y**2),x=u+v*a*Math.sin(d)*(o?-1:1),b=h-v*i*Math.cos(d)*(o?-1:1),T=Math.atan2((t-b)/a,(e-x)/i),C=Math.atan2((n-b)/a,(r-x)/i)-T;o&&C<0&&(C+=2*Math.PI),!o&&C>0&&(C-=2*Math.PI);let k=[];for(let S=0;S<20;S++){let A=S/19,M=T+A*C,N=x+i*Math.cos(M),D=b+a*Math.sin(M);k.push({x:N,y:D})}return k}function XHe(e,t,r){let[n,i]=[t,r].sort((a,o)=>o-a);return i*(1-Math.sqrt(1-(e/n/2)**2))}async function xae(e,t){let{labelStyles:r,nodeStyles:n}=ut(t);t.labelStyle=r;let i=t.padding??0,a=t.look==="neo"?16:i,o=t.look==="neo"?12:i,l=s(M=>M+o,"calcTotalHeight"),u=s(M=>{let N=M/2;return[N/(2.5+M/50),N]},"calcEllipseRadius"),{shapeSvg:h,bbox:d}=await wt(e,t,St(t)),f=l(t?.height?t?.height:d.height),[p,m]=u(f),g=XHe(f,p,m),v=(t?.width?t?.width:d.width)+a*2+g-g,x=f,{cssStyles:b}=t,T=[{x:v/2,y:-x/2},{x:-v/2,y:-x/2},...vae(-v/2,-x/2,-v/2,x/2,p,m,!1),{x:v/2,y:x/2},...vae(v/2,x/2,v/2,-x/2,p,m,!0)],w=ht.svg(h),C=ft(t,{});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");let k=cr(T),S=w.path(k,C),A=h.insert(()=>S,":first-child");return A.attr("class","basic label-container outer-path"),b&&t.look!=="handDrawn"&&A.selectAll("path").attr("style",b),n&&t.look!=="handDrawn"&&A.selectAll("path").attr("style",n),A.attr("transform",`translate(${p/2}, 0)`),dt(t,A),t.intersect=function(M){return ct.polygon(t,T,M)},h}var bae=F(()=>{"use strict";Ht();tr();Kt();Jt();s(vae,"generateArcPoints");s(XHe,"calculateArcSagitta");s(xae,"bowTieRect")});var Ua,xd=F(()=>{"use strict";Ua=s((e,t,r,n,i)=>["M",e+i,t,"H",e+r-i,"A",i,i,0,0,1,e+r,t+i,"V",t+n-i,"A",i,i,0,0,1,e+r-i,t+n,"H",e+i,"A",i,i,0,0,1,e,t+n-i,"V",t+i,"A",i,i,0,0,1,e+i,t,"Z"].join(" "),"createRoundedRectPathD")});async function Tae(e,t){let{themeVariables:r}=Le(),n=r.clusterBkg,i=r.clusterBorder,{nodeStyles:a}=ut(t),{shapeSvg:o,bbox:l}=await wt(e,t,St(t)),u=t.padding??8,h=l.height,d=Math.max(l.width+u*2,KHe,t?.width??0),f=Math.max(h+FN+$N+u*2,t?.height??0),p=-d/2,m=-f/2,g=-(FN+$N)/2,y=o.select(".label");y&&(t.useHtmlLabels??Yn(Le())?y.attr("transform",`translate(${-l.width/2}, ${-l.height/2+g})`):y.attr("transform",`translate(0, ${-l.height/2+g})`));let v;if(t.look==="handDrawn"){let C=ht.svg(o),k=ft(t,{fill:n,stroke:i,fillStyle:"solid"}),S=C.path(Ua(p,m,d,f,GN),k);v=o.insert(()=>S,":first-child"),v.attr("class","basic label-container collapsed-group").attr("style",rn(t.cssStyles))}else v=o.insert("rect",":first-child"),v.attr("class","basic label-container collapsed-group").attr("style",a).attr("rx",GN).attr("ry",GN).attr("x",p).attr("y",m).attr("width",d).attr("height",f).attr("fill",n).attr("stroke",i);let x=m+u+h+FN;o.append("line").attr("class","collapsed-separator").attr("x1",p+8).attr("y1",x).attr("x2",p+d-8).attr("y2",x).attr("stroke",i).attr("stroke-dasharray","3, 3");let b=x+$N/2,T=2.5,w=10;for(let C=-1;C<=1;C++)o.append("circle").attr("class","collapsed-indicator").attr("cx",C*w).attr("cy",b).attr("r",T).attr("fill",i);return dt(t,v),t.calcIntersect=function(C,k){return ct.rect(C,k)},t.intersect=function(C){return ct.rect(t,C)},o}var $N,FN,KHe,GN,Cae=F(()=>{"use strict";Zt();mr();Ht();tr();xd();Kt();Jt();Qt();$N=20,FN=8,KHe=80,GN=8;s(Tae,"collapsedGroup")});function da(e,t,r,n){return e.insert("polygon",":first-child").attr("points",n.map(function(i){return i.x+","+i.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-t/2+","+r/2+")")}var wc=F(()=>{"use strict";s(da,"insertPolygonShape")});async function wae(e,t){let r=t,{shapeSvg:n,bbox:i}=await wt(e,r,St(r)),a=r.padding??0,o=i.height+2*a,l=o/2,u=i.width+2*l+a,h=r.width??0,f=r.positioned&&(r.widthInColumns??1)>1&&h>u?h:u,p=eUe(r.directions??[],i,r,f),m=da(n,f,o,p);return m.attr("style",r.style??null),dt(r,m),r.intersect=function(g){return ct.polygon(r,p,g)},n}var ZHe,zN,QHe,JHe,kae,eUe,Sae=F(()=>{"use strict";tr();wc();Ht();ZHe=["right","left","up","down"],zN="point",QHe=s(e=>{let t=new Set;for(let r of e)switch(r){case"x":t.add("right"),t.add("left");break;case"y":t.add("up"),t.add("down");break;default:t.add(r);break}return t},"expandAndDeduplicateDirections"),JHe=s(e=>ZHe.filter(t=>e.has(t)).join("|")||zN,"getDirectionKey"),kae={"right|left|up|down":s(({height:e,midpoint:t,padding:r,width:n})=>[{x:0,y:0},{x:t,y:0},{x:n/2,y:2*r},{x:n-t,y:0},{x:n,y:0},{x:n,y:-e/3},{x:n+2*r,y:-e/2},{x:n,y:-2*e/3},{x:n,y:-e},{x:n-t,y:-e},{x:n/2,y:-e-2*r},{x:t,y:-e},{x:0,y:-e},{x:0,y:-2*e/3},{x:-2*r,y:-e/2},{x:0,y:-e/3}],"right|left|up|down"),"right|left|up":s(({height:e,midpoint:t,width:r})=>[{x:t,y:0},{x:r-t,y:0},{x:r,y:-e/2},{x:r-t,y:-e},{x:t,y:-e},{x:0,y:-e/2}],"right|left|up"),"right|left|down":s(({height:e,midpoint:t,width:r})=>[{x:0,y:0},{x:t,y:-e},{x:r-t,y:-e},{x:r,y:0}],"right|left|down"),"right|up|down":s(({height:e,midpoint:t,width:r})=>[{x:0,y:0},{x:r,y:-t},{x:r,y:-e+t},{x:0,y:-e}],"right|up|down"),"left|up|down":s(({height:e,midpoint:t,width:r})=>[{x:r,y:0},{x:0,y:-t},{x:0,y:-e+t},{x:r,y:-e}],"left|up|down"),"right|left":s(({height:e,midpoint:t,padding:r,width:n})=>[{x:t,y:0},{x:t,y:-r},{x:n-t,y:-r},{x:n-t,y:0},{x:n,y:-e/2},{x:n-t,y:-e},{x:n-t,y:-e+r},{x:t,y:-e+r},{x:t,y:-e},{x:0,y:-e/2}],"right|left"),"up|down":s(({height:e,midpoint:t,padding:r,width:n})=>[{x:n/2,y:0},{x:0,y:-r},{x:t,y:-r},{x:t,y:-e+r},{x:0,y:-e+r},{x:n/2,y:-e},{x:n,y:-e+r},{x:n-t,y:-e+r},{x:n-t,y:-r},{x:n,y:-r}],"up|down"),"right|up":s(({height:e,midpoint:t,width:r})=>[{x:0,y:0},{x:r,y:-t},{x:0,y:-e}],"right|up"),"right|down":s(({height:e,width:t})=>[{x:0,y:0},{x:t,y:0},{x:0,y:-e}],"right|down"),"left|up":s(({height:e,midpoint:t,width:r})=>[{x:r,y:0},{x:0,y:-t},{x:r,y:-e}],"left|up"),"left|down":s(({height:e,width:t})=>[{x:t,y:0},{x:0,y:0},{x:t,y:-e}],"left|down"),right:s(({height:e,midpoint:t,padding:r,width:n})=>[{x:t,y:-r},{x:t,y:-r},{x:n-t,y:-r},{x:n-t,y:0},{x:n,y:-e/2},{x:n-t,y:-e},{x:n-t,y:-e+r},{x:t,y:-e+r},{x:t,y:-e+r}],"right"),left:s(({height:e,midpoint:t,padding:r,width:n})=>[{x:t,y:0},{x:t,y:-r},{x:n-t,y:-r},{x:n-t,y:-e+r},{x:t,y:-e+r},{x:t,y:-e},{x:0,y:-e/2}],"left"),up:s(({height:e,midpoint:t,padding:r,width:n})=>[{x:t,y:-r},{x:t,y:-e+r},{x:0,y:-e+r},{x:n/2,y:-e},{x:n,y:-e+r},{x:n-t,y:-e+r},{x:n-t,y:-r}],"up"),down:s(({height:e,midpoint:t,padding:r,width:n})=>[{x:n/2,y:0},{x:0,y:-r},{x:t,y:-r},{x:t,y:-e+r},{x:n-t,y:-e+r},{x:n-t,y:-r},{x:n,y:-r}],"down"),[zN]:()=>[{x:0,y:0}]},eUe=s((e,t,r,n)=>{let i=QHe(e),a=(r.padding??0)/2,o=t.height+4*a,l=o/2,u=n??t.width+2*l+2*a,h=JHe(i);return(kae[h]??kae[zN])({height:o,midpoint:l,padding:a,width:u})},"getArrowPoints");s(wae,"block_arrow")});async function Eae(e,t){let{labelStyles:r,nodeStyles:n}=ut(t);t.labelStyle=r;let i=t.padding??0,a=t.look==="neo"?28:i,o=t.look==="neo"?24:i,{shapeSvg:l,bbox:u}=await wt(e,t,St(t)),h=(t?.width??u.width)+(t.look==="neo"?a*2:a+NE),d=(t?.height??u.height)+(t.look==="neo"?o*2:o),f=0,p=h,m=-d,g=0,y=[{x:f+NE,y:m},{x:p,y:m},{x:p,y:g},{x:f,y:g},{x:f,y:m+NE},{x:f+NE,y:m}],v,{cssStyles:x}=t;if(t.look==="handDrawn"){let b=ht.svg(l),T=ft(t,{}),w=cr(y),C=b.path(w,T);v=l.insert(()=>C,":first-child").attr("transform",`translate(${-h/2}, ${d/2})`),x&&v.attr("style",x)}else v=da(l,h,d,y);return n&&v.attr("style",n),dt(t,v),t.intersect=function(b){return ct.polygon(t,y,b)},l}var NE,Aae=F(()=>{"use strict";Ht();tr();Kt();Jt();wc();Ht();NE=12;s(Eae,"card")});function Rae(e,t){let{nodeStyles:r}=ut(t);t.label="";let n=e.insert("g").attr("class",St(t)).attr("id",t.domId??t.id),{cssStyles:i}=t,a=Math.max(28,t.width??0),o=[{x:0,y:a/2},{x:a/2,y:0},{x:0,y:-a/2},{x:-a/2,y:0}],l=ht.svg(n),u=ft(t,{});t.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");let h=cr(o),d=l.path(h,u),f=n.insert(()=>d,":first-child");return i&&t.look!=="handDrawn"&&f.selectAll("path").attr("style",i),r&&t.look!=="handDrawn"&&f.selectAll("path").attr("style",r),t.width=28,t.height=28,t.intersect=function(p){return ct.polygon(t,o,p)},n}var _ae=F(()=>{"use strict";tr();Jt();Kt();Ht();s(Rae,"choice")});async function PE(e,t,r){let{labelStyles:n,nodeStyles:i}=ut(t);t.labelStyle=n;let{shapeSvg:a,bbox:o,halfPadding:l}=await wt(e,t,St(t)),u=16,h=r?.padding??l,d=t.look==="neo"?o.width/2+u*2:o.width/2+h,f,{cssStyles:p}=t;if(t.look==="handDrawn"){let m=ht.svg(a),g=ft(t,{}),y=m.circle(0,0,d*2,g);f=a.insert(()=>y,":first-child"),f.attr("class","basic label-container").attr("style",rn(p))}else f=a.insert("circle",":first-child").attr("class","basic label-container").attr("style",i).attr("r",d).attr("cx",0).attr("cy",0);return dt(t,f),t.calcIntersect=function(m,g){let y=m.width/2;return ct.circle(m,y,g)},t.intersect=function(m){return te.info("Circle intersect",t,d,m),ct.circle(t,d,m)},a}var VN=F(()=>{"use strict";Jt();Tt();Qt();tr();Kt();Ht();s(PE,"circle")});async function Lae(e,t){let r=t,n=["node",r.cssClasses,r.class].filter(Boolean).join(" "),{shapeSvg:i,bbox:a,halfPadding:o}=await wt(e,r,n),l=i.insert("rect",":first-child"),u=r.padding??0,h=r.positioned?r.width??0:a.width+u,d=r.positioned?r.height??0:a.height+u,f=r.positioned?-h/2:-a.width/2-o,p=r.positioned?-d/2:-a.height/2-o;return l.attr("class","basic cluster composite label-container").attr("style",r.style??null).attr("rx",r.rx??null).attr("ry",r.ry??null).attr("x",f).attr("y",p).attr("width",h).attr("height",d),dt(r,l),r.intersect=function(m){return ct.rect(r,m)},i}var Dae=F(()=>{"use strict";tr();Ht();s(Lae,"composite")});function tUe(e){let t=Math.cos(Math.PI/4),r=Math.sin(Math.PI/4),n=e*2,i={x:n/2*t,y:n/2*r},a={x:-(n/2)*t,y:n/2*r},o={x:-(n/2)*t,y:-(n/2)*r},l={x:n/2*t,y:-(n/2)*r};return`M ${a.x},${a.y} L ${l.x},${l.y} + M ${i.x},${i.y} L ${o.x},${o.y}`}function Iae(e,t){let{labelStyles:r,nodeStyles:n}=ut(t);t.labelStyle=r,t.label="";let i=e.insert("g").attr("class",St(t)).attr("id",t.domId??t.id),a=Math.max(30,t?.width??0),{cssStyles:o}=t,l=ht.svg(i),u=ft(t,{});t.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");let h=l.circle(0,0,a*2,u),d=tUe(a),f=l.path(d,u),p=i.insert(()=>h,":first-child");return p.insert(()=>f),p.attr("class","outer-path"),o&&t.look!=="handDrawn"&&p.selectAll("path").attr("style",o),n&&t.look!=="handDrawn"&&p.selectAll("path").attr("style",n),dt(t,p),t.intersect=function(m){return te.info("crossedCircle intersect",t,{radius:a,point:m}),ct.circle(t,a,m)},i}var Mae=F(()=>{"use strict";Tt();Ht();Kt();Jt();tr();s(tUe,"createLine");s(Iae,"crossedCircle")});function bd(e,t,r,n=100,i=0,a=180){let o=[],l=i*Math.PI/180,d=(a*Math.PI/180-l)/(n-1);for(let f=0;fC,":first-child").attr("stroke-opacity",0),k.insert(()=>T,":first-child"),k.attr("class","text"),p&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",p),n&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",n),k.attr("transform",`translate(${f}, 0)`),o.attr("transform",`translate(${-h/2+f-(a.x-(a.left??0))},${-d/2+(t.padding??0)/2-(a.y-(a.top??0))})`),dt(t,k),t.intersect=function(S){return ct.polygon(t,g,S)},i}var Pae=F(()=>{"use strict";Ht();tr();Kt();Jt();s(bd,"generateCirclePoints");s(Nae,"curlyBraceLeft")});function Td(e,t,r,n=100,i=0,a=180){let o=[],l=i*Math.PI/180,d=(a*Math.PI/180-l)/(n-1);for(let f=0;fC,":first-child").attr("stroke-opacity",0),k.insert(()=>T,":first-child"),k.attr("class","text"),p&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",p),n&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",n),k.attr("transform",`translate(${-f}, 0)`),o.attr("transform",`translate(${-h/2+(t.padding??0)/2-(a.x-(a.left??0))},${-d/2+(t.padding??0)/2-(a.y-(a.top??0))})`),dt(t,k),t.intersect=function(S){return ct.polygon(t,g,S)},i}var Bae=F(()=>{"use strict";Ht();tr();Kt();Jt();s(Td,"generateCirclePoints");s(Oae,"curlyBraceRight")});function Ya(e,t,r,n=100,i=0,a=180){let o=[],l=i*Math.PI/180,d=(a*Math.PI/180-l)/(n-1);for(let f=0;fM,":first-child").attr("stroke-opacity",0),N.insert(()=>w,":first-child"),N.insert(()=>S,":first-child"),N.attr("class","text"),p&&t.look!=="handDrawn"&&N.selectAll("path").attr("style",p),n&&t.look!=="handDrawn"&&N.selectAll("path").attr("style",n),N.attr("transform",`translate(${f-f/4}, 0)`),o.attr("transform",`translate(${-h/2+(t.padding??0)/2-(a.x-(a.left??0))},${-d/2+(t.padding??0)/2-(a.y-(a.top??0))})`),dt(t,N),t.intersect=function(D){return ct.polygon(t,y,D)},i}var Fae=F(()=>{"use strict";Ht();tr();Kt();Jt();s(Ya,"generateCirclePoints");s($ae,"curlyBraces")});async function Gae(e,t){let{labelStyles:r,nodeStyles:n}=ut(t);t.labelStyle=r;let i=t.padding??0,a=t.look==="neo"?16:i,o=t.look==="neo"?12:i,l=20,u=5,{shapeSvg:h,bbox:d}=await wt(e,t,St(t)),f=Math.max(l,(d.width+a*2)*1.25,t?.width??0),p=Math.max(u,d.height+o*2,t?.height??0),m=p/2,{cssStyles:g}=t,y=ht.svg(h),v=ft(t,{});t.look!=="handDrawn"&&(v.roughness=0,v.fillStyle="solid");let x=f,b=p,T=x-m,w=b/4,C=[{x:T,y:0},{x:w,y:0},{x:0,y:b/2},{x:w,y:b},{x:T,y:b},...zp(-T,-b/2,m,50,270,90)],k=cr(C),S=y.path(k,v),A=h.insert(()=>S,":first-child");return A.attr("class","basic label-container outer-path"),g&&t.look!=="handDrawn"&&A.selectChildren("path").attr("style",g),n&&t.look!=="handDrawn"&&A.selectChildren("path").attr("style",n),A.attr("transform",`translate(${-f/2}, ${-p/2})`),dt(t,A),t.intersect=function(M){return ct.polygon(t,C,M)},h}var zae=F(()=>{"use strict";Ht();tr();Kt();Jt();s(Gae,"curvedTrapezoid")});async function qae(e,t){let{labelStyles:r,nodeStyles:n}=ut(t);t.labelStyle=r;let i=t.padding??0,a=t.look==="neo"?24:i,o=t.look==="neo"?24:i;if(t.width||t.height){let v=t.width??0;t.width=(t.width??0)-o,t.widthC,":first-child"),g=l.insert(()=>w,":first-child"),g.attr("class","basic label-container"),y&&g.attr("style",y)}else{let v=rUe(0,0,d,m,f,p);g=l.insert("path",":first-child").attr("d",v).attr("class","basic label-container outer-path").attr("style",rn(y)).attr("style",n)}return g.attr("label-offset-y",p),g.attr("transform",`translate(${-d/2}, ${-(m/2+p)})`),dt(t,g),h.attr("transform",`translate(${-(u.width/2)-(u.x-(u.left??0))}, ${-(u.height/2)+(t.padding??0)/1.5-(u.y-(u.top??0))})`),t.intersect=function(v){let x=ct.rect(t,v),b=x.x-(t.x??0);if(f!=0&&(Math.abs(b)<(t.width??0)/2||Math.abs(b)==(t.width??0)/2&&Math.abs(x.y-(t.y??0))>(t.height??0)/2-p)){let T=p*p*(1-b*b/(f*f));T>0&&(T=Math.sqrt(T)),T=p-T,v.y-(t.y??0)>0&&(T=-T),x.y+=T}return x},l}var rUe,nUe,iUe,Vae,Wae,Hae=F(()=>{"use strict";Ht();tr();Kt();Jt();Qt();rUe=s((e,t,r,n,i,a)=>[`M${e},${t+a}`,`a${i},${a} 0,0,0 ${r},0`,`a${i},${a} 0,0,0 ${-r},0`,`l0,${n}`,`a${i},${a} 0,0,0 ${r},0`,`l0,${-n}`].join(" "),"createCylinderPathD"),nUe=s((e,t,r,n,i,a)=>[`M${e},${t+a}`,`M${e+r},${t+a}`,`a${i},${a} 0,0,0 ${-r},0`,`l0,${n}`,`a${i},${a} 0,0,0 ${r},0`,`l0,${-n}`].join(" "),"createOuterCylinderPathD"),iUe=s((e,t,r,n,i,a)=>[`M${e-r/2},${-n/2}`,`a${i},${a} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD"),Vae=8,Wae=8;s(qae,"cylinder")});async function Ll(e,t,r){let{labelStyles:n,nodeStyles:i}=ut(t);t.labelStyle=n;let{shapeSvg:a,bbox:o}=await wt(e,t,St(t)),l=Math.max(o.width+r.labelPaddingX*2,t?.width||0),u=Math.max(o.height+r.labelPaddingY*2,t?.height||0),h=-l/2,d=-u/2,f,{rx:p,ry:m}=t,{cssStyles:g}=t;if(r?.rx&&r.ry&&(p=r.rx,m=r.ry),t.look==="handDrawn"){let y=ht.svg(a),v=ft(t,{}),x=p||m?y.path(Ua(h,d,l,u,p||0),v):y.rectangle(h,d,l,u,v);f=a.insert(()=>x,":first-child"),f.attr("class","basic label-container").attr("style",rn(g))}else f=a.insert("rect",":first-child"),f.attr("class","basic label-container").attr("style",i).attr("rx",rn(p)).attr("ry",rn(m)).attr("x",h).attr("y",d).attr("width",l).attr("height",u);return dt(t,f,t.look==="handDrawn"?void 0:{width:l,height:u}),t.calcIntersect=function(y,v){return ct.rect(y,v)},t.intersect=function(y){return ct.rect(t,y)},a}var Wp=F(()=>{"use strict";Ht();tr();xd();Kt();Jt();Qt();s(Ll,"drawRect")});async function Uae(e,t){let{cssClasses:r,labelPaddingX:n,labelPaddingY:i,padding:a,width:o,height:l}=t,u={rx:0,ry:0,classes:r??"",labelPaddingX:n??(a??0)*2,labelPaddingY:i??a??0},h=await Ll(e,t,u);if(t.look==="handDrawn"){let m=ht.svg(h),g=ft(t,{}),y=h.select(".basic.label-container > path:nth-child(2)"),v=y.node();if(!v)return h;let x=null;if(v instanceof SVGGraphicsElement)x=v.getBBox();else return h;return h.insert(()=>m.line(x.x,x.y,x.x+x.width,x.y,g),".basic.label-container g.label"),h.insert(()=>m.line(x.x,x.y+x.height,x.x+x.width,x.y+x.height,g),".basic.label-container g.label"),y.remove(),h}let d=h.select(".basic.label-container"),f=(Number(d.attr("width"))||o)??0,p=(Number(d.attr("height"))||l)??0;return f>0&&p>0&&d.attr("stroke-dasharray",`${f} ${p}`),h}var Yae=F(()=>{"use strict";Wp();Kt();Jt();s(Uae,"datastore")});async function jae(e,t){let{labelStyles:r,nodeStyles:n}=ut(t);t.labelStyle=r;let i=t.look==="neo"?16:t.padding??0,a=t.look==="neo"?16:t.padding??0,{shapeSvg:o,bbox:l,label:u}=await wt(e,t,St(t)),h=l.width+i,d=l.height+a,f=d*.2,p=-h/2,m=-d/2-f/2,{cssStyles:g}=t,y=ht.svg(o),v=ft(t,{});t.look!=="handDrawn"&&(v.roughness=0,v.fillStyle="solid");let x=[{x:p,y:m+f},{x:-p,y:m+f},{x:-p,y:-m},{x:p,y:-m},{x:p,y:m},{x:-p,y:m},{x:-p,y:m+f}],b=y.polygon(x.map(w=>[w.x,w.y]),v),T=o.insert(()=>b,":first-child");return T.attr("class","basic label-container outer-path"),g&&t.look!=="handDrawn"&&T.selectAll("path").attr("style",g),n&&t.look!=="handDrawn"&&T.selectAll("path").attr("style",n),u.attr("transform",`translate(${p+(t.padding??0)/2-(l.x-(l.left??0))}, ${m+f+(t.padding??0)/2-(l.y-(l.top??0))})`),dt(t,T),t.intersect=function(w){return ct.rect(t,w)},o}var Xae=F(()=>{"use strict";Ht();tr();Kt();Jt();s(jae,"dividedRectangle")});async function Kae(e,t){let{labelStyles:r,nodeStyles:n}=ut(t),i=t.look==="neo"?12:5;t.labelStyle=r;let a=t.padding??0,o=t.look==="neo"?16:a,{shapeSvg:l,bbox:u}=await wt(e,t,St(t)),h=(t?.width?t?.width/2:u.width/2)+(o??0),d=h-i,f,{cssStyles:p}=t;if(t.look==="handDrawn"){let m=ht.svg(l),g=ft(t,{roughness:.2,strokeWidth:2.5}),y=ft(t,{roughness:.2,strokeWidth:1.5}),v=m.circle(0,0,h*2,g),x=m.circle(0,0,d*2,y);f=l.insert("g",":first-child"),f.attr("class",rn(t.cssClasses)).attr("style",rn(p)),f.node()?.appendChild(v),f.node()?.appendChild(x)}else{f=l.insert("g",":first-child");let m=f.insert("circle",":first-child"),g=f.insert("circle");f.attr("class","basic label-container").attr("style",n),m.attr("class","outer-circle").attr("style",n).attr("r",h).attr("cx",0).attr("cy",0),g.attr("class","inner-circle").attr("style",n).attr("r",d).attr("cx",0).attr("cy",0)}return dt(t,f),t.intersect=function(m){return te.info("DoubleCircle intersect",t,h,m),ct.circle(t,h,m)},l}var Zae=F(()=>{"use strict";Tt();Ht();tr();Kt();Jt();Qt();s(Kae,"doublecircle")});function Qae(e,t,{config:{themeVariables:r}}){let{labelStyles:n,nodeStyles:i}=ut(t);t.label="",t.labelStyle=n;let a=e.insert("g").attr("class",St(t)).attr("id",t.domId??t.id),o=7,{cssStyles:l}=t,u=ht.svg(a),{nodeBorder:h}=r,d=ft(t,{fillStyle:"solid"});t.look!=="handDrawn"&&(d.roughness=0);let f=u.circle(0,0,o*2,d),p=a.insert(()=>f,":first-child");return p.selectAll("path").attr("style",`fill: ${h} !important;`),l&&l.length>0&&t.look!=="handDrawn"&&p.selectAll("path").attr("style",l),i&&t.look!=="handDrawn"&&p.selectAll("path").attr("style",i),dt(t,p),t.intersect=function(m){return te.info("filledCircle intersect",t,{radius:o,point:m}),ct.circle(t,o,m)},a}var Jae=F(()=>{"use strict";Jt();Tt();tr();Kt();Ht();s(Qae,"filledCircle")});async function rse(e,t){let{labelStyles:r,nodeStyles:n}=ut(t);t.labelStyle=r;let i=t.padding??0,a=t.look==="neo"?i*2:i;(t.width||t.height)&&(t.height=t?.height??0,t.heightx,":first-child").attr("transform",`translate(${-d/2}, ${d/2})`).attr("class","outer-path");return m&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",m),n&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",n),t.width=h,t.height=d,dt(t,b),u.attr("transform",`translate(${-l.width/2-(l.x-(l.left??0))}, ${-d/2+(t.padding??0)/2+(l.y-(l.top??0))})`),t.intersect=function(T){return te.info("Triangle intersect",t,p,T),ct.polygon(t,p,T)},o}var ese,tse,nse=F(()=>{"use strict";Tt();Ht();tr();Kt();Jt();Ht();ese=10,tse=10;s(rse,"flippedTriangle")});function ise(e,t,{dir:r,config:{state:n,themeVariables:i}}){let{nodeStyles:a}=ut(t);t.label="";let o=e.insert("g").attr("class",St(t)).attr("id",t.domId??t.id),{cssStyles:l}=t,u=Math.max(70,t?.width??0),h=Math.max(10,t?.height??0);r==="LR"&&(u=Math.max(10,t?.width??0),h=Math.max(70,t?.height??0));let d=-1*u/2,f=-1*h/2,p=ht.svg(o),m=ft(t,{stroke:i.lineColor,fill:i.lineColor});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");let g=p.rectangle(d,f,u,h,m),y=o.insert(()=>g,":first-child");l&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",l),a&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",a),dt(t,y);let v=n?.padding??0;return t.width&&t.height&&(t.width+=v/2||0,t.height+=v/2||0),t.intersect=function(x){return ct.rect(t,x)},o}var ase=F(()=>{"use strict";Jt();tr();Kt();Ht();s(ise,"forkJoin")});async function sse(e,t){let{labelStyles:r,nodeStyles:n}=ut(t);t.labelStyle=r;let i=15,a=10,o=t.look==="neo"?16:t.padding??0,l=t.look==="neo"?12:t.padding??0;(t.width||t.height)&&(t.height=(t?.height??0)-l*2,t.heightb,":first-child");return T.attr("class","basic label-container outer-path"),m&&t.look!=="handDrawn"&&T.selectChildren("path").attr("style",m),n&&t.look!=="handDrawn"&&T.selectChildren("path").attr("style",n),dt(t,T),t.intersect=function(w){return te.info("Pill intersect",t,{radius:p,point:w}),ct.polygon(t,v,w)},u}var ose=F(()=>{"use strict";Tt();Ht();tr();Kt();Jt();s(sse,"halfRoundedRectangle")});async function lse(e,t){let{labelStyles:r,nodeStyles:n}=ut(t),i=t.look==="neo"?3.5:4;t.labelStyle=r;let a=t.padding??0,o=70,l=32,u=t.look==="neo"?o:a,h=t.look==="neo"?l:a;if(t.width||t.height){let T=(t.height??0)/i;t.width=(t?.width??0)-2*T-h,t.height=(t.height??0)-u}let{shapeSvg:d,bbox:f}=await wt(e,t,St(t)),p=(t?.height?t?.height:f.height)+u,m=p/i,g=(t?.width?t?.width:f.width)+2*m+h,y=[{x:m,y:0},{x:g-m,y:0},{x:g,y:-p/2},{x:g-m,y:-p},{x:m,y:-p},{x:0,y:-p/2}],v,{cssStyles:x}=t;if(t.look==="handDrawn"){let b=ht.svg(d),T=ft(t,{}),w=aUe(0,0,g,p,m),C=b.path(w,T);v=d.insert(()=>C,":first-child").attr("transform",`translate(${-g/2}, ${p/2})`),x&&v.attr("style",x)}else v=da(d,g,p,y);return n&&v.attr("style",n),t.width=g,t.height=p,dt(t,v),t.intersect=function(b){return ct.polygon(t,y,b)},d}var aUe,cse=F(()=>{"use strict";Ht();tr();Kt();Jt();wc();aUe=s((e,t,r,n,i)=>[`M${e+i},${t}`,`L${e+r-i},${t}`,`L${e+r},${t-n/2}`,`L${e+r-i},${t-n}`,`L${e+i},${t-n}`,`L${e},${t-n/2}`,"Z"].join(" "),"createHexagonPathD");s(lse,"hexagon")});async function use(e,t){let{labelStyles:r,nodeStyles:n}=ut(t);t.label="",t.labelStyle=r;let{shapeSvg:i}=await wt(e,t,St(t)),a=Math.max(30,t?.width??0),o=Math.max(30,t?.height??0),{cssStyles:l}=t,u=ht.svg(i),h=ft(t,{});t.look!=="handDrawn"&&(h.roughness=0,h.fillStyle="solid");let d=[{x:0,y:0},{x:a,y:0},{x:0,y:o},{x:a,y:o}],f=cr(d),p=u.path(f,h),m=i.insert(()=>p,":first-child");return m.attr("class","basic label-container outer-path"),l&&t.look!=="handDrawn"&&m.selectChildren("path").attr("style",l),n&&t.look!=="handDrawn"&&m.selectChildren("path").attr("style",n),m.attr("transform",`translate(${-a/2}, ${-o/2})`),dt(t,m),t.intersect=function(g){return te.info("Pill intersect",t,{points:d}),ct.polygon(t,d,g)},i}var hse=F(()=>{"use strict";Tt();Ht();tr();Kt();Jt();s(use,"hourglass")});async function dse(e,t,{config:{themeVariables:r,flowchart:n}}){let{labelStyles:i}=ut(t);t.labelStyle=i;let a=t.assetHeight??48,o=t.assetWidth??48,l=Math.max(a,o),u=n?.wrappingWidth;t.width=Math.max(l,u??0);let{shapeSvg:h,bbox:d,label:f}=await wt(e,t,"icon-shape default"),p=t.pos==="t",m=l,g=l,{nodeBorder:y}=r,{stylesMap:v}=kc(t),x=-g/2,b=-m/2,T=t.label?8:0,w=ht.svg(h),C=ft(t,{stroke:"none",fill:"none"});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");let k=w.rectangle(x,b,g,m,C),S=Math.max(g,d.width),A=m+d.height+T,M=w.rectangle(-S/2,-A/2,S,A,{...C,fill:"transparent",stroke:"none"}),N=h.insert(()=>k,":first-child"),D=h.insert(()=>M);if(t.icon){let R=h.append("g");R.html(`${await Va(t.icon,{height:l,width:l,fallbackPrefix:""})}`);let E=R.node().getBBox(),I=E.width,L=E.height,P=E.x,B=E.y;R.attr("transform",`translate(${-I/2-P},${p?d.height/2+T/2-L/2-B:-d.height/2-T/2-L/2-B})`),R.attr("style",`color: ${v.get("stroke")??y};`)}return f.attr("transform",`translate(${-d.width/2-(d.x-(d.left??0))},${p?-A/2:A/2-d.height})`),N.attr("transform",`translate(0,${p?d.height/2+T/2:-d.height/2-T/2})`),dt(t,D),t.intersect=function(R){if(te.info("iconSquare intersect",t,R),!t.label)return ct.rect(t,R);let E=t.x??0,I=t.y??0,L=t.height??0,P=[];return p?P=[{x:E-d.width/2,y:I-L/2},{x:E+d.width/2,y:I-L/2},{x:E+d.width/2,y:I-L/2+d.height+T},{x:E+g/2,y:I-L/2+d.height+T},{x:E+g/2,y:I+L/2},{x:E-g/2,y:I+L/2},{x:E-g/2,y:I-L/2+d.height+T},{x:E-d.width/2,y:I-L/2+d.height+T}]:P=[{x:E-g/2,y:I-L/2},{x:E+g/2,y:I-L/2},{x:E+g/2,y:I-L/2+m},{x:E+d.width/2,y:I-L/2+m},{x:E+d.width/2/2,y:I+L/2},{x:E-d.width/2,y:I+L/2},{x:E-d.width/2,y:I-L/2+m},{x:E-g/2,y:I-L/2+m}],ct.polygon(t,P,R)},h}var fse=F(()=>{"use strict";Jt();Tt();ml();tr();Kt();Ht();s(dse,"icon")});async function pse(e,t,{config:{themeVariables:r,flowchart:n}}){let{labelStyles:i}=ut(t);t.labelStyle=i;let a=t.assetHeight??48,o=t.assetWidth??48,l=Math.max(a,o),u=n?.wrappingWidth;t.width=Math.max(l,u??0);let{shapeSvg:h,bbox:d,label:f}=await wt(e,t,"icon-shape default"),p=20,m=t.label?8:0,g=t.pos==="t",{nodeBorder:y,mainBkg:v}=r,{stylesMap:x}=kc(t),b=ht.svg(h),T=ft(t,{});t.look!=="handDrawn"&&(T.roughness=0,T.fillStyle="solid");let w=x.get("fill");T.stroke=w??v;let C=h.append("g");t.icon&&C.html(`${await Va(t.icon,{height:l,width:l,fallbackPrefix:""})}`);let k=C.node().getBBox(),S=k.width,A=k.height,M=k.x,N=k.y,D=Math.max(S,A)*Math.SQRT2+p*2,R=b.circle(0,0,D,T),E=Math.max(D,d.width),I=D+d.height+m,L=b.rectangle(-E/2,-I/2,E,I,{...T,fill:"transparent",stroke:"none"}),P=h.insert(()=>R,":first-child"),B=h.insert(()=>L);return C.attr("transform",`translate(${-S/2-M},${g?d.height/2+m/2-A/2-N:-d.height/2-m/2-A/2-N})`),C.attr("style",`color: ${x.get("stroke")??y};`),f.attr("transform",`translate(${-d.width/2-(d.x-(d.left??0))},${g?-I/2:I/2-d.height})`),P.attr("transform",`translate(0,${g?d.height/2+m/2:-d.height/2-m/2})`),dt(t,B),t.intersect=function(O){return te.info("iconSquare intersect",t,O),ct.rect(t,O)},h}var mse=F(()=>{"use strict";Jt();Tt();ml();tr();Kt();Ht();s(pse,"iconCircle")});async function gse(e,t,{config:{themeVariables:r,flowchart:n}}){let{labelStyles:i}=ut(t);t.labelStyle=i;let a=t.assetHeight??48,o=t.assetWidth??48,l=Math.max(a,o),u=n?.wrappingWidth;t.width=Math.max(l,u??0);let{shapeSvg:h,bbox:d,halfPadding:f,label:p}=await wt(e,t,"icon-shape default"),m=t.pos==="t",g=l+f*2,y=l+f*2,{nodeBorder:v,mainBkg:x}=r,{stylesMap:b}=kc(t),T=-y/2,w=-g/2,C=t.label?8:0,k=ht.svg(h),S=ft(t,{});t.look!=="handDrawn"&&(S.roughness=0,S.fillStyle="solid");let A=b.get("fill");S.stroke=A??x;let M=k.path(Ua(T,w,y,g,5),S),N=Math.max(y,d.width),D=g+d.height+C,R=k.rectangle(-N/2,-D/2,N,D,{...S,fill:"transparent",stroke:"none"}),E=h.insert(()=>M,":first-child").attr("class","icon-shape2"),I=h.insert(()=>R);if(t.icon){let L=h.append("g");L.html(`${await Va(t.icon,{height:l,width:l,fallbackPrefix:""})}`);let P=L.node().getBBox(),B=P.width,O=P.height,$=P.x,G=P.y;L.attr("transform",`translate(${-B/2-$},${m?d.height/2+C/2-O/2-G:-d.height/2-C/2-O/2-G})`),L.attr("style",`color: ${b.get("stroke")??v};`)}return p.attr("transform",`translate(${-d.width/2-(d.x-(d.left??0))},${m?-D/2:D/2-d.height})`),E.attr("transform",`translate(0,${m?d.height/2+C/2:-d.height/2-C/2})`),dt(t,I),t.intersect=function(L){if(te.info("iconSquare intersect",t,L),!t.label)return ct.rect(t,L);let P=t.x??0,B=t.y??0,O=t.height??0,$=[];return m?$=[{x:P-d.width/2,y:B-O/2},{x:P+d.width/2,y:B-O/2},{x:P+d.width/2,y:B-O/2+d.height+C},{x:P+y/2,y:B-O/2+d.height+C},{x:P+y/2,y:B+O/2},{x:P-y/2,y:B+O/2},{x:P-y/2,y:B-O/2+d.height+C},{x:P-d.width/2,y:B-O/2+d.height+C}]:$=[{x:P-y/2,y:B-O/2},{x:P+y/2,y:B-O/2},{x:P+y/2,y:B-O/2+g},{x:P+d.width/2,y:B-O/2+g},{x:P+d.width/2/2,y:B+O/2},{x:P-d.width/2,y:B+O/2},{x:P-d.width/2,y:B-O/2+g},{x:P-y/2,y:B-O/2+g}],ct.polygon(t,$,L)},h}var yse=F(()=>{"use strict";Jt();Tt();ml();tr();Kt();xd();Ht();s(gse,"iconRounded")});async function vse(e,t,{config:{themeVariables:r,flowchart:n}}){let{labelStyles:i}=ut(t);t.labelStyle=i;let a=t.assetHeight??48,o=t.assetWidth??48,l=Math.max(a,o),u=n?.wrappingWidth;t.width=Math.max(l,u??0);let{shapeSvg:h,bbox:d,halfPadding:f,label:p}=await wt(e,t,"icon-shape default"),m=t.pos==="t",g=l+f*2,y=l+f*2,{nodeBorder:v,mainBkg:x}=r,{stylesMap:b}=kc(t),T=-y/2,w=-g/2,C=t.label?8:0,k=ht.svg(h),S=ft(t,{});t.look!=="handDrawn"&&(S.roughness=0,S.fillStyle="solid");let A=b.get("fill");S.stroke=A??x;let M=k.path(Ua(T,w,y,g,.1),S),N=Math.max(y,d.width),D=g+d.height+C,R=k.rectangle(-N/2,-D/2,N,D,{...S,fill:"transparent",stroke:"none"}),E=h.insert(()=>M,":first-child"),I=h.insert(()=>R);if(t.icon){let L=h.append("g");L.html(`${await Va(t.icon,{height:l,width:l,fallbackPrefix:""})}`);let P=L.node().getBBox(),B=P.width,O=P.height,$=P.x,G=P.y;L.attr("transform",`translate(${-B/2-$},${m?d.height/2+C/2-O/2-G:-d.height/2-C/2-O/2-G})`),L.attr("style",`color: ${b.get("stroke")??v};`)}return p.attr("transform",`translate(${-d.width/2-(d.x-(d.left??0))},${m?-D/2:D/2-d.height})`),E.attr("transform",`translate(0,${m?d.height/2+C/2:-d.height/2-C/2})`),dt(t,I),t.intersect=function(L){if(te.info("iconSquare intersect",t,L),!t.label)return ct.rect(t,L);let P=t.x??0,B=t.y??0,O=t.height??0,$=[];return m?$=[{x:P-d.width/2,y:B-O/2},{x:P+d.width/2,y:B-O/2},{x:P+d.width/2,y:B-O/2+d.height+C},{x:P+y/2,y:B-O/2+d.height+C},{x:P+y/2,y:B+O/2},{x:P-y/2,y:B+O/2},{x:P-y/2,y:B-O/2+d.height+C},{x:P-d.width/2,y:B-O/2+d.height+C}]:$=[{x:P-y/2,y:B-O/2},{x:P+y/2,y:B-O/2},{x:P+y/2,y:B-O/2+g},{x:P+d.width/2,y:B-O/2+g},{x:P+d.width/2/2,y:B+O/2},{x:P-d.width/2,y:B+O/2},{x:P-d.width/2,y:B-O/2+g},{x:P-y/2,y:B-O/2+g}],ct.polygon(t,$,L)},h}var xse=F(()=>{"use strict";Jt();Tt();ml();tr();xd();Kt();Ht();s(vse,"iconSquare")});async function bse(e,t,{config:{flowchart:r}}){let n=new Image;n.src=t?.img??"",await n.decode();let i=Number(n.naturalWidth.toString().replace("px","")),a=Number(n.naturalHeight.toString().replace("px",""));t.imageAspectRatio=i/a;let{labelStyles:o}=ut(t);t.labelStyle=o;let l=r?.wrappingWidth;t.defaultWidth=r?.wrappingWidth;let u=Math.max(t.label?l??0:0,t?.assetWidth??i),h=t.constraint==="on"&&t?.assetHeight?t.assetHeight*t.imageAspectRatio:u,d=t.constraint==="on"?h/t.imageAspectRatio:t?.assetHeight??a;t.width=Math.max(h,l??0);let{shapeSvg:f,bbox:p,label:m}=await wt(e,t,"image-shape default"),g=t.pos==="t",y=-h/2,v=-d/2,x=t.label?8:0,b=ht.svg(f),T=ft(t,{});t.look!=="handDrawn"&&(T.roughness=0,T.fillStyle="solid");let w=b.rectangle(y,v,h,d,T),C=Math.max(h,p.width),k=d+p.height+x,S=b.rectangle(-C/2,-k/2,C,k,{...T,fill:"none",stroke:"none"}),A=f.insert(()=>w,":first-child"),M=f.insert(()=>S);if(t.img){let N=f.append("image");N.attr("href",t.img),N.attr("width",h),N.attr("height",d),N.attr("preserveAspectRatio","none"),N.attr("transform",`translate(${-h/2},${g?k/2-d:-k/2})`)}return m.attr("transform",`translate(${-p.width/2-(p.x-(p.left??0))},${g?-d/2-p.height/2-x/2:d/2-p.height/2+x/2})`),A.attr("transform",`translate(0,${g?p.height/2+x/2:-p.height/2-x/2})`),dt(t,M),t.intersect=function(N){if(te.info("iconSquare intersect",t,N),!t.label)return ct.rect(t,N);let D=t.x??0,R=t.y??0,E=t.height??0,I=[];return g?I=[{x:D-p.width/2,y:R-E/2},{x:D+p.width/2,y:R-E/2},{x:D+p.width/2,y:R-E/2+p.height+x},{x:D+h/2,y:R-E/2+p.height+x},{x:D+h/2,y:R+E/2},{x:D-h/2,y:R+E/2},{x:D-h/2,y:R-E/2+p.height+x},{x:D-p.width/2,y:R-E/2+p.height+x}]:I=[{x:D-h/2,y:R-E/2},{x:D+h/2,y:R-E/2},{x:D+h/2,y:R-E/2+d},{x:D+p.width/2,y:R-E/2+d},{x:D+p.width/2/2,y:R+E/2},{x:D-p.width/2,y:R+E/2},{x:D-p.width/2,y:R-E/2+d},{x:D-h/2,y:R-E/2+d}],ct.polygon(t,I,N)},f}var Tse=F(()=>{"use strict";Jt();Tt();tr();Kt();Ht();s(bse,"imageSquare")});async function Cse(e,t){let{labelStyles:r,nodeStyles:n}=ut(t);t.labelStyle=r;let i=t.padding??0,a=i,o=t.look==="neo"?i*2:i,{shapeSvg:l,bbox:u}=await wt(e,t,St(t)),h=Math.max(u.height+a*2,t.height??0),d=Math.max(u.width+o*2,(t.width??0)-h),f=[{x:0,y:0},{x:d,y:0},{x:d+3*h/6,y:-h},{x:-3*h/6,y:-h}],p,{cssStyles:m}=t;if(t.look==="handDrawn"){let g=ht.svg(l),y=ft(t,{}),v=cr(f),x=g.path(v,y);p=l.insert(()=>x,":first-child").attr("transform",`translate(${-d/2}, ${h/2})`),m&&p.attr("style",m)}else p=da(l,d,h,f);return n&&p.attr("style",n),t.width=d,t.height=h,dt(t,p),t.intersect=function(g){return ct.polygon(t,f,g)},l}var kse=F(()=>{"use strict";Ht();tr();Kt();Jt();wc();s(Cse,"inv_trapezoid")});async function wse(e,t){let{shapeSvg:r,bbox:n,label:i}=await wt(e,t,"label"),a=r.insert("rect",":first-child");return a.attr("width",.1).attr("height",.1),r.attr("class","label edgeLabel"),i.attr("transform",`translate(${-(n.width/2)-(n.x-(n.left??0))}, ${-(n.height/2)-(n.y-(n.top??0))})`),dt(t,a),t.intersect=function(u){return ct.rect(t,u)},r}var Sse=F(()=>{"use strict";Wp();Ht();tr();s(wse,"labelRect")});async function Ese(e,t){let{labelStyles:r,nodeStyles:n}=ut(t);t.labelStyle=r;let i=t.padding??0,a=i,o=t.look==="neo"?i*2:i,{shapeSvg:l,bbox:u}=await wt(e,t,St(t)),h=Math.max(u.height+a,t.height??0),d=Math.max(u.width+o,(t.width??0)-h),f=[{x:0,y:0},{x:d+3*h/6,y:0},{x:d,y:-h},{x:-(3*h)/6,y:-h}],p,{cssStyles:m}=t;if(t.look==="handDrawn"){let g=ht.svg(l),y=ft(t,{}),v=cr(f),x=g.path(v,y);p=l.insert(()=>x,":first-child").attr("transform",`translate(${-d/2}, ${h/2})`),m&&p.attr("style",m)}else p=da(l,d,h,f);return n&&p.attr("style",n),t.width=d,t.height=h,dt(t,p),t.intersect=function(g){return ct.polygon(t,f,g)},l}var Ase=F(()=>{"use strict";Ht();tr();Kt();Jt();wc();s(Ese,"lean_left")});async function Rse(e,t){let{labelStyles:r,nodeStyles:n}=ut(t);t.labelStyle=r;let i=t.padding??0,a=i,o=t.look==="neo"?i*2:i,{shapeSvg:l,bbox:u}=await wt(e,t,St(t)),h=Math.max(u.height+a,t.height??0),d=Math.max(u.width+o,(t.width??0)-h),f=[{x:-3*h/6,y:0},{x:d,y:0},{x:d+3*h/6,y:-h},{x:0,y:-h}],p,{cssStyles:m}=t;if(t.look==="handDrawn"){let g=ht.svg(l),y=ft(t,{}),v=cr(f),x=g.path(v,y);p=l.insert(()=>x,":first-child").attr("transform",`translate(${-d/2}, ${h/2})`),m&&p.attr("style",m)}else p=da(l,d,h,f);return n&&p.attr("style",n),t.width=d,t.height=h,dt(t,p),t.intersect=function(g){return ct.polygon(t,f,g)},l}var _se=F(()=>{"use strict";Ht();tr();Kt();Jt();wc();s(Rse,"lean_right")});function Lse(e,t){let{labelStyles:r,nodeStyles:n}=ut(t);t.label="",t.labelStyle=r;let i=e.insert("g").attr("class",St(t)).attr("id",t.domId??t.id),{cssStyles:a}=t,o=Math.max(35,t?.width??0),l=Math.max(35,t?.height??0),u=7,h=[{x:o,y:0},{x:0,y:l+u/2},{x:o-2*u,y:l+u/2},{x:0,y:2*l},{x:o,y:l-u/2},{x:2*u,y:l-u/2}],d=ht.svg(i),f=ft(t,{});t.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");let p=cr(h),m=d.path(p,f),g=i.insert(()=>m,":first-child");return g.attr("class","outer-path"),a&&t.look!=="handDrawn"&&g.selectAll("path").attr("style",a),n&&t.look!=="handDrawn"&&g.selectAll("path").attr("style",n),g.attr("transform",`translate(-${o/2},${-l})`),dt(t,g),t.intersect=function(y){return te.info("lightningBolt intersect",t,y),ct.polygon(t,h,y)},i}var Dse=F(()=>{"use strict";Tt();Ht();Kt();Jt();tr();Ht();s(Lse,"lightningBolt")});async function Nse(e,t){let{labelStyles:r,nodeStyles:n}=ut(t);t.labelStyle=r;let i=t.padding??0,a=t.look==="neo"?16:i,o=t.look==="neo"?24:i;if(t.width||t.height){let x=t.width??0;t.width=(t.width??0)-a,t.widthk,":first-child").attr("class","line"),y=l.insert(()=>C,":first-child"),y.attr("class","basic label-container"),v&&y.attr("style",v)}else{let x=sUe(0,0,d,m,f,p,g);y=l.insert("path",":first-child").attr("d",x).attr("class","basic label-container outer-path").attr("style",rn(v)).attr("style",n)}return y.attr("label-offset-y",p),y.attr("transform",`translate(${-d/2}, ${-(m/2+p)})`),dt(t,y),h.attr("transform",`translate(${-(u.width/2)-(u.x-(u.left??0))}, ${-(u.height/2)+p-(u.y-(u.top??0))})`),t.intersect=function(x){let b=ct.rect(t,x),T=b.x-(t.x??0);if(f!=0&&(Math.abs(T)<(t.width??0)/2||Math.abs(T)==(t.width??0)/2&&Math.abs(b.y-(t.y??0))>(t.height??0)/2-p)){let w=p*p*(1-T*T/(f*f));w>0&&(w=Math.sqrt(w)),w=p-w,x.y-(t.y??0)>0&&(w=-w),b.y+=w}return b},l}var sUe,oUe,lUe,Ise,Mse,Pse=F(()=>{"use strict";Ht();tr();Kt();Jt();Qt();sUe=s((e,t,r,n,i,a,o)=>[`M${e},${t+a}`,`a${i},${a} 0,0,0 ${r},0`,`a${i},${a} 0,0,0 ${-r},0`,`l0,${n}`,`a${i},${a} 0,0,0 ${r},0`,`l0,${-n}`,`M${e},${t+a+o}`,`a${i},${a} 0,0,0 ${r},0`].join(" "),"createCylinderPathD"),oUe=s((e,t,r,n,i,a,o)=>[`M${e},${t+a}`,`M${e+r},${t+a}`,`a${i},${a} 0,0,0 ${-r},0`,`l0,${n}`,`a${i},${a} 0,0,0 ${r},0`,`l0,${-n}`,`M${e},${t+a+o}`,`a${i},${a} 0,0,0 ${r},0`].join(" "),"createOuterCylinderPathD"),lUe=s((e,t,r,n,i,a)=>[`M${e-r/2},${-n/2}`,`a${i},${a} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD"),Ise=10,Mse=10;s(Nse,"linedCylinder")});async function Ose(e,t){let{labelStyles:r,nodeStyles:n}=ut(t);t.labelStyle=r;let i=t.padding??0,a=t.look==="neo"?16:i,o=t.look==="neo"?12:i;if(t.width||t.height){let w=t.width;t.width=(w??0)*10/11-a*2,t.width<10&&(t.width=10),t.height=(t?.height??0)-o*2,t.height<10&&(t.height=10)}let{shapeSvg:l,bbox:u,label:h}=await wt(e,t,St(t)),d=(t?.width?t?.width:u.width)+(a??0)*2,f=(t?.height?t?.height:u.height)+(o??0)*2,p=t.look==="neo"?f/4:f/8,m=f+p,{cssStyles:g}=t,y=ht.svg(l),v=ft(t,{});t.look!=="handDrawn"&&(v.roughness=0,v.fillStyle="solid");let x=[{x:-d/2-d/2*.1,y:-m/2},{x:-d/2-d/2*.1,y:m/2},...Ho(-d/2-d/2*.1,m/2,d/2+d/2*.1,m/2,p,.8),{x:d/2+d/2*.1,y:-m/2},{x:-d/2-d/2*.1,y:-m/2},{x:-d/2,y:-m/2},{x:-d/2,y:m/2*1.1},{x:-d/2,y:-m/2}],b=y.polygon(x.map(w=>[w.x,w.y]),v),T=l.insert(()=>b,":first-child");return T.attr("class","basic label-container outer-path"),g&&t.look!=="handDrawn"&&T.selectAll("path").attr("style",g),n&&t.look!=="handDrawn"&&T.selectAll("path").attr("style",n),T.attr("transform",`translate(0,${-p/2})`),h.attr("transform",`translate(${-d/2+(t.padding??0)+d/2*.1/2-(u.x-(u.left??0))},${-f/2+(t.padding??0)-p/2-(u.y-(u.top??0))})`),dt(t,T),t.intersect=function(w){return ct.polygon(t,x,w)},l}var Bse=F(()=>{"use strict";Ht();tr();Jt();Kt();s(Ose,"linedWaveEdgedRect")});async function $se(e,t){let{labelStyles:r,nodeStyles:n}=ut(t);t.labelStyle=r;let i=t.padding??0,a=t.look==="neo"?16:i,o=t.look==="neo"?12:i,l=t.look==="neo"?10:5;(t.width||t.height)&&(t.width=Math.max((t?.width??0)-a*2-2*l,10),t.height=Math.max((t?.height??0)-o*2-2*l,10));let{shapeSvg:u,bbox:h,label:d}=await wt(e,t,St(t)),f=(t?.width?t?.width:h.width)+a*2+2*l,p=(t?.height?t?.height:h.height)+o*2+2*l,m=f-2*l,g=p-2*l,y=-m/2,v=-g/2,{cssStyles:x}=t,b=ht.svg(u),T=ft(t,{}),w=[{x:y-l,y:v+l},{x:y-l,y:v+g+l},{x:y+m-l,y:v+g+l},{x:y+m-l,y:v+g},{x:y+m,y:v+g},{x:y+m,y:v+g-l},{x:y+m+l,y:v+g-l},{x:y+m+l,y:v-l},{x:y+l,y:v-l},{x:y+l,y:v},{x:y,y:v},{x:y,y:v+l}],C=[{x:y,y:v+l},{x:y+m-l,y:v+l},{x:y+m-l,y:v+g},{x:y+m,y:v+g},{x:y+m,y:v},{x:y,y:v}];t.look!=="handDrawn"&&(T.roughness=0,T.fillStyle="solid");let k=cr(w),S=b.path(k,T),A=cr(C),M=b.path(A,T);t.look!=="handDrawn"&&(S=xN(S),M=xN(M));let N=u.insert("g",":first-child");return N.insert(()=>S),N.insert(()=>M),N.attr("class","basic label-container outer-path"),x&&t.look!=="handDrawn"&&N.selectAll("path").attr("style",x),n&&t.look!=="handDrawn"&&N.selectAll("path").attr("style",n),d.attr("transform",`translate(${-(h.width/2)-l-(h.x-(h.left??0))}, ${-(h.height/2)+l-(h.y-(h.top??0))})`),dt(t,N),t.intersect=function(D){return ct.polygon(t,w,D)},u}var Fse=F(()=>{"use strict";Ht();Kt();Jt();tr();s($se,"multiRect")});async function Gse(e,t){let{labelStyles:r,nodeStyles:n}=ut(t);t.labelStyle=r;let{shapeSvg:i,bbox:a,label:o}=await wt(e,t,St(t)),l=t.padding??0,u=t.look==="neo"?16:l,h=t.look==="neo"?12:l,d=!0;(t.width||t.height)&&(d=!1,t.width=(t?.width??0)-u*2,t.height=(t?.height??0)-h*3);let f=Math.max(a.width,t?.width??0)+u*2,p=Math.max(a.height,t?.height??0)+h*3,m=t.look==="neo"?p/4:p/8,g=p+(d?m/2:-m/2),y=-f/2,v=-g/2,x=10,{cssStyles:b}=t,T=Ho(y-x,v+g+x,y+f-x,v+g+x,m,.8),w=T?.[T.length-1],C=[{x:y-x,y:v+x},{x:y-x,y:v+g+x},...T,{x:y+f-x,y:w.y-x},{x:y+f,y:w.y-x},{x:y+f,y:w.y-2*x},{x:y+f+x,y:w.y-2*x},{x:y+f+x,y:v-x},{x:y+x,y:v-x},{x:y+x,y:v},{x:y,y:v},{x:y,y:v+x}],k=[{x:y,y:v+x},{x:y+f-x,y:v+x},{x:y+f-x,y:w.y-x},{x:y+f,y:w.y-x},{x:y+f,y:v},{x:y,y:v}],S=ht.svg(i),A=ft(t,{});t.look!=="handDrawn"&&(A.roughness=0,A.fillStyle="solid");let M=cr(C),N=S.path(M,A),D=cr(k),R=S.path(D,A),E=i.insert(()=>N,":first-child");return E.insert(()=>R),E.attr("class","basic label-container outer-path"),b&&t.look!=="handDrawn"&&E.selectAll("path").attr("style",b),n&&t.look!=="handDrawn"&&E.selectAll("path").attr("style",n),E.attr("transform",`translate(0,${-m/2})`),o.attr("transform",`translate(${-(a.width/2)-x-(a.x-(a.left??0))}, ${-(a.height/2)+x-m/2-(a.y-(a.top??0))})`),dt(t,E),t.intersect=function(I){return ct.polygon(t,C,I)},i}var zse=F(()=>{"use strict";Ht();tr();Jt();Kt();s(Gse,"multiWaveEdgedRectangle")});async function Vse(e,t,{config:{themeVariables:r}}){let{labelStyles:n,nodeStyles:i}=ut(t);t.labelStyle=n,t.useHtmlLabels||Yn(Lt())||(t.centerLabel=!0);let{shapeSvg:o,bbox:l,label:u}=await wt(e,t,St(t)),h=Math.max(l.width+(t.padding??0)*2,t?.width??0),d=Math.max(l.height+(t.padding??0)*2,t?.height??0),f=-h/2,p=-d/2,{cssStyles:m}=t,g=ht.svg(o),y=ft(t,{fill:r.noteBkgColor,stroke:r.noteBorderColor});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");let v=g.rectangle(f,p,h,d,y),x=o.insert(()=>v,":first-child");return x.attr("class","basic label-container outer-path"),u.attr("class","label noteLabel"),m&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",m),i&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",i),u.attr("transform",`translate(${-l.width/2-(l.x-(l.left??0))}, ${-(l.height/2)-(l.y-(l.top??0))})`),dt(t,x),t.intersect=function(b){return ct.rect(t,b)},o}var Wse=F(()=>{"use strict";Jt();tr();Kt();Ht();mr();mr();s(Vse,"note")});async function qse(e,t){let{labelStyles:r,nodeStyles:n}=ut(t);t.labelStyle=r;let{shapeSvg:i,bbox:a}=await wt(e,t,St(t)),o=a.width+(t.padding??0),l=a.height+(t.padding??0),u=o+l,h=.5,d=[{x:u/2,y:0},{x:u,y:-u/2},{x:u/2,y:-u},{x:0,y:-u/2}],f,{cssStyles:p}=t;if(t.look==="handDrawn"){let m=ht.svg(i),g=ft(t,{}),y=cUe(0,0,u),v=m.path(y,g);f=i.insert(()=>v,":first-child").attr("transform",`translate(${-u/2+h}, ${u/2})`),p&&f.attr("style",p)}else f=da(i,u,u,d),f.attr("transform",`translate(${-u/2+h}, ${u/2})`);return n&&f.attr("style",n),dt(t,f),t.calcIntersect=function(m,g){let y=m.width,v=[{x:y/2,y:0},{x:y,y:-y/2},{x:y/2,y:-y},{x:0,y:-y/2}],x=ct.polygon(m,v,g);return{x:x.x-.5,y:x.y-.5}},t.intersect=function(m){return this.calcIntersect(t,m)},i}var cUe,Hse=F(()=>{"use strict";Ht();tr();Kt();Jt();wc();cUe=s((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");s(qse,"question")});async function Use(e,t){let{labelStyles:r,nodeStyles:n}=ut(t);t.labelStyle=r;let i=t.padding??0,a=t.look==="neo"?21:i??0,o=t.look==="neo"?12:i??0,{shapeSvg:l,bbox:u,label:h}=await wt(e,t,St(t)),d=u.width+(t.look==="neo"?a*2:a),f=Math.max(u.height+(t.look==="neo"?o*2:o),t.height??0),p=f/4,g=-Math.max(d,(t.width??0)-p)/2,y=-f/2,v=y/2,x=[{x:g+v,y},{x:g,y:0},{x:g+v,y:-y},{x:-g,y:-y},{x:-g,y}],{cssStyles:b}=t,T=ht.svg(l),w=ft(t,{});t.look!=="handDrawn"&&(w.roughness=0,w.fillStyle="solid");let C=cr(x),k=T.path(C,w),S=l.insert(()=>k,":first-child");return S.attr("class","basic label-container outer-path"),b&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",b),n&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",n),S.attr("transform",`translate(${-v/2},0)`),h.attr("transform",`translate(${-v/2-u.width/2-(u.x-(u.left??0))}, ${-(u.height/2)-(u.y-(u.top??0))})`),dt(t,S),t.intersect=function(A){return ct.polygon(t,x,A)},l}var Yse=F(()=>{"use strict";Ht();tr();Kt();Jt();s(Use,"rect_left_inv_arrow")});var uUe,Dl,OE=F(()=>{"use strict";mr();Zt();qo();uUe=s(async(e,t,r,n=!1,i=!1)=>{let a=t||"";typeof a=="object"&&(a=a[0]);let o=Le(),l=Yn(o);return await li(e,a,{style:r,isTitle:n,useHtmlLabels:l,markdown:!1,isNode:i,width:Number.POSITIVE_INFINITY},o)},"createLabel"),Dl=uUe});async function jse(e,t){let{labelStyles:r,nodeStyles:n}=ut(t);t.labelStyle=r;let i;t.cssClasses?i="node "+t.cssClasses:i="node default";let a=e.insert("g").attr("class",i).attr("id",t.domId||t.id),o=a.insert("g"),l=a.insert("g").attr("class","label").attr("style",n),u=t.description,h=t.label,d=await Dl(l,h,t.labelStyle,!0,!0),f={width:0,height:0};if(Yn(Le())){let A=d.children[0],M=lt(d);f=A.getBoundingClientRect(),M.attr("width",f.width),M.attr("height",f.height)}te.info("Text 2",u);let p=u||[],m=d.getBBox(),g=await Dl(l,Array.isArray(p)?p.join("
    "):p,t.labelStyle,!0,!0),y=g.children[0],v=lt(g);f=y.getBoundingClientRect(),v.attr("width",f.width),v.attr("height",f.height);let x=(t.padding||0)/2;lt(g).attr("transform","translate( "+(f.width>m.width?0:(m.width-f.width)/2)+", "+(m.height+x+5)+")"),lt(d).attr("transform","translate( "+(f.width(te.debug("Rough node insert CXC",N),D),":first-child"),k=a.insert(()=>(te.debug("Rough node insert CXC",N),N),":first-child")}else k=o.insert("rect",":first-child"),S=o.insert("line"),k.attr("class","outer title-state").attr("style",n).attr("x",-f.width/2-x).attr("y",-f.height/2-x).attr("width",f.width+(t.padding||0)).attr("height",f.height+(t.padding||0)),S.attr("class","divider").attr("x1",-f.width/2-x).attr("x2",f.width/2+x).attr("y1",-f.height/2-x+m.height+x).attr("y2",-f.height/2-x+m.height+x);return dt(t,k),t.intersect=function(A){return ct.rect(t,A)},a}var Xse=F(()=>{"use strict";$r();Ht();OE();tr();Kt();Jt();Zt();xd();Tt();mr();s(jse,"rectWithTitle")});async function Kse(e,t,{config:{themeVariables:r}}){let n=r?.radius??5,i={rx:n,ry:n,classes:"",labelPaddingX:(t?.padding??0)*1,labelPaddingY:(t?.padding??0)*1};return Ll(e,t,i)}var Zse=F(()=>{"use strict";Wp();s(Kse,"roundedRect")});async function Qse(e,t){let{labelStyles:r,nodeStyles:n}=ut(t);t.labelStyle=r;let i=t.look==="neo"?16:t.padding??0,a=t.look==="neo"?12:t.padding??0,{shapeSvg:o,bbox:l,label:u}=await wt(e,t,St(t)),h=(t?.width??l.width)+i*2+(t.look==="neo"?qp:qp*2),d=(t?.height??l.height)+a*2,f=h-qp,p=d,m=qp-h/2,g=-d/2,{cssStyles:y}=t,v=ht.svg(o),x=ft(t,{});t.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");let b=[{x:m,y:g},{x:m+f,y:g},{x:m+f,y:g+p},{x:m-qp,y:g+p},{x:m-qp,y:g},{x:m,y:g},{x:m,y:g+p}],T=v.polygon(b.map(C=>[C.x,C.y]),x),w=o.insert(()=>T,":first-child");return w.attr("class","basic label-container outer-path").attr("style",rn(y)),n&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",n),y&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",n),u.attr("transform",`translate(${qp/2-l.width/2-(l.x-(l.left??0))}, ${-(l.height/2)-(l.y-(l.top??0))})`),dt(t,w),t.intersect=function(C){return ct.rect(t,C)},o}var qp,Jse=F(()=>{"use strict";Ht();tr();Kt();Jt();Qt();qp=8;s(Qse,"shadedProcess")});async function eoe(e,t){let{labelStyles:r,nodeStyles:n}=ut(t);t.labelStyle=r;let i=t.padding??0,a=t.look==="neo"?16:i,o=t.look==="neo"?12:i;(t.width||t.height)&&(t.width=Math.max((t?.width??0)-a*2,10),t.height=Math.max((t?.height??0)/1.5-o*2,10));let{shapeSvg:l,bbox:u,label:h}=await wt(e,t,St(t)),d=(t?.width?t?.width:u.width)+a*2,f=((t?.height?t?.height:u.height)+o*2)*1.5,p=d,m=f/1.5,g=-p/2,y=-m/2,{cssStyles:v}=t,x=ht.svg(l),b=ft(t,{});t.look!=="handDrawn"&&(b.roughness=0,b.fillStyle="solid");let T=[{x:g,y},{x:g,y:y+m},{x:g+p,y:y+m},{x:g+p,y:y-m/2}],w=cr(T),C=x.path(w,b),k=l.insert(()=>C,":first-child");return k.attr("class","basic label-container outer-path"),v&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",v),n&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",n),k.attr("transform",`translate(0, ${m/4})`),h.attr("transform",`translate(${-p/2+(t.padding??0)-(u.x-(u.left??0))}, ${-m/4+(t.padding??0)-(u.y-(u.top??0))})`),dt(t,k),t.intersect=function(S){return ct.polygon(t,T,S)},l}var toe=F(()=>{"use strict";Ht();tr();Kt();Jt();s(eoe,"slopedRect")});async function roe(e,t){let r=t.padding??0,n=t.look==="neo"?16:r*2,i=t.look==="neo"?12:r,a={rx:0,ry:0,classes:"",labelPaddingX:t.labelPaddingX??n,labelPaddingY:i};return Ll(e,t,a)}var noe=F(()=>{"use strict";Wp();s(roe,"squareRect")});async function ioe(e,t){let{labelStyles:r,nodeStyles:n}=ut(t);t.labelStyle=r;let i=t.padding??0,a=t.look==="neo"?20:i,o=t.look==="neo"?12:i,{shapeSvg:l,bbox:u}=await wt(e,t,St(t)),h=u.height+(t.look==="neo"?o*2:o),d=u.width+h/4+(t.look==="neo"?a*2:a),f=h/2,{cssStyles:p}=t,m=ht.svg(l),g=ft(t,{});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");let y=[{x:-d/2+f,y:-h/2},{x:d/2-f,y:-h/2},...zp(-d/2+f,0,f,50,90,270),{x:d/2-f,y:h/2},...zp(d/2-f,0,f,50,270,450)],v=cr(y),x=m.path(v,g),b=l.insert(()=>x,":first-child");return b.attr("class","basic label-container outer-path"),p&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",p),n&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",n),dt(t,b),t.intersect=function(T){return ct.polygon(t,y,T)},l}var aoe=F(()=>{"use strict";Ht();tr();Kt();Jt();s(ioe,"stadium")});async function soe(e,t){let r={rx:t.look==="neo"?3:5,ry:t.look==="neo"?3:5,classes:"flowchart-node"};return Ll(e,t,r)}var ooe=F(()=>{"use strict";Wp();s(soe,"state")});function loe(e,t,{config:{themeVariables:r}}){let{labelStyles:n,nodeStyles:i}=ut(t);t.labelStyle=n;let{cssStyles:a}=t,{lineColor:o,stateBorder:l,nodeBorder:u,nodeShadow:h}=r;(t.width||t.height)&&((t.width??0)<14&&(t.width=14),(t.height??0)<14&&(t.height=14)),t.width||(t.width=14),t.height||(t.height=14);let d=e.insert("g").attr("class","node default").attr("id",t.domId??t.id),f=ht.svg(d),p=ft(t,{});t.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");let m=f.circle(0,0,t.width,{...p,stroke:o,strokeWidth:2}),g=l??u,y=(t.width??0)*5/14,v=f.circle(0,0,y,{...p,fill:g,stroke:g,strokeWidth:2,fillStyle:"solid"}),x=d.insert(()=>m,":first-child");if(x.insert(()=>v),t.look!=="handDrawn"&&x.attr("class","outer-path"),a&&x.selectAll("path").attr("style",a),i&&x.selectAll("path").attr("style",i),t.width<25&&h&&t.look!=="handDrawn"){let b=e.node()?.ownerSVGElement?.id??"",T=b?`${b}-drop-shadow-small`:"drop-shadow-small";x.attr("style",`filter:url(#${T})`)}return dt(t,x),t.intersect=function(b){return ct.circle(t,(t.width??0)/2,b)},d}var coe=F(()=>{"use strict";Jt();tr();Kt();Ht();s(loe,"stateEnd")});function uoe(e,t,{config:{themeVariables:r}}){let{lineColor:n,nodeShadow:i}=r;(t.width||t.height)&&((t.width??0)<14&&(t.width=14),(t.height??0)<14&&(t.height=14)),t.width||(t.width=14),t.height||(t.height=14);let a=e.insert("g").attr("class","node default").attr("id",t.domId||t.id),o;if(t.look==="handDrawn"){let u=ht.svg(a).circle(0,0,t.width,tae(n));o=a.insert(()=>u),o.attr("class","state-start").attr("r",(t.width??7)/2).attr("width",t.width??14).attr("height",t.height??14)}else o=a.insert("circle",":first-child"),o.attr("class","state-start").attr("r",(t.width??7)/2).attr("width",t.width??14).attr("height",t.height??14);if(t.width<25&&i&&t.look!=="handDrawn"){let l=e.node()?.ownerSVGElement?.id??"",u=l?`${l}-drop-shadow-small`:"drop-shadow-small";o.attr("style",`filter:url(#${u})`)}return dt(t,o),t.intersect=function(l){return ct.circle(t,(t.width??7)/2,l)},a}var hoe=F(()=>{"use strict";Jt();tr();Kt();Ht();s(uoe,"stateStart")});async function doe(e,t){let{labelStyles:r,nodeStyles:n}=ut(t);t.labelStyle=r;let i=t?.padding??8,a=t.look==="neo"?28:i,o=t.look==="neo"?12:i,{shapeSvg:l,bbox:u}=await wt(e,t,St(t)),h=Math.max(u.width+2*K0+a,t.width??0),d=Math.max(u.height+o,t.height??0),f=h-2*K0,p=d,m=-h/2,g=-d/2,y=[{x:0,y:0},{x:f,y:0},{x:f,y:-p},{x:0,y:-p},{x:0,y:0},{x:-8,y:0},{x:f+8,y:0},{x:f+8,y:-p},{x:-8,y:-p},{x:-8,y:0}];if(t.look==="handDrawn"){let v=ht.svg(l),x=ft(t,{}),b=v.rectangle(m,g,f+16,p,x),T=v.line(m+K0,g,m+K0,g+p,x),w=v.line(m+K0+f,g,m+K0+f,g+p,x);l.insert(()=>T,":first-child"),l.insert(()=>w,":first-child");let C=l.insert(()=>b,":first-child"),{cssStyles:k}=t;C.attr("class","basic label-container").attr("style",rn(k)),dt(t,C)}else{let v=da(l,f,p,y);n&&v.attr("style",n),dt(t,v)}return t.intersect=function(v){return ct.polygon(t,y,v)},l}var K0,foe=F(()=>{"use strict";Ht();tr();Kt();Jt();wc();Qt();K0=8;s(doe,"subroutine")});async function poe(e,t){let{labelStyles:r,nodeStyles:n}=ut(t);t.labelStyle=r;let i=t.padding??0,a=t.look==="neo"?16:i,o=t.look==="neo"?12:i;(t.width||t.height)&&(t.height=Math.max((t?.height??0)-o*2,10),t.width=Math.max((t?.width??0)-a*2-WN*(t.height+o*2),10));let{shapeSvg:l,bbox:u}=await wt(e,t,St(t)),h=(t?.height?t?.height:u.height)+o*2,d=WN*h,f=WN*h,m=(t?.width?t?.width:u.width)+a*2+d-d,g=h,y=-m/2,v=-g/2,{cssStyles:x}=t,b=ht.svg(l),T=ft(t,{}),w=[{x:y-d/2,y:v},{x:y+m+d/2,y:v},{x:y+m+d/2,y:v+g},{x:y-d/2,y:v+g}],C=[{x:y+m-d/2,y:v+g},{x:y+m+d/2,y:v+g},{x:y+m+d/2,y:v+g-f}];t.look!=="handDrawn"&&(T.roughness=0,T.fillStyle="solid");let k=cr(w),S=b.path(k,T),A=cr(C),M=b.path(A,{...T,fillStyle:"solid"}),N=l.insert(()=>M,":first-child");return N.insert(()=>S,":first-child"),N.attr("class","basic label-container outer-path"),x&&t.look!=="handDrawn"&&N.selectAll("path").attr("style",x),n&&t.look!=="handDrawn"&&N.selectAll("path").attr("style",n),dt(t,N),t.intersect=function(D){return ct.polygon(t,w,D)},l}var WN,moe=F(()=>{"use strict";Ht();Kt();Jt();tr();WN=.2;s(poe,"taggedRect")});async function goe(e,t){let{labelStyles:r,nodeStyles:n}=ut(t);t.labelStyle=r;let{shapeSvg:i,bbox:a,label:o}=await wt(e,t,St(t)),l=Math.max(a.width+(t.padding??0)*2,t?.width??0),u=Math.max(a.height+(t.padding??0)*2,t?.height??0),h=u/8,d=.2*l,f=.2*u,p=u+h,{cssStyles:m}=t,g=ht.svg(i),y=ft(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");let v=[{x:-l/2-l/2*.1,y:p/2},...Ho(-l/2-l/2*.1,p/2,l/2+l/2*.1,p/2,h,.8),{x:l/2+l/2*.1,y:-p/2},{x:-l/2-l/2*.1,y:-p/2}],x=-l/2+l/2*.1,b=-p/2-f*.4,T=[{x:x+l-d,y:(b+u)*1.3},{x:x+l,y:b+u-f},{x:x+l,y:(b+u)*.9},...Ho(x+l,(b+u)*1.25,x+l-d,(b+u)*1.3,-u*.02,.5)],w=cr(v),C=g.path(w,y),k=cr(T),S=g.path(k,{...y,fillStyle:"solid"}),A=i.insert(()=>S,":first-child");return A.insert(()=>C,":first-child"),A.attr("class","basic label-container outer-path"),m&&t.look!=="handDrawn"&&A.selectAll("path").attr("style",m),n&&t.look!=="handDrawn"&&A.selectAll("path").attr("style",n),A.attr("transform",`translate(0,${-h/2})`),o.attr("transform",`translate(${-l/2+(t.padding??0)-(a.x-(a.left??0))},${-u/2+(t.padding??0)-h/2-(a.y-(a.top??0))})`),dt(t,A),t.intersect=function(M){return ct.polygon(t,v,M)},i}var yoe=F(()=>{"use strict";Ht();tr();Jt();Kt();s(goe,"taggedWaveEdgedRectangle")});async function voe(e,t){let{labelStyles:r,nodeStyles:n}=ut(t);t.labelStyle=r;let{shapeSvg:i,bbox:a}=await wt(e,t,St(t)),o=Math.max(a.width+(t.padding??0),t?.width||0),l=Math.max(a.height+(t.padding??0),t?.height||0),u=-o/2,h=-l/2,d=i.insert("rect",":first-child");return d.attr("class","text").attr("style",n).attr("rx",0).attr("ry",0).attr("x",u).attr("y",h).attr("width",o).attr("height",l),dt(t,d),t.intersect=function(f){return ct.rect(t,f)},i}var xoe=F(()=>{"use strict";Ht();tr();Kt();s(voe,"text")});async function Coe(e,t){let{labelStyles:r,nodeStyles:n}=ut(t);t.labelStyle=r;let i=t.padding??0,a=t.look==="neo"?12:i/2;if(t.width||t.height){let y=t.height??0;t.height=(t.height??0)-a,t.heightT,":first-child"),g=o.insert(()=>b,":first-child"),g.attr("class","basic label-container"),m&&g.attr("style",m)}else{let y=hUe(0,0,p,h,f,d);g=o.insert("path",":first-child").attr("d",y).attr("class","basic label-container").attr("style",rn(m)).attr("style",n),g.attr("class","basic label-container outer-path"),m&&g.selectAll("path").attr("style",m),n&&g.selectAll("path").attr("style",n)}return g.attr("label-offset-x",f),g.attr("transform",`translate(${-p/2}, ${h/2} )`),u.attr("transform",`translate(${-(l.width/2)-f-(l.x-(l.left??0))}, ${-(l.height/2)-(l.y-(l.top??0))})`),dt(t,g),t.intersect=function(y){let v=ct.rect(t,y),x=v.y-(t.y??0);if(d!=0&&(Math.abs(x)<(t.height??0)/2||Math.abs(x)==(t.height??0)/2&&Math.abs(v.x-(t.x??0))>(t.width??0)/2-f)){let b=f*f*(1-x*x/(d*d));b!=0&&(b=Math.sqrt(Math.abs(b))),b=f-b,y.x-(t.x??0)>0&&(b=-b),v.x+=b}return v},o}var hUe,dUe,fUe,boe,Toe,koe=F(()=>{"use strict";Ht();Kt();Jt();tr();Qt();hUe=s((e,t,r,n,i,a)=>`M${e},${t} + a${i},${a} 0,0,1 0,${-n} + l${r},0 + a${i},${a} 0,0,1 0,${n} + M${r},${-n} + a${i},${a} 0,0,0 0,${n} + l${-r},0`,"createCylinderPathD"),dUe=s((e,t,r,n,i,a)=>[`M${e},${t}`,`M${e+r},${t}`,`a${i},${a} 0,0,0 0,${-n}`,`l${-r},0`,`a${i},${a} 0,0,0 0,${n}`,`l${r},0`].join(" "),"createOuterCylinderPathD"),fUe=s((e,t,r,n,i,a)=>[`M${e+r/2},${-n/2}`,`a${i},${a} 0,0,0 0,${n}`].join(" "),"createInnerCylinderPathD"),boe=5,Toe=10;s(Coe,"tiltedCylinder")});async function woe(e,t){let{labelStyles:r,nodeStyles:n}=ut(t);t.labelStyle=r;let i=t.padding??0,a=(t.look==="neo",i),o=t.look==="neo"?i*2:i,{shapeSvg:l,bbox:u}=await wt(e,t,St(t)),h=Math.max(u.height+a,t.height??0),d=Math.max(u.width+o,(t.width??0)-h),f=[{x:-3*h/6,y:0},{x:d+3*h/6,y:0},{x:d,y:-h},{x:0,y:-h}],p,{cssStyles:m}=t;if(t.look==="handDrawn"){let g=ht.svg(l),y=ft(t,{}),v=cr(f),x=g.path(v,y);p=l.insert(()=>x,":first-child").attr("transform",`translate(${-d/2}, ${h/2})`),m&&p.attr("style",m)}else p=da(l,d,h,f);return n&&p.attr("style",n),t.width=d,t.height=h,dt(t,p),t.intersect=function(g){return ct.polygon(t,f,g)},l}var Soe=F(()=>{"use strict";Ht();tr();Kt();Jt();wc();s(woe,"trapezoid")});async function Eoe(e,t){let{labelStyles:r,nodeStyles:n}=ut(t);t.labelStyle=r;let i=t.padding??0,a=t.look==="neo"?16:i,o=t.look==="neo"?12:i,l=15,u=5;(t.width||t.height)&&(t.height=(t.height??0)-o*2,t.heightb,":first-child");return T.attr("class","basic label-container outer-path"),m&&t.look!=="handDrawn"&&T.selectChildren("path").attr("style",m),n&&t.look!=="handDrawn"&&T.selectChildren("path").attr("style",n),dt(t,T),t.intersect=function(w){return ct.polygon(t,v,w)},h}var Aoe=F(()=>{"use strict";Ht();tr();Kt();Jt();s(Eoe,"trapezoidalPentagon")});async function Loe(e,t){let{labelStyles:r,nodeStyles:n}=ut(t);t.labelStyle=r;let i=t.padding??0,a=t.look==="neo"?i*2:i;(t.width||t.height)&&(t.width=((t?.width??0)-a)/2,t.width<_oe&&(t.width=_oe),t.height=t?.height??0,t.heightb,":first-child").attr("transform",`translate(${-f/2}, ${f/2})`).attr("class","outer-path");return g&&t.look!=="handDrawn"&&T.selectChildren("path").attr("style",g),n&&t.look!=="handDrawn"&&T.selectChildren("path").attr("style",n),t.width=d,t.height=f,dt(t,T),u.attr("transform",`translate(${-l.width/2-(l.x-(l.left??0))}, ${f/2-(l.height+(t.padding??0)/(h?2:1)-(l.y-(l.top??0)))})`),t.intersect=function(w){return te.info("Triangle intersect",t,m,w),ct.polygon(t,m,w)},o}var Roe,_oe,Doe=F(()=>{"use strict";Tt();Ht();tr();Kt();Jt();Ht();Gr();Zt();Roe=10,_oe=10;s(Loe,"triangle")});async function Ioe(e,t){let{labelStyles:r,nodeStyles:n}=ut(t);t.labelStyle=r;let i=t.padding??0,a=t.look==="neo"?16:i,o=t.look==="neo"?12:i,l=!0;(t.width||t.height)&&(l=!1,t.width=(t?.width??0)-a*2,t.width<10&&(t.width=10),t.height=(t?.height??0)-o*2,t.height<10&&(t.height=10));let{shapeSvg:u,bbox:h,label:d}=await wt(e,t,St(t)),f=(t?.width?t?.width:h.width)+(a??0)*2,p=(t?.height?t?.height:h.height)+(o??0)*2,m=t.look==="neo"?p/4:p/8,g=p+(l?m:-m),{cssStyles:y}=t,x=14-f,b=x>0?x/2:0,T=ht.svg(u),w=ft(t,{});t.look!=="handDrawn"&&(w.roughness=0,w.fillStyle="solid");let C=[{x:-f/2-b,y:g/2},...Ho(-f/2-b,g/2,f/2+b,g/2,m,.8),{x:f/2+b,y:-g/2},{x:-f/2-b,y:-g/2}],k=cr(C),S=T.path(k,w),A=u.insert(()=>S,":first-child");return A.attr("class","basic label-container outer-path"),y&&t.look!=="handDrawn"&&A.selectAll("path").attr("style",y),n&&t.look!=="handDrawn"&&A.selectAll("path").attr("style",n),A.attr("transform",`translate(0,${-m/2})`),d.attr("transform",`translate(${-f/2+(t.padding??0)-(h.x-(h.left??0))},${-p/2+(t.padding??0)-m-(h.y-(h.top??0))})`),dt(t,A),t.intersect=function(M){return ct.polygon(t,C,M)},u}var Moe=F(()=>{"use strict";Ht();tr();Jt();Kt();s(Ioe,"waveEdgedRectangle")});async function Noe(e,t){let{labelStyles:r,nodeStyles:n}=ut(t);t.labelStyle=r;let i=t.padding??0,a=t.look==="neo"?16:i,o=t.look==="neo"?20:i;if(t.width||t.height){t.width=t?.width??0,t.width<20&&(t.width=20),t.height=t?.height??0,t.height<10&&(t.height=10);let w=Math.min(t.height*.2,t.height/4);t.height=Math.ceil(t.height-o-w*(20/9)),t.width=t.width-a*2}let{shapeSvg:l,bbox:u}=await wt(e,t,St(t)),h=(t?.width?t?.width:u.width)+a*2,d=(t?.height?t?.height:u.height)+o,f=d/8,p=d+f*2,{cssStyles:m}=t,g=ht.svg(l),y=ft(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");let v=[{x:-h/2,y:p/2},...Ho(-h/2,p/2,h/2,p/2,f,1),{x:h/2,y:-p/2},...Ho(h/2,-p/2,-h/2,-p/2,f,-1)],x=cr(v),b=g.path(x,y),T=l.insert(()=>b,":first-child");return T.attr("class","basic label-container"),m&&t.look!=="handDrawn"&&T.selectAll("path").attr("style",m),n&&t.look!=="handDrawn"&&T.selectAll("path").attr("style",n),dt(t,T),t.intersect=function(w){return ct.polygon(t,v,w)},l}var Poe=F(()=>{"use strict";Ht();tr();Kt();Jt();s(Noe,"waveRectangle")});async function Ooe(e,t){let{labelStyles:r,nodeStyles:n}=ut(t);t.labelStyle=r;let i=t.look==="neo"?16:t.padding??0,a=t.look==="neo"?12:t.padding??0;(t.width||t.height)&&(t.width=Math.max((t?.width??0)-i*2-yi,10),t.height=Math.max((t?.height??0)-a*2-yi,10));let{shapeSvg:o,bbox:l,label:u}=await wt(e,t,St(t)),h=(t?.width?t?.width:l.width)+i*2+yi,d=(t?.height?t?.height:l.height)+a*2+yi,f=h-yi,p=d-yi,m=-f/2,g=-p/2,{cssStyles:y}=t,v=ht.svg(o),x=ft(t,{}),b=[{x:m-yi,y:g-yi},{x:m-yi,y:g+p},{x:m+f,y:g+p},{x:m+f,y:g-yi}],T=`M${m-yi},${g-yi} L${m+f},${g-yi} L${m+f},${g+p} L${m-yi},${g+p} L${m-yi},${g-yi} + M${m-yi},${g} L${m+f},${g} + M${m},${g-yi} L${m},${g+p}`;t.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");let w=v.path(T,x),C=o.insert(()=>w,":first-child");return C.attr("transform",`translate(${yi/2}, ${yi/2})`),C.attr("class","basic label-container outer-path"),y&&t.look!=="handDrawn"&&C.selectAll("path").attr("style",y),n&&t.look!=="handDrawn"&&C.selectAll("path").attr("style",n),u.attr("transform",`translate(${-(l.width/2)+yi/2-(l.x-(l.left??0))}, ${-(l.height/2)+yi/2-(l.y-(l.top??0))})`),dt(t,C),t.intersect=function(k){return ct.polygon(t,b,k)},o}var yi,Boe=F(()=>{"use strict";Ht();Kt();Jt();tr();yi=10;s(Ooe,"windowPane")});async function qN(e,t){let r=t;r.alias&&(t.label=r.alias);let{theme:n,themeVariables:i}=Lt(),{rowEven:a,rowOdd:o,nodeBorder:l,borderColorArray:u}=i;if(t.look==="handDrawn"){let{themeVariables:Q}=Lt(),{background:U}=Q,ue={...t,id:t.id+"-background",domId:(t.domId||t.id)+"-background",look:"default",cssStyles:["stroke: none",`fill: ${U}`]};await qN(e,ue)}let h=Lt();t.useHtmlLabels=h.htmlLabels;let d=h.er?.diagramPadding??10,f=h.er?.entityPadding??6,{cssStyles:p}=t,{labelStyles:m,nodeStyles:g}=ut(t);if(r.attributes.length===0&&t.label){let Q={rx:0,ry:0,labelPaddingX:d,labelPaddingY:d*1.5,classes:""};ha(t.label,h)+Q.labelPaddingX*20){let Q=x.width+d*2-(C+k+S+A);C+=Q/D,k+=Q/D,S>0&&(S+=Q/D),A>0&&(A+=Q/D)}let E=C+k+S+A,I=ht.svg(v),L=ft(t,{});t.look!=="handDrawn"&&(L.roughness=0,L.fillStyle="solid");let P=0;w.length>0&&(P=w.reduce((Q,U)=>Q+(U?.rowHeight??0),0));let B=Math.max(R.width+d*2,t?.width||0,E),O=Math.max((P??0)+x.height,t?.height||0),$=-B/2,G=-O/2;if(v.selectAll("g:not(:first-child)").each((Q,U,ue)=>{let J=lt(ue[U]),he=J.attr("transform"),se=0,oe=0;if(he){let xe=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(he);xe&&(se=parseFloat(xe[1]),oe=parseFloat(xe[2]),J.attr("class").includes("attribute-name")?se+=C:J.attr("class").includes("attribute-keys")?se+=C+k:J.attr("class").includes("attribute-comment")&&(se+=C+k+S))}J.attr("transform",`translate(${$+d/2+se}, ${oe+G+x.height+f/2})`)}),v.select(".name").attr("transform","translate("+-x.width/2+", "+(G+f/2)+")"),n!=null&&$oe.has(n)){let Q=r.colorIndex??0;v.attr("data-color-id",`color-${Q%u.length}`)}let V=I.rectangle($,G,B,O,L),z=v.insert(()=>V,":first-child").attr("class","outer-path").attr("style",p.join(""));T.push(0);for(let[Q,U]of w.entries()){let J=(Q+1)%2===0&&U.yOffset!==0,he=I.rectangle($,x.height+G+U?.yOffset,B,U?.rowHeight,{...L,fill:J?a:o,stroke:l});v.insert(()=>he,"g.label").attr("style",p.join("")).attr("class",`row-rect-${J?"even":"odd"}`)}let W=1e-4,H=Qb($,x.height+G,B+$,x.height+G,W),j=I.polygon(H.map(Q=>[Q.x,Q.y]),L);if(v.insert(()=>j).attr("class","divider"),H=Qb(C+$,x.height+G,C+$,O+G,W),j=I.polygon(H.map(Q=>[Q.x,Q.y]),L),v.insert(()=>j).attr("class","divider"),M){let Q=C+k+$;H=Qb(Q,x.height+G,Q,O+G,W),j=I.polygon(H.map(U=>[U.x,U.y]),L),v.insert(()=>j).attr("class","divider")}if(N){let Q=C+k+S+$;H=Qb(Q,x.height+G,Q,O+G,W),j=I.polygon(H.map(U=>[U.x,U.y]),L),v.insert(()=>j).attr("class","divider")}for(let Q of T){let U=x.height+G+Q;H=Qb($,U,B+$,U,W),j=I.polygon(H.map(ue=>[ue.x,ue.y]),L),v.insert(()=>j).attr("class","divider")}if(dt(t,z),g&&t.look!=="handDrawn")if(n!=null&&pUe.has(n))v.selectAll("path").attr("style",g);else{let U=g.split(";")?.filter(ue=>ue.includes("stroke"))?.map(ue=>`${ue}`).join("; ");v.selectAll("path").attr("style",U??""),v.selectAll(".row-rect-even path").attr("style",g)}return t.intersect=function(Q){return ct.rect(t,Q)},v}async function Zb(e,t,r,n=0,i=0,a=[],o=""){let l=e.insert("g").attr("class",`label ${a.join(" ")}`).attr("transform",`translate(${n}, ${i})`).attr("style",o);t!==cc(t)&&(t=cc(t),t=t.replaceAll("<","<").replaceAll(">",">"));let u=l.node().appendChild(await li(l,t,{width:ha(t,r)+100,style:o,useHtmlLabels:r.htmlLabels},r));if(t.includes("<")||t.includes(">")){let d=u.children[0];for(d.textContent=d.textContent.replaceAll("<","<").replaceAll(">",">");d.childNodes[0];)d=d.childNodes[0],d.textContent=d.textContent.replaceAll("<","<").replaceAll(">",">")}let h=u.getBBox();if(sa(r.htmlLabels)){let d=u.children[0];d.style.textAlign="start";let f=lt(u);h=d.getBoundingClientRect(),f.attr("width",h.width),f.attr("height",h.height)}return h}function Qb(e,t,r,n,i){return e===r?[{x:e-i/2,y:t},{x:e+i/2,y:t},{x:r+i/2,y:n},{x:r-i/2,y:n}]:[{x:e,y:t-i/2},{x:e,y:t+i/2},{x:r,y:n+i/2},{x:r,y:n-i/2}]}var $oe,pUe,Foe=F(()=>{"use strict";Ht();tr();Kt();Jt();Wp();mr();qo();Gr();$r();Qt();$oe=new Set(["redux-color","redux-dark-color"]),pUe=new Set(["redux","redux-dark","redux-color","redux-dark-color"]);s(qN,"erBox");s(Zb,"addText");s(Qb,"lineToPolygon")});async function Goe(e,t,r,n,i=r.class.padding??12){let a=n?0:3,o=e.insert("g").attr("class",St(t)).attr("id",t.domId||t.id),l=null,u=null,h=null,d=null,f=0,p=0,m=0;if(l=o.insert("g").attr("class","annotation-group text"),t.annotations.length>0){let b=t.annotations[0];await BE(l,{text:`\xAB${b}\xBB`},0),f=l.node().getBBox().height}u=o.insert("g").attr("class","label-group text"),await BE(u,t,0,["font-weight: bolder"]);let g=u.node().getBBox();p=g.height,h=o.insert("g").attr("class","members-group text");let y=0;for(let b of t.members){let T=await BE(h,b,y,[b.parseClassifier()]);y+=T+a}m=h.node().getBBox().height,m<=0&&(m=i/2),d=o.insert("g").attr("class","methods-group text");let v=0;for(let b of t.methods){let T=await BE(d,b,v,[b.parseClassifier()]);v+=T+a}let x=o.node().getBBox();if(l!==null){let b=l.node().getBBox();l.attr("transform",`translate(${-b.width/2})`)}return u.attr("transform",`translate(${-g.width/2}, ${f})`),x=o.node().getBBox(),h.attr("transform",`translate(0, ${f+p+i*2})`),x=o.node().getBBox(),d.attr("transform",`translate(0, ${f+p+(m?m+i*4:i*2)})`),x=o.node().getBBox(),{shapeSvg:o,bbox:x}}async function BE(e,t,r,n=[]){let i=e.insert("g").attr("class","label").attr("style",n.join("; ")),a=Lt(),o="useHtmlLabels"in t?t.useHtmlLabels:sa(a.htmlLabels)??!0,l="";"text"in t?l=t.text:l=t.label,!o&&l.startsWith("\\")&&(l=l.substring(1)),jn(l)&&(o=!0);let u=await li(i,Tx(Wo(l)),{width:ha(l,a)+50,classes:"markdown-node-label",useHtmlLabels:o},a),h,d=1;if(o){let f=u.children[0],p=lt(u);d=f.innerHTML.split("
    ").length,f.innerHTML.includes("")&&(d+=f.innerHTML.split("").length-1),await TE(f),h=f.getBoundingClientRect(),p.attr("width",h.width),p.attr("height",h.height)}else{n.includes("font-weight: bolder")&<(u).selectAll("tspan").attr("font-weight",""),d=u.children.length;let f=u.children[0];(u.textContent===""||u.textContent.includes(">"))&&(f.textContent=l[0]+l.substring(1).replaceAll(">",">").replaceAll("<","<").trim(),l[1]===" "&&(f.textContent=f.textContent[0]+" "+f.textContent.substring(1))),f.textContent==="undefined"&&(f.textContent=""),h=u.getBBox()}return i.attr("transform","translate(0,"+(-h.height/(2*d)+r)+")"),h.height}var zoe=F(()=>{"use strict";$r();mr();Ht();Qt();Zt();qo();vN();Gr();s(Goe,"textHelper");s(BE,"addText")});async function Voe(e,t){let r=Le(),{themeVariables:n}=r,{useGradient:i}=n,a=r.class.padding??12,o=a,l=t.useHtmlLabels??sa(r.htmlLabels)??!0,u=t;u.annotations=u.annotations??[],u.members=u.members??[],u.methods=u.methods??[];let{shapeSvg:h,bbox:d}=await Goe(e,t,r,l,o),{labelStyles:f,nodeStyles:p}=ut(t);t.labelStyle=f,t.cssStyles=u.styles||"";let m=u.styles?.join(";")||p||"";t.cssStyles||(t.cssStyles=m.replaceAll("!important","").split(";"));let g=u.members.length===0&&u.methods.length===0&&!r.class?.hideEmptyMembersBox,y=ht.svg(h),v=ft(t,{});t.look!=="handDrawn"&&(v.roughness=0,v.fillStyle="solid");let x=Math.max(t.width??0,d.width),b=Math.max(t.height??0,d.height),T=(t.height??0)>d.height;u.members.length===0&&u.methods.length===0?b+=o:u.members.length>0&&u.methods.length===0&&(b+=o*2);let w=-x/2,C=-b/2,k=g?a*2:u.members.length===0&&u.methods.length===0?-a:0;T&&(k=a*2);let S=y.rectangle(w-a,C-a-(g?a:u.members.length===0&&u.methods.length===0?-a/2:0),x+2*a,b+2*a+k,v),A=h.insert(()=>S,":first-child");A.attr("class","basic label-container outer-path");let M=A.node().getBBox(),N=h.select(".annotation-group").node().getBBox().height-(g?a/2:0)||0,D=h.select(".label-group").node().getBBox().height-(g?a/2:0)||0,R=h.select(".members-group").node().getBBox().height-(g?a/2:0)||0,E=(N+D+C+a-(C-a-(g?a:u.members.length===0&&u.methods.length===0?-a/2:0)))/2;if(h.selectAll(".text").each((I,L,P)=>{let B=lt(P[L]),O=B.attr("transform"),$=0;if(O){let W=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(O);W&&($=parseFloat(W[2]))}let G=$+C+a-(g?a:u.members.length===0&&u.methods.length===0?-a/2:0);if(B.attr("class").includes("methods-group")){let z=Math.max(R,o/2);T?G=Math.max(E,N+D+z+C+o*2+a)+o*2:G=N+D+z+C+o*4+a}u.members.length===0&&u.methods.length===0&&r.class?.hideEmptyMembersBox&&(u.annotations.length>0?G=$-o:G=$),l||(G-=4);let V=w;(B.attr("class").includes("label-group")||B.attr("class").includes("annotation-group"))&&(V=-B.node()?.getBBox().width/2||0,h.selectAll("text").each(function(z,W,H){window.getComputedStyle(H[W]).textAnchor==="middle"&&(V=0)})),B.attr("transform",`translate(${V}, ${G})`)}),u.members.length>0||u.methods.length>0||g){let I=N+D+C+a,L=y.line(M.x,I,M.x+M.width,I+.001,v);h.insert(()=>L).attr("class",`divider${t.look==="neo"&&!i?" neo-line":""}`).attr("style",m)}if(g||u.members.length>0||u.methods.length>0){let I=N+D+R+C+o*2+a,L=y.line(M.x,T?Math.max(E,I):I,M.x+M.width,(T?Math.max(E,I):I)+.001,v);h.insert(()=>L).attr("class",`divider${t.look==="neo"&&!i?" neo-line":""}`).attr("style",m)}if(u.look!=="handDrawn"&&h.selectAll("path").attr("style",m),A.select(":nth-child(2)").attr("style",m),h.selectAll(".divider").select("path").attr("style",m),t.labelStyle?h.selectAll("span").attr("style",t.labelStyle):h.selectAll("span").attr("style",m),!l){let I=RegExp(/color\s*:\s*([^;]*)/),L=I.exec(m);if(L){let P=L[0].replace("color","fill");h.selectAll("tspan").attr("style",P)}else if(f){let P=I.exec(f);if(P){let B=P[0].replace("color","fill");h.selectAll("tspan").attr("style",B)}}}return dt(t,A),t.intersect=function(I){return ct.rect(t,I)},h}var Woe=F(()=>{"use strict";Ht();Zt();$r();Jt();Kt();tr();zoe();Gr();s(Voe,"classBox")});async function qoe(e,t){let{labelStyles:r,nodeStyles:n}=ut(t);t.labelStyle=r;let i=t,a=t,o=20,l=20,u="verifyMethod"in t,h=St(t),d=Le(),{themeVariables:f}=d,{borderColorArray:p,requirementEdgeLabelBackground:m}=f,g=d.layout==="elk"?"start":"center",y=e.insert("g").attr("class",h).attr("id",t.domId??t.id),v;u?v=await Wu(y,`<<${i.type}>>`,0,t.labelStyle):v=await Wu(y,"<<Element>>",0,t.labelStyle);let x=v,b=await Wu(y,i.name,x,t.labelStyle+"; font-weight: bold;");if(x+=b+l,u){let D=await Wu(y,`${i.requirementId?`ID: ${i.requirementId}`:""}`,x,t.labelStyle,g);x+=D;let R=await Wu(y,`${i.text?`Text: ${i.text}`:""}`,x,t.labelStyle,g);x+=R;let E=await Wu(y,`${i.risk?`Risk: ${i.risk}`:""}`,x,t.labelStyle,g);x+=E,await Wu(y,`${i.verifyMethod?`Verification: ${i.verifyMethod}`:""}`,x,t.labelStyle,g)}else{let D=await Wu(y,`${a.type?`Type: ${a.type}`:""}`,x,t.labelStyle,g);x+=D,await Wu(y,`${a.docRef?`Doc Ref: ${a.docRef}`:""}`,x,t.labelStyle,g)}let T=(y.node()?.getBBox().width??200)+o,w=(y.node()?.getBBox().height??200)+o,C=-T/2,k=-w/2,S=ht.svg(y),A=ft(t,{});t.look!=="handDrawn"&&(A.roughness=0,A.fillStyle="solid");let M=S.rectangle(C,k,T,w,A),N=y.insert(()=>M,":first-child");if(N.attr("class","basic label-container outer-path").attr("style",n),p?.length){let D=t.colorIndex??0;y.attr("data-color-id",`color-${D%p.length}`)}if(y.selectAll(".label").each((D,R,E)=>{let I=lt(E[R]),L=I.attr("transform"),P=0,B=0;if(L){let V=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(L);V&&(P=parseFloat(V[1]),B=parseFloat(V[2]))}let O=B-w/2,$=C+o/2;(R===0||R===1)&&($=P),I.attr("transform",`translate(${$}, ${O+o})`)}),x>v+b+l){let D=k+v+b+l,R;if(t.look==="neo"){let L=[[C,D],[C+T,D],[C+T,D+.001],[C,D+.001]];R=S.polygon(L,A)}else R=S.line(C,D,C+T,D,A);y.insert(()=>R).attr("class","divider")}return dt(t,N),t.intersect=function(D){return ct.rect(t,D)},n&&t.look!=="handDrawn"&&(m||p?.length)&&y.selectAll("path").attr("style",n),y}async function Wu(e,t,r,n="",i="center"){if(t==="")return 0;let a=e.insert("g").attr("class","label").attr("style",n),o=Le(),l=o.htmlLabels??!0,u=await li(a,Tx(Wo(t)),{width:ha(t,o)+50,classes:"markdown-node-label",useHtmlLabels:l,style:n},o),h;if(l){let d=u.children[0],f=lt(u);i==="start"&<(d).style("text-align","left"),h=d.getBoundingClientRect(),f.attr("width",h.width),f.attr("height",h.height)}else{let d=u.children[0];for(let f of d.children)n&&f.setAttribute("style",n);if(i==="start"){d.setAttribute("text-anchor","start");for(let f of d.children)f.setAttribute("text-anchor","start")}h=u.getBBox(),h.height+=6}return a.attr("transform",`translate(${-h.width/2},${-h.height/2+r})`),h.height}var Hoe=F(()=>{"use strict";Ht();tr();Kt();Jt();Qt();Zt();qo();$r();s(qoe,"requirementBox");s(Wu,"addText")});async function Uoe(e,t,{config:r}){let{labelStyles:n,nodeStyles:i}=ut(t);t.labelStyle=n||"";let a=10,o=t.width;t.width=(t.width??200)-10;let{shapeSvg:l,bbox:u,label:h}=await wt(e,t,St(t)),d=t.padding||10,f="",p;"ticket"in t&&t.ticket&&r?.kanban?.ticketBaseUrl&&(f=r?.kanban?.ticketBaseUrl.replace("#TICKET#",t.ticket),p=l.insert("svg:a",":first-child").attr("class","kanban-ticket-link").attr("xlink:href",f).attr("target","_blank"));let m={useHtmlLabels:t.useHtmlLabels,labelStyle:t.labelStyle||"",width:t.width,img:t.img,padding:t.padding||8,centerLabel:!1},g,y;p?{label:g,bbox:y}=await CE(p,"ticket"in t&&t.ticket||"",m):{label:g,bbox:y}=await CE(l,"ticket"in t&&t.ticket||"",m);let{label:v,bbox:x}=await CE(l,"assigned"in t&&t.assigned||"",m);t.width=o;let b=10,T=t?.width||0,w=Math.max(y.height,x.height)/2,C=Math.max(u.height+b*2,t?.height||0)+w,k=-T/2,S=-C/2;h.attr("transform","translate("+(d-T/2)+", "+(-w-u.height/2)+")"),g.attr("transform","translate("+(d-T/2)+", "+(-w+u.height/2)+")"),v.attr("transform","translate("+(d+T/2-x.width-2*a)+", "+(-w+u.height/2)+")");let A,{rx:M,ry:N}=t,{cssStyles:D}=t;if(t.look==="handDrawn"){let R=ht.svg(l),E=ft(t,{}),I=M||N?R.path(Ua(k,S,T,C,M||0),E):R.rectangle(k,S,T,C,E);A=l.insert(()=>I,":first-child"),A.attr("class","basic label-container").attr("style",D||null)}else{A=l.insert("rect",":first-child"),A.attr("class","basic label-container __APA__").attr("style",i).attr("rx",M??5).attr("ry",N??5).attr("x",k).attr("y",S).attr("width",T).attr("height",C);let R="priority"in t&&t.priority;if(R){let E=l.append("line"),I=k+2,L=S+Math.floor((M??0)/2),P=S+C-Math.floor((M??0)/2);E.attr("x1",I).attr("y1",L).attr("x2",I).attr("y2",P).attr("stroke-width","4").attr("stroke",mUe(R))}}return dt(t,A),t.height=C,t.intersect=function(R){return ct.rect(t,R)},l}var mUe,Yoe=F(()=>{"use strict";Ht();tr();xd();Kt();Jt();mUe=s(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");s(Uoe,"kanbanItem")});async function joe(e,t){let{labelStyles:r,nodeStyles:n}=ut(t);t.labelStyle=r;let{shapeSvg:i,bbox:a,halfPadding:o,label:l}=await wt(e,t,St(t)),u=a.width+10*o,h=a.height+8*o,d=.15*u,{cssStyles:f}=t,p=a.width+20,m=a.height+20,g=Math.max(u,p),y=Math.max(h,m);l.attr("transform",`translate(${-a.width/2}, ${-a.height/2})`);let v,x=`M0 0 + a${d},${d} 1 0,0 ${g*.25},${-1*y*.1} + a${d},${d} 1 0,0 ${g*.25},0 + a${d},${d} 1 0,0 ${g*.25},0 + a${d},${d} 1 0,0 ${g*.25},${y*.1} + + a${d},${d} 1 0,0 ${g*.15},${y*.33} + a${d*.8},${d*.8} 1 0,0 0,${y*.34} + a${d},${d} 1 0,0 ${-1*g*.15},${y*.33} + + a${d},${d} 1 0,0 ${-1*g*.25},${y*.15} + a${d},${d} 1 0,0 ${-1*g*.25},0 + a${d},${d} 1 0,0 ${-1*g*.25},0 + a${d},${d} 1 0,0 ${-1*g*.25},${-1*y*.15} + + a${d},${d} 1 0,0 ${-1*g*.1},${-1*y*.33} + a${d*.8},${d*.8} 1 0,0 0,${-1*y*.34} + a${d},${d} 1 0,0 ${g*.1},${-1*y*.33} + H0 V0 Z`;if(t.look==="handDrawn"){let b=ht.svg(i),T=ft(t,{}),w=b.path(x,T);v=i.insert(()=>w,":first-child"),v.attr("class","basic label-container").attr("style",rn(f))}else v=i.insert("path",":first-child").attr("class","basic label-container").attr("style",n).attr("d",x);return v.attr("transform",`translate(${-g/2}, ${-y/2})`),dt(t,v),t.calcIntersect=function(b,T){return ct.rect(b,T)},t.intersect=function(b){return te.info("Bang intersect",t,b),ct.rect(t,b)},i}var Xoe=F(()=>{"use strict";Tt();Ht();tr();Kt();Jt();Qt();s(joe,"bang")});async function Koe(e,t){let{labelStyles:r,nodeStyles:n}=ut(t);t.labelStyle=r;let{shapeSvg:i,bbox:a,halfPadding:o,label:l}=await wt(e,t,St(t)),u=a.width+2*o,h=a.height+2*o,d=.15*u,f=.25*u,p=.35*u,m=.2*u,{cssStyles:g}=t,y,v=`M0 0 + a${d},${d} 0 0,1 ${u*.25},${-1*u*.1} + a${p},${p} 1 0,1 ${u*.4},${-1*u*.1} + a${f},${f} 1 0,1 ${u*.35},${u*.2} + + a${d},${d} 1 0,1 ${u*.15},${h*.35} + a${m},${m} 1 0,1 ${-1*u*.15},${h*.65} + + a${f},${d} 1 0,1 ${-1*u*.25},${u*.15} + a${p},${p} 1 0,1 ${-1*u*.5},0 + a${d},${d} 1 0,1 ${-1*u*.25},${-1*u*.15} + + a${d},${d} 1 0,1 ${-1*u*.1},${-1*h*.35} + a${m},${m} 1 0,1 ${u*.1},${-1*h*.65} + H0 V0 Z`;if(t.look==="handDrawn"){let x=ht.svg(i),b=ft(t,{}),T=x.path(v,b);y=i.insert(()=>T,":first-child"),y.attr("class","basic label-container").attr("style",rn(g))}else y=i.insert("path",":first-child").attr("class","basic label-container").attr("style",n).attr("d",v);return l.attr("transform",`translate(${-a.width/2}, ${-a.height/2})`),y.attr("transform",`translate(${-u/2}, ${-h/2})`),dt(t,y),t.calcIntersect=function(x,b){return ct.rect(x,b)},t.intersect=function(x){return te.info("Cloud intersect",t,x),ct.rect(t,x)},i}var Zoe=F(()=>{"use strict";Jt();Tt();Qt();tr();Kt();Ht();s(Koe,"cloud")});async function Qoe(e,t){let{labelStyles:r,nodeStyles:n}=ut(t);t.labelStyle=r;let{shapeSvg:i,bbox:a,halfPadding:o,label:l}=await wt(e,t,St(t)),u=a.width+8*o,h=a.height+2*o,d=5,f=t.look==="neo"?` + M${-u/2} ${h/2-d} + v${-h+2*d} + q0,-${d} ${d},-${d} + h${u-2*d} + q${d},0 ${d},${d} + v${h-d} + H${-u/2} + Z + `:` + M${-u/2} ${h/2-d} + v${-h+2*d} + q0,-${d} ${d},-${d} + h${u-2*d} + q${d},0 ${d},${d} + v${h-2*d} + q0,${d} ${-d},${d} + h${-(u-2*d)} + q${-d},0 ${-d},${-d} + Z + `;if(!t.domId)throw new Error(`defaultMindmapNode: node "${t.id}" is missing a domId \u2014 was render.ts domId prefixing skipped?`);let p=i.append("path").attr("id",t.domId).attr("class","node-bkg node-"+t.type).attr("style",n).attr("d",f);return i.append("line").attr("class","node-line-").attr("x1",-u/2).attr("y1",h/2).attr("x2",u/2).attr("y2",h/2),l.attr("transform",`translate(${-a.width/2}, ${-a.height/2})`),i.append(()=>l.node()),dt(t,p),t.calcIntersect=function(m,g){return ct.rect(m,g)},t.intersect=function(m){return ct.rect(t,m)},i}var Joe=F(()=>{"use strict";tr();Kt();Ht();s(Qoe,"defaultMindmapNode")});async function ele(e,t){let r={padding:t.padding??0};return PE(e,t,r)}var tle=F(()=>{"use strict";VN();s(ele,"mindmapCircle")});function rle(e){return e in HN}var gUe,yUe,HN,UN=F(()=>{"use strict";yae();bae();Cae();Sae();Aae();_ae();VN();Dae();Mae();Pae();Bae();Fae();zae();Hae();Yae();Xae();Zae();Jae();nse();ase();ose();cse();hse();fse();mse();yse();xse();Tse();kse();Sse();Ase();_se();Dse();Pse();Bse();Fse();zse();Wse();Hse();Yse();Xse();Zse();Jse();toe();noe();aoe();ooe();coe();hoe();foe();moe();yoe();xoe();koe();Soe();Aoe();Doe();Moe();Poe();Boe();Foe();Woe();Hoe();Yoe();Xoe();Zoe();Joe();tle();gUe=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:roe},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:Kse},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:ioe},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:doe},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:qae},{semanticName:"Data Store",name:"Data Store",shortName:"datastore",description:"Data flow diagram data store",aliases:["data-store"],handler:Uae},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:PE},{semanticName:"Bang",name:"Bang",shortName:"bang",description:"Bang",aliases:["bang"],handler:joe},{semanticName:"Cloud",name:"Cloud",shortName:"cloud",description:"cloud",aliases:["cloud"],handler:Koe},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:qse},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:lse},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:Rse},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:Ese},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:woe},{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:Cse},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:Kae},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:voe},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:Eae},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:Qse},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:uoe},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:loe},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:ise},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:use},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:Nae},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:Oae},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:$ae},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:Lse},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:Ioe},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:sse},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:Coe},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:Nse},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:Gae},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:jae},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:Loe},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:Ooe},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:Qae},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:Eoe},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:rse},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:eoe},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:Gse},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:$se},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:xae},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:Iae},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:goe},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:poe},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:Noe},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:Use},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:Ose}],yUe=s(()=>{let t=[...Object.entries({state:soe,choice:Rae,note:Vse,composite:Lae,rectWithTitle:jse,labelRect:wse,block_arrow:wae,collapsedGroup:Tae,iconSquare:vse,iconCircle:pse,icon:dse,iconRounded:gse,imageSquare:bse,anchor:gae,kanbanItem:Uoe,mindmapCircle:ele,defaultMindmapNode:Qoe,classBox:Voe,erBox:qN,requirementBox:qoe}),...gUe.flatMap(r=>[r.shortName,..."aliases"in r?r.aliases:[],..."internalAliases"in r?r.internalAliases:[]].map(i=>[i,r.handler]))];return Object.fromEntries(t)},"generateShapeMap"),HN=yUe();s(rle,"isValidShape")});var vUe,$E,nle=F(()=>{"use strict";$r();Gb();Zt();Tt();UN();Qt();Gr();An();ud();Jg();vUe="flowchart-",$E=class{constructor(){this.vertexCounter=0;this.config=Le();this.diagramId="";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=Cr;this.setAccDescription=Er;this.setDiagramTitle=Mr;this.getAccTitle=Sr;this.getAccDescription=Ar;this.getDiagramTitle=Rr;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{s(this,"FlowDB")}sanitizeText(t){return xt.sanitizeText(t,this.config)}sanitizeNodeLabelType(t){switch(t){case"markdown":case"string":case"text":return t;default:return"markdown"}}setDiagramId(t){this.diagramId=t}lookUpDomId(t){for(let r of this.vertices.values())if(r.id===t)return this.diagramId?`${this.diagramId}-${r.domId}`:r.domId;return this.diagramId?`${this.diagramId}-${t}`:t}addVertex(t,r,n,i,a,o,l={},u){if(!t||t.trim().length===0)return;let h;if(u!==void 0){let g;u.includes(` +`)?g=u+` +`:g=`{ +`+u+` +}`,h=yd(g,{schema:gd})}let d=this.subGraphLookup.get(t);if(d&&h){d.metadata={...d.metadata,...h};return}let f=this.edges.find(g=>g.id===t);if(f){let g=h;g?.animate!==void 0&&(f.animate=g.animate),g?.animation!==void 0&&(f.animation=g.animation),g?.curve!==void 0&&(f.interpolate=g.curve);return}let p,m=this.vertices.get(t);if(m===void 0&&(r===void 0&&n===void 0&&i!==void 0&&i!==null&&te.warn(`Style applied to unknown node "${t}". This may indicate a typo. The node will be created automatically.`),m={id:t,labelType:"text",domId:vUe+t+"-"+this.vertexCounter,styles:[],classes:[]},this.vertices.set(t,m)),this.vertexCounter++,r!==void 0?(this.config=Le(),p=this.sanitizeText(r.text.trim()),m.labelType=r.type,p.startsWith('"')&&p.endsWith('"')&&(p=p.substring(1,p.length-1)),m.text=p):m.text===void 0&&(m.text=t),n!==void 0&&(m.type=n),i?.forEach(g=>{m.styles.push(g)}),a?.forEach(g=>{m.classes.push(g)}),o!==void 0&&(m.dir=o),m.props===void 0?m.props=l:l!==void 0&&Object.assign(m.props,l),h!==void 0){if(h.shape){if(h.shape!==h.shape.toLowerCase()||h.shape.includes("_"))throw new Error(`No such shape: ${h.shape}. Shape names should be lowercase.`);if(!rle(h.shape))throw new Error(`No such shape: ${h.shape}.`);m.type=h?.shape}h?.label&&(m.text=h?.label,m.labelType=this.sanitizeNodeLabelType(h?.labelType)),h?.icon&&(m.icon=h?.icon,!h.label?.trim()&&m.text===t&&(m.text="")),h?.form&&(m.form=h?.form),h?.pos&&(m.pos=h?.pos),h?.img&&(m.img=h?.img,!h.label?.trim()&&m.text===t&&(m.text="")),h?.constraint&&(m.constraint=h.constraint),h.w&&(m.assetWidth=Number(h.w)),h.h&&(m.assetHeight=Number(h.h))}}addSingleLink(t,r,n,i){let l={start:t,end:r,type:void 0,text:"",labelType:"text",classes:[],isUserDefinedId:!1,interpolate:this.edges.defaultInterpolate};te.info("abc78 Got edge...",l);let u=n.text;if(u!==void 0&&(l.text=this.sanitizeText(u.text.trim()),l.text.startsWith('"')&&l.text.endsWith('"')&&(l.text=l.text.substring(1,l.text.length-1)),l.labelType=this.sanitizeNodeLabelType(u.type)),n!==void 0&&(l.type=n.type,l.stroke=n.stroke,l.length=n.length>10?10:n.length),i&&!this.edges.some(h=>h.id===i))l.id=i,l.isUserDefinedId=!0;else{let h=this.edges.filter(d=>d.start===l.start&&d.end===l.end);h.length===0?l.id=xc(l.start,l.end,{counter:0,prefix:"L"}):l.id=xc(l.start,l.end,{counter:h.length+1,prefix:"L"})}if(this.edges.length<(this.config.maxEdges??500))te.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,r,n){let i=this.isLinkData(n)?n.id.replace("@",""):void 0;te.info("addLink",t,r,i);for(let a of t)for(let o of r){let l=a===t[t.length-1],u=o===r[0];l&&u?this.addSingleLink(a,o,n,i):this.addSingleLink(a,o,n,void 0)}}updateLinkInterpolate(t,r){t.forEach(n=>{n==="default"?this.edges.defaultInterpolate=r:this.edges[n].interpolate=r})}updateLink(t,r){t.forEach(n=>{if(typeof n=="number"&&n>=this.edges.length)throw new Error(`The index ${n} 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.)`);n==="default"?this.edges.defaultStyle=r:(this.edges[n].style=r,(this.edges[n]?.style?.length??0)>0&&!this.edges[n]?.style?.some(i=>i?.startsWith("fill"))&&this.edges[n]?.style?.push("fill:none"))})}addClass(t,r){let n=r.join().replace(/\\,/g,"\xA7\xA7\xA7").replace(/,/g,";").replace(/§§§/g,",").split(";");t.split(",").forEach(i=>{let a=this.classes.get(i);a===void 0&&(a={id:i,styles:[],textStyles:[]},this.classes.set(i,a)),n?.forEach(o=>{if(/color/.exec(o)){let l=o.replace("fill","bgFill");a.textStyles.push(l)}a.styles.push(o)})})}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,r){for(let n of t.split(",")){let i=this.vertices.get(n);i&&i.classes.push(r);let a=this.edges.find(l=>l.id===n);a&&a.classes.push(r);let o=this.subGraphLookup.get(n);o&&o.classes.push(r)}}setTooltip(t,r){if(r!==void 0){r=this.sanitizeText(r);for(let n of t.split(","))this.tooltips.set(this.version==="gen-1"?this.lookUpDomId(n):n,r)}}setClickFun(t,r,n){if(Le().securityLevel!=="loose"||r===void 0)return;let i=[];if(typeof n=="string"){i=n.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let o=0;o{let o=this.lookUpDomId(t),l=document.querySelector(`[id="${o}"]`);l!==null&&l.addEventListener("click",()=>{sr.runFunc(r,...i)},!1)}))}setLink(t,r,n){t.split(",").forEach(i=>{let a=this.vertices.get(i);a!==void 0&&(a.link=sr.formatUrl(r,this.config),a.linkTarget=n)}),this.setClass(t,"clickable")}getTooltip(t){return this.tooltips.get(t)}setClickEvent(t,r,n){t.split(",").forEach(i=>{this.setClickFun(i,r,n)}),this.setClass(t,"clickable")}bindFunctions(t){this.funs.forEach(r=>{r(t)})}getDirection(){return this.direction?.trim()}getVertices(){return this.vertices}getEdges(){return this.edges}getClasses(){return this.classes}setupToolTips(t){let r=F0();lt(t).select("svg").selectAll("g.node").on("mouseover",a=>{let o=lt(a.currentTarget),l=o.attr("title");if(l===null)return;let u=a.currentTarget?.getBoundingClientRect();r.transition().duration(200).style("opacity",".9"),r.text(o.attr("title")).style("left",window.scrollX+u.left+(u.right-u.left)/2+"px").style("top",window.scrollY+u.bottom+"px"),r.html(Ps.sanitize(l)),o.classed("hover",!0)}).on("mouseout",a=>{r.transition().duration(500).style("opacity",0),lt(a.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.diagramId="",this.subGraphs=[],this.subGraphLookup=new Map,this.subCount=0,this.tooltips=new Map,this.firstGraphFlag=!0,this.version=t,this.config=Le(),gr()}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,r,n){let i=t.text.trim(),a=n.text;t===n&&/\s/.exec(n.text)&&(i=void 0);let l=s(g=>{let y={boolean:{},number:{},string:{}},v=[],x;return{nodeList:g.filter(function(T){let w=typeof T;return T.stmt&&T.stmt==="dir"?(x=T.value,!1):T.trim()===""?!1:w in y?y[w].hasOwnProperty(T)?!1:y[w][T]=!0:v.includes(T)?!1:v.push(T)}),dir:x}},"uniq")(r.flat()),u=l.nodeList,h=l.dir,d=h!==void 0,f=Le().flowchart??{},p=h??(f.inheritDir?this.getDirection()??Le().direction??void 0:void 0);if(this.version==="gen-1")for(let g=0;g2e3)return{result:!1,count:0};if(this.posCrossRef[this.secCount]=r,this.subGraphs[r].id===t)return{result:!0,count:0};let i=0,a=1;for(;i=0){let l=this.indexNodes2(t,o);if(l.result)return{result:!0,count:a+l.count};a=a+l.count}i=i+1}return{result:!1,count:a}}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 r=t.trim(),n="arrow_open";switch(r[0]){case"<":n="arrow_point",r=r.slice(1);break;case"x":n="arrow_cross",r=r.slice(1);break;case"o":n="arrow_circle",r=r.slice(1);break}let i="normal";return r.includes("=")&&(i="thick"),r.includes(".")&&(i="dotted"),{type:n,stroke:i}}countChar(t,r){let n=r.length,i=0;for(let a=0;a":i="arrow_point",r.startsWith("<")&&(i="double_"+i,n=n.slice(1));break;case"o":i="arrow_circle",r.startsWith("o")&&(i="double_"+i,n=n.slice(1));break}let a="normal",o=n.length-1;n.startsWith("=")&&(a="thick"),n.startsWith("~")&&(a="invisible");let l=this.countChar(".",n);return l&&(a="dotted",o=l),{type:i,stroke:a,length:o}}destructLink(t,r){let n=this.destructEndLink(t),i;if(r){if(i=this.destructStartLink(r),i.stroke!==n.stroke)return{type:"INVALID",stroke:"INVALID"};if(i.type==="arrow_open")i.type=n.type;else{if(i.type!==n.type)return{type:"INVALID",stroke:"INVALID"};i.type="double_"+i.type}return i.type==="double_arrow"&&(i.type="double_arrow_point"),i.length=n.length,i}return n}exists(t,r){for(let n of t)if(n.nodes.includes(r))return!0;return!1}makeUniq(t,r){let n=[];return t.nodes.forEach((i,a)=>{this.exists(r,i)||n.push(t.nodes[a])}),{nodes:n}}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,r){return t.find(n=>n.id===r)}destructEdgeType(t){let r="none",n="arrow_point";switch(t){case"arrow_point":case"arrow_circle":case"arrow_cross":n=t;break;case"double_arrow_point":case"double_arrow_circle":case"double_arrow_cross":r=t.replace("double_",""),n=r;break}return{arrowTypeStart:r,arrowTypeEnd:n}}addNodeFromVertex(t,r,n,i,a,o){let l=n.get(t.id),u=i.get(t.id)??!1,h=this.findNode(r,t.id);if(h)h.cssStyles=t.styles,h.cssCompiledStyles=this.getCompiledStyles(t.classes),h.cssClasses=t.classes.join(" ");else{let d={id:t.id,label:t.text,labelType:t.labelType,labelStyle:"",parentId:l,padding:a.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:o,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};u?r.push({...d,isGroup:!0,shape:"rect"}):r.push({...d,isGroup:!1,shape:this.getTypeFromVertex(t)})}}getCompiledStyles(t){let r=[];for(let n of t){let i=this.classes.get(n);i?.styles&&(r=[...r,...i.styles??[]].map(a=>a.trim())),i?.textStyles&&(r=[...r,...i.textStyles??[]].map(a=>a.trim()))}return r}getData(){let t=Le(),r=[],n=[],i=this.getSubGraphs(),a=new Map,o=new Map,l=new Map;for(let g of i)for(let y of g.nodes)this.subGraphLookup.has(y)&&l.set(y,g.id);let u=s(g=>this.subGraphLookup.get(g)?.metadata?.view==="collapsed","isCollapsed"),h=s(g=>{let y,v=new Set,x=g;for(;x!==void 0&&!v.has(x);)v.add(x),u(x)&&(y=x),x=l.get(x);return y},"outermostCollapsed"),d=new Set,f=new Map;for(let g of i){let y=h(g.id);if(y!==void 0){g.id!==y&&(d.add(g.id),f.set(g.id,y));for(let v of g.nodes)v!==y&&(d.add(v),f.set(v,y))}}for(let g=i.length-1;g>=0;g--){let y=i[g];if(!d.has(y.id)){y.nodes.length>0&&o.set(y.id,!0);for(let v of y.nodes)a.set(v,y.id)}}for(let g=i.length-1;g>=0;g--){let y=i[g];d.has(y.id)||(y.metadata?.view==="collapsed"?r.push({id:y.id,label:y.title,labelStyle:"",labelType:y.labelType,parentId:a.get(y.id),padding:8,cssCompiledStyles:this.getCompiledStyles(y.classes),cssClasses:y.classes.join(" "),shape:"collapsedGroup",dir:y.dir==="TD"?"TB":y.dir,isGroup:!1,look:t.look}):r.push({id:y.id,label:y.title,labelStyle:"",labelType:y.labelType,parentId:a.get(y.id),padding:8,cssCompiledStyles:this.getCompiledStyles(y.classes),cssClasses:y.classes.join(" "),shape:"rect",dir:y.dir==="TD"?"TB":y.dir,explicitDir:y.hasExplicitDir,isGroup:!0,look:t.look}))}this.getVertices().forEach(g=>{d.has(g.id)||this.addNodeFromVertex(g,r,a,o,t,t.look||"classic")});let m=this.getEdges();return m.forEach((g,y)=>{let{arrowTypeStart:v,arrowTypeEnd:x}=this.destructEdgeType(g.type),b=[...m.defaultStyle??[]],T=f.get(g.start)??g.start,w=f.get(g.end)??g.end;if(T===w&&(f.has(g.start)||f.has(g.end)))return;g.style&&b.push(...g.style);let C={id:xc(T,w,{counter:y,prefix:"L"},g.id),isUserDefinedId:g.isUserDefinedId,start:T,end:w,type:g.type??"normal",label:g.text,labelType:g.labelType,labelpos:"c",thickness:g.stroke,minlen:g.length,classes:g?.stroke==="invisible"?"":"edge-thickness-normal edge-pattern-solid flowchart-link",arrowTypeStart:g?.stroke==="invisible"||g?.type==="arrow_open"?"none":v,arrowTypeEnd:g?.stroke==="invisible"||g?.type==="arrow_open"?"none":x,arrowheadStyle:"fill: #333",cssCompiledStyles:this.getCompiledStyles(g.classes),labelStyle:b,style:b,pattern:g.stroke,look:t.look,animate:g.animate,animation:g.animation,curve:g.interpolate||this.edges.defaultInterpolate||t.flowchart?.curve};n.push(C)}),{nodes:r,edges:n,other:{},config:t}}defaultConfig(){return gw.flowchart}}});var Uo,Hp=F(()=>{"use strict";$r();Uo=s((e,t)=>{let r;return t==="sandbox"&&(r=lt("#i"+e)),(t==="sandbox"?lt(r.nodes()[0].contentDocument.body):lt("body")).select(`[id="${e}"]`)},"getDiagramElement")});var qu,Jb=F(()=>{"use strict";qu=s(({flowchart:e})=>{let t=e?.subGraphTitleMargin?.top??0,r=e?.subGraphTitleMargin?.bottom??0,n=t+r;return{subGraphTitleTopMargin:t,subGraphTitleBottomMargin:r,subGraphTitleTotalMargin:n}},"getSubGraphTitleMargins")});var ile,ale=F(()=>{"use strict";Zt();mr();Tt();$r();Jt();qo();wE();Kt();ile=s(async(e,t)=>{let r=Le(),{themeVariables:n,handDrawnSeed:i}=r,{clusterBkg:a,clusterBorder:o}=n,l=o,{labelStyles:u,nodeStyles:h,borderStyles:d,backgroundStyles:f}=ut(t),p=e.insert("g").attr("class","cluster swimlane "+(t.cssClasses||"")).attr("id",t.id).attr("data-id",t.id).attr("data-et","cluster").attr("data-look",t.look),m=sa(r.flowchart.htmlLabels),g=t.direction==="LR",y=p.insert("g").attr("class","cluster-label swimlane-label"),v=await li(y,t.label,{style:t.labelStyle,useHtmlLabels:m,isNode:!0,width:t.width}),x=v.getBBox();if(m){let E=v.children[0],I=lt(v);x=E.getBoundingClientRect(),I.attr("width",x.width),I.attr("height",x.height)}let b=t.padding??0,T=t.width<=x.width+b?x.width+b:t.width;t.width<=x.width+b?t.diff=(T-t.width)/2-b:t.diff=-b;let w=t.height,C=t.y-w/2,k=t.y+w/2,S=t.x-T/2,A=t.swimlaneContentTop!==void 0?t.swimlaneContentTop:C+w/3,M=g?4:0,N=x.height+2*M,D,R;if(g){let E=Math.max(N,x.height+2*M),I=S+E,L=Math.max(0,T-E);if(t.look==="handDrawn"){let O=ht.svg(p),$=ft(t,{roughness:.7,fill:a,stroke:l,fillWeight:3,seed:i}),G=ft(t,{roughness:.7,fill:"none",stroke:l,seed:i}),V=O.rectangle(S,C,E,w,$);D=p.insert(()=>V,":first-child");let z=O.rectangle(I,C,L,w,G);R=p.insert(()=>z,":first-child"),D.select("path:nth-child(2)").attr("style",d.join(";")),D.select("path").attr("style",f.join(";").replace("fill","stroke"))}else D=p.insert("rect",":first-child"),R=p.insert("rect",":first-child"),D.attr("class","swimlane-title").attr("style",h).attr("x",S).attr("y",C).attr("width",E).attr("height",w).attr("fill",a).attr("stroke",l),R.attr("class","swimlane-body").attr("style",h).attr("x",I).attr("y",C).attr("width",L).attr("height",w).attr("fill","none").attr("stroke",l);let P=S+E/2,B=t.y;y.attr("transform",`translate(${P}, ${B}) rotate(-90) translate(${-x.width/2}, ${-x.height/2})`)}else{let E=Math.max(0,A-C),I=Math.min(N,E),L=C+I,P=Math.max(0,k-L),B=t.x-T/2;if(t.look==="handDrawn"){let G=ht.svg(p),V=ft(t,{roughness:.7,fill:a,stroke:l,fillWeight:3,seed:i}),z=ft(t,{roughness:.7,fill:"none",stroke:l,seed:i}),W=G.rectangle(B,C,T,I,V);D=p.insert(()=>W,":first-child");let H=G.rectangle(B,L,T,P,z);R=p.insert(()=>H,":first-child"),D.select("path:nth-child(2)").attr("style",d.join(";")),D.select("path").attr("style",f.join(";").replace("fill","stroke"))}else D=p.insert("rect",":first-child"),R=p.insert("rect",":first-child"),D.attr("class","swimlane-title").attr("style",h).attr("x",B).attr("y",C).attr("width",T).attr("height",I).attr("fill",a).attr("stroke",l),R.attr("class","swimlane-body").attr("style",h).attr("x",B).attr("y",L).attr("width",T).attr("height",P).attr("fill","none").attr("stroke",l);let O=t.x-x.width/2,$=C+(I-x.height)/2;y.attr("transform",`translate(${O}, ${$})`)}if(te.trace("Swimlane data ",t,JSON.stringify(t)),u){let E=y.select("span");E&&E.attr("style",u)}return t.offsetX=0,t.width=T,t.height=w,t.offsetY=x.height-b/2,t.intersect=function(E){return Cc(t,E)},{cluster:p,labelBBox:x}},"swimlane")});var sle,xUe,bUe,TUe,CUe,kUe,wUe,ole,Cd,lle,e2=F(()=>{"use strict";Zt();mr();Tt();Jb();$r();Jt();qo();wE();OE();xd();Kt();ale();sle=s(async(e,t)=>{te.info("Creating subgraph rect for ",t.id,t);let r=Le(),{themeVariables:n,handDrawnSeed:i}=r,{clusterBkg:a,clusterBorder:o}=n,{labelStyles:l,nodeStyles:u,borderStyles:h,backgroundStyles:d}=ut(t),f=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.domId).attr("data-look",t.look),p=Yn(r),m=f.insert("g").attr("class","cluster-label "),g;t.labelType==="markdown"?g=await li(m,t.label,{style:t.labelStyle,useHtmlLabels:p,isNode:!0,width:t.width}):g=await Dl(m,t.label,t.labelStyle||"",!1,!0);let y=g.getBBox();if(Yn(r)){let S=g.children[0],A=lt(g);y=S.getBoundingClientRect(),A.attr("width",y.width),A.attr("height",y.height)}let v=t.width<=y.width+t.padding?y.width+t.padding:t.width;t.width<=y.width+t.padding?t.diff=(v-t.width)/2-t.padding:t.diff=-t.padding;let x=t.height,b=t.x-v/2,T=t.y-x/2;te.trace("Data ",t,JSON.stringify(t));let w;if(t.look==="handDrawn"){let S=ht.svg(f),A=ft(t,{roughness:.7,fill:a,stroke:o,fillWeight:3,seed:i}),M=S.path(Ua(b,T,v,x,0),A);w=f.insert(()=>(te.debug("Rough node insert CXC",M),M),":first-child"),w.select("path:nth-child(2)").attr("style",h.join(";")),w.select("path").attr("style",d.join(";").replace("fill","stroke"))}else w=f.insert("rect",":first-child"),w.attr("style",u).attr("rx",t.rx).attr("ry",t.ry).attr("x",b).attr("y",T).attr("width",v).attr("height",x);let{subGraphTitleTopMargin:C}=qu(r);if(m.attr("transform",`translate(${t.x-y.width/2}, ${t.y-t.height/2+C})`),l){let S=m.select("span");S&&S.attr("style",l)}let k=w.node().getBBox();return t.offsetX=0,t.width=k.width,t.height=k.height,t.offsetY=y.height-t.padding/2,t.intersect=function(S){return Cc(t,S)},{cluster:f,labelBBox:y}},"rect"),xUe=s((e,t)=>{let r=e.insert("g").attr("class","note-cluster").attr("id",t.domId),n=r.insert("rect",":first-child"),i=0*t.padding,a=i/2;n.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+i).attr("height",t.height+i).attr("fill","none");let o=n.node().getBBox();return t.width=o.width,t.height=o.height,t.intersect=function(l){return Cc(t,l)},{cluster:r,labelBBox:{width:0,height:0}}},"noteGroup"),bUe=s(async(e,t)=>{let r=Le(),{themeVariables:n,handDrawnSeed:i}=r,{altBackground:a,compositeBackground:o,compositeTitleBackground:l,nodeBorder:u}=n,h=e.insert("g").attr("class",t.cssClasses).attr("id",t.domId).attr("data-id",t.id).attr("data-look",t.look),d=h.insert("g",":first-child"),f=h.insert("g").attr("class","cluster-label"),p=h.append("rect"),m=await Dl(f,t.label,t.labelStyle,void 0,!0),g=m.getBBox();if(Yn(r)){let M=m.children[0],N=lt(m);g=M.getBoundingClientRect(),N.attr("width",g.width),N.attr("height",g.height)}let y=0*t.padding,v=y/2,x=(t.width<=g.width+t.padding?g.width+t.padding:t.width)+y;t.width<=g.width+t.padding?t.diff=(x-t.width)/2-t.padding:t.diff=-t.padding;let b=t.height+y,T=t.height+y-g.height-6,w=t.x-x/2,C=t.y-b/2;t.width=x;let k=t.y-t.height/2-v+g.height+2,S;if(t.look==="handDrawn"){let M=t.cssClasses.includes("statediagram-cluster-alt"),N=ht.svg(h),D=t.rx||t.ry?N.path(Ua(w,C,x,b,10),{roughness:.7,fill:l,fillStyle:"solid",stroke:u,seed:i}):N.rectangle(w,C,x,b,{seed:i});S=h.insert(()=>D,":first-child");let R=N.rectangle(w,k,x,T,{fill:M?a:o,fillStyle:M?"hachure":"solid",stroke:u,seed:i});S=h.insert(()=>D,":first-child"),p=h.insert(()=>R)}else S=d.insert("rect",":first-child"),S.attr("class","outer").attr("x",w).attr("y",C).attr("width",x).attr("height",b).attr("data-look",t.look),p.attr("class","inner").attr("x",w).attr("y",k).attr("width",x).attr("height",T);f.attr("transform",`translate(${t.x-g.width/2}, ${C+1-(Yn(r)?0:3)})`);let A=S.node().getBBox();return t.height=A.height,t.offsetX=0,t.offsetY=g.height-t.padding/2,t.labelBBox=g,t.intersect=function(M){return Cc(t,M)},{cluster:h,labelBBox:g}},"roundedWithTitle"),TUe=s(async(e,t)=>{te.info("Creating subgraph rect for ",t.id,t);let r=Le(),{themeVariables:n,handDrawnSeed:i}=r,{clusterBkg:a,clusterBorder:o}=n,{labelStyles:l,nodeStyles:u,borderStyles:h,backgroundStyles:d}=ut(t),f=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.domId).attr("data-look",t.look),p=Yn(r),m=f.insert("g").attr("class","cluster-label "),g=await li(m,t.label,{style:t.labelStyle,useHtmlLabels:p,isNode:!0,width:t.width}),y=g.getBBox();if(Yn(r)){let S=g.children[0],A=lt(g);y=S.getBoundingClientRect(),A.attr("width",y.width),A.attr("height",y.height)}let v=t.width<=y.width+t.padding?y.width+t.padding:t.width;t.width<=y.width+t.padding?t.diff=(v-t.width)/2-t.padding:t.diff=-t.padding;let x=t.height,b=t.x-v/2,T=t.y-x/2;te.trace("Data ",t,JSON.stringify(t));let w;if(t.look==="handDrawn"){let S=ht.svg(f),A=ft(t,{roughness:.7,fill:a,stroke:o,fillWeight:4,seed:i}),M=S.path(Ua(b,T,v,x,t.rx),A);w=f.insert(()=>(te.debug("Rough node insert CXC",M),M),":first-child"),w.select("path:nth-child(2)").attr("style",h.join(";")),w.select("path").attr("style",d.join(";").replace("fill","stroke"))}else w=f.insert("rect",":first-child"),w.attr("style",u).attr("rx",t.rx).attr("ry",t.ry).attr("x",b).attr("y",T).attr("width",v).attr("height",x);let{subGraphTitleTopMargin:C}=qu(r);if(m.attr("transform",`translate(${t.x-y.width/2}, ${t.y-t.height/2+C})`),l){let S=m.select("span");S&&S.attr("style",l)}let k=w.node().getBBox();return t.offsetX=0,t.width=k.width,t.height=k.height,t.offsetY=y.height-t.padding/2,t.intersect=function(S){return Cc(t,S)},{cluster:f,labelBBox:y}},"kanbanSection"),CUe=s((e,t)=>{let r=Le(),{themeVariables:n,handDrawnSeed:i}=r,{nodeBorder:a}=n,o=e.insert("g").attr("class",t.cssClasses).attr("id",t.domId).attr("data-look",t.look),l=o.insert("g",":first-child"),u=0*t.padding,h=t.width+u;t.diff=-t.padding;let d=t.height+u,f=t.x-h/2,p=t.y-d/2;t.width=h;let m;if(t.look==="handDrawn"){let v=ht.svg(o).rectangle(f,p,h,d,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:a,seed:i});m=o.insert(()=>v,":first-child")}else{m=l.insert("rect",":first-child");let y="outer";t.look,y="divider",m.attr("class",y).attr("x",f).attr("y",p).attr("width",h).attr("height",d).attr("data-look",t.look)}let g=m.node().getBBox();return t.height=g.height,t.offsetX=0,t.offsetY=0,t.intersect=function(y){return Cc(t,y)},{cluster:o,labelBBox:{}}},"divider"),kUe=sle,wUe={rect:sle,squareRect:kUe,roundedWithTitle:bUe,noteGroup:xUe,divider:CUe,kanbanSection:TUe,swimlane:ile},ole=new Map,Cd=s(async(e,t)=>{let r=t.shape||"rect",n=await wUe[r](e,t);return ole.set(t.id,n),n},"insertCluster"),lle=s(()=>{ole=new Map},"clear")});var Z0,cle=F(()=>{"use strict";Z0=s((e,t)=>{if(t)return"translate("+-e.width/2+", "+-e.height/2+")";let r=e.x??0,n=e.y??0;return"translate("+-(r+e.width/2)+", "+-(n+e.height/2)+")"},"computeLabelTransform")});function FE(e,t){if(e===void 0||t===void 0)return{angle:0,deltaX:0,deltaY:0};e=ri(e),t=ri(t);let[r,n]=[e.x,e.y],[i,a]=[t.x,t.y],o=i-r,l=a-n;return{angle:Math.atan(l/o),deltaX:o,deltaY:l}}var $i,YN,ri,ule,jN=F(()=>{"use strict";$i={aggregation:17.25,extension:17.25,composition:17.25,dependency:6,lollipop:13.5,arrow_point:4,arrow_barb:0,arrow_barb_neo:5.5},YN={arrow_point:4,arrow_cross:12.5,arrow_circle:12.5};s(FE,"calculateDeltaAndAngle");ri=s(e=>Array.isArray(e)?{x:e[0],y:e[1]}:e,"pointTransformer"),ule=s(e=>({x:s(function(t,r,n){let i=0,a=ri(n[0]).x=0?1:-1)}else if(r===n.length-1&&Object.hasOwn($i,e.arrowTypeEnd)){let{angle:m,deltaX:g}=FE(n[n.length-1],n[n.length-2]);i=$i[e.arrowTypeEnd]*Math.cos(m)*(g>=0?1:-1)}let o=Math.abs(ri(t).x-ri(n[n.length-1]).x),l=Math.abs(ri(t).y-ri(n[n.length-1]).y),u=Math.abs(ri(t).x-ri(n[0]).x),h=Math.abs(ri(t).y-ri(n[0]).y),d=$i[e.arrowTypeStart],f=$i[e.arrowTypeEnd],p=1;if(o0&&l0&&h=0?1:-1)}else if(r===n.length-1&&Object.hasOwn($i,e.arrowTypeEnd)){let{angle:m,deltaY:g}=FE(n[n.length-1],n[n.length-2]);i=$i[e.arrowTypeEnd]*Math.abs(Math.sin(m))*(g>=0?1:-1)}let o=Math.abs(ri(t).y-ri(n[n.length-1]).y),l=Math.abs(ri(t).x-ri(n[n.length-1]).x),u=Math.abs(ri(t).y-ri(n[0]).y),h=Math.abs(ri(t).x-ri(n[0]).x),d=$i[e.arrowTypeStart],f=$i[e.arrowTypeEnd],p=1;if(o0&&l0&&h{"use strict";Tt();dle=s((e,t,r,n,i,a=!1,o)=>{t.arrowTypeStart&&hle(e,"start",t.arrowTypeStart,r,n,i,a,o),t.arrowTypeEnd&&hle(e,"end",t.arrowTypeEnd,r,n,i,a,o)},"addEdgeMarkers"),SUe={arrow_cross:{type:"cross",fill:!1},arrow_point:{type:"point",fill:!0},arrow_barb:{type:"barb",fill:!0},arrow_barb_neo:{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}},EUe=["cross","point","circle","lollipop","aggregation","extension","composition","dependency","barb"],hle=s((e,t,r,n,i,a,o=!1,l)=>{if(!r||r==="none")return;let u=SUe[r],h=u&&EUe.includes(u.type);if(!u){te.warn(`Unknown arrow type: ${r}`);return}let d=u.type,m=`${i}_${a}-${d}${t==="start"?"Start":"End"}${o&&h?"-margin":""}`;if(l&&l.trim()!==""){let g=l.replace(/[^\dA-Za-z]/g,"_"),y=`${m}_${g}`;if(!document.getElementById(y)){let v=document.getElementById(m);if(v){let x=v.cloneNode(!0);x.id=y,x.querySelectorAll("path, circle, line").forEach(T=>{T.setAttribute("stroke",l),u.fill&&T.setAttribute("fill",l)}),v.parentNode?.appendChild(x)}}e.attr(`marker-${t}`,`url(${n}#${y})`)}else e.attr(`marker-${t}`,`url(${n}#${m})`)},"addEdgeMarker")});function GE(e,t){Yn(Le())&&e&&(e.style.width=t.length*9+"px",e.style.height="12px")}function DUe(e){let t=[],r=[];for(let n=1;n5&&Math.abs(a.y-i.y)>5||i.y===a.y&&a.x===o.x&&Math.abs(a.x-i.x)>5&&Math.abs(a.y-o.y)>5)&&(t.push(a),r.push(n))}return{cornerPoints:t,cornerPointPositions:r}}function NUe(e,t){if(e.length<2)return"";let r="",n=e.length,i=1e-5;for(let a=0;a({...i}));if(e.length>=2&&$i[t.arrowTypeStart]){let i=$i[t.arrowTypeStart],a=e[0],o=e[1],{angle:l}=gle(a,o),u=i*Math.cos(l),h=i*Math.sin(l);r[0].x=a.x+u,r[0].y=a.y+h}let n=e.length;if(n>=2&&$i[t.arrowTypeEnd]){let i=$i[t.arrowTypeEnd],a=e[n-1],o=e[n-2],{angle:l}=gle(o,a),u=i*Math.cos(l),h=i*Math.sin(l);r[n-1].x=a.x-u,r[n-1].y=a.y-h}return r}var AUe,Up,xi,yle,zE,t2,Il,Q0,RUe,_Ue,LUe,ple,mle,IUe,MUe,kd,J0=F(()=>{"use strict";Zt();mr();Tt();qo();cle();Qt();jN();Jb();$r();Jt();OE();fle();Kt();AUe=s(e=>typeof e=="string"?e:Le()?.flowchart?.curve,"resolveEdgeCurveType"),Up=new Map,xi=new Map,yle=s(()=>{Up.clear(),xi.clear()},"clear"),zE=s(e=>!!(e.label||e.startLabelLeft||e.startLabelRight||e.endLabelLeft||e.endLabelRight),"hasEdgeLabel"),t2=s(e=>e?typeof e=="string"?e:e.reduce((t,r)=>t+";"+r,""):"","getLabelStyles"),Il=s(async(e,t)=>{let r=Le(),n=Yn(r),{labelStyles:i}=ut(t);t.labelStyle=i;let a=e.insert("g").attr("class","edgeLabel"),o=a.insert("g").attr("class","label").attr("data-id",t.id),l=t.labelType==="markdown",h=await li(e,t.label,{style:t2(t.labelStyle),useHtmlLabels:n,addSvgBackground:!0,isNode:!1,markdown:l,width:l?void 0:void 0},r);o.node().appendChild(h),te.info("abc82",t,t.labelType);let d=h.getBBox(),f=d;if(n){let m=h.children[0],g=lt(h);d=m.getBoundingClientRect(),f=d,g.attr("width",d.width),g.attr("height",d.height)}else{let m=lt(h).select("text").node();m&&typeof m.getBBox=="function"&&(f=m.getBBox())}o.attr("transform",Z0(f,n)),Up.set(t.id,a),t.width=d.width,t.height=d.height;let p;if(t.startLabelLeft){let m=e.insert("g").attr("class","edgeTerminals"),g=m.insert("g").attr("class","inner"),y=await Dl(g,t.startLabelLeft,t2(t.labelStyle)||"",!1,!1);p=y;let v=y.getBBox();if(n){let x=y.children[0],b=lt(y);v=x.getBoundingClientRect(),b.attr("width",v.width),b.attr("height",v.height)}g.attr("transform",Z0(v,n)),xi.get(t.id)||xi.set(t.id,{}),xi.get(t.id).startLeft=m,GE(p,t.startLabelLeft)}if(t.startLabelRight){let m=e.insert("g").attr("class","edgeTerminals"),g=m.insert("g").attr("class","inner"),y=await Dl(g,t.startLabelRight,t2(t.labelStyle)||"",!1,!1);p=y;let v=y.getBBox();if(n){let x=y.children[0],b=lt(y);v=x.getBoundingClientRect(),b.attr("width",v.width),b.attr("height",v.height)}g.attr("transform",Z0(v,n)),xi.get(t.id)||xi.set(t.id,{}),xi.get(t.id).startRight=m,GE(p,t.startLabelRight)}if(t.endLabelLeft){let m=e.insert("g").attr("class","edgeTerminals"),g=m.insert("g").attr("class","inner"),y=await Dl(m,t.endLabelLeft,t2(t.labelStyle)||"",!1,!1);p=y;let v=y.getBBox();if(n){let x=y.children[0],b=lt(y);v=x.getBoundingClientRect(),b.attr("width",v.width),b.attr("height",v.height)}g.attr("transform",Z0(v,n)),xi.get(t.id)||xi.set(t.id,{}),xi.get(t.id).endLeft=m,GE(p,t.endLabelLeft)}if(t.endLabelRight){let m=e.insert("g").attr("class","edgeTerminals"),g=m.insert("g").attr("class","inner"),y=await Dl(m,t.endLabelRight,t2(t.labelStyle)||"",!1,!1);p=y;let v=y.getBBox();if(n){let x=y.children[0],b=lt(y);v=x.getBoundingClientRect(),b.attr("width",v.width),b.attr("height",v.height)}g.attr("transform",Z0(v,n)),xi.get(t.id)||xi.set(t.id,{}),xi.get(t.id).endRight=m,GE(p,t.endLabelRight)}return h},"insertEdgeLabel");s(GE,"setTerminalWidth");Q0=s((e,t)=>{te.debug("Moving label abc88 ",e.id,e.label,Up.get(e.id),t);let r=t.updatedPath?t.updatedPath:t.originalPath,n=Le(),{subGraphTitleTotalMargin:i}=qu(n);if(e.label){let a=Up.get(e.id),o=e.x,l=e.y;if(r){let u=sr.calcLabelPosition(r);te.debug("Moving label "+e.label+" from (",o,",",l,") to (",u.x,",",u.y,") abc88"),t.updatedPath&&(o=u.x,l=u.y)}a.attr("transform",`translate(${o}, ${l+i/2})`)}if(e.startLabelLeft){let a=xi.get(e.id).startLeft,o=e.x,l=e.y;if(r){let u=sr.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_left",r);o=u.x,l=u.y}a.attr("transform",`translate(${o}, ${l})`)}if(e.startLabelRight){let a=xi.get(e.id).startRight,o=e.x,l=e.y;if(r){let u=sr.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_right",r);o=u.x,l=u.y}a.attr("transform",`translate(${o}, ${l})`)}if(e.endLabelLeft){let a=xi.get(e.id).endLeft,o=e.x,l=e.y;if(r){let u=sr.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_left",r);o=u.x,l=u.y}a.attr("transform",`translate(${o}, ${l})`)}if(e.endLabelRight){let a=xi.get(e.id).endRight,o=e.x,l=e.y;if(r){let u=sr.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_right",r);o=u.x,l=u.y}a.attr("transform",`translate(${o}, ${l})`)}},"positionEdgeLabel"),RUe=s((e,t)=>{if(!e?.isLabelEdge||!e?.id?.endsWith("-to-label")||!Array.isArray(t)||t.length!==2)return t;let[r,n]=t,i=Math.abs(n.x-r.x),a=Math.abs(n.y-r.y);return i<.001||a<.001?t:a>=i?[r,{x:r.x,y:n.y},n]:[r,{x:n.x,y:r.y},n]},"orthogonalizeToLabelClippedPoints"),_Ue=s((e,t)=>{let r=e.x,n=e.y,i=Math.abs(t.x-r),a=Math.abs(t.y-n),o=e.width/2,l=e.height/2;return i>=o||a>=l},"outsideNode"),LUe=s((e,t,r)=>{te.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}`);let n=e.x,i=e.y,a=Math.abs(n-r.x),o=e.width/2,l=r.xMath.abs(n-t.x)*u){let f=r.y{te.warn("abc88 cutPathAtIntersect",e,t);let r=[],n=e[0],i=!1;return e.forEach(a=>{if(te.info("abc88 checking point",a,t),!_Ue(t,a)&&!i){let o=LUe(t,n,a);te.debug("abc88 inside",a,n,o),te.debug("abc88 intersection",o,t);let l=!1;r.forEach(u=>{l=l||u.x===o.x&&u.y===o.y}),r.some(u=>u.x===o.x&&u.y===o.y)?te.warn("abc88 no intersect",o,r):r.push(o),i=!0}else te.warn("abc88 outside",a,n),n=a,i||r.push(a)}),te.debug("returning points",r),r},"cutPathAtIntersect");s(DUe,"extractCornerPoints");mle=s(function(e,t,r){let n=t.x-e.x,i=t.y-e.y,a=Math.sqrt(n*n+i*i),o=r/a;return{x:t.x-o*n,y:t.y-o*i}},"findAdjacentPoint"),IUe=s(function(e){let{cornerPointPositions:t}=DUe(e),r=[];for(let n=0;n10&&Math.abs(a.y-i.y)>=10){te.debug("Corner point fixing",Math.abs(a.x-i.x),Math.abs(a.y-i.y));let m=5;o.x===l.x?p={x:h<0?l.x-m+f:l.x+m-f,y:d<0?l.y-f:l.y+f}:p={x:h<0?l.x-f:l.x+f,y:d<0?l.y-m+f:l.y+m-f}}else te.debug("Corner point skipping fixing",Math.abs(a.x-i.x),Math.abs(a.y-i.y));r.push(p,u)}else r.push(e[n]);return r},"fixCorners"),MUe=s((e,t,r)=>{let n=e-t-r,i=2,a=2,o=i+a,l=Math.floor(n/o),u=Number.isFinite(l)?Math.max(0,l):0,h=Array(u).fill(`${i} ${a}`).join(" ");return`0 ${t} ${h} ${r}`},"generateDashArray"),kd=s(function(e,t,r,n,i,a,o,l=!1){if(!o)throw new Error(`insertEdge: missing diagramId for edge "${t.id}" \u2014 edge IDs require a diagram prefix for uniqueness`);let{handDrawnSeed:u,layout:h}=Le(),d=t.points,f=!1,p=i;var m=a;let g=[];for(let O in t.cssCompiledStyles)Ub(O)||g.push(t.cssCompiledStyles[O]);if(h==="swimlane"){if(m.intersect&&p.intersect&&Array.isArray(d)&&d.length>=2)if(d.length===2)d=[p.intersect(d[0]),m.intersect(d[1])];else{let O=d.slice(1,-1),$=O[0],G=O[O.length-1],V=.5,z=Math.abs(d[d.length-1].x-G.x)!Number.isNaN(O.y)),x=AUe(t.curve);x!=="rounded"&&(v=IUe(v));let b=vc;switch(x){case"linear":b=vc;break;case"basis":b=Bu;break;case"cardinal":b=hb;break;case"bumpX":b=sb;break;case"bumpY":b=ob;break;case"catmullRom":b=pb;break;case"monotoneX":b=mb;break;case"monotoneY":b=gb;break;case"natural":b=B0;break;case"step":b=$0;break;case"stepAfter":b=vb;break;case"stepBefore":b=yb;break;case"rounded":b=vc;break;default:b=Bu}let{x:T,y:w}=ule(t),C=Ou().x(T).y(w).curve(b),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 S,A=x==="rounded"?NUe(PUe(v,t),5):C(v),M=Array.isArray(t.style)?t.style:[t.style],N=M.find(O=>O?.startsWith("stroke:")),D="";t.animate&&(D="edge-animation-fast"),t.animation&&(D="edge-animation-"+t.animation);let R=!1;if(t.look==="handDrawn"){let O=ht.svg(e);Object.assign([],v);let $=O.path(A,{roughness:.3,seed:u});k+=" transition",S=lt($).select("path").attr("id",`${o}-${t.id}`).attr("class"," "+k+(t.classes?" "+t.classes:"")+(D?" "+D:"")).attr("style",M?M.reduce((V,z)=>V+";"+z,""):"");let G=S.attr("d");S.attr("d",G),e.node().appendChild(S.node())}else{let O=g.join(";"),$=M?M.reduce((j,Q)=>j+Q+";",""):"",G=(O?O+";"+$+";":$)+";"+(M?M.reduce((j,Q)=>j+";"+Q,""):"");S=e.append("path").attr("d",A).attr("id",`${o}-${t.id}`).attr("class"," "+k+(t.classes?" "+t.classes:"")+(D?" "+D:"")).attr("style",G),N=G.match(/stroke:([^;]+)/)?.[1],R=t.animate===!0||!!t.animation||O.includes("animation");let V=S.node(),z=typeof V.getTotalLength=="function"?V.getTotalLength():0,W=YN[t.arrowTypeStart]||0,H=YN[t.arrowTypeEnd]||0;if(t.look==="neo"&&!R){let Q=`stroke-dasharray: ${t.pattern==="dotted"||t.pattern==="dashed"?MUe(z,W,H):`0 ${W} ${z-W-H} ${H}`}; stroke-dashoffset: 0;`;S.attr("style",Q+S.attr("style"))}}S.attr("data-edge",!0),S.attr("data-et","edge"),S.attr("data-id",t.id),S.attr("data-points",y),S.attr("data-look",rn(t.look)),t.showPoints&&v.forEach(O=>{e.append("circle").style("stroke","red").style("fill","red").attr("r",1).attr("cx",O.x).attr("cy",O.y)});let E="";(Le().flowchart.arrowMarkerAbsolute||Le().state.arrowMarkerAbsolute)&&(E=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,E=E.replace(/\(/g,"\\(").replace(/\)/g,"\\)")),te.info("arrowTypeStart",t.arrowTypeStart),te.info("arrowTypeEnd",t.arrowTypeEnd);let I=!R&&t?.look==="neo";dle(S,t,E,o,n,I,N);let L=Math.floor(d.length/2),P=d[L];sr.isLabelCoordinateInPath(P,S.attr("d"))||(f=!0);let B={};return f&&(B.updatedPath=d),B.originalPath=t.points,B},"insertEdge");s(NUe,"generateRoundedPath");s(gle,"calculateDeltaAndAngle");s(PUe,"applyMarkerOffsetsToPoints")});var OUe,BUe,$Ue,FUe,GUe,zUe,VUe,WUe,qUe,HUe,UUe,YUe,jUe,XUe,KUe,ZUe,QUe,JUe,eYe,tYe,rYe,nYe,iYe,aYe,ey,VE=F(()=>{"use strict";Tt();mr();OUe=s((e,t,r,n)=>{t.forEach(i=>{aYe[i](e,r,n)})},"insertMarkers"),BUe=s((e,t,r)=>{te.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",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").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"),e.append("marker").attr("id",r+"_"+t+"-extensionStart-margin").attr("class","marker extension "+t).attr("refX",18).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("viewBox","0 0 20 14").append("polygon").attr("points","10,7 18,13 18,1").style("stroke-width",2).style("stroke-dasharray","0"),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionEnd-margin").attr("class","marker extension "+t).attr("refX",9).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("viewBox","0 0 20 14").append("polygon").attr("points","10,1 10,13 18,7").style("stroke-width",2).style("stroke-dasharray","0")},"extension"),$Ue=s((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"),e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionStart-margin").attr("class","marker composition "+t).attr("refX",15).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("viewBox","0 0 15 15").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionEnd-margin").attr("class","marker composition "+t).attr("refX",3.5).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"composition"),FUe=s((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"),e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationStart-margin").attr("class","marker aggregation "+t).attr("refX",15).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",2).attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationEnd-margin").attr("class","marker aggregation "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",2).attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"aggregation"),GUe=s((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"),e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyStart-margin").attr("class","marker dependency "+t).attr("refX",4).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyEnd-margin").attr("class","marker dependency "+t).attr("refX",16).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"dependency"),zUe=s((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("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("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopStart-margin").attr("class","marker lollipop "+t).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6).attr("stroke-width",2),e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopEnd-margin").attr("class","marker lollipop "+t).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6).attr("stroke-width",2)},"lollipop"),VUe=s((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"),e.append("marker").attr("id",r+"_"+t+"-pointEnd-margin").attr("class","marker "+t).attr("viewBox","0 0 11.5 14").attr("refX",11.5).attr("refY",7).attr("markerUnits","userSpaceOnUse").attr("markerWidth",10.5).attr("markerHeight",14).attr("orient","auto").append("path").attr("d","M 0 0 L 11.5 7 L 0 14 z").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-pointStart-margin").attr("class","marker "+t).attr("viewBox","0 0 11.5 14").attr("refX",1).attr("refY",7).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11.5).attr("markerHeight",14).attr("orient","auto").append("polygon").attr("points","0,7 11.5,14 11.5,0").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0")},"point"),WUe=s((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"),e.append("marker").attr("id",r+"_"+t+"-circleEnd-margin").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refY",5).attr("refX",12.25).attr("markerUnits","userSpaceOnUse").attr("markerWidth",14).attr("markerHeight",14).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-circleStart-margin").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",-2).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",14).attr("markerHeight",14).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0")},"circle"),qUe=s((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"),e.append("marker").attr("id",r+"_"+t+"-crossEnd-margin").attr("class","marker cross "+t).attr("viewBox","0 0 15 15").attr("refX",17.7).attr("refY",7.5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 1,1 L 14,14 M 1,14 L 14,1").attr("class","arrowMarkerPath").style("stroke-width",2.5),e.append("marker").attr("id",r+"_"+t+"-crossStart-margin").attr("class","marker cross "+t).attr("viewBox","0 0 15 15").attr("refX",-3.5).attr("refY",7.5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 1,1 L 14,14 M 1,14 L 14,1").attr("class","arrowMarkerPath").style("stroke-width",2.5).style("stroke-dasharray","1,0")},"cross"),HUe=s((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"),UUe=s((e,t,r)=>{let n=Lt(),{themeVariables:i}=n,{transitionColor:a}=i;e.append("defs").append("marker").attr("id",r+"_"+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 L11,14 L13,7 L11,0 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-barbEnd-margin").attr("refX",17).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M 19,7 L11,14 L13,7 L11,0 Z").attr("fill",`${a}`)},"barbNeo"),YUe=s((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"),jUe=s((e,t,r)=>{let n=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");n.append("circle").attr("fill","white").attr("cx",21).attr("cy",9).attr("r",6),n.append("path").attr("d","M9,0 L9,18");let i=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");i.append("circle").attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),i.append("path").attr("d","M21,0 L21,18")},"zero_or_one"),XUe=s((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"),KUe=s((e,t,r)=>{let n=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");n.append("circle").attr("fill","white").attr("cx",48).attr("cy",18).attr("r",6),n.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18");let i=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");i.append("circle").attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),i.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")},"zero_or_more"),ZUe=s((e,t,r)=>{let n=Lt(),{themeVariables:i}=n,{strokeWidth:a}=i;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").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M9,0 L9,18 M15,0 L15,18").attr("stroke-width",`${a}`),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").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M3,0 L3,18 M9,0 L9,18").attr("stroke-width",`${a}`)},"only_one_neo"),QUe=s((e,t,r)=>{let n=Lt(),{themeVariables:i}=n,{strokeWidth:a,mainBkg:o}=i,l=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").attr("markerUnits","userSpaceOnUse");l.append("circle").attr("fill",o??"white").attr("cx",21).attr("cy",9).attr("stroke-width",`${a}`).attr("r",6),l.append("path").attr("d","M9,0 L9,18").attr("stroke-width",`${a}`);let u=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("markerUnits","userSpaceOnUse").attr("orient","auto");u.append("circle").attr("fill",o??"white").attr("cx",9).attr("cy",9).attr("stroke-width",`${a}`).attr("r",6),u.append("path").attr("d","M21,0 L21,18").attr("stroke-width",`${a}`)},"zero_or_one_neo"),JUe=s((e,t,r)=>{let n=Lt(),{themeVariables:i}=n,{strokeWidth:a}=i;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").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27").attr("stroke-width",`${a}`),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("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18").attr("stroke-width",`${a}`)},"one_or_more_neo"),eYe=s((e,t,r)=>{let n=Lt(),{themeVariables:i}=n,{strokeWidth:a,mainBkg:o}=i,l=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("markerUnits","userSpaceOnUse").attr("orient","auto");l.append("circle").attr("fill",o??"white").attr("cx",45.5).attr("cy",18).attr("r",6).attr("stroke-width",`${a}`),l.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18").attr("stroke-width",`${a}`);let u=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").attr("markerUnits","userSpaceOnUse");u.append("circle").attr("fill",o??"white").attr("cx",11).attr("cy",18).attr("r",6).attr("stroke-width",`${a}`),u.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18").attr("stroke-width",`${a}`)},"zero_or_more_neo"),tYe=s((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"),rYe=s((e,t,r)=>{let n=Lt(),{themeVariables:i}=n,{strokeWidth:a}=i;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").attr("markerUnits","userSpaceOnUse").attr("stroke-width",`${a}`).attr("viewBox","0 0 25 20").append("path").attr("d",`M0,0 + L20,10 + M20,10 + L0,20`).attr("stroke-linejoin","miter")},"requirement_arrow_neo"),nYe=s((e,t,r)=>{let n=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");n.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),n.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),n.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10)},"requirement_contains"),iYe=s((e,t,r)=>{let n=Lt(),{themeVariables:i}=n,{strokeWidth:a}=i,o=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").attr("markerUnits","userSpaceOnUse").append("g");o.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),o.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),o.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10),o.selectAll("*").attr("stroke-width",`${a}`)},"requirement_contains_neo"),aYe={extension:BUe,composition:$Ue,aggregation:FUe,dependency:GUe,lollipop:zUe,point:VUe,circle:WUe,cross:qUe,barb:HUe,barbNeo:UUe,only_one:YUe,zero_or_one:jUe,one_or_more:XUe,zero_or_more:KUe,only_one_neo:ZUe,zero_or_one_neo:QUe,one_or_more_neo:JUe,zero_or_more_neo:eYe,requirement_arrow:tYe,requirement_contains:nYe,requirement_arrow_neo:rYe,requirement_contains_neo:iYe},ey=OUe});async function Hu(e,t,r){let n,i;t.shape==="rect"&&(t.rx&&t.ry?t.shape="roundedRect":t.shape="squareRect");let a=t.shape?HN[t.shape]:void 0;if(!a)throw new Error(`No such shape: ${t.shape}. Please check your syntax.`);if(t.link){let o;r.config.securityLevel==="sandbox"?o="_top":t.linkTarget&&(o=t.linkTarget||"_blank"),n=e.insert("svg:a").attr("xlink:href",t.link).attr("target",o??null),i=await a(n,t,r)}else i=await a(e,t,r),n=i;return n.attr("data-look",rn(t.look)),t.tooltip&&i.attr("title",t.tooltip),WE.set(t.id,n),t.haveCallback&&n.attr("class",n.attr("class")+" clickable"),n}var WE,vle,xle,Sc,Yp=F(()=>{"use strict";Tt();UN();Qt();WE=new Map;s(Hu,"insertNode");vle=s((e,t)=>{WE.set(t.id,e)},"setNodeElem"),xle=s(()=>{WE.clear()},"clear"),Sc=s(e=>{let t=WE.get(e.id);te.trace("Transforming node",e.diff,e,"translate("+(e.x-e.width/2-5)+", "+e.width/2+")");let r=8,n=e.diff||0;return e.clusterNode?t.attr("transform","translate("+(e.x+n-e.width/2)+", "+(e.y-e.height/2-r)+")"):t.attr("transform","translate("+e.x+", "+e.y+")"),n},"positionNode")});var ble,Tle=F(()=>{"use strict";mr();Gr();Tt();e2();J0();VE();Yp();Ht();Qt();ble={common:xt,getConfig:Lt,insertCluster:Cd,insertEdge:kd,insertEdgeLabel:Il,insertMarkers:ey,insertNode:Hu,interpolateToCurve:PM,labelHelper:wt,log:te,positionEdgeLabel:Q0}});var sYe,qE,XN=F(()=>{"use strict";sYe=typeof global=="object"&&global&&global.Object===Object&&global,qE=sYe});var oYe,lYe,bi,Yo=F(()=>{"use strict";XN();oYe=typeof self=="object"&&self&&self.Object===Object&&self,lYe=qE||oYe||Function("return this")(),bi=lYe});var cYe,fa,jp=F(()=>{"use strict";Yo();cYe=bi.Symbol,fa=cYe});function dYe(e){var t=uYe.call(e,r2),r=e[r2];try{e[r2]=void 0;var n=!0}catch{}var i=hYe.call(e);return n&&(t?e[r2]=r:delete e[r2]),i}var Cle,uYe,hYe,r2,kle,wle=F(()=>{"use strict";jp();Cle=Object.prototype,uYe=Cle.hasOwnProperty,hYe=Cle.toString,r2=fa?fa.toStringTag:void 0;s(dYe,"getRawTag");kle=dYe});function mYe(e){return pYe.call(e)}var fYe,pYe,Sle,Ele=F(()=>{"use strict";fYe=Object.prototype,pYe=fYe.toString;s(mYe,"objectToString");Sle=mYe});function vYe(e){return e==null?e===void 0?yYe:gYe:Ale&&Ale in Object(e)?kle(e):Sle(e)}var gYe,yYe,Ale,ms,wd=F(()=>{"use strict";jp();wle();Ele();gYe="[object Null]",yYe="[object Undefined]",Ale=fa?fa.toStringTag:void 0;s(vYe,"baseGetTag");ms=vYe});function xYe(e){return e!=null&&typeof e=="object"}var Ri,Ml=F(()=>{"use strict";s(xYe,"isObjectLike");Ri=xYe});function TYe(e){return typeof e=="symbol"||Ri(e)&&ms(e)==bYe}var bYe,To,Xp=F(()=>{"use strict";wd();Ml();bYe="[object Symbol]";s(TYe,"isSymbol");To=TYe});function CYe(e,t){for(var r=-1,n=e==null?0:e.length,i=Array(n);++r{"use strict";s(CYe,"arrayMap");Ec=CYe});var kYe,Wr,Fi=F(()=>{"use strict";kYe=Array.isArray,Wr=kYe});function Lle(e){if(typeof e=="string")return e;if(Wr(e))return Ec(e,Lle)+"";if(To(e))return _le?_le.call(e):"";var t=e+"";return t=="0"&&1/e==-wYe?"-0":t}var wYe,Rle,_le,Dle,Ile=F(()=>{"use strict";jp();n2();Fi();Xp();wYe=1/0,Rle=fa?fa.prototype:void 0,_le=Rle?Rle.toString:void 0;s(Lle,"baseToString");Dle=Lle});function EYe(e){for(var t=e.length;t--&&SYe.test(e.charAt(t)););return t}var SYe,Mle,Nle=F(()=>{"use strict";SYe=/\s/;s(EYe,"trimmedEndIndex");Mle=EYe});function RYe(e){return e&&e.slice(0,Mle(e)+1).replace(AYe,"")}var AYe,Ple,Ole=F(()=>{"use strict";Nle();AYe=/^\s+/;s(RYe,"baseTrim");Ple=RYe});function _Ye(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var ni,jo=F(()=>{"use strict";s(_Ye,"isObject");ni=_Ye});function NYe(e){if(typeof e=="number")return e;if(To(e))return Ble;if(ni(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=ni(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=Ple(e);var r=DYe.test(e);return r||IYe.test(e)?MYe(e.slice(2),r?2:8):LYe.test(e)?Ble:+e}var Ble,LYe,DYe,IYe,MYe,$le,Fle=F(()=>{"use strict";Ole();jo();Xp();Ble=NaN,LYe=/^[-+]0x[0-9a-f]+$/i,DYe=/^0b[01]+$/i,IYe=/^0o[0-7]+$/i,MYe=parseInt;s(NYe,"toNumber");$le=NYe});function OYe(e){if(!e)return e===0?e:0;if(e=$le(e),e===Gle||e===-Gle){var t=e<0?-1:1;return t*PYe}return e===e?e:0}var Gle,PYe,ty,KN=F(()=>{"use strict";Fle();Gle=1/0,PYe=17976931348623157e292;s(OYe,"toFinite");ty=OYe});function BYe(e){var t=ty(e),r=t%1;return t===t?r?t-r:t:0}var zle,Vle=F(()=>{"use strict";KN();s(BYe,"toInteger");zle=BYe});function $Ye(e){return e}var Vs,Sd=F(()=>{"use strict";s($Ye,"identity");Vs=$Ye});function WYe(e){if(!ni(e))return!1;var t=ms(e);return t==GYe||t==zYe||t==FYe||t==VYe}var FYe,GYe,zYe,VYe,Ac,i2=F(()=>{"use strict";wd();jo();FYe="[object AsyncFunction]",GYe="[object Function]",zYe="[object GeneratorFunction]",VYe="[object Proxy]";s(WYe,"isFunction");Ac=WYe});var qYe,HE,Wle=F(()=>{"use strict";Yo();qYe=bi["__core-js_shared__"],HE=qYe});function HYe(e){return!!qle&&qle in e}var qle,Hle,Ule=F(()=>{"use strict";Wle();qle=(function(){var e=/[^.]+$/.exec(HE&&HE.keys&&HE.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""})();s(HYe,"isMasked");Hle=HYe});function jYe(e){if(e!=null){try{return YYe.call(e)}catch{}try{return e+""}catch{}}return""}var UYe,YYe,Uu,ZN=F(()=>{"use strict";UYe=Function.prototype,YYe=UYe.toString;s(jYe,"toSource");Uu=jYe});function rje(e){if(!ni(e)||Hle(e))return!1;var t=Ac(e)?tje:KYe;return t.test(Uu(e))}var XYe,KYe,ZYe,QYe,JYe,eje,tje,Yle,jle=F(()=>{"use strict";i2();Ule();jo();ZN();XYe=/[\\^$.*+?()[\]{}|]/g,KYe=/^\[object .+?Constructor\]$/,ZYe=Function.prototype,QYe=Object.prototype,JYe=ZYe.toString,eje=QYe.hasOwnProperty,tje=RegExp("^"+JYe.call(eje).replace(XYe,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");s(rje,"baseIsNative");Yle=rje});function nje(e,t){return e?.[t]}var Xle,Kle=F(()=>{"use strict";s(nje,"getValue");Xle=nje});function ije(e,t){var r=Xle(e,t);return Yle(r)?r:void 0}var Ws,Ed=F(()=>{"use strict";jle();Kle();s(ije,"getNative");Ws=ije});var aje,UE,Zle=F(()=>{"use strict";Ed();Yo();aje=Ws(bi,"WeakMap"),UE=aje});var Qle,sje,Jle,ece=F(()=>{"use strict";jo();Qle=Object.create,sje=(function(){function e(){}return s(e,"object"),function(t){if(!ni(t))return{};if(Qle)return Qle(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}})(),Jle=sje});function oje(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}var tce,rce=F(()=>{"use strict";s(oje,"apply");tce=oje});function lje(){}var nce,ice=F(()=>{"use strict";s(lje,"noop");nce=lje});function cje(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r{"use strict";s(cje,"copyArray");YE=cje});function fje(e){var t=0,r=0;return function(){var n=dje(),i=hje-(n-r);if(r=n,i>0){if(++t>=uje)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var uje,hje,dje,ace,sce=F(()=>{"use strict";uje=800,hje=16,dje=Date.now;s(fje,"shortOut");ace=fje});function pje(e){return function(){return e}}var qs,JN=F(()=>{"use strict";s(pje,"constant");qs=pje});var mje,ry,eP=F(()=>{"use strict";Ed();mje=(function(){try{var e=Ws(Object,"defineProperty");return e({},"",{}),e}catch{}})(),ry=mje});var gje,oce,lce=F(()=>{"use strict";JN();eP();Sd();gje=ry?function(e,t){return ry(e,"toString",{configurable:!0,enumerable:!1,value:qs(t),writable:!0})}:Vs,oce=gje});var yje,jE,tP=F(()=>{"use strict";lce();sce();yje=ace(oce),jE=yje});function vje(e,t){for(var r=-1,n=e==null?0:e.length;++r{"use strict";s(vje,"arrayEach");XE=vje});function xje(e,t,r,n){for(var i=e.length,a=r+(n?1:-1);n?a--:++a{"use strict";s(xje,"baseFindIndex");KE=xje});function bje(e){return e!==e}var cce,uce=F(()=>{"use strict";s(bje,"baseIsNaN");cce=bje});function Tje(e,t,r){for(var n=r-1,i=e.length;++n{"use strict";s(Tje,"strictIndexOf");hce=Tje});function Cje(e,t,r){return t===t?hce(e,t,r):KE(e,cce,r)}var fce,pce=F(()=>{"use strict";nP();uce();dce();s(Cje,"baseIndexOf");fce=Cje});function kje(e,t){var r=e==null?0:e.length;return!!r&&fce(e,t,0)>-1}var mce,gce=F(()=>{"use strict";pce();s(kje,"arrayIncludes");mce=kje});function Eje(e,t){var r=typeof e;return t=t??wje,!!t&&(r=="number"||r!="symbol"&&Sje.test(e))&&e>-1&&e%1==0&&e{"use strict";wje=9007199254740991,Sje=/^(?:0|[1-9]\d*)$/;s(Eje,"isIndex");Ad=Eje});function Aje(e,t,r){t=="__proto__"&&ry?ry(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}var Rd,s2=F(()=>{"use strict";eP();s(Aje,"baseAssignValue");Rd=Aje});function Rje(e,t){return e===t||e!==e&&t!==t}var Xo,Kp=F(()=>{"use strict";s(Rje,"eq");Xo=Rje});function Dje(e,t,r){var n=e[t];(!(Lje.call(e,t)&&Xo(n,r))||r===void 0&&!(t in e))&&Rd(e,t,r)}var _je,Lje,_d,o2=F(()=>{"use strict";s2();Kp();_je=Object.prototype,Lje=_je.hasOwnProperty;s(Dje,"assignValue");_d=Dje});function Ije(e,t,r,n){var i=!r;r||(r={});for(var a=-1,o=t.length;++a{"use strict";o2();s2();s(Ije,"copyObject");Rc=Ije});function Mje(e,t,r){return t=yce(t===void 0?e.length-1:t,0),function(){for(var n=arguments,i=-1,a=yce(n.length-t,0),o=Array(a);++i{"use strict";rce();yce=Math.max;s(Mje,"overRest");ZE=Mje});function Nje(e,t){return jE(ZE(e,t,Vs),e+"")}var Ld,l2=F(()=>{"use strict";Sd();iP();tP();s(Nje,"baseRest");Ld=Nje});function Oje(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=Pje}var Pje,iy,QE=F(()=>{"use strict";Pje=9007199254740991;s(Oje,"isLength");iy=Oje});function Bje(e){return e!=null&&iy(e.length)&&!Ac(e)}var pa,_c=F(()=>{"use strict";i2();QE();s(Bje,"isArrayLike");pa=Bje});function $je(e,t,r){if(!ni(r))return!1;var n=typeof t;return(n=="number"?pa(r)&&Ad(t,r.length):n=="string"&&t in r)?Xo(r[t],e):!1}var Yu,c2=F(()=>{"use strict";Kp();_c();a2();jo();s($je,"isIterateeCall");Yu=$je});function Fje(e){return Ld(function(t,r){var n=-1,i=r.length,a=i>1?r[i-1]:void 0,o=i>2?r[2]:void 0;for(a=e.length>3&&typeof a=="function"?(i--,a):void 0,o&&Yu(r[0],r[1],o)&&(a=i<3?void 0:a,i=1),t=Object(t);++n{"use strict";l2();c2();s(Fje,"createAssigner");vce=Fje});function zje(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||Gje;return e===r}var Gje,Dd,u2=F(()=>{"use strict";Gje=Object.prototype;s(zje,"isPrototype");Dd=zje});function Vje(e,t){for(var r=-1,n=Array(e);++r{"use strict";s(Vje,"baseTimes");bce=Vje});function qje(e){return Ri(e)&&ms(e)==Wje}var Wje,aP,Cce=F(()=>{"use strict";wd();Ml();Wje="[object Arguments]";s(qje,"baseIsArguments");aP=qje});var kce,Hje,Uje,Yje,Nl,ay=F(()=>{"use strict";Cce();Ml();kce=Object.prototype,Hje=kce.hasOwnProperty,Uje=kce.propertyIsEnumerable,Yje=aP((function(){return arguments})())?aP:function(e){return Ri(e)&&Hje.call(e,"callee")&&!Uje.call(e,"callee")},Nl=Yje});function jje(){return!1}var wce,Sce=F(()=>{"use strict";s(jje,"stubFalse");wce=jje});var Rce,Ece,Xje,Ace,Kje,Zje,Pl,sy=F(()=>{"use strict";Yo();Sce();Rce=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Ece=Rce&&typeof module=="object"&&module&&!module.nodeType&&module,Xje=Ece&&Ece.exports===Rce,Ace=Xje?bi.Buffer:void 0,Kje=Ace?Ace.isBuffer:void 0,Zje=Kje||wce,Pl=Zje});function CXe(e){return Ri(e)&&iy(e.length)&&!!Kn[ms(e)]}var Qje,Jje,eXe,tXe,rXe,nXe,iXe,aXe,sXe,oXe,lXe,cXe,uXe,hXe,dXe,fXe,pXe,mXe,gXe,yXe,vXe,xXe,bXe,TXe,Kn,_ce,Lce=F(()=>{"use strict";wd();QE();Ml();Qje="[object Arguments]",Jje="[object Array]",eXe="[object Boolean]",tXe="[object Date]",rXe="[object Error]",nXe="[object Function]",iXe="[object Map]",aXe="[object Number]",sXe="[object Object]",oXe="[object RegExp]",lXe="[object Set]",cXe="[object String]",uXe="[object WeakMap]",hXe="[object ArrayBuffer]",dXe="[object DataView]",fXe="[object Float32Array]",pXe="[object Float64Array]",mXe="[object Int8Array]",gXe="[object Int16Array]",yXe="[object Int32Array]",vXe="[object Uint8Array]",xXe="[object Uint8ClampedArray]",bXe="[object Uint16Array]",TXe="[object Uint32Array]",Kn={};Kn[fXe]=Kn[pXe]=Kn[mXe]=Kn[gXe]=Kn[yXe]=Kn[vXe]=Kn[xXe]=Kn[bXe]=Kn[TXe]=!0;Kn[Qje]=Kn[Jje]=Kn[hXe]=Kn[eXe]=Kn[dXe]=Kn[tXe]=Kn[rXe]=Kn[nXe]=Kn[iXe]=Kn[aXe]=Kn[sXe]=Kn[oXe]=Kn[lXe]=Kn[cXe]=Kn[uXe]=!1;s(CXe,"baseIsTypedArray");_ce=CXe});function kXe(e){return function(t){return e(t)}}var Id,h2=F(()=>{"use strict";s(kXe,"baseUnary");Id=kXe});var Dce,d2,wXe,sP,SXe,ju,JE=F(()=>{"use strict";XN();Dce=typeof exports=="object"&&exports&&!exports.nodeType&&exports,d2=Dce&&typeof module=="object"&&module&&!module.nodeType&&module,wXe=d2&&d2.exports===Dce,sP=wXe&&qE.process,SXe=(function(){try{var e=d2&&d2.require&&d2.require("util").types;return e||sP&&sP.binding&&sP.binding("util")}catch{}})(),ju=SXe});var Ice,EXe,Md,f2=F(()=>{"use strict";Lce();h2();JE();Ice=ju&&ju.isTypedArray,EXe=Ice?Id(Ice):_ce,Md=EXe});function _Xe(e,t){var r=Wr(e),n=!r&&Nl(e),i=!r&&!n&&Pl(e),a=!r&&!n&&!i&&Md(e),o=r||n||i||a,l=o?bce(e.length,String):[],u=l.length;for(var h in e)(t||RXe.call(e,h))&&!(o&&(h=="length"||i&&(h=="offset"||h=="parent")||a&&(h=="buffer"||h=="byteLength"||h=="byteOffset")||Ad(h,u)))&&l.push(h);return l}var AXe,RXe,e4,oP=F(()=>{"use strict";Tce();ay();Fi();sy();a2();f2();AXe=Object.prototype,RXe=AXe.hasOwnProperty;s(_Xe,"arrayLikeKeys");e4=_Xe});function LXe(e,t){return function(r){return e(t(r))}}var t4,lP=F(()=>{"use strict";s(LXe,"overArg");t4=LXe});var DXe,Mce,Nce=F(()=>{"use strict";lP();DXe=t4(Object.keys,Object),Mce=DXe});function NXe(e){if(!Dd(e))return Mce(e);var t=[];for(var r in Object(e))MXe.call(e,r)&&r!="constructor"&&t.push(r);return t}var IXe,MXe,oy,r4=F(()=>{"use strict";u2();Nce();IXe=Object.prototype,MXe=IXe.hasOwnProperty;s(NXe,"baseKeys");oy=NXe});function PXe(e){return pa(e)?e4(e):oy(e)}var Ti,Xu=F(()=>{"use strict";oP();r4();_c();s(PXe,"keys");Ti=PXe});function OXe(e){var t=[];if(e!=null)for(var r in Object(e))t.push(r);return t}var Pce,Oce=F(()=>{"use strict";s(OXe,"nativeKeysIn");Pce=OXe});function FXe(e){if(!ni(e))return Pce(e);var t=Dd(e),r=[];for(var n in e)n=="constructor"&&(t||!$Xe.call(e,n))||r.push(n);return r}var BXe,$Xe,Bce,$ce=F(()=>{"use strict";jo();u2();Oce();BXe=Object.prototype,$Xe=BXe.hasOwnProperty;s(FXe,"baseKeysIn");Bce=FXe});function GXe(e){return pa(e)?e4(e,!0):Bce(e)}var Hs,Nd=F(()=>{"use strict";oP();$ce();_c();s(GXe,"keysIn");Hs=GXe});function WXe(e,t){if(Wr(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||To(e)?!0:VXe.test(e)||!zXe.test(e)||t!=null&&e in Object(t)}var zXe,VXe,ly,n4=F(()=>{"use strict";Fi();Xp();zXe=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,VXe=/^\w*$/;s(WXe,"isKey");ly=WXe});var qXe,Ku,p2=F(()=>{"use strict";Ed();qXe=Ws(Object,"create"),Ku=qXe});function HXe(){this.__data__=Ku?Ku(null):{},this.size=0}var Fce,Gce=F(()=>{"use strict";p2();s(HXe,"hashClear");Fce=HXe});function UXe(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var zce,Vce=F(()=>{"use strict";s(UXe,"hashDelete");zce=UXe});function KXe(e){var t=this.__data__;if(Ku){var r=t[e];return r===YXe?void 0:r}return XXe.call(t,e)?t[e]:void 0}var YXe,jXe,XXe,Wce,qce=F(()=>{"use strict";p2();YXe="__lodash_hash_undefined__",jXe=Object.prototype,XXe=jXe.hasOwnProperty;s(KXe,"hashGet");Wce=KXe});function JXe(e){var t=this.__data__;return Ku?t[e]!==void 0:QXe.call(t,e)}var ZXe,QXe,Hce,Uce=F(()=>{"use strict";p2();ZXe=Object.prototype,QXe=ZXe.hasOwnProperty;s(JXe,"hashHas");Hce=JXe});function tKe(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=Ku&&t===void 0?eKe:t,this}var eKe,Yce,jce=F(()=>{"use strict";p2();eKe="__lodash_hash_undefined__";s(tKe,"hashSet");Yce=tKe});function cy(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t{"use strict";Gce();Vce();qce();Uce();jce();s(cy,"Hash");cy.prototype.clear=Fce;cy.prototype.delete=zce;cy.prototype.get=Wce;cy.prototype.has=Hce;cy.prototype.set=Yce;cP=cy});function rKe(){this.__data__=[],this.size=0}var Kce,Zce=F(()=>{"use strict";s(rKe,"listCacheClear");Kce=rKe});function nKe(e,t){for(var r=e.length;r--;)if(Xo(e[r][0],t))return r;return-1}var Pd,m2=F(()=>{"use strict";Kp();s(nKe,"assocIndexOf");Pd=nKe});function sKe(e){var t=this.__data__,r=Pd(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():aKe.call(t,r,1),--this.size,!0}var iKe,aKe,Qce,Jce=F(()=>{"use strict";m2();iKe=Array.prototype,aKe=iKe.splice;s(sKe,"listCacheDelete");Qce=sKe});function oKe(e){var t=this.__data__,r=Pd(t,e);return r<0?void 0:t[r][1]}var eue,tue=F(()=>{"use strict";m2();s(oKe,"listCacheGet");eue=oKe});function lKe(e){return Pd(this.__data__,e)>-1}var rue,nue=F(()=>{"use strict";m2();s(lKe,"listCacheHas");rue=lKe});function cKe(e,t){var r=this.__data__,n=Pd(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}var iue,aue=F(()=>{"use strict";m2();s(cKe,"listCacheSet");iue=cKe});function uy(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t{"use strict";Zce();Jce();tue();nue();aue();s(uy,"ListCache");uy.prototype.clear=Kce;uy.prototype.delete=Qce;uy.prototype.get=eue;uy.prototype.has=rue;uy.prototype.set=iue;Od=uy});var uKe,Bd,i4=F(()=>{"use strict";Ed();Yo();uKe=Ws(bi,"Map"),Bd=uKe});function hKe(){this.size=0,this.__data__={hash:new cP,map:new(Bd||Od),string:new cP}}var sue,oue=F(()=>{"use strict";Xce();g2();i4();s(hKe,"mapCacheClear");sue=hKe});function dKe(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var lue,cue=F(()=>{"use strict";s(dKe,"isKeyable");lue=dKe});function fKe(e,t){var r=e.__data__;return lue(t)?r[typeof t=="string"?"string":"hash"]:r.map}var $d,y2=F(()=>{"use strict";cue();s(fKe,"getMapData");$d=fKe});function pKe(e){var t=$d(this,e).delete(e);return this.size-=t?1:0,t}var uue,hue=F(()=>{"use strict";y2();s(pKe,"mapCacheDelete");uue=pKe});function mKe(e){return $d(this,e).get(e)}var due,fue=F(()=>{"use strict";y2();s(mKe,"mapCacheGet");due=mKe});function gKe(e){return $d(this,e).has(e)}var pue,mue=F(()=>{"use strict";y2();s(gKe,"mapCacheHas");pue=gKe});function yKe(e,t){var r=$d(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}var gue,yue=F(()=>{"use strict";y2();s(yKe,"mapCacheSet");gue=yKe});function hy(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t{"use strict";oue();hue();fue();mue();yue();s(hy,"MapCache");hy.prototype.clear=sue;hy.prototype.delete=uue;hy.prototype.get=due;hy.prototype.has=pue;hy.prototype.set=gue;Zp=hy});function uP(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(vKe);var r=s(function(){var n=arguments,i=t?t.apply(this,n):n[0],a=r.cache;if(a.has(i))return a.get(i);var o=e.apply(this,n);return r.cache=a.set(i,o)||a,o},"memoized");return r.cache=new(uP.Cache||Zp),r}var vKe,vue,xue=F(()=>{"use strict";a4();vKe="Expected a function";s(uP,"memoize");uP.Cache=Zp;vue=uP});function bKe(e){var t=vue(e,function(n){return r.size===xKe&&r.clear(),n}),r=t.cache;return t}var xKe,bue,Tue=F(()=>{"use strict";xue();xKe=500;s(bKe,"memoizeCapped");bue=bKe});var TKe,CKe,kKe,Cue,kue=F(()=>{"use strict";Tue();TKe=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,CKe=/\\(\\)?/g,kKe=bue(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(TKe,function(r,n,i,a){t.push(i?a.replace(CKe,"$1"):n||r)}),t}),Cue=kKe});function wKe(e){return e==null?"":Dle(e)}var s4,hP=F(()=>{"use strict";Ile();s(wKe,"toString");s4=wKe});function SKe(e,t){return Wr(e)?e:ly(e,t)?[e]:Cue(s4(e))}var Fd,v2=F(()=>{"use strict";Fi();n4();kue();hP();s(SKe,"castPath");Fd=SKe});function AKe(e){if(typeof e=="string"||To(e))return e;var t=e+"";return t=="0"&&1/e==-EKe?"-0":t}var EKe,Lc,dy=F(()=>{"use strict";Xp();EKe=1/0;s(AKe,"toKey");Lc=AKe});function RKe(e,t){t=Fd(t,e);for(var r=0,n=t.length;e!=null&&r{"use strict";v2();dy();s(RKe,"baseGet");Gd=RKe});function _Ke(e,t,r){var n=e==null?void 0:Gd(e,t);return n===void 0?r:n}var wue,Sue=F(()=>{"use strict";x2();s(_Ke,"get");wue=_Ke});function LKe(e,t){for(var r=-1,n=t.length,i=e.length;++r{"use strict";s(LKe,"arrayPush");fy=LKe});function DKe(e){return Wr(e)||Nl(e)||!!(Eue&&e&&e[Eue])}var Eue,Aue,Rue=F(()=>{"use strict";jp();ay();Fi();Eue=fa?fa.isConcatSpreadable:void 0;s(DKe,"isFlattenable");Aue=DKe});function _ue(e,t,r,n,i){var a=-1,o=e.length;for(r||(r=Aue),i||(i=[]);++a0&&r(l)?t>1?_ue(l,t-1,r,n,i):fy(i,l):n||(i[i.length]=l)}return i}var py,l4=F(()=>{"use strict";o4();Rue();s(_ue,"baseFlatten");py=_ue});function IKe(e){var t=e==null?0:e.length;return t?py(e,1):[]}var Ko,dP=F(()=>{"use strict";l4();s(IKe,"flatten");Ko=IKe});function MKe(e){return jE(ZE(e,void 0,Ko),e+"")}var Lue,Due=F(()=>{"use strict";dP();iP();tP();s(MKe,"flatRest");Lue=MKe});var NKe,my,c4=F(()=>{"use strict";lP();NKe=t4(Object.getPrototypeOf,Object),my=NKe});function GKe(e){if(!Ri(e)||ms(e)!=PKe)return!1;var t=my(e);if(t===null)return!0;var r=$Ke.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&Iue.call(r)==FKe}var PKe,OKe,BKe,Iue,$Ke,FKe,Mue,Nue=F(()=>{"use strict";wd();c4();Ml();PKe="[object Object]",OKe=Function.prototype,BKe=Object.prototype,Iue=OKe.toString,$Ke=BKe.hasOwnProperty,FKe=Iue.call(Object);s(GKe,"isPlainObject");Mue=GKe});function XKe(e){return jKe.test(e)}var zKe,VKe,WKe,qKe,HKe,UKe,YKe,jKe,Pue,Oue=F(()=>{"use strict";zKe="\\ud800-\\udfff",VKe="\\u0300-\\u036f",WKe="\\ufe20-\\ufe2f",qKe="\\u20d0-\\u20ff",HKe=VKe+WKe+qKe,UKe="\\ufe0e\\ufe0f",YKe="\\u200d",jKe=RegExp("["+YKe+zKe+HKe+UKe+"]");s(XKe,"hasUnicode");Pue=XKe});function KKe(e,t,r,n){var i=-1,a=e==null?0:e.length;for(n&&a&&(r=e[++i]);++i{"use strict";s(KKe,"arrayReduce");Bue=KKe});function ZKe(){this.__data__=new Od,this.size=0}var Fue,Gue=F(()=>{"use strict";g2();s(ZKe,"stackClear");Fue=ZKe});function QKe(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}var zue,Vue=F(()=>{"use strict";s(QKe,"stackDelete");zue=QKe});function JKe(e){return this.__data__.get(e)}var Wue,que=F(()=>{"use strict";s(JKe,"stackGet");Wue=JKe});function eZe(e){return this.__data__.has(e)}var Hue,Uue=F(()=>{"use strict";s(eZe,"stackHas");Hue=eZe});function rZe(e,t){var r=this.__data__;if(r instanceof Od){var n=r.__data__;if(!Bd||n.length{"use strict";g2();i4();a4();tZe=200;s(rZe,"stackSet");Yue=rZe});function gy(e){var t=this.__data__=new Od(e);this.size=t.size}var Dc,b2=F(()=>{"use strict";g2();Gue();Vue();que();Uue();jue();s(gy,"Stack");gy.prototype.clear=Fue;gy.prototype.delete=zue;gy.prototype.get=Wue;gy.prototype.has=Hue;gy.prototype.set=Yue;Dc=gy});function nZe(e,t){return e&&Rc(t,Ti(t),e)}var Xue,Kue=F(()=>{"use strict";ny();Xu();s(nZe,"baseAssign");Xue=nZe});function iZe(e,t){return e&&Rc(t,Hs(t),e)}var Zue,Que=F(()=>{"use strict";ny();Nd();s(iZe,"baseAssignIn");Zue=iZe});function sZe(e,t){if(t)return e.slice();var r=e.length,n=the?the(r):new e.constructor(r);return e.copy(n),n}var rhe,Jue,aZe,ehe,the,u4,fP=F(()=>{"use strict";Yo();rhe=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Jue=rhe&&typeof module=="object"&&module&&!module.nodeType&&module,aZe=Jue&&Jue.exports===rhe,ehe=aZe?bi.Buffer:void 0,the=ehe?ehe.allocUnsafe:void 0;s(sZe,"cloneBuffer");u4=sZe});function oZe(e,t){for(var r=-1,n=e==null?0:e.length,i=0,a=[];++r{"use strict";s(oZe,"arrayFilter");h4=oZe});function lZe(){return[]}var d4,mP=F(()=>{"use strict";s(lZe,"stubArray");d4=lZe});var cZe,uZe,nhe,hZe,yy,f4=F(()=>{"use strict";pP();mP();cZe=Object.prototype,uZe=cZe.propertyIsEnumerable,nhe=Object.getOwnPropertySymbols,hZe=nhe?function(e){return e==null?[]:(e=Object(e),h4(nhe(e),function(t){return uZe.call(e,t)}))}:d4,yy=hZe});function dZe(e,t){return Rc(e,yy(e),t)}var ihe,ahe=F(()=>{"use strict";ny();f4();s(dZe,"copySymbols");ihe=dZe});var fZe,pZe,p4,gP=F(()=>{"use strict";o4();c4();f4();mP();fZe=Object.getOwnPropertySymbols,pZe=fZe?function(e){for(var t=[];e;)fy(t,yy(e)),e=my(e);return t}:d4,p4=pZe});function mZe(e,t){return Rc(e,p4(e),t)}var she,ohe=F(()=>{"use strict";ny();gP();s(mZe,"copySymbolsIn");she=mZe});function gZe(e,t,r){var n=t(e);return Wr(e)?n:fy(n,r(e))}var m4,yP=F(()=>{"use strict";o4();Fi();s(gZe,"baseGetAllKeys");m4=gZe});function yZe(e){return m4(e,Ti,yy)}var T2,vP=F(()=>{"use strict";yP();f4();Xu();s(yZe,"getAllKeys");T2=yZe});function vZe(e){return m4(e,Hs,p4)}var lhe,che=F(()=>{"use strict";yP();gP();Nd();s(vZe,"getAllKeysIn");lhe=vZe});var xZe,g4,uhe=F(()=>{"use strict";Ed();Yo();xZe=Ws(bi,"DataView"),g4=xZe});var bZe,y4,hhe=F(()=>{"use strict";Ed();Yo();bZe=Ws(bi,"Promise"),y4=bZe});var TZe,zd,xP=F(()=>{"use strict";Ed();Yo();TZe=Ws(bi,"Set"),zd=TZe});var dhe,CZe,fhe,phe,mhe,ghe,kZe,wZe,SZe,EZe,AZe,Qp,Co,Jp=F(()=>{"use strict";uhe();i4();hhe();xP();Zle();wd();ZN();dhe="[object Map]",CZe="[object Object]",fhe="[object Promise]",phe="[object Set]",mhe="[object WeakMap]",ghe="[object DataView]",kZe=Uu(g4),wZe=Uu(Bd),SZe=Uu(y4),EZe=Uu(zd),AZe=Uu(UE),Qp=ms;(g4&&Qp(new g4(new ArrayBuffer(1)))!=ghe||Bd&&Qp(new Bd)!=dhe||y4&&Qp(y4.resolve())!=fhe||zd&&Qp(new zd)!=phe||UE&&Qp(new UE)!=mhe)&&(Qp=s(function(e){var t=ms(e),r=t==CZe?e.constructor:void 0,n=r?Uu(r):"";if(n)switch(n){case kZe:return ghe;case wZe:return dhe;case SZe:return fhe;case EZe:return phe;case AZe:return mhe}return t},"getTag"));Co=Qp});function LZe(e){var t=e.length,r=new e.constructor(t);return t&&typeof e[0]=="string"&&_Ze.call(e,"index")&&(r.index=e.index,r.input=e.input),r}var RZe,_Ze,yhe,vhe=F(()=>{"use strict";RZe=Object.prototype,_Ze=RZe.hasOwnProperty;s(LZe,"initCloneArray");yhe=LZe});var DZe,vy,bP=F(()=>{"use strict";Yo();DZe=bi.Uint8Array,vy=DZe});function IZe(e){var t=new e.constructor(e.byteLength);return new vy(t).set(new vy(e)),t}var xy,v4=F(()=>{"use strict";bP();s(IZe,"cloneArrayBuffer");xy=IZe});function MZe(e,t){var r=t?xy(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}var xhe,bhe=F(()=>{"use strict";v4();s(MZe,"cloneDataView");xhe=MZe});function PZe(e){var t=new e.constructor(e.source,NZe.exec(e));return t.lastIndex=e.lastIndex,t}var NZe,The,Che=F(()=>{"use strict";NZe=/\w*$/;s(PZe,"cloneRegExp");The=PZe});function OZe(e){return whe?Object(whe.call(e)):{}}var khe,whe,She,Ehe=F(()=>{"use strict";jp();khe=fa?fa.prototype:void 0,whe=khe?khe.valueOf:void 0;s(OZe,"cloneSymbol");She=OZe});function BZe(e,t){var r=t?xy(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}var x4,TP=F(()=>{"use strict";v4();s(BZe,"cloneTypedArray");x4=BZe});function nQe(e,t,r){var n=e.constructor;switch(t){case UZe:return xy(e);case $Ze:case FZe:return new n(+e);case YZe:return xhe(e,r);case jZe:case XZe:case KZe:case ZZe:case QZe:case JZe:case eQe:case tQe:case rQe:return x4(e,r);case GZe:return new n;case zZe:case qZe:return new n(e);case VZe:return The(e);case WZe:return new n;case HZe:return She(e)}}var $Ze,FZe,GZe,zZe,VZe,WZe,qZe,HZe,UZe,YZe,jZe,XZe,KZe,ZZe,QZe,JZe,eQe,tQe,rQe,Ahe,Rhe=F(()=>{"use strict";v4();bhe();Che();Ehe();TP();$Ze="[object Boolean]",FZe="[object Date]",GZe="[object Map]",zZe="[object Number]",VZe="[object RegExp]",WZe="[object Set]",qZe="[object String]",HZe="[object Symbol]",UZe="[object ArrayBuffer]",YZe="[object DataView]",jZe="[object Float32Array]",XZe="[object Float64Array]",KZe="[object Int8Array]",ZZe="[object Int16Array]",QZe="[object Int32Array]",JZe="[object Uint8Array]",eQe="[object Uint8ClampedArray]",tQe="[object Uint16Array]",rQe="[object Uint32Array]";s(nQe,"initCloneByTag");Ahe=nQe});function iQe(e){return typeof e.constructor=="function"&&!Dd(e)?Jle(my(e)):{}}var b4,CP=F(()=>{"use strict";ece();c4();u2();s(iQe,"initCloneObject");b4=iQe});function sQe(e){return Ri(e)&&Co(e)==aQe}var aQe,_he,Lhe=F(()=>{"use strict";Jp();Ml();aQe="[object Map]";s(sQe,"baseIsMap");_he=sQe});var Dhe,oQe,Ihe,Mhe=F(()=>{"use strict";Lhe();h2();JE();Dhe=ju&&ju.isMap,oQe=Dhe?Id(Dhe):_he,Ihe=oQe});function cQe(e){return Ri(e)&&Co(e)==lQe}var lQe,Nhe,Phe=F(()=>{"use strict";Jp();Ml();lQe="[object Set]";s(cQe,"baseIsSet");Nhe=cQe});var Ohe,uQe,Bhe,$he=F(()=>{"use strict";Phe();h2();JE();Ohe=ju&&ju.isSet,uQe=Ohe?Id(Ohe):Nhe,Bhe=uQe});function T4(e,t,r,n,i,a){var o,l=t&hQe,u=t&dQe,h=t&fQe;if(r&&(o=i?r(e,n,i,a):r(e)),o!==void 0)return o;if(!ni(e))return e;var d=Wr(e);if(d){if(o=yhe(e),!l)return YE(e,o)}else{var f=Co(e),p=f==Ghe||f==vQe;if(Pl(e))return u4(e,l);if(f==zhe||f==Fhe||p&&!i){if(o=u||p?{}:b4(e),!l)return u?she(e,Zue(o,e)):ihe(e,Xue(o,e))}else{if(!zn[f])return i?e:{};o=Ahe(e,f,l)}}a||(a=new Dc);var m=a.get(e);if(m)return m;a.set(e,o),Bhe(e)?e.forEach(function(v){o.add(T4(v,t,r,v,e,a))}):Ihe(e)&&e.forEach(function(v,x){o.set(x,T4(v,t,r,x,e,a))});var g=h?u?lhe:T2:u?Hs:Ti,y=d?void 0:g(e);return XE(y||e,function(v,x){y&&(x=v,v=e[x]),_d(o,x,T4(v,t,r,x,e,a))}),o}var hQe,dQe,fQe,Fhe,pQe,mQe,gQe,yQe,Ghe,vQe,xQe,bQe,zhe,TQe,CQe,kQe,wQe,SQe,EQe,AQe,RQe,_Qe,LQe,DQe,IQe,MQe,NQe,PQe,OQe,zn,Vhe,Whe=F(()=>{"use strict";b2();rP();o2();Kue();Que();fP();QN();ahe();ohe();vP();che();Jp();vhe();Rhe();CP();Fi();sy();Mhe();jo();$he();Xu();Nd();hQe=1,dQe=2,fQe=4,Fhe="[object Arguments]",pQe="[object Array]",mQe="[object Boolean]",gQe="[object Date]",yQe="[object Error]",Ghe="[object Function]",vQe="[object GeneratorFunction]",xQe="[object Map]",bQe="[object Number]",zhe="[object Object]",TQe="[object RegExp]",CQe="[object Set]",kQe="[object String]",wQe="[object Symbol]",SQe="[object WeakMap]",EQe="[object ArrayBuffer]",AQe="[object DataView]",RQe="[object Float32Array]",_Qe="[object Float64Array]",LQe="[object Int8Array]",DQe="[object Int16Array]",IQe="[object Int32Array]",MQe="[object Uint8Array]",NQe="[object Uint8ClampedArray]",PQe="[object Uint16Array]",OQe="[object Uint32Array]",zn={};zn[Fhe]=zn[pQe]=zn[EQe]=zn[AQe]=zn[mQe]=zn[gQe]=zn[RQe]=zn[_Qe]=zn[LQe]=zn[DQe]=zn[IQe]=zn[xQe]=zn[bQe]=zn[zhe]=zn[TQe]=zn[CQe]=zn[kQe]=zn[wQe]=zn[MQe]=zn[NQe]=zn[PQe]=zn[OQe]=!0;zn[yQe]=zn[Ghe]=zn[SQe]=!1;s(T4,"baseClone");Vhe=T4});function FQe(e){return Vhe(e,BQe|$Qe)}var BQe,$Qe,kP,qhe=F(()=>{"use strict";Whe();BQe=1,$Qe=4;s(FQe,"cloneDeep");kP=FQe});function zQe(e){return this.__data__.set(e,GQe),this}var GQe,Hhe,Uhe=F(()=>{"use strict";GQe="__lodash_hash_undefined__";s(zQe,"setCacheAdd");Hhe=zQe});function VQe(e){return this.__data__.has(e)}var Yhe,jhe=F(()=>{"use strict";s(VQe,"setCacheHas");Yhe=VQe});function C4(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new Zp;++t{"use strict";a4();Uhe();jhe();s(C4,"SetCache");C4.prototype.add=C4.prototype.push=Hhe;C4.prototype.has=Yhe;k4=C4});function WQe(e,t){for(var r=-1,n=e==null?0:e.length;++r{"use strict";s(WQe,"arraySome");Xhe=WQe});function qQe(e,t){return e.has(t)}var w4,SP=F(()=>{"use strict";s(qQe,"cacheHas");w4=qQe});function YQe(e,t,r,n,i,a){var o=r&HQe,l=e.length,u=t.length;if(l!=u&&!(o&&u>l))return!1;var h=a.get(e),d=a.get(t);if(h&&d)return h==t&&d==e;var f=-1,p=!0,m=r&UQe?new k4:void 0;for(a.set(e,t),a.set(t,e);++f{"use strict";wP();Khe();SP();HQe=1,UQe=2;s(YQe,"equalArrays");S4=YQe});function jQe(e){var t=-1,r=Array(e.size);return e.forEach(function(n,i){r[++t]=[i,n]}),r}var Zhe,Qhe=F(()=>{"use strict";s(jQe,"mapToArray");Zhe=jQe});function XQe(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}var by,E4=F(()=>{"use strict";s(XQe,"setToArray");by=XQe});function cJe(e,t,r,n,i,a,o){switch(r){case lJe:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case oJe:return!(e.byteLength!=t.byteLength||!a(new vy(e),new vy(t)));case QQe:case JQe:case rJe:return Xo(+e,+t);case eJe:return e.name==t.name&&e.message==t.message;case nJe:case aJe:return e==t+"";case tJe:var l=Zhe;case iJe:var u=n&KQe;if(l||(l=by),e.size!=t.size&&!u)return!1;var h=o.get(e);if(h)return h==t;n|=ZQe,o.set(e,t);var d=S4(l(e),l(t),n,i,a,o);return o.delete(e),d;case sJe:if(AP)return AP.call(e)==AP.call(t)}return!1}var KQe,ZQe,QQe,JQe,eJe,tJe,rJe,nJe,iJe,aJe,sJe,oJe,lJe,Jhe,AP,ede,tde=F(()=>{"use strict";jp();bP();Kp();EP();Qhe();E4();KQe=1,ZQe=2,QQe="[object Boolean]",JQe="[object Date]",eJe="[object Error]",tJe="[object Map]",rJe="[object Number]",nJe="[object RegExp]",iJe="[object Set]",aJe="[object String]",sJe="[object Symbol]",oJe="[object ArrayBuffer]",lJe="[object DataView]",Jhe=fa?fa.prototype:void 0,AP=Jhe?Jhe.valueOf:void 0;s(cJe,"equalByTag");ede=cJe});function fJe(e,t,r,n,i,a){var o=r&uJe,l=T2(e),u=l.length,h=T2(t),d=h.length;if(u!=d&&!o)return!1;for(var f=u;f--;){var p=l[f];if(!(o?p in t:dJe.call(t,p)))return!1}var m=a.get(e),g=a.get(t);if(m&&g)return m==t&&g==e;var y=!0;a.set(e,t),a.set(t,e);for(var v=o;++f{"use strict";vP();uJe=1,hJe=Object.prototype,dJe=hJe.hasOwnProperty;s(fJe,"equalObjects");rde=fJe});function gJe(e,t,r,n,i,a){var o=Wr(e),l=Wr(t),u=o?ade:Co(e),h=l?ade:Co(t);u=u==ide?A4:u,h=h==ide?A4:h;var d=u==A4,f=h==A4,p=u==h;if(p&&Pl(e)){if(!Pl(t))return!1;o=!0,d=!1}if(p&&!d)return a||(a=new Dc),o||Md(e)?S4(e,t,r,n,i,a):ede(e,t,u,r,n,i,a);if(!(r&pJe)){var m=d&&sde.call(e,"__wrapped__"),g=f&&sde.call(t,"__wrapped__");if(m||g){var y=m?e.value():e,v=g?t.value():t;return a||(a=new Dc),i(y,v,r,n,a)}}return p?(a||(a=new Dc),rde(e,t,r,n,i,a)):!1}var pJe,ide,ade,A4,mJe,sde,ode,lde=F(()=>{"use strict";b2();EP();tde();nde();Jp();Fi();sy();f2();pJe=1,ide="[object Arguments]",ade="[object Array]",A4="[object Object]",mJe=Object.prototype,sde=mJe.hasOwnProperty;s(gJe,"baseIsEqualDeep");ode=gJe});function cde(e,t,r,n,i){return e===t?!0:e==null||t==null||!Ri(e)&&!Ri(t)?e!==e&&t!==t:ode(e,t,r,n,cde,i)}var R4,RP=F(()=>{"use strict";lde();Ml();s(cde,"baseIsEqual");R4=cde});function xJe(e,t,r,n){var i=r.length,a=i,o=!n;if(e==null)return!a;for(e=Object(e);i--;){var l=r[i];if(o&&l[2]?l[1]!==e[l[0]]:!(l[0]in e))return!1}for(;++i{"use strict";b2();RP();yJe=1,vJe=2;s(xJe,"baseIsMatch");ude=xJe});function bJe(e){return e===e&&!ni(e)}var _4,_P=F(()=>{"use strict";jo();s(bJe,"isStrictComparable");_4=bJe});function TJe(e){for(var t=Ti(e),r=t.length;r--;){var n=t[r],i=e[n];t[r]=[n,i,_4(i)]}return t}var dde,fde=F(()=>{"use strict";_P();Xu();s(TJe,"getMatchData");dde=TJe});function CJe(e,t){return function(r){return r==null?!1:r[e]===t&&(t!==void 0||e in Object(r))}}var L4,LP=F(()=>{"use strict";s(CJe,"matchesStrictComparable");L4=CJe});function kJe(e){var t=dde(e);return t.length==1&&t[0][2]?L4(t[0][0],t[0][1]):function(r){return r===e||ude(r,e,t)}}var pde,mde=F(()=>{"use strict";hde();fde();LP();s(kJe,"baseMatches");pde=kJe});function wJe(e,t){return e!=null&&t in Object(e)}var gde,yde=F(()=>{"use strict";s(wJe,"baseHasIn");gde=wJe});function SJe(e,t,r){t=Fd(t,e);for(var n=-1,i=t.length,a=!1;++n{"use strict";v2();ay();Fi();a2();QE();dy();s(SJe,"hasPath");D4=SJe});function EJe(e,t){return e!=null&&D4(e,t,gde)}var I4,IP=F(()=>{"use strict";yde();DP();s(EJe,"hasIn");I4=EJe});function _Je(e,t){return ly(e)&&_4(t)?L4(Lc(e),t):function(r){var n=wue(r,e);return n===void 0&&n===t?I4(r,e):R4(t,n,AJe|RJe)}}var AJe,RJe,vde,xde=F(()=>{"use strict";RP();Sue();IP();n4();_P();LP();dy();AJe=1,RJe=2;s(_Je,"baseMatchesProperty");vde=_Je});function LJe(e){return function(t){return t?.[e]}}var M4,MP=F(()=>{"use strict";s(LJe,"baseProperty");M4=LJe});function DJe(e){return function(t){return Gd(t,e)}}var bde,Tde=F(()=>{"use strict";x2();s(DJe,"basePropertyDeep");bde=DJe});function IJe(e){return ly(e)?M4(Lc(e)):bde(e)}var Cde,kde=F(()=>{"use strict";MP();Tde();n4();dy();s(IJe,"property");Cde=IJe});function MJe(e){return typeof e=="function"?e:e==null?Vs:typeof e=="object"?Wr(e)?vde(e[0],e[1]):pde(e):Cde(e)}var ja,Zu=F(()=>{"use strict";mde();xde();Sd();Fi();kde();s(MJe,"baseIteratee");ja=MJe});function NJe(e){return function(t,r,n){for(var i=-1,a=Object(t),o=n(t),l=o.length;l--;){var u=o[e?l:++i];if(r(a[u],u,a)===!1)break}return t}}var wde,Sde=F(()=>{"use strict";s(NJe,"createBaseFor");wde=NJe});var PJe,Ty,N4=F(()=>{"use strict";Sde();PJe=wde(),Ty=PJe});function OJe(e,t){return e&&Ty(e,t,Ti)}var Cy,P4=F(()=>{"use strict";N4();Xu();s(OJe,"baseForOwn");Cy=OJe});function BJe(e,t){return function(r,n){if(r==null)return r;if(!pa(r))return e(r,n);for(var i=r.length,a=t?i:-1,o=Object(r);(t?a--:++a{"use strict";_c();s(BJe,"createBaseEach");Ede=BJe});var $Je,Vd,C2=F(()=>{"use strict";P4();Ade();$Je=Ede(Cy),Vd=$Je});var FJe,O4,Rde=F(()=>{"use strict";Yo();FJe=s(function(){return bi.Date.now()},"now"),O4=FJe});var _de,GJe,zJe,NP,Lde=F(()=>{"use strict";l2();Kp();c2();Nd();_de=Object.prototype,GJe=_de.hasOwnProperty,zJe=Ld(function(e,t){e=Object(e);var r=-1,n=t.length,i=n>2?t[2]:void 0;for(i&&Yu(t[0],t[1],i)&&(n=1);++r{"use strict";s2();Kp();s(VJe,"assignMergeValue");k2=VJe});function WJe(e){return Ri(e)&&pa(e)}var B4,OP=F(()=>{"use strict";_c();Ml();s(WJe,"isArrayLikeObject");B4=WJe});function qJe(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}var w2,BP=F(()=>{"use strict";s(qJe,"safeGet");w2=qJe});function HJe(e){return Rc(e,Hs(e))}var Dde,Ide=F(()=>{"use strict";ny();Nd();s(HJe,"toPlainObject");Dde=HJe});function UJe(e,t,r,n,i,a,o){var l=w2(e,r),u=w2(t,r),h=o.get(u);if(h){k2(e,r,h);return}var d=a?a(l,u,r+"",e,t,o):void 0,f=d===void 0;if(f){var p=Wr(u),m=!p&&Pl(u),g=!p&&!m&&Md(u);d=u,p||m||g?Wr(l)?d=l:B4(l)?d=YE(l):m?(f=!1,d=u4(u,!0)):g?(f=!1,d=x4(u,!0)):d=[]:Mue(u)||Nl(u)?(d=l,Nl(l)?d=Dde(l):(!ni(l)||Ac(l))&&(d=b4(u))):f=!1}f&&(o.set(u,d),i(d,u,n,a,o),o.delete(u)),k2(e,r,d)}var Mde,Nde=F(()=>{"use strict";PP();fP();TP();QN();CP();ay();Fi();OP();sy();i2();jo();Nue();f2();BP();Ide();s(UJe,"baseMergeDeep");Mde=UJe});function Pde(e,t,r,n,i){e!==t&&Ty(t,function(a,o){if(i||(i=new Dc),ni(a))Mde(e,t,o,r,Pde,n,i);else{var l=n?n(w2(e,o),a,o+"",e,t,i):void 0;l===void 0&&(l=a),k2(e,o,l)}},Hs)}var Ode,Bde=F(()=>{"use strict";b2();PP();N4();Nde();jo();Nd();BP();s(Pde,"baseMerge");Ode=Pde});function YJe(e,t,r){for(var n=-1,i=e==null?0:e.length;++n{"use strict";s(YJe,"arrayIncludesWith");$de=YJe});function jJe(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}var Wd,Gde=F(()=>{"use strict";s(jJe,"last");Wd=jJe});function XJe(e){return typeof e=="function"?e:Vs}var ky,$4=F(()=>{"use strict";Sd();s(XJe,"castFunction");ky=XJe});function KJe(e,t){var r=Wr(e)?XE:Vd;return r(e,ky(t))}var ot,$P=F(()=>{"use strict";rP();C2();$4();Fi();s(KJe,"forEach");ot=KJe});var zde=F(()=>{"use strict";$P()});function ZJe(e,t){var r=[];return Vd(e,function(n,i,a){t(n,i,a)&&r.push(n)}),r}var Vde,Wde=F(()=>{"use strict";C2();s(ZJe,"baseFilter");Vde=ZJe});function QJe(e,t){var r=Wr(e)?h4:Vde;return r(e,ja(t,3))}var gs,qde=F(()=>{"use strict";pP();Wde();Zu();Fi();s(QJe,"filter");gs=QJe});function JJe(e){return function(t,r,n){var i=Object(t);if(!pa(t)){var a=ja(r,3);t=Ti(t),r=s(function(l){return a(i[l],l,i)},"predicate")}var o=e(t,r,n);return o>-1?i[a?t[o]:o]:void 0}}var Hde,Ude=F(()=>{"use strict";Zu();_c();Xu();s(JJe,"createFind");Hde=JJe});function tet(e,t,r){var n=e==null?0:e.length;if(!n)return-1;var i=r==null?0:zle(r);return i<0&&(i=eet(n+i,0)),KE(e,ja(t,3),i)}var eet,Yde,jde=F(()=>{"use strict";nP();Zu();Vle();eet=Math.max;s(tet,"findIndex");Yde=tet});var ret,wy,Xde=F(()=>{"use strict";Ude();jde();ret=Hde(Yde),wy=ret});function net(e,t){var r=-1,n=pa(e)?Array(e.length):[];return Vd(e,function(i,a,o){n[++r]=t(i,a,o)}),n}var F4,FP=F(()=>{"use strict";C2();_c();s(net,"baseMap");F4=net});function iet(e,t){var r=Wr(e)?Ec:F4;return r(e,ja(t,3))}var Rn,Kde=F(()=>{"use strict";n2();Zu();FP();Fi();s(iet,"map");Rn=iet});function aet(e,t){return e==null?e:Ty(e,ky(t),Hs)}var GP,Zde=F(()=>{"use strict";N4();$4();Nd();s(aet,"forIn");GP=aet});function set(e,t){return e&&Cy(e,ky(t))}var zP,Qde=F(()=>{"use strict";P4();$4();s(set,"forOwn");zP=set});function oet(e,t){return e>t}var Jde,efe=F(()=>{"use strict";s(oet,"baseGt");Jde=oet});function het(e,t){return e!=null&&uet.call(e,t)}var cet,uet,tfe,rfe=F(()=>{"use strict";cet=Object.prototype,uet=cet.hasOwnProperty;s(het,"baseHas");tfe=het});function det(e,t){return e!=null&&D4(e,t,tfe)}var S2,nfe=F(()=>{"use strict";rfe();DP();s(det,"has");S2=det});function pet(e){return typeof e=="string"||!Wr(e)&&Ri(e)&&ms(e)==fet}var fet,ife,afe=F(()=>{"use strict";wd();Fi();Ml();fet="[object String]";s(pet,"isString");ife=pet});function met(e,t){return Ec(t,function(r){return e[r]})}var sfe,ofe=F(()=>{"use strict";n2();s(met,"baseValues");sfe=met});function get(e){return e==null?[]:sfe(e,Ti(e))}var ko,lfe=F(()=>{"use strict";ofe();Xu();s(get,"values");ko=get});function Tet(e){if(e==null)return!0;if(pa(e)&&(Wr(e)||typeof e=="string"||typeof e.splice=="function"||Pl(e)||Md(e)||Nl(e)))return!e.length;var t=Co(e);if(t==yet||t==vet)return!e.size;if(Dd(e))return!oy(e).length;for(var r in e)if(bet.call(e,r))return!1;return!0}var yet,vet,xet,bet,G4,cfe=F(()=>{"use strict";r4();Jp();ay();Fi();_c();sy();u2();f2();yet="[object Map]",vet="[object Set]",xet=Object.prototype,bet=xet.hasOwnProperty;s(Tet,"isEmpty");G4=Tet});function Cet(e){return e===void 0}var Ci,ufe=F(()=>{"use strict";s(Cet,"isUndefined");Ci=Cet});function ket(e,t){return e{"use strict";s(ket,"baseLt");z4=ket});function wet(e,t){var r={};return t=ja(t,3),Cy(e,function(n,i,a){Rd(r,i,t(n,i,a))}),r}var em,hfe=F(()=>{"use strict";s2();P4();Zu();s(wet,"mapValues");em=wet});function Eet(e,t,r){for(var n=-1,i=e.length;++n{"use strict";Xp();s(Eet,"baseExtremum");Sy=Eet});function Aet(e){return e&&e.length?Sy(e,Vs,Jde):void 0}var Us,dfe=F(()=>{"use strict";V4();efe();Sd();s(Aet,"max");Us=Aet});var Ret,Ey,ffe=F(()=>{"use strict";Bde();xce();Ret=vce(function(e,t,r){Ode(e,t,r)}),Ey=Ret});function _et(e){return e&&e.length?Sy(e,Vs,z4):void 0}var Qu,pfe=F(()=>{"use strict";V4();VP();Sd();s(_et,"min");Qu=_et});function Let(e,t){return e&&e.length?Sy(e,ja(t,2),z4):void 0}var tm,mfe=F(()=>{"use strict";V4();Zu();VP();s(Let,"minBy");tm=Let});function Det(e,t,r,n){if(!ni(e))return e;t=Fd(t,e);for(var i=-1,a=t.length,o=a-1,l=e;l!=null&&++i{"use strict";o2();v2();a2();jo();dy();s(Det,"baseSet");gfe=Det});function Iet(e,t,r){for(var n=-1,i=t.length,a={};++n{"use strict";x2();yfe();v2();s(Iet,"basePickBy");vfe=Iet});function Met(e,t){var r=e.length;for(e.sort(t);r--;)e[r]=e[r].value;return e}var bfe,Tfe=F(()=>{"use strict";s(Met,"baseSortBy");bfe=Met});function Net(e,t){if(e!==t){var r=e!==void 0,n=e===null,i=e===e,a=To(e),o=t!==void 0,l=t===null,u=t===t,h=To(t);if(!l&&!h&&!a&&e>t||a&&o&&u&&!l&&!h||n&&o&&u||!r&&u||!i)return 1;if(!n&&!a&&!h&&e{"use strict";Xp();s(Net,"compareAscending");Cfe=Net});function Pet(e,t,r){for(var n=-1,i=e.criteria,a=t.criteria,o=i.length,l=r.length;++n=l)return u;var h=r[n];return u*(h=="desc"?-1:1)}}return e.index-t.index}var wfe,Sfe=F(()=>{"use strict";kfe();s(Pet,"compareMultiple");wfe=Pet});function Oet(e,t,r){t.length?t=Ec(t,function(a){return Wr(a)?function(o){return Gd(o,a.length===1?a[0]:a)}:a}):t=[Vs];var n=-1;t=Ec(t,Id(ja));var i=F4(e,function(a,o,l){var u=Ec(t,function(h){return h(a)});return{criteria:u,index:++n,value:a}});return bfe(i,function(a,o){return wfe(a,o,r)})}var Efe,Afe=F(()=>{"use strict";n2();x2();Zu();FP();Tfe();h2();Sfe();Sd();Fi();s(Oet,"baseOrderBy");Efe=Oet});var Bet,Rfe,_fe=F(()=>{"use strict";MP();Bet=M4("length"),Rfe=Bet});function Xet(e){for(var t=Lfe.lastIndex=0;Lfe.test(e);)++t;return t}var Dfe,$et,Fet,Get,zet,Vet,Wet,WP,qP,qet,Ife,Mfe,Nfe,Het,Pfe,Ofe,Uet,Yet,jet,Lfe,Bfe,$fe=F(()=>{"use strict";Dfe="\\ud800-\\udfff",$et="\\u0300-\\u036f",Fet="\\ufe20-\\ufe2f",Get="\\u20d0-\\u20ff",zet=$et+Fet+Get,Vet="\\ufe0e\\ufe0f",Wet="["+Dfe+"]",WP="["+zet+"]",qP="\\ud83c[\\udffb-\\udfff]",qet="(?:"+WP+"|"+qP+")",Ife="[^"+Dfe+"]",Mfe="(?:\\ud83c[\\udde6-\\uddff]){2}",Nfe="[\\ud800-\\udbff][\\udc00-\\udfff]",Het="\\u200d",Pfe=qet+"?",Ofe="["+Vet+"]?",Uet="(?:"+Het+"(?:"+[Ife,Mfe,Nfe].join("|")+")"+Ofe+Pfe+")*",Yet=Ofe+Pfe+Uet,jet="(?:"+[Ife+WP+"?",WP,Mfe,Nfe,Wet].join("|")+")",Lfe=RegExp(qP+"(?="+qP+")|"+jet+Yet,"g");s(Xet,"unicodeSize");Bfe=Xet});function Ket(e){return Pue(e)?Bfe(e):Rfe(e)}var Ffe,Gfe=F(()=>{"use strict";_fe();Oue();$fe();s(Ket,"stringSize");Ffe=Ket});function Zet(e,t){return vfe(e,t,function(r,n){return I4(e,n)})}var zfe,Vfe=F(()=>{"use strict";xfe();IP();s(Zet,"basePick");zfe=Zet});var Qet,rm,Wfe=F(()=>{"use strict";Vfe();Due();Qet=Lue(function(e,t){return e==null?{}:zfe(e,t)}),rm=Qet});function ttt(e,t,r,n){for(var i=-1,a=ett(Jet((t-e)/(r||1)),0),o=Array(a);a--;)o[n?a:++i]=e,e+=r;return o}var Jet,ett,qfe,Hfe=F(()=>{"use strict";Jet=Math.ceil,ett=Math.max;s(ttt,"baseRange");qfe=ttt});function rtt(e){return function(t,r,n){return n&&typeof n!="number"&&Yu(t,r,n)&&(r=n=void 0),t=ty(t),r===void 0?(r=t,t=0):r=ty(r),n=n===void 0?t{"use strict";Hfe();c2();KN();s(rtt,"createRange");Ufe=rtt});var ntt,Zo,jfe=F(()=>{"use strict";Yfe();ntt=Ufe(),Zo=ntt});function itt(e,t,r,n,i){return i(e,function(a,o,l){r=n?(n=!1,a):t(r,a,o,l)}),r}var Xfe,Kfe=F(()=>{"use strict";s(itt,"baseReduce");Xfe=itt});function att(e,t,r){var n=Wr(e)?Bue:Xfe,i=arguments.length<3;return n(e,ja(t,4),r,i,Vd)}var Ic,Zfe=F(()=>{"use strict";$ue();C2();Zu();Kfe();Fi();s(att,"reduce");Ic=att});function ltt(e){if(e==null)return 0;if(pa(e))return ife(e)?Ffe(e):e.length;var t=Co(e);return t==stt||t==ott?e.size:oy(e).length}var stt,ott,HP,Qfe=F(()=>{"use strict";r4();Jp();_c();afe();Gfe();stt="[object Map]",ott="[object Set]";s(ltt,"size");HP=ltt});var ctt,Mc,Jfe=F(()=>{"use strict";l4();Afe();l2();c2();ctt=Ld(function(e,t){if(e==null)return[];var r=t.length;return r>1&&Yu(e,t[0],t[1])?t=[]:r>2&&Yu(t[0],t[1],t[2])&&(t=[t[0]]),Efe(e,py(t,1),[])}),Mc=ctt});var utt,htt,epe,tpe=F(()=>{"use strict";xP();ice();E4();utt=1/0,htt=zd&&1/by(new zd([,-0]))[1]==utt?function(e){return new zd(e)}:nce,epe=htt});function ftt(e,t,r){var n=-1,i=mce,a=e.length,o=!0,l=[],u=l;if(r)o=!1,i=$de;else if(a>=dtt){var h=t?null:epe(e);if(h)return by(h);o=!1,i=w4,u=new k4}else u=t?[]:l;e:for(;++n{"use strict";wP();gce();Fde();SP();tpe();E4();dtt=200;s(ftt,"baseUniq");rpe=ftt});var ptt,UP,ipe=F(()=>{"use strict";l4();l2();npe();OP();ptt=Ld(function(e){return rpe(py(e,1,B4,!0))}),UP=ptt});function gtt(e){var t=++mtt;return s4(e)+t}var mtt,nm,ape=F(()=>{"use strict";hP();mtt=0;s(gtt,"uniqueId");nm=gtt});function ytt(e,t,r){for(var n=-1,i=e.length,a=t.length,o={};++n{"use strict";s(ytt,"baseZipObject");spe=ytt});function vtt(e,t){return spe(e||[],t||[],_d)}var W4,lpe=F(()=>{"use strict";o2();ope();s(vtt,"zipObject");W4=vtt});var _n=F(()=>{"use strict";qhe();JN();Lde();zde();qde();Xde();dP();$P();Zde();Qde();nfe();Fi();cfe();i2();ufe();Xu();Gde();Kde();hfe();dfe();ffe();pfe();mfe();Rde();Wfe();jfe();Zfe();Qfe();Jfe();ipe();ape();lfe();lpe();});function upe(e,t){e[t]?e[t]++:e[t]=1}function hpe(e,t){--e[t]||delete e[t]}function E2(e,t,r,n){var i=""+t,a=""+r;if(!e&&i>a){var o=i;i=a,a=o}return i+cpe+a+cpe+(Ci(n)?xtt:n)}function btt(e,t,r,n){var i=""+t,a=""+r;if(!e&&i>a){var o=i;i=a,a=o}var l={v:i,w:a};return n&&(l.name=n),l}function YP(e,t){return E2(e,t.v,t.w,t.name)}var xtt,im,cpe,un,jP=F(()=>{"use strict";_n();xtt="\0",im="\0",cpe="",un=class{static{s(this,"Graph")}constructor(t={}){this._isDirected=Object.prototype.hasOwnProperty.call(t,"directed")?t.directed:!0,this._isMultigraph=Object.prototype.hasOwnProperty.call(t,"multigraph")?t.multigraph:!1,this._isCompound=Object.prototype.hasOwnProperty.call(t,"compound")?t.compound:!1,this._label=void 0,this._defaultNodeLabelFn=qs(void 0),this._defaultEdgeLabelFn=qs(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[im]={}),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(t){return this._label=t,this}graph(){return this._label}setDefaultNodeLabel(t){return Ac(t)||(t=qs(t)),this._defaultNodeLabelFn=t,this}nodeCount(){return this._nodeCount}nodes(){return Ti(this._nodes)}sources(){var t=this;return gs(this.nodes(),function(r){return G4(t._in[r])})}sinks(){var t=this;return gs(this.nodes(),function(r){return G4(t._out[r])})}setNodes(t,r){var n=arguments,i=this;return ot(t,function(a){n.length>1?i.setNode(a,r):i.setNode(a)}),this}setNode(t,r){return Object.prototype.hasOwnProperty.call(this._nodes,t)?(arguments.length>1&&(this._nodes[t]=r),this):(this._nodes[t]=arguments.length>1?r:this._defaultNodeLabelFn(t),this._isCompound&&(this._parent[t]=im,this._children[t]={},this._children[im][t]=!0),this._in[t]={},this._preds[t]={},this._out[t]={},this._sucs[t]={},++this._nodeCount,this)}node(t){return this._nodes[t]}hasNode(t){return Object.prototype.hasOwnProperty.call(this._nodes,t)}removeNode(t){if(Object.prototype.hasOwnProperty.call(this._nodes,t)){var r=s(n=>this.removeEdge(this._edgeObjs[n]),"removeEdge");delete this._nodes[t],this._isCompound&&(this._removeFromParentsChildList(t),delete this._parent[t],ot(this.children(t),n=>{this.setParent(n)}),delete this._children[t]),ot(Ti(this._in[t]),r),delete this._in[t],delete this._preds[t],ot(Ti(this._out[t]),r),delete this._out[t],delete this._sucs[t],--this._nodeCount}return this}setParent(t,r){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(Ci(r))r=im;else{r+="";for(var n=r;!Ci(n);n=this.parent(n))if(n===t)throw new Error("Setting "+r+" as parent of "+t+" would create a cycle");this.setNode(r)}return this.setNode(t),this._removeFromParentsChildList(t),this._parent[t]=r,this._children[r][t]=!0,this}_removeFromParentsChildList(t){delete this._children[this._parent[t]][t]}parent(t){if(this._isCompound){var r=this._parent[t];if(r!==im)return r}}children(t){if(Ci(t)&&(t=im),this._isCompound){var r=this._children[t];if(r)return Ti(r)}else{if(t===im)return this.nodes();if(this.hasNode(t))return[]}}predecessors(t){var r=this._preds[t];if(r)return Ti(r)}successors(t){var r=this._sucs[t];if(r)return Ti(r)}neighbors(t){var r=this.predecessors(t);if(r)return UP(r,this.successors(t))}isLeaf(t){var r;return this.isDirected()?r=this.successors(t):r=this.neighbors(t),r.length===0}filterNodes(t){var r=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});r.setGraph(this.graph());var n=this;ot(this._nodes,function(o,l){t(l)&&r.setNode(l,o)}),ot(this._edgeObjs,function(o){r.hasNode(o.v)&&r.hasNode(o.w)&&r.setEdge(o,n.edge(o))});var i={};function a(o){var l=n.parent(o);return l===void 0||r.hasNode(l)?(i[o]=l,l):l in i?i[l]:a(l)}return s(a,"findParent"),this._isCompound&&ot(r.nodes(),function(o){r.setParent(o,a(o))}),r}setDefaultEdgeLabel(t){return Ac(t)||(t=qs(t)),this._defaultEdgeLabelFn=t,this}edgeCount(){return this._edgeCount}edges(){return ko(this._edgeObjs)}setPath(t,r){var n=this,i=arguments;return Ic(t,function(a,o){return i.length>1?n.setEdge(a,o,r):n.setEdge(a,o),o}),this}setEdge(){var t,r,n,i,a=!1,o=arguments[0];typeof o=="object"&&o!==null&&"v"in o?(t=o.v,r=o.w,n=o.name,arguments.length===2&&(i=arguments[1],a=!0)):(t=o,r=arguments[1],n=arguments[3],arguments.length>2&&(i=arguments[2],a=!0)),t=""+t,r=""+r,Ci(n)||(n=""+n);var l=E2(this._isDirected,t,r,n);if(Object.prototype.hasOwnProperty.call(this._edgeLabels,l))return a&&(this._edgeLabels[l]=i),this;if(!Ci(n)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(t),this.setNode(r),this._edgeLabels[l]=a?i:this._defaultEdgeLabelFn(t,r,n);var u=btt(this._isDirected,t,r,n);return t=u.v,r=u.w,Object.freeze(u),this._edgeObjs[l]=u,upe(this._preds[r],t),upe(this._sucs[t],r),this._in[r][l]=u,this._out[t][l]=u,this._edgeCount++,this}edge(t,r,n){var i=arguments.length===1?YP(this._isDirected,arguments[0]):E2(this._isDirected,t,r,n);return this._edgeLabels[i]}hasEdge(t,r,n){var i=arguments.length===1?YP(this._isDirected,arguments[0]):E2(this._isDirected,t,r,n);return Object.prototype.hasOwnProperty.call(this._edgeLabels,i)}removeEdge(t,r,n){var i=arguments.length===1?YP(this._isDirected,arguments[0]):E2(this._isDirected,t,r,n),a=this._edgeObjs[i];return a&&(t=a.v,r=a.w,delete this._edgeLabels[i],delete this._edgeObjs[i],hpe(this._preds[r],t),hpe(this._sucs[t],r),delete this._in[r][i],delete this._out[t][i],this._edgeCount--),this}inEdges(t,r){var n=this._in[t];if(n){var i=ko(n);return r?gs(i,function(a){return a.v===r}):i}}outEdges(t,r){var n=this._out[t];if(n){var i=ko(n);return r?gs(i,function(a){return a.w===r}):i}}nodeEdges(t,r){var n=this.inEdges(t,r);if(n)return n.concat(this.outEdges(t,r))}};un.prototype._nodeCount=0;un.prototype._edgeCount=0;s(upe,"incrementOrInitEntry");s(hpe,"decrementOrRemoveEntry");s(E2,"edgeArgsToId");s(btt,"edgeArgsToObj");s(YP,"edgeObjToId")});var wo=F(()=>{"use strict";jP()});function dpe(e){e._prev._next=e._next,e._next._prev=e._prev,delete e._next,delete e._prev}function Ttt(e,t){if(e!=="_next"&&e!=="_prev")return t}var q4,fpe=F(()=>{"use strict";q4=class{static{s(this,"List")}constructor(){var t={};t._next=t._prev=t,this._sentinel=t}dequeue(){var t=this._sentinel,r=t._prev;if(r!==t)return dpe(r),r}enqueue(t){var r=this._sentinel;t._prev&&t._next&&dpe(t),t._next=r._next,r._next._prev=t,r._next=t,t._prev=r}toString(){for(var t=[],r=this._sentinel,n=r._prev;n!==r;)t.push(JSON.stringify(n,Ttt)),n=n._prev;return"["+t.join(", ")+"]"}};s(dpe,"unlink");s(Ttt,"filterOutLinks")});function ppe(e,t){if(e.nodeCount()<=1)return[];var r=wtt(e,t||Ctt),n=ktt(r.graph,r.buckets,r.zeroIdx);return Ko(Rn(n,function(i){return e.outEdges(i.v,i.w)}))}function ktt(e,t,r){for(var n=[],i=t[t.length-1],a=t[0],o;e.nodeCount();){for(;o=a.dequeue();)XP(e,t,r,o);for(;o=i.dequeue();)XP(e,t,r,o);if(e.nodeCount()){for(var l=t.length-2;l>0;--l)if(o=t[l].dequeue(),o){n=n.concat(XP(e,t,r,o,!0));break}}}return n}function XP(e,t,r,n,i){var a=i?[]:void 0;return ot(e.inEdges(n.v),function(o){var l=e.edge(o),u=e.node(o.v);i&&a.push({v:o.v,w:o.w}),u.out-=l,KP(t,r,u)}),ot(e.outEdges(n.v),function(o){var l=e.edge(o),u=o.w,h=e.node(u);h.in-=l,KP(t,r,h)}),e.removeNode(n.v),a}function wtt(e,t){var r=new un,n=0,i=0;ot(e.nodes(),function(l){r.setNode(l,{v:l,in:0,out:0})}),ot(e.edges(),function(l){var u=r.edge(l.v,l.w)||0,h=t(l),d=u+h;r.setEdge(l.v,l.w,d),i=Math.max(i,r.node(l.v).out+=h),n=Math.max(n,r.node(l.w).in+=h)});var a=Zo(i+n+3).map(function(){return new q4}),o=n+1;return ot(r.nodes(),function(l){KP(a,o,r.node(l))}),{graph:r,buckets:a,zeroIdx:o}}function KP(e,t,r){r.out?r.in?e[r.out-r.in+t].enqueue(r):e[e.length-1].enqueue(r):e[0].enqueue(r)}var Ctt,mpe=F(()=>{"use strict";_n();wo();fpe();Ctt=qs(1);s(ppe,"greedyFAS");s(ktt,"doGreedyFAS");s(XP,"removeNode");s(wtt,"buildState");s(KP,"assignBucket")});function gpe(e){var t=e.graph().acyclicer==="greedy"?ppe(e,r(e)):Stt(e);ot(t,function(n){var i=e.edge(n);e.removeEdge(n),i.forwardName=n.name,i.reversed=!0,e.setEdge(n.w,n.v,i,nm("rev"))});function r(n){return function(i){return n.edge(i).weight}}s(r,"weightFn")}function Stt(e){var t=[],r={},n={};function i(a){Object.prototype.hasOwnProperty.call(n,a)||(n[a]=!0,r[a]=!0,ot(e.outEdges(a),function(o){Object.prototype.hasOwnProperty.call(r,o.w)?t.push(o):i(o.w)}),delete r[a])}return s(i,"dfs"),ot(e.nodes(),i),t}function ype(e){ot(e.edges(),function(t){var r=e.edge(t);if(r.reversed){e.removeEdge(t);var n=r.forwardName;delete r.reversed,delete r.forwardName,e.setEdge(t.w,t.v,r,n)}})}var ZP=F(()=>{"use strict";_n();mpe();s(gpe,"run");s(Stt,"dfsFAS");s(ype,"undo")});function Nc(e,t,r,n){var i;do i=nm(n);while(e.hasNode(i));return r.dummy=t,e.setNode(i,r),i}function xpe(e){var t=new un().setGraph(e.graph());return ot(e.nodes(),function(r){t.setNode(r,e.node(r))}),ot(e.edges(),function(r){var n=t.edge(r.v,r.w)||{weight:0,minlen:1},i=e.edge(r);t.setEdge(r.v,r.w,{weight:n.weight+i.weight,minlen:Math.max(n.minlen,i.minlen)})}),t}function H4(e){var t=new un({multigraph:e.isMultigraph()}).setGraph(e.graph());return ot(e.nodes(),function(r){e.children(r).length||t.setNode(r,e.node(r))}),ot(e.edges(),function(r){t.setEdge(r,e.edge(r))}),t}function QP(e,t){var r=e.x,n=e.y,i=t.x-r,a=t.y-n,o=e.width/2,l=e.height/2;if(!i&&!a)throw new Error("Not possible to find intersection inside of the rectangle");var u,h;return Math.abs(a)*o>Math.abs(i)*l?(a<0&&(l=-l),u=l*i/a,h=l):(i<0&&(o=-o),u=o,h=o*a/i),{x:r+u,y:n+h}}function qd(e){var t=Rn(Zo(eO(e)+1),function(){return[]});return ot(e.nodes(),function(r){var n=e.node(r),i=n.rank;Ci(i)||(t[i][n.order]=r)}),t}function bpe(e){var t=Qu(Rn(e.nodes(),function(r){return e.node(r).rank}));ot(e.nodes(),function(r){var n=e.node(r);S2(n,"rank")&&(n.rank-=t)})}function Tpe(e){var t=Qu(Rn(e.nodes(),function(a){return e.node(a).rank})),r=[];ot(e.nodes(),function(a){var o=e.node(a).rank-t;r[o]||(r[o]=[]),r[o].push(a)});var n=0,i=e.graph().nodeRankFactor;ot(r,function(a,o){Ci(a)&&o%i!==0?--n:n&&ot(a,function(l){e.node(l).rank+=n})})}function JP(e,t,r,n){var i={width:0,height:0};return arguments.length>=4&&(i.rank=r,i.order=n),Nc(e,"border",i,t)}function eO(e){return Us(Rn(e.nodes(),function(t){var r=e.node(t).rank;if(!Ci(r))return r}))}function Cpe(e,t){var r={lhs:[],rhs:[]};return ot(e,function(n){t(n)?r.lhs.push(n):r.rhs.push(n)}),r}function kpe(e,t){var r=O4();try{return t()}finally{console.log(e+" time: "+(O4()-r)+"ms")}}function wpe(e,t){return t()}var Pc=F(()=>{"use strict";_n();wo();s(Nc,"addDummyNode");s(xpe,"simplify");s(H4,"asNonCompoundGraph");s(QP,"intersectRect");s(qd,"buildLayerMatrix");s(bpe,"normalizeRanks");s(Tpe,"removeEmptyRanks");s(JP,"addBorderNode");s(eO,"maxRank");s(Cpe,"partition");s(kpe,"time");s(wpe,"notime")});function Epe(e){function t(r){var n=e.children(r),i=e.node(r);if(n.length&&ot(n,t),Object.prototype.hasOwnProperty.call(i,"minRank")){i.borderLeft=[],i.borderRight=[];for(var a=i.minRank,o=i.maxRank+1;a{"use strict";_n();Pc();s(Epe,"addBorderSegments");s(Spe,"addBorderNode")});function _pe(e){var t=e.graph().rankdir.toLowerCase();(t==="lr"||t==="rl")&&Dpe(e)}function Lpe(e){var t=e.graph().rankdir.toLowerCase();(t==="bt"||t==="rl")&&Ett(e),(t==="lr"||t==="rl")&&(Att(e),Dpe(e))}function Dpe(e){ot(e.nodes(),function(t){Rpe(e.node(t))}),ot(e.edges(),function(t){Rpe(e.edge(t))})}function Rpe(e){var t=e.width;e.width=e.height,e.height=t}function Ett(e){ot(e.nodes(),function(t){tO(e.node(t))}),ot(e.edges(),function(t){var r=e.edge(t);ot(r.points,tO),Object.prototype.hasOwnProperty.call(r,"y")&&tO(r)})}function tO(e){e.y=-e.y}function Att(e){ot(e.nodes(),function(t){rO(e.node(t))}),ot(e.edges(),function(t){var r=e.edge(t);ot(r.points,rO),Object.prototype.hasOwnProperty.call(r,"x")&&rO(r)})}function rO(e){var t=e.x;e.x=e.y,e.y=t}var Ipe=F(()=>{"use strict";_n();s(_pe,"adjust");s(Lpe,"undo");s(Dpe,"swapWidthHeight");s(Rpe,"swapWidthHeightOne");s(Ett,"reverseY");s(tO,"reverseYOne");s(Att,"swapXY");s(rO,"swapXYOne")});function Mpe(e){e.graph().dummyChains=[],ot(e.edges(),function(t){_tt(e,t)})}function _tt(e,t){var r=t.v,n=e.node(r).rank,i=t.w,a=e.node(i).rank,o=t.name,l=e.edge(t),u=l.labelRank;if(a!==n+1){e.removeEdge(t);var h=void 0,d,f;for(f=0,++n;n{"use strict";_n();Pc();s(Mpe,"run");s(_tt,"normalizeEdge");s(Npe,"undo")});function R2(e){var t={};function r(n){var i=e.node(n);if(Object.prototype.hasOwnProperty.call(t,n))return i.rank;t[n]=!0;var a=Qu(Rn(e.outEdges(n),function(o){return r(o.w)-e.edge(o).minlen}));return(a===Number.POSITIVE_INFINITY||a===void 0||a===null)&&(a=0),i.rank=a}s(r,"dfs"),ot(e.sources(),r)}function am(e,t){return e.node(t.w).rank-e.node(t.v).rank-e.edge(t).minlen}var U4=F(()=>{"use strict";_n();s(R2,"longestPath");s(am,"slack")});function Y4(e){var t=new un({directed:!1}),r=e.nodes()[0],n=e.nodeCount();t.setNode(r,{});for(var i,a;Ltt(t,e){"use strict";_n();wo();U4();s(Y4,"feasibleTree");s(Ltt,"tightTree");s(Dtt,"findMinSlackEdge");s(Itt,"shiftRanks")});var Ope=F(()=>{"use strict"});var aO=F(()=>{"use strict"});var kbr,sO=F(()=>{"use strict";_n();aO();kbr=qs(1)});var Bpe=F(()=>{"use strict";sO()});var oO=F(()=>{"use strict"});var $pe=F(()=>{"use strict";oO()});var Nbr,Fpe=F(()=>{"use strict";_n();Nbr=qs(1)});function lO(e){var t={},r={},n=[];function i(a){if(Object.prototype.hasOwnProperty.call(r,a))throw new _2;Object.prototype.hasOwnProperty.call(t,a)||(r[a]=!0,t[a]=!0,ot(e.predecessors(a),i),delete r[a],n.push(a))}if(s(i,"visit"),ot(e.sinks(),i),HP(t)!==e.nodeCount())throw new _2;return n}function _2(){}var cO=F(()=>{"use strict";_n();lO.CycleException=_2;s(lO,"topsort");s(_2,"CycleException");_2.prototype=new Error});var Gpe=F(()=>{"use strict";cO()});function j4(e,t,r){Wr(t)||(t=[t]);var n=(e.isDirected()?e.successors:e.neighbors).bind(e),i=[],a={};return ot(t,function(o){if(!e.hasNode(o))throw new Error("Graph does not have node: "+o);zpe(e,o,r==="post",a,n,i)}),i}function zpe(e,t,r,n,i,a){Object.prototype.hasOwnProperty.call(n,t)||(n[t]=!0,r||a.push(t),ot(i(t),function(o){zpe(e,o,r,n,i,a)}),r&&a.push(t))}var uO=F(()=>{"use strict";_n();s(j4,"dfs");s(zpe,"doDfs")});function hO(e,t){return j4(e,t,"post")}var Vpe=F(()=>{"use strict";uO();s(hO,"postorder")});function dO(e,t){return j4(e,t,"pre")}var Wpe=F(()=>{"use strict";uO();s(dO,"preorder")});var qpe=F(()=>{"use strict";aO();jP()});var Hpe=F(()=>{"use strict";Ope();sO();Bpe();$pe();Fpe();Gpe();Vpe();Wpe();qpe();oO();cO()});function Ud(e){e=xpe(e),R2(e);var t=Y4(e);pO(t),fO(t,e);for(var r,n;r=Xpe(t);)n=Kpe(t,e,r),Zpe(t,e,r,n)}function fO(e,t){var r=hO(e,e.nodes());r=r.slice(0,r.length-1),ot(r,function(n){Btt(e,t,n)})}function Btt(e,t,r){var n=e.node(r),i=n.parent;e.edge(r,i).cutvalue=Ype(e,t,r)}function Ype(e,t,r){var n=e.node(r),i=n.parent,a=!0,o=t.edge(r,i),l=0;return o||(a=!1,o=t.edge(i,r)),l=o.weight,ot(t.nodeEdges(r),function(u){var h=u.v===r,d=h?u.w:u.v;if(d!==i){var f=h===a,p=t.edge(u).weight;if(l+=f?p:-p,Ftt(e,r,d)){var m=e.edge(r,d).cutvalue;l+=f?-m:m}}}),l}function pO(e,t){arguments.length<2&&(t=e.nodes()[0]),jpe(e,{},1,t)}function jpe(e,t,r,n,i){var a=r,o=e.node(n);return t[n]=!0,ot(e.neighbors(n),function(l){Object.prototype.hasOwnProperty.call(t,l)||(r=jpe(e,t,r,l,n))}),o.low=a,o.lim=r++,i?o.parent=i:delete o.parent,r}function Xpe(e){return wy(e.edges(),function(t){return e.edge(t).cutvalue<0})}function Kpe(e,t,r){var n=r.v,i=r.w;t.hasEdge(n,i)||(n=r.w,i=r.v);var a=e.node(n),o=e.node(i),l=a,u=!1;a.lim>o.lim&&(l=o,u=!0);var h=gs(t.edges(),function(d){return u===Upe(e,e.node(d.v),l)&&u!==Upe(e,e.node(d.w),l)});return tm(h,function(d){return am(t,d)})}function Zpe(e,t,r,n){var i=r.v,a=r.w;e.removeEdge(i,a),e.setEdge(n.v,n.w,{}),pO(e),fO(e,t),$tt(e,t)}function $tt(e,t){var r=wy(e.nodes(),function(i){return!t.node(i).parent}),n=dO(e,r);n=n.slice(1),ot(n,function(i){var a=e.node(i).parent,o=t.edge(i,a),l=!1;o||(o=t.edge(a,i),l=!0),t.node(i).rank=t.node(a).rank+(l?o.minlen:-o.minlen)})}function Ftt(e,t,r){return e.hasEdge(t,r)}function Upe(e,t,r){return r.low<=t.lim&&t.lim<=r.lim}var Qpe=F(()=>{"use strict";_n();Hpe();Pc();iO();U4();Ud.initLowLimValues=pO;Ud.initCutValues=fO;Ud.calcCutValue=Ype;Ud.leaveEdge=Xpe;Ud.enterEdge=Kpe;Ud.exchangeEdges=Zpe;s(Ud,"networkSimplex");s(fO,"initCutValues");s(Btt,"assignCutValue");s(Ype,"calcCutValue");s(pO,"initLowLimValues");s(jpe,"dfsAssignLowLim");s(Xpe,"leaveEdge");s(Kpe,"enterEdge");s(Zpe,"exchangeEdges");s($tt,"updateRanks");s(Ftt,"isTreeEdge");s(Upe,"isDescendant")});function mO(e){switch(e.graph().ranker){case"network-simplex":Jpe(e);break;case"tight-tree":ztt(e);break;case"longest-path":Gtt(e);break;default:Jpe(e)}}function ztt(e){R2(e),Y4(e)}function Jpe(e){Ud(e)}var Gtt,gO=F(()=>{"use strict";iO();Qpe();U4();s(mO,"rank");Gtt=R2;s(ztt,"tightTreeRanker");s(Jpe,"networkSimplexRanker")});function eme(e){var t=Nc(e,"root",{},"_root"),r=Vtt(e),n=Us(ko(r))-1,i=2*n+1;e.graph().nestingRoot=t,ot(e.edges(),function(o){e.edge(o).minlen*=i});var a=Wtt(e)+1;ot(e.children(),function(o){tme(e,t,i,a,n,r,o)}),e.graph().nodeRankFactor=i}function tme(e,t,r,n,i,a,o){var l=e.children(o);if(!l.length){o!==t&&e.setEdge(t,o,{weight:0,minlen:r});return}var u=JP(e,"_bt"),h=JP(e,"_bb"),d=e.node(o);e.setParent(u,o),d.borderTop=u,e.setParent(h,o),d.borderBottom=h,ot(l,function(f){tme(e,t,r,n,i,a,f);var p=e.node(f),m=p.borderTop?p.borderTop:f,g=p.borderBottom?p.borderBottom:f,y=p.borderTop?n:2*n,v=m!==g?1:i-a[o]+1;e.setEdge(u,m,{weight:y,minlen:v,nestingEdge:!0}),e.setEdge(g,h,{weight:y,minlen:v,nestingEdge:!0})}),e.parent(o)||e.setEdge(t,u,{weight:0,minlen:i+a[o]})}function Vtt(e){var t={};function r(n,i){var a=e.children(n);a&&a.length&&ot(a,function(o){r(o,i+1)}),t[n]=i}return s(r,"dfs"),ot(e.children(),function(n){r(n,1)}),t}function Wtt(e){return Ic(e.edges(),function(t,r){return t+e.edge(r).weight},0)}function rme(e){var t=e.graph();e.removeNode(t.nestingRoot),delete t.nestingRoot,ot(e.edges(),function(r){var n=e.edge(r);n.nestingEdge&&e.removeEdge(r)})}var nme=F(()=>{"use strict";_n();Pc();s(eme,"run");s(tme,"dfs");s(Vtt,"treeDepths");s(Wtt,"sumWeights");s(rme,"cleanup")});function ime(e,t,r){var n={},i;ot(r,function(a){for(var o=e.parent(a),l,u;o;){if(l=e.parent(o),l?(u=n[l],n[l]=o):(u=i,i=o),u&&u!==o){t.setEdge(u,o);return}o=l}})}var ame=F(()=>{"use strict";_n();s(ime,"addSubgraphConstraints")});function sme(e,t,r){var n=Htt(e),i=new un({compound:!0}).setGraph({root:n}).setDefaultNodeLabel(function(a){return e.node(a)});return ot(e.nodes(),function(a){var o=e.node(a),l=e.parent(a);(o.rank===t||o.minRank<=t&&t<=o.maxRank)&&(i.setNode(a),i.setParent(a,l||n),ot(e[r](a),function(u){var h=u.v===a?u.w:u.v,d=i.edge(h,a),f=Ci(d)?0:d.weight;i.setEdge(h,a,{weight:e.edge(u).weight+f})}),Object.prototype.hasOwnProperty.call(o,"minRank")&&i.setNode(a,{borderLeft:o.borderLeft[t],borderRight:o.borderRight[t]}))}),i}function Htt(e){for(var t;e.hasNode(t=nm("_root")););return t}var ome=F(()=>{"use strict";_n();wo();s(sme,"buildLayerGraph");s(Htt,"createRootNode")});function lme(e,t){for(var r=0,n=1;n0;)d%2&&(f+=l[d+1]),d=d-1>>1,l[d]+=h.weight;u+=h.weight*f})),u}var cme=F(()=>{"use strict";_n();s(lme,"crossCount");s(Utt,"twoLayerCrossCount")});function ume(e){var t={},r=gs(e.nodes(),function(l){return!e.children(l).length}),n=Us(Rn(r,function(l){return e.node(l).rank})),i=Rn(Zo(n+1),function(){return[]});function a(l){if(!S2(t,l)){t[l]=!0;var u=e.node(l);i[u.rank].push(l),ot(e.successors(l),a)}}s(a,"dfs");var o=Mc(r,function(l){return e.node(l).rank});return ot(o,a),i}var hme=F(()=>{"use strict";_n();s(ume,"initOrder")});function dme(e,t){return Rn(t,function(r){var n=e.inEdges(r);if(n.length){var i=Ic(n,function(a,o){var l=e.edge(o),u=e.node(o.v);return{sum:a.sum+l.weight*u.order,weight:a.weight+l.weight}},{sum:0,weight:0});return{v:r,barycenter:i.sum/i.weight,weight:i.weight}}else return{v:r}})}var fme=F(()=>{"use strict";_n();s(dme,"barycenter")});function pme(e,t){var r={};ot(e,function(i,a){var o=r[i.v]={indegree:0,in:[],out:[],vs:[i.v],i:a};Ci(i.barycenter)||(o.barycenter=i.barycenter,o.weight=i.weight)}),ot(t.edges(),function(i){var a=r[i.v],o=r[i.w];!Ci(a)&&!Ci(o)&&(o.indegree++,a.out.push(r[i.w]))});var n=gs(r,function(i){return!i.indegree});return Ytt(n)}function Ytt(e){var t=[];function r(a){return function(o){o.merged||(Ci(o.barycenter)||Ci(a.barycenter)||o.barycenter>=a.barycenter)&&jtt(a,o)}}s(r,"handleIn");function n(a){return function(o){o.in.push(a),--o.indegree===0&&e.push(o)}}for(s(n,"handleOut");e.length;){var i=e.pop();t.push(i),ot(i.in.reverse(),r(i)),ot(i.out,n(i))}return Rn(gs(t,function(a){return!a.merged}),function(a){return rm(a,["vs","i","barycenter","weight"])})}function jtt(e,t){var r=0,n=0;e.weight&&(r+=e.barycenter*e.weight,n+=e.weight),t.weight&&(r+=t.barycenter*t.weight,n+=t.weight),e.vs=t.vs.concat(e.vs),e.barycenter=r/n,e.weight=n,e.i=Math.min(t.i,e.i),t.merged=!0}var mme=F(()=>{"use strict";_n();s(pme,"resolveConflicts");s(Ytt,"doResolveConflicts");s(jtt,"mergeEntries")});function yme(e,t){var r=Cpe(e,function(d){return Object.prototype.hasOwnProperty.call(d,"barycenter")}),n=r.lhs,i=Mc(r.rhs,function(d){return-d.i}),a=[],o=0,l=0,u=0;n.sort(Xtt(!!t)),u=gme(a,i,u),ot(n,function(d){u+=d.vs.length,a.push(d.vs),o+=d.barycenter*d.weight,l+=d.weight,u=gme(a,i,u)});var h={vs:Ko(a)};return l&&(h.barycenter=o/l,h.weight=l),h}function gme(e,t,r){for(var n;t.length&&(n=Wd(t)).i<=r;)t.pop(),e.push(n.vs),r++;return r}function Xtt(e){return function(t,r){return t.barycenterr.barycenter?1:e?r.i-t.i:t.i-r.i}}var vme=F(()=>{"use strict";_n();Pc();s(yme,"sort");s(gme,"consumeUnsortable");s(Xtt,"compareWithBias")});function yO(e,t,r,n){var i=e.children(t),a=e.node(t),o=a?a.borderLeft:void 0,l=a?a.borderRight:void 0,u={};o&&(i=gs(i,function(g){return g!==o&&g!==l}));var h=dme(e,i);ot(h,function(g){if(e.children(g.v).length){var y=yO(e,g.v,r,n);u[g.v]=y,Object.prototype.hasOwnProperty.call(y,"barycenter")&&Ztt(g,y)}});var d=pme(h,r);Ktt(d,u);var f=yme(d,n);if(o&&(f.vs=Ko([o,f.vs,l]),e.predecessors(o).length)){var p=e.node(e.predecessors(o)[0]),m=e.node(e.predecessors(l)[0]);Object.prototype.hasOwnProperty.call(f,"barycenter")||(f.barycenter=0,f.weight=0),f.barycenter=(f.barycenter*f.weight+p.order+m.order)/(f.weight+2),f.weight+=2}return f}function Ktt(e,t){ot(e,function(r){r.vs=Ko(r.vs.map(function(n){return t[n]?t[n].vs:n}))})}function Ztt(e,t){Ci(e.barycenter)?(e.barycenter=t.barycenter,e.weight=t.weight):(e.barycenter=(e.barycenter*e.weight+t.barycenter*t.weight)/(e.weight+t.weight),e.weight+=t.weight)}var xme=F(()=>{"use strict";_n();fme();mme();vme();s(yO,"sortSubgraph");s(Ktt,"expandSubgraphs");s(Ztt,"mergeBarycenters")});function Cme(e){var t=eO(e),r=bme(e,Zo(1,t+1),"inEdges"),n=bme(e,Zo(t-1,-1,-1),"outEdges"),i=ume(e);Tme(e,i);for(var a=Number.POSITIVE_INFINITY,o,l=0,u=0;u<4;++l,++u){Qtt(l%2?r:n,l%4>=2),i=qd(e);var h=lme(e,i);h{"use strict";_n();wo();Pc();ame();ome();cme();hme();xme();s(Cme,"order");s(bme,"buildLayerGraphs");s(Qtt,"sweepLayerGraphs");s(Tme,"assignOrder")});function wme(e){var t=ert(e);ot(e.graph().dummyChains,function(r){for(var n=e.node(r),i=n.edgeObj,a=Jtt(e,t,i.v,i.w),o=a.path,l=a.lca,u=0,h=o[u],d=!0;r!==i.w;){if(n=e.node(r),d){for(;(h=o[u])!==l&&e.node(h).maxRanko||l>t[u].lim));for(h=u,u=n;(u=e.parent(u))!==h;)a.push(u);return{path:i.concat(a.reverse()),lca:h}}function ert(e){var t={},r=0;function n(i){var a=r;ot(e.children(i),n),t[i]={low:a,lim:r++}}return s(n,"dfs"),ot(e.children(),n),t}var Sme=F(()=>{"use strict";_n();s(wme,"parentDummyChains");s(Jtt,"findPath");s(ert,"postorder")});function trt(e,t){var r={};function n(i,a){var o=0,l=0,u=i.length,h=Wd(a);return ot(a,function(d,f){var p=nrt(e,d),m=p?e.node(p).order:u;(p||d===h)&&(ot(a.slice(l,f+1),function(g){ot(e.predecessors(g),function(y){var v=e.node(y),x=v.order;(xh)&&Eme(r,p,d)})})}s(n,"scan");function i(a,o){var l=-1,u,h=0;return ot(o,function(d,f){if(e.node(d).dummy==="border"){var p=e.predecessors(d);p.length&&(u=e.node(p[0]).order,n(o,h,f,l,u),h=f,l=u)}n(o,h,o.length,u,a.length)}),o}return s(i,"visitLayer"),Ic(t,i),r}function nrt(e,t){if(e.node(t).dummy)return wy(e.predecessors(t),function(r){return e.node(r).dummy})}function Eme(e,t,r){if(t>r){var n=t;t=r,r=n}Object.prototype.hasOwnProperty.call(e,t)||Object.defineProperty(e,t,{enumerable:!0,configurable:!0,value:{},writable:!0});var i=e[t];Object.defineProperty(i,r,{enumerable:!0,configurable:!0,value:!0,writable:!0})}function irt(e,t,r){if(t>r){var n=t;t=r,r=n}return!!e[t]&&Object.prototype.hasOwnProperty.call(e[t],r)}function art(e,t,r,n){var i={},a={},o={};return ot(t,function(l){ot(l,function(u,h){i[u]=u,a[u]=u,o[u]=h})}),ot(t,function(l){var u=-1;ot(l,function(h){var d=n(h);if(d.length){d=Mc(d,function(y){return o[y]});for(var f=(d.length-1)/2,p=Math.floor(f),m=Math.ceil(f);p<=m;++p){var g=d[p];a[h]===h&&u{"use strict";_n();wo();Pc();s(trt,"findType1Conflicts");s(rrt,"findType2Conflicts");s(nrt,"findOtherInnerSegmentNode");s(Eme,"addConflict");s(irt,"hasConflict");s(art,"verticalAlignment");s(srt,"horizontalCompaction");s(ort,"buildBlockGraph");s(lrt,"findSmallestWidthAlignment");s(crt,"alignCoordinates");s(urt,"balance");s(Ame,"positionX");s(hrt,"sep");s(drt,"width")});function _me(e){e=H4(e),frt(e),zP(Ame(e),function(t,r){e.node(r).x=t})}function frt(e){var t=qd(e),r=e.graph().ranksep,n=0;ot(t,function(i){var a=Us(Rn(i,function(o){return e.node(o).height}));ot(i,function(o){e.node(o).y=n+a/2}),n+=a+r})}var Lme=F(()=>{"use strict";_n();Pc();Rme();s(_me,"position");s(frt,"positionY")});function L2(e,t){var r=t&&t.debugTiming?kpe:wpe;r("layout",()=>{var n=r(" buildLayoutGraph",()=>wrt(e));r(" runLayout",()=>prt(n,r)),r(" updateInputGraph",()=>mrt(e,n))})}function prt(e,t){t(" makeSpaceForEdgeLabels",()=>Srt(e)),t(" removeSelfEdges",()=>Nrt(e)),t(" acyclic",()=>gpe(e)),t(" nestingGraph.run",()=>eme(e)),t(" rank",()=>mO(H4(e))),t(" injectEdgeLabelProxies",()=>Ert(e)),t(" removeEmptyRanks",()=>Tpe(e)),t(" nestingGraph.cleanup",()=>rme(e)),t(" normalizeRanks",()=>bpe(e)),t(" assignRankMinMax",()=>Art(e)),t(" removeEdgeLabelProxies",()=>Rrt(e)),t(" normalize.run",()=>Mpe(e)),t(" parentDummyChains",()=>wme(e)),t(" addBorderSegments",()=>Epe(e)),t(" order",()=>Cme(e)),t(" insertSelfEdges",()=>Prt(e)),t(" adjustCoordinateSystem",()=>_pe(e)),t(" position",()=>_me(e)),t(" positionSelfEdges",()=>Ort(e)),t(" removeBorderNodes",()=>Mrt(e)),t(" normalize.undo",()=>Npe(e)),t(" fixupEdgeLabelCoords",()=>Drt(e)),t(" undoCoordinateSystem",()=>Lpe(e)),t(" translateGraph",()=>_rt(e)),t(" assignNodeIntersects",()=>Lrt(e)),t(" reversePoints",()=>Irt(e)),t(" acyclic.undo",()=>ype(e))}function mrt(e,t){ot(e.nodes(),function(r){var n=e.node(r),i=t.node(r);n&&(n.x=i.x,n.y=i.y,t.children(r).length&&(n.width=i.width,n.height=i.height))}),ot(e.edges(),function(r){var n=e.edge(r),i=t.edge(r);n.points=i.points,Object.prototype.hasOwnProperty.call(i,"x")&&(n.x=i.x,n.y=i.y)}),e.graph().width=t.graph().width,e.graph().height=t.graph().height}function wrt(e){var t=new un({multigraph:!0,compound:!0}),r=xO(e.graph());return t.setGraph(Ey({},yrt,vO(r,grt),rm(r,vrt))),ot(e.nodes(),function(n){var i=xO(e.node(n));t.setNode(n,NP(vO(i,xrt),brt)),t.setParent(n,e.parent(n))}),ot(e.edges(),function(n){var i=xO(e.edge(n));t.setEdge(n,Ey({},Crt,vO(i,Trt),rm(i,krt)))}),t}function Srt(e){var t=e.graph();t.ranksep/=2,ot(e.edges(),function(r){var n=e.edge(r);n.minlen*=2,n.labelpos.toLowerCase()!=="c"&&(t.rankdir==="TB"||t.rankdir==="BT"?n.width+=n.labeloffset:n.height+=n.labeloffset)})}function Ert(e){ot(e.edges(),function(t){var r=e.edge(t);if(r.width&&r.height){var n=e.node(t.v),i=e.node(t.w),a={rank:(i.rank-n.rank)/2+n.rank,e:t};Nc(e,"edge-proxy",a,"_ep")}})}function Art(e){var t=0;ot(e.nodes(),function(r){var n=e.node(r);n.borderTop&&(n.minRank=e.node(n.borderTop).rank,n.maxRank=e.node(n.borderBottom).rank,t=Us(t,n.maxRank))}),e.graph().maxRank=t}function Rrt(e){ot(e.nodes(),function(t){var r=e.node(t);r.dummy==="edge-proxy"&&(e.edge(r.e).labelRank=r.rank,e.removeNode(t))})}function _rt(e){var t=Number.POSITIVE_INFINITY,r=0,n=Number.POSITIVE_INFINITY,i=0,a=e.graph(),o=a.marginx||0,l=a.marginy||0;function u(h){var d=h.x,f=h.y,p=h.width,m=h.height;t=Math.min(t,d-p/2),r=Math.max(r,d+p/2),n=Math.min(n,f-m/2),i=Math.max(i,f+m/2)}s(u,"getExtremes"),ot(e.nodes(),function(h){u(e.node(h))}),ot(e.edges(),function(h){var d=e.edge(h);Object.prototype.hasOwnProperty.call(d,"x")&&u(d)}),t-=o,n-=l,ot(e.nodes(),function(h){var d=e.node(h);d.x-=t,d.y-=n}),ot(e.edges(),function(h){var d=e.edge(h);ot(d.points,function(f){f.x-=t,f.y-=n}),Object.prototype.hasOwnProperty.call(d,"x")&&(d.x-=t),Object.prototype.hasOwnProperty.call(d,"y")&&(d.y-=n)}),a.width=r-t+o,a.height=i-n+l}function Lrt(e){ot(e.edges(),function(t){var r=e.edge(t),n=e.node(t.v),i=e.node(t.w),a,o;r.points?(a=r.points[0],o=r.points[r.points.length-1]):(r.points=[],a=i,o=n),r.points.unshift(QP(n,a)),r.points.push(QP(i,o))})}function Drt(e){ot(e.edges(),function(t){var r=e.edge(t);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 Irt(e){ot(e.edges(),function(t){var r=e.edge(t);r.reversed&&r.points.reverse()})}function Mrt(e){ot(e.nodes(),function(t){if(e.children(t).length){var r=e.node(t),n=e.node(r.borderTop),i=e.node(r.borderBottom),a=e.node(Wd(r.borderLeft)),o=e.node(Wd(r.borderRight));r.width=Math.abs(o.x-a.x),r.height=Math.abs(i.y-n.y),r.x=a.x+r.width/2,r.y=n.y+r.height/2}}),ot(e.nodes(),function(t){e.node(t).dummy==="border"&&e.removeNode(t)})}function Nrt(e){ot(e.edges(),function(t){if(t.v===t.w){var r=e.node(t.v);r.selfEdges||(r.selfEdges=[]),r.selfEdges.push({e:t,label:e.edge(t)}),e.removeEdge(t)}})}function Prt(e){var t=qd(e);ot(t,function(r){var n=0;ot(r,function(i,a){var o=e.node(i);o.order=a+n,ot(o.selfEdges,function(l){Nc(e,"selfedge",{width:l.label.width,height:l.label.height,rank:o.rank,order:a+ ++n,e:l.e,label:l.label},"_se")}),delete o.selfEdges})})}function Ort(e){ot(e.nodes(),function(t){var r=e.node(t);if(r.dummy==="selfedge"){var n=e.node(r.e.v),i=n.x+n.width/2,a=n.y,o=r.x-i,l=n.height/2;e.setEdge(r.e,r.label),e.removeNode(t),r.label.points=[{x:i+2*o/3,y:a-l},{x:i+5*o/6,y:a-l},{x:i+o,y:a},{x:i+5*o/6,y:a+l},{x:i+2*o/3,y:a+l}],r.label.x=r.x,r.label.y=r.y}})}function vO(e,t){return em(rm(e,t),Number)}function xO(e){var t={};return ot(e,function(r,n){t[n.toLowerCase()]=r}),t}var grt,yrt,vrt,xrt,brt,Trt,Crt,krt,Dme=F(()=>{"use strict";_n();wo();Ape();Ipe();ZP();nO();gO();nme();kme();Sme();Lme();Pc();s(L2,"layout");s(prt,"runLayout");s(mrt,"updateInputGraph");grt=["nodesep","edgesep","ranksep","marginx","marginy"],yrt={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},vrt=["acyclicer","ranker","rankdir","align"],xrt=["width","height"],brt={width:0,height:0},Trt=["minlen","weight","width","height","labeloffset"],Crt={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},krt=["labelpos"];s(wrt,"buildLayoutGraph");s(Srt,"makeSpaceForEdgeLabels");s(Ert,"injectEdgeLabelProxies");s(Art,"assignRankMinMax");s(Rrt,"removeEdgeLabelProxies");s(_rt,"translateGraph");s(Lrt,"assignNodeIntersects");s(Drt,"fixupEdgeLabelCoords");s(Irt,"reversePointsForReversedEdges");s(Mrt,"removeBorderNodes");s(Nrt,"removeSelfEdges");s(Prt,"insertSelfEdges");s(Ort,"positionSelfEdges");s(vO,"selectNumberAttrs");s(xO,"canonicalize")});var bO=F(()=>{"use strict";ZP();Dme();nO();gO()});var Ime=F(()=>{"use strict"});var Nme={};ar(Nme,{captureNodeSizes:()=>zrt,shouldCaptureSizes:()=>$rt});function Mme(){if(!(typeof globalThis>"u"))return globalThis}function $rt(){return!!Mme()?.mermaidCaptureSizes}function Frt(){return typeof location>"u"?"browser-dev":`${location.pathname}${location.search}`}function Grt(e,t){let r=Mme();if(!r)return;let n=t.node(),a=((n&&"ownerSVGElement"in n?n.ownerSVGElement:null)??n)?.id??"(unknown)";r.mermaidCapturedSizes??=[];let o={svgId:a,sizes:e};r.mermaidCapturedSizes.push(o),r.mermaidLastCapturedSizes=o}function zrt(e,t){let r=[];for(let n of t.nodes)n.isGroup||r.push({id:n.id,width:n.width??0,height:n.height??0});r.length!==0&&Grt({metadata:{captureVersion:1,capturedAt:new Date().toISOString(),capturedFrom:Frt()},nodes:r},e)}var Pme=F(()=>{"use strict";Ime();s(Mme,"getCaptureGlobal");s($rt,"shouldCaptureSizes");s(Frt,"capturedFromLocation");s(Grt,"emitCapturedSizes");s(zrt,"captureNodeSizes")});function TO(e,{edgePathsClass:t="edges edgePath"}={}){let r=e.insert("g").attr("class","root"),n=r.insert("g").attr("class","clusters"),i=r.insert("g").attr("class",t),a=r.insert("g").attr("class","edgeLabels"),o=r.insert("g").attr("class","nodes");return{clusters:n,edgePaths:i,edgeLabels:a,nodes:o,rootGroups:r}}async function Vrt(e,t){if(t.label){let{shapeSvg:r,bbox:n}=await wt(e,t);t.labelBBox={width:n.width,height:n.height},r.remove()}else t.labelBBox={width:0,height:0}}async function CO(e,t,r){let n=await Hu(e,t,r),i=n.node()?.getBBox()??{width:0,height:0};return t.width=i.width,t.height=i.height,n}async function Ome(e,t){let r=new un({multigraph:!0,compound:!0}),n=[...t.edges],i=Le(),a=TO(e),{edgeLabels:o,nodes:l}=a,u=new Map,h=e.node()!=null;await Promise.all(t.nodes.map(async d=>{if(d.isGroup)h&&await Vrt(l,d),r.setNode(d.id,{...d});else{if(h){let f=await CO(l,d,{config:i,dir:d.dir});u.set(d.id,f)}r.setNode(d.id,{...d})}}));for(let d of n)h&&zE(d)&&await Il(o,d),r.setEdge(d.start,d.end,{...d},d.id),t.edges.some(p=>p.id===d.id)||t.edges.push(d);if(globalThis.mermaidCaptureSizes){let{captureNodeSizes:d}=await Promise.resolve().then(()=>(Pme(),Nme));d(e,t)}return{graph:r,groups:a,nodeElements:u}}var kO=F(()=>{"use strict";wo();Zt();J0();Yp();Ht();s(TO,"createLayoutElementGroups");s(Vrt,"measureGroupLabel");s(CO,"insertMeasuredNode");s(Ome,"createGraphWithElements")});var Nr,Yd,$me,Fme,sm,Wrt,wO,Gme,qrt,om,Bme,zme,Vme,Wme,X4,qme,Hrt,SO=F(()=>{"use strict";Tt();wo();Nr=new Map,Yd=new Map,$me=new Map,Fme=s(()=>{Yd.clear(),$me.clear(),Nr.clear()},"clear"),sm=s((e,t)=>{let r=Yd.get(t)||[];return te.trace("In isDescendant",t," ",e," = ",r.includes(e)),r.includes(e)},"isDescendant"),Wrt=s((e,t)=>{let r=Yd.get(t)||[];return te.info("Descendants of ",t," is ",r),te.info("Edge is ",e),e.v===t||e.w===t?!1:r?r.includes(e.v)||sm(e.v,t)||sm(e.w,t)||r.includes(e.w):(te.debug("Tilt, ",t,",not in descendants"),!1)},"edgeInCluster"),wO=s((e,t,r,n)=>{te.debug("Copying children of ",e,"root",n,"data",t.node(e),n);let i=t.children(e)||[];e!==n&&i.push(e),te.debug("Copying (nodes) clusterId",e,"nodes",i),i.forEach(a=>{if(t.children(a).length>0)wO(a,t,r,n);else{let o=t.node(a);te.info("cp ",a," to ",n," with parent ",e),r.setNode(a,o),n!==t.parent(a)&&(te.debug("Setting parent",a,t.parent(a)),r.setParent(a,t.parent(a))),e!==n&&a!==e?(te.debug("Setting parent",a,e),r.setParent(a,e)):(te.info("In copy ",e,"root",n,"data",t.node(e),n),te.debug("Not Setting parent for node=",a,"cluster!==rootId",e!==n,"node!==clusterId",a!==e));let l=t.edges(a);te.debug("Copying Edges",l),l.forEach(u=>{te.info("Edge",u);let h=t.edge(u.v,u.w,u.name);te.info("Edge data",h,n);try{if(Wrt(u,n)){let d=Yd.get(n)||[],f=d.includes(u.v)||sm(u.v,n)||u.v===n,p=d.includes(u.w)||sm(u.w,n)||u.w===n;if(f&&p)te.info("Copying as ",u.v,u.w,h,u.name),r.setEdge(u.v,u.w,h,u.name),te.info("newGraph edges ",r.edges(),r.edge(r.edges()[0]));else{let m=f?n:u.v,g=p?n:u.w;te.info("Rebinding cross-boundary edge as ",m,g,h,u.name),t.setEdge(m,g,h,u.name)}}else te.info("Skipping copy of edge ",u.v,"-->",u.w," rootId: ",n," clusterId:",e)}catch(d){te.error(d)}})}te.debug("Removing node",a),t.removeNode(a)})},"copy"),Gme=s((e,t)=>{let r=t.children(e),n=[...r];for(let i of r)$me.set(i,e),n=[...n,...Gme(i,t)];return n},"extractDescendants"),qrt=s((e,t,r)=>{let n=e.edges().filter(u=>u.v===t||u.w===t),i=e.edges().filter(u=>u.v===r||u.w===r),a=n.map(u=>({v:u.v===t?r:u.v,w:u.w===t?t:u.w})),o=i.map(u=>({v:u.v,w:u.w}));return a.filter(u=>o.some(h=>u.v===h.v&&u.w===h.w))},"findCommonEdges"),om=s((e,t,r)=>{let n=t.children(e);if(te.trace("Searching children of id ",e,n),n.length<1)return e;let i;for(let a of n){let o=om(a,t,r),l=qrt(t,r,o);if(o)if(l.length>0)i=o;else return o}return i},"findNonClusterChild"),Bme=s(e=>!Nr.has(e)||!Nr.get(e).externalConnections?e:Nr.has(e)?Nr.get(e).id:e,"getAnchorId"),zme=s((e,t)=>{if(!e||t>10){te.debug("Opting out, no graph ");return}else te.debug("Opting in, graph ");e.nodes().forEach(function(r){e.children(r).length>0&&(te.debug("Cluster identified",r," Replacement id in edges: ",om(r,e,r)),Yd.set(r,Gme(r,e)),Nr.set(r,{id:om(r,e,r),clusterData:e.node(r)}))}),e.nodes().forEach(function(r){let n=e.children(r),i=e.edges();n.length>0?(te.debug("Cluster identified",r,Yd),i.forEach(a=>{let o=sm(a.v,r),l=sm(a.w,r);o^l&&(te.debug("Edge: ",a," leaves cluster ",r),te.debug("Descendants of XXX ",r,": ",Yd.get(r)),Nr.get(r).externalConnections=!0)})):te.debug("Not a cluster ",r,Yd)});for(let r of Nr.keys()){let n=Nr.get(r).id,i=e.parent(n);i!==r&&Nr.has(i)&&!Nr.get(i).externalConnections&&(Nr.get(r).id=i);let a=e.edges().some(o=>o.v===r);if(n&&Nr.get(r)?.externalConnections&&a&&qme(e,n,r)){let o=Hrt(e,r,e.parent(n));o&&(Nr.get(r).id=o)}}e.edges().forEach(function(r){let n=e.edge(r);te.debug("Edge "+r.v+" -> "+r.w+": "+JSON.stringify(r)),te.debug("Edge "+r.v+" -> "+r.w+": "+JSON.stringify(e.edge(r)));let i=r.v,a=r.w;if(te.debug("Fix XXX",Nr,"ids:",r.v,r.w,"Translating: ",Nr.get(r.v)," --- ",Nr.get(r.w)),Nr.get(r.v)||Nr.get(r.w)){if(te.debug("Fixing and trying - removing XXX",r.v,r.w,r.name),i=Bme(r.v),a=Bme(r.w),e.removeEdge(r.v,r.w,r.name),i!==r.v){let o=e.parent(i);Nr.get(o).externalConnections=!0,n.fromCluster=r.v}if(a!==r.w){let o=e.parent(a);Nr.get(o).externalConnections=!0,n.toCluster=r.w}te.debug("Fix Replacing with XXX",i,a,r.name),e.setEdge(i,a,n,r.name)}}),Vme(e,0),te.trace(Nr)},"adjustClustersAndEdges"),Vme=s((e,t)=>{if(t>10){te.error("Bailing out");return}let r=e.nodes(),n=!1;for(let i of r){let a=e.children(i);n=n||a.length>0}if(!n){te.debug("Done, no node has children",e.nodes());return}te.debug("Nodes = ",r,t);for(let i of r)if(te.debug("Extracting node",i,Nr,Nr.has(i)&&!Nr.get(i).externalConnections,!e.parent(i),e.node(i),e.children("D")," Depth ",t),!Nr.has(i))te.debug("Not a cluster",i,t);else if(Nr.get(i)?.clusterData?.explicitDir&&e.children(i)&&e.children(i).length>0){te.debug("Cluster with explicit dir, creating subgraph for children",i,t);let a=Nr.get(i).clusterData.dir,o=new un({multigraph:!0,compound:!0}).setGraph({rankdir:a,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});wO(i,e,o,i);let l=e.node(i)||{};e.setNode(i,{...l,clusterNode:!0,id:i,clusterData:Nr.get(i).clusterData,label:Nr.get(i).label,graph:o})}else if(!Nr.get(i).externalConnections&&e.children(i)&&e.children(i).length>0){te.debug("Cluster without external connections, without a parent and with children",i,t);let o=e.graph().rankdir==="TB"?"LR":"TB";Nr.get(i)?.clusterData?.dir&&(o=Nr.get(i).clusterData.dir,te.debug("Fixing dir",Nr.get(i).clusterData.dir,o));let l=new un({multigraph:!0,compound:!0}).setGraph({rankdir:o,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});wO(i,e,l,i);let u=e.node(i)||{};e.setNode(i,{...u,clusterNode:!0,id:i,clusterData:Nr.get(i).clusterData,label:Nr.get(i).label,graph:l})}else te.debug("Cluster ** ",i," **not meeting the criteria !externalConnections:",!Nr.get(i).externalConnections," no parent: ",!e.parent(i)," children ",e.children(i)&&e.children(i).length>0,e.children("D"),t),te.debug(Nr);r=e.nodes(),te.debug("New list of nodes",r);for(let i of r){let a=e.node(i);te.debug(" Now next level",i,a),a?.clusterNode&&Vme(a.graph,t+1)}},"extractor"),Wme=s((e,t)=>{if(t.length===0)return[];let r=Object.assign([],t);return t.forEach(n=>{let i=e.children(n),a=Wme(e,i);r=[...r,...a]}),r},"sorter"),X4=s(e=>Wme(e,e.children()),"sortNodesByHierarchy"),qme=s((e,t,r)=>{let n=e.parent(t);for(;n&&n!==r;){let i=Nr.get(n);if(i&&!i.externalConnections)return!0;n=e.parent(n)}return!1},"isNodeInExtractableCluster"),Hrt=s((e,t,r)=>{let n=e.children(t)??[];for(let i of n){if(i===r||sm(i,r))continue;let a=om(i,e,t);if(a&&!qme(e,a,t))return a}return null},"findSafeAnchorNode")});function Ay({prepareLayout:e,measureLayout:t,runLayoutCore:r,paintLayout:n,afterPaint:i,paintOptions:a}){let o=t??AO;return s(async function(u,h,d,f){let p=h.select("g");ey(p,u.markers,u.type,u.diagramId),EO();let m={element:p,helpers:d,options:f};m.preparedLayout=await e?.(u,m);let g=await o(u,m),y=await r(u,m),v={...m,measure:g};n?await n(u,v,y):await RO(u,v,a),await i?.(u,v,y)},"render")}function EO(){xle(),yle(),lle(),Fme()}async function AO(e,{element:t}){return await Ome(t,e)}async function RO(e,t,r={}){let{measure:n}=t,{groups:i}=n;for(let o of r.getNodes?.(e,t)??e.nodes)r.skipNode?.(o,t)||await Urt(i,o,t,r);let a=jrt(e.nodes);for(let o of e.edges)Xrt(o,r)||await Krt(i,o,a,e,r,t)}async function Urt(e,t,r,n){t.clusterNode?Sc(t):Yrt(t,r,n)?await Cd(e.clusters,t):Sc(t)}function Yrt(e,t,r){return e.isGroup===!0&&(r.isCluster?.(e,t)??!0)}function jrt(e){let t=new Map;for(let r of e)r?.id&&t.set(r.id,r);return t}function Xrt(e,t){return e.isLayoutOnly||!!t.skipEdge?.(e)}async function Krt(e,t,r,n,i,a){let o=kd(e.edgePaths,{...t},i.clusterDb??new Map,n.type,Hme(t.start,t,r,a,i),Hme(t.end,t,r,a,i),n.diagramId,Zrt(t,i));zE(t)&&(Up.has(t.id)||await Il(e.edgeLabels,t),Qrt(t,o))}function Hme(e,t,r,n,i){return i.getEdgeNode?.(e,t,n)??(e?r.get(e)??{}:{})}function Zrt(e,t){return typeof t.skipIntersect=="function"?t.skipIntersect(e):t.skipIntersect??!1}function Qrt(e,t){let r=t?.updatedPath??t?.originalPath,n=Lt(),{subGraphTitleTotalMargin:i}=qu({flowchart:n.flowchart??{}});if(e.label){let a=Up.get(e.id),o=e.x,l=e.y;if(r){let u=sr.calcLabelPosition(r);te.debug("Moving label "+e.label+" from (",o,",",l,") to (",u.x,",",u.y,") abc88"),t?.updatedPath&&(o=u.x,l=u.y)}a.attr("transform",`translate(${o}, ${l+i/2})`)}if(e?.startLabelLeft){let a=xi.get(e.id).startLeft,o=e?.x,l=e?.y;if(r){let u=sr.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_left",r);o=u.x,l=u.y}a.attr("transform",`translate(${o}, ${l})`)}if(e.startLabelRight){let a=xi.get(e.id).startRight,o=e.x,l=e.y;if(r){let u=sr.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_right",r);o=u.x,l=u.y}a.attr("transform",`translate(${o}, ${l})`)}if(e.endLabelLeft){let a=xi.get(e.id).endLeft,o=e.x,l=e.y;if(r){let u=sr.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_left",r);o=u.x,l=u.y}a.attr("transform",`translate(${o}, ${l})`)}if(e.endLabelRight){let a=xi.get(e.id).endRight,o=e.x,l=e.y;if(r){let u=sr.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_right",r);o=u.x,l=u.y}a.attr("transform",`translate(${o}, ${l})`)}}var K4=F(()=>{"use strict";Tt();Y0();mr();Qt();Jb();kO();e2();J0();VE();Yp();SO();s(Ay,"createCommonLayoutRenderer");s(EO,"clearLayoutRenderState");s(AO,"defaultMeasureLayout");s(RO,"paintLayoutData");s(Urt,"paintLayoutNode");s(Yrt,"shouldPaintAsCluster");s(jrt,"buildNodeLookup");s(Xrt,"shouldSkipPaintEdge");s(Krt,"paintLayoutEdge");s(Hme,"getRenderedNode");s(Zrt,"shouldSkipIntersect");s(Qrt,"positionRenderedEdgeLabel")});var ege={};ar(ege,{applyDagreLayoutResult:()=>Zme,getEdgesToRender:()=>_O,measureDagreLayout:()=>Qme,prepareLayoutForDagre:()=>LO,render:()=>unt,runDagreLayoutCore:()=>Jme});var Ume,Yme,Jrt,ent,tnt,rnt,nnt,_O,Xme,Kme,int,jme,ant,Zme,snt,ont,LO,Qme,Jme,lnt,cnt,unt,tge=F(()=>{"use strict";bO();wo();kO();K4();Y0();Ht();SO();Yp();e2();J0();Tt();Jb();Zt();Ume=s((e,t,r)=>Math.max(t,Math.min(r,e)),"clamp"),Yme=s((e="TB")=>{switch(e){case"BT":return"bottom";case"LR":return"right";case"RL":return"left";case"TB":default:return"top"}},"getDefaultSelfLoopSide"),Jrt=s(e=>e==="flowchart"||e==="flowchart-v2"||e==="stateDiagram"||e==="er"||e==="classDiagram","shouldMergeSelfLoopSegments"),ent=["x","y","width","height","labelBBox","intersect","calcIntersect","diff","clusterNode"],tnt=s((e,t,r,n,i)=>{let a=[],o=new Set;if(r.forEach(({start:d,end:f})=>{d!==n&&o.add(d),f!==n&&o.add(f)}),o.forEach(d=>{let f=e.node(d);typeof f?.x=="number"&&typeof f?.y=="number"&&a.push(f)}),a.length===0&&r.forEach(({edge:d})=>{(d.points??[]).forEach(f=>{typeof f?.x=="number"&&typeof f?.y=="number"&&a.push(f)})}),a.length===0)return Yme(i);let l=a.reduce((d,f)=>({x:d.x+f.x/a.length,y:d.y+f.y/a.length}),{x:0,y:0}),u=l.x-t.x,h=l.y-t.y;return Math.abs(u)>Math.abs(h)?u>0?"right":"left":Math.abs(h)>0?h>0?"bottom":"top":Yme(i)},"getSelfLoopSide"),rnt=s((e,t="top",r=0,n=0)=>{let i=e.x,a=e.y-r,o=e.width/2,l=e.height/2,u=Math.max(36,Math.min(100,e.width*.8)),h=Ume(Math.max(n,e.width*.35),36,u),d=Ume(Math.min(e.width,e.height)*.45,24,48);switch(t){case"bottom":{let f=a+l;return[{x:i-h/2,y:f},{x:i-h/2,y:f+d},{x:i+h/2,y:f+d},{x:i+h/2,y:f}]}case"right":{let f=i+o;return[{x:f,y:a-h/2},{x:f+d,y:a-h/2},{x:f+d,y:a+h/2},{x:f,y:a+h/2}]}case"left":{let f=i-o;return[{x:f,y:a-h/2},{x:f-d,y:a-h/2},{x:f-d,y:a+h/2},{x:f,y:a+h/2}]}case"top":default:{let f=a-l;return[{x:i-h/2,y:f},{x:i-h/2,y:f-d},{x:i+h/2,y:f-d},{x:i+h/2,y:f}]}}},"getSelfLoopPoints"),nnt=s((e,t,r="top",n=0,i={})=>{let o=e.x,l=e.y-n,u=i.width??0,h=i.height??0;switch(r){case"bottom":return{x:o,y:Math.max(...t.map(d=>d.y))+h/2+4};case"right":return{x:Math.max(...t.map(d=>d.x))+u/2+4,y:l};case"left":return{x:Math.min(...t.map(d=>d.x))-u/2-4,y:l};case"top":default:return{x:o,y:Math.min(...t.map(d=>d.y))-h/2-4}}},"getSelfLoopLabelPosition"),_O=s((e,t=0,{mergeSelfLoops:r=!0}={})=>{let n=new Map,i=[],a=e.graph()?.rankdir;return e.edges().forEach(o=>{let l=e.edge(o);if(r&&l.selfLoop){let u=l.selfLoop.id;n.has(u)||n.set(u,[]),n.get(u).push({edge:l,start:o.v,end:o.w})}else i.push({edge:l,start:o.v,end:o.w})}),n.forEach(o=>{if(o.length!==3){o.forEach(x=>i.push(x));return}o.sort((x,b)=>x.edge.selfLoop.order-b.edge.selfLoop.order);let[l,u,h]=o,d=l.edge.originalEdge??u.edge.originalEdge??h.edge.originalEdge??u.edge,f=e.node(d.start);if(!f){o.forEach(x=>i.push(x));return}let p={width:u.edge.width,height:u.edge.height},m=tnt(e,f,o,d.start,a),g=rnt(f,m,t,p.width??0),y=nnt(f,g,m,t,p),v={...u.edge,...d,id:d.id,points:g,start:d.start,end:d.end,x:y.x,y:y.y,width:p.width,height:p.height,labelStyle:u.edge.labelStyle,fromCluster:l.edge.fromCluster??u.edge.fromCluster??h.edge.fromCluster,toCluster:l.edge.toCluster??u.edge.toCluster??h.edge.toCluster};delete v.selfLoop,delete v.originalEdge,i.push({edge:v,start:v.start,end:v.end})}),i},"getEdgesToRender"),Xme=s(async({element:e,graph:t,diagramType:r,id:n,parentCluster:i,siteConfig:a})=>{let o=t.graph().rankdir;te.trace("Dir in recursive render - dir:",o);let{clusters:l,edgePaths:u,edgeLabels:h,nodes:d,rootGroups:f}=TO(e,{edgePathsClass:"edgePaths"});t.nodes()?te.info("Recursive render XXX",t.nodes()):te.info("No nodes found for",t),t.edges().length>0&&te.info("Recursive edges",t.edge(t.edges()[0]));let p=Jrt(r);await Promise.all(t.nodes().map(async function(y){let v=t.node(y);if(i!==void 0){let x=JSON.parse(JSON.stringify(i.clusterData));te.trace(`Setting data for parent cluster XXX + Node.id = `,y,` + data=`,x.height,` +Parent cluster`,i.height),t.setNode(i.id,x),t.parent(y)||(te.trace("Setting parent",y,i.id),t.setParent(y,i.id,x))}if(te.info("(Insert) Node XXX"+y+": "+JSON.stringify(t.node(y))),v?.clusterNode){te.info("Cluster identified XBX",y,v.width,t.node(y));let{ranksep:x,nodesep:b}=t.graph();v.graph.setGraph({...v.graph.graph(),ranksep:x+25,nodesep:b});let T=await ont({element:d,graph:v.graph,diagramType:r,id:n,parentCluster:t.node(y),siteConfig:a}),w=T.elem;dt(v,w),v.diff=T.diff||0,te.info("New compound node after recursive render XAX",y,"width",v.width,"height",v.height),vle(w,v)}else t.children(y).length>0?(te.trace("Cluster - the non recursive path XBX",y,v.id,v,v.width,"Graph:",t),te.trace(om(v.id,t)),Nr.set(v.id,{id:om(v.id,t),node:v})):(te.trace("Node - the non recursive path XAX",y,d,t.node(y),o),await CO(d,t.node(y),{config:a,dir:o}))})),await s(async()=>{let y=t.edges().map(async function(v){let x=t.edge(v.v,v.w,v.name);if(te.info("Edge "+v.v+" -> "+v.w+": "+JSON.stringify(v)),te.info("Edge "+v.v+" -> "+v.w+": ",v," ",JSON.stringify(t.edge(v))),te.info("Fix",Nr,"ids:",v.v,v.w,"Translating: ",Nr.get(v.v),Nr.get(v.w)),p&&x.selfLoop){if(x.selfLoop.order!==1)return;let b={...x.originalEdge,...x,id:x.selfLoop.id,startLabelLeft:x.originalEdge?.startLabelLeft??x.startLabelLeft,startLabelRight:x.originalEdge?.startLabelRight??x.startLabelRight,endLabelLeft:x.originalEdge?.endLabelLeft??x.endLabelLeft,endLabelRight:x.originalEdge?.endLabelRight??x.endLabelRight};await Il(h,b),x.width=b.width,x.height=b.height,x.labelStyle=b.labelStyle;return}await Il(h,x)});await Promise.all(y)},"processEdges")();let{subGraphTitleTotalMargin:g}=qu(a);return{elem:f,graph:t,groups:{clusters:l,edgePaths:u,edgeLabels:h,nodes:d,rootGroups:f},diagramType:r,id:n,mergeSelfLoops:p,subGraphTitleTotalMargin:g}},"measureDagreGraph"),Kme=s(e=>{te.info("############################################# XXX"),te.info("### Layout ### XXX"),te.info("############################################# XXX"),L2(e)},"runDagreGraphLayout"),int=s((e,t,r)=>{let n=e.node(t);if(!n)return;let i={...n};return n?.clusterNode?i.y=(n.y??0)+r:e.children(t).length>0?i.height=(n.height??0)+r:i.y=(n.y??0)+r/2,i},"normalizeDagreNode"),jme=s((e,t)=>{ent.forEach(r=>{t[r]!==void 0&&(e[r]=t[r])})},"applyDagreNodeLayout"),ant=s((e,t,r,n)=>({...e,start:e.start??t,end:e.end??r,points:(e.points??[]).map(i=>({...i,y:typeof i.y=="number"?i.y+n:i.y}))}),"normalizeDagreEdge"),Zme=s((e,t)=>{let{graph:r,mergeSelfLoops:n,subGraphTitleTotalMargin:i=0}=t,a=new Map(e.nodes.map(l=>[l.id,l]));X4(r).forEach(l=>{let u=int(r,l,i);if(!u)return;jme(r.node(l),u);let h=a.get(l);h&&jme(h,u)});let o=i/2;return e.edges=_O(r,o,{mergeSelfLoops:n}).map(({edge:l,start:u,end:h})=>ant(l,u,h,o)),e},"applyDagreLayoutResult"),snt=s(async({elem:e,graph:t,groups:{clusters:r,edgePaths:n},diagramType:i,id:a,mergeSelfLoops:o,subGraphTitleTotalMargin:l})=>{let u=0;await Promise.all(X4(t).map(async function(f){let p=t.node(f);if(te.info("Position XBX => "+f+": ("+p.x,","+p.y,") width: ",p.width," height: ",p.height),p?.clusterNode)p.y+=l,te.info("A tainted cluster node XBX1",f,p.id,p.width,p.height,p.x,p.y,t.parent(f)),Nr.get(p.id).node=p,Sc(p);else if(t.children(f).length>0){te.info("A pure cluster node XBX1",f,p.id,p.x,p.y,p.width,p.height,t.parent(f)),p.height+=l,t.node(p.parentId);let m=p?.padding/2||0,g=p?.labelBBox?.height||0,y=g-m||0;te.debug("OffsetY",y,"labelHeight",g,"halfPadding",m),await Cd(r,p),Nr.get(p.id).node=p}else{let m=t.node(p.parentId);p.y+=l/2,te.info("A regular node XBX1 - using the padding",p.id,"parent",p.parentId,p.width,p.height,p.x,p.y,"offsetY",p.offsetY,"parent",m,m?.offsetY,p),Sc(p)}}));let h=l/2;return _O(t,h,{mergeSelfLoops:o}).forEach(function({edge:f,start:p,end:m}){te.info("Edge "+p+" -> "+m+": "+JSON.stringify(f),f),f.points.forEach(x=>x.y+=h);let g=t.node(p),y=t.node(m),v=kd(n,f,Nr,i,g,y,a);Q0(f,v)}),t.nodes().forEach(function(f){let p=t.node(f);te.info(f,p.type,p.diff),p.isGroup&&(u=p.diff)}),te.warn("Returning from recursive render XAX",e,u),{elem:e,diff:u}},"paintDagreLayoutCore"),ont=s(async e=>{let t=await Xme(e);return Kme(t.graph),await snt(t)},"renderDagreSubgraph"),LO=s(e=>{let t=new un({multigraph:!0,compound:!0}).setGraph({rankdir:e.direction,nodesep:e.config?.nodeSpacing||e.nodeSpacing||e.config?.flowchart?.nodeSpacing,ranksep:e.config?.rankSpacing||e.rankSpacing||e.config?.flowchart?.rankSpacing,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});return e.nodes.forEach(r=>{t.setNode(r.id,{...r}),r.parentId&&t.setParent(r.id,r.parentId)}),te.debug("Edges:",e.edges),e.edges.forEach(r=>{if(r.start===r.end){let n=r.start,i=n+"---"+n+"---1",a=n+"---"+n+"---2",o=t.node(n);t.setNode(i,{domId:i,id:i,parentId:o.parentId,labelStyle:"",label:"",padding:0,shape:"labelRect",style:"",width:10,height:10}),t.setParent(i,o.parentId),t.setNode(a,{domId:a,id:a,parentId:o.parentId,labelStyle:"",padding:0,shape:"labelRect",label:"",style:"",width:10,height:10}),t.setParent(a,o.parentId);let l=structuredClone(r),u=structuredClone(r),h=structuredClone(r),d=structuredClone(r);u.originalEdge=l,u.selfLoop={id:l.id,order:0},h.originalEdge=l,h.selfLoop={id:l.id,order:1},d.originalEdge=l,d.selfLoop={id:l.id,order:2},u.label="",u.arrowTypeEnd="none",u.endLabelLeft="",u.endLabelRight="",u.startLabelLeft="",u.id=n+"-cyclic-special-1",h.startLabelRight="",h.startLabelLeft="",h.endLabelLeft="",h.endLabelRight="",h.arrowTypeStart="none",h.arrowTypeEnd="none",h.id=n+"-cyclic-special-mid",d.label="",d.startLabelRight="",d.startLabelLeft="",d.arrowTypeStart="none",o.isGroup&&(u.fromCluster=n,d.toCluster=n),d.id=n+"-cyclic-special-2",d.arrowTypeStart="none",t.setEdge(n,i,u,n+"-cyclic-special-0"),t.setEdge(i,a,h,n+"-cyclic-special-1"),t.setEdge(a,n,d,n+"-cyclic-special-2")}else t.setEdge(r.start,r.end,{...r},r.id)}),zme(t),{graph:t}},"prepareLayoutForDagre"),Qme=s(async(e,{element:t,preparedLayout:r})=>{let n=r??LO(e),i=Le(),a=await Xme({element:t,graph:n.graph,diagramType:e.type,id:e.diagramId,parentCluster:void 0,siteConfig:i});return n.measuredLayout=a,a},"measureDagreLayout"),Jme=s((e,t)=>{let r=t.preparedLayout?.measuredLayout;if(!r)throw new Error("runDagreLayoutCore requires measureDagreLayout to run first");return Kme(r.graph),Zme(e,r),r},"runDagreLayoutCore"),lnt=s((e,{measure:t})=>X4(t.graph).map(r=>t.graph.node(r)).filter(Boolean),"getDagrePaintNodes"),cnt=s((e,t,{measure:r})=>e?r.graph.node(e):void 0,"getDagreEdgeNode"),unt=Ay({prepareLayout:LO,measureLayout:Qme,runLayoutCore:Jme,paintOptions:{clusterDb:Nr,getNodes:lnt,getEdgeNode:cnt,skipNode:s((e,{measure:t})=>!t.graph.hasNode(e.id),"skipNode"),isCluster:s((e,{measure:t})=>t.graph.hasNode(e.id)&&(t.graph.children(e.id)??[]).length>0,"isCluster")}})});function DO(e){let t=[];for(let r=0;r=1-Q4||p<=Q4||p>=1-Q4?null:{point:{x:e.x+f*i,y:e.y+f*a},tA:f,tB:p}}function nge(e){return Math.abs(e.b.x-e.a.x)>=Math.abs(e.b.y-e.a.y)}function dnt(e){let t=[];for(let r=0;r=Math.abs(r)?t>=0?1:0:r>=0?1:0}function mnt(e,t){if(e.length<2)return e.map(a=>({...a}));let r=e.map(a=>({...a})),n=t.arrowTypeStart&&$i[t.arrowTypeStart];if(n){let a=e[0],o=e[1],l=Math.atan2(o.y-a.y,o.x-a.x);r[0].x=a.x+n*Math.cos(l),r[0].y=a.y+n*Math.sin(l)}let i=t.arrowTypeEnd&&$i[t.arrowTypeEnd];if(i){let a=e.length,o=e[a-2],l=e[a-1],u=Math.atan2(l.y-o.y,l.x-o.x);r[a-1].x=l.x-i*Math.cos(u),r[a-1].y=l.y-i*Math.sin(u)}return r}function gnt(e,t,r,n,i){let a=e.point.x,o=e.point.y,l={x:a-t*e.r,y:o-r*e.r},u={x:a+t*e.r,y:o+r*e.r},h=[`L${D2(l)}`];return i==="arc"?h.push(`A${Oc(e.r)},${Oc(e.r)} 0 0 ${n} ${D2(u)}`):h.push(`M${D2(u)}`),h}function ige(e,t,r,n){let i=t.x-e.x,a=t.y-e.y,o=r.x-t.x,l=r.y-t.y,u=Math.hypot(i,a),h=Math.hypot(o,l);if(u0){let T=ige(i[h-1],i[h],i[h+1]??i[h],rge);T&&(y=T.cutLen)}let v=f,x=null;a&&hT.t-w.t);for(let T of b)T.r=Math.min(T.r,T.d-y,v-T.d);for(let T=0;Tw){let C=w/2;b[T].r=Math.min(b[T].r,C),b[T+1].r=Math.min(b[T+1].r,C)}}for(let T of b)T.r=2?n:null}catch{return null}}function age(e,t,r){if(!r.enabled)return;let n=e.node();if(!n)return;let i=new Map;for(let h of t)i.set(h.id,h);let a=[],o=new Map;for(let h of t){let d=typeof CSS<"u"&&CSS.escape?CSS.escape(h.id):h.id,f=n.querySelector(`path[data-id="${d}"]`);if(!f)continue;o.set(h.id,f);let m=bnt(f.getAttribute("data-points"))??h.points;a.push({...h,points:m})}let l=dnt(a);if(l.length===0)return;let u=new Map;for(let h of l){let d=u.get(h.jumpEdgeId)??[];d.push(h),u.set(h.jumpEdgeId,d)}for(let h of a){let d=u.get(h.id);if(!d||d.length===0)continue;let p=i.get(h.id)?.curve;if(p!==void 0&&!xnt(p))continue;let m=o.get(h.id);if(!m)continue;if(p===void 0){let T=m.getAttribute("d")??"";if(!vnt(T))continue}let g=m.getAttribute("style")??"",y=/stroke-dasharray\s*:\s*0\s+([\d.]+)\s+[\d.]+\s+([\d.]+)/.exec(g),v=y?Number.parseFloat(y[1]):null,x=y?Number.parseFloat(y[2]):null,b=ynt(h,d,r);if(m.setAttribute("d",b),v!==null&&x!==null&&typeof m.getTotalLength=="function"){let T=m.getTotalLength(),w=Math.max(0,T-v-x),C=`0 ${v} ${w} ${x}`,k=g.replace(/stroke-dasharray\s*:[^;]*;?/g,`stroke-dasharray: ${C};`).replace(/;\s*;+/g,";");m.setAttribute("style",k)}}}var rge,Z4,Q4,pnt,sge=F(()=>{"use strict";jN();rge=5,Z4=1e-5,Q4=1e-6;s(DO,"buildSegmentList");s(hnt,"segmentIntersection");s(nge,"isHorizontalSeg");s(dnt,"findEdgeIntersections");s(Oc,"fmt");s(D2,"pointToString");s(fnt,"getArcSweepFlag");pnt=.001;s(mnt,"applyMarkerOffsets");s(gnt,"emitJump");s(ige,"computeRoundedCorner");s(ynt,"rewriteEdgePath");s(vnt,"isStraightPath");s(xnt,"curveSupportsLineHops");s(bnt,"decodeDataPoints");s(age,"applyLineJumpsToSvg")});function oge(e,{measure:t}){let r=e.config?.swimlane?.lineHops;if(r===!1)return;let n=r==="gap"?"gap":"arc",i=e.edges.filter(a=>Array.isArray(a.points)&&a.points.length>=2).map(a=>({id:a.id,points:a.points,curve:a.curve,arrowTypeStart:a.arrowTypeStart,arrowTypeEnd:a.arrowTypeEnd}));age(t.groups.edgePaths,i,{enabled:!0,jumpRadius:6,jumpStyle:n})}var lge=F(()=>{"use strict";sge();s(oge,"applySwimlaneLineJumps")});function cge(e){return Math.max(e.padding??20,20)}function Tnt(e){let{x:t,y:r,width:n,height:i}=e,a=e.swimlaneContentTop;if(typeof t!="number"||typeof r!="number"||typeof n!="number"||typeof i!="number"||typeof a!="number"||!Number.isFinite(t)||!Number.isFinite(r)||!Number.isFinite(n)||!Number.isFinite(i)||!Number.isFinite(a)||n<=0||i<=0){delete e.groupTitleRect;return}let o=r-i/2,l=Math.min(a,r+i/2),u=Math.min(21,Math.max(0,l-o)),h=o+u;if(h<=o){delete e.groupTitleRect;return}e.groupTitleRect={left:t-n/2,right:t+n/2,top:o,bottom:h}}function uge(e){let t=e.direction,r=e.nodes??=[];for(let a of e.nodes??[])a.isGroup&&!a.parentId&&(a.shape="swimlane",t&&(a.direction=t));let n=r.filter(a=>!a.isGroup&&!a.parentId);if(n.length===0)return;let i=r.find(a=>a.id===IO);i?i.isGroup&&(i.shape="swimlane",t&&(i.direction=t)):(i={id:IO,label:"",isGroup:!0,shape:"swimlane",padding:20,...t?{direction:t}:{}},r.push(i));for(let a of n)a.parentId=IO}function hge(e){let t=new Map;for(let u of e.nodes??[])t.set(u.id,u);let r=[];for(let u of e.edges??[]){let h=typeof u.start=="string"?u.start:void 0,d=typeof u.end=="string"?u.end:void 0;!h||!d||u.labelNodeId||r.push({id:u.id,src:h,dst:d,ref:u})}let n=e.nodes??[],i=n.filter(u=>u.isGroup),a=n.filter(u=>!u.isGroup);return{nodes:[...[...i].reverse(),...a].map(u=>u.id),edges:r,layout:e,nodeById:t}}function dge(e,t,r,n){let{layout:i}=e,a=e.nodeById,o=n?.layerGap??100,l=n?.nodeGap??40,u=0;for(let p of t.layers){let m=0;for(let g of p){let y=a.get(g);if(!y){m++;continue}y.layer=u,y.order=m;let v=r.x[g]??m*l,x=r.y[g]??u*o;y.x=v,y.y=x,m++}u++}let h=i.nodes??[],d=new Map,f=[];for(let p of h){if(!p?.isGroup)continue;p.parentId||f.push(p);let m=h.filter(b=>b.parentId===p.id),g=1/0,y=-1/0,v=1/0,x=-1/0;for(let b of m){let T=b.x??r.x[b.id],w=b.y??r.y[b.id],C=b.width??0,k=b.height??0;T!=null&&w!=null&&(g=Math.min(g,T-C/2),y=Math.max(y,T+C/2),v=Math.min(v,w-k/2),x=Math.max(x,w+k/2))}if(g===1/0||v===1/0)p.x=p.x??0,p.y=p.y??0,p.width=p.width??0,p.height=p.height??0;else{let b=p.padding??20,T=p.parentId?b:2*cge(p),w=b,C=Math.max(0,y-g)+T,k=Math.max(0,x-v)+w,S=(g+y)/2,A=(v+x)/2;p.x=S,p.y=A,p.width=C,p.height=k,d.set(p.id,{minX:g,maxX:y,minY:v,maxY:x})}}if(f.length>0&&d.size>0){let p=1/0,m=-1/0,g=0;for(let y of f){let v=y.padding??20;v>g&&(g=v);let x=d.get(y.id);x&&(p=Math.min(p,x.minY),m=Math.max(m,x.maxY))}if(p!==1/0&&m!==-1/0){let y=Math.max(0,m-p),x=Math.max(g,36),b=y+2*x,T=(p+m)/2;for(let M of f)M.y=T,M.height=b,M.swimlaneContentTop=p;let w=[...f].sort((M,N)=>{let D=M.x??0,R=N.x??0;return D-R}),C=[],k=[],S=[];for(let M of w){let N=d.get(M.id);if(!N)continue;let D=Math.max(0,N.maxX-N.minX)+2*cge(M),R=(N.minX+N.maxX)/2;C.push(M.id),k.push(R),S.push(D)}let A=C.length;if(A>0){let M=new Map;if(A===1)M.set(C[0],S[0]);else{let N=[];for(let L=0;L{"use strict";IO="__swimlane_default__";s(cge,"topLaneHorizontalPadding");s(Tnt,"assignTopLaneTitleRect");s(uge,"prepareLayoutForSwimlanes");s(hge,"toGraphView");s(dge,"writeBackToLayoutData")});function fge(e){let t=[],r=[],n=new Map;for(let o of e.nodes)n.set(o.id,o);for(let o of e.edges){if(!o.label||o.label.length===0||o.isLayoutOnly||o.labelNodeId)continue;let l=o.start?n.get(o.start):void 0,u=o.end?n.get(o.end):void 0;if(!l||!u){te.warn(Cnt,`Edge ${o.id} has missing source or target node`);continue}let h=`edge-label-${o.start}-${o.end}-${o.id}`,f=l.parentId!==u.parentId?u.parentId:l.parentId,p={id:h,label:o.label,edgeStart:o.start??"",edgeEnd:o.end??"",shape:"labelRect",width:0,height:0,isEdgeLabel:!0,isDummy:!0,parentId:f,isGroup:!1,labelStyle:Array.isArray(o.labelStyle)?o.labelStyle[0]:o.labelStyle??"",...l.dir?{dir:l.dir}:{}};t.push(p),o.labelNodeId=h,o.label=void 0,o.text=void 0;let m={id:`${o.id}-to-label`,start:o.start,end:h,type:"normal",isLayoutOnly:!0},g={id:`${o.id}-from-label`,start:h,end:o.end,type:"normal",isLayoutOnly:!0};r.push(m,g)}let i=[...e.nodes,...t],a=[...e.edges,...r];return{...e,nodes:i,edges:a}}var Cnt,pge=F(()=>{"use strict";Tt();Cnt="[EdgeLabelNodes]";s(fge,"createEdgeLabelNodes")});function gge(e){let t=e.x??0,r=e.y??0,n=e.width??0,i=e.height??0;return n>0&&i>0?{cx:t,cy:r,rect:Ry(t,r,n,i)}:void 0}function yge(e){if(e.isGroup)return;let t=gge(e);return t?{id:String(e.id??""),cx:t.cx,cy:t.cy,rect:t.rect}:void 0}function Ys(e,t,r=.001){return Math.abs(e.x-t.x)r}function ui(e,t,r=.001){return jr(e,t,r)&&Math.abs(e.y-t.y)>r}function Xa(e,t,r,n){return Math.max(0,Math.min(Math.max(e,t),Math.max(r,n))-Math.max(Math.min(e,t),Math.min(r,n)))}function Ol(e,t,r=.001){return e.horizontal&&t.horizontal&&Zr(e.a,t.a,r)?Xa(e.a.x,e.b.x,t.a.x,t.b.x):e.vertical&&t.vertical&&jr(e.a,t.a,r)?Xa(e.a.y,e.b.y,t.a.y,t.b.y):0}function jd(e,t=.001){let r=[];for(let n=0;n0?r[r.length-1]:void 0;(!i||!Ys(i,n,t))&&r.push({x:n.x,y:n.y})}return r}function J4(e,t=.001){if(!e||e.length!==4)return;let[r,n,i,a]=e;return ci(r,n,t)&&ui(n,i,t)&&ci(i,a,t)?{kind:"HVH",p0:r,p1:n,p2:i,p3:a}:ui(r,n,t)&&ci(n,i,t)&&ui(i,a,t)?{kind:"VHV",p0:r,p1:n,p2:i,p3:a}:void 0}function I2(e,t,r,n=0){let i=Math.min(e.x,t.x),a=Math.max(e.x,t.x),o=Math.min(e.y,t.y),l=Math.max(e.y,t.y);return a>r.left-n&&ir.top-n&&ot.left+r&&e.xt.top+r&&e.y=t.right&&e.top<=t.top&&e.bottom>=t.bottom}function t3(e,t){return e.leftt.left&&e.topt.top}function NO(e,t){return{left:e.left-t,right:e.right+t,top:e.top-t,bottom:e.bottom+t}}function Ry(e,t,r,n){return{left:e-r/2,right:e+r/2,top:t-n/2,bottom:t+n/2}}function ma(e){return gge(e)?.rect}function Xd(e,t){switch(t){case"top":return{x:e.cx,y:e.rect.top};case"bottom":return{x:e.cx,y:e.rect.bottom};case"left":return{x:e.rect.left,y:e.cy};case"right":return{x:e.rect.right,y:e.cy}}}function r3(e,t,r,n,i,a=.001){let o=t==="left"||t==="right",l=n==="left"||n==="right";if(o&&l){if(t==="right"&&n==="left"&&e.xr.x){if(Zr(e,r,a))return[e,r];let f=(e.x+r.x)/2;return[e,{x:f,y:e.y},{x:f,y:r.y},r]}if(t===n){if(Zr(e,r,a))return;let f=t==="left"?Math.min(e.x,r.x)-i:Math.max(e.x,r.x)+i;return[e,{x:f,y:e.y},{x:f,y:r.y},r]}return}if(!o&&!l){if(t===n){if(jr(e,r,a))return;let p=t==="top"?Math.min(e.y,r.y)-i:Math.max(e.y,r.y)+i;return[e,{x:e.x,y:p},{x:r.x,y:p},r]}if(!(t==="bottom"&&n==="top"&&e.yr.y))return;if(jr(e,r,a))return[e,r];let f=(e.y+r.y)/2;return[e,{x:e.x,y:f},{x:r.x,y:f},r]}if(o&&!l){let d=t==="right"&&r.x>e.x||t==="left"&&r.xr.y;return d&&f?[e,{x:r.x,y:e.y},r]:void 0}let u=t==="bottom"&&r.y>e.y||t==="top"&&r.yr.x;return u&&h?[e,{x:e.x,y:r.y},r]:void 0}function n3(e,t,r,n){return t==="left"||t==="right"?[e,{x:n,y:e.y},{x:n,y:r.y},r]:[e,{x:e.x,y:n},{x:r.x,y:n},r]}function _y(e){let t=new Map,r=[];for(let n of e){if(n.isEdgeLabel)continue;let i=yge(n);i&&(t.set(i.id,i),r.push({id:i.id,rect:i.rect}))}return{nodeInfoById:t,realNodeRects:r}}function Bc(e){let t=[],r=[];for(let n of e){let i=yge(n);if(!i)continue;let a={id:i.id,rect:i.rect};n.isEdgeLabel?r.push(a):t.push(a)}return{realNodeRects:t,labelNodeRects:r}}function xge(e,{includeEdgeLabels:t=!0}={}){let r=[];for(let n of e){if(n.isGroup||!t&&n.isEdgeLabel)continue;let i=n.x??0,a=n.y??0,o=n.width??0,l=n.height??0;r.push({nodeId:n.id,...Ry(i,a,o,l)})}return r}function i3(e,t,r=.001){let n=e.start,i=e.end;if(!n||!i)return;let a=t.get(n),o=t.get(i);if(!(!a||!o))return{srcId:n,dstId:i,srcInfo:a,dstInfo:o,collinearX:Math.abs(a.cx-o.cx)g||px)return!1;let b=Math.abs(y-d.a.x)i:a&&l&&Zr(e,r,i)?Xa(e.x,t.x,r.x,n.x)>i:!1}function M2(e,t,r,n,{epsilon:i=.001,skipDegenerateOther:a=!1}={}){for(let o of r){if(o===n||o.isLayoutOnly)continue;let l=o.points;if(!(!l||l.length<2))for(let u=0;up+i&&gy+i&&fn+.001&&e=2?t[t.length-2]:void 0,u=(o?jr(o,i):!1)?{x:i.x,y:a.y}:{x:a.x,y:i.y};t.push(u)}t.push(a)}let r=[];for(let n of t){let i=r[r.length-1];(!i||!Ys(i,n))&&r.push(n)}return r}function Qo(e){if(e.length<3)return e;let t=[...e];for(let r=0;r<32;r++){let n=Snt(t);if(t=n.points,!n.changed)break}return t}var $l=F(()=>{"use strict";s(gge,"measuredNodeRect");s(yge,"nodeBoundsInfoFor");s(Ys,"samePoint");s(jr,"sameX");s(Zr,"sameY");s(ci,"isHorizontalSegment");s(ui,"isVerticalSegment");s(Xa,"overlapLength");s(Ol,"sameAxisSegmentOverlapLength");s(jd,"orthogonalSegmentsForPoints");s(js,"countOrthogonalBends");s(Xr,"dedupeConsecutivePoints");s(J4,"classifyThreeSegmentRoute");s(I2,"segmentBoundsOverlapRect");s(e3,"pointInsideRect");s(vge,"rectContainsRect");s(t3,"rectsOverlap");s(NO,"inflateRect");s(Ry,"rectFromCenterSize");s(ma,"rectOfNodeBounds");s(Xd,"portForRectSide");s(r3,"buildOrthogonalPortPath");s(n3,"buildSameSideTrackPath");s(_y,"collectRealNodeBounds");s(Bc,"collectNodeRectEntries");s(xge,"collectLayoutNodeRects");s(i3,"getNodePairGeometry");s(Vn,"segmentHitsAnyRect");s(PO,"orthogonalSegmentsCross");s(knt,"sameAxisSegmentsOverlap");s(M2,"segmentConflictsWithAnyEdge");s(Bl,"orthogonalSegmentsStrictlyCross");s(mge,"strictlyBetween");s(wnt,"isCollinearIntermediate");s(Snt,"simplifyPolylineOnce");s(N2,"orthogonalizePolyline");s(Qo,"simplifyPolyline")});function Lge(e,t,r){let n=e;if(n.isLayoutOnly||!n.points||n.points.length=0&&i=e.length)return e;let a=i-n;if(a<0||a>=e.length)return e;let o=Ant(e[i],e[a],t);return r?[o,...e.slice(i)]:[...e.slice(0,i+1),o]}function Dge(e,t){for(let r of e){let n=Lge(r,t,2);if(!n)continue;let i=[...n.points];n.srcRect&&(i=Tge(i,n.srcRect,!0)),n.dstRect&&(i=Tge(i,n.dstRect,!1)),i=Qo(N2(i)),i=Ige(i,n.srcRect,n.dstRect),n.edge.points=Qo(N2(i))}}function Cge(e,t,r,n=!1){if(Zr(e,t,kr)){if(t.yr.bottom+kr)return t;if(n){if(e.xr.right+kr)return{x:r.right,y:e.y}}return{x:Math.abs(t.x-r.left)<=Math.abs(t.x-r.right)?r.left:r.right,y:e.y}}if(jr(e,t,kr)){if(t.xr.right+kr)return t;if(n){if(e.yr.bottom+kr)return{x:e.x,y:r.bottom}}let i=Math.abs(t.y-r.top)<=Math.abs(t.y-r.bottom);return{x:e.x,y:i?r.top:r.bottom}}return t}function OO(e,t,r){let n=e[t];for(let i=t+r;i>=0&&in.lo)),r=Math.min(...e.map(n=>n.hi));if(!(t>r))return{lo:t,hi:r}}function wge(e,t){return t==="left"||t==="right"?BO(e.top,e.bottom):BO(e.left,e.right)}function $O(e,t,r){let n=e.y>=r.top-kr&&e.y<=r.bottom+kr,i=e.x>=r.left-kr&&e.x<=r.right+kr;if(Zr(e,t,kr)&&n){if(Math.abs(e.x-r.left)0?Rnt(a):void 0}function Sge(e,t,r,n,i){let a=_nt(e,t,r,n,i);if(!a)return;let o=i?e.y:e.x,l=Math.min(a.hi,Math.max(a.lo,o));if(!(Math.abs(l-o)({...l}));for(let l=t;l>=0&&l=r.left-kr&&Math.max(e.x,t.x)<=r.right+kr,i=Math.min(e.y,t.y)>=r.top-kr&&Math.max(e.y,t.y)<=r.bottom+kr;if(Math.abs(e.y-r.top)n.bottom+kr;case"left":return Zr(t,r,kr)&&r.xn.right+kr}}function _ge(e,t,r){if(e.length<3)return e;if(r){let a=Age(e[0],e[1],t);return a&&Rge(a,e[1],e[2],t)?e.slice(1):e}let n=e.length-1,i=Age(e[n-1],e[n],t);return i&&Rge(i,e[n-1],e[n-2],t)?e.slice(0,n):e}function Int(e,t,r){let n=e;if(t){let a=OO(n,0,1);if(a){let o=Cge(a,n[0],t);o!==n[0]&&(n=[o,...n.slice(1)])}n=_ge(n,t,!0)}if(r){let a=n.length-1,o=OO(n,a,-1);if(o){let l=Cge(o,n[a],r,!0);l!==n[a]&&(n=[...n.slice(0,a),l])}n=_ge(n,r,!1)}let i=Ige(n,t,r);return i!==n||n.length===2?i:(t&&(n=Ege(n,t,!0)),r&&(n=Ege(n,r,!1)),n)}function FO(e,t){for(let r of e){let n=Lge(r,t,2);if(!n)continue;let i=Xr(n.points,kr),a=Int(i,n.srcRect,n.dstRect);if(a.length<3){n.edge.points=a;continue}let o=[a[0],{...a[0]},...a.slice(1,-1),a[a.length-1],{...a[a.length-1]}];n.edge.points=o}}var kr,Ent,bge,Mge=F(()=>{"use strict";$l();kr=.001,Ent=.5,bge=4;s(Lge,"endpointContextFor");s(Ant,"segmentEnterPoint");s(Tge,"clipEndpoint");s(Dge,"clipEdgeEndpointsToNodeBoundaries");s(Cge,"snapEndpointToBoundary");s(OO,"firstDistinctAdjacent");s(BO,"cornerClearanceRange");s(kge,"clampToCornerClearance");s(Rnt,"intersectRanges");s(wge,"clearanceRangeForSide");s($O,"terminalSideForSegment");s(a3,"isHorizontalSide");s(_nt,"straightClearanceRange");s(Sge,"clearStraightEndpointCornerAxis");s(Ige,"clearStraightEndpointCornerConnections");s(Lnt,"cornerClearedEndpoint");s(Dnt,"moveCollinearEndpointRun");s(Ege,"clearEndpointCornerConnection");s(Age,"borderSideForSegment");s(Rge,"leavesOutward");s(_ge,"collapseOwnBorderStub");s(Int,"snapAndCollapseEndpoints");s(FO,"prepareEdgeEndpointsForRenderer")});function Pge(e){return new Map(e.map(t=>[t.id,t]))}function Mnt(e,t){let r=e.parentId,n=null;for(;r;){let i=t.get(r);if(!i?.isGroup)break;n=i.id,r=i.parentId}return n}function Nge(e,t){let r=0,n=e.parentId;for(;n;){let i=t.get(n);if(!i?.isGroup)break;r++,n=i.parentId}return r}function Oge(e){let t=1/0,r=-1/0,n=1/0,i=-1/0;for(let a of e){let o=a.x,l=a.y;if(typeof o!="number"||typeof l!="number")continue;let u=a.width??0,h=a.height??0;t=Math.min(t,o-u/2),r=Math.max(r,o+u/2),n=Math.min(n,l-h/2),i=Math.max(i,l+h/2)}return t===1/0||n===1/0?null:{minX:t,maxX:r,minY:n,maxY:i}}function Nnt(e,t){let r=e.padding??20;e.x=(t.minX+t.maxX)/2,e.y=(t.minY+t.maxY)/2,e.width=Math.max(0,t.maxX-t.minX)+r,e.height=Math.max(0,t.maxY-t.minY)+r}function Pnt(e){let t=Pge(e),r=e.filter(n=>n.isGroup&&n.parentId).sort((n,i)=>Nge(i,t)-Nge(n,t));for(let n of r){let i=e.filter(o=>o.parentId===n.id),a=Oge(i);a&&Nnt(n,a)}}function GO(e,t){let r=e.nodes??[],n=e.edges??[],i=r.filter(u=>!u.isGroup),a=1/0,o=-1/0;for(let u of i){let h=u[t];typeof h=="number"&&(a=Math.min(a,h),o=Math.max(o,h))}if(!Number.isFinite(a)||!Number.isFinite(o))return!1;let l=s(u=>a+o-u,"mirror");for(let u of r){let h=u[t];typeof h=="number"&&(u[t]=l(h));let d=u.groupTitleRect;d&&(u.groupTitleRect=t==="x"?{...d,left:l(d.right),right:l(d.left)}:{...d,top:l(d.bottom),bottom:l(d.top)})}for(let u of n)for(let h of u.points??[])h[t]=l(h[t]);return!0}function Bge(e){return(e.nodes??[]).some(r=>!r.isGroup)?GO(e,"y"):!0}function $ge(e,t="LR"){let r=e.nodes??[],n=e.edges??[],i=r.filter(E=>!E.isGroup),a=1/0,o=1/0;for(let E of i){let I=E.x??0,L=E.y??0;I0?Math.max(1,d/f):1;for(let E of i){let I=E.x??0,P=((E.y??0)-o)*p+l,B=I-a;E.x=P,E.y=B}for(let E of n)if(E.points)for(let I of E.points){let L=I.x,B=(I.y-o)*p+l,O=L-a;I.x=B,I.y=O}Pnt(r);let m=r.filter(E=>E.isGroup&&!E.parentId);if(m.length===0)return t==="RL"&&GO(e,"x"),!0;let g=Pge(r),y=new Map;for(let E of r){if(E.isGroup)continue;let I=Mnt(E,g);if(!I)continue;let L=y.get(I)??[];L.push(E),y.set(I,L)}let v=0;for(let E of m){let I=E.padding??0;I>v&&(v=I)}let x=[],b=1/0,T=-1/0;for(let E of m){let I=y.get(E.id)??[],L=Oge(I);L&&(b=Math.min(b,L.minX),T=Math.max(T,L.maxX),x.push({lane:E,contentTop:L.minY,contentBottom:L.maxY,centerY:(L.minY+L.maxY)/2}))}if(b===1/0||T===-1/0)return!0;let w=Math.max(0,T-b),C=Math.max(v,10),k=w+2*C,S=l+k,N=(b+T)/2-k/2-l,D=N+S/2,R=Math.max(v,l);x.sort((E,I)=>E.centerY-I.centerY);for(let E=0;E{"use strict";s(Pge,"buildNodeMap");s(Mnt,"resolveTopLevelGroupId");s(Nge,"groupDepth");s(Oge,"boundsForChildren");s(Nnt,"applyGroupBounds");s(Pnt,"recomputeNestedGroupBounds");s(GO,"mirrorAxis");s(Bge,"applyBtDirectionTransform");s($ge,"applyLrDirectionTransform")});function Gge(e,t){let{nodeInfoById:r,realNodeRects:n}=_y(t);for(let i of e){if(i.isLayoutOnly)continue;let a=i.points;if(!a||a.length<4)continue;let o=J4(Xr(a,Fl),Fl);if(!o)continue;let{p3:l}=o,u=o.kind==="HVH",h=i3(i,r,Fl);if(!h)continue;let{srcId:d,dstId:f,srcInfo:p,dstInfo:m,collinearX:g,collinearY:y}=h;if(g||y)continue;let v,x=p.rect;for(let b of Bnt){let T,w,C;if(u){let D=m.cy>p.cy?x.bottom:x.top,R=p.cx+b;if(R<=x.left+Fl||R>=x.right-Fl)continue;T={x:R,y:D},w={x:R,y:l.y},C={x:l.x,y:l.y}}else{let D=m.cx>p.cx?x.right:x.left,R=p.cy+b;if(R<=x.top+Fl||R>=x.bottom-Fl)continue;T={x:D,y:R},w={x:l.x,y:R},C={x:l.x,y:l.y}}let k=Ys(T,w,Fl),S=Ys(w,C,Fl);if(k&&S||!k&&Vn(T,w,n,[d],1)||!S&&Vn(w,C,n,[f],1))continue;let A=!k&&M2(T,w,e,i,{epsilon:Fl,skipDegenerateOther:!0}),M=!S&&M2(w,C,e,i,{epsilon:Fl,skipDegenerateOther:!0});if(!(A||M)){k?v=[w,C]:S?v=[T,w]:v=[T,w,C];break}}v&&(i.points=v)}}var Fl,Ont,s3,Bnt,zge=F(()=>{"use strict";$l();Fl=1e-6,Ont=8,s3=Ont,Bnt=[0,s3,-s3,2*s3,-2*s3];s(Gge,"portSwapToLShape")});function Vge(e,t){let{realNodeRects:a,labelNodeRects:o}=Bc(t.values());for(let l of e){if(l.isLayoutOnly)continue;let u=l.points;if(!u||u.length<4)continue;let h=Xr(u,.001);if(h.length<4)continue;let d=h.length-1,f=h[d],p=h[d-1],m=h[d-2],g=f.x-p.x,y=f.y-p.y,v=Math.hypot(g,y);if(v>=10||v<.001)continue;let x=p.x-m.x,b=p.y-m.y;if(Math.hypot(x,b)<.001)continue;let w=ci(p,f,.001),C=ui(p,f,.001),k=ci(m,p,.001),S=ui(m,p,.001);if(!(w&&S||C&&k))continue;let A=l.end,M=l.start,N=A?t.get(A):void 0;if(!N)continue;let D=N.x??0,R=N.y??0,E=ma(N);if(!E)continue;let I,L;if(S){let z=b<0;I={x:D,y:m.y},L={x:D,y:z?E.bottom:E.top}}else{let z=x>0;I={x:m.x,y:R},L={x:z?E.right:E.left,y:R}}if(Vn(I,L,a,A?[A]:[],-2)||Vn(I,L,o,[],-2))continue;if(M){let z=t.get(M),W=z?ma(z):void 0;if(W&&e3(I,W,2))continue}let P=s((z,W)=>`${z.x.toFixed(3)},${z.y.toFixed(3)}|${W.x.toFixed(3)},${W.y.toFixed(3)}`,"ownSegmentKey"),B=new Set;for(let z=0;z{for(let H of e){if(H===l||H.isLayoutOnly)continue;let j=H.points;if(!(!j||j.length<2))for(let Q=0;Q=0){let z=h[d-3],W=[M,A].filter(H=>!!H);if(Vn(z,I,a,W,-2)||O(z,I))continue}let G=[...h.slice(0,d-2),I,L];l.points=G;let V=l.labelNodeId;if(V){let z=t.get(V);if(z){let W=z.width??0,H=z.height??0;if(W>0&&H>0){let j,Q,U=-1;for(let ue=0;ue=W+2||Se&&se>=H+2)&&se>U&&(U=se,j=(J.x+he.x)/2,Q=(J.y+he.y)/2)}j!==void 0&&Q!==void 0&&(z.x=j,z.y=Q)}}}}}var Wge=F(()=>{"use strict";$l();s(Vge,"collapseShortTerminalStub")});function qge(e,t){let i=s((m,g)=>{let y=m.x??0,v=m.y??0,x=g.x-y,b=g.y-v,T=(m.width??0)/2,w=(m.height??0)/2;return Math.abs(b)*T>Math.abs(x)*w?(b<0&&(w=-w),{x:y+(b===0?0:w*x/b),y:v+w}):(x<0&&(T=-T),{x:y+T,y:v+(x===0?0:T*b/x)})},"rectIntersect"),a=s((m,g)=>{let y=Xr(m.points??[]);if(y.length<2)return;let v=g?m.start:m.end,x=v?t.get(v):void 0,b=x?ma(x):void 0;if(!x||!v||!b)return;let T=g?y[0]:y[y.length-1],w=g?y[1]:y[y.length-2],C=i(x,T),k=T;if(zO(w,C)&&(k=w),jr(C,k,nr))return{edge:m,edgeId:String(m.id??""),nodeId:v,atStart:g,orientation:"V",coord:C.x,min:Math.min(C.y,k.y),max:Math.max(C.y,k.y),boundary:C,railEnd:k,rect:b};if(Zr(C,k,nr))return{edge:m,edgeId:String(m.id??""),nodeId:v,atStart:g,orientation:"H",coord:C.y,min:Math.min(C.x,k.x),max:Math.max(C.x,k.x),boundary:C,railEnd:k,rect:b}},"terminalLaneFor"),o=s((m,g)=>Math.max(0,Math.min(m.max,g.max)-Math.max(m.min,g.min)),"projectedOverlapLength"),l=s((m,g)=>m.nodeId!==g.nodeId||m.orientation!==g.orientation?!1:m.orientation==="H"?(Math.abs(m.boundary.x-m.rect.left)<1||Math.abs(m.boundary.x-m.rect.right)<1)&&jr(m.boundary,g.boundary,1):(Math.abs(m.boundary.y-m.rect.top)<1||Math.abs(m.boundary.y-m.rect.bottom)<1)&&Zr(m.boundary,g.boundary,1),"sameTerminalFace"),u=s((m,g)=>m.nodeId!==g.nodeId||m.orientation!==g.orientation?!1:o(m,g)>=ga&&Math.abs(m.coord-g.coord)<.5,"exactTerminalLaneConflict"),h=s((m,g)=>{if(m.nodeId!==g.nodeId||m.orientation!==g.orientation||m.orientation!=="H"||m.atStart===g.atStart)return!1;let y=o(m,g);if(y2*v?!1:l(m,g)&&Math.abs(m.coord-g.coord)<16},"nearTerminalLaneConflict"),d=s((m,g)=>{let y=Xr(m.edge.points??[]);if(y.length<2)return;let v=m.orientation==="V"?{x:m.boundary.x+g,y:m.boundary.y}:{x:m.boundary.x,y:m.boundary.y+g},x=m.orientation==="V"?{x:m.railEnd.x+g,y:m.railEnd.y}:{x:m.railEnd.x,y:m.railEnd.y+g};if(!s(()=>Math.abs(m.boundary.y-m.rect.top)<1||Math.abs(m.boundary.y-m.rect.bottom)<1?Zr(v,m.boundary,nr)&&v.x>=m.rect.left+1&&v.x<=m.rect.right-1:Math.abs(m.boundary.x-m.rect.left)<1||Math.abs(m.boundary.x-m.rect.right)<1?jr(v,m.boundary,nr)&&v.y>=m.rect.top+1&&v.y<=m.rect.bottom-1:!1,"boundaryStaysOnSameFace")())return;if(m.atStart){let k=y.length>1&&Ys(y[1],m.railEnd,nr),S=y.slice(k?2:1),A=S[0];return A&&!zO(A,x)?void 0:[v,x,...S]}let T=y.length>1&&Ys(y[y.length-2],m.railEnd,nr),w=y.slice(0,T?-2:-1),C=w[w.length-1];if(!(C&&!zO(C,x)))return[...w,x,v]},"shiftedCandidate"),f=s(m=>{let g=m.edge,y=Xr(g.points??[]);if(y.length!==2)return!1;let v=g.start,x=g.end,b=v?t.get(v):void 0,T=x?t.get(x):void 0;if(!b||!T)return!1;let w=b.x??0,C=b.y??0,k=T.x??0,S=T.y??0,[A,M]=y;return Zr(A,M,nr)&&Math.abs(C-S)<1&&Math.abs(w-k)>1||jr(A,M,nr)&&Math.abs(w-k)<1&&Math.abs(C-S)>1},"laneIsStraightCollinearConnector"),p=[-7,7,-14,14,-21,21];for(let m=0;m<8;m++){let g=e.filter(v=>!v.isLayoutOnly).flatMap(v=>[a(v,!0),a(v,!1)]).filter(v=>!!v),y=!1;for(let v=0;v{let A=f(k),M=f(S);return A!==M?Number(A)-Number(M):+!S.atStart-+!k.atStart});for(let k of C){for(let S of p){let A=d(k,S);if(!A)continue;let M=a({...k.edge,points:A},k.atStart);if(!(!M||g.some(N=>N.edge!==k.edge&&(u(M,N)||w&&h(M,N))))){k.edge.points=A,y=!0;break}}if(y)break}}if(!y)return}}function Hge(e,t){let{realNodeRects:i,labelNodeRects:a}=Bc(t.values()),o=s((u,h)=>{let d=u.start,f=u.end,p=qr(h);if(p.length!==h.length-1)return!1;let m=[d,f].filter(g=>!!g);for(let g of p)if(Vn(g.a,g.b,i,m,-2)||Vn(g.a,g.b,a,[],-2))return!1;for(let g of e){if(g===u||g.isLayoutOnly)continue;let y=g.points;if(!(!y||y.length<2)){for(let v of p)for(let x of qr(Xr(y)))if(Ol(v,x,.5)>=ga||Bl(v.a,v.b,x.a,x.b,nr))return!1}}return!0},"candidateIsSafe"),l=s((u,h)=>{if(h+4>=u.length)return;let d=u[h],f=u[h+1],p=u[h+2],m=u[h+3],g=u[h+4],y=ci(d,f)&&ui(f,p)&&ci(p,m)&&ui(m,g)&&jr(d,m,nr)&&jr(d,g,nr)&&jr(f,p,nr)&&(f.x-d.x)*(m.x-p.x)<0,v=ui(d,f)&&ci(f,p)&&ui(p,m)&&ci(m,g)&&Zr(d,m,nr)&&Zr(d,g,nr)&&Zr(f,p,nr)&&(f.y-d.y)*(m.y-p.y)<0;if(y||v)return Xr([...u.slice(0,h+1),g,...u.slice(h+5)]);if(h+5>=u.length)return;let x=u[h+5],b=ui(d,f)&&ci(f,p)&&ui(p,m)&&ci(m,g)&&ui(g,x)&&jr(d,g,nr)&&jr(d,x,nr)&&jr(p,m,nr)&&(p.x-f.x)*(g.x-m.x)<0,T=ci(d,f)&&ui(f,p)&&ci(p,m)&&ui(m,g)&&ci(g,x)&&Zr(d,g,nr)&&Zr(d,x,nr)&&Zr(p,m,nr)&&(p.y-f.y)*(g.y-m.y)<0;if(!(!b&&!T))return Xr([...u.slice(0,h+1),x,...u.slice(h+6)])},"withoutDogleg");for(let u=0;u<8;u++){let h=!1;for(let d of e){if(d.isLayoutOnly)continue;let f=Xr(d.points??[]);for(let p=0;p<=f.length-5;p++){let m=l(f,p);if(!(!m||!o(d,m))){d.points=m,h=!0;break}}if(h)break}if(!h)return}}function VO(e,t){let{realNodeRects:a,labelNodeRects:o}=Bc(t.values()),l=e.filter(g=>!g.isLayoutOnly),u=s((g,y,v)=>Xr(g===y?v??[]:g.points??[]),"pointsFor"),h=s((g,y)=>{let v=0;for(let x=0;x{let y=qr(g);if(y.length!==3)return;let v=y[1];if(!(y[0].horizontal===v.horizontal||y[2].horizontal===v.horizontal))return{index:v.index,horizontal:v.horizontal,vertical:v.vertical,segment:v}},"middleRail"),f=s((g,y)=>{let v=[g.start,g.end].filter(x=>!!x);return a.filter(x=>{if(v.includes(x.id))return!1;let b=x.rect;return y.horizontal?Xa(y.a.x,y.b.x,b.left,b.right)>=ga&&y.a.y>=b.top-2&&y.a.y<=b.bottom+2:Xa(y.a.y,y.b.y,b.top,b.bottom)>=ga&&y.a.x>=b.left-2&&y.a.x<=b.right+2})},"blockingRectsFor"),p=s((g,y,v)=>{let x=g.map(T=>({...T}));if(y.horizontal)x[y.index].y=v,x[y.index+1].y=v;else if(y.vertical)x[y.index].x=v,x[y.index+1].x=v;else return;let b=Qo(Xr(x));return qr(b).length===b.length-1?b:void 0},"candidateByMovingRail"),m=s((g,y,v)=>{let x=[g.start,g.end].filter(T=>!!T),b=qr(y);if(b.length!==y.length-1)return!1;for(let T of b)if(Vn(T.a,T.b,a,x,-2)||Vn(T.a,T.b,o,[],-2))return!1;for(let T of l)if(T!==g){for(let w of b)for(let C of qr(u(T)))if(Ol(w,C,.5)>=ga)return!1}return h(g,y)<=v},"candidateIsSafe");for(let g=0;g<8;g++){let y=h(),v=!1;for(let x of l){let b=u(x),T=d(b);if(!T)continue;let w=f(x,T.segment);if(w.length===0)continue;let C=T.horizontal?[Math.min(...w.map(k=>k.rect.top))-20,Math.max(...w.map(k=>k.rect.bottom))+20]:[Math.min(...w.map(k=>k.rect.left))-20,Math.max(...w.map(k=>k.rect.right))+20];for(let k of C){let S=p(b,T.segment,k);if(!(!S||!m(x,S,y))){x.points=S,v=!0;break}}if(v)break}if(!v)return}}function WO(e,t){let n=s(u=>{let h=u.groupTitleRect;if(!(!h||typeof h.left!="number"||typeof h.right!="number"||typeof h.top!="number"||typeof h.bottom!="number"||!Number.isFinite(h.left)||!Number.isFinite(h.right)||!Number.isFinite(h.top)||!Number.isFinite(h.bottom)||h.right<=h.left||h.bottom<=h.top))return{left:h.left,right:h.right,top:h.top,bottom:h.bottom}},"validTitleRect"),i=s(u=>{if(!u.isGroup||u.parentId)return;let h=u.direction,d=typeof h=="string"?h.toUpperCase():"";if(d==="LR"||d==="RL"||d==="BT")return;let f=n(u),p=u.y,m=u.height;if(!f||typeof p!="number"||typeof m!="number"||!Number.isFinite(p)||!Number.isFinite(m)||m<=0)return;let g=f.right-f.left,y=f.bottom-f.top;if(!(y<=0||g{if(!u.horizontal)return!1;let d=u.a.y;return d<=h.top+nr||d>=h.bottom-nr?!1:Xa(u.a.x,u.b.x,h.left,h.right)>=ga},"horizontalSegmentIntersectsTitle"),o=[...t.values()].map(i).filter(u=>!!u);if(o.length===0)return;let l=0;for(let u of e){if(u.isLayoutOnly)continue;let h=Xr(u.points??[]);for(let d of qr(h))for(let f of o)a(d,f.rect)&&(l=Math.max(l,f.rect.bottom-d.a.y+4))}if(!(l<=nr))for(let u of o){let h=u.node.y,d=u.node.height;typeof h!="number"||typeof d!="number"||!Number.isFinite(h)||!Number.isFinite(d)||d<=0||(u.node.y=h-l/2,u.node.height=d+l,u.node.groupTitleRect={...u.rect,top:u.rect.top-l,bottom:u.rect.bottom-l})}}function qO(e,t){let n=s(h=>{let d=h.groupTitleRect;if(!(!d||typeof d.left!="number"||typeof d.right!="number"||typeof d.top!="number"||typeof d.bottom!="number"||!Number.isFinite(d.left)||!Number.isFinite(d.right)||!Number.isFinite(d.top)||!Number.isFinite(d.bottom)||d.right<=d.left||d.bottom<=d.top))return{left:d.left,right:d.right,top:d.top,bottom:d.bottom}},"validTitleRect"),i=s(h=>{if(!h.isGroup||h.parentId||h.direction!=="LR")return;let f=n(h),p=h.x,m=h.width;if(!f||typeof p!="number"||typeof m!="number"||!Number.isFinite(p)||!Number.isFinite(m)||m<=0)return;let g=f.right-f.left,y=f.bottom-f.top;if(!(g<=0||y{if(!h.vertical)return!1;let f=h.a.x;return f<=d.left+nr||f>=d.right-nr?!1:Xa(h.a.y,h.b.y,d.top,d.bottom)>=ga},"verticalSegmentIntersectsTitle"),o=s((h,d)=>{if(!h.horizontal)return!1;let f=h.a.y;return f<=d.top+nr||f>=d.bottom-nr?!1:Xa(h.a.x,h.b.x,d.left,d.right)>=ga},"horizontalSegmentIntersectsTitle"),l=[...t.values()].map(i).filter(h=>!!h);if(l.length===0)return;let u=0;for(let h of e){if(h.isLayoutOnly)continue;let d=Xr(h.points??[]);for(let f of qr(d))for(let p of l)if(a(f,p.rect))u=Math.max(u,p.rect.right-f.a.x+4);else if(o(f,p.rect)){let m=Math.min(f.a.x,f.b.x);u=Math.max(u,p.rect.right-m+4)}}if(!(u<=nr))for(let h of l){let d=h.node.x,f=h.node.width;typeof d!="number"||typeof f!="number"||!Number.isFinite(d)||!Number.isFinite(f)||f<=0||(h.node.x=d-u/2,h.node.width=f+u,h.node.groupTitleRect={...h.rect,left:h.rect.left-u,right:h.rect.right-u})}}function Uge(e,t){let{realNodeRects:i}=Bc(t.values()),a=e.filter(y=>!y.isLayoutOnly),o=s((y,v=new Map)=>Xr(v.get(y)??y.points??[]),"replacementPointsFor"),l=s((y=new Map)=>{let v=0;for(let x=0;xa.reduce((v,x)=>v+js(o(x,y)),0),"totalBends"),h=s(y=>{let v=o(y);if(v.length<4)return;let x=v[v.length-2],b=v[v.length-1];if(!(!ci(x,b,nr)&&!ui(x,b,nr)))return{tailStart:x,terminal:b}},"terminalTailFor"),d=s((y,v)=>{let x=o(y);if(x.length<3)return;let b=x[0],T=x[1],w;if(ci(b,T,nr))w={x:T.x,y:v.tailStart.y};else if(ui(b,T,nr))w={x:v.tailStart.x,y:T.y};else return;let C=Qo(Xr([b,T,w,v.tailStart,v.terminal]));return qr(C).length===C.length-1?C:void 0},"candidateWithDestinationTail"),f=s((y,v)=>{let x=[y.start,y.end].filter(b=>!!b);for(let b of qr(v))if(Vn(b.a,b.b,i,x,-2))return!0;return!1},"pathHasNodeHit"),p=s((y,v,x)=>{for(let b of a)if(b!==y){for(let T of qr(v))for(let w of qr(o(b,x)))if(Ol(T,w,.5)>=ga)return!0}return!1},"pathHasSharedTrack"),m=s((y,v,x)=>!f(y,v)&&!p(y,v,x),"candidateIsSafe"),g=s(()=>{let y=new Map;for(let v of a){let x=v.end;if(!x||!t.has(x)||o(v).length<4)continue;let T=y.get(x)??[];T.push(v),y.set(x,T)}return y},"edgesByDestination");for(let y=0;y<4;y++){let v=l();if(v===0)return;let x=u(),b,T=v,w=x;for(let C of g().values())for(let k=0;k=v||L>T||L===T&&P>=w||(b=I,T=L,w=P)}if(!b)return;for(let[C,k]of b)C.points=k}}function Yge(e,t){let{realNodeRects:o,labelNodeRects:l}=Bc(t.values()),u=e.filter(C=>!C.isLayoutOnly),h=s((C,k=new Map)=>Xr(k.get(C)??C.points??[]),"replacementPointsFor"),d=s((C=new Map)=>{let k=0;for(let S=0;Su.reduce((k,S)=>k+js(h(S,C)),0),"totalBends"),p=s(C=>{let k=C.start,S=C.end,A=k?t.get(k):void 0,M=S?t.get(S):void 0,N=A?ma(A):void 0,D=M?ma(M):void 0;return N&&D?{src:N,dst:D}:void 0},"endpointRectsFor"),m=s((C,k,S)=>{if(S.index<=0||S.index+1>=k.length-1)return;let A=p(C);if(A){if(S.vertical){let M=S.a.x,N=Math.min(A.src.left,A.dst.left),D=Math.max(A.src.right,A.dst.right),R=MD+nr?"right":void 0;return R?{edge:C,points:k,segmentIndex:S.index,axis:"vertical",side:R,coord:M,min:Math.min(S.a.y,S.b.y),max:Math.max(S.a.y,S.b.y)}:void 0}if(S.horizontal){let M=S.a.y,N=Math.min(A.src.top,A.dst.top),D=Math.max(A.src.bottom,A.dst.bottom),R=MD+nr?"bottom":void 0;return R?{edge:C,points:k,segmentIndex:S.index,axis:"horizontal",side:R,coord:M,min:Math.min(S.a.x,S.b.x),max:Math.max(S.a.x,S.b.x)}:void 0}}},"externalRailForSegment"),g=s(()=>{let C=[];for(let k of u){let S=h(k);for(let A of qr(S)){let M=m(k,S,A);M&&C.push(M)}}return C},"collectExternalRails"),y=s((C,k)=>C.edge!==k.edge&&C.axis===k.axis&&C.side===k.side&&Xa(C.min,C.max,k.min,k.max)>=ga,"railsInteract"),v=s(C=>{let k=[],S=new Set;for(let A of C){if(S.has(A))continue;let M=[A],N=[];for(S.add(A);M.length>0;){let D=M.pop();N.push(D);for(let R of C)!S.has(R)&&y(D,R)&&(S.add(R),M.push(R))}N.length>1&&k.push(N)}return k},"connectedComponents"),x=s(C=>{let k=[];for(let S of C)k.some(A=>Math.abs(A-S.coord){let k=C.map(M=>M.coord),S=x(C),A=[];if(C.length<=6){let M=new Array(S.length).fill(!1),N=[],D=s(()=>{if(N.length===C.length){N.some((R,E)=>Math.abs(R-k[E])>=nr)&&A.push([...N]);return}for(let[R,E]of S.entries())M[R]||(M[R]=!0,N.push(E),D(),N.pop(),M[R]=!1)},"visit");return D(),A}for(let M=0;M{let S=new Map;for(let[M,N]of C.entries()){let D=k[M],R=S.get(N.edge)??N.points.map(E=>({x:E.x,y:E.y}));N.axis==="vertical"?(R[N.segmentIndex].x=D,R[N.segmentIndex+1].x=D):(R[N.segmentIndex].y=D,R[N.segmentIndex+1].y=D),S.set(N.edge,R)}let A=new Map;for(let[M,N]of S){let D=Qo(Xr(N));if(qr(D).length!==D.length-1)return;A.set(M,D)}return A},"replacementsForAssignment"),w=s(C=>{for(let[k,S]of C){let A=[k.start,k.end].filter(M=>!!M);for(let M of qr(S))if(Vn(M.a,M.b,o,A,-2)||Vn(M.a,M.b,l,[],-2))return!1}for(let k=0;k=ga)return!1}}return!0},"candidateIsSafe");for(let C=0;C<4;C++){let k=d();if(k===0)return;let S,A=k,M=f(),N=Number.POSITIVE_INFINITY;for(let D of v(g()))for(let R of b(D)){let E=T(D,R);if(!E||!w(E))continue;let I=d(E);if(I>=k)continue;let L=f(E),P=D.reduce((B,O,$)=>B+Math.abs(R[$]-O.coord),0);I>A||I===A&&(L>M||L===M&&P>=N)||(S=E,A=I,M=L,N=P)}if(!S)return;for(let[D,R]of S)D.points=R}}function jge(e,t){let{realNodeRects:i,labelNodeRects:a}=Bc(t.values()),o=e.filter(g=>!g.isLayoutOnly),l=s((g,y,v)=>Xr(g===y?v??[]:g.points??[]),"pointsFor"),u=s(g=>qr(g).reduce((y,v)=>{let x=v.a.x-v.b.x,b=v.a.y-v.b.y;return y+Math.hypot(x,b)},0),"pathLength"),h=s((g,y)=>{let v=0;for(let x=0;x{if(g.horizontal){let v=g.a.y;return(Math.abs(v-y.top)<1||Math.abs(v-y.bottom)<1)&&Xa(g.a.x,g.b.x,y.left,y.right)>=ga}if(g.vertical){let v=g.a.x;return(Math.abs(v-y.left)<1||Math.abs(v-y.right)<1)&&Xa(g.a.y,g.b.y,y.top,y.bottom)>=ga}return!1},"segmentRunsAlongRectBorder"),f=s(g=>{let y=[g.start,g.end].filter(x=>!!x),v=[];for(let x of y){let b=t.get(x),T=b?ma(b):void 0;T&&v.push(T)}return v},"endpointRectsFor"),p=s((g,y)=>{if(y+3>=g.length)return[];let v=g[y],x=g[y+1],b=g[y+2],T=g[y+3],w=ci(v,x,nr)&&ui(x,b,nr)&&ci(b,T,nr),C=ui(v,x,nr)&&ci(x,b,nr)&&ui(b,T,nr);if(!w&&!C)return[];if(!(w?Math.sign(x.x-v.x)!==Math.sign(T.x-b.x):Math.sign(x.y-v.y)!==Math.sign(T.y-b.y)))return[];let S=jr(v,T,nr)||Zr(v,T,nr)?[]:[{x:v.x,y:T.y},{x:T.x,y:v.y}],A=S.length===0?[[...g.slice(0,y+1),...g.slice(y+3)]]:S.map(N=>[...g.slice(0,y+1),N,...g.slice(y+3)]),M=new Set;return A.map(N=>Qo(Xr(N))).filter(N=>{if(qr(N).length!==N.length-1||!N.some(R=>Ys(R,T,nr)))return!1;let D=N.map(R=>`${R.x.toFixed(3)},${R.y.toFixed(3)}`).join("|");return M.has(D)?!1:(M.add(D),!0)})},"shortcutCandidatesAt"),m=s((g,y,v)=>{let x=[g.start,g.end].filter(T=>!!T),b=f(g);for(let T of qr(y))if(Vn(T.a,T.b,i,x,-2)||Vn(T.a,T.b,a,[],-2)||b.some(w=>d(T,w)))return!1;for(let T of o)if(T!==g){for(let w of qr(y))for(let C of qr(l(T)))if(Ol(w,C,.5)>=ga)return!1}return h(g,y)<=v},"candidateIsSafe");for(let g=0;g<8;g++){let y=h(),v,x,b=y,T=Number.POSITIVE_INFINITY,w=Number.POSITIVE_INFINITY;for(let C of o){let k=l(C),S=js(k,nr),A=u(k);for(let M=0;M<=k.length-4;M++)for(let N of p(k,M)){let D=js(N,nr),R=u(N);if(!(Db||I===b&&(D>T||D===T&&R>=w)||(v=C,x=N,b=I,T=D,w=R)}}if(!v||!x)return;v.points=x}}function Xge(e,t){let o=[];for(let pe of t.values()){if(pe.isGroup||pe.isEdgeLabel)continue;let _e=pe.x??0,Ee=pe.y??0,Re=ma(pe);Re&&o.push({id:String(pe.id??""),cx:_e,cy:Ee,rect:Re})}if(o.length===0)return;let l=new Map(o.map(pe=>[pe.id,pe])),u=o.map(pe=>({id:pe.id,rect:pe.rect})),h=["top","bottom","left","right"],d={top:Math.min(...o.map(pe=>pe.rect.top))-20,bottom:Math.max(...o.map(pe=>pe.rect.bottom))+20,left:Math.min(...o.map(pe=>pe.rect.left))-20,right:Math.max(...o.map(pe=>pe.rect.right))+20},f=e.filter(pe=>!pe.isLayoutOnly),p=new Map(f.map((pe,_e)=>[pe,_e])),m=s(pe=>{let _e=pe==="left"||pe==="top"?-1:1,Ee=[];for(let Re=0;Re<=2;Re++)Ee.push(d[pe]+_e*20*Re);return Ee},"outwardTracksForSide"),g=s((pe,_e=new Map)=>Xr(_e.get(pe)??pe.points??[]),"replacementPointsFor"),y=s((pe,_e)=>{let Ee=0;for(let Re of pe)for(let Z of _e)Bl(Re.a,Re.b,Z.a,Z.b,nr)&&Ee++;return Ee},"crossingCountBetweenSegments"),v=s((pe,_e)=>y(qr(pe),qr(_e)),"crossingCountBetweenPaths"),x=s((pe=new Map)=>{let _e=0,Ee=[],Re=new Set,Z=[],ae=s(ie=>{Re.has(ie)||(Re.add(ie),Z.push(ie))},"addEdge");for(let ie=0;ie0&&(_e+=re,Ee.push({first:le,second:Me,count:re}),ae(le),ae(Me))}}return Z.sort((ie,le)=>(p.get(ie)??0)-(p.get(le)??0)),{count:_e,pairs:Ee,edgeSet:Re,edges:Z}},"crossingSnapshot"),b=s((pe,_e)=>{let Ee=new Set(_e.keys());if(Ee.size===0)return pe.count;let Re=0;for(let ae of pe.pairs)(Ee.has(ae.first)||Ee.has(ae.second))&&(Re+=ae.count);let Z=0;for(let ae=0;ae{let _e=new Map;for(let Z of pe.pairs){let ae=_e.get(Z.first)??new Set;ae.add(Z.second),_e.set(Z.first,ae);let ie=_e.get(Z.second)??new Set;ie.add(Z.first),_e.set(Z.second,ie)}let Ee=[],Re=new Set;for(let Z of pe.edges){if(Re.has(Z))continue;let ae=[Z],ie=[];for(Re.add(Z);ae.length>0;){let le=ae.pop();ie.push(le);for(let ve of _e.get(le)??[])Re.has(ve)||(Re.add(ve),ae.push(ve))}ie.sort((le,ve)=>(p.get(le)??0)-(p.get(ve)??0)),ie.length>1&&Ee.push(ie)}return Ee},"crossingComponents"),w=s(pe=>[pe.start,pe.end].filter(_e=>!!_e),"endpointIdsFor"),C=s(pe=>{let _e=[];for(let Ee of T(pe)){let Re=new Set(Ee),Z=new Set(Ee.flatMap(ie=>w(ie))),ae=[...Ee];for(let ie of f)Re.has(ie)||w(ie).some(le=>Z.has(le))&&ae.push(ie);ae.sort((ie,le)=>(p.get(ie)??0)-(p.get(le)??0)),_e.push(ae)}return _e},"pairSearchGroups"),k=s((pe,_e,Ee)=>b(pe,new Map([[_e,Ee]])),"crossingCountWithSingleReplacement"),S=s(pe=>{let _e=new Map;for(let Ee of pe.pairs)_e.set(Ee.first,(_e.get(Ee.first)??0)+Ee.count),_e.set(Ee.second,(_e.get(Ee.second)??0)+Ee.count);return _e},"currentCrossingsByEdge"),A=s(pe=>pe.slice(1).reduce((_e,Ee,Re)=>{let Z=pe[Re];return _e+Math.abs(Ee.x-Z.x)+Math.abs(Ee.y-Z.y)},0),"pathLength"),M=s((pe=new Map)=>f.reduce((_e,Ee)=>_e+js(g(Ee,pe)),0),"totalBends"),N=s((pe=new Map)=>f.reduce((_e,Ee)=>_e+A(g(Ee,pe)),0),"totalLength"),D=s((pe,_e,Ee=new Map)=>{let Re=qr(_e);for(let Z of f)if(Z!==pe){for(let ae of Re)for(let ie of qr(g(Z,Ee)))if(Ol(ae,ie,.5)>=ga)return!0}return!1},"pathHasSegmentConflict"),R=s((pe,_e)=>{let Ee=[pe.start,pe.end].filter(Re=>!!Re);for(let Re of qr(_e))if(Vn(Re.a,Re.b,u,Ee,-2))return!0;return!1},"pathHitsNode"),E=s((pe,_e)=>{let Ee=Qo(Xr(_e));qr(Ee).length===Ee.length-1&&pe.push(Ee)},"pushOrthogonalCandidate"),I=s(pe=>pe==="left"||pe==="right","sideIsHorizontal"),L=s((pe,_e,Ee)=>{switch(_e){case"left":return Math.min(pe.x,Ee.x)-20;case"right":return Math.max(pe.x,Ee.x)+20;case"top":return Math.min(pe.y,Ee.y)-20;case"bottom":return Math.max(pe.y,Ee.y)+20}},"localTrackForSameSide"),P=s((pe,_e,Ee,Re)=>{let Z=Ee==="left"||Ee==="top"?-1:1,ae=[L(_e,Ee,Re),d[Ee]];for(let ie of ae)for(let le=0;le<=2;le++)E(pe,n3(_e,Ee,Re,ie+Z*20*le))},"addSameSideCandidates"),B=s((pe,_e,Ee,Re,Z)=>{for(let ae of m(Ee))for(let ie of m(Z))E(pe,[_e,{x:ae,y:_e.y},{x:ae,y:ie},{x:Re.x,y:ie},Re])},"addHorizontalToVerticalCandidates"),O=s((pe,_e,Ee,Re,Z)=>{for(let ae of m(Ee))for(let ie of m(Z))E(pe,[_e,{x:_e.x,y:ae},{x:ie,y:ae},{x:ie,y:Re.y},Re])},"addVerticalToHorizontalCandidates"),$=s((pe,_e,Ee,Re,Z)=>{let ae=[...m("top"),...m("bottom")];for(let ie of m(Ee))for(let le of m(Z))for(let ve of ae)E(pe,[_e,{x:ie,y:_e.y},{x:ie,y:ve},{x:le,y:ve},{x:le,y:Re.y},Re])},"addHorizontalPairCandidates"),G=s((pe,_e,Ee,Re,Z)=>{let ae=[...m("left"),...m("right")];for(let ie of m(Ee))for(let le of m(Z))for(let ve of ae)E(pe,[_e,{x:_e.x,y:ie},{x:ve,y:ie},{x:ve,y:le},{x:Re.x,y:le},Re])},"addVerticalPairCandidates"),V=s(pe=>{let _e=new Set;return pe.map(Ee=>Xr(Ee)).filter(Ee=>{let Re=Ee.map(Z=>`${Z.x.toFixed(3)},${Z.y.toFixed(3)}`).join("|");return _e.has(Re)||Ee.length<2?!1:(_e.add(Re),!0)})},"dedupeCandidatePaths"),z=s((pe,_e,Ee,Re)=>{let Z=[],ae=r3(pe,_e,Ee,Re,20,nr);ae&&E(Z,ae),_e===Re&&P(Z,pe,_e,Ee);let ie=I(_e),le=I(Re);return ie&&!le?B(Z,pe,_e,Ee,Re):!ie&&le?O(Z,pe,_e,Ee,Re):ie?$(Z,pe,_e,Ee,Re):G(Z,pe,_e,Ee,Re),V(Z)},"buildCandidatesForSides"),W=s((pe,_e,Ee,Re)=>{let Z=[...m("left"),...m("right")],ae=[...m("top"),...m("bottom")];for(let ie of h){let le=Xd(Re,ie),ve=ie==="top"||ie==="bottom"?m(ie):ae;for(let ne of Z){E(pe,[_e,Ee,{x:ne,y:Ee.y},{x:ne,y:le.y},le]);for(let Me of ve)E(pe,[_e,Ee,{x:ne,y:Ee.y},{x:ne,y:Me},{x:le.x,y:Me},le])}}},"addVerticalDepartureOuterTrackCandidates"),H=s((pe,_e,Ee,Re)=>{let Z=[...m("left"),...m("right")],ae=[...m("top"),...m("bottom")];for(let ie of h){let le=Xd(Re,ie),ve=ie==="left"||ie==="right"?m(ie):Z;for(let ne of ae){E(pe,[_e,Ee,{x:Ee.x,y:ne},{x:le.x,y:ne},le]);for(let Me of ve)E(pe,[_e,Ee,{x:Ee.x,y:ne},{x:Me,y:ne},{x:Me,y:le.y},le])}}},"addHorizontalDepartureOuterTrackCandidates"),j=s(pe=>{let _e=pe.start,Ee=pe.end,Re=Ee?l.get(Ee):void 0;if(!_e||!Re)return[];let Z=Xr(pe.points??[]);if(Z.length<4)return[];let ae=Z[0],ie=Z[1],le=[];return ui(ae,ie,nr)?W(le,ae,ie,Re):ci(ae,ie,nr)&&H(le,ae,ie,Re),le},"terminalPreservingOuterTrackCandidates"),Q=s(pe=>{let _e=pe.start,Ee=pe.end,Re=_e?l.get(_e):void 0,Z=Ee?l.get(Ee):void 0;if(!Re||!Z)return[];let ae=[];for(let ie of h){let le=Xd(Re,ie);for(let ve of h)ae.push(...z(le,ie,Xd(Z,ve),ve))}return ae.push(...j(pe)),ae},"candidatePathsFor"),U=s(()=>new Map(f.map(pe=>[pe,qr(g(pe))])),"currentSegmentsByEdge"),ue=s((pe,_e,Ee)=>{let Re=new Set;for(let Z of f){if(Z===pe)continue;let ae=Ee.get(Z)??qr(g(Z));_e.some(ie=>ae.some(le=>Ol(ie,le,.5)>=ga))&&Re.add(Z)}return Re},"sharedTrackConflictsFor"),J=s((pe,_e,Ee,Re)=>{let Z=new Set;return Q(pe).map(ie=>Qo(Xr(ie))).filter(ie=>{if(R(pe,ie))return!1;let le=ie.map(ve=>`${ve.x.toFixed(3)},${ve.y.toFixed(3)}`).join("|");return Z.has(le)||ie.length<2?!1:(Z.add(le),!0)}).map(ie=>{let le=qr(ie),ve=0;for(let ne of f)ne!==pe&&(ve+=y(le,Ee.get(ne)??qr(g(ne))));return{candidate:ie,candidateSegments:le,crossings:_e.count-(Re.get(pe)??0)+ve,bends:js(ie,nr),totalBends:js(ie),length:A(ie)}}).filter(({crossings:ie})=>ie<=_e.count).sort((ie,le)=>ie.crossings-le.crossings||ie.bends-le.bends||ie.length-le.length).slice(0,48).map(ie=>({path:ie.candidate,segments:ie.candidateSegments,sharedTrackConflicts:ue(pe,ie.candidateSegments,Ee),totalBends:ie.totalBends,length:ie.length}))},"pairCandidatesFor"),he=s((pe,_e,Ee,Re,Z,ae)=>{let ie=0;for(let ve of pe.pairs)(ve.first===_e||ve.second===_e||ve.first===Re||ve.second===Re)&&(ie+=ve.count);let le=y(Ee.segments,Z.segments);for(let ve of f){if(ve===_e||ve===Re)continue;let ne=ae.get(ve)??qr(g(ve));le+=y(Ee.segments,ne)+y(Z.segments,ne)}return pe.count-ie+le},"pairCrossingCount"),se=s((pe,_e)=>{for(let Ee of pe.sharedTrackConflicts)if(Ee!==_e)return!1;return!0},"conflictsOnlyWith"),oe=s((pe,_e)=>pe.segments.some(Ee=>_e.segments.some(Re=>Ol(Ee,Re,.5)>=ga)),"candidatesShareTrack"),Se=s((pe,_e,Ee,Re)=>se(_e,Ee.edge)&&se(Re,pe.edge)&&!oe(_e,Re),"pairCandidatesAreCompatible"),xe=s((pe,_e,Ee,Re,Z)=>{let ae=he(pe.current,_e.edge,Ee,Re.edge,Z,pe.baseSegments);if(!(ae>=pe.current.count))return{replacements:new Map([[_e.edge,Ee.path],[Re.edge,Z.path]]),crossings:ae,bends:pe.currentBends-(pe.baseBendsByEdge.get(_e.edge)??0)-(pe.baseBendsByEdge.get(Re.edge)??0)+Ee.totalBends+Z.totalBends,length:pe.currentLength-(pe.baseLengthByEdge.get(_e.edge)??0)-(pe.baseLengthByEdge.get(Re.edge)??0)+Ee.length+Z.length}},"scorePairReplacement"),Ne=s((pe,_e)=>pe.crossings<_e.crossings||pe.crossings===_e.crossings&&(pe.bends<_e.bends||pe.bends===_e.bends&&pe.length<_e.length),"pairScoreIsBetter"),Ye=s((pe,_e,Ee,Re)=>{let Z=Re;for(let ae of _e.candidates)for(let ie of Ee.candidates){if(!Se(_e,ae,Ee,ie))continue;let le=xe(pe,_e,ae,Ee,ie);le&&Ne(le,Z)&&(Z=le)}return Z},"bestScoreForOptionPair"),We=s(pe=>{let _e=M(),Ee=N(),Re=U(),Z=S(pe),ae=new Map(f.map(re=>[re,js(g(re))])),ie=new Map(f.map(re=>[re,A(g(re))])),le=new Map,ve=C(pe);for(let re of ve)for(let ce of re){if(le.has(ce))continue;let q=J(ce,pe,Re,Z);q.length>0&&le.set(ce,{edge:ce,candidates:q})}let ne={replacements:new Map,crossings:pe.count,bends:_e,length:Ee},Me={current:pe,currentBends:_e,currentLength:Ee,baseBendsByEdge:ae,baseLengthByEdge:ie,baseSegments:Re};for(let re of ve){let ce=new Set(re.filter(de=>pe.edgeSet.has(de))),q=re.map(de=>le.get(de)).filter(de=>!!de);for(let de=0;de0?ne.replacements:void 0},"bestPairedReplacement");for(let pe=0;pe<4;pe++){let _e=x(),Ee=_e.count;if(Ee===0)return;let Re,Z,ae=Ee,ie=Number.POSITIVE_INFINITY;for(let ve of _e.edges){let ne=js(g(ve),nr);for(let Me of Q(ve)){let re=R(ve,Me),ce=!re&&D(ve,Me),q=k(_e,ve,Me),de=js(Me,nr);re||ce||!(qae||q===ae&&de>=ie||(Re=ve,Z=Me,ae=q,ie=de)}}if(Re&&Z){Re.points=Z;continue}let le=We(_e);if(!le)return;for(let[ve,ne]of le)ve.points=ne}}var nr,ga,qr,zO,Kge=F(()=>{"use strict";$l();nr=.001,ga=8,qr=jd,zO=s((e,t)=>jr(e,t,nr)||Zr(e,t,nr),"orthogonallyAligned");s(qge,"separateSharedRenderedTerminalLanes");s(Hge,"collapseRedundantRectangularDoglegs");s(VO,"liftObstacleHuggingSameSideRails");s(WO,"liftTopLaneTitleBandsAboveRails");s(qO,"shiftLeftLaneTitleBandsLeftOfRails");s(Uge,"swapDestinationTerminalTailsToReduceCrossings");s(Yge,"reassignCrossingExternalRailChannels");s(jge,"shortcutRedundantOrthogonalJogs");s(Xge,"resolveRenderedOrthogonalCrossings")});function Zge(e,t){let{nodeInfoById:r,realNodeRects:n}=_y(t),i=["top","bottom","left","right"],a=20,o={top:Math.min(...n.map(y=>y.rect.top))-a,bottom:Math.max(...n.map(y=>y.rect.bottom))+a,left:Math.min(...n.map(y=>y.rect.left))-a,right:Math.max(...n.map(y=>y.rect.right))+a},l=s((y,v,x,b)=>{let T=[],w=r3(y,v,x,b,a,Kd);return w&&T.push(w),v===b&&T.push(n3(y,v,x,o[v])),T},"buildOrthogonalPathCandidates"),u=s((y,v)=>{for(let x=0;x{let b=0,T=jd(y,Kd),w=v.start,C=v.end;for(let k of e){if(k===v||k.isLayoutOnly)continue;let S=k.start,A=k.end;if(!x&&w&&C&&(S===w||S===C||A===w||A===C))continue;let M=k.points;if(!(!M||M.length<2))for(let N of T)for(let D of jd(M,Kd)){if(PO(N.a,N.b,D.a,D.b,Kd,Kd)){b++;continue}Ol(N,D,Kd)>=$nt&&b++}}return b},"pathConflictCount"),d=4,f=s((y,v)=>{let x=Math.abs(y.y-v.rect.top),b=Math.abs(y.y-v.rect.bottom),T=Math.abs(y.x-v.rect.left),w=Math.abs(y.x-v.rect.right),C="top",k=x;return b{let b=p.get(y)??[];b.push({side:v,edgeId:x}),p.set(y,b)},"addFaceClaim");for(let y of e){if(y.isLayoutOnly)continue;let v=y.points??[];if(v.length<1)continue;let x=y.id??"",b=y.start,T=y.end;if(b){let w=r.get(b);w&&m(b,f(v[0],w),x)}if(T){let w=r.get(T);w&&m(T,f(v[v.length-1],w),x)}}let g=s((y,v,x)=>p.get(y)?.some(b=>b.edgeId!==x&&b.side===v)??!1,"faceIsClaimed");for(let y of e){if(y.isLayoutOnly)continue;let v=y.points;if(!v||v.length<2)continue;let x=js(v,Kd);if(x0){let O=h(P,y,!0);if(O>N||O===N&&B>=D)continue;N=O,D=B,M=P;continue}h(P,y)>A||BI.edgeId!==k));let E=p.get(T);E&&p.set(T,E.filter(I=>I.edgeId!==k)),m(b,f(M[0],w),k),m(T,f(M[M.length-1],C),k)}}}var Kd,$nt,Qge=F(()=>{"use strict";$l();Kd=.001,$nt=8;s(Zge,"simplifyDetouredEdges")});function e0e(e,t){let r=t?0:e.length-1,n=t?1:-1,i=e[r],a=e[r+n];if(!i||!a)return;let o=a.x-i.x,l=a.y-i.y;if(!(Math.abs(o)+Math.abs(l)a&&t3(e,Fnt(a)))}function l3(e,t){let r=[];for(let g of e){if(g.isLayoutOnly)continue;let y=g.points;if(!(!y||y.length<2))for(let v=0;v{let v=NO(y,a);for(let{nodeId:x,rect:b}of n)if(x!==g&&t3(v,b))return!0;return!1},"labelOverlapsForeignNode"),h=s((g,y)=>{let v=NO(y,a);for(let x of r)if(x.edgeId!==g&&I2(x.p1,x.p2,v))return!0;return!1},"labelOverlapsForeignEdge"),d=s((g,y,v)=>u(g,v)||h(y,v),"labelOverlapsAnything"),f=[],p=s(g=>{for(let{id:y,rect:v}of i)if(vge(v,g))return y},"findContainingLane"),m=s((g,y)=>f.some(v=>v.labelId!==g&&t3(y,v.rect)),"overlapsPlacedLabel");for(let g of e){if(g.isLayoutOnly)continue;let y=g.labelNodeId;if(!y)continue;let v=t.get(y);if(!v)continue;let x=g.points;if(!x||x.length<2)continue;let b=v.width??0,T=v.height??0;if(b<=0||T<=0)continue;let w=[];for(let V=0;V=Xs&&j>=Xs||w.push({idx:V,length:H+j,orientation:H>=Xs?"horizontal":"vertical",midX:(z.x+W.x)/2,midY:(z.y+W.y)/2})}if(w.length===0)continue;let C=w.length>=3?w.filter(V=>V.idx>0&&V.idx0?C:w,S=b>=T?"horizontal":"vertical",A=s(V=>[...V].sort((z,W)=>{let H=z.orientation===S,j=W.orientation===S;if(H!==j)return H?-1:1;let Q=z.length>=(z.orientation==="horizontal"?b:T)+2,U=W.length>=(W.orientation==="horizontal"?b:T)+2;return Q!==U?Q?-1:1:W.length-z.length}),"rankSegments"),M=w[0],N=w[w.length-1],D=[.5,.25,.75,.05,.95,.15,.85,.1,.9],R=s((V,z)=>{let W=x[V.idx],H=x[V.idx+1];return{midX:W.x+(H.x-W.x)*z,midY:W.y+(H.y-W.y)*z}},"anchorAtT"),E=s((V,z,W)=>Math.min(W,Math.max(z,V)),"clamp"),I=s((V,z)=>V.midX>=z.left-Xs&&V.midX<=z.right+Xs&&V.midY>=z.top-Xs&&V.midY<=z.bottom+Xs,"pointInsideRectInclusive"),L=s(V=>{let z=Ry(V.midX,V.midY,b,T),W=p(z);if(W)return{laneId:W,anchor:V,rect:z};let H=i.find(({rect:se})=>I(V,se));if(!H)return;let j=H.rect.left+b/2+o,Q=H.rect.right-b/2-o,U=H.rect.top+T/2+o,ue=H.rect.bottom-T/2-o;if(j>Q||U>ue)return;let J={midX:E(V.midX,j,Q),midY:E(V.midY,U,ue)},he=Ry(J.midX,J.midY,b,T);return I(V,he)?{laneId:H.id,anchor:J,rect:he}:void 0},"placementForAnchor"),P=s((V,z,W)=>V.orientation==="horizontal"?Math.abs(z.midX-W.x):Math.abs(z.midY-W.y),"distanceAlongSegment"),B=s((V,z)=>{let H=(V.orientation==="horizontal"?b/2:T/2)+l;if(V===M){let j=x[V.idx];if(P(V,z,j)+Xs{let z=A(V);for(let W of z)for(let H of D){let j=R(W,H);if(!B(W,j))continue;let Q=L(j);if(Q&&!t0e(Q.rect,x)&&!m(y,Q.rect)&&!d(y,g.id,Q.rect))return{laneId:Q.laneId,anchor:Q.anchor}}},"tryPool"),$=s((V,z,W=!1)=>{let H=A(V);for(let j of H){let Q={midX:j.midX,midY:j.midY};if(z&&!B(j,Q))continue;let U=L(Q);if(U&&!t0e(U.rect,x)&&!m(y,U.rect)&&!u(y,U.rect)&&(W||!h(g.id,U.rect)))return{laneId:U.laneId,anchor:U.anchor}}},"findLaneContainingFallback"),G=O(k)??(k.lengthW.labelId===y);z>=0?f[z]={labelId:y,rect:V}:f.push({labelId:y,rect:V})}}}var Xs,Jge,o3,r0e=F(()=>{"use strict";$l();Xs=.001,Jge=10,o3=7;s(e0e,"markerClearanceRectFor");s(Fnt,"normalizeRect");s(t0e,"labelOverlapsOwnMarker");s(l3,"anchorLabelsToPolyline")});function i0e(e,t){return e{let d=i0e(l,u),f=0,p=s(m=>{if(!m)return;let g=i.get(m);if(!g)return;let y=h==="x"?g.w/2:g.h/2;y>f&&(f=y)},"consider");p(o.labelNodeId);for(let m of e){if(m===o||m.isLayoutOnly)continue;let g=m.start,y=m.end;!g||!y||i0e(g,y)===d&&p(m.labelNodeId)}return f>0?f+znt:0},"labelClearanceFor");for(let o of e){if(o.isLayoutOnly)continue;let l=o.points;if(!J4(l,HO))continue;let u=i3(o,r,HO);if(!u)continue;let{srcId:h,dstId:d,srcInfo:f,dstInfo:p,collinearX:m,collinearY:g}=u;if(m===g)continue;let y,v;if(m){let C=p.cy>f.cy;y={x:f.cx,y:C?f.rect.bottom:f.rect.top},v={x:p.cx,y:C?p.rect.top:p.rect.bottom}}else{let C=p.cx>f.cx;y={x:C?f.rect.right:f.rect.left,y:f.cy},v={x:C?p.rect.left:p.rect.right,y:p.cy}}if(Vn(y,v,n,[h,d],1))continue;let b=a(o,h,d,m?"x":"y"),T=b>n0e?b:n0e,w=[0,T,-T];for(let C of w){let k={...y},S={...v};if(m){if(k.x+=C,S.x+=C,k.x<=f.rect.left||k.x>=f.rect.right||S.x<=p.rect.left||S.x>=p.rect.right)continue}else if(k.y+=C,S.y+=C,k.y<=f.rect.top||k.y>=f.rect.bottom||S.y<=p.rect.top||S.y>=p.rect.bottom)continue;if(!Vn(k,S,n,[h,d],1)&&!M2(k,S,e,o,{epsilon:HO})){o.points=[k,S];break}}}}var HO,Gnt,n0e,znt,s0e=F(()=>{"use strict";$l();HO=1e-6,Gnt=8,n0e=Gnt/2,znt=3;s(i0e,"pairKey");s(a0e,"straightenCollinearSiblingDetours")});function UO(e,t){let{realNodeRects:h,labelNodeRects:d}=Bc(t.values()),f=s((k,S)=>jd(S,.001).map(A=>({...A,edge:k,interior:A.index>=1&&A.index<=S.length-3})),"segmentsFor"),p=s(()=>{let k=[];for(let S of e){if(S.isLayoutOnly)continue;let A=S.points;!A||A.length<2||k.push(...f(S,Xr(A)))}return k},"allSegments"),m=s((k,S)=>k.horizontal&&S.horizontal?Xa(k.a.x,k.b.x,S.a.x,S.b.x)>=8&&Math.abs(k.a.y-S.a.y)<7:k.vertical&&S.vertical?Xa(k.a.y,k.b.y,S.a.y,S.b.y)>=8&&Math.abs(k.a.x-S.a.x)<7:!1,"hasCrowdedParallelTrack"),g=s((k,S)=>{let A=k.start,M=k.end,N=f(k,S);if(N.length!==S.length-1)return!1;let D=[A,M].filter(E=>!!E),R=k.labelNodeId?[k.labelNodeId]:[];for(let E of N)if(Vn(E.a,E.b,h,D,-2)||Vn(E.a,E.b,d,R,-2))return!1;for(let E of e){if(E===k||E.isLayoutOnly)continue;let I=E.points;if(!(!I||I.length<2)){for(let L of N)for(let P of f(E,Xr(I)))if(m(L,P)||Bl(L.a,L.b,P.a,P.b,.001))return!1}}return!0},"candidateIsSafe"),y=s((k,S)=>{let A=Xr(k.edge.points??[]);if(A.length<4||k.index>=A.length-1)return;let M=A.map(N=>({...N}));if(k.horizontal)M[k.index].y+=S,M[k.index+1].y+=S;else if(k.vertical)M[k.index].x+=S,M[k.index+1].x+=S;else return;return f(k.edge,M).length===M.length-1?M:void 0},"shiftedCandidate"),v=s((k,S)=>({x:k.x??(S.left+S.right)/2,y:k.y??(S.top+S.bottom)/2}),"nodeCenter"),x=s(k=>{let S=k.edge,A=Xr(S.points??[]);if(A.length!==4||k.index!==1)return;let M=S.start?t.get(S.start):void 0,N=S.end?t.get(S.end):void 0,D=M?ma(M):void 0,R=N?ma(N):void 0,E=A.slice(k.index+2);if(!(!M||!N||!D||!R||E.length===0))return{sourceCenter:v(M,D),targetCenter:v(N,R),sourceRect:D,tail:E}},"sourceDetourContextFor"),b=s((k,S,A,M,N,D)=>{let R=M.y>=A.y,E=R?N.bottom:N.top,I=E+(R?20:-20);if(R&&k.b.y<=I+.001||!R&&k.b.y>=I-.001)return;let L=k.a.x+S;return Xr([{x:A.x,y:E},{x:A.x,y:I},{x:L,y:I},{x:L,y:k.b.y},...D],.001)},"verticalSourceDetour"),T=s((k,S,A,M,N,D)=>{let R=M.x>=A.x,E=R?N.right:N.left,I=E+(R?20:-20);if(R&&k.b.x<=I+.001||!R&&k.b.x>=I-.001)return;let L=k.a.y+S;return Xr([{x:E,y:A.y},{x:I,y:A.y},{x:I,y:L},{x:k.b.x,y:L},...D],.001)},"horizontalSourceDetour"),w=s((k,S)=>{let A=x(k);if(A){if(k.vertical)return b(k,S,A.sourceCenter,A.targetCenter,A.sourceRect,A.tail);if(k.horizontal)return T(k,S,A.sourceCenter,A.targetCenter,A.sourceRect,A.tail)}},"sourceDetourCandidate"),C=[-7,7,-14,14,-21,21];for(let k=0;k<12;k++){let S=p(),A=!1;for(let M=0;MI.interior);for(let I of E){for(let L of C){let P=y(I,L);if(P&&g(I.edge,P)){I.edge.points=P,A=!0;break}let B=w(I,L);if(B&&g(I.edge,B)){I.edge.points=B,A=!0;break}}if(A)break}}if(!A)return}}var o0e=F(()=>{"use strict";$l();s(UO,"nudgeSharedInteriorSubpaths")});function Vnt(e,t,r,n){let i=t.x-e.x,a=t.y-e.y,o=n.x-r.x,l=n.y-r.y,u=i*l-a*o;if(Math.abs(u)<1e-10)return!1;let h=r.x-e.x,d=r.y-e.y,f=(h*l-d*o)/u,p=(h*a-d*i)/u,m=.01;return f>m&&f<1-m&&p>m&&p<1-m}function YO(e){let t=e.nodes??[],r=e.edges??[],n=[];if(!r.length||!t.length)return n;let i=xge(t),a=1,o=[];for(let u of r){if(u.isLayoutOnly)continue;let h=u.points;if(!h||h.length<2)continue;let d=u.start,f=u.end,p=u.labelNodeId,m=u.id??`${d}->${f}`;for(let g of i)if(!(g.nodeId===d||g.nodeId===f)&&!(p&&g.nodeId===p)){for(let y=0;y0){let u=n.filter(d=>d.type==="edge-node-overlap").length,h=n.filter(d=>d.type==="edge-edge-crossing").length;te.warn(`[SWIMLANE_VALIDATE] ${n.length} issue(s) detected: ${u} edge-node overlap(s), ${h} edge crossing(s)`);for(let d of n)te.warn(`[SWIMLANE_VALIDATE] ${d.type}: ${d.detail}`)}return n}var l0e=F(()=>{"use strict";Tt();$l();s(Vnt,"segmentsIntersect");s(YO,"validateSwimlanesLayout")});function c0e(e,t){let r=e.nodes??[],n=e.edges??[],i=r.filter(l=>!l.isGroup);if((t==="LR"||t==="RL")&&i.length>0&&!$ge(e,t)||t==="BT"&&i.length>0&&!Bge(e))return;for(let l of n){if(l.isLayoutOnly)continue;let u=l.points;!u||u.length<2||(l.points=Qo(N2(u)))}Zge(n,r),a0e(n,r),Gge(n,r);let a=new Map;for(let l of r)a.set(String(l.id),l);l3(n,a),Dge(n,a),Vge(n,a),UO(n,a),qge(n,a),Hge(n,a),VO(n,a),Uge(n,a);let o=s(()=>{Xge(n,a),Yge(n,a),jge(n,a),l3(n,a),FO(n,a),VO(n,a),l3(n,a),FO(n,a)},"finalizeRenderedEdges");o(),UO(n,a),o(),WO(n,a),qO(n,a),WO(n,a),qO(n,a)}var u0e=F(()=>{"use strict";Mge();$l();Fge();zge();Wge();Kge();Qge();r0e();s0e();o0e();l0e();s(c0e,"postProcessSwimlaneLayout")});function Ks(e){let t=new Map(e.nodeById),r=new Set,n=[];for(let a of e.edges){if(!t.has(a.src)||!t.has(a.dst))continue;let o=`${a.id}:${a.src}->${a.dst}`;r.has(o)||(r.add(o),n.push(a))}return{nodes:[...t.keys()],edges:n,layout:e.layout,nodeById:t}}function c3(e,t){return e.edges.filter(r=>r.dst===t)}function Wnt(e){let t=new Map;for(let r of e.nodes)t.set(r,[]);for(let r of e.edges)t.get(r.src).push(r.dst);return t}function jO(e){let t=Wnt(e);for(let r of t.values())r.sort((n,i)=>n.localeCompare(i));return t}function XO(e){let t=new Map;for(let r of e.nodes)t.set(r,0);for(let r of e.edges)t.set(r.dst,(t.get(r.dst)??0)+1);return t}function KO(e){return[...e.entries()].filter(([,t])=>t===0).map(([t])=>t).sort((t,r)=>t.localeCompare(r))}function Ly(e,t=()=>!0){let r=new Map,n=new Map;for(let i of e.nodes)r.set(i,[]),n.set(i,[]);for(let i of e.edges)t(i)&&(n.get(i.src).push(i.dst),r.get(i.dst).push(i.src));return{preds:r,succs:n}}function u3(e,t,r,n){let i=0;for(let o of e.nodes)n?.skipGroups&&e.nodeById.get(o)?.isGroup||(i=Math.max(i,r[o]??0));let a=Array.from({length:i+1},()=>[]);for(let o of t)n?.skipGroups&&e.nodeById.get(o)?.isGroup||a[Math.max(0,r[o]??0)].push(o);return a}function Zd(e){let t=XO(e),r=KO(t),n=[],i=jO(e);for(;r.length;){let a=r.shift();n.push(a);for(let o of i.get(a)??[])if(t.set(o,(t.get(o)??0)-1),(t.get(o)??0)===0){let l=0;for(;l{if(i-n<=1)return 0;let a=n+i>>1,o=r(n,a)+r(a,i),l=n,u=a,h=n;for(;l=i||l{"use strict";s(Ks,"normalizeGraph");s(c3,"incoming");s(Wnt,"buildSuccessorMap");s(jO,"buildSortedSuccessorMap");s(XO,"buildInDegreeMap");s(KO,"sortedZeroInDegreeNodes");s(Ly,"buildPredecessorSuccessorMaps");s(u3,"buildLayersFromRanks");s(Zd,"topoSortIfAcyclic");s(lm,"buildLayerIndex");s(h3,"countInversions")});function h0e(e){let t=Ks(e),r=new Map;for(let d of t.nodes)r.set(d,[]);for(let d of t.edges)r.get(d.src).push(d);for(let d of r.values())d.sort((f,p)=>f.dst===p.dst?f.id.localeCompare(p.id):f.dst.localeCompare(p.dst));let n=Object.create(null);for(let d of t.nodes)n[d]=0;let i=[],a=s(d=>{n[d]=1;for(let f of r.get(d)??[]){let p=f.dst;n[p]===0?a(p):n[p]===1&&i.push(f)}n[d]=2},"dfs"),o=[...t.nodes].sort((d,f)=>d.localeCompare(f));for(let d of o)n[d]===0&&a(d);let l=new Set(i.map(d=>`${d.id}:${d.src}->${d.dst}`)),u=t.edges.map(d=>l.has(`${d.id}:${d.src}->${d.dst}`)?{id:d.id,src:d.dst,dst:d.src,weight:d.weight,ref:d.ref}:d);return{acyclic:{nodes:[...t.nodes],edges:u,layout:t.layout,nodeById:new Map(t.nodeById)},reversed:i}}var d0e=F(()=>{"use strict";$c();s(h0e,"removeCycles_DFS")});function qnt(e){let t=new Map,r=s(n=>{if(t.has(n))return t.get(n);let i=e.nodeById.get(n);if(!i)return t.set(n,null),null;let a=i.parentId;if(!a)return t.set(n,null),null;let l=r(a)??a;return t.set(n,l),l},"resolve");for(let n of e.nodes)r(n);return t}function Ka(e){let t=qnt(e);return r=>t.get(r)??null}function d3(e){let t=[];for(let r of e.layout.nodes??[])r.isGroup&&!r.parentId&&t.push(r.id);return[...new Set(t)].reverse()}function f3(e,t){let r=d3(e);if(!t||t.length===0)return r;let n=new Set(r),i=new Set,a=[];for(let o of t)!n.has(o)||i.has(o)||(i.add(o),a.push(o));for(let o of r)i.has(o)||a.push(o);return a}var Ju=F(()=>{"use strict";s(qnt,"buildTopLaneMap");s(Ka,"createTopLaneResolver");s(d3,"buildTopLaneOrder");s(f3,"resolveTopLaneOrder")});var f0e,cm,ZO,Dy=F(()=>{"use strict";f0e={EPSILON:1e-6},cm={GRAVITY_ITERATIONS:8,MAX_CROSSING_OPTIMIZATION_PASSES:4,DEFAULT_COMPACT_SINGLE_INPUT:!0},ZO={DEFAULT_LAYER_GAP:100,DEFAULT_NODE_GAP:40}});function p0e(e,t){let r=Ks(e),n=t?.laneOf??(()=>null),i=t?.rankHint,{preds:a}=Ly(r);for(let C of a.values())C.sort((k,S)=>k.localeCompare(S));let o=Zd(r)??[...r.nodes].sort((C,k)=>C.localeCompare(k)),l=new Map;for(let[C,k]of o.entries())l.set(k,C);let u=new Map,h=new Map;for(let C of r.nodes)h.set(C,[]);for(let C of o){let k=(a.get(C)??[]).filter(S=>u.has(S));if(k.length>0){let S=Hnt(C,k,{laneOf:n,rankHint:i,topoIndex:l});u.set(C,S),h.get(S).push(C)}else u.has(C)||u.set(C,null)}for(let C of r.nodes)u.has(C)||u.set(C,null);let d=new Set;for(let C of r.nodes)(u.get(C)??null)===null&&d.add(C);let f=[...d].sort((C,k)=>{let S=l.get(C)??0,A=l.get(k)??0;return S===A?C.localeCompare(k):S-A}),p=Unt(r),m=new Map;for(let[C,k]of p.entries())m.set(C,[...k].sort((S,A)=>S.localeCompare(A)));let g=Ynt(m),y=jnt(m),v=new Map;for(let C of r.nodes)v.set(C,[]);for(let C of y)for(let k of C.nodes){let S=v.get(k);S?S.push(C.id):v.set(k,[C.id])}let x=[],b=[],T=new Set,w=s(C=>{if(!T.has(C)){T.add(C),x.push(C);for(let k of h.get(C)??[])w(k);b.push(C)}},"walk");for(let C of f)w(C);for(let C of o)w(C);return{parent:u,children:h,roots:f,componentOf:g,blocks:y,nodeBlocks:v,adjacency:m,preorder:x,postorder:b,topologicalOrder:o}}function Hnt(e,t,r){let n=r.laneOf(e);return[...t].sort((a,o)=>{let l=r.laneOf(a),u=r.laneOf(o),h=l!=null&&l===n,d=u!=null&&u===n;if(h!==d)return h?-1:1;let f=r.rankHint?.[a],p=r.rankHint?.[o];if(f!=null&&p!=null&&f!==p)return p-f;let m=r.topoIndex.get(a)??0,g=r.topoIndex.get(o)??0;return m!==g?m-g:a.localeCompare(o)})[0]}function Unt(e){let t=new Map;for(let r of e.nodes)t.set(r,new Set);for(let r of e.edges)t.get(r.src).add(r.dst),t.get(r.dst).add(r.src);return t}function Ynt(e){let t=new Map,r=0;for(let n of e.keys()){if(t.has(n))continue;let i=[n];for(;i.length>0;){let a=i.pop();if(!t.has(a)){t.set(a,r);for(let o of e.get(a)??[])t.has(o)||i.push(o)}}r++}return t}function jnt(e){let t=new Map,r=new Map,n=[],i=[],a=0,o=s((l,u)=>{t.set(l,++a),r.set(l,a);for(let h of e.get(l)??[])h!==u&&(t.has(h)?(t.get(h)??0)<(t.get(l)??0)&&(n.push([l,h]),r.set(l,Math.min(r.get(l)??a,t.get(h)??a))):(n.push([l,h]),o(h,l),r.set(l,Math.min(r.get(l)??a,r.get(h)??a)),(r.get(h)??0)>=(t.get(l)??0)&&i.push(Xnt(l,h,n,i.length))))},"visit");for(let l of e.keys())t.has(l)||o(l,null);return i}function Xnt(e,t,r,n){let i=[],a=new Set;for(;r.length>0;){let o=r.pop();if(i.push(o),a.add(o[0]),a.add(o[1]),o[0]===e&&o[1]===t||o[0]===t&&o[1]===e)break}return{id:n,edges:i,nodes:[...a]}}var m0e=F(()=>{"use strict";$c();s(p0e,"buildDrivingTree");s(Hnt,"chooseParent");s(Unt,"buildAdjacency");s(Ynt,"assignComponents");s(jnt,"computeBlocks");s(Xnt,"popBlock")});function g0e(e,t,r){let n=[...e.nodes],i=new Map;for(let[b,T]of n.entries())i.set(T,b);let a=n.length,o=new Array(a).fill(-1),l=new Array(a).fill(0),u=[],h=new Set;for(let b of n){let T=r.parent.get(b)??null,w=i.get(b);w!=null&&T==null&&(o[w]=-1,l[w]=0,h.has(b)||(h.add(b),u.push(b)))}for(;u.length>0;){let b=u.shift(),T=i.get(b);if(T==null)continue;let w=r.children.get(b)??[];for(let C of w){if(h.has(C))continue;let k=i.get(C);k!=null&&(o[k]=T,l[k]=l[T]+1,h.add(C),u.push(C))}}for(let b of n){if(h.has(b))continue;let T=i.get(b);T!=null&&(o[T]=-1,l[T]=0,h.add(b))}let d=Math.max(1,Math.ceil(Math.log2(Math.max(1,a)))+1),f=Array.from({length:d},()=>new Array(a).fill(-1));for(let b=0;b{if(b===-1||T===-1)return-1;l[b]>C&1&&(b=f[C][b],b===-1))return-1;if(b===T)return b;for(let C=d-1;C>=0;C--){let k=f[C][b],S=f[C][T];k===-1||S===-1||k!==S&&(b=k,T=S)}return f[0][b]},"lcaIndex"),m=Array.from({length:a},()=>new Map);for(let b of e.edges){let T=b.src,w=b.dst,C=t[T],k=t[w];if(C==null||k==null||(C>k&&([T,w]=[w,T],[C,k]=[k,C]),C==null||k==null||C===k))continue;let S=i.get(T),A=i.get(w);if(S==null||A==null)continue;let M=p(S,A);if(M===-1)continue;let N=m[M];for(let D=C;D{if(T.size!==0)for(let[w,C]of T)b.set(w,(b.get(w)??0)+C)},"mergeInto"),v=new Set,x=s(b=>{let T=i.get(b);v.add(b);let w=T==null?void 0:m[T],C=w?new Map(w):new Map,k=r.children.get(b)??[];for(let S of k){let A=x(S),M=t[b];if(M!=null){let N=g.get(b);N||(N=new Map,g.set(b,N));let D=A.get(M)??0,R=t[S];R!=null&&R>M&&(D+=1),N.set(S,D)}y(C,A)}return C},"dfs");for(let b of r.roots)v.has(b)||x(b);for(let b of n)v.has(b)||x(b);return g}var y0e=F(()=>{"use strict";s(g0e,"computeSubtreeCrossCounts")});function v0e(e,t,r){let n=new Map,i=s(a=>{let o=r[a]??0,l=[...t.get(a)??[]];l.sort(QO(r));for(let u of l){i(u);let h=n.get(u);h!=null&&(o=Math.min(o,h))}n.set(a,o)},"annotate");for(let a of e)i(a);return n}function QO(e){return(t,r)=>{let n=e[t]??0,i=e[r]??0;return n===i?t.localeCompare(r):n-i}}function x0e(e,t,r,n){let i=0;for(let u of t){let h=r[u]??0;h>i&&(i=h)}let a=Array.from({length:i+1},()=>[]),o=new Set,l=s(u=>{if(o.has(u))return;o.add(u);let h=r[u]??0;a[h]||(a[h]=[]),a[h].push(u);for(let d of n(u))l(d)},"emit");for(let u of e)l(u);for(let u of t)if(!o.has(u)){let h=r[u]??0;a[h]||(a[h]=[]),a[h].push(u),o.add(u)}return a}function b0e(e){let t=[];for(let r of e){let n=new Set,i=[];for(let a of r)n.has(a)||(n.add(a),i.push(a));t.push(i)}return t}var T0e=F(()=>{"use strict";s(v0e,"annotateMinimumLayers");s(QO,"compareByRankThenId");s(x0e,"emitNodesInTreeOrder");s(b0e,"deduplicateLayers")});function Knt(e,t,r,n){return i=>{let a=e.get(i)??[];if(a.length===0)return[];let o=t[i]??0,l=[],u=[],h=r.get(i);for(let d of a){let f=n.get(d)??o;f>o?l.push({child:d,min:f}):u.push(d)}return l.sort((d,f)=>d.min===f.min?d.child.localeCompare(f.child):d.min-f.min),u.sort((d,f)=>{let p=h?.get(d)??0,m=h?.get(f)??0;if(p!==m)return p-m;let g=n.get(d)??o,y=n.get(f)??o;return g!==y?g-y:d.localeCompare(f)}),[...l.map(d=>d.child),...u]}}function P2(e,t,r){let n=p0e(e,{rankHint:t,laneOf:r}),{children:i,roots:a}=n;for(let f of e.nodes)i.has(f)||i.set(f,[]);let o=g0e(e,t,n),l=[...a].sort(QO(t)),u=v0e(l,i,t),h=Knt(i,t,o,u),d=x0e(l,e.nodes,t,h);return d=b0e(d),d}var JO=F(()=>{"use strict";m0e();y0e();T0e();s(Knt,"createChildOrderer");s(P2,"buildMultitreeLayerOrder")});function Znt(e,t,r){let n=new Set(e),i=new Set(t),a=lm(t),o=[];for(let l of r)n.has(l.src)&&i.has(l.dst)&&o.push(a.get(l.dst));return h3(o)}function C0e(e,t,r){let n=[];for(let a of t){let o=r[a.src],l=r[a.dst];if(o==null||l==null||o===l)continue;let u=a.src,h=a.dst,d=o,f=l;o>l&&(u=a.dst,h=a.src,d=l,f=o);for(let p=d;p(r[p]??0)-(r[f]??0));for(let f of d){let p=r[f]??0;if(p===0)continue;let m=0;for(let x of n.get(f)??[])m=Math.max(m,(r[x]??0)+1);if(m>=p)continue;let g=p;r[f]=m;let y=P2(e,r,i),v=C0e(y,e.edges,r);v{"use strict";$c();Dy();Ju();JO();s(Znt,"countCrossingsBetweenAdjacent");s(C0e,"totalCrossings");s(k0e,"optimizeRanksByCrossings")});function S0e(e,t){let r=Ka(e),n=[...e.nodes].sort((i,a)=>(t[i]??0)-(t[a]??0)||i.localeCompare(a));for(let i of n){let a=r(i);if(!a)continue;let o=e.edges.filter(y=>y.src===i);if(o.length===0)continue;let l=!1,u=0;for(let y of o){let v=r(y.dst);v==null||v===a?l=!0:u++}if(u===0||l)continue;let h=0,d=!1;for(let y of e.edges){if(y.dst!==i)continue;let v=r(y.src);v&&(v===a?d=!0:h++)}if(h>0||!d)continue;let f=t[i]??0,p=f+u,m=0;for(let y of e.edges)y.dst===i&&(m=Math.max(m,(t[y.src]??0)+1));let g=Math.max(f,m,p);g!==f&&(t[i]=g)}}var E0e=F(()=>{"use strict";Ju();s(S0e,"adjustCrossLaneSources")});function A0e(e,t){let r=Ks(e),n=Zd(r)??[...r.nodes].sort(),i=t?.compactSingleInput??!1,a=Ka(r),o=Object.create(null);for(let u of n){let h=c3(r,u),d=t?.ignoreCrossLaneEdges?h.filter(f=>{let p=a(f.src),m=a(u);return!p||!m?!0:p===m}):h;if(d.length===0)o[u]=0;else if(i&&d.length===1){let f=d[0].src,p=a(f),m=a(u);p!==m?o[u]=o[f]??0:o[u]=(o[f]??0)+1}else{let f=-1/0;for(let p of d)f=Math.max(f,(o[p.src]??0)+1);o[u]=f===-1/0?0:f}}return(t?.optimizeRanksByCrossings??!1)&&(o=k0e(r,o)),t?.ignoreCrossLaneEdges&&S0e(r,o),{layers:P2(r,o,a),rankOf:o,dummy:new Set}}var R0e=F(()=>{"use strict";$c();Ju();w0e();E0e();JO();s(A0e,"assignLayers_LongestPath")});function _0e(e,t){let r=Ks(e),i={...A0e(r,{compactSingleInput:t?.compactSingleInput,ignoreCrossLaneEdges:t?.ignoreCrossLaneEdges,optimizeRanksByCrossings:t?.optimizeRanksByCrossings}).rankOf},a=Ka(r),{preds:o,succs:l}=Ly(r,g=>{if(t?.ignoreCrossLaneEdges){let y=a(g.src),v=a(g.dst);if(y&&v&&y!==v)return!1}return!0}),u=Zd(r)??[...r.nodes],h=[...u].reverse(),d=s((g,y)=>{let v=0;for(let T of o.get(g)??[])v=Math.max(v,(i[T]??0)+1);let x=Number.POSITIVE_INFINITY,b=l.get(g)??[];return b.length>0&&(x=Math.min(...b.map(T=>(i[T]??0)-1))),Number.isFinite(x)||(x=Math.max(v,y)),Math.min(Math.max(y,v),x)},"clampFeasible"),f=cm.GRAVITY_ITERATIONS,p=s(g=>{let y=!1;for(let v of g){let x=o.get(v)??[],b=l.get(v)??[];if(x.length===0&&b.length===0)continue;let T=x.length>0?x.reduce((S,A)=>S+(i[A]??0)+1,0)/x.length:i[v]??0,w=b.length>0?b.reduce((S,A)=>S+(i[A]??0)-1,0)/b.length:i[v]??0,C=Math.round((T+w)/2),k=d(v,C);k!==i[v]&&(i[v]=k,y=!0)}return y},"relaxOrder");for(let g=0;g0){let v=Math.min(...y.map(x=>(i[x]??0)-1));(i[g]??0)>v&&(i[g]=v)}}return{layers:u3(r,u,i),rankOf:i,dummy:new Set}}var L0e=F(()=>{"use strict";$c();Ju();Dy();R0e();s(_0e,"assignLayers_Gravity")});function Qnt(e){let t=XO(e),r=jO(e),n=KO(t),i=[];for(;n.length>0;){let a=[];for(let o of n){i.push(o);for(let l of r.get(o)??[])t.set(l,(t.get(l)??0)-1),(t.get(l)??0)===0&&a.push(l)}n=a.sort((o,l)=>o.localeCompare(l))}return i.length===e.nodes.length?i:null}function D0e(e,t){let r=Ks(e),n=t?.direction==="LR"?Qnt(r)??[...r.nodes].sort():Zd(r)??[...r.nodes].sort(),i=Ka(r),a=s(d=>i(d)??d,"laneOf"),o=Object.create(null),l=new Map,u=s((d,f)=>t?.ignoreCrossLaneEdges??!0?a(d)===a(f)?1:0:1,"edgeWeight");for(let d of n){if(r.nodeById.get(d)?.isGroup)continue;let p=c3(r,d),m=0;if(p.length>0)for(let x of p){let b=x.src,T=o[b]??0;m=Math.max(m,T+u(b,d))}let g=a(d),y=l.get(g)??0,v=Math.max(m,y);o[d]=v,l.set(g,v+1)}return{layers:u3(r,n,o,{skipGroups:!0}),rankOf:o,dummy:new Set}}var I0e=F(()=>{"use strict";$c();Ju();s(Qnt,"topoSortByGenerationIfAcyclic");s(D0e,"assignLayers_LaneAwareCompact")});function M0e(e,t){let r=Ks(t),{rankOf:n}=e,i=e.layers.map(m=>[...m]),a=new Set(e.dummy?[...e.dummy]:[]),o=0,l=new Map(r.nodeById),u=s(m=>{let g=`placeholder-${o++}`,y={id:g,isGroup:!1,isDummy:!0,width:0,height:0};for(l.set(g,y),a.add(g);i.length<=m;)i.push([]);return i[m].push(g),n[g]=m,g},"addDummyAt"),h=[...r.edges].sort((m,g)=>m.id===g.id?m.src===g.src?m.dst.localeCompare(g.dst):m.src.localeCompare(g.src):m.id.localeCompare(g.id)),d=[];for(let m of h){let g=n[m.src]??0,y=n[m.dst]??0;if(y-g<=1){d.push(m);continue}let v=m.src;for(let b=g+1,T=0;b!r.nodes.includes(m))],edges:d,layout:r.layout,nodeById:l};return{layering:{layers:i,rankOf:n,dummy:a},graphWithDummies:p}}var N0e=F(()=>{"use strict";$c();s(M0e,"makeProperLayering")});function P0e(e){let t=e.length;if(t===0)return Number.POSITIVE_INFINITY;let r=[...e].sort((n,i)=>n-i);return t%2===1?r[(t-1)/2]:.5*(r[t/2-1]+r[t/2])}function O0e(e){return e.length===0?Number.POSITIVE_INFINITY:e.reduce((r,n)=>r+n,0)/e.length}function Jnt(e,t,r,n){let i=new Map;for(let a of e)i.set(a,[]);for(let a of r)n==="down"?t.has(a.src)&&i.has(a.dst)&&i.get(a.dst).push(t.get(a.src)):t.has(a.dst)&&i.has(a.src)&&i.get(a.src).push(t.get(a.dst));return i}function eit(e,t,r){let n=r.get(e)??0,i=r.get(t)??0;return n!==i?n-i:e.localeCompare(t)}function B0e(e,t,r){let n=new Set(e),i=new Set(t),a=lm(e),o=lm(t),l=[];for(let h of r)n.has(h.src)&&i.has(h.dst)&&l.push({u:a.get(h.src),v:o.get(h.dst)});l.sort((h,d)=>h.u===d.u?h.v-d.v:h.u-d.u);let u=l.map(h=>h.v);return h3(u)}function e9(e,t,r){return[...e].sort((n,i)=>{let a=P0e(t.get(n)??[]),o=P0e(t.get(i)??[]);return a===o?eit(n,i,r):isFinite(a)?isFinite(o)?a-o:-1:1})}function $0e(e,t,r,n,i,a){let o=lm(e),l=lm(t),u=Jnt(t,o,r,n);if(!i||!a||a.length===0)return e9(t,u,l);let h=new Map;for(let p of t){let m=i(p),g=h.get(m)??[];g.push(p),h.set(m,g)}let d=[];for(let p of a){let m=h.get(p);if(!m||m.length===0)continue;let g=e9(m,u,l);d.push(...g)}let f=h.get(null);if(f&&f.length>0){let p=e9(f,u,l);for(let m of p){let g=O0e(u.get(m)??[]),y=d.length;if(isFinite(g))for(let[v,x]of d.entries()){let b=O0e(u.get(x)??[]);if(go.has(y.src)&&l.has(y.dst)),d=u?r.filter(y=>l.has(y.src)&&u.has(y.dst)):void 0,f=s(y=>{let v=B0e(e,y,h);return d&&n&&(v+=B0e(y,n,d)),v},"crossingScore"),p=i?new Map:null;if(i&&p)for(let y of t)p.set(y,i(y));let m=!0,g=f(a);for(;m;){m=!1;for(let y=0;y+1[...l]),i=t.edges,a=Ka(t),o=f3(t,r?.laneOrder);for(let l=0;l<3;l++){for(let u=1;u=0;u--)n[u]=$0e(n[u+1],n[u],i,"up",a,o),n[u]=F0e(n[u+1],n[u],i,n[u-1],a)}return{layers:n}}var z0e=F(()=>{"use strict";$c();Ju();s(P0e,"median");s(O0e,"barycenter");s(Jnt,"neighborPositionsFor");s(eit,"currentOrderTieBreak");s(B0e,"countCrossingsBetweenAdjacent");s(e9,"sortByHeuristic");s($0e,"reorderLayer");s(F0e,"transposeImprove");s(G0e,"orderLayers")});function V0e(e,t,r){let n=r?.layerGap??ZO.DEFAULT_LAYER_GAP,i=r?.nodeGap??ZO.DEFAULT_NODE_GAP,a=r?.laneGap??i*2,o=r?.direction??"TB",l=o==="LR"||o==="RL",u=e.layers,h=Object.create(null),d=Object.create(null),f=s(N=>t.nodeById.get(N),"getNode"),p=s(N=>f(N)?.width??0,"getWidth"),m=s(N=>f(N)?.height??0,"getHeight"),g=Ka(t),y=f3(t,r?.laneOrder),v=u.map(N=>N.reduce((D,R)=>Math.max(D,m(R)),0)),x=[];if(l)for(let N=0;N+1Math.max(O,p($)),0),R=u[N+1].reduce((O,$)=>Math.max(O,p($)),0),E=v[N],I=v[N+1],L=E/2+I/2,P=(D+R)/2,B=Math.max(0,P-L-n);x.push(B)}let b=new Set;for(let N of u)for(let D of N)b.add(g(D));let T=b.has(null),w=y.filter(N=>b.has(N)),C=[...T?[null]:[],...w],k=Object.create(null);for(let N of w)k[N]=0;T&&(k.null=0);for(let N of u){let D=Object.create(null),R=[];for(let E of N){let I=g(E);I===null?R.push(E):(D[I]||=[]).push(E)}for(let[E,I]of Object.entries(D)){let L=I.reduce((P,B)=>P+p(B),0)+i*Math.max(0,I.length-1);k[E]=Math.max(k[E]??0,L)}if(T&&R.length){let E=R.reduce((I,L)=>I+p(L),0)+i*Math.max(0,R.length-1);k.null=Math.max(k.null??0,E)}}let S=new Map;{let N=C.map(E=>(E===null?k.null:k[E])??0),R=-(N.reduce((E,I)=>E+I,0)+a*Math.max(0,C.length-1))/2;for(let E=0;Ep(V)),$=O.reduce((V,z)=>V+z,0)+i*(P.length-1),G=B-$/2;for(let[V,z]of P.entries()){let W=O[V];h[z]=G+W/2,d[z]=A+R/2,G+=W+i}}}let I=x[N]??0;A+=R+n+I}let M=new Map;for(let N of t.edges){let D=N.ref.id;M.has(D)||M.set(D,[]),M.get(D).push(N)}for(let[,N]of M){if(N.length===0)continue;let D=N[0].ref,R=D.start,E=D.end;if(R==null||E==null)continue;let I=Math.round(((h[R]??0)+(h[E]??0))/2),L=new Set;for(let P of N)L.add(P.src),L.add(P.dst);for(let P of L){if(P===R||P===E)continue;t.nodeById.get(P)?.isDummy&&(h[P]=I)}}return{x:h,y:d}}var W0e=F(()=>{"use strict";Dy();Ju();s(V0e,"assignCoordinates")});function tit(e){let t=2166136261;for(let r=0;r>>0}function rit(e){let t=e>>>0;return()=>{t+=1831565813;let r=t;return r=Math.imul(r^r>>>15,r|1),r^=r+Math.imul(r^r>>>7,r|61),((r^r>>>14)>>>0)/4294967296}}function nit(e,t){let r=[...e],n=rit(t);for(let i=r.length-1;i>0;i--){let a=Math.floor(n()*(i+1));[r[i],r[a]]=[r[a],r[i]]}return r}function iit(e,t){let r=0;for(let[n,i]of e.entries())r+=Math.abs(n-(t.get(i)??n));return r}function q0e(e,t){let r=new Map;for(let[i,a]of e.entries())r.set(a,i);let n=0;for(let{a:i,b:a,weight:o}of t){let l=r.get(i),u=r.get(a);l==null||u==null||(n+=o*Math.abs(l-u))}return n}function ait(e){let t=d3(e);if(t.length<2)return[];let r=new Map(t.map((a,o)=>[a,o])),n=Ka(e),i=new Map;for(let a of e.layout.edges??[]){if(a.isLayoutOnly)continue;let o=typeof a.start=="string"?a.start:void 0,l=typeof a.end=="string"?a.end:void 0;if(!o||!l||!e.nodeById.has(o)||!e.nodeById.has(l))continue;let u=n(o),h=n(l);if(!u||!h||u===h)continue;let d=r.get(u),f=r.get(h);if(d==null||f==null)continue;let[p,m]=d<=f?[u,h]:[h,u],g=`${p}\0${m}`,y=i.get(g);y?y.weight++:i.set(g,{a:p,b:m,weight:1})}return[...i.values()]}function H0e(e,t,r){let n=[...e],i=q0e(n,t),a=!0,o=0,l=Math.max(1,n.length);for(;a&&oi.a===a.a?i.b.localeCompare(a.b):i.a.localeCompare(a.a)).map(({a:i,b:a,weight:o})=>`${i}:${a}:${o}`).join("|");return tit(`${e.join("|")}#${n}#${r}`)}function U0e(e,t={}){let r=d3(e);if(r.length<2)return r;let n=ait(e);if(n.length===0)return r;let i=new Map(r.map((l,u)=>[l,u])),a=H0e(r,n,i),o=Math.max(0,t.restarts??t9);for(let l=0;l{"use strict";Ju();t9=8;s(tit,"hashString");s(rit,"mulberry32");s(nit,"deterministicShuffle");s(iit,"sourceDistance");s(q0e,"laneArrangementCost");s(ait,"buildWeightedLaneEdges");s(H0e,"greedySwitch");s(sit,"isBetterCandidate");s(oit,"seedForRestart");s(U0e,"optimizeTopLaneOrder")});function j0e(e,t){let r=t?.ignoreCrossLaneEdges??!0,n=t?.optimizeRanksByCrossings??!0,i=Ks(e),a=t?.automaticLaneOrdering?U0e(i,{restarts:t9}):void 0,o=h0e(i),l=o.acyclic,u=r?D0e(l,{compactSingleInput:t?.compactSingleInput??cm.DEFAULT_COMPACT_SINGLE_INPUT,ignoreCrossLaneEdges:!0,direction:t?.direction}):_0e(l,{compactSingleInput:t?.compactSingleInput??cm.DEFAULT_COMPACT_SINGLE_INPUT,ignoreCrossLaneEdges:!1,optimizeRanksByCrossings:n}),{layering:h,graphWithDummies:d}=M0e(u,l),f=G0e(h,d,{laneOrder:a}),p=V0e(f,d,{layerGap:t?.layerGap,nodeGap:t?.nodeGap,direction:t?.direction,laneOrder:a});return{acyclic:l,reversed:o.reversed,layering:h,ordered:f,coordinates:p}}var X0e=F(()=>{"use strict";$c();d0e();L0e();I0e();N0e();z0e();W0e();Dy();Y0e();s(j0e,"sugiyamaLayout")});function K0e(e,t,r){let n=e.x??0,i=e.y??0,a=t.x-n,o=t.y-i,l=Math.abs(a),u=Math.abs(o);return lHr&&u*3>=l?o>0?"bottom":"top":l>Hr?a>0?"right":"left":r}function Z0e(e,t){return Math.abs(e.to-t.from)Z.isGroup&&!Z.parentId);for(let Z of h){let ae={id:Z.id},ie=s(le=>{o.set(le.id,ae),r.filter(ve=>ve.parentId===le.id).forEach(ie)},"assignLane");ie(Z)}let d=r.filter(Z=>!Z.isGroup&&!Z.isEdgeLabel).map(Z=>{let ae=Z.width??10,ie=Z.height??10,le=Z.x??0,ve=Z.y??0,ne=lit;return{nodeId:Z.id,minX:le-ae/2-ne,maxX:le+ae/2+ne,minY:ve-ie/2-ne,maxY:ve+ie/2+ne,visualXHalfExtent:u?ie/2+ne:ae/2+ne}}),f=s((Z,ae,ie,le)=>{let ve=l.find(ne=>ne.orientation===Z&&Math.abs(ne.coord-ae)<1);return ve||(ve={id:`pipe-${Z}-${ae.toFixed(0)}`,orientation:Z,coord:ae,spanMin:ie,spanMax:le,tracks:[]},l.push(ve)),ve.spanMin=Math.min(ve.spanMin,ie),ve.spanMax=Math.max(ve.spanMax,le),ve},"getOrAddPipe"),p=s((Z,ae)=>{let ie=Z.width??10,le=Z.height??10,ve=Z.x??0,ne=Z.y??0;switch(ae){case"top":return{x:ve,y:ne-le/2};case"bottom":return{x:ve,y:ne+le/2};case"left":return{x:ve-ie/2,y:ne};case"right":return{x:ve+ie/2,y:ne}}},"portForSide"),m=s((Z,ae,ie)=>p(Z,K0e(Z,ae,ie?"bottom":"top")),"getOrthogonalPort"),g=[],y=[],v=new Set,x=1e3,b=s((Z,ae,ie)=>{if(g.length===0)return 0;let le=Math.abs(ae.y-ie.y)ce||q.from-Hr<=Me&&q.to+Hr>=Me&&(ne+=x)}else if(ve){let Me=ae.x,re=Math.min(ae.y,ie.y)-Hr,ce=Math.max(ae.y,ie.y)+Hr;if(ce<=re)return 0;for(let q of g)q.edgeIndex===Z||q.orientation!=="horizontal"||q.pipe.coordce||q.from-Hr<=Me&&q.to+Hr>=Me&&(ne+=x)}return ne},"crossingPenalty"),T=i.map((Z,ae)=>{if(!Z.start||!Z.end)return{idx:ae,crossLane:0,dx:0,dy:0};let ie=a.get(Z.start),le=a.get(Z.end),ve=o.get(Z.start),ne=o.get(Z.end),Me=ve&&ne&&ve.id!==ne.id?1:0,re=ie&&le?Math.abs((le.x??0)-(ie.x??0)):0,ce=ie&&le?Math.abs((le.y??0)-(ie.y??0)):0;return{idx:ae,crossLane:Me,dx:re,dy:ce}}).sort((Z,ae)=>{if(Z.crossLane!==ae.crossLane)return ae.crossLane-Z.crossLane;let ie=Z.dx+Z.dy,le=ae.dx+ae.dy;return Math.abs(ie-le)>1?ie-le:Z.idx-ae.idx}).map(Z=>Z.idx),w=s((Z,ae,ie,le)=>{let ve=Math.min(Z.x,ae.x),ne=Math.max(Z.x,ae.x),Me=Math.min(Z.y,ae.y),re=Math.max(Z.y,ae.y);return!!d.find(q=>ie&&q.nodeId===ie||le&&q.nodeId===le?!1:Math.abs(Z.x-ae.x)>Hr?q.minYZ.y&&q.maxX>ve&&q.minXZ.x&&q.maxY>Me&&q.minYK0e(Z,ae,"bottom"),"determineSide"),A=new Map;for(let[Z,ae]of i.entries()){if(!ae.start||!ae.end||ae.start===ae.end||ae.points&&ae.points.length>0)continue;let ie=a.get(ae.start),le=a.get(ae.end);if(!ie||!le)continue;let ve=(le.x??0)-(ie.x??0),ne=(le.y??0)-(ie.y??0);A.set(Z,{edgeIdx:Z,srcId:ae.start,dstId:ae.end,srcSide:S(ie,{x:le.x??0,y:le.y??0}),dstSide:S(le,{x:ie.x??0,y:ie.y??0}),absDx:Math.abs(ve),absDy:Math.abs(ne),dxSign:Math.sign(ve),dySign:Math.sign(ne)})}let M=s(Z=>Z.srcSide==="top"||Z.srcSide==="bottom"?Z.absDx===0?1/0:Z.absDy/Z.absDx:Z.absDy===0?1/0:Z.absDx/Z.absDy,"preferenceStrength"),N=s(Z=>Z.srcSide==="top"||Z.srcSide==="bottom"?Z.dxSign>=0?"right":"left":Z.dySign>=0?"bottom":"top","secondarySide"),D=new Map;for(let Z of A.values()){let ae=`${Z.srcId}:${Z.srcSide}`;D.has(ae)||D.set(ae,[]),D.get(ae).push(Z)}let R=new Map,E=s((Z,ae)=>`${Z}:${ae}`,"loadKey");for(let Z of A.values())R.set(E(Z.srcId,Z.srcSide),(R.get(E(Z.srcId,Z.srcSide))??0)+1),R.set(E(Z.dstId,Z.dstSide),(R.get(E(Z.dstId,Z.dstSide))??0)+1);for(let Z of D.values())if(!(Z.length<2)){Z.sort((ae,ie)=>{let le=M(ae),ve=M(ie);return Math.abs(le-ve)>1e-9?ve-le:ae.edgeIdx-ie.edgeIdx});for(let ae=1;ae=ve||(R.set(E(ie.srcId,ie.srcSide),ve-1),R.set(E(ie.srcId,le),ne+1),ie.srcSide=le)}}let I=s(Z=>{let ae=Z?.shape;return ae==="question"||ae==="diamond"},"isDiamondNode"),L=new Map;for(let Z of A.values())L.has(Z.dstId)||L.set(Z.dstId,new Set),L.get(Z.dstId).add(Z.dstSide);for(let Z of A.values()){if(!I(a.get(Z.srcId)))continue;let ae=L.get(Z.srcId);if(!ae?.has(Z.srcSide))continue;let ie=N(Z);if(ae.has(ie)||(R.get(E(Z.srcId,ie))??0)>0)continue;let le=R.get(E(Z.srcId,Z.srcSide))??0;R.set(E(Z.srcId,Z.srcSide),Math.max(0,le-1)),R.set(E(Z.srcId,ie),1),Z.srcSide=ie}for(let Z of A.values()){let{edgeIdx:ae,srcId:ie,dstId:le,srcSide:ve,dstSide:ne}=Z,Me=a.get(ie),re=a.get(le),ce=`${ie}:${ve}:src`,q=ve==="top"||ve==="bottom"?re.x??0:re.y??0;C.has(ce)||C.set(ce,[]),C.get(ce).push({edgeIdx:ae,oppositeCoord:q});let de=`${le}:${ne}:dst`,X=ne==="top"||ne==="bottom"?Me.x??0:Me.y??0;C.has(de)||C.set(de,[]),C.get(de).push({edgeIdx:ae,oppositeCoord:X})}let P=new Map,B=8;for(let[Z,ae]of C){if(ae.length<2)continue;ae.sort(($e,Oe)=>$e.oppositeCoord-Oe.oppositeCoord);let ie=Z.split(":"),le=ie.slice(0,-2).join(":"),ve=ie[ie.length-2],ne=ie[ie.length-1],Me=a.get(le);if(!Me)continue;let ce=ve==="left"||ve==="right"?Me.height??10:Me.width??10,q=Me.shape,X=q==="question"||q==="diamond"?ce*.3:ce,K=Math.min(20,Math.max(B,X/(ae.length+1))),Ae=-(K*(ae.length-1))/2;for(let[$e,Oe]of ae.entries()){let at=Ae+$e*K,Pe=`${Oe.edgeIdx}:${ne}`;P.set(Pe,at)}}let O=s(Z=>!!i[Z]?.labelNodeId,"edgeHasLabelNode"),$=s((Z,ae)=>Z?(C.get(`${Z}:${ae}:src`)??[]).some(({edgeIdx:ie})=>O(ie))||(C.get(`${Z}:${ae}:dst`)??[]).some(({edgeIdx:ie})=>O(ie)):!1,"faceHasLabelNode"),G=s((Z,ae,ie)=>ae==="top"||ae==="bottom"?{x:Z.x+ie,y:Z.y}:{x:Z.x,y:Z.y+ie},"applyPortOffset"),V=s((Z,ae,ie)=>{let le=A.get(Z),ve={x:ie.x??0,y:ie.y??0},ne={x:ae.x??0,y:ae.y??0},Me=le?.srcSide??S(ae,ve),re=le?.dstSide??S(ie,ne),ce=le?p(ae,le.srcSide):m(ae,ve,!0),q=le?p(ie,le.dstSide):m(ie,ne,!1),de=P.get(`${Z}:src`),X=P.get(`${Z}:dst`);return de!==void 0&&(ce=G(ce,Me,de)),X!==void 0&&(q=G(q,re,X)),{pSrcPort:ce,pDstPort:q,srcSide:Me,dstSide:re}},"portsForEdge");for(let Z of T){let ae=i[Z];if(y[Z]=[],!ae.start||!ae.end||ae.points&&ae.points.length>0||ae.start===ae.end)continue;let ie=a.get(ae.start),le=a.get(ae.end);if(!ie||!le)continue;let{pSrcPort:ve,pDstPort:ne,srcSide:Me,dstSide:re}=V(Z,ie,le),ce={...ve},q={...ne},de=Me==="top"||Me==="bottom",X=re==="top"||re==="bottom";if(de){let Ve=ve.y>(ie.y??0);ce.y=Ve?ve.y+Jo:ve.y-Jo}else{let Ve=ve.x>(ie.x??0);ce.x=Ve?ve.x+Jo:ve.x-Jo}if(X){let Ve=ne.y>(le.y??0);q.y=Ve?ne.y+Jo:ne.y-Jo}else{let Ve=ne.x>(le.x??0);q.x=Ve?ne.x+Jo:ne.x-Jo}let ye=s((Ve,Ze)=>{for(let bt of d)if(!Ze.includes(bt.nodeId)&&Ve.x>bt.minX&&Ve.xbt.minY&&Ve.y{if(ir){let wr=Ve.y>(Ze.y??0);return{x:(bt.x??0)>=Ve.x?Ut.maxX+um:Ut.minX-um,y:wr?Ut.maxY+Iy:Ut.minY-Iy,leavesPositiveSide:wr}}let Yt=Ve.x>(Ze.x??0),zr=(bt.y??0)>=Ve.y;return{x:Yt?Ut.maxX+um:Ut.minX-um,y:zr?Ut.maxY+Iy:Ut.minY-Iy,leavesPositiveSide:Yt}},"obstacleDetour"),Ge=[],Ae=[ae.start,ae.end],$e=ye(ce,Ae);if($e.inside&&$e.obstacle){let Ve=$e.obstacle;if(de){let Ze=K(ve,ie,le,Ve,!0);ce.x=Ze.x,ce.y=Ze.y;let bt=Ze.leavesPositiveSide?Math.min(Ve.minY-2,ve.y+Jo):Math.max(Ve.maxY+2,ve.y-Jo);Ge=[{x:ve.x,y:bt},{x:Ze.x,y:bt},{x:Ze.x,y:Ze.y}]}else{let Ze=K(ve,ie,le,Ve,!1),bt=Ze.leavesPositiveSide?Math.min(Ve.minX-2,ve.x+Jo):Math.max(Ve.maxX+2,ve.x-Jo);ce.x=Ze.x,ce.y=Ze.y,Ge=[{x:bt,y:ve.y},{x:bt,y:Ze.y},{x:Ze.x,y:Ze.y}]}}let Oe=[],at=ye(q,Ae);if(at.inside&&at.obstacle){let Ve=at.obstacle;if(X){let Ze=K(ne,le,ie,Ve,!0);q.x=Ze.x,q.y=Ze.y,Oe=[{x:Ze.x,y:Ze.y},{x:ne.x,y:Ze.y}]}else{let Ze=K(ne,le,ie,Ve,!1);q.x=Ze.x,q.y=Ze.y,Oe=[{x:Ze.x,y:Ze.y},{x:Ze.x,y:ne.y}]}}if(Ge.length===0&&Oe.length===0){let Ve=um,Ze=Math.abs(ce.x-q.x)1||Yt>1,wr=k.get(ae.start??"")??0,At=k.get(ae.end??"")??0,kt=ir>1&&$(ae.start,Me)||Yt>1&&$(ae.end,re),Ot=ir<=1||wr<=2,zt=Yt<=1||At<=2;if((Ze||bt)&&!Ut&&(!zr||zr&&!kt&&Ot&&zt)&&!w(ve,ne,ae.start,ae.end)){ae.points=[{...ve},{...ce},{...q},{...ne}],v.add(Z);let Ce=bt?"horizontal":"vertical",Un=bt?ve.y:ve.x,De=bt?Math.min(ve.x,ne.x):Math.min(ve.y,ne.y),Dr=bt?Math.max(ve.x,ne.x):Math.max(ve.y,ne.y),wa={id:`fast-path-${Ce}-${Un.toFixed(0)}-${Z}`,orientation:Ce,coord:Un,spanMin:De,spanMax:Dr,tracks:[]};g.push({edgeIndex:Z,segmentIndex:0,orientation:Ce,pipe:wa,trackIndex:0,from:De,to:Dr});continue}}let Pe=f("vertical",ce.x,ce.y,ce.y);ce.x=Pe.coord;let Ke=f("vertical",q.x,q.y,q.y);q.x=Ke.coord;let qe=Math.min(ce.x,q.x)-50,Be=Math.max(ce.x,q.x)+50,Xe=Math.min(ce.y,q.y)-50,be=Math.max(ce.y,q.y)+50;for(let Ve of d){let Ze=Math.min(ce.x,q.x),bt=Math.max(ce.x,q.x),Ut=Math.min(ce.y,q.y),ir=Math.max(ce.y,q.y);Ve.minXZe&&Ve.minYUt&&(qe=Math.min(qe,Ve.minX-p3),Be=Math.max(Be,Ve.maxX+p3),Xe=Math.min(Xe,Ve.minY-p3),be=Math.max(be,Ve.maxY+p3))}for(let Ve of d){if(Ve.maxXBe||Ve.maxYbe)continue;let Ze=um;f("horizontal",Ve.minY-Ze,qe,Be),f("horizontal",Ve.maxY+Ze,qe,Be);let bt=Iy;f("vertical",Ve.minX-bt,Xe,be),f("vertical",Ve.maxX+bt,Xe,be)}f("horizontal",ce.y,qe,Be),f("horizontal",q.y,qe,Be);let vt=l.filter(Ve=>Ve.orientation==="horizontal"&&Ve.coord>=Xe&&Ve.coord<=be),ke=l.filter(Ve=>Ve.orientation==="vertical"&&Ve.coord>=qe&&Ve.coord<=Be),It=s((Ve,Ze)=>`${Ve.toFixed(1)},${Ze.toFixed(1)}`,"getKey"),Ft=It(ce.x,ce.y),yt=It(q.x,q.y),Et=new Map,gt=new Map,ge=new Map,nt=new Set,pt=[];Et.set(Ft,0),ge.set(Ft,"n"),pt.push({key:Ft,f:Math.hypot(q.x-ce.x,q.y-ce.y),pt:ce}),nt.add(Ft);let Qe=[],we=s((Ve,Ze)=>w(Ve,Ze,ae.start,ae.end),"checkSegmentBlocked"),tt={x:q.x,y:ce.y},st=we(ce,tt),mt=we(tt,q),Bt=st||mt,Gt={x:ce.x,y:q.y},Xt=we(ce,Gt),rr=we(Gt,q);if(Bt?Xt||rr||(Math.abs(ce.x-q.x)0;){pt.sort((At,kt)=>At.f-kt.f);let Ve=pt.shift();if(nt.delete(Ve.key),Ve.key===yt){let At=yt,kt=q;for(Qe=[kt];gt.has(At);){let Ot=gt.get(At);Qe.unshift(Ot),kt=Ot,At=It(Ot.x,Ot.y)}break}let Ze=Ve.pt.x,bt=Ve.pt.y,Ut=ke.sort((At,kt)=>At.coord-kt.coord),ir=Ut.findIndex(At=>Math.abs(At.coord-Ze)<1),Yt=vt.sort((At,kt)=>At.coord-kt.coord),zr=Yt.findIndex(At=>Math.abs(At.coord-bt)<1),wr=[];ir>0&&wr.push({x:Ut[ir-1].coord,y:bt}),ir>=0&&ir0&&wr.push({x:Ze,y:Yt[zr-1].coord}),zr>=0&&zrIs.nodeId===ae.start||Is.nodeId===ae.end?!1:kt!==Ot?Is.minYbt&&Is.maxX>kt&&Is.minXZe&&Is.maxY>zt&&Is.minY<_t))continue;let Ce=It(At.x,At.y),Un=Math.abs(At.x-Ze)+Math.abs(At.y-bt),De=b(Z,Ve.pt,At),Dr=0,wa=q.x-ce.x,pu=q.y-ce.y,Hg=At.x-Ze,Ug=At.y-bt;(pu>10&&Ug<-5||pu<-10&&Ug>5)&&(Dr=Math.abs(Ug)*100),(wa>10&&Hg<-5||wa<-10&&Hg>5)&&(Dr+=Math.abs(Hg)*50);let ck=0,Ei=ge.get(Ve.key)??"n",Ql=Math.abs(Hg)>Hr?"h":"v";Ei!=="n"&&Ei!==Ql&&(ck=50);let Hv=Un+De+Dr+ck,Fh=(Et.get(Ve.key)??1/0)+Hv,uk=Math.abs(q.x-At.x)+Math.abs(q.y-At.y);if(Fh<(Et.get(Ce)??1/0))if(gt.set(Ce,Ve.pt),Et.set(Ce,Fh),ge.set(Ce,Ql),!nt.has(Ce))pt.push({key:Ce,f:Fh+uk,pt:At}),nt.add(Ce);else{let Is=pt.findIndex(X_=>X_.key===Ce);Is!==-1&&(pt[Is].f=Fh+uk)}}}if(Qe.length===0&&(Qe=[ce,{x:ce.x,y:q.y},q]),Qe.length>4){let Ve=Qe[0],Ze=Qe[Qe.length-1],bt=Math.min(Ve.x,Ze.x),Ut=Math.max(Ve.x,Ze.x),ir=Math.min(Ve.y,Ze.y),Yt=Math.max(Ve.y,Ze.y);for(let zt of Qe)bt=Math.min(bt,zt.x),Ut=Math.max(Ut,zt.x),ir=Math.min(ir,zt.y),Yt=Math.max(Yt,zt.y);let zr=Ut>Math.max(Ve.x,Ze.x),wr=btDe.minX<_t&&De.maxX>_t&&De.minYpr);if(Un.length>0){let De=Math.max(Ve.x,Ze.x);for(let Dr of Un){let wa=(Dr.minX+Dr.maxX)/2;if(Dr.visualXHalfExtent===void 0||isNaN(Dr.visualXHalfExtent))continue;let pu=wa+Dr.visualXHalfExtent+zt;De=Math.max(De,pu)}isNaN(De)||(Ut=De)}}if(wr){let _t=d.filter(pr=>pr.minXMath.min(Ve.y,Ze.y));if(_t.length>0){let pr=Math.min(Ve.x,Ze.x);for(let Ce of _t){let De=(Ce.minX+Ce.maxX)/2-Ce.visualXHalfExtent-zt;pr=Math.min(pr,De)}bt=pr}}}let At=s(zt=>{let _t=Ze.y>Ve.y,pr=d.filter(De=>{let Dr=Math.min(Ve.x,Ze.x)De.minX,wa=Math.min(Ve.y,Ze.y)De.minY;return Dr&&wa}),Ce=pr;if(u&&pr.length>0){let De=pr.filter(Dr=>Dr.minXzt);De.length>0&&(Ce=De)}if(Ce.length===0)return Ze.y;let Un=um;if(_t){let Dr=Math.max(...Ce.map(wa=>wa.maxY))+Un;if(Drwa.minY))-Un;if(Dr>Ze.y+Hr)return Dr}return Ze.y},"findBestReturnY"),kt=s(zt=>{let _t=At(zt),pr={x:zt,y:Ve.y},Ce={x:zt,y:_t},Un={x:Ze.x,y:_t},De=we(Ve,pr),Dr=we(pr,Ce),wa=we(Ce,Un),pu=_t!==Ze.y?we(Un,Ze):!1;return!De&&!Dr&&!wa&&!pu?Math.abs(_t-Ze.y)=3){let Ve=Ie[Ie.length-1],Ze=Ie[Ie.length-2],bt=Ie[Ie.length-3],Ut=Math.abs(bt.y-Ze.y)Math.abs(Ve.x-bt.x)&&Ie.splice(-2,1)}else if(ir){let Yt=Math.sign(Ze.y-bt.y),zr=Math.sign(Ve.y-bt.y);Yt!==0&&Yt===zr&&Math.abs(Ze.y-bt.y)>Math.abs(Ve.y-bt.y)&&Ie.splice(-2,1)}}let it=[Ie[0]];for(let Ve=1;VeZe.x,Yt=Ut.x>bt.x;if(ir!==Yt){it.push(bt);continue}continue}if(Math.abs(Ze.x-bt.x)Ze.y,Yt=Ut.y>bt.y;if(ir!==Yt){it.push(bt);continue}continue}it.push(bt)}it.push(Ie[Ie.length-1]);for(let Ve=0;VeZ.from{let ve=!le.segments.some(Me=>(Me.edgeIndex!==ae.edgeIndex||Me.segmentIndex!==ae.segmentIndex)&&z(Me,Z)),ne=!ie.segments.some(Me=>(Me.edgeIndex!==Z.edgeIndex||Me.segmentIndex!==Z.segmentIndex)&&z(Me,ae));return ve&&ne?(Z.trackIndex=le.index,ae.trackIndex=ie.index,ie.segments=[...ie.segments.filter(Me=>Me.edgeIndex!==Z.edgeIndex||Me.segmentIndex!==Z.segmentIndex),{edgeIndex:ae.edgeIndex,segmentIndex:ae.segmentIndex,from:ae.from,to:ae.to}],le.segments=[...le.segments.filter(Me=>Me.edgeIndex!==ae.edgeIndex||Me.segmentIndex!==ae.segmentIndex),{edgeIndex:Z.edgeIndex,segmentIndex:Z.segmentIndex,from:Z.from,to:Z.to}],!0):!1},"trySwapSegmentsAcrossTracks"),H=s(Z=>{let ae=Z.tracks.length;return Z.tracks[ae]={index:ae,coord:Z.coord,segments:[]},ae},"createNewTrack"),j=s((Z,ae)=>{let ie=Z.pipe.tracks[Z.trackIndex];ie.segments=ie.segments.filter(ve=>ve.edgeIndex!==Z.edgeIndex||ve.segmentIndex!==Z.segmentIndex),Z.trackIndex=ae,Z.pipe.tracks[ae].segments.push({edgeIndex:Z.edgeIndex,segmentIndex:Z.segmentIndex,from:Z.from,to:Z.to})},"moveSegmentToTrack"),Q=s((Z,ae)=>{let ie=y[Z.edgeIndex];for(let le of ie){let ve=g[le];ve.pipe===Z.pipe&&j(ve,ae)}},"moveSegmentChainToTrack"),U=s(Z=>{let ae=y[Z.edgeIndex],ie=ae.indexOf(g.indexOf(Z)),le=[];return ie>0&&le.push(g[ae[ie-1]]),ie{if(Z.orientation===ae.orientation)return!1;let ie=Z.orientation==="horizontal"?Z:ae,le=Z.orientation==="horizontal"?ae:Z;return le.pipe.coord>ie.from&&le.pipe.coordle.from&&ie.pipe.coord{for(let ie of Z.tracks)if(!ie.segments.some(ve=>(ve.edgeIndex!==ae.edgeIndex||ve.segmentIndex!==ae.segmentIndex)&&z(ve,ae)))return ie.index;return-1},"findAvailableTrack"),he=s((Z,ae)=>{if(Z.trackIndex===ae.trackIndex)return z(Z,ae);let ie=U(Z),le=U(ae);return ie.some(ve=>le.some(ne=>ue(ve,ne)))},"segmentsConflict"),se=s((Z,ae,ie)=>{if(W(Z,ae,Z.pipe.tracks[Z.trackIndex],ae.pipe.tracks[ae.trackIndex]))return;let le=J(Z.pipe,ae);ie(ae,le!==-1?le:H(Z.pipe))},"resolveTrackConflict"),oe=s(Z=>{let ae=0;for(let ie=0;ie{if(Se.has(Z))return Se.get(Z);let ae=y[Z];if(ae.length===0){let re={dest:0,deviation:0,base:0,delta:0};return Se.set(Z,re),re}let le=g[ae[0]].pipe.coord,ve=le;for(let re=1;reMath.abs(de-le)?q:de;break}}let ne=Math.abs(ve-le),Me={dest:ve,deviation:ne,base:le,delta:ve-le};return Se.set(Z,Me),Me},"getDestInfo"),Ne=s(()=>{let Z=0,ae=new Map;for(let[le,ve]of i.entries())y[le].length!==0&&ve.start&&(ae.has(ve.start)||ae.set(ve.start,[]),ae.get(ve.start).push(le));let ie=s(le=>{let ve=i[le];if(!ve.start||!ve.end)return 0;let ne=a.get(ve.start),Me=a.get(ve.end);if(!ne||!Me)return 0;let re=(Me.x??0)-(ne.x??0),ce=(Me.y??0)-(ne.y??0);return Math.abs(re)+Math.abs(ce)},"getEdgeDistance");for(let le of ae.values()){le.sort((ne,Me)=>{let re=xe(ne),ce=xe(Me);if(Math.abs(re.deviation-ce.deviation)>1)return re.deviation-ce.deviation;if(Math.abs(re.dest-ce.dest)>1)return re.dest-ce.dest;let q=ie(ne),de=ie(Me);if(Math.abs(q-de)>1)return de-q;let X=y[ne].length,ye=y[Me].length;if(X!==ye)return X-ye;if(X===1){let K=y[ne][0],Ge=y[Me][0];if(g[K]&&g[Ge]){let Ae=g[K],$e=g[Ge],Oe=Math.abs(Ae.to-Ae.from),at=Math.abs($e.to-$e.from);if(Math.abs(Oe-at)>1)return Oe-at}}return 0});let ve=le.map(ne=>g[y[ne][0]]);Z+=oe(ve)}return Z},"fixSourceHandleCrossings"),Ye=s(()=>{let Z=0,ae=new Map;for(let[ie,le]of i.entries())y[ie].length!==0&&le.end&&(ae.has(le.end)||ae.set(le.end,[]),ae.get(le.end).push(ie));for(let ie of ae.values()){ie.sort((ve,ne)=>{let Me=s(q=>{let de=y[q];if(de.length<2)return 0;let X=g[de[de.length-2]];return Math.abs(X.to-X.from)},"getDist"),re=Me(ve),ce=Me(ne);return Math.abs(re-ce)>.1?re-ce:ve-ne});let le=ie.map(ve=>g[y[ve][y[ve].length-1]]);Z+=oe(le)}return Z},"fixTargetHandleCrossings"),We=s(()=>{let Z=0;for(let ae of l){let ie=[];for(let le of ae.tracks)for(let ve of le.segments){let ne=y[ve.edgeIndex].find(Me=>g[Me].segmentIndex===ve.segmentIndex);ne!==void 0&&ie.push(g[ne])}ie.sort((le,ve)=>le.edgeIndex-ve.edgeIndex||le.segmentIndex-ve.segmentIndex);for(let le=0;le{le.segments.forEach(ve=>{ae.push({edgeIndex:ve.edgeIndex,segmentIndex:ve.segmentIndex,trackIndex:le.index,from:ve.from,to:ve.to})})}),ae.sort((le,ve)=>le.from-ve.from);let ie=[];if(ae.length>0){let le=[ae[0]],ve=ae[0].to;for(let ne=1;neve.add(K.trackIndex));let ne=new Map;le.forEach(K=>{let Ge=xe(K.edgeIndex);ne.set(K.trackIndex,(ne.get(K.trackIndex)??0)+Ge.delta)});let Me=[...ve].filter(K=>(ne.get(K)??0)<-1),re=[...ve].filter(K=>(ne.get(K)??0)>1),ce=[...ve].filter(K=>Math.abs(ne.get(K)??0)<=1);Me.sort((K,Ge)=>(ne.get(Ge)??0)-(ne.get(K)??0)),re.sort((K,Ge)=>(ne.get(K)??0)-(ne.get(Ge)??0));let q=s((K,Ge)=>{le.filter(Ae=>Ae.trackIndex===K).forEach(Ae=>{let $e=v.has(Ae.edgeIndex)?Z.coord:Ge;Ee.set(`${Ae.edgeIndex}-${Ae.segmentIndex}`,$e)})},"assignCoord"),de=0;for(let K of Me)de++,q(K,Z.coord-de*r9);if(ce.length===0&&ve.size>0){let K=[...ve].sort(($e,Oe)=>Math.abs(ne.get($e)??0)-Math.abs(ne.get(Oe)??0))[0],Ge=Me.indexOf(K);Ge!==-1&&Me.splice(Ge,1);let Ae=re.indexOf(K);Ae!==-1&&re.splice(Ae,1),ce.push(K)}let X=0;for(let K of ce){if(X===0)q(K,Z.coord);else{let Ge=X%2===1?1:-1,Ae=Math.ceil(X/2);q(K,Z.coord+Ge*Ae*r9*.5)}X++}let ye=0;for(let K of re)ye++,q(K,Z.coord+ye*r9)}}for(let[Z,ae]of i.entries()){let ie=y[Z]??[];if(ie.length===0)continue;let le=[],ve=a.get(ae.start),ne=a.get(ae.end),{pSrcPort:Me,pDstPort:re}=V(Z,ve,ne),ce=ie.map(X=>{let ye=g[X],K=Ee.get(`${ye.edgeIndex}-${ye.segmentIndex}`)??ye.pipe.coord;return{orient:ye.orientation,coord:K,from:ye.from,to:ye.to}});le.push(Me);for(let X=0;XHr&&le.push(My(ye,Ge)),Oe&&$e.orient===ye.orient)if(Math.abs(ye.coord-$e.coord)>Hr){let at=ye.orient==="vertical"?(Ge+$e.from)/2:Z0e(ye,$e);le.push(My(ye,at),My($e,at))}else(X===0||X===ce.length-2)&&le.push(My(ye,Z0e(ye,$e)));else if(Oe)le.push(My(ye,$e.coord));else{let at=Math.abs(ye.from-Ge)Hr||Math.abs(q.y-re.y)>Hr)&&le.push(re);let de=[];le.length>0&&de.push(le[0]);for(let X=1;XHr||Math.abs(ye.y-K.y)>Hr)&&de.push(ye)}ae.points=de}for(let Z of i){let ae=Z.__originalEdge;ae&&Z.points&&(ae.points=Z.points)}e.edges=(e.edges??[]).filter(Z=>!Z.isLayoutOnly);let Re=s((Z,ae)=>{let ie=ae.x??0,le=ae.y??0,ve=ae.width??0,ne=ae.height??0;if(ve<=0||ne<=0)return Z;let Me=ie-ve/2,re=ie+ve/2,ce=le-ne/2,q=le+ne/2;if(Z.xre||Z.yq)return Z;let de=Z.x-Me,X=re-Z.x,ye=Z.y-ce,K=q-Z.y,Ge=Math.min(de,X,ye,K);return Ge===de?{x:Me,y:Z.y}:Ge===X?{x:re,y:Z.y}:Ge===ye?{x:Z.x,y:ce}:{x:Z.x,y:q}},"nodeBoundaryClamp");for(let Z of e.edges){let ae=Z.points;if(!ae||ae.length<2)continue;let ie=Z.start,le=Z.end,ve=ie?a.get(ie):void 0,ne=le?a.get(le):void 0;ve&&(ae[0]=Re(ae[0],ve)),ne&&(ae[ae.length-1]=Re(ae[ae.length-1],ne))}return e}var Hr,lit,um,Iy,p3,Jo,r9,J0e=F(()=>{"use strict";Dy();Hr=f0e.EPSILON,lit=8,um=15,Iy=15,p3=25,Jo=20,r9=10;s(K0e,"chooseOrthogonalSide");s(Z0e,"sharedLineEndpointCoord");s(My,"pointOnLine");s(Q0e,"routeEdgesOrthogonal")});function cit(e){return e.direction??"TB"}function eye(e){let t=hge(e),r=e.config.flowchart?.nodeSpacing??40,n=e.config.flowchart?.rankSpacing??100,i=e.config.swimlane?.ignoreCrossLaneEdges??!0,a=e.config.swimlane?.optimizeRanksByCrossings??!0,o=e.config.swimlane?.automaticLaneOrdering??!1,l=cit(e),{ordered:u,coordinates:h}=j0e(t,{nodeGap:r,layerGap:n,ignoreCrossLaneEdges:i,optimizeRanksByCrossings:a,automaticLaneOrdering:o,direction:l});dge(t,u,h,{nodeGap:r,layerGap:n});for(let d of e.edges??[])delete d.points;Q0e(e,l);for(let d of e.edges??[])(!d.curve||d.curve==="basis")&&(d.curve="rounded");return c0e(e,l),YO(e),l}var tye=F(()=>{"use strict";u0e();MO();X0e();J0e();s(cit,"getSwimlaneDirection");s(eye,"runSwimlaneLayoutCore")});var rye={};ar(rye,{render:()=>hit});function uit(e){uge(e);let t=fge(e);e.nodes=t.nodes,e.edges=t.edges}var hit,nye=F(()=>{"use strict";K4();lge();MO();pge();tye();s(uit,"prepareSwimlaneLayout");hit=Ay({prepareLayout:uit,runLayoutCore:eye,afterPaint:oge})});function MB(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r=e.length?{done:!0}:{done:!1,value:e[n++]}},"n"),e:s(function(u){throw u},"e"),f:i}}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 a,o=!0,l=!1;return{s:s(function(){r=r.call(e)},"s"),n:s(function(){var u=r.next();return o=u.done,u},"n"),e:s(function(u){l=!0,a=u},"e"),f:s(function(){try{o||r.return==null||r.return()}finally{if(l)throw a}},"f")}}function Ive(e,t,r){return(t=Mve(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function mit(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function git(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,a,o,l=[],u=!0,h=!1;try{if(a=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=a.call(r)).done)&&(l.push(n.value),l.length!==t);u=!0);}catch(d){h=!0,i=d}finally{try{if(!u&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(h)throw i}}return l}}function yit(){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 vit(){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 zi(e,t){return dit(e)||git(e,t)||JB(e,t)||yit()}function F3(e){return fit(e)||mit(e)||JB(e)||vit()}function xit(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function Mve(e){var t=xit(e,"string");return typeof t=="symbol"?t:t+""}function Ji(e){"@babel/helpers - typeof";return Ji=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ji(e)}function JB(e,t){if(e){if(typeof e=="string")return MB(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?MB(e,t):void 0}}function oT(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function lT(){if(sye)return n9;sye=1;function e(t){var r=typeof t;return t!=null&&(r=="object"||r=="function")}return s(e,"isObject"),n9=e,n9}function Vit(){if(oye)return i9;oye=1;var e=typeof m3=="object"&&m3&&m3.Object===Object&&m3;return i9=e,i9}function e5(){if(lye)return a9;lye=1;var e=Vit(),t=typeof self=="object"&&self&&self.Object===Object&&self,r=e||t||Function("return this")();return a9=r,a9}function Wit(){if(cye)return s9;cye=1;var e=e5(),t=s(function(){return e.Date.now()},"now");return s9=t,s9}function qit(){if(uye)return o9;uye=1;var e=/\s/;function t(r){for(var n=r.length;n--&&e.test(r.charAt(n)););return n}return s(t,"trimmedEndIndex"),o9=t,o9}function Hit(){if(hye)return l9;hye=1;var e=qit(),t=/^\s+/;function r(n){return n&&n.slice(0,e(n)+1).replace(t,"")}return s(r,"baseTrim"),l9=r,l9}function r$(){if(dye)return c9;dye=1;var e=e5(),t=e.Symbol;return c9=t,c9}function Uit(){if(fye)return u9;fye=1;var e=r$(),t=Object.prototype,r=t.hasOwnProperty,n=t.toString,i=e?e.toStringTag:void 0;function a(o){var l=r.call(o,i),u=o[i];try{o[i]=void 0;var h=!0}catch{}var d=n.call(o);return h&&(l?o[i]=u:delete o[i]),d}return s(a,"getRawTag"),u9=a,u9}function Yit(){if(pye)return h9;pye=1;var e=Object.prototype,t=e.toString;function r(n){return t.call(n)}return s(r,"objectToString"),h9=r,h9}function Vve(){if(mye)return d9;mye=1;var e=r$(),t=Uit(),r=Yit(),n="[object Null]",i="[object Undefined]",a=e?e.toStringTag:void 0;function o(l){return l==null?l===void 0?i:n:a&&a in Object(l)?t(l):r(l)}return s(o,"baseGetTag"),d9=o,d9}function jit(){if(gye)return f9;gye=1;function e(t){return t!=null&&typeof t=="object"}return s(e,"isObjectLike"),f9=e,f9}function cT(){if(yye)return p9;yye=1;var e=Vve(),t=jit(),r="[object Symbol]";function n(i){return typeof i=="symbol"||t(i)&&e(i)==r}return s(n,"isSymbol"),p9=n,p9}function Xit(){if(vye)return m9;vye=1;var e=Hit(),t=lT(),r=cT(),n=NaN,i=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,o=/^0o[0-7]+$/i,l=parseInt;function u(h){if(typeof h=="number")return h;if(r(h))return n;if(t(h)){var d=typeof h.valueOf=="function"?h.valueOf():h;h=t(d)?d+"":d}if(typeof h!="string")return h===0?h:+h;h=e(h);var f=a.test(h);return f||o.test(h)?l(h.slice(2),f?2:8):i.test(h)?n:+h}return s(u,"toNumber"),m9=u,m9}function Kit(){if(xye)return g9;xye=1;var e=lT(),t=Wit(),r=Xit(),n="Expected a function",i=Math.max,a=Math.min;function o(l,u,h){var d,f,p,m,g,y,v=0,x=!1,b=!1,T=!0;if(typeof l!="function")throw new TypeError(n);u=r(u)||0,e(h)&&(x=!!h.leading,b="maxWait"in h,p=b?i(r(h.maxWait)||0,u):p,T="trailing"in h?!!h.trailing:T);function w(E){var I=d,L=f;return d=f=void 0,v=E,m=l.apply(L,I),m}s(w,"invokeFunc");function C(E){return v=E,g=setTimeout(A,u),x?w(E):m}s(C,"leadingEdge");function k(E){var I=E-y,L=E-v,P=u-I;return b?a(P,p-L):P}s(k,"remainingWait");function S(E){var I=E-y,L=E-v;return y===void 0||I>=u||I<0||b&&L>=p}s(S,"shouldInvoke");function A(){var E=t();if(S(E))return M(E);g=setTimeout(A,k(E))}s(A,"timerExpired");function M(E){return g=void 0,T&&d?w(E):(d=f=void 0,m)}s(M,"trailingEdge");function N(){g!==void 0&&clearTimeout(g),v=0,d=y=f=g=void 0}s(N,"cancel");function D(){return g===void 0?m:M(t())}s(D,"flush");function R(){var E=t(),I=S(E);if(d=arguments,f=this,y=E,I){if(g===void 0)return C(y);if(b)return clearTimeout(g),g=setTimeout(A,u),w(y)}return g===void 0&&(g=setTimeout(A,u)),m}return s(R,"debounced"),R.cancel=N,R.flush=D,R}return s(o,"debounce"),g9=o,g9}function tat(e,t,r,n,i){var a=i*Math.PI/180,o=Math.cos(a)*(e-r)-Math.sin(a)*(t-n)+r,l=Math.sin(a)*(e-r)+Math.cos(a)*(t-n)+n;return{x:o,y:l}}function nat(e,t,r){if(r===0)return e;var n=(t.x1+t.x2)/2,i=(t.y1+t.y2)/2,a=t.w/t.h,o=1/a,l=tat(e.x,e.y,n,i,r),u=rat(l.x,l.y,n,i,a,o);return{x:u.x,y:u.y}}function pat(){return wye||(wye=1,(function(e,t){(function(){var r,n,i,a,o,l,u,h,d,f,p,m,g,y,v;i=Math.floor,f=Math.min,n=s(function(x,b){return xb?1:0},"defaultCmp"),d=s(function(x,b,T,w,C){var k;if(T==null&&(T=0),C==null&&(C=n),T<0)throw new Error("lo must be non-negative");for(w==null&&(w=x.length);TN;0<=N?M++:M--)A.push(M);return A}).apply(this).reverse(),S=[],w=0,C=k.length;wD;0<=D?++A:--A)R.push(o(x,T));return R},"nsmallest"),y=s(function(x,b,T,w){var C,k,S;for(w==null&&(w=n),C=x[T];T>b;){if(S=T-1>>1,k=x[S],w(C,k)<0){x[T]=k,T=S;continue}break}return x[T]=C},"_siftdown"),v=s(function(x,b,T){var w,C,k,S,A;for(T==null&&(T=n),C=x.length,A=b,k=x[b],w=2*b+1;w-1}return s(t,"listCacheHas"),H9=t,H9}function oot(){if(h1e)return U9;h1e=1;var e=s5();function t(r,n){var i=this.__data__,a=e(i,r);return a<0?(++this.size,i.push([r,n])):i[a][1]=n,this}return s(t,"listCacheSet"),U9=t,U9}function lot(){if(d1e)return Y9;d1e=1;var e=not(),t=iot(),r=aot(),n=sot(),i=oot();function a(o){var l=-1,u=o==null?0:o.length;for(this.clear();++l-1&&n%1==0&&n0;){var d=i.shift();t(d),a.add(d.id()),l&&n(i,a,d)}return e}function xxe(e,t,r){if(r.isParent())for(var n=r._private.children,i=0;i0&&arguments[0]!==void 0?arguments[0]:xlt,t=arguments.length>1?arguments[1]:void 0,r=0;r0?R=I:D=I;while(Math.abs(E)>o&&++L=a?b(N,L):P===0?L:w(N,D,D+h)}s(C,"getTForX");var k=!1;function S(){k=!0,(e!==t||r!==n)&&T()}s(S,"precompute");var A=s(function(D){return k||S(),e===t&&r===n?D:D===0?0:D===1?1:v(C(D),t,n)},"f");A.getControlPoints=function(){return[{x:e,y:t},{x:r,y:n}]};var M="generateBezier("+[e,t,r,n]+")";return A.toString=function(){return M},A}function tve(e,t,r,n,i){if(n===1||t===r)return r;var a=i(t,r,n);return e==null||((e.roundValue||e.color)&&(a=Math.round(a)),e.min!==void 0&&(a=Math.max(a,e.min)),e.max!==void 0&&(a=Math.min(a,e.max))),a}function rve(e,t){return e.pfValue!=null||e.value!=null?e.pfValue!=null&&(t==null||t.type.units!=="%")?e.pfValue:e.value:e}function Oy(e,t,r,n,i){var a=i!=null?i.type:null;r<0?r=0:r>1&&(r=1);var o=rve(e,i),l=rve(t,i);if(Vt(o)&&Vt(l))return tve(a,o,l,r,n);if($n(o)&&$n(l)){for(var u=[],h=0;h0?(m==="spring"&&g.push(o.duration),o.easingImpl=M3[m].apply(null,g)):o.easingImpl=M3[m]}var y=o.easingImpl,v;if(o.duration===0?v=1:v=(r-u)/o.duration,o.applying&&(v=o.progress),v<0?v=0:v>1&&(v=1),o.delay==null){var x=o.startPosition,b=o.position;if(b&&i&&!e.locked()){var T={};F2(x.x,b.x)&&(T.x=Oy(x.x,b.x,v,y)),F2(x.y,b.y)&&(T.y=Oy(x.y,b.y,v,y)),e.position(T)}var w=o.startPan,C=o.pan,k=a.pan,S=C!=null&&n;S&&(F2(w.x,C.x)&&(k.x=Oy(w.x,C.x,v,y)),F2(w.y,C.y)&&(k.y=Oy(w.y,C.y,v,y)),e.emit("pan"));var A=o.startZoom,M=o.zoom,N=M!=null&&n;N&&(F2(A,M)&&(a.zoom=Q2(a.minZoom,Oy(A,M,v,y),a.maxZoom)),e.emit("zoom")),(S||N)&&e.emit("viewport");var D=o.style;if(D&&D.length>0&&i){for(var R=0;R=0;S--){var A=k[S];A()}k.splice(0,k.length)},"callbacks"),b=m.length-1;b>=0;b--){var T=m[b],w=T._private;if(w.stopped){m.splice(b,1),w.hooked=!1,w.playing=!1,w.started=!1,x(w.frames);continue}!w.playing&&!w.applying||(w.playing&&w.applying&&(w.applying=!1),w.started||Mlt(d,T,e),Ilt(d,T,e,f),w.applying&&(w.applying=!1),x(w.frames),w.step!=null&&w.step(e),T.completed()&&(m.splice(b,1),w.hooked=!1,w.playing=!1,w.started=!1,x(w.completes)),y=!0)}return!f&&m.length===0&&g.length===0&&n.push(d),y}s(i,"stepOne");for(var a=!1,o=0;o0?t.notify("draw",r):t.notify("draw")),r.unmerge(n),t.emit("step")}function Bxe(e){this.options=xr({},zlt,Vlt,e)}function $xe(e){this.options=xr({},Wlt,e)}function Fxe(e){this.options=xr({},qlt,e)}function p5(e){this.options=xr({},Hlt,e),this.options.layout=this;var t=this.options.eles.nodes(),r=this.options.eles.edges(),n=r.filter(function(i){var a=i.source().data("id"),o=i.target().data("id"),l=t.some(function(h){return h.data("id")===a}),u=t.some(function(h){return h.data("id")===o});return!l||!u});this.options.eles=this.options.eles.not(n)}function Wxe(e){this.options=xr({},sct,e)}function v$(e){this.options=xr({},oct,e)}function qxe(e){this.options=xr({},lct,e)}function Hxe(e){this.options=xr({},cct,e)}function Uxe(e){this.options=e,this.notifications=0}function Xxe(e,t){t.radius===0?e.lineTo(t.cx,t.cy):e.arc(t.cx,t.cy,t.radius,t.startAngle,t.endAngle,t.counterClockwise)}function b$(e,t,r,n){var i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0;return n===0||t.radius===0?{cx:t.x,cy:t.y,radius:0,startX:t.x,startY:t.y,stopX:t.x,stopY:t.y,startAngle:void 0,endAngle:void 0,counterClockwise:void 0}:(dct(e,t,r,n,i),{cx:qB,cy:HB,radius:mm,startX:Yxe,startY:jxe,stopX:UB,stopY:YB,startAngle:zc.ang+Math.PI/2*ym,endAngle:el.ang-Math.PI/2*ym,counterClockwise:O3})}function Kxe(e){var t=[];if(e!=null){for(var r=0;r5&&arguments[5]!==void 0?arguments[5]:5,o=Math.min(a,n/2,i/2);e.beginPath(),e.moveTo(t+o,r),e.lineTo(t+n-o,r),e.quadraticCurveTo(t+n,r,t+n,r+o),e.lineTo(t+n,r+i-o),e.quadraticCurveTo(t+n,r+i,t+n-o,r+i),e.lineTo(t+o,r+i),e.quadraticCurveTo(t,r+i,t,r+i-o),e.lineTo(t,r+o),e.quadraticCurveTo(t,r,t+o,r),e.closePath()}function kve(e,t,r){var n=e.createShader(t);if(e.shaderSource(n,r),e.compileShader(n),!e.getShaderParameter(n,e.COMPILE_STATUS))throw new Error(e.getShaderInfoLog(n));return n}function nut(e,t,r){var n=kve(e,e.VERTEX_SHADER,t),i=kve(e,e.FRAGMENT_SHADER,r),a=e.createProgram();if(e.attachShader(a,n),e.attachShader(a,i),e.linkProgram(a),!e.getProgramParameter(a,e.LINK_STATUS))throw new Error("Could not initialize shaders");return a}function iut(e,t,r){r===void 0&&(r=t);var n=e.makeOffscreenCanvas(t,r),i=n.context=n.getContext("2d");return n.clear=function(){return i.clearRect(0,0,n.width,n.height)},n.clear(),n}function k$(e){var t=e.pixelRatio,r=e.cy.zoom(),n=e.cy.pan();return{zoom:r*t,pan:{x:n.x*t,y:n.y*t}}}function aut(e){var t=e.pixelRatio,r=e.cy.zoom();return r*t}function sut(e,t,r,n,i){var a=n*r+t.x,o=i*r+t.y;return o=Math.round(e.canvasHeight-o),[a,o]}function out(e,t){return t.picking?!0:e.pstyle("background-fill").value!=="solid"||e.pstyle("background-image").strValue!=="none"?!1:e.pstyle("border-width").value===0||e.pstyle("border-opacity").value===0?!0:e.pstyle("border-style").value==="solid"}function lut(e,t){if(e.length!==t.length)return!1;for(var r=0;r>0&255)/255,r[1]=(e>>8&255)/255,r[2]=(e>>16&255)/255,r[3]=(e>>24&255)/255,r}function cut(e){return e[0]+(e[1]<<8)+(e[2]<<16)+(e[3]<<24)}function uut(e,t){var r=e.createTexture();return r.buffer=function(n){e.bindTexture(e.TEXTURE_2D,r),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.LINEAR_MIPMAP_NEAREST),e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!0),e.texImage2D(e.TEXTURE_2D,0,e.RGBA,e.RGBA,e.UNSIGNED_BYTE,n),e.generateMipmap(e.TEXTURE_2D),e.bindTexture(e.TEXTURE_2D,null)},r.deleteTexture=function(){e.deleteTexture(r)},r}function ube(e,t){switch(t){case"float":return[1,e.FLOAT,4];case"vec2":return[2,e.FLOAT,4];case"vec3":return[3,e.FLOAT,4];case"vec4":return[4,e.FLOAT,4];case"int":return[1,e.INT,4];case"ivec2":return[2,e.INT,4]}}function hbe(e,t,r){switch(t){case e.FLOAT:return new Float32Array(r);case e.INT:return new Int32Array(r)}}function hut(e,t,r,n,i,a){switch(t){case e.FLOAT:return new Float32Array(r.buffer,a*n,i);case e.INT:return new Int32Array(r.buffer,a*n,i)}}function dut(e,t,r,n){var i=ube(e,t),a=zi(i,2),o=a[0],l=a[1],u=hbe(e,l,n),h=e.createBuffer();return e.bindBuffer(e.ARRAY_BUFFER,h),e.bufferData(e.ARRAY_BUFFER,u,e.STATIC_DRAW),l===e.FLOAT?e.vertexAttribPointer(r,o,l,!1,0,0):l===e.INT&&e.vertexAttribIPointer(r,o,l,0,0),e.enableVertexAttribArray(r),e.bindBuffer(e.ARRAY_BUFFER,null),h}function Gc(e,t,r,n){var i=ube(e,r),a=zi(i,3),o=a[0],l=a[1],u=a[2],h=hbe(e,l,t*o),d=o*u,f=e.createBuffer();e.bindBuffer(e.ARRAY_BUFFER,f),e.bufferData(e.ARRAY_BUFFER,t*d,e.DYNAMIC_DRAW),e.enableVertexAttribArray(n),l===e.FLOAT?e.vertexAttribPointer(n,o,l,!1,d,0):l===e.INT&&e.vertexAttribIPointer(n,o,l,d,0),e.vertexAttribDivisor(n,1),e.bindBuffer(e.ARRAY_BUFFER,null);for(var p=new Array(t),m=0;mabe?(_ut(e),t.call(e,a)):(Lut(e),mbe(e,a,j2.SCREEN)))}}{var r=e.matchCanvasSize;e.matchCanvasSize=function(a){r.call(e,a),e.pickingFrameBuffer.setFramebufferAttachmentSizes(e.canvasWidth,e.canvasHeight),e.pickingFrameBuffer.needsDraw=!0}}e.findNearestElements=function(a,o,l,u){return Out(e,a,o)};{var n=e.invalidateCachedZSortedEles;e.invalidateCachedZSortedEles=function(){n.call(e),e.pickingFrameBuffer.needsDraw=!0}}{var i=e.notify;e.notify=function(a,o){i.call(e,a,o),a==="viewport"||a==="bounds"?e.pickingFrameBuffer.needsDraw=!0:a==="background"&&e.drawing.invalidate(o,{type:"node-body"})}}}function _ut(e){var t=e.data.contexts[e.WEBGL];t.clear(t.COLOR_BUFFER_BIT|t.DEPTH_BUFFER_BIT)}function Lut(e){var t=s(function(n){n.save(),n.setTransform(1,0,0,1,0,0),n.clearRect(0,0,e.canvasWidth,e.canvasHeight),n.restore()},"clear");t(e.data.contexts[e.NODE]),t(e.data.contexts[e.DRAG])}function Dut(e){var t=e.canvasWidth,r=e.canvasHeight,n=k$(e),i=n.pan,a=n.zoom,o=AB();$3(o,o,[i.x,i.y]),XB(o,o,[a,a]);var l=AB();gut(l,t,r);var u=AB();return mut(u,l,o),u}function pbe(e,t){var r=e.canvasWidth,n=e.canvasHeight,i=k$(e),a=i.pan,o=i.zoom;t.setTransform(1,0,0,1,0,0),t.clearRect(0,0,r,n),t.translate(a.x,a.y),t.scale(o,o)}function Iut(e,t){e.drawSelectionRectangle(t,function(r){return pbe(e,r)})}function Mut(e){var t=e.data.contexts[e.NODE];t.save(),pbe(e,t),t.strokeStyle="rgba(0, 0, 0, 0.3)",t.beginPath(),t.moveTo(-1e3,0),t.lineTo(1e3,0),t.stroke(),t.beginPath(),t.moveTo(0,-1e3),t.lineTo(0,1e3),t.stroke(),t.restore()}function Nut(e){var t=s(function(i,a,o){for(var l=i.atlasManager.getAtlasCollection(a),u=e.data.contexts[e.NODE],h=l.atlases,d=0;d=0&&w.add(S)}return w}function Out(e,t,r){var n=Put(e,t,r),i=e.getCachedZSortedEles(),a,o,l=Qs(n),u;try{for(l.s();!(u=l.n()).done;){var h=u.value,d=i[h];if(!a&&d.isNode()&&(a=d),!o&&d.isEdge()&&(o=d),a&&o)break}}catch(f){l.e(f)}finally{l.f()}return[a,o].filter(Boolean)}function IB(e,t,r){var n=e.drawing;t+=1,r.isNode()?(n.drawNode(r,t,"node-underlay"),n.drawNode(r,t,"node-body"),n.drawTexture(r,t,"label"),n.drawNode(r,t,"node-overlay")):(n.drawEdgeLine(r,t),n.drawEdgeArrow(r,t,"source"),n.drawEdgeArrow(r,t,"target"),n.drawTexture(r,t,"label"),n.drawTexture(r,t,"edge-source-label"),n.drawTexture(r,t,"edge-target-label"))}function mbe(e,t,r){var n;e.webglDebug&&(n=performance.now());var i=e.drawing,a=0;if(r.screen&&e.data.canvasNeedsRedraw[e.SELECT_BOX]&&Iut(e,t),e.data.canvasNeedsRedraw[e.NODE]||r.picking){var o=e.data.contexts[e.WEBGL];r.screen?(o.clearColor(0,0,0,0),o.enable(o.BLEND),o.blendFunc(o.ONE,o.ONE_MINUS_SRC_ALPHA)):o.disable(o.BLEND),o.clear(o.COLOR_BUFFER_BIT|o.DEPTH_BUFFER_BIT),o.viewport(0,0,o.canvas.width,o.canvas.height);var l=Dut(e),u=e.getCachedZSortedEles();if(a=u.length,i.startFrame(l,r),r.screen){for(var h=0;h{"use strict";s(MB,"_arrayLikeToArray");s(dit,"_arrayWithHoles");s(fit,"_arrayWithoutHoles");s(ff,"_classCallCheck");s(pit,"_defineProperties");s(pf,"_createClass");s(Qs,"_createForOfIteratorHelper");s(Ive,"_defineProperty$1");s(mit,"_iterableToArray");s(git,"_iterableToArrayLimit");s(yit,"_nonIterableRest");s(vit,"_nonIterableSpread");s(zi,"_slicedToArray");s(F3,"_toConsumableArray");s(xit,"_toPrimitive");s(Mve,"_toPropertyKey");s(Ji,"_typeof");s(JB,"_unsupportedIterableToArray");Zi=typeof window>"u"?null:window,iye=Zi?Zi.navigator:null;Zi&&Zi.document;bit=Ji(""),Nve=Ji({}),Tit=Ji(function(){}),Cit=typeof HTMLElement>"u"?"undefined":Ji(HTMLElement),aT=s(function(t){return t&&t.instanceString&&hi(t.instanceString)?t.instanceString():null},"instanceStr"),fr=s(function(t){return t!=null&&Ji(t)==bit},"string"),hi=s(function(t){return t!=null&&Ji(t)===Tit},"fn"),$n=s(function(t){return!So(t)&&(Array.isArray?Array.isArray(t):t!=null&&t instanceof Array)},"array"),an=s(function(t){return t!=null&&Ji(t)===Nve&&!$n(t)&&t.constructor===Object},"plainObject"),kit=s(function(t){return t!=null&&Ji(t)===Nve},"object"),Vt=s(function(t){return t!=null&&Ji(t)===Ji(1)&&!isNaN(t)},"number"),wit=s(function(t){return Vt(t)&&Math.floor(t)===t},"integer"),G3=s(function(t){if(Cit!=="undefined")return t!=null&&t instanceof HTMLElement},"htmlElement"),So=s(function(t){return sT(t)||Pve(t)},"elementOrCollection"),sT=s(function(t){return aT(t)==="collection"&&t._private.single},"element"),Pve=s(function(t){return aT(t)==="collection"&&!t._private.single},"collection"),e$=s(function(t){return aT(t)==="core"},"core"),Ove=s(function(t){return aT(t)==="stylesheet"},"stylesheet"),Sit=s(function(t){return aT(t)==="event"},"event"),of=s(function(t){return t==null?!0:!!(t===""||t.match(/^\s+$/))},"emptyString"),Eit=s(function(t){return typeof HTMLElement>"u"?!1:t instanceof HTMLElement},"domElement"),Ait=s(function(t){return an(t)&&Vt(t.x1)&&Vt(t.x2)&&Vt(t.y1)&&Vt(t.y2)},"boundingBox"),Rit=s(function(t){return kit(t)&&hi(t.then)},"promise"),_it=s(function(){return iye&&iye.userAgent.match(/msie|trident|edge/i)},"ms"),Xy=s(function(t,r){r||(r=s(function(){if(arguments.length===1)return arguments[0];if(arguments.length===0)return"undefined";for(var a=[],o=0;or?1:0},"ascending"),Oit=s(function(t,r){return-1*$ve(t,r)},"descending"),xr=Object.assign!=null?Object.assign.bind(Object):function(e){for(var t=arguments,r=1;r1&&(v-=1),v<1/6?g+(y-g)*6*v:v<1/2?y:v<2/3?g+(y-g)*(2/3-v)*6:g}s(d,"hue2rgb");var f=new RegExp("^"+Iit+"$").exec(t);if(f){if(n=parseInt(f[1]),n<0?n=(360- -1*n%360)%360:n>360&&(n=n%360),n/=360,i=parseFloat(f[2]),i<0||i>100||(i=i/100,a=parseFloat(f[3]),a<0||a>100)||(a=a/100,o=f[4],o!==void 0&&(o=parseFloat(o),o<0||o>1)))return;if(i===0)l=u=h=Math.round(a*255);else{var p=a<.5?a*(1+i):a+i-a*i,m=2*a-p;l=Math.round(255*d(m,p,n+1/3)),u=Math.round(255*d(m,p,n)),h=Math.round(255*d(m,p,n-1/3))}r=[l,u,h,o]}return r},"hsl2tuple"),Fit=s(function(t){var r,n=new RegExp("^"+Lit+"$").exec(t);if(n){r=[];for(var i=[],a=1;a<=3;a++){var o=n[a];if(o[o.length-1]==="%"&&(i[a]=!0),o=parseFloat(o),i[a]&&(o=o/100*255),o<0||o>255)return;r.push(Math.floor(o))}var l=i[1]||i[2]||i[3],u=i[1]&&i[2]&&i[3];if(l&&!u)return;var h=n[4];if(h!==void 0){if(h=parseFloat(h),h<0||h>1)return;r.push(h)}}return r},"rgb2tuple"),Git=s(function(t){return zit[t.toLowerCase()]},"colorname2tuple"),Fve=s(function(t){return($n(t)?t:null)||Git(t)||Bit(t)||Fit(t)||$it(t)},"color2tuple"),zit={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]},Gve=s(function(t){for(var r=t.map,n=t.keys,i=n.length,a=0;a1&&arguments[1]!==void 0?arguments[1]:gm,n=r,i;i=t.next(),!i.done;)n=n*qve+i.value|0;return n},"hashIterableInts"),X2=s(function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:gm;return r*qve+t|0},"hashInt"),K2=s(function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:zy;return(r<<5)+r+t|0},"hashIntAlt"),Jit=s(function(t,r){return t*2097152+r},"combineHashes"),Qd=s(function(t){return t[0]*2097152+t[1]},"combineHashesArray"),g3=s(function(t,r){return[X2(t[0],r[0]),K2(t[1],r[1])]},"hashArrays"),bye=s(function(t,r){var n={value:0,done:!1},i=0,a=t.length,o={next:s(function(){return i=0;i--)t[i]===r&&t.splice(i,1)},"removeFromArray"),a$=s(function(t){t.splice(0,t.length)},"clearArray"),cat=s(function(t,r){for(var n=0;n"u"?"undefined":Ji(Set))!==hat?Set:dat,t5=s(function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(t===void 0||r===void 0||!e$(t)){ii("An element must have a core reference and parameters set");return}var i=r.group;if(i==null&&(r.data&&r.data.source!=null&&r.data.target!=null?i="edges":i="nodes"),i!=="nodes"&&i!=="edges"){ii("An element must be of type `nodes` or `edges`; you specified `"+i+"`");return}this.length=1,this[0]=this;var a=this._private={cy:t,single:!0,data:r.data||{},position:r.position||{x:0,y:0},autoWidth:void 0,autoHeight:void 0,autoPadding:void 0,compoundBoundsClean:!1,listeners:[],group:i,style:{},rstyle:{},styleCxts:[],styleKeys:{},removed:!0,selected:!!r.selected,selectable:r.selectable===void 0?!0:!!r.selectable,locked:!!r.locked,grabbed:!1,grabbable:r.grabbable===void 0?!0:!!r.grabbable,pannable:r.pannable===void 0?i==="edges":!!r.pannable,active:!1,classes:new e1,animation:{current:[],queue:[]},rscratch:{},scratch:r.scratch||{},edges:[],children:[],parent:r.parent&&r.parent.isNode()?r.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(a.position.x==null&&(a.position.x=0),a.position.y==null&&(a.position.y=0),r.renderedPosition){var o=r.renderedPosition,l=t.pan(),u=t.zoom();a.position={x:(o.x-l.x)/u,y:(o.y-l.y)/u}}var h=[];$n(r.classes)?h=r.classes:fr(r.classes)&&(h=r.classes.split(/\s+/));for(var d=0,f=h.length;d0;){var k=b.pop(),S=v(k),A=k.id();if(p[A]=S,S!==1/0)for(var M=k.neighborhood().intersect(g),N=0;N0)for(O.unshift(B);f[G];){var V=f[G];O.unshift(V.edge),O.unshift(V.node),$=V.node,G=$.id()}return l.spawn(O)},"pathTo")}},"dijkstra")},xat={kruskal:s(function(t){t=t||function(T){return 1};for(var r=this.byGroup(),n=r.nodes,i=r.edges,a=n.length,o=new Array(a),l=n,u=s(function(w){for(var C=0;C0;){if(C(),S++,w===d){for(var A=[],M=a,N=d,D=x[N];A.unshift(M),D!=null&&A.unshift(D),M=v[N],M!=null;)N=M.id(),D=x[N];return{found:!0,distance:f[w],path:this.spawn(A),steps:S}}m[w]=!0;for(var R=T._private.edges,E=0;ED&&(g[N]=D,b[N]=M,T[N]=C),!a){var R=M*d+A;!a&&g[R]>D&&(g[R]=D,b[R]=A,T[R]=C)}}}for(var E=0;E1&&arguments[1]!==void 0?arguments[1]:o,Ee=T(pe),Re=[],Z=Ee;;){if(Z==null)return r.spawn();var ae=b(Z),ie=ae.edge,le=ae.pred;if(Re.unshift(Z[0]),Z.same(_e)&&Re.length>0)break;ie!=null&&Re.unshift(ie),Z=le}return u.spawn(Re)},"pathTo"),k=0;k=0;d--){var f=h[d],p=f[1],m=f[2];(r[p]===l&&r[m]===u||r[p]===u&&r[m]===l)&&h.splice(d,1)}for(var g=0;gi;){var a=Math.floor(Math.random()*r.length);r=Aat(a,t,r),n--}return r},"contractUntil"),Rat={kargerStein:s(function(){var t=this,r=this.byGroup(),n=r.nodes,i=r.edges;i.unmergeBy(function(O){return O.isLoop()});var a=n.length,o=i.length,l=Math.ceil(Math.pow(Math.log(a)/Math.LN2,2)),u=Math.floor(a/Eat);if(a<2){ii("At least 2 nodes are required for Karger-Stein algorithm");return}for(var h=[],d=0;d1&&arguments[1]!==void 0?arguments[1]:0,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:t.length,i=1/0,a=r;a1&&arguments[1]!==void 0?arguments[1]:0,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:t.length,i=-1/0,a=r;a1&&arguments[1]!==void 0?arguments[1]:0,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:t.length,i=0,a=0,o=r;o1&&arguments[1]!==void 0?arguments[1]:0,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:t.length,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!0;i?t=t.slice(r,n):(n0&&t.splice(0,r));for(var l=0,u=t.length-1;u>=0;u--){var h=t[u];o?isFinite(h)||(t[u]=-1/0,l++):t.splice(u,1)}a&&t.sort(function(p,m){return p-m});var d=t.length,f=Math.floor(d/2);return d%2!==0?t[f+1+l]:(t[f-1+l]+t[f+l])/2},"median"),Nat=s(function(t){return Math.PI*t/180},"deg2rad"),y3=s(function(t,r){return Math.atan2(r,t)-Math.PI/2},"getAngleFromDisp"),s$=Math.log2||function(e){return Math.log(e)/Math.log(2)},o$=s(function(t){return t>0?1:t<0?-1:0},"signum"),bm=s(function(t,r){return Math.sqrt(pm(t,r))},"dist"),pm=s(function(t,r){var n=r.x-t.x,i=r.y-t.y;return n*n+i*i},"sqdist"),Pat=s(function(t){for(var r=t.length,n=0,i=0;i=t.x1&&t.y2>=t.y1)return{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2,w:t.x2-t.x1,h:t.y2-t.y1};if(t.w!=null&&t.h!=null&&t.w>=0&&t.h>=0)return{x1:t.x1,y1:t.y1,x2:t.x1+t.w,y2:t.y1+t.h,w:t.w,h:t.h}}},"makeBoundingBox"),Bat=s(function(t){return{x1:t.x1,x2:t.x2,w:t.w,y1:t.y1,y2:t.y2,h:t.h}},"copyBoundingBox"),$at=s(function(t){t.x1=1/0,t.y1=1/0,t.x2=-1/0,t.y2=-1/0,t.w=0,t.h=0},"clearBoundingBox"),Fat=s(function(t,r){t.x1=Math.min(t.x1,r.x1),t.x2=Math.max(t.x2,r.x2),t.w=t.x2-t.x1,t.y1=Math.min(t.y1,r.y1),t.y2=Math.max(t.y2,r.y2),t.h=t.y2-t.y1},"updateBoundingBox"),Qve=s(function(t,r,n){t.x1=Math.min(t.x1,r),t.x2=Math.max(t.x2,r),t.w=t.x2-t.x1,t.y1=Math.min(t.y1,n),t.y2=Math.max(t.y2,n),t.h=t.y2-t.y1},"expandBoundingBoxByPoint"),_3=s(function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return t.x1-=r,t.x2+=r,t.y1-=r,t.y2+=r,t.w=t.x2-t.x1,t.h=t.y2-t.y1,t},"expandBoundingBox"),L3=s(function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[0],n,i,a,o;if(r.length===1)n=i=a=o=r[0];else if(r.length===2)n=a=r[0],o=i=r[1];else if(r.length===4){var l=zi(r,4);n=l[0],i=l[1],a=l[2],o=l[3]}return t.x1-=o,t.x2+=i,t.y1-=n,t.y2+=a,t.w=t.x2-t.x1,t.h=t.y2-t.y1,t},"expandBoundingBoxSides"),Eye=s(function(t,r){t.x1=r.x1,t.y1=r.y1,t.x2=r.x2,t.y2=r.y2,t.w=t.x2-t.x1,t.h=t.y2-t.y1},"assignBoundingBox"),l$=s(function(t,r){return!(t.x1>r.x2||r.x1>t.x2||t.x2r.y2||r.y1>t.y2)},"boundingBoxesIntersect"),rf=s(function(t,r,n){return t.x1<=r&&r<=t.x2&&t.y1<=n&&n<=t.y2},"inBoundingBox"),Aye=s(function(t,r){return rf(t,r.x,r.y)},"pointInBoundingBox"),Jve=s(function(t,r){return rf(t,r.x1,r.y1)&&rf(t,r.x2,r.y2)},"boundingBoxInBoundingBox"),Gat=(b9=Math.hypot)!==null&&b9!==void 0?b9:function(e,t){return Math.sqrt(e*e+t*t)};s(zat,"inflatePolygon");s(Vat,"miterBox");exe=s(function(t,r,n,i,a,o,l){var u=arguments.length>7&&arguments[7]!==void 0?arguments[7]:"auto",h=u==="auto"?cf(a,o):u,d=a/2,f=o/2;h=Math.min(h,d,f);var p=h!==d,m=h!==f,g;if(p){var y=n-d+h-l,v=i-f-l,x=n+d-h+l,b=v;if(g=nf(t,r,n,i,y,v,x,b,!1),g.length>0)return g}if(m){var T=n+d+l,w=i-f+h-l,C=T,k=i+f-h+l;if(g=nf(t,r,n,i,T,w,C,k,!1),g.length>0)return g}if(p){var S=n-d+h-l,A=i+f+l,M=n+d-h+l,N=A;if(g=nf(t,r,n,i,S,A,M,N,!1),g.length>0)return g}if(m){var D=n-d-l,R=i-f+h-l,E=D,I=i+f-h+l;if(g=nf(t,r,n,i,D,R,E,I,!1),g.length>0)return g}var L;{var P=n-d+h,B=i-f+h;if(L=W2(t,r,n,i,P,B,h+l),L.length>0&&L[0]<=P&&L[1]<=B)return[L[0],L[1]]}{var O=n+d-h,$=i-f+h;if(L=W2(t,r,n,i,O,$,h+l),L.length>0&&L[0]>=O&&L[1]<=$)return[L[0],L[1]]}{var G=n+d-h,V=i+f-h;if(L=W2(t,r,n,i,G,V,h+l),L.length>0&&L[0]>=G&&L[1]>=V)return[L[0],L[1]]}{var z=n-d+h,W=i+f-h;if(L=W2(t,r,n,i,z,W,h+l),L.length>0&&L[0]<=z&&L[1]>=W)return[L[0],L[1]]}return[]},"roundRectangleIntersectLine"),Wat=s(function(t,r,n,i,a,o,l){var u=l,h=Math.min(n,a),d=Math.max(n,a),f=Math.min(i,o),p=Math.max(i,o);return h-u<=t&&t<=d+u&&f-u<=r&&r<=p+u},"inLineVicinity"),qat=s(function(t,r,n,i,a,o,l,u,h){var d={x1:Math.min(n,l,a)-h,x2:Math.max(n,l,a)+h,y1:Math.min(i,u,o)-h,y2:Math.max(i,u,o)+h};return!(td.x2||rd.y2)},"inBezierVicinity"),Hat=s(function(t,r,n,i){n-=i;var a=r*r-4*t*n;if(a<0)return[];var o=Math.sqrt(a),l=2*t,u=(-r+o)/l,h=(-r-o)/l;return[u,h]},"solveQuadratic"),Uat=s(function(t,r,n,i,a){var o=1e-5;t===0&&(t=o),r/=t,n/=t,i/=t;var l,u,h,d,f,p,m,g;if(u=(3*n-r*r)/9,h=-(27*i)+r*(9*n-2*(r*r)),h/=54,l=u*u*u+h*h,a[1]=0,m=r/3,l>0){f=h+Math.sqrt(l),f=f<0?-Math.pow(-f,1/3):Math.pow(f,1/3),p=h-Math.sqrt(l),p=p<0?-Math.pow(-p,1/3):Math.pow(p,1/3),a[0]=-m+f+p,m+=(f+p)/2,a[4]=a[2]=-m,m=Math.sqrt(3)*(-p+f)/2,a[3]=m,a[5]=-m;return}if(a[5]=a[3]=0,l===0){g=h<0?-Math.pow(-h,1/3):Math.pow(h,1/3),a[0]=-m+2*g,a[4]=a[2]=-(g+m);return}u=-u,d=u*u*u,d=Math.acos(h/Math.sqrt(d)),g=2*Math.sqrt(u),a[0]=-m+g*Math.cos(d/3),a[2]=-m+g*Math.cos((d+2*Math.PI)/3),a[4]=-m+g*Math.cos((d+4*Math.PI)/3)},"solveCubic"),Yat=s(function(t,r,n,i,a,o,l,u){var h=1*n*n-4*n*a+2*n*l+4*a*a-4*a*l+l*l+i*i-4*i*o+2*i*u+4*o*o-4*o*u+u*u,d=9*n*a-3*n*n-3*n*l-6*a*a+3*a*l+9*i*o-3*i*i-3*i*u-6*o*o+3*o*u,f=3*n*n-6*n*a+n*l-n*t+2*a*a+2*a*t-l*t+3*i*i-6*i*o+i*u-i*r+2*o*o+2*o*r-u*r,p=1*n*a-n*n+n*t-a*t+i*o-i*i+i*r-o*r,m=[];Uat(h,d,f,p,m);for(var g=1e-7,y=[],v=0;v<6;v+=2)Math.abs(m[v+1])=0&&m[v]<=1&&y.push(m[v]);y.push(1),y.push(0);for(var x=-1,b,T,w,C=0;C=0?wh?(t-a)*(t-a)+(r-o)*(r-o):d-p},"sqdistToFiniteLine"),Zs=s(function(t,r,n){for(var i,a,o,l,u,h=0,d=0;d=t&&t>=o||i<=t&&t<=o)u=(t-i)/(o-i)*(l-a)+a,u>r&&h++;else continue;return h%2!==0},"pointInsidePolygonPoints"),nh=s(function(t,r,n,i,a,o,l,u,h){var d=new Array(n.length),f;u[0]!=null?(f=Math.atan(u[1]/u[0]),u[0]<0?f=f+Math.PI/2:f=-f-Math.PI/2):f=u;for(var p=Math.cos(-f),m=Math.sin(-f),g=0;g0){var v=q3(d,-h);y=W3(v)}else y=d;return Zs(t,r,y)},"pointInsidePolygon"),Xat=s(function(t,r,n,i,a,o,l,u){for(var h=new Array(n.length*2),d=0;d=0&&v<=1&&b.push(v),x>=0&&x<=1&&b.push(x),b.length===0)return[];var T=b[0]*u[0]+t,w=b[0]*u[1]+r;if(b.length>1){if(b[0]==b[1])return[T,w];var C=b[1]*u[0]+t,k=b[1]*u[1]+r;return[T,w,C,k]}else return[T,w]},"intersectLineCircle"),T9=s(function(t,r,n){return r<=t&&t<=n||n<=t&&t<=r?t:t<=r&&r<=n||n<=r&&r<=t?r:n},"midOfThree"),nf=s(function(t,r,n,i,a,o,l,u,h){var d=t-a,f=n-t,p=l-a,m=r-o,g=i-r,y=u-o,v=p*m-y*d,x=f*m-g*d,b=y*f-p*g;if(b!==0){var T=v/b,w=x/b,C=.001,k=0-C,S=1+C;return k<=T&&T<=S&&k<=w&&w<=S?[t+T*f,r+T*g]:h?[t+T*f,r+T*g]:[]}else return v===0||x===0?T9(t,n,l)===l?[l,u]:T9(t,n,a)===a?[a,o]:T9(a,l,n)===n?[n,i]:[]:[]},"finiteLinesIntersect"),Zat=s(function(t,r,n,i,a){var o=[],l=i/2,u=a/2,h=r,d=n;o.push({x:h+l*t[0],y:d+u*t[1]});for(var f=1;f0){var y=q3(f,-u);m=W3(y)}else m=f}else m=n;for(var v,x,b,T,w=0;w2){for(var g=[d[0],d[1]],y=Math.pow(g[0]-t,2)+Math.pow(g[1]-r,2),v=1;vd&&(d=w)},"set"),get:s(function(T){return h[T]},"get")},p=0;p0?L=I.edgesTo(E)[0]:L=E.edgesTo(I)[0];var P=i(L);E=E.id(),S[E]>S[D]+P&&(S[E]=S[D]+P,A.nodes.indexOf(E)<0?A.push(E):A.updateItem(E),k[E]=0,C[E]=[]),S[E]==S[D]+P&&(k[E]=k[E]+k[D],C[E].push(D))}else for(var B=0;B0;){for(var V=w.pop(),z=0;z0&&l.push(n[u]);l.length!==0&&a.push(i.collection(l))}return a},"assign"),dst=s(function(t,r){for(var n=0;n5&&arguments[5]!==void 0?arguments[5]:mst,l=i,u,h,d=0;d=2?O2(t,r,n,0,Iye,gst):O2(t,r,n,0,Dye)},"euclidean"),squaredEuclidean:s(function(t,r,n){return O2(t,r,n,0,Iye)},"squaredEuclidean"),manhattan:s(function(t,r,n){return O2(t,r,n,0,Dye)},"manhattan"),max:s(function(t,r,n){return O2(t,r,n,-1/0,yst)},"max")};Ky["squared-euclidean"]=Ky.squaredEuclidean;Ky.squaredeuclidean=Ky.squaredEuclidean;s(n5,"clusteringDistance");vst=Da({k:2,m:2,sensitivityThreshold:1e-4,distance:"euclidean",maxIterations:10,attributes:[],testMode:!1,testCentroids:null}),u$=s(function(t){return vst(t)},"setOptions"),H3=s(function(t,r,n,i,a){var o=a!=="kMedoids",l=o?function(f){return n[f]}:function(f){return i[f](n)},u=s(function(p){return i[p](r)},"getQ"),h=n,d=r;return n5(t,i.length,l,u,h,d)},"getDist"),k9=s(function(t,r,n){for(var i=n.length,a=new Array(i),o=new Array(i),l=new Array(r),u=null,h=0;hn)return!1}return!0},"haveMatricesConverged"),Tst=s(function(t,r,n){for(var i=0;il&&(l=r[h][d],u=d);a[u].push(t[h])}for(var f=0;f=a.threshold||a.mode==="dendrogram"&&t.length===1)return!1;var g=r[o],y=r[i[o]],v;a.mode==="dendrogram"?v={left:g,right:y,key:g.key}:v={value:g.value.concat(y.value),key:g.key},t[g.index]=v,t.splice(y.index,1),r[g.key]=v;for(var x=0;xn[y.key][b.key]&&(u=n[y.key][b.key])):a.linkage==="max"?(u=n[g.key][b.key],n[g.key][b.key]0&&i.push(a);return i},"findExemplars"),$ye=s(function(t,r,n){for(var i=[],a=0;al&&(o=h,l=r[a*t+h])}o>0&&i.push(o)}for(var d=0;dh&&(u=d,h=f)}n[a]=o[u]}return i=$ye(t,r,n),i},"assign"),Fye=s(function(t){for(var r=this.cy(),n=this.nodes(),i=Mst(t),a={},o=0;o=D?(R=D,D=I,E=L):I>R&&(R=I);for(var P=0;P0?1:0;S[M%i.minIterations*l+z]=W,V+=W}if(V>0&&(M>=i.minIterations-1||M==i.maxIterations-1)){for(var H=0,j=0;j1||k>1)&&(l=!0),f[T]=[],b.outgoers().forEach(function(A){A.isEdge()&&f[T].push(A.id())})}else p[T]=[void 0,b.target().id()]}):o.forEach(function(b){var T=b.id();if(b.isNode()){var w=b.degree(!0);w%2&&(u?h?l=!0:h=T:u=T),f[T]=[],b.connectedEdges().forEach(function(C){return f[T].push(C.id())})}else p[T]=[b.source().id(),b.target().id()]});var m={found:!1,trail:void 0};if(l)return m;if(h&&u)if(a){if(d&&h!=d)return m;d=h}else{if(d&&h!=d&&u!=d)return m;d||(d=h)}else d||(d=o[0].id());var g=s(function(T){for(var w=T,C=[T],k,S,A;f[w].length;)k=f[w].shift(),S=p[k][0],A=p[k][1],w!=A?(f[A]=f[A].filter(function(M){return M!=k}),w=A):!a&&w!=S&&(f[S]=f[S].filter(function(M){return M!=k}),w=S),C.unshift(k),C.unshift(w);return C},"walk"),y=[],v=[];for(v=g(d);v.length!=1;)f[v[0]].length==0?(y.unshift(o.getElementById(v.shift())),y.unshift(o.getElementById(v.shift()))):v=g(v.shift()).concat(v);y.unshift(o.getElementById(v.shift()));for(var x in f)if(f[x].length)return m;return m.found=!0,m.trail=this.spawn(y,!0),m},"hierholzer")},x3=s(function(){var t=this,r={},n=0,i=0,a=[],o=[],l={},u=s(function(p,m){for(var g=o.length-1,y=[],v=t.spawn();o[g].x!=p||o[g].y!=m;)y.push(o.pop().edge),g--;y.push(o.pop().edge),y.forEach(function(x){var b=x.connectedNodes().intersection(t);v.merge(x),b.forEach(function(T){var w=T.id(),C=T.connectedEdges().intersection(t);v.merge(T),r[w].cutVertex?v.merge(C.filter(function(k){return k.isLoop()})):v.merge(C)})}),a.push(v)},"buildComponent"),h=s(function(p,m,g){p===g&&(i+=1),r[m]={id:n,low:n++,cutVertex:!1};var y=t.getElementById(m).connectedEdges().intersection(t);if(y.size()===0)a.push(t.spawn(t.getElementById(m)));else{var v,x,b,T;y.forEach(function(w){v=w.source().id(),x=w.target().id(),b=v===m?x:v,b!==g&&(T=w.id(),l[T]||(l[T]=!0,o.push({x:m,y:b,edge:w})),b in r?r[m].low=Math.min(r[m].low,r[b].id):(h(p,b,m),r[m].low=Math.min(r[m].low,r[b].low),r[m].id<=r[b].low&&(r[m].cutVertex=!0,u(m,b))))})}},"biconnectedSearch");t.forEach(function(f){if(f.isNode()){var p=f.id();p in r||(i=0,h(p,p),r[p].cutVertex=i>1)}});var d=Object.keys(r).filter(function(f){return r[f].cutVertex}).map(function(f){return t.getElementById(f)});return{cut:t.spawn(d),components:a}},"hopcroftTarjanBiconnected"),zst={hopcroftTarjanBiconnected:x3,htbc:x3,htb:x3,hopcroftTarjanBiconnectedComponents:x3},b3=s(function(){var t=this,r={},n=0,i=[],a=[],o=t.spawn(t),l=s(function(h){a.push(h),r[h]={index:n,low:n++,explored:!1};var d=t.getElementById(h).connectedEdges().intersection(t);if(d.forEach(function(y){var v=y.target().id();v!==h&&(v in r||l(v),r[v].explored||(r[h].low=Math.min(r[h].low,r[v].low)))}),r[h].index===r[h].low){for(var f=t.spawn();;){var p=a.pop();if(f.merge(t.getElementById(p)),r[p].low=r[h].index,r[p].explored=!0,p===h)break}var m=f.edgesWith(f),g=f.merge(m);i.push(g),o=o.difference(g)}},"stronglyConnectedSearch");return t.forEach(function(u){if(u.isNode()){var h=u.id();h in r||l(h)}}),{cut:o,components:i}},"tarjanStronglyConnected"),Vst={tarjanStronglyConnected:b3,tsc:b3,tscc:b3,tarjanStronglyConnectedComponents:b3},oxe={};[Z2,vat,xat,Tat,kat,Sat,Rat,tst,Uy,Yy,OB,pst,Ast,Dst,$st,Gst,zst,Vst].forEach(function(e){xr(oxe,e)});lxe=0,cxe=1,uxe=2,Vl=s(function(t){if(!(this instanceof Vl))return new Vl(t);this.id="Thenable/1.0.7",this.state=lxe,this.fulfillValue=void 0,this.rejectReason=void 0,this.onFulfilled=[],this.onRejected=[],this.proxy={then:this.then.bind(this)},typeof t=="function"&&t.call(this,this.fulfill.bind(this),this.reject.bind(this))},"api");Vl.prototype={fulfill:s(function(t){return Gye(this,cxe,"fulfillValue",t)},"fulfill"),reject:s(function(t){return Gye(this,uxe,"rejectReason",t)},"reject"),then:s(function(t,r){var n=this,i=new Vl;return n.onFulfilled.push(Vye(t,i,"fulfill")),n.onRejected.push(Vye(r,i,"reject")),hxe(n),i.proxy},"then")};Gye=s(function(t,r,n,i){return t.state===lxe&&(t.state=r,t[n]=i,hxe(t)),t},"deliver"),hxe=s(function(t){t.state===cxe?zye(t,"onFulfilled",t.fulfillValue):t.state===uxe&&zye(t,"onRejected",t.rejectReason)},"execute"),zye=s(function(t,r,n){if(t[r].length!==0){var i=t[r];t[r]=[];var a=s(function(){for(var l=0;l0},"animatedImpl")},"animated"),clearQueue:s(function(){return s(function(){var r=this,n=r.length!==void 0,i=n?r:[r],a=this._private.cy||this;if(!a.styleEnabled())return this;for(var o=0;o0&&this.spawn(i).updateStyle().emit("class"),r},"classes"),addClass:s(function(t){return this.toggleClass(t,!0)},"addClass"),hasClass:s(function(t){var r=this[0];return r!=null&&r._private.classes.has(t)},"hasClass"),toggleClass:s(function(t,r){$n(t)||(t=t.match(/\S+/g)||[]);for(var n=this,i=r===void 0,a=[],o=0,l=n.length;o0&&this.spawn(a).updateStyle().emit("class"),n},"toggleClass"),removeClass:s(function(t){return this.toggleClass(t,!1)},"removeClass"),flashClass:s(function(t,r){var n=this;if(r==null)r=250;else if(r===0)return n;return n.addClass(t),setTimeout(function(){n.removeClass(t)},r),n},"flashClass")};D3.className=D3.classNames=D3.classes;nn={metaChar:"[\\!\\\"\\#\\$\\%\\&\\'\\(\\)\\*\\+\\,\\.\\/\\:\\;\\<\\=\\>\\?\\@\\[\\]\\^\\`\\{\\|\\}\\~]",comparatorOp:"=|\\!=|>|>=|<|<=|\\$=|\\^=|\\*=",boolOp:"\\?|\\!|\\^",string:`"(?:\\\\"|[^"])*"|'(?:\\\\'|[^'])*'`,number:Qi,meta:"degree|indegree|outdegree",separator:"\\s*,\\s*",descendant:"\\s+",child:"\\s+>\\s+",subject:"\\$",group:"node|edge|\\*",directedEdge:"\\s+->\\s+",undirectedEdge:"\\s+<->\\s+"};nn.variable="(?:[\\w-.]|(?:\\\\"+nn.metaChar+"))+";nn.className="(?:[\\w-]|(?:\\\\"+nn.metaChar+"))+";nn.value=nn.string+"|"+nn.number;nn.id=nn.variable;(function(){var e,t,r;for(e=nn.comparatorOp.split("|"),r=0;r=0)&&t!=="="&&(nn.comparatorOp+="|\\!"+t)})();Mn=s(function(){return{checks:[]}},"newQuery"),er={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},GB=[{selector:":selected",matches:s(function(t){return t.selected()},"matches")},{selector:":unselected",matches:s(function(t){return!t.selected()},"matches")},{selector:":selectable",matches:s(function(t){return t.selectable()},"matches")},{selector:":unselectable",matches:s(function(t){return!t.selectable()},"matches")},{selector:":locked",matches:s(function(t){return t.locked()},"matches")},{selector:":unlocked",matches:s(function(t){return!t.locked()},"matches")},{selector:":visible",matches:s(function(t){return t.visible()},"matches")},{selector:":hidden",matches:s(function(t){return!t.visible()},"matches")},{selector:":transparent",matches:s(function(t){return t.transparent()},"matches")},{selector:":grabbed",matches:s(function(t){return t.grabbed()},"matches")},{selector:":free",matches:s(function(t){return!t.grabbed()},"matches")},{selector:":removed",matches:s(function(t){return t.removed()},"matches")},{selector:":inside",matches:s(function(t){return!t.removed()},"matches")},{selector:":grabbable",matches:s(function(t){return t.grabbable()},"matches")},{selector:":ungrabbable",matches:s(function(t){return!t.grabbable()},"matches")},{selector:":animated",matches:s(function(t){return t.animated()},"matches")},{selector:":unanimated",matches:s(function(t){return!t.animated()},"matches")},{selector:":parent",matches:s(function(t){return t.isParent()},"matches")},{selector:":childless",matches:s(function(t){return t.isChildless()},"matches")},{selector:":child",matches:s(function(t){return t.isChild()},"matches")},{selector:":orphan",matches:s(function(t){return t.isOrphan()},"matches")},{selector:":nonorphan",matches:s(function(t){return t.isChild()},"matches")},{selector:":compound",matches:s(function(t){return t.isNode()?t.isParent():t.source().isParent()||t.target().isParent()},"matches")},{selector:":loop",matches:s(function(t){return t.isLoop()},"matches")},{selector:":simple",matches:s(function(t){return t.isSimple()},"matches")},{selector:":active",matches:s(function(t){return t.active()},"matches")},{selector:":inactive",matches:s(function(t){return!t.active()},"matches")},{selector:":backgrounding",matches:s(function(t){return t.backgrounding()},"matches")},{selector:":nonbackgrounding",matches:s(function(t){return!t.backgrounding()},"matches")}].sort(function(e,t){return Oit(e.selector,t.selector)}),Fot=(function(){for(var e={},t,r=0;r0&&d.edgeCount>0)return Sn("The selector `"+t+"` is invalid because it uses both a compound selector and an edge selector"),!1;if(d.edgeCount>1)return Sn("The selector `"+t+"` is invalid because it uses multiple edge selectors"),!1;d.edgeCount===1&&Sn("The selector `"+t+"` 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},"parse"),Hot=s(function(){if(this.toStringCache!=null)return this.toStringCache;for(var t=s(function(d){return d??""},"clean"),r=s(function(d){return fr(d)?'"'+d+'"':t(d)},"cleanVal"),n=s(function(d){return" "+d+" "},"space"),i=s(function(d,f){var p=d.type,m=d.value;switch(p){case er.GROUP:{var g=t(m);return g.substring(0,g.length-1)}case er.DATA_COMPARE:{var y=d.field,v=d.operator;return"["+y+n(t(v))+r(m)+"]"}case er.DATA_BOOL:{var x=d.operator,b=d.field;return"["+t(x)+b+"]"}case er.DATA_EXIST:{var T=d.field;return"["+T+"]"}case er.META_COMPARE:{var w=d.operator,C=d.field;return"[["+C+n(t(w))+r(m)+"]]"}case er.STATE:return m;case er.ID:return"#"+m;case er.CLASS:return"."+m;case er.PARENT:case er.CHILD:return a(d.parent,f)+n(">")+a(d.child,f);case er.ANCESTOR:case er.DESCENDANT:return a(d.ancestor,f)+" "+a(d.descendant,f);case er.COMPOUND_SPLIT:{var k=a(d.left,f),S=a(d.subject,f),A=a(d.right,f);return k+(k.length>0?" ":"")+S+A}case er.TRUE:return""}},"checkToString"),a=s(function(d,f){return d.checks.reduce(function(p,m,g){return p+(f===d&&g===0?"$":"")+i(m,f)},"")},"queryToString"),o="",l=0;l1&&l=0&&(r=r.replace("!",""),f=!0),r.indexOf("@")>=0&&(r=r.replace("@",""),d=!0),(a||l||d)&&(u=!a&&!o?"":""+t,h=""+n),d&&(t=u=u.toLowerCase(),n=h=h.toLowerCase()),r){case"*=":i=u.indexOf(h)>=0;break;case"$=":i=u.indexOf(h,u.length-h.length)>=0;break;case"^=":i=u.indexOf(h)===0;break;case"=":i=t===n;break;case">":p=!0,i=t>n;break;case">=":p=!0,i=t>=n;break;case"<":p=!0,i=t1&&arguments[1]!==void 0?arguments[1]:!0;return p$(this,e,t,xxe)};s(bxe,"addParent");Zy.forEachUp=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return p$(this,e,t,bxe)};s(Jot,"addParentAndChildren");Zy.forEachUpAndDown=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return p$(this,e,t,Jot)};Zy.ancestors=Zy.parents;eT=Txe={data:wn.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:wn.removeData({field:"data",event:"data",triggerFnName:"trigger",triggerEvent:!0,immutableKeys:{id:!0,source:!0,target:!0,parent:!0},updateStyle:!0}),scratch:wn.data({field:"scratch",bindingEvent:"scratch",allowBinding:!0,allowSetting:!0,settingEvent:"scratch",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeScratch:wn.removeData({field:"scratch",event:"scratch",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0}),rscratch:wn.data({field:"rscratch",allowBinding:!1,allowSetting:!0,settingTriggersEvent:!1,allowGetting:!0}),removeRscratch:wn.removeData({field:"rscratch",triggerEvent:!1}),id:s(function(){var t=this[0];if(t)return t._private.data.id},"id")};eT.attr=eT.data;eT.removeAttr=eT.removeData;elt=Txe,l5={};s(TB,"defineDegreeFunction");xr(l5,{degree:TB(function(e,t){return t.source().same(t.target())?2:1}),indegree:TB(function(e,t){return t.target().same(e)?1:0}),outdegree:TB(function(e,t){return t.source().same(e)?1:0})});s(Py,"defineDegreeBoundsFunction");xr(l5,{minDegree:Py("degree",function(e,t){return et}),minIndegree:Py("indegree",function(e,t){return et}),minOutdegree:Py("outdegree",function(e,t){return et})});xr(l5,{totalDegree:s(function(t){for(var r=0,n=this.nodes(),i=0;i0,p=f;f&&(d=d[0]);var m=p?d.position():{x:0,y:0};r!==void 0?h.position(t,r+m[t]):a!==void 0&&h.position({x:a.x+m.x,y:a.y+m.y})}else{var g=n.position(),y=l?n.parent():null,v=y&&y.length>0,x=v;v&&(y=y[0]);var b=x?y.position():{x:0,y:0};return a={x:g.x-b.x,y:g.y-b.y},t===void 0?a:a[t]}else if(!o)return;return this},"relativePosition")};zl.modelPosition=zl.point=zl.position;zl.modelPositions=zl.points=zl.positions;zl.renderedPoint=zl.renderedPosition;zl.relativePoint=zl.relativePosition;tlt=Cxe,Qy=s(function(t){switch(t){case"left":case"right-inside":return"left";case"right":case"left-inside":return"right";default:return"center"}},"labelHalign"),Jy=s(function(t){switch(t){case"top":case"bottom-inside":return"top";case"bottom":case"top-inside":return"bottom";default:return"center"}},"labelValign"),rlt=s(function(t){switch(t){case"left":return"right";case"right":return"left";case"left-inside":return"left";case"right-inside":return"right";default:return"center"}},"labelJustification");jy=mf={};mf.renderedBoundingBox=function(e){var t=this.boundingBox(e),r=this.cy(),n=r.zoom(),i=r.pan(),a=t.x1*n+i.x,o=t.x2*n+i.x,l=t.y1*n+i.y,u=t.y2*n+i.y;return{x1:a,x2:o,y1:l,y2:u,w:o-a,h:u-l}};mf.dirtyCompoundBoundsCache=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,t=this.cy();return!t.styleEnabled()||!t.hasCompoundNodes()?this:(this.forEachUp(function(r){if(r.isParent()){var n=r._private;n.compoundBoundsClean=!1,n.bbCache=null,e||r.emitAndNotify("bounds")}}),this)};mf.updateCompoundBounds=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,t=this.cy();if(!t.styleEnabled()||!t.hasCompoundNodes())return this;if(!e&&t.batching())return this;function r(o){if(!o.isParent())return;var l=o._private,u=o.children(),h=o.pstyle("compound-sizing-wrt-labels").value==="include",d={width:{val:o.pstyle("min-width").pfValue,left:o.pstyle("min-width-bias-left"),right:o.pstyle("min-width-bias-right")},height:{val:o.pstyle("min-height").pfValue,top:o.pstyle("min-height-bias-top"),bottom:o.pstyle("min-height-bias-bottom")}},f=u.boundingBox({includeLabels:h,includeOverlays:!1,useCache:!1}),p=l.position;(f.w===0||f.h===0)&&(f={w:o.pstyle("width").pfValue,h:o.pstyle("height").pfValue},f.x1=p.x-f.w/2,f.x2=p.x+f.w/2,f.y1=p.y-f.h/2,f.y2=p.y+f.h/2);function m(M,N,D){var R=0,E=0,I=N+D;return M>0&&I>0&&(R=N/I*M,E=D/I*M),{biasDiff:R,biasComplementDiff:E}}s(m,"computeBiasValues");function g(M,N,D,R){if(D.units==="%")switch(R){case"width":return M>0?D.pfValue*M:0;case"height":return N>0?D.pfValue*N:0;case"average":return M>0&&N>0?D.pfValue*(M+N)/2:0;case"min":return M>0&&N>0?M>N?D.pfValue*N:D.pfValue*M:0;case"max":return M>0&&N>0?M>N?D.pfValue*M:D.pfValue*N:0;default:return 0}else return D.units==="px"?D.pfValue:0}s(g,"computePaddingValues");var y=d.width.left.value;d.width.left.units==="px"&&d.width.val>0&&(y=y*100/d.width.val);var v=d.width.right.value;d.width.right.units==="px"&&d.width.val>0&&(v=v*100/d.width.val);var x=d.height.top.value;d.height.top.units==="px"&&d.height.val>0&&(x=x*100/d.height.val);var b=d.height.bottom.value;d.height.bottom.units==="px"&&d.height.val>0&&(b=b*100/d.height.val);var T=m(d.width.val-f.w,y,v),w=T.biasDiff,C=T.biasComplementDiff,k=m(d.height.val-f.h,x,b),S=k.biasDiff,A=k.biasComplementDiff;l.autoPadding=g(f.w,f.h,o.pstyle("padding"),o.pstyle("padding-relative-to").value),l.autoWidth=Math.max(f.w,d.width.val),p.x=(-w+f.x1+f.x2+C)/2,l.autoHeight=Math.max(f.h,d.height.val),p.y=(-S+f.y1+f.y2+A)/2}s(r,"update");for(var n=0;nt.x2?i:t.x2,t.y1=nt.y2?a:t.y2,t.w=t.x2-t.x1,t.h=t.y2-t.y1)},"updateBounds"),ef=s(function(t,r){return r==null?t:Gl(t,r.x1,r.y1,r.x2,r.y2)},"updateBoundsFromBox"),B2=s(function(t,r,n){return vs(t,r,n)},"prefixedProperty"),T3=s(function(t,r,n){if(!r.cy().headless()){var i=r._private,a=i.rstyle,o=a.arrowWidth/2,l=r.pstyle(n+"-arrow-shape").value,u,h;if(l!=="none"){n==="source"?(u=a.srcX,h=a.srcY):n==="target"?(u=a.tgtX,h=a.tgtY):(u=a.midX,h=a.midY);var d=i.arrowBounds=i.arrowBounds||{},f=d[n]=d[n]||{};f.x1=u-o,f.y1=h-o,f.x2=u+o,f.y2=h+o,f.w=f.x2-f.x1,f.h=f.y2-f.y1,_3(f,1),Gl(t,f.x1,f.y1,f.x2,f.y2)}}},"updateBoundsFromArrow"),CB=s(function(t,r,n){if(!r.cy().headless()){var i;n?i=n+"-":i="";var a=r._private,o=a.rstyle,l=r.pstyle(i+"label").strValue;if(l){var u=r.pstyle("text-halign"),h=r.pstyle("text-valign"),d=B2(o,"labelWidth",n),f=B2(o,"labelHeight",n),p=B2(o,"labelX",n),m=B2(o,"labelY",n),g=r.pstyle(i+"text-margin-x").pfValue,y=r.pstyle(i+"text-margin-y").pfValue,v=r.isEdge(),x=r.pstyle(i+"text-rotation"),b=r.pstyle("text-outline-width").pfValue,T=r.pstyle("text-border-width").pfValue,w=T/2,C=r.pstyle("text-background-padding").pfValue,k=2,S=f,A=d,M=A/2,N=S/2,D,R,E,I;if(v)D=p-M,R=p+M,E=m-N,I=m+N;else{switch(Qy(u.value)){case"left":D=p-A,R=p;break;case"center":D=p-M,R=p+M;break;case"right":D=p,R=p+A;break}switch(Jy(h.value)){case"top":E=m-S,I=m;break;case"center":E=m-N,I=m+N;break;case"bottom":E=m,I=m+S;break}}var L=g-Math.max(b,w)-C-k,P=g+Math.max(b,w)+C+k,B=y-Math.max(b,w)-C-k,O=y+Math.max(b,w)+C+k;D+=L,R+=P,E+=B,I+=O;var $=n||"main",G=a.labelBounds,V=G[$]=G[$]||{};V.x1=D,V.y1=E,V.x2=R,V.y2=I,V.w=R-D,V.h=I-E,V.leftPad=L,V.rightPad=P,V.topPad=B,V.botPad=O;var z=v&&x.strValue==="autorotate",W=x.pfValue!=null&&x.pfValue!==0;if(z||W){var H=z?B2(a.rstyle,"labelAngle",n):x.pfValue,j=Math.cos(H),Q=Math.sin(H),U=(D+R)/2,ue=(E+I)/2;if(!v){switch(Qy(u.value)){case"left":U=R;break;case"right":U=D;break}switch(Jy(h.value)){case"top":ue=I;break;case"bottom":ue=E;break}}var J=s(function(We,pe){return We=We-U,pe=pe-ue,{x:We*j-pe*Q+U,y:We*Q+pe*j+ue}},"rotate"),he=J(D,E),se=J(D,I),oe=J(R,E),Se=J(R,I);D=Math.min(he.x,se.x,oe.x,Se.x),R=Math.max(he.x,se.x,oe.x,Se.x),E=Math.min(he.y,se.y,oe.y,Se.y),I=Math.max(he.y,se.y,oe.y,Se.y)}var xe=$+"Rot",Ne=G[xe]=G[xe]||{};Ne.x1=D,Ne.y1=E,Ne.x2=R,Ne.y2=I,Ne.w=R-D,Ne.h=I-E,Gl(t,D,E,R,I),Gl(a.labelBounds.all,D,E,R,I)}return t}},"updateBoundsFromLabel"),z1e=s(function(t,r){if(!r.cy().headless()){var n=r.pstyle("outline-opacity").value,i=r.pstyle("outline-width").value,a=r.pstyle("outline-offset").value,o=i+a;wxe(t,r,n,o,"outside",o/2)}},"updateBoundsFromOutline"),wxe=s(function(t,r,n,i,a,o){if(!(n===0||i<=0||a==="inside")){var l=r.cy(),u=l.renderer(),h=u.nodeShapes[u.getNodeShape(r)];if(h){var d=r.position(),f=d.x,p=d.y,m=r.width(),g=r.height();if(h.hasMiterBounds){a==="center"&&(i/=2);var y=h.miterBounds(f,p,m,g,i);ef(t,y)}else o!=null&&o>0&&L3(t,[o,o,o,o])}}},"updateBoundsFromMiter"),nlt=s(function(t,r){if(!r.cy().headless()){var n=r.pstyle("border-opacity").value,i=r.pstyle("border-width").pfValue,a=r.pstyle("border-position").value;wxe(t,r,n,i,a)}},"updateBoundsFromMiterBorder"),ilt=s(function(t,r){var n=t._private.cy,i=n.styleEnabled(),a=n.headless(),o=xs(),l=t._private,u=t.isNode(),h=t.isEdge(),d,f,p,m,g,y,v=l.rstyle,x=u&&i?t.pstyle("bounds-expansion").pfValue:[0],b=s(function(Ye){return Ye.pstyle("display").value!=="none"},"isDisplayed"),T=!i||b(t)&&(!h||b(t.source())&&b(t.target()));if(T){var w=0,C=0;i&&r.includeOverlays&&(w=t.pstyle("overlay-opacity").value,w!==0&&(C=t.pstyle("overlay-padding").value));var k=0,S=0;i&&r.includeUnderlays&&(k=t.pstyle("underlay-opacity").value,k!==0&&(S=t.pstyle("underlay-padding").value));var A=Math.max(C,S),M=0,N=0;if(i&&(M=t.pstyle("width").pfValue,N=M/2),u&&r.includeNodes){var D=t.position();g=D.x,y=D.y;var R=t.outerWidth(),E=R/2,I=t.outerHeight(),L=I/2;d=g-E,f=g+E,p=y-L,m=y+L,Gl(o,d,p,f,m),i&&z1e(o,t),i&&r.includeOutlines&&!a&&z1e(o,t),i&&nlt(o,t)}else if(h&&r.includeEdges)if(i&&!a){var P=t.pstyle("curve-style").strValue;if(d=Math.min(v.srcX,v.midX,v.tgtX),f=Math.max(v.srcX,v.midX,v.tgtX),p=Math.min(v.srcY,v.midY,v.tgtY),m=Math.max(v.srcY,v.midY,v.tgtY),d-=N,f+=N,p-=N,m+=N,Gl(o,d,p,f,m),P==="haystack"){var B=v.haystackPts;if(B&&B.length===2){if(d=B[0].x,p=B[0].y,f=B[1].x,m=B[1].y,d>f){var O=d;d=f,f=O}if(p>m){var $=p;p=m,m=$}Gl(o,d-N,p-N,f+N,m+N)}}else if(P==="bezier"||P==="unbundled-bezier"||tf(P,"segments")||tf(P,"taxi")){var G;switch(P){case"bezier":case"unbundled-bezier":G=v.bezierPts;break;case"segments":case"taxi":case"round-segments":case"round-taxi":G=v.linePts;break}if(G!=null)for(var V=0;Vf){var U=d;d=f,f=U}if(p>m){var ue=p;p=m,m=ue}d-=N,f+=N,p-=N,m+=N,Gl(o,d,p,f,m)}if(i&&r.includeEdges&&h&&(T3(o,t,"mid-source"),T3(o,t,"mid-target"),T3(o,t,"source"),T3(o,t,"target")),i){var J=t.pstyle("ghost").value==="yes";if(J){var he=t.pstyle("ghost-offset-x").pfValue,se=t.pstyle("ghost-offset-y").pfValue;Gl(o,o.x1+he,o.y1+se,o.x2+he,o.y2+se)}}var oe=l.bodyBounds=l.bodyBounds||{};Eye(oe,o),L3(oe,x),_3(oe,1),i&&(d=o.x1,f=o.x2,p=o.y1,m=o.y2,Gl(o,d-A,p-A,f+A,m+A));var Se=l.overlayBounds=l.overlayBounds||{};Eye(Se,o),L3(Se,x),_3(Se,1);var xe=l.labelBounds=l.labelBounds||{};xe.all!=null?$at(xe.all):xe.all=xs(),i&&r.includeLabels&&(r.includeMainLabels&&CB(o,t,null),h&&(r.includeSourceLabels&&CB(o,t,"source"),r.includeTargetLabels&&CB(o,t,"target")))}return o.x1=tl(o.x1),o.y1=tl(o.y1),o.x2=tl(o.x2),o.y2=tl(o.y2),o.w=tl(o.x2-o.x1),o.h=tl(o.y2-o.y1),o.w>0&&o.h>0&&T&&(L3(o,x),_3(o,1)),o},"boundingBoxImpl"),Sxe=s(function(t){var r=0,n=s(function(o){return(o?1:0)<=0;l--)o(l);return this};df.removeAllListeners=function(){return this.removeListener("*")};df.emit=df.trigger=function(e,t,r){var n=this.listeners,i=n.length;return this.emitting++,$n(t)||(t=[t]),blt(this,function(a,o){r!=null&&(n=[{event:o.event,type:o.type,namespace:o.namespace,callback:r}],i=n.length);for(var l=s(function(){var d=n[u];if(d.type===o.type&&(!d.namespace||d.namespace===o.namespace||d.namespace===vlt)&&a.eventMatches(a.context,d,o)){var f=[o];t!=null&&cat(f,t),a.beforeEmit(a.context,d,o),d.conf&&d.conf.one&&(a.listeners=a.listeners.filter(function(g){return g!==d}));var p=a.callbackContext(a.context,d,o),m=d.callback.apply(p,f);a.afterEmit(a.context,d,o),m===!1&&(o.stopPropagation(),o.preventDefault())}},"_loop2"),u=0;u1&&!o){var l=this.length-1,u=this[l],h=u._private.data.id;this[l]=void 0,this[t]=u,a.set(h,{ele:u,index:t})}return this.length--,this},"unmergeAt"),unmergeOne:s(function(t){t=t[0];var r=this._private,n=t._private.data.id,i=r.map,a=i.get(n);if(!a)return this;var o=a.index;return this.unmergeAt(o),this},"unmergeOne"),unmerge:s(function(t){var r=this._private.cy;if(!t)return this;if(t&&fr(t)){var n=t;t=r.mutableElements().filter(n)}for(var i=0;i=0;r--){var n=this[r];t(n)&&this.unmergeAt(r)}return this},"unmergeBy"),map:s(function(t,r){for(var n=[],i=this,a=0;an&&(n=u,i=l)}return{value:n,ele:i}},"max"),min:s(function(t,r){for(var n=1/0,i,a=this,o=0;o=0&&a"u"?"undefined":Ji(Symbol))!=t&&Ji(Symbol.iterator)!=t;r&&(U3[Symbol.iterator]=function(){var n=this,i={value:void 0,done:!1},a=0,o=this.length;return Ive({next:s(function(){return a1&&arguments[1]!==void 0?arguments[1]:!0,n=this[0],i=n.cy();if(i.styleEnabled()&&n){n._private.styleDirty&&(n._private.styleDirty=!1,i.style().apply(n));var a=n._private.style[t];return a??(r?i.style().getDefaultProperty(t):null)}},"parsedStyle"),numericStyle:s(function(t){var r=this[0];if(r.cy().styleEnabled()&&r){var n=r.pstyle(t);return n.pfValue!==void 0?n.pfValue:n.value}},"numericStyle"),numericStyleUnits:s(function(t){var r=this[0];if(r.cy().styleEnabled()&&r)return r.pstyle(t).units},"numericStyleUnits"),renderedStyle:s(function(t){var r=this.cy();if(!r.styleEnabled())return this;var n=this[0];if(n)return r.style().getRenderedStyle(n,t)},"renderedStyle"),style:s(function(t,r){var n=this.cy();if(!n.styleEnabled())return this;var i=!1,a=n.style();if(an(t)){var o=t;a.applyBypass(this,o,i),this.emitAndNotify("style")}else if(fr(t))if(r===void 0){var l=this[0];return l?a.getStylePropertyValue(l,t):void 0}else a.applyBypass(this,t,r,i),this.emitAndNotify("style");else if(t===void 0){var u=this[0];return u?a.getRawStyle(u):void 0}return this},"style"),removeStyle:s(function(t){var r=this.cy();if(!r.styleEnabled())return this;var n=!1,i=r.style(),a=this;if(t===void 0)for(var o=0;o0&&t.push(d[0]),t.push(l[0])}return this.spawn(t,!0).filter(e)},"neighborhood"),closedNeighborhood:s(function(t){return this.neighborhood().add(this).filter(t)},"closedNeighborhood"),openNeighborhood:s(function(t){return this.neighborhood(t)},"openNeighborhood")});Za.neighbourhood=Za.neighborhood;Za.closedNeighbourhood=Za.closedNeighborhood;Za.openNeighbourhood=Za.openNeighborhood;xr(Za,{source:rl(s(function(t){var r=this[0],n;return r&&(n=r._private.source||r.cy().collection()),n&&t?n.filter(t):n},"sourceImpl"),"source"),target:rl(s(function(t){var r=this[0],n;return r&&(n=r._private.target||r.cy().collection()),n&&t?n.filter(t):n},"targetImpl"),"target"),sources:Q1e({attr:"source"}),targets:Q1e({attr:"target"})});s(Q1e,"defineSourceFunction");xr(Za,{edgesWith:rl(J1e(),"edgesWith"),edgesTo:rl(J1e({thisIsSrc:!0}),"edgesTo")});s(J1e,"defineEdgesWithFunction");xr(Za,{connectedEdges:rl(function(e){for(var t=[],r=this,n=0;n0);return o},"components"),component:s(function(){var t=this[0];return t.cy().mutableElements().components(t)[0]},"component")});Za.componentsOf=Za.components;La=s(function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(t===void 0){ii("A collection must have a reference to the core");return}var a=new th,o=!1;if(!r)r=[];else if(r.length>0&&an(r[0])&&!sT(r[0])){o=!0;for(var l=[],u=new e1,h=0,d=r.length;h0&&arguments[0]!==void 0?arguments[0]:!0,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,r=this,n=r.cy(),i=n._private,a=[],o=[],l,u=0,h=r.length;u0){for(var $=l.length===r.length?r:new La(n,l),G=0;G<$.length;G++){var V=$[G];V.isNode()||(V.parallelEdges().clearTraversalCache(),V.source().clearTraversalCache(),V.target().clearTraversalCache())}var z;i.hasCompoundNodes?z=n.collection().merge($).merge($.connectedNodes()).merge($.parent()):z=$,z.dirtyCompoundBoundsCache().dirtyBoundingBoxCache().updateStyle(e),e?$.emitAndNotify("add"):t&&$.emit("add")}return r};qn.removed=function(){var e=this[0];return e&&e._private.removed};qn.inside=function(){var e=this[0];return e&&!e._private.removed};qn.remove=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,r=this,n=[],i={},a=r._private.cy;function o(I){for(var L=I._private.edges,P=0;P0&&(e?D.emitAndNotify("remove"):t&&D.emit("remove"));for(var R=0;Rd&&Math.abs(g.v)>d;);return p?function(y){return u[y*(u.length-1)|0]}:h},"springRK4Factory")})(),Wn=s(function(t,r,n,i){var a=Llt(t,r,n,i);return function(o,l,u){return o+(l-o)*a(u)}},"cubicBezier"),M3={linear:s(function(t,r,n){return t+(r-t)*n},"linear"),ease:Wn(.25,.1,.25,1),"ease-in":Wn(.42,0,1,1),"ease-out":Wn(0,0,.58,1),"ease-in-out":Wn(.42,0,.58,1),"ease-in-sine":Wn(.47,0,.745,.715),"ease-out-sine":Wn(.39,.575,.565,1),"ease-in-out-sine":Wn(.445,.05,.55,.95),"ease-in-quad":Wn(.55,.085,.68,.53),"ease-out-quad":Wn(.25,.46,.45,.94),"ease-in-out-quad":Wn(.455,.03,.515,.955),"ease-in-cubic":Wn(.55,.055,.675,.19),"ease-out-cubic":Wn(.215,.61,.355,1),"ease-in-out-cubic":Wn(.645,.045,.355,1),"ease-in-quart":Wn(.895,.03,.685,.22),"ease-out-quart":Wn(.165,.84,.44,1),"ease-in-out-quart":Wn(.77,0,.175,1),"ease-in-quint":Wn(.755,.05,.855,.06),"ease-out-quint":Wn(.23,1,.32,1),"ease-in-out-quint":Wn(.86,0,.07,1),"ease-in-expo":Wn(.95,.05,.795,.035),"ease-out-expo":Wn(.19,1,.22,1),"ease-in-out-expo":Wn(1,0,0,1),"ease-in-circ":Wn(.6,.04,.98,.335),"ease-out-circ":Wn(.075,.82,.165,1),"ease-in-out-circ":Wn(.785,.135,.15,.86),spring:s(function(t,r,n){if(n===0)return M3.linear;var i=Dlt(t,r,n);return function(a,o,l){return a+(o-a)*i(l)}},"spring"),"cubic-bezier":Wn};s(tve,"getEasedValue");s(rve,"getValue");s(Oy,"ease");s(Ilt,"step$1");s(F2,"valid");s(Mlt,"startAnimation");s(nve,"stepAll");Nlt={animate:wn.animate(),animation:wn.animation(),animated:wn.animated(),clearQueue:wn.clearQueue(),delay:wn.delay(),delayAnimation:wn.delayAnimation(),stop:wn.stop(),addToAnimationPool:s(function(t){var r=this;r.styleEnabled()&&r._private.aniEles.merge(t)},"addToAnimationPool"),stopAnimationLoop:s(function(){this._private.animationsRunning=!1},"stopAnimationLoop"),startAnimationLoop:s(function(){var t=this;if(t._private.animationsRunning=!0,!t.styleEnabled())return;function r(){t._private.animationsRunning&&z3(s(function(a){nve(a,t),r()},"animationStep"))}s(r,"headlessStep");var n=t.renderer();n&&n.beforeRender?n.beforeRender(s(function(a,o){nve(o,t)},"rendererAnimationStep"),n.beforeRenderPriorities.animations):r()},"startAnimationLoop")},Plt={qualifierCompare:s(function(t,r){return t==null||r==null?t==null&&r==null:t.sameText(r)},"qualifierCompare"),eventMatches:s(function(t,r,n){var i=r.qualifier;return i!=null?t!==n.target&&sT(n.target)&&i.matches(n.target):!0},"eventMatches"),addEventFields:s(function(t,r){r.cy=t,r.target=t},"addEventFields"),callbackContext:s(function(t,r,n){return r.qualifier!=null?n.target:t},"callbackContext")},w3=s(function(t){return fr(t)?new uf(t):t},"argSelector"),Oxe={createEmitter:s(function(){var t=this._private;return t.emitter||(t.emitter=new c5(Plt,this)),this},"createEmitter"),emitter:s(function(){return this._private.emitter},"emitter"),on:s(function(t,r,n){return this.emitter().on(t,w3(r),n),this},"on"),removeListener:s(function(t,r,n){return this.emitter().removeListener(t,w3(r),n),this},"removeListener"),removeAllListeners:s(function(){return this.emitter().removeAllListeners(),this},"removeAllListeners"),one:s(function(t,r,n){return this.emitter().one(t,w3(r),n),this},"one"),once:s(function(t,r,n){return this.emitter().one(t,w3(r),n),this},"once"),emit:s(function(t,r){return this.emitter().emit(t,r),this},"emit"),emitAndNotify:s(function(t,r){return this.emit(t),this.notify(t,r),this},"emitAndNotify")};wn.eventAliasesOn(Oxe);VB={png:s(function(t){var r=this._private.renderer;return t=t||{},r.png(t)},"png"),jpg:s(function(t){var r=this._private.renderer;return t=t||{},t.bg=t.bg||"#fff",r.jpg(t)},"jpg")};VB.jpeg=VB.jpg;N3={layout:s(function(t){var r=this;if(t==null){ii("Layout options must be specified to make a layout");return}if(t.name==null){ii("A `name` must be specified to make a layout");return}var n=t.name,i=r.extension("layout",n);if(i==null){ii("No such layout `"+n+"` found. Did you forget to import it and `cytoscape.use()` it?");return}var a;fr(t.eles)?a=r.$(t.eles):a=t.eles!=null?t.eles:r.$();var o=new i(xr({},t,{cy:r,eles:a}));return o},"layout")};N3.createLayout=N3.makeLayout=N3.layout;Olt={notify:s(function(t,r){var n=this._private;if(this.batching()){n.batchNotifications=n.batchNotifications||{};var i=n.batchNotifications[t]=n.batchNotifications[t]||this.collection();r!=null&&i.merge(r);return}if(n.notificationsEnabled){var a=this.renderer();this.destroyed()||!a||a.notify(t,r)}},"notify"),notifications:s(function(t){var r=this._private;return t===void 0?r.notificationsEnabled:(r.notificationsEnabled=!!t,this)},"notifications"),noNotifications:s(function(t){this.notifications(!1),t(),this.notifications(!0)},"noNotifications"),batching:s(function(){return this._private.batchCount>0},"batching"),startBatch:s(function(){var t=this._private;return t.batchCount==null&&(t.batchCount=0),t.batchCount===0&&(t.batchStyleEles=this.collection(),t.batchNotifications={}),t.batchCount++,this},"startBatch"),endBatch:s(function(){var t=this._private;if(t.batchCount===0)return this;if(t.batchCount--,t.batchCount===0){t.batchStyleEles.updateStyle();var r=this.renderer();Object.keys(t.batchNotifications).forEach(function(n){var i=t.batchNotifications[n];i.empty()?r.notify(n):r.notify(n,i)})}return this},"endBatch"),batch:s(function(t){return this.startBatch(),t(),this.endBatch(),this},"batch"),batchData:s(function(t){var r=this;return this.batch(function(){for(var n=Object.keys(t),i=0;i0;)r.removeChild(r.childNodes[0]);t._private.renderer=null,t.mutableElements().forEach(function(n){var i=n._private;i.rscratch={},i.rstyle={},i.animation.current=[],i.animation.queue=[]})},"destroyRenderer"),onRender:s(function(t){return this.on("render",t)},"onRender"),offRender:s(function(t){return this.off("render",t)},"offRender")};WB.invalidateDimensions=WB.resize;P3={collection:s(function(t,r){return fr(t)?this.$(t):So(t)?t.collection():$n(t)?(r||(r={}),new La(this,t,r.unique,r.removed)):new La(this)},"collection"),nodes:s(function(t){var r=this.$(function(n){return n.isNode()});return t?r.filter(t):r},"nodes"),edges:s(function(t){var r=this.$(function(n){return n.isEdge()});return t?r.filter(t):r},"edges"),$:s(function(t){var r=this._private.elements;return t?r.filter(t):r.spawnSelf()},"$"),mutableElements:s(function(){return this._private.elements},"mutableElements")};P3.elements=P3.filter=P3.$;xa={},U2="t",$lt="f";xa.apply=function(e){for(var t=this,r=t._private,n=r.cy,i=n.collection(),a=0;a0;if(p||f&&m){var g=void 0;p&&m||p?g=h.properties:m&&(g=h.mappedProperties);for(var y=0;y1&&(w=1),l.color){var k=n.valueMin[0],S=n.valueMax[0],A=n.valueMin[1],M=n.valueMax[1],N=n.valueMin[2],D=n.valueMax[2],R=n.valueMin[3]==null?1:n.valueMin[3],E=n.valueMax[3]==null?1:n.valueMax[3],I=[Math.round(k+(S-k)*w),Math.round(A+(M-A)*w),Math.round(N+(D-N)*w),Math.round(R+(E-R)*w)];a={bypass:n.bypass,name:n.name,value:I,strValue:"rgb("+I[0]+", "+I[1]+", "+I[2]+")"}}else if(l.number){var L=n.valueMin+(n.valueMax-n.valueMin)*w;a=this.parse(n.name,L,n.bypass,p)}else return!1;if(!a)return y(),!1;a.mapping=n,n=a;break}case o.data:{for(var P=n.field.split("."),B=f.data,O=0;O0&&a>0){for(var l={},u=!1,h=0;h0?e.delayAnimation(o).play().promise().then(T):T()}).then(function(){return e.animation({style:l,duration:a,easing:e.pstyle("transition-timing-function").value,queue:!1}).play().promise()}).then(function(){r.removeBypasses(e,i),e.emitAndNotify("style"),n.transitioning=!1})}else n.transitioning&&(this.removeBypasses(e,i),e.emitAndNotify("style"),n.transitioning=!1)};xa.checkTrigger=function(e,t,r,n,i,a){var o=this.properties[t],l=i(o);e.removed()||l!=null&&l(r,n,e)&&a(o)};xa.checkZOrderTrigger=function(e,t,r,n){var i=this;this.checkTrigger(e,t,r,n,function(a){return a.triggersZOrder},function(){i._private.cy.notify("zorder",e)})};xa.checkBoundsTrigger=function(e,t,r,n){this.checkTrigger(e,t,r,n,function(i){return i.triggersBounds},function(i){e.dirtyCompoundBoundsCache(),e.dirtyBoundingBoxCache()})};xa.checkConnectedEdgesBoundsTrigger=function(e,t,r,n){this.checkTrigger(e,t,r,n,function(i){return i.triggersBoundsOfConnectedEdges},function(i){e.connectedEdges().forEach(function(a){a.dirtyBoundingBoxCache()})})};xa.checkParallelEdgesBoundsTrigger=function(e,t,r,n){this.checkTrigger(e,t,r,n,function(i){return i.triggersBoundsOfParallelEdges},function(i){e.parallelEdges().forEach(function(a){a.dirtyBoundingBoxCache()})})};xa.checkTriggers=function(e,t,r,n){e.dirtyStyleCache(),this.checkZOrderTrigger(e,t,r,n),this.checkBoundsTrigger(e,t,r,n),this.checkConnectedEdgesBoundsTrigger(e,t,r,n),this.checkParallelEdgesBoundsTrigger(e,t,r,n)};fT={};fT.applyBypass=function(e,t,r,n){var i=this,a=[],o=!0;if(t==="*"||t==="**"){if(r!==void 0)for(var l=0;li.length?n=n.substr(i.length):n=""}s(l,"removeSelAndBlockFromRemaining");function u(){a.length>o.length?a=a.substr(o.length):a=""}for(s(u,"removePropAndValFromRem");;){var h=n.match(/^\s*$/);if(h)break;var d=n.match(/^\s*((?:.|\s)+?)\s*\{((?:.|\s)+?)\}/);if(!d){Sn("Halting stylesheet parsing: String stylesheet contains more to parse but no selector and block found in: "+n);break}i=d[0];var f=d[1];if(f!=="core"){var p=new uf(f);if(p.invalid){Sn("Skipping parsing of block: Invalid selector found in string stylesheet: "+f),l();continue}}var m=d[2],g=!1;a=m;for(var y=[];;){var v=a.match(/^\s*$/);if(v)break;var x=a.match(/^\s*(.+?)\s*:\s*(.+?)(?:\s*;|\s*$)/);if(!x){Sn("Skipping parsing of block: Invalid formatting of style property and value definitions found in:"+m),g=!0;break}o=x[0];var b=x[1],T=x[2],w=t.properties[b];if(!w){Sn("Skipping property: Invalid property name in: "+o),u();continue}var C=r.parse(b,T);if(!C){Sn("Skipping property: Invalid property definition in: "+o),u();continue}y.push({name:b,val:T}),u()}if(g){l();break}r.selector(f);for(var k=0;k=7&&t[0]==="d"&&(d=new RegExp(l.data.regex).exec(t))){if(r)return!1;var p=l.data;return{name:e,value:d,strValue:""+t,mapped:p,field:d[1],bypass:r}}else if(t.length>=10&&t[0]==="m"&&(f=new RegExp(l.mapData.regex).exec(t))){if(r||h.multiple)return!1;var m=l.mapData;if(!(h.color||h.number))return!1;var g=this.parse(e,f[4]);if(!g||g.mapped)return!1;var y=this.parse(e,f[5]);if(!y||y.mapped)return!1;if(g.pfValue===y.pfValue||g.strValue===y.strValue)return Sn("`"+e+": "+t+"` is not a valid mapper because the output range is zero; converting to `"+e+": "+g.strValue+"`"),this.parse(e,g.strValue);if(h.color){var v=g.value,x=y.value,b=v[0]===x[0]&&v[1]===x[1]&&v[2]===x[2]&&(v[3]===x[3]||(v[3]==null||v[3]===1)&&(x[3]==null||x[3]===1));if(b)return!1}return{name:e,value:f,strValue:""+t,mapped:m,field:f[1],fieldMin:parseFloat(f[2]),fieldMax:parseFloat(f[3]),valueMin:g.value,valueMax:y.value,bypass:r}}}if(h.multiple&&n!=="multiple"){var T;if(u?T=t.split(/\s+/):$n(t)?T=t:T=[t],h.evenMultiple&&T.length%2!==0)return null;for(var w=[],C=[],k=[],S="",A=!1,M=0;M0?" ":"")+N.strValue}return h.validate&&!h.validate(w,C)?null:h.singleEnum&&A?w.length===1&&fr(w[0])?{name:e,value:w[0],strValue:w[0],bypass:r}:null:{name:e,value:w,pfValue:k,strValue:S,bypass:r,units:C}}var D=s(function(){for(var J=0;Jh.max||h.strictMax&&t===h.max))return null;var P={name:e,value:t,strValue:""+t+(R||""),units:R,bypass:r};return h.unitless||R!=="px"&&R!=="em"?P.pfValue=t:P.pfValue=R==="px"||!R?t:this.getEmSizeInPixels()*t,(R==="ms"||R==="s")&&(P.pfValue=R==="ms"?t:1e3*t),(R==="deg"||R==="rad")&&(P.pfValue=R==="rad"?t:Nat(t)),R==="%"&&(P.pfValue=t/100),P}else if(h.propList){var B=[],O=""+t;if(O!=="none"){for(var $=O.split(/\s*,\s*|\s+/),G=0;G<$.length;G++){var V=$[G].trim();i.properties[V]?B.push(V):Sn("`"+V+"` is not a valid property name")}if(B.length===0)return null}return{name:e,value:B,strValue:B.length===0?"none":B.join(" "),bypass:r}}else if(h.color){var z=Fve(t);return z?{name:e,value:z,pfValue:z,strValue:"rgb("+z[0]+","+z[1]+","+z[2]+")",bypass:r}:null}else if(h.regex||h.regexes){if(h.enums){var W=D();if(W)return W}for(var H=h.regexes?h.regexes:[h.regex],j=0;j0&&l>0&&!isNaN(n.w)&&!isNaN(n.h)&&n.w>0&&n.h>0){u=Math.min((o-2*r)/n.w,(l-2*r)/n.h),u=u>this._private.maxZoom?this._private.maxZoom:u,u=u=n.minZoom&&(n.maxZoom=r),this},"zoomRange"),minZoom:s(function(t){return t===void 0?this._private.minZoom:this.zoomRange({min:t})},"minZoom"),maxZoom:s(function(t){return t===void 0?this._private.maxZoom:this.zoomRange({max:t})},"maxZoom"),getZoomedViewport:s(function(t){var r=this._private,n=r.pan,i=r.zoom,a,o,l=!1;if(r.zoomingEnabled||(l=!0),Vt(t)?o=t:an(t)&&(o=t.level,t.position!=null?a=r5(t.position,i,n):t.renderedPosition!=null&&(a=t.renderedPosition),a!=null&&!r.panningEnabled&&(l=!0)),o=o>r.maxZoom?r.maxZoom:o,o=or.maxZoom||!r.zoomingEnabled?o=!0:(r.zoom=u,a.push("zoom"))}if(i&&(!o||!t.cancelOnFailedZoom)&&r.panningEnabled){var h=t.pan;Vt(h.x)&&(r.pan.x=h.x,l=!1),Vt(h.y)&&(r.pan.y=h.y,l=!1),l||a.push("pan")}return a.length>0&&(a.push("viewport"),this.emit(a.join(" ")),this.notify("viewport")),this},"viewport"),center:s(function(t){var r=this.getCenterPan(t);return r&&(this._private.pan=r,this.emit("pan viewport"),this.notify("viewport")),this},"center"),getCenterPan:s(function(t,r){if(this._private.panningEnabled){if(fr(t)){var n=t;t=this.mutableElements().filter(n)}else So(t)||(t=this.mutableElements());if(t.length!==0){var i=t.boundingBox(),a=this.width(),o=this.height();r=r===void 0?this._private.zoom:r;var l={x:(a-r*(i.x1+i.x2))/2,y:(o-r*(i.y1+i.y2))/2};return l}}},"getCenterPan"),reset:s(function(){return!this._private.panningEnabled||!this._private.zoomingEnabled?this:(this.viewport({pan:{x:0,y:0},zoom:1}),this)},"reset"),invalidateSize:s(function(){this._private.sizeCache=null},"invalidateSize"),size:s(function(){var t=this._private,r=t.container,n=this;return t.sizeCache=t.sizeCache||(r?(function(){var i=n.window().getComputedStyle(r),a=s(function(l){return parseFloat(i.getPropertyValue(l))},"val");return{width:r.clientWidth-a("padding-left")-a("padding-right"),height:r.clientHeight-a("padding-top")-a("padding-bottom")}})():{width:1,height:1})},"size"),width:s(function(){return this.size().width},"width"),height:s(function(){return this.size().height},"height"),extent:s(function(){var t=this._private.pan,r=this._private.zoom,n=this.renderedExtent(),i={x1:(n.x1-t.x)/r,x2:(n.x2-t.x)/r,y1:(n.y1-t.y)/r,y2:(n.y2-t.y)/r};return i.w=i.x2-i.x1,i.h=i.y2-i.y1,i},"extent"),renderedExtent:s(function(){var t=this.width(),r=this.height();return{x1:0,y1:0,x2:t,y2:r,w:t,h:r}},"renderedExtent"),multiClickDebounceTime:s(function(t){if(t)this._private.multiClickDebounceTime=t;else return this._private.multiClickDebounceTime;return this},"multiClickDebounceTime")};Cm.centre=Cm.center;Cm.autolockNodes=Cm.autolock;Cm.autoungrabifyNodes=Cm.autoungrabify;rT={data:wn.data({field:"data",bindingEvent:"data",allowBinding:!0,allowSetting:!0,settingEvent:"data",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeData:wn.removeData({field:"data",event:"data",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0}),scratch:wn.data({field:"scratch",bindingEvent:"scratch",allowBinding:!0,allowSetting:!0,settingEvent:"scratch",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeScratch:wn.removeData({field:"scratch",event:"scratch",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0})};rT.attr=rT.data;rT.removeAttr=rT.removeData;nT=s(function(t){var r=this;t=xr({},t);var n=t.container;n&&!G3(n)&&G3(n[0])&&(n=n[0]);var i=n?n._cyreg:null;i=i||{},i&&i.cy&&(i.cy.destroy(),i={});var a=i.readies=i.readies||[];n&&(n._cyreg=i),i.cy=r;var o=Zi!==void 0&&n!==void 0&&!t.headless,l=t;l.layout=xr({name:o?"grid":"null"},l.layout),l.renderer=xr({name:o?"canvas":"null"},l.renderer);var u=s(function(g,y,v){return y!==void 0?y:v!==void 0?v:g},"defVal"),h=this._private={container:n,ready:!1,options:l,elements:new La(this),listeners:[],aniEles:new La(this),data:l.data||{},scratch:{},layout:null,renderer:null,destroyed:!1,notificationsEnabled:!0,minZoom:1e-50,maxZoom:1e50,zoomingEnabled:u(!0,l.zoomingEnabled),userZoomingEnabled:u(!0,l.userZoomingEnabled),panningEnabled:u(!0,l.panningEnabled),userPanningEnabled:u(!0,l.userPanningEnabled),boxSelectionEnabled:u(!0,l.boxSelectionEnabled),autolock:u(!1,l.autolock,l.autolockNodes),autoungrabify:u(!1,l.autoungrabify,l.autoungrabifyNodes),autounselectify:u(!1,l.autounselectify),styleEnabled:l.styleEnabled===void 0?o:l.styleEnabled,zoom:Vt(l.zoom)?l.zoom:1,pan:{x:an(l.pan)&&Vt(l.pan.x)?l.pan.x:0,y:an(l.pan)&&Vt(l.pan.y)?l.pan.y:0},animation:{current:[],queue:[]},hasCompoundNodes:!1,multiClickDebounceTime:u(250,l.multiClickDebounceTime)};this.createEmitter(),this.selectionType(l.selectionType),this.zoomRange({min:l.minZoom,max:l.maxZoom});var d=s(function(g,y){var v=g.some(Rit);if(v)return t1.all(g).then(y);y(g)},"loadExtData");h.styleEnabled&&r.setStyle([]);var f=xr({},l,l.renderer);r.initRenderer(f);var p=s(function(g,y,v){r.notifications(!1);var x=r.mutableElements();x.length>0&&x.remove(),g!=null&&(an(g)||$n(g))&&r.add(g),r.one("layoutready",function(T){r.notifications(!0),r.emit(T),r.one("load",y),r.emitAndNotify("load")}).one("layoutstop",function(){r.one("done",v),r.emit("done")});var b=xr({},r._private.options.layout);b.eles=r.elements(),r.layout(b).run()},"setElesAndLayout");d([l.style,l.elements],function(m){var g=m[0],y=m[1];h.styleEnabled&&r.style().append(g),p(y,function(){r.startAnimationLoop(),h.ready=!0,hi(l.ready)&&r.on("ready",l.ready);for(var v=0;v0,l=!!e.boundingBox,u=xs(l?e.boundingBox:structuredClone(t.extent())),h;if(So(e.roots))h=e.roots;else if($n(e.roots)){for(var d=[],f=0;f0;){var I=E(),L=M(I,D);if(L)I.outgoers().filter(function(_e){return _e.isNode()&&r.has(_e)}).forEach(R);else if(L===null){Sn("Detected double maximal shift for node `"+I.id()+"`. Bailing maximal adjustment due to cycle. Use `options.maximal: true` only on DAGs.");break}}}var P=0;if(e.avoidOverlap)for(var B=0;B0&&x[0].length<=3?ie/2:0),ve=2*Math.PI/x[Z].length*ae;return Z===0&&x[0].length===1&&(le=1),{x:oe.x+le*Math.cos(ve),y:oe.y+le*Math.sin(ve)}}else{var ne=x[Z].length,Me=Math.max(ne===1?0:l?(u.w-e.padding*2-Se.w)/((e.grid?Ne:ne)-1):(u.w-e.padding*2-Se.w)/((e.grid?Ne:ne)+1),P),re={x:oe.x+(ae+1-(ne+1)/2)*Me,y:oe.y+(Z+1-(j+1)/2)*xe};return re}},"getPositionTopBottom"),We={downward:0,leftward:90,upward:180,rightward:-90};Object.keys(We).indexOf(e.direction)===-1&&ii("Invalid direction '".concat(e.direction,"' specified for breadthfirst layout. Valid values are: ").concat(Object.keys(We).join(", ")));var pe=s(function(Ee){return nat(Ye(Ee),u,We[e.direction])},"getPosition");return r.nodes().layoutPositions(this,e,pe),this};Wlt={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:s(function(t,r){return!0},"animateFilter"),ready:void 0,stop:void 0,transform:s(function(t,r){return r},"transform")};s($xe,"CircleLayout");$xe.prototype.run=function(){var e=this.options,t=e,r=e.cy,n=t.eles,i=t.counterclockwise!==void 0?!t.counterclockwise:t.clockwise,a=n.nodes().not(":parent");t.sort&&(a=a.sort(t.sort));for(var o=xs(t.boundingBox?t.boundingBox:{x1:0,y1:0,w:r.width(),h:r.height()}),l={x:o.x1+o.w/2,y:o.y1+o.h/2},u=t.sweep===void 0?2*Math.PI-2*Math.PI/a.length:t.sweep,h=u/Math.max(1,a.length-1),d,f=0,p=0;p1&&t.avoidOverlap){f*=1.75;var x=Math.cos(h)-Math.cos(0),b=Math.sin(h)-Math.sin(0),T=Math.sqrt(f*f/(x*x+b*b));d=Math.max(T,d)}var w=s(function(k,S){var A=t.startAngle+S*h*(i?1:-1),M=d*Math.cos(A),N=d*Math.sin(A),D={x:l.x+M,y:l.y+N};return D},"getPos");return n.nodes().layoutPositions(this,t,w),this};qlt={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:s(function(t){return t.degree()},"concentric"),levelWidth:s(function(t){return t.maxDegree()/4},"levelWidth"),animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:s(function(t,r){return!0},"animateFilter"),ready:void 0,stop:void 0,transform:s(function(t,r){return r},"transform")};s(Fxe,"ConcentricLayout");Fxe.prototype.run=function(){for(var e=this.options,t=e,r=t.counterclockwise!==void 0?!t.counterclockwise:t.clockwise,n=e.cy,i=t.eles,a=i.nodes().not(":parent"),o=xs(t.boundingBox?t.boundingBox:{x1:0,y1:0,w:n.width(),h:n.height()}),l={x:o.x1+o.w/2,y:o.y1+o.h/2},u=[],h=0,d=0;d0){var C=Math.abs(b[0].value-w.value);C>=v&&(b=[],x.push(b))}b.push(w)}var k=h+t.minNodeSpacing;if(!t.avoidOverlap){var S=x.length>0&&x[0].length>1,A=Math.min(o.w,o.h)/2-k,M=A/(x.length+S?1:0);k=Math.min(k,M)}for(var N=0,D=0;D1&&t.avoidOverlap){var L=Math.cos(I)-Math.cos(0),P=Math.sin(I)-Math.sin(0),B=Math.sqrt(k*k/(L*L+P*P));N=Math.max(B,N)}R.r=N,N+=k}if(t.equidistant){for(var O=0,$=0,G=0;G=e.numIter||(Zlt(n,e),n.temperature=n.temperature*e.coolingFactor,n.temperature=e.animationThreshold&&a(),z3(d)}},"frame");d()}else{for(;h;)h=o(u),u++;sve(n,e),l()}return this};p5.prototype.stop=function(){return this.stopped=!0,this.thread&&this.thread.stop(),this.emit("layoutstop"),this};p5.prototype.destroy=function(){return this.thread&&this.thread.stop(),this};Ult=s(function(t,r,n){for(var i=n.eles.edges(),a=n.eles.nodes(),o=xs(n.boundingBox?n.boundingBox:{x1:0,y1:0,w:t.width(),h:t.height()}),l={isCompound:t.hasCompoundNodes(),layoutNodes:[],idToIndex:{},nodeSize:a.size(),graphSet:[],indexToGraph:[],layoutEdges:[],edgeSize:i.size(),temperature:n.initialTemp,clientWidth:o.w,clientHeight:o.h,boundingBox:o},u=n.eles.components(),h={},d=0;d0){l.graphSet.push(A);for(var d=0;di.count?0:i.graph},"findLCA"),Gxe=s(function(t,r,n,i){var a=i.graphSet[n];if(-10)var f=i.nodeOverlap*d,p=Math.sqrt(l*l+u*u),m=f*l/p,g=f*u/p;else var y=j3(t,l,u),v=j3(r,-1*l,-1*u),x=v.x-y.x,b=v.y-y.y,T=x*x+b*b,p=Math.sqrt(T),f=(t.nodeRepulsion+r.nodeRepulsion)/T,m=f*x/p,g=f*b/p;t.isLocked||(t.offsetX-=m,t.offsetY-=g),r.isLocked||(r.offsetX+=m,r.offsetY+=g)}},"nodeRepulsion"),ect=s(function(t,r,n,i){if(n>0)var a=t.maxX-r.minX;else var a=r.maxX-t.minX;if(i>0)var o=t.maxY-r.minY;else var o=r.maxY-t.minY;return a>=0&&o>=0?Math.sqrt(a*a+o*o):0},"nodesOverlap"),j3=s(function(t,r,n){var i=t.positionX,a=t.positionY,o=t.height||1,l=t.width||1,u=n/r,h=o/l,d={};return r===0&&0n?(d.x=i,d.y=a+o/2,d):0r&&-1*h<=u&&u<=h?(d.x=i-l/2,d.y=a-l*n/2/r,d):0=h)?(d.x=i+o*r/2/n,d.y=a+o/2,d):(0>n&&(u<=-1*h||u>=h)&&(d.x=i-o*r/2/n,d.y=a-o/2),d)},"findClippingPoint"),tct=s(function(t,r){for(var n=0;nn){var v=r.gravity*m/y,x=r.gravity*g/y;p.offsetX+=v,p.offsetY+=x}}}}},"calculateGravityForces"),nct=s(function(t,r){var n=[],i=0,a=-1;for(n.push.apply(n,t.graphSet[0]),a+=t.graphSet[0].length;i<=a;){var o=n[i++],l=t.idToIndex[o],u=t.layoutNodes[l],h=u.children;if(0n)var a={x:n*t/i,y:n*r/i};else var a={x:t,y:r};return a},"limitForce"),Vxe=s(function(t,r){var n=t.parentId;if(n!=null){var i=r.layoutNodes[r.idToIndex[n]],a=!1;if((i.maxX==null||t.maxX+i.padRight>i.maxX)&&(i.maxX=t.maxX+i.padRight,a=!0),(i.minX==null||t.minX-i.padLefti.maxY)&&(i.maxY=t.maxY+i.padBottom,a=!0),(i.minY==null||t.minY-i.padTopx&&(g+=v+r.componentSpacing,m=0,y=0,v=0)}}},"separateComponents"),sct={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:s(function(t){},"position"),sort:void 0,animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:s(function(t,r){return!0},"animateFilter"),ready:void 0,stop:void 0,transform:s(function(t,r){return r},"transform")};s(Wxe,"GridLayout");Wxe.prototype.run=function(){var e=this.options,t=e,r=e.cy,n=t.eles,i=n.nodes().not(":parent");t.sort&&(i=i.sort(t.sort));var a=xs(t.boundingBox?t.boundingBox:{x1:0,y1:0,w:r.width(),h:r.height()});if(a.h===0||a.w===0)n.nodes().layoutPositions(this,t,function(W){return{x:a.x1,y:a.y1}});else{var o=i.size(),l=Math.sqrt(o*a.h/a.w),u=Math.round(l),h=Math.round(a.w/a.h*l),d=s(function(H){if(H==null)return Math.min(u,h);var j=Math.min(u,h);j==u?u=H:h=H},"small"),f=s(function(H){if(H==null)return Math.max(u,h);var j=Math.max(u,h);j==u?u=H:h=H},"large"),p=t.rows,m=t.cols!=null?t.cols:t.columns;if(p!=null&&m!=null)u=p,h=m;else if(p!=null&&m==null)u=p,h=Math.ceil(o/u);else if(p==null&&m!=null)h=m,u=Math.ceil(o/h);else if(h*u>o){var g=d(),y=f();(g-1)*y>=o?d(g-1):(y-1)*g>=o&&f(y-1)}else for(;h*u=o?f(x+1):d(v+1)}var b=a.w/h,T=a.h/u;if(t.condense&&(b=0,T=0),t.avoidOverlap)for(var w=0;w=h&&(L=0,I++)},"moveToNextCell"),B={},O=0;O(L=jat(e,t,P[B],P[B+1],P[B+2],P[B+3])))return v(S,L),!0}else if(M.edgeType==="bezier"||M.edgeType==="multibezier"||M.edgeType==="self"||M.edgeType==="compound"){for(var P=M.allpts,B=0;B+5(L=Yat(e,t,P[B],P[B+1],P[B+2],P[B+3],P[B+4],P[B+5])))return v(S,L),!0}for(var O=O||A.source,$=$||A.target,G=i.getArrowWidth(N,D),V=[{name:"source",x:M.arrowStartX,y:M.arrowStartY,angle:M.srcArrowAngle},{name:"target",x:M.arrowEndX,y:M.arrowEndY,angle:M.tgtArrowAngle},{name:"mid-source",x:M.midX,y:M.midY,angle:M.midsrcArrowAngle},{name:"mid-target",x:M.midX,y:M.midY,angle:M.midtgtArrowAngle}],B=0;B0&&(x(O),x($))}s(b,"checkEdge");function T(S,A,M){return vs(S,A,M)}s(T,"preprop");function w(S,A){var M=S._private,N=p,D;A?D=A+"-":D="",S.boundingBox();var R=M.labelBounds[A||"main"],E=S.pstyle(D+"label").value,I=S.pstyle("text-events").strValue==="yes";if(!(!I||!E)){var L=T(M.rscratch,"labelX",A),P=T(M.rscratch,"labelY",A),B=T(M.rscratch,"labelAngle",A),O=S.pstyle(D+"text-margin-x").pfValue,$=S.pstyle(D+"text-margin-y").pfValue,G=R.x1-N-O,V=R.x2+N-O,z=R.y1-N-$,W=R.y2+N-$;if(B){var H=Math.cos(B),j=Math.sin(B),Q=s(function(Se,xe){return Se=Se-L,xe=xe-P,{x:Se*H-xe*j+L,y:Se*j+xe*H+P}},"rotate"),U=Q(G,z),ue=Q(G,W),J=Q(V,z),he=Q(V,W),se=[U.x+O,U.y+$,J.x+O,J.y+$,he.x+O,he.y+$,ue.x+O,ue.y+$];if(Zs(e,t,se))return v(S),!0}else if(rf(R,e,t))return v(S),!0}}s(w,"checkLabel");for(var C=o.length-1;C>=0;C--){var k=o[C];k.isNode()?x(k)||w(k):b(k)||w(k)||w(k,"source")||w(k,"target")}return l};wm.getAllInBox=function(e,t,r,n){var i=this.getCachedZSortedEles().interactive,a=this.cy.zoom(),o=2/a,l=[],u=Math.min(e,r),h=Math.max(e,r),d=Math.min(t,n),f=Math.max(t,n);e=u,r=h,t=d,n=f;var p=xs({x1:e,y1:t,x2:r,y2:n}),m=[{x:p.x1,y:p.y1},{x:p.x2,y:p.y1},{x:p.x2,y:p.y2},{x:p.x1,y:p.y2}],g=[[m[0],m[1]],[m[1],m[2]],[m[2],m[3]],[m[3],m[0]]];function y(Se,xe,Ne){return vs(Se,xe,Ne)}s(y,"preprop");function v(Se,xe){var Ne=Se._private,Ye=o,We="";Se.boundingBox();var pe=Ne.labelBounds.main;if(!pe)return null;var _e=y(Ne.rscratch,"labelX",xe),Ee=y(Ne.rscratch,"labelY",xe),Re=y(Ne.rscratch,"labelAngle",xe),Z=Se.pstyle(We+"text-margin-x").pfValue,ae=Se.pstyle(We+"text-margin-y").pfValue,ie=pe.x1-Ye-Z,le=pe.x2+Ye-Z,ve=pe.y1-Ye-ae,ne=pe.y2+Ye-ae;if(Re){var Me=Math.cos(Re),re=Math.sin(Re),ce=s(function(de,X){return de=de-_e,X=X-Ee,{x:de*Me-X*re+_e,y:de*re+X*Me+Ee}},"rotate");return[ce(ie,ve),ce(le,ve),ce(le,ne),ce(ie,ne)]}else return[{x:ie,y:ve},{x:le,y:ve},{x:le,y:ne},{x:ie,y:ne}]}s(v,"getRotatedLabelBox");function x(Se,xe,Ne,Ye){function We(pe,_e,Ee){return(Ee.y-pe.y)*(_e.x-pe.x)>(_e.y-pe.y)*(Ee.x-pe.x)}return s(We,"ccw"),We(Se,Ne,Ye)!==We(xe,Ne,Ye)&&We(Se,xe,Ne)!==We(Se,xe,Ye)}s(x,"doLinesIntersect");for(var b=0;b0?-(Math.PI-t.ang):Math.PI+t.ang},"invertVec"),dct=s(function(t,r,n,i,a){if(t!==hve?dve(r,t,zc):hct(el,zc),dve(r,n,el),cve=zc.nx*el.ny-zc.ny*el.nx,uve=zc.nx*el.nx-zc.ny*-el.ny,eh=Math.asin(Math.max(-1,Math.min(1,cve))),Math.abs(eh)<1e-6){qB=r.x,HB=r.y,mm=$y=0;return}ym=1,O3=!1,uve<0?eh<0?eh=Math.PI+eh:(eh=Math.PI-eh,ym=-1,O3=!0):eh>0&&(ym=-1,O3=!0),r.radius!==void 0?$y=r.radius:$y=i,hm=eh/2,S3=Math.min(zc.len/2,el.len/2),a?(Fc=Math.abs(Math.cos(hm)*$y/Math.sin(hm)),Fc>S3?(Fc=S3,mm=Math.abs(Fc*Math.sin(hm)/Math.cos(hm))):mm=$y):(Fc=Math.min(S3,$y),mm=Math.abs(Fc*Math.sin(hm)/Math.cos(hm))),UB=r.x+el.nx*Fc,YB=r.y+el.ny*Fc,qB=UB-el.ny*mm*ym,HB=YB+el.nx*mm*ym,Yxe=r.x+zc.nx*Fc,jxe=r.y+zc.ny*Fc,hve=r},"calcCornerArc");s(Xxe,"drawPreparedRoundCorner");s(b$,"getRoundCorner");iT=.01,fct=Math.sqrt(2*iT),Ja={};Ja.findMidptPtsEtc=function(e,t){var r=t.posPts,n=t.intersectionPts,i=t.vectorNormInverse,a,o=e.pstyle("source-endpoint"),l=e.pstyle("target-endpoint"),u=o.units!=null&&l.units!=null,h=s(function(C,k,S,A){var M=A-k,N=S-C,D=Math.sqrt(N*N+M*M);return{x:-M/D,y:N/D}},"recalcVectorNormInverse"),d=e.pstyle("edge-distances").value;switch(d){case"node-position":a=r;break;case"intersection":a=n;break;case"endpoints":{if(u){var f=this.manualEndptToPx(e.source()[0],o),p=zi(f,2),m=p[0],g=p[1],y=this.manualEndptToPx(e.target()[0],l),v=zi(y,2),x=v[0],b=v[1],T={x1:m,y1:g,x2:x,y2:b};i=h(m,g,x,b),a=T}else Sn("Edge ".concat(e.id()," has edge-distances:endpoints specified without manual endpoints specified via source-endpoint and target-endpoint. Falling back on edge-distances:intersection (default).")),a=n;break}}return{midptPts:a,vectorNormInverse:i}};Ja.findHaystackPoints=function(e){for(var t=0;t0?Math.max(X-ye,0):Math.min(X+ye,0)},"subDWH"),E=R(N,A),I=R(D,M),L=!1;b===h?x=Math.abs(E)>Math.abs(I)?i:n:b===u||b===l?(x=n,L=!0):(b===a||b===o)&&(x=i,L=!0);var P=x===n,B=P?I:E,O=P?D:N,$=o$(O),G=!1;!(L&&(w||k))&&(b===l&&O<0||b===u&&O>0||b===a&&O>0||b===o&&O<0)&&($*=-1,B=$*Math.abs(B),G=!0);var V;if(w){var z=C<0?1+C:C;V=z*B}else{var W=C<0?B:0;V=W+C*$}var H=s(function(X){return Math.abs(X)=Math.abs(B)},"getIsTooClose"),j=H(V),Q=H(Math.abs(B)-Math.abs(V)),U=j||Q;if(U&&!G)if(P){var ue=Math.abs(O)<=p/2,J=Math.abs(N)<=m/2;if(ue){var he=(d.x1+d.x2)/2,se=d.y1,oe=d.y2;r.segpts=[he,se,he,oe]}else if(J){var Se=(d.y1+d.y2)/2,xe=d.x1,Ne=d.x2;r.segpts=[xe,Se,Ne,Se]}else r.segpts=[d.x1,d.y2]}else{var Ye=Math.abs(O)<=f/2,We=Math.abs(D)<=g/2;if(Ye){var pe=(d.y1+d.y2)/2,_e=d.x1,Ee=d.x2;r.segpts=[_e,pe,Ee,pe]}else if(We){var Re=(d.x1+d.x2)/2,Z=d.y1,ae=d.y2;r.segpts=[Re,Z,Re,ae]}else r.segpts=[d.x2,d.y1]}else if(P){var ie=d.y1+V+(v?p/2*$:0),le=d.x1,ve=d.x2;r.segpts=[le,ie,ve,ie]}else{var ne=d.x1+V+(v?f/2*$:0),Me=d.y1,re=d.y2;r.segpts=[ne,Me,ne,re]}if(r.isRound){var ce=e.pstyle("taxi-radius").value,q=e.pstyle("radius-type").value[0]==="arc-radius";r.radii=new Array(r.segpts.length/2).fill(ce),r.isArcRadius=new Array(r.segpts.length/2).fill(q)}};Ja.tryToCorrectInvalidPoints=function(e,t){var r=e._private.rscratch;if(r.edgeType==="bezier"){var n=t.srcPos,i=t.tgtPos,a=t.srcW,o=t.srcH,l=t.tgtW,u=t.tgtH,h=t.srcShape,d=t.tgtShape,f=t.srcCornerRadius,p=t.tgtCornerRadius,m=t.srcRs,g=t.tgtRs,y=!Vt(r.startX)||!Vt(r.startY),v=!Vt(r.arrowStartX)||!Vt(r.arrowStartY),x=!Vt(r.endX)||!Vt(r.endY),b=!Vt(r.arrowEndX)||!Vt(r.arrowEndY),T=3,w=this.getArrowWidth(e.pstyle("width").pfValue,e.pstyle("arrow-scale").value)*this.arrowShapeWidth,C=T*w,k=bm({x:r.ctrlpts[0],y:r.ctrlpts[1]},{x:r.startX,y:r.startY}),S=kO.poolIndex()){var $=B;B=O,O=$}var G=E.srcPos=B.position(),V=E.tgtPos=O.position(),z=E.srcW=B.outerWidth(),W=E.srcH=B.outerHeight(),H=E.tgtW=O.outerWidth(),j=E.tgtH=O.outerHeight(),Q=E.srcShape=r.nodeShapes[t.getNodeShape(B)],U=E.tgtShape=r.nodeShapes[t.getNodeShape(O)],ue=E.srcCornerRadius=B.pstyle("corner-radius").value==="auto"?"auto":B.pstyle("corner-radius").pfValue,J=E.tgtCornerRadius=O.pstyle("corner-radius").value==="auto"?"auto":O.pstyle("corner-radius").pfValue,he=E.tgtRs=O._private.rscratch,se=E.srcRs=B._private.rscratch;E.dirCounts={north:0,west:0,south:0,east:0,northwest:0,southwest:0,northeast:0,southeast:0};for(var oe=0;oe=fct||(ve=Math.sqrt(Math.max(le*le,iT)+Math.max(ie*ie,iT)));var ne=E.vector={x:le,y:ie},Me=E.vectorNorm={x:ne.x/ve,y:ne.y/ve},re={x:-Me.y,y:Me.x};E.nodesOverlap=!Vt(ve)||U.checkPoint(pe[0],pe[1],0,H,j,V.x,V.y,J,he)||Q.checkPoint(Ee[0],Ee[1],0,z,W,G.x,G.y,ue,se),E.vectorNormInverse=re,I={nodesOverlap:E.nodesOverlap,dirCounts:E.dirCounts,calculatedIntersection:!0,hasBezier:E.hasBezier,hasUnbundled:E.hasUnbundled,eles:E.eles,srcPos:V,srcRs:he,tgtPos:G,tgtRs:se,srcW:H,srcH:j,tgtW:z,tgtH:W,srcIntn:Re,tgtIntn:_e,srcShape:U,tgtShape:Q,posPts:{x1:ae.x2,y1:ae.y2,x2:ae.x1,y2:ae.y1},intersectionPts:{x1:Z.x2,y1:Z.y2,x2:Z.x1,y2:Z.y1},vector:{x:-ne.x,y:-ne.y},vectorNorm:{x:-Me.x,y:-Me.y},vectorNormInverse:{x:-re.x,y:-re.y}}}var ce=We?I:E;xe.nodesOverlap=ce.nodesOverlap,xe.srcIntn=ce.srcIntn,xe.tgtIntn=ce.tgtIntn,xe.isRound=Ne.startsWith("round"),i&&(B.isParent()||B.isChild()||O.isParent()||O.isChild())&&(B.parents().anySame(O)||O.parents().anySame(B)||B.same(O)&&B.isParent())?t.findCompoundLoopPoints(Se,ce,oe,Ye):B===O?t.findLoopPoints(Se,ce,oe,Ye):Ne.endsWith("segments")?t.findSegmentsPoints(Se,ce):Ne.endsWith("taxi")?t.findTaxiPoints(Se,ce):Ne==="straight"||!Ye&&E.eles.length%2===1&&oe===Math.floor(E.eles.length/2)?t.findStraightEdgePoints(Se):t.findBezierPoints(Se,ce,oe,Ye,We),t.findEndpoints(Se),t.tryToCorrectInvalidPoints(Se,ce),t.checkForInvalidEdgeWarning(Se),t.storeAllpts(Se),t.storeEdgeProjections(Se),t.calculateArrowAngles(Se),t.recalculateEdgeLabelProjections(Se),t.calculateLabelAngles(Se)}},"_loop"),S=0;S0){var pe=h,_e=pm(pe,Vy(o)),Ee=pm(pe,Vy(We)),Re=_e;if(Ee<_e&&(o=We,Re=Ee),We.length>2){var Z=pm(pe,{x:We[2],y:We[3]});Z0){var K=d,Ge=pm(K,Vy(o)),Ae=pm(K,Vy(ye)),$e=Ge;if(Ae2){var Oe=pm(K,{x:ye[2],y:ye[3]});Oe<$e&&(o=[ye[2],ye[3]])}}}var at=v3(o,$,a.arrowShapes[p].spacing(e)+g),Pe=v3(o,$,a.arrowShapes[p].gap(e)+g);b.startX=Pe[0],b.startY=Pe[1],b.arrowStartX=at[0],b.arrowStartY=at[1],N&&(!Vt(b.startX)||!Vt(b.startY)||!Vt(b.endX)||!Vt(b.endY)?b.badLine=!0:b.badLine=!1)};pT.getSourceEndpoint=function(e){var t=e[0]._private.rscratch;switch(this.recalculateRenderedStyle(e),t.edgeType){case"haystack":return{x:t.haystackPts[0],y:t.haystackPts[1]};default:return{x:t.arrowStartX,y:t.arrowStartY}}};pT.getTargetEndpoint=function(e){var t=e[0]._private.rscratch;switch(this.recalculateRenderedStyle(e),t.edgeType){case"haystack":return{x:t.haystackPts[2],y:t.haystackPts[3]};default:return{x:t.arrowEndX,y:t.arrowEndY}}};T$={};s(pct,"pushBezierPts");T$.storeEdgeProjections=function(e){var t=e._private,r=t.rscratch,n=r.edgeType;if(t.rstyle.bezierPts=null,t.rstyle.linePts=null,t.rstyle.haystackPts=null,n==="multibezier"||n==="bezier"||n==="self"||n==="compound"){t.rstyle.bezierPts=[];for(var i=0;i+5=g||S){v={cp:w,segment:k};break}}if(v)break}var A=v.cp,M=v.segment,N=(g-x)/M.length,D=M.t1-M.t0,R=m?M.t0+D*N:M.t1-D*N;R=Q2(0,R,1),t=Hy(A.p0,A.p1,A.p2,R),p=mct(A.p0,A.p1,A.p2,R);break}case"straight":case"segments":case"haystack":{for(var E=0,I,L,P,B,O=n.allpts.length,$=0;$+3=g));$+=2);var G=g-L,V=G/I;V=Q2(0,V,1),t=Oat(P,B,V),p=Qxe(P,B);break}}o("labelX",f,t.x),o("labelY",f,t.y),o("labelAutoAngle",f,p)}},"calculateEndProjection");h("source"),h("target"),this.applyLabelDimensions(e)}};Hc.applyLabelDimensions=function(e){this.applyPrefixedLabelDimensions(e),e.isEdge()&&(this.applyPrefixedLabelDimensions(e,"source"),this.applyPrefixedLabelDimensions(e,"target"))};Hc.applyPrefixedLabelDimensions=function(e,t){var r=e._private,n=this.getLabelText(e,t),i=xm(n,e._private.labelDimsKey);if(vs(r.rscratch,"prefixedLabelDimsKey",t)!==i){Vc(r.rscratch,"prefixedLabelDimsKey",t,i);var a=this.calculateLabelDimensions(e,n),o=e.pstyle("line-height").pfValue,l=e.pstyle("font-size").pfValue,u=e.pstyle("text-wrap").strValue,h=vs(r.rscratch,"labelWrapCachedLines",t)||[],d=u!=="wrap"?1:Math.max(h.length,1),f=l*o,p=a.width,m=a.height+(d-1)*(o-1)*l;Vc(r.rstyle,"labelWidth",t,p),Vc(r.rscratch,"labelWidth",t,p),Vc(r.rstyle,"labelHeight",t,m),Vc(r.rscratch,"labelHeight",t,m),Vc(r.rscratch,"labelLineHeight",t,f),Vc(r.rscratch,"labelActualDescent",t,a.labelActualDescent)}};Hc.getLabelText=function(e,t){var r=e._private,n=t?t+"-":"",i=e.pstyle(n+"label").strValue,a=e.pstyle("text-transform").value,o=s(function(W,H){return H?(Vc(r.rscratch,W,t,H),H):vs(r.rscratch,W,t)},"rscratch");if(!i)return"";a=="none"||(a=="uppercase"?i=i.toUpperCase():a=="lowercase"&&(i=i.toLowerCase()));var l=e.pstyle("text-wrap").value;if(l==="wrap"){var u=o("labelKey");if(u!=null&&o("labelWrapKey")===u)return o("labelWrapCachedText");for(var h="\u200B",d=i.split(` +`),f=e.pstyle("text-max-width").pfValue,p=e.pstyle("text-overflow-wrap").value,m=p==="anywhere",g=[],y=/[\s\u200b]+|$/g,v=0;vf){var C=x.matchAll(y),k="",S=0,A=Qs(C),M;try{for(A.s();!(M=A.n()).done;){var N=M.value,D=N[0],R=x.substring(S,N.index);S=N.index+D.length;var E=k.length===0?R:k+R+D,I=this.calculateLabelDimensions(e,E),L=I.width;L<=f?k+=R+D:(k&&g.push(k),k=R+D)}}catch(z){A.e(z)}finally{A.f()}k.match(/^[\s\u200b]+$/)||g.push(k)}else g.push(x)}o("labelWrapCachedLines",g),i=o("labelWrapCachedText",g.join(` +`)),o("labelWrapKey",u)}else if(l==="ellipsis"){var P=e.pstyle("text-max-width").pfValue,B="",O="\u2026",$=!1;if(this.calculateLabelDimensions(e,i).widthP)break;B+=i[G],G===i.length-1&&($=!0)}return $||(B+=O),B}return i};Hc.getLabelJustification=function(e){var t=e.pstyle("text-justification").strValue,r=e.pstyle("text-halign").strValue;return t==="auto"?e.isNode()?rlt(r):"center":t};Hc.calculateLabelDimensions=function(e,t){var r=this,n=r.cy.window(),i=n.document,a=0,o=e.pstyle("font-style").strValue,l=e.pstyle("font-size").pfValue,u=e.pstyle("font-family").strValue,h=e.pstyle("font-weight").strValue,d=e.pstyle("text-metrics").strValue||"font",f=this.labelCalcCanvas,p=this.labelCalcCanvasContext;if(!f){f=this.labelCalcCanvas=i.createElement("canvas"),p=this.labelCalcCanvasContext=f.getContext("2d");var m=f.style;m.position="absolute",m.left="-9999px",m.top="-9999px",m.zIndex="-1",m.visibility="hidden",m.pointerEvents="none"}p.font="".concat(o," ").concat(h," ").concat(l,"px ").concat(u);for(var g=0,y=0,v=t.split(` +`),x=v.length,b=0,T=0,w=0;w1&&arguments[1]!==void 0?arguments[1]:!0;if(t.merge(o),l)for(var u=0;u=e.desktopTapThreshold2}var Et=a(q);be&&(e.hoverData.tapholdCancelled=!0);var gt=s(function(){var Xt=e.hoverData.dragDelta=e.hoverData.dragDelta||[];Xt.length===0?(Xt.push(Be[0]),Xt.push(Be[1])):(Xt[0]+=Be[0],Xt[1]+=Be[1])},"updateDragDelta");X=!0,i(Pe,["mousemove","vmousemove","tapdrag"],q,{x:Ae[0],y:Ae[1]});var ge=s(function(Xt){return{originalEvent:q,type:Xt,position:{x:Ae[0],y:Ae[1]}}},"makeEvent"),nt=s(function(){e.data.bgActivePosistion=void 0,e.hoverData.selecting||ye.emit(ge("boxstart")),at[4]=1,e.hoverData.selecting=!0,e.redrawHint("select",!0),e.redraw()},"goIntoBoxMode");if(e.hoverData.which===3){if(be){var pt=ge("cxtdrag");qe?qe.emit(pt):ye.emit(pt),e.hoverData.cxtDragged=!0,(!e.hoverData.cxtOver||Pe!==e.hoverData.cxtOver)&&(e.hoverData.cxtOver&&e.hoverData.cxtOver.emit(ge("cxtdragout")),e.hoverData.cxtOver=Pe,Pe&&Pe.emit(ge("cxtdragover")))}}else if(e.hoverData.dragging){if(X=!0,ye.panningEnabled()&&ye.userPanningEnabled()){var Qe;if(e.hoverData.justStartedPan){var we=e.hoverData.mdownPos;Qe={x:(Ae[0]-we[0])*K,y:(Ae[1]-we[1])*K},e.hoverData.justStartedPan=!1}else Qe={x:Be[0]*K,y:Be[1]*K};ye.panBy(Qe),ye.emit(ge("dragpan")),e.hoverData.dragged=!0}Ae=e.projectIntoViewport(q.clientX,q.clientY)}else if(at[4]==1&&(qe==null||qe.pannable())){if(be){if(!e.hoverData.dragging&&ye.boxSelectionEnabled()&&(Et||!ye.panningEnabled()||!ye.userPanningEnabled()))nt();else if(!e.hoverData.selecting&&ye.panningEnabled()&&ye.userPanningEnabled()){var tt=o(qe,e.hoverData.downs);tt&&(e.hoverData.dragging=!0,e.hoverData.justStartedPan=!0,at[4]=0,e.data.bgActivePosistion=Vy($e),e.redrawHint("select",!0),e.redraw())}qe&&qe.pannable()&&qe.active()&&qe.unactivate()}}else{if(qe&&qe.pannable()&&qe.active()&&qe.unactivate(),(!qe||!qe.grabbed())&&Pe!=Ke&&(Ke&&i(Ke,["mouseout","tapdragout"],q,{x:Ae[0],y:Ae[1]}),Pe&&i(Pe,["mouseover","tapdragover"],q,{x:Ae[0],y:Ae[1]}),e.hoverData.last=Pe),qe)if(be){if(ye.boxSelectionEnabled()&&Et)qe&&qe.grabbed()&&(y(Xe),qe.emit(ge("freeon")),Xe.emit(ge("free")),e.dragData.didDrag&&(qe.emit(ge("dragfreeon")),Xe.emit(ge("dragfree")))),nt();else if(qe&&qe.grabbed()&&e.nodeIsDraggable(qe)){var st=!e.dragData.didDrag;st&&e.redrawHint("eles",!0),e.dragData.didDrag=!0,e.hoverData.draggingEles||m(Xe,{inDragLayer:!0});var mt={x:0,y:0};if(Vt(Be[0])&&Vt(Be[1])&&(mt.x+=Be[0],mt.y+=Be[1],st)){var Bt=e.hoverData.dragDelta;Bt&&Vt(Bt[0])&&Vt(Bt[1])&&(mt.x+=Bt[0],mt.y+=Bt[1])}e.hoverData.draggingEles=!0,Xe.silentShift(mt).emit(ge("position")).emit(ge("drag")),e.redrawHint("drag",!0),e.redraw()}}else gt();X=!0}if(at[2]=Ae[0],at[3]=Ae[1],X)return q.stopPropagation&&q.stopPropagation(),q.preventDefault&&q.preventDefault(),!1}},"mousemoveHandler"),!1);var N,D,R;e.registerBinding(t,"mouseup",s(function(q){if(!(e.hoverData.which===1&&q.which!==1&&e.hoverData.capture)){var de=e.hoverData.capture;if(de){e.hoverData.capture=!1;var X=e.cy,ye=e.projectIntoViewport(q.clientX,q.clientY),K=e.selection,Ge=e.findNearestElement(ye[0],ye[1],!0,!1),Ae=e.dragData.possibleDragElements,$e=e.hoverData.down,Oe=a(q);e.data.bgActivePosistion&&(e.redrawHint("select",!0),e.redraw()),e.hoverData.tapholdCancelled=!0,e.data.bgActivePosistion=void 0,$e&&$e.unactivate();var at=s(function(vt){return{originalEvent:q,type:vt,position:{x:ye[0],y:ye[1]}}},"makeEvent");if(e.hoverData.which===3){var Pe=at("cxttapend");if($e?$e.emit(Pe):X.emit(Pe),!e.hoverData.cxtDragged){var Ke=at("cxttap");$e?$e.emit(Ke):X.emit(Ke)}e.hoverData.cxtDragged=!1,e.hoverData.which=null}else if(e.hoverData.which===1){if(i(Ge,["mouseup","tapend","vmouseup"],q,{x:ye[0],y:ye[1]}),!e.dragData.didDrag&&!e.hoverData.dragged&&!e.hoverData.selecting&&!e.hoverData.isOverThresholdDrag&&(i($e,["click","tap","vclick"],q,{x:ye[0],y:ye[1]}),D=!1,q.timeStamp-R<=X.multiClickDebounceTime()?(N&&clearTimeout(N),D=!0,R=null,i($e,["dblclick","dbltap","vdblclick"],q,{x:ye[0],y:ye[1]})):(N=setTimeout(function(){D||i($e,["oneclick","onetap","voneclick"],q,{x:ye[0],y:ye[1]})},X.multiClickDebounceTime()),R=q.timeStamp)),$e==null&&!e.dragData.didDrag&&!e.hoverData.selecting&&!e.hoverData.dragged&&!a(q)&&(X.$(r).unselect(["tapunselect"]),Ae.length>0&&e.redrawHint("eles",!0),e.dragData.possibleDragElements=Ae=X.collection()),Ge==$e&&!e.dragData.didDrag&&!e.hoverData.selecting&&Ge!=null&&Ge._private.selectable&&(e.hoverData.dragging||(X.selectionType()==="additive"||Oe?Ge.selected()?Ge.unselect(["tapunselect"]):Ge.select(["tapselect"]):Oe||(X.$(r).unmerge(Ge).unselect(["tapunselect"]),Ge.select(["tapselect"]))),e.redrawHint("eles",!0)),e.hoverData.selecting){var qe=X.collection(e.getAllInBox(K[0],K[1],K[2],K[3]));e.redrawHint("select",!0),qe.length>0&&e.redrawHint("eles",!0),X.emit(at("boxend"));var Be=s(function(vt){return vt.selectable()&&!vt.selected()},"eleWouldBeSelected");X.selectionType()==="additive"||Oe||X.$(r).unmerge(qe).unselect(),qe.emit(at("box")).stdFilter(Be).select().emit(at("boxselect")),e.redraw()}if(e.hoverData.dragging&&(e.hoverData.dragging=!1,e.redrawHint("select",!0),e.redrawHint("eles",!0),e.redraw()),!K[4]){e.redrawHint("drag",!0),e.redrawHint("eles",!0);var Xe=$e&&$e.grabbed();y(Ae),Xe&&($e.emit(at("freeon")),Ae.emit(at("free")),e.dragData.didDrag&&($e.emit(at("dragfreeon")),Ae.emit(at("dragfree"))))}}K[4]=0,e.hoverData.down=null,e.hoverData.cxtStarted=!1,e.hoverData.draggingEles=!1,e.hoverData.selecting=!1,e.hoverData.isOverThresholdDrag=!1,e.dragData.didDrag=!1,e.hoverData.dragged=!1,e.hoverData.dragDelta=[],e.hoverData.mdownPos=null,e.hoverData.mdownGPos=null,e.hoverData.which=null}}},"mouseupHandler"),!1);var E=[],I=4,L,P=1e5,B=s(function(q,de){for(var X=0;X=I){var ye=E;if(L=B(ye,5),!L){var K=Math.abs(ye[0]);L=O(ye)&&K>5}if(L)for(var Ge=0;Ge5&&(X=o$(X)*5),Ke=X/-250,L&&(Ke/=P,Ke*=3),Ke=Ke*e.wheelSensitivity;var qe=q.deltaMode===1;qe&&(Ke*=33);var Be=Ae.zoom()*Math.pow(10,Ke);q.type==="gesturechange"&&(Be=e.gestureStartZoom*q.scale),Ae.zoom({level:Be,renderedPosition:{x:Pe[0],y:Pe[1]}}),Ae.emit({type:q.type==="gesturechange"?"pinchzoom":"scrollzoom",originalEvent:q,position:{x:at[0],y:at[1]}})}}}},"wheelHandler");e.registerBinding(e.container,"wheel",$,!0),e.registerBinding(t,"scroll",s(function(q){e.scrollingPage=!0,clearTimeout(e.scrollingPageTimeout),e.scrollingPageTimeout=setTimeout(function(){e.scrollingPage=!1},250)},"scrollHandler"),!0),e.registerBinding(e.container,"gesturestart",s(function(q){e.gestureStartZoom=e.cy.zoom(),e.hasTouchStarted||q.preventDefault()},"gestureStartHandler"),!0),e.registerBinding(e.container,"gesturechange",function(ce){e.hasTouchStarted||$(ce)},!0),e.registerBinding(e.container,"mouseout",s(function(q){var de=e.projectIntoViewport(q.clientX,q.clientY);e.cy.emit({originalEvent:q,type:"mouseout",position:{x:de[0],y:de[1]}})},"mouseOutHandler"),!1),e.registerBinding(e.container,"mouseover",s(function(q){var de=e.projectIntoViewport(q.clientX,q.clientY);e.cy.emit({originalEvent:q,type:"mouseover",position:{x:de[0],y:de[1]}})},"mouseOverHandler"),!1);var G,V,z,W,H,j,Q,U,ue,J,he,se,oe,Se=s(function(q,de,X,ye){return Math.sqrt((X-q)*(X-q)+(ye-de)*(ye-de))},"distance"),xe=s(function(q,de,X,ye){return(X-q)*(X-q)+(ye-de)*(ye-de)},"distanceSq"),Ne;e.registerBinding(e.container,"touchstart",Ne=s(function(q){if(e.hasTouchStarted=!0,!!A(q)){x(),e.touchData.capture=!0,e.data.bgActivePosistion=void 0;var de=e.cy,X=e.touchData.now,ye=e.touchData.earlier;if(q.touches[0]){var K=e.projectIntoViewport(q.touches[0].clientX,q.touches[0].clientY);X[0]=K[0],X[1]=K[1]}if(q.touches[1]){var K=e.projectIntoViewport(q.touches[1].clientX,q.touches[1].clientY);X[2]=K[0],X[3]=K[1]}if(q.touches[2]){var K=e.projectIntoViewport(q.touches[2].clientX,q.touches[2].clientY);X[4]=K[0],X[5]=K[1]}var Ge=s(function(Et){return{originalEvent:q,type:Et,position:{x:X[0],y:X[1]}}},"makeEvent");if(q.touches[1]){e.touchData.singleTouchMoved=!0,y(e.dragData.touchDragEles);var Ae=e.findContainerClientCoords();ue=Ae[0],J=Ae[1],he=Ae[2],se=Ae[3],G=q.touches[0].clientX-ue,V=q.touches[0].clientY-J,z=q.touches[1].clientX-ue,W=q.touches[1].clientY-J,oe=0<=G&&G<=he&&0<=z&&z<=he&&0<=V&&V<=se&&0<=W&&W<=se;var $e=de.pan(),Oe=de.zoom();H=Se(G,V,z,W),j=xe(G,V,z,W),Q=[(G+z)/2,(V+W)/2],U=[(Q[0]-$e.x)/Oe,(Q[1]-$e.y)/Oe];var at=200,Pe=at*at;if(j=1){for(var ke=e.touchData.startPosition=[null,null,null,null,null,null],It=0;It=e.touchTapThreshold2}if(de&&e.touchData.cxt){q.preventDefault();var It=q.touches[0].clientX-ue,Ft=q.touches[0].clientY-J,yt=q.touches[1].clientX-ue,Et=q.touches[1].clientY-J,gt=xe(It,Ft,yt,Et),ge=gt/j,nt=150,pt=nt*nt,Qe=1.5,we=Qe*Qe;if(ge>=we||gt>=pt){e.touchData.cxt=!1,e.data.bgActivePosistion=void 0,e.redrawHint("select",!0);var tt=Oe("cxttapend");e.touchData.start?(e.touchData.start.unactivate().emit(tt),e.touchData.start=null):ye.emit(tt)}}if(de&&e.touchData.cxt){var tt=Oe("cxtdrag");e.data.bgActivePosistion=void 0,e.redrawHint("select",!0),e.touchData.start?e.touchData.start.emit(tt):ye.emit(tt),e.touchData.start&&(e.touchData.start._private.grabbed=!1),e.touchData.cxtDragged=!0;var st=e.findNearestElement(K[0],K[1],!0,!0);(!e.touchData.cxtOver||st!==e.touchData.cxtOver)&&(e.touchData.cxtOver&&e.touchData.cxtOver.emit(Oe("cxtdragout")),e.touchData.cxtOver=st,st&&st.emit(Oe("cxtdragover")))}else if(de&&q.touches[2]&&ye.boxSelectionEnabled())q.preventDefault(),e.data.bgActivePosistion=void 0,this.lastThreeTouch=+new Date,e.touchData.selecting||ye.emit(Oe("boxstart")),e.touchData.selecting=!0,e.touchData.didSelect=!0,X[4]=1,!X||X.length===0||X[0]===void 0?(X[0]=(K[0]+K[2]+K[4])/3,X[1]=(K[1]+K[3]+K[5])/3,X[2]=(K[0]+K[2]+K[4])/3+1,X[3]=(K[1]+K[3]+K[5])/3+1):(X[2]=(K[0]+K[2]+K[4])/3,X[3]=(K[1]+K[3]+K[5])/3),e.redrawHint("select",!0),e.redraw();else if(de&&q.touches[1]&&!e.touchData.didSelect&&ye.zoomingEnabled()&&ye.panningEnabled()&&ye.userZoomingEnabled()&&ye.userPanningEnabled()){q.preventDefault(),e.data.bgActivePosistion=void 0,e.redrawHint("select",!0);var mt=e.dragData.touchDragEles;if(mt){e.redrawHint("drag",!0);for(var Bt=0;Bt0&&!e.hoverData.draggingEles&&!e.swipePanning&&e.data.bgActivePosistion!=null&&(e.data.bgActivePosistion=void 0,e.redrawHint("select",!0),e.redraw())}},"touchmoveHandler"),!1);var We;e.registerBinding(t,"touchcancel",We=s(function(q){var de=e.touchData.start;e.touchData.capture=!1,de&&de.unactivate()},"touchcancelHandler"));var pe,_e,Ee,Re;if(e.registerBinding(t,"touchend",pe=s(function(q){var de=e.touchData.start,X=e.touchData.capture;if(X)q.touches.length===0&&(e.touchData.capture=!1),q.preventDefault();else return;var ye=e.selection;e.swipePanning=!1,e.hoverData.draggingEles=!1;var K=e.cy,Ge=K.zoom(),Ae=e.touchData.now,$e=e.touchData.earlier;if(q.touches[0]){var Oe=e.projectIntoViewport(q.touches[0].clientX,q.touches[0].clientY);Ae[0]=Oe[0],Ae[1]=Oe[1]}if(q.touches[1]){var Oe=e.projectIntoViewport(q.touches[1].clientX,q.touches[1].clientY);Ae[2]=Oe[0],Ae[3]=Oe[1]}if(q.touches[2]){var Oe=e.projectIntoViewport(q.touches[2].clientX,q.touches[2].clientY);Ae[4]=Oe[0],Ae[5]=Oe[1]}var at=s(function(pt){return{originalEvent:q,type:pt,position:{x:Ae[0],y:Ae[1]}}},"makeEvent");de&&de.unactivate();var Pe;if(e.touchData.cxt){if(Pe=at("cxttapend"),de?de.emit(Pe):K.emit(Pe),!e.touchData.cxtDragged){var Ke=at("cxttap");de?de.emit(Ke):K.emit(Ke)}e.touchData.start&&(e.touchData.start._private.grabbed=!1),e.touchData.cxt=!1,e.touchData.start=null,e.redraw();return}if(!q.touches[2]&&K.boxSelectionEnabled()&&e.touchData.selecting){e.touchData.selecting=!1;var qe=K.collection(e.getAllInBox(ye[0],ye[1],ye[2],ye[3]));ye[0]=void 0,ye[1]=void 0,ye[2]=void 0,ye[3]=void 0,ye[4]=0,e.redrawHint("select",!0),K.emit(at("boxend"));var Be=s(function(pt){return pt.selectable()&&!pt.selected()},"eleWouldBeSelected");qe.emit(at("box")).stdFilter(Be).select().emit(at("boxselect")),qe.nonempty()&&e.redrawHint("eles",!0),e.redraw()}if(de?.unactivate(),q.touches[2])e.data.bgActivePosistion=void 0,e.redrawHint("select",!0);else if(!q.touches[1]){if(!q.touches[0]){if(!q.touches[0]){e.data.bgActivePosistion=void 0,e.redrawHint("select",!0);var Xe=e.dragData.touchDragEles;if(de!=null){var be=de._private.grabbed;y(Xe),e.redrawHint("drag",!0),e.redrawHint("eles",!0),be&&(de.emit(at("freeon")),Xe.emit(at("free")),e.dragData.didDrag&&(de.emit(at("dragfreeon")),Xe.emit(at("dragfree")))),i(de,["touchend","tapend","vmouseup","tapdragout"],q,{x:Ae[0],y:Ae[1]}),de.unactivate(),e.touchData.start=null}else{var vt=e.findNearestElement(Ae[0],Ae[1],!0,!0);i(vt,["touchend","tapend","vmouseup","tapdragout"],q,{x:Ae[0],y:Ae[1]})}var ke=e.touchData.startPosition[0]-Ae[0],It=ke*ke,Ft=e.touchData.startPosition[1]-Ae[1],yt=Ft*Ft,Et=It+yt,gt=Et*Ge*Ge;e.touchData.singleTouchMoved||(de||K.$(":selected").unselect(["tapunselect"]),i(de,["tap","vclick"],q,{x:Ae[0],y:Ae[1]}),_e=!1,q.timeStamp-Re<=K.multiClickDebounceTime()?(Ee&&clearTimeout(Ee),_e=!0,Re=null,i(de,["dbltap","vdblclick"],q,{x:Ae[0],y:Ae[1]})):(Ee=setTimeout(function(){_e||i(de,["onetap","voneclick"],q,{x:Ae[0],y:Ae[1]})},K.multiClickDebounceTime()),Re=q.timeStamp)),de!=null&&!e.dragData.didDrag&&de._private.selectable&>"u"){var Z=[],ae=s(function(q){return{clientX:q.clientX,clientY:q.clientY,force:1,identifier:q.pointerId,pageX:q.pageX,pageY:q.pageY,radiusX:q.width/2,radiusY:q.height/2,screenX:q.screenX,screenY:q.screenY,target:q.target}},"makeTouch"),ie=s(function(q){return{event:q,touch:ae(q)}},"makePointer"),le=s(function(q){Z.push(ie(q))},"addPointer"),ve=s(function(q){for(var de=0;de0)return z[0]}return null},"getCurveT"),g=Object.keys(p),y=0;y0?m:exe(a,o,t,r,n,i,l,u)},"intersectLine"),checkPoint:s(function(t,r,n,i,a,o,l,u){u=u==="auto"?cf(i,a):u;var h=2*u;if(nh(t,r,this.points,o,l,i,a-h,[0,-1],n)||nh(t,r,this.points,o,l,i-h,a,[0,-1],n))return!0;var d=i/2+2*n,f=a/2+2*n,p=[o-d,l-f,o-d,l,o+d,l,o+d,l-f];return!!(Zs(t,r,p)||vm(t,r,h,h,o+i/2-u,l+a/2-u,n)||vm(t,r,h,h,o-i/2+u,l+a/2-u,n))},"checkPoint")}};ih.registerNodeShapes=function(){var e=this.nodeShapes={},t=this;this.generateEllipse(),this.generatePolygon("triangle",ys(3,0)),this.generateRoundPolygon("round-triangle",ys(3,0)),this.generatePolygon("rectangle",ys(4,0)),e.square=e.rectangle,this.generateRoundRectangle(),this.generateCutRectangle(),this.generateBarrel(),this.generateBottomRoundrectangle();{var r=[0,1,1,0,0,-1,-1,0];this.generatePolygon("diamond",r),this.generateRoundPolygon("round-diamond",r)}this.generatePolygon("pentagon",ys(5,0)),this.generateRoundPolygon("round-pentagon",ys(5,0)),this.generatePolygon("hexagon",ys(6,0)),this.generateRoundPolygon("round-hexagon",ys(6,0)),this.generatePolygon("heptagon",ys(7,0)),this.generateRoundPolygon("round-heptagon",ys(7,0)),this.generatePolygon("octagon",ys(8,0)),this.generateRoundPolygon("round-octagon",ys(8,0));var n=new Array(20);{var i=NB(5,0),a=NB(5,Math.PI/5),o=.5*(3-Math.sqrt(5));o*=1.57;for(var l=0;l=t.deqFastCost*w)break}else if(h){if(b>=t.deqCost*m||b>=t.deqAvgCost*p)break}else if(T>=t.deqNoDrawCost*SB)break;var C=t.deq(n,v,y);if(C.length>0)for(var k=0;k0&&(t.onDeqd(n,g),!h&&t.shouldRedraw(n,g,v,y)&&a())},"dequeue"),l=t.priority||i$;i.beforeRender(o,l(n))}},"setupDequeueingImpl")},"setupDequeueing")},xct=(function(){function e(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:V3;ff(this,e),this.idsByKey=new th,this.keyForId=new th,this.cachesByLvl=new th,this.lvls=[],this.getKey=t,this.doesEleInvalidateKey=r}return s(e,"ElementTextureCacheLookup"),pf(e,[{key:"getIdsFor",value:s(function(r){r==null&&ii("Can not get id list for null key");var n=this.idsByKey,i=this.idsByKey.get(r);return i||(i=new e1,n.set(r,i)),i},"getIdsFor")},{key:"addIdForKey",value:s(function(r,n){r!=null&&this.getIdsFor(r).add(n)},"addIdForKey")},{key:"deleteIdForKey",value:s(function(r,n){r!=null&&this.getIdsFor(r).delete(n)},"deleteIdForKey")},{key:"getNumberOfIdsForKey",value:s(function(r){return r==null?0:this.getIdsFor(r).size},"getNumberOfIdsForKey")},{key:"updateKeyMappingFor",value:s(function(r){var n=r.id(),i=this.keyForId.get(n),a=this.getKey(r);this.deleteIdForKey(i,n),this.addIdForKey(a,n),this.keyForId.set(n,a)},"updateKeyMappingFor")},{key:"deleteKeyMappingFor",value:s(function(r){var n=r.id(),i=this.keyForId.get(n);this.deleteIdForKey(i,n),this.keyForId.delete(n)},"deleteKeyMappingFor")},{key:"keyHasChangedFor",value:s(function(r){var n=r.id(),i=this.keyForId.get(n),a=this.getKey(r);return i!==a},"keyHasChangedFor")},{key:"isInvalid",value:s(function(r){return this.keyHasChangedFor(r)||this.doesEleInvalidateKey(r)},"isInvalid")},{key:"getCachesAt",value:s(function(r){var n=this.cachesByLvl,i=this.lvls,a=n.get(r);return a||(a=new th,n.set(r,a),i.push(r)),a},"getCachesAt")},{key:"getCache",value:s(function(r,n){return this.getCachesAt(n).get(r)},"getCache")},{key:"get",value:s(function(r,n){var i=this.getKey(r),a=this.getCache(i,n);return a!=null&&this.updateKeyMappingFor(r),a},"get")},{key:"getForCachedKey",value:s(function(r,n){var i=this.keyForId.get(r.id()),a=this.getCache(i,n);return a},"getForCachedKey")},{key:"hasCache",value:s(function(r,n){return this.getCachesAt(n).has(r)},"hasCache")},{key:"has",value:s(function(r,n){var i=this.getKey(r);return this.hasCache(i,n)},"has")},{key:"setCache",value:s(function(r,n,i){i.key=r,this.getCachesAt(n).set(r,i)},"setCache")},{key:"set",value:s(function(r,n,i){var a=this.getKey(r);this.setCache(a,n,i),this.updateKeyMappingFor(r)},"set")},{key:"deleteCache",value:s(function(r,n){this.getCachesAt(n).delete(r)},"deleteCache")},{key:"delete",value:s(function(r,n){var i=this.getKey(r);this.deleteCache(i,n)},"_delete")},{key:"invalidateKey",value:s(function(r){var n=this;this.lvls.forEach(function(i){return n.deleteCache(r,i)})},"invalidateKey")},{key:"invalidate",value:s(function(r){var n=r.id(),i=this.keyForId.get(n);this.deleteKeyMappingFor(r);var a=this.doesEleInvalidateKey(r);return a&&this.invalidateKey(i),a||this.getNumberOfIdsForKey(i)===0},"invalidate")}])})(),gve=25,E3=50,B3=-4,jB=3,abe=7.99,bct=8,Tct=1024,Cct=1024,kct=1024,wct=.2,Sct=.8,Ect=10,Act=.15,Rct=.1,_ct=.9,Lct=.9,Dct=100,Ict=1,qy={dequeue:"dequeue",downscale:"downscale",highQuality:"highQuality"},Mct=Da({getKey:null,doesEleInvalidateKey:V3,drawElement:null,getBoundingBox:null,getRotationPoint:null,getRotationOffset:null,isVisible:Yve,allowEdgeTxrCaching:!0,allowParentTxrCaching:!0}),H2=s(function(t,r){var n=this;n.renderer=t,n.onDequeues=[];var i=Mct(r);xr(n,i),n.lookup=new xct(i.getKey,i.doesEleInvalidateKey),n.setupDequeueing()},"ElementTextureCache"),ea=H2.prototype;ea.reasons=qy;ea.getTextureQueue=function(e){var t=this;return t.eleImgCaches=t.eleImgCaches||{},t.eleImgCaches[e]=t.eleImgCaches[e]||[]};ea.getRetiredTextureQueue=function(e){var t=this,r=t.eleImgCaches.retired=t.eleImgCaches.retired||{},n=r[e]=r[e]||[];return n};ea.getElementQueue=function(){var e=this,t=e.eleCacheQueue=e.eleCacheQueue||new hT(function(r,n){return n.reqs-r.reqs});return t};ea.getElementKeyToQueue=function(){var e=this,t=e.eleKeyToCacheQueue=e.eleKeyToCacheQueue||{};return t};ea.getElement=function(e,t,r,n,i){var a=this,o=this.renderer,l=o.cy.zoom(),u=this.lookup;if(!t||t.w===0||t.h===0||isNaN(t.w)||isNaN(t.h)||!e.visible()||e.removed()||!a.allowEdgeTxrCaching&&e.isEdge()||!a.allowParentTxrCaching&&e.isParent())return null;if(n==null&&(n=Math.ceil(s$(l*r))),n=abe||n>jB)return null;var h=Math.pow(2,n),d=t.h*h,f=t.w*h,p=o.eleTextBiggerThanMin(e,h);if(!this.isVisible(e,p))return null;var m=u.get(e,n);if(m&&m.invalidated&&(m.invalidated=!1,m.texture.invalidatedWidth-=m.width),m)return m;var g;if(d<=gve?g=gve:d<=E3?g=E3:g=Math.ceil(d/E3)*E3,d>kct||f>Cct)return null;var y=a.getTextureQueue(g),v=y[y.length-2],x=s(function(){return a.recycleTexture(g,f)||a.addTexture(g,f)},"addNewTxr");v||(v=y[y.length-1]),v||(v=x()),v.width-v.usedWidthn;D--)M=a.getElement(e,t,r,D,qy.downscale);N()}else return a.queueElement(e,k.level-1),k;else{var R;if(!T&&!w&&!C)for(var E=n-1;E>=B3;E--){var I=u.get(e,E);if(I){R=I;break}}if(b(R))return a.queueElement(e,n),R;v.context.translate(v.usedWidth,0),v.context.scale(h,h),this.drawElement(v.context,e,t,p,!1),v.context.scale(1/h,1/h),v.context.translate(-v.usedWidth,0)}return m={x:v.usedWidth,texture:v,level:n,scale:h,width:f,height:d,scaledLabelShown:p},v.usedWidth+=Math.ceil(f+bct),v.eleCaches.push(m),u.set(e,n,m),a.checkTextureFullness(v),m};ea.invalidateElements=function(e){for(var t=0;t=wct*e.width&&this.retireTexture(e)};ea.checkTextureFullness=function(e){var t=this,r=t.getTextureQueue(e.height);e.usedWidth/e.width>Sct&&e.fullnessChecks>=Ect?lf(r,e):e.fullnessChecks++};ea.retireTexture=function(e){var t=this,r=e.height,n=t.getTextureQueue(r),i=this.lookup;lf(n,e),e.retired=!0;for(var a=e.eleCaches,o=0;o=t)return o.retired=!1,o.usedWidth=0,o.invalidatedWidth=0,o.fullnessChecks=0,a$(o.eleCaches),o.context.setTransform(1,0,0,1,0,0),o.context.clearRect(0,0,o.width,o.height),lf(i,o),n.push(o),o}};ea.queueElement=function(e,t){var r=this,n=r.getElementQueue(),i=r.getElementKeyToQueue(),a=this.getKey(e),o=i[a];if(o)o.level=Math.max(o.level,t),o.eles.merge(e),o.reqs++,n.updateItem(o);else{var l={eles:e.spawn().merge(e),level:t,reqs:1,key:a};n.push(l),i[a]=l}};ea.dequeue=function(e){for(var t=this,r=t.getElementQueue(),n=t.getElementKeyToQueue(),i=[],a=t.lookup,o=0;o0;o++){var l=r.pop(),u=l.key,h=l.eles[0],d=a.hasCache(h,l.level);if(n[u]=null,d)continue;i.push(l);var f=t.getBoundingBox(h);t.getElement(h,f,e,l.level,qy.dequeue)}return i};ea.removeFromQueue=function(e){var t=this,r=t.getElementQueue(),n=t.getElementKeyToQueue(),i=this.getKey(e),a=n[i];a!=null&&(a.eles.length===1?(a.reqs=n$,r.updateItem(a),r.pop(),n[i]=null):a.eles.unmerge(e))};ea.onDequeue=function(e){this.onDequeues.push(e)};ea.offDequeue=function(e){lf(this.onDequeues,e)};ea.setupDequeueing=ibe.setupDequeueing({deqRedrawThreshold:Dct,deqCost:Act,deqAvgCost:Rct,deqNoDrawCost:_ct,deqFastCost:Lct,deq:s(function(t,r,n){return t.dequeue(r,n)},"deq"),onDeqd:s(function(t,r){for(var n=0;n=Pct||r>K3)return null}n.validateLayersElesOrdering(r,e);var u=n.layersByLevel,h=Math.pow(2,r),d=u[r]=u[r]||[],f,p=n.levelIsComplete(r,e),m,g=s(function(){var N=s(function(L){if(n.validateLayersElesOrdering(L,e),n.levelIsComplete(L,e))return m=u[L],!0},"canUseAsTmpLvl"),D=s(function(L){if(!m)for(var P=r+L;Y2<=P&&P<=K3&&!N(P);P+=L);},"checkLvls");D(1),D(-1);for(var R=d.length-1;R>=0;R--){var E=d[R];E.invalid&&lf(d,E)}},"checkTempLevels");if(!p)g();else return d;var y=s(function(){if(!f){f=xs();for(var N=0;Nvve||E>vve)return null;var I=R*E;if(I>Wct)return null;var L=n.makeLayer(f,r);if(D!=null){var P=d.indexOf(D)+1;d.splice(P,0,L)}else(N.insert===void 0||N.insert)&&d.unshift(L);return L},"makeLayer");if(n.skipping&&!l)return null;for(var x=null,b=e.length/Nct,T=!l,w=0;w=b||!Jve(x.bb,C.boundingBox()))&&(x=v({insert:!0,after:x}),!x))return null;m||T?n.queueLayer(x,C):n.drawEleInLayer(x,C,r,t),x.eles.push(C),S[r]=x}return m||(T?null:d)};Ia.getEleLevelForLayerLevel=function(e,t){return e};Ia.drawEleInLayer=function(e,t,r,n){var i=this,a=this.renderer,o=e.context,l=t.boundingBox();l.w===0||l.h===0||!t.visible()||(r=i.getEleLevelForLayerLevel(r,n),a.setImgSmoothing(o,!1),a.drawCachedElement(o,t,null,null,r,qct),a.setImgSmoothing(o,!0))};Ia.levelIsComplete=function(e,t){var r=this,n=r.layersByLevel[e];if(!n||n.length===0)return!1;for(var i=0,a=0;a0||o.invalid)return!1;i+=o.eles.length}return i===t.length};Ia.validateLayersElesOrdering=function(e,t){var r=this.layersByLevel[e];if(r)for(var n=0;n0){t=!0;break}}return t};Ia.invalidateElements=function(e){var t=this;e.length!==0&&(t.lastInvalidationTime=rh(),!(e.length===0||!t.haveLayers())&&t.updateElementsInLayers(e,s(function(n,i,a){t.invalidateLayer(n)},"invalAssocLayers")))};Ia.invalidateLayer=function(e){if(this.lastInvalidationTime=rh(),!e.invalid){var t=e.level,r=e.eles,n=this.layersByLevel[t];lf(n,e),e.elesQueue=[],e.invalid=!0,e.replacement&&(e.replacement.invalid=!0);for(var i=0;i3&&arguments[3]!==void 0?arguments[3]:!0,i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!0,o=this,l=t._private.rscratch;if(!(a&&!t.visible())&&!(l.badLine||l.allpts==null||isNaN(l.allpts[0]))){var u;r&&(u=r,e.translate(-u.x1,-u.y1));var h=a?t.pstyle("opacity").value:1,d=a?t.pstyle("line-opacity").value:1,f=t.pstyle("curve-style").value,p=t.pstyle("line-style").value,m=t.pstyle("width").pfValue,g=t.pstyle("line-cap").value,y=t.pstyle("line-outline-width").value,v=t.pstyle("line-outline-color").value,x=h*d,b=h*d,T=s(function(){var L=arguments.length>0&&arguments[0]!==void 0?arguments[0]:x;f==="straight-triangle"?(o.eleStrokeStyle(e,t,L),o.drawEdgeTrianglePath(t,e,l.allpts)):(e.lineWidth=m,e.lineCap=g,o.eleStrokeStyle(e,t,L),o.drawEdgePath(t,e,l.allpts,p),e.lineCap="butt")},"drawLine"),w=s(function(){var L=arguments.length>0&&arguments[0]!==void 0?arguments[0]:x;if(e.lineWidth=m+y,e.lineCap=g,y>0)o.colorStrokeStyle(e,v[0],v[1],v[2],L);else{e.lineCap="butt";return}f==="straight-triangle"?o.drawEdgeTrianglePath(t,e,l.allpts):(o.drawEdgePath(t,e,l.allpts,p),e.lineCap="butt")},"drawLineOutline"),C=s(function(){i&&o.drawEdgeOverlay(e,t)},"drawOverlay"),k=s(function(){i&&o.drawEdgeUnderlay(e,t)},"drawUnderlay"),S=s(function(){var L=arguments.length>0&&arguments[0]!==void 0?arguments[0]:b;o.drawArrowheads(e,t,L)},"drawArrows"),A=s(function(){o.drawElementText(e,t,null,n)},"drawText");e.lineJoin="round";var M=t.pstyle("ghost").value==="yes";if(M){var N=t.pstyle("ghost-offset-x").pfValue,D=t.pstyle("ghost-offset-y").pfValue,R=t.pstyle("ghost-opacity").value,E=x*R;e.translate(N,D),T(E),S(E),e.translate(-N,-D)}else w();k(),T(),S(),C(),A(),r&&e.translate(u.x1,u.y1)}};lbe=s(function(t){if(!["overlay","underlay"].includes(t))throw new Error("Invalid state");return function(r,n){if(n.visible()){var i=n.pstyle("".concat(t,"-opacity")).value;if(i!==0){var a=this,o=a.usePaths(),l=n._private.rscratch,u=n.pstyle("".concat(t,"-padding")).pfValue,h=2*u,d=n.pstyle("".concat(t,"-color")).value;r.lineWidth=h,l.edgeType==="self"&&!o?r.lineCap="butt":r.lineCap="round",a.colorStrokeStyle(r,d[0],d[1],d[2],i),a.drawEdgePath(n,r,l.allpts,"solid")}}}},"drawEdgeOverlayUnderlay");ah.drawEdgeOverlay=lbe("overlay");ah.drawEdgeUnderlay=lbe("underlay");ah.drawEdgePath=function(e,t,r,n){var i=e._private.rscratch,a=t,o,l=!1,u=this.usePaths(),h=e.pstyle("line-dash-pattern").pfValue,d=e.pstyle("line-dash-offset").pfValue;if(u){var f=r.join("$"),p=i.pathCacheKey&&i.pathCacheKey===f;p?(o=t=i.pathCache,l=!0):(o=t=new Path2D,i.pathCacheKey=f,i.pathCache=o)}if(a.setLineDash)switch(n){case"dotted":a.setLineDash([1,1]);break;case"dashed":a.setLineDash(h),a.lineDashOffset=d;break;case"solid":a.setLineDash([]);break}if(!l&&!i.badLine)switch(t.beginPath&&t.beginPath(),t.moveTo(r[0],r[1]),i.edgeType){case"bezier":case"self":case"compound":case"multibezier":for(var m=2;m+35&&arguments[5]!==void 0?arguments[5]:!0,o=this;if(n==null){if(a&&!o.eleTextBiggerThanMin(t))return}else if(n===!1)return;if(t.isNode()){var l=t.pstyle("label");if(!l||!l.value)return;var u=o.getLabelJustification(t),h=t.pstyle("text-metrics").strValue==="glyph";e.textAlign=u,e.textBaseline=h?"alphabetic":"bottom"}else{var d=t.element()._private.rscratch.badLine,f=t.pstyle("label"),p=t.pstyle("source-label"),m=t.pstyle("target-label");if(d||(!f||!f.value)&&(!p||!p.value)&&(!m||!m.value))return;e.textAlign="center",e.textBaseline="bottom"}var g=!r,y;r&&(y=r,e.translate(-y.x1,-y.y1)),i==null?(o.drawText(e,t,null,g,a),t.isEdge()&&(o.drawText(e,t,"source",g,a),o.drawText(e,t,"target",g,a))):o.drawText(e,t,i,g,a),r&&e.translate(y.x1,y.y1)};Sm.getFontCache=function(e){var t;this.fontCaches=this.fontCaches||[];for(var r=0;r2&&arguments[2]!==void 0?arguments[2]:!0,n=t.pstyle("font-style").strValue,i=t.pstyle("font-size").pfValue+"px",a=t.pstyle("font-family").strValue,o=t.pstyle("font-weight").strValue,l=r?t.effectiveOpacity()*t.pstyle("text-opacity").value:1,u=t.pstyle("text-outline-opacity").value*l,h=t.pstyle("color").value,d=t.pstyle("text-outline-color").value;e.font=n+" "+o+" "+i+" "+a,e.lineJoin="round",this.colorFillStyle(e,h[0],h[1],h[2],l),this.colorStrokeStyle(e,d[0],d[1],d[2],u)};s(tut,"circle");s(Cve,"roundRect");Sm.getTextAngle=function(e,t){var r,n=e._private,i=n.rscratch,a=t?t+"-":"",o=e.pstyle(a+"text-rotation");if(o.strValue==="autorotate"){var l=vs(i,"labelAngle",t);r=e.isEdge()?l:0}else o.strValue==="none"?r=0:r=o.pfValue;return r};Sm.drawText=function(e,t,r){var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,a=t._private,o=a.rscratch,l=i?t.effectiveOpacity():1;if(!(i&&(l===0||t.pstyle("text-opacity").value===0))){r==="main"&&(r=null);var u=vs(o,"labelX",r),h=vs(o,"labelY",r),d,f,p=this.getLabelText(t,r);if(p!=null&&p!==""&&!isNaN(u)&&!isNaN(h)){this.setupTextStyle(e,t,i);var m=r?r+"-":"",g=vs(o,"labelWidth",r),y=vs(o,"labelHeight",r),v=vs(o,"labelActualDescent",r),x=t.pstyle(m+"text-margin-x").pfValue,b=t.pstyle(m+"text-margin-y").pfValue,T=t.isEdge(),w=t.pstyle("text-halign").value,C=t.pstyle("text-valign").value;T&&(w="center",C="center"),u+=x,h+=b;var k;n?k=this.getTextAngle(t,r):k=0,k!==0&&(d=u,f=h,e.translate(d,f),e.rotate(k),u=0,h=0);var S=Qy(w),A=Jy(C);switch(A){case"top":break;case"center":h+=y/2;break;case"bottom":h+=y;break}var M=t.pstyle("text-background-opacity").value,N=t.pstyle("text-border-opacity").value,D=t.pstyle("text-border-width").pfValue,R=t.pstyle("text-background-padding").pfValue,E=t.pstyle("text-background-shape").strValue,I=E==="round-rectangle"||E==="roundrectangle",L=E==="circle",P=2;if(M>0||D>0&&N>0){var B=e.fillStyle,O=e.strokeStyle,$=e.lineWidth,G=t.pstyle("text-background-color").value,V=t.pstyle("text-border-color").value,z=t.pstyle("text-border-style").value,W=M>0,H=D>0&&N>0,j=u-R;switch(S){case"left":j-=g;break;case"center":j-=g/2;break}var Q=h-y-R,U=g+2*R,ue=y+2*R;if(W&&(e.fillStyle="rgba(".concat(G[0],",").concat(G[1],",").concat(G[2],",").concat(M*l,")")),H&&(e.strokeStyle="rgba(".concat(V[0],",").concat(V[1],",").concat(V[2],",").concat(N*l,")"),e.lineWidth=D,e.setLineDash))switch(z){case"dotted":e.setLineDash([1,1]);break;case"dashed":e.setLineDash([4,2]);break;case"double":e.lineWidth=D/4,e.setLineDash([]);break;case"solid":default:e.setLineDash([]);break}if(I?(e.beginPath(),Cve(e,j,Q,U,ue,P)):L?(e.beginPath(),tut(e,j,Q,U,ue)):(e.beginPath(),e.rect(j,Q,U,ue)),W&&e.fill(),H&&e.stroke(),H&&z==="double"){var J=D/2;e.beginPath(),I?Cve(e,j+J,Q+J,U-2*J,ue-2*J,P):e.rect(j+J,Q+J,U-2*J,ue-2*J),e.stroke()}e.fillStyle=B,e.strokeStyle=O,e.lineWidth=$,e.setLineDash&&e.setLineDash([])}var he=2*t.pstyle("text-outline-width").pfValue;if(he>0&&(e.lineWidth=he),h-=v,t.pstyle("text-wrap").value==="wrap"){var se=vs(o,"labelWrapCachedLines",r),oe=vs(o,"labelLineHeight",r),Se=g/2,xe=this.getLabelJustification(t);switch(xe==="auto"||(S==="left"?xe==="left"?u+=-g:xe==="center"&&(u+=-Se):S==="center"?xe==="left"?u+=-Se:xe==="right"&&(u+=Se):S==="right"&&(xe==="center"?u+=Se:xe==="right"&&(u+=g))),A){case"top":h-=(se.length-1)*oe;break;case"center":case"bottom":h-=(se.length-1)*oe;break}for(var Ne=0;Ne0&&e.strokeText(se[Ne],u,h),e.fillText(se[Ne],u,h),h+=oe}else he>0&&e.strokeText(p,u,h),e.fillText(p,u,h);k!==0&&(e.rotate(-k),e.translate(-d,-f))}}};gf={};gf.drawNode=function(e,t,r){var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!0,o=this,l,u,h=t._private,d=h.rscratch,f=t.position();if(!(!Vt(f.x)||!Vt(f.y))&&!(a&&!t.visible())){var p=a?t.effectiveOpacity():1,m=o.usePaths(),g,y=!1,v=t.padding();l=t.width()+2*v,u=t.height()+2*v;var x;r&&(x=r,e.translate(-x.x1,-x.y1));for(var b=t.pstyle("background-image"),T=b.value,w=new Array(T.length),C=new Array(T.length),k=0,S=0;S0&&arguments[0]!==void 0?arguments[0]:E;o.eleFillStyle(e,t,q)},"setupShapeColor"),J=s(function(){var q=arguments.length>0&&arguments[0]!==void 0?arguments[0]:V;o.colorStrokeStyle(e,I[0],I[1],I[2],q)},"setupBorderColor"),he=s(function(){var q=arguments.length>0&&arguments[0]!==void 0?arguments[0]:j;o.colorStrokeStyle(e,W[0],W[1],W[2],q)},"setupOutlineColor"),se=s(function(q,de,X,ye){var K=o.nodePathCache=o.nodePathCache||[],Ge=Uve(X==="polygon"?X+","+ye.join(","):X,""+de,""+q,""+U),Ae=K[Ge],$e,Oe=!1;return Ae!=null?($e=Ae,Oe=!0,d.pathCache=$e):($e=new Path2D,K[Ge]=d.pathCache=$e),{path:$e,cacheHit:Oe}},"getPath"),oe=t.pstyle("shape").strValue,Se=t.pstyle("shape-polygon-points").pfValue;if(m){e.translate(f.x,f.y);var xe=se(l,u,oe,Se);g=xe.path,y=xe.cacheHit}var Ne=s(function(){if(!y){var q=f;m&&(q={x:0,y:0}),o.nodeShapes[o.getNodeShape(t)].draw(g||e,q.x,q.y,l,u,U,d)}m?e.fill(g):e.fill()},"drawShape"),Ye=s(function(){for(var q=arguments.length>0&&arguments[0]!==void 0?arguments[0]:p,de=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,X=h.backgrounding,ye=0,K=0;K0&&arguments[0]!==void 0?arguments[0]:!1,de=arguments.length>1&&arguments[1]!==void 0?arguments[1]:p;o.hasPie(t)&&(o.drawPie(e,t,de),q&&(m||o.nodeShapes[o.getNodeShape(t)].draw(e,f.x,f.y,l,u,U,d)))},"drawPie"),pe=s(function(){var q=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,de=arguments.length>1&&arguments[1]!==void 0?arguments[1]:p;o.hasStripe(t)&&(e.save(),m?e.clip(d.pathCache):(o.nodeShapes[o.getNodeShape(t)].draw(e,f.x,f.y,l,u,U,d),e.clip()),o.drawStripe(e,t,de),e.restore(),q&&(m||o.nodeShapes[o.getNodeShape(t)].draw(e,f.x,f.y,l,u,U,d)))},"drawStripe"),_e=s(function(){var q=arguments.length>0&&arguments[0]!==void 0?arguments[0]:p,de=(D>0?D:-D)*q,X=D>0?0:255;D!==0&&(o.colorFillStyle(e,X,X,X,de),m?e.fill(g):e.fill())},"darken"),Ee=s(function(){if(R>0){if(e.lineWidth=R,e.lineCap=B,e.lineJoin=P,e.setLineDash)switch(L){case"dotted":e.setLineDash([1,1]);break;case"dashed":e.setLineDash($),e.lineDashOffset=G;break;case"solid":case"double":e.setLineDash([]);break}if(O!=="center"){if(e.save(),e.lineWidth*=2,O==="inside")m?e.clip(g):e.clip();else{var q=new Path2D;q.rect(-l/2-R,-u/2-R,l+2*R,u+2*R),q.addPath(g),e.clip(q,"evenodd")}m?e.stroke(g):e.stroke(),e.restore()}else m?e.stroke(g):e.stroke();if(L==="double"){e.lineWidth=R/3;var de=e.globalCompositeOperation;e.globalCompositeOperation="destination-out",m?e.stroke(g):e.stroke(),e.globalCompositeOperation=de}e.setLineDash&&e.setLineDash([])}},"drawBorder"),Re=s(function(){if(z>0){if(e.lineWidth=z,e.lineCap="butt",e.setLineDash)switch(H){case"dotted":e.setLineDash([1,1]);break;case"dashed":e.setLineDash([4,2]);break;case"solid":case"double":e.setLineDash([]);break}var q=f;m&&(q={x:0,y:0});var de=o.getNodeShape(t),X=R;O==="inside"&&(X=0),O==="outside"&&(X*=2);var ye=(l+X+(z+Q))/l,K=(u+X+(z+Q))/u,Ge=l*ye,Ae=u*K,$e=o.nodeShapes[de].points,Oe;if(m){var at=se(Ge,Ae,de,$e);Oe=at.path}if(de==="ellipse")o.drawEllipsePath(Oe||e,q.x,q.y,Ge,Ae);else if(["round-diamond","round-heptagon","round-hexagon","round-octagon","round-pentagon","round-polygon","round-triangle","round-tag"].includes(de)){var Pe=0,Ke=0,qe=0;de==="round-diamond"?Pe=(X+Q+z)*1.4:de==="round-heptagon"?(Pe=(X+Q+z)*1.075,qe=-(X/2+Q+z)/35):de==="round-hexagon"?Pe=(X+Q+z)*1.12:de==="round-pentagon"?(Pe=(X+Q+z)*1.13,qe=-(X/2+Q+z)/15):de==="round-tag"?(Pe=(X+Q+z)*1.12,Ke=(X/2+z+Q)*.07):de==="round-triangle"&&(Pe=(X+Q+z)*(Math.PI/2),qe=-(X+Q/2+z)/Math.PI),Pe!==0&&(ye=(l+Pe)/l,Ge=l*ye,["round-hexagon","round-tag"].includes(de)||(K=(u+Pe)/u,Ae=u*K)),U=U==="auto"?rxe(Ge,Ae):U;for(var Be=Ge/2,Xe=Ae/2,be=U+(X+z+Q)/2,vt=new Array($e.length/2),ke=new Array($e.length/2),It=0;It<$e.length/2;It++)vt[It]={x:q.x+Ke+Be*$e[It*2],y:q.y+qe+Xe*$e[It*2+1]};var Ft,yt,Et,gt,ge=vt.length;for(yt=vt[ge-1],Ft=0;Ft0){if(i=i||n.position(),a==null||o==null){var m=n.padding();a=n.width()+2*m,o=n.height()+2*m}l.colorFillStyle(r,d[0],d[1],d[2],h),l.nodeShapes[f].draw(r,i.x,i.y,a+u*2,o+u*2,p),r.fill()}}}},"drawNodeOverlayUnderlay");gf.drawNodeOverlay=cbe("overlay");gf.drawNodeUnderlay=cbe("underlay");gf.hasPie=function(e){return e=e[0],e._private.hasPie};gf.hasStripe=function(e){return e=e[0],e._private.hasStripe};gf.drawPie=function(e,t,r,n){t=t[0],n=n||t.position();var i=t.cy().style(),a=t.pstyle("pie-size"),o=t.pstyle("pie-hole"),l=t.pstyle("pie-start-angle").pfValue,u=n.x,h=n.y,d=t.width(),f=t.height(),p=Math.min(d,f)/2,m,g=0,y=this.usePaths();if(y&&(u=0,h=0),a.units==="%"?p=p*a.pfValue:a.pfValue!==void 0&&(p=a.pfValue/2),o.units==="%"?m=p*o.pfValue:o.pfValue!==void 0&&(m=o.pfValue/2),!(m>=p))for(var v=1;v<=i.pieBackgroundN;v++){var x=t.pstyle("pie-"+v+"-background-size").value,b=t.pstyle("pie-"+v+"-background-color").value,T=t.pstyle("pie-"+v+"-background-opacity").value*r,w=x/100;w+g>1&&(w=1-g);var C=1.5*Math.PI+2*Math.PI*g;C+=l;var k=2*Math.PI*w,S=C+k;x===0||g>=1||g+w>1||(m===0?(e.beginPath(),e.moveTo(u,h),e.arc(u,h,p,C,S),e.closePath()):(e.beginPath(),e.arc(u,h,p,C,S),e.arc(u,h,m,S,C,!0),e.closePath()),this.colorFillStyle(e,b[0],b[1],b[2],T),e.fill(),g+=w)}};gf.drawStripe=function(e,t,r,n){t=t[0],n=n||t.position();var i=t.cy().style(),a=n.x,o=n.y,l=t.width(),u=t.height(),h=0,d=this.usePaths();e.save();var f=t.pstyle("stripe-direction").value,p=t.pstyle("stripe-size");switch(f){case"vertical":break;case"righward":e.rotate(-Math.PI/2);break}var m=l,g=u;p.units==="%"?(m=m*p.pfValue,g=g*p.pfValue):p.pfValue!==void 0&&(m=p.pfValue,g=p.pfValue),d&&(a=0,o=0),o-=m/2,a-=g/2;for(var y=1;y<=i.stripeBackgroundN;y++){var v=t.pstyle("stripe-"+y+"-background-size").value,x=t.pstyle("stripe-"+y+"-background-color").value,b=t.pstyle("stripe-"+y+"-background-opacity").value*r,T=v/100;T+h>1&&(T=1-h),!(v===0||h>=1||h+T>1)&&(e.beginPath(),e.rect(a,o+g*h,m,g*T),e.closePath(),this.colorFillStyle(e,x[0],x[1],x[2],b),e.fill(),h+=T)}e.restore()};bs={},rut=100;bs.getPixelRatio=function(){var e=this.data.contexts[0];if(this.forcedPixelRatio!=null)return this.forcedPixelRatio;var t=this.cy.window(),r=e.backingStorePixelRatio||e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1;return(t.devicePixelRatio||1)/r};bs.paintCache=function(e){for(var t=this.paintCaches=this.paintCaches||[],r=!0,n,i=0;it.minMbLowQualFrames&&(t.motionBlurPxRatio=t.mbPxRBlurry)),t.clearingMotionBlur&&(t.motionBlurPxRatio=1),t.textureDrawLastFrame&&!f&&(d[t.NODE]=!0,d[t.SELECT_BOX]=!0);var b=r.style(),T=r.zoom(),w=o!==void 0?o:T,C=r.pan(),k={x:C.x,y:C.y},S={zoom:T,pan:{x:C.x,y:C.y}},A=t.prevViewport,M=A===void 0||S.zoom!==A.zoom||S.pan.x!==A.pan.x||S.pan.y!==A.pan.y;!M&&!(y&&!g)&&(t.motionBlurPxRatio=1),l&&(k=l),w*=u,k.x*=u,k.y*=u;var N=t.getCachedZSortedEles();function D(J,he,se,oe,Se){var xe=J.globalCompositeOperation;J.globalCompositeOperation="destination-out",t.colorFillStyle(J,255,255,255,t.motionBlurTransparency),J.fillRect(he,se,oe,Se),J.globalCompositeOperation=xe}s(D,"mbclear");function R(J,he){var se,oe,Se,xe;!t.clearingMotionBlur&&(J===h.bufferContexts[t.MOTIONBLUR_BUFFER_NODE]||J===h.bufferContexts[t.MOTIONBLUR_BUFFER_DRAG])?(se={x:C.x*m,y:C.y*m},oe=T*m,Se=t.canvasWidth*m,xe=t.canvasHeight*m):(se=k,oe=w,Se=t.canvasWidth,xe=t.canvasHeight),J.setTransform(1,0,0,1,0,0),he==="motionBlur"?D(J,0,0,Se,xe):!n&&(he===void 0||he)&&J.clearRect(0,0,Se,xe),i||(J.translate(se.x,se.y),J.scale(oe,oe)),l&&J.translate(l.x,l.y),o&&J.scale(o,o)}if(s(R,"setContextTransform"),f||(t.textureDrawLastFrame=!1),f){if(t.textureDrawLastFrame=!0,!t.textureCache){t.textureCache={},t.textureCache.bb=r.mutableElements().boundingBox(),t.textureCache.texture=t.data.bufferCanvases[t.TEXTURE_BUFFER];var E=t.data.bufferContexts[t.TEXTURE_BUFFER];E.setTransform(1,0,0,1,0,0),E.clearRect(0,0,t.canvasWidth*t.textureMult,t.canvasHeight*t.textureMult),t.render({forcedContext:E,drawOnlyNodeLayer:!0,forcedPxRatio:u*t.textureMult});var S=t.textureCache.viewport={zoom:r.zoom(),pan:r.pan(),width:t.canvasWidth,height:t.canvasHeight};S.mpan={x:(0-S.pan.x)/S.zoom,y:(0-S.pan.y)/S.zoom}}d[t.DRAG]=!1,d[t.NODE]=!1;var I=h.contexts[t.NODE],L=t.textureCache.texture,S=t.textureCache.viewport;I.setTransform(1,0,0,1,0,0),p?D(I,0,0,S.width,S.height):I.clearRect(0,0,S.width,S.height);var P=b.core("outside-texture-bg-color").value,B=b.core("outside-texture-bg-opacity").value;t.colorFillStyle(I,P[0],P[1],P[2],B),I.fillRect(0,0,S.width,S.height);var T=r.zoom();R(I,!1),I.clearRect(S.mpan.x,S.mpan.y,S.width/S.zoom/u,S.height/S.zoom/u),I.drawImage(L,S.mpan.x,S.mpan.y,S.width/S.zoom/u,S.height/S.zoom/u)}else t.textureOnViewport&&!n&&(t.textureCache=null);var O=r.extent(),$=t.pinching||t.hoverData.dragging||t.swipePanning||t.data.wheelZooming||t.hoverData.draggingEles||t.cy.animated(),G=t.hideEdgesOnViewport&&$,V=[];if(V[t.NODE]=!d[t.NODE]&&p&&!t.clearedForMotionBlur[t.NODE]||t.clearingMotionBlur,V[t.NODE]&&(t.clearedForMotionBlur[t.NODE]=!0),V[t.DRAG]=!d[t.DRAG]&&p&&!t.clearedForMotionBlur[t.DRAG]||t.clearingMotionBlur,V[t.DRAG]&&(t.clearedForMotionBlur[t.DRAG]=!0),d[t.NODE]||i||a||V[t.NODE]){var z=p&&!V[t.NODE]&&m!==1,I=n||(z?t.data.bufferContexts[t.MOTIONBLUR_BUFFER_NODE]:h.contexts[t.NODE]),W=p&&!z?"motionBlur":void 0;R(I,W),G?t.drawCachedNodes(I,N.nondrag,u,O):t.drawLayeredElements(I,N.nondrag,u,O),t.debug&&t.drawDebugPoints(I,N.nondrag),!i&&!p&&(d[t.NODE]=!1)}if(!a&&(d[t.DRAG]||i||V[t.DRAG])){var z=p&&!V[t.DRAG]&&m!==1,I=n||(z?t.data.bufferContexts[t.MOTIONBLUR_BUFFER_DRAG]:h.contexts[t.DRAG]);R(I,p&&!z?"motionBlur":void 0),G?t.drawCachedNodes(I,N.drag,u,O):t.drawCachedElements(I,N.drag,u,O),t.debug&&t.drawDebugPoints(I,N.drag),!i&&!p&&(d[t.DRAG]=!1)}if(this.drawSelectionRectangle(e,R),p&&m!==1){var H=h.contexts[t.NODE],j=t.data.bufferCanvases[t.MOTIONBLUR_BUFFER_NODE],Q=h.contexts[t.DRAG],U=t.data.bufferCanvases[t.MOTIONBLUR_BUFFER_DRAG],ue=s(function(he,se,oe){he.setTransform(1,0,0,1,0,0),oe||!x?he.clearRect(0,0,t.canvasWidth,t.canvasHeight):D(he,0,0,t.canvasWidth,t.canvasHeight);var Se=m;he.drawImage(se,0,0,t.canvasWidth*Se,t.canvasHeight*Se,0,0,t.canvasWidth,t.canvasHeight)},"drawMotionBlur");(d[t.NODE]||V[t.NODE])&&(ue(H,j,V[t.NODE]),d[t.NODE]=!1),(d[t.DRAG]||V[t.DRAG])&&(ue(Q,U,V[t.DRAG]),d[t.DRAG]=!1)}t.prevViewport=S,t.clearingMotionBlur&&(t.clearingMotionBlur=!1,t.motionBlurCleared=!0,t.motionBlur=!0),p&&(t.motionBlurTimeout=setTimeout(function(){t.motionBlurTimeout=null,t.clearedForMotionBlur[t.NODE]=!1,t.clearedForMotionBlur[t.DRAG]=!1,t.motionBlur=!1,t.clearingMotionBlur=!f,t.mbFrames=0,d[t.NODE]=!0,d[t.DRAG]=!0,t.redraw()},rut)),n||r.emit("render")};bs.drawSelectionRectangle=function(e,t){var r=this,n=r.cy,i=r.data,a=n.style(),o=e.drawOnlyNodeLayer,l=e.drawAllLayers,u=i.canvasNeedsRedraw,h=e.forcedContext;if(r.showFps||!o&&u[r.SELECT_BOX]&&!l){var d=h||i.contexts[r.SELECT_BOX];if(t(d),r.selection[4]==1&&(r.hoverData.selecting||r.touchData.selecting)){var f=r.cy.zoom(),p=a.core("selection-box-border-width").value/f;d.lineWidth=p,d.fillStyle="rgba("+a.core("selection-box-color").value[0]+","+a.core("selection-box-color").value[1]+","+a.core("selection-box-color").value[2]+","+a.core("selection-box-opacity").value+")",d.fillRect(r.selection[0],r.selection[1],r.selection[2]-r.selection[0],r.selection[3]-r.selection[1]),p>0&&(d.strokeStyle="rgba("+a.core("selection-box-border-color").value[0]+","+a.core("selection-box-border-color").value[1]+","+a.core("selection-box-border-color").value[2]+","+a.core("selection-box-opacity").value+")",d.strokeRect(r.selection[0],r.selection[1],r.selection[2]-r.selection[0],r.selection[3]-r.selection[1]))}if(i.bgActivePosistion&&!r.hoverData.selecting){var f=r.cy.zoom(),m=i.bgActivePosistion;d.fillStyle="rgba("+a.core("active-bg-color").value[0]+","+a.core("active-bg-color").value[1]+","+a.core("active-bg-color").value[2]+","+a.core("active-bg-opacity").value+")",d.beginPath(),d.arc(m.x,m.y,a.core("active-bg-size").pfValue/f,0,2*Math.PI),d.fill()}var g=r.lastRedrawTime;if(r.showFps&&g){g=Math.round(g);var y=Math.round(1e3/g),v="1 frame = "+g+" ms = "+y+" fps";if(d.setTransform(1,0,0,1,0,0),d.fillStyle="rgba(255, 0, 0, 0.75)",d.strokeStyle="rgba(255, 0, 0, 0.75)",d.font="30px Arial",!G2){var x=d.measureText(v);G2=x.actualBoundingBoxAscent}d.fillText(v,0,G2);var b=60;d.strokeRect(0,G2+10,250,20),d.fillRect(0,G2+10,250*Math.min(y/b,1),20)}l||(u[r.SELECT_BOX]=!1)}};s(kve,"compileShader");s(nut,"createProgram");s(iut,"createTextureCanvas");s(k$,"getEffectivePanZoom");s(aut,"getEffectiveZoom");s(sut,"modelToRenderedPosition");s(out,"isSimpleShape");s(lut,"arrayEqual");s(dm,"toWebGLColor");s(Fy,"indexToVec4");s(cut,"vec4ToIndex");s(uut,"createTexture");s(ube,"getTypeInfo");s(hbe,"createTypedArray");s(hut,"createTypedArrayView");s(dut,"createBufferStaticDraw");s(Gc,"createBufferDynamicDraw");s(fut,"create3x3MatrixBufferDynamicDraw");s(put,"createPickingFrameBuffer");wve=typeof Float32Array<"u"?Float32Array:Array;Math.hypot||(Math.hypot=function(){for(var e=0,t=arguments.length;t--;)e+=arguments[t]*arguments[t];return Math.sqrt(e)});s(AB,"create");s(Sve,"identity");s(mut,"multiply");s($3,"translate");s(Eve,"rotate");s(XB,"scale");s(gut,"projection");yut=(function(){function e(t,r,n,i){ff(this,e),this.debugID=Math.floor(Math.random()*1e4),this.r=t,this.texSize=r,this.texRows=n,this.texHeight=Math.floor(r/n),this.enableWrapping=!0,this.locked=!1,this.texture=null,this.needsBuffer=!0,this.freePointer={x:0,row:0},this.keyToLocation=new Map,this.canvas=i(t,r,r),this.scratch=i(t,r,this.texHeight,"scratch")}return s(e,"Atlas"),pf(e,[{key:"lock",value:s(function(){this.locked=!0},"lock")},{key:"getKeys",value:s(function(){return new Set(this.keyToLocation.keys())},"getKeys")},{key:"getScale",value:s(function(r){var n=r.w,i=r.h,a=this.texHeight,o=this.texSize,l=a/i,u=n*l,h=i*l;return u>o&&(l=o/n,u=n*l,h=i*l),{scale:l,texW:u,texH:h}},"getScale")},{key:"draw",value:s(function(r,n,i){var a=this;if(this.locked)throw new Error("can't draw, atlas is locked");var o=this.texSize,l=this.texRows,u=this.texHeight,h=this.getScale(n),d=h.scale,f=h.texW,p=h.texH,m=s(function(T,w){if(i&&w){var C=w.context,k=T.x,S=T.row,A=k,M=u*S;C.save(),C.translate(A,M),C.scale(d,d),i(C,n),C.restore()}},"drawAt"),g=[null,null],y=s(function(){m(a.freePointer,a.canvas),g[0]={x:a.freePointer.x,y:a.freePointer.row*u,w:f,h:p},g[1]={x:a.freePointer.x+f,y:a.freePointer.row*u,w:0,h:p},a.freePointer.x+=f,a.freePointer.x==o&&(a.freePointer.x=0,a.freePointer.row++)},"drawNormal"),v=s(function(){var T=a.scratch,w=a.canvas;T.clear(),m({x:0,row:0},T);var C=o-a.freePointer.x,k=f-C,S=u;{var A=a.freePointer.x,M=a.freePointer.row*u,N=C;w.context.drawImage(T,0,0,N,S,A,M,N,S),g[0]={x:A,y:M,w:N,h:p}}{var D=C,R=(a.freePointer.row+1)*u,E=k;w&&w.context.drawImage(T,D,0,E,S,0,R,E,S),g[1]={x:0,y:R,w:E,h:p}}a.freePointer.x=k,a.freePointer.row++},"drawWrapped"),x=s(function(){a.freePointer.x=0,a.freePointer.row++},"moveToStartOfNextRow");if(this.freePointer.x+f<=o)y();else{if(this.freePointer.row>=l-1)return!1;this.freePointer.x===o?(x(),y()):this.enableWrapping?v():(x(),y())}return this.keyToLocation.set(r,g),this.needsBuffer=!0,g},"draw")},{key:"getOffsets",value:s(function(r){return this.keyToLocation.get(r)},"getOffsets")},{key:"isEmpty",value:s(function(){return this.freePointer.x===0&&this.freePointer.row===0},"isEmpty")},{key:"canFit",value:s(function(r){if(this.locked)return!1;var n=this.texSize,i=this.texRows,a=this.getScale(r),o=a.texW;return this.freePointer.x+o>n?this.freePointer.row1&&arguments[1]!==void 0?arguments[1]:{},a=i.forceRedraw,o=a===void 0?!1:a,l=i.filterEle,u=l===void 0?function(){return!0}:l,h=i.filterType,d=h===void 0?function(){return!0}:h,f=!1,p=!1,m=Qs(r),g;try{for(m.s();!(g=m.n()).done;){var y=g.value;if(u(y)){var v=Qs(this.renderTypes.values()),x;try{var b=s(function(){var w=x.value,C=w.type;if(d(C)){var k=n.collections.get(w.collection),S=w.getKey(y),A=Array.isArray(S)?S:[S];if(o)A.forEach(function(R){return k.markKeyForGC(R)}),p=!0;else{var M=w.getID?w.getID(y):y.id(),N=n._key(C,M),D=n.typeAndIdToKey.get(N);D!==void 0&&!lut(A,D)&&(f=!0,n.typeAndIdToKey.delete(N),D.forEach(function(R){return k.markKeyForGC(R)}))}}},"_loop2");for(v.s();!(x=v.n()).done;)b()}catch(T){v.e(T)}finally{v.f()}}}}catch(T){m.e(T)}finally{m.f()}return p&&(this.gc(),f=!1),f},"invalidate")},{key:"gc",value:s(function(){var r=Qs(this.collections.values()),n;try{for(r.s();!(n=r.n()).done;){var i=n.value;i.gc()}}catch(a){r.e(a)}finally{r.f()}},"gc")},{key:"getOrCreateAtlas",value:s(function(r,n,i,a){var o=this.renderTypes.get(n),l=this.collections.get(o.collection),u=!1,h=l.draw(a,i,function(p){o.drawClipped?(p.save(),p.beginPath(),p.rect(0,0,i.w,i.h),p.clip(),o.drawElement(p,r,i,!0,!0),p.restore()):o.drawElement(p,r,i,!0,!0),u=!0});if(u){var d=o.getID?o.getID(r):r.id(),f=this._key(n,d);this.typeAndIdToKey.has(f)?this.typeAndIdToKey.get(f).push(a):this.typeAndIdToKey.set(f,[a])}return h},"getOrCreateAtlas")},{key:"getAtlasInfo",value:s(function(r,n){var i=this,a=this.renderTypes.get(n),o=a.getKey(r),l=Array.isArray(o)?o:[o];return l.map(function(u){var h=a.getBoundingBox(r,u),d=i.getOrCreateAtlas(r,n,h,u),f=d.getOffsets(u),p=zi(f,2),m=p[0],g=p[1];return{atlas:d,tex:m,tex1:m,tex2:g,bb:h}})},"getAtlasInfo")},{key:"getDebugInfo",value:s(function(){var r=[],n=Qs(this.collections),i;try{for(n.s();!(i=n.n()).done;){var a=zi(i.value,2),o=a[0],l=a[1],u=l.getCounts(),h=u.keyCount,d=u.atlasCount;r.push({type:o,keyCount:h,atlasCount:d})}}catch(f){n.e(f)}finally{n.f()}return r},"getDebugInfo")}])})(),Tut=(function(){function e(t){ff(this,e),this.globalOptions=t,this.atlasSize=t.webglTexSize,this.maxAtlasesPerBatch=t.webglTexPerBatch,this.batchAtlases=[]}return s(e,"AtlasBatchManager"),pf(e,[{key:"getMaxAtlasesPerBatch",value:s(function(){return this.maxAtlasesPerBatch},"getMaxAtlasesPerBatch")},{key:"getAtlasSize",value:s(function(){return this.atlasSize},"getAtlasSize")},{key:"getIndexArray",value:s(function(){return Array.from({length:this.maxAtlasesPerBatch},function(r,n){return n})},"getIndexArray")},{key:"startBatch",value:s(function(){this.batchAtlases=[]},"startBatch")},{key:"getAtlasCount",value:s(function(){return this.batchAtlases.length},"getAtlasCount")},{key:"getAtlases",value:s(function(){return this.batchAtlases},"getAtlases")},{key:"canAddToCurrentBatch",value:s(function(r){return this.batchAtlases.length===this.maxAtlasesPerBatch?this.batchAtlases.includes(r):!0},"canAddToCurrentBatch")},{key:"getAtlasIndexForBatch",value:s(function(r){var n=this.batchAtlases.indexOf(r);if(n<0){if(this.batchAtlases.length===this.maxAtlasesPerBatch)throw new Error("cannot add more atlases to batch");this.batchAtlases.push(r),n=this.batchAtlases.length-1}return n},"getAtlasIndexForBatch")}])})(),Cut=` + float circleSD(vec2 p, float r) { + return distance(vec2(0), p) - r; // signed distance + } +`,kut=` + 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); + } +`,wut=` + 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; + } +`,Sut=` + 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; + } +`,j2={SCREEN:{name:"screen",screen:!0},PICKING:{name:"picking",picking:!0}},Z3={IGNORE:1,USE_BB:2},RB=0,Ave=1,Rve=2,_B=3,Gy=4,A3=5,z2=6,V2=7,Eut=(function(){function e(t,r,n){ff(this,e),this.r=t,this.gl=r,this.maxInstances=n.webglBatchSize,this.atlasSize=n.webglTexSize,this.bgColor=n.bgColor,this.debug=n.webglDebug,this.batchDebugInfo=[],n.enableWrapping=!0,n.createTextureCanvas=iut,this.atlasManager=new but(t,n),this.batchManager=new Tut(n),this.simpleShapeOptions=new Map,this.program=this._createShaderProgram(j2.SCREEN),this.pickingProgram=this._createShaderProgram(j2.PICKING),this.vao=this._createVAO()}return s(e,"ElementDrawingWebGL"),pf(e,[{key:"addAtlasCollection",value:s(function(r,n){this.atlasManager.addAtlasCollection(r,n)},"addAtlasCollection")},{key:"addTextureAtlasRenderType",value:s(function(r,n){this.atlasManager.addRenderType(r,n)},"addTextureAtlasRenderType")},{key:"addSimpleShapeRenderType",value:s(function(r,n){this.simpleShapeOptions.set(r,n)},"addSimpleShapeRenderType")},{key:"invalidate",value:s(function(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=n.type,a=this.atlasManager;return i?a.invalidate(r,{filterType:s(function(l){return l===i},"filterType"),forceRedraw:!0}):a.invalidate(r)},"invalidate")},{key:"gc",value:s(function(){this.atlasManager.gc()},"gc")},{key:"_createShaderProgram",value:s(function(r){var n=this.gl,i=`#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(RB,`) { + 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(Gy," || aVertType == ").concat(V2,` + || aVertType == `).concat(A3," || aVertType == ").concat(z2,`) { // 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(Ave,`) { + 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(Rve,`) { + 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(_B,` && 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; + } + `),a=this.batchManager.getIndexArray(),o=`#version 300 es + precision highp float; + + // declare texture unit for each texture atlas in the batch + `.concat(a.map(function(h){return"uniform sampler2D uTexture".concat(h,";")}).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(Cut,` + `).concat(kut,` + `).concat(wut,` + `).concat(Sut,` + + 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(RB,`) { + // look up the texel from the texture unit + `).concat(a.map(function(h){return"if(vAtlasId == ".concat(h,") outColor = texture(uTexture").concat(h,", vTexCoord);")}).join(` + else `),` + } + else if(vVertType == `).concat(_B,`) { + // 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(Gy,` && 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(Gy," || vVertType == ").concat(V2,` + || vVertType == `).concat(A3," || vVertType == ").concat(z2,`) { // 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(Gy,`) { + d = rectangleSD(p, b); + } else if(vVertType == `).concat(V2,` && w == h) { + d = circleSD(p, b.x); // faster than ellipse + } else if(vVertType == `).concat(V2,`) { + 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(r.picking?`if(outColor.a == 0.0) discard; + else outColor = vIndex;`:"",` + } + `),l=nut(n,i,o);l.aPosition=n.getAttribLocation(l,"aPosition"),l.aIndex=n.getAttribLocation(l,"aIndex"),l.aVertType=n.getAttribLocation(l,"aVertType"),l.aTransform=n.getAttribLocation(l,"aTransform"),l.aAtlasId=n.getAttribLocation(l,"aAtlasId"),l.aTex=n.getAttribLocation(l,"aTex"),l.aPointAPointB=n.getAttribLocation(l,"aPointAPointB"),l.aPointCPointD=n.getAttribLocation(l,"aPointCPointD"),l.aLineWidth=n.getAttribLocation(l,"aLineWidth"),l.aColor=n.getAttribLocation(l,"aColor"),l.aCornerRadius=n.getAttribLocation(l,"aCornerRadius"),l.aBorderColor=n.getAttribLocation(l,"aBorderColor"),l.uPanZoomMatrix=n.getUniformLocation(l,"uPanZoomMatrix"),l.uAtlasSize=n.getUniformLocation(l,"uAtlasSize"),l.uBGColor=n.getUniformLocation(l,"uBGColor"),l.uZoom=n.getUniformLocation(l,"uZoom"),l.uTextures=[];for(var u=0;u1&&arguments[1]!==void 0?arguments[1]:j2.SCREEN;this.panZoomMatrix=r,this.renderTarget=n,this.batchDebugInfo=[],this.wrappedCount=0,this.simpleCount=0,this.startBatch()},"startFrame")},{key:"startBatch",value:s(function(){this.instanceCount=0,this.batchManager.startBatch()},"startBatch")},{key:"endFrame",value:s(function(){this.endBatch()},"endFrame")},{key:"_isVisible",value:s(function(r,n){return r.visible()?n&&n.isVisible?n.isVisible(r):!0:!1},"_isVisible")},{key:"drawTexture",value:s(function(r,n,i){var a=this.atlasManager,o=this.batchManager,l=a.getRenderTypeOpts(i);if(this._isVisible(r,l)&&!(r.isEdge()&&!this._isValidEdge(r))){if(this.renderTarget.picking&&l.getTexPickingMode){var u=l.getTexPickingMode(r);if(u===Z3.IGNORE)return;if(u==Z3.USE_BB){this.drawPickingRectangle(r,n,i);return}}var h=a.getAtlasInfo(r,i),d=Qs(h),f;try{for(d.s();!(f=d.n()).done;){var p=f.value,m=p.atlas,g=p.tex1,y=p.tex2;o.canAddToCurrentBatch(m)||this.endBatch();for(var v=o.getAtlasIndexForBatch(m),x=0,b=[[g,!0],[y,!1]];x=this.maxInstances&&this.endBatch()}}}}catch(D){d.e(D)}finally{d.f()}}},"drawTexture")},{key:"setTransformMatrix",value:s(function(r,n,i,a){var o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,l=0;if(i.shapeProps&&i.shapeProps.padding&&(l=r.pstyle(i.shapeProps.padding).pfValue),a){var u=a.bb,h=a.tex1,d=a.tex2,f=h.w/(h.w+d.w);o||(f=1-f);var p=this._getAdjustedBB(u,l,o,f);this._applyTransformMatrix(n,p,i,r)}else{var m=i.getBoundingBox(r),g=this._getAdjustedBB(m,l,!0,1);this._applyTransformMatrix(n,g,i,r)}},"setTransformMatrix")},{key:"_applyTransformMatrix",value:s(function(r,n,i,a){var o,l;Sve(r);var u=i.getRotation?i.getRotation(a):0;if(u!==0){var h=i.getRotationPoint(a),d=h.x,f=h.y;$3(r,r,[d,f]),Eve(r,r,u);var p=i.getRotationOffset(a);o=p.x+(n.xOffset||0),l=p.y+(n.yOffset||0)}else o=n.x1,l=n.y1;$3(r,r,[o,l]),XB(r,r,[n.w,n.h])},"_applyTransformMatrix")},{key:"_getAdjustedBB",value:s(function(r,n,i,a){var o=r.x1,l=r.y1,u=r.w,h=r.h,d=r.yOffset;n&&(o-=n,l-=n,u+=2*n,h+=2*n);var f=0,p=u*a;return i&&a<1?u=p:!i&&a<1&&(f=u-p,o+=f,u=p),{x1:o,y1:l,w:u,h,xOffset:f,yOffset:d}},"_getAdjustedBB")},{key:"drawPickingRectangle",value:s(function(r,n,i){var a=this.atlasManager.getRenderTypeOpts(i),o=this.instanceCount;this.vertTypeBuffer.getView(o)[0]=Gy;var l=this.indexBuffer.getView(o);Fy(n,l);var u=this.colorBuffer.getView(o);dm([0,0,0],1,u);var h=this.transformBuffer.getMatrixView(o);this.setTransformMatrix(r,h,a),this.simpleCount++,this.instanceCount++,this.instanceCount>=this.maxInstances&&this.endBatch()},"drawPickingRectangle")},{key:"drawNode",value:s(function(r,n,i){var a=this.simpleShapeOptions.get(i);if(this._isVisible(r,a)){var o=a.shapeProps,l=this._getVertTypeForShape(r,o.shape);if(l===void 0||a.isSimple&&!a.isSimple(r,this.renderTarget)){this.drawTexture(r,n,i);return}var u=this.instanceCount;if(this.vertTypeBuffer.getView(u)[0]=l,l===A3||l===z2){var h=a.getBoundingBox(r),d=this._getCornerRadius(r,o.radius,h),f=this.cornerRadiusBuffer.getView(u);f[0]=d,f[1]=d,f[2]=d,f[3]=d,l===z2&&(f[0]=0,f[2]=0)}var p=this.indexBuffer.getView(u);Fy(n,p);var m=this.renderTarget.picking?1:i==="node-body"?r.effectiveOpacity():1,g=this.renderTarget.picking?1:r.pstyle(o.opacity).value*m,y=r.pstyle(o.color).value,v=this.colorBuffer.getView(u);dm(y,g,v);var x=this.lineWidthBuffer.getView(u);if(x[0]=0,x[1]=0,o.border){var b=r.pstyle("border-width").value;if(b>0){var T=r.pstyle("border-color").value,w=m*r.pstyle("border-opacity").value,C=this.borderColorBuffer.getView(u);dm(T,w,C);var k=r.pstyle("border-position").value;if(k==="inside")x[0]=0,x[1]=-b;else if(k==="outside")x[0]=b,x[1]=0;else{var S=b/2;x[0]=S,x[1]=-S}}}var A=this.transformBuffer.getMatrixView(u);this.setTransformMatrix(r,A,a),this.simpleCount++,this.instanceCount++,this.instanceCount>=this.maxInstances&&this.endBatch()}},"drawNode")},{key:"_getVertTypeForShape",value:s(function(r,n){var i=r.pstyle(n).value;switch(i){case"rectangle":return Gy;case"ellipse":return V2;case"roundrectangle":case"round-rectangle":return A3;case"bottom-round-rectangle":return z2;default:return}},"_getVertTypeForShape")},{key:"_getCornerRadius",value:s(function(r,n,i){var a=i.w,o=i.h;if(r.pstyle(n).value==="auto")return cf(a,o);var l=r.pstyle(n).pfValue,u=a/2,h=o/2;return Math.min(l,h,u)},"_getCornerRadius")},{key:"drawEdgeArrow",value:s(function(r,n,i){if(r.visible()){var a=r._private.rscratch,o,l,u;if(i==="source"?(o=a.arrowStartX,l=a.arrowStartY,u=a.srcArrowAngle):(o=a.arrowEndX,l=a.arrowEndY,u=a.tgtArrowAngle),!(isNaN(o)||o==null||isNaN(l)||l==null||isNaN(u)||u==null)){var h=r.pstyle(i+"-arrow-shape").value;if(h!=="none"){var d=r.pstyle(i+"-arrow-color").value,f=r.pstyle("opacity").value,p=r.pstyle("line-opacity").value,m=f*p,g=r.pstyle("width").pfValue,y=r.pstyle("arrow-scale").value,v=this.r.getArrowWidth(g,y),x=this.instanceCount,b=this.transformBuffer.getMatrixView(x);Sve(b),$3(b,b,[o,l]),XB(b,b,[v,v]),Eve(b,b,u),this.vertTypeBuffer.getView(x)[0]=_B;var T=this.indexBuffer.getView(x);Fy(n,T);var w=this.colorBuffer.getView(x);dm(d,m,w),this.instanceCount++,this.instanceCount>=this.maxInstances&&this.endBatch()}}}},"drawEdgeArrow")},{key:"drawEdgeLine",value:s(function(r,n){if(r.visible()){var i=this._getEdgePoints(r);if(i){var a=r.pstyle("opacity").value,o=r.pstyle("line-opacity").value,l=r.pstyle("width").pfValue,u=r.pstyle("line-color").value,h=a*o;if(i.length/2+this.instanceCount>this.maxInstances&&this.endBatch(),i.length==4){var d=this.instanceCount;this.vertTypeBuffer.getView(d)[0]=Ave;var f=this.indexBuffer.getView(d);Fy(n,f);var p=this.colorBuffer.getView(d);dm(u,h,p);var m=this.lineWidthBuffer.getView(d);m[0]=l;var g=this.pointAPointBBuffer.getView(d);g[0]=i[0],g[1]=i[1],g[2]=i[2],g[3]=i[3],this.instanceCount++,this.instanceCount>=this.maxInstances&&this.endBatch()}else for(var y=0;y=this.maxInstances&&this.endBatch()}}}},"drawEdgeLine")},{key:"_isValidEdge",value:s(function(r){var n=r._private.rscratch;return!(n.badLine||n.allpts==null||isNaN(n.allpts[0]))},"_isValidEdge")},{key:"_getEdgePoints",value:s(function(r){var n=r._private.rscratch;if(this._isValidEdge(r)){var i=n.allpts;if(i.length==4)return i;var a=this._getNumSegments(r);return this._getCurveSegmentPoints(i,a)}},"_getEdgePoints")},{key:"_getNumSegments",value:s(function(r){var n=15;return Math.min(Math.max(n,5),this.maxInstances)},"_getNumSegments")},{key:"_getCurveSegmentPoints",value:s(function(r,n){if(r.length==4)return r;for(var i=Array((n+1)*2),a=0;a<=n;a++)if(a==0)i[0]=r[0],i[1]=r[1];else if(a==n)i[a*2]=r[r.length-2],i[a*2+1]=r[r.length-1];else{var o=a/n;this._setCurvePoint(r,o,i,a*2)}return i},"_getCurveSegmentPoints")},{key:"_setCurvePoint",value:s(function(r,n,i,a){if(r.length<=2)i[a]=r[0],i[a+1]=r[1];else{for(var o=Array(r.length-2),l=0;l0}},"isLayerVisible"),l=s(function(f){var p=f.pstyle("text-events").strValue==="yes";return p?Z3.USE_BB:Z3.IGNORE},"getTexPickingMode"),u=s(function(f){var p=f.position(),m=p.x,g=p.y,y=f.outerWidth(),v=f.outerHeight();return{w:y,h:v,x1:m-y/2,y1:g-v/2}},"getBBForSimpleShape");r.drawing.addAtlasCollection("node",{texRows:e.webglTexRowsNodes}),r.drawing.addAtlasCollection("label",{texRows:e.webglTexRows}),r.drawing.addTextureAtlasRenderType("node-body",{collection:"node",getKey:t.getStyleKey,getBoundingBox:t.getElementBox,drawElement:t.drawElement}),r.drawing.addSimpleShapeRenderType("node-body",{getBoundingBox:u,isSimple:out,shapeProps:{shape:"shape",color:"background-color",opacity:"background-opacity",radius:"corner-radius",border:!0}}),r.drawing.addSimpleShapeRenderType("node-overlay",{getBoundingBox:u,isVisible:o("overlay"),shapeProps:{shape:"overlay-shape",color:"overlay-color",opacity:"overlay-opacity",padding:"overlay-padding",radius:"overlay-corner-radius"}}),r.drawing.addSimpleShapeRenderType("node-underlay",{getBoundingBox:u,isVisible:o("underlay"),shapeProps:{shape:"underlay-shape",color:"underlay-color",opacity:"underlay-opacity",padding:"underlay-padding",radius:"underlay-corner-radius"}}),r.drawing.addTextureAtlasRenderType("label",{collection:"label",getTexPickingMode:l,getKey:LB(t.getLabelKey,null),getBoundingBox:DB(t.getLabelBox,null),drawClipped:!0,drawElement:t.drawLabel,getRotation:i(null),getRotationPoint:t.getLabelRotationPoint,getRotationOffset:t.getLabelRotationOffset,isVisible:a("label")}),r.drawing.addTextureAtlasRenderType("edge-source-label",{collection:"label",getTexPickingMode:l,getKey:LB(t.getSourceLabelKey,"source"),getBoundingBox:DB(t.getSourceLabelBox,"source"),drawClipped:!0,drawElement:t.drawSourceLabel,getRotation:i("source"),getRotationPoint:t.getSourceLabelRotationPoint,getRotationOffset:t.getSourceLabelRotationOffset,isVisible:a("source-label")}),r.drawing.addTextureAtlasRenderType("edge-target-label",{collection:"label",getTexPickingMode:l,getKey:LB(t.getTargetLabelKey,"target"),getBoundingBox:DB(t.getTargetLabelBox,"target"),drawClipped:!0,drawElement:t.drawTargetLabel,getRotation:i("target"),getRotationPoint:t.getTargetLabelRotationPoint,getRotationOffset:t.getTargetLabelRotationOffset,isVisible:a("target-label")});var h=uT(function(){console.log("garbage collect flag set"),r.data.gc=!0},1e4);r.onUpdateEleCalcs(function(d,f){var p=!1;f&&f.length>0&&(p|=r.drawing.invalidate(f)),p&&h()}),Rut(r)};s(Aut,"getBGColor");s(fbe,"getLabelLines");LB=s(function(t,r){return function(n){var i=t(n),a=fbe(n,r);return a.length>1?a.map(function(o,l){return"".concat(i,"_").concat(l)}):i}},"getStyleKeysForLabel"),DB=s(function(t,r){return function(n,i){var a=t(n);if(typeof i=="string"){var o=i.indexOf("_");if(o>0){var l=Number(i.substring(o+1)),u=fbe(n,r),h=a.h/u.length,d=h*l,f=a.y1+d;return{x1:a.x1,w:a.w,y1:f,h,yOffset:d}}}return a}},"getBoundingBoxForLabel");s(Rut,"overrideCanvasRendererFunctions");s(_ut,"clearWebgl");s(Lut,"clearCanvas");s(Dut,"createPanZoomMatrix");s(pbe,"setContextTransform");s(Iut,"drawSelectionRectangle");s(Mut,"drawAxes");s(Nut,"drawAtlases");s(Put,"getPickingIndexes");s(Out,"findNearestElementsWebgl");s(IB,"drawEle");s(mbe,"renderWebgl");yf={};yf.drawPolygonPath=function(e,t,r,n,i,a){var o=n/2,l=i/2;e.beginPath&&e.beginPath(),e.moveTo(t+o*a[0],r+l*a[1]);for(var u=1;u0&&o>0){m.clearRect(0,0,a,o),m.globalCompositeOperation="source-over";var g=this.getCachedZSortedEles();if(e.full)m.translate(-n.x1*h,-n.y1*h),m.scale(h,h),this.drawElements(m,g),m.scale(1/h,1/h),m.translate(n.x1*h,n.y1*h);else{var y=t.pan(),v={x:y.x*h,y:y.y*h};h*=t.zoom(),m.translate(v.x,v.y),m.scale(h,h),this.drawElements(m,g),m.scale(1/h,1/h),m.translate(-v.x,-v.y)}e.bg&&(m.globalCompositeOperation="destination-over",m.fillStyle=e.bg,m.rect(0,0,a,o),m.fill())}return p};s(But,"b64ToBlob");s(Dve,"b64UriToB64");s(ybe,"output");gT.png=function(e){return ybe(e,this.bufferCanvasImage(e),"image/png")};gT.jpg=function(e){return ybe(e,this.bufferCanvasImage(e),"image/jpeg")};vbe={};vbe.nodeShapeImpl=function(e,t,r,n,i,a,o,l){switch(e){case"ellipse":return this.drawEllipsePath(t,r,n,i,a);case"polygon":return this.drawPolygonPath(t,r,n,i,a,o);case"round-polygon":return this.drawRoundPolygonPath(t,r,n,i,a,o,l);case"roundrectangle":case"round-rectangle":return this.drawRoundRectanglePath(t,r,n,i,a,l);case"cutrectangle":case"cut-rectangle":return this.drawCutRectanglePath(t,r,n,i,a,o,l);case"bottomroundrectangle":case"bottom-round-rectangle":return this.drawBottomRoundRectanglePath(t,r,n,i,a,l);case"barrel":return this.drawBarrelPath(t,r,n,i,a)}};$ut=xbe,Ur=xbe.prototype;Ur.CANVAS_LAYERS=3;Ur.SELECT_BOX=0;Ur.DRAG=1;Ur.NODE=2;Ur.WEBGL=3;Ur.CANVAS_TYPES=["2d","2d","2d","webgl2"];Ur.BUFFER_COUNT=3;Ur.TEXTURE_BUFFER=0;Ur.MOTIONBLUR_BUFFER_NODE=1;Ur.MOTIONBLUR_BUFFER_DRAG=2;s(xbe,"CanvasRenderer");Ur.redrawHint=function(e,t){var r=this;switch(e){case"eles":r.data.canvasNeedsRedraw[Ur.NODE]=t;break;case"drag":r.data.canvasNeedsRedraw[Ur.DRAG]=t;break;case"select":r.data.canvasNeedsRedraw[Ur.SELECT_BOX]=t;break;case"gc":r.data.gc=!0;break}};Fut=typeof Path2D<"u";Ur.path2dEnabled=function(e){if(e===void 0)return this.pathsEnabled;this.pathsEnabled=!!e};Ur.usePaths=function(){return Fut&&this.pathsEnabled};Ur.setImgSmoothing=function(e,t){e.imageSmoothingEnabled!=null?e.imageSmoothingEnabled=t:(e.webkitImageSmoothingEnabled=t,e.mozImageSmoothingEnabled=t,e.msImageSmoothingEnabled=t)};Ur.getImgSmoothing=function(e){return e.imageSmoothingEnabled!=null?e.imageSmoothingEnabled:e.webkitImageSmoothingEnabled||e.mozImageSmoothingEnabled||e.msImageSmoothingEnabled};Ur.makeOffscreenCanvas=function(e,t){var r;if((typeof OffscreenCanvas>"u"?"undefined":Ji(OffscreenCanvas))!=="undefined")r=new OffscreenCanvas(e,t);else{var n=this.cy.window(),i=n.document;r=i.createElement("canvas"),r.width=e,r.height=t}return r};[obe,Uc,ah,C$,Sm,gf,bs,dbe,yf,gT,vbe].forEach(function(e){xr(Ur,e)});Gut=[{name:"null",impl:Uxe},{name:"base",impl:nbe},{name:"canvas",impl:$ut}],zut=[{type:"layout",extensions:uct},{type:"renderer",extensions:Gut}],bbe={},Tbe={};s(Cbe,"setExtension");s(kbe,"getExtension");s(Vut,"setModule");s(Wut,"getModule");QB=s(function(){if(arguments.length===2)return kbe.apply(null,arguments);if(arguments.length===3)return Cbe.apply(null,arguments);if(arguments.length===4)return Wut.apply(null,arguments);if(arguments.length===5)return Vut.apply(null,arguments);ii("Invalid extension access syntax")},"extension");nT.prototype.extension=QB;zut.forEach(function(e){e.extensions.forEach(function(t){Cbe(e.type,t.name,t.impl)})});Q3=s(function(){if(!(this instanceof Q3))return new Q3;this.length=0},"Stylesheet"),km=Q3.prototype;km.instanceString=function(){return"stylesheet"};km.selector=function(e){var t=this.length++;return this[t]={selector:e,properties:[]},this};km.css=function(e,t){var r=this.length-1;if(fr(e))this[r].properties.push({name:e,value:t});else if(an(e))for(var n=e,i=Object.keys(n),a=0;a{"use strict";s((function(t,r){typeof yT=="object"&&typeof S$=="object"?S$.exports=r():typeof define=="function"&&define.amd?define([],r):typeof yT=="object"?yT.layoutBase=r():t.layoutBase=r()}),"webpackUniversalModuleDefinition")(yT,function(){return(function(e){var t={};function r(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return s(r,"__webpack_require__"),r.m=e,r.c=t,r.i=function(n){return n},r.d=function(n,i,a){r.o(n,i)||Object.defineProperty(n,i,{configurable:!1,enumerable:!0,get:a})},r.n=function(n){var i=n&&n.__esModule?s(function(){return n.default},"getDefault"):s(function(){return n},"getModuleExports");return r.d(i,"a",i),i},r.o=function(n,i){return Object.prototype.hasOwnProperty.call(n,i)},r.p="",r(r.s=26)})([(function(e,t,r){"use strict";function n(){}s(n,"LayoutConstants"),n.QUALITY=1,n.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,n.DEFAULT_INCREMENTAL=!1,n.DEFAULT_ANIMATION_ON_LAYOUT=!0,n.DEFAULT_ANIMATION_DURING_LAYOUT=!1,n.DEFAULT_ANIMATION_PERIOD=50,n.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,n.DEFAULT_GRAPH_MARGIN=15,n.NODE_DIMENSIONS_INCLUDE_LABELS=!1,n.SIMPLE_NODE_SIZE=40,n.SIMPLE_NODE_HALF_SIZE=n.SIMPLE_NODE_SIZE/2,n.EMPTY_COMPOUND_NODE_SIZE=40,n.MIN_EDGE_LENGTH=1,n.WORLD_BOUNDARY=1e6,n.INITIAL_WORLD_BOUNDARY=n.WORLD_BOUNDARY/1e3,n.WORLD_CENTER_X=1200,n.WORLD_CENTER_Y=900,e.exports=n}),(function(e,t,r){"use strict";var n=r(2),i=r(8),a=r(9);function o(u,h,d){n.call(this,d),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=d,this.bendpoints=[],this.source=u,this.target=h}s(o,"LEdge"),o.prototype=Object.create(n.prototype);for(var l in n)o[l]=n[l];o.prototype.getSource=function(){return this.source},o.prototype.getTarget=function(){return this.target},o.prototype.isInterGraph=function(){return this.isInterGraph},o.prototype.getLength=function(){return this.length},o.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},o.prototype.getBendpoints=function(){return this.bendpoints},o.prototype.getLca=function(){return this.lca},o.prototype.getSourceInLca=function(){return this.sourceInLca},o.prototype.getTargetInLca=function(){return this.targetInLca},o.prototype.getOtherEnd=function(u){if(this.source===u)return this.target;if(this.target===u)return this.source;throw"Node is not incident with this edge"},o.prototype.getOtherEndInGraph=function(u,h){for(var d=this.getOtherEnd(u),f=h.getGraphManager().getRoot();;){if(d.getOwner()==h)return d;if(d.getOwner()==f)break;d=d.getOwner().getParent()}return null},o.prototype.updateLength=function(){var u=new Array(4);this.isOverlapingSourceAndTarget=i.getIntersection(this.target.getRect(),this.source.getRect(),u),this.isOverlapingSourceAndTarget||(this.lengthX=u[0]-u[2],this.lengthY=u[1]-u[3],Math.abs(this.lengthX)<1&&(this.lengthX=a.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=a.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},o.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=a.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=a.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},e.exports=o}),(function(e,t,r){"use strict";function n(i){this.vGraphObject=i}s(n,"LGraphObject"),e.exports=n}),(function(e,t,r){"use strict";var n=r(2),i=r(10),a=r(13),o=r(0),l=r(16),u=r(4);function h(f,p,m,g){m==null&&g==null&&(g=p),n.call(this,g),f.graphManager!=null&&(f=f.graphManager),this.estimatedSize=i.MIN_VALUE,this.inclusionTreeDepth=i.MAX_VALUE,this.vGraphObject=g,this.edges=[],this.graphManager=f,m!=null&&p!=null?this.rect=new a(p.x,p.y,m.width,m.height):this.rect=new a}s(h,"LNode"),h.prototype=Object.create(n.prototype);for(var d in n)h[d]=n[d];h.prototype.getEdges=function(){return this.edges},h.prototype.getChild=function(){return this.child},h.prototype.getOwner=function(){return this.owner},h.prototype.getWidth=function(){return this.rect.width},h.prototype.setWidth=function(f){this.rect.width=f},h.prototype.getHeight=function(){return this.rect.height},h.prototype.setHeight=function(f){this.rect.height=f},h.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},h.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},h.prototype.getCenter=function(){return new u(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},h.prototype.getLocation=function(){return new u(this.rect.x,this.rect.y)},h.prototype.getRect=function(){return this.rect},h.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},h.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},h.prototype.setRect=function(f,p){this.rect.x=f.x,this.rect.y=f.y,this.rect.width=p.width,this.rect.height=p.height},h.prototype.setCenter=function(f,p){this.rect.x=f-this.rect.width/2,this.rect.y=p-this.rect.height/2},h.prototype.setLocation=function(f,p){this.rect.x=f,this.rect.y=p},h.prototype.moveBy=function(f,p){this.rect.x+=f,this.rect.y+=p},h.prototype.getEdgeListToNode=function(f){var p=[],m,g=this;return g.edges.forEach(function(y){if(y.target==f){if(y.source!=g)throw"Incorrect edge source!";p.push(y)}}),p},h.prototype.getEdgesBetween=function(f){var p=[],m,g=this;return g.edges.forEach(function(y){if(!(y.source==g||y.target==g))throw"Incorrect edge source and/or target";(y.target==f||y.source==f)&&p.push(y)}),p},h.prototype.getNeighborsList=function(){var f=new Set,p=this;return p.edges.forEach(function(m){if(m.source==p)f.add(m.target);else{if(m.target!=p)throw"Incorrect incidency!";f.add(m.source)}}),f},h.prototype.withChildren=function(){var f=new Set,p,m;if(f.add(this),this.child!=null)for(var g=this.child.getNodes(),y=0;yp&&(this.rect.x-=(this.labelWidth-p)/2,this.setWidth(this.labelWidth)),this.labelHeight>m&&(this.labelPos=="center"?this.rect.y-=(this.labelHeight-m)/2:this.labelPos=="top"&&(this.rect.y-=this.labelHeight-m),this.setHeight(this.labelHeight))}}},h.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==i.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},h.prototype.transform=function(f){var p=this.rect.x;p>o.WORLD_BOUNDARY?p=o.WORLD_BOUNDARY:p<-o.WORLD_BOUNDARY&&(p=-o.WORLD_BOUNDARY);var m=this.rect.y;m>o.WORLD_BOUNDARY?m=o.WORLD_BOUNDARY:m<-o.WORLD_BOUNDARY&&(m=-o.WORLD_BOUNDARY);var g=new u(p,m),y=f.inverseTransformPoint(g);this.setLocation(y.x,y.y)},h.prototype.getLeft=function(){return this.rect.x},h.prototype.getRight=function(){return this.rect.x+this.rect.width},h.prototype.getTop=function(){return this.rect.y},h.prototype.getBottom=function(){return this.rect.y+this.rect.height},h.prototype.getParent=function(){return this.owner==null?null:this.owner.getParent()},e.exports=h}),(function(e,t,r){"use strict";function n(i,a){i==null&&a==null?(this.x=0,this.y=0):(this.x=i,this.y=a)}s(n,"PointD"),n.prototype.getX=function(){return this.x},n.prototype.getY=function(){return this.y},n.prototype.setX=function(i){this.x=i},n.prototype.setY=function(i){this.y=i},n.prototype.getDifference=function(i){return new DimensionD(this.x-i.x,this.y-i.y)},n.prototype.getCopy=function(){return new n(this.x,this.y)},n.prototype.translate=function(i){return this.x+=i.width,this.y+=i.height,this},e.exports=n}),(function(e,t,r){"use strict";var n=r(2),i=r(10),a=r(0),o=r(6),l=r(3),u=r(1),h=r(13),d=r(12),f=r(11);function p(g,y,v){n.call(this,v),this.estimatedSize=i.MIN_VALUE,this.margin=a.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=g,y!=null&&y instanceof o?this.graphManager=y:y!=null&&y instanceof Layout&&(this.graphManager=y.graphManager)}s(p,"LGraph"),p.prototype=Object.create(n.prototype);for(var m in n)p[m]=n[m];p.prototype.getNodes=function(){return this.nodes},p.prototype.getEdges=function(){return this.edges},p.prototype.getGraphManager=function(){return this.graphManager},p.prototype.getParent=function(){return this.parent},p.prototype.getLeft=function(){return this.left},p.prototype.getRight=function(){return this.right},p.prototype.getTop=function(){return this.top},p.prototype.getBottom=function(){return this.bottom},p.prototype.isConnected=function(){return this.isConnected},p.prototype.add=function(g,y,v){if(y==null&&v==null){var x=g;if(this.graphManager==null)throw"Graph has no graph mgr!";if(this.getNodes().indexOf(x)>-1)throw"Node already in graph!";return x.owner=this,this.getNodes().push(x),x}else{var b=g;if(!(this.getNodes().indexOf(y)>-1&&this.getNodes().indexOf(v)>-1))throw"Source or target not in graph!";if(!(y.owner==v.owner&&y.owner==this))throw"Both owners must be this graph!";return y.owner!=v.owner?null:(b.source=y,b.target=v,b.isInterGraph=!1,this.getEdges().push(b),y.edges.push(b),v!=y&&v.edges.push(b),b)}},p.prototype.remove=function(g){var y=g;if(g instanceof l){if(y==null)throw"Node is null!";if(!(y.owner!=null&&y.owner==this))throw"Owner graph is invalid!";if(this.graphManager==null)throw"Owner graph manager is invalid!";for(var v=y.edges.slice(),x,b=v.length,T=0;T-1&&k>-1))throw"Source and/or target doesn't know this edge!";x.source.edges.splice(C,1),x.target!=x.source&&x.target.edges.splice(k,1);var w=x.source.owner.getEdges().indexOf(x);if(w==-1)throw"Not in owner's edge list!";x.source.owner.getEdges().splice(w,1)}},p.prototype.updateLeftTop=function(){for(var g=i.MAX_VALUE,y=i.MAX_VALUE,v,x,b,T=this.getNodes(),w=T.length,C=0;Cv&&(g=v),y>x&&(y=x)}return g==i.MAX_VALUE?null:(T[0].getParent().paddingLeft!=null?b=T[0].getParent().paddingLeft:b=this.margin,this.left=y-b,this.top=g-b,new d(this.left,this.top))},p.prototype.updateBounds=function(g){for(var y=i.MAX_VALUE,v=-i.MAX_VALUE,x=i.MAX_VALUE,b=-i.MAX_VALUE,T,w,C,k,S,A=this.nodes,M=A.length,N=0;NT&&(y=T),vC&&(x=C),bT&&(y=T),vC&&(x=C),b=this.nodes.length){var M=0;v.forEach(function(N){N.owner==g&&M++}),M==this.nodes.length&&(this.isConnected=!0)}},e.exports=p}),(function(e,t,r){"use strict";var n,i=r(1);function a(o){n=r(5),this.layout=o,this.graphs=[],this.edges=[]}s(a,"LGraphManager"),a.prototype.addRoot=function(){var o=this.layout.newGraph(),l=this.layout.newNode(null),u=this.add(o,l);return this.setRootGraph(u),this.rootGraph},a.prototype.add=function(o,l,u,h,d){if(u==null&&h==null&&d==null){if(o==null)throw"Graph is null!";if(l==null)throw"Parent node is null!";if(this.graphs.indexOf(o)>-1)throw"Graph already in this graph mgr!";if(this.graphs.push(o),o.parent!=null)throw"Already has a parent!";if(l.child!=null)throw"Already has a child!";return o.parent=l,l.child=o,o}else{d=u,h=l,u=o;var f=h.getOwner(),p=d.getOwner();if(!(f!=null&&f.getGraphManager()==this))throw"Source not in this graph mgr!";if(!(p!=null&&p.getGraphManager()==this))throw"Target not in this graph mgr!";if(f==p)return u.isInterGraph=!1,f.add(u,h,d);if(u.isInterGraph=!0,u.source=h,u.target=d,this.edges.indexOf(u)>-1)throw"Edge already in inter-graph edge list!";if(this.edges.push(u),!(u.source!=null&&u.target!=null))throw"Edge source and/or target is null!";if(!(u.source.edges.indexOf(u)==-1&&u.target.edges.indexOf(u)==-1))throw"Edge already in source and/or target incidency list!";return u.source.edges.push(u),u.target.edges.push(u),u}},a.prototype.remove=function(o){if(o instanceof n){var l=o;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 u=[];u=u.concat(l.getEdges());for(var h,d=u.length,f=0;f=o.getRight()?l[0]+=Math.min(o.getX()-a.getX(),a.getRight()-o.getRight()):o.getX()<=a.getX()&&o.getRight()>=a.getRight()&&(l[0]+=Math.min(a.getX()-o.getX(),o.getRight()-a.getRight())),a.getY()<=o.getY()&&a.getBottom()>=o.getBottom()?l[1]+=Math.min(o.getY()-a.getY(),a.getBottom()-o.getBottom()):o.getY()<=a.getY()&&o.getBottom()>=a.getBottom()&&(l[1]+=Math.min(a.getY()-o.getY(),o.getBottom()-a.getBottom()));var d=Math.abs((o.getCenterY()-a.getCenterY())/(o.getCenterX()-a.getCenterX()));o.getCenterY()===a.getCenterY()&&o.getCenterX()===a.getCenterX()&&(d=1);var f=d*l[0],p=l[1]/d;l[0]f)return l[0]=u,l[1]=m,l[2]=d,l[3]=A,!1;if(hd)return l[0]=p,l[1]=h,l[2]=k,l[3]=f,!1;if(ud?(l[0]=y,l[1]=v,R=!0):(l[0]=g,l[1]=m,R=!0):I===P&&(u>d?(l[0]=p,l[1]=m,R=!0):(l[0]=x,l[1]=v,R=!0)),-L===P?d>u?(l[2]=S,l[3]=A,E=!0):(l[2]=k,l[3]=C,E=!0):L===P&&(d>u?(l[2]=w,l[3]=C,E=!0):(l[2]=M,l[3]=A,E=!0)),R&&E)return!1;if(u>d?h>f?(B=this.getCardinalDirection(I,P,4),O=this.getCardinalDirection(L,P,2)):(B=this.getCardinalDirection(-I,P,3),O=this.getCardinalDirection(-L,P,1)):h>f?(B=this.getCardinalDirection(-I,P,1),O=this.getCardinalDirection(-L,P,3)):(B=this.getCardinalDirection(I,P,2),O=this.getCardinalDirection(L,P,4)),!R)switch(B){case 1:G=m,$=u+-T/P,l[0]=$,l[1]=G;break;case 2:$=x,G=h+b*P,l[0]=$,l[1]=G;break;case 3:G=v,$=u+T/P,l[0]=$,l[1]=G;break;case 4:$=y,G=h+-b*P,l[0]=$,l[1]=G;break}if(!E)switch(O){case 1:z=C,V=d+-D/P,l[2]=V,l[3]=z;break;case 2:V=M,z=f+N*P,l[2]=V,l[3]=z;break;case 3:z=A,V=d+D/P,l[2]=V,l[3]=z;break;case 4:V=S,z=f+-N*P,l[2]=V,l[3]=z;break}}return!1},i.getCardinalDirection=function(a,o,l){return a>o?l:1+l%4},i.getIntersection=function(a,o,l,u){if(u==null)return this.getIntersection2(a,o,l);var h=a.x,d=a.y,f=o.x,p=o.y,m=l.x,g=l.y,y=u.x,v=u.y,x=void 0,b=void 0,T=void 0,w=void 0,C=void 0,k=void 0,S=void 0,A=void 0,M=void 0;return T=p-d,C=h-f,S=f*d-h*p,w=v-g,k=m-y,A=y*g-m*v,M=T*k-w*C,M===0?null:(x=(C*A-k*S)/M,b=(w*S-T*A)/M,new n(x,b))},i.angleOfVector=function(a,o,l,u){var h=void 0;return a!==l?(h=Math.atan((u-o)/(l-a)),l0?1:i<0?-1:0},n.floor=function(i){return i<0?Math.ceil(i):Math.floor(i)},n.ceil=function(i){return i<0?Math.floor(i):Math.ceil(i)},e.exports=n}),(function(e,t,r){"use strict";function n(){}s(n,"Integer"),n.MAX_VALUE=2147483647,n.MIN_VALUE=-2147483648,e.exports=n}),(function(e,t,r){"use strict";var n=(function(){function h(d,f){for(var p=0;p"u"?"undefined":n(a);return a==null||o!="object"&&o!="function"},e.exports=i}),(function(e,t,r){"use strict";function n(m){if(Array.isArray(m)){for(var g=0,y=Array(m.length);g0&&g;){for(T.push(C[0]);T.length>0&&g;){var k=T[0];T.splice(0,1),b.add(k);for(var S=k.getEdges(),x=0;x-1&&C.splice(D,1)}b=new Set,w=new Map}}return m},p.prototype.createDummyNodesForBendpoints=function(m){for(var g=[],y=m.source,v=this.graphManager.calcLowestCommonAncestor(m.source,m.target),x=0;x0){for(var v=this.edgeToDummyNodes.get(y),x=0;x=0&&g.splice(A,1);var M=w.getNeighborsList();M.forEach(function(R){if(y.indexOf(R)<0){var E=v.get(R),I=E-1;I==1&&k.push(R),v.set(R,I)}})}y=y.concat(k),(g.length==1||g.length==2)&&(x=!0,b=g[0])}return b},p.prototype.setGraphManager=function(m){this.graphManager=m},e.exports=p}),(function(e,t,r){"use strict";function n(){}s(n,"RandomSeed"),n.seed=1,n.x=0,n.nextDouble=function(){return n.x=Math.sin(n.seed++)*1e4,n.x-Math.floor(n.x)},e.exports=n}),(function(e,t,r){"use strict";var n=r(4);function i(a,o){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}s(i,"Transform"),i.prototype.getWorldOrgX=function(){return this.lworldOrgX},i.prototype.setWorldOrgX=function(a){this.lworldOrgX=a},i.prototype.getWorldOrgY=function(){return this.lworldOrgY},i.prototype.setWorldOrgY=function(a){this.lworldOrgY=a},i.prototype.getWorldExtX=function(){return this.lworldExtX},i.prototype.setWorldExtX=function(a){this.lworldExtX=a},i.prototype.getWorldExtY=function(){return this.lworldExtY},i.prototype.setWorldExtY=function(a){this.lworldExtY=a},i.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},i.prototype.setDeviceOrgX=function(a){this.ldeviceOrgX=a},i.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},i.prototype.setDeviceOrgY=function(a){this.ldeviceOrgY=a},i.prototype.getDeviceExtX=function(){return this.ldeviceExtX},i.prototype.setDeviceExtX=function(a){this.ldeviceExtX=a},i.prototype.getDeviceExtY=function(){return this.ldeviceExtY},i.prototype.setDeviceExtY=function(a){this.ldeviceExtY=a},i.prototype.transformX=function(a){var o=0,l=this.lworldExtX;return l!=0&&(o=this.ldeviceOrgX+(a-this.lworldOrgX)*this.ldeviceExtX/l),o},i.prototype.transformY=function(a){var o=0,l=this.lworldExtY;return l!=0&&(o=this.ldeviceOrgY+(a-this.lworldOrgY)*this.ldeviceExtY/l),o},i.prototype.inverseTransformX=function(a){var o=0,l=this.ldeviceExtX;return l!=0&&(o=this.lworldOrgX+(a-this.ldeviceOrgX)*this.lworldExtX/l),o},i.prototype.inverseTransformY=function(a){var o=0,l=this.ldeviceExtY;return l!=0&&(o=this.lworldOrgY+(a-this.ldeviceOrgY)*this.lworldExtY/l),o},i.prototype.inverseTransformPoint=function(a){var o=new n(this.inverseTransformX(a.x),this.inverseTransformY(a.y));return o},e.exports=i}),(function(e,t,r){"use strict";function n(f){if(Array.isArray(f)){for(var p=0,m=Array(f.length);pa.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*a.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(f-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):(f>a.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(a.COOLING_ADAPTATION_FACTOR,1-(f-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.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},h.prototype.calcSpringForces=function(){for(var f=this.getAllEdges(),p,m=0;m0&&arguments[0]!==void 0?arguments[0]:!0,p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,m,g,y,v,x=this.getAllNodes(),b;if(this.useFRGridVariant)for(this.totalIterations%a.GRID_CALCULATION_CHECK_PERIOD==1&&f&&this.updateGrid(),b=new Set,m=0;mT||b>T)&&(f.gravitationForceX=-this.gravityConstant*y,f.gravitationForceY=-this.gravityConstant*v)):(T=p.getEstimatedSize()*this.compoundGravityRangeFactor,(x>T||b>T)&&(f.gravitationForceX=-this.gravityConstant*y*this.compoundGravityConstant,f.gravitationForceY=-this.gravityConstant*v*this.compoundGravityConstant))},h.prototype.isConverged=function(){var f,p=!1;return this.totalIterations>this.maxIterations/3&&(p=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),f=this.totalDisplacement=x.length||T>=x[0].length)){for(var w=0;wh},"_defaultCompareFunction")}]),l})();e.exports=o}),(function(e,t,r){"use strict";var n=(function(){function o(l,u){for(var h=0;h2&&arguments[2]!==void 0?arguments[2]:1,d=arguments.length>3&&arguments[3]!==void 0?arguments[3]:-1,f=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1;i(this,o),this.sequence1=l,this.sequence2=u,this.match_score=h,this.mismatch_penalty=d,this.gap_penalty=f,this.iMax=l.length+1,this.jMax=u.length+1,this.grid=new Array(this.iMax);for(var p=0;p=0;l--){var u=this.listeners[l];u.event===a&&u.callback===o&&this.listeners.splice(l,1)}},i.emit=function(a,o){for(var l=0;l{"use strict";s((function(t,r){typeof vT=="object"&&typeof A$=="object"?A$.exports=r(E$()):typeof define=="function"&&define.amd?define(["layout-base"],r):typeof vT=="object"?vT.coseBase=r(E$()):t.coseBase=r(t.layoutBase)}),"webpackUniversalModuleDefinition")(vT,function(e){return(function(t){var r={};function n(i){if(r[i])return r[i].exports;var a=r[i]={i,l:!1,exports:{}};return t[i].call(a.exports,a,a.exports,n),a.l=!0,a.exports}return s(n,"__webpack_require__"),n.m=t,n.c=r,n.i=function(i){return i},n.d=function(i,a,o){n.o(i,a)||Object.defineProperty(i,a,{configurable:!1,enumerable:!0,get:o})},n.n=function(i){var a=i&&i.__esModule?s(function(){return i.default},"getDefault"):s(function(){return i},"getModuleExports");return n.d(a,"a",a),a},n.o=function(i,a){return Object.prototype.hasOwnProperty.call(i,a)},n.p="",n(n.s=7)})([(function(t,r){t.exports=e}),(function(t,r,n){"use strict";var i=n(0).FDLayoutConstants;function a(){}s(a,"CoSEConstants");for(var o in i)a[o]=i[o];a.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,a.DEFAULT_RADIAL_SEPARATION=i.DEFAULT_EDGE_LENGTH,a.DEFAULT_COMPONENT_SEPERATION=60,a.TILE=!0,a.TILING_PADDING_VERTICAL=10,a.TILING_PADDING_HORIZONTAL=10,a.TREE_REDUCTION_ON_INCREMENTAL=!1,t.exports=a}),(function(t,r,n){"use strict";var i=n(0).FDLayoutEdge;function a(l,u,h){i.call(this,l,u,h)}s(a,"CoSEEdge"),a.prototype=Object.create(i.prototype);for(var o in i)a[o]=i[o];t.exports=a}),(function(t,r,n){"use strict";var i=n(0).LGraph;function a(l,u,h){i.call(this,l,u,h)}s(a,"CoSEGraph"),a.prototype=Object.create(i.prototype);for(var o in i)a[o]=i[o];t.exports=a}),(function(t,r,n){"use strict";var i=n(0).LGraphManager;function a(l){i.call(this,l)}s(a,"CoSEGraphManager"),a.prototype=Object.create(i.prototype);for(var o in i)a[o]=i[o];t.exports=a}),(function(t,r,n){"use strict";var i=n(0).FDLayoutNode,a=n(0).IMath;function o(u,h,d,f){i.call(this,u,h,d,f)}s(o,"CoSENode"),o.prototype=Object.create(i.prototype);for(var l in i)o[l]=i[l];o.prototype.move=function(){var u=this.graphManager.getLayout();this.displacementX=u.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY=u.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren,Math.abs(this.displacementX)>u.coolingFactor*u.maxNodeDisplacement&&(this.displacementX=u.coolingFactor*u.maxNodeDisplacement*a.sign(this.displacementX)),Math.abs(this.displacementY)>u.coolingFactor*u.maxNodeDisplacement&&(this.displacementY=u.coolingFactor*u.maxNodeDisplacement*a.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),u.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},o.prototype.propogateDisplacementToChildren=function(u,h){for(var d=this.getChild().getNodes(),f,p=0;p0)this.positionNodesRadially(C);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var k=new Set(this.getAllNodes()),S=this.nodesWithGravity.filter(function(A){return k.has(A)});this.graphManager.setAllNodesToApplyGravitation(S),this.positionNodesRandomly()}}return this.initSpringEmbedder(),this.runSpringEmbedder(),!0},T.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 C=new Set(this.getAllNodes()),k=this.nodesWithGravity.filter(function(M){return C.has(M)});this.graphManager.setAllNodesToApplyGravitation(k),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 S=!this.isTreeGrowing&&!this.isGrowthFinished,A=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(S,A),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},T.prototype.getPositionsData=function(){for(var C=this.graphManager.getAllNodes(),k={},S=0;S1){var R;for(R=0;RA&&(A=Math.floor(D.y)),N=Math.floor(D.x+h.DEFAULT_COMPONENT_SEPERATION)}this.transform(new m(f.WORLD_CENTER_X-D.x/2,f.WORLD_CENTER_Y-D.y/2))},T.radialLayout=function(C,k,S){var A=Math.max(this.maxDiagonalInTree(C),h.DEFAULT_RADIAL_SEPARATION);T.branchRadialLayout(k,null,0,359,0,A);var M=x.calculateBounds(C),N=new b;N.setDeviceOrgX(M.getMinX()),N.setDeviceOrgY(M.getMinY()),N.setWorldOrgX(S.x),N.setWorldOrgY(S.y);for(var D=0;D1;){var W=z[0];z.splice(0,1);var H=B.indexOf(W);H>=0&&B.splice(H,1),G--,O--}k!=null?V=(B.indexOf(z[0])+1)%G:V=0;for(var j=Math.abs(A-S)/O,Q=V;$!=O;Q=++Q%G){var U=B[Q].getOtherEnd(C);if(U!=k){var ue=(S+$*j)%360,J=(ue+j)%360;T.branchRadialLayout(U,C,ue,J,M+N,N),$++}}},T.maxDiagonalInTree=function(C){for(var k=y.MIN_VALUE,S=0;Sk&&(k=M)}return k},T.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},T.prototype.groupZeroDegreeMembers=function(){var C=this,k={};this.memberGroups={},this.idToDummyNode={};for(var S=[],A=this.graphManager.getAllNodes(),M=0;M"u"&&(k[R]=[]),k[R]=k[R].concat(N)}Object.keys(k).forEach(function(E){if(k[E].length>1){var I="DummyCompound_"+E;C.memberGroups[I]=k[E];var L=k[E][0].getParent(),P=new l(C.graphManager);P.id=I,P.paddingLeft=L.paddingLeft||0,P.paddingRight=L.paddingRight||0,P.paddingBottom=L.paddingBottom||0,P.paddingTop=L.paddingTop||0,C.idToDummyNode[I]=P;var B=C.getGraphManager().add(C.newGraph(),P),O=L.getChild();O.add(P);for(var $=0;$=0;C--){var k=this.compoundOrder[C],S=k.id,A=k.paddingLeft,M=k.paddingTop;this.adjustLocations(this.tiledMemberPack[S],k.rect.x,k.rect.y,A,M)}},T.prototype.repopulateZeroDegreeMembers=function(){var C=this,k=this.tiledZeroDegreePack;Object.keys(k).forEach(function(S){var A=C.idToDummyNode[S],M=A.paddingLeft,N=A.paddingTop;C.adjustLocations(k[S],A.rect.x,A.rect.y,M,N)})},T.prototype.getToBeTiled=function(C){var k=C.id;if(this.toBeTiled[k]!=null)return this.toBeTiled[k];var S=C.getChild();if(S==null)return this.toBeTiled[k]=!1,!1;for(var A=S.getNodes(),M=0;M0)return this.toBeTiled[k]=!1,!1;if(N.getChild()==null){this.toBeTiled[N.id]=!1;continue}if(!this.getToBeTiled(N))return this.toBeTiled[k]=!1,!1}return this.toBeTiled[k]=!0,!0},T.prototype.getNodeDegree=function(C){for(var k=C.id,S=C.getEdges(),A=0,M=0;ME&&(E=L.rect.height)}S+=E+C.verticalPadding}},T.prototype.tileCompoundMembers=function(C,k){var S=this;this.tiledMemberPack=[],Object.keys(C).forEach(function(A){var M=k[A];S.tiledMemberPack[A]=S.tileNodes(C[A],M.paddingLeft+M.paddingRight),M.rect.width=S.tiledMemberPack[A].width,M.rect.height=S.tiledMemberPack[A].height})},T.prototype.tileNodes=function(C,k){var S=h.TILING_PADDING_VERTICAL,A=h.TILING_PADDING_HORIZONTAL,M={rows:[],rowWidth:[],rowHeight:[],width:0,height:k,verticalPadding:S,horizontalPadding:A};C.sort(function(R,E){return R.rect.width*R.rect.height>E.rect.width*E.rect.height?-1:R.rect.width*R.rect.height0&&(D+=C.horizontalPadding),C.rowWidth[S]=D,C.width0&&(R+=C.verticalPadding);var E=0;R>C.rowHeight[S]&&(E=C.rowHeight[S],C.rowHeight[S]=R,E=C.rowHeight[S]-E),C.height+=E,C.rows[S].push(k)},T.prototype.getShortestRowIndex=function(C){for(var k=-1,S=Number.MAX_VALUE,A=0;AS&&(k=A,S=C.rowWidth[A]);return k},T.prototype.canAddHorizontal=function(C,k,S){var A=this.getShortestRowIndex(C);if(A<0)return!0;var M=C.rowWidth[A];if(M+C.horizontalPadding+k<=C.width)return!0;var N=0;C.rowHeight[A]0&&(N=S+C.verticalPadding-C.rowHeight[A]);var D;C.width-M>=k+C.horizontalPadding?D=(C.height+N)/(M+k+C.horizontalPadding):D=(C.height+N)/C.width,N=S+C.verticalPadding;var R;return C.widthN&&k!=S){A.splice(-1,1),C.rows[S].push(M),C.rowWidth[k]=C.rowWidth[k]-N,C.rowWidth[S]=C.rowWidth[S]+N,C.width=C.rowWidth[instance.getLongestRowIndex(C)];for(var D=Number.MIN_VALUE,R=0;RD&&(D=A[R].height);k>0&&(D+=C.verticalPadding);var E=C.rowHeight[k]+C.rowHeight[S];C.rowHeight[k]=D,C.rowHeight[S]0)for(var O=M;O<=N;O++)B[0]+=this.grid[O][D-1].length+this.grid[O][D].length-1;if(N0)for(var O=D;O<=R;O++)B[3]+=this.grid[M-1][O].length+this.grid[M][O].length-1;for(var $=y.MAX_VALUE,G,V,z=0;z{"use strict";s((function(t,r){typeof xT=="object"&&typeof _$=="object"?_$.exports=r(R$()):typeof define=="function"&&define.amd?define(["cose-base"],r):typeof xT=="object"?xT.cytoscapeCoseBilkent=r(R$()):t.cytoscapeCoseBilkent=r(t.coseBase)}),"webpackUniversalModuleDefinition")(xT,function(e){return(function(t){var r={};function n(i){if(r[i])return r[i].exports;var a=r[i]={i,l:!1,exports:{}};return t[i].call(a.exports,a,a.exports,n),a.l=!0,a.exports}return s(n,"__webpack_require__"),n.m=t,n.c=r,n.i=function(i){return i},n.d=function(i,a,o){n.o(i,a)||Object.defineProperty(i,a,{configurable:!1,enumerable:!0,get:o})},n.n=function(i){var a=i&&i.__esModule?s(function(){return i.default},"getDefault"):s(function(){return i},"getModuleExports");return n.d(a,"a",a),a},n.o=function(i,a){return Object.prototype.hasOwnProperty.call(i,a)},n.p="",n(n.s=1)})([(function(t,r){t.exports=e}),(function(t,r,n){"use strict";var i=n(0).layoutBase.LayoutConstants,a=n(0).layoutBase.FDLayoutConstants,o=n(0).CoSEConstants,l=n(0).CoSELayout,u=n(0).CoSENode,h=n(0).layoutBase.PointD,d=n(0).layoutBase.DimensionD,f={ready:s(function(){},"ready"),stop:s(function(){},"stop"),quality:"default",nodeDimensionsIncludeLabels:!1,refresh:30,fit:!0,padding:10,randomize:!0,nodeRepulsion:4500,idealEdgeLength:50,edgeElasticity:.45,nestingFactor:.1,gravity:.25,numIter:2500,tile:!0,animate:"end",animationDuration:500,tilingPaddingVertical:10,tilingPaddingHorizontal:10,gravityRangeCompound:1.5,gravityCompound:1,gravityRange:3.8,initialEnergyOnIncremental:.5};function p(v,x){var b={};for(var T in v)b[T]=v[T];for(var T in x)b[T]=x[T];return b}s(p,"extend");function m(v){this.options=p(f,v),g(this.options)}s(m,"_CoSELayout");var g=s(function(x){x.nodeRepulsion!=null&&(o.DEFAULT_REPULSION_STRENGTH=a.DEFAULT_REPULSION_STRENGTH=x.nodeRepulsion),x.idealEdgeLength!=null&&(o.DEFAULT_EDGE_LENGTH=a.DEFAULT_EDGE_LENGTH=x.idealEdgeLength),x.edgeElasticity!=null&&(o.DEFAULT_SPRING_STRENGTH=a.DEFAULT_SPRING_STRENGTH=x.edgeElasticity),x.nestingFactor!=null&&(o.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=a.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=x.nestingFactor),x.gravity!=null&&(o.DEFAULT_GRAVITY_STRENGTH=a.DEFAULT_GRAVITY_STRENGTH=x.gravity),x.numIter!=null&&(o.MAX_ITERATIONS=a.MAX_ITERATIONS=x.numIter),x.gravityRange!=null&&(o.DEFAULT_GRAVITY_RANGE_FACTOR=a.DEFAULT_GRAVITY_RANGE_FACTOR=x.gravityRange),x.gravityCompound!=null&&(o.DEFAULT_COMPOUND_GRAVITY_STRENGTH=a.DEFAULT_COMPOUND_GRAVITY_STRENGTH=x.gravityCompound),x.gravityRangeCompound!=null&&(o.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=a.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=x.gravityRangeCompound),x.initialEnergyOnIncremental!=null&&(o.DEFAULT_COOLING_FACTOR_INCREMENTAL=a.DEFAULT_COOLING_FACTOR_INCREMENTAL=x.initialEnergyOnIncremental),x.quality=="draft"?i.QUALITY=0:x.quality=="proof"?i.QUALITY=2:i.QUALITY=1,o.NODE_DIMENSIONS_INCLUDE_LABELS=a.NODE_DIMENSIONS_INCLUDE_LABELS=i.NODE_DIMENSIONS_INCLUDE_LABELS=x.nodeDimensionsIncludeLabels,o.DEFAULT_INCREMENTAL=a.DEFAULT_INCREMENTAL=i.DEFAULT_INCREMENTAL=!x.randomize,o.ANIMATE=a.ANIMATE=i.ANIMATE=x.animate,o.TILE=x.tile,o.TILING_PADDING_VERTICAL=typeof x.tilingPaddingVertical=="function"?x.tilingPaddingVertical.call():x.tilingPaddingVertical,o.TILING_PADDING_HORIZONTAL=typeof x.tilingPaddingHorizontal=="function"?x.tilingPaddingHorizontal.call():x.tilingPaddingHorizontal},"getUserOptions");m.prototype.run=function(){var v,x,b=this.options,T=this.idToLNode={},w=this.layout=new l,C=this;C.stopped=!1,this.cy=this.options.cy,this.cy.trigger({type:"layoutstart",layout:this});var k=w.newGraphManager();this.gm=k;var S=this.options.eles.nodes(),A=this.options.eles.edges();this.root=k.addRoot(),this.processChildrenList(this.root,this.getTopMostNodes(S),w);for(var M=0;M0){var R;R=b.getGraphManager().add(b.newGraph(),S),this.processChildrenList(R,k,b)}}},m.prototype.stop=function(){return this.stopped=!0,this};var y=s(function(x){x("layout","cose-bilkent",m)},"register");typeof cytoscape<"u"&&y(cytoscape),t.exports=y})])})});function Hut(e,t){e.forEach(r=>{let n={id:r.id,labelText:r.label,height:r.height,width:r.width,padding:r.padding??0};Object.keys(r).forEach(i=>{["id","label","height","width","padding","x","y"].includes(i)||(n[i]=r[i])}),t.add({group:"nodes",data:n,position:{x:r.x??0,y:r.y??0}})})}function Uut(e,t){e.forEach(r=>{let n={id:r.id,source:r.start,target:r.end};Object.keys(r).forEach(i=>{["id","start","end"].includes(i)||(n[i]=r[i])}),t.add({group:"edges",data:n})})}function Ebe(e){return new Promise(t=>{let r=lt("body").append("div").attr("id","cy").attr("style","display:none"),n=nl({container:document.getElementById("cy"),style:[{selector:"edge",style:{"curve-style":"bezier"}}]});r.remove(),Hut(e.nodes,n),Uut(e.edges,n),n.nodes().forEach(function(a){a.layoutDimensions=()=>{let o=a.data();return{w:o.width,h:o.height}}});let i={name:"cose-bilkent",quality:"proof",styleEnabled:!1,animate:!1};n.layout(i).run(),n.ready(a=>{te.info("Cytoscape ready",a),t(n)})})}function Abe(e){return e.nodes().map(t=>{let r=t.data(),n=t.position(),i={id:r.id,x:n.x,y:n.y};return Object.keys(r).forEach(a=>{a!=="id"&&(i[a]=r[a])}),i})}function Rbe(e){return e.edges().map(t=>{let r=t.data(),n=t._private.rscratch,i={id:r.id,source:r.source,target:r.target,startX:n.startX,startY:n.startY,midX:n.midX,midY:n.midY,endX:n.endX,endY:n.endY};return Object.keys(r).forEach(a=>{["id","source","target"].includes(a)||(i[a]=r[a])}),i})}var Sbe,_be=F(()=>{"use strict";w$();Sbe=Ms(wbe(),1);$r();Tt();nl.use(Sbe.default);s(Hut,"addNodes");s(Uut,"addEdges");s(Ebe,"createCytoscapeInstance");s(Abe,"extractPositionedNodes");s(Rbe,"extractPositionedEdges")});async function Lbe(e,t){te.debug("Starting cose-bilkent layout algorithm");try{Yut(e);let r=await Ebe(e),n=Abe(r),i=Rbe(r);return te.debug(`Layout completed: ${n.length} nodes, ${i.length} edges`),{nodes:n,edges:i}}catch(r){throw te.error("Error in cose-bilkent layout algorithm:",r),r}}function Yut(e){if(!e)throw new Error("Layout data is required");if(!e.config)throw new Error("Configuration is required in layout data");if(!e.rootNode)throw new Error("Root node is required");if(!e.nodes||!Array.isArray(e.nodes))throw new Error("No nodes found in layout data");if(!Array.isArray(e.edges))throw new Error("Edges array is required in layout data");return!0}var Dbe=F(()=>{"use strict";Tt();_be();s(Lbe,"executeCoseBilkentLayout");s(Yut,"validateLayoutData")});var Ibe,Mbe=F(()=>{"use strict";Dbe();Ibe=s(async(e,t,{insertCluster:r,insertEdge:n,insertEdgeLabel:i,insertMarkers:a,insertNode:o,log:l,positionEdgeLabel:u},{algorithm:h})=>{let d={},f={},p=t.select("g");a(p,e.markers,e.type,e.diagramId);let m=p.insert("g").attr("class","subgraphs"),g=p.insert("g").attr("class","edgePaths"),y=p.insert("g").attr("class","edgeLabels"),v=p.insert("g").attr("class","nodes");l.debug("Inserting nodes into DOM for dimension calculation"),await Promise.all(e.nodes.map(async T=>{if(T.isGroup){let w={...T};f[T.id]=w,d[T.id]=w,await r(m,T)}else{let w={...T};d[T.id]=w;let C=await o(v,T,{config:e.config,dir:e.direction||"TB"}),k=C.node().getBBox();w.width=k.width,w.height=k.height,w.domId=C,l.debug(`Node ${T.id} dimensions: ${k.width}x${k.height}`)}})),l.debug("Running cose-bilkent layout algorithm");let x={...e,nodes:e.nodes.map(T=>{let w=d[T.id];return{...T,width:w.width,height:w.height}})},b=await Lbe(x,e.config);l.debug("Positioning nodes based on layout results"),b.nodes.forEach(T=>{let w=d[T.id];w?.domId&&(w.domId.attr("transform",`translate(${T.x}, ${T.y})`),w.x=T.x,w.y=T.y,l.debug(`Positioned node ${w.id} at center (${T.x}, ${T.y})`))}),b.edges.forEach(T=>{let w=e.edges.find(C=>C.id===T.id);w&&(w.points=[{x:T.startX,y:T.startY},{x:T.midX,y:T.midY},{x:T.endX,y:T.endY}])}),l.debug("Inserting and positioning edges"),await Promise.all(e.edges.map(async T=>{let w=await i(y,T),C=d[T.start??""],k=d[T.end??""];if(C&&k){let S=b.edges.find(A=>A.id===T.id);if(S){l.debug("APA01 positionedEdge",S);let A={...T},M=n(g,A,f,e.type,C,k,e.diagramId);u(A,M)}else{let A={...T,points:[{x:C.x||0,y:C.y||0},{x:k.x||0,y:k.y||0}]},M=n(g,A,f,e.type,C,k,e.diagramId);u(A,M)}}})),l.debug("Cose-bilkent rendering completed")},"render")});var Nbe={};ar(Nbe,{render:()=>jut});var jut,Pbe=F(()=>{"use strict";Mbe();jut=Ibe});var bT,L$,Xut,il,Yc,vf=F(()=>{"use strict";Tle();Tt();bT={},L$=s(e=>{for(let t of e)bT[t.name]=t},"registerLayoutLoaders"),Xut=s(()=>{L$([{name:"dagre",loader:s(async()=>await Promise.resolve().then(()=>(tge(),ege)),"loader")},{name:"swimlane",loader:s(async()=>await Promise.resolve().then(()=>(nye(),rye)),"loader")},{name:"cose-bilkent",loader:s(async()=>await Promise.resolve().then(()=>(Pbe(),Nbe)),"loader")}])},"registerDefaultLayoutLoaders");Xut();il=s(async(e,t)=>{if(!(e.layoutAlgorithm in bT))throw new Error(`Unknown layout algorithm: ${e.layoutAlgorithm}`);if(e.diagramId)for(let d of e.nodes){let f=d.domId||d.id;d.domId=`${e.diagramId}-${f}`}let r=bT[e.layoutAlgorithm],n=await r.loader(),{theme:i,themeVariables:a}=e.config,{useGradient:o,gradientStart:l,gradientStop:u}=a,h=t.attr("id");if(t.append("defs").append("filter").attr("id",`${h}-drop-shadow`).attr("height","130%").attr("width","130%").append("feDropShadow").attr("dx","4").attr("dy","4").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",`${i?.includes("dark")?"#FFFFFF":"#000000"}`),t.append("defs").append("filter").attr("id",`${h}-drop-shadow-small`).attr("height","150%").attr("width","150%").append("feDropShadow").attr("dx","2").attr("dy","2").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",`${i?.includes("dark")?"#FFFFFF":"#000000"}`),o){let d=t.append("linearGradient").attr("id",t.attr("id")+"-gradient").attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");d.append("svg:stop").attr("offset","0%").attr("stop-color",l).attr("stop-opacity",1),d.append("svg:stop").attr("offset","100%").attr("stop-color",u).attr("stop-opacity",1)}return n.render(e,t,ble,{algorithm:r.algorithm})},"render"),Yc=s((e="",{fallback:t="dagre"}={})=>{if(e in bT)return e;if(t in bT)return te.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")});var Js,Kut,Zut,xf=F(()=>{"use strict";Dn();Tt();Js=s((e,t,r,n)=>{e.attr("class",r);let{width:i,height:a,x:o,y:l}=Kut(e,t);Br(e,a,i,n);let u=Zut(o,l,i,a,t);e.attr("viewBox",u),te.debug(`viewBox configured: ${u} with padding: ${t}`)},"setupViewPortForSVG"),Kut=s((e,t)=>{let r=e.node()?.getBBox()||{width:0,height:0,x:0,y:0};return{width:r.width+t*2,height:r.height+t*2,x:r.x,y:r.y}},"calculateDimensionsWithPadding"),Zut=s((e,t,r,n,i)=>`${e-i} ${t-i} ${r} ${n}`,"createViewBox")});var Qut,Jut,Obe,Bbe=F(()=>{"use strict";Zt();Tt();Hp();vf();xf();Qt();Qut=s(function(e,t){return t.db.getClasses()},"getClasses"),Jut=s(async function(e,t,r,n){te.info("REF0:"),te.info("Drawing state diagram (v2)",t);let{securityLevel:i,flowchart:a,layout:o}=Le();n.db.setDiagramId(t),te.debug("Before getData: ");let l=n.db.getData();te.debug("Data: ",l);let u=Uo(t,i),h=n.db.getDirection();l.type=n.type,l.layoutAlgorithm=Yc(o),l.layoutAlgorithm==="dagre"&&o==="elk"&&te.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."),l.direction=h,l.nodeSpacing=a?.nodeSpacing||50,l.rankSpacing=a?.rankSpacing||50,l.markers=["point","circle","cross"],l.diagramId=t,te.debug("REF1:",l),await il(l,u);let d=l.config.flowchart?.diagramPadding??8;sr.insertTitle(u,"flowchartTitleText",a?.titleTopMargin||0,n.db.getDiagramTitle()),Js(u,d,"flowchart",a?.useMaxWidth||!1)},"draw"),Obe={getClasses:Qut,draw:Jut}});var D$,I$,$be=F(()=>{"use strict";D$=(function(){var e=s(function(At,kt,Ot,zt){for(Ot=Ot||{},zt=At.length;zt--;Ot[At[zt]]=kt);return Ot},"o"),t=[1,4],r=[1,3],n=[1,5],i=[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,125],a=[2,2],o=[1,13],l=[1,14],u=[1,15],h=[1,16],d=[1,23],f=[1,25],p=[1,26],m=[1,27],g=[1,50],y=[1,49],v=[1,29],x=[1,30],b=[1,31],T=[1,32],w=[1,33],C=[1,45],k=[1,47],S=[1,43],A=[1,48],M=[1,44],N=[1,51],D=[1,46],R=[1,52],E=[1,53],I=[1,34],L=[1,35],P=[1,36],B=[1,37],O=[1,38],$=[1,58],G=[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,125],V=[1,62],z=[1,61],W=[1,63],H=[8,9,11,75,77,78],j=[1,79],Q=[1,92],U=[1,97],ue=[1,96],J=[1,93],he=[1,89],se=[1,95],oe=[1,91],Se=[1,98],xe=[1,94],Ne=[1,99],Ye=[1,90],We=[8,9,10,11,40,75,77,78],pe=[8,9,10,11,40,46,75,77,78],_e=[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],Ee=[8,9,11,44,60,75,77,78,89,102,105,106,109,111,114,115,116],Re=[44,60,89,102,105,106,109,111,114,115,116],Z=[1,122],ae=[1,123],ie=[1,125],le=[1,124],ve=[44,60,62,74,89,102,105,106,109,111,114,115,116],ne=[1,134],Me=[1,148],re=[1,149],ce=[1,150],q=[1,151],de=[1,136],X=[1,138],ye=[1,142],K=[1,143],Ge=[1,144],Ae=[1,145],$e=[1,146],Oe=[1,147],at=[1,152],Pe=[1,153],Ke=[1,132],qe=[1,133],Be=[1,140],Xe=[1,135],be=[1,139],vt=[1,137],ke=[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,125],It=[1,155],Ft=[1,157],yt=[8,9,11],Et=[8,9,10,11,14,44,60,89,105,106,109,111,114,115,116],gt=[1,177],ge=[1,173],nt=[1,174],pt=[1,178],Qe=[1,175],we=[1,176],tt=[77,116,119],st=[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],mt=[10,106],Bt=[31,49,51,53,55,57,62,64,66,67,69,71,116,117,118],Gt=[1,248],Xt=[1,246],rr=[1,250],Ct=[1,244],Ie=[1,245],it=[1,247],Ve=[1,249],Ze=[1,251],bt=[1,269],Ut=[8,9,11,106],ir=[8,9,10,11,60,84,105,106,109,110,111,112],Yt={trace:s(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,direction_td:125,$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",125:"direction_td"},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],[33,1]],performAction:s(function(kt,Ot,zt,_t,pr,Ce,Un){var De=Ce.length-1;switch(pr){case 2:this.$=[];break;case 3:(!Array.isArray(Ce[De])||Ce[De].length>0)&&Ce[De-1].push(Ce[De]),this.$=Ce[De-1];break;case 4:case 183:this.$=Ce[De];break;case 11:_t.setDirection("TB"),this.$="TB";break;case 12:_t.setDirection(Ce[De-1]),this.$=Ce[De-1];break;case 27:this.$=Ce[De-1].nodes;break;case 28:case 29:case 30:case 31:case 32:this.$=[];break;case 33:this.$=_t.addSubGraph(Ce[De-6],Ce[De-1],Ce[De-4]);break;case 34:this.$=_t.addSubGraph(Ce[De-3],Ce[De-1],Ce[De-3]);break;case 35:this.$=_t.addSubGraph(void 0,Ce[De-1],void 0);break;case 37:this.$=Ce[De].trim(),_t.setAccTitle(this.$);break;case 38:case 39:this.$=Ce[De].trim(),_t.setAccDescription(this.$);break;case 43:this.$=Ce[De-1]+Ce[De];break;case 44:this.$=Ce[De];break;case 45:_t.addVertex(Ce[De-1][Ce[De-1].length-1],void 0,void 0,void 0,void 0,void 0,void 0,Ce[De]),_t.addLink(Ce[De-3].stmt,Ce[De-1],Ce[De-2]),this.$={stmt:Ce[De-1],nodes:Ce[De-1].concat(Ce[De-3].nodes)};break;case 46:_t.addLink(Ce[De-2].stmt,Ce[De],Ce[De-1]),this.$={stmt:Ce[De],nodes:Ce[De].concat(Ce[De-2].nodes)};break;case 47:_t.addLink(Ce[De-3].stmt,Ce[De-1],Ce[De-2]),this.$={stmt:Ce[De-1],nodes:Ce[De-1].concat(Ce[De-3].nodes)};break;case 48:this.$={stmt:Ce[De-1],nodes:Ce[De-1]};break;case 49:_t.addVertex(Ce[De-1][Ce[De-1].length-1],void 0,void 0,void 0,void 0,void 0,void 0,Ce[De]),this.$={stmt:Ce[De-1],nodes:Ce[De-1],shapeData:Ce[De]};break;case 50:this.$={stmt:Ce[De],nodes:Ce[De]};break;case 51:this.$=[Ce[De]];break;case 52:_t.addVertex(Ce[De-5][Ce[De-5].length-1],void 0,void 0,void 0,void 0,void 0,void 0,Ce[De-4]),this.$=Ce[De-5].concat(Ce[De]);break;case 53:this.$=Ce[De-4].concat(Ce[De]);break;case 54:this.$=Ce[De];break;case 55:this.$=Ce[De-2],_t.setClass(Ce[De-2],Ce[De]);break;case 56:this.$=Ce[De-3],_t.addVertex(Ce[De-3],Ce[De-1],"square");break;case 57:this.$=Ce[De-3],_t.addVertex(Ce[De-3],Ce[De-1],"doublecircle");break;case 58:this.$=Ce[De-5],_t.addVertex(Ce[De-5],Ce[De-2],"circle");break;case 59:this.$=Ce[De-3],_t.addVertex(Ce[De-3],Ce[De-1],"ellipse");break;case 60:this.$=Ce[De-3],_t.addVertex(Ce[De-3],Ce[De-1],"stadium");break;case 61:this.$=Ce[De-3],_t.addVertex(Ce[De-3],Ce[De-1],"subroutine");break;case 62:this.$=Ce[De-7],_t.addVertex(Ce[De-7],Ce[De-1],"rect",void 0,void 0,void 0,Object.fromEntries([[Ce[De-5],Ce[De-3]]]));break;case 63:this.$=Ce[De-3],_t.addVertex(Ce[De-3],Ce[De-1],"cylinder");break;case 64:this.$=Ce[De-3],_t.addVertex(Ce[De-3],Ce[De-1],"round");break;case 65:this.$=Ce[De-3],_t.addVertex(Ce[De-3],Ce[De-1],"diamond");break;case 66:this.$=Ce[De-5],_t.addVertex(Ce[De-5],Ce[De-2],"hexagon");break;case 67:this.$=Ce[De-3],_t.addVertex(Ce[De-3],Ce[De-1],"odd");break;case 68:this.$=Ce[De-3],_t.addVertex(Ce[De-3],Ce[De-1],"trapezoid");break;case 69:this.$=Ce[De-3],_t.addVertex(Ce[De-3],Ce[De-1],"inv_trapezoid");break;case 70:this.$=Ce[De-3],_t.addVertex(Ce[De-3],Ce[De-1],"lean_right");break;case 71:this.$=Ce[De-3],_t.addVertex(Ce[De-3],Ce[De-1],"lean_left");break;case 72:this.$=Ce[De],_t.addVertex(Ce[De]);break;case 73:Ce[De-1].text=Ce[De],this.$=Ce[De-1];break;case 74:case 75:Ce[De-2].text=Ce[De-1],this.$=Ce[De-2];break;case 76:this.$=Ce[De];break;case 77:var Dr=_t.destructLink(Ce[De],Ce[De-2]);this.$={type:Dr.type,stroke:Dr.stroke,length:Dr.length,text:Ce[De-1]};break;case 78:var Dr=_t.destructLink(Ce[De],Ce[De-2]);this.$={type:Dr.type,stroke:Dr.stroke,length:Dr.length,text:Ce[De-1],id:Ce[De-3]};break;case 79:this.$={text:Ce[De],type:"text"};break;case 80:this.$={text:Ce[De-1].text+""+Ce[De],type:Ce[De-1].type};break;case 81:this.$={text:Ce[De],type:"string"};break;case 82:this.$={text:Ce[De],type:"markdown"};break;case 83:var Dr=_t.destructLink(Ce[De]);this.$={type:Dr.type,stroke:Dr.stroke,length:Dr.length};break;case 84:var Dr=_t.destructLink(Ce[De]);this.$={type:Dr.type,stroke:Dr.stroke,length:Dr.length,id:Ce[De-1]};break;case 85:this.$=Ce[De-1];break;case 86:this.$={text:Ce[De],type:"text"};break;case 87:this.$={text:Ce[De-1].text+""+Ce[De],type:Ce[De-1].type};break;case 88:this.$={text:Ce[De],type:"string"};break;case 89:case 104:this.$={text:Ce[De],type:"markdown"};break;case 101:this.$={text:Ce[De],type:"text"};break;case 102:this.$={text:Ce[De-1].text+""+Ce[De],type:Ce[De-1].type};break;case 103:this.$={text:Ce[De],type:"text"};break;case 105:this.$=Ce[De-4],_t.addClass(Ce[De-2],Ce[De]);break;case 106:this.$=Ce[De-4],_t.setClass(Ce[De-2],Ce[De]);break;case 107:case 115:this.$=Ce[De-1],_t.setClickEvent(Ce[De-1],Ce[De]);break;case 108:case 116:this.$=Ce[De-3],_t.setClickEvent(Ce[De-3],Ce[De-2]),_t.setTooltip(Ce[De-3],Ce[De]);break;case 109:this.$=Ce[De-2],_t.setClickEvent(Ce[De-2],Ce[De-1],Ce[De]);break;case 110:this.$=Ce[De-4],_t.setClickEvent(Ce[De-4],Ce[De-3],Ce[De-2]),_t.setTooltip(Ce[De-4],Ce[De]);break;case 111:this.$=Ce[De-2],_t.setLink(Ce[De-2],Ce[De]);break;case 112:this.$=Ce[De-4],_t.setLink(Ce[De-4],Ce[De-2]),_t.setTooltip(Ce[De-4],Ce[De]);break;case 113:this.$=Ce[De-4],_t.setLink(Ce[De-4],Ce[De-2],Ce[De]);break;case 114:this.$=Ce[De-6],_t.setLink(Ce[De-6],Ce[De-4],Ce[De]),_t.setTooltip(Ce[De-6],Ce[De-2]);break;case 117:this.$=Ce[De-1],_t.setLink(Ce[De-1],Ce[De]);break;case 118:this.$=Ce[De-3],_t.setLink(Ce[De-3],Ce[De-2]),_t.setTooltip(Ce[De-3],Ce[De]);break;case 119:this.$=Ce[De-3],_t.setLink(Ce[De-3],Ce[De-2],Ce[De]);break;case 120:this.$=Ce[De-5],_t.setLink(Ce[De-5],Ce[De-4],Ce[De]),_t.setTooltip(Ce[De-5],Ce[De-2]);break;case 121:this.$=Ce[De-4],_t.addVertex(Ce[De-2],void 0,void 0,Ce[De]);break;case 122:this.$=Ce[De-4],_t.updateLink([Ce[De-2]],Ce[De]);break;case 123:this.$=Ce[De-4],_t.updateLink(Ce[De-2],Ce[De]);break;case 124:this.$=Ce[De-8],_t.updateLinkInterpolate([Ce[De-6]],Ce[De-2]),_t.updateLink([Ce[De-6]],Ce[De]);break;case 125:this.$=Ce[De-8],_t.updateLinkInterpolate(Ce[De-6],Ce[De-2]),_t.updateLink(Ce[De-6],Ce[De]);break;case 126:this.$=Ce[De-6],_t.updateLinkInterpolate([Ce[De-4]],Ce[De]);break;case 127:this.$=Ce[De-6],_t.updateLinkInterpolate(Ce[De-4],Ce[De]);break;case 128:case 130:this.$=[Ce[De]];break;case 129:case 131:Ce[De-2].push(Ce[De]),this.$=Ce[De-2];break;case 133:this.$=Ce[De-1]+Ce[De];break;case 181:this.$=Ce[De];break;case 182:this.$=Ce[De-1]+""+Ce[De];break;case 184:this.$=Ce[De-1]+""+Ce[De];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;case 189:this.$={stmt:"dir",value:"TD"};break}},"anonymous"),table:[{3:1,4:2,9:t,10:r,12:n},{1:[3]},e(i,a,{5:6}),{4:7,9:t,10:r,12:n},{4:8,9:t,10:r,12:n},{13:[1,9],14:[1,10]},{1:[2,1],6:11,7:12,8:o,9:l,10:u,11:h,20:17,22:18,23:19,24:20,25:21,26:22,27:d,33:24,34:f,36:p,38:m,42:28,43:39,44:g,45:40,47:41,60:y,84:v,85:x,86:b,87:T,88:w,89:C,102:k,105:S,106:A,109:M,111:N,113:42,114:D,115:R,116:E,121:I,122:L,123:P,124:B,125:O},e(i,[2,9]),e(i,[2,10]),e(i,[2,11]),{8:[1,55],9:[1,56],10:$,15:54,18:57},e(G,[2,3]),e(G,[2,4]),e(G,[2,5]),e(G,[2,6]),e(G,[2,7]),e(G,[2,8]),{8:V,9:z,11:W,21:59,41:60,72:64,75:[1,65],77:[1,67],78:[1,66]},{8:V,9:z,11:W,21:68},{8:V,9:z,11:W,21:69},{8:V,9:z,11:W,21:70},{8:V,9:z,11:W,21:71},{8:V,9:z,11:W,21:72},{8:V,9:z,10:[1,73],11:W,21:74},e(G,[2,36]),{35:[1,75]},{37:[1,76]},e(G,[2,39]),e(H,[2,50],{18:77,39:78,10:$,40:j}),{10:[1,80]},{10:[1,81]},{10:[1,82]},{10:[1,83]},{14:Q,44:U,60:ue,80:[1,87],89:J,95:[1,84],97:[1,85],101:86,105:he,106:se,109:oe,111:Se,114:xe,115:Ne,116:Ye,120:88},e(G,[2,185]),e(G,[2,186]),e(G,[2,187]),e(G,[2,188]),e(G,[2,189]),e(We,[2,51]),e(We,[2,54],{46:[1,100]}),e(pe,[2,72],{113:113,29:[1,101],44:g,48:[1,102],50:[1,103],52:[1,104],54:[1,105],56:[1,106],58:[1,107],60:y,63:[1,108],65:[1,109],67:[1,110],68:[1,111],70:[1,112],89:C,102:k,105:S,106:A,109:M,111:N,114:D,115:R,116:E}),e(_e,[2,181]),e(_e,[2,142]),e(_e,[2,143]),e(_e,[2,144]),e(_e,[2,145]),e(_e,[2,146]),e(_e,[2,147]),e(_e,[2,148]),e(_e,[2,149]),e(_e,[2,150]),e(_e,[2,151]),e(_e,[2,152]),e(i,[2,12]),e(i,[2,18]),e(i,[2,19]),{9:[1,114]},e(Ee,[2,26],{18:115,10:$}),e(G,[2,27]),{42:116,43:39,44:g,45:40,47:41,60:y,89:C,102:k,105:S,106:A,109:M,111:N,113:42,114:D,115:R,116:E},e(G,[2,40]),e(G,[2,41]),e(G,[2,42]),e(Re,[2,76],{73:117,62:[1,119],74:[1,118]}),{76:120,79:121,80:Z,81:ae,116:ie,119:le},{75:[1,126],77:[1,127]},e(ve,[2,83]),e(G,[2,28]),e(G,[2,29]),e(G,[2,30]),e(G,[2,31]),e(G,[2,32]),{10:ne,12:Me,14:re,27:ce,28:128,32:q,44:de,60:X,75:ye,80:[1,130],81:[1,131],83:141,84:K,85:Ge,86:Ae,87:$e,88:Oe,89:at,90:Pe,91:129,105:Ke,109:qe,111:Be,114:Xe,115:be,116:vt},e(ke,a,{5:154}),e(G,[2,37]),e(G,[2,38]),e(H,[2,48],{44:It}),e(H,[2,49],{18:156,10:$,40:Ft}),e(We,[2,44]),{44:g,47:158,60:y,89:C,102:k,105:S,106:A,109:M,111:N,113:42,114:D,115:R,116:E},{102:[1,159],103:160,105:[1,161]},{44:g,47:162,60:y,89:C,102:k,105:S,106:A,109:M,111:N,113:42,114:D,115:R,116:E},{44:g,47:163,60:y,89:C,102:k,105:S,106:A,109:M,111:N,113:42,114:D,115:R,116:E},e(yt,[2,107],{10:[1,164],96:[1,165]}),{80:[1,166]},e(yt,[2,115],{120:168,10:[1,167],14:Q,44:U,60:ue,89:J,105:he,106:se,109:oe,111:Se,114:xe,115:Ne,116:Ye}),e(yt,[2,117],{10:[1,169]}),e(Et,[2,183]),e(Et,[2,170]),e(Et,[2,171]),e(Et,[2,172]),e(Et,[2,173]),e(Et,[2,174]),e(Et,[2,175]),e(Et,[2,176]),e(Et,[2,177]),e(Et,[2,178]),e(Et,[2,179]),e(Et,[2,180]),{44:g,47:170,60:y,89:C,102:k,105:S,106:A,109:M,111:N,113:42,114:D,115:R,116:E},{30:171,67:gt,80:ge,81:nt,82:172,116:pt,117:Qe,118:we},{30:179,67:gt,80:ge,81:nt,82:172,116:pt,117:Qe,118:we},{30:181,50:[1,180],67:gt,80:ge,81:nt,82:172,116:pt,117:Qe,118:we},{30:182,67:gt,80:ge,81:nt,82:172,116:pt,117:Qe,118:we},{30:183,67:gt,80:ge,81:nt,82:172,116:pt,117:Qe,118:we},{30:184,67:gt,80:ge,81:nt,82:172,116:pt,117:Qe,118:we},{109:[1,185]},{30:186,67:gt,80:ge,81:nt,82:172,116:pt,117:Qe,118:we},{30:187,65:[1,188],67:gt,80:ge,81:nt,82:172,116:pt,117:Qe,118:we},{30:189,67:gt,80:ge,81:nt,82:172,116:pt,117:Qe,118:we},{30:190,67:gt,80:ge,81:nt,82:172,116:pt,117:Qe,118:we},{30:191,67:gt,80:ge,81:nt,82:172,116:pt,117:Qe,118:we},e(_e,[2,182]),e(i,[2,20]),e(Ee,[2,25]),e(H,[2,46],{39:192,18:193,10:$,40:j}),e(Re,[2,73],{10:[1,194]}),{10:[1,195]},{30:196,67:gt,80:ge,81:nt,82:172,116:pt,117:Qe,118:we},{77:[1,197],79:198,116:ie,119:le},e(tt,[2,79]),e(tt,[2,81]),e(tt,[2,82]),e(tt,[2,168]),e(tt,[2,169]),{76:199,79:121,80:Z,81:ae,116:ie,119:le},e(ve,[2,84]),{8:V,9:z,10:ne,11:W,12:Me,14:re,21:201,27:ce,29:[1,200],32:q,44:de,60:X,75:ye,83:141,84:K,85:Ge,86:Ae,87:$e,88:Oe,89:at,90:Pe,91:202,105:Ke,109:qe,111:Be,114:Xe,115:be,116:vt},e(st,[2,101]),e(st,[2,103]),e(st,[2,104]),e(st,[2,157]),e(st,[2,158]),e(st,[2,159]),e(st,[2,160]),e(st,[2,161]),e(st,[2,162]),e(st,[2,163]),e(st,[2,164]),e(st,[2,165]),e(st,[2,166]),e(st,[2,167]),e(st,[2,90]),e(st,[2,91]),e(st,[2,92]),e(st,[2,93]),e(st,[2,94]),e(st,[2,95]),e(st,[2,96]),e(st,[2,97]),e(st,[2,98]),e(st,[2,99]),e(st,[2,100]),{6:11,7:12,8:o,9:l,10:u,11:h,20:17,22:18,23:19,24:20,25:21,26:22,27:d,32:[1,203],33:24,34:f,36:p,38:m,42:28,43:39,44:g,45:40,47:41,60:y,84:v,85:x,86:b,87:T,88:w,89:C,102:k,105:S,106:A,109:M,111:N,113:42,114:D,115:R,116:E,121:I,122:L,123:P,124:B,125:O},{10:$,18:204},{44:[1,205]},e(We,[2,43]),{10:[1,206],44:g,60:y,89:C,102:k,105:S,106:A,109:M,111:N,113:113,114:D,115:R,116:E},{10:[1,207]},{10:[1,208],106:[1,209]},e(mt,[2,128]),{10:[1,210],44:g,60:y,89:C,102:k,105:S,106:A,109:M,111:N,113:113,114:D,115:R,116:E},{10:[1,211],44:g,60:y,89:C,102:k,105:S,106:A,109:M,111:N,113:113,114:D,115:R,116:E},{80:[1,212]},e(yt,[2,109],{10:[1,213]}),e(yt,[2,111],{10:[1,214]}),{80:[1,215]},e(Et,[2,184]),{80:[1,216],98:[1,217]},e(We,[2,55],{113:113,44:g,60:y,89:C,102:k,105:S,106:A,109:M,111:N,114:D,115:R,116:E}),{31:[1,218],67:gt,82:219,116:pt,117:Qe,118:we},e(Bt,[2,86]),e(Bt,[2,88]),e(Bt,[2,89]),e(Bt,[2,153]),e(Bt,[2,154]),e(Bt,[2,155]),e(Bt,[2,156]),{49:[1,220],67:gt,82:219,116:pt,117:Qe,118:we},{30:221,67:gt,80:ge,81:nt,82:172,116:pt,117:Qe,118:we},{51:[1,222],67:gt,82:219,116:pt,117:Qe,118:we},{53:[1,223],67:gt,82:219,116:pt,117:Qe,118:we},{55:[1,224],67:gt,82:219,116:pt,117:Qe,118:we},{57:[1,225],67:gt,82:219,116:pt,117:Qe,118:we},{60:[1,226]},{64:[1,227],67:gt,82:219,116:pt,117:Qe,118:we},{66:[1,228],67:gt,82:219,116:pt,117:Qe,118:we},{30:229,67:gt,80:ge,81:nt,82:172,116:pt,117:Qe,118:we},{31:[1,230],67:gt,82:219,116:pt,117:Qe,118:we},{67:gt,69:[1,231],71:[1,232],82:219,116:pt,117:Qe,118:we},{67:gt,69:[1,234],71:[1,233],82:219,116:pt,117:Qe,118:we},e(H,[2,45],{18:156,10:$,40:Ft}),e(H,[2,47],{44:It}),e(Re,[2,75]),e(Re,[2,74]),{62:[1,235],67:gt,82:219,116:pt,117:Qe,118:we},e(Re,[2,77]),e(tt,[2,80]),{77:[1,236],79:198,116:ie,119:le},{30:237,67:gt,80:ge,81:nt,82:172,116:pt,117:Qe,118:we},e(ke,a,{5:238}),e(st,[2,102]),e(G,[2,35]),{43:239,44:g,45:40,47:41,60:y,89:C,102:k,105:S,106:A,109:M,111:N,113:42,114:D,115:R,116:E},{10:$,18:240},{10:Gt,60:Xt,84:rr,92:241,105:Ct,107:242,108:243,109:Ie,110:it,111:Ve,112:Ze},{10:Gt,60:Xt,84:rr,92:252,104:[1,253],105:Ct,107:242,108:243,109:Ie,110:it,111:Ve,112:Ze},{10:Gt,60:Xt,84:rr,92:254,104:[1,255],105:Ct,107:242,108:243,109:Ie,110:it,111:Ve,112:Ze},{105:[1,256]},{10:Gt,60:Xt,84:rr,92:257,105:Ct,107:242,108:243,109:Ie,110:it,111:Ve,112:Ze},{44:g,47:258,60:y,89:C,102:k,105:S,106:A,109:M,111:N,113:42,114:D,115:R,116:E},e(yt,[2,108]),{80:[1,259]},{80:[1,260],98:[1,261]},e(yt,[2,116]),e(yt,[2,118],{10:[1,262]}),e(yt,[2,119]),e(pe,[2,56]),e(Bt,[2,87]),e(pe,[2,57]),{51:[1,263],67:gt,82:219,116:pt,117:Qe,118:we},e(pe,[2,64]),e(pe,[2,59]),e(pe,[2,60]),e(pe,[2,61]),{109:[1,264]},e(pe,[2,63]),e(pe,[2,65]),{66:[1,265],67:gt,82:219,116:pt,117:Qe,118:we},e(pe,[2,67]),e(pe,[2,68]),e(pe,[2,70]),e(pe,[2,69]),e(pe,[2,71]),e([10,44,60,89,102,105,106,109,111,114,115,116],[2,85]),e(Re,[2,78]),{31:[1,266],67:gt,82:219,116:pt,117:Qe,118:we},{6:11,7:12,8:o,9:l,10:u,11:h,20:17,22:18,23:19,24:20,25:21,26:22,27:d,32:[1,267],33:24,34:f,36:p,38:m,42:28,43:39,44:g,45:40,47:41,60:y,84:v,85:x,86:b,87:T,88:w,89:C,102:k,105:S,106:A,109:M,111:N,113:42,114:D,115:R,116:E,121:I,122:L,123:P,124:B,125:O},e(We,[2,53]),{43:268,44:g,45:40,47:41,60:y,89:C,102:k,105:S,106:A,109:M,111:N,113:42,114:D,115:R,116:E},e(yt,[2,121],{106:bt}),e(Ut,[2,130],{108:270,10:Gt,60:Xt,84:rr,105:Ct,109:Ie,110:it,111:Ve,112:Ze}),e(ir,[2,132]),e(ir,[2,134]),e(ir,[2,135]),e(ir,[2,136]),e(ir,[2,137]),e(ir,[2,138]),e(ir,[2,139]),e(ir,[2,140]),e(ir,[2,141]),e(yt,[2,122],{106:bt}),{10:[1,271]},e(yt,[2,123],{106:bt}),{10:[1,272]},e(mt,[2,129]),e(yt,[2,105],{106:bt}),e(yt,[2,106],{113:113,44:g,60:y,89:C,102:k,105:S,106:A,109:M,111:N,114:D,115:R,116:E}),e(yt,[2,110]),e(yt,[2,112],{10:[1,273]}),e(yt,[2,113]),{98:[1,274]},{51:[1,275]},{62:[1,276]},{66:[1,277]},{8:V,9:z,11:W,21:278},e(G,[2,34]),e(We,[2,52]),{10:Gt,60:Xt,84:rr,105:Ct,107:279,108:243,109:Ie,110:it,111:Ve,112:Ze},e(ir,[2,133]),{14:Q,44:U,60:ue,89:J,101:280,105:he,106:se,109:oe,111:Se,114:xe,115:Ne,116:Ye,120:88},{14:Q,44:U,60:ue,89:J,101:281,105:he,106:se,109:oe,111:Se,114:xe,115:Ne,116:Ye,120:88},{98:[1,282]},e(yt,[2,120]),e(pe,[2,58]),{30:283,67:gt,80:ge,81:nt,82:172,116:pt,117:Qe,118:we},e(pe,[2,66]),e(ke,a,{5:284}),e(Ut,[2,131],{108:270,10:Gt,60:Xt,84:rr,105:Ct,109:Ie,110:it,111:Ve,112:Ze}),e(yt,[2,126],{120:168,10:[1,285],14:Q,44:U,60:ue,89:J,105:he,106:se,109:oe,111:Se,114:xe,115:Ne,116:Ye}),e(yt,[2,127],{120:168,10:[1,286],14:Q,44:U,60:ue,89:J,105:he,106:se,109:oe,111:Se,114:xe,115:Ne,116:Ye}),e(yt,[2,114]),{31:[1,287],67:gt,82:219,116:pt,117:Qe,118:we},{6:11,7:12,8:o,9:l,10:u,11:h,20:17,22:18,23:19,24:20,25:21,26:22,27:d,32:[1,288],33:24,34:f,36:p,38:m,42:28,43:39,44:g,45:40,47:41,60:y,84:v,85:x,86:b,87:T,88:w,89:C,102:k,105:S,106:A,109:M,111:N,113:42,114:D,115:R,116:E,121:I,122:L,123:P,124:B,125:O},{10:Gt,60:Xt,84:rr,92:289,105:Ct,107:242,108:243,109:Ie,110:it,111:Ve,112:Ze},{10:Gt,60:Xt,84:rr,92:290,105:Ct,107:242,108:243,109:Ie,110:it,111:Ve,112:Ze},e(pe,[2,62]),e(G,[2,33]),e(yt,[2,124],{106:bt}),e(yt,[2,125],{106:bt})],defaultActions:{},parseError:s(function(kt,Ot){if(Ot.recoverable)this.trace(kt);else{var zt=new Error(kt);throw zt.hash=Ot,zt}},"parseError"),parse:s(function(kt){var Ot=this,zt=[0],_t=[],pr=[null],Ce=[],Un=this.table,De="",Dr=0,wa=0,pu=0,Hg=2,Ug=1,ck=Ce.slice.call(arguments,1),Ei=Object.create(this.lexer),Ql={yy:{}};for(var Hv in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Hv)&&(Ql.yy[Hv]=this.yy[Hv]);Ei.setInput(kt,Ql.yy),Ql.yy.lexer=Ei,Ql.yy.parser=this,typeof Ei.yylloc>"u"&&(Ei.yylloc={});var Fh=Ei.yylloc;Ce.push(Fh);var uk=Ei.options&&Ei.options.ranges;typeof Ql.yy.parseError=="function"?this.parseError=Ql.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Is(uo){zt.length=zt.length-2*uo,pr.length=pr.length-uo,Ce.length=Ce.length-uo}s(Is,"popStack");function X_(){var uo;return uo=_t.pop()||Ei.lex()||Ug,typeof uo!="number"&&(uo instanceof Array&&(_t=uo,uo=_t.pop()),uo=Ot.symbols_[uo]||uo),uo}s(X_,"lex");for(var ns,K_,ep,Mo,j3t,Z_,Yg={},hk,mu,BY,dk;;){if(ep=zt[zt.length-1],this.defaultActions[ep]?Mo=this.defaultActions[ep]:((ns===null||typeof ns>"u")&&(ns=X_()),Mo=Un[ep]&&Un[ep][ns]),typeof Mo>"u"||!Mo.length||!Mo[0]){var Q_="";dk=[];for(hk in Un[ep])this.terminals_[hk]&&hk>Hg&&dk.push("'"+this.terminals_[hk]+"'");Ei.showPosition?Q_="Parse error on line "+(Dr+1)+`: +`+Ei.showPosition()+` +Expecting `+dk.join(", ")+", got '"+(this.terminals_[ns]||ns)+"'":Q_="Parse error on line "+(Dr+1)+": Unexpected "+(ns==Ug?"end of input":"'"+(this.terminals_[ns]||ns)+"'"),this.parseError(Q_,{text:Ei.match,token:this.terminals_[ns]||ns,line:Ei.yylineno,loc:Fh,expected:dk})}if(Mo[0]instanceof Array&&Mo.length>1)throw new Error("Parse Error: multiple actions possible at state: "+ep+", token: "+ns);switch(Mo[0]){case 1:zt.push(ns),pr.push(Ei.yytext),Ce.push(Ei.yylloc),zt.push(Mo[1]),ns=null,K_?(ns=K_,K_=null):(wa=Ei.yyleng,De=Ei.yytext,Dr=Ei.yylineno,Fh=Ei.yylloc,pu>0&&pu--);break;case 2:if(mu=this.productions_[Mo[1]][1],Yg.$=pr[pr.length-mu],Yg._$={first_line:Ce[Ce.length-(mu||1)].first_line,last_line:Ce[Ce.length-1].last_line,first_column:Ce[Ce.length-(mu||1)].first_column,last_column:Ce[Ce.length-1].last_column},uk&&(Yg._$.range=[Ce[Ce.length-(mu||1)].range[0],Ce[Ce.length-1].range[1]]),Z_=this.performAction.apply(Yg,[De,wa,Dr,Ql.yy,Mo[1],pr,Ce].concat(ck)),typeof Z_<"u")return Z_;mu&&(zt=zt.slice(0,-1*mu*2),pr=pr.slice(0,-1*mu),Ce=Ce.slice(0,-1*mu)),zt.push(this.productions_[Mo[1]][0]),pr.push(Yg.$),Ce.push(Yg._$),BY=Un[zt[zt.length-2]][zt[zt.length-1]],zt.push(BY);break;case 3:return!0}}return!0},"parse")},zr=(function(){var At={EOF:1,parseError:s(function(Ot,zt){if(this.yy.parser)this.yy.parser.parseError(Ot,zt);else throw new Error(Ot)},"parseError"),setInput:s(function(kt,Ot){return this.yy=Ot||this.yy||{},this._input=kt,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 kt=this._input[0];this.yytext+=kt,this.yyleng++,this.offset++,this.match+=kt,this.matched+=kt;var Ot=kt.match(/(?:\r\n?|\n).*/g);return Ot?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),kt},"input"),unput:s(function(kt){var Ot=kt.length,zt=kt.split(/(?:\r\n?|\n)/g);this._input=kt+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-Ot),this.offset-=Ot;var _t=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),zt.length-1&&(this.yylineno-=zt.length-1);var pr=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:zt?(zt.length===_t.length?this.yylloc.first_column:0)+_t[_t.length-zt.length].length-zt[0].length:this.yylloc.first_column-Ot},this.options.ranges&&(this.yylloc.range=[pr[0],pr[0]+this.yyleng-Ot]),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(kt){this.unput(this.match.slice(kt))},"less"),pastInput:s(function(){var kt=this.matched.substr(0,this.matched.length-this.match.length);return(kt.length>20?"...":"")+kt.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:s(function(){var kt=this.match;return kt.length<20&&(kt+=this._input.substr(0,20-kt.length)),(kt.substr(0,20)+(kt.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:s(function(){var kt=this.pastInput(),Ot=new Array(kt.length+1).join("-");return kt+this.upcomingInput()+` +`+Ot+"^"},"showPosition"),test_match:s(function(kt,Ot){var zt,_t,pr;if(this.options.backtrack_lexer&&(pr={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&&(pr.yylloc.range=this.yylloc.range.slice(0))),_t=kt[0].match(/(?:\r\n?|\n).*/g),_t&&(this.yylineno+=_t.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:_t?_t[_t.length-1].length-_t[_t.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+kt[0].length},this.yytext+=kt[0],this.match+=kt[0],this.matches=kt,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(kt[0].length),this.matched+=kt[0],zt=this.performAction.call(this,this.yy,this,Ot,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),zt)return zt;if(this._backtrack){for(var Ce in pr)this[Ce]=pr[Ce];return!1}return!1},"test_match"),next:s(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var kt,Ot,zt,_t;this._more||(this.yytext="",this.match="");for(var pr=this._currentRules(),Ce=0;CeOt[0].length)){if(Ot=zt,_t=Ce,this.options.backtrack_lexer){if(kt=this.test_match(zt,pr[Ce]),kt!==!1)return kt;if(this._backtrack){Ot=!1;continue}else return!1}else if(!this.options.flex)break}return Ot?(kt=this.test_match(Ot,pr[_t]),kt!==!1?kt:!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 Ot=this.next();return Ot||this.lex()},"lex"),begin:s(function(Ot){this.conditionStack.push(Ot)},"begin"),popState:s(function(){var Ot=this.conditionStack.length-1;return Ot>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(Ot){return Ot=this.conditionStack.length-1-Math.abs(Ot||0),Ot>=0?this.conditionStack[Ot]:"INITIAL"},"topState"),pushState:s(function(Ot){this.begin(Ot)},"pushState"),stateStackSize:s(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:s(function(Ot,zt,_t,pr){var Ce=pr;switch(_t){case 0:return this.begin("acc_title"),34;break;case 1:return this.popState(),"acc_title_value";break;case 2:return this.begin("acc_descr"),36;break;case 3:return this.popState(),"acc_descr_value";break;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"),zt.yytext="",40;break;case 8:return this.pushState("shapeDataStr"),40;break;case 9:return this.popState(),40;break;case 10:let Un=/\n\s*/g;return zt.yytext=zt.yytext.replace(Un,"
    "),40;break;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 Ot.lex.firstGraph()&&this.begin("dir"),12;break;case 36:return Ot.lex.firstGraph()&&this.begin("dir"),12;break;case 37:return Ot.lex.firstGraph()&&this.begin("dir"),12;break;case 38:return Ot.lex.firstGraph()&&this.begin("dir"),12;break;case 39:return 27;case 40:return 32;case 41:return 98;case 42:return 98;case 43:return 98;case 44:return 98;case 45:return this.popState(),13;break;case 46:return this.popState(),14;break;case 47:return this.popState(),14;break;case 48:return this.popState(),14;break;case 49:return this.popState(),14;break;case 50:return this.popState(),14;break;case 51:return this.popState(),14;break;case 52:return this.popState(),14;break;case 53:return this.popState(),14;break;case 54:return this.popState(),14;break;case 55:return this.popState(),14;break;case 56:return 121;case 57:return 122;case 58:return 123;case 59:return 124;case 60:return 125;case 61:return 78;case 62:return 105;case 63:return 111;case 64:return 46;case 65:return 60;case 66:return 44;case 67:return 8;case 68:return 106;case 69:return 115;case 70:return this.popState(),77;break;case 71:return this.pushState("edgeText"),75;break;case 72:return 119;case 73:return this.popState(),77;break;case 74:return this.pushState("thickEdgeText"),75;break;case 75:return 119;case 76:return this.popState(),77;break;case 77:return this.pushState("dottedEdgeText"),75;break;case 78:return 119;case 79:return 77;case 80:return this.popState(),53;break;case 81:return"TEXT";case 82:return this.pushState("ellipseText"),52;break;case 83:return this.popState(),55;break;case 84:return this.pushState("text"),54;break;case 85:return this.popState(),57;break;case 86:return this.pushState("text"),56;break;case 87:return 58;case 88:return this.pushState("text"),67;break;case 89:return this.popState(),64;break;case 90:return this.pushState("text"),63;break;case 91:return this.popState(),49;break;case 92:return this.pushState("text"),48;break;case 93:return this.popState(),69;break;case 94:return this.popState(),71;break;case 95:return 117;case 96:return this.pushState("trapText"),68;break;case 97:return this.pushState("trapText"),70;break;case 98:return 118;case 99:return 67;case 100:return 90;case 101:return"SEP";case 102:return 89;case 103:return 115;case 104:return 111;case 105:return 44;case 106:return 109;case 107:return 114;case 108:return 116;case 109:return this.popState(),62;break;case 110:return this.pushState("text"),62;break;case 111:return this.popState(),51;break;case 112:return this.pushState("text"),50;break;case 113:return this.popState(),31;break;case 114:return this.pushState("text"),29;break;case 115:return this.popState(),66;break;case 116:return this.pushState("text"),65;break;case 117:return"TEXT";case 118:return"QUOTE";case 119:return 9;case 120:return 10;case 121: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)/,/^(?:swimlane-beta\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]*)/,/^(?:.*direction\s+TD[^\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,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},shapeDataStr:{rules:[9,10,21,24,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},shapeData:{rules:[8,11,12,21,24,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},callbackargs:{rules:[17,18,21,24,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},callbackname:{rules:[14,15,16,21,24,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},href:{rules:[21,24,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},click:{rules:[21,24,33,34,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},dottedEdgeText:{rules:[21,24,76,78,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},thickEdgeText:{rules:[21,24,73,75,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},edgeText:{rules:[21,24,70,72,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},trapText:{rules:[21,24,79,82,84,86,90,92,93,94,95,96,97,110,112,114,116],inclusive:!1},ellipseText:{rules:[21,24,79,80,81,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},text:{rules:[21,24,79,82,83,84,85,86,89,90,91,92,96,97,109,110,111,112,113,114,115,116,117],inclusive:!1},vertex:{rules:[21,24,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},dir:{rules:[21,24,45,46,47,48,49,50,51,52,53,54,55,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},acc_descr_multiline:{rules:[5,6,21,24,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},acc_descr:{rules:[3,21,24,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},acc_title:{rules:[1,21,24,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},md_string:{rules:[19,20,21,24,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},string:{rules:[21,22,23,24,79,82,84,86,90,92,96,97,110,112,114,116],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,44,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,73,74,76,77,79,82,84,86,87,88,90,92,96,97,98,99,100,101,102,103,104,105,106,107,108,110,112,114,116,118,119,120,121],inclusive:!0}}};return At})();Yt.lexer=zr;function wr(){this.yy={}}return s(wr,"Parser"),wr.prototype=Yt,Yt.Parser=wr,new wr})();D$.parser=D$;I$=D$});var Fbe,Gbe,zbe=F(()=>{"use strict";$be();Fbe=Object.assign({},I$);Fbe.parse=e=>{let t=e.replace(/}\s*\n/g,`} +`);return I$.parse(t)};Gbe=Fbe});var jc,s1=F(()=>{"use strict";jc=s(()=>` + /* 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")});var eht,tht,y5,M$=F(()=>{"use strict";Di();s1();eht=s((e,t)=>{let r=rp,n=r(e,"r"),i=r(e,"g"),a=r(e,"b");return Ai(n,i,a,t)},"fade"),tht=s(e=>`.label { + font-family: ${e.fontFamily}; + color: ${e.nodeTextColor||e.textColor}; + } + .cluster-label text { + fill: ${e.titleColor}; + } + .cluster-label span { + color: ${e.titleColor}; + } + .cluster-label span p { + background-color: transparent; + } + + .label text,span { + 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: ${e.strokeWidth??1}px; + } + .rough-node .label text , .node .label text, .image-shape .label, .icon-shape .label { + text-anchor: middle; + } + + .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: ${e.lineColor} !important; + stroke-width: 0; + stroke: ${e.lineColor}; + } + + .arrowheadPath { + fill: ${e.arrowheadColor}; + } + + .edgePath .path { + stroke: ${e.lineColor}; + stroke-width: ${e.strokeWidth??2}px; + } + + .flowchart-link { + stroke: ${e.lineColor}; + fill: none; + } + + .edgeLabel { + background-color: ${e.edgeLabelBackground}; + p { + 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: ${eht(e.edgeLabelBackground,.5)}; + // background-color: + } + + .cluster rect { + fill: ${e.clusterBkg}; + stroke: ${e.clusterBorder}; + stroke-width: 1px; + } + + .cluster text { + fill: ${e.titleColor}; + } + + .cluster span { + color: ${e.titleColor}; + } + /* .cluster div { + color: ${e.titleColor}; + } */ + + /* Collapsed subgraph node (@{ view: collapsed }) */ + .node .collapsed-indicator { + fill: ${e.clusterBorder}; + stroke: none; + opacity: 0.6; + } + + .node .collapsed-separator { + stroke: ${e.clusterBorder}; + stroke-width: 0.75px; + } + + 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}; + } + + rect.text { + fill: none; + stroke-width: 0; + } + + .icon-shape, .image-shape { + background-color: ${e.edgeLabelBackground}; + p { + background-color: ${e.edgeLabelBackground}; + padding: 2px; + } + .label rect { + opacity: 0.5; + background-color: ${e.edgeLabelBackground}; + fill: ${e.edgeLabelBackground}; + } + text-align: center; + } + ${jc()} +`,"getStyles"),y5=tht});var x5={};ar(x5,{createFlowDiagram:()=>v5,diagram:()=>rht});var v5,rht,TT=F(()=>{"use strict";mr();Zt();nle();Bbe();zbe();M$();v5=s(({defaultLayout:e,styles:t=y5}={})=>({parser:Gbe,get db(){return new $E},renderer:Obe,styles:t,init:s(r=>{r.flowchart||(r.flowchart={});let n=Ak().layout??e??r.layout;n&&bx({layout:n}),r.flowchart.arrowMarkerAbsolute=r.arrowMarkerAbsolute,bx({flowchart:{arrowMarkerAbsolute:r.arrowMarkerAbsolute}})},"init")}),"createFlowDiagram"),rht=v5()});var cht,Ube,Ybe=F(()=>{"use strict";M$();cht=s(e=>`${y5(e)} + .swimlane.cluster rect { + stroke: ${e.clusterBorder} !important; + } + [data-look="neo"].cluster rect { + filter: none; + } +`,"getStyles"),Ube=cht});var jbe={};ar(jbe,{diagram:()=>uht});var uht,Xbe=F(()=>{"use strict";TT();Ybe();uht=v5({defaultLayout:"swimlane",styles:Ube})});var N$,Qbe,Jbe=F(()=>{"use strict";N$=(function(){var e=s(function(Re,Z,ae,ie){for(ae=ae||{},ie=Re.length;ie--;ae[Re[ie]]=Z);return ae},"o"),t=[6,9,21,23,25,27,34,37,38,39,40,41,43,46,47,51,53,54,55],r=[2,2],n=[1,7],i=[1,9],a=[1,10],o=[1,11],l=[1,12],u=[1,30],h=[1,23],d=[1,24],f=[1,25],p=[1,26],m=[1,27],g=[1,19],y=[1,28],v=[1,29],x=[1,20],b=[1,18],T=[1,21],w=[1,22],C=[2,6],k=[6,9,21,23,25,27,33,34,37,38,39,40,41,43,46,47,51,53,54,55],S=[1,36],A=[1,37],M=[1,38],N=[1,39],D=[1,40],R=[6,9,12,14,16,19,20,21,23,25,27,33,34,37,38,39,40,41,43,46,47,50,51,53,54,55,69,70,71,72,73],E=[1,46],I=[1,47],L=[1,57],P=[43,51,53,54,55,74,75],B=[1,70],O=[1,68],$=[1,65],G=[1,69],V=[1,71],z=[6,9,12,16,21,23,25,27,33,34,37,38,39,40,41,43,44,45,46,47,51,52,53,54,55,69,70,71,72,73],W=[1,78],H=[1,77],j=[1,76],Q=[69,70,71,72,73],U=[1,91],ue=[6,9,45,50],J=[6,9,12,44,45,50,51,52],he=[1,101],se=[1,100],oe=[1,99],Se=[18,61],xe=[1,110],Ne=[1,109],Ye=[20,43,51,53,54,55],We=[18,61,64,66],pe={trace:s(function(){},"trace"),yy:{},symbols_:{error:2,start:3,ER_DIAGRAM:4,document:5,EOF:6,line:7,statement:8,NEWLINE:9,entityName:10,relSpec:11,COLON:12,role:13,STYLE_SEPARATOR:14,idList:15,BLOCK_START:16,attributes:17,BLOCK_STOP:18,SQS:19,SQE:20,title:21,title_value:22,acc_title:23,acc_title_value:24,acc_descr:25,acc_descr_value:26,acc_descr_multiline_value:27,direction:28,classDefStatement:29,classStatement:30,styleStatement:31,subgraphHeader:32,END:33,SUBGRAPH:34,separator:35,subgraphTitle:36,direction_tb:37,direction_bt:38,direction_rl:39,direction_lr:40,CLASSDEF:41,stylesOpt:42,UNICODE_TEXT:43,STYLE_TEXT:44,COMMA:45,CLASS:46,STYLE:47,style:48,styleComponent:49,SEMI:50,NUM:51,BRKT:52,ENTITY_NAME:53,DECIMAL_NUM:54,ENTITY_ONE:55,attribute:56,attributeType:57,attributeName:58,attributeKeyTypeList:59,attributeComment:60,ATTRIBUTE_WORD:61,"?":62,attributeKeyType:63,",":64,ATTRIBUTE_KEY:65,COMMENT:66,cardinality:67,relType:68,ZERO_OR_ONE:69,ZERO_OR_MORE:70,ONE_OR_MORE:71,ONLY_ONE:72,MD_PARENT:73,NON_IDENTIFYING:74,IDENTIFYING:75,WORD:76,$accept:0,$end:1},terminals_:{2:"error",4:"ER_DIAGRAM",6:"EOF",9:"NEWLINE",12:"COLON",14:"STYLE_SEPARATOR",16:"BLOCK_START",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",33:"END",34:"SUBGRAPH",37:"direction_tb",38:"direction_bt",39:"direction_rl",40:"direction_lr",41:"CLASSDEF",43:"UNICODE_TEXT",44:"STYLE_TEXT",45:"COMMA",46:"CLASS",47:"STYLE",50:"SEMI",51:"NUM",52:"BRKT",53:"ENTITY_NAME",54:"DECIMAL_NUM",55:"ENTITY_ONE",61:"ATTRIBUTE_WORD",62:"?",64:",",65:"ATTRIBUTE_KEY",66:"COMMENT",69:"ZERO_OR_ONE",70:"ZERO_OR_MORE",71:"ONE_OR_MORE",72:"ONLY_ONE",73:"MD_PARENT",74:"NON_IDENTIFYING",75:"IDENTIFYING",76:"WORD"},productions_:[0,[3,3],[5,0],[5,2],[7,1],[7,1],[7,1],[8,5],[8,9],[8,7],[8,7],[8,4],[8,6],[8,3],[8,5],[8,1],[8,3],[8,7],[8,9],[8,6],[8,8],[8,4],[8,6],[8,2],[8,2],[8,2],[8,1],[8,1],[8,1],[8,1],[8,1],[8,3],[32,3],[32,6],[36,1],[36,2],[28,1],[28,1],[28,1],[28,1],[29,4],[15,1],[15,1],[15,3],[15,3],[30,3],[31,4],[42,1],[42,3],[48,1],[48,2],[35,1],[35,1],[35,1],[49,1],[49,1],[49,1],[49,1],[10,1],[10,1],[10,1],[10,1],[10,1],[17,1],[17,2],[56,2],[56,3],[56,3],[56,4],[57,1],[57,2],[58,1],[59,1],[59,3],[63,1],[60,1],[11,3],[67,1],[67,1],[67,1],[67,1],[67,1],[68,1],[68,1],[13,1],[13,1],[13,1]],performAction:s(function(Z,ae,ie,le,ve,ne,Me){var re=ne.length-1;switch(ve){case 1:break;case 2:this.$=[];break;case 3:this.$=ne[re-1].concat(ne[re]);break;case 4:this.$=ne[re];break;case 5:case 6:this.$=[];break;case 7:le.addEntity(ne[re-4]),le.addEntity(ne[re-2]),le.addRelationship(ne[re-4],ne[re],ne[re-2],ne[re-3]),this.$=[ne[re-4],ne[re-2]];break;case 8:le.addEntity(ne[re-8]),le.addEntity(ne[re-4]),le.addRelationship(ne[re-8],ne[re],ne[re-4],ne[re-5]),le.setClass([ne[re-8]],ne[re-6]),le.setClass([ne[re-4]],ne[re-2]),this.$=[ne[re-8],ne[re-4]];break;case 9:le.addEntity(ne[re-6]),le.addEntity(ne[re-2]),le.addRelationship(ne[re-6],ne[re],ne[re-2],ne[re-3]),le.setClass([ne[re-6]],ne[re-4]),this.$=[ne[re-6],ne[re-2]];break;case 10:le.addEntity(ne[re-6]),le.addEntity(ne[re-4]),le.addRelationship(ne[re-6],ne[re],ne[re-4],ne[re-5]),le.setClass([ne[re-4]],ne[re-2]),this.$=[ne[re-6],ne[re-4]];break;case 11:le.addEntity(ne[re-3]),le.addAttributes(ne[re-3],ne[re-1]),this.$=[ne[re-3]];break;case 12:le.addEntity(ne[re-5]),le.addAttributes(ne[re-5],ne[re-1]),le.setClass([ne[re-5]],ne[re-3]),this.$=[ne[re-5]];break;case 13:le.addEntity(ne[re-2]),this.$=[ne[re-2]];break;case 14:le.addEntity(ne[re-4]),le.setClass([ne[re-4]],ne[re-2]),this.$=[ne[re-4]];break;case 15:le.addEntity(ne[re]),this.$=[ne[re]];break;case 16:le.addEntity(ne[re-2]),le.setClass([ne[re-2]],ne[re]),this.$=[ne[re-2]];break;case 17:le.addEntity(ne[re-6],ne[re-4]),le.addAttributes(ne[re-6],ne[re-1]),this.$=[ne[re-6]];break;case 18:le.addEntity(ne[re-8],ne[re-6]),le.addAttributes(ne[re-8],ne[re-1]),le.setClass([ne[re-8]],ne[re-3]),this.$=[ne[re-8]];break;case 19:le.addEntity(ne[re-5],ne[re-3]),this.$=[ne[re-5]];break;case 20:le.addEntity(ne[re-7],ne[re-5]),le.setClass([ne[re-7]],ne[re-2]),this.$=[ne[re-7]];break;case 21:le.addEntity(ne[re-3],ne[re-1]);break;case 22:le.addEntity(ne[re-5],ne[re-3]),le.setClass([ne[re-5]],ne[re]);break;case 23:case 24:this.$=ne[re].trim(),le.setAccTitle(this.$);break;case 25:case 26:this.$=ne[re].trim(),le.setAccDescription(this.$);break;case 27:le.subgraphDepth?this.$=ne[re]:(le.setDirection(ne[re].value),this.$=[]);break;case 31:le.subgraphDepth=(le.subgraphDepth||1)-1,this.$=le.addSubGraph({text:ne[re-2].id},ne[re-1],{text:ne[re-2].text});break;case 32:le.subgraphDepth=(le.subgraphDepth||0)+1,this.$={id:ne[re-1],text:ne[re-1]};break;case 33:le.subgraphDepth=(le.subgraphDepth||0)+1,this.$={id:ne[re-4],text:ne[re-2]};break;case 34:case 59:case 60:case 61:case 62:case 86:this.$=ne[re];break;case 35:this.$=ne[re-1]+" "+ne[re];break;case 36:this.$={stmt:"dir",value:"TB"};break;case 37:this.$={stmt:"dir",value:"BT"};break;case 38:this.$={stmt:"dir",value:"RL"};break;case 39:this.$={stmt:"dir",value:"LR"};break;case 40:this.$=ne[re-3],le.addClass(ne[re-2],ne[re-1]);break;case 41:case 42:case 63:case 72:this.$=[ne[re]];break;case 43:case 44:this.$=ne[re-2].concat([ne[re]]);break;case 45:this.$=ne[re-2],le.setClass(ne[re-1],ne[re]);break;case 46:this.$=ne[re-3],le.addCssStyles(ne[re-2],ne[re-1]);break;case 47:this.$=[ne[re]];break;case 48:ne[re-2].push(ne[re]),this.$=ne[re-2];break;case 50:this.$=ne[re-1]+ne[re];break;case 58:case 84:case 85:this.$=ne[re].replace(/"/g,"");break;case 64:ne[re].push(ne[re-1]),this.$=ne[re];break;case 65:this.$={type:ne[re-1],name:ne[re]};break;case 66:this.$={type:ne[re-2],name:ne[re-1],keys:ne[re]};break;case 67:this.$={type:ne[re-2],name:ne[re-1],comment:ne[re]};break;case 68:this.$={type:ne[re-3],name:ne[re-2],keys:ne[re-1],comment:ne[re]};break;case 69:case 71:case 74:this.$=ne[re];break;case 70:this.$=ne[re-1]+ne[re];break;case 73:ne[re-2].push(ne[re]),this.$=ne[re-2];break;case 75:this.$=ne[re].replace(/"/g,"");break;case 76:this.$={cardA:ne[re],relType:ne[re-1],cardB:ne[re-2]};break;case 77:this.$=le.Cardinality.ZERO_OR_ONE;break;case 78:this.$=le.Cardinality.ZERO_OR_MORE;break;case 79:this.$=le.Cardinality.ONE_OR_MORE;break;case 80:this.$=le.Cardinality.ONLY_ONE;break;case 81:this.$=le.Cardinality.MD_PARENT;break;case 82:this.$=le.Identification.NON_IDENTIFYING;break;case 83:this.$=le.Identification.IDENTIFYING;break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},e(t,r,{5:3}),{6:[1,4],7:5,8:6,9:n,10:8,21:i,23:a,25:o,27:l,28:13,29:14,30:15,31:16,32:17,34:u,37:h,38:d,39:f,40:p,41:m,43:g,46:y,47:v,51:x,53:b,54:T,55:w},e(t,C,{1:[2,1]}),e(k,[2,3]),e(k,[2,4]),e(k,[2,5]),e(k,[2,15],{11:31,67:35,14:[1,32],16:[1,33],19:[1,34],69:S,70:A,71:M,72:N,73:D}),{22:[1,41]},{24:[1,42]},{26:[1,43]},e(k,[2,26]),e(k,[2,27]),e(k,[2,28]),e(k,[2,29]),e(k,[2,30]),e(k,r,{5:44}),e(R,[2,58]),e(R,[2,59]),e(R,[2,60]),e(R,[2,61]),e(R,[2,62]),e(k,[2,36]),e(k,[2,37]),e(k,[2,38]),e(k,[2,39]),{15:45,43:E,44:I},{15:48,43:E,44:I},{15:49,43:E,44:I},{10:50,43:g,51:x,53:b,54:T,55:w},{10:51,43:g,51:x,53:b,54:T,55:w},{15:52,43:E,44:I},{17:53,18:[1,54],56:55,57:56,61:L},{10:58,43:g,51:x,53:b,54:T,55:w},{68:59,74:[1,60],75:[1,61]},e(P,[2,77]),e(P,[2,78]),e(P,[2,79]),e(P,[2,80]),e(P,[2,81]),e(k,[2,23]),e(k,[2,24]),e(k,[2,25]),{6:[1,63],7:5,8:6,9:n,10:8,21:i,23:a,25:o,27:l,28:13,29:14,30:15,31:16,32:17,33:[1,62],34:u,37:h,38:d,39:f,40:p,41:m,43:g,46:y,47:v,51:x,53:b,54:T,55:w},{12:B,42:64,44:O,45:$,48:66,49:67,51:G,52:V},e(z,[2,41]),e(z,[2,42]),{15:72,43:E,44:I,45:$},{12:B,42:73,44:O,45:$,48:66,49:67,51:G,52:V},{6:W,9:H,19:[1,75],35:74,50:j},{12:[1,79],14:[1,80]},e(k,[2,16],{67:35,11:81,16:[1,82],45:$,69:S,70:A,71:M,72:N,73:D}),{18:[1,83]},e(k,[2,13]),{17:84,18:[2,63],56:55,57:56,61:L},{58:85,61:[1,86]},{61:[2,69],62:[1,87]},{20:[1,88]},{67:89,69:S,70:A,71:M,72:N,73:D},e(Q,[2,82]),e(Q,[2,83]),e(k,[2,31]),e(k,C),{6:W,9:H,35:90,45:U,50:j},{43:[1,92],44:[1,93]},e(ue,[2,47],{49:94,12:B,44:O,51:G,52:V}),e(J,[2,49]),e(J,[2,54]),e(J,[2,55]),e(J,[2,56]),e(J,[2,57]),e(k,[2,45],{45:$}),{6:W,9:H,35:95,45:U,50:j},e(k,[2,32]),{10:97,36:96,43:g,51:x,53:b,54:T,55:w},e(k,[2,51]),e(k,[2,52]),e(k,[2,53]),{13:98,43:he,53:se,76:oe},{15:102,43:E,44:I},{10:103,43:g,51:x,53:b,54:T,55:w},{17:104,18:[1,105],56:55,57:56,61:L},e(k,[2,11]),{18:[2,64]},e(Se,[2,65],{59:106,60:107,63:108,65:xe,66:Ne}),e([18,61,65,66],[2,71]),{61:[2,70]},e(k,[2,21],{14:[1,112],16:[1,111]}),e([43,51,53,54,55],[2,76]),e(k,[2,40]),{12:B,44:O,48:113,49:67,51:G,52:V},e(z,[2,43]),e(z,[2,44]),e(J,[2,50]),e(k,[2,46]),{10:115,20:[1,114],43:g,51:x,53:b,54:T,55:w},e(Ye,[2,34]),e(k,[2,7]),e(k,[2,84]),e(k,[2,85]),e(k,[2,86]),{12:[1,116],45:$},{12:[1,118],14:[1,117]},{18:[1,119]},e(k,[2,14]),e(Se,[2,66],{60:120,64:[1,121],66:Ne}),e(Se,[2,67]),e(We,[2,72]),e(Se,[2,75]),e(We,[2,74]),{17:122,18:[1,123],56:55,57:56,61:L},{15:124,43:E,44:I},e(ue,[2,48],{49:94,12:B,44:O,51:G,52:V}),{6:W,9:H,35:125,50:j},e(Ye,[2,35]),{13:126,43:he,53:se,76:oe},{15:127,43:E,44:I},{13:128,43:he,53:se,76:oe},e(k,[2,12]),e(Se,[2,68]),{63:129,65:xe},{18:[1,130]},e(k,[2,19]),e(k,[2,22],{16:[1,131],45:$}),e(k,[2,33]),e(k,[2,10]),{12:[1,132],45:$},e(k,[2,9]),e(We,[2,73]),e(k,[2,17]),{17:133,18:[1,134],56:55,57:56,61:L},{13:135,43:he,53:se,76:oe},{18:[1,136]},e(k,[2,20]),e(k,[2,8]),e(k,[2,18])],defaultActions:{84:[2,64],87:[2,70]},parseError:s(function(Z,ae){if(ae.recoverable)this.trace(Z);else{var ie=new Error(Z);throw ie.hash=ae,ie}},"parseError"),parse:s(function(Z){var ae=this,ie=[0],le=[],ve=[null],ne=[],Me=this.table,re="",ce=0,q=0,de=0,X=2,ye=1,K=ne.slice.call(arguments,1),Ge=Object.create(this.lexer),Ae={yy:{}};for(var $e in this.yy)Object.prototype.hasOwnProperty.call(this.yy,$e)&&(Ae.yy[$e]=this.yy[$e]);Ge.setInput(Z,Ae.yy),Ae.yy.lexer=Ge,Ae.yy.parser=this,typeof Ge.yylloc>"u"&&(Ge.yylloc={});var Oe=Ge.yylloc;ne.push(Oe);var at=Ge.options&&Ge.options.ranges;typeof Ae.yy.parseError=="function"?this.parseError=Ae.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Pe(nt){ie.length=ie.length-2*nt,ve.length=ve.length-nt,ne.length=ne.length-nt}s(Pe,"popStack");function Ke(){var nt;return nt=le.pop()||Ge.lex()||ye,typeof nt!="number"&&(nt instanceof Array&&(le=nt,nt=le.pop()),nt=ae.symbols_[nt]||nt),nt}s(Ke,"lex");for(var qe,Be,Xe,be,vt,ke,It={},Ft,yt,Et,gt;;){if(Xe=ie[ie.length-1],this.defaultActions[Xe]?be=this.defaultActions[Xe]:((qe===null||typeof qe>"u")&&(qe=Ke()),be=Me[Xe]&&Me[Xe][qe]),typeof be>"u"||!be.length||!be[0]){var ge="";gt=[];for(Ft in Me[Xe])this.terminals_[Ft]&&Ft>X&>.push("'"+this.terminals_[Ft]+"'");Ge.showPosition?ge="Parse error on line "+(ce+1)+`: +`+Ge.showPosition()+` +Expecting `+gt.join(", ")+", got '"+(this.terminals_[qe]||qe)+"'":ge="Parse error on line "+(ce+1)+": Unexpected "+(qe==ye?"end of input":"'"+(this.terminals_[qe]||qe)+"'"),this.parseError(ge,{text:Ge.match,token:this.terminals_[qe]||qe,line:Ge.yylineno,loc:Oe,expected:gt})}if(be[0]instanceof Array&&be.length>1)throw new Error("Parse Error: multiple actions possible at state: "+Xe+", token: "+qe);switch(be[0]){case 1:ie.push(qe),ve.push(Ge.yytext),ne.push(Ge.yylloc),ie.push(be[1]),qe=null,Be?(qe=Be,Be=null):(q=Ge.yyleng,re=Ge.yytext,ce=Ge.yylineno,Oe=Ge.yylloc,de>0&&de--);break;case 2:if(yt=this.productions_[be[1]][1],It.$=ve[ve.length-yt],It._$={first_line:ne[ne.length-(yt||1)].first_line,last_line:ne[ne.length-1].last_line,first_column:ne[ne.length-(yt||1)].first_column,last_column:ne[ne.length-1].last_column},at&&(It._$.range=[ne[ne.length-(yt||1)].range[0],ne[ne.length-1].range[1]]),ke=this.performAction.apply(It,[re,q,ce,Ae.yy,be[1],ve,ne].concat(K)),typeof ke<"u")return ke;yt&&(ie=ie.slice(0,-1*yt*2),ve=ve.slice(0,-1*yt),ne=ne.slice(0,-1*yt)),ie.push(this.productions_[be[1]][0]),ve.push(It.$),ne.push(It._$),Et=Me[ie[ie.length-2]][ie[ie.length-1]],ie.push(Et);break;case 3:return!0}}return!0},"parse")},_e=(function(){var Re={EOF:1,parseError:s(function(ae,ie){if(this.yy.parser)this.yy.parser.parseError(ae,ie);else throw new Error(ae)},"parseError"),setInput:s(function(Z,ae){return this.yy=ae||this.yy||{},this._input=Z,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 Z=this._input[0];this.yytext+=Z,this.yyleng++,this.offset++,this.match+=Z,this.matched+=Z;var ae=Z.match(/(?:\r\n?|\n).*/g);return ae?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),Z},"input"),unput:s(function(Z){var ae=Z.length,ie=Z.split(/(?:\r\n?|\n)/g);this._input=Z+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-ae),this.offset-=ae;var le=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),ie.length-1&&(this.yylineno-=ie.length-1);var ve=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:ie?(ie.length===le.length?this.yylloc.first_column:0)+le[le.length-ie.length].length-ie[0].length:this.yylloc.first_column-ae},this.options.ranges&&(this.yylloc.range=[ve[0],ve[0]+this.yyleng-ae]),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(Z){this.unput(this.match.slice(Z))},"less"),pastInput:s(function(){var Z=this.matched.substr(0,this.matched.length-this.match.length);return(Z.length>20?"...":"")+Z.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:s(function(){var Z=this.match;return Z.length<20&&(Z+=this._input.substr(0,20-Z.length)),(Z.substr(0,20)+(Z.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:s(function(){var Z=this.pastInput(),ae=new Array(Z.length+1).join("-");return Z+this.upcomingInput()+` +`+ae+"^"},"showPosition"),test_match:s(function(Z,ae){var ie,le,ve;if(this.options.backtrack_lexer&&(ve={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&&(ve.yylloc.range=this.yylloc.range.slice(0))),le=Z[0].match(/(?:\r\n?|\n).*/g),le&&(this.yylineno+=le.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:le?le[le.length-1].length-le[le.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+Z[0].length},this.yytext+=Z[0],this.match+=Z[0],this.matches=Z,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(Z[0].length),this.matched+=Z[0],ie=this.performAction.call(this,this.yy,this,ae,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),ie)return ie;if(this._backtrack){for(var ne in ve)this[ne]=ve[ne];return!1}return!1},"test_match"),next:s(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var Z,ae,ie,le;this._more||(this.yytext="",this.match="");for(var ve=this._currentRules(),ne=0;neae[0].length)){if(ae=ie,le=ne,this.options.backtrack_lexer){if(Z=this.test_match(ie,ve[ne]),Z!==!1)return Z;if(this._backtrack){ae=!1;continue}else return!1}else if(!this.options.flex)break}return ae?(Z=this.test_match(ae,ve[le]),Z!==!1?Z:!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 ae=this.next();return ae||this.lex()},"lex"),begin:s(function(ae){this.conditionStack.push(ae)},"begin"),popState:s(function(){var ae=this.conditionStack.length-1;return ae>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(ae){return ae=this.conditionStack.length-1-Math.abs(ae||0),ae>=0?this.conditionStack[ae]:"INITIAL"},"topState"),pushState:s(function(ae){this.begin(ae)},"pushState"),stateStackSize:s(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:s(function(ae,ie,le,ve){var ne=ve;switch(le){case 0:return this.begin("acc_title"),23;break;case 1:return this.popState(),"acc_title_value";break;case 2:return this.begin("acc_descr"),25;break;case 3:return this.popState(),"acc_descr_value";break;case 4:this.begin("acc_descr_multiline");break;case 5:this.popState();break;case 6:return"acc_descr_multiline_value";case 7:return 37;case 8:return 38;case 9:return 39;case 10:return 40;case 11:break;case 12:return 9;case 13:return 53;case 14:return 76;case 15:return 4;case 16:return this.begin("block"),16;break;case 17:return 52;case 18:return 52;case 19:return 45;case 20:return 14;case 21:return 12;case 22:break;case 23:return 65;case 24:return 61;case 25:return 61;case 26:this.begin("block_bq");break;case 27:return 61;case 28:this.popState();break;case 29:return 66;case 30:break;case 31:return this.popState(),18;break;case 32:return ie.yytext[0];case 33:return 19;case 34:return 20;case 35:return this.begin("style"),47;break;case 36:return this.popState(),9;break;case 37:break;case 38:return 12;case 39:return 45;case 40:return 52;case 41:return this.begin("style"),41;break;case 42:return 46;case 43:return 34;case 44:return 33;case 45:return 69;case 46:return 71;case 47:return 71;case 48:return 71;case 49:return 69;case 50:return 69;case 51:return 70;case 52:return 70;case 53:return 70;case 54:return 70;case 55:return 70;case 56:return 71;case 57:return 70;case 58:return 71;case 59:return 72;case 60:return 72;case 61:return 54;case 62:return 72;case 63:return 72;case 64:return 72;case 65:return 55;case 66:return 51;case 67:return 72;case 68:return 69;case 69:return 70;case 70:return 71;case 71:return 73;case 72:return 74;case 73:return 75;case 74:return 75;case 75:return 74;case 76:return 74;case 77:return 74;case 78:return 44;case 79:return 50;case 80:return 43;case 81:return ie.yytext[0];case 82: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,/^(?:[ \t\r]+)/i,/^(?:[\n]+)/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,/^(?:[^`]+)/i,/^(?:[`])/i,/^(?:"[^"]*")/i,/^(?:[\n]+)/i,/^(?:\})/i,/^(?:.)/i,/^(?:\[)/i,/^(?:\])/i,/^(?:style\b)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?::)/i,/^(?:,)/i,/^(?:#)/i,/^(?:classDef\b)/i,/^(?:class\b)/i,/^(?:subgraph\b)/i,/^(?:end\b\s*)/i,/^(?:one or zero\b)/i,/^(?:one or more\b)/i,/^(?:one or many\b)/i,/^(?:1\+)/i,/^(?:\|o\b)/i,/^(?:zero or one\b)/i,/^(?:zero or more\b)/i,/^(?:zero or many\b)/i,/^(?:0\+)/i,/^(?:\}o\b)/i,/^(?:many\(0\))/i,/^(?:many\(1\))/i,/^(?:many\b)/i,/^(?:\}\|)/i,/^(?:one\b)/i,/^(?:only one\b)/i,/^(?:[0-9]+\.[0-9]+)/i,/^(?:1(?=\s+[A-Za-z_"']))/i,/^(?:1(?=\s+[0-9]))/i,/^(?:1(?=(--|\.\.|\.-|-\.)))/i,/^(?:1\b)/i,/^(?:[0-9]+)/i,/^(?:\|\|)/i,/^(?:o\|)/i,/^(?:o\{)/i,/^(?:\|\{)/i,/^(?:u(?=[\.\-\|]))/i,/^(?:\.\.)/i,/^(?:--)/i,/^(?:to\b)/i,/^(?:optionally to\b)/i,/^(?:\.-)/i,/^(?:-\.)/i,/^(?:([^\x00-\x7F]|\w|-|\*)+)/i,/^(?:;)/i,/^(?:([^\x00-\x7F]|\w|-|\*|\.)+)/i,/^(?:.)/i,/^(?:$)/i],conditions:{style:{rules:[36,37,38,39,40,78,79],inclusive:!1},acc_descr_multiline:{rules:[5,6],inclusive:!1},acc_descr:{rules:[3],inclusive:!1},acc_title:{rules:[1],inclusive:!1},block_bq:{rules:[27,28],inclusive:!1},block:{rules:[22,23,24,25,26,29,30,31,32],inclusive:!1},INITIAL:{rules:[0,2,4,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,33,34,35,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,80,81,82],inclusive:!0}}};return Re})();pe.lexer=_e;function Ee(){this.yy={}}return s(Ee,"Parser"),Ee.prototype=pe,pe.Parser=Ee,new Ee})();N$.parser=N$;Qbe=N$});var b5,e2e=F(()=>{"use strict";Tt();Zt();Gr();An();Qt();b5=class{constructor(){this.entities=new Map;this.relationships=[];this.classes=new Map;this.subgraphDepth=0;this.subGraphs=[];this.subGraphLookup=new Map;this.subCount=0;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=Cr;this.getAccTitle=Sr;this.setAccDescription=Er;this.getAccDescription=Ar;this.setDiagramTitle=Mr;this.getDiagramTitle=Rr;this.getConfig=s(()=>Le().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),this.addSubGraph=this.addSubGraph.bind(this)}static{s(this,"ErDB")}addEntity(t,r=""){return this.entities.has(t)?!this.entities.get(t)?.alias&&r&&(this.entities.get(t).alias=r,te.info(`Add alias '${r}' to entity '${t}'`)):(this.entities.set(t,{id:`entity-${t}-${this.entities.size}`,label:t,attributes:[],alias:r,shape:"erBox",look:Le().look??"default",cssClasses:"default",cssStyles:[],labelType:"markdown"}),te.info("Added new entity :",t)),this.entities.get(t)}getEntity(t){return this.entities.get(t)}getEntities(){return this.entities}getClasses(){return this.classes}addAttributes(t,r){let n=this.addEntity(t),i;for(i=r.length-1;i>=0;i--)r[i].keys||(r[i].keys=[]),r[i].comment||(r[i].comment=""),n.attributes.push(r[i]),te.debug("Added attribute ",r[i].name)}addRelationship(t,r,n,i){let a;if(this.subGraphLookup.has(t))a=t;else{let u=this.addEntity(t);if(!u)return;a=u.id}let o;if(this.subGraphLookup.has(n))o=n;else{let u=this.addEntity(n);if(!u)return;o=u.id}let l={entityA:a,roleA:r,entityB:o,relSpec:i};this.relationships.push(l),te.debug("Added new relationship :",l)}getRelationships(){return this.relationships}getDirection(){return this.direction}setDirection(t){this.direction=t}getCompiledStyles(t){let r=[];for(let n of t){let i=this.classes.get(n);i?.styles&&(r=[...r,...i.styles??[]].map(a=>a.trim())),i?.textStyles&&(r=[...r,...i.textStyles??[]].map(a=>a.trim()))}return r}addCssStyles(t,r){for(let n of t){let i=this.entities.get(n),a=this.subGraphLookup.get(n);if(r){if(i)for(let o of r)i.cssStyles.push(o);if(a){a.cssStyles||(a.cssStyles=[]);for(let o of r)a.cssStyles.push(o)}}}}addClass(t,r){t.forEach(n=>{let i=this.classes.get(n);i===void 0&&(i={id:n,styles:[],textStyles:[]},this.classes.set(n,i)),r&&r.forEach(function(a){if(/color/.exec(a)){let o=a.replace("fill","bgFill");i.textStyles.push(o)}i.styles.push(a)})})}addSubGraph(t,r,n){let i=t.text.trim(),a=n.text,l=s(f=>{let p=new Set,m;return{nodeList:f.filter(y=>{if(y?.stmt)return y.stmt==="dir"&&(m=y.value),!1;if(typeof y!="string")return!1;let v=y.trim();return!v||p.has(v)?!1:(p.add(v),!0)}),dir:m}},"uniq")(r.flat()),u=l.nodeList,h=l.dir;i=i??"subGraph"+this.subCount,a=a||"",a=this.sanitizeText(a),this.subCount=this.subCount+1;let d={id:i,nodes:u,title:a.trim(),classes:[],cssStyles:[],dir:h,labelType:this.sanitizeNodeLabelType(n?.type)};return te.info("Adding",d.id,d.nodes,d.dir),d.nodes=this.makeUniq(d,this.subGraphs).nodes,this.subGraphs.push(d),this.subGraphLookup.set(i,d),i}getSubGraphs(){return this.subGraphs}setClass(t,r){for(let n of t){let i=this.entities.get(n);if(i)for(let o of r)i.cssClasses+=" "+o;let a=this.subGraphLookup.get(n);if(a)for(let o of r)a.classes.push(o)}}subgraphNodeCache(t){let r=new Set;for(let n of t)for(let i of n.nodes)r.add(i);return r}makeUniq(t,r){let n=this.subgraphNodeCache(r),i=[];return t.nodes.forEach((a,o)=>{n.has(a)?te.warn(`Entity '${a}' already belongs to another subgraph and will be ignored`):i.push(t.nodes[o])}),{nodes:i}}sanitizeText(t){return xt.sanitizeText(t,Le())}sanitizeNodeLabelType(t){switch(t){case"markdown":case"string":case"text":return t;default:return"markdown"}}clear(){this.entities=new Map,this.classes=new Map,this.relationships=[],this.subGraphs=[],this.subGraphLookup=new Map,this.subCount=0,this.subgraphDepth=0,gr()}getData(){let t=[],r=[],n=Le(),i=this.getSubGraphs(),a=new Map,o=new Map;for(let d=i.length-1;d>=0;d--){let f=i[d];f.nodes.length>0&&o.set(f.id,!0);for(let p of f.nodes)a.set(p,f.id)}for(let d=i.length-1;d>=0;d--){let f=i[d];t.push({id:f.id,label:f.title,labelStyle:"",labelType:f.labelType,parentId:a.get(f.id),padding:8,cssCompiledStyles:this.getCompiledStyles(f.classes),cssStyles:f.cssStyles,cssClasses:f.classes.join(" "),shape:"rect",dir:f.dir,isGroup:!0,look:n.look})}let l=new Set(i.map(d=>d.id)),u=0;for(let d of this.entities.keys()){if(l.has(d))continue;let f=this.entities.get(d);f&&(f.cssCompiledStyles=this.getCompiledStyles(f.cssClasses.split(" ")),f.colorIndex=u++,t.push({...f,parentId:a.get(d),isGroup:!1}))}let h=0;for(let d of this.relationships){let f={id:xc(d.entityA,d.entityB,{prefix:"id",counter:h++}),type:"normal",curve:"basis",start:d.entityA,end:d.entityB,label:d.roleA,labelpos:"c",thickness:"normal",classes:"relationshipLine",arrowTypeStart:d.relSpec.cardB.toLowerCase(),arrowTypeEnd:d.relSpec.cardA.toLowerCase(),pattern:d.relSpec.relType=="IDENTIFYING"?"solid":"dashed",look:n.look,labelType:"markdown"};r.push(f)}return{nodes:t,edges:r,other:{},config:n,direction:this.direction}}}});var P$={};ar(P$,{draw:()=>pht});var pht,t2e=F(()=>{"use strict";Zt();Tt();Hp();vf();xf();Qt();$r();pht=s(async function(e,t,r,n){te.info("REF0:"),te.info("Drawing er diagram (unified)",t);let{securityLevel:i,er:a,layout:o}=Le(),l=n.db.getData(),u=Uo(t,i);l.type=n.type,l.layoutAlgorithm=Yc(o),l.config.flowchart.nodeSpacing=a?.nodeSpacing||140,l.config.flowchart.rankSpacing=a?.rankSpacing||80,l.direction=n.db.getDirection();let{config:h}=l,{look:d}=h;d==="neo"?l.markers=["only_one_neo","zero_or_one_neo","one_or_more_neo","zero_or_more_neo"]:l.markers=["only_one","zero_or_one","one_or_more","zero_or_more"],l.diagramId=t,await il(l,u),l.layoutAlgorithm==="elk"&&u.select(".edges").lower();let f=u.selectAll('[id*="-background"]');Array.from(f).length>0&&f.each(function(){let m=lt(this),y=m.attr("id").replace("-background",""),v=u.select(`#${CSS.escape(y)}`);if(!v.empty()){let x=v.attr("transform");m.attr("transform",x)}});let p=8;sr.insertTitle(u,"erDiagramTitleText",a?.titleTopMargin??25,n.db.getDiagramTitle()),Js(u,p,"erDiagram",a?.useMaxWidth??!0)},"draw")});var r2e,T5,mht,ght,n2e,i2e=F(()=>{"use strict";Di();r2e=s((e,t)=>{let r=rp,n=r(e,"r"),i=r(e,"g"),a=r(e,"b");return Ai(n,i,a,t)},"fade"),T5=new Set(["redux-color","redux-dark-color"]),mht=s(e=>{let{theme:t,look:r,bkgColorArray:n,borderColorArray:i}=e;if(!T5.has(t))return"";let a=n?.length>0,o="";for(let l=0;l{let{look:t,theme:r,erEdgeLabelBackground:n,strokeWidth:i}=e;return` + ${mht(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: ${T5.has(r)&&n?n:r2e(e.tertiaryColor,.5)}; + } + + .edgeLabel { + background-color: ${T5.has(r)&&n?n:e.edgeLabelBackground}; + } + .edgeLabel .label rect { + fill: ${T5.has(r)&&n?n:e.edgeLabelBackground}; + } + .edgeLabel .label text { + fill: ${e.textColor}; + } + + .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: ${t==="neo"?i:"1px"}; + } + + .relationshipLine { + stroke: ${e.lineColor}; + stroke-width: ${t==="neo"?i:"1px"}; + fill: none; + } + + .marker { + fill: none !important; + stroke: ${e.lineColor} !important; + stroke-width: 1; + } + [data-look=neo].labelBkg { + background-color: ${r2e(e.tertiaryColor,.5)}; + } + + .cluster rect { + fill: ${e.clusterBkg??e.mainBkg}; + stroke: ${e.clusterBorder??e.nodeBorder}; + stroke-width: 1px; + } + + .cluster text { + fill: ${e.titleColor??e.textColor}; + } + + .cluster-label text { + fill: ${e.titleColor??e.textColor}; + } +`},"getStyles"),n2e=ght});var a2e={};ar(a2e,{diagram:()=>yht});var yht,s2e=F(()=>{"use strict";Jbe();e2e();t2e();i2e();yht={parser:Qbe,get db(){return new b5},renderer:P$,styles:n2e}});function Vi(e){return typeof e=="object"&&e!==null&&typeof e.$type=="string"}function Cs(e){return typeof e=="object"&&e!==null&&typeof e.$refText=="string"&&"ref"in e}function iu(e){return typeof e=="object"&&e!==null&&typeof e.$refText=="string"&&"items"in e}function Nz(e){return typeof e=="object"&&e!==null&&typeof e.name=="string"&&typeof e.type=="string"&&typeof e.path=="string"}function Bm(e){return typeof e=="object"&&e!==null&&typeof e.info=="object"&&typeof e.message=="string"}function dh(e){return typeof e=="object"&&e!==null&&Array.isArray(e.content)}function pg(e){return typeof e=="object"&&e!==null&&typeof e.tokenType=="object"}function nR(e){return dh(e)&&typeof e.fullText=="string"}function _Te(e){return typeof e=="string"?e:typeof e>"u"?"undefined":typeof e.toString=="function"?e.toString():Object.prototype.toString.call(e)}function nC(e){return!!e&&typeof e[Symbol.iterator]=="function"}function Ln(...e){if(e.length===1){let t=e[0];if(t instanceof ru)return t;if(nC(t))return new ru(()=>t[Symbol.iterator](),r=>r.next());if(typeof t.length=="number")return new ru(()=>({index:0}),r=>r.index1?new ru(()=>({collIndex:0,arrIndex:0}),t=>{do{if(t.iterator){let r=t.iterator.next();if(!r.done)return r;t.iterator=void 0}if(t.array){if(t.arrIndex{Vi(i)&&(i.$container=e,i.$containerProperty=r,i.$containerIndex=a,t.deep&&M1(i,t))}):Vi(n)&&(n.$container=e,n.$containerProperty=r,t.deep&&M1(n,t)))}function mg(e,t){let r=e;for(;r;){if(t(r))return r;r=r.$container}}function LTe(e,t){let r=e;for(;r;){if(t(r))return!0;r=r.$container}return!1}function Yl(e){let r=R1(e).$document;if(!r)throw new Error("AST node has no document.");return r}function R1(e){for(;e.$container;)e=e.$container;return e}function mA(e){return Cs(e)?e.ref?[e.ref]:[]:iu(e)?e.items.map(t=>t.ref):[]}function vC(e,t){if(!e)throw new Error("Node must be an AstNode.");let r=t?.range;return new ru(()=>({keys:Object.keys(e),keyIndex:0,arrayIndex:0}),n=>{for(;n.keyIndexvC(r,t))}function jl(e,t){if(e){if(t?.range&&!gA(e,t.range))return new I1(e,()=>[])}else throw new Error("Root node must be an AstNode.");return new I1(e,r=>vC(r,t),{includeRoot:!0})}function gA(e,t){if(!t)return!0;let r=e.$cstNode?.range;return r?sV(r,t):!1}function N1(e){return new ru(()=>({keys:Object.keys(e),keyIndex:0,arrayIndex:0}),t=>{for(;t.keyIndexdh(t)?t.content:[],{includeRoot:!0})}function XTe(e){return O1(e).filter(pg)}function iV(e,t){for(;e.container;)if(e=e.container,e===t)return!0;return!1}function aC(e){return{start:{character:e.startColumn-1,line:e.startLine-1},end:{character:e.endColumn,line:e.endLine-1}}}function B1(e){if(!e)return;let{offset:t,end:r,range:n}=e;return{range:n,offset:t,end:r,length:r-t}}function aV(e,t){if(e.end.linet.end.line||e.start.line===t.end.line&&e.start.character>=t.end.character)return tu.After;let r=e.start.line>t.start.line||e.start.line===t.start.line&&e.start.character>=t.start.character,n=e.end.linetu.After}function KTe(e,t,r=oV){if(e){if(t>0){let n=t-e.offset,i=e.text.charAt(n);r.test(i)||t--}return uR(e,t)}}function lV(e,t){if(e){let r=hV(e,!0);if(r&&DA(r,t))return r;if(nR(e)){let n=e.content.findIndex(i=>!i.hidden);for(let i=n-1;i>=0;i--){let a=e.content[i];if(DA(a,t))return a}}}}function DA(e,t){return pg(e)&&t.includes(e.tokenType.name)}function uR(e,t){if(pg(e))return e;if(dh(e)){let r=uV(e,t,!1);if(r)return uR(r,t)}}function cV(e,t){if(pg(e))return e;if(dh(e)){let r=uV(e,t,!0);if(r)return cV(r,t)}}function uV(e,t,r){let n=0,i=e.content.length-1,a;for(;n<=i;){let o=Math.floor((n+i)/2),l=e.content[o];if(l.offset<=t&&l.end>t)return l;l.end<=t?(a=r?l:void 0,n=o+1):i=o-1}return a}function hV(e,t=!0){for(;e.container;){let r=e.container,n=r.content.indexOf(e);for(;n>0;){n--;let i=r.content[n];if(t||!i.hidden)return i}e=r}}function ZTe(e,t=!0){for(;e.container;){let r=e.container,n=r.content.indexOf(e),i=r.content.length-1;for(;nt.test(r))}function W1(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function gV(e,t){let r=yV(e),n=t.match(r);return!!n&&n[0].length>0}function yV(e){typeof e=="string"&&(e=new RegExp(e));let t=e,r=e.source,n=0;function i(){let a="",o;function l(h){a+=r.substr(n,h),n+=h}s(l,"appendRaw"),_(l,"appendRaw");function u(h){a+="(?:"+r.substr(n,h)+"|$)",n+=h}for(s(u,"appendOptional"),_(u,"appendOptional");n",n)-n+1);break;default:u(2);break}break;case"[":o=/\[(?:\\.|.)*?\]/g,o.lastIndex=n,o=o.exec(r)||[],u(o[0].length);break;case"|":case"^":case"$":case"*":case"+":case"?":l(1);break;case"{":o=/\{\d+,?\d*\}/g,o.lastIndex=n,o=o.exec(r),o?l(o[0].length):u(1);break;case"(":if(r[n+1]==="?")switch(r[n+2]){case":":a+="(?:",n+=3,a+=i()+"|$)";break;case"=":a+="(?=",n+=3,a+=i()+")";break;case"!":o=n,n+=3,i(),a+=r.substr(o,n-o);break;case"<":switch(r[n+3]){case"=":case"!":o=n,n+=4,i(),a+=r.substr(o,n-o);break;default:l(r.indexOf(">",n)-n+1),a+=i()+"|$)";break}break}else l(1),a+=i()+"|$)";break;case")":return++n,a;default:u(1);break}return a}return s(i,"process2"),_(i,"process"),new RegExp(i(),e.flags)}function vV(e){return e.rules.find(t=>Ss(t)&&t.entry)}function xV(e){return e.rules.filter(t=>sl(t)&&t.hidden)}function pR(e,t){let r=new Set,n=vV(e);if(!n)return new Set(e.rules);let i=[n].concat(xV(e));for(let o of i)bV(o,r,t);let a=new Set;for(let o of e.rules)(r.has(o.name)||sl(o)&&o.hidden)&&a.add(o);return a}function bV(e,t,r){t.add(e.name),Th(e).forEach(n=>{if(mh(n)||r&&oR(n)){let i=n.rule.ref;i&&!t.has(i.name)&&bV(i,t,r)}})}function sCe(e){let t=new Set;return Th(e).forEach(r=>{yg(r)&&(Ss(r.type.ref)&&t.add(r.type.ref),xC(r.type.ref)&&Ss(r.type.ref.$container)&&t.add(r.type.ref.$container))}),t}function TV(e){if(e.terminal)return e.terminal;if(e.type.ref)return vR(e.type.ref)?.terminal}function CV(e){return e.hidden&&!fR(CC(e))}function kV(e,t){return!e||!t?[]:gR(e,t,e.astNode,!0)}function mR(e,t,r){if(!e||!t)return;let n=gR(e,t,e.astNode,!0);if(n.length!==0)return r!==void 0?r=Math.max(0,Math.min(r,n.length-1)):r=0,n[r]}function gR(e,t,r,n){if(!n){let i=mg(e.grammarSource,fh);if(i&&i.feature===t)return[e]}return dh(e)&&e.astNode===r?e.content.flatMap(i=>gR(i,t,r,!1)):[]}function oCe(e,t){return e?yR(e,t,e?.astNode):[]}function wV(e,t,r){if(!e)return;let n=yR(e,t,e?.astNode);if(n.length!==0)return r!==void 0?r=Math.max(0,Math.min(r,n.length-1)):r=0,n[r]}function yR(e,t,r){if(e.astNode!==r)return[];if(ph(e.grammarSource)&&e.grammarSource.value===t)return[e];let n=O1(e).iterator(),i,a=[];do if(i=n.next(),!i.done){let o=i.value;o.astNode===r?ph(o.grammarSource)&&o.grammarSource.value===t&&a.push(o):n.prune()}while(!i.done);return a}function SV(e){let t=e.astNode;for(;t===e.container?.astNode;){let r=mg(e.grammarSource,fh);if(r)return r;e=e.container}}function vR(e){let t=e;return xC(t)&&(If(t.$container)?t=t.$container.$container:gg(t.$container)?t=t.$container:Of(t.$container)),EV(e,t,new Map)}function EV(e,t,r){function n(i,a){let o;return mg(i,fh)||(o=EV(a,a,r)),r.set(e,o),o}if(s(n,"go"),_(n,"go"),r.has(e))return r.get(e);r.set(e,void 0);for(let i of Th(t)){if(fh(i)&&i.feature.toLowerCase()==="name")return r.set(e,i),i;if(mh(i)&&Ss(i.rule.ref))return n(i,i.rule.ref);if(sR(i)&&i.typeRef?.ref)return n(i,i.typeRef.ref)}}function AV(e){let t=e.$container;if(vg(t)){let r=t.elements,n=r.indexOf(e);for(let i=n-1;i>=0;i--){let a=r[i];if(If(a))return a;{let o=Th(r[i]).find(If);if(o)return o}}}if(iR(t))return AV(t)}function lCe(e,t){return e==="?"||e==="*"||vg(t)&&!!t.guardCondition}function cCe(e){return e==="*"||e==="+"}function uCe(e){return e==="+="}function bC(e){return RV(e,new Set)}function RV(e,t){if(t.has(e))return!0;t.add(e);for(let r of Th(e))if(mh(r)){if(!r.rule.ref||Ss(r.rule.ref)&&!RV(r.rule.ref,t)||P1(r.rule.ref))return!1}else{if(fh(r))return!1;if(If(r))return!1}return!!e.definition}function hCe(e){return NA(e.type,new Set)}function NA(e,t){if(t.has(e))return!0;if(t.add(e),Fz(e))return!1;if(Xz(e))return!1;if(eV(e))return e.types.every(r=>NA(r,t));if(sR(e)){if(e.primitiveType!==void 0)return!0;if(e.stringType!==void 0)return!0;if(e.typeRef!==void 0){let r=e.typeRef.ref;return lR(r)?NA(r.type,t):!1}else return!1}else return!1}function TC(e){if(!sl(e)){if(e.inferredType)return e.inferredType.name;if(e.dataType)return e.dataType;if(e.returnType){let t=e.returnType.ref;if(t)return t.name}}}function ug(e){if(gg(e))return Ss(e)&&bC(e)?e.name:TC(e)??e.name;if(Hz(e)||lR(e)||Zz(e))return e.name;if(If(e)){let t=_V(e);if(t)return t}else if(xC(e))return e.name;throw new Error("Cannot get name of Unknown Type")}function _V(e){if(e.inferredType)return e.inferredType.name;if(e.type?.ref)return ug(e.type.ref)}function dCe(e){return sl(e)?e.type?.name??"string":Ss(e)&&bC(e)?e.name:TC(e)??e.name}function LV(e){return sl(e)?e.type?.name??"string":TC(e)??e.name}function CC(e){let t={s:!1,i:!1,u:!1},r=xg(e.definition,t),n=Object.entries(t).filter(([,i])=>i).map(([i])=>i).join("");return new RegExp(r,n)}function xg(e,t){if(Qz(e))return fCe(e);if(Jz(e))return pCe(e);if(zz(e))return yCe(e);if(oR(e)){let r=e.rule.ref;if(!r)throw new Error("Missing rule reference.");return au(xg(r.definition),{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized})}else{if(Uz(e))return gCe(e);if(tV(e))return mCe(e);if(Kz(e)){let r=e.regex.lastIndexOf("/"),n=e.regex.substring(1,r),i=e.regex.substring(r+1);return t&&(t.i=i.includes("i"),t.s=i.includes("s"),t.u=i.includes("u")),au(n,{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized,wrap:!1})}else{if(rV(e))return au(DV,{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized});throw new Error(`Invalid terminal element: ${e?.$type}, ${e?.$cstNode?.text}`)}}}function fCe(e){return au(e.elements.map(t=>xg(t)).join("|"),{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized,wrap:!1})}function pCe(e){return au(e.elements.map(t=>xg(t)).join(""),{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized,wrap:!1})}function mCe(e){return au(`${DV}*?${xg(e.terminal)}`,{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized})}function gCe(e){return au(`(?!${xg(e.terminal)})${DV}*?`,{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized})}function yCe(e){return e.right?au(`[${j5(e.left)}-${j5(e.right)}]`,{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized,wrap:!1}):au(j5(e.left),{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized,wrap:!1})}function j5(e){return W1(e.value)}function au(e,t){return(t.parenthesized||t.lookahead||t.wrap!==!1)&&(e=`(${t.lookahead??(t.parenthesized?"":"?:")}${e})`),t.cardinality?`${e}${t.cardinality}`:e}function IV(e){let t=[],r=e.Grammar;for(let n of r.rules)sl(n)&&CV(n)&&mV(CC(n))&&t.push(n.name);return{multilineCommentRules:t,nameRegexp:oV}}function PA(e){console&&console.error&&console.error(`Error: ${e}`)}function MV(e){console&&console.warn&&console.warn(`Warning: ${e}`)}function NV(e){let t=new Date().getTime(),r=e();return{time:new Date().getTime()-t,value:r}}function PV(e){function t(){}s(t,"FakeConstructor"),_(t,"FakeConstructor"),t.prototype=e;let r=new t;function n(){return typeof r.bar}return s(n,"fakeAccess"),_(n,"fakeAccess"),n(),n(),e;(0,eval)(e)}function vCe(e){return xCe(e)?e.LABEL:e.name}function xCe(e){return typeof e.LABEL=="string"&&e.LABEL!==""}function bCe(e){return e.map(KT)}function KT(e){function t(r){return r.map(KT)}if(s(t,"convertDefinition"),_(t,"convertDefinition"),e instanceof Es){let r={type:"NonTerminal",name:e.nonTerminalName,idx:e.idx};return typeof e.label=="string"&&(r.label=e.label),r}else{if(e instanceof ro)return{type:"Alternative",definition:t(e.definition)};if(e instanceof Na)return{type:"Option",idx:e.idx,definition:t(e.definition)};if(e instanceof Ro)return{type:"RepetitionMandatory",idx:e.idx,definition:t(e.definition)};if(e instanceof _o)return{type:"RepetitionMandatoryWithSeparator",idx:e.idx,separator:KT(new Jn({terminalType:e.separator})),definition:t(e.definition)};if(e instanceof no)return{type:"RepetitionWithSeparator",idx:e.idx,separator:KT(new Jn({terminalType:e.separator})),definition:t(e.definition)};if(e instanceof wi)return{type:"Repetition",idx:e.idx,definition:t(e.definition)};if(e instanceof io)return{type:"Alternation",idx:e.idx,definition:t(e.definition)};if(e instanceof Jn){let r={type:"Terminal",name:e.terminalType.name,label:vCe(e.terminalType),idx:e.idx};typeof e.label=="string"&&(r.terminalLabel=e.label);let n=e.terminalType.PATTERN;return e.terminalType.PATTERN&&(r.pattern=n instanceof RegExp?n.source:n),r}else{if(e instanceof q1)return{type:"Rule",name:e.name,orgText:e.orgText,definition:t(e.definition)};throw Error("non exhaustive match")}}}function Xl(e){return Object.fromEntries(Object.entries(e).filter(([,t])=>t!==void 0))}function TCe(e){return e instanceof ro||e instanceof Na||e instanceof wi||e instanceof Ro||e instanceof _o||e instanceof no||e instanceof Jn||e instanceof q1}function sC(e,t=[]){return e instanceof Na||e instanceof wi||e instanceof no?!0:e instanceof io?e.definition.some(n=>sC(n,t)):e instanceof Es&&t.includes(e)?!1:e instanceof ou?(e instanceof Es&&t.push(e),e.definition.every(n=>sC(n,t))):!1}function CCe(e){return e instanceof io}function Hl(e){if(e instanceof Es)return"SUBRULE";if(e instanceof Na)return"OPTION";if(e instanceof io)return"OR";if(e instanceof Ro)return"AT_LEAST_ONE";if(e instanceof _o)return"AT_LEAST_ONE_SEP";if(e instanceof no)return"MANY_SEP";if(e instanceof wi)return"MANY";if(e instanceof Jn)return"CONSUME";throw Error("non exhaustive match")}function iG(e,t,r){return[new Na({definition:[new Jn({terminalType:e.separator})].concat(e.definition)})].concat(t,r)}function U1(e){if(e instanceof Es)return U1(e.referencedRule);if(e instanceof Jn)return SCe(e);if(TCe(e))return kCe(e);if(CCe(e))return wCe(e);throw Error("non exhaustive match")}function kCe(e){let t=[],r=e.definition,n=0,i=r.length>n,a,o=!0;for(;i&&o;)a=r[n],o=sC(a),t=t.concat(U1(a)),n=n+1,i=r.length>n;return[...new Set(t)]}function wCe(e){let t=e.definition.map(r=>U1(r));return[...new Set(t.flat())]}function SCe(e){return[e.terminalType]}function ACe(e){let t={};return e.forEach(r=>{let n=new ldt(r).startWalking();Object.assign(t,n)}),t}function RCe(e,t){return e.name+t+ECe}function kC(e){let t=e.toString();if(X5.hasOwnProperty(t))return X5[t];{let r=cdt.pattern(t);return X5[t]=r,r}}function _Ce(){X5={}}function DCe(e,t=!1){try{let r=kC(e);return BA(r.value,{},r.flags.ignoreCase)}catch(r){if(r.message===LCe)t&&MV(`${OA} Unable to optimize: < ${e.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 n="";t&&(n=` + This will disable the lexer's first char optimizations. + See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#REGEXP_PARSING for details.`),PA(`${OA} + Failed parsing: < ${e.toString()} > + Using the @chevrotain/regexp-to-ast library + Please open an issue at: https://github.com/chevrotain/chevrotain/issues`+n)}}return[]}function BA(e,t,r){switch(e.type){case"Disjunction":for(let i=0;i{if(typeof u=="number")$T(u,t,r);else{let h=u;if(r===!0)for(let d=h.from;d<=h.to;d++)$T(d,t,r);else{for(let d=h.from;d<=h.to&&d=GT){let d=h.from>=GT?h.from:GT,f=h.to,p=gh(d),m=gh(f);for(let g=p;g<=m;g++)t[g]=g}}}});break;case"Group":BA(o.value,t,r);break;default:throw Error("Non Exhaustive Match")}let l=o.quantifier!==void 0&&o.quantifier.atLeast===0;if(o.type==="Group"&&$A(o)===!1||o.type!=="Group"&&l===!1)break}break;default:throw Error("non exhaustive match!")}return Object.values(t)}function $T(e,t,r){let n=gh(e);t[n]=n,r===!0&&ICe(e,t)}function ICe(e,t){let r=String.fromCharCode(e),n=r.toUpperCase();if(n!==r){let i=gh(n.charCodeAt(0));t[i]=i}else{let i=r.toLowerCase();if(i!==r){let a=gh(i.charCodeAt(0));t[a]=a}}}function aG(e,t){return e.value.find(r=>{if(typeof r=="number")return t.includes(r);{let n=r;return t.find(i=>n.from<=i&&i<=n.to)!==void 0}})}function $A(e){let t=e.quantifier;return t&&t.atLeast===0?!0:e.value?Array.isArray(e.value)?e.value.every($A):$A(e.value):!1}function bR(e,t){if(t instanceof RegExp){let r=kC(t),n=new udt(e);return n.visit(r),n.found}else{for(let r of t){let n=r.charCodeAt(0);if(e.includes(n))return!0}return!1}}function MCe(e,t){t=Object.assign({safeMode:!1,positionTracking:"full",lineTerminatorCharacters:["\r",` +`],tracer:_((b,T)=>T(),"tracer")},t);let r=t.tracer;r("initCharCodeToOptimizedIndexMap",()=>{eke()});let n;r("Reject Lexer.NA",()=>{n=e.filter(b=>b[hg]!==ws.NA)});let i=!1,a;r("Transform Patterns",()=>{i=!1,a=n.map(b=>{let T=b[hg];if(T instanceof RegExp){let w=T.source;return w.length===1&&w!=="^"&&w!=="$"&&w!=="."&&!T.ignoreCase?w:w.length===2&&w[0]==="\\"&&!["d","D","s","S","t","r","n","t","0","c","b","B","f","v","w","W"].includes(w[1])?w[1]:sG(T)}else{if(typeof T=="function")return i=!0,{exec:T};if(typeof T=="object")return i=!0,T;if(typeof T=="string"){if(T.length===1)return T;{let w=T.replace(/[\\^$.*+?()[\]{}|]/g,"\\$&"),C=new RegExp(w);return sG(C)}}else throw Error("non exhaustive match")}})});let o,l,u,h,d;r("misc mapping",()=>{o=n.map(b=>b.tokenTypeIdx),l=n.map(b=>{let T=b.GROUP;if(T!==ws.SKIPPED){if(typeof T=="string")return T;if(T===void 0)return!1;throw Error("non exhaustive match")}}),u=n.map(b=>{let T=b.LONGER_ALT;if(T)return Array.isArray(T)?T.map(C=>n.indexOf(C)):[n.indexOf(T)]}),h=n.map(b=>b.PUSH_MODE),d=n.map(b=>Object.hasOwn(b,"POP_MODE"))});let f;r("Line Terminator Handling",()=>{let b=$V(t.lineTerminatorCharacters);f=n.map(T=>!1),t.positionTracking!=="onlyOffset"&&(f=n.map(T=>Object.hasOwn(T,"LINE_BREAKS")?!!T.LINE_BREAKS:BV(T,b)===!1&&bR(b,T.PATTERN)))});let p,m,g,y;r("Misc Mapping #2",()=>{p=n.map(OV),m=a.map(QCe),g=n.reduce((b,T)=>{let w=T.GROUP;return typeof w=="string"&&w!==ws.SKIPPED&&(b[w]=[]),b},{}),y=a.map((b,T)=>({pattern:a[T],longerAlt:u[T],canLineTerminator:f[T],isCustom:p[T],short:m[T],group:l[T],push:h[T],pop:d[T],tokenTypeIdx:o[T],tokenType:n[T]}))});let v=!0,x=[];return t.safeMode||r("First Char Optimization",()=>{x=n.reduce((b,T,w)=>{if(typeof T.PATTERN=="string"){let C=T.PATTERN.charCodeAt(0),k=gh(C);K5(b,k,y[w])}else if(Array.isArray(T.START_CHARS_HINT)){let C;T.START_CHARS_HINT.forEach(k=>{let S=typeof k=="string"?k.charCodeAt(0):k,A=gh(S);C!==A&&(C=A,K5(b,A,y[w]))})}else if(T.PATTERN instanceof RegExp)if(T.PATTERN.unicode)v=!1,t.ensureOptimizations&&PA(`${OA} Unable to analyze < ${T.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{let C=DCe(T.PATTERN,t.ensureOptimizations);C.length===0&&(v=!1),C.forEach(k=>{K5(b,k,y[w])})}else t.ensureOptimizations&&PA(`${OA} TokenType: <${T.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`),v=!1;return b},[])}),{emptyGroups:g,patternIdxToConfig:y,charCodeToPatternIdxToConfig:x,hasCustom:i,canBeOptimized:v}}function NCe(e,t){let r=[],n=OCe(e);r=r.concat(n.errors);let i=BCe(n.valid),a=i.valid;return r=r.concat(i.errors),r=r.concat(PCe(a)),r=r.concat(WCe(a)),r=r.concat(qCe(a,t)),r=r.concat(HCe(a)),r}function PCe(e){let t=[],r=e.filter(n=>n[hg]instanceof RegExp);return t=t.concat($Ce(r)),t=t.concat(GCe(r)),t=t.concat(zCe(r)),t=t.concat(VCe(r)),t=t.concat(FCe(r)),t}function OCe(e){let t=e.filter(i=>!Object.hasOwn(i,hg)),r=t.map(i=>({message:"Token Type: ->"+i.name+"<- missing static 'PATTERN' property",type:Si.MISSING_PATTERN,tokenTypes:[i]})),n=e.filter(i=>!t.includes(i));return{errors:r,valid:n}}function BCe(e){let t=e.filter(i=>{let a=i[hg];return!(a instanceof RegExp)&&typeof a!="function"&&!Object.hasOwn(a,"exec")&&typeof a!="string"}),r=t.map(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:Si.INVALID_PATTERN,tokenTypes:[i]})),n=e.filter(i=>!t.includes(i));return{errors:r,valid:n}}function $Ce(e){class t extends dR{static{s(this,"EndAnchorFinder")}static{_(this,"EndAnchorFinder")}constructor(){super(...arguments),this.found=!1}visitEndAnchor(a){this.found=!0}}return e.filter(i=>{let a=i.PATTERN;try{let o=kC(a),l=new t;return l.visit(o),l.found}catch{return hdt.test(a.source)}}).map(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:Si.EOI_ANCHOR_FOUND,tokenTypes:[i]}))}function FCe(e){return e.filter(n=>n.PATTERN.test("")).map(n=>({message:"Token Type: ->"+n.name+"<- static 'PATTERN' must not match an empty string",type:Si.EMPTY_MATCH_PATTERN,tokenTypes:[n]}))}function GCe(e){class t extends dR{static{s(this,"StartAnchorFinder")}static{_(this,"StartAnchorFinder")}constructor(){super(...arguments),this.found=!1}visitStartAnchor(a){this.found=!0}}return e.filter(i=>{let a=i.PATTERN;try{let o=kC(a),l=new t;return l.visit(o),l.found}catch{return ddt.test(a.source)}}).map(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:Si.SOI_ANCHOR_FOUND,tokenTypes:[i]}))}function zCe(e){return e.filter(n=>{let i=n[hg];return i instanceof RegExp&&(i.multiline||i.global)}).map(n=>({message:"Token Type: ->"+n.name+"<- static 'PATTERN' may NOT contain global('g') or multiline('m')",type:Si.UNSUPPORTED_FLAGS_FOUND,tokenTypes:[n]}))}function VCe(e){let t=[],r=e.map(a=>e.reduce((o,l)=>(a.PATTERN.source===l.PATTERN.source&&!t.includes(l)&&l.PATTERN!==ws.NA&&(t.push(l),o.push(l)),o),[]));return r=r.filter(Boolean),r.filter(a=>a.length>1).map(a=>{let o=a.map(u=>u.name);return{message:`The same RegExp pattern ->${a[0].PATTERN}<-has been used in all of the following Token Types: ${o.join(", ")} <-`,type:Si.DUPLICATE_PATTERNS_FOUND,tokenTypes:a}})}function WCe(e){return e.filter(n=>{if(!Object.hasOwn(n,"GROUP"))return!1;let i=n.GROUP;return i!==ws.SKIPPED&&i!==ws.NA&&typeof i!="string"}).map(n=>({message:"Token Type: ->"+n.name+"<- static 'GROUP' can only be Lexer.SKIPPED/Lexer.NA/A String",type:Si.INVALID_GROUP_TYPE_FOUND,tokenTypes:[n]}))}function qCe(e,t){return e.filter(i=>i.PUSH_MODE!==void 0&&!t.includes(i.PUSH_MODE)).map(i=>({message:`Token Type: ->${i.name}<- static 'PUSH_MODE' value cannot refer to a Lexer Mode ->${i.PUSH_MODE}<-which does not exist`,type:Si.PUSH_MODE_DOES_NOT_EXIST,tokenTypes:[i]}))}function HCe(e){let t=[],r=e.reduce((n,i,a)=>{let o=i.PATTERN;return o===ws.NA||(typeof o=="string"?n.push({str:o,idx:a,tokenType:i}):o instanceof RegExp&&YCe(o)&&n.push({str:o.source,idx:a,tokenType:i})),n},[]);return e.forEach((n,i)=>{r.forEach(({str:a,idx:o,tokenType:l})=>{if(i${l.name}<- can never be matched. +Because it appears AFTER the Token Type ->${n.name}<-in the lexer's definition. +See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNREACHABLE`;t.push({message:u,type:Si.UNREACHABLE_PATTERN,tokenTypes:[n,l]})}})}),t}function UCe(e,t){if(t instanceof RegExp){if(jCe(t))return!1;let r=t.exec(e);return r!==null&&r.index===0}else{if(typeof t=="function")return t(e,0,[],{});if(Object.hasOwn(t,"exec"))return t.exec(e,0,[],{});if(typeof t=="string")return t===e;throw Error("non exhaustive match")}}function YCe(e){return[".","\\","[","]","|","^","$","(",")","?","*","+","{"].find(r=>e.source.indexOf(r)!==-1)===void 0}function jCe(e){return/(\(\?=)|(\(\?!)|(\(\?<=)|(\(\? property in its definition +`,type:Si.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE}),Object.hasOwn(e,k5)||n.push({message:"A MultiMode Lexer cannot be initialized without a <"+k5+`> property in its definition +`,type:Si.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY}),Object.hasOwn(e,k5)&&Object.hasOwn(e,FT)&&!Object.hasOwn(e.modes,e.defaultMode)&&n.push({message:`A MultiMode Lexer cannot be initialized with a ${FT}: <${e.defaultMode}>which does not exist +`,type:Si.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST}),Object.hasOwn(e,k5)&&Object.keys(e.modes).forEach(i=>{let a=e.modes[i];a.forEach((o,l)=>{o===void 0?n.push({message:`A Lexer cannot be initialized using an undefined Token Type. Mode:<${i}> at index: <${l}> +`,type:Si.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED}):Object.hasOwn(o,"LONGER_ALT")&&(Array.isArray(o.LONGER_ALT)?o.LONGER_ALT:[o.LONGER_ALT]).forEach(h=>{h!==void 0&&!a.includes(h)&&n.push({message:`A MultiMode Lexer cannot be initialized with a longer_alt <${h.name}> on token <${o.name}> outside of mode <${i}> +`,type:Si.MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE})})})}),n}function KCe(e,t,r){let n=[],i=!1,o=Object.values(e.modes||{}).flat().filter(Boolean).filter(u=>u[hg]!==ws.NA),l=$V(r);return t&&o.forEach(u=>{let h=BV(u,l);if(h!==!1){let f={message:JCe(u,h),type:h.issue,tokenType:u};n.push(f)}else Object.hasOwn(u,"LINE_BREAKS")?u.LINE_BREAKS===!0&&(i=!0):bR(l,u.PATTERN)&&(i=!0)}),t&&!i&&n.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:Si.NO_LINE_BREAKS_FLAGS}),n}function ZCe(e){let t={};return Object.keys(e).forEach(n=>{let i=e[n];if(Array.isArray(i))t[n]=[];else throw Error("non exhaustive match")}),t}function OV(e){let t=e.PATTERN;if(t instanceof RegExp)return!1;if(typeof t=="function")return!0;if(Object.hasOwn(t,"exec"))return!0;if(typeof t=="string")return!1;throw Error("non exhaustive match")}function QCe(e){return typeof e=="string"&&e.length===1?e.charCodeAt(0):!1}function BV(e,t){if(Object.hasOwn(e,"LINE_BREAKS"))return!1;if(e.PATTERN instanceof RegExp){try{bR(t,e.PATTERN)}catch(r){return{issue:Si.IDENTIFY_TERMINATOR,errMsg:r.message}}return!1}else{if(typeof e.PATTERN=="string")return!1;if(OV(e))return{issue:Si.CUSTOM_LINE_BREAK};throw Error("non exhaustive match")}}function JCe(e,t){if(t.issue===Si.IDENTIFY_TERMINATOR)return`Warning: unable to identify line terminator usage in pattern. + The problem is in the <${e.name}> Token Type + Root cause: ${t.errMsg}. + For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#IDENTIFY_TERMINATOR`;if(t.issue===Si.CUSTOM_LINE_BREAK)return`Warning: A Custom Token Pattern should specify the option. + The problem is in the <${e.name}> Token Type + For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_LINE_BREAK`;throw Error("non exhaustive match")}function $V(e){return e.map(r=>typeof r=="string"?r.charCodeAt(0):r)}function K5(e,t,r){e[t]===void 0?e[t]=[r]:e[t].push(r)}function gh(e){return e255?255+~~(e/255):e}}function Y1(e,t){let r=e.tokenTypeIdx;return r===t.tokenTypeIdx?!0:t.isParent===!0&&t.categoryMatchesMap[r]===!0}function oC(e,t){return e.tokenTypeIdx===t.tokenTypeIdx}function j1(e){let t=rke(e);nke(t),ake(t),ike(t),t.forEach(r=>{r.isParent=r.categoryMatches.length>0})}function rke(e){let t=[...e],r=e,n=!0;for(;n;){r=r.map(a=>a.CATEGORIES).flat().filter(Boolean);let i=r.filter(a=>!t.includes(a));t=t.concat(i),i.length===0?n=!1:r=i}return t}function nke(e){e.forEach(t=>{GV(t)||(tke[h2e]=t,t.tokenTypeIdx=h2e++),oG(t)&&!Array.isArray(t.CATEGORIES)&&(t.CATEGORIES=[t.CATEGORIES]),oG(t)||(t.CATEGORIES=[]),ske(t)||(t.categoryMatches=[]),oke(t)||(t.categoryMatchesMap={})})}function ike(e){e.forEach(t=>{t.categoryMatches=[],Object.keys(t.categoryMatchesMap).forEach(r=>{t.categoryMatches.push(tke[r].tokenTypeIdx)})})}function ake(e){e.forEach(t=>{FV([],t)})}function FV(e,t){e.forEach(r=>{t.categoryMatchesMap[r.tokenTypeIdx]=!0}),t.CATEGORIES.forEach(r=>{let n=e.concat(t);n.includes(r)||FV(n,r)})}function GV(e){return Object.hasOwn(e??{},"tokenTypeIdx")}function oG(e){return Object.hasOwn(e??{},"CATEGORIES")}function ske(e){return Object.hasOwn(e??{},"categoryMatches")}function oke(e){return Object.hasOwn(e??{},"categoryMatchesMap")}function lke(e){return Object.hasOwn(e??{},"tokenTypeIdx")}function lg(e){return zV(e)?e.LABEL:e.name}function zV(e){return typeof e.LABEL=="string"&&e.LABEL!==""}function _1(e){return cke(e)}function cke(e){let t=e.pattern,r={};if(r.name=e.name,t!==void 0&&(r.PATTERN=t),Object.hasOwn(e,pdt))throw`The parent property is no longer supported. +See: https://github.com/chevrotain/chevrotain/issues/564#issuecomment-349062346 for details.`;return Object.hasOwn(e,d2e)&&(r.CATEGORIES=e[d2e]),j1([r]),Object.hasOwn(e,f2e)&&(r.LABEL=e[f2e]),Object.hasOwn(e,p2e)&&(r.GROUP=e[p2e]),Object.hasOwn(e,g2e)&&(r.POP_MODE=e[g2e]),Object.hasOwn(e,m2e)&&(r.PUSH_MODE=e[m2e]),Object.hasOwn(e,y2e)&&(r.LONGER_ALT=e[y2e]),Object.hasOwn(e,v2e)&&(r.LINE_BREAKS=e[v2e]),Object.hasOwn(e,x2e)&&(r.START_CHARS_HINT=e[x2e]),r}function wC(e,t,r,n,i,a,o,l){return{image:t,startOffset:r,endOffset:n,startLine:i,endLine:a,startColumn:o,endColumn:l,tokenTypeIdx:e.tokenTypeIdx,tokenType:e}}function TR(e,t){return Y1(e,t)}function uke(e,t){let r=new gdt(e,t);return r.resolveRefs(),r.errors}function FA(e,t,r=[]){r=[...r];let n=[],i=0;function a(l){return l.concat(e.slice(i+1))}s(a,"remainingPathWith"),_(a,"remainingPathWith");function o(l){let u=FA(a(l),t,r);return n.concat(u)}for(s(o,"getAlternativesForProd"),_(o,"getAlternativesForProd");r.length{u.definition.length!==0&&(n=o(u.definition))}),n;if(l instanceof Jn)r.push(l.terminalType);else throw Error("non exhaustive match")}i++}return n.push({partialPath:r,suffixDef:e.slice(i)}),n}function hke(e,t,r,n){let i="EXIT_NONE_TERMINAL",a=[i],o="EXIT_ALTERNATIVE",l=!1,u=t.length,h=u-n-1,d=[],f=[];for(f.push({idx:-1,def:e,ruleStack:[],occurrenceStack:[]});f.length!==0;){let p=f.pop();if(p===o){l&&f.at(-1).idx<=h&&f.pop();continue}let m=p.def,g=p.idx,y=p.ruleStack,v=p.occurrenceStack;if(m.length===0)continue;let x=m[0];if(x===i){let b={idx:g,def:m.slice(1),ruleStack:y.slice(0,-1),occurrenceStack:v.slice(0,-1)};f.push(b)}else if(x instanceof Jn)if(g=0;b--){let T=x.definition[b],w={idx:g,def:T.definition.concat(m.slice(1)),ruleStack:y,occurrenceStack:v};f.push(w),f.push(o)}else if(x instanceof ro)f.push({idx:g,def:x.definition.concat(m.slice(1)),ruleStack:y,occurrenceStack:v});else if(x instanceof q1)f.push(dke(x,g,y,v));else throw Error("non exhaustive match")}return d}function dke(e,t,r,n){let i=[...r];i.push(e.name);let a=[...n];return a.push(1),{idx:t,def:e.definition,ruleStack:i,occurrenceStack:a}}function kR(e){if(e instanceof Na||e==="Option")return di.OPTION;if(e instanceof wi||e==="Repetition")return di.REPETITION;if(e instanceof Ro||e==="RepetitionMandatory")return di.REPETITION_MANDATORY;if(e instanceof _o||e==="RepetitionMandatoryWithSeparator")return di.REPETITION_MANDATORY_WITH_SEPARATOR;if(e instanceof no||e==="RepetitionWithSeparator")return di.REPETITION_WITH_SEPARATOR;if(e instanceof io||e==="Alternation")return di.ALTERNATION;throw Error("non exhaustive match")}function cG(e){let{occurrence:t,rule:r,prodType:n,maxLookahead:i}=e,a=kR(n);return a===di.ALTERNATION?SC(t,r,i):EC(t,r,a,i)}function fke(e,t,r,n,i,a){let o=SC(e,t,r),l=WV(o)?oC:Y1;return a(o,n,l,i)}function pke(e,t,r,n,i,a){let o=EC(e,t,i,r),l=WV(o)?oC:Y1;return a(o[0],l,n)}function mke(e,t,r,n){let i=e.length,a=e.every(o=>o.every(l=>l.length===1));if(t)return function(o){let l=o.map(u=>u.GATE);for(let u=0;uu.flat()).reduce((u,h,d)=>(h.forEach(f=>{f.tokenTypeIdx in u||(u[f.tokenTypeIdx]=d),f.categoryMatches.forEach(p=>{Object.hasOwn(u,p)||(u[p]=d)})}),u),{});return function(){let u=this.LA_FAST(1);return l[u.tokenTypeIdx]}}else return function(){for(let o=0;oa.length===1),i=e.length;if(n&&!r){let a=e.flat();if(a.length===1&&a[0].categoryMatches.length===0){let l=a[0].tokenTypeIdx;return function(){return this.LA_FAST(1).tokenTypeIdx===l}}else{let o=a.reduce((l,u,h)=>(l[u.tokenTypeIdx]=!0,u.categoryMatches.forEach(d=>{l[d]=!0}),l),[]);return function(){let l=this.LA_FAST(1);return o[l.tokenTypeIdx]===!0}}}else return function(){e:for(let a=0;aFA([o],1)),n=uG(r.length),i=r.map(o=>{let l={};return o.forEach(u=>{Q5(u.partialPath).forEach(d=>{l[d]=!0})}),l}),a=r;for(let o=1;o<=t;o++){let l=a;a=uG(l.length);for(let u=0;u{Q5(v.partialPath).forEach(b=>{i[u][b]=!0})})}}}}return n}function SC(e,t,r,n){let i=new yke(e,di.ALTERNATION,n);return t.accept(i),VV(i.result,r)}function EC(e,t,r,n){let i=new yke(e,r);t.accept(i);let a=i.result,l=new Tdt(t,e,r).startWalking(),u=new ro({definition:a}),h=new ro({definition:l});return VV([u,h],n)}function GA(e,t){e:for(let r=0;r{let i=t[n];return r===i||i.categoryMatchesMap[r.tokenTypeIdx]})}function WV(e){return e.every(t=>t.every(r=>r.every(n=>n.categoryMatches.length===0)))}function bke(e){return e.lookaheadStrategy.validate({rules:e.rules,tokenTypes:e.tokenTypes,grammarName:e.grammarName}).map(r=>Object.assign({type:As.CUSTOM_LOOKAHEAD_VALIDATION},r))}function Tke(e,t,r,n){let i=e.flatMap(u=>Cke(u,r)),a=Ike(e,t,r),o=e.flatMap(u=>Rke(u,r)),l=e.flatMap(u=>wke(u,e,n,r));return i.concat(a,o,l)}function Cke(e,t){let r=new Cdt;e.accept(r);let n=r.allProductions,i=Object.groupBy(n,kke),a=Object.fromEntries(Object.entries(i).filter(([l,u])=>u.length>1));return Object.values(a).map(l=>{let u=l[0],h=t.buildDuplicateFoundError(e,l),d=Hl(u),f={message:h,type:As.DUPLICATE_PRODUCTIONS,ruleName:e.name,dslName:d,occurrence:u.idx},p=qV(u);return p&&(f.parameter=p),f})}function kke(e){return`${Hl(e)}_#_${e.idx}_#_${qV(e)}`}function qV(e){return e instanceof Jn?e.terminalType.name:e instanceof Es?e.nonTerminalName:""}function wke(e,t,r,n){let i=[];if(t.reduce((o,l)=>l.name===e.name?o+1:o,0)>1){let o=n.buildDuplicateRuleNameError({topLevelRule:e,grammarName:r});i.push({message:o,type:As.DUPLICATE_RULE_NAME,ruleName:e.name})}return i}function Ske(e,t,r){let n=[],i;return t.includes(e)||(i=`Invalid rule override, rule: ->${e}<- cannot be overridden in the grammar: ->${r}<-as it is not defined in any of the super grammars `,n.push({message:i,type:As.INVALID_RULE_OVERRIDE,ruleName:e})),n}function HV(e,t,r,n=[]){let i=[],a=ZT(t.definition);if(a.length===0)return[];{let o=e.name;a.includes(e)&&i.push({message:r.buildLeftRecursionError({topLevelRule:e,leftRecursionPath:n}),type:As.LEFT_RECURSION,ruleName:o});let u=n.concat([e]),d=a.filter(f=>!u.includes(f)).flatMap(f=>{let p=[...n];return p.push(f),HV(e,f,r,p)});return i.concat(d)}}function ZT(e){let t=[];if(e.length===0)return t;let r=e[0];if(r instanceof Es)t.push(r.referencedRule);else if(r instanceof ro||r instanceof Na||r instanceof Ro||r instanceof _o||r instanceof no||r instanceof wi)t=t.concat(ZT(r.definition));else if(r instanceof io)t=r.definition.map(a=>ZT(a.definition)).flat();else if(!(r instanceof Jn))throw Error("non exhaustive match");let n=sC(r),i=e.length>1;if(n&&i){let a=e.slice(1);return t.concat(ZT(a))}else return t}function Eke(e,t){let r=new UV;return e.accept(r),r.alternations.flatMap(a=>a.definition.slice(0,-1).flatMap((l,u)=>hke([l],[],Y1,1).length===0?[{message:t.buildEmptyAlternationError({topLevelRule:e,alternation:a,emptyChoiceIdx:u}),type:As.NONE_LAST_EMPTY_ALT,ruleName:e.name,occurrence:a.idx,alternative:u+1}]:[]))}function Ake(e,t,r){let n=new UV;e.accept(n);let i=n.alternations;return i=i.filter(o=>o.ignoreAmbiguities!==!0),i.flatMap(o=>{let l=o.idx,u=o.maxLookahead||t,h=SC(l,e,u,o),d=Lke(h,o,e,r),f=Dke(h,o,e,r);return d.concat(f)})}function Rke(e,t){let r=new UV;return e.accept(r),r.alternations.flatMap(a=>a.definition.length>255?[{message:t.buildTooManyAlternativesError({topLevelRule:e,alternation:a}),type:As.TOO_MANY_ALTS,ruleName:e.name,occurrence:a.idx}]:[])}function _ke(e,t,r){let n=[];return e.forEach(i=>{let a=new kdt;i.accept(a),a.allProductions.forEach(l=>{let u=kR(l),h=l.maxLookahead||t,d=l.idx;if(EC(d,i,u,h)[0].flat().length===0){let m=r.buildEmptyRepetitionError({topLevelRule:i,repetition:l});n.push({message:m,type:As.NO_NON_EMPTY_LOOKAHEAD,ruleName:i.name})}})}),n}function Lke(e,t,r,n){let i=[];return e.reduce((l,u,h)=>(t.definition[h].ignoreAmbiguities===!0||u.forEach(d=>{let f=[h];e.forEach((p,m)=>{h!==m&&GA(p,d)&&t.definition[m].ignoreAmbiguities!==!0&&f.push(m)}),f.length>1&&!GA(i,d)&&(i.push(d),l.push({alts:f,path:d}))}),l),[]).map(l=>{let u=l.alts.map(d=>d+1);return{message:n.buildAlternationAmbiguityError({topLevelRule:r,alternation:t,ambiguityIndices:u,prefixPath:l.path}),type:As.AMBIGUOUS_ALTS,ruleName:r.name,occurrence:t.idx,alternatives:l.alts}})}function Dke(e,t,r,n){let i=e.reduce((o,l,u)=>{let h=l.map(d=>({idx:u,path:d}));return o.concat(h)},[]);return i.flatMap(o=>{if(t.definition[o.idx].ignoreAmbiguities===!0)return[];let u=o.idx,h=o.path;return i.filter(p=>t.definition[p.idx].ignoreAmbiguities!==!0&&p.idx{let m=[p.idx+1,u+1],g=t.idx===0?"":t.idx;return{message:n.buildAlternationPrefixAmbiguityError({topLevelRule:r,alternation:t,ambiguityIndices:m,prefixPath:p.path}),type:As.AMBIGUOUS_PREFIX_ALTS,ruleName:r.name,occurrence:g,alternatives:m}})})}function Ike(e,t,r){let n=[],i=t.map(a=>a.name);return e.forEach(a=>{let o=a.name;if(i.includes(o)){let l=r.buildNamespaceConflictError(a);n.push({message:l,type:As.CONFLICT_TOKENS_RULES_NAMESPACE,ruleName:o})}}),n}function Mke(e){let t=Object.assign({errMsgProvider:mdt},e),r={};return e.rules.forEach(n=>{r[n.name]=n}),uke(r,t.errMsgProvider)}function Nke(e){var t;let r=(t=e.errMsgProvider)!==null&&t!==void 0?t:ag;return Tke(e.rules,e.tokenTypes,r,e.grammarName)}function lC(e){return Fke.includes(e.name)}function Vke(e,t,r,n,i,a,o){let l=this.getKeyForAutomaticLookahead(n,i),u=this.firstAfterRepMap[l];if(u===void 0){let p=this.getCurrRuleFullName(),m=this.getGAstProductions()[p];u=new a(m,i).startWalking(),this.firstAfterRepMap[l]=u}let h=u.token,d=u.occurrence,f=u.isEndOfRule;this.RULE_STACK_IDX===0&&f&&h===void 0&&(h=yh,d=1),!(h===void 0||d===void 0)&&this.shouldInRepetitionRecoveryBeTried(h,d,o)&&this.tryInRepetitionRecovery(e,t,r,h)}function eA(e,t,r){return r|t|e}function Hke(e){w5.reset(),e.accept(w5);let t=w5.dslMethods;return w5.reset(),t}function pG(e,t){isNaN(e.startOffset)===!0?(e.startOffset=t.startOffset,e.endOffset=t.endOffset):e.endOffseto.msg);throw Error(`Errors Detected in CST Visitor <${this.constructor.name}>: + ${a.join(` + +`).replace(/\n/g,` + `)}`)}},"validateVisitor")};return r.prototype=n,r.prototype.constructor=r,r._RULE_NAMES=t,r}function Kke(e,t,r){let n=_(function(){},"derivedConstructor");jV(n,e+"BaseSemanticsWithDefaults");let i=Object.create(r.prototype);return t.forEach(a=>{i[a]=jke}),n.prototype=i,n.prototype.constructor=n,n}function Zke(e,t){return Qke(e,t)}function Qke(e,t){return t.filter(i=>typeof e[i]!="function").map(i=>({msg:`Missing visitor method: <${i}> on ${e.constructor.name} CST Visitor.`,type:gG.MISSING_METHOD,methodName:i})).filter(Boolean)}function p1(e,t,r,n=!1){cC(r);let i=this.recordingProdStack.at(-1),a=typeof t=="function"?t:t.DEF,o=new e({definition:[],idx:r});return n&&(o.separator=t.SEP),Object.hasOwn(t,"MAX_LOOKAHEAD")&&(o.maxLookahead=t.MAX_LOOKAHEAD),this.recordingProdStack.push(o),a.call(this),i.definition.push(o),this.recordingProdStack.pop(),SR}function twe(e,t){cC(t);let r=this.recordingProdStack.at(-1),n=Array.isArray(e)===!1,i=n===!1?e:e.DEF,a=new io({definition:[],idx:t,ignoreAmbiguities:n&&e.IGNORE_AMBIGUITIES===!0});Object.hasOwn(e,"MAX_LOOKAHEAD")&&(a.maxLookahead=e.MAX_LOOKAHEAD);let o=i.some(l=>typeof l.GATE=="function");return a.hasPredicates=o,r.definition.push(a),i.forEach(l=>{let u=new ro({definition:[]});a.definition.push(u),Object.hasOwn(l,"IGNORE_AMBIGUITIES")?u.ignoreAmbiguities=l.IGNORE_AMBIGUITIES:Object.hasOwn(l,"GATE")&&(u.ignoreAmbiguities=!0),this.recordingProdStack.push(u),l.ALT.call(this),this.recordingProdStack.pop()}),SR}function yG(e){return e===0?"":`${e}`}function cC(e){if(e<0||e>k2e){let t=new Error(`Invalid DSL Method idx value: <${e}> + Idx value must be a none negative value smaller than ${k2e+1}`);throw t.KNOWN_RECORDER_ERROR=!0,t}}function rwe(e,t){t.forEach(r=>{let n=r.prototype;Object.getOwnPropertyNames(n).forEach(i=>{if(i==="constructor")return;let a=Object.getOwnPropertyDescriptor(n,i);a&&(a.get||a.set)?Object.defineProperty(e.prototype,i,a):e.prototype[i]=r.prototype[i]})})}function vG(e=void 0){return function(){return e}}function iwe(e,t){for(var r=-1,n=e==null?0:e.length,i=Array(n);++r-1}function fwe(e,t){var r=this.__data__,n=ER(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}function bg(e){var t=-1,r=e==null?0:e.length;for(this.clear();++tl))return!1;var h=a.get(e),d=a.get(t);if(h&&d)return h==t&&d==e;var f=-1,p=!0,m=r&tpt?new Uwe:void 0;for(a.set(e,t),a.set(t,e);++f-1&&e%1==0&&e-1&&e%1==0&&e<=Opt}function gSe(e){return F1(e)&&QV(e.length)&&!!Qn[X1(e)]}function ySe(e){return function(t){return e(t)}}function xSe(e,t){var r=Rs(e),n=!r&&LR(e),i=!r&&!n&&VA(e),a=!r&&!n&&!i&&JV(e),o=r||n||i||a,l=o?Spt(e.length,String):[],u=l.length;for(var h in e)(t||fmt.call(e,h))&&!(o&&(h=="length"||i&&(h=="offset"||h=="parent")||a&&(h=="buffer"||h=="byteLength"||h=="byteOffset")||pSe(h,u)))&&l.push(h);return l}function bSe(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||mmt;return e===r}function CSe(e,t){return function(r){return e(t(r))}}function kSe(e){if(!TSe(e))return vmt(e);var t=[];for(var r in Object(e))bmt.call(e,r)&&r!="constructor"&&t.push(r);return t}function SSe(e){return e!=null&&QV(e.length)&&!Swe(e)}function ESe(e){return DR(e)?pmt(e):wSe(e)}function ASe(e){return xpt(e,eW,wpt)}function RSe(e,t,r,n,i,a){var o=r&Tmt,l=P2e(e),u=l.length,h=P2e(t),d=h.length;if(u!=d&&!o)return!1;for(var f=u;f--;){var p=l[f];if(!(o?p in t:kmt.call(t,p)))return!1}var m=a.get(e),g=a.get(t);if(m&&g)return m==t&&g==e;var y=!0;a.set(e,t),a.set(t,e);for(var v=o;++flW(e,t,o));return Sg(e,t,n,r,...i)}function TEe(e,t,r){let n=ta(e,t,r,{type:Mf});kh(e,n);let i=Sg(e,t,n,r,$f(e,t,r));return CEe(e,t,r,i)}function $f(e,t,r){let n=Cgt(hh(r.definition,i=>lW(e,t,i)),i=>i!==void 0);return n.length===1?n[0]:n.length===0?void 0:wEe(e,n)}function cW(e,t,r,n,i){let a=n.left,o=n.right,l=ta(e,t,r,{type:Agt});kh(e,l);let u=ta(e,t,r,{type:dEe});return a.loopback=l,u.loopback=l,e.decisionMap[dg(t,i?"RepetitionMandatoryWithSeparator":"RepetitionMandatory",r.idx)]=l,_i(o,l),i===void 0?(_i(l,a),_i(l,u)):(_i(l,u),_i(l,i.left),_i(i.right,a)),{left:a,right:u}}function uW(e,t,r,n,i){let a=n.left,o=n.right,l=ta(e,t,r,{type:Egt});kh(e,l);let u=ta(e,t,r,{type:dEe}),h=ta(e,t,r,{type:Sgt});return l.loopback=h,u.loopback=h,_i(l,a),_i(l,u),_i(o,h),i!==void 0?(_i(h,u),_i(h,i.left),_i(i.right,a)):_i(h,l),e.decisionMap[dg(t,i?"RepetitionWithSeparator":"Repetition",r.idx)]=l,{left:l,right:u}}function CEe(e,t,r,n){let i=n.left,a=n.right;return _i(i,a),e.decisionMap[dg(t,"Option",r.idx)]=i,n}function kh(e,t){return e.decisionStates.push(t),t.decision=e.decisionStates.length-1,t.decision}function Sg(e,t,r,n,...i){let a=ta(e,t,n,{type:wgt,start:r});r.end=a;for(let l of i)l!==void 0?(_i(r,l.left),_i(l.right,a)):_i(r,a);let o={left:r,right:a};return e.decisionMap[dg(t,kEe(n),n.idx)]=r,o}function kEe(e){if(e instanceof io)return"Alternation";if(e instanceof Na)return"Option";if(e instanceof wi)return"Repetition";if(e instanceof no)return"RepetitionWithSeparator";if(e instanceof Ro)return"RepetitionMandatory";if(e instanceof _o)return"RepetitionMandatoryWithSeparator";throw new Error("Invalid production type encountered")}function wEe(e,t){let r=t.length;for(let a=0;ar.stateNumber.toString()).join("_")}`}function REe(e,t,r){for(var n=-1,i=e.length;++n0&&r(l)?t>1?dW(l,t-1,r,n,i):rSe(i,l):n||(i[i.length]=l)}return i}function MEe(e,t){return IEe(hh(e,t),1)}function NEe(e,t,r,n){for(var i=e.length,a=r+(n?1:-1);n?a--:++a-1}function FEe(e,t,r){for(var n=-1,i=e==null?0:e.length;++n=Wgt){var h=t?null:Vgt(e);if(h)return ZV(h);o=!1,i=Xwe,u=new Uwe}else u=t?[]:l;e:for(;++n{let i=n.toString(),a=r[i];return a!==void 0||(a={atnStartState:e,decision:t,states:{}},r[i]=a),a}}function wG(e,t=!0){let r=new Set;for(let n of e){let i=new Set;for(let a of n){if(a===void 0){if(t)break;return!1}let o=[a.tokenTypeIdx].concat(a.categoryMatches);for(let l of o)if(r.has(l)){if(!i.has(l))return!1}else r.add(l),i.add(l)}}return!0}function JEe(e){let t=e.decisionStates.length,r=Array(t);for(let n=0;nlg(i)).join(", "),r=e.production.idx===0?"":e.production.idx,n=`Ambiguous Alternatives Detected: <${e.ambiguityIndices.join(", ")}> in <${i4e(e.production)}${r}> inside <${e.topLevelRule.name}> Rule, +<${t}> may appears as a prefix path in all these alternatives. +`;return n=n+`See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#AMBIGUOUS_ALTERNATIVES +For Further details.`,n}function i4e(e){if(e instanceof Es)return"SUBRULE";if(e instanceof Na)return"OPTION";if(e instanceof io)return"OR";if(e instanceof Ro)return"AT_LEAST_ONE";if(e instanceof _o)return"AT_LEAST_ONE_SEP";if(e instanceof no)return"MANY_SEP";if(e instanceof wi)return"MANY";if(e instanceof Jn)return"CONSUME";throw Error("non exhaustive match")}function a4e(e,t,r){let n=Igt(t.configs.elements,a=>a.state.transitions),i=Hgt(n.filter(a=>a instanceof sW).map(a=>a.tokenType),a=>a.tokenTypeIdx);return{actualToken:r,possibleTokenTypes:i,tokenPath:e}}function s4e(e,t){return e.edges[t.tokenTypeIdx]}function o4e(e,t,r){let n=new kG,i=[];for(let o of e.elements){if(r.is(o.alt)===!1)continue;if(o.state.type===Z1){i.push(o);continue}let l=o.state.transitions.length;for(let u=0;u0&&!d4e(a))for(let o of i)a.add(o);return a}function l4e(e,t){if(e instanceof sW&&TR(t,e.tokenType))return e.target}function c4e(e,t){let r;for(let n of e.elements)if(t.is(n.alt)===!0){if(r===void 0)r=n.alt;else if(r!==n.alt)return}return r}function fW(e){return{configs:e,edges:{},isAcceptState:!1,prediction:-1}}function SG(e,t,r,n){return n=pW(e,n),t.edges[r.tokenTypeIdx]=n,n}function pW(e,t){if(t===WA)return t;let r=t.configs.key,n=e.states[r];return n!==void 0?n:(t.configs.finalize(),e.states[r]=t,t)}function u4e(e){let t=new kG,r=e.transitions.length;for(let n=0;n0){let i=[...e.stack],o={state:i.pop(),alt:e.alt,stack:i};fC(o,t)}else t.add(e);return}r.epsilonOnlyTransitions||t.add(e);let n=r.transitions.length;for(let i=0;i1)return!0;return!1}function y4e(e){for(let t of Array.from(e.values()))if(Object.keys(t).length===1)return!0;return!1}function v4e(e,t){let r;for(let n of e.configs.elements)if(!(t.is(n.alt)===!1||n.state.type===Z1)){if(r===void 0)r=n.alt;else if(r!==n.alt)return}return r}function nA(e){return e.$type===HA}function GR(e,t,r){return E4e({parser:t,tokens:r,ruleNames:new Map},e),t}function E4e(e,t){let r=pR(t,!1),n=Ln(t.rules).filter(Ss).filter(a=>r.has(a));for(let a of n){let o={...e,consume:1,optional:1,subrule:1,many:1,or:1};e.parser.rule(a,Nf(o,a.definition))}let i=Ln(t.rules).filter(P1).filter(a=>r.has(a));for(let a of i)e.parser.rule(a,A4e(e,a))}function A4e(e,t){let r=t.call.rule.ref;if(!r)throw new Error("Could not resolve reference to infix operator rule: "+t.call.rule.$refText);if(sl(r))throw new Error("Cannot use terminal rule in infix expression");let n=t.operators.precedences.flatMap(m=>m.operators),i={$type:"Group",elements:[]},a={$container:i,$type:"Assignment",feature:"parts",operator:"+=",terminal:t.call},o={$container:i,$type:"Group",elements:[],cardinality:"*"};i.elements.push(a,o);let u={$container:o,$type:"Assignment",feature:"operators",operator:"+=",terminal:{$type:"Alternatives",elements:n}},h={...a,$container:o};o.elements.push(u,h);let f=n.map(m=>e.tokens[m.value]).map((m,g)=>({ALT:_(()=>e.parser.consume(g,m,u),"ALT")})),p;return m=>{p??(p=zR(e,r)),e.parser.subrule(0,p,!1,a,m),e.parser.many(0,{DEF:_(()=>{e.parser.alternatives(0,f),e.parser.subrule(1,p,!1,h,m)},"DEF")})}}function Nf(e,t,r=!1){let n;if(ph(t))n=N4e(e,t);else if(If(t))n=R4e(e,t);else if(fh(t))n=Nf(e,t.terminal);else if(yg(t))n=xW(e,t);else if(mh(t))n=_4e(e,t);else if(aR(t))n=D4e(e,t);else if(cR(t))n=I4e(e,t);else if(vg(t))n=M4e(e,t);else if(qz(t)){let i=e.consume++;n=_(()=>e.parser.consume(i,yh,t),"method")}else throw new hR(t.$cstNode,`Unexpected element type: ${t.$type}`);return bW(e,r?void 0:pC(t),n,t.cardinality)}function R4e(e,t){let r=ug(t);return()=>e.parser.action(r,t)}function _4e(e,t){let r=t.rule.ref;if(gg(r)){let n=e.subrule++,i=Ss(r)&&r.fragment,a=t.arguments.length>0?L4e(r,t.arguments):()=>({}),o;return l=>{o??(o=zR(e,r)),e.parser.subrule(n,o,i,t,a(l))}}else if(sl(r)){let n=e.consume++,i=UA(e,r.name);return()=>e.parser.consume(n,i,t)}else if(r)Of(r);else throw new hR(t.$cstNode,`Undefined rule: ${t.rule.$refText}`)}function L4e(e,t){if(t.some(n=>n.calledByName)){let n=t.map(i=>({parameterName:i.parameter?.ref?.name,predicate:Ul(i.value)}));return i=>{let a={};for(let{parameterName:o,predicate:l}of n)o&&(a[o]=l(i));return a}}else{let n=t.map(i=>Ul(i.value));return i=>{let a={};for(let o=0;ot(n)||r(n)}else if(Vz(e)){let t=Ul(e.left),r=Ul(e.right);return n=>t(n)&&r(n)}else if(Yz(e)){let t=Ul(e.value);return r=>!t(r)}else if(jz(e)){let t=e.parameter.ref.name;return r=>r!==void 0&&r[t]===!0}else if(Gz(e)){let t=!!e.true;return()=>t}Of(e)}function D4e(e,t){if(t.elements.length===1)return Nf(e,t.elements[0]);{let r=[];for(let i of t.elements){let a={ALT:Nf(e,i,!0)},o=pC(i);o&&(a.GATE=Ul(o)),r.push(a)}let n=e.or++;return i=>e.parser.alternatives(n,r.map(a=>{let o={ALT:_(()=>a.ALT(i),"ALT")},l=a.GATE;return l&&(o.GATE=()=>l(i)),o}))}}function I4e(e,t){if(t.elements.length===1)return Nf(e,t.elements[0]);let r=[];for(let l of t.elements){let u={ALT:Nf(e,l,!0)},h=pC(l);h&&(u.GATE=Ul(h)),r.push(u)}let n=e.or++,i=_((l,u)=>{let h=u.getRuleStack().join("-");return`uGroup_${l}_${h}`},"idFunc"),a=_(l=>e.parser.alternatives(n,r.map((u,h)=>{let d={ALT:_(()=>!0,"ALT")},f=e.parser;d.ALT=()=>{if(u.ALT(l),!f.isRecording()){let m=i(n,f);f.unorderedGroups.get(m)||f.unorderedGroups.set(m,[]);let g=f.unorderedGroups.get(m);typeof g?.[h]>"u"&&(g[h]=!0)}};let p=u.GATE;return p?d.GATE=()=>p(l):d.GATE=()=>!f.unorderedGroups.get(i(n,f))?.[h],d})),"alternatives"),o=bW(e,pC(t),a,"*");return l=>{o(l),e.parser.isRecording()||e.parser.unorderedGroups.delete(i(n,e.parser))}}function M4e(e,t){let r=t.elements.map(n=>Nf(e,n));return n=>r.forEach(i=>i(n))}function pC(e){if(vg(e))return e.guardCondition}function xW(e,t,r=t.terminal){if(r)if(mh(r)&&Ss(r.rule.ref)){let n=r.rule.ref,i=e.subrule++,a;return o=>{a??(a=zR(e,n)),e.parser.subrule(i,a,!1,t,o)}}else if(mh(r)&&sl(r.rule.ref)){let n=e.consume++,i=UA(e,r.rule.ref.name);return()=>e.parser.consume(n,i,t)}else if(ph(r)){let n=e.consume++,i=UA(e,r.value);return()=>e.parser.consume(n,i,t)}else throw new Error("Could not build cross reference parser");else{if(!t.type.ref)throw new Error("Could not resolve reference to type: "+t.type.$refText);let i=vR(t.type.ref)?.terminal;if(!i)throw new Error("Could not find name assignment for type: "+ug(t.type.ref));return xW(e,t,i)}}function N4e(e,t){let r=e.consume++,n=e.tokens[t.value];if(!n)throw new Error("Could not find token for keyword: "+t.value);return()=>e.parser.consume(r,n,t)}function bW(e,t,r,n){let i=t&&Ul(t);if(!n)if(i){let a=e.or++;return o=>e.parser.alternatives(a,[{ALT:_(()=>r(o),"ALT"),GATE:_(()=>i(o),"GATE")},{ALT:vG(),GATE:_(()=>!i(o),"GATE")}])}else return r;if(n==="*"){let a=e.many++;return o=>e.parser.many(a,{DEF:_(()=>r(o),"DEF"),GATE:i?()=>i(o):void 0})}else if(n==="+"){let a=e.many++;if(i){let o=e.or++;return l=>e.parser.alternatives(o,[{ALT:_(()=>e.parser.atLeastOne(a,{DEF:_(()=>r(l),"DEF")}),"ALT"),GATE:_(()=>i(l),"GATE")},{ALT:vG(),GATE:_(()=>!i(l),"GATE")}])}else return o=>e.parser.atLeastOne(a,{DEF:_(()=>r(o),"DEF")})}else if(n==="?"){let a=e.optional++;return o=>e.parser.optional(a,{DEF:_(()=>r(o),"DEF"),GATE:i?()=>i(o):void 0})}else Of(n)}function zR(e,t){let r=P4e(e,t),n=e.parser.getRule(r);if(!n)throw new Error(`Rule "${r}" not found."`);return n}function P4e(e,t){if(gg(t))return t.name;if(e.ruleNames.has(t))return e.ruleNames.get(t);{let r=t,n=r.$container,i=t.$type;for(;!Ss(n);)(vg(n)||aR(n)||cR(n))&&(i=n.elements.indexOf(r).toString()+":"+i),r=n,n=n.$container;return i=n.name+":"+i,e.ruleNames.set(t,i),i}}function UA(e,t){let r=e.tokens[t];if(!r)throw new Error(`Token "${t}" not found."`);return r}function TW(e){let t=e.Grammar,r=e.parser.Lexer,n=new w4e(e);return GR(t,n,r.definition),n.finalize(),n}function CW(e){let t=kW(e);return t.finalize(),t}function kW(e){let t=e.Grammar,r=e.parser.Lexer,n=new C4e(e);return GR(t,n,r.definition)}function WR(){return new Promise(e=>{typeof setImmediate>"u"?setTimeout(e,0):setImmediate(e)})}function qR(){return iA=performance.now(),new Hn.CancellationTokenSource}function SW(e){O4e=e}function Eg(e){return e===nu}async function Ta(e){if(e===Hn.CancellationToken.None)return;let t=performance.now();if(t-iA>=O4e&&(iA=t,await WR(),iA=performance.now()),e.isCancellationRequested)throw nu}function jA(e,t){if(e.length<=1)return e;let r=e.length/2|0,n=e.slice(0,r),i=e.slice(r);jA(n,t),jA(i,t);let a=0,o=0,l=0;for(;ar.line||t.line===r.line&&t.character>r.character?{start:r,end:t}:e}function B4e(e){let t=AW(e.range);return t!==e.range?{newText:e.newText,range:t}:e}function _W(e){return typeof e.name=="string"}function IW(e){return typeof e.$comment=="string"}function _G(e){return typeof e=="object"&&!!e&&("$ref"in e||"$error"in e)}function sg(e){return{code:e}}function MW(e){if(e.range)return e.range;let t;return typeof e.property=="string"?t=mR(e.node.$cstNode,e.property,e.index):typeof e.keyword=="string"&&(t=wV(e.node.$cstNode,e.keyword,e.index)),t??(t=e.node.$cstNode),t?t.range:{start:{line:0,character:0},end:{line:0,character:0}}}function JT(e){switch(e){case"error":return 1;case"warning":return 2;case"info":return 3;case"hint":return 4;default:throw new Error("Invalid diagnostic severity: "+e)}}function NW(e){switch(e){case"error":return sg(al.LexingError);case"warning":return sg(al.LexingWarning);case"info":return sg(al.LexingInfo);case"hint":return sg(al.LexingHint);default:throw new Error("Invalid diagnostic severity: "+e)}}function jR(e){return Array.isArray(e)&&(e.length===0||"name"in e[0])}function XR(e){return e&&"modes"in e&&"defaultMode"in e}function ZA(e){return!jR(e)&&!XR(e)}function BW(e,t,r){let n,i;typeof e=="string"?(i=t,n=r):(i=e.range.start,n=t),i||(i=bn.create(0,0));let a=FW(e),o=KR(n),l=o3e({lines:a,position:i,options:o});return u3e({index:0,tokens:l,position:i})}function $W(e,t){let r=KR(t),n=FW(e);if(n.length===0)return!1;let i=n[0],a=n[n.length-1],o=r.start,l=r.end;return!!o?.exec(i)&&!!l?.exec(a)}function FW(e){let t="";return typeof e=="string"?t=e:t=e.text,t.split(rCe)}function o3e(e){let t=[],r=e.position.line,n=e.position.character;for(let i=0;i=l.length){if(t.length>0){let d=bn.create(r,n);t.push({type:"break",content:"",range:en.create(d,d)})}}else{Z2e.lastIndex=u;let d=Z2e.exec(l);if(d){let f=d[0],p=d[1],m=bn.create(r,n+u),g=bn.create(r,n+u+f.length);t.push({type:"tag",content:p,range:en.create(m,g)}),u+=f.length,u=QA(l,u)}if(u0&&t[t.length-1].type==="break"?t.slice(0,-1):t}function l3e(e,t,r,n){let i=[];if(e.length===0){let a=bn.create(r,n),o=bn.create(r,n+t.length);i.push({type:"text",content:t,range:en.create(a,o)})}else{let a=0;for(let l of e){let u=l.index,h=t.substring(a,u);h.length>0&&i.push({type:"text",content:t.substring(a,u),range:en.create(bn.create(r,a+n),bn.create(r,u+n))});let d=h.length+1,f=l[1];if(i.push({type:"inline-tag",content:f,range:en.create(bn.create(r,a+d+n),bn.create(r,a+d+f.length+n))}),d+=f.length,l.length===4){d+=l[2].length;let p=l[3];i.push({type:"text",content:p,range:en.create(bn.create(r,a+d+n),bn.create(r,a+d+p.length+n))})}else i.push({type:"text",content:"",range:en.create(bn.create(r,a+d+n),bn.create(r,a+d+n))});a=u+l[0].length}let o=t.substring(a);o.length>0&&i.push({type:"text",content:o,range:en.create(bn.create(r,a+n),bn.create(r,a+n+o.length))})}return i}function QA(e,t){let r=e.substring(t).match(c0t);return r?t+r.index:e.length}function c3e(e){let t=e.match(u0t);if(t&&typeof t.index=="number")return t.index}function u3e(e){let t=bn.create(e.position.line,e.position.character);if(e.tokens.length===0)return new Q2e([],en.create(t,t));let r=[];for(;e.index0){let o=QA(t,n);i=t.substring(o),t=t.substring(0,n)}return(e==="linkcode"||e==="link"&&r.link==="code")&&(i=`\`${i}\``),r.renderLink?.(t,i)??m3e(t,i)}}function m3e(e,t){try{return Ao.parse(e,!0),`[${t}](${e})`}catch{return e}}function DG(e){return e.endsWith(` +`)?` +`:` + +`}function sn(e){return{documentation:{CommentProvider:_(t=>new v3e(t),"CommentProvider"),DocumentationProvider:_(t=>new y3e(t),"DocumentationProvider")},parser:{AsyncParser:_(t=>new x3e(t),"AsyncParser"),GrammarConfig:_(t=>IV(t),"GrammarConfig"),LangiumParser:_(t=>CW(t),"LangiumParser"),CompletionParser:_(t=>TW(t),"CompletionParser"),ValueConverter:_(()=>new wW,"ValueConverter"),TokenBuilder:_(()=>new VR,"TokenBuilder"),Lexer:_(t=>new OW(t),"Lexer"),ParserErrorMessageProvider:_(()=>new vW,"ParserErrorMessageProvider"),LexerErrorMessageProvider:_(()=>new s3e,"LexerErrorMessageProvider")},workspace:{AstNodeLocator:_(()=>new t3e,"AstNodeLocator"),AstNodeDescriptionProvider:_(t=>new J4e(t),"AstNodeDescriptionProvider"),ReferenceDescriptionProvider:_(t=>new e3e(t),"ReferenceDescriptionProvider")},references:{Linker:_(t=>new z4e(t),"Linker"),NameProvider:_(()=>new V4e,"NameProvider"),ScopeProvider:_(t=>new Y4e(t),"ScopeProvider"),ScopeComputation:_(t=>new q4e(t),"ScopeComputation"),References:_(t=>new W4e(t),"References")},serializer:{Hydrator:_(t=>new T3e(t),"Hydrator"),JsonSerializer:_(t=>new j4e(t),"JsonSerializer")},validation:{DocumentValidator:_(t=>new Q4e(t),"DocumentValidator"),ValidationRegistry:_(t=>new K4e(t),"ValidationRegistry")},shared:_(()=>e.shared,"shared")}}function on(e){return{ServiceRegistry:_(t=>new X4e(t),"ServiceRegistry"),workspace:{LangiumDocuments:_(t=>new G4e(t),"LangiumDocuments"),LangiumDocumentFactory:_(t=>new F4e(t),"LangiumDocumentFactory"),DocumentBuilder:_(t=>new n3e(t),"DocumentBuilder"),IndexManager:_(t=>new i3e(t),"IndexManager"),WorkspaceManager:_(t=>new a3e(t),"WorkspaceManager"),FileSystemProvider:_(t=>e.fileSystemProvider(t),"FileSystemProvider"),WorkspaceLock:_(()=>new b3e,"WorkspaceLock"),ConfigurationProvider:_(t=>new r3e(t),"ConfigurationProvider")},profilers:{}}}function Lr(e,t,r,n,i,a,o,l,u){let h=[e,t,r,n,i,a,o,l,u].reduce(G1,{});return qW(h)}function WW(e){if(e&&e[C3e])for(let t of Object.values(e))WW(t);return e}function qW(e,t){let r=new Proxy({},{deleteProperty:_(()=>!1,"deleteProperty"),set:_(()=>{throw new Error("Cannot set property on injected service container")},"set"),get:_((n,i)=>i===C3e?!0:MG(n,i,e,t||r),"get"),getOwnPropertyDescriptor:_((n,i)=>(MG(n,i,e,t||r),Object.getOwnPropertyDescriptor(n,i)),"getOwnPropertyDescriptor"),has:_((n,i)=>i in e,"has"),ownKeys:_(()=>[...Object.getOwnPropertyNames(e)],"ownKeys")});return r}function MG(e,t,r,n){if(t in e){if(e[t]instanceof Error)throw new Error("Construction failure. Please make sure that your dependencies are constructable. Cause: "+e[t]);if(e[t]===J2e)throw new Error('Cycle detected. Please make "'+String(t)+'" lazy. Visit https://langium.org/docs/reference/configuration-services/#resolving-cyclic-dependencies');return e[t]}else if(t in r){let i=r[t];e[t]=J2e;try{e[t]=typeof i=="function"?i(n):qW(i,n)}catch(a){throw e[t]=a instanceof Error?a:void 0,a}return e[t]}else return}function G1(e,t){if(t){for(let[r,n]of Object.entries(t))if(n!=null)if(typeof n=="object"){let i=e[r];typeof i=="object"&&i!==null?e[r]=G1(i,n):e[r]=G1({},n)}else e[r]=n}return e}function S3e(){let e=Lr(on(dn),m0t),t=Lr(sn({shared:e}),p0t);return e.ServiceRegistry.register(t),t}function Ca(e){let t=S3e(),r=t.serializer.JsonSerializer.deserialize(e);return t.shared.workspace.LangiumDocumentFactory.fromModel(r,Ao.parse(`memory:/${r.name??"grammar"}.langium`)),r}function A3e(e){return Li.isInstance(e,ql.$type)}function R3e(e){return Li.isInstance(e,eC.$type)}function _3e(e){return Li.isInstance(e,Xm.$type)}function L3e(e){return Li.isInstance(e,_f.$type)}function D3e(e){return Li.isInstance(e,tC.$type)}function I3e(e){return Li.isInstance(e,JA.$type)}function M3e(e){return e==="rmo"||e==="readmodel"||e==="ui"||e==="cmd"||e==="command"||e==="evt"||e==="event"||e==="pcr"||e==="processor"}function ZR(e){return Li.isInstance(e,lh.$type)}function N3e(e){return Li.isInstance(e,Lf.$type)}function P3e(e){return Li.isInstance(e,E1.$type)}function O3e(e){return Li.isInstance(e,Km.$type)}function B3e(e){return Li.isInstance(e,Zm.$type)}function $3e(e){return Li.isInstance(e,Qm.$type)}function F3e(e){return Li.isInstance(e,Df.$type)}function G3e(e){return Li.isInstance(e,rC.$type)}function z3e(e){return Li.isInstance(e,Jm.$type)}function V3e(e){return Li.isInstance(e,eg.$type)}function W3e(e){return Li.isInstance(e,tg.$type)}function q3e(e){return Li.isInstance(e,rg.$type)}function H3e(e){return Li.isInstance(e,A1.$type)}function U3e(e){return Li.isInstance(e,ng.$type)}function Y3e(e){return Li.isInstance(e,ba.$type)}var Tht,mC,Cht,_z,kht,wht,_,Sht,Or,Pf,pA,eR,Lz,Dz,tR,tF,F5,rF,LT,bn,en,DT,nF,G5,iF,aF,sF,oF,z5,lF,cF,uF,IT,Rm,Kc,_m,Ma,sh,MT,c1,u1,h1,V5,CT,O$,xTe,hF,dF,NT,fF,W5,d1,pF,mF,gF,yF,vF,xF,bF,TF,PT,CF,kF,wF,SF,EF,AF,RF,_F,LF,DF,IF,OT,MF,NF,PF,OF,BF,$F,FF,GF,zF,VF,WF,qF,HF,q5,H5,UF,YF,jF,XF,KF,ZF,QF,JF,bTe,eG,l2e,rt,gC,fg,yC,z1,rR,CTe,wTe,Eht,Aht,STe,Rht,_ht,Lht,Dht,tG,Iht,V1,c2e,fi,Iz,Mht,Nht,Pht,Oht,Bht,$ht,Fht,Ght,zht,Vht,Wht,qht,Hht,Uht,Yht,jht,Xht,Kht,Zht,Qht,Jht,edt,tdt,rdt,ndt,RTe,Mz,Pz,ru,D1,Ts,I1,iC,Oz,DTe,idt,eo,VT,v1,Eo,wf,WT,vA,xA,Sf,bA,Ef,Af,qT,Rf,HT,TA,ch,CA,$m,kA,Jc,UT,wA,x1,b1,T1,Fm,SA,EA,C1,AA,Wl,YT,Gm,RA,zm,k1,_A,Vm,to,Wm,uh,qm,jT,Hm,Um,LA,XT,Ym,jm,w1,nV,br,tu,oV,dV,hR,pV,IA,MA,u2e,adt,C5,sdt,tCe,dR,rCe,nCe,odt,ig,aCe,DV,ou,Es,q1,ro,Na,Ro,_o,wi,no,io,Jn,H1,xR,ECe,ldt,X5,cdt,LCe,OA,udt,hg,FT,k5,hdt,ddt,fdt,GT,Z5,h2e,tke,lG,Si,zT,ws,pdt,d2e,f2e,p2e,m2e,g2e,y2e,v2e,x2e,yh,S1,mdt,ag,gdt,ydt,vdt,CR,xdt,b2e,bdt,T2e,di,Tdt,yke,Cdt,UV,kdt,Pke,Oke,Bke,$ke,Fke,wR,Gke,wdt,Sdt,Edt,B$,zke,Adt,Rdt,_dt,Bf,Ldt,Wke,qke,hG,dG,fG,J5,vEr,YV,Ddt,Idt,w5,Mdt,gG,Ndt,Pdt,Odt,Bdt,$dt,SR,C2e,k2e,Jke,ewe,Fdt,Gdt,zdt,$1,vh,zA,As,XV,Vdt,awe,Wdt,lwe,ER,qdt,Hdt,Udt,Ydt,jdt,Xdt,AR,Kdt,Zdt,Qdt,Jdt,eft,vwe,tft,rft,Ch,nft,su,xwe,ift,aft,kT,sft,oft,lft,cft,uft,hft,w2e,X1,KV,dft,fft,pft,mft,Swe,gft,$$,S2e,yft,vft,xft,Tg,bft,Tft,Cft,kft,wft,Sft,Eft,Aft,Rft,K1,_ft,uC,Lft,hC,Dft,Ift,Mft,Nft,Pft,Oft,Bft,$ft,Fft,Gft,zft,E2e,Vft,Wft,RR,qft,Hft,Uft,Yft,_R,jft,Xft,tA,Kft,Zft,Qft,Uwe,Jft,Xwe,ept,tpt,Zwe,rpt,A2e,npt,ZV,ipt,apt,spt,opt,lpt,cpt,upt,hpt,dpt,fpt,ppt,mpt,gpt,R2e,F$,ypt,rSe,vpt,Rs,xpt,aSe,bpt,Tpt,Cpt,_2e,kpt,wpt,Spt,F1,Ept,L2e,uSe,Apt,Rpt,_pt,LR,Lpt,dSe,D2e,Dpt,I2e,Ipt,Mpt,VA,Npt,Ppt,pSe,Opt,QV,Bpt,$pt,Fpt,Gpt,zpt,Vpt,Wpt,qpt,Hpt,Upt,Ypt,jpt,Xpt,Kpt,Zpt,Qpt,Jpt,emt,tmt,rmt,nmt,imt,amt,smt,Qn,omt,lmt,vSe,QT,cmt,G$,umt,M2e,N2e,hmt,JV,dmt,fmt,pmt,mmt,TSe,gmt,ymt,vmt,xmt,bmt,wSe,DR,eW,P2e,Tmt,Cmt,kmt,wmt,Smt,xG,Emt,bG,Amt,L1,Rmt,TG,O2e,_mt,B2e,$2e,F2e,G2e,Lmt,Dmt,Imt,Mmt,Nmt,Dm,CG,Pmt,z2e,V2e,S5,Omt,W2e,Bmt,LSe,$mt,Fmt,Gmt,MSe,zmt,OSe,Vmt,Wmt,IR,qmt,Hmt,rW,Umt,Ymt,jmt,Xmt,Kmt,Zmt,Qmt,Jmt,egt,q2e,H2e,tgt,rgt,WSe,ngt,NR,USe,igt,agt,sgt,ogt,lgt,cgt,ugt,iW,hgt,dgt,fgt,PR,pgt,mgt,ggt,ygt,vgt,xgt,OR,bgt,hh,Tgt,Cgt,Mf,kgt,uEe,hEe,Z1,wgt,Sgt,Egt,Agt,dEe,aW,sW,fEe,oW,WA,kG,Rgt,_gt,Lgt,U2e,Dgt,IEe,Igt,Mgt,Ngt,Pgt,Ogt,Bgt,$gt,Fgt,Ggt,zgt,Vgt,Wgt,qgt,Hgt,Ugt,Ygt,jgt,z$,Xgt,Kgt,Zgt,Qgt,Jgt,e0t,t0t,Y2e,QEe,j2e,r0t,x4e,mW,qA,FR,n0t,gW,HA,X2e,T4e,yW,C4e,k4e,vW,w4e,i0t,S4e,a0t,VR,wW,eu,Hn,iA,O4e,nu,xh,K2e,YA,$4e,Ao,wT,ks,RW,Kr,F4e,G4e,Im,z4e,V4e,W4e,bh,XA,q4e,RG,s0t,H4e,o0t,HR,LW,UR,U4e,DW,Y4e,j4e,X4e,KA,K4e,Z4e,Q4e,al,J4e,e3e,t3e,YR,r3e,E5,cg,n3e,i3e,a3e,s3e,PW,OW,Z2e,l0t,c0t,u0t,Q2e,V$,LG,g3e,y3e,v3e,x3e,h0t,d0t,b3e,T3e,IG,C3e,J2e,NG,og,k3e,f0t,HW,w3e,dn,p0t,m0t,g0t,E3e,PG,OG,BG,$G,FG,GG,zG,VG,WG,qG,HG,UG,YG,jG,XG,xEr,KG,ZG,sA,QG,JG,ez,Mm,oA,tz,rz,A5,W$,R5,ST,q$,ql,_5,eC,eTe,L5,H$,Xm,D5,Em,I5,_f,M5,tTe,o1,tC,JA,nz,iz,az,sz,oz,lz,cz,m1,Tf,uz,lA,hz,dz,cA,fz,pz,Xc,Nm,Cf,ET,rTe,U$,N5,lh,bf,Y$,Zc,nTe,P5,j$,Lf,AT,E1,RT,X$,_T,O5,Am,Km,B5,K$,Zm,Qm,mz,gz,yz,vz,xz,uA,g1,hA,bz,dA,Df,rC,Z$,$5,kf,Jm,eg,Tz,tg,Qc,Cz,kz,wz,rg,fA,Sz,Ez,Az,Rz,Q$,l1,J$,Pm,A1,ng,eF,Om,y1,ba,j3e,Li,iTe,y0t,aTe,v0t,sTe,x0t,oTe,b0t,lTe,T0t,cTe,C0t,uTe,k0t,hTe,w0t,dTe,S0t,fTe,E0t,pTe,A0t,mTe,R0t,gTe,_0t,yTe,L0t,vTe,D0t,I0t,M0t,N0t,P0t,O0t,B0t,$0t,F0t,G0t,z0t,V0t,W0t,q0t,H0t,U0t,Tn,UW,YW,jW,XW,KW,ZW,QW,JW,eq,tq,rq,nq,iq,aq,sq,Y0t,j0t,X0t,K0t,Wi,Lo,En,Z0t,fn=F(()=>{"use strict";Tht=Object.create,mC=Object.defineProperty,Cht=Object.getOwnPropertyDescriptor,_z=Object.getOwnPropertyNames,kht=Object.getPrototypeOf,wht=Object.prototype.hasOwnProperty,_=s((e,t)=>mC(e,"name",{value:t,configurable:!0}),"__name"),Sht=s((e,t)=>s(function(){return e&&(t=(0,e[_z(e)[0]])(e=0)),t},"__init"),"__esm"),Or=s((e,t)=>s(function(){return t||(0,e[_z(e)[0]])((t={exports:{}}).exports,t),t.exports},"__require"),"__commonJS"),Pf=s((e,t)=>{for(var r in t)mC(e,r,{get:t[r],enumerable:!0})},"__export"),pA=s((e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of _z(t))!wht.call(e,i)&&i!==r&&mC(e,i,{get:s(()=>t[i],"get"),enumerable:!(n=Cht(t,i))||n.enumerable});return e},"__copyProps"),eR=s((e,t,r)=>(pA(e,t,"default"),r&&pA(r,t,"default")),"__reExport"),Lz=s((e,t,r)=>(r=e!=null?Tht(kht(e)):{},pA(t||!e||!e.__esModule?mC(r,"default",{value:e,enumerable:!0}):r,e)),"__toESM"),Dz=s(e=>pA(mC({},"__esModule",{value:!0}),e),"__toCommonJS"),tR={};Pf(tR,{AnnotatedTextEdit:s(()=>sh,"AnnotatedTextEdit"),ChangeAnnotation:s(()=>_m,"ChangeAnnotation"),ChangeAnnotationIdentifier:s(()=>Ma,"ChangeAnnotationIdentifier"),CodeAction:s(()=>NF,"CodeAction"),CodeActionContext:s(()=>MF,"CodeActionContext"),CodeActionKind:s(()=>IF,"CodeActionKind"),CodeActionTriggerKind:s(()=>OT,"CodeActionTriggerKind"),CodeDescription:s(()=>uF,"CodeDescription"),CodeLens:s(()=>PF,"CodeLens"),Color:s(()=>G5,"Color"),ColorInformation:s(()=>iF,"ColorInformation"),ColorPresentation:s(()=>aF,"ColorPresentation"),Command:s(()=>Rm,"Command"),CompletionItem:s(()=>bF,"CompletionItem"),CompletionItemKind:s(()=>pF,"CompletionItemKind"),CompletionItemLabelDetails:s(()=>xF,"CompletionItemLabelDetails"),CompletionItemTag:s(()=>gF,"CompletionItemTag"),CompletionList:s(()=>TF,"CompletionList"),CreateFile:s(()=>c1,"CreateFile"),DeleteFile:s(()=>h1,"DeleteFile"),Diagnostic:s(()=>IT,"Diagnostic"),DiagnosticRelatedInformation:s(()=>z5,"DiagnosticRelatedInformation"),DiagnosticSeverity:s(()=>lF,"DiagnosticSeverity"),DiagnosticTag:s(()=>cF,"DiagnosticTag"),DocumentHighlight:s(()=>EF,"DocumentHighlight"),DocumentHighlightKind:s(()=>SF,"DocumentHighlightKind"),DocumentLink:s(()=>BF,"DocumentLink"),DocumentSymbol:s(()=>DF,"DocumentSymbol"),DocumentUri:s(()=>tF,"DocumentUri"),EOL:s(()=>bTe,"EOL"),FoldingRange:s(()=>oF,"FoldingRange"),FoldingRangeKind:s(()=>sF,"FoldingRangeKind"),FormattingOptions:s(()=>OF,"FormattingOptions"),Hover:s(()=>CF,"Hover"),InlayHint:s(()=>UF,"InlayHint"),InlayHintKind:s(()=>q5,"InlayHintKind"),InlayHintLabelPart:s(()=>H5,"InlayHintLabelPart"),InlineCompletionContext:s(()=>QF,"InlineCompletionContext"),InlineCompletionItem:s(()=>jF,"InlineCompletionItem"),InlineCompletionList:s(()=>XF,"InlineCompletionList"),InlineCompletionTriggerKind:s(()=>KF,"InlineCompletionTriggerKind"),InlineValueContext:s(()=>HF,"InlineValueContext"),InlineValueEvaluatableExpression:s(()=>qF,"InlineValueEvaluatableExpression"),InlineValueText:s(()=>VF,"InlineValueText"),InlineValueVariableLookup:s(()=>WF,"InlineValueVariableLookup"),InsertReplaceEdit:s(()=>yF,"InsertReplaceEdit"),InsertTextFormat:s(()=>mF,"InsertTextFormat"),InsertTextMode:s(()=>vF,"InsertTextMode"),Location:s(()=>DT,"Location"),LocationLink:s(()=>nF,"LocationLink"),MarkedString:s(()=>PT,"MarkedString"),MarkupContent:s(()=>d1,"MarkupContent"),MarkupKind:s(()=>W5,"MarkupKind"),OptionalVersionedTextDocumentIdentifier:s(()=>NT,"OptionalVersionedTextDocumentIdentifier"),ParameterInformation:s(()=>kF,"ParameterInformation"),Position:s(()=>bn,"Position"),Range:s(()=>en,"Range"),RenameFile:s(()=>u1,"RenameFile"),SelectedCompletionInfo:s(()=>ZF,"SelectedCompletionInfo"),SelectionRange:s(()=>$F,"SelectionRange"),SemanticTokenModifiers:s(()=>GF,"SemanticTokenModifiers"),SemanticTokenTypes:s(()=>FF,"SemanticTokenTypes"),SemanticTokens:s(()=>zF,"SemanticTokens"),SignatureInformation:s(()=>wF,"SignatureInformation"),StringValue:s(()=>YF,"StringValue"),SymbolInformation:s(()=>_F,"SymbolInformation"),SymbolKind:s(()=>AF,"SymbolKind"),SymbolTag:s(()=>RF,"SymbolTag"),TextDocument:s(()=>eG,"TextDocument"),TextDocumentEdit:s(()=>MT,"TextDocumentEdit"),TextDocumentIdentifier:s(()=>hF,"TextDocumentIdentifier"),TextDocumentItem:s(()=>fF,"TextDocumentItem"),TextEdit:s(()=>Kc,"TextEdit"),URI:s(()=>F5,"URI"),VersionedTextDocumentIdentifier:s(()=>dF,"VersionedTextDocumentIdentifier"),WorkspaceChange:s(()=>xTe,"WorkspaceChange"),WorkspaceEdit:s(()=>V5,"WorkspaceEdit"),WorkspaceFolder:s(()=>JF,"WorkspaceFolder"),WorkspaceSymbol:s(()=>LF,"WorkspaceSymbol"),integer:s(()=>rF,"integer"),uinteger:s(()=>LT,"uinteger")});gC=Sht({"../../node_modules/.pnpm/vscode-languageserver-types@3.17.5/node_modules/vscode-languageserver-types/lib/esm/main.js"(){"use strict";(function(e){function t(r){return typeof r=="string"}s(t,"is"),_(t,"is"),e.is=t})(tF||(tF={})),(function(e){function t(r){return typeof r=="string"}s(t,"is"),_(t,"is"),e.is=t})(F5||(F5={})),(function(e){e.MIN_VALUE=-2147483648,e.MAX_VALUE=2147483647;function t(r){return typeof r=="number"&&e.MIN_VALUE<=r&&r<=e.MAX_VALUE}s(t,"is"),_(t,"is"),e.is=t})(rF||(rF={})),(function(e){e.MIN_VALUE=0,e.MAX_VALUE=2147483647;function t(r){return typeof r=="number"&&e.MIN_VALUE<=r&&r<=e.MAX_VALUE}s(t,"is"),_(t,"is"),e.is=t})(LT||(LT={})),(function(e){function t(n,i){return n===Number.MAX_VALUE&&(n=LT.MAX_VALUE),i===Number.MAX_VALUE&&(i=LT.MAX_VALUE),{line:n,character:i}}s(t,"create"),_(t,"create"),e.create=t;function r(n){let i=n;return rt.objectLiteral(i)&&rt.uinteger(i.line)&&rt.uinteger(i.character)}s(r,"is"),_(r,"is"),e.is=r})(bn||(bn={})),(function(e){function t(n,i,a,o){if(rt.uinteger(n)&&rt.uinteger(i)&&rt.uinteger(a)&&rt.uinteger(o))return{start:bn.create(n,i),end:bn.create(a,o)};if(bn.is(n)&&bn.is(i))return{start:n,end:i};throw new Error(`Range#create called with invalid arguments[${n}, ${i}, ${a}, ${o}]`)}s(t,"create"),_(t,"create"),e.create=t;function r(n){let i=n;return rt.objectLiteral(i)&&bn.is(i.start)&&bn.is(i.end)}s(r,"is"),_(r,"is"),e.is=r})(en||(en={})),(function(e){function t(n,i){return{uri:n,range:i}}s(t,"create"),_(t,"create"),e.create=t;function r(n){let i=n;return rt.objectLiteral(i)&&en.is(i.range)&&(rt.string(i.uri)||rt.undefined(i.uri))}s(r,"is"),_(r,"is"),e.is=r})(DT||(DT={})),(function(e){function t(n,i,a,o){return{targetUri:n,targetRange:i,targetSelectionRange:a,originSelectionRange:o}}s(t,"create"),_(t,"create"),e.create=t;function r(n){let i=n;return rt.objectLiteral(i)&&en.is(i.targetRange)&&rt.string(i.targetUri)&&en.is(i.targetSelectionRange)&&(en.is(i.originSelectionRange)||rt.undefined(i.originSelectionRange))}s(r,"is"),_(r,"is"),e.is=r})(nF||(nF={})),(function(e){function t(n,i,a,o){return{red:n,green:i,blue:a,alpha:o}}s(t,"create"),_(t,"create"),e.create=t;function r(n){let i=n;return rt.objectLiteral(i)&&rt.numberRange(i.red,0,1)&&rt.numberRange(i.green,0,1)&&rt.numberRange(i.blue,0,1)&&rt.numberRange(i.alpha,0,1)}s(r,"is"),_(r,"is"),e.is=r})(G5||(G5={})),(function(e){function t(n,i){return{range:n,color:i}}s(t,"create"),_(t,"create"),e.create=t;function r(n){let i=n;return rt.objectLiteral(i)&&en.is(i.range)&&G5.is(i.color)}s(r,"is"),_(r,"is"),e.is=r})(iF||(iF={})),(function(e){function t(n,i,a){return{label:n,textEdit:i,additionalTextEdits:a}}s(t,"create"),_(t,"create"),e.create=t;function r(n){let i=n;return rt.objectLiteral(i)&&rt.string(i.label)&&(rt.undefined(i.textEdit)||Kc.is(i))&&(rt.undefined(i.additionalTextEdits)||rt.typedArray(i.additionalTextEdits,Kc.is))}s(r,"is"),_(r,"is"),e.is=r})(aF||(aF={})),(function(e){e.Comment="comment",e.Imports="imports",e.Region="region"})(sF||(sF={})),(function(e){function t(n,i,a,o,l,u){let h={startLine:n,endLine:i};return rt.defined(a)&&(h.startCharacter=a),rt.defined(o)&&(h.endCharacter=o),rt.defined(l)&&(h.kind=l),rt.defined(u)&&(h.collapsedText=u),h}s(t,"create"),_(t,"create"),e.create=t;function r(n){let i=n;return rt.objectLiteral(i)&&rt.uinteger(i.startLine)&&rt.uinteger(i.startLine)&&(rt.undefined(i.startCharacter)||rt.uinteger(i.startCharacter))&&(rt.undefined(i.endCharacter)||rt.uinteger(i.endCharacter))&&(rt.undefined(i.kind)||rt.string(i.kind))}s(r,"is"),_(r,"is"),e.is=r})(oF||(oF={})),(function(e){function t(n,i){return{location:n,message:i}}s(t,"create"),_(t,"create"),e.create=t;function r(n){let i=n;return rt.defined(i)&&DT.is(i.location)&&rt.string(i.message)}s(r,"is"),_(r,"is"),e.is=r})(z5||(z5={})),(function(e){e.Error=1,e.Warning=2,e.Information=3,e.Hint=4})(lF||(lF={})),(function(e){e.Unnecessary=1,e.Deprecated=2})(cF||(cF={})),(function(e){function t(r){let n=r;return rt.objectLiteral(n)&&rt.string(n.href)}s(t,"is"),_(t,"is"),e.is=t})(uF||(uF={})),(function(e){function t(n,i,a,o,l,u){let h={range:n,message:i};return rt.defined(a)&&(h.severity=a),rt.defined(o)&&(h.code=o),rt.defined(l)&&(h.source=l),rt.defined(u)&&(h.relatedInformation=u),h}s(t,"create"),_(t,"create"),e.create=t;function r(n){var i;let a=n;return rt.defined(a)&&en.is(a.range)&&rt.string(a.message)&&(rt.number(a.severity)||rt.undefined(a.severity))&&(rt.integer(a.code)||rt.string(a.code)||rt.undefined(a.code))&&(rt.undefined(a.codeDescription)||rt.string((i=a.codeDescription)===null||i===void 0?void 0:i.href))&&(rt.string(a.source)||rt.undefined(a.source))&&(rt.undefined(a.relatedInformation)||rt.typedArray(a.relatedInformation,z5.is))}s(r,"is"),_(r,"is"),e.is=r})(IT||(IT={})),(function(e){function t(n,i,...a){let o={title:n,command:i};return rt.defined(a)&&a.length>0&&(o.arguments=a),o}s(t,"create"),_(t,"create"),e.create=t;function r(n){let i=n;return rt.defined(i)&&rt.string(i.title)&&rt.string(i.command)}s(r,"is"),_(r,"is"),e.is=r})(Rm||(Rm={})),(function(e){function t(a,o){return{range:a,newText:o}}s(t,"replace"),_(t,"replace"),e.replace=t;function r(a,o){return{range:{start:a,end:a},newText:o}}s(r,"insert"),_(r,"insert"),e.insert=r;function n(a){return{range:a,newText:""}}s(n,"del"),_(n,"del"),e.del=n;function i(a){let o=a;return rt.objectLiteral(o)&&rt.string(o.newText)&&en.is(o.range)}s(i,"is"),_(i,"is"),e.is=i})(Kc||(Kc={})),(function(e){function t(n,i,a){let o={label:n};return i!==void 0&&(o.needsConfirmation=i),a!==void 0&&(o.description=a),o}s(t,"create"),_(t,"create"),e.create=t;function r(n){let i=n;return rt.objectLiteral(i)&&rt.string(i.label)&&(rt.boolean(i.needsConfirmation)||i.needsConfirmation===void 0)&&(rt.string(i.description)||i.description===void 0)}s(r,"is"),_(r,"is"),e.is=r})(_m||(_m={})),(function(e){function t(r){let n=r;return rt.string(n)}s(t,"is"),_(t,"is"),e.is=t})(Ma||(Ma={})),(function(e){function t(a,o,l){return{range:a,newText:o,annotationId:l}}s(t,"replace"),_(t,"replace"),e.replace=t;function r(a,o,l){return{range:{start:a,end:a},newText:o,annotationId:l}}s(r,"insert"),_(r,"insert"),e.insert=r;function n(a,o){return{range:a,newText:"",annotationId:o}}s(n,"del"),_(n,"del"),e.del=n;function i(a){let o=a;return Kc.is(o)&&(_m.is(o.annotationId)||Ma.is(o.annotationId))}s(i,"is"),_(i,"is"),e.is=i})(sh||(sh={})),(function(e){function t(n,i){return{textDocument:n,edits:i}}s(t,"create"),_(t,"create"),e.create=t;function r(n){let i=n;return rt.defined(i)&&NT.is(i.textDocument)&&Array.isArray(i.edits)}s(r,"is"),_(r,"is"),e.is=r})(MT||(MT={})),(function(e){function t(n,i,a){let o={kind:"create",uri:n};return i!==void 0&&(i.overwrite!==void 0||i.ignoreIfExists!==void 0)&&(o.options=i),a!==void 0&&(o.annotationId=a),o}s(t,"create"),_(t,"create"),e.create=t;function r(n){let i=n;return i&&i.kind==="create"&&rt.string(i.uri)&&(i.options===void 0||(i.options.overwrite===void 0||rt.boolean(i.options.overwrite))&&(i.options.ignoreIfExists===void 0||rt.boolean(i.options.ignoreIfExists)))&&(i.annotationId===void 0||Ma.is(i.annotationId))}s(r,"is"),_(r,"is"),e.is=r})(c1||(c1={})),(function(e){function t(n,i,a,o){let l={kind:"rename",oldUri:n,newUri:i};return a!==void 0&&(a.overwrite!==void 0||a.ignoreIfExists!==void 0)&&(l.options=a),o!==void 0&&(l.annotationId=o),l}s(t,"create"),_(t,"create"),e.create=t;function r(n){let i=n;return i&&i.kind==="rename"&&rt.string(i.oldUri)&&rt.string(i.newUri)&&(i.options===void 0||(i.options.overwrite===void 0||rt.boolean(i.options.overwrite))&&(i.options.ignoreIfExists===void 0||rt.boolean(i.options.ignoreIfExists)))&&(i.annotationId===void 0||Ma.is(i.annotationId))}s(r,"is"),_(r,"is"),e.is=r})(u1||(u1={})),(function(e){function t(n,i,a){let o={kind:"delete",uri:n};return i!==void 0&&(i.recursive!==void 0||i.ignoreIfNotExists!==void 0)&&(o.options=i),a!==void 0&&(o.annotationId=a),o}s(t,"create"),_(t,"create"),e.create=t;function r(n){let i=n;return i&&i.kind==="delete"&&rt.string(i.uri)&&(i.options===void 0||(i.options.recursive===void 0||rt.boolean(i.options.recursive))&&(i.options.ignoreIfNotExists===void 0||rt.boolean(i.options.ignoreIfNotExists)))&&(i.annotationId===void 0||Ma.is(i.annotationId))}s(r,"is"),_(r,"is"),e.is=r})(h1||(h1={})),(function(e){function t(r){let n=r;return n&&(n.changes!==void 0||n.documentChanges!==void 0)&&(n.documentChanges===void 0||n.documentChanges.every(i=>rt.string(i.kind)?c1.is(i)||u1.is(i)||h1.is(i):MT.is(i)))}s(t,"is"),_(t,"is"),e.is=t})(V5||(V5={})),CT=class{static{s(this,"TextEditChangeImpl")}static{_(this,"TextEditChangeImpl")}constructor(e,t){this.edits=e,this.changeAnnotations=t}insert(e,t,r){let n,i;if(r===void 0?n=Kc.insert(e,t):Ma.is(r)?(i=r,n=sh.insert(e,t,r)):(this.assertChangeAnnotations(this.changeAnnotations),i=this.changeAnnotations.manage(r),n=sh.insert(e,t,i)),this.edits.push(n),i!==void 0)return i}replace(e,t,r){let n,i;if(r===void 0?n=Kc.replace(e,t):Ma.is(r)?(i=r,n=sh.replace(e,t,r)):(this.assertChangeAnnotations(this.changeAnnotations),i=this.changeAnnotations.manage(r),n=sh.replace(e,t,i)),this.edits.push(n),i!==void 0)return i}delete(e,t){let r,n;if(t===void 0?r=Kc.del(e):Ma.is(t)?(n=t,r=sh.del(e,t)):(this.assertChangeAnnotations(this.changeAnnotations),n=this.changeAnnotations.manage(t),r=sh.del(e,n)),this.edits.push(r),n!==void 0)return n}add(e){this.edits.push(e)}all(){return this.edits}clear(){this.edits.splice(0,this.edits.length)}assertChangeAnnotations(e){if(e===void 0)throw new Error("Text edit change is not configured to manage change annotations.")}},O$=class{static{s(this,"ChangeAnnotations")}static{_(this,"ChangeAnnotations")}constructor(e){this._annotations=e===void 0?Object.create(null):e,this._counter=0,this._size=0}all(){return this._annotations}get size(){return this._size}manage(e,t){let r;if(Ma.is(e)?r=e:(r=this.nextId(),t=e),this._annotations[r]!==void 0)throw new Error(`Id ${r} is already in use.`);if(t===void 0)throw new Error(`No annotation provided for id ${r}`);return this._annotations[r]=t,this._size++,r}nextId(){return this._counter++,this._counter.toString()}},xTe=class{static{s(this,"WorkspaceChange")}static{_(this,"WorkspaceChange")}constructor(e){this._textEditChanges=Object.create(null),e!==void 0?(this._workspaceEdit=e,e.documentChanges?(this._changeAnnotations=new O$(e.changeAnnotations),e.changeAnnotations=this._changeAnnotations.all(),e.documentChanges.forEach(t=>{if(MT.is(t)){let r=new CT(t.edits,this._changeAnnotations);this._textEditChanges[t.textDocument.uri]=r}})):e.changes&&Object.keys(e.changes).forEach(t=>{let r=new CT(e.changes[t]);this._textEditChanges[t]=r})):this._workspaceEdit={}}get edit(){return this.initDocumentChanges(),this._changeAnnotations!==void 0&&(this._changeAnnotations.size===0?this._workspaceEdit.changeAnnotations=void 0:this._workspaceEdit.changeAnnotations=this._changeAnnotations.all()),this._workspaceEdit}getTextEditChange(e){if(NT.is(e)){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let t={uri:e.uri,version:e.version},r=this._textEditChanges[t.uri];if(!r){let n=[],i={textDocument:t,edits:n};this._workspaceEdit.documentChanges.push(i),r=new CT(n,this._changeAnnotations),this._textEditChanges[t.uri]=r}return r}else{if(this.initChanges(),this._workspaceEdit.changes===void 0)throw new Error("Workspace edit is not configured for normal text edit changes.");let t=this._textEditChanges[e];if(!t){let r=[];this._workspaceEdit.changes[e]=r,t=new CT(r),this._textEditChanges[e]=t}return t}}initDocumentChanges(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._changeAnnotations=new O$,this._workspaceEdit.documentChanges=[],this._workspaceEdit.changeAnnotations=this._changeAnnotations.all())}initChanges(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._workspaceEdit.changes=Object.create(null))}createFile(e,t,r){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let n;_m.is(t)||Ma.is(t)?n=t:r=t;let i,a;if(n===void 0?i=c1.create(e,r):(a=Ma.is(n)?n:this._changeAnnotations.manage(n),i=c1.create(e,r,a)),this._workspaceEdit.documentChanges.push(i),a!==void 0)return a}renameFile(e,t,r,n){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let i;_m.is(r)||Ma.is(r)?i=r:n=r;let a,o;if(i===void 0?a=u1.create(e,t,n):(o=Ma.is(i)?i:this._changeAnnotations.manage(i),a=u1.create(e,t,n,o)),this._workspaceEdit.documentChanges.push(a),o!==void 0)return o}deleteFile(e,t,r){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let n;_m.is(t)||Ma.is(t)?n=t:r=t;let i,a;if(n===void 0?i=h1.create(e,r):(a=Ma.is(n)?n:this._changeAnnotations.manage(n),i=h1.create(e,r,a)),this._workspaceEdit.documentChanges.push(i),a!==void 0)return a}},(function(e){function t(n){return{uri:n}}s(t,"create"),_(t,"create"),e.create=t;function r(n){let i=n;return rt.defined(i)&&rt.string(i.uri)}s(r,"is"),_(r,"is"),e.is=r})(hF||(hF={})),(function(e){function t(n,i){return{uri:n,version:i}}s(t,"create"),_(t,"create"),e.create=t;function r(n){let i=n;return rt.defined(i)&&rt.string(i.uri)&&rt.integer(i.version)}s(r,"is"),_(r,"is"),e.is=r})(dF||(dF={})),(function(e){function t(n,i){return{uri:n,version:i}}s(t,"create"),_(t,"create"),e.create=t;function r(n){let i=n;return rt.defined(i)&&rt.string(i.uri)&&(i.version===null||rt.integer(i.version))}s(r,"is"),_(r,"is"),e.is=r})(NT||(NT={})),(function(e){function t(n,i,a,o){return{uri:n,languageId:i,version:a,text:o}}s(t,"create"),_(t,"create"),e.create=t;function r(n){let i=n;return rt.defined(i)&&rt.string(i.uri)&&rt.string(i.languageId)&&rt.integer(i.version)&&rt.string(i.text)}s(r,"is"),_(r,"is"),e.is=r})(fF||(fF={})),(function(e){e.PlainText="plaintext",e.Markdown="markdown";function t(r){let n=r;return n===e.PlainText||n===e.Markdown}s(t,"is"),_(t,"is"),e.is=t})(W5||(W5={})),(function(e){function t(r){let n=r;return rt.objectLiteral(r)&&W5.is(n.kind)&&rt.string(n.value)}s(t,"is"),_(t,"is"),e.is=t})(d1||(d1={})),(function(e){e.Text=1,e.Method=2,e.Function=3,e.Constructor=4,e.Field=5,e.Variable=6,e.Class=7,e.Interface=8,e.Module=9,e.Property=10,e.Unit=11,e.Value=12,e.Enum=13,e.Keyword=14,e.Snippet=15,e.Color=16,e.File=17,e.Reference=18,e.Folder=19,e.EnumMember=20,e.Constant=21,e.Struct=22,e.Event=23,e.Operator=24,e.TypeParameter=25})(pF||(pF={})),(function(e){e.PlainText=1,e.Snippet=2})(mF||(mF={})),(function(e){e.Deprecated=1})(gF||(gF={})),(function(e){function t(n,i,a){return{newText:n,insert:i,replace:a}}s(t,"create"),_(t,"create"),e.create=t;function r(n){let i=n;return i&&rt.string(i.newText)&&en.is(i.insert)&&en.is(i.replace)}s(r,"is"),_(r,"is"),e.is=r})(yF||(yF={})),(function(e){e.asIs=1,e.adjustIndentation=2})(vF||(vF={})),(function(e){function t(r){let n=r;return n&&(rt.string(n.detail)||n.detail===void 0)&&(rt.string(n.description)||n.description===void 0)}s(t,"is"),_(t,"is"),e.is=t})(xF||(xF={})),(function(e){function t(r){return{label:r}}s(t,"create"),_(t,"create"),e.create=t})(bF||(bF={})),(function(e){function t(r,n){return{items:r||[],isIncomplete:!!n}}s(t,"create"),_(t,"create"),e.create=t})(TF||(TF={})),(function(e){function t(n){return n.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}s(t,"fromPlainText"),_(t,"fromPlainText"),e.fromPlainText=t;function r(n){let i=n;return rt.string(i)||rt.objectLiteral(i)&&rt.string(i.language)&&rt.string(i.value)}s(r,"is"),_(r,"is"),e.is=r})(PT||(PT={})),(function(e){function t(r){let n=r;return!!n&&rt.objectLiteral(n)&&(d1.is(n.contents)||PT.is(n.contents)||rt.typedArray(n.contents,PT.is))&&(r.range===void 0||en.is(r.range))}s(t,"is"),_(t,"is"),e.is=t})(CF||(CF={})),(function(e){function t(r,n){return n?{label:r,documentation:n}:{label:r}}s(t,"create"),_(t,"create"),e.create=t})(kF||(kF={})),(function(e){function t(r,n,...i){let a={label:r};return rt.defined(n)&&(a.documentation=n),rt.defined(i)?a.parameters=i:a.parameters=[],a}s(t,"create"),_(t,"create"),e.create=t})(wF||(wF={})),(function(e){e.Text=1,e.Read=2,e.Write=3})(SF||(SF={})),(function(e){function t(r,n){let i={range:r};return rt.number(n)&&(i.kind=n),i}s(t,"create"),_(t,"create"),e.create=t})(EF||(EF={})),(function(e){e.File=1,e.Module=2,e.Namespace=3,e.Package=4,e.Class=5,e.Method=6,e.Property=7,e.Field=8,e.Constructor=9,e.Enum=10,e.Interface=11,e.Function=12,e.Variable=13,e.Constant=14,e.String=15,e.Number=16,e.Boolean=17,e.Array=18,e.Object=19,e.Key=20,e.Null=21,e.EnumMember=22,e.Struct=23,e.Event=24,e.Operator=25,e.TypeParameter=26})(AF||(AF={})),(function(e){e.Deprecated=1})(RF||(RF={})),(function(e){function t(r,n,i,a,o){let l={name:r,kind:n,location:{uri:a,range:i}};return o&&(l.containerName=o),l}s(t,"create"),_(t,"create"),e.create=t})(_F||(_F={})),(function(e){function t(r,n,i,a){return a!==void 0?{name:r,kind:n,location:{uri:i,range:a}}:{name:r,kind:n,location:{uri:i}}}s(t,"create"),_(t,"create"),e.create=t})(LF||(LF={})),(function(e){function t(n,i,a,o,l,u){let h={name:n,detail:i,kind:a,range:o,selectionRange:l};return u!==void 0&&(h.children=u),h}s(t,"create"),_(t,"create"),e.create=t;function r(n){let i=n;return i&&rt.string(i.name)&&rt.number(i.kind)&&en.is(i.range)&&en.is(i.selectionRange)&&(i.detail===void 0||rt.string(i.detail))&&(i.deprecated===void 0||rt.boolean(i.deprecated))&&(i.children===void 0||Array.isArray(i.children))&&(i.tags===void 0||Array.isArray(i.tags))}s(r,"is"),_(r,"is"),e.is=r})(DF||(DF={})),(function(e){e.Empty="",e.QuickFix="quickfix",e.Refactor="refactor",e.RefactorExtract="refactor.extract",e.RefactorInline="refactor.inline",e.RefactorRewrite="refactor.rewrite",e.Source="source",e.SourceOrganizeImports="source.organizeImports",e.SourceFixAll="source.fixAll"})(IF||(IF={})),(function(e){e.Invoked=1,e.Automatic=2})(OT||(OT={})),(function(e){function t(n,i,a){let o={diagnostics:n};return i!=null&&(o.only=i),a!=null&&(o.triggerKind=a),o}s(t,"create"),_(t,"create"),e.create=t;function r(n){let i=n;return rt.defined(i)&&rt.typedArray(i.diagnostics,IT.is)&&(i.only===void 0||rt.typedArray(i.only,rt.string))&&(i.triggerKind===void 0||i.triggerKind===OT.Invoked||i.triggerKind===OT.Automatic)}s(r,"is"),_(r,"is"),e.is=r})(MF||(MF={})),(function(e){function t(n,i,a){let o={title:n},l=!0;return typeof i=="string"?(l=!1,o.kind=i):Rm.is(i)?o.command=i:o.edit=i,l&&a!==void 0&&(o.kind=a),o}s(t,"create"),_(t,"create"),e.create=t;function r(n){let i=n;return i&&rt.string(i.title)&&(i.diagnostics===void 0||rt.typedArray(i.diagnostics,IT.is))&&(i.kind===void 0||rt.string(i.kind))&&(i.edit!==void 0||i.command!==void 0)&&(i.command===void 0||Rm.is(i.command))&&(i.isPreferred===void 0||rt.boolean(i.isPreferred))&&(i.edit===void 0||V5.is(i.edit))}s(r,"is"),_(r,"is"),e.is=r})(NF||(NF={})),(function(e){function t(n,i){let a={range:n};return rt.defined(i)&&(a.data=i),a}s(t,"create"),_(t,"create"),e.create=t;function r(n){let i=n;return rt.defined(i)&&en.is(i.range)&&(rt.undefined(i.command)||Rm.is(i.command))}s(r,"is"),_(r,"is"),e.is=r})(PF||(PF={})),(function(e){function t(n,i){return{tabSize:n,insertSpaces:i}}s(t,"create"),_(t,"create"),e.create=t;function r(n){let i=n;return rt.defined(i)&&rt.uinteger(i.tabSize)&&rt.boolean(i.insertSpaces)}s(r,"is"),_(r,"is"),e.is=r})(OF||(OF={})),(function(e){function t(n,i,a){return{range:n,target:i,data:a}}s(t,"create"),_(t,"create"),e.create=t;function r(n){let i=n;return rt.defined(i)&&en.is(i.range)&&(rt.undefined(i.target)||rt.string(i.target))}s(r,"is"),_(r,"is"),e.is=r})(BF||(BF={})),(function(e){function t(n,i){return{range:n,parent:i}}s(t,"create"),_(t,"create"),e.create=t;function r(n){let i=n;return rt.objectLiteral(i)&&en.is(i.range)&&(i.parent===void 0||e.is(i.parent))}s(r,"is"),_(r,"is"),e.is=r})($F||($F={})),(function(e){e.namespace="namespace",e.type="type",e.class="class",e.enum="enum",e.interface="interface",e.struct="struct",e.typeParameter="typeParameter",e.parameter="parameter",e.variable="variable",e.property="property",e.enumMember="enumMember",e.event="event",e.function="function",e.method="method",e.macro="macro",e.keyword="keyword",e.modifier="modifier",e.comment="comment",e.string="string",e.number="number",e.regexp="regexp",e.operator="operator",e.decorator="decorator"})(FF||(FF={})),(function(e){e.declaration="declaration",e.definition="definition",e.readonly="readonly",e.static="static",e.deprecated="deprecated",e.abstract="abstract",e.async="async",e.modification="modification",e.documentation="documentation",e.defaultLibrary="defaultLibrary"})(GF||(GF={})),(function(e){function t(r){let n=r;return rt.objectLiteral(n)&&(n.resultId===void 0||typeof n.resultId=="string")&&Array.isArray(n.data)&&(n.data.length===0||typeof n.data[0]=="number")}s(t,"is"),_(t,"is"),e.is=t})(zF||(zF={})),(function(e){function t(n,i){return{range:n,text:i}}s(t,"create"),_(t,"create"),e.create=t;function r(n){let i=n;return i!=null&&en.is(i.range)&&rt.string(i.text)}s(r,"is"),_(r,"is"),e.is=r})(VF||(VF={})),(function(e){function t(n,i,a){return{range:n,variableName:i,caseSensitiveLookup:a}}s(t,"create"),_(t,"create"),e.create=t;function r(n){let i=n;return i!=null&&en.is(i.range)&&rt.boolean(i.caseSensitiveLookup)&&(rt.string(i.variableName)||i.variableName===void 0)}s(r,"is"),_(r,"is"),e.is=r})(WF||(WF={})),(function(e){function t(n,i){return{range:n,expression:i}}s(t,"create"),_(t,"create"),e.create=t;function r(n){let i=n;return i!=null&&en.is(i.range)&&(rt.string(i.expression)||i.expression===void 0)}s(r,"is"),_(r,"is"),e.is=r})(qF||(qF={})),(function(e){function t(n,i){return{frameId:n,stoppedLocation:i}}s(t,"create"),_(t,"create"),e.create=t;function r(n){let i=n;return rt.defined(i)&&en.is(n.stoppedLocation)}s(r,"is"),_(r,"is"),e.is=r})(HF||(HF={})),(function(e){e.Type=1,e.Parameter=2;function t(r){return r===1||r===2}s(t,"is"),_(t,"is"),e.is=t})(q5||(q5={})),(function(e){function t(n){return{value:n}}s(t,"create"),_(t,"create"),e.create=t;function r(n){let i=n;return rt.objectLiteral(i)&&(i.tooltip===void 0||rt.string(i.tooltip)||d1.is(i.tooltip))&&(i.location===void 0||DT.is(i.location))&&(i.command===void 0||Rm.is(i.command))}s(r,"is"),_(r,"is"),e.is=r})(H5||(H5={})),(function(e){function t(n,i,a){let o={position:n,label:i};return a!==void 0&&(o.kind=a),o}s(t,"create"),_(t,"create"),e.create=t;function r(n){let i=n;return rt.objectLiteral(i)&&bn.is(i.position)&&(rt.string(i.label)||rt.typedArray(i.label,H5.is))&&(i.kind===void 0||q5.is(i.kind))&&i.textEdits===void 0||rt.typedArray(i.textEdits,Kc.is)&&(i.tooltip===void 0||rt.string(i.tooltip)||d1.is(i.tooltip))&&(i.paddingLeft===void 0||rt.boolean(i.paddingLeft))&&(i.paddingRight===void 0||rt.boolean(i.paddingRight))}s(r,"is"),_(r,"is"),e.is=r})(UF||(UF={})),(function(e){function t(r){return{kind:"snippet",value:r}}s(t,"createSnippet"),_(t,"createSnippet"),e.createSnippet=t})(YF||(YF={})),(function(e){function t(r,n,i,a){return{insertText:r,filterText:n,range:i,command:a}}s(t,"create"),_(t,"create"),e.create=t})(jF||(jF={})),(function(e){function t(r){return{items:r}}s(t,"create"),_(t,"create"),e.create=t})(XF||(XF={})),(function(e){e.Invoked=0,e.Automatic=1})(KF||(KF={})),(function(e){function t(r,n){return{range:r,text:n}}s(t,"create"),_(t,"create"),e.create=t})(ZF||(ZF={})),(function(e){function t(r,n){return{triggerKind:r,selectedCompletionInfo:n}}s(t,"create"),_(t,"create"),e.create=t})(QF||(QF={})),(function(e){function t(r){let n=r;return rt.objectLiteral(n)&&F5.is(n.uri)&&rt.string(n.name)}s(t,"is"),_(t,"is"),e.is=t})(JF||(JF={})),bTe=[` +`,`\r +`,"\r"],(function(e){function t(a,o,l,u){return new l2e(a,o,l,u)}s(t,"create"),_(t,"create"),e.create=t;function r(a){let o=a;return!!(rt.defined(o)&&rt.string(o.uri)&&(rt.undefined(o.languageId)||rt.string(o.languageId))&&rt.uinteger(o.lineCount)&&rt.func(o.getText)&&rt.func(o.positionAt)&&rt.func(o.offsetAt))}s(r,"is"),_(r,"is"),e.is=r;function n(a,o){let l=a.getText(),u=i(o,(d,f)=>{let p=d.range.start.line-f.range.start.line;return p===0?d.range.start.character-f.range.start.character:p}),h=l.length;for(let d=u.length-1;d>=0;d--){let f=u[d],p=a.offsetAt(f.range.start),m=a.offsetAt(f.range.end);if(m<=h)l=l.substring(0,p)+f.newText+l.substring(m,l.length);else throw new Error("Overlapping edit");h=p}return l}s(n,"applyEdits"),_(n,"applyEdits"),e.applyEdits=n;function i(a,o){if(a.length<=1)return a;let l=a.length/2|0,u=a.slice(0,l),h=a.slice(l);i(u,o),i(h,o);let d=0,f=0,p=0;for(;d0&&e.push(t.length),this._lineOffsets=e}return this._lineOffsets}positionAt(e){e=Math.max(Math.min(e,this._content.length),0);let t=this.getLineOffsets(),r=0,n=t.length;if(n===0)return bn.create(0,e);for(;re?n=a:r=a+1}let i=r-1;return bn.create(i,e-t[i])}offsetAt(e){let t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;let r=t[e.line],n=e.line+1"u"}s(n,"undefined2"),_(n,"undefined"),e.undefined=n;function i(m){return m===!0||m===!1}s(i,"boolean"),_(i,"boolean"),e.boolean=i;function a(m){return t.call(m)==="[object String]"}s(a,"string"),_(a,"string"),e.string=a;function o(m){return t.call(m)==="[object Number]"}s(o,"number"),_(o,"number"),e.number=o;function l(m,g,y){return t.call(m)==="[object Number]"&&g<=m&&m<=y}s(l,"numberRange"),_(l,"numberRange"),e.numberRange=l;function u(m){return t.call(m)==="[object Number]"&&-2147483648<=m&&m<=2147483647}s(u,"integer2"),_(u,"integer"),e.integer=u;function h(m){return t.call(m)==="[object Number]"&&0<=m&&m<=2147483647}s(h,"uinteger2"),_(h,"uinteger"),e.uinteger=h;function d(m){return t.call(m)==="[object Function]"}s(d,"func"),_(d,"func"),e.func=d;function f(m){return m!==null&&typeof m=="object"}s(f,"objectLiteral"),_(f,"objectLiteral"),e.objectLiteral=f;function p(m,g){return Array.isArray(m)&&m.every(g)}s(p,"typedArray"),_(p,"typedArray"),e.typedArray=p})(rt||(rt={}))}}),fg=Or({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/ral.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var t;function r(){if(t===void 0)throw new Error("No runtime abstraction layer installed");return t}s(r,"RAL"),_(r,"RAL"),(function(n){function i(a){if(a===void 0)throw new Error("No runtime abstraction layer provided");t=a}s(i,"install"),_(i,"install"),n.install=i})(r||(r={})),e.default=r}}),yC=Or({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/is.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.stringArray=e.array=e.func=e.error=e.number=e.string=e.boolean=void 0;function t(u){return u===!0||u===!1}s(t,"boolean"),_(t,"boolean"),e.boolean=t;function r(u){return typeof u=="string"||u instanceof String}s(r,"string"),_(r,"string"),e.string=r;function n(u){return typeof u=="number"||u instanceof Number}s(n,"number"),_(n,"number"),e.number=n;function i(u){return u instanceof Error}s(i,"error"),_(i,"error"),e.error=i;function a(u){return typeof u=="function"}s(a,"func"),_(a,"func"),e.func=a;function o(u){return Array.isArray(u)}s(o,"array"),_(o,"array"),e.array=o;function l(u){return o(u)&&u.every(h=>r(h))}s(l,"stringArray"),_(l,"stringArray"),e.stringArray=l}}),z1=Or({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/events.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Emitter=e.Event=void 0;var t=fg(),r;(function(a){let o={dispose(){}};a.None=function(){return o}})(r||(e.Event=r={}));var n=class{static{s(this,"CallbackList")}static{_(this,"CallbackList")}add(a,o=null,l){this._callbacks||(this._callbacks=[],this._contexts=[]),this._callbacks.push(a),this._contexts.push(o),Array.isArray(l)&&l.push({dispose:_(()=>this.remove(a,o),"dispose")})}remove(a,o=null){if(!this._callbacks)return;let l=!1;for(let u=0,h=this._callbacks.length;u{this._callbacks||(this._callbacks=new n),this._options&&this._options.onFirstListenerAdd&&this._callbacks.isEmpty()&&this._options.onFirstListenerAdd(this),this._callbacks.add(o,l);let h={dispose:_(()=>{this._callbacks&&(this._callbacks.remove(o,l),h.dispose=TTe._noop,this._options&&this._options.onLastListenerRemove&&this._callbacks.isEmpty()&&this._options.onLastListenerRemove(this))},"dispose")};return Array.isArray(u)&&u.push(h),h}),this._event}fire(o){this._callbacks&&this._callbacks.invoke.call(this._callbacks,o)}dispose(){this._callbacks&&(this._callbacks.dispose(),this._callbacks=void 0)}};e.Emitter=i,i._noop=function(){}}}),rR=Or({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/cancellation.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CancellationTokenSource=e.CancellationToken=void 0;var t=fg(),r=yC(),n=z1(),i;(function(u){u.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:n.Event.None}),u.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:n.Event.None});function h(d){let f=d;return f&&(f===u.None||f===u.Cancelled||r.boolean(f.isCancellationRequested)&&!!f.onCancellationRequested)}s(h,"is"),_(h,"is"),u.is=h})(i||(e.CancellationToken=i={}));var a=Object.freeze(function(u,h){let d=(0,t.default)().timer.setTimeout(u.bind(h),0);return{dispose(){d.dispose()}}}),o=class{static{s(this,"MutableToken")}static{_(this,"MutableToken")}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?a:(this._emitter||(this._emitter=new n.Emitter),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=void 0)}},l=class{static{s(this,"CancellationTokenSource3")}static{_(this,"CancellationTokenSource")}get token(){return this._token||(this._token=new o),this._token}cancel(){this._token?this._token.cancel():this._token=i.Cancelled}dispose(){this._token?this._token instanceof o&&this._token.dispose():this._token=i.None}};e.CancellationTokenSource=l}}),CTe=Or({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/messages.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Message=e.NotificationType9=e.NotificationType8=e.NotificationType7=e.NotificationType6=e.NotificationType5=e.NotificationType4=e.NotificationType3=e.NotificationType2=e.NotificationType1=e.NotificationType0=e.NotificationType=e.RequestType9=e.RequestType8=e.RequestType7=e.RequestType6=e.RequestType5=e.RequestType4=e.RequestType3=e.RequestType2=e.RequestType1=e.RequestType=e.RequestType0=e.AbstractMessageSignature=e.ParameterStructures=e.ResponseError=e.ErrorCodes=void 0;var t=yC(),r;(function(E){E.ParseError=-32700,E.InvalidRequest=-32600,E.MethodNotFound=-32601,E.InvalidParams=-32602,E.InternalError=-32603,E.jsonrpcReservedErrorRangeStart=-32099,E.serverErrorStart=-32099,E.MessageWriteError=-32099,E.MessageReadError=-32098,E.PendingResponseRejected=-32097,E.ConnectionInactive=-32096,E.ServerNotInitialized=-32002,E.UnknownErrorCode=-32001,E.jsonrpcReservedErrorRangeEnd=-32e3,E.serverErrorEnd=-32e3})(r||(e.ErrorCodes=r={}));var n=class kTe extends Error{static{s(this,"_ResponseError")}static{_(this,"ResponseError")}constructor(I,L,P){super(L),this.code=t.number(I)?I:r.UnknownErrorCode,this.data=P,Object.setPrototypeOf(this,kTe.prototype)}toJson(){let I={code:this.code,message:this.message};return this.data!==void 0&&(I.data=this.data),I}};e.ResponseError=n;var i=class U5{static{s(this,"_ParameterStructures")}static{_(this,"ParameterStructures")}constructor(I){this.kind=I}static is(I){return I===U5.auto||I===U5.byName||I===U5.byPosition}toString(){return this.kind}};e.ParameterStructures=i,i.auto=new i("auto"),i.byPosition=new i("byPosition"),i.byName=new i("byName");var a=class{static{s(this,"AbstractMessageSignature")}static{_(this,"AbstractMessageSignature")}constructor(E,I){this.method=E,this.numberOfParams=I}get parameterStructures(){return i.auto}};e.AbstractMessageSignature=a;var o=class extends a{static{s(this,"RequestType0")}static{_(this,"RequestType0")}constructor(E){super(E,0)}};e.RequestType0=o;var l=class extends a{static{s(this,"RequestType")}static{_(this,"RequestType")}constructor(E,I=i.auto){super(E,1),this._parameterStructures=I}get parameterStructures(){return this._parameterStructures}};e.RequestType=l;var u=class extends a{static{s(this,"RequestType1")}static{_(this,"RequestType1")}constructor(E,I=i.auto){super(E,1),this._parameterStructures=I}get parameterStructures(){return this._parameterStructures}};e.RequestType1=u;var h=class extends a{static{s(this,"RequestType2")}static{_(this,"RequestType2")}constructor(E){super(E,2)}};e.RequestType2=h;var d=class extends a{static{s(this,"RequestType3")}static{_(this,"RequestType3")}constructor(E){super(E,3)}};e.RequestType3=d;var f=class extends a{static{s(this,"RequestType4")}static{_(this,"RequestType4")}constructor(E){super(E,4)}};e.RequestType4=f;var p=class extends a{static{s(this,"RequestType5")}static{_(this,"RequestType5")}constructor(E){super(E,5)}};e.RequestType5=p;var m=class extends a{static{s(this,"RequestType6")}static{_(this,"RequestType6")}constructor(E){super(E,6)}};e.RequestType6=m;var g=class extends a{static{s(this,"RequestType7")}static{_(this,"RequestType7")}constructor(E){super(E,7)}};e.RequestType7=g;var y=class extends a{static{s(this,"RequestType8")}static{_(this,"RequestType8")}constructor(E){super(E,8)}};e.RequestType8=y;var v=class extends a{static{s(this,"RequestType9")}static{_(this,"RequestType9")}constructor(E){super(E,9)}};e.RequestType9=v;var x=class extends a{static{s(this,"NotificationType")}static{_(this,"NotificationType")}constructor(E,I=i.auto){super(E,1),this._parameterStructures=I}get parameterStructures(){return this._parameterStructures}};e.NotificationType=x;var b=class extends a{static{s(this,"NotificationType0")}static{_(this,"NotificationType0")}constructor(E){super(E,0)}};e.NotificationType0=b;var T=class extends a{static{s(this,"NotificationType1")}static{_(this,"NotificationType1")}constructor(E,I=i.auto){super(E,1),this._parameterStructures=I}get parameterStructures(){return this._parameterStructures}};e.NotificationType1=T;var w=class extends a{static{s(this,"NotificationType2")}static{_(this,"NotificationType2")}constructor(E){super(E,2)}};e.NotificationType2=w;var C=class extends a{static{s(this,"NotificationType3")}static{_(this,"NotificationType3")}constructor(E){super(E,3)}};e.NotificationType3=C;var k=class extends a{static{s(this,"NotificationType4")}static{_(this,"NotificationType4")}constructor(E){super(E,4)}};e.NotificationType4=k;var S=class extends a{static{s(this,"NotificationType5")}static{_(this,"NotificationType5")}constructor(E){super(E,5)}};e.NotificationType5=S;var A=class extends a{static{s(this,"NotificationType6")}static{_(this,"NotificationType6")}constructor(E){super(E,6)}};e.NotificationType6=A;var M=class extends a{static{s(this,"NotificationType7")}static{_(this,"NotificationType7")}constructor(E){super(E,7)}};e.NotificationType7=M;var N=class extends a{static{s(this,"NotificationType8")}static{_(this,"NotificationType8")}constructor(E){super(E,8)}};e.NotificationType8=N;var D=class extends a{static{s(this,"NotificationType9")}static{_(this,"NotificationType9")}constructor(E){super(E,9)}};e.NotificationType9=D;var R;(function(E){function I(B){let O=B;return O&&t.string(O.method)&&(t.string(O.id)||t.number(O.id))}s(I,"isRequest"),_(I,"isRequest"),E.isRequest=I;function L(B){let O=B;return O&&t.string(O.method)&&B.id===void 0}s(L,"isNotification"),_(L,"isNotification"),E.isNotification=L;function P(B){let O=B;return O&&(O.result!==void 0||!!O.error)&&(t.string(O.id)||t.number(O.id)||O.id===null)}s(P,"isResponse"),_(P,"isResponse"),E.isResponse=P})(R||(e.Message=R={}))}}),wTe=Or({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/linkedMap.js"(e){"use strict";var t;Object.defineProperty(e,"__esModule",{value:!0}),e.LRUCache=e.LinkedMap=e.Touch=void 0;var r;(function(a){a.None=0,a.First=1,a.AsOld=a.First,a.Last=2,a.AsNew=a.Last})(r||(e.Touch=r={}));var n=class{static{s(this,"LinkedMap")}static{_(this,"LinkedMap")}constructor(){this[t]="LinkedMap",this._map=new Map,this._head=void 0,this._tail=void 0,this._size=0,this._state=0}clear(){this._map.clear(),this._head=void 0,this._tail=void 0,this._size=0,this._state++}isEmpty(){return!this._head&&!this._tail}get size(){return this._size}get first(){return this._head?.value}get last(){return this._tail?.value}has(a){return this._map.has(a)}get(a,o=r.None){let l=this._map.get(a);if(l)return o!==r.None&&this.touch(l,o),l.value}set(a,o,l=r.None){let u=this._map.get(a);if(u)u.value=o,l!==r.None&&this.touch(u,l);else{switch(u={key:a,value:o,next:void 0,previous:void 0},l){case r.None:this.addItemLast(u);break;case r.First:this.addItemFirst(u);break;case r.Last:this.addItemLast(u);break;default:this.addItemLast(u);break}this._map.set(a,u),this._size++}return this}delete(a){return!!this.remove(a)}remove(a){let o=this._map.get(a);if(o)return this._map.delete(a),this.removeItem(o),this._size--,o.value}shift(){if(!this._head&&!this._tail)return;if(!this._head||!this._tail)throw new Error("Invalid list");let a=this._head;return this._map.delete(a.key),this.removeItem(a),this._size--,a.value}forEach(a,o){let l=this._state,u=this._head;for(;u;){if(o?a.bind(o)(u.value,u.key,this):a(u.value,u.key,this),this._state!==l)throw new Error("LinkedMap got modified during iteration.");u=u.next}}keys(){let a=this._state,o=this._head,l={[Symbol.iterator]:()=>l,next:_(()=>{if(this._state!==a)throw new Error("LinkedMap got modified during iteration.");if(o){let u={value:o.key,done:!1};return o=o.next,u}else return{value:void 0,done:!0}},"next")};return l}values(){let a=this._state,o=this._head,l={[Symbol.iterator]:()=>l,next:_(()=>{if(this._state!==a)throw new Error("LinkedMap got modified during iteration.");if(o){let u={value:o.value,done:!1};return o=o.next,u}else return{value:void 0,done:!0}},"next")};return l}entries(){let a=this._state,o=this._head,l={[Symbol.iterator]:()=>l,next:_(()=>{if(this._state!==a)throw new Error("LinkedMap got modified during iteration.");if(o){let u={value:[o.key,o.value],done:!1};return o=o.next,u}else return{value:void 0,done:!0}},"next")};return l}[(t=Symbol.toStringTag,Symbol.iterator)](){return this.entries()}trimOld(a){if(a>=this.size)return;if(a===0){this.clear();return}let o=this._head,l=this.size;for(;o&&l>a;)this._map.delete(o.key),o=o.next,l--;this._head=o,this._size=l,o&&(o.previous=void 0),this._state++}addItemFirst(a){if(!this._head&&!this._tail)this._tail=a;else if(this._head)a.next=this._head,this._head.previous=a;else throw new Error("Invalid list");this._head=a,this._state++}addItemLast(a){if(!this._head&&!this._tail)this._head=a;else if(this._tail)a.previous=this._tail,this._tail.next=a;else throw new Error("Invalid list");this._tail=a,this._state++}removeItem(a){if(a===this._head&&a===this._tail)this._head=void 0,this._tail=void 0;else if(a===this._head){if(!a.next)throw new Error("Invalid list");a.next.previous=void 0,this._head=a.next}else if(a===this._tail){if(!a.previous)throw new Error("Invalid list");a.previous.next=void 0,this._tail=a.previous}else{let o=a.next,l=a.previous;if(!o||!l)throw new Error("Invalid list");o.previous=l,l.next=o}a.next=void 0,a.previous=void 0,this._state++}touch(a,o){if(!this._head||!this._tail)throw new Error("Invalid list");if(!(o!==r.First&&o!==r.Last)){if(o===r.First){if(a===this._head)return;let l=a.next,u=a.previous;a===this._tail?(u.next=void 0,this._tail=u):(l.previous=u,u.next=l),a.previous=void 0,a.next=this._head,this._head.previous=a,this._head=a,this._state++}else if(o===r.Last){if(a===this._tail)return;let l=a.next,u=a.previous;a===this._head?(l.previous=void 0,this._head=l):(l.previous=u,u.next=l),a.next=void 0,a.previous=this._tail,this._tail.next=a,this._tail=a,this._state++}}}toJSON(){let a=[];return this.forEach((o,l)=>{a.push([l,o])}),a}fromJSON(a){this.clear();for(let[o,l]of a)this.set(o,l)}};e.LinkedMap=n;var i=class extends n{static{s(this,"LRUCache")}static{_(this,"LRUCache")}constructor(a,o=1){super(),this._limit=a,this._ratio=Math.min(Math.max(0,o),1)}get limit(){return this._limit}set limit(a){this._limit=a,this.checkTrim()}get ratio(){return this._ratio}set ratio(a){this._ratio=Math.min(Math.max(0,a),1),this.checkTrim()}get(a,o=r.AsNew){return super.get(a,o)}peek(a){return super.get(a,r.None)}set(a,o){return super.set(a,o,r.Last),this.checkTrim(),this}checkTrim(){this.size>this._limit&&this.trimOld(Math.round(this._limit*this._ratio))}};e.LRUCache=i}}),Eht=Or({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/disposable.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Disposable=void 0;var t;(function(r){function n(i){return{dispose:i}}s(n,"create"),_(n,"create"),r.create=n})(t||(e.Disposable=t={}))}}),Aht=Or({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/sharedArrayCancellation.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SharedArrayReceiverStrategy=e.SharedArraySenderStrategy=void 0;var t=rR(),r;(function(l){l.Continue=0,l.Cancelled=1})(r||(r={}));var n=class{static{s(this,"SharedArraySenderStrategy")}static{_(this,"SharedArraySenderStrategy")}constructor(){this.buffers=new Map}enableCancellation(l){if(l.id===null)return;let u=new SharedArrayBuffer(4),h=new Int32Array(u,0,1);h[0]=r.Continue,this.buffers.set(l.id,u),l.$cancellationData=u}async sendCancellation(l,u){let h=this.buffers.get(u);if(h===void 0)return;let d=new Int32Array(h,0,1);Atomics.store(d,0,r.Cancelled)}cleanup(l){this.buffers.delete(l)}dispose(){this.buffers.clear()}};e.SharedArraySenderStrategy=n;var i=class{static{s(this,"SharedArrayBufferCancellationToken")}static{_(this,"SharedArrayBufferCancellationToken")}constructor(l){this.data=new Int32Array(l,0,1)}get isCancellationRequested(){return Atomics.load(this.data,0)===r.Cancelled}get onCancellationRequested(){throw new Error("Cancellation over SharedArrayBuffer doesn't support cancellation events")}},a=class{static{s(this,"SharedArrayBufferCancellationTokenSource")}static{_(this,"SharedArrayBufferCancellationTokenSource")}constructor(l){this.token=new i(l)}cancel(){}dispose(){}},o=class{static{s(this,"SharedArrayReceiverStrategy")}static{_(this,"SharedArrayReceiverStrategy")}constructor(){this.kind="request"}createCancellationTokenSource(l){let u=l.$cancellationData;return u===void 0?new t.CancellationTokenSource:new a(u)}};e.SharedArrayReceiverStrategy=o}}),STe=Or({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/semaphore.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Semaphore=void 0;var t=fg(),r=class{static{s(this,"Semaphore")}static{_(this,"Semaphore")}constructor(n=1){if(n<=0)throw new Error("Capacity must be greater than 0");this._capacity=n,this._active=0,this._waiting=[]}lock(n){return new Promise((i,a)=>{this._waiting.push({thunk:n,resolve:i,reject:a}),this.runNext()})}get active(){return this._active}runNext(){this._waiting.length===0||this._active===this._capacity||(0,t.default)().timer.setImmediate(()=>this.doRunNext())}doRunNext(){if(this._waiting.length===0||this._active===this._capacity)return;let n=this._waiting.shift();if(this._active++,this._active>this._capacity)throw new Error("To many thunks active");try{let i=n.thunk();i instanceof Promise?i.then(a=>{this._active--,n.resolve(a),this.runNext()},a=>{this._active--,n.reject(a),this.runNext()}):(this._active--,n.resolve(i),this.runNext())}catch(i){this._active--,n.reject(i),this.runNext()}}};e.Semaphore=r}}),Rht=Or({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/messageReader.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ReadableStreamMessageReader=e.AbstractMessageReader=e.MessageReader=void 0;var t=fg(),r=yC(),n=z1(),i=STe(),a;(function(h){function d(f){let p=f;return p&&r.func(p.listen)&&r.func(p.dispose)&&r.func(p.onError)&&r.func(p.onClose)&&r.func(p.onPartialMessage)}s(d,"is"),_(d,"is"),h.is=d})(a||(e.MessageReader=a={}));var o=class{static{s(this,"AbstractMessageReader")}static{_(this,"AbstractMessageReader")}constructor(){this.errorEmitter=new n.Emitter,this.closeEmitter=new n.Emitter,this.partialMessageEmitter=new n.Emitter}dispose(){this.errorEmitter.dispose(),this.closeEmitter.dispose()}get onError(){return this.errorEmitter.event}fireError(h){this.errorEmitter.fire(this.asError(h))}get onClose(){return this.closeEmitter.event}fireClose(){this.closeEmitter.fire(void 0)}get onPartialMessage(){return this.partialMessageEmitter.event}firePartialMessage(h){this.partialMessageEmitter.fire(h)}asError(h){return h instanceof Error?h:new Error(`Reader received error. Reason: ${r.string(h.message)?h.message:"unknown"}`)}};e.AbstractMessageReader=o;var l;(function(h){function d(f){let p,m,g,y=new Map,v,x=new Map;if(f===void 0||typeof f=="string")p=f??"utf-8";else{if(p=f.charset??"utf-8",f.contentDecoder!==void 0&&(g=f.contentDecoder,y.set(g.name,g)),f.contentDecoders!==void 0)for(let b of f.contentDecoders)y.set(b.name,b);if(f.contentTypeDecoder!==void 0&&(v=f.contentTypeDecoder,x.set(v.name,v)),f.contentTypeDecoders!==void 0)for(let b of f.contentTypeDecoders)x.set(b.name,b)}return v===void 0&&(v=(0,t.default)().applicationJson.decoder,x.set(v.name,v)),{charset:p,contentDecoder:g,contentDecoders:y,contentTypeDecoder:v,contentTypeDecoders:x}}s(d,"fromOptions"),_(d,"fromOptions"),h.fromOptions=d})(l||(l={}));var u=class extends o{static{s(this,"ReadableStreamMessageReader")}static{_(this,"ReadableStreamMessageReader")}constructor(h,d){super(),this.readable=h,this.options=l.fromOptions(d),this.buffer=(0,t.default)().messageBuffer.create(this.options.charset),this._partialMessageTimeout=1e4,this.nextMessageLength=-1,this.messageToken=0,this.readSemaphore=new i.Semaphore(1)}set partialMessageTimeout(h){this._partialMessageTimeout=h}get partialMessageTimeout(){return this._partialMessageTimeout}listen(h){this.nextMessageLength=-1,this.messageToken=0,this.partialMessageTimer=void 0,this.callback=h;let d=this.readable.onData(f=>{this.onData(f)});return this.readable.onError(f=>this.fireError(f)),this.readable.onClose(()=>this.fireClose()),d}onData(h){try{for(this.buffer.append(h);;){if(this.nextMessageLength===-1){let f=this.buffer.tryReadHeaders(!0);if(!f)return;let p=f.get("content-length");if(!p){this.fireError(new Error(`Header must provide a Content-Length property. +${JSON.stringify(Object.fromEntries(f))}`));return}let m=parseInt(p);if(isNaN(m)){this.fireError(new Error(`Content-Length value must be a number. Got ${p}`));return}this.nextMessageLength=m}let d=this.buffer.tryReadBody(this.nextMessageLength);if(d===void 0){this.setPartialMessageTimer();return}this.clearPartialMessageTimer(),this.nextMessageLength=-1,this.readSemaphore.lock(async()=>{let f=this.options.contentDecoder!==void 0?await this.options.contentDecoder.decode(d):d,p=await this.options.contentTypeDecoder.decode(f,this.options);this.callback(p)}).catch(f=>{this.fireError(f)})}}catch(d){this.fireError(d)}}clearPartialMessageTimer(){this.partialMessageTimer&&(this.partialMessageTimer.dispose(),this.partialMessageTimer=void 0)}setPartialMessageTimer(){this.clearPartialMessageTimer(),!(this._partialMessageTimeout<=0)&&(this.partialMessageTimer=(0,t.default)().timer.setTimeout((h,d)=>{this.partialMessageTimer=void 0,h===this.messageToken&&(this.firePartialMessage({messageToken:h,waitingTime:d}),this.setPartialMessageTimer())},this._partialMessageTimeout,this.messageToken,this._partialMessageTimeout))}};e.ReadableStreamMessageReader=u}}),_ht=Or({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/messageWriter.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WriteableStreamMessageWriter=e.AbstractMessageWriter=e.MessageWriter=void 0;var t=fg(),r=yC(),n=STe(),i=z1(),a="Content-Length: ",o=`\r +`,l;(function(f){function p(m){let g=m;return g&&r.func(g.dispose)&&r.func(g.onClose)&&r.func(g.onError)&&r.func(g.write)}s(p,"is"),_(p,"is"),f.is=p})(l||(e.MessageWriter=l={}));var u=class{static{s(this,"AbstractMessageWriter")}static{_(this,"AbstractMessageWriter")}constructor(){this.errorEmitter=new i.Emitter,this.closeEmitter=new i.Emitter}dispose(){this.errorEmitter.dispose(),this.closeEmitter.dispose()}get onError(){return this.errorEmitter.event}fireError(f,p,m){this.errorEmitter.fire([this.asError(f),p,m])}get onClose(){return this.closeEmitter.event}fireClose(){this.closeEmitter.fire(void 0)}asError(f){return f instanceof Error?f:new Error(`Writer received error. Reason: ${r.string(f.message)?f.message:"unknown"}`)}};e.AbstractMessageWriter=u;var h;(function(f){function p(m){return m===void 0||typeof m=="string"?{charset:m??"utf-8",contentTypeEncoder:(0,t.default)().applicationJson.encoder}:{charset:m.charset??"utf-8",contentEncoder:m.contentEncoder,contentTypeEncoder:m.contentTypeEncoder??(0,t.default)().applicationJson.encoder}}s(p,"fromOptions"),_(p,"fromOptions"),f.fromOptions=p})(h||(h={}));var d=class extends u{static{s(this,"WriteableStreamMessageWriter")}static{_(this,"WriteableStreamMessageWriter")}constructor(f,p){super(),this.writable=f,this.options=h.fromOptions(p),this.errorCount=0,this.writeSemaphore=new n.Semaphore(1),this.writable.onError(m=>this.fireError(m)),this.writable.onClose(()=>this.fireClose())}async write(f){return this.writeSemaphore.lock(async()=>this.options.contentTypeEncoder.encode(f,this.options).then(m=>this.options.contentEncoder!==void 0?this.options.contentEncoder.encode(m):m).then(m=>{let g=[];return g.push(a,m.byteLength.toString(),o),g.push(o),this.doWrite(f,g,m)},m=>{throw this.fireError(m),m}))}async doWrite(f,p,m){try{return await this.writable.write(p.join(""),"ascii"),this.writable.write(m)}catch(g){return this.handleError(g,f),Promise.reject(g)}}handleError(f,p){this.errorCount++,this.fireError(f,p,this.errorCount)}end(){this.writable.end()}};e.WriteableStreamMessageWriter=d}}),Lht=Or({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/messageBuffer.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractMessageBuffer=void 0;var t=13,r=10,n=`\r +`,i=class{static{s(this,"AbstractMessageBuffer")}static{_(this,"AbstractMessageBuffer")}constructor(a="utf-8"){this._encoding=a,this._chunks=[],this._totalLength=0}get encoding(){return this._encoding}append(a){let o=typeof a=="string"?this.fromString(a,this._encoding):a;this._chunks.push(o),this._totalLength+=o.byteLength}tryReadHeaders(a=!1){if(this._chunks.length===0)return;let o=0,l=0,u=0,h=0;e:for(;lthis._totalLength)throw new Error("Cannot read so many bytes!");if(this._chunks[0].byteLength===a){let h=this._chunks[0];return this._chunks.shift(),this._totalLength-=a,this.asNative(h)}if(this._chunks[0].byteLength>a){let h=this._chunks[0],d=this.asNative(h,a);return this._chunks[0]=h.slice(a),this._totalLength-=a,d}let o=this.allocNative(a),l=0,u=0;for(;a>0;){let h=this._chunks[u];if(h.byteLength>a){let d=h.slice(0,a);o.set(d,l),l+=a,this._chunks[u]=h.slice(a),this._totalLength-=a,a-=a}else o.set(h,l),l+=h.byteLength,this._chunks.shift(),this._totalLength-=h.byteLength,a-=h.byteLength}return o}};e.AbstractMessageBuffer=i}}),Dht=Or({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/connection.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createMessageConnection=e.ConnectionOptions=e.MessageStrategy=e.CancellationStrategy=e.CancellationSenderStrategy=e.CancellationReceiverStrategy=e.RequestCancellationReceiverStrategy=e.IdCancellationReceiverStrategy=e.ConnectionStrategy=e.ConnectionError=e.ConnectionErrors=e.LogTraceNotification=e.SetTraceNotification=e.TraceFormat=e.TraceValues=e.Trace=e.NullLogger=e.ProgressType=e.ProgressToken=void 0;var t=fg(),r=yC(),n=CTe(),i=wTe(),a=z1(),o=rR(),l;(function(E){E.type=new n.NotificationType("$/cancelRequest")})(l||(l={}));var u;(function(E){function I(L){return typeof L=="string"||typeof L=="number"}s(I,"is"),_(I,"is"),E.is=I})(u||(e.ProgressToken=u={}));var h;(function(E){E.type=new n.NotificationType("$/progress")})(h||(h={}));var d=class{static{s(this,"ProgressType")}static{_(this,"ProgressType")}constructor(){}};e.ProgressType=d;var f;(function(E){function I(L){return r.func(L)}s(I,"is"),_(I,"is"),E.is=I})(f||(f={})),e.NullLogger=Object.freeze({error:_(()=>{},"error"),warn:_(()=>{},"warn"),info:_(()=>{},"info"),log:_(()=>{},"log")});var p;(function(E){E[E.Off=0]="Off",E[E.Messages=1]="Messages",E[E.Compact=2]="Compact",E[E.Verbose=3]="Verbose"})(p||(e.Trace=p={}));var m;(function(E){E.Off="off",E.Messages="messages",E.Compact="compact",E.Verbose="verbose"})(m||(e.TraceValues=m={})),(function(E){function I(P){if(!r.string(P))return E.Off;switch(P=P.toLowerCase(),P){case"off":return E.Off;case"messages":return E.Messages;case"compact":return E.Compact;case"verbose":return E.Verbose;default:return E.Off}}s(I,"fromString"),_(I,"fromString"),E.fromString=I;function L(P){switch(P){case E.Off:return"off";case E.Messages:return"messages";case E.Compact:return"compact";case E.Verbose:return"verbose";default:return"off"}}s(L,"toString3"),_(L,"toString"),E.toString=L})(p||(e.Trace=p={}));var g;(function(E){E.Text="text",E.JSON="json"})(g||(e.TraceFormat=g={})),(function(E){function I(L){return r.string(L)?(L=L.toLowerCase(),L==="json"?E.JSON:E.Text):E.Text}s(I,"fromString"),_(I,"fromString"),E.fromString=I})(g||(e.TraceFormat=g={}));var y;(function(E){E.type=new n.NotificationType("$/setTrace")})(y||(e.SetTraceNotification=y={}));var v;(function(E){E.type=new n.NotificationType("$/logTrace")})(v||(e.LogTraceNotification=v={}));var x;(function(E){E[E.Closed=1]="Closed",E[E.Disposed=2]="Disposed",E[E.AlreadyListening=3]="AlreadyListening"})(x||(e.ConnectionErrors=x={}));var b=class ETe extends Error{static{s(this,"_ConnectionError")}static{_(this,"ConnectionError")}constructor(I,L){super(L),this.code=I,Object.setPrototypeOf(this,ETe.prototype)}};e.ConnectionError=b;var T;(function(E){function I(L){let P=L;return P&&r.func(P.cancelUndispatched)}s(I,"is"),_(I,"is"),E.is=I})(T||(e.ConnectionStrategy=T={}));var w;(function(E){function I(L){let P=L;return P&&(P.kind===void 0||P.kind==="id")&&r.func(P.createCancellationTokenSource)&&(P.dispose===void 0||r.func(P.dispose))}s(I,"is"),_(I,"is"),E.is=I})(w||(e.IdCancellationReceiverStrategy=w={}));var C;(function(E){function I(L){let P=L;return P&&P.kind==="request"&&r.func(P.createCancellationTokenSource)&&(P.dispose===void 0||r.func(P.dispose))}s(I,"is"),_(I,"is"),E.is=I})(C||(e.RequestCancellationReceiverStrategy=C={}));var k;(function(E){E.Message=Object.freeze({createCancellationTokenSource(L){return new o.CancellationTokenSource}});function I(L){return w.is(L)||C.is(L)}s(I,"is"),_(I,"is"),E.is=I})(k||(e.CancellationReceiverStrategy=k={}));var S;(function(E){E.Message=Object.freeze({sendCancellation(L,P){return L.sendNotification(l.type,{id:P})},cleanup(L){}});function I(L){let P=L;return P&&r.func(P.sendCancellation)&&r.func(P.cleanup)}s(I,"is"),_(I,"is"),E.is=I})(S||(e.CancellationSenderStrategy=S={}));var A;(function(E){E.Message=Object.freeze({receiver:k.Message,sender:S.Message});function I(L){let P=L;return P&&k.is(P.receiver)&&S.is(P.sender)}s(I,"is"),_(I,"is"),E.is=I})(A||(e.CancellationStrategy=A={}));var M;(function(E){function I(L){let P=L;return P&&r.func(P.handleMessage)}s(I,"is"),_(I,"is"),E.is=I})(M||(e.MessageStrategy=M={}));var N;(function(E){function I(L){let P=L;return P&&(A.is(P.cancellationStrategy)||T.is(P.connectionStrategy)||M.is(P.messageStrategy))}s(I,"is"),_(I,"is"),E.is=I})(N||(e.ConnectionOptions=N={}));var D;(function(E){E[E.New=1]="New",E[E.Listening=2]="Listening",E[E.Closed=3]="Closed",E[E.Disposed=4]="Disposed"})(D||(D={}));function R(E,I,L,P){let B=L!==void 0?L:e.NullLogger,O=0,$=0,G=0,V="2.0",z,W=new Map,H,j=new Map,Q=new Map,U,ue=new i.LinkedMap,J=new Map,he=new Set,se=new Map,oe=p.Off,Se=g.Text,xe,Ne=D.New,Ye=new a.Emitter,We=new a.Emitter,pe=new a.Emitter,_e=new a.Emitter,Ee=new a.Emitter,Re=P&&P.cancellationStrategy?P.cancellationStrategy:A.Message;function Z(we){if(we===null)throw new Error("Can't send requests with id null since the response can't be correlated.");return"req-"+we.toString()}s(Z,"createRequestQueueKey"),_(Z,"createRequestQueueKey");function ae(we){return we===null?"res-unknown-"+(++G).toString():"res-"+we.toString()}s(ae,"createResponseQueueKey"),_(ae,"createResponseQueueKey");function ie(){return"not-"+(++$).toString()}s(ie,"createNotificationQueueKey"),_(ie,"createNotificationQueueKey");function le(we,tt){n.Message.isRequest(tt)?we.set(Z(tt.id),tt):n.Message.isResponse(tt)?we.set(ae(tt.id),tt):we.set(ie(),tt)}s(le,"addMessageToQueue"),_(le,"addMessageToQueue");function ve(we){}s(ve,"cancelUndispatched"),_(ve,"cancelUndispatched");function ne(){return Ne===D.Listening}s(ne,"isListening"),_(ne,"isListening");function Me(){return Ne===D.Closed}s(Me,"isClosed"),_(Me,"isClosed");function re(){return Ne===D.Disposed}s(re,"isDisposed"),_(re,"isDisposed");function ce(){(Ne===D.New||Ne===D.Listening)&&(Ne=D.Closed,We.fire(void 0))}s(ce,"closeHandler"),_(ce,"closeHandler");function q(we){Ye.fire([we,void 0,void 0])}s(q,"readErrorHandler"),_(q,"readErrorHandler");function de(we){Ye.fire(we)}s(de,"writeErrorHandler"),_(de,"writeErrorHandler"),E.onClose(ce),E.onError(q),I.onClose(ce),I.onError(de);function X(){U||ue.size===0||(U=(0,t.default)().timer.setImmediate(()=>{U=void 0,K()}))}s(X,"triggerMessageQueue"),_(X,"triggerMessageQueue");function ye(we){n.Message.isRequest(we)?Ae(we):n.Message.isNotification(we)?Oe(we):n.Message.isResponse(we)?$e(we):at(we)}s(ye,"handleMessage"),_(ye,"handleMessage");function K(){if(ue.size===0)return;let we=ue.shift();try{let tt=P?.messageStrategy;M.is(tt)?tt.handleMessage(we,ye):ye(we)}finally{X()}}s(K,"processMessageQueue"),_(K,"processMessageQueue");let Ge=_(we=>{try{if(n.Message.isNotification(we)&&we.method===l.type.method){let tt=we.params.id,st=Z(tt),mt=ue.get(st);if(n.Message.isRequest(mt)){let Gt=P?.connectionStrategy,Xt=Gt&&Gt.cancelUndispatched?Gt.cancelUndispatched(mt,ve):void 0;if(Xt&&(Xt.error!==void 0||Xt.result!==void 0)){ue.delete(st),se.delete(tt),Xt.id=mt.id,Be(Xt,we.method,Date.now()),I.write(Xt).catch(()=>B.error("Sending response for canceled message failed."));return}}let Bt=se.get(tt);if(Bt!==void 0){Bt.cancel(),be(we);return}else he.add(tt)}le(ue,we)}finally{X()}},"callback");function Ae(we){if(re())return;function tt(Ct,Ie,it){let Ve={jsonrpc:V,id:we.id};Ct instanceof n.ResponseError?Ve.error=Ct.toJson():Ve.result=Ct===void 0?null:Ct,Be(Ve,Ie,it),I.write(Ve).catch(()=>B.error("Sending response failed."))}s(tt,"reply"),_(tt,"reply");function st(Ct,Ie,it){let Ve={jsonrpc:V,id:we.id,error:Ct.toJson()};Be(Ve,Ie,it),I.write(Ve).catch(()=>B.error("Sending response failed."))}s(st,"replyError"),_(st,"replyError");function mt(Ct,Ie,it){Ct===void 0&&(Ct=null);let Ve={jsonrpc:V,id:we.id,result:Ct};Be(Ve,Ie,it),I.write(Ve).catch(()=>B.error("Sending response failed."))}s(mt,"replySuccess"),_(mt,"replySuccess"),Xe(we);let Bt=W.get(we.method),Gt,Xt;Bt&&(Gt=Bt.type,Xt=Bt.handler);let rr=Date.now();if(Xt||z){let Ct=we.id??String(Date.now()),Ie=w.is(Re.receiver)?Re.receiver.createCancellationTokenSource(Ct):Re.receiver.createCancellationTokenSource(we);we.id!==null&&he.has(we.id)&&Ie.cancel(),we.id!==null&&se.set(Ct,Ie);try{let it;if(Xt)if(we.params===void 0){if(Gt!==void 0&&Gt.numberOfParams!==0){st(new n.ResponseError(n.ErrorCodes.InvalidParams,`Request ${we.method} defines ${Gt.numberOfParams} params but received none.`),we.method,rr);return}it=Xt(Ie.token)}else if(Array.isArray(we.params)){if(Gt!==void 0&&Gt.parameterStructures===n.ParameterStructures.byName){st(new n.ResponseError(n.ErrorCodes.InvalidParams,`Request ${we.method} defines parameters by name but received parameters by position`),we.method,rr);return}it=Xt(...we.params,Ie.token)}else{if(Gt!==void 0&&Gt.parameterStructures===n.ParameterStructures.byPosition){st(new n.ResponseError(n.ErrorCodes.InvalidParams,`Request ${we.method} defines parameters by position but received parameters by name`),we.method,rr);return}it=Xt(we.params,Ie.token)}else z&&(it=z(we.method,we.params,Ie.token));let Ve=it;it?Ve.then?Ve.then(Ze=>{se.delete(Ct),tt(Ze,we.method,rr)},Ze=>{se.delete(Ct),Ze instanceof n.ResponseError?st(Ze,we.method,rr):Ze&&r.string(Ze.message)?st(new n.ResponseError(n.ErrorCodes.InternalError,`Request ${we.method} failed with message: ${Ze.message}`),we.method,rr):st(new n.ResponseError(n.ErrorCodes.InternalError,`Request ${we.method} failed unexpectedly without providing any details.`),we.method,rr)}):(se.delete(Ct),tt(it,we.method,rr)):(se.delete(Ct),mt(it,we.method,rr))}catch(it){se.delete(Ct),it instanceof n.ResponseError?tt(it,we.method,rr):it&&r.string(it.message)?st(new n.ResponseError(n.ErrorCodes.InternalError,`Request ${we.method} failed with message: ${it.message}`),we.method,rr):st(new n.ResponseError(n.ErrorCodes.InternalError,`Request ${we.method} failed unexpectedly without providing any details.`),we.method,rr)}}else st(new n.ResponseError(n.ErrorCodes.MethodNotFound,`Unhandled method ${we.method}`),we.method,rr)}s(Ae,"handleRequest"),_(Ae,"handleRequest");function $e(we){if(!re())if(we.id===null)we.error?B.error(`Received response message without id: Error is: +${JSON.stringify(we.error,void 0,4)}`):B.error("Received response message without id. No further error information provided.");else{let tt=we.id,st=J.get(tt);if(vt(we,st),st!==void 0){J.delete(tt);try{if(we.error){let mt=we.error;st.reject(new n.ResponseError(mt.code,mt.message,mt.data))}else if(we.result!==void 0)st.resolve(we.result);else throw new Error("Should never happen.")}catch(mt){mt.message?B.error(`Response handler '${st.method}' failed with message: ${mt.message}`):B.error(`Response handler '${st.method}' failed unexpectedly.`)}}}}s($e,"handleResponse"),_($e,"handleResponse");function Oe(we){if(re())return;let tt,st;if(we.method===l.type.method){let mt=we.params.id;he.delete(mt),be(we);return}else{let mt=j.get(we.method);mt&&(st=mt.handler,tt=mt.type)}if(st||H)try{if(be(we),st)if(we.params===void 0)tt!==void 0&&tt.numberOfParams!==0&&tt.parameterStructures!==n.ParameterStructures.byName&&B.error(`Notification ${we.method} defines ${tt.numberOfParams} params but received none.`),st();else if(Array.isArray(we.params)){let mt=we.params;we.method===h.type.method&&mt.length===2&&u.is(mt[0])?st({token:mt[0],value:mt[1]}):(tt!==void 0&&(tt.parameterStructures===n.ParameterStructures.byName&&B.error(`Notification ${we.method} defines parameters by name but received parameters by position`),tt.numberOfParams!==we.params.length&&B.error(`Notification ${we.method} defines ${tt.numberOfParams} params but received ${mt.length} arguments`)),st(...mt))}else tt!==void 0&&tt.parameterStructures===n.ParameterStructures.byPosition&&B.error(`Notification ${we.method} defines parameters by position but received parameters by name`),st(we.params);else H&&H(we.method,we.params)}catch(mt){mt.message?B.error(`Notification handler '${we.method}' failed with message: ${mt.message}`):B.error(`Notification handler '${we.method}' failed unexpectedly.`)}else pe.fire(we)}s(Oe,"handleNotification"),_(Oe,"handleNotification");function at(we){if(!we){B.error("Received empty message.");return}B.error(`Received message which is neither a response nor a notification message: +${JSON.stringify(we,null,4)}`);let tt=we;if(r.string(tt.id)||r.number(tt.id)){let st=tt.id,mt=J.get(st);mt&&mt.reject(new Error("The received response has neither a result nor an error property."))}}s(at,"handleInvalidMessage"),_(at,"handleInvalidMessage");function Pe(we){if(we!=null)switch(oe){case p.Verbose:return JSON.stringify(we,null,4);case p.Compact:return JSON.stringify(we);default:return}}s(Pe,"stringifyTrace"),_(Pe,"stringifyTrace");function Ke(we){if(!(oe===p.Off||!xe))if(Se===g.Text){let tt;(oe===p.Verbose||oe===p.Compact)&&we.params&&(tt=`Params: ${Pe(we.params)} + +`),xe.log(`Sending request '${we.method} - (${we.id})'.`,tt)}else ke("send-request",we)}s(Ke,"traceSendingRequest"),_(Ke,"traceSendingRequest");function qe(we){if(!(oe===p.Off||!xe))if(Se===g.Text){let tt;(oe===p.Verbose||oe===p.Compact)&&(we.params?tt=`Params: ${Pe(we.params)} + +`:tt=`No parameters provided. + +`),xe.log(`Sending notification '${we.method}'.`,tt)}else ke("send-notification",we)}s(qe,"traceSendingNotification"),_(qe,"traceSendingNotification");function Be(we,tt,st){if(!(oe===p.Off||!xe))if(Se===g.Text){let mt;(oe===p.Verbose||oe===p.Compact)&&(we.error&&we.error.data?mt=`Error data: ${Pe(we.error.data)} + +`:we.result?mt=`Result: ${Pe(we.result)} + +`:we.error===void 0&&(mt=`No result returned. + +`)),xe.log(`Sending response '${tt} - (${we.id})'. Processing request took ${Date.now()-st}ms`,mt)}else ke("send-response",we)}s(Be,"traceSendingResponse"),_(Be,"traceSendingResponse");function Xe(we){if(!(oe===p.Off||!xe))if(Se===g.Text){let tt;(oe===p.Verbose||oe===p.Compact)&&we.params&&(tt=`Params: ${Pe(we.params)} + +`),xe.log(`Received request '${we.method} - (${we.id})'.`,tt)}else ke("receive-request",we)}s(Xe,"traceReceivedRequest"),_(Xe,"traceReceivedRequest");function be(we){if(!(oe===p.Off||!xe||we.method===v.type.method))if(Se===g.Text){let tt;(oe===p.Verbose||oe===p.Compact)&&(we.params?tt=`Params: ${Pe(we.params)} + +`:tt=`No parameters provided. + +`),xe.log(`Received notification '${we.method}'.`,tt)}else ke("receive-notification",we)}s(be,"traceReceivedNotification"),_(be,"traceReceivedNotification");function vt(we,tt){if(!(oe===p.Off||!xe))if(Se===g.Text){let st;if((oe===p.Verbose||oe===p.Compact)&&(we.error&&we.error.data?st=`Error data: ${Pe(we.error.data)} + +`:we.result?st=`Result: ${Pe(we.result)} + +`:we.error===void 0&&(st=`No result returned. + +`)),tt){let mt=we.error?` Request failed: ${we.error.message} (${we.error.code}).`:"";xe.log(`Received response '${tt.method} - (${we.id})' in ${Date.now()-tt.timerStart}ms.${mt}`,st)}else xe.log(`Received response ${we.id} without active response promise.`,st)}else ke("receive-response",we)}s(vt,"traceReceivedResponse"),_(vt,"traceReceivedResponse");function ke(we,tt){if(!xe||oe===p.Off)return;let st={isLSPMessage:!0,type:we,message:tt,timestamp:Date.now()};xe.log(st)}s(ke,"logLSPMessage"),_(ke,"logLSPMessage");function It(){if(Me())throw new b(x.Closed,"Connection is closed.");if(re())throw new b(x.Disposed,"Connection is disposed.")}s(It,"throwIfClosedOrDisposed"),_(It,"throwIfClosedOrDisposed");function Ft(){if(ne())throw new b(x.AlreadyListening,"Connection is already listening")}s(Ft,"throwIfListening"),_(Ft,"throwIfListening");function yt(){if(!ne())throw new Error("Call listen() first.")}s(yt,"throwIfNotListening"),_(yt,"throwIfNotListening");function Et(we){return we===void 0?null:we}s(Et,"undefinedToNull"),_(Et,"undefinedToNull");function gt(we){if(we!==null)return we}s(gt,"nullToUndefined"),_(gt,"nullToUndefined");function ge(we){return we!=null&&!Array.isArray(we)&&typeof we=="object"}s(ge,"isNamedParam"),_(ge,"isNamedParam");function nt(we,tt){switch(we){case n.ParameterStructures.auto:return ge(tt)?gt(tt):[Et(tt)];case n.ParameterStructures.byName:if(!ge(tt))throw new Error("Received parameters by name but param is not an object literal.");return gt(tt);case n.ParameterStructures.byPosition:return[Et(tt)];default:throw new Error(`Unknown parameter structure ${we.toString()}`)}}s(nt,"computeSingleParam"),_(nt,"computeSingleParam");function pt(we,tt){let st,mt=we.numberOfParams;switch(mt){case 0:st=void 0;break;case 1:st=nt(we.parameterStructures,tt[0]);break;default:st=[];for(let Bt=0;Bt{It();let st,mt;if(r.string(we)){st=we;let Gt=tt[0],Xt=0,rr=n.ParameterStructures.auto;n.ParameterStructures.is(Gt)&&(Xt=1,rr=Gt);let Ct=tt.length,Ie=Ct-Xt;switch(Ie){case 0:mt=void 0;break;case 1:mt=nt(rr,tt[Xt]);break;default:if(rr===n.ParameterStructures.byName)throw new Error(`Received ${Ie} parameters for 'by Name' notification parameter structure.`);mt=tt.slice(Xt,Ct).map(it=>Et(it));break}}else{let Gt=tt;st=we.method,mt=pt(we,Gt)}let Bt={jsonrpc:V,method:st,params:mt};return qe(Bt),I.write(Bt).catch(Gt=>{throw B.error("Sending notification failed."),Gt})},"sendNotification"),onNotification:_((we,tt)=>{It();let st;return r.func(we)?H=we:tt&&(r.string(we)?(st=we,j.set(we,{type:void 0,handler:tt})):(st=we.method,j.set(we.method,{type:we,handler:tt}))),{dispose:_(()=>{st!==void 0?j.delete(st):H=void 0},"dispose")}},"onNotification"),onProgress:_((we,tt,st)=>{if(Q.has(tt))throw new Error(`Progress handler for token ${tt} already registered`);return Q.set(tt,st),{dispose:_(()=>{Q.delete(tt)},"dispose")}},"onProgress"),sendProgress:_((we,tt,st)=>Qe.sendNotification(h.type,{token:tt,value:st}),"sendProgress"),onUnhandledProgress:_e.event,sendRequest:_((we,...tt)=>{It(),yt();let st,mt,Bt;if(r.string(we)){st=we;let Ct=tt[0],Ie=tt[tt.length-1],it=0,Ve=n.ParameterStructures.auto;n.ParameterStructures.is(Ct)&&(it=1,Ve=Ct);let Ze=tt.length;o.CancellationToken.is(Ie)&&(Ze=Ze-1,Bt=Ie);let bt=Ze-it;switch(bt){case 0:mt=void 0;break;case 1:mt=nt(Ve,tt[it]);break;default:if(Ve===n.ParameterStructures.byName)throw new Error(`Received ${bt} parameters for 'by Name' request parameter structure.`);mt=tt.slice(it,Ze).map(Ut=>Et(Ut));break}}else{let Ct=tt;st=we.method,mt=pt(we,Ct);let Ie=we.numberOfParams;Bt=o.CancellationToken.is(Ct[Ie])?Ct[Ie]:void 0}let Gt=O++,Xt;Bt&&(Xt=Bt.onCancellationRequested(()=>{let Ct=Re.sender.sendCancellation(Qe,Gt);return Ct===void 0?(B.log(`Received no promise from cancellation strategy when cancelling id ${Gt}`),Promise.resolve()):Ct.catch(()=>{B.log(`Sending cancellation messages for id ${Gt} failed`)})}));let rr={jsonrpc:V,id:Gt,method:st,params:mt};return Ke(rr),typeof Re.sender.enableCancellation=="function"&&Re.sender.enableCancellation(rr),new Promise(async(Ct,Ie)=>{let it=_(bt=>{Ct(bt),Re.sender.cleanup(Gt),Xt?.dispose()},"resolveWithCleanup"),Ve=_(bt=>{Ie(bt),Re.sender.cleanup(Gt),Xt?.dispose()},"rejectWithCleanup"),Ze={method:st,timerStart:Date.now(),resolve:it,reject:Ve};try{await I.write(rr),J.set(Gt,Ze)}catch(bt){throw B.error("Sending request failed."),Ze.reject(new n.ResponseError(n.ErrorCodes.MessageWriteError,bt.message?bt.message:"Unknown reason")),bt}})},"sendRequest"),onRequest:_((we,tt)=>{It();let st=null;return f.is(we)?(st=void 0,z=we):r.string(we)?(st=null,tt!==void 0&&(st=we,W.set(we,{handler:tt,type:void 0}))):tt!==void 0&&(st=we.method,W.set(we.method,{type:we,handler:tt})),{dispose:_(()=>{st!==null&&(st!==void 0?W.delete(st):z=void 0)},"dispose")}},"onRequest"),hasPendingResponse:_(()=>J.size>0,"hasPendingResponse"),trace:_(async(we,tt,st)=>{let mt=!1,Bt=g.Text;st!==void 0&&(r.boolean(st)?mt=st:(mt=st.sendNotification||!1,Bt=st.traceFormat||g.Text)),oe=we,Se=Bt,oe===p.Off?xe=void 0:xe=tt,mt&&!Me()&&!re()&&await Qe.sendNotification(y.type,{value:p.toString(we)})},"trace"),onError:Ye.event,onClose:We.event,onUnhandledNotification:pe.event,onDispose:Ee.event,end:_(()=>{I.end()},"end"),dispose:_(()=>{if(re())return;Ne=D.Disposed,Ee.fire(void 0);let we=new n.ResponseError(n.ErrorCodes.PendingResponseRejected,"Pending response rejected since connection got disposed");for(let tt of J.values())tt.reject(we);J=new Map,se=new Map,he=new Set,ue=new i.LinkedMap,r.func(I.dispose)&&I.dispose(),r.func(E.dispose)&&E.dispose()},"dispose"),listen:_(()=>{It(),Ft(),Ne=D.Listening,E.listen(Ge)},"listen"),inspect:_(()=>{(0,t.default)().console.log("inspect")},"inspect")};return Qe.onNotification(v.type,we=>{if(oe===p.Off||!xe)return;let tt=oe===p.Verbose||oe===p.Compact;xe.log(we.message,tt?we.verbose:void 0)}),Qe.onNotification(h.type,we=>{let tt=Q.get(we.token);tt?tt(we.value):_e.fire(we)}),Qe}s(R,"createMessageConnection"),_(R,"createMessageConnection"),e.createMessageConnection=R}}),tG=Or({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/api.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ProgressType=e.ProgressToken=e.createMessageConnection=e.NullLogger=e.ConnectionOptions=e.ConnectionStrategy=e.AbstractMessageBuffer=e.WriteableStreamMessageWriter=e.AbstractMessageWriter=e.MessageWriter=e.ReadableStreamMessageReader=e.AbstractMessageReader=e.MessageReader=e.SharedArrayReceiverStrategy=e.SharedArraySenderStrategy=e.CancellationToken=e.CancellationTokenSource=e.Emitter=e.Event=e.Disposable=e.LRUCache=e.Touch=e.LinkedMap=e.ParameterStructures=e.NotificationType9=e.NotificationType8=e.NotificationType7=e.NotificationType6=e.NotificationType5=e.NotificationType4=e.NotificationType3=e.NotificationType2=e.NotificationType1=e.NotificationType0=e.NotificationType=e.ErrorCodes=e.ResponseError=e.RequestType9=e.RequestType8=e.RequestType7=e.RequestType6=e.RequestType5=e.RequestType4=e.RequestType3=e.RequestType2=e.RequestType1=e.RequestType0=e.RequestType=e.Message=e.RAL=void 0,e.MessageStrategy=e.CancellationStrategy=e.CancellationSenderStrategy=e.CancellationReceiverStrategy=e.ConnectionError=e.ConnectionErrors=e.LogTraceNotification=e.SetTraceNotification=e.TraceFormat=e.TraceValues=e.Trace=void 0;var t=CTe();Object.defineProperty(e,"Message",{enumerable:!0,get:_(function(){return t.Message},"get")}),Object.defineProperty(e,"RequestType",{enumerable:!0,get:_(function(){return t.RequestType},"get")}),Object.defineProperty(e,"RequestType0",{enumerable:!0,get:_(function(){return t.RequestType0},"get")}),Object.defineProperty(e,"RequestType1",{enumerable:!0,get:_(function(){return t.RequestType1},"get")}),Object.defineProperty(e,"RequestType2",{enumerable:!0,get:_(function(){return t.RequestType2},"get")}),Object.defineProperty(e,"RequestType3",{enumerable:!0,get:_(function(){return t.RequestType3},"get")}),Object.defineProperty(e,"RequestType4",{enumerable:!0,get:_(function(){return t.RequestType4},"get")}),Object.defineProperty(e,"RequestType5",{enumerable:!0,get:_(function(){return t.RequestType5},"get")}),Object.defineProperty(e,"RequestType6",{enumerable:!0,get:_(function(){return t.RequestType6},"get")}),Object.defineProperty(e,"RequestType7",{enumerable:!0,get:_(function(){return t.RequestType7},"get")}),Object.defineProperty(e,"RequestType8",{enumerable:!0,get:_(function(){return t.RequestType8},"get")}),Object.defineProperty(e,"RequestType9",{enumerable:!0,get:_(function(){return t.RequestType9},"get")}),Object.defineProperty(e,"ResponseError",{enumerable:!0,get:_(function(){return t.ResponseError},"get")}),Object.defineProperty(e,"ErrorCodes",{enumerable:!0,get:_(function(){return t.ErrorCodes},"get")}),Object.defineProperty(e,"NotificationType",{enumerable:!0,get:_(function(){return t.NotificationType},"get")}),Object.defineProperty(e,"NotificationType0",{enumerable:!0,get:_(function(){return t.NotificationType0},"get")}),Object.defineProperty(e,"NotificationType1",{enumerable:!0,get:_(function(){return t.NotificationType1},"get")}),Object.defineProperty(e,"NotificationType2",{enumerable:!0,get:_(function(){return t.NotificationType2},"get")}),Object.defineProperty(e,"NotificationType3",{enumerable:!0,get:_(function(){return t.NotificationType3},"get")}),Object.defineProperty(e,"NotificationType4",{enumerable:!0,get:_(function(){return t.NotificationType4},"get")}),Object.defineProperty(e,"NotificationType5",{enumerable:!0,get:_(function(){return t.NotificationType5},"get")}),Object.defineProperty(e,"NotificationType6",{enumerable:!0,get:_(function(){return t.NotificationType6},"get")}),Object.defineProperty(e,"NotificationType7",{enumerable:!0,get:_(function(){return t.NotificationType7},"get")}),Object.defineProperty(e,"NotificationType8",{enumerable:!0,get:_(function(){return t.NotificationType8},"get")}),Object.defineProperty(e,"NotificationType9",{enumerable:!0,get:_(function(){return t.NotificationType9},"get")}),Object.defineProperty(e,"ParameterStructures",{enumerable:!0,get:_(function(){return t.ParameterStructures},"get")});var r=wTe();Object.defineProperty(e,"LinkedMap",{enumerable:!0,get:_(function(){return r.LinkedMap},"get")}),Object.defineProperty(e,"LRUCache",{enumerable:!0,get:_(function(){return r.LRUCache},"get")}),Object.defineProperty(e,"Touch",{enumerable:!0,get:_(function(){return r.Touch},"get")});var n=Eht();Object.defineProperty(e,"Disposable",{enumerable:!0,get:_(function(){return n.Disposable},"get")});var i=z1();Object.defineProperty(e,"Event",{enumerable:!0,get:_(function(){return i.Event},"get")}),Object.defineProperty(e,"Emitter",{enumerable:!0,get:_(function(){return i.Emitter},"get")});var a=rR();Object.defineProperty(e,"CancellationTokenSource",{enumerable:!0,get:_(function(){return a.CancellationTokenSource},"get")}),Object.defineProperty(e,"CancellationToken",{enumerable:!0,get:_(function(){return a.CancellationToken},"get")});var o=Aht();Object.defineProperty(e,"SharedArraySenderStrategy",{enumerable:!0,get:_(function(){return o.SharedArraySenderStrategy},"get")}),Object.defineProperty(e,"SharedArrayReceiverStrategy",{enumerable:!0,get:_(function(){return o.SharedArrayReceiverStrategy},"get")});var l=Rht();Object.defineProperty(e,"MessageReader",{enumerable:!0,get:_(function(){return l.MessageReader},"get")}),Object.defineProperty(e,"AbstractMessageReader",{enumerable:!0,get:_(function(){return l.AbstractMessageReader},"get")}),Object.defineProperty(e,"ReadableStreamMessageReader",{enumerable:!0,get:_(function(){return l.ReadableStreamMessageReader},"get")});var u=_ht();Object.defineProperty(e,"MessageWriter",{enumerable:!0,get:_(function(){return u.MessageWriter},"get")}),Object.defineProperty(e,"AbstractMessageWriter",{enumerable:!0,get:_(function(){return u.AbstractMessageWriter},"get")}),Object.defineProperty(e,"WriteableStreamMessageWriter",{enumerable:!0,get:_(function(){return u.WriteableStreamMessageWriter},"get")});var h=Lht();Object.defineProperty(e,"AbstractMessageBuffer",{enumerable:!0,get:_(function(){return h.AbstractMessageBuffer},"get")});var d=Dht();Object.defineProperty(e,"ConnectionStrategy",{enumerable:!0,get:_(function(){return d.ConnectionStrategy},"get")}),Object.defineProperty(e,"ConnectionOptions",{enumerable:!0,get:_(function(){return d.ConnectionOptions},"get")}),Object.defineProperty(e,"NullLogger",{enumerable:!0,get:_(function(){return d.NullLogger},"get")}),Object.defineProperty(e,"createMessageConnection",{enumerable:!0,get:_(function(){return d.createMessageConnection},"get")}),Object.defineProperty(e,"ProgressToken",{enumerable:!0,get:_(function(){return d.ProgressToken},"get")}),Object.defineProperty(e,"ProgressType",{enumerable:!0,get:_(function(){return d.ProgressType},"get")}),Object.defineProperty(e,"Trace",{enumerable:!0,get:_(function(){return d.Trace},"get")}),Object.defineProperty(e,"TraceValues",{enumerable:!0,get:_(function(){return d.TraceValues},"get")}),Object.defineProperty(e,"TraceFormat",{enumerable:!0,get:_(function(){return d.TraceFormat},"get")}),Object.defineProperty(e,"SetTraceNotification",{enumerable:!0,get:_(function(){return d.SetTraceNotification},"get")}),Object.defineProperty(e,"LogTraceNotification",{enumerable:!0,get:_(function(){return d.LogTraceNotification},"get")}),Object.defineProperty(e,"ConnectionErrors",{enumerable:!0,get:_(function(){return d.ConnectionErrors},"get")}),Object.defineProperty(e,"ConnectionError",{enumerable:!0,get:_(function(){return d.ConnectionError},"get")}),Object.defineProperty(e,"CancellationReceiverStrategy",{enumerable:!0,get:_(function(){return d.CancellationReceiverStrategy},"get")}),Object.defineProperty(e,"CancellationSenderStrategy",{enumerable:!0,get:_(function(){return d.CancellationSenderStrategy},"get")}),Object.defineProperty(e,"CancellationStrategy",{enumerable:!0,get:_(function(){return d.CancellationStrategy},"get")}),Object.defineProperty(e,"MessageStrategy",{enumerable:!0,get:_(function(){return d.MessageStrategy},"get")});var f=fg();e.RAL=f.default}}),Iht=Or({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/browser/ril.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var t=tG(),r=class ATe extends t.AbstractMessageBuffer{static{s(this,"_MessageBuffer")}static{_(this,"MessageBuffer")}constructor(h="utf-8"){super(h),this.asciiDecoder=new TextDecoder("ascii")}emptyBuffer(){return ATe.emptyBuffer}fromString(h,d){return new TextEncoder().encode(h)}toString(h,d){return d==="ascii"?this.asciiDecoder.decode(h):new TextDecoder(d).decode(h)}asNative(h,d){return d===void 0?h:h.slice(0,d)}allocNative(h){return new Uint8Array(h)}};r.emptyBuffer=new Uint8Array(0);var n=class{static{s(this,"ReadableStreamWrapper")}static{_(this,"ReadableStreamWrapper")}constructor(u){this.socket=u,this._onData=new t.Emitter,this._messageListener=h=>{h.data.arrayBuffer().then(f=>{this._onData.fire(new Uint8Array(f))},()=>{(0,t.RAL)().console.error("Converting blob to array buffer failed.")})},this.socket.addEventListener("message",this._messageListener)}onClose(u){return this.socket.addEventListener("close",u),t.Disposable.create(()=>this.socket.removeEventListener("close",u))}onError(u){return this.socket.addEventListener("error",u),t.Disposable.create(()=>this.socket.removeEventListener("error",u))}onEnd(u){return this.socket.addEventListener("end",u),t.Disposable.create(()=>this.socket.removeEventListener("end",u))}onData(u){return this._onData.event(u)}},i=class{static{s(this,"WritableStreamWrapper")}static{_(this,"WritableStreamWrapper")}constructor(u){this.socket=u}onClose(u){return this.socket.addEventListener("close",u),t.Disposable.create(()=>this.socket.removeEventListener("close",u))}onError(u){return this.socket.addEventListener("error",u),t.Disposable.create(()=>this.socket.removeEventListener("error",u))}onEnd(u){return this.socket.addEventListener("end",u),t.Disposable.create(()=>this.socket.removeEventListener("end",u))}write(u,h){if(typeof u=="string"){if(h!==void 0&&h!=="utf-8")throw new Error(`In a Browser environments only utf-8 text encoding is supported. But got encoding: ${h}`);this.socket.send(u)}else this.socket.send(u);return Promise.resolve()}end(){this.socket.close()}},a=new TextEncoder,o=Object.freeze({messageBuffer:Object.freeze({create:_(u=>new r(u),"create")}),applicationJson:Object.freeze({encoder:Object.freeze({name:"application/json",encode:_((u,h)=>{if(h.charset!=="utf-8")throw new Error(`In a Browser environments only utf-8 text encoding is supported. But got encoding: ${h.charset}`);return Promise.resolve(a.encode(JSON.stringify(u,void 0,0)))},"encode")}),decoder:Object.freeze({name:"application/json",decode:_((u,h)=>{if(!(u instanceof Uint8Array))throw new Error("In a Browser environments only Uint8Arrays are supported.");return Promise.resolve(JSON.parse(new TextDecoder(h.charset).decode(u)))},"decode")})}),stream:Object.freeze({asReadableStream:_(u=>new n(u),"asReadableStream"),asWritableStream:_(u=>new i(u),"asWritableStream")}),console,timer:Object.freeze({setTimeout(u,h,...d){let f=setTimeout(u,h,...d);return{dispose:_(()=>clearTimeout(f),"dispose")}},setImmediate(u,...h){let d=setTimeout(u,0,...h);return{dispose:_(()=>clearTimeout(d),"dispose")}},setInterval(u,h,...d){let f=setInterval(u,h,...d);return{dispose:_(()=>clearInterval(f),"dispose")}}})});function l(){return o}s(l,"RIL"),_(l,"RIL"),(function(u){function h(){t.RAL.install(o)}s(h,"install"),_(h,"install"),u.install=h})(l||(l={})),e.default=l}}),V1=Or({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/browser/main.js"(e){"use strict";var t=e&&e.__createBinding||(Object.create?(function(u,h,d,f){f===void 0&&(f=d);var p=Object.getOwnPropertyDescriptor(h,d);(!p||("get"in p?!h.__esModule:p.writable||p.configurable))&&(p={enumerable:!0,get:_(function(){return h[d]},"get")}),Object.defineProperty(u,f,p)}):(function(u,h,d,f){f===void 0&&(f=d),u[f]=h[d]})),r=e&&e.__exportStar||function(u,h){for(var d in u)d!=="default"&&!Object.prototype.hasOwnProperty.call(h,d)&&t(h,u,d)};Object.defineProperty(e,"__esModule",{value:!0}),e.createMessageConnection=e.BrowserMessageWriter=e.BrowserMessageReader=void 0;var n=Iht();n.default.install();var i=tG();r(tG(),e);var a=class extends i.AbstractMessageReader{static{s(this,"BrowserMessageReader")}static{_(this,"BrowserMessageReader")}constructor(u){super(),this._onData=new i.Emitter,this._messageListener=h=>{this._onData.fire(h.data)},u.addEventListener("error",h=>this.fireError(h)),u.onmessage=this._messageListener}listen(u){return this._onData.event(u)}};e.BrowserMessageReader=a;var o=class extends i.AbstractMessageWriter{static{s(this,"BrowserMessageWriter")}static{_(this,"BrowserMessageWriter")}constructor(u){super(),this.port=u,this.errorCount=0,u.addEventListener("error",h=>this.fireError(h))}write(u){try{return this.port.postMessage(u),Promise.resolve()}catch(h){return this.handleError(h,u),Promise.reject(h)}}handleError(u,h){this.errorCount++,this.fireError(u,h,this.errorCount)}end(){}};e.BrowserMessageWriter=o;function l(u,h,d,f){return d===void 0&&(d=i.NullLogger),i.ConnectionStrategy.is(f)&&(f={connectionStrategy:f}),(0,i.createMessageConnection)(u,h,d,f)}s(l,"createMessageConnection"),_(l,"createMessageConnection"),e.createMessageConnection=l}}),c2e=Or({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/browser.js"(e,t){"use strict";t.exports=V1()}}),fi=Or({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/messages.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ProtocolNotificationType=e.ProtocolNotificationType0=e.ProtocolRequestType=e.ProtocolRequestType0=e.RegistrationType=e.MessageDirection=void 0;var t=V1(),r;(function(u){u.clientToServer="clientToServer",u.serverToClient="serverToClient",u.both="both"})(r||(e.MessageDirection=r={}));var n=class{static{s(this,"RegistrationType")}static{_(this,"RegistrationType")}constructor(u){this.method=u}};e.RegistrationType=n;var i=class extends t.RequestType0{static{s(this,"ProtocolRequestType0")}static{_(this,"ProtocolRequestType0")}constructor(u){super(u)}};e.ProtocolRequestType0=i;var a=class extends t.RequestType{static{s(this,"ProtocolRequestType")}static{_(this,"ProtocolRequestType")}constructor(u){super(u,t.ParameterStructures.byName)}};e.ProtocolRequestType=a;var o=class extends t.NotificationType0{static{s(this,"ProtocolNotificationType0")}static{_(this,"ProtocolNotificationType0")}constructor(u){super(u)}};e.ProtocolNotificationType0=o;var l=class extends t.NotificationType{static{s(this,"ProtocolNotificationType")}static{_(this,"ProtocolNotificationType")}constructor(u){super(u,t.ParameterStructures.byName)}};e.ProtocolNotificationType=l}}),Iz=Or({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/utils/is.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.objectLiteral=e.typedArray=e.stringArray=e.array=e.func=e.error=e.number=e.string=e.boolean=void 0;function t(d){return d===!0||d===!1}s(t,"boolean"),_(t,"boolean"),e.boolean=t;function r(d){return typeof d=="string"||d instanceof String}s(r,"string"),_(r,"string"),e.string=r;function n(d){return typeof d=="number"||d instanceof Number}s(n,"number"),_(n,"number"),e.number=n;function i(d){return d instanceof Error}s(i,"error"),_(i,"error"),e.error=i;function a(d){return typeof d=="function"}s(a,"func"),_(a,"func"),e.func=a;function o(d){return Array.isArray(d)}s(o,"array"),_(o,"array"),e.array=o;function l(d){return o(d)&&d.every(f=>r(f))}s(l,"stringArray"),_(l,"stringArray"),e.stringArray=l;function u(d,f){return Array.isArray(d)&&d.every(f)}s(u,"typedArray"),_(u,"typedArray"),e.typedArray=u;function h(d){return d!==null&&typeof d=="object"}s(h,"objectLiteral"),_(h,"objectLiteral"),e.objectLiteral=h}}),Mht=Or({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.implementation.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ImplementationRequest=void 0;var t=fi(),r;(function(n){n.method="textDocument/implementation",n.messageDirection=t.MessageDirection.clientToServer,n.type=new t.ProtocolRequestType(n.method)})(r||(e.ImplementationRequest=r={}))}}),Nht=Or({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.typeDefinition.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TypeDefinitionRequest=void 0;var t=fi(),r;(function(n){n.method="textDocument/typeDefinition",n.messageDirection=t.MessageDirection.clientToServer,n.type=new t.ProtocolRequestType(n.method)})(r||(e.TypeDefinitionRequest=r={}))}}),Pht=Or({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.workspaceFolder.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DidChangeWorkspaceFoldersNotification=e.WorkspaceFoldersRequest=void 0;var t=fi(),r;(function(i){i.method="workspace/workspaceFolders",i.messageDirection=t.MessageDirection.serverToClient,i.type=new t.ProtocolRequestType0(i.method)})(r||(e.WorkspaceFoldersRequest=r={}));var n;(function(i){i.method="workspace/didChangeWorkspaceFolders",i.messageDirection=t.MessageDirection.clientToServer,i.type=new t.ProtocolNotificationType(i.method)})(n||(e.DidChangeWorkspaceFoldersNotification=n={}))}}),Oht=Or({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.configuration.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ConfigurationRequest=void 0;var t=fi(),r;(function(n){n.method="workspace/configuration",n.messageDirection=t.MessageDirection.serverToClient,n.type=new t.ProtocolRequestType(n.method)})(r||(e.ConfigurationRequest=r={}))}}),Bht=Or({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.colorProvider.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ColorPresentationRequest=e.DocumentColorRequest=void 0;var t=fi(),r;(function(i){i.method="textDocument/documentColor",i.messageDirection=t.MessageDirection.clientToServer,i.type=new t.ProtocolRequestType(i.method)})(r||(e.DocumentColorRequest=r={}));var n;(function(i){i.method="textDocument/colorPresentation",i.messageDirection=t.MessageDirection.clientToServer,i.type=new t.ProtocolRequestType(i.method)})(n||(e.ColorPresentationRequest=n={}))}}),$ht=Or({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.foldingRange.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FoldingRangeRefreshRequest=e.FoldingRangeRequest=void 0;var t=fi(),r;(function(i){i.method="textDocument/foldingRange",i.messageDirection=t.MessageDirection.clientToServer,i.type=new t.ProtocolRequestType(i.method)})(r||(e.FoldingRangeRequest=r={}));var n;(function(i){i.method="workspace/foldingRange/refresh",i.messageDirection=t.MessageDirection.serverToClient,i.type=new t.ProtocolRequestType0(i.method)})(n||(e.FoldingRangeRefreshRequest=n={}))}}),Fht=Or({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.declaration.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DeclarationRequest=void 0;var t=fi(),r;(function(n){n.method="textDocument/declaration",n.messageDirection=t.MessageDirection.clientToServer,n.type=new t.ProtocolRequestType(n.method)})(r||(e.DeclarationRequest=r={}))}}),Ght=Or({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.selectionRange.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SelectionRangeRequest=void 0;var t=fi(),r;(function(n){n.method="textDocument/selectionRange",n.messageDirection=t.MessageDirection.clientToServer,n.type=new t.ProtocolRequestType(n.method)})(r||(e.SelectionRangeRequest=r={}))}}),zht=Or({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.progress.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WorkDoneProgressCancelNotification=e.WorkDoneProgressCreateRequest=e.WorkDoneProgress=void 0;var t=V1(),r=fi(),n;(function(o){o.type=new t.ProgressType;function l(u){return u===o.type}s(l,"is"),_(l,"is"),o.is=l})(n||(e.WorkDoneProgress=n={}));var i;(function(o){o.method="window/workDoneProgress/create",o.messageDirection=r.MessageDirection.serverToClient,o.type=new r.ProtocolRequestType(o.method)})(i||(e.WorkDoneProgressCreateRequest=i={}));var a;(function(o){o.method="window/workDoneProgress/cancel",o.messageDirection=r.MessageDirection.clientToServer,o.type=new r.ProtocolNotificationType(o.method)})(a||(e.WorkDoneProgressCancelNotification=a={}))}}),Vht=Or({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.callHierarchy.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CallHierarchyOutgoingCallsRequest=e.CallHierarchyIncomingCallsRequest=e.CallHierarchyPrepareRequest=void 0;var t=fi(),r;(function(a){a.method="textDocument/prepareCallHierarchy",a.messageDirection=t.MessageDirection.clientToServer,a.type=new t.ProtocolRequestType(a.method)})(r||(e.CallHierarchyPrepareRequest=r={}));var n;(function(a){a.method="callHierarchy/incomingCalls",a.messageDirection=t.MessageDirection.clientToServer,a.type=new t.ProtocolRequestType(a.method)})(n||(e.CallHierarchyIncomingCallsRequest=n={}));var i;(function(a){a.method="callHierarchy/outgoingCalls",a.messageDirection=t.MessageDirection.clientToServer,a.type=new t.ProtocolRequestType(a.method)})(i||(e.CallHierarchyOutgoingCallsRequest=i={}))}}),Wht=Or({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.semanticTokens.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SemanticTokensRefreshRequest=e.SemanticTokensRangeRequest=e.SemanticTokensDeltaRequest=e.SemanticTokensRequest=e.SemanticTokensRegistrationType=e.TokenFormat=void 0;var t=fi(),r;(function(u){u.Relative="relative"})(r||(e.TokenFormat=r={}));var n;(function(u){u.method="textDocument/semanticTokens",u.type=new t.RegistrationType(u.method)})(n||(e.SemanticTokensRegistrationType=n={}));var i;(function(u){u.method="textDocument/semanticTokens/full",u.messageDirection=t.MessageDirection.clientToServer,u.type=new t.ProtocolRequestType(u.method),u.registrationMethod=n.method})(i||(e.SemanticTokensRequest=i={}));var a;(function(u){u.method="textDocument/semanticTokens/full/delta",u.messageDirection=t.MessageDirection.clientToServer,u.type=new t.ProtocolRequestType(u.method),u.registrationMethod=n.method})(a||(e.SemanticTokensDeltaRequest=a={}));var o;(function(u){u.method="textDocument/semanticTokens/range",u.messageDirection=t.MessageDirection.clientToServer,u.type=new t.ProtocolRequestType(u.method),u.registrationMethod=n.method})(o||(e.SemanticTokensRangeRequest=o={}));var l;(function(u){u.method="workspace/semanticTokens/refresh",u.messageDirection=t.MessageDirection.serverToClient,u.type=new t.ProtocolRequestType0(u.method)})(l||(e.SemanticTokensRefreshRequest=l={}))}}),qht=Or({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.showDocument.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ShowDocumentRequest=void 0;var t=fi(),r;(function(n){n.method="window/showDocument",n.messageDirection=t.MessageDirection.serverToClient,n.type=new t.ProtocolRequestType(n.method)})(r||(e.ShowDocumentRequest=r={}))}}),Hht=Or({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.linkedEditingRange.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LinkedEditingRangeRequest=void 0;var t=fi(),r;(function(n){n.method="textDocument/linkedEditingRange",n.messageDirection=t.MessageDirection.clientToServer,n.type=new t.ProtocolRequestType(n.method)})(r||(e.LinkedEditingRangeRequest=r={}))}}),Uht=Or({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.fileOperations.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WillDeleteFilesRequest=e.DidDeleteFilesNotification=e.DidRenameFilesNotification=e.WillRenameFilesRequest=e.DidCreateFilesNotification=e.WillCreateFilesRequest=e.FileOperationPatternKind=void 0;var t=fi(),r;(function(h){h.file="file",h.folder="folder"})(r||(e.FileOperationPatternKind=r={}));var n;(function(h){h.method="workspace/willCreateFiles",h.messageDirection=t.MessageDirection.clientToServer,h.type=new t.ProtocolRequestType(h.method)})(n||(e.WillCreateFilesRequest=n={}));var i;(function(h){h.method="workspace/didCreateFiles",h.messageDirection=t.MessageDirection.clientToServer,h.type=new t.ProtocolNotificationType(h.method)})(i||(e.DidCreateFilesNotification=i={}));var a;(function(h){h.method="workspace/willRenameFiles",h.messageDirection=t.MessageDirection.clientToServer,h.type=new t.ProtocolRequestType(h.method)})(a||(e.WillRenameFilesRequest=a={}));var o;(function(h){h.method="workspace/didRenameFiles",h.messageDirection=t.MessageDirection.clientToServer,h.type=new t.ProtocolNotificationType(h.method)})(o||(e.DidRenameFilesNotification=o={}));var l;(function(h){h.method="workspace/didDeleteFiles",h.messageDirection=t.MessageDirection.clientToServer,h.type=new t.ProtocolNotificationType(h.method)})(l||(e.DidDeleteFilesNotification=l={}));var u;(function(h){h.method="workspace/willDeleteFiles",h.messageDirection=t.MessageDirection.clientToServer,h.type=new t.ProtocolRequestType(h.method)})(u||(e.WillDeleteFilesRequest=u={}))}}),Yht=Or({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.moniker.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MonikerRequest=e.MonikerKind=e.UniquenessLevel=void 0;var t=fi(),r;(function(a){a.document="document",a.project="project",a.group="group",a.scheme="scheme",a.global="global"})(r||(e.UniquenessLevel=r={}));var n;(function(a){a.$import="import",a.$export="export",a.local="local"})(n||(e.MonikerKind=n={}));var i;(function(a){a.method="textDocument/moniker",a.messageDirection=t.MessageDirection.clientToServer,a.type=new t.ProtocolRequestType(a.method)})(i||(e.MonikerRequest=i={}))}}),jht=Or({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.typeHierarchy.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TypeHierarchySubtypesRequest=e.TypeHierarchySupertypesRequest=e.TypeHierarchyPrepareRequest=void 0;var t=fi(),r;(function(a){a.method="textDocument/prepareTypeHierarchy",a.messageDirection=t.MessageDirection.clientToServer,a.type=new t.ProtocolRequestType(a.method)})(r||(e.TypeHierarchyPrepareRequest=r={}));var n;(function(a){a.method="typeHierarchy/supertypes",a.messageDirection=t.MessageDirection.clientToServer,a.type=new t.ProtocolRequestType(a.method)})(n||(e.TypeHierarchySupertypesRequest=n={}));var i;(function(a){a.method="typeHierarchy/subtypes",a.messageDirection=t.MessageDirection.clientToServer,a.type=new t.ProtocolRequestType(a.method)})(i||(e.TypeHierarchySubtypesRequest=i={}))}}),Xht=Or({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.inlineValue.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InlineValueRefreshRequest=e.InlineValueRequest=void 0;var t=fi(),r;(function(i){i.method="textDocument/inlineValue",i.messageDirection=t.MessageDirection.clientToServer,i.type=new t.ProtocolRequestType(i.method)})(r||(e.InlineValueRequest=r={}));var n;(function(i){i.method="workspace/inlineValue/refresh",i.messageDirection=t.MessageDirection.serverToClient,i.type=new t.ProtocolRequestType0(i.method)})(n||(e.InlineValueRefreshRequest=n={}))}}),Kht=Or({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.inlayHint.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InlayHintRefreshRequest=e.InlayHintResolveRequest=e.InlayHintRequest=void 0;var t=fi(),r;(function(a){a.method="textDocument/inlayHint",a.messageDirection=t.MessageDirection.clientToServer,a.type=new t.ProtocolRequestType(a.method)})(r||(e.InlayHintRequest=r={}));var n;(function(a){a.method="inlayHint/resolve",a.messageDirection=t.MessageDirection.clientToServer,a.type=new t.ProtocolRequestType(a.method)})(n||(e.InlayHintResolveRequest=n={}));var i;(function(a){a.method="workspace/inlayHint/refresh",a.messageDirection=t.MessageDirection.serverToClient,a.type=new t.ProtocolRequestType0(a.method)})(i||(e.InlayHintRefreshRequest=i={}))}}),Zht=Or({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.diagnostic.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DiagnosticRefreshRequest=e.WorkspaceDiagnosticRequest=e.DocumentDiagnosticRequest=e.DocumentDiagnosticReportKind=e.DiagnosticServerCancellationData=void 0;var t=V1(),r=Iz(),n=fi(),i;(function(h){function d(f){let p=f;return p&&r.boolean(p.retriggerRequest)}s(d,"is"),_(d,"is"),h.is=d})(i||(e.DiagnosticServerCancellationData=i={}));var a;(function(h){h.Full="full",h.Unchanged="unchanged"})(a||(e.DocumentDiagnosticReportKind=a={}));var o;(function(h){h.method="textDocument/diagnostic",h.messageDirection=n.MessageDirection.clientToServer,h.type=new n.ProtocolRequestType(h.method),h.partialResult=new t.ProgressType})(o||(e.DocumentDiagnosticRequest=o={}));var l;(function(h){h.method="workspace/diagnostic",h.messageDirection=n.MessageDirection.clientToServer,h.type=new n.ProtocolRequestType(h.method),h.partialResult=new t.ProgressType})(l||(e.WorkspaceDiagnosticRequest=l={}));var u;(function(h){h.method="workspace/diagnostic/refresh",h.messageDirection=n.MessageDirection.serverToClient,h.type=new n.ProtocolRequestType0(h.method)})(u||(e.DiagnosticRefreshRequest=u={}))}}),Qht=Or({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.notebook.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DidCloseNotebookDocumentNotification=e.DidSaveNotebookDocumentNotification=e.DidChangeNotebookDocumentNotification=e.NotebookCellArrayChange=e.DidOpenNotebookDocumentNotification=e.NotebookDocumentSyncRegistrationType=e.NotebookDocument=e.NotebookCell=e.ExecutionSummary=e.NotebookCellKind=void 0;var t=(gC(),Dz(tR)),r=Iz(),n=fi(),i;(function(g){g.Markup=1,g.Code=2;function y(v){return v===1||v===2}s(y,"is"),_(y,"is"),g.is=y})(i||(e.NotebookCellKind=i={}));var a;(function(g){function y(b,T){let w={executionOrder:b};return(T===!0||T===!1)&&(w.success=T),w}s(y,"create"),_(y,"create"),g.create=y;function v(b){let T=b;return r.objectLiteral(T)&&t.uinteger.is(T.executionOrder)&&(T.success===void 0||r.boolean(T.success))}s(v,"is"),_(v,"is"),g.is=v;function x(b,T){return b===T?!0:b==null||T===null||T===void 0?!1:b.executionOrder===T.executionOrder&&b.success===T.success}s(x,"equals"),_(x,"equals"),g.equals=x})(a||(e.ExecutionSummary=a={}));var o;(function(g){function y(T,w){return{kind:T,document:w}}s(y,"create"),_(y,"create"),g.create=y;function v(T){let w=T;return r.objectLiteral(w)&&i.is(w.kind)&&t.DocumentUri.is(w.document)&&(w.metadata===void 0||r.objectLiteral(w.metadata))}s(v,"is"),_(v,"is"),g.is=v;function x(T,w){let C=new Set;return T.document!==w.document&&C.add("document"),T.kind!==w.kind&&C.add("kind"),T.executionSummary!==w.executionSummary&&C.add("executionSummary"),(T.metadata!==void 0||w.metadata!==void 0)&&!b(T.metadata,w.metadata)&&C.add("metadata"),(T.executionSummary!==void 0||w.executionSummary!==void 0)&&!a.equals(T.executionSummary,w.executionSummary)&&C.add("executionSummary"),C}s(x,"diff"),_(x,"diff"),g.diff=x;function b(T,w){if(T===w)return!0;if(T==null||w===null||w===void 0||typeof T!=typeof w||typeof T!="object")return!1;let C=Array.isArray(T),k=Array.isArray(w);if(C!==k)return!1;if(C&&k){if(T.length!==w.length)return!1;for(let S=0;S0}s(nt,"hasId"),_(nt,"hasId"),ge.hasId=nt})(O||(e.StaticRegistrationOptions=O={}));var $;(function(ge){function nt(pt){let Qe=pt;return Qe&&(Qe.documentSelector===null||R.is(Qe.documentSelector))}s(nt,"is"),_(nt,"is"),ge.is=nt})($||(e.TextDocumentRegistrationOptions=$={}));var G;(function(ge){function nt(Qe){let we=Qe;return n.objectLiteral(we)&&(we.workDoneProgress===void 0||n.boolean(we.workDoneProgress))}s(nt,"is"),_(nt,"is"),ge.is=nt;function pt(Qe){let we=Qe;return we&&n.boolean(we.workDoneProgress)}s(pt,"hasWorkDoneProgress"),_(pt,"hasWorkDoneProgress"),ge.hasWorkDoneProgress=pt})(G||(e.WorkDoneProgressOptions=G={}));var V;(function(ge){ge.method="initialize",ge.messageDirection=t.MessageDirection.clientToServer,ge.type=new t.ProtocolRequestType(ge.method)})(V||(e.InitializeRequest=V={}));var z;(function(ge){ge.unknownProtocolVersion=1})(z||(e.InitializeErrorCodes=z={}));var W;(function(ge){ge.method="initialized",ge.messageDirection=t.MessageDirection.clientToServer,ge.type=new t.ProtocolNotificationType(ge.method)})(W||(e.InitializedNotification=W={}));var H;(function(ge){ge.method="shutdown",ge.messageDirection=t.MessageDirection.clientToServer,ge.type=new t.ProtocolRequestType0(ge.method)})(H||(e.ShutdownRequest=H={}));var j;(function(ge){ge.method="exit",ge.messageDirection=t.MessageDirection.clientToServer,ge.type=new t.ProtocolNotificationType0(ge.method)})(j||(e.ExitNotification=j={}));var Q;(function(ge){ge.method="workspace/didChangeConfiguration",ge.messageDirection=t.MessageDirection.clientToServer,ge.type=new t.ProtocolNotificationType(ge.method)})(Q||(e.DidChangeConfigurationNotification=Q={}));var U;(function(ge){ge.Error=1,ge.Warning=2,ge.Info=3,ge.Log=4,ge.Debug=5})(U||(e.MessageType=U={}));var ue;(function(ge){ge.method="window/showMessage",ge.messageDirection=t.MessageDirection.serverToClient,ge.type=new t.ProtocolNotificationType(ge.method)})(ue||(e.ShowMessageNotification=ue={}));var J;(function(ge){ge.method="window/showMessageRequest",ge.messageDirection=t.MessageDirection.serverToClient,ge.type=new t.ProtocolRequestType(ge.method)})(J||(e.ShowMessageRequest=J={}));var he;(function(ge){ge.method="window/logMessage",ge.messageDirection=t.MessageDirection.serverToClient,ge.type=new t.ProtocolNotificationType(ge.method)})(he||(e.LogMessageNotification=he={}));var se;(function(ge){ge.method="telemetry/event",ge.messageDirection=t.MessageDirection.serverToClient,ge.type=new t.ProtocolNotificationType(ge.method)})(se||(e.TelemetryEventNotification=se={}));var oe;(function(ge){ge.None=0,ge.Full=1,ge.Incremental=2})(oe||(e.TextDocumentSyncKind=oe={}));var Se;(function(ge){ge.method="textDocument/didOpen",ge.messageDirection=t.MessageDirection.clientToServer,ge.type=new t.ProtocolNotificationType(ge.method)})(Se||(e.DidOpenTextDocumentNotification=Se={}));var xe;(function(ge){function nt(Qe){let we=Qe;return we!=null&&typeof we.text=="string"&&we.range!==void 0&&(we.rangeLength===void 0||typeof we.rangeLength=="number")}s(nt,"isIncremental"),_(nt,"isIncremental"),ge.isIncremental=nt;function pt(Qe){let we=Qe;return we!=null&&typeof we.text=="string"&&we.range===void 0&&we.rangeLength===void 0}s(pt,"isFull"),_(pt,"isFull"),ge.isFull=pt})(xe||(e.TextDocumentContentChangeEvent=xe={}));var Ne;(function(ge){ge.method="textDocument/didChange",ge.messageDirection=t.MessageDirection.clientToServer,ge.type=new t.ProtocolNotificationType(ge.method)})(Ne||(e.DidChangeTextDocumentNotification=Ne={}));var Ye;(function(ge){ge.method="textDocument/didClose",ge.messageDirection=t.MessageDirection.clientToServer,ge.type=new t.ProtocolNotificationType(ge.method)})(Ye||(e.DidCloseTextDocumentNotification=Ye={}));var We;(function(ge){ge.method="textDocument/didSave",ge.messageDirection=t.MessageDirection.clientToServer,ge.type=new t.ProtocolNotificationType(ge.method)})(We||(e.DidSaveTextDocumentNotification=We={}));var pe;(function(ge){ge.Manual=1,ge.AfterDelay=2,ge.FocusOut=3})(pe||(e.TextDocumentSaveReason=pe={}));var _e;(function(ge){ge.method="textDocument/willSave",ge.messageDirection=t.MessageDirection.clientToServer,ge.type=new t.ProtocolNotificationType(ge.method)})(_e||(e.WillSaveTextDocumentNotification=_e={}));var Ee;(function(ge){ge.method="textDocument/willSaveWaitUntil",ge.messageDirection=t.MessageDirection.clientToServer,ge.type=new t.ProtocolRequestType(ge.method)})(Ee||(e.WillSaveTextDocumentWaitUntilRequest=Ee={}));var Re;(function(ge){ge.method="workspace/didChangeWatchedFiles",ge.messageDirection=t.MessageDirection.clientToServer,ge.type=new t.ProtocolNotificationType(ge.method)})(Re||(e.DidChangeWatchedFilesNotification=Re={}));var Z;(function(ge){ge.Created=1,ge.Changed=2,ge.Deleted=3})(Z||(e.FileChangeType=Z={}));var ae;(function(ge){function nt(pt){let Qe=pt;return n.objectLiteral(Qe)&&(r.URI.is(Qe.baseUri)||r.WorkspaceFolder.is(Qe.baseUri))&&n.string(Qe.pattern)}s(nt,"is"),_(nt,"is"),ge.is=nt})(ae||(e.RelativePattern=ae={}));var ie;(function(ge){ge.Create=1,ge.Change=2,ge.Delete=4})(ie||(e.WatchKind=ie={}));var le;(function(ge){ge.method="textDocument/publishDiagnostics",ge.messageDirection=t.MessageDirection.serverToClient,ge.type=new t.ProtocolNotificationType(ge.method)})(le||(e.PublishDiagnosticsNotification=le={}));var ve;(function(ge){ge.Invoked=1,ge.TriggerCharacter=2,ge.TriggerForIncompleteCompletions=3})(ve||(e.CompletionTriggerKind=ve={}));var ne;(function(ge){ge.method="textDocument/completion",ge.messageDirection=t.MessageDirection.clientToServer,ge.type=new t.ProtocolRequestType(ge.method)})(ne||(e.CompletionRequest=ne={}));var Me;(function(ge){ge.method="completionItem/resolve",ge.messageDirection=t.MessageDirection.clientToServer,ge.type=new t.ProtocolRequestType(ge.method)})(Me||(e.CompletionResolveRequest=Me={}));var re;(function(ge){ge.method="textDocument/hover",ge.messageDirection=t.MessageDirection.clientToServer,ge.type=new t.ProtocolRequestType(ge.method)})(re||(e.HoverRequest=re={}));var ce;(function(ge){ge.Invoked=1,ge.TriggerCharacter=2,ge.ContentChange=3})(ce||(e.SignatureHelpTriggerKind=ce={}));var q;(function(ge){ge.method="textDocument/signatureHelp",ge.messageDirection=t.MessageDirection.clientToServer,ge.type=new t.ProtocolRequestType(ge.method)})(q||(e.SignatureHelpRequest=q={}));var de;(function(ge){ge.method="textDocument/definition",ge.messageDirection=t.MessageDirection.clientToServer,ge.type=new t.ProtocolRequestType(ge.method)})(de||(e.DefinitionRequest=de={}));var X;(function(ge){ge.method="textDocument/references",ge.messageDirection=t.MessageDirection.clientToServer,ge.type=new t.ProtocolRequestType(ge.method)})(X||(e.ReferencesRequest=X={}));var ye;(function(ge){ge.method="textDocument/documentHighlight",ge.messageDirection=t.MessageDirection.clientToServer,ge.type=new t.ProtocolRequestType(ge.method)})(ye||(e.DocumentHighlightRequest=ye={}));var K;(function(ge){ge.method="textDocument/documentSymbol",ge.messageDirection=t.MessageDirection.clientToServer,ge.type=new t.ProtocolRequestType(ge.method)})(K||(e.DocumentSymbolRequest=K={}));var Ge;(function(ge){ge.method="textDocument/codeAction",ge.messageDirection=t.MessageDirection.clientToServer,ge.type=new t.ProtocolRequestType(ge.method)})(Ge||(e.CodeActionRequest=Ge={}));var Ae;(function(ge){ge.method="codeAction/resolve",ge.messageDirection=t.MessageDirection.clientToServer,ge.type=new t.ProtocolRequestType(ge.method)})(Ae||(e.CodeActionResolveRequest=Ae={}));var $e;(function(ge){ge.method="workspace/symbol",ge.messageDirection=t.MessageDirection.clientToServer,ge.type=new t.ProtocolRequestType(ge.method)})($e||(e.WorkspaceSymbolRequest=$e={}));var Oe;(function(ge){ge.method="workspaceSymbol/resolve",ge.messageDirection=t.MessageDirection.clientToServer,ge.type=new t.ProtocolRequestType(ge.method)})(Oe||(e.WorkspaceSymbolResolveRequest=Oe={}));var at;(function(ge){ge.method="textDocument/codeLens",ge.messageDirection=t.MessageDirection.clientToServer,ge.type=new t.ProtocolRequestType(ge.method)})(at||(e.CodeLensRequest=at={}));var Pe;(function(ge){ge.method="codeLens/resolve",ge.messageDirection=t.MessageDirection.clientToServer,ge.type=new t.ProtocolRequestType(ge.method)})(Pe||(e.CodeLensResolveRequest=Pe={}));var Ke;(function(ge){ge.method="workspace/codeLens/refresh",ge.messageDirection=t.MessageDirection.serverToClient,ge.type=new t.ProtocolRequestType0(ge.method)})(Ke||(e.CodeLensRefreshRequest=Ke={}));var qe;(function(ge){ge.method="textDocument/documentLink",ge.messageDirection=t.MessageDirection.clientToServer,ge.type=new t.ProtocolRequestType(ge.method)})(qe||(e.DocumentLinkRequest=qe={}));var Be;(function(ge){ge.method="documentLink/resolve",ge.messageDirection=t.MessageDirection.clientToServer,ge.type=new t.ProtocolRequestType(ge.method)})(Be||(e.DocumentLinkResolveRequest=Be={}));var Xe;(function(ge){ge.method="textDocument/formatting",ge.messageDirection=t.MessageDirection.clientToServer,ge.type=new t.ProtocolRequestType(ge.method)})(Xe||(e.DocumentFormattingRequest=Xe={}));var be;(function(ge){ge.method="textDocument/rangeFormatting",ge.messageDirection=t.MessageDirection.clientToServer,ge.type=new t.ProtocolRequestType(ge.method)})(be||(e.DocumentRangeFormattingRequest=be={}));var vt;(function(ge){ge.method="textDocument/rangesFormatting",ge.messageDirection=t.MessageDirection.clientToServer,ge.type=new t.ProtocolRequestType(ge.method)})(vt||(e.DocumentRangesFormattingRequest=vt={}));var ke;(function(ge){ge.method="textDocument/onTypeFormatting",ge.messageDirection=t.MessageDirection.clientToServer,ge.type=new t.ProtocolRequestType(ge.method)})(ke||(e.DocumentOnTypeFormattingRequest=ke={}));var It;(function(ge){ge.Identifier=1})(It||(e.PrepareSupportDefaultBehavior=It={}));var Ft;(function(ge){ge.method="textDocument/rename",ge.messageDirection=t.MessageDirection.clientToServer,ge.type=new t.ProtocolRequestType(ge.method)})(Ft||(e.RenameRequest=Ft={}));var yt;(function(ge){ge.method="textDocument/prepareRename",ge.messageDirection=t.MessageDirection.clientToServer,ge.type=new t.ProtocolRequestType(ge.method)})(yt||(e.PrepareRenameRequest=yt={}));var Et;(function(ge){ge.method="workspace/executeCommand",ge.messageDirection=t.MessageDirection.clientToServer,ge.type=new t.ProtocolRequestType(ge.method)})(Et||(e.ExecuteCommandRequest=Et={}));var gt;(function(ge){ge.method="workspace/applyEdit",ge.messageDirection=t.MessageDirection.serverToClient,ge.type=new t.ProtocolRequestType("workspace/applyEdit")})(gt||(e.ApplyWorkspaceEditRequest=gt={}))}}),tdt=Or({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/connection.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createProtocolConnection=void 0;var t=V1();function r(n,i,a,o){return t.ConnectionStrategy.is(o)&&(o={connectionStrategy:o}),(0,t.createMessageConnection)(n,i,a,o)}s(r,"createProtocolConnection"),_(r,"createProtocolConnection"),e.createProtocolConnection=r}}),rdt=Or({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/api.js"(e){"use strict";var t=e&&e.__createBinding||(Object.create?(function(a,o,l,u){u===void 0&&(u=l);var h=Object.getOwnPropertyDescriptor(o,l);(!h||("get"in h?!o.__esModule:h.writable||h.configurable))&&(h={enumerable:!0,get:_(function(){return o[l]},"get")}),Object.defineProperty(a,u,h)}):(function(a,o,l,u){u===void 0&&(u=l),a[u]=o[l]})),r=e&&e.__exportStar||function(a,o){for(var l in a)l!=="default"&&!Object.prototype.hasOwnProperty.call(o,l)&&t(o,a,l)};Object.defineProperty(e,"__esModule",{value:!0}),e.LSPErrorCodes=e.createProtocolConnection=void 0,r(V1(),e),r((gC(),Dz(tR)),e),r(fi(),e),r(edt(),e);var n=tdt();Object.defineProperty(e,"createProtocolConnection",{enumerable:!0,get:_(function(){return n.createProtocolConnection},"get")});var i;(function(a){a.lspReservedErrorRangeStart=-32899,a.RequestFailed=-32803,a.ServerCancelled=-32802,a.ContentModified=-32801,a.RequestCancelled=-32800,a.lspReservedErrorRangeEnd=-32800})(i||(e.LSPErrorCodes=i={}))}}),ndt=Or({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/browser/main.js"(e){"use strict";var t=e&&e.__createBinding||(Object.create?(function(a,o,l,u){u===void 0&&(u=l);var h=Object.getOwnPropertyDescriptor(o,l);(!h||("get"in h?!o.__esModule:h.writable||h.configurable))&&(h={enumerable:!0,get:_(function(){return o[l]},"get")}),Object.defineProperty(a,u,h)}):(function(a,o,l,u){u===void 0&&(u=l),a[u]=o[l]})),r=e&&e.__exportStar||function(a,o){for(var l in a)l!=="default"&&!Object.prototype.hasOwnProperty.call(o,l)&&t(o,a,l)};Object.defineProperty(e,"__esModule",{value:!0}),e.createProtocolConnection=void 0;var n=c2e();r(c2e(),e),r(rdt(),e);function i(a,o,l,u){return(0,n.createMessageConnection)(a,o,l,u)}s(i,"createProtocolConnection"),_(i,"createProtocolConnection"),e.createProtocolConnection=i}}),RTe={};Pf(RTe,{AbstractAstReflection:s(()=>Pz,"AbstractAstReflection"),AbstractCstNode:s(()=>mW,"AbstractCstNode"),AbstractLangiumParser:s(()=>yW,"AbstractLangiumParser"),AbstractParserErrorMessageProvider:s(()=>k4e,"AbstractParserErrorMessageProvider"),AbstractThreadedAsyncParser:s(()=>h0t,"AbstractThreadedAsyncParser"),AstUtils:s(()=>Oz,"AstUtils"),BiMap:s(()=>XA,"BiMap"),Cancellation:s(()=>Hn,"Cancellation"),CompositeCstNodeImpl:s(()=>FR,"CompositeCstNodeImpl"),ContextCache:s(()=>UR,"ContextCache"),CstNodeBuilder:s(()=>x4e,"CstNodeBuilder"),CstUtils:s(()=>Mz,"CstUtils"),DEFAULT_TOKENIZE_OPTIONS:s(()=>PW,"DEFAULT_TOKENIZE_OPTIONS"),DONE_RESULT:s(()=>Ts,"DONE_RESULT"),DatatypeSymbol:s(()=>HA,"DatatypeSymbol"),DefaultAstNodeDescriptionProvider:s(()=>J4e,"DefaultAstNodeDescriptionProvider"),DefaultAstNodeLocator:s(()=>t3e,"DefaultAstNodeLocator"),DefaultAsyncParser:s(()=>x3e,"DefaultAsyncParser"),DefaultCommentProvider:s(()=>v3e,"DefaultCommentProvider"),DefaultConfigurationProvider:s(()=>r3e,"DefaultConfigurationProvider"),DefaultDocumentBuilder:s(()=>n3e,"DefaultDocumentBuilder"),DefaultDocumentValidator:s(()=>Q4e,"DefaultDocumentValidator"),DefaultHydrator:s(()=>T3e,"DefaultHydrator"),DefaultIndexManager:s(()=>i3e,"DefaultIndexManager"),DefaultJsonSerializer:s(()=>j4e,"DefaultJsonSerializer"),DefaultLangiumDocumentFactory:s(()=>F4e,"DefaultLangiumDocumentFactory"),DefaultLangiumDocuments:s(()=>G4e,"DefaultLangiumDocuments"),DefaultLangiumProfiler:s(()=>g0t,"DefaultLangiumProfiler"),DefaultLexer:s(()=>OW,"DefaultLexer"),DefaultLexerErrorMessageProvider:s(()=>s3e,"DefaultLexerErrorMessageProvider"),DefaultLinker:s(()=>z4e,"DefaultLinker"),DefaultNameProvider:s(()=>V4e,"DefaultNameProvider"),DefaultReferenceDescriptionProvider:s(()=>e3e,"DefaultReferenceDescriptionProvider"),DefaultReferences:s(()=>W4e,"DefaultReferences"),DefaultScopeComputation:s(()=>q4e,"DefaultScopeComputation"),DefaultScopeProvider:s(()=>Y4e,"DefaultScopeProvider"),DefaultServiceRegistry:s(()=>X4e,"DefaultServiceRegistry"),DefaultTokenBuilder:s(()=>VR,"DefaultTokenBuilder"),DefaultValueConverter:s(()=>wW,"DefaultValueConverter"),DefaultWorkspaceLock:s(()=>b3e,"DefaultWorkspaceLock"),DefaultWorkspaceManager:s(()=>a3e,"DefaultWorkspaceManager"),Deferred:s(()=>xh,"Deferred"),Disposable:s(()=>cg,"Disposable"),DisposableCache:s(()=>HR,"DisposableCache"),DocumentCache:s(()=>U4e,"DocumentCache"),DocumentState:s(()=>Kr,"DocumentState"),DocumentValidator:s(()=>al,"DocumentValidator"),EMPTY_SCOPE:s(()=>o0t,"EMPTY_SCOPE"),EMPTY_STREAM:s(()=>D1,"EMPTY_STREAM"),EmptyFileSystem:s(()=>dn,"EmptyFileSystem"),EmptyFileSystemProvider:s(()=>w3e,"EmptyFileSystemProvider"),ErrorWithLocation:s(()=>hR,"ErrorWithLocation"),GrammarAST:s(()=>DTe,"GrammarAST"),GrammarUtils:s(()=>dV,"GrammarUtils"),IndentationAwareLexer:s(()=>f0t,"IndentationAwareLexer"),IndentationAwareTokenBuilder:s(()=>k3e,"IndentationAwareTokenBuilder"),JSDocDocumentationProvider:s(()=>y3e,"JSDocDocumentationProvider"),LangiumCompletionParser:s(()=>w4e,"LangiumCompletionParser"),LangiumParser:s(()=>C4e,"LangiumParser"),LangiumParserErrorMessageProvider:s(()=>vW,"LangiumParserErrorMessageProvider"),LeafCstNodeImpl:s(()=>qA,"LeafCstNodeImpl"),LexingMode:s(()=>og,"LexingMode"),MapScope:s(()=>s0t,"MapScope"),Module:s(()=>IG,"Module"),MultiMap:s(()=>bh,"MultiMap"),MultiMapScope:s(()=>H4e,"MultiMapScope"),OperationCancelled:s(()=>nu,"OperationCancelled"),ParserWorker:s(()=>d0t,"ParserWorker"),ProfilingTask:s(()=>E3e,"ProfilingTask"),Reduction:s(()=>iC,"Reduction"),RefResolving:s(()=>Im,"RefResolving"),RegExpUtils:s(()=>pV,"RegExpUtils"),RootCstNodeImpl:s(()=>gW,"RootCstNodeImpl"),SimpleCache:s(()=>LW,"SimpleCache"),StreamImpl:s(()=>ru,"StreamImpl"),StreamScope:s(()=>RG,"StreamScope"),TextDocument:s(()=>YA,"TextDocument"),TreeStreamImpl:s(()=>I1,"TreeStreamImpl"),URI:s(()=>Ao,"URI"),UriTrie:s(()=>RW,"UriTrie"),UriUtils:s(()=>ks,"UriUtils"),VALIDATE_EACH_NODE:s(()=>Z4e,"VALIDATE_EACH_NODE"),ValidationCategory:s(()=>KA,"ValidationCategory"),ValidationRegistry:s(()=>K4e,"ValidationRegistry"),ValueConverter:s(()=>eu,"ValueConverter"),WorkspaceCache:s(()=>DW,"WorkspaceCache"),assertCondition:s(()=>fV,"assertCondition"),assertUnreachable:s(()=>Of,"assertUnreachable"),createCompletionParser:s(()=>TW,"createCompletionParser"),createDefaultCoreModule:s(()=>sn,"createDefaultCoreModule"),createDefaultSharedCoreModule:s(()=>on,"createDefaultSharedCoreModule"),createGrammarConfig:s(()=>IV,"createGrammarConfig"),createLangiumParser:s(()=>CW,"createLangiumParser"),createParser:s(()=>GR,"createParser"),delayNextTick:s(()=>WR,"delayNextTick"),diagnosticData:s(()=>sg,"diagnosticData"),eagerLoad:s(()=>WW,"eagerLoad"),getDiagnosticRange:s(()=>MW,"getDiagnosticRange"),indentationBuilderDefaultOptions:s(()=>NG,"indentationBuilderDefaultOptions"),inject:s(()=>Lr,"inject"),interruptAndCheck:s(()=>Ta,"interruptAndCheck"),isAstNode:s(()=>Vi,"isAstNode"),isAstNodeDescription:s(()=>Nz,"isAstNodeDescription"),isAstNodeWithComment:s(()=>IW,"isAstNodeWithComment"),isCompositeCstNode:s(()=>dh,"isCompositeCstNode"),isIMultiModeLexerDefinition:s(()=>XR,"isIMultiModeLexerDefinition"),isJSDoc:s(()=>$W,"isJSDoc"),isLeafCstNode:s(()=>pg,"isLeafCstNode"),isLinkingError:s(()=>Bm,"isLinkingError"),isMultiReference:s(()=>iu,"isMultiReference"),isNamed:s(()=>_W,"isNamed"),isOperationCancelled:s(()=>Eg,"isOperationCancelled"),isReference:s(()=>Cs,"isReference"),isRootCstNode:s(()=>nR,"isRootCstNode"),isTokenTypeArray:s(()=>jR,"isTokenTypeArray"),isTokenTypeDictionary:s(()=>ZA,"isTokenTypeDictionary"),loadGrammarFromJson:s(()=>Ca,"loadGrammarFromJson"),parseJSDoc:s(()=>BW,"parseJSDoc"),prepareLangiumParser:s(()=>kW,"prepareLangiumParser"),setInterruptionPeriod:s(()=>SW,"setInterruptionPeriod"),startCancelableOperation:s(()=>qR,"startCancelableOperation"),stream:s(()=>Ln,"stream"),toDiagnosticData:s(()=>NW,"toDiagnosticData"),toDiagnosticSeverity:s(()=>JT,"toDiagnosticSeverity")});Mz={};Pf(Mz,{DefaultNameRegexp:s(()=>oV,"DefaultNameRegexp"),RangeComparison:s(()=>tu,"RangeComparison"),compareRange:s(()=>aV,"compareRange"),findCommentNode:s(()=>lV,"findCommentNode"),findDeclarationNodeAtOffset:s(()=>KTe,"findDeclarationNodeAtOffset"),findLeafNodeAtOffset:s(()=>uR,"findLeafNodeAtOffset"),findLeafNodeBeforeOffset:s(()=>cV,"findLeafNodeBeforeOffset"),flattenCst:s(()=>XTe,"flattenCst"),getDatatypeNode:s(()=>jTe,"getDatatypeNode"),getInteriorNodes:s(()=>JTe,"getInteriorNodes"),getNextNode:s(()=>ZTe,"getNextNode"),getPreviousNode:s(()=>hV,"getPreviousNode"),getStartlineNode:s(()=>QTe,"getStartlineNode"),inRange:s(()=>sV,"inRange"),isChildNode:s(()=>iV,"isChildNode"),isCommentNode:s(()=>DA,"isCommentNode"),streamCst:s(()=>O1,"streamCst"),toDocumentSegment:s(()=>B1,"toDocumentSegment"),tokenToRange:s(()=>aC,"tokenToRange")});s(Vi,"isAstNode");_(Vi,"isAstNode");s(Cs,"isReference");_(Cs,"isReference");s(iu,"isMultiReference");_(iu,"isMultiReference");s(Nz,"isAstNodeDescription");_(Nz,"isAstNodeDescription");s(Bm,"isLinkingError");_(Bm,"isLinkingError");Pz=class{static{s(this,"AbstractAstReflection")}static{_(this,"AbstractAstReflection")}constructor(){this.subtypes={},this.allSubtypes={}}getAllTypes(){return Object.keys(this.types)}getReferenceType(e){let t=this.types[e.container.$type];if(!t)throw new Error(`Type ${e.container.$type||"undefined"} not found.`);let r=t.properties[e.property]?.referenceType;if(!r)throw new Error(`Property ${e.property||"undefined"} of type ${e.container.$type} is not a reference.`);return r}getTypeMetaData(e){let t=this.types[e];return t||{name:e,properties:{},superTypes:[]}}isInstance(e,t){return Vi(e)&&this.isSubtype(e.$type,t)}isSubtype(e,t){if(e===t)return!0;let r=this.subtypes[e];r||(r=this.subtypes[e]={});let n=r[t];if(n!==void 0)return n;{let i=this.types[e],a=i?i.superTypes.some(o=>this.isSubtype(o,t)):!1;return r[t]=a,a}}getAllSubTypes(e){let t=this.allSubtypes[e];if(t)return t;{let r=this.getAllTypes(),n=[];for(let i of r)this.isSubtype(i,e)&&n.push(i);return this.allSubtypes[e]=n,n}}};s(dh,"isCompositeCstNode");_(dh,"isCompositeCstNode");s(pg,"isLeafCstNode");_(pg,"isLeafCstNode");s(nR,"isRootCstNode");_(nR,"isRootCstNode");ru=class oh{static{s(this,"_StreamImpl")}static{_(this,"StreamImpl")}constructor(t,r){this.startFn=t,this.nextFn=r}iterator(){let t={state:this.startFn(),next:_(()=>this.nextFn(t.state),"next"),[Symbol.iterator]:()=>t};return t}[Symbol.iterator](){return this.iterator()}isEmpty(){return!!this.iterator().next().done}count(){let t=this.iterator(),r=0,n=t.next();for(;!n.done;)r++,n=t.next();return r}toArray(){let t=[],r=this.iterator(),n;do n=r.next(),n.value!==void 0&&t.push(n.value);while(!n.done);return t}toSet(){return new Set(this)}toMap(t,r){let n=this.map(i=>[t?t(i):i,r?r(i):i]);return new Map(n)}toString(){return this.join()}concat(t){return new oh(()=>({first:this.startFn(),firstDone:!1,iterator:t[Symbol.iterator]()}),r=>{let n;if(!r.firstDone){do if(n=this.nextFn(r.first),!n.done)return n;while(!n.done);r.firstDone=!0}do if(n=r.iterator.next(),!n.done)return n;while(!n.done);return Ts})}join(t=","){let r=this.iterator(),n="",i,a=!1;do i=r.next(),i.done||(a&&(n+=t),n+=_Te(i.value)),a=!0;while(!i.done);return n}indexOf(t,r=0){let n=this.iterator(),i=0,a=n.next();for(;!a.done;){if(i>=r&&a.value===t)return i;a=n.next(),i++}return-1}every(t){let r=this.iterator(),n=r.next();for(;!n.done;){if(!t(n.value))return!1;n=r.next()}return!0}some(t){let r=this.iterator(),n=r.next();for(;!n.done;){if(t(n.value))return!0;n=r.next()}return!1}forEach(t){let r=this.iterator(),n=0,i=r.next();for(;!i.done;)t(i.value,n),i=r.next(),n++}map(t){return new oh(this.startFn,r=>{let{done:n,value:i}=this.nextFn(r);return n?Ts:{done:!1,value:t(i)}})}filter(t){return new oh(this.startFn,r=>{let n;do if(n=this.nextFn(r),!n.done&&t(n.value))return n;while(!n.done);return Ts})}nonNullable(){return this.filter(t=>t!=null)}reduce(t,r){let n=this.iterator(),i=r,a=n.next();for(;!a.done;)i===void 0?i=a.value:i=t(i,a.value),a=n.next();return i}reduceRight(t,r){return this.recursiveReduce(this.iterator(),t,r)}recursiveReduce(t,r,n){let i=t.next();if(i.done)return n;let a=this.recursiveReduce(t,r,n);return a===void 0?i.value:r(a,i.value)}find(t){let r=this.iterator(),n=r.next();for(;!n.done;){if(t(n.value))return n.value;n=r.next()}}findIndex(t){let r=this.iterator(),n=0,i=r.next();for(;!i.done;){if(t(i.value))return n;i=r.next(),n++}return-1}includes(t){let r=this.iterator(),n=r.next();for(;!n.done;){if(n.value===t)return!0;n=r.next()}return!1}flatMap(t){return new oh(()=>({this:this.startFn()}),r=>{do{if(r.iterator){let a=r.iterator.next();if(a.done)r.iterator=void 0;else return a}let{done:n,value:i}=this.nextFn(r.this);if(!n){let a=t(i);if(nC(a))r.iterator=a[Symbol.iterator]();else return{done:!1,value:a}}}while(r.iterator);return Ts})}flat(t){if(t===void 0&&(t=1),t<=0)return this;let r=t>1?this.flat(t-1):this;return new oh(()=>({this:r.startFn()}),n=>{do{if(n.iterator){let o=n.iterator.next();if(o.done)n.iterator=void 0;else return o}let{done:i,value:a}=r.nextFn(n.this);if(!i)if(nC(a))n.iterator=a[Symbol.iterator]();else return{done:!1,value:a}}while(n.iterator);return Ts})}head(){let r=this.iterator().next();if(!r.done)return r.value}tail(t=1){return new oh(()=>{let r=this.startFn();for(let n=0;n({size:0,state:this.startFn()}),r=>(r.size++,r.size>t?Ts:this.nextFn(r.state)))}distinct(t){return new oh(()=>({set:new Set,internalState:this.startFn()}),r=>{let n;do if(n=this.nextFn(r.internalState),!n.done){let i=t?t(n.value):n.value;if(!r.set.has(i))return r.set.add(i),n}while(!n.done);return Ts})}exclude(t,r){let n=new Set;for(let i of t){let a=r?r(i):i;n.add(a)}return this.filter(i=>{let a=r?r(i):i;return!n.has(a)})}};s(_Te,"toString");_(_Te,"toString");s(nC,"isIterable");_(nC,"isIterable");D1=new ru(()=>{},()=>Ts),Ts=Object.freeze({done:!0,value:void 0});s(Ln,"stream");_(Ln,"stream");I1=class extends ru{static{s(this,"TreeStreamImpl")}static{_(this,"TreeStreamImpl")}constructor(e,t,r){super(()=>({iterators:r?.includeRoot?[[e][Symbol.iterator]()]:[t(e)[Symbol.iterator]()],pruned:!1}),n=>{for(n.pruned&&(n.iterators.pop(),n.pruned=!1);n.iterators.length>0;){let a=n.iterators[n.iterators.length-1].next();if(a.done)n.iterators.pop();else return n.iterators.push(t(a.value)[Symbol.iterator]()),a}return Ts})}iterator(){let e={state:this.startFn(),next:_(()=>this.nextFn(e.state),"next"),prune:_(()=>{e.state.pruned=!0},"prune"),[Symbol.iterator]:()=>e};return e}};(function(e){function t(a){return a.reduce((o,l)=>o+l,0)}s(t,"sum"),_(t,"sum"),e.sum=t;function r(a){return a.reduce((o,l)=>o*l,0)}s(r,"product"),_(r,"product"),e.product=r;function n(a){return a.reduce((o,l)=>Math.min(o,l))}s(n,"min2"),_(n,"min"),e.min=n;function i(a){return a.reduce((o,l)=>Math.max(o,l))}s(i,"max"),_(i,"max"),e.max=i})(iC||(iC={}));Oz={};Pf(Oz,{assignMandatoryProperties:s(()=>Bz,"assignMandatoryProperties"),copyAstNode:s(()=>yA,"copyAstNode"),findRootNode:s(()=>R1,"findRootNode"),getContainerOfType:s(()=>mg,"getContainerOfType"),getDocument:s(()=>Yl,"getDocument"),getReferenceNodes:s(()=>mA,"getReferenceNodes"),hasContainerOfType:s(()=>LTe,"hasContainerOfType"),linkContentToContainer:s(()=>M1,"linkContentToContainer"),streamAllContents:s(()=>Th,"streamAllContents"),streamAst:s(()=>jl,"streamAst"),streamContents:s(()=>vC,"streamContents"),streamReferences:s(()=>N1,"streamReferences")});s(M1,"linkContentToContainer");_(M1,"linkContentToContainer");s(mg,"getContainerOfType");_(mg,"getContainerOfType");s(LTe,"hasContainerOfType");_(LTe,"hasContainerOfType");s(Yl,"getDocument");_(Yl,"getDocument");s(R1,"findRootNode");_(R1,"findRootNode");s(mA,"getReferenceNodes");_(mA,"getReferenceNodes");s(vC,"streamContents");_(vC,"streamContents");s(Th,"streamAllContents");_(Th,"streamAllContents");s(jl,"streamAst");_(jl,"streamAst");s(gA,"isAstNodeInRange");_(gA,"isAstNodeInRange");s(N1,"streamReferences");_(N1,"streamReferences");s(Bz,"assignMandatoryProperties");_(Bz,"assignMandatoryProperties");s($z,"copyDefaultValue");_($z,"copyDefaultValue");s(yA,"copyAstNode");_(yA,"copyAstNode");DTe={};Pf(DTe,{AbstractElement:s(()=>eo,"AbstractElement"),AbstractParserRule:s(()=>VT,"AbstractParserRule"),AbstractRule:s(()=>v1,"AbstractRule"),AbstractType:s(()=>Eo,"AbstractType"),Action:s(()=>wf,"Action"),Alternatives:s(()=>WT,"Alternatives"),ArrayLiteral:s(()=>vA,"ArrayLiteral"),ArrayType:s(()=>xA,"ArrayType"),Assignment:s(()=>Sf,"Assignment"),BooleanLiteral:s(()=>bA,"BooleanLiteral"),CharacterRange:s(()=>Ef,"CharacterRange"),Condition:s(()=>Af,"Condition"),Conjunction:s(()=>qT,"Conjunction"),CrossReference:s(()=>Rf,"CrossReference"),Disjunction:s(()=>HT,"Disjunction"),EndOfFile:s(()=>TA,"EndOfFile"),Grammar:s(()=>ch,"Grammar"),GrammarImport:s(()=>CA,"GrammarImport"),Group:s(()=>$m,"Group"),InferredType:s(()=>kA,"InferredType"),InfixRule:s(()=>Jc,"InfixRule"),InfixRuleOperatorList:s(()=>UT,"InfixRuleOperatorList"),InfixRuleOperators:s(()=>wA,"InfixRuleOperators"),Interface:s(()=>x1,"Interface"),Keyword:s(()=>b1,"Keyword"),LangiumGrammarAstReflection:s(()=>nV,"LangiumGrammarAstReflection"),LangiumGrammarTerminals:s(()=>idt,"LangiumGrammarTerminals"),NamedArgument:s(()=>T1,"NamedArgument"),NegatedToken:s(()=>Fm,"NegatedToken"),Negation:s(()=>SA,"Negation"),NumberLiteral:s(()=>EA,"NumberLiteral"),Parameter:s(()=>C1,"Parameter"),ParameterReference:s(()=>AA,"ParameterReference"),ParserRule:s(()=>Wl,"ParserRule"),ReferenceType:s(()=>YT,"ReferenceType"),RegexToken:s(()=>Gm,"RegexToken"),ReturnType:s(()=>RA,"ReturnType"),RuleCall:s(()=>zm,"RuleCall"),SimpleType:s(()=>k1,"SimpleType"),StringLiteral:s(()=>_A,"StringLiteral"),TerminalAlternatives:s(()=>Vm,"TerminalAlternatives"),TerminalElement:s(()=>to,"TerminalElement"),TerminalGroup:s(()=>Wm,"TerminalGroup"),TerminalRule:s(()=>uh,"TerminalRule"),TerminalRuleCall:s(()=>qm,"TerminalRuleCall"),Type:s(()=>jT,"Type"),TypeAttribute:s(()=>Hm,"TypeAttribute"),TypeDefinition:s(()=>Um,"TypeDefinition"),UnionType:s(()=>LA,"UnionType"),UnorderedGroup:s(()=>XT,"UnorderedGroup"),UntilToken:s(()=>Ym,"UntilToken"),ValueLiteral:s(()=>jm,"ValueLiteral"),Wildcard:s(()=>w1,"Wildcard"),isAbstractElement:s(()=>iR,"isAbstractElement"),isAbstractParserRule:s(()=>gg,"isAbstractParserRule"),isAbstractRule:s(()=>ITe,"isAbstractRule"),isAbstractType:s(()=>MTe,"isAbstractType"),isAction:s(()=>If,"isAction"),isAlternatives:s(()=>aR,"isAlternatives"),isArrayLiteral:s(()=>NTe,"isArrayLiteral"),isArrayType:s(()=>Fz,"isArrayType"),isAssignment:s(()=>fh,"isAssignment"),isBooleanLiteral:s(()=>Gz,"isBooleanLiteral"),isCharacterRange:s(()=>zz,"isCharacterRange"),isCondition:s(()=>PTe,"isCondition"),isConjunction:s(()=>Vz,"isConjunction"),isCrossReference:s(()=>yg,"isCrossReference"),isDisjunction:s(()=>Wz,"isDisjunction"),isEndOfFile:s(()=>qz,"isEndOfFile"),isGrammar:s(()=>OTe,"isGrammar"),isGrammarImport:s(()=>BTe,"isGrammarImport"),isGroup:s(()=>vg,"isGroup"),isInferredType:s(()=>xC,"isInferredType"),isInfixRule:s(()=>P1,"isInfixRule"),isInfixRuleOperatorList:s(()=>$Te,"isInfixRuleOperatorList"),isInfixRuleOperators:s(()=>FTe,"isInfixRuleOperators"),isInterface:s(()=>Hz,"isInterface"),isKeyword:s(()=>ph,"isKeyword"),isNamedArgument:s(()=>GTe,"isNamedArgument"),isNegatedToken:s(()=>Uz,"isNegatedToken"),isNegation:s(()=>Yz,"isNegation"),isNumberLiteral:s(()=>zTe,"isNumberLiteral"),isParameter:s(()=>VTe,"isParameter"),isParameterReference:s(()=>jz,"isParameterReference"),isParserRule:s(()=>Ss,"isParserRule"),isReferenceType:s(()=>Xz,"isReferenceType"),isRegexToken:s(()=>Kz,"isRegexToken"),isReturnType:s(()=>Zz,"isReturnType"),isRuleCall:s(()=>mh,"isRuleCall"),isSimpleType:s(()=>sR,"isSimpleType"),isStringLiteral:s(()=>WTe,"isStringLiteral"),isTerminalAlternatives:s(()=>Qz,"isTerminalAlternatives"),isTerminalElement:s(()=>qTe,"isTerminalElement"),isTerminalGroup:s(()=>Jz,"isTerminalGroup"),isTerminalRule:s(()=>sl,"isTerminalRule"),isTerminalRuleCall:s(()=>oR,"isTerminalRuleCall"),isType:s(()=>lR,"isType"),isTypeAttribute:s(()=>HTe,"isTypeAttribute"),isTypeDefinition:s(()=>UTe,"isTypeDefinition"),isUnionType:s(()=>eV,"isUnionType"),isUnorderedGroup:s(()=>cR,"isUnorderedGroup"),isUntilToken:s(()=>tV,"isUntilToken"),isValueLiteral:s(()=>YTe,"isValueLiteral"),isWildcard:s(()=>rV,"isWildcard"),reflection:s(()=>br,"reflection")});idt={ID:/\^?[_a-zA-Z][\w_]*/,STRING:/"(\\.|[^"\\])*"|'(\\.|[^'\\])*'/,NUMBER:/NaN|-?((\d*\.\d+|\d+)([Ee][+-]?\d+)?|Infinity)/,RegexLiteral:/\/(?![*+?])(?:[^\r\n\[/\\]|\\.|\[(?:[^\r\n\]\\]|\\.)*\])+\/[a-z]*/,WS:/\s+/,ML_COMMENT:/\/\*[\s\S]*?\*\//,SL_COMMENT:/\/\/[^\n\r]*/},eo={$type:"AbstractElement",cardinality:"cardinality"};s(iR,"isAbstractElement");_(iR,"isAbstractElement");VT={$type:"AbstractParserRule"};s(gg,"isAbstractParserRule");_(gg,"isAbstractParserRule");v1={$type:"AbstractRule"};s(ITe,"isAbstractRule");_(ITe,"isAbstractRule");Eo={$type:"AbstractType"};s(MTe,"isAbstractType");_(MTe,"isAbstractType");wf={$type:"Action",cardinality:"cardinality",feature:"feature",inferredType:"inferredType",operator:"operator",type:"type"};s(If,"isAction");_(If,"isAction");WT={$type:"Alternatives",cardinality:"cardinality",elements:"elements"};s(aR,"isAlternatives");_(aR,"isAlternatives");vA={$type:"ArrayLiteral",elements:"elements"};s(NTe,"isArrayLiteral");_(NTe,"isArrayLiteral");xA={$type:"ArrayType",elementType:"elementType"};s(Fz,"isArrayType");_(Fz,"isArrayType");Sf={$type:"Assignment",cardinality:"cardinality",feature:"feature",operator:"operator",predicate:"predicate",terminal:"terminal"};s(fh,"isAssignment");_(fh,"isAssignment");bA={$type:"BooleanLiteral",true:"true"};s(Gz,"isBooleanLiteral");_(Gz,"isBooleanLiteral");Ef={$type:"CharacterRange",cardinality:"cardinality",left:"left",lookahead:"lookahead",parenthesized:"parenthesized",right:"right"};s(zz,"isCharacterRange");_(zz,"isCharacterRange");Af={$type:"Condition"};s(PTe,"isCondition");_(PTe,"isCondition");qT={$type:"Conjunction",left:"left",right:"right"};s(Vz,"isConjunction");_(Vz,"isConjunction");Rf={$type:"CrossReference",cardinality:"cardinality",deprecatedSyntax:"deprecatedSyntax",isMulti:"isMulti",terminal:"terminal",type:"type"};s(yg,"isCrossReference");_(yg,"isCrossReference");HT={$type:"Disjunction",left:"left",right:"right"};s(Wz,"isDisjunction");_(Wz,"isDisjunction");TA={$type:"EndOfFile",cardinality:"cardinality"};s(qz,"isEndOfFile");_(qz,"isEndOfFile");ch={$type:"Grammar",imports:"imports",interfaces:"interfaces",isDeclared:"isDeclared",name:"name",rules:"rules",types:"types"};s(OTe,"isGrammar");_(OTe,"isGrammar");CA={$type:"GrammarImport",path:"path"};s(BTe,"isGrammarImport");_(BTe,"isGrammarImport");$m={$type:"Group",cardinality:"cardinality",elements:"elements",guardCondition:"guardCondition",predicate:"predicate"};s(vg,"isGroup");_(vg,"isGroup");kA={$type:"InferredType",name:"name"};s(xC,"isInferredType");_(xC,"isInferredType");Jc={$type:"InfixRule",call:"call",dataType:"dataType",inferredType:"inferredType",name:"name",operators:"operators",parameters:"parameters",returnType:"returnType"};s(P1,"isInfixRule");_(P1,"isInfixRule");UT={$type:"InfixRuleOperatorList",associativity:"associativity",operators:"operators"};s($Te,"isInfixRuleOperatorList");_($Te,"isInfixRuleOperatorList");wA={$type:"InfixRuleOperators",precedences:"precedences"};s(FTe,"isInfixRuleOperators");_(FTe,"isInfixRuleOperators");x1={$type:"Interface",attributes:"attributes",name:"name",superTypes:"superTypes"};s(Hz,"isInterface");_(Hz,"isInterface");b1={$type:"Keyword",cardinality:"cardinality",predicate:"predicate",value:"value"};s(ph,"isKeyword");_(ph,"isKeyword");T1={$type:"NamedArgument",calledByName:"calledByName",parameter:"parameter",value:"value"};s(GTe,"isNamedArgument");_(GTe,"isNamedArgument");Fm={$type:"NegatedToken",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized",terminal:"terminal"};s(Uz,"isNegatedToken");_(Uz,"isNegatedToken");SA={$type:"Negation",value:"value"};s(Yz,"isNegation");_(Yz,"isNegation");EA={$type:"NumberLiteral",value:"value"};s(zTe,"isNumberLiteral");_(zTe,"isNumberLiteral");C1={$type:"Parameter",name:"name"};s(VTe,"isParameter");_(VTe,"isParameter");AA={$type:"ParameterReference",parameter:"parameter"};s(jz,"isParameterReference");_(jz,"isParameterReference");Wl={$type:"ParserRule",dataType:"dataType",definition:"definition",entry:"entry",fragment:"fragment",inferredType:"inferredType",name:"name",parameters:"parameters",returnType:"returnType"};s(Ss,"isParserRule");_(Ss,"isParserRule");YT={$type:"ReferenceType",isMulti:"isMulti",referenceType:"referenceType"};s(Xz,"isReferenceType");_(Xz,"isReferenceType");Gm={$type:"RegexToken",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized",regex:"regex"};s(Kz,"isRegexToken");_(Kz,"isRegexToken");RA={$type:"ReturnType",name:"name"};s(Zz,"isReturnType");_(Zz,"isReturnType");zm={$type:"RuleCall",arguments:"arguments",cardinality:"cardinality",predicate:"predicate",rule:"rule"};s(mh,"isRuleCall");_(mh,"isRuleCall");k1={$type:"SimpleType",primitiveType:"primitiveType",stringType:"stringType",typeRef:"typeRef"};s(sR,"isSimpleType");_(sR,"isSimpleType");_A={$type:"StringLiteral",value:"value"};s(WTe,"isStringLiteral");_(WTe,"isStringLiteral");Vm={$type:"TerminalAlternatives",cardinality:"cardinality",elements:"elements",lookahead:"lookahead",parenthesized:"parenthesized"};s(Qz,"isTerminalAlternatives");_(Qz,"isTerminalAlternatives");to={$type:"TerminalElement",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized"};s(qTe,"isTerminalElement");_(qTe,"isTerminalElement");Wm={$type:"TerminalGroup",cardinality:"cardinality",elements:"elements",lookahead:"lookahead",parenthesized:"parenthesized"};s(Jz,"isTerminalGroup");_(Jz,"isTerminalGroup");uh={$type:"TerminalRule",definition:"definition",fragment:"fragment",hidden:"hidden",name:"name",type:"type"};s(sl,"isTerminalRule");_(sl,"isTerminalRule");qm={$type:"TerminalRuleCall",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized",rule:"rule"};s(oR,"isTerminalRuleCall");_(oR,"isTerminalRuleCall");jT={$type:"Type",name:"name",type:"type"};s(lR,"isType");_(lR,"isType");Hm={$type:"TypeAttribute",defaultValue:"defaultValue",isOptional:"isOptional",name:"name",type:"type"};s(HTe,"isTypeAttribute");_(HTe,"isTypeAttribute");Um={$type:"TypeDefinition"};s(UTe,"isTypeDefinition");_(UTe,"isTypeDefinition");LA={$type:"UnionType",types:"types"};s(eV,"isUnionType");_(eV,"isUnionType");XT={$type:"UnorderedGroup",cardinality:"cardinality",elements:"elements"};s(cR,"isUnorderedGroup");_(cR,"isUnorderedGroup");Ym={$type:"UntilToken",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized",terminal:"terminal"};s(tV,"isUntilToken");_(tV,"isUntilToken");jm={$type:"ValueLiteral"};s(YTe,"isValueLiteral");_(YTe,"isValueLiteral");w1={$type:"Wildcard",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized"};s(rV,"isWildcard");_(rV,"isWildcard");nV=class extends Pz{static{s(this,"LangiumGrammarAstReflection")}static{_(this,"LangiumGrammarAstReflection")}constructor(){super(...arguments),this.types={AbstractElement:{name:eo.$type,properties:{cardinality:{name:eo.cardinality}},superTypes:[]},AbstractParserRule:{name:VT.$type,properties:{},superTypes:[v1.$type,Eo.$type]},AbstractRule:{name:v1.$type,properties:{},superTypes:[]},AbstractType:{name:Eo.$type,properties:{},superTypes:[]},Action:{name:wf.$type,properties:{cardinality:{name:wf.cardinality},feature:{name:wf.feature},inferredType:{name:wf.inferredType},operator:{name:wf.operator},type:{name:wf.type,referenceType:Eo.$type}},superTypes:[eo.$type]},Alternatives:{name:WT.$type,properties:{cardinality:{name:WT.cardinality},elements:{name:WT.elements,defaultValue:[]}},superTypes:[eo.$type]},ArrayLiteral:{name:vA.$type,properties:{elements:{name:vA.elements,defaultValue:[]}},superTypes:[jm.$type]},ArrayType:{name:xA.$type,properties:{elementType:{name:xA.elementType}},superTypes:[Um.$type]},Assignment:{name:Sf.$type,properties:{cardinality:{name:Sf.cardinality},feature:{name:Sf.feature},operator:{name:Sf.operator},predicate:{name:Sf.predicate},terminal:{name:Sf.terminal}},superTypes:[eo.$type]},BooleanLiteral:{name:bA.$type,properties:{true:{name:bA.true,defaultValue:!1}},superTypes:[Af.$type,jm.$type]},CharacterRange:{name:Ef.$type,properties:{cardinality:{name:Ef.cardinality},left:{name:Ef.left},lookahead:{name:Ef.lookahead},parenthesized:{name:Ef.parenthesized,defaultValue:!1},right:{name:Ef.right}},superTypes:[to.$type]},Condition:{name:Af.$type,properties:{},superTypes:[]},Conjunction:{name:qT.$type,properties:{left:{name:qT.left},right:{name:qT.right}},superTypes:[Af.$type]},CrossReference:{name:Rf.$type,properties:{cardinality:{name:Rf.cardinality},deprecatedSyntax:{name:Rf.deprecatedSyntax,defaultValue:!1},isMulti:{name:Rf.isMulti,defaultValue:!1},terminal:{name:Rf.terminal},type:{name:Rf.type,referenceType:Eo.$type}},superTypes:[eo.$type]},Disjunction:{name:HT.$type,properties:{left:{name:HT.left},right:{name:HT.right}},superTypes:[Af.$type]},EndOfFile:{name:TA.$type,properties:{cardinality:{name:TA.cardinality}},superTypes:[eo.$type]},Grammar:{name:ch.$type,properties:{imports:{name:ch.imports,defaultValue:[]},interfaces:{name:ch.interfaces,defaultValue:[]},isDeclared:{name:ch.isDeclared,defaultValue:!1},name:{name:ch.name},rules:{name:ch.rules,defaultValue:[]},types:{name:ch.types,defaultValue:[]}},superTypes:[]},GrammarImport:{name:CA.$type,properties:{path:{name:CA.path}},superTypes:[]},Group:{name:$m.$type,properties:{cardinality:{name:$m.cardinality},elements:{name:$m.elements,defaultValue:[]},guardCondition:{name:$m.guardCondition},predicate:{name:$m.predicate}},superTypes:[eo.$type]},InferredType:{name:kA.$type,properties:{name:{name:kA.name}},superTypes:[Eo.$type]},InfixRule:{name:Jc.$type,properties:{call:{name:Jc.call},dataType:{name:Jc.dataType},inferredType:{name:Jc.inferredType},name:{name:Jc.name},operators:{name:Jc.operators},parameters:{name:Jc.parameters,defaultValue:[]},returnType:{name:Jc.returnType,referenceType:Eo.$type}},superTypes:[VT.$type]},InfixRuleOperatorList:{name:UT.$type,properties:{associativity:{name:UT.associativity},operators:{name:UT.operators,defaultValue:[]}},superTypes:[]},InfixRuleOperators:{name:wA.$type,properties:{precedences:{name:wA.precedences,defaultValue:[]}},superTypes:[]},Interface:{name:x1.$type,properties:{attributes:{name:x1.attributes,defaultValue:[]},name:{name:x1.name},superTypes:{name:x1.superTypes,defaultValue:[],referenceType:Eo.$type}},superTypes:[Eo.$type]},Keyword:{name:b1.$type,properties:{cardinality:{name:b1.cardinality},predicate:{name:b1.predicate},value:{name:b1.value}},superTypes:[eo.$type]},NamedArgument:{name:T1.$type,properties:{calledByName:{name:T1.calledByName,defaultValue:!1},parameter:{name:T1.parameter,referenceType:C1.$type},value:{name:T1.value}},superTypes:[]},NegatedToken:{name:Fm.$type,properties:{cardinality:{name:Fm.cardinality},lookahead:{name:Fm.lookahead},parenthesized:{name:Fm.parenthesized,defaultValue:!1},terminal:{name:Fm.terminal}},superTypes:[to.$type]},Negation:{name:SA.$type,properties:{value:{name:SA.value}},superTypes:[Af.$type]},NumberLiteral:{name:EA.$type,properties:{value:{name:EA.value}},superTypes:[jm.$type]},Parameter:{name:C1.$type,properties:{name:{name:C1.name}},superTypes:[]},ParameterReference:{name:AA.$type,properties:{parameter:{name:AA.parameter,referenceType:C1.$type}},superTypes:[Af.$type]},ParserRule:{name:Wl.$type,properties:{dataType:{name:Wl.dataType},definition:{name:Wl.definition},entry:{name:Wl.entry,defaultValue:!1},fragment:{name:Wl.fragment,defaultValue:!1},inferredType:{name:Wl.inferredType},name:{name:Wl.name},parameters:{name:Wl.parameters,defaultValue:[]},returnType:{name:Wl.returnType,referenceType:Eo.$type}},superTypes:[VT.$type]},ReferenceType:{name:YT.$type,properties:{isMulti:{name:YT.isMulti,defaultValue:!1},referenceType:{name:YT.referenceType}},superTypes:[Um.$type]},RegexToken:{name:Gm.$type,properties:{cardinality:{name:Gm.cardinality},lookahead:{name:Gm.lookahead},parenthesized:{name:Gm.parenthesized,defaultValue:!1},regex:{name:Gm.regex}},superTypes:[to.$type]},ReturnType:{name:RA.$type,properties:{name:{name:RA.name}},superTypes:[]},RuleCall:{name:zm.$type,properties:{arguments:{name:zm.arguments,defaultValue:[]},cardinality:{name:zm.cardinality},predicate:{name:zm.predicate},rule:{name:zm.rule,referenceType:v1.$type}},superTypes:[eo.$type]},SimpleType:{name:k1.$type,properties:{primitiveType:{name:k1.primitiveType},stringType:{name:k1.stringType},typeRef:{name:k1.typeRef,referenceType:Eo.$type}},superTypes:[Um.$type]},StringLiteral:{name:_A.$type,properties:{value:{name:_A.value}},superTypes:[jm.$type]},TerminalAlternatives:{name:Vm.$type,properties:{cardinality:{name:Vm.cardinality},elements:{name:Vm.elements,defaultValue:[]},lookahead:{name:Vm.lookahead},parenthesized:{name:Vm.parenthesized,defaultValue:!1}},superTypes:[to.$type]},TerminalElement:{name:to.$type,properties:{cardinality:{name:to.cardinality},lookahead:{name:to.lookahead},parenthesized:{name:to.parenthesized,defaultValue:!1}},superTypes:[eo.$type]},TerminalGroup:{name:Wm.$type,properties:{cardinality:{name:Wm.cardinality},elements:{name:Wm.elements,defaultValue:[]},lookahead:{name:Wm.lookahead},parenthesized:{name:Wm.parenthesized,defaultValue:!1}},superTypes:[to.$type]},TerminalRule:{name:uh.$type,properties:{definition:{name:uh.definition},fragment:{name:uh.fragment,defaultValue:!1},hidden:{name:uh.hidden,defaultValue:!1},name:{name:uh.name},type:{name:uh.type}},superTypes:[v1.$type]},TerminalRuleCall:{name:qm.$type,properties:{cardinality:{name:qm.cardinality},lookahead:{name:qm.lookahead},parenthesized:{name:qm.parenthesized,defaultValue:!1},rule:{name:qm.rule,referenceType:uh.$type}},superTypes:[to.$type]},Type:{name:jT.$type,properties:{name:{name:jT.name},type:{name:jT.type}},superTypes:[Eo.$type]},TypeAttribute:{name:Hm.$type,properties:{defaultValue:{name:Hm.defaultValue},isOptional:{name:Hm.isOptional,defaultValue:!1},name:{name:Hm.name},type:{name:Hm.type}},superTypes:[]},TypeDefinition:{name:Um.$type,properties:{},superTypes:[]},UnionType:{name:LA.$type,properties:{types:{name:LA.types,defaultValue:[]}},superTypes:[Um.$type]},UnorderedGroup:{name:XT.$type,properties:{cardinality:{name:XT.cardinality},elements:{name:XT.elements,defaultValue:[]}},superTypes:[eo.$type]},UntilToken:{name:Ym.$type,properties:{cardinality:{name:Ym.cardinality},lookahead:{name:Ym.lookahead},parenthesized:{name:Ym.parenthesized,defaultValue:!1},terminal:{name:Ym.terminal}},superTypes:[to.$type]},ValueLiteral:{name:jm.$type,properties:{},superTypes:[]},Wildcard:{name:w1.$type,properties:{cardinality:{name:w1.cardinality},lookahead:{name:w1.lookahead},parenthesized:{name:w1.parenthesized,defaultValue:!1}},superTypes:[to.$type]}}}},br=new nV;s(jTe,"getDatatypeNode");_(jTe,"getDatatypeNode");s(O1,"streamCst");_(O1,"streamCst");s(XTe,"flattenCst");_(XTe,"flattenCst");s(iV,"isChildNode");_(iV,"isChildNode");s(aC,"tokenToRange");_(aC,"tokenToRange");s(B1,"toDocumentSegment");_(B1,"toDocumentSegment");(function(e){e[e.Before=0]="Before",e[e.After=1]="After",e[e.OverlapFront=2]="OverlapFront",e[e.OverlapBack=3]="OverlapBack",e[e.Inside=4]="Inside",e[e.Outside=5]="Outside"})(tu||(tu={}));s(aV,"compareRange");_(aV,"compareRange");s(sV,"inRange");_(sV,"inRange");oV=/^[\w\p{L}]$/u;s(KTe,"findDeclarationNodeAtOffset");_(KTe,"findDeclarationNodeAtOffset");s(lV,"findCommentNode");_(lV,"findCommentNode");s(DA,"isCommentNode");_(DA,"isCommentNode");s(uR,"findLeafNodeAtOffset");_(uR,"findLeafNodeAtOffset");s(cV,"findLeafNodeBeforeOffset");_(cV,"findLeafNodeBeforeOffset");s(uV,"binarySearch");_(uV,"binarySearch");s(hV,"getPreviousNode");_(hV,"getPreviousNode");s(ZTe,"getNextNode");_(ZTe,"getNextNode");s(QTe,"getStartlineNode");_(QTe,"getStartlineNode");s(JTe,"getInteriorNodes");_(JTe,"getInteriorNodes");s(eCe,"getCommonParent");_(eCe,"getCommonParent");s(rG,"getParentChain");_(rG,"getParentChain");dV={};Pf(dV,{findAssignment:s(()=>SV,"findAssignment"),findNameAssignment:s(()=>vR,"findNameAssignment"),findNodeForKeyword:s(()=>wV,"findNodeForKeyword"),findNodeForProperty:s(()=>mR,"findNodeForProperty"),findNodesForKeyword:s(()=>oCe,"findNodesForKeyword"),findNodesForKeywordInternal:s(()=>yR,"findNodesForKeywordInternal"),findNodesForProperty:s(()=>kV,"findNodesForProperty"),getActionAtElement:s(()=>AV,"getActionAtElement"),getActionType:s(()=>_V,"getActionType"),getAllReachableRules:s(()=>pR,"getAllReachableRules"),getAllRulesUsedForCrossReferences:s(()=>sCe,"getAllRulesUsedForCrossReferences"),getCrossReferenceTerminal:s(()=>TV,"getCrossReferenceTerminal"),getEntryRule:s(()=>vV,"getEntryRule"),getExplicitRuleType:s(()=>TC,"getExplicitRuleType"),getHiddenRules:s(()=>xV,"getHiddenRules"),getRuleType:s(()=>LV,"getRuleType"),getRuleTypeName:s(()=>dCe,"getRuleTypeName"),getTypeName:s(()=>ug,"getTypeName"),isArrayCardinality:s(()=>cCe,"isArrayCardinality"),isArrayOperator:s(()=>uCe,"isArrayOperator"),isCommentTerminal:s(()=>CV,"isCommentTerminal"),isDataType:s(()=>hCe,"isDataType"),isDataTypeRule:s(()=>bC,"isDataTypeRule"),isOptionalCardinality:s(()=>lCe,"isOptionalCardinality"),terminalRegex:s(()=>CC,"terminalRegex")});hR=class extends Error{static{s(this,"ErrorWithLocation")}static{_(this,"ErrorWithLocation")}constructor(e,t){super(e?`${t} at ${e.range.start.line}:${e.range.start.character}`:t)}};s(Of,"assertUnreachable");_(Of,"assertUnreachable");s(fV,"assertCondition");_(fV,"assertCondition");pV={};Pf(pV,{NEWLINE_REGEXP:s(()=>rCe,"NEWLINE_REGEXP"),escapeRegExp:s(()=>W1,"escapeRegExp"),getTerminalParts:s(()=>iCe,"getTerminalParts"),isMultilineComment:s(()=>mV,"isMultilineComment"),isWhitespace:s(()=>fR,"isWhitespace"),partialMatches:s(()=>gV,"partialMatches"),partialRegExp:s(()=>yV,"partialRegExp"),whitespaceCharacters:s(()=>aCe,"whitespaceCharacters")});s(_r,"cc");_(_r,"cc");s(Y5,"insertToSet");_(Y5,"insertToSet");s(f1,"addFlag");_(f1,"addFlag");s(Lm,"ASSERT_EXISTS");_(Lm,"ASSERT_EXISTS");s(BT,"ASSERT_NEVER_REACH_HERE");_(BT,"ASSERT_NEVER_REACH_HERE");s(nG,"isCharacter");_(nG,"isCharacter");IA=[];for(let e=_r("0");e<=_r("9");e++)IA.push(e);MA=[_r("_")].concat(IA);for(let e=_r("a");e<=_r("z");e++)MA.push(e);for(let e=_r("A");e<=_r("Z");e++)MA.push(e);u2e=[_r(" "),_r("\f"),_r(` +`),_r("\r"),_r(" "),_r("\v"),_r(" "),_r("\xA0"),_r("\u1680"),_r("\u2000"),_r("\u2001"),_r("\u2002"),_r("\u2003"),_r("\u2004"),_r("\u2005"),_r("\u2006"),_r("\u2007"),_r("\u2008"),_r("\u2009"),_r("\u200A"),_r("\u2028"),_r("\u2029"),_r("\u202F"),_r("\u205F"),_r("\u3000"),_r("\uFEFF")],adt=/[0-9a-fA-F]/,C5=/[0-9]/,sdt=/[1-9]/,tCe=class{static{s(this,"RegExpParser")}static{_(this,"RegExpParser")}constructor(){this.idx=0,this.input="",this.groupIdx=0}saveState(){return{idx:this.idx,input:this.input,groupIdx:this.groupIdx}}restoreState(e){this.idx=e.idx,this.input=e.input,this.groupIdx=e.groupIdx}pattern(e){this.idx=0,this.input=e,this.groupIdx=0,this.consumeChar("/");let t=this.disjunction();this.consumeChar("/");let r={type:"Flags",loc:{begin:this.idx,end:e.length},global:!1,ignoreCase:!1,multiLine:!1,unicode:!1,sticky:!1};for(;this.isRegExpFlag();)switch(this.popChar()){case"g":f1(r,"global");break;case"i":f1(r,"ignoreCase");break;case"m":f1(r,"multiLine");break;case"u":f1(r,"unicode");break;case"y":f1(r,"sticky");break}if(this.idx!==this.input.length)throw Error("Redundant input: "+this.input.substring(this.idx));return{type:"Pattern",flags:r,value:t,loc:this.loc(0)}}disjunction(){let e=[],t=this.idx;for(e.push(this.alternative());this.peekChar()==="|";)this.consumeChar("|"),e.push(this.alternative());return{type:"Disjunction",value:e,loc:this.loc(t)}}alternative(){let e=[],t=this.idx;for(;this.isTerm();)e.push(this.term());return{type:"Alternative",value:e,loc:this.loc(t)}}term(){return this.isAssertion()?this.assertion():this.atom()}assertion(){let e=this.idx;switch(this.popChar()){case"^":return{type:"StartAnchor",loc:this.loc(e)};case"$":return{type:"EndAnchor",loc:this.loc(e)};case"\\":switch(this.popChar()){case"b":return{type:"WordBoundary",loc:this.loc(e)};case"B":return{type:"NonWordBoundary",loc:this.loc(e)}}throw Error("Invalid Assertion Escape");case"(":this.consumeChar("?");let t;switch(this.popChar()){case"=":t="Lookahead";break;case"!":t="NegativeLookahead";break;case"<":{switch(this.popChar()){case"=":t="Lookbehind";break;case"!":t="NegativeLookbehind"}break}}Lm(t);let r=this.disjunction();return this.consumeChar(")"),{type:t,value:r,loc:this.loc(e)}}return BT()}quantifier(e=!1){let t,r=this.idx;switch(this.popChar()){case"*":t={atLeast:0,atMost:1/0};break;case"+":t={atLeast:1,atMost:1/0};break;case"?":t={atLeast:0,atMost:1};break;case"{":let n=this.integerIncludingZero();switch(this.popChar()){case"}":t={atLeast:n,atMost:n};break;case",":let i;this.isDigit()?(i=this.integerIncludingZero(),t={atLeast:n,atMost:i}):t={atLeast:n,atMost:1/0},this.consumeChar("}");break}if(e===!0&&t===void 0)return;Lm(t);break}if(!(e===!0&&t===void 0)&&Lm(t))return this.peekChar(0)==="?"?(this.consumeChar("?"),t.greedy=!1):t.greedy=!0,t.type="Quantifier",t.loc=this.loc(r),t}atom(){let e,t=this.idx;switch(this.peekChar()){case".":e=this.dotAll();break;case"\\":e=this.atomEscape();break;case"[":e=this.characterClass();break;case"(":e=this.group();break}return e===void 0&&this.isPatternCharacter()&&(e=this.patternCharacter()),Lm(e)?(e.loc=this.loc(t),this.isQuantifier()&&(e.quantifier=this.quantifier()),e):BT()}dotAll(){return this.consumeChar("."),{type:"Set",complement:!0,value:[_r(` +`),_r("\r"),_r("\u2028"),_r("\u2029")]}}atomEscape(){switch(this.consumeChar("\\"),this.peekChar()){case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":return this.decimalEscapeAtom();case"d":case"D":case"s":case"S":case"w":case"W":return this.characterClassEscape();case"f":case"n":case"r":case"t":case"v":return this.controlEscapeAtom();case"c":return this.controlLetterEscapeAtom();case"0":return this.nulCharacterAtom();case"x":return this.hexEscapeSequenceAtom();case"u":return this.regExpUnicodeEscapeSequenceAtom();default:return this.identityEscapeAtom()}}decimalEscapeAtom(){return{type:"GroupBackReference",value:this.positiveInteger()}}characterClassEscape(){let e,t=!1;switch(this.popChar()){case"d":e=IA;break;case"D":e=IA,t=!0;break;case"s":e=u2e;break;case"S":e=u2e,t=!0;break;case"w":e=MA;break;case"W":e=MA,t=!0;break}return Lm(e)?{type:"Set",value:e,complement:t}:BT()}controlEscapeAtom(){let e;switch(this.popChar()){case"f":e=_r("\f");break;case"n":e=_r(` +`);break;case"r":e=_r("\r");break;case"t":e=_r(" ");break;case"v":e=_r("\v");break}return Lm(e)?{type:"Character",value:e}:BT()}controlLetterEscapeAtom(){this.consumeChar("c");let e=this.popChar();if(/[a-zA-Z]/.test(e)===!1)throw Error("Invalid ");return{type:"Character",value:e.toUpperCase().charCodeAt(0)-64}}nulCharacterAtom(){return this.consumeChar("0"),{type:"Character",value:_r("\0")}}hexEscapeSequenceAtom(){return this.consumeChar("x"),this.parseHexDigits(2)}regExpUnicodeEscapeSequenceAtom(){return this.consumeChar("u"),this.parseHexDigits(4)}identityEscapeAtom(){let e=this.popChar();return{type:"Character",value:_r(e)}}classPatternCharacterAtom(){switch(this.peekChar()){case` +`:case"\r":case"\u2028":case"\u2029":case"\\":case"]":throw Error("TBD");default:let e=this.popChar();return{type:"Character",value:_r(e)}}}characterClass(){let e=[],t=!1;for(this.consumeChar("["),this.peekChar(0)==="^"&&(this.consumeChar("^"),t=!0);this.isClassAtom();){let r=this.classAtom(),n=r.type==="Character";if(nG(r)&&this.isRangeDash()){this.consumeChar("-");let i=this.classAtom(),a=i.type==="Character";if(nG(i)){if(i.value=this.input.length)throw Error("Unexpected end of input");this.idx++}loc(e){return{begin:e,end:this.idx}}},dR=class{static{s(this,"BaseRegExpVisitor")}static{_(this,"BaseRegExpVisitor")}visitChildren(e){for(let t in e){let r=e[t];e.hasOwnProperty(t)&&(r.type!==void 0?this.visit(r):Array.isArray(r)&&r.forEach(n=>{this.visit(n)},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"Lookbehind":this.visitLookbehind(e);break;case"NegativeLookbehind":this.visitNegativeLookbehind(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){}visitLookbehind(e){}visitNegativeLookbehind(e){}visitCharacter(e){}visitSet(e){}visitGroup(e){}visitGroupBackReference(e){}visitQuantifier(e){}},rCe=/\r?\n/gm,nCe=new tCe,odt=class extends dR{static{s(this,"TerminalRegExpVisitor")}static{_(this,"TerminalRegExpVisitor")}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){let t=String.fromCharCode(e.value);if(!this.multiline&&t===` +`&&(this.multiline=!0),e.quantifier)this.isStarting=!1,this.endRegexpStack=[];else{let r=W1(t);this.endRegexpStack.push(r),this.isStarting&&(this.startRegexp+=r)}}visitSet(e){if(!this.multiline){let t=this.regex.substring(e.loc.begin,e.loc.end),r=new RegExp(t);this.multiline=!!` +`.match(r)}if(e.quantifier)this.isStarting=!1,this.endRegexpStack=[];else{let t=this.regex.substring(e.loc.begin,e.loc.end);this.endRegexpStack.push(t),this.isStarting&&(this.startRegexp+=t)}}visitChildren(e){e.type==="Group"&&e.quantifier||super.visitChildren(e)}},ig=new odt;s(iCe,"getTerminalParts");_(iCe,"getTerminalParts");s(mV,"isMultilineComment");_(mV,"isMultilineComment");aCe=`\f +\r \v \xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF`.split("");s(fR,"isWhitespace");_(fR,"isWhitespace");s(W1,"escapeRegExp");_(W1,"escapeRegExp");s(gV,"partialMatches");_(gV,"partialMatches");s(yV,"partialRegExp");_(yV,"partialRegExp");s(vV,"getEntryRule");_(vV,"getEntryRule");s(xV,"getHiddenRules");_(xV,"getHiddenRules");s(pR,"getAllReachableRules");_(pR,"getAllReachableRules");s(bV,"ruleDfs");_(bV,"ruleDfs");s(sCe,"getAllRulesUsedForCrossReferences");_(sCe,"getAllRulesUsedForCrossReferences");s(TV,"getCrossReferenceTerminal");_(TV,"getCrossReferenceTerminal");s(CV,"isCommentTerminal");_(CV,"isCommentTerminal");s(kV,"findNodesForProperty");_(kV,"findNodesForProperty");s(mR,"findNodeForProperty");_(mR,"findNodeForProperty");s(gR,"findNodesForPropertyInternal");_(gR,"findNodesForPropertyInternal");s(oCe,"findNodesForKeyword");_(oCe,"findNodesForKeyword");s(wV,"findNodeForKeyword");_(wV,"findNodeForKeyword");s(yR,"findNodesForKeywordInternal");_(yR,"findNodesForKeywordInternal");s(SV,"findAssignment");_(SV,"findAssignment");s(vR,"findNameAssignment");_(vR,"findNameAssignment");s(EV,"findNameAssignmentInternal");_(EV,"findNameAssignmentInternal");s(AV,"getActionAtElement");_(AV,"getActionAtElement");s(lCe,"isOptionalCardinality");_(lCe,"isOptionalCardinality");s(cCe,"isArrayCardinality");_(cCe,"isArrayCardinality");s(uCe,"isArrayOperator");_(uCe,"isArrayOperator");s(bC,"isDataTypeRule");_(bC,"isDataTypeRule");s(RV,"isDataTypeRuleInternal");_(RV,"isDataTypeRuleInternal");s(hCe,"isDataType");_(hCe,"isDataType");s(NA,"isDataTypeInternal");_(NA,"isDataTypeInternal");s(TC,"getExplicitRuleType");_(TC,"getExplicitRuleType");s(ug,"getTypeName");_(ug,"getTypeName");s(_V,"getActionType");_(_V,"getActionType");s(dCe,"getRuleTypeName");_(dCe,"getRuleTypeName");s(LV,"getRuleType");_(LV,"getRuleType");s(CC,"terminalRegex");_(CC,"terminalRegex");DV=/[\s\S]/.source;s(xg,"abstractElementToRegex");_(xg,"abstractElementToRegex");s(fCe,"terminalAlternativesToRegex");_(fCe,"terminalAlternativesToRegex");s(pCe,"terminalGroupToRegex");_(pCe,"terminalGroupToRegex");s(mCe,"untilTokenToRegex");_(mCe,"untilTokenToRegex");s(gCe,"negateTokenToRegex");_(gCe,"negateTokenToRegex");s(yCe,"characterRangeToRegex");_(yCe,"characterRangeToRegex");s(j5,"keywordToRegex");_(j5,"keywordToRegex");s(au,"withCardinality");_(au,"withCardinality");s(IV,"createGrammarConfig");_(IV,"createGrammarConfig");s(PA,"PRINT_ERROR");_(PA,"PRINT_ERROR");s(MV,"PRINT_WARNING");_(MV,"PRINT_WARNING");s(NV,"timer");_(NV,"timer");s(PV,"toFastProperties");_(PV,"toFastProperties");s(vCe,"tokenLabel");_(vCe,"tokenLabel");s(xCe,"hasTokenLabel");_(xCe,"hasTokenLabel");ou=class{static{s(this,"AbstractProduction")}static{_(this,"AbstractProduction")}get definition(){return this._definition}set definition(e){this._definition=e}constructor(e){this._definition=e}accept(e){e.visit(this),this.definition.forEach(t=>{t.accept(e)})}},Es=class extends ou{static{s(this,"NonTerminal")}static{_(this,"NonTerminal")}constructor(e){super([]),this.idx=1,Object.assign(this,Xl(e))}set definition(e){}get definition(){return this.referencedRule!==void 0?this.referencedRule.definition:[]}accept(e){e.visit(this)}},q1=class extends ou{static{s(this,"Rule")}static{_(this,"Rule")}constructor(e){super(e.definition),this.orgText="",Object.assign(this,Xl(e))}},ro=class extends ou{static{s(this,"Alternative")}static{_(this,"Alternative")}constructor(e){super(e.definition),this.ignoreAmbiguities=!1,Object.assign(this,Xl(e))}},Na=class extends ou{static{s(this,"Option")}static{_(this,"Option")}constructor(e){super(e.definition),this.idx=1,Object.assign(this,Xl(e))}},Ro=class extends ou{static{s(this,"RepetitionMandatory")}static{_(this,"RepetitionMandatory")}constructor(e){super(e.definition),this.idx=1,Object.assign(this,Xl(e))}},_o=class extends ou{static{s(this,"RepetitionMandatoryWithSeparator")}static{_(this,"RepetitionMandatoryWithSeparator")}constructor(e){super(e.definition),this.idx=1,Object.assign(this,Xl(e))}},wi=class extends ou{static{s(this,"Repetition")}static{_(this,"Repetition")}constructor(e){super(e.definition),this.idx=1,Object.assign(this,Xl(e))}},no=class extends ou{static{s(this,"RepetitionWithSeparator")}static{_(this,"RepetitionWithSeparator")}constructor(e){super(e.definition),this.idx=1,Object.assign(this,Xl(e))}},io=class extends ou{static{s(this,"Alternation")}static{_(this,"Alternation")}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,Object.assign(this,Xl(e))}},Jn=class{static{s(this,"Terminal")}static{_(this,"Terminal")}constructor(e){this.idx=1,Object.assign(this,Xl(e))}accept(e){e.visit(this)}};s(bCe,"serializeGrammar");_(bCe,"serializeGrammar");s(KT,"serializeProduction");_(KT,"serializeProduction");s(Xl,"pickOnlyDefined");_(Xl,"pickOnlyDefined");H1=class{static{s(this,"GAstVisitor")}static{_(this,"GAstVisitor")}visit(e){let t=e;switch(t.constructor){case Es:return this.visitNonTerminal(t);case ro:return this.visitAlternative(t);case Na:return this.visitOption(t);case Ro:return this.visitRepetitionMandatory(t);case _o:return this.visitRepetitionMandatoryWithSeparator(t);case no:return this.visitRepetitionWithSeparator(t);case wi:return this.visitRepetition(t);case io:return this.visitAlternation(t);case Jn:return this.visitTerminal(t);case q1:return this.visitRule(t);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){}};s(TCe,"isSequenceProd");_(TCe,"isSequenceProd");s(sC,"isOptionalProd");_(sC,"isOptionalProd");s(CCe,"isBranchingProd");_(CCe,"isBranchingProd");s(Hl,"getProductionDslName");_(Hl,"getProductionDslName");xR=class{static{s(this,"RestWalker")}static{_(this,"RestWalker")}walk(e,t=[]){e.definition.forEach((r,n)=>{let i=e.definition.slice(n+1);if(r instanceof Es)this.walkProdRef(r,i,t);else if(r instanceof Jn)this.walkTerminal(r,i,t);else if(r instanceof ro)this.walkFlat(r,i,t);else if(r instanceof Na)this.walkOption(r,i,t);else if(r instanceof Ro)this.walkAtLeastOne(r,i,t);else if(r instanceof _o)this.walkAtLeastOneSep(r,i,t);else if(r instanceof no)this.walkManySep(r,i,t);else if(r instanceof wi)this.walkMany(r,i,t);else if(r instanceof io)this.walkOr(r,i,t);else throw Error("non exhaustive match")})}walkTerminal(e,t,r){}walkProdRef(e,t,r){}walkFlat(e,t,r){let n=t.concat(r);this.walk(e,n)}walkOption(e,t,r){let n=t.concat(r);this.walk(e,n)}walkAtLeastOne(e,t,r){let n=[new Na({definition:e.definition})].concat(t,r);this.walk(e,n)}walkAtLeastOneSep(e,t,r){let n=iG(e,t,r);this.walk(e,n)}walkMany(e,t,r){let n=[new Na({definition:e.definition})].concat(t,r);this.walk(e,n)}walkManySep(e,t,r){let n=iG(e,t,r);this.walk(e,n)}walkOr(e,t,r){let n=t.concat(r);e.definition.forEach(i=>{let a=new ro({definition:[i]});this.walk(a,n)})}};s(iG,"restForRepetitionWithSeparator");_(iG,"restForRepetitionWithSeparator");s(U1,"first");_(U1,"first");s(kCe,"firstForSequence");_(kCe,"firstForSequence");s(wCe,"firstForBranching");_(wCe,"firstForBranching");s(SCe,"firstForTerminal");_(SCe,"firstForTerminal");ECe="_~IN~_",ldt=class extends xR{static{s(this,"ResyncFollowsWalker")}static{_(this,"ResyncFollowsWalker")}constructor(e){super(),this.topProd=e,this.follows={}}startWalking(){return this.walk(this.topProd),this.follows}walkTerminal(e,t,r){}walkProdRef(e,t,r){let n=RCe(e.referencedRule,e.idx)+this.topProd.name,i=t.concat(r),a=new ro({definition:i}),o=U1(a);this.follows[n]=o}};s(ACe,"computeAllProdsFollows");_(ACe,"computeAllProdsFollows");s(RCe,"buildBetweenProdsFollowPrefix");_(RCe,"buildBetweenProdsFollowPrefix");X5={},cdt=new tCe;s(kC,"getRegExpAst");_(kC,"getRegExpAst");s(_Ce,"clearRegExpParserCache");_(_Ce,"clearRegExpParserCache");LCe="Complement Sets are not supported for first char optimization",OA=`Unable to use "first char" lexer optimizations: +`;s(DCe,"getOptimizedStartCodesIndices");_(DCe,"getOptimizedStartCodesIndices");s(BA,"firstCharOptimizedIndices");_(BA,"firstCharOptimizedIndices");s($T,"addOptimizedIdxToResult");_($T,"addOptimizedIdxToResult");s(ICe,"handleIgnoreCase");_(ICe,"handleIgnoreCase");s(aG,"findCode");_(aG,"findCode");s($A,"isWholeOptional");_($A,"isWholeOptional");udt=class extends dR{static{s(this,"CharCodeFinder")}static{_(this,"CharCodeFinder")}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;case"Lookbehind":this.visitLookbehind(e);return;case"NegativeLookbehind":this.visitNegativeLookbehind(e);return}super.visitChildren(e)}}visitCharacter(e){this.targetCharCodes.includes(e.value)&&(this.found=!0)}visitSet(e){e.complement?aG(e,this.targetCharCodes)===void 0&&(this.found=!0):aG(e,this.targetCharCodes)!==void 0&&(this.found=!0)}};s(bR,"canMatchCharCode");_(bR,"canMatchCharCode");hg="PATTERN",FT="defaultMode",k5="modes";s(MCe,"analyzeTokenTypes");_(MCe,"analyzeTokenTypes");s(NCe,"validatePatterns");_(NCe,"validatePatterns");s(PCe,"validateRegExpPattern");_(PCe,"validateRegExpPattern");s(OCe,"findMissingPatterns");_(OCe,"findMissingPatterns");s(BCe,"findInvalidPatterns");_(BCe,"findInvalidPatterns");hdt=/[^\\][$]/;s($Ce,"findEndOfInputAnchor");_($Ce,"findEndOfInputAnchor");s(FCe,"findEmptyMatchRegExps");_(FCe,"findEmptyMatchRegExps");ddt=/[^\\[][\^]|^\^/;s(GCe,"findStartOfInputAnchor");_(GCe,"findStartOfInputAnchor");s(zCe,"findUnsupportedFlags");_(zCe,"findUnsupportedFlags");s(VCe,"findDuplicatePatterns");_(VCe,"findDuplicatePatterns");s(WCe,"findInvalidGroupType");_(WCe,"findInvalidGroupType");s(qCe,"findModesThatDoNotExist");_(qCe,"findModesThatDoNotExist");s(HCe,"findUnreachablePatterns");_(HCe,"findUnreachablePatterns");s(UCe,"tryToMatchStrToPattern");_(UCe,"tryToMatchStrToPattern");s(YCe,"noMetaChar");_(YCe,"noMetaChar");s(jCe,"usesLookAheadOrBehind");_(jCe,"usesLookAheadOrBehind");s(sG,"addStickyFlag");_(sG,"addStickyFlag");s(XCe,"performRuntimeChecks");_(XCe,"performRuntimeChecks");s(KCe,"performWarningRuntimeChecks");_(KCe,"performWarningRuntimeChecks");s(ZCe,"cloneEmptyGroups");_(ZCe,"cloneEmptyGroups");s(OV,"isCustomPattern");_(OV,"isCustomPattern");s(QCe,"isShortPattern");_(QCe,"isShortPattern");fdt={test:_(function(e){let t=e.length;for(let r=this.lastIndex;r${e.image}<- The Mode Stack is empty`},buildUnexpectedCharactersMessage(e,t,r,n,i,a){return`unexpected character: ->${e.charAt(t)}<- at offset: ${t}, skipped ${r} characters.`}};(function(e){e[e.MISSING_PATTERN=0]="MISSING_PATTERN",e[e.INVALID_PATTERN=1]="INVALID_PATTERN",e[e.EOI_ANCHOR_FOUND=2]="EOI_ANCHOR_FOUND",e[e.UNSUPPORTED_FLAGS_FOUND=3]="UNSUPPORTED_FLAGS_FOUND",e[e.DUPLICATE_PATTERNS_FOUND=4]="DUPLICATE_PATTERNS_FOUND",e[e.INVALID_GROUP_TYPE_FOUND=5]="INVALID_GROUP_TYPE_FOUND",e[e.PUSH_MODE_DOES_NOT_EXIST=6]="PUSH_MODE_DOES_NOT_EXIST",e[e.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE=7]="MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE",e[e.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY=8]="MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY",e[e.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST=9]="MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST",e[e.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED=10]="LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED",e[e.SOI_ANCHOR_FOUND=11]="SOI_ANCHOR_FOUND",e[e.EMPTY_MATCH_PATTERN=12]="EMPTY_MATCH_PATTERN",e[e.NO_LINE_BREAKS_FLAGS=13]="NO_LINE_BREAKS_FLAGS",e[e.UNREACHABLE_PATTERN=14]="UNREACHABLE_PATTERN",e[e.IDENTIFY_TERMINATOR=15]="IDENTIFY_TERMINATOR",e[e.CUSTOM_LINE_BREAK=16]="CUSTOM_LINE_BREAK",e[e.MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE=17]="MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE"})(Si||(Si={}));zT={deferDefinitionErrorsHandling:!1,positionTracking:"full",lineTerminatorsPattern:/\n|\r\n?/g,lineTerminatorCharacters:[` +`,"\r"],ensureOptimizations:!1,safeMode:!1,errorMessageProvider:lG,traceInitPerf:!1,skipValidations:!1,recoveryEnabled:!0};Object.freeze(zT);ws=class{static{s(this,"Lexer")}static{_(this,"Lexer")}constructor(e,t=zT){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=(n,i)=>{if(this.traceInitPerf===!0){this.traceInitIndent++;let a=new Array(this.traceInitIndent+1).join(" ");this.traceInitIndent <${n}>`);let{time:o,value:l}=NV(i),u=o>10?console.warn:console.log;return this.traceInitIndent time: ${o}ms`),this.traceInitIndent--,l}else return i()},typeof t=="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=Object.assign({},zT,t);let 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 n,i=!0;this.TRACE_INIT("Lexer Config handling",()=>{if(this.config.lineTerminatorsPattern===zT.lineTerminatorsPattern)this.config.lineTerminatorsPattern=fdt;else if(this.config.lineTerminatorCharacters===zT.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(t.safeMode&&t.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),Array.isArray(e)?n={modes:{defaultMode:[...e]},defaultMode:FT}:(i=!1,n=Object.assign({},e))}),this.config.skipValidations===!1&&(this.TRACE_INIT("performRuntimeChecks",()=>{this.lexerDefinitionErrors=this.lexerDefinitionErrors.concat(XCe(n,this.trackStartLines,this.config.lineTerminatorCharacters))}),this.TRACE_INIT("performWarningRuntimeChecks",()=>{this.lexerDefinitionWarning=this.lexerDefinitionWarning.concat(KCe(n,this.trackStartLines,this.config.lineTerminatorCharacters))})),n.modes=n.modes?n.modes:{},Object.entries(n.modes).forEach(([o,l])=>{n.modes[o]=l.filter(u=>u!==void 0)});let a=Object.keys(n.modes);if(Object.entries(n.modes).forEach(([o,l])=>{this.TRACE_INIT(`Mode: <${o}> processing`,()=>{if(this.modes.push(o),this.config.skipValidations===!1&&this.TRACE_INIT("validatePatterns",()=>{this.lexerDefinitionErrors=this.lexerDefinitionErrors.concat(NCe(l,a))}),this.lexerDefinitionErrors.length===0){j1(l);let u;this.TRACE_INIT("analyzeTokenTypes",()=>{u=MCe(l,{lineTerminatorCharacters:this.config.lineTerminatorCharacters,positionTracking:t.positionTracking,ensureOptimizations:t.ensureOptimizations,safeMode:t.safeMode,tracer:this.TRACE_INIT})}),this.patternIdxToConfig[o]=u.patternIdxToConfig,this.charCodeToPatternIdxToConfig[o]=u.charCodeToPatternIdxToConfig,this.emptyGroups=Object.assign({},this.emptyGroups,u.emptyGroups),this.hasCustom=u.hasCustom||this.hasCustom,this.canModeBeOptimized[o]=u.canBeOptimized}})}),this.defaultMode=n.defaultMode,this.lexerDefinitionErrors.length>0&&!this.config.deferDefinitionErrorsHandling){let l=this.lexerDefinitionErrors.map(u=>u.message).join(`----------------------- +`);throw new Error(`Errors detected in definition of Lexer: +`+l)}this.lexerDefinitionWarning.forEach(o=>{MV(o.message)}),this.TRACE_INIT("Choosing sub-methods implementations",()=>{if(i&&(this.handleModes=()=>{}),this.trackStartLines===!1&&(this.computeNewColumn=o=>o),this.trackEndLines===!1&&(this.updateTokenEndLineColumnLocation=()=>{}),/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",()=>{let o=Object.entries(this.canModeBeOptimized).reduce((l,[u,h])=>(h===!1&&l.push(u),l),[]);if(t.ensureOptimizations&&o.length>0)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",()=>{_Ce()}),this.TRACE_INIT("toFastProperties",()=>{PV(this)})})}tokenize(e,t=this.defaultMode){if(this.lexerDefinitionErrors.length>0){let n=this.lexerDefinitionErrors.map(i=>i.message).join(`----------------------- +`);throw new Error(`Unable to Tokenize because Errors detected in definition of Lexer: +`+n)}return this.tokenizeInternal(e,t)}tokenizeInternal(e,t){let r,n,i,a,o,l,u,h,d,f,p,m,g,y,v,x=e,b=x.length,T=0,w=0,C=this.hasCustom?0:Math.floor(e.length/10),k=new Array(C),S=[],A=this.trackStartLines?1:void 0,M=this.trackStartLines?1:void 0,N=ZCe(this.emptyGroups),D=this.trackStartLines,R=this.config.lineTerminatorsPattern,E=0,I=[],L=[],P=[],B=[];Object.freeze(B);let O=!1,$=_(W=>{if(P.length===1&&W.tokenType.PUSH_MODE===void 0){let H=this.config.errorMessageProvider.buildUnableToPopLexerModeMessage(W);S.push({offset:W.startOffset,line:W.startLine,column:W.startColumn,length:W.image.length,message:H})}else{P.pop();let H=P.at(-1);I=this.patternIdxToConfig[H],L=this.charCodeToPatternIdxToConfig[H],E=I.length;let j=this.canModeBeOptimized[H]&&this.config.safeMode===!1;L&&j?O=!0:O=!1}},"pop_mode");function G(W){P.push(W),L=this.charCodeToPatternIdxToConfig[W],I=this.patternIdxToConfig[W],E=I.length,E=I.length;let H=this.canModeBeOptimized[W]&&this.config.safeMode===!1;L&&H?O=!0:O=!1}s(G,"push_mode"),_(G,"push_mode"),G.call(this,t);let V,z=this.config.recoveryEnabled;for(;Tl.length){l=a,d=a.length,u=h,V=J;break}}}break}}if(d!==-1){if(f=V.group,f!==void 0&&(l=l!==null?l:e.substring(T,T+d),p=V.tokenTypeIdx,m=this.createTokenInstance(l,T,p,V.tokenType,A,M,d),this.handlePayload(m,u),f===!1?w=this.addToken(k,w,m):N[f].push(m)),D===!0&&V.canLineTerminator===!0){let Q=0,U,ue;R.lastIndex=0;do l=l!==null?l:e.substring(T,T+d),U=R.test(l),U===!0&&(ue=R.lastIndex-1,Q++);while(U===!0);Q!==0?(A=A+Q,M=d-ue,this.updateTokenEndLineColumnLocation(m,f,ue,Q,A,M,d)):M=this.computeNewColumn(M,d)}else M=this.computeNewColumn(M,d);T=T+d,this.handleModes(V,$,G,m)}else{let Q=T,U=A,ue=M,J=z===!1;for(;J===!1&&T ${lg(e)} <--`:`token of type --> ${e.name} <--`} but found --> '${t.image}' <--`},buildNotAllInputParsedMessage({firstRedundant:e,ruleName:t}){return"Redundant input, expecting EOF but found: "+e.image},buildNoViableAltMessage({expectedPathsPerAlt:e,actual:t,previous:r,customUserDescription:n,ruleName:i}){let a="Expecting: ",l=` +but found: '`+t[0].image+"'";if(n)return a+n+l;{let f=`one of these possible Token sequences: +${e.reduce((p,m)=>p.concat(m),[]).map(p=>`[${p.map(m=>lg(m)).join(", ")}]`).map((p,m)=>` ${m+1}. ${p}`).join(` +`)}`;return a+f+l}},buildEarlyExitMessage({expectedIterationPaths:e,actual:t,customUserDescription:r,ruleName:n}){let i="Expecting: ",o=` +but found: '`+t[0].image+"'";if(r)return i+r+o;{let u=`expecting at least one iteration which starts with one of these possible Token sequences:: + <${e.map(h=>`[${h.map(d=>lg(d)).join(",")}]`).join(" ,")}>`;return i+u+o}}};Object.freeze(S1);mdt={buildRuleNotFoundError(e,t){return"Invalid grammar, reference to a rule which is not defined: ->"+t.nonTerminalName+`<- +inside top level rule: ->`+e.name+"<-"}},ag={buildDuplicateFoundError(e,t){function r(d){return d instanceof Jn?d.terminalType.name:d instanceof Es?d.nonTerminalName:""}s(r,"getExtraProductionArgument2"),_(r,"getExtraProductionArgument");let n=e.name,i=t[0],a=i.idx,o=Hl(i),l=r(i),u=a>0,h=`->${o}${u?a:""}<- ${l?`with argument: ->${l}<-`:""} + appears more than once (${t.length} times) in the top level rule: ->${n}<-. + For further details see: https://chevrotain.io/docs/FAQ.html#NUMERICAL_SUFFIXES + `;return h=h.replace(/[ \t]+/g," "),h=h.replace(/\s\s+/g,` +`),h},buildNamespaceConflictError(e){return`Namespace conflict found in grammar. +The grammar has both a Terminal(Token) and a Non-Terminal(Rule) named: <${e.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(e){let t=e.prefixPath.map(i=>lg(i)).join(", "),r=e.alternation.idx===0?"":e.alternation.idx;return`Ambiguous alternatives: <${e.ambiguityIndices.join(" ,")}> due to common lookahead prefix +in inside <${e.topLevelRule.name}> Rule, +<${t}> 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(e){let t=e.alternation.idx===0?"":e.alternation.idx,r=e.prefixPath.length===0,n=`Ambiguous Alternatives Detected: <${e.ambiguityIndices.join(" ,")}> in inside <${e.topLevelRule.name}> Rule, +`;if(r)n+=`These alternatives are all empty (match no tokens), making them indistinguishable. +Only the last alternative may be empty. +`;else{let i=e.prefixPath.map(a=>lg(a)).join(", ");n+=`<${i}> may appears as a prefix path in all these alternatives. +`}return n+=`See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#AMBIGUOUS_ALTERNATIVES +For Further details.`,n},buildEmptyRepetitionError(e){let t=Hl(e.repetition);return e.repetition.idx!==0&&(t+=e.repetition.idx),`The repetition <${t}> within Rule <${e.topLevelRule.name}> can never consume any tokens. +This could lead to an infinite loop.`},buildTokenNameError(e){return"deprecated"},buildEmptyAlternationError(e){return`Ambiguous empty alternative: <${e.emptyChoiceIdx+1}> in inside <${e.topLevelRule.name}> Rule. +Only the last alternative may be an empty alternative.`},buildTooManyAlternativesError(e){return`An Alternation cannot have more than 256 alternatives: + inside <${e.topLevelRule.name}> Rule. + has ${e.alternation.definition.length+1} alternatives.`},buildLeftRecursionError(e){let t=e.topLevelRule.name,r=e.leftRecursionPath.map(a=>a.name),n=`${t} --> ${r.concat([t]).join(" --> ")}`;return`Left Recursion found in grammar. +rule: <${t}> can be invoked from itself (directly or indirectly) +without consuming any Tokens. The grammar path that causes this is: + ${n} + To fix this refactor your grammar to remove the left recursion. +see: https://en.wikipedia.org/wiki/LL_parser#Left_factoring.`},buildInvalidRuleNameError(e){return"deprecated"},buildDuplicateRuleNameError(e){let t;return e.topLevelRule instanceof q1?t=e.topLevelRule.name:t=e.topLevelRule,`Duplicate definition, rule: ->${t}<- is already defined in the grammar: ->${e.grammarName}<-`}};s(uke,"resolveGrammar");_(uke,"resolveGrammar");gdt=class extends H1{static{s(this,"GastRefResolverVisitor")}static{_(this,"GastRefResolverVisitor")}constructor(e,t){super(),this.nameToTopRule=e,this.errMsgProvider=t,this.errors=[]}resolveRefs(){Object.values(this.nameToTopRule).forEach(e=>{this.currTopLevel=e,e.accept(this)})}visitNonTerminal(e){let t=this.nameToTopRule[e.nonTerminalName];if(t)e.referencedRule=t;else{let r=this.errMsgProvider.buildRuleNotFoundError(this.currTopLevel,e);this.errors.push({message:r,type:As.UNRESOLVED_SUBRULE_REF,ruleName:this.currTopLevel.name,unresolvedRefName:e.nonTerminalName})}}},ydt=class extends xR{static{s(this,"AbstractNextPossibleTokensWalker")}static{_(this,"AbstractNextPossibleTokensWalker")}constructor(e,t){super(),this.topProd=e,this.path=t,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=[...this.path.ruleStack].reverse(),this.occurrenceStack=[...this.path.occurrenceStack].reverse(),this.ruleStack.pop(),this.occurrenceStack.pop(),this.updateExpectedNext(),this.walk(this.topProd),this.possibleTokTypes}walk(e,t=[]){this.found||super.walk(e,t)}walkProdRef(e,t,r){if(e.referencedRule.name===this.nextProductionName&&e.idx===this.nextProductionOccurrence){let n=t.concat(r);this.updateExpectedNext(),this.walk(e.referencedRule,n)}}updateExpectedNext(){this.ruleStack.length===0?(this.nextProductionName="",this.nextProductionOccurrence=0,this.isAtEndOfPath=!0):(this.nextProductionName=this.ruleStack.pop(),this.nextProductionOccurrence=this.occurrenceStack.pop())}},vdt=class extends ydt{static{s(this,"NextAfterTokenWalker")}static{_(this,"NextAfterTokenWalker")}constructor(e,t){super(e,t),this.path=t,this.nextTerminalName="",this.nextTerminalOccurrence=0,this.nextTerminalName=this.path.lastTok.name,this.nextTerminalOccurrence=this.path.lastTokOccurrence}walkTerminal(e,t,r){if(this.isAtEndOfPath&&e.terminalType.name===this.nextTerminalName&&e.idx===this.nextTerminalOccurrence&&!this.found){let n=t.concat(r),i=new ro({definition:n});this.possibleTokTypes=U1(i),this.found=!0}}},CR=class extends xR{static{s(this,"AbstractNextTerminalAfterProductionWalker")}static{_(this,"AbstractNextTerminalAfterProductionWalker")}constructor(e,t){super(),this.topRule=e,this.occurrence=t,this.result={token:void 0,occurrence:void 0,isEndOfRule:void 0}}startWalking(){return this.walk(this.topRule),this.result}},xdt=class extends CR{static{s(this,"NextTerminalAfterManyWalker")}static{_(this,"NextTerminalAfterManyWalker")}walkMany(e,t,r){if(e.idx===this.occurrence){let n=t.concat(r)[0];this.result.isEndOfRule=n===void 0,n instanceof Jn&&(this.result.token=n.terminalType,this.result.occurrence=n.idx)}else super.walkMany(e,t,r)}},b2e=class extends CR{static{s(this,"NextTerminalAfterManySepWalker")}static{_(this,"NextTerminalAfterManySepWalker")}walkManySep(e,t,r){if(e.idx===this.occurrence){let n=t.concat(r)[0];this.result.isEndOfRule=n===void 0,n instanceof Jn&&(this.result.token=n.terminalType,this.result.occurrence=n.idx)}else super.walkManySep(e,t,r)}},bdt=class extends CR{static{s(this,"NextTerminalAfterAtLeastOneWalker")}static{_(this,"NextTerminalAfterAtLeastOneWalker")}walkAtLeastOne(e,t,r){if(e.idx===this.occurrence){let n=t.concat(r)[0];this.result.isEndOfRule=n===void 0,n instanceof Jn&&(this.result.token=n.terminalType,this.result.occurrence=n.idx)}else super.walkAtLeastOne(e,t,r)}},T2e=class extends CR{static{s(this,"NextTerminalAfterAtLeastOneSepWalker")}static{_(this,"NextTerminalAfterAtLeastOneSepWalker")}walkAtLeastOneSep(e,t,r){if(e.idx===this.occurrence){let n=t.concat(r)[0];this.result.isEndOfRule=n===void 0,n instanceof Jn&&(this.result.token=n.terminalType,this.result.occurrence=n.idx)}else super.walkAtLeastOneSep(e,t,r)}};s(FA,"possiblePathsFrom");_(FA,"possiblePathsFrom");s(hke,"nextPossibleTokensAfter");_(hke,"nextPossibleTokensAfter");s(dke,"expandTopLevelRule");_(dke,"expandTopLevelRule");(function(e){e[e.OPTION=0]="OPTION",e[e.REPETITION=1]="REPETITION",e[e.REPETITION_MANDATORY=2]="REPETITION_MANDATORY",e[e.REPETITION_MANDATORY_WITH_SEPARATOR=3]="REPETITION_MANDATORY_WITH_SEPARATOR",e[e.REPETITION_WITH_SEPARATOR=4]="REPETITION_WITH_SEPARATOR",e[e.ALTERNATION=5]="ALTERNATION"})(di||(di={}));s(kR,"getProdType");_(kR,"getProdType");s(cG,"getLookaheadPaths");_(cG,"getLookaheadPaths");s(fke,"buildLookaheadFuncForOr");_(fke,"buildLookaheadFuncForOr");s(pke,"buildLookaheadFuncForOptionalProd");_(pke,"buildLookaheadFuncForOptionalProd");s(mke,"buildAlternativesLookAheadFunc");_(mke,"buildAlternativesLookAheadFunc");s(gke,"buildSingleAlternativeLookaheadFunction");_(gke,"buildSingleAlternativeLookaheadFunction");Tdt=class extends xR{static{s(this,"RestDefinitionFinderWalker")}static{_(this,"RestDefinitionFinderWalker")}constructor(e,t,r){super(),this.topProd=e,this.targetOccurrence=t,this.targetProdType=r}startWalking(){return this.walk(this.topProd),this.restDef}checkIsTarget(e,t,r,n){return e.idx===this.targetOccurrence&&this.targetProdType===t?(this.restDef=r.concat(n),!0):!1}walkOption(e,t,r){this.checkIsTarget(e,di.OPTION,t,r)||super.walkOption(e,t,r)}walkAtLeastOne(e,t,r){this.checkIsTarget(e,di.REPETITION_MANDATORY,t,r)||super.walkOption(e,t,r)}walkAtLeastOneSep(e,t,r){this.checkIsTarget(e,di.REPETITION_MANDATORY_WITH_SEPARATOR,t,r)||super.walkOption(e,t,r)}walkMany(e,t,r){this.checkIsTarget(e,di.REPETITION,t,r)||super.walkOption(e,t,r)}walkManySep(e,t,r){this.checkIsTarget(e,di.REPETITION_WITH_SEPARATOR,t,r)||super.walkOption(e,t,r)}},yke=class extends H1{static{s(this,"InsideDefinitionFinderVisitor")}static{_(this,"InsideDefinitionFinderVisitor")}constructor(e,t,r){super(),this.targetOccurrence=e,this.targetProdType=t,this.targetRef=r,this.result=[]}checkIsTarget(e,t){e.idx===this.targetOccurrence&&this.targetProdType===t&&(this.targetRef===void 0||e===this.targetRef)&&(this.result=e.definition)}visitOption(e){this.checkIsTarget(e,di.OPTION)}visitRepetition(e){this.checkIsTarget(e,di.REPETITION)}visitRepetitionMandatory(e){this.checkIsTarget(e,di.REPETITION_MANDATORY)}visitRepetitionMandatoryWithSeparator(e){this.checkIsTarget(e,di.REPETITION_MANDATORY_WITH_SEPARATOR)}visitRepetitionWithSeparator(e){this.checkIsTarget(e,di.REPETITION_WITH_SEPARATOR)}visitAlternation(e){this.checkIsTarget(e,di.ALTERNATION)}};s(uG,"initializeArrayOfArrays");_(uG,"initializeArrayOfArrays");s(Q5,"pathToHashKeys");_(Q5,"pathToHashKeys");s(vke,"isUniquePrefixHash");_(vke,"isUniquePrefixHash");s(VV,"lookAheadSequenceFromAlternatives");_(VV,"lookAheadSequenceFromAlternatives");s(SC,"getLookaheadPathsForOr");_(SC,"getLookaheadPathsForOr");s(EC,"getLookaheadPathsForOptionalProd");_(EC,"getLookaheadPathsForOptionalProd");s(GA,"containsPath");_(GA,"containsPath");s(xke,"isStrictPrefixOfPath");_(xke,"isStrictPrefixOfPath");s(WV,"areTokenCategoriesNotUsed");_(WV,"areTokenCategoriesNotUsed");s(bke,"validateLookahead");_(bke,"validateLookahead");s(Tke,"validateGrammar");_(Tke,"validateGrammar");s(Cke,"validateDuplicateProductions");_(Cke,"validateDuplicateProductions");s(kke,"identifyProductionForDuplicates");_(kke,"identifyProductionForDuplicates");s(qV,"getExtraProductionArgument");_(qV,"getExtraProductionArgument");Cdt=class extends H1{static{s(this,"OccurrenceValidationCollector")}static{_(this,"OccurrenceValidationCollector")}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)}};s(wke,"validateRuleDoesNotAlreadyExist");_(wke,"validateRuleDoesNotAlreadyExist");s(Ske,"validateRuleIsOverridden");_(Ske,"validateRuleIsOverridden");s(HV,"validateNoLeftRecursion");_(HV,"validateNoLeftRecursion");s(ZT,"getFirstNoneTerminal");_(ZT,"getFirstNoneTerminal");UV=class extends H1{static{s(this,"OrCollector")}static{_(this,"OrCollector")}constructor(){super(...arguments),this.alternations=[]}visitAlternation(e){this.alternations.push(e)}};s(Eke,"validateEmptyOrAlternative");_(Eke,"validateEmptyOrAlternative");s(Ake,"validateAmbiguousAlternationAlternatives");_(Ake,"validateAmbiguousAlternationAlternatives");kdt=class extends H1{static{s(this,"RepetitionCollector")}static{_(this,"RepetitionCollector")}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)}};s(Rke,"validateTooManyAlts");_(Rke,"validateTooManyAlts");s(_ke,"validateSomeNonEmptyLookaheadPath");_(_ke,"validateSomeNonEmptyLookaheadPath");s(Lke,"checkAlternativesAmbiguities");_(Lke,"checkAlternativesAmbiguities");s(Dke,"checkPrefixAlternativesAmbiguities");_(Dke,"checkPrefixAlternativesAmbiguities");s(Ike,"checkTerminalAndNoneTerminalsNameSpace");_(Ike,"checkTerminalAndNoneTerminalsNameSpace");s(Mke,"resolveGrammar2");_(Mke,"resolveGrammar");s(Nke,"validateGrammar2");_(Nke,"validateGrammar");Pke="MismatchedTokenException",Oke="NoViableAltException",Bke="EarlyExitException",$ke="NotAllInputParsedException",Fke=[Pke,Oke,Bke,$ke];Object.freeze(Fke);s(lC,"isRecognitionException");_(lC,"isRecognitionException");wR=class extends Error{static{s(this,"RecognitionException")}static{_(this,"RecognitionException")}constructor(e,t){super(e),this.token=t,this.resyncedTokens=[],Object.setPrototypeOf(this,new.target.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}},Gke=class extends wR{static{s(this,"MismatchedTokenException")}static{_(this,"MismatchedTokenException")}constructor(e,t,r){super(e,t),this.previousToken=r,this.name=Pke}},wdt=class extends wR{static{s(this,"NoViableAltException")}static{_(this,"NoViableAltException")}constructor(e,t,r){super(e,t),this.previousToken=r,this.name=Oke}},Sdt=class extends wR{static{s(this,"NotAllInputParsedException")}static{_(this,"NotAllInputParsedException")}constructor(e,t){super(e,t),this.name=$ke}},Edt=class extends wR{static{s(this,"EarlyExitException")}static{_(this,"EarlyExitException")}constructor(e,t,r){super(e,t),this.previousToken=r,this.name=Bke}},B$={},zke="InRuleRecoveryException",Adt=class extends Error{static{s(this,"InRuleRecoveryException")}static{_(this,"InRuleRecoveryException")}constructor(e){super(e),this.name=zke}},Rdt=class{static{s(this,"Recoverable")}static{_(this,"Recoverable")}initRecoverable(e){this.firstAfterRepMap={},this.resyncFollows={},this.recoveryEnabled=Object.hasOwn(e,"recoveryEnabled")?e.recoveryEnabled:vh.recoveryEnabled,this.recoveryEnabled&&(this.attemptInRepetitionRecovery=Vke)}getTokenToInsert(e){let t=wC(e,"",NaN,NaN,NaN,NaN,NaN,NaN);return t.isInsertedInRecovery=!0,t}canTokenTypeBeInsertedInRecovery(e){return!0}canTokenTypeBeDeletedInRecovery(e){return!0}tryInRepetitionRecovery(e,t,r,n){let i=this.findReSyncTokenType(),a=this.exportLexerState(),o=[],l=!1,u=this.LA_FAST(1),h=this.LA_FAST(1),d=_(()=>{let f=this.LA(0),p=this.errorMessageProvider.buildMismatchTokenMessage({expected:n,actual:u,previous:f,ruleName:this.getCurrRuleFullName()}),m=new Gke(p,u,this.LA(0));m.resyncedTokens=o.slice(0,-1),this.SAVE_ERROR(m)},"generateErrorMessage");for(;!l;)if(this.tokenMatcher(h,n)){d();return}else if(r.call(this)){d(),e.apply(this,t);return}else this.tokenMatcher(h,i)?l=!0:(h=this.SKIP_TOKEN(),this.addToResyncTokens(h,o));this.importLexerState(a)}shouldInRepetitionRecoveryBeTried(e,t,r){return!(r===!1||this.tokenMatcher(this.LA_FAST(1),e)||this.isBackTracking()||this.canPerformInRuleRecovery(e,this.getFollowsForInRuleRecovery(e,t)))}getNextPossibleTokenTypes(e){let t=e.ruleStack[0],n=this.getGAstProductions()[t];return new vdt(n,e).startWalking()}getFollowsForInRuleRecovery(e,t){let r=this.getCurrentGrammarPath(e,t);return this.getNextPossibleTokenTypes(r)}tryInRuleRecovery(e,t){if(this.canRecoverWithSingleTokenInsertion(e,t))return this.getTokenToInsert(e);if(this.canRecoverWithSingleTokenDeletion(e)){let r=this.SKIP_TOKEN();return this.consumeToken(),r}throw new Adt("sad sad panda")}canPerformInRuleRecovery(e,t){return this.canRecoverWithSingleTokenInsertion(e,t)||this.canRecoverWithSingleTokenDeletion(e)}canRecoverWithSingleTokenInsertion(e,t){if(!this.canTokenTypeBeInsertedInRecovery(e)||t.length===0)return!1;let r=this.LA_FAST(1);return t.find(i=>this.tokenMatcher(r,i))!==void 0}canRecoverWithSingleTokenDeletion(e){return this.canTokenTypeBeDeletedInRecovery(e)?this.tokenMatcher(this.LA(2),e):!1}isInCurrentRuleReSyncSet(e){let t=this.getCurrFollowKey();return this.getFollowSetFromFollowKey(t).includes(e)}findReSyncTokenType(){let e=this.flattenFollowSet(),t=this.LA_FAST(1),r=2;for(;;){let n=e.find(i=>TR(t,i));if(n!==void 0)return n;t=this.LA(r),r++}}getCurrFollowKey(){if(this.RULE_STACK_IDX===0)return B$;let e=this.currRuleShortName,t=this.getLastExplicitRuleOccurrenceIndex(),r=this.getPreviousExplicitRuleShortName();return{ruleName:this.shortRuleNameToFullName(e),idxInCallingRule:t,inRule:this.shortRuleNameToFullName(r)}}buildFullFollowKeyStack(){let e=this.RULE_STACK,t=this.RULE_OCCURRENCE_STACK,r=this.RULE_STACK_IDX+1,n=new Array(r);for(let i=0;ithis.getFollowSetFromFollowKey(t)).flat()}getFollowSetFromFollowKey(e){if(e===B$)return[yh];let t=e.ruleName+e.idxInCallingRule+ECe+e.inRule;return this.resyncFollows[t]}addToResyncTokens(e,t){return this.tokenMatcher(e,yh)||t.push(e),t}reSyncTo(e){let t=[],r=this.LA_FAST(1);for(;this.tokenMatcher(r,e)===!1;)r=this.SKIP_TOKEN(),this.addToResyncTokens(r,t);return t.slice(0,-1)}attemptInRepetitionRecovery(e,t,r,n,i,a,o){}getCurrentGrammarPath(e,t){let r=this.getHumanReadableRuleStack(),n=this.RULE_OCCURRENCE_STACK.slice(0,this.RULE_OCCURRENCE_STACK_IDX+1);return{ruleStack:r,occurrenceStack:n,lastTok:e,lastTokOccurrence:t}}getHumanReadableRuleStack(){let e=this.RULE_STACK_IDX+1,t=new Array(e);for(let r=0;rHV(t,t,ag))}validateEmptyOrAlternatives(e){return e.flatMap(t=>Eke(t,ag))}validateAmbiguousAlternationAlternatives(e,t){return e.flatMap(r=>Ake(r,t,ag))}validateSomeNonEmptyLookaheadPath(e,t){return _ke(e,t,ag)}buildLookaheadForAlternation(e){return fke(e.prodOccurrence,e.rule,e.maxLookahead,e.hasPredicates,e.dynamicTokensEnabled,mke)}buildLookaheadForOptional(e){return pke(e.prodOccurrence,e.rule,e.maxLookahead,e.dynamicTokensEnabled,kR(e.prodType),gke)}},Ddt=class{static{s(this,"LooksAhead")}static{_(this,"LooksAhead")}initLooksAhead(e){this.dynamicTokensEnabled=Object.hasOwn(e,"dynamicTokensEnabled")?e.dynamicTokensEnabled:vh.dynamicTokensEnabled,this.maxLookahead=Object.hasOwn(e,"maxLookahead")?e.maxLookahead:vh.maxLookahead,this.lookaheadStrategy=Object.hasOwn(e,"lookaheadStrategy")?e.lookaheadStrategy:new YV({maxLookahead:this.maxLookahead}),this.lookAheadFuncsCache=new Map}preComputeLookaheadFunctions(e){e.forEach(t=>{this.TRACE_INIT(`${t.name} Rule Lookahead`,()=>{let{alternation:r,repetition:n,option:i,repetitionMandatory:a,repetitionMandatoryWithSeparator:o,repetitionWithSeparator:l}=Hke(t);r.forEach(u=>{let h=u.idx===0?"":u.idx;this.TRACE_INIT(`${Hl(u)}${h}`,()=>{let d=this.lookaheadStrategy.buildLookaheadForAlternation({prodOccurrence:u.idx,rule:t,maxLookahead:u.maxLookahead||this.maxLookahead,hasPredicates:u.hasPredicates,dynamicTokensEnabled:this.dynamicTokensEnabled}),f=eA(this.fullRuleNameToShort[t.name],Wke,u.idx);this.setLaFuncCache(f,d)})}),n.forEach(u=>{this.computeLookaheadFunc(t,u.idx,hG,"Repetition",u.maxLookahead,Hl(u))}),i.forEach(u=>{this.computeLookaheadFunc(t,u.idx,qke,"Option",u.maxLookahead,Hl(u))}),a.forEach(u=>{this.computeLookaheadFunc(t,u.idx,dG,"RepetitionMandatory",u.maxLookahead,Hl(u))}),o.forEach(u=>{this.computeLookaheadFunc(t,u.idx,J5,"RepetitionMandatoryWithSeparator",u.maxLookahead,Hl(u))}),l.forEach(u=>{this.computeLookaheadFunc(t,u.idx,fG,"RepetitionWithSeparator",u.maxLookahead,Hl(u))})})})}computeLookaheadFunc(e,t,r,n,i,a){this.TRACE_INIT(`${a}${t===0?"":t}`,()=>{let o=this.lookaheadStrategy.buildLookaheadForOptional({prodOccurrence:t,rule:e,maxLookahead:i||this.maxLookahead,dynamicTokensEnabled:this.dynamicTokensEnabled,prodType:n}),l=eA(this.fullRuleNameToShort[e.name],r,t);this.setLaFuncCache(l,o)})}getKeyForAutomaticLookahead(e,t){return eA(this.currRuleShortName,e,t)}getLaFuncFromCache(e){return this.lookAheadFuncsCache.get(e)}setLaFuncCache(e,t){this.lookAheadFuncsCache.set(e,t)}},Idt=class extends H1{static{s(this,"DslMethodsCollectorVisitor")}static{_(this,"DslMethodsCollectorVisitor")}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)}},w5=new Idt;s(Hke,"collectMethods");_(Hke,"collectMethods");s(pG,"setNodeLocationOnlyOffset");_(pG,"setNodeLocationOnlyOffset");s(mG,"setNodeLocationFull");_(mG,"setNodeLocationFull");s(Uke,"addTerminalToCst");_(Uke,"addTerminalToCst");s(Yke,"addNoneTerminalToCst");_(Yke,"addNoneTerminalToCst");Mdt="name";s(jV,"defineNameProp");_(jV,"defineNameProp");s(jke,"defaultVisit");_(jke,"defaultVisit");s(Xke,"createBaseSemanticVisitorConstructor");_(Xke,"createBaseSemanticVisitorConstructor");s(Kke,"createBaseVisitorConstructorWithDefaults");_(Kke,"createBaseVisitorConstructorWithDefaults");(function(e){e[e.REDUNDANT_METHOD=0]="REDUNDANT_METHOD",e[e.MISSING_METHOD=1]="MISSING_METHOD"})(gG||(gG={}));s(Zke,"validateVisitor");_(Zke,"validateVisitor");s(Qke,"validateMissingCstMethods");_(Qke,"validateMissingCstMethods");Ndt=class{static{s(this,"TreeBuilder")}static{_(this,"TreeBuilder")}initTreeBuilder(e){if(this.CST_STACK=[],this.outputCst=e.outputCst,this.nodeLocationTracking=Object.hasOwn(e,"nodeLocationTracking")?e.nodeLocationTracking:vh.nodeLocationTracking,!this.outputCst)this.cstInvocationStateUpdate=()=>{},this.cstFinallyStateUpdate=()=>{},this.cstPostTerminal=()=>{},this.cstPostNonTerminal=()=>{},this.cstPostRule=()=>{};else if(/full/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=mG,this.setNodeLocationFromNode=mG,this.cstPostRule=()=>{},this.setInitialNodeLocation=this.setInitialNodeLocationFullRecovery):(this.setNodeLocationFromToken=()=>{},this.setNodeLocationFromNode=()=>{},this.cstPostRule=this.cstPostRuleFull,this.setInitialNodeLocation=this.setInitialNodeLocationFullRegular);else if(/onlyOffset/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=pG,this.setNodeLocationFromNode=pG,this.cstPostRule=()=>{},this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRecovery):(this.setNodeLocationFromToken=()=>{},this.setNodeLocationFromNode=()=>{},this.cstPostRule=this.cstPostRuleOnlyOffset,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRegular);else if(/none/i.test(this.nodeLocationTracking))this.setNodeLocationFromToken=()=>{},this.setNodeLocationFromNode=()=>{},this.cstPostRule=()=>{},this.setInitialNodeLocation=()=>{};else throw Error(`Invalid config option: "${e.nodeLocationTracking}"`)}setInitialNodeLocationOnlyOffsetRecovery(e){e.location={startOffset:NaN,endOffset:NaN}}setInitialNodeLocationOnlyOffsetRegular(e){e.location={startOffset:this.LA_FAST(1).startOffset,endOffset:NaN}}setInitialNodeLocationFullRecovery(e){e.location={startOffset:NaN,startLine:NaN,startColumn:NaN,endOffset:NaN,endLine:NaN,endColumn:NaN}}setInitialNodeLocationFullRegular(e){let t=this.LA_FAST(1);e.location={startOffset:t.startOffset,startLine:t.startLine,startColumn:t.startColumn,endOffset:NaN,endLine:NaN,endColumn:NaN}}cstInvocationStateUpdate(e){let t={name:e,children:Object.create(null)};this.setInitialNodeLocation(t),this.CST_STACK.push(t)}cstFinallyStateUpdate(){this.CST_STACK.pop()}cstPostRuleFull(e){let t=this.LA(0),r=e.location;r.startOffset<=t.startOffset?(r.endOffset=t.endOffset,r.endLine=t.endLine,r.endColumn=t.endColumn):(r.startOffset=NaN,r.startLine=NaN,r.startColumn=NaN)}cstPostRuleOnlyOffset(e){let t=this.LA(0),r=e.location;r.startOffset<=t.startOffset?r.endOffset=t.endOffset:r.startOffset=NaN}cstPostTerminal(e,t){let r=this.CST_STACK[this.CST_STACK.length-1];Uke(r,t,e),this.setNodeLocationFromToken(r.location,t)}cstPostNonTerminal(e,t){let r=this.CST_STACK[this.CST_STACK.length-1];Yke(r,t,e),this.setNodeLocationFromNode(r.location,e.location)}getBaseCstVisitorConstructor(){if(this.baseCstVisitorConstructor===void 0){let e=Xke(this.className,Object.keys(this.gastProductionsCache));return this.baseCstVisitorConstructor=e,e}return this.baseCstVisitorConstructor}getBaseCstVisitorConstructorWithDefaults(){if(this.baseCstVisitorWithDefaultsConstructor===void 0){let e=Kke(this.className,Object.keys(this.gastProductionsCache),this.getBaseCstVisitorConstructor());return this.baseCstVisitorWithDefaultsConstructor=e,e}return this.baseCstVisitorWithDefaultsConstructor}getPreviousExplicitRuleShortName(){return this.RULE_STACK[this.RULE_STACK_IDX-1]}getLastExplicitRuleOccurrenceIndex(){return this.RULE_OCCURRENCE_STACK[this.RULE_OCCURRENCE_STACK_IDX]}},Pdt=class{static{s(this,"LexerAdapter")}static{_(this,"LexerAdapter")}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.tokVectorLength-2?(this.consumeToken(),this.LA_FAST(1)):$1}LA_FAST(e){let t=this.currIdx+e;return this.tokVector[t]}LA(e){let t=this.currIdx+e;return t<0||this.tokVectorLength<=t?$1:this.tokVector[t]}consumeToken(){this.currIdx++}exportLexerState(){return this.currIdx}importLexerState(e){this.currIdx=e}resetLexerState(){this.currIdx=-1}moveToTerminatedState(){this.currIdx=this.tokVectorLength-1}getLexerPosition(){return this.exportLexerState()}},Odt=class{static{s(this,"RecognizerApi")}static{_(this,"RecognizerApi")}ACTION(e){return e.call(this)}consume(e,t,r){return this.consumeInternal(t,e,r)}subrule(e,t,r){return this.subruleInternal(t,e,r)}option(e,t){return this.optionInternal(t,e)}or(e,t){return this.orInternal(t,e)}many(e,t){return this.manyInternal(e,t)}atLeastOne(e,t){return this.atLeastOneInternal(e,t)}CONSUME(e,t){return this.consumeInternal(e,0,t)}CONSUME1(e,t){return this.consumeInternal(e,1,t)}CONSUME2(e,t){return this.consumeInternal(e,2,t)}CONSUME3(e,t){return this.consumeInternal(e,3,t)}CONSUME4(e,t){return this.consumeInternal(e,4,t)}CONSUME5(e,t){return this.consumeInternal(e,5,t)}CONSUME6(e,t){return this.consumeInternal(e,6,t)}CONSUME7(e,t){return this.consumeInternal(e,7,t)}CONSUME8(e,t){return this.consumeInternal(e,8,t)}CONSUME9(e,t){return this.consumeInternal(e,9,t)}SUBRULE(e,t){return this.subruleInternal(e,0,t)}SUBRULE1(e,t){return this.subruleInternal(e,1,t)}SUBRULE2(e,t){return this.subruleInternal(e,2,t)}SUBRULE3(e,t){return this.subruleInternal(e,3,t)}SUBRULE4(e,t){return this.subruleInternal(e,4,t)}SUBRULE5(e,t){return this.subruleInternal(e,5,t)}SUBRULE6(e,t){return this.subruleInternal(e,6,t)}SUBRULE7(e,t){return this.subruleInternal(e,7,t)}SUBRULE8(e,t){return this.subruleInternal(e,8,t)}SUBRULE9(e,t){return this.subruleInternal(e,9,t)}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,t,r=zA){if(this.definedRulesNames.includes(e)){let a={message:ag.buildDuplicateRuleNameError({topLevelRule:e,grammarName:this.className}),type:As.DUPLICATE_RULE_NAME,ruleName:e};this.definitionErrors.push(a)}this.definedRulesNames.push(e);let n=this.defineRule(e,t,r);return this[e]=n,n}OVERRIDE_RULE(e,t,r=zA){let n=Ske(e,this.definedRulesNames,this.className);this.definitionErrors=this.definitionErrors.concat(n);let i=this.defineRule(e,t,r);return this[e]=i,i}BACKTRACK(e,t){var r;let n=(r=e.coreRule)!==null&&r!==void 0?r:e;return function(){this.isBackTrackingStack.push(1);let i=this.saveRecogState();try{return n.apply(this,t),!0}catch(a){if(lC(a))return!1;throw a}finally{this.reloadRecogState(i),this.isBackTrackingStack.pop()}}}getGAstProductions(){return this.gastProductionsCache}getSerializedGastProductions(){return bCe(Object.values(this.gastProductionsCache))}},Bdt=class{static{s(this,"RecognizerEngine")}static{_(this,"RecognizerEngine")}initRecognizerEngine(e,t){if(this.className=this.constructor.name,this.shortRuleNameToFull={},this.fullRuleNameToShort={},this.ruleShortNameIdx=256,this.tokenMatcher=oC,this.subruleIdx=0,this.currRuleShortName=0,this.definedRulesNames=[],this.tokensMap={},this.isBackTrackingStack=[],this.RULE_STACK=[],this.RULE_STACK_IDX=-1,this.RULE_OCCURRENCE_STACK=[],this.RULE_OCCURRENCE_STACK_IDX=-1,this.gastProductionsCache={},Object.hasOwn(t,"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(Array.isArray(e)){if(e.length===0)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(Array.isArray(e))this.tokensMap=e.reduce((i,a)=>(i[a.name]=a,i),{});else if(Object.hasOwn(e,"modes")&&Object.values(e.modes).flat().every(lke)){let i=Object.values(e.modes).flat(),a=[...new Set(i)];this.tokensMap=a.reduce((o,l)=>(o[l.name]=l,o),{})}else if(typeof e=="object"&&e!==null)this.tokensMap=Object.assign({},e);else throw new Error(" argument must be An Array of Token constructors, A dictionary of Token constructors or an IMultiModeLexerDefinition");this.tokensMap.EOF=yh;let n=(Object.hasOwn(e,"modes")?Object.values(e.modes).flat():Object.values(e)).every(i=>{var a;return((a=i.categoryMatches)===null||a===void 0?void 0:a.length)==0});this.tokenMatcher=n?oC:Y1,j1(Object.values(this.tokensMap))}defineRule(e,t,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.`);let n=Object.hasOwn(r,"resyncEnabled")?r.resyncEnabled:zA.resyncEnabled,i=Object.hasOwn(r,"recoveryValueFunc")?r.recoveryValueFunc:zA.recoveryValueFunc,a=this.ruleShortNameIdx<<_dt+Bf;this.ruleShortNameIdx++,this.shortRuleNameToFull[a]=e,this.fullRuleNameToShort[e]=a;let o;return this.outputCst===!0?o=_(s(function(...d){try{this.ruleInvocationStateUpdate(a,e,this.subruleIdx),t.apply(this,d);let f=this.CST_STACK[this.CST_STACK.length-1];return this.cstPostRule(f),f}catch(f){return this.invokeRuleCatch(f,n,i)}finally{this.ruleFinallyStateUpdate()}},"invokeRuleWithTry"),"invokeRuleWithTry"):o=_(s(function(...d){try{return this.ruleInvocationStateUpdate(a,e,this.subruleIdx),t.apply(this,d)}catch(f){return this.invokeRuleCatch(f,n,i)}finally{this.ruleFinallyStateUpdate()}},"invokeRuleWithTryCst"),"invokeRuleWithTryCst"),Object.assign(_(s(function(...d){this.onBeforeParse(e);try{return o.apply(this,d)}finally{this.onAfterParse(e)}},"rootRule"),"rootRule"),{ruleName:e,originalGrammarAction:t,coreRule:o})}invokeRuleCatch(e,t,r){let n=this.RULE_STACK_IDX===0,i=t&&!this.isBackTracking()&&this.recoveryEnabled;if(lC(e)){let a=e;if(i){let o=this.findReSyncTokenType();if(this.isInCurrentRuleReSyncSet(o))if(a.resyncedTokens=this.reSyncTo(o),this.outputCst){let l=this.CST_STACK[this.CST_STACK.length-1];return l.recoveredNode=!0,l}else return r(e);else{if(this.outputCst){let l=this.CST_STACK[this.CST_STACK.length-1];l.recoveredNode=!0,a.partialCstResult=l}throw a}}else{if(n)return this.moveToTerminatedState(),r(e);throw a}}else throw e}optionInternal(e,t){let r=this.getKeyForAutomaticLookahead(qke,t);return this.optionInternalLogic(e,t,r)}optionInternalLogic(e,t,r){let n=this.getLaFuncFromCache(r),i;if(typeof e!="function"){i=e.DEF;let a=e.GATE;if(a!==void 0){let o=n;n=_(()=>a.call(this)&&o.call(this),"lookAheadFunc")}}else i=e;if(n.call(this)===!0)return i.call(this)}atLeastOneInternal(e,t){let r=this.getKeyForAutomaticLookahead(dG,e);return this.atLeastOneInternalLogic(e,t,r)}atLeastOneInternalLogic(e,t,r){let n=this.getLaFuncFromCache(r),i;if(typeof t!="function"){i=t.DEF;let a=t.GATE;if(a!==void 0){let o=n;n=_(()=>a.call(this)&&o.call(this),"lookAheadFunc")}}else i=t;if(n.call(this)===!0){let a=this.doSingleRepetition(i);for(;n.call(this)===!0&&a===!0;)a=this.doSingleRepetition(i)}else throw this.raiseEarlyExitException(e,di.REPETITION_MANDATORY,t.ERR_MSG);this.attemptInRepetitionRecovery(this.atLeastOneInternal,[e,t],n,dG,e,bdt)}atLeastOneSepFirstInternal(e,t){let r=this.getKeyForAutomaticLookahead(J5,e);this.atLeastOneSepFirstInternalLogic(e,t,r)}atLeastOneSepFirstInternalLogic(e,t,r){let n=t.DEF,i=t.SEP;if(this.getLaFuncFromCache(r).call(this)===!0){n.call(this);let o=_(()=>this.tokenMatcher(this.LA_FAST(1),i),"separatorLookAheadFunc");for(;this.tokenMatcher(this.LA_FAST(1),i)===!0;)this.CONSUME(i),n.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,i,o,n,T2e],o,J5,e,T2e)}else throw this.raiseEarlyExitException(e,di.REPETITION_MANDATORY_WITH_SEPARATOR,t.ERR_MSG)}manyInternal(e,t){let r=this.getKeyForAutomaticLookahead(hG,e);return this.manyInternalLogic(e,t,r)}manyInternalLogic(e,t,r){let n=this.getLaFuncFromCache(r),i;if(typeof t!="function"){i=t.DEF;let o=t.GATE;if(o!==void 0){let l=n;n=_(()=>o.call(this)&&l.call(this),"lookaheadFunction")}}else i=t;let a=!0;for(;n.call(this)===!0&&a===!0;)a=this.doSingleRepetition(i);this.attemptInRepetitionRecovery(this.manyInternal,[e,t],n,hG,e,xdt,a)}manySepFirstInternal(e,t){let r=this.getKeyForAutomaticLookahead(fG,e);this.manySepFirstInternalLogic(e,t,r)}manySepFirstInternalLogic(e,t,r){let n=t.DEF,i=t.SEP;if(this.getLaFuncFromCache(r).call(this)===!0){n.call(this);let o=_(()=>this.tokenMatcher(this.LA_FAST(1),i),"separatorLookAheadFunc");for(;this.tokenMatcher(this.LA_FAST(1),i)===!0;)this.CONSUME(i),n.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,i,o,n,b2e],o,fG,e,b2e)}}repetitionSepSecondInternal(e,t,r,n,i){for(;r();)this.CONSUME(t),n.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,t,r,n,i],r,J5,e,i)}doSingleRepetition(e){let t=this.getLexerPosition();return e.call(this),this.getLexerPosition()>t}orInternal(e,t){let r=this.getKeyForAutomaticLookahead(Wke,t),n=Array.isArray(e)?e:e.DEF,a=this.getLaFuncFromCache(r).call(this,n);if(a!==void 0)return n[a].ALT.call(this);this.raiseNoAltException(t,e.ERR_MSG)}ruleFinallyStateUpdate(){this.RULE_STACK_IDX--,this.RULE_OCCURRENCE_STACK_IDX--,this.RULE_STACK_IDX>=0&&(this.currRuleShortName=this.RULE_STACK[this.RULE_STACK_IDX]),this.cstFinallyStateUpdate()}subruleInternal(e,t,r){let n;try{let i=r!==void 0?r.ARGS:void 0;return this.subruleIdx=t,n=e.coreRule.apply(this,i),this.cstPostNonTerminal(n,r!==void 0&&r.LABEL!==void 0?r.LABEL:e.ruleName),n}catch(i){throw this.subruleInternalError(i,r,e.ruleName)}}subruleInternalError(e,t,r){throw lC(e)&&e.partialCstResult!==void 0&&(this.cstPostNonTerminal(e.partialCstResult,t!==void 0&&t.LABEL!==void 0?t.LABEL:r),delete e.partialCstResult),e}consumeInternal(e,t,r){let n;try{let i=this.LA_FAST(1);this.tokenMatcher(i,e)===!0?(this.consumeToken(),n=i):this.consumeInternalError(e,i,r)}catch(i){n=this.consumeInternalRecovery(e,t,i)}return this.cstPostTerminal(r!==void 0&&r.LABEL!==void 0?r.LABEL:e.name,n),n}consumeInternalError(e,t,r){let n,i=this.LA(0);throw r!==void 0&&r.ERR_MSG?n=r.ERR_MSG:n=this.errorMessageProvider.buildMismatchTokenMessage({expected:e,actual:t,previous:i,ruleName:this.getCurrRuleFullName()}),this.SAVE_ERROR(new Gke(n,t,i))}consumeInternalRecovery(e,t,r){if(this.recoveryEnabled&&r.name==="MismatchedTokenException"&&!this.isBackTracking()){let n=this.getFollowsForInRuleRecovery(e,t);try{return this.tryInRuleRecovery(e,n)}catch(i){throw i.name===zke?r:i}}else throw r}saveRecogState(){let e=this.errors,t=this.RULE_STACK.slice(0,this.RULE_STACK_IDX+1);return{errors:e,lexerState:this.exportLexerState(),RULE_STACK:t,CST_STACK:this.CST_STACK}}reloadRecogState(e){this.errors=e.errors,this.importLexerState(e.lexerState);let t=e.RULE_STACK;for(let r=0;r=0&&(this.currRuleShortName=this.RULE_STACK[this.RULE_STACK_IDX])}ruleInvocationStateUpdate(e,t,r){this.RULE_OCCURRENCE_STACK[++this.RULE_OCCURRENCE_STACK_IDX]=r,this.RULE_STACK[++this.RULE_STACK_IDX]=e,this.currRuleShortName=e,this.cstInvocationStateUpdate(t)}isBackTracking(){return this.isBackTrackingStack.length!==0}getCurrRuleFullName(){let e=this.currRuleShortName;return this.shortRuleNameToFull[e]}shortRuleNameToFullName(e){return this.shortRuleNameToFull[e]}isAtEndOfInput(){return this.tokenMatcher(this.LA(1),yh)}reset(){this.resetLexerState(),this.subruleIdx=0,this.currRuleShortName=0,this.isBackTrackingStack=[],this.errors=[],this.RULE_STACK_IDX=-1,this.RULE_OCCURRENCE_STACK_IDX=-1,this.CST_STACK=[]}onBeforeParse(e){for(let t=0;t{for(let e=0;e<10;e++){let t=e>0?e:"";this[`CONSUME${t}`]=function(r,n){return this.consumeInternalRecord(r,e,n)},this[`SUBRULE${t}`]=function(r,n){return this.subruleInternalRecord(r,e,n)},this[`OPTION${t}`]=function(r){return this.optionInternalRecord(r,e)},this[`OR${t}`]=function(r){return this.orInternalRecord(r,e)},this[`MANY${t}`]=function(r){this.manyInternalRecord(e,r)},this[`MANY_SEP${t}`]=function(r){this.manySepFirstInternalRecord(e,r)},this[`AT_LEAST_ONE${t}`]=function(r){this.atLeastOneInternalRecord(e,r)},this[`AT_LEAST_ONE_SEP${t}`]=function(r){this.atLeastOneSepFirstInternalRecord(e,r)}}this.consume=function(e,t,r){return this.consumeInternalRecord(t,e,r)},this.subrule=function(e,t,r){return this.subruleInternalRecord(t,e,r)},this.option=function(e,t){return this.optionInternalRecord(t,e)},this.or=function(e,t){return this.orInternalRecord(t,e)},this.many=function(e,t){this.manyInternalRecord(e,t)},this.atLeastOne=function(e,t){this.atLeastOneInternalRecord(e,t)},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",()=>{let e=this;for(let t=0;t<10;t++){let r=t>0?t:"";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,t){return()=>!0}LA_RECORD(e){return $1}topLevelRuleRecord(e,t){try{let r=new q1({definition:[],name:e});return r.name=e,this.recordingProdStack.push(r),t.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,t){return p1.call(this,Na,e,t)}atLeastOneInternalRecord(e,t){p1.call(this,Ro,t,e)}atLeastOneSepFirstInternalRecord(e,t){p1.call(this,_o,t,e,C2e)}manyInternalRecord(e,t){p1.call(this,wi,t,e)}manySepFirstInternalRecord(e,t){p1.call(this,no,t,e,C2e)}orInternalRecord(e,t){return twe.call(this,e,t)}subruleInternalRecord(e,t,r){if(cC(t),!e||!Object.hasOwn(e,"ruleName")){let 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}let n=this.recordingProdStack.at(-1),i=e.ruleName,a=new Es({idx:t,nonTerminalName:i,label:r?.LABEL,referencedRule:void 0});return n.definition.push(a),this.outputCst?Fdt:SR}consumeInternalRecord(e,t,r){if(cC(t),!GV(e)){let 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}let n=this.recordingProdStack.at(-1),i=new Jn({idx:t,terminalType:e,label:r?.LABEL});return n.definition.push(i),ewe}};s(p1,"recordProd");_(p1,"recordProd");s(twe,"recordOrProd");_(twe,"recordOrProd");s(yG,"getIdxSuffix");_(yG,"getIdxSuffix");s(cC,"assertMethodIdxIsValid");_(cC,"assertMethodIdxIsValid");zdt=class{static{s(this,"PerformanceTracer")}static{_(this,"PerformanceTracer")}initPerformanceTracer(e){if(Object.hasOwn(e,"traceInitPerf")){let t=e.traceInitPerf,r=typeof t=="number";this.traceInitMaxIdent=r?t:1/0,this.traceInitPerf=r?t>0:t}else this.traceInitMaxIdent=0,this.traceInitPerf=vh.traceInitPerf;this.traceInitIndent=-1}TRACE_INIT(e,t){if(this.traceInitPerf===!0){this.traceInitIndent++;let r=new Array(this.traceInitIndent+1).join(" ");this.traceInitIndent <${e}>`);let{time:n,value:i}=NV(t),a=n>10?console.warn:console.log;return this.traceInitIndent time: ${n}ms`),this.traceInitIndent--,i}else return t()}};s(rwe,"applyMixins");_(rwe,"applyMixins");$1=wC(yh,"",NaN,NaN,NaN,NaN,NaN,NaN);Object.freeze($1);vh=Object.freeze({recoveryEnabled:!1,maxLookahead:3,dynamicTokensEnabled:!1,outputCst:!0,errorMessageProvider:S1,nodeLocationTracking:"none",traceInitPerf:!1,skipValidations:!1}),zA=Object.freeze({recoveryValueFunc:_(()=>{},"recoveryValueFunc"),resyncEnabled:!0});(function(e){e[e.INVALID_RULE_NAME=0]="INVALID_RULE_NAME",e[e.DUPLICATE_RULE_NAME=1]="DUPLICATE_RULE_NAME",e[e.INVALID_RULE_OVERRIDE=2]="INVALID_RULE_OVERRIDE",e[e.DUPLICATE_PRODUCTIONS=3]="DUPLICATE_PRODUCTIONS",e[e.UNRESOLVED_SUBRULE_REF=4]="UNRESOLVED_SUBRULE_REF",e[e.LEFT_RECURSION=5]="LEFT_RECURSION",e[e.NONE_LAST_EMPTY_ALT=6]="NONE_LAST_EMPTY_ALT",e[e.AMBIGUOUS_ALTS=7]="AMBIGUOUS_ALTS",e[e.CONFLICT_TOKENS_RULES_NAMESPACE=8]="CONFLICT_TOKENS_RULES_NAMESPACE",e[e.INVALID_TOKEN_NAME=9]="INVALID_TOKEN_NAME",e[e.NO_NON_EMPTY_LOOKAHEAD=10]="NO_NON_EMPTY_LOOKAHEAD",e[e.AMBIGUOUS_PREFIX_ALTS=11]="AMBIGUOUS_PREFIX_ALTS",e[e.TOO_MANY_ALTS=12]="TOO_MANY_ALTS",e[e.CUSTOM_LOOKAHEAD_VALIDATION=13]="CUSTOM_LOOKAHEAD_VALIDATION"})(As||(As={}));s(vG,"EMPTY_ALT");_(vG,"EMPTY_ALT");XV=class nwe{static{s(this,"_Parser")}static{_(this,"Parser")}static performSelfAnalysis(t){throw Error("The **static** `performSelfAnalysis` method has been deprecated. \nUse the **instance** method with the same name instead.")}performSelfAnalysis(){this.TRACE_INIT("performSelfAnalysis",()=>{let t;this.selfAnalysisDone=!0;let r=this.className;this.TRACE_INIT("toFastProps",()=>{PV(this)}),this.TRACE_INIT("Grammar Recording",()=>{try{this.enableRecording(),this.definedRulesNames.forEach(i=>{let o=this[i].originalGrammarAction,l;this.TRACE_INIT(`${i} Rule`,()=>{l=this.topLevelRuleRecord(i,o)}),this.gastProductionsCache[i]=l})}finally{this.disableRecording()}});let n=[];if(this.TRACE_INIT("Grammar Resolving",()=>{n=Mke({rules:Object.values(this.gastProductionsCache)}),this.definitionErrors=this.definitionErrors.concat(n)}),this.TRACE_INIT("Grammar Validations",()=>{if(n.length===0&&this.skipValidations===!1){let i=Nke({rules:Object.values(this.gastProductionsCache),tokenTypes:Object.values(this.tokensMap),errMsgProvider:ag,grammarName:r}),a=bke({lookaheadStrategy:this.lookaheadStrategy,rules:Object.values(this.gastProductionsCache),tokenTypes:Object.values(this.tokensMap),grammarName:r});this.definitionErrors=this.definitionErrors.concat(i,a)}}),this.definitionErrors.length===0&&(this.recoveryEnabled&&this.TRACE_INIT("computeAllProdsFollows",()=>{let i=ACe(Object.values(this.gastProductionsCache));this.resyncFollows=i}),this.TRACE_INIT("ComputeLookaheadFunctions",()=>{var i,a;(a=(i=this.lookaheadStrategy).initialize)===null||a===void 0||a.call(i,{rules:Object.values(this.gastProductionsCache)}),this.preComputeLookaheadFunctions(Object.values(this.gastProductionsCache))})),!nwe.DEFER_DEFINITION_ERRORS_HANDLING&&this.definitionErrors.length!==0)throw t=this.definitionErrors.map(i=>i.message),new Error(`Parser Definition Errors detected: + ${t.join(` +------------------------------- +`)}`)})}constructor(t,r){this.definitionErrors=[],this.selfAnalysisDone=!1;let n=this;if(n.initErrorHandler(r),n.initLexerAdapter(),n.initLooksAhead(r),n.initRecognizerEngine(t,r),n.initRecoverable(r),n.initTreeBuilder(r),n.initGastRecorder(r),n.initPerformanceTracer(r),Object.hasOwn(r,"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=Object.hasOwn(r,"skipValidations")?r.skipValidations:vh.skipValidations}};XV.DEFER_DEFINITION_ERRORS_HANDLING=!1;rwe(XV,[Rdt,Ddt,Ndt,Pdt,Bdt,Odt,$dt,Gdt,zdt]);Vdt=class extends XV{static{s(this,"EmbeddedActionsParser")}static{_(this,"EmbeddedActionsParser")}constructor(e,t=vh){let r=Object.assign({},t);r.outputCst=!1,super(e,r)}};s(iwe,"arrayMap");_(iwe,"arrayMap");awe=iwe;s(swe,"listCacheClear");_(swe,"listCacheClear");Wdt=swe;s(owe,"eq");_(owe,"eq");lwe=owe;s(cwe,"assocIndexOf");_(cwe,"assocIndexOf");ER=cwe,qdt=Array.prototype,Hdt=qdt.splice;s(uwe,"listCacheDelete");_(uwe,"listCacheDelete");Udt=uwe;s(hwe,"listCacheGet");_(hwe,"listCacheGet");Ydt=hwe;s(dwe,"listCacheHas");_(dwe,"listCacheHas");jdt=dwe;s(fwe,"listCacheSet");_(fwe,"listCacheSet");Xdt=fwe;s(bg,"ListCache");_(bg,"ListCache");bg.prototype.clear=Wdt;bg.prototype.delete=Udt;bg.prototype.get=Ydt;bg.prototype.has=jdt;bg.prototype.set=Xdt;AR=bg;s(pwe,"stackClear");_(pwe,"stackClear");Kdt=pwe;s(mwe,"stackDelete");_(mwe,"stackDelete");Zdt=mwe;s(gwe,"stackGet");_(gwe,"stackGet");Qdt=gwe;s(ywe,"stackHas");_(ywe,"stackHas");Jdt=ywe,eft=typeof global=="object"&&global&&global.Object===Object&&global,vwe=eft,tft=typeof self=="object"&&self&&self.Object===Object&&self,rft=vwe||tft||Function("return this")(),Ch=rft,nft=Ch.Symbol,su=nft,xwe=Object.prototype,ift=xwe.hasOwnProperty,aft=xwe.toString,kT=su?su.toStringTag:void 0;s(bwe,"getRawTag");_(bwe,"getRawTag");sft=bwe,oft=Object.prototype,lft=oft.toString;s(Twe,"objectToString");_(Twe,"objectToString");cft=Twe,uft="[object Null]",hft="[object Undefined]",w2e=su?su.toStringTag:void 0;s(Cwe,"baseGetTag");_(Cwe,"baseGetTag");X1=Cwe;s(kwe,"isObject");_(kwe,"isObject");KV=kwe,dft="[object AsyncFunction]",fft="[object Function]",pft="[object GeneratorFunction]",mft="[object Proxy]";s(wwe,"isFunction");_(wwe,"isFunction");Swe=wwe,gft=Ch["__core-js_shared__"],$$=gft,S2e=(function(){var e=/[^.]+$/.exec($$&&$$.keys&&$$.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""})();s(Ewe,"isMasked");_(Ewe,"isMasked");yft=Ewe,vft=Function.prototype,xft=vft.toString;s(Awe,"toSource");_(Awe,"toSource");Tg=Awe,bft=/[\\^$.*+?()[\]{}|]/g,Tft=/^\[object .+?Constructor\]$/,Cft=Function.prototype,kft=Object.prototype,wft=Cft.toString,Sft=kft.hasOwnProperty,Eft=RegExp("^"+wft.call(Sft).replace(bft,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");s(Rwe,"baseIsNative");_(Rwe,"baseIsNative");Aft=Rwe;s(_we,"getValue");_(_we,"getValue");Rft=_we;s(Lwe,"getNative");_(Lwe,"getNative");K1=Lwe,_ft=K1(Ch,"Map"),uC=_ft,Lft=K1(Object,"create"),hC=Lft;s(Dwe,"hashClear");_(Dwe,"hashClear");Dft=Dwe;s(Iwe,"hashDelete");_(Iwe,"hashDelete");Ift=Iwe,Mft="__lodash_hash_undefined__",Nft=Object.prototype,Pft=Nft.hasOwnProperty;s(Mwe,"hashGet");_(Mwe,"hashGet");Oft=Mwe,Bft=Object.prototype,$ft=Bft.hasOwnProperty;s(Nwe,"hashHas");_(Nwe,"hashHas");Fft=Nwe,Gft="__lodash_hash_undefined__";s(Pwe,"hashSet");_(Pwe,"hashSet");zft=Pwe;s(Cg,"Hash");_(Cg,"Hash");Cg.prototype.clear=Dft;Cg.prototype.delete=Ift;Cg.prototype.get=Oft;Cg.prototype.has=Fft;Cg.prototype.set=zft;E2e=Cg;s(Owe,"mapCacheClear");_(Owe,"mapCacheClear");Vft=Owe;s(Bwe,"isKeyable");_(Bwe,"isKeyable");Wft=Bwe;s($we,"getMapData");_($we,"getMapData");RR=$we;s(Fwe,"mapCacheDelete");_(Fwe,"mapCacheDelete");qft=Fwe;s(Gwe,"mapCacheGet");_(Gwe,"mapCacheGet");Hft=Gwe;s(zwe,"mapCacheHas");_(zwe,"mapCacheHas");Uft=zwe;s(Vwe,"mapCacheSet");_(Vwe,"mapCacheSet");Yft=Vwe;s(kg,"MapCache");_(kg,"MapCache");kg.prototype.clear=Vft;kg.prototype.delete=qft;kg.prototype.get=Hft;kg.prototype.has=Uft;kg.prototype.set=Yft;_R=kg,jft=200;s(Wwe,"stackSet");_(Wwe,"stackSet");Xft=Wwe;s(wg,"Stack");_(wg,"Stack");wg.prototype.clear=Kdt;wg.prototype.delete=Zdt;wg.prototype.get=Qdt;wg.prototype.has=Jdt;wg.prototype.set=Xft;tA=wg,Kft="__lodash_hash_undefined__";s(qwe,"setCacheAdd");_(qwe,"setCacheAdd");Zft=qwe;s(Hwe,"setCacheHas");_(Hwe,"setCacheHas");Qft=Hwe;s(dC,"SetCache");_(dC,"SetCache");dC.prototype.add=dC.prototype.push=Zft;dC.prototype.has=Qft;Uwe=dC;s(Ywe,"arraySome");_(Ywe,"arraySome");Jft=Ywe;s(jwe,"cacheHas");_(jwe,"cacheHas");Xwe=jwe,ept=1,tpt=2;s(Kwe,"equalArrays");_(Kwe,"equalArrays");Zwe=Kwe,rpt=Ch.Uint8Array,A2e=rpt;s(Qwe,"mapToArray");_(Qwe,"mapToArray");npt=Qwe;s(Jwe,"setToArray");_(Jwe,"setToArray");ZV=Jwe,ipt=1,apt=2,spt="[object Boolean]",opt="[object Date]",lpt="[object Error]",cpt="[object Map]",upt="[object Number]",hpt="[object RegExp]",dpt="[object Set]",fpt="[object String]",ppt="[object Symbol]",mpt="[object ArrayBuffer]",gpt="[object DataView]",R2e=su?su.prototype:void 0,F$=R2e?R2e.valueOf:void 0;s(eSe,"equalByTag");_(eSe,"equalByTag");ypt=eSe;s(tSe,"arrayPush");_(tSe,"arrayPush");rSe=tSe,vpt=Array.isArray,Rs=vpt;s(nSe,"baseGetAllKeys");_(nSe,"baseGetAllKeys");xpt=nSe;s(iSe,"arrayFilter");_(iSe,"arrayFilter");aSe=iSe;s(sSe,"stubArray");_(sSe,"stubArray");bpt=sSe,Tpt=Object.prototype,Cpt=Tpt.propertyIsEnumerable,_2e=Object.getOwnPropertySymbols,kpt=_2e?function(e){return e==null?[]:(e=Object(e),aSe(_2e(e),function(t){return Cpt.call(e,t)}))}:bpt,wpt=kpt;s(oSe,"baseTimes");_(oSe,"baseTimes");Spt=oSe;s(lSe,"isObjectLike");_(lSe,"isObjectLike");F1=lSe,Ept="[object Arguments]";s(cSe,"baseIsArguments");_(cSe,"baseIsArguments");L2e=cSe,uSe=Object.prototype,Apt=uSe.hasOwnProperty,Rpt=uSe.propertyIsEnumerable,_pt=L2e((function(){return arguments})())?L2e:function(e){return F1(e)&&Apt.call(e,"callee")&&!Rpt.call(e,"callee")},LR=_pt;s(hSe,"stubFalse");_(hSe,"stubFalse");Lpt=hSe,dSe=typeof exports=="object"&&exports&&!exports.nodeType&&exports,D2e=dSe&&typeof module=="object"&&module&&!module.nodeType&&module,Dpt=D2e&&D2e.exports===dSe,I2e=Dpt?Ch.Buffer:void 0,Ipt=I2e?I2e.isBuffer:void 0,Mpt=Ipt||Lpt,VA=Mpt,Npt=9007199254740991,Ppt=/^(?:0|[1-9]\d*)$/;s(fSe,"isIndex");_(fSe,"isIndex");pSe=fSe,Opt=9007199254740991;s(mSe,"isLength");_(mSe,"isLength");QV=mSe,Bpt="[object Arguments]",$pt="[object Array]",Fpt="[object Boolean]",Gpt="[object Date]",zpt="[object Error]",Vpt="[object Function]",Wpt="[object Map]",qpt="[object Number]",Hpt="[object Object]",Upt="[object RegExp]",Ypt="[object Set]",jpt="[object String]",Xpt="[object WeakMap]",Kpt="[object ArrayBuffer]",Zpt="[object DataView]",Qpt="[object Float32Array]",Jpt="[object Float64Array]",emt="[object Int8Array]",tmt="[object Int16Array]",rmt="[object Int32Array]",nmt="[object Uint8Array]",imt="[object Uint8ClampedArray]",amt="[object Uint16Array]",smt="[object Uint32Array]",Qn={};Qn[Qpt]=Qn[Jpt]=Qn[emt]=Qn[tmt]=Qn[rmt]=Qn[nmt]=Qn[imt]=Qn[amt]=Qn[smt]=!0;Qn[Bpt]=Qn[$pt]=Qn[Kpt]=Qn[Fpt]=Qn[Zpt]=Qn[Gpt]=Qn[zpt]=Qn[Vpt]=Qn[Wpt]=Qn[qpt]=Qn[Hpt]=Qn[Upt]=Qn[Ypt]=Qn[jpt]=Qn[Xpt]=!1;s(gSe,"baseIsTypedArray");_(gSe,"baseIsTypedArray");omt=gSe;s(ySe,"baseUnary");_(ySe,"baseUnary");lmt=ySe,vSe=typeof exports=="object"&&exports&&!exports.nodeType&&exports,QT=vSe&&typeof module=="object"&&module&&!module.nodeType&&module,cmt=QT&&QT.exports===vSe,G$=cmt&&vwe.process,umt=(function(){try{var e=QT&&QT.require&&QT.require("util").types;return e||G$&&G$.binding&&G$.binding("util")}catch{}})(),M2e=umt,N2e=M2e&&M2e.isTypedArray,hmt=N2e?lmt(N2e):omt,JV=hmt,dmt=Object.prototype,fmt=dmt.hasOwnProperty;s(xSe,"arrayLikeKeys");_(xSe,"arrayLikeKeys");pmt=xSe,mmt=Object.prototype;s(bSe,"isPrototype");_(bSe,"isPrototype");TSe=bSe;s(CSe,"overArg");_(CSe,"overArg");gmt=CSe,ymt=gmt(Object.keys,Object),vmt=ymt,xmt=Object.prototype,bmt=xmt.hasOwnProperty;s(kSe,"baseKeys");_(kSe,"baseKeys");wSe=kSe;s(SSe,"isArrayLike");_(SSe,"isArrayLike");DR=SSe;s(ESe,"keys");_(ESe,"keys");eW=ESe;s(ASe,"getAllKeys");_(ASe,"getAllKeys");P2e=ASe,Tmt=1,Cmt=Object.prototype,kmt=Cmt.hasOwnProperty;s(RSe,"equalObjects");_(RSe,"equalObjects");wmt=RSe,Smt=K1(Ch,"DataView"),xG=Smt,Emt=K1(Ch,"Promise"),bG=Emt,Amt=K1(Ch,"Set"),L1=Amt,Rmt=K1(Ch,"WeakMap"),TG=Rmt,O2e="[object Map]",_mt="[object Object]",B2e="[object Promise]",$2e="[object Set]",F2e="[object WeakMap]",G2e="[object DataView]",Lmt=Tg(xG),Dmt=Tg(uC),Imt=Tg(bG),Mmt=Tg(L1),Nmt=Tg(TG),Dm=X1;(xG&&Dm(new xG(new ArrayBuffer(1)))!=G2e||uC&&Dm(new uC)!=O2e||bG&&Dm(bG.resolve())!=B2e||L1&&Dm(new L1)!=$2e||TG&&Dm(new TG)!=F2e)&&(Dm=_(function(e){var t=X1(e),r=t==_mt?e.constructor:void 0,n=r?Tg(r):"";if(n)switch(n){case Lmt:return G2e;case Dmt:return O2e;case Imt:return B2e;case Mmt:return $2e;case Nmt:return F2e}return t},"getTag"));CG=Dm,Pmt=1,z2e="[object Arguments]",V2e="[object Array]",S5="[object Object]",Omt=Object.prototype,W2e=Omt.hasOwnProperty;s(_Se,"baseIsEqualDeep");_(_Se,"baseIsEqualDeep");Bmt=_Se;s(tW,"baseIsEqual");_(tW,"baseIsEqual");LSe=tW,$mt=1,Fmt=2;s(DSe,"baseIsMatch");_(DSe,"baseIsMatch");Gmt=DSe;s(ISe,"isStrictComparable");_(ISe,"isStrictComparable");MSe=ISe;s(NSe,"getMatchData");_(NSe,"getMatchData");zmt=NSe;s(PSe,"matchesStrictComparable");_(PSe,"matchesStrictComparable");OSe=PSe;s(BSe,"baseMatches");_(BSe,"baseMatches");Vmt=BSe,Wmt="[object Symbol]";s($Se,"isSymbol");_($Se,"isSymbol");IR=$Se,qmt=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Hmt=/^\w*$/;s(FSe,"isKey");_(FSe,"isKey");rW=FSe,Umt="Expected a function";s(MR,"memoize");_(MR,"memoize");MR.Cache=_R;Ymt=MR,jmt=500;s(GSe,"memoizeCapped");_(GSe,"memoizeCapped");Xmt=GSe,Kmt=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Zmt=/\\(\\)?/g,Qmt=Xmt(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(Kmt,function(r,n,i,a){t.push(i?a.replace(Zmt,"$1"):n||r)}),t}),Jmt=Qmt,egt=1/0,q2e=su?su.prototype:void 0,H2e=q2e?q2e.toString:void 0;s(nW,"baseToString");_(nW,"baseToString");tgt=nW;s(zSe,"toString2");_(zSe,"toString");rgt=zSe;s(VSe,"castPath");_(VSe,"castPath");WSe=VSe,ngt=1/0;s(qSe,"toKey");_(qSe,"toKey");NR=qSe;s(HSe,"baseGet");_(HSe,"baseGet");USe=HSe;s(YSe,"get");_(YSe,"get");igt=YSe;s(jSe,"baseHasIn");_(jSe,"baseHasIn");agt=jSe;s(XSe,"hasPath");_(XSe,"hasPath");sgt=XSe;s(KSe,"hasIn");_(KSe,"hasIn");ogt=KSe,lgt=1,cgt=2;s(ZSe,"baseMatchesProperty");_(ZSe,"baseMatchesProperty");ugt=ZSe;s(QSe,"identity");_(QSe,"identity");iW=QSe;s(JSe,"baseProperty");_(JSe,"baseProperty");hgt=JSe;s(eEe,"basePropertyDeep");_(eEe,"basePropertyDeep");dgt=eEe;s(tEe,"property");_(tEe,"property");fgt=tEe;s(rEe,"baseIteratee");_(rEe,"baseIteratee");PR=rEe;s(nEe,"createBaseFor");_(nEe,"createBaseFor");pgt=nEe,mgt=pgt(),ggt=mgt;s(iEe,"baseForOwn");_(iEe,"baseForOwn");ygt=iEe;s(aEe,"createBaseEach");_(aEe,"createBaseEach");vgt=aEe,xgt=vgt(ygt),OR=xgt;s(sEe,"baseMap");_(sEe,"baseMap");bgt=sEe;s(oEe,"map");_(oEe,"map");hh=oEe;s(lEe,"baseFilter");_(lEe,"baseFilter");Tgt=lEe;s(cEe,"filter");_(cEe,"filter");Cgt=cEe;s(dg,"buildATNKey");_(dg,"buildATNKey");Mf=1,kgt=2,uEe=4,hEe=5,Z1=7,wgt=8,Sgt=9,Egt=10,Agt=11,dEe=12,aW=class{static{s(this,"AbstractTransition")}static{_(this,"AbstractTransition")}constructor(e){this.target=e}isEpsilon(){return!1}},sW=class extends aW{static{s(this,"AtomTransition")}static{_(this,"AtomTransition")}constructor(e,t){super(e),this.tokenType=t}},fEe=class extends aW{static{s(this,"EpsilonTransition")}static{_(this,"EpsilonTransition")}constructor(e){super(e)}isEpsilon(){return!0}},oW=class extends aW{static{s(this,"RuleTransition")}static{_(this,"RuleTransition")}constructor(e,t,r){super(e),this.rule=t,this.followState=r}isEpsilon(){return!0}};s(pEe,"createATN");_(pEe,"createATN");s(mEe,"createRuleStartAndStopATNStates");_(mEe,"createRuleStartAndStopATNStates");s(lW,"atom");_(lW,"atom");s(gEe,"repetition");_(gEe,"repetition");s(yEe,"repetitionSep");_(yEe,"repetitionSep");s(vEe,"repetitionMandatory");_(vEe,"repetitionMandatory");s(xEe,"repetitionMandatorySep");_(xEe,"repetitionMandatorySep");s(bEe,"alternation");_(bEe,"alternation");s(TEe,"option");_(TEe,"option");s($f,"block");_($f,"block");s(cW,"plus");_(cW,"plus");s(uW,"star");_(uW,"star");s(CEe,"optional");_(CEe,"optional");s(kh,"defineDecisionState");_(kh,"defineDecisionState");s(Sg,"makeAlts");_(Sg,"makeAlts");s(kEe,"getProdType2");_(kEe,"getProdType");s(wEe,"makeBlock");_(wEe,"makeBlock");s(BR,"tokenRef");_(BR,"tokenRef");s(SEe,"ruleRef");_(SEe,"ruleRef");s(EEe,"buildRuleHandle");_(EEe,"buildRuleHandle");s(_i,"epsilon");_(_i,"epsilon");s(ta,"newState");_(ta,"newState");s($R,"addTransition");_($R,"addTransition");s(AEe,"removeState");_(AEe,"removeState");WA={},kG=class{static{s(this,"ATNConfigSet")}static{_(this,"ATNConfigSet")}constructor(){this.map={},this.configs=[]}get size(){return this.configs.length}finalize(){this.map={}}add(e){let t=hW(e);t in this.map||(this.map[t]=this.configs.length,this.configs.push(e))}get elements(){return this.configs}get alts(){return hh(this.configs,e=>e.alt)}get key(){let e="";for(let t in this.map)e+=t+":";return e}};s(hW,"getATNConfigKey");_(hW,"getATNConfigKey");s(REe,"baseExtremum");_(REe,"baseExtremum");Rgt=REe;s(_Ee,"baseLt");_(_Ee,"baseLt");_gt=_Ee;s(LEe,"min");_(LEe,"min");Lgt=LEe,U2e=su?su.isConcatSpreadable:void 0;s(DEe,"isFlattenable");_(DEe,"isFlattenable");Dgt=DEe;s(dW,"baseFlatten");_(dW,"baseFlatten");IEe=dW;s(MEe,"flatMap");_(MEe,"flatMap");Igt=MEe;s(NEe,"baseFindIndex");_(NEe,"baseFindIndex");Mgt=NEe;s(PEe,"baseIsNaN");_(PEe,"baseIsNaN");Ngt=PEe;s(OEe,"strictIndexOf");_(OEe,"strictIndexOf");Pgt=OEe;s(BEe,"baseIndexOf");_(BEe,"baseIndexOf");Ogt=BEe;s($Ee,"arrayIncludes");_($Ee,"arrayIncludes");Bgt=$Ee;s(FEe,"arrayIncludesWith");_(FEe,"arrayIncludesWith");$gt=FEe;s(GEe,"noop");_(GEe,"noop");Fgt=GEe,Ggt=1/0,zgt=L1&&1/ZV(new L1([,-0]))[1]==Ggt?function(e){return new L1(e)}:Fgt,Vgt=zgt,Wgt=200;s(zEe,"baseUniq");_(zEe,"baseUniq");qgt=zEe;s(VEe,"uniqBy");_(VEe,"uniqBy");Hgt=VEe;s(WEe,"flatten");_(WEe,"flatten");Ugt=WEe;s(qEe,"arrayEach");_(qEe,"arrayEach");Ygt=qEe;s(HEe,"castFunction");_(HEe,"castFunction");jgt=HEe;s(UEe,"forEach");_(UEe,"forEach");z$=UEe,Xgt="[object Map]",Kgt="[object Set]",Zgt=Object.prototype,Qgt=Zgt.hasOwnProperty;s(YEe,"isEmpty");_(YEe,"isEmpty");Jgt=YEe;s(jEe,"arrayReduce");_(jEe,"arrayReduce");e0t=jEe;s(XEe,"baseReduce");_(XEe,"baseReduce");t0t=XEe;s(KEe,"reduce");_(KEe,"reduce");Y2e=KEe;s(ZEe,"createDFACache");_(ZEe,"createDFACache");QEe=class{static{s(this,"PredicateSet")}static{_(this,"PredicateSet")}constructor(){this.predicates=[]}is(e){return e>=this.predicates.length||this.predicates[e]}set(e,t){this.predicates[e]=t}toString(){let e="",t=this.predicates.length;for(let r=0;rconsole.log(n)),this.incomplete=(r=e?.incomplete)!==null&&r!==void 0?r:!1}initialize(e){this.atn=pEe(e.rules),this.dfas=JEe(this.atn)}validateAmbiguousAlternationAlternatives(){return[]}validateEmptyOrAlternatives(){return[]}buildLookaheadForAlternation(e){let{prodOccurrence:t,rule:r,hasPredicates:n,dynamicTokensEnabled:i}=e,a=this.dfas,o=this.logging,l=this.incomplete,u=dg(r,"Alternation",t),d=this.atn.decisionMap[u].decision,f=hh(cG({maxLookahead:1,occurrence:t,prodType:"Alternation",rule:r}),p=>hh(p,m=>m[0]));if(wG(f,!1)&&!i){let p=Y2e(f,(m,g,y)=>(z$(g,v=>{v&&(m[v.tokenTypeIdx]=y,z$(v.categoryMatches,x=>{m[x]=y}))}),m),{});return n?function(m){var g;let y=this.LA_FAST(1),v=p[y.tokenTypeIdx];if(m!==void 0&&v!==void 0){let x=(g=m[v])===null||g===void 0?void 0:g.GATE;if(x!==void 0&&x.call(this)===!1)return}return v}:function(){let m=this.LA_FAST(1);return p[m.tokenTypeIdx]}}else return n?function(p){let m=new QEe,g=p===void 0?0:p.length;for(let v=0;vhh(p,m=>m[0]));if(wG(f)&&f[0][0]&&!i){let p=f[0],m=Ugt(p);if(m.length===1&&Jgt(m[0].categoryMatches)){let y=m[0].tokenTypeIdx;return function(){return this.LA_FAST(1).tokenTypeIdx===y}}else{let g=Y2e(m,(y,v)=>(v!==void 0&&(y[v.tokenTypeIdx]=!0,z$(v.categoryMatches,x=>{y[x]=!0})),y),{});return function(){let y=this.LA_FAST(1);return g[y.tokenTypeIdx]===!0}}}return function(){let p=rA.call(this,a,d,j2e,o,l);return typeof p=="object"?!1:p===0}}};s(wG,"isLL1Sequence");_(wG,"isLL1Sequence");s(JEe,"initATNSimulator");_(JEe,"initATNSimulator");s(rA,"adaptivePredict");_(rA,"adaptivePredict");s(e4e,"performLookahead");_(e4e,"performLookahead");s(t4e,"computeLookaheadTarget");_(t4e,"computeLookaheadTarget");s(r4e,"reportLookaheadAmbiguity");_(r4e,"reportLookaheadAmbiguity");s(n4e,"buildAmbiguityError");_(n4e,"buildAmbiguityError");s(i4e,"getProductionDslName2");_(i4e,"getProductionDslName");s(a4e,"buildAdaptivePredictError");_(a4e,"buildAdaptivePredictError");s(s4e,"getExistingTargetState");_(s4e,"getExistingTargetState");s(o4e,"computeReachSet");_(o4e,"computeReachSet");s(l4e,"getReachableTarget");_(l4e,"getReachableTarget");s(c4e,"getUniqueAlt");_(c4e,"getUniqueAlt");s(fW,"newDFAState");_(fW,"newDFAState");s(SG,"addDFAEdge");_(SG,"addDFAEdge");s(pW,"addDFAState");_(pW,"addDFAState");s(u4e,"computeStartState");_(u4e,"computeStartState");s(fC,"closure");_(fC,"closure");s(h4e,"getEpsilonTarget");_(h4e,"getEpsilonTarget");s(d4e,"hasConfigInRuleStopState");_(d4e,"hasConfigInRuleStopState");s(f4e,"allConfigsInRuleStopStates");_(f4e,"allConfigsInRuleStopStates");s(p4e,"hasConflictTerminatingPrediction");_(p4e,"hasConflictTerminatingPrediction");s(m4e,"getConflictingAltSets");_(m4e,"getConflictingAltSets");s(g4e,"hasConflictingAltSet");_(g4e,"hasConflictingAltSet");s(y4e,"hasStateAssociatedWithOneAlt");_(y4e,"hasStateAssociatedWithOneAlt");s(v4e,"getBestGuess");_(v4e,"getBestGuess");gC();x4e=class{static{s(this,"CstNodeBuilder")}static{_(this,"CstNodeBuilder")}constructor(){this.nodeStack=[]}get current(){return this.nodeStack[this.nodeStack.length-1]??this.rootNode}buildRootNode(e){return this.rootNode=new gW(e),this.rootNode.root=this.rootNode,this.nodeStack=[this.rootNode],this.rootNode}buildCompositeNode(e){let t=new FR;return t.grammarSource=e,t.root=this.rootNode,this.current.content.push(t),this.nodeStack.push(t),t}buildLeafNode(e,t){let r=new qA(e.startOffset,e.image.length,aC(e),e.tokenType,!t);return r.grammarSource=t,r.root=this.rootNode,this.current.content.push(r),r}removeNode(e){let t=e.container;if(t){let r=t.content.indexOf(e);r>=0&&t.content.splice(r,1)}}addHiddenNodes(e){let t=[];for(let i of e){let a=new qA(i.startOffset,i.image.length,aC(i),i.tokenType,!0);a.root=this.rootNode,t.push(a)}let r=this.current,n=!1;if(r.content.length>0){r.content.push(...t);return}for(;r.container;){let i=r.container.content.indexOf(r);if(i>0){r.container.content.splice(i,0,...t),n=!0;break}r=r.container}n||this.rootNode.content.unshift(...t)}construct(e){let t=this.current;typeof e.$type=="string"&&!e.$infixName&&(this.current.astNode=e),e.$cstNode=t;let r=this.nodeStack.pop();r?.content.length===0&&this.removeNode(r)}},mW=class{static{s(this,"AbstractCstNode")}static{_(this,"AbstractCstNode")}get hidden(){return!1}get astNode(){let e=typeof this._astNode?.$type=="string"?this._astNode:this.container?.astNode;if(!e)throw new Error("This node has no associated AST element");return e}set astNode(e){this._astNode=e}get text(){return this.root.fullText.substring(this.offset,this.end)}},qA=class extends mW{static{s(this,"LeafCstNodeImpl")}static{_(this,"LeafCstNodeImpl")}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,t,r,n,i=!1){super(),this._hidden=i,this._offset=e,this._tokenType=n,this._length=t,this._range=r}},FR=class extends mW{static{s(this,"CompositeCstNodeImpl")}static{_(this,"CompositeCstNodeImpl")}constructor(){super(...arguments),this.content=new n0t(this)}get offset(){return this.firstNonHiddenNode?.offset??0}get length(){return this.end-this.offset}get end(){return this.lastNonHiddenNode?.end??0}get range(){let e=this.firstNonHiddenNode,t=this.lastNonHiddenNode;if(e&&t){if(this._rangeCache===void 0){let{range:r}=e,{range:n}=t;this._rangeCache={start:r.start,end:n.end.line=0;e--){let t=this.content[e];if(!t.hidden)return t}return this.content[this.content.length-1]}},n0t=class b4e extends Array{static{s(this,"_CstNodeContainer")}static{_(this,"CstNodeContainer")}constructor(t){super(),this.parent=t,Object.setPrototypeOf(this,b4e.prototype)}push(...t){return this.addParents(t),super.push(...t)}unshift(...t){return this.addParents(t),super.unshift(...t)}splice(t,r,...n){return this.addParents(n),super.splice(t,r,...n)}addParents(t){for(let r of t)r.container=this.parent}},gW=class extends FR{static{s(this,"RootCstNodeImpl")}static{_(this,"RootCstNodeImpl")}get text(){return this._text.substring(this.offset,this.end)}get fullText(){return this._text}constructor(e){super(),this._text="",this._text=e??""}},HA=Symbol("Datatype");s(nA,"isDataTypeNode");_(nA,"isDataTypeNode");X2e="\u200B",T4e=_(e=>e.endsWith(X2e)?e:e+X2e,"withRuleSuffix"),yW=class{static{s(this,"AbstractLangiumParser")}static{_(this,"AbstractLangiumParser")}constructor(e,t){this._unorderedGroups=new Map,this.allRules=new Map,this.lexer=e.parser.Lexer;let r=this.lexer.definition,n=e.LanguageMetaData.mode==="production";e.shared.profilers.LangiumProfiler?.isActive("parsing")?this.wrapper=new a0t(r,{...e.parser.ParserConfig,skipValidations:n,errorMessageProvider:e.parser.ParserErrorMessageProvider},t,e.shared.profilers.LangiumProfiler.createTask("parsing",e.LanguageMetaData.languageId)):this.wrapper=new S4e(r,{...e.parser.ParserConfig,skipValidations:n,errorMessageProvider:e.parser.ParserErrorMessageProvider},t)}alternatives(e,t){this.wrapper.wrapOr(e,t)}optional(e,t){this.wrapper.wrapOption(e,t)}many(e,t){this.wrapper.wrapMany(e,t)}atLeastOne(e,t){this.wrapper.wrapAtLeastOne(e,t)}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()}},C4e=class extends yW{static{s(this,"LangiumParser")}static{_(this,"LangiumParser")}get current(){return this.stack[this.stack.length-1]}constructor(e){super(e,!1),this.nodeBuilder=new x4e,this.stack=[],this.assignmentMap=new Map,this.operatorPrecedence=new Map,this.linker=e.references.Linker,this.converter=e.parser.ValueConverter,this.astReflection=e.shared.AstReflection}rule(e,t){let r=this.computeRuleType(e),n;P1(e)&&(n=e.name,this.registerPrecedenceMap(e));let i=this.wrapper.DEFINE_RULE(T4e(e.name),this.startImplementation(r,n,t).bind(this));return this.allRules.set(e.name,i),Ss(e)&&e.entry&&(this.mainRule=i),i}registerPrecedenceMap(e){let t=e.name,r=new Map;for(let n=0;n0&&(t=this.construct()),t===void 0)throw new Error("No result from parser");if(this.stack.length>0)throw new Error("Parser stack is not empty after parsing");return t}startImplementation(e,t,r){return n=>{let i=!this.isRecording()&&e!==void 0;if(i){let a={$type:e};this.stack.push(a),e===HA?a.value="":t!==void 0&&(a.$infixName=t)}return r(n),i?this.construct():void 0}}extractHiddenTokens(e){let t=this.lexerResult.hidden;if(!t.length)return[];let r=e.startOffset;for(let n=0;nr)return t.splice(0,n);return t.splice(0,t.length)}consume(e,t,r){let n=this.wrapper.wrapConsume(e,t);if(!this.isRecording()&&this.isValidToken(n)){let i=this.extractHiddenTokens(n);this.nodeBuilder.addHiddenNodes(i);let a=this.nodeBuilder.buildLeafNode(n,r),{assignment:o,crossRef:l}=this.getAssignment(r),u=this.current;if(o){let h=ph(r)?n.image:this.converter.convert(n.image,a);this.assign(o.operator,o.feature,h,a,l)}else if(nA(u)){let h=n.image;ph(r)||(h=this.converter.convert(h,a).toString()),u.value+=h}}}isValidToken(e){return!e.isInsertedInRecovery&&!isNaN(e.startOffset)&&typeof e.endOffset=="number"&&!isNaN(e.endOffset)}subrule(e,t,r,n,i){let a;!this.isRecording()&&!r&&(a=this.nodeBuilder.buildCompositeNode(n));let o;try{o=this.wrapper.wrapSubrule(e,t,i)}finally{this.isRecording()||(o===void 0&&!r&&(o=this.construct()),o!==void 0&&a&&a.length>0&&this.performSubruleAssignment(o,n,a))}}performSubruleAssignment(e,t,r){let{assignment:n,crossRef:i}=this.getAssignment(t);if(n)this.assign(n.operator,n.feature,e,r,i);else if(!n){let a=this.current;if(nA(a))a.value+=e.toString();else if(typeof e=="object"&&e){let l=this.assignWithoutOverride(e,a);this.stack.pop(),this.stack.push(l)}}}action(e,t){if(!this.isRecording()){let r=this.current;if(t.feature&&t.operator){r=this.construct(),this.nodeBuilder.removeNode(r.$cstNode),this.nodeBuilder.buildCompositeNode(t).content.push(r.$cstNode);let i={$type:e};this.stack.push(i),this.assign(t.operator,t.feature,r,r.$cstNode)}else r.$type=e}}construct(){if(this.isRecording())return;let e=this.stack.pop();return this.nodeBuilder.construct(e),"$infixName"in e?this.constructInfix(e,this.operatorPrecedence.get(e.$infixName)):nA(e)?this.converter.convert(e.value,e.$cstNode):(Bz(this.astReflection,e),e)}constructInfix(e,t){let r=e.parts;if(!Array.isArray(r)||r.length===0)return;let n=e.operators;if(!Array.isArray(n)||r.length<2)return r[0];let i=0,a=-1;for(let g=0;ga?(a=v.precedence,i=g):v.precedence===a&&(v.rightAssoc||(i=g))}let o=n.slice(0,i),l=n.slice(i+1),u=r.slice(0,i+1),h=r.slice(i+1),d={$infixName:e.$infixName,$type:e.$type,$cstNode:e.$cstNode,parts:u,operators:o},f={$infixName:e.$infixName,$type:e.$type,$cstNode:e.$cstNode,parts:h,operators:l},p=this.constructInfix(d,t),m=this.constructInfix(f,t);return{$type:e.$type,$cstNode:e.$cstNode,left:p,operator:n[i],right:m}}getAssignment(e){if(!this.assignmentMap.has(e)){let t=mg(e,fh);this.assignmentMap.set(e,{assignment:t,crossRef:t&&yg(t.terminal)?t.terminal.isMulti?"multi":"single":void 0})}return this.assignmentMap.get(e)}assign(e,t,r,n,i){let a=this.current,o;switch(i==="single"&&typeof r=="string"?o=this.linker.buildReference(a,t,n,r):i==="multi"&&typeof r=="string"?o=this.linker.buildMultiReference(a,t,n,r):o=r,e){case"=":{a[t]=o;break}case"?=":{a[t]=!0;break}case"+=":Array.isArray(a[t])||(a[t]=[]),a[t].push(o)}}assignWithoutOverride(e,t){for(let[n,i]of Object.entries(t)){let a=e[n];a===void 0?e[n]=i:Array.isArray(a)&&Array.isArray(i)&&(i.push(...a),e[n]=i)}let r=e.$cstNode;return r&&(r.astNode=void 0,e.$cstNode=void 0),e}get definitionErrors(){return this.wrapper.definitionErrors}},k4e=class{static{s(this,"AbstractParserErrorMessageProvider")}static{_(this,"AbstractParserErrorMessageProvider")}buildMismatchTokenMessage(e){return S1.buildMismatchTokenMessage(e)}buildNotAllInputParsedMessage(e){return S1.buildNotAllInputParsedMessage(e)}buildNoViableAltMessage(e){return S1.buildNoViableAltMessage(e)}buildEarlyExitMessage(e){return S1.buildEarlyExitMessage(e)}},vW=class extends k4e{static{s(this,"LangiumParserErrorMessageProvider")}static{_(this,"LangiumParserErrorMessageProvider")}buildMismatchTokenMessage({expected:e,actual:t}){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 \`${t.image}\`.`}buildNotAllInputParsedMessage({firstRedundant:e}){return`Expecting end of file but found \`${e.image}\`.`}},w4e=class extends yW{static{s(this,"LangiumCompletionParser")}static{_(this,"LangiumCompletionParser")}constructor(e){super(e,!0),this.tokens=[],this.elementStack=[],this.lastElementStack=[],this.nextTokenIndex=0,this.stackSize=0}action(){}construct(){}parse(e){this.resetState();let t=this.lexer.tokenize(e,{mode:"partial"});return this.tokens=t.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,t){let r=this.wrapper.DEFINE_RULE(T4e(e.name),this.startImplementation(t).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 t=>{let r=this.keepStackSize();try{e(t)}finally{this.resetStackSize(r)}}}removeUnexpectedElements(){this.elementStack.splice(this.stackSize)}keepStackSize(){let e=this.elementStack.length;return this.stackSize=e,e}resetStackSize(e){this.removeUnexpectedElements(),this.stackSize=e}consume(e,t,r){this.wrapper.wrapConsume(e,t),this.isRecording()||(this.lastElementStack=[...this.elementStack,r],this.nextTokenIndex=this.currIdx+1)}subrule(e,t,r,n,i){this.before(n),this.wrapper.wrapSubrule(e,t,i),this.after(n)}before(e){this.isRecording()||this.elementStack.push(e)}after(e){if(!this.isRecording()){let t=this.elementStack.lastIndexOf(e);t>=0&&this.elementStack.splice(t)}}get currIdx(){return this.wrapper.currIdx}},i0t={recoveryEnabled:!0,nodeLocationTracking:"full",skipValidations:!0,errorMessageProvider:new vW},S4e=class extends Vdt{static{s(this,"ChevrotainWrapper")}static{_(this,"ChevrotainWrapper")}constructor(e,t,r){let n=t&&"maxLookahead"in t;super(e,{...i0t,lookaheadStrategy:n?new YV({maxLookahead:t.maxLookahead}):new r0t({logging:t.skipValidations?()=>{}:void 0,incomplete:r}),...t})}get IS_RECORDING(){return this.RECORDING_PHASE}DEFINE_RULE(e,t,r){return this.RULE(e,t,r)}wrapSelfAnalysis(){this.performSelfAnalysis()}wrapConsume(e,t){return this.consume(e,t,void 0)}wrapSubrule(e,t,r){return this.subrule(e,t,{ARGS:[r]})}wrapOr(e,t){this.or(e,t)}wrapOption(e,t){this.option(e,t)}wrapMany(e,t){this.many(e,t)}wrapAtLeastOne(e,t){this.atLeastOne(e,t)}rule(e){return e.call(this,{})}},a0t=class extends S4e{static{s(this,"ProfilerWrapper")}static{_(this,"ProfilerWrapper")}constructor(e,t,r,n){super(e,t,r),this.task=n}rule(e){this.task.start(),this.task.startSubTask(this.ruleName(e));try{return super.rule(e)}finally{this.task.stopSubTask(this.ruleName(e)),this.task.stop()}}ruleName(e){return e.ruleName}subrule(e,t,r){this.task.startSubTask(this.ruleName(t));try{return super.subrule(e,t,r)}finally{this.task.stopSubTask(this.ruleName(t))}}};s(GR,"createParser");_(GR,"createParser");s(E4e,"buildRules");_(E4e,"buildRules");s(A4e,"buildInfixRule");_(A4e,"buildInfixRule");s(Nf,"buildElement");_(Nf,"buildElement");s(R4e,"buildAction");_(R4e,"buildAction");s(_4e,"buildRuleCall");_(_4e,"buildRuleCall");s(L4e,"buildRuleCallPredicate");_(L4e,"buildRuleCallPredicate");s(Ul,"buildPredicate");_(Ul,"buildPredicate");s(D4e,"buildAlternatives");_(D4e,"buildAlternatives");s(I4e,"buildUnorderedGroup");_(I4e,"buildUnorderedGroup");s(M4e,"buildGroup");_(M4e,"buildGroup");s(pC,"getGuardCondition");_(pC,"getGuardCondition");s(xW,"buildCrossReference");_(xW,"buildCrossReference");s(N4e,"buildKeyword");_(N4e,"buildKeyword");s(bW,"wrap");_(bW,"wrap");s(zR,"getRule");_(zR,"getRule");s(P4e,"getRuleName");_(P4e,"getRuleName");s(UA,"getToken");_(UA,"getToken");s(TW,"createCompletionParser");_(TW,"createCompletionParser");s(CW,"createLangiumParser");_(CW,"createLangiumParser");s(kW,"prepareLangiumParser");_(kW,"prepareLangiumParser");VR=class{static{s(this,"DefaultTokenBuilder")}static{_(this,"DefaultTokenBuilder")}constructor(){this.diagnostics=[]}buildTokens(e,t){let r=Ln(pR(e,!1)),n=this.buildTerminalTokens(r),i=this.buildKeywordTokens(r,n,t);return i.push(...n),i}flushLexingReport(e){return{diagnostics:this.popDiagnostics()}}popDiagnostics(){let e=[...this.diagnostics];return this.diagnostics=[],e}buildTerminalTokens(e){return e.filter(sl).filter(t=>!t.fragment).map(t=>this.buildTerminalToken(t)).toArray()}buildTerminalToken(e){let t=CC(e),r=this.requiresCustomPattern(t)?this.regexPatternFunction(t):t,n={name:e.name,PATTERN:r};return typeof r=="function"&&(n.LINE_BREAKS=!0),e.hidden&&(n.GROUP=fR(t)?ws.SKIPPED:"hidden"),n}requiresCustomPattern(e){return!!(e.flags.includes("u")||e.flags.includes("s"))}regexPatternFunction(e){let t=new RegExp(e,e.flags+"y");return(r,n)=>(t.lastIndex=n,t.exec(r))}buildKeywordTokens(e,t,r){return e.filter(gg).flatMap(n=>Th(n).filter(ph)).distinct(n=>n.value).toArray().sort((n,i)=>i.value.length-n.value.length).map(n=>this.buildKeywordToken(n,t,!!r?.caseInsensitive))}buildKeywordToken(e,t,r){let n=this.buildKeywordPattern(e,r),i={name:e.value,PATTERN:n,LONGER_ALT:this.findLongerAlt(e,t)};return typeof n=="function"&&(i.LINE_BREAKS=!0),i}buildKeywordPattern(e,t){return t?new RegExp(W1(e.value),"i"):e.value}findLongerAlt(e,t){return t.reduce((r,n)=>{let i=n?.PATTERN;return i?.source&&gV("^"+i.source+"$",e.value)&&r.push(n),r},[])}},wW=class{static{s(this,"DefaultValueConverter")}static{_(this,"DefaultValueConverter")}convert(e,t){let r=t.grammarSource;if(yg(r)&&(r=TV(r)),mh(r)){let n=r.rule.ref;if(!n)throw new Error("This cst node was not parsed by a rule.");return this.runConverter(n,e,t)}return e}runConverter(e,t,r){switch(e.name.toUpperCase()){case"INT":return eu.convertInt(t);case"STRING":return eu.convertString(t);case"ID":return eu.convertID(t)}switch(LV(e)?.toLowerCase()){case"number":return eu.convertNumber(t);case"boolean":return eu.convertBoolean(t);case"bigint":return eu.convertBigint(t);case"date":return eu.convertDate(t);default:return t}}};(function(e){function t(h){let d="";for(let f=1;f{this.resolve=r=>(e(r),this),this.reject=r=>(t(r),this)})}},K2e=class EG{static{s(this,"_FullTextDocument")}static{_(this,"FullTextDocument")}constructor(t,r,n,i){this._uri=t,this._languageId=r,this._version=n,this._content=i,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(t){if(t){let r=this.offsetAt(t.start),n=this.offsetAt(t.end);return this._content.substring(r,n)}return this._content}update(t,r){for(let n of t)if(EG.isIncremental(n)){let i=AW(n.range),a=this.offsetAt(i.start),o=this.offsetAt(i.end);this._content=this._content.substring(0,a)+n.text+this._content.substring(o,this._content.length);let l=Math.max(i.start.line,0),u=Math.max(i.end.line,0),h=this._lineOffsets,d=AG(n.text,!1,a);if(u-l===d.length)for(let p=0,m=d.length;pt?i=o:n=o+1}let a=n-1;return t=this.ensureBeforeEOL(t,r[a]),{line:a,character:t-r[a]}}offsetAt(t){let r=this.getLineOffsets();if(t.line>=r.length)return this._content.length;if(t.line<0)return 0;let n=r[t.line];if(t.character<=0)return n;let i=t.line+1r&&EW(this._content.charCodeAt(t-1));)t--;return t}get lineCount(){return this.getLineOffsets().length}static isIncremental(t){let r=t;return r!=null&&typeof r.text=="string"&&r.range!==void 0&&(r.rangeLength===void 0||typeof r.rangeLength=="number")}static isFull(t){let r=t;return r!=null&&typeof r.text=="string"&&r.range===void 0&&r.rangeLength===void 0}};(function(e){function t(i,a,o,l){return new K2e(i,a,o,l)}s(t,"create"),_(t,"create"),e.create=t;function r(i,a,o){if(i instanceof K2e)return i.update(a,o),i;throw new Error("TextDocument.update: document must be created by TextDocument.create")}s(r,"update"),_(r,"update"),e.update=r;function n(i,a){let o=i.getText(),l=jA(a.map(B4e),(d,f)=>{let p=d.range.start.line-f.range.start.line;return p===0?d.range.start.character-f.range.start.character:p}),u=0,h=[];for(let d of l){let f=i.offsetAt(d.range.start);if(fu&&h.push(o.substring(u,f)),d.newText.length&&h.push(d.newText),u=i.offsetAt(d.range.end)}return h.push(o.substr(u)),h.join("")}s(n,"applyEdits"),_(n,"applyEdits"),e.applyEdits=n})(YA||(YA={}));s(jA,"mergeSort");_(jA,"mergeSort");s(AG,"computeLineOffsets");_(AG,"computeLineOffsets");s(EW,"isEOL");_(EW,"isEOL");s(AW,"getWellformedRange");_(AW,"getWellformedRange");s(B4e,"getWellformedEdit");_(B4e,"getWellformedEdit");(()=>{"use strict";var e={975:D=>{function R(L){if(typeof L!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(L))}s(R,"e2"),_(R,"e");function E(L,P){for(var B,O="",$=0,G=-1,V=0,z=0;z<=L.length;++z){if(z2){var W=O.lastIndexOf("/");if(W!==O.length-1){W===-1?(O="",$=0):$=(O=O.slice(0,W)).length-1-O.lastIndexOf("/"),G=z,V=0;continue}}else if(O.length===2||O.length===1){O="",$=0,G=z,V=0;continue}}P&&(O.length>0?O+="/..":O="..",$=2)}else O.length>0?O+="/"+L.slice(G+1,z):O=L.slice(G+1,z),$=z-G-1;G=z,V=0}else B===46&&V!==-1?++V:V=-1}return O}s(E,"r2"),_(E,"r");var I={resolve:_(function(){for(var L,P="",B=!1,O=arguments.length-1;O>=-1&&!B;O--){var $;O>=0?$=arguments[O]:(L===void 0&&(L=process.cwd()),$=L),R($),$.length!==0&&(P=$+"/"+P,B=$.charCodeAt(0)===47)}return P=E(P,!B),B?P.length>0?"/"+P:"/":P.length>0?P:"."},"resolve"),normalize:_(function(L){if(R(L),L.length===0)return".";var P=L.charCodeAt(0)===47,B=L.charCodeAt(L.length-1)===47;return(L=E(L,!P)).length!==0||P||(L="."),L.length>0&&B&&(L+="/"),P?"/"+L:L},"normalize"),isAbsolute:_(function(L){return R(L),L.length>0&&L.charCodeAt(0)===47},"isAbsolute"),join:_(function(){if(arguments.length===0)return".";for(var L,P=0;P0&&(L===void 0?L=B:L+="/"+B)}return L===void 0?".":I.normalize(L)},"join"),relative:_(function(L,P){if(R(L),R(P),L===P||(L=I.resolve(L))===(P=I.resolve(P)))return"";for(var B=1;Bz){if(P.charCodeAt(G+H)===47)return P.slice(G+H+1);if(H===0)return P.slice(G+H)}else $>z&&(L.charCodeAt(B+H)===47?W=H:H===0&&(W=0));break}var j=L.charCodeAt(B+H);if(j!==P.charCodeAt(G+H))break;j===47&&(W=H)}var Q="";for(H=B+W+1;H<=O;++H)H!==O&&L.charCodeAt(H)!==47||(Q.length===0?Q+="..":Q+="/..");return Q.length>0?Q+P.slice(G+W):(G+=W,P.charCodeAt(G)===47&&++G,P.slice(G))},"relative"),_makeLong:_(function(L){return L},"_makeLong"),dirname:_(function(L){if(R(L),L.length===0)return".";for(var P=L.charCodeAt(0),B=P===47,O=-1,$=!0,G=L.length-1;G>=1;--G)if((P=L.charCodeAt(G))===47){if(!$){O=G;break}}else $=!1;return O===-1?B?"/":".":B&&O===1?"//":L.slice(0,O)},"dirname"),basename:_(function(L,P){if(P!==void 0&&typeof P!="string")throw new TypeError('"ext" argument must be a string');R(L);var B,O=0,$=-1,G=!0;if(P!==void 0&&P.length>0&&P.length<=L.length){if(P.length===L.length&&P===L)return"";var V=P.length-1,z=-1;for(B=L.length-1;B>=0;--B){var W=L.charCodeAt(B);if(W===47){if(!G){O=B+1;break}}else z===-1&&(G=!1,z=B+1),V>=0&&(W===P.charCodeAt(V)?--V==-1&&($=B):(V=-1,$=z))}return O===$?$=z:$===-1&&($=L.length),L.slice(O,$)}for(B=L.length-1;B>=0;--B)if(L.charCodeAt(B)===47){if(!G){O=B+1;break}}else $===-1&&(G=!1,$=B+1);return $===-1?"":L.slice(O,$)},"basename"),extname:_(function(L){R(L);for(var P=-1,B=0,O=-1,$=!0,G=0,V=L.length-1;V>=0;--V){var z=L.charCodeAt(V);if(z!==47)O===-1&&($=!1,O=V+1),z===46?P===-1?P=V:G!==1&&(G=1):P!==-1&&(G=-1);else if(!$){B=V+1;break}}return P===-1||O===-1||G===0||G===1&&P===O-1&&P===B+1?"":L.slice(P,O)},"extname"),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(P,B){var O=B.dir||B.root,$=B.base||(B.name||"")+(B.ext||"");return O?O===B.root?O+$:O+"/"+$:$})(0,L)},"format"),parse:_(function(L){R(L);var P={root:"",dir:"",base:"",ext:"",name:""};if(L.length===0)return P;var B,O=L.charCodeAt(0),$=O===47;$?(P.root="/",B=1):B=0;for(var G=-1,V=0,z=-1,W=!0,H=L.length-1,j=0;H>=B;--H)if((O=L.charCodeAt(H))!==47)z===-1&&(W=!1,z=H+1),O===46?G===-1?G=H:j!==1&&(j=1):G!==-1&&(j=-1);else if(!W){V=H+1;break}return G===-1||z===-1||j===0||j===1&&G===z-1&&G===V+1?z!==-1&&(P.base=P.name=V===0&&$?L.slice(1,z):L.slice(V,z)):(V===0&&$?(P.name=L.slice(1,G),P.base=L.slice(1,z)):(P.name=L.slice(V,G),P.base=L.slice(V,z)),P.ext=L.slice(G,z)),V>0?P.dir=L.slice(0,V-1):$&&(P.dir="/"),P},"parse"),sep:"/",delimiter:":",win32:null,posix:null};I.posix=I,D.exports=I}},t={};function r(D){var R=t[D];if(R!==void 0)return R.exports;var E=t[D]={exports:{}};return e[D](E,E.exports,r),E.exports}s(r,"r"),_(r,"r"),r.d=(D,R)=>{for(var E in R)r.o(R,E)&&!r.o(D,E)&&Object.defineProperty(D,E,{enumerable:!0,get:R[E]})},r.o=(D,R)=>Object.prototype.hasOwnProperty.call(D,R),r.r=D=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(D,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(D,"__esModule",{value:!0})};var n={};let i;r.r(n),r.d(n,{URI:_(()=>p,"URI"),Utils:_(()=>N,"Utils")}),typeof process=="object"?i=process.platform==="win32":typeof navigator=="object"&&(i=navigator.userAgent.indexOf("Windows")>=0);let a=/^\w[\w\d+.-]*$/,o=/^\//,l=/^\/\//;function u(D,R){if(!D.scheme&&R)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${D.authority}", path: "${D.path}", query: "${D.query}", fragment: "${D.fragment}"}`);if(D.scheme&&!a.test(D.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(D.path){if(D.authority){if(!o.test(D.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(l.test(D.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}}s(u,"a"),_(u,"a");let h="",d="/",f=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class p{static{s(this,"l")}static{_(this,"l")}static isUri(R){return R instanceof p||!!R&&typeof R.authority=="string"&&typeof R.fragment=="string"&&typeof R.path=="string"&&typeof R.query=="string"&&typeof R.scheme=="string"&&typeof R.fsPath=="string"&&typeof R.with=="function"&&typeof R.toString=="function"}scheme;authority;path;query;fragment;constructor(R,E,I,L,P,B=!1){typeof R=="object"?(this.scheme=R.scheme||h,this.authority=R.authority||h,this.path=R.path||h,this.query=R.query||h,this.fragment=R.fragment||h):(this.scheme=(function(O,$){return O||$?O:"file"})(R,B),this.authority=E||h,this.path=(function(O,$){switch(O){case"https":case"http":case"file":$?$[0]!==d&&($=d+$):$=d}return $})(this.scheme,I||h),this.query=L||h,this.fragment=P||h,u(this,B))}get fsPath(){return b(this,!1)}with(R){if(!R)return this;let{scheme:E,authority:I,path:L,query:P,fragment:B}=R;return E===void 0?E=this.scheme:E===null&&(E=h),I===void 0?I=this.authority:I===null&&(I=h),L===void 0?L=this.path:L===null&&(L=h),P===void 0?P=this.query:P===null&&(P=h),B===void 0?B=this.fragment:B===null&&(B=h),E===this.scheme&&I===this.authority&&L===this.path&&P===this.query&&B===this.fragment?this:new g(E,I,L,P,B)}static parse(R,E=!1){let I=f.exec(R);return I?new g(I[2]||h,k(I[4]||h),k(I[5]||h),k(I[7]||h),k(I[9]||h),E):new g(h,h,h,h,h)}static file(R){let E=h;if(i&&(R=R.replace(/\\/g,d)),R[0]===d&&R[1]===d){let I=R.indexOf(d,2);I===-1?(E=R.substring(2),R=d):(E=R.substring(2,I),R=R.substring(I)||d)}return new g("file",E,R,h,h)}static from(R){let E=new g(R.scheme,R.authority,R.path,R.query,R.fragment);return u(E,!0),E}toString(R=!1){return T(this,R)}toJSON(){return this}static revive(R){if(R){if(R instanceof p)return R;{let E=new g(R);return E._formatted=R.external,E._fsPath=R._sep===m?R.fsPath:null,E}}return R}}let m=i?1:void 0;class g extends p{static{s(this,"d")}static{_(this,"d")}_formatted=null;_fsPath=null;get fsPath(){return this._fsPath||(this._fsPath=b(this,!1)),this._fsPath}toString(R=!1){return R?T(this,!0):(this._formatted||(this._formatted=T(this,!1)),this._formatted)}toJSON(){let R={$mid:1};return this._fsPath&&(R.fsPath=this._fsPath,R._sep=m),this._formatted&&(R.external=this._formatted),this.path&&(R.path=this.path),this.scheme&&(R.scheme=this.scheme),this.authority&&(R.authority=this.authority),this.query&&(R.query=this.query),this.fragment&&(R.fragment=this.fragment),R}}let y={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 v(D,R,E){let I,L=-1;for(let P=0;P=97&&B<=122||B>=65&&B<=90||B>=48&&B<=57||B===45||B===46||B===95||B===126||R&&B===47||E&&B===91||E&&B===93||E&&B===58)L!==-1&&(I+=encodeURIComponent(D.substring(L,P)),L=-1),I!==void 0&&(I+=D.charAt(P));else{I===void 0&&(I=D.substr(0,P));let O=y[B];O!==void 0?(L!==-1&&(I+=encodeURIComponent(D.substring(L,P)),L=-1),I+=O):L===-1&&(L=P)}}return L!==-1&&(I+=encodeURIComponent(D.substring(L))),I!==void 0?I:D}s(v,"m"),_(v,"m");function x(D){let R;for(let E=0;E1&&D.scheme==="file"?`//${D.authority}${D.path}`:D.path.charCodeAt(0)===47&&(D.path.charCodeAt(1)>=65&&D.path.charCodeAt(1)<=90||D.path.charCodeAt(1)>=97&&D.path.charCodeAt(1)<=122)&&D.path.charCodeAt(2)===58?R?D.path.substr(1):D.path[1].toLowerCase()+D.path.substr(2):D.path,i&&(E=E.replace(/\//g,"\\")),E}s(b,"v"),_(b,"v");function T(D,R){let E=R?x:v,I="",{scheme:L,authority:P,path:B,query:O,fragment:$}=D;if(L&&(I+=L,I+=":"),(P||L==="file")&&(I+=d,I+=d),P){let G=P.indexOf("@");if(G!==-1){let V=P.substr(0,G);P=P.substr(G+1),G=V.lastIndexOf(":"),G===-1?I+=E(V,!1,!1):(I+=E(V.substr(0,G),!1,!1),I+=":",I+=E(V.substr(G+1),!1,!0)),I+="@"}P=P.toLowerCase(),G=P.lastIndexOf(":"),G===-1?I+=E(P,!1,!0):(I+=E(P.substr(0,G),!1,!0),I+=P.substr(G))}if(B){if(B.length>=3&&B.charCodeAt(0)===47&&B.charCodeAt(2)===58){let G=B.charCodeAt(1);G>=65&&G<=90&&(B=`/${String.fromCharCode(G+32)}:${B.substr(3)}`)}else if(B.length>=2&&B.charCodeAt(1)===58){let G=B.charCodeAt(0);G>=65&&G<=90&&(B=`${String.fromCharCode(G+32)}:${B.substr(2)}`)}I+=E(B,!0,!1)}return O&&(I+="?",I+=E(O,!1,!1)),$&&(I+="#",I+=R?$:v($,!1,!1)),I}s(T,"b"),_(T,"b");function w(D){try{return decodeURIComponent(D)}catch{return D.length>3?D.substr(0,3)+w(D.substr(3)):D}}s(w,"C"),_(w,"C");let C=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function k(D){return D.match(C)?D.replace(C,(R=>w(R))):D}s(k,"w"),_(k,"w");var S=r(975);let A=S.posix||S,M="/";var N;(function(D){D.joinPath=function(R,...E){return R.with({path:A.join(R.path,...E)})},D.resolvePath=function(R,...E){let I=R.path,L=!1;I[0]!==M&&(I=M+I,L=!0);let P=A.resolve(I,...E);return L&&P[0]===M&&!R.authority&&(P=P.substring(1)),R.with({path:P})},D.dirname=function(R){if(R.path.length===0||R.path===M)return R;let E=A.dirname(R.path);return E.length===1&&E.charCodeAt(0)===46&&(E=""),R.with({path:E})},D.basename=function(R){return A.basename(R.path)},D.extname=function(R){return A.extname(R.path)}})(N||(N={})),$4e=n})();({URI:Ao,Utils:wT}=$4e);(function(e){e.basename=wT.basename,e.dirname=wT.dirname,e.extname=wT.extname,e.joinPath=wT.joinPath,e.resolvePath=wT.resolvePath;let t=typeof process=="object"&&process?.platform==="win32";function r(o,l){return o?.toString()===l?.toString()}s(r,"equals"),_(r,"equals"),e.equals=r;function n(o,l){let u=typeof o=="string"?Ao.parse(o).path:o.path,h=typeof l=="string"?Ao.parse(l).path:l.path,d=u.split("/").filter(y=>y.length>0),f=h.split("/").filter(y=>y.length>0);if(t){let y=/^[A-Z]:$/;if(d[0]&&y.test(d[0])&&(d[0]=d[0].toLowerCase()),f[0]&&y.test(f[0])&&(f[0]=f[0].toLowerCase()),d[0]!==f[0])return h.substring(1)}let p=0;for(;p({name:n.name,uri:ks.joinPath(Ao.parse(t),n.name).toString(),element:n.element})):[]}all(){return this.collectValues(this.root)}findAll(e){let t=this.getNode(ks.normalize(e),!1);return t?this.collectValues(t):[]}getNode(e,t){let r=e.split("/");e.charAt(e.length-1)==="/"&&r.pop();let n=this.root;for(let i of r){let a=n.children.get(i);if(!a)if(t)a={name:i,children:new Map,parent:n},n.children.set(i,a);else return;n=a}return n}collectValues(e){let t=[];e.element&&t.push(e.element);for(let r of e.children.values())t.push(...this.collectValues(r));return t}};(function(e){e[e.Changed=0]="Changed",e[e.Parsed=1]="Parsed",e[e.IndexedContent=2]="IndexedContent",e[e.ComputedScopes=3]="ComputedScopes",e[e.Linked=4]="Linked",e[e.IndexedReferences=5]="IndexedReferences",e[e.Validated=6]="Validated"})(Kr||(Kr={}));F4e=class{static{s(this,"DefaultLangiumDocumentFactory")}static{_(this,"DefaultLangiumDocumentFactory")}constructor(e){this.serviceRegistry=e.ServiceRegistry,this.textDocuments=e.workspace.TextDocuments,this.fileSystemProvider=e.workspace.FileSystemProvider}async fromUri(e,t=Hn.CancellationToken.None){let r=await this.fileSystemProvider.readFile(e);return this.createAsync(e,r,t)}fromTextDocument(e,t,r){return t=t??Ao.parse(e.uri),Hn.CancellationToken.is(r)?this.createAsync(t,e,r):this.create(t,e,r)}fromString(e,t,r){return Hn.CancellationToken.is(r)?this.createAsync(t,e,r):this.create(t,e,r)}fromModel(e,t){return this.create(t,{$model:e})}create(e,t,r){if(typeof t=="string"){let n=this.parse(e,t,r);return this.createLangiumDocument(n,e,void 0,t)}else if("$model"in t){let n={value:t.$model,parserErrors:[],lexerErrors:[]};return this.createLangiumDocument(n,e)}else{let n=this.parse(e,t.getText(),r);return this.createLangiumDocument(n,e,t)}}async createAsync(e,t,r){if(typeof t=="string"){let n=await this.parseAsync(e,t,r);return this.createLangiumDocument(n,e,void 0,t)}else{let n=await this.parseAsync(e,t.getText(),r);return this.createLangiumDocument(n,e,t)}}createLangiumDocument(e,t,r,n){let i;if(r)i={parseResult:e,uri:t,state:Kr.Parsed,references:[],textDocument:r};else{let a=this.createTextDocumentGetter(t,n);i={parseResult:e,uri:t,state:Kr.Parsed,references:[],get textDocument(){return a()}}}return e.value.$document=i,i}async update(e,t){let r=e.parseResult.value.$cstNode?.root.fullText,n=this.textDocuments?.get(e.uri.toString()),i=n?n.getText():await this.fileSystemProvider.readFile(e.uri);if(n)Object.defineProperty(e,"textDocument",{value:n});else{let a=this.createTextDocumentGetter(e.uri,i);Object.defineProperty(e,"textDocument",{get:a})}return r!==i&&(e.parseResult=await this.parseAsync(e.uri,i,t),e.parseResult.value.$document=e),e.state=Kr.Parsed,e}parse(e,t,r){return this.serviceRegistry.getServices(e).parser.LangiumParser.parse(t,r)}parseAsync(e,t,r){return this.serviceRegistry.getServices(e).parser.AsyncParser.parse(t,r)}createTextDocumentGetter(e,t){let r=this.serviceRegistry,n;return()=>n??(n=YA.create(e.toString(),r.getServices(e).LanguageMetaData.languageId,0,t??""))}},G4e=class{static{s(this,"DefaultLangiumDocuments")}static{_(this,"DefaultLangiumDocuments")}constructor(e){this.documentTrie=new RW,this.services=e,this.langiumDocumentFactory=e.workspace.LangiumDocumentFactory,this.documentBuilder=()=>e.workspace.DocumentBuilder}get all(){return Ln(this.documentTrie.all())}addDocument(e){let t=e.uri.toString();if(this.documentTrie.has(t))throw new Error(`A document with the URI '${t}' is already present.`);this.documentTrie.insert(t,e)}getDocument(e){let t=e.toString();return this.documentTrie.find(t)}getDocuments(e){let t=e.toString();return this.documentTrie.findAll(t)}async getOrCreateDocument(e,t){let r=this.getDocument(e);return r||(r=await this.langiumDocumentFactory.fromUri(e,t),this.addDocument(r),r)}createDocument(e,t,r){if(r)return this.langiumDocumentFactory.fromString(t,e,r).then(n=>(this.addDocument(n),n));{let n=this.langiumDocumentFactory.fromString(t,e);return this.addDocument(n),n}}hasDocument(e){return this.documentTrie.has(e.toString())}invalidateDocument(e){let t=e.toString(),r=this.documentTrie.find(t);return r&&this.documentBuilder().resetToState(r,Kr.Changed),r}deleteDocument(e){let t=e.toString(),r=this.documentTrie.find(t);return r&&(r.state=Kr.Changed,this.documentTrie.delete(t)),r}deleteDocuments(e){let t=e.toString(),r=this.documentTrie.findAll(t);for(let n of r)n.state=Kr.Changed;return this.documentTrie.delete(t),r}},Im=Symbol("RefResolving"),z4e=class{static{s(this,"DefaultLinker")}static{_(this,"DefaultLinker")}constructor(e){this.reflection=e.shared.AstReflection,this.langiumDocuments=()=>e.shared.workspace.LangiumDocuments,this.scopeProvider=e.references.ScopeProvider,this.astNodeLocator=e.workspace.AstNodeLocator,this.profiler=e.shared.profilers.LangiumProfiler,this.languageId=e.LanguageMetaData.languageId}async link(e,t=Hn.CancellationToken.None){if(this.profiler?.isActive("linking")){let r=this.profiler.createTask("linking",this.languageId);r.start();try{for(let n of jl(e.parseResult.value))await Ta(t),N1(n).forEach(i=>{let a=`${n.$type}:${i.property}`;r.startSubTask(a);try{this.doLink(i,e)}finally{r.stopSubTask(a)}})}finally{r.stop()}}else for(let r of jl(e.parseResult.value))await Ta(t),N1(r).forEach(n=>this.doLink(n,e))}doLink(e,t){let r=e.reference;if("_ref"in r&&r._ref===void 0){r._ref=Im;try{let n=this.getCandidate(e);if(Bm(n))r._ref=n;else{r._nodeDescription=n;let i=this.loadAstNode(n);r._ref=i??this.createLinkingError(e,n)}}catch(n){console.error(`An error occurred while resolving reference to '${r.$refText}':`,n);let i=n.message??String(n);r._ref={info:e,message:`An error occurred while resolving reference to '${r.$refText}': ${i}`}}t.references.push(r)}else if("_items"in r&&r._items===void 0){r._items=Im;try{let n=this.getCandidates(e),i=[];if(Bm(n))r._linkingError=n;else for(let a of n){let o=this.loadAstNode(a);o&&i.push({ref:o,$nodeDescription:a})}r._items=i}catch(n){r._linkingError={info:e,message:`An error occurred while resolving reference to '${r.$refText}': ${n}`},r._items=[]}t.references.push(r)}}unlink(e){for(let t of e.references)"_ref"in t?(t._ref=void 0,delete t._nodeDescription):"_items"in t&&(t._items=void 0,delete t._linkingError);e.references=[]}getCandidate(e){return this.scopeProvider.getScope(e).getElement(e.reference.$refText)??this.createLinkingError(e)}getCandidates(e){let r=this.scopeProvider.getScope(e).getElements(e.reference.$refText).distinct(n=>`${n.documentUri}#${n.path}`).toArray();return r.length>0?r:this.createLinkingError(e)}buildReference(e,t,r,n){let i=this,a={$refNode:r,$refText:n,_ref:void 0,get ref(){if(Vi(this._ref))return this._ref;if(Nz(this._nodeDescription)){let o=i.loadAstNode(this._nodeDescription);this._ref=o??i.createLinkingError({reference:a,container:e,property:t},this._nodeDescription)}else if(this._ref===void 0){this._ref=Im;let o=R1(e).$document,l=i.getLinkedNode({reference:a,container:e,property:t});if(l.error&&o&&o.state0))return this._linkingError=i.createLinkingError({reference:a,container:e,property:t})}};return a}throwCyclicReferenceError(e,t,r){throw new Error(`Cyclic reference resolution detected: ${this.astNodeLocator.getAstNodePath(e)}/${t} (symbol '${r}')`)}getLinkedNode(e){try{let t=this.getCandidate(e);if(Bm(t))return{error:t};let r=this.loadAstNode(t);return r?{node:r,descr:t}:{descr:t,error:this.createLinkingError(e,t)}}catch(t){console.error(`An error occurred while resolving reference to '${e.reference.$refText}':`,t);let r=t.message??String(t);return{error:{info:e,message:`An error occurred while resolving reference to '${e.reference.$refText}': ${r}`}}}}loadAstNode(e){if(e.node)return e.node;let t=this.langiumDocuments().getDocument(e.documentUri);if(t)return this.astNodeLocator.getAstNode(t.parseResult.value,e.path)}createLinkingError(e,t){let r=R1(e.container).$document;r&&r.stateyg(t)&&t.isMulti)}findDeclarations(e){if(e){let t=SV(e),r=e.astNode;if(t&&r){let n=r[t.feature];if(Cs(n)||iu(n))return mA(n);if(Array.isArray(n)){for(let i of n)if((Cs(i)||iu(i))&&i.$refNode&&i.$refNode.offset<=e.offset&&i.$refNode.end>=e.end)return mA(i)}}if(r){let n=this.nameProvider.getNameNode(r);if(n&&(n===e||iV(e,n)))return this.getSelfNodes(r)}}return[]}getSelfNodes(e){if(this.hasMultiReference){let t=this.index.findAllReferences(e,this.nodeLocator.getAstNodePath(e)),r=this.getNodeFromReferenceDescription(t.head());if(r){for(let n of N1(r))if(iu(n.reference)&&n.reference.items.some(i=>i.ref===e))return n.reference.items.map(i=>i.ref)}return[e]}else return[e]}getNodeFromReferenceDescription(e){if(!e)return;let t=this.documents.getDocument(e.sourceUri);if(t)return this.nodeLocator.getAstNode(t.parseResult.value,e.sourcePath)}findDeclarationNodes(e){let t=this.findDeclarations(e),r=[];for(let n of t){let i=this.nameProvider.getNameNode(n)??n.$cstNode;i&&r.push(i)}return r}findReferences(e,t){let r=[];t.includeDeclaration&&r.push(...this.getSelfReferences(e));let n=this.index.findAllReferences(e,this.nodeLocator.getAstNodePath(e));return t.documentUri&&(n=n.filter(i=>ks.equals(i.sourceUri,t.documentUri))),r.push(...n),Ln(r)}getSelfReferences(e){let t=this.getSelfNodes(e),r=[];for(let n of t){let i=this.nameProvider.getNameNode(n);if(i){let a=Yl(n),o=this.nodeLocator.getAstNodePath(n);r.push({sourceUri:a.uri,sourcePath:o,targetUri:a.uri,targetPath:o,segment:B1(i),local:!0})}}return r}},bh=class{static{s(this,"MultiMap")}static{_(this,"MultiMap")}constructor(e){if(this.map=new Map,e)for(let[t,r]of e)this.add(t,r)}get size(){return iC.sum(Ln(this.map.values()).map(e=>e.length))}clear(){this.map.clear()}delete(e,t){if(t===void 0)return this.map.delete(e);{let r=this.map.get(e);if(r){let n=r.indexOf(t);if(n>=0)return r.length===1?this.map.delete(e):r.splice(n,1),!0}return!1}}get(e){return this.map.get(e)??[]}getStream(e){let t=this.map.get(e);return t?Ln(t):D1}has(e,t){if(t===void 0)return this.map.has(e);{let r=this.map.get(e);return r?r.indexOf(t)>=0:!1}}add(e,t){return this.map.has(e)?this.map.get(e).push(t):this.map.set(e,[t]),this}addAll(e,t){return this.map.has(e)?this.map.get(e).push(...t):this.map.set(e,Array.from(t)),this}forEach(e){this.map.forEach((t,r)=>t.forEach(n=>e(n,r,this)))}[Symbol.iterator](){return this.entries().iterator()}entries(){return Ln(this.map.entries()).flatMap(([e,t])=>t.map(r=>[e,r]))}keys(){return Ln(this.map.keys())}values(){return Ln(this.map.values()).flat()}entriesGroupedByKey(){return Ln(this.map.entries())}},XA=class{static{s(this,"BiMap")}static{_(this,"BiMap")}get size(){return this.map.size}constructor(e){if(this.map=new Map,this.inverse=new Map,e)for(let[t,r]of e)this.set(t,r)}clear(){this.map.clear(),this.inverse.clear()}set(e,t){return this.map.set(e,t),this.inverse.set(t,e),this}get(e){return this.map.get(e)}getKey(e){return this.inverse.get(e)}delete(e){let t=this.map.get(e);return t!==void 0?(this.map.delete(e),this.inverse.delete(t),!0):!1}},q4e=class{static{s(this,"DefaultScopeComputation")}static{_(this,"DefaultScopeComputation")}constructor(e){this.nameProvider=e.references.NameProvider,this.descriptions=e.workspace.AstNodeDescriptionProvider}async collectExportedSymbols(e,t=Hn.CancellationToken.None){return this.collectExportedSymbolsForNode(e.parseResult.value,e,void 0,t)}async collectExportedSymbolsForNode(e,t,r=vC,n=Hn.CancellationToken.None){let i=[];this.addExportedSymbol(e,i,t);for(let a of r(e))await Ta(n),this.addExportedSymbol(a,i,t);return i}addExportedSymbol(e,t,r){let n=this.nameProvider.getName(e);n&&t.push(this.descriptions.createDescription(e,n,r))}async collectLocalSymbols(e,t=Hn.CancellationToken.None){let r=e.parseResult.value,n=new bh;for(let i of Th(r))await Ta(t),this.addLocalSymbol(i,e,n);return n}addLocalSymbol(e,t,r){let n=e.$container;if(n){let i=this.nameProvider.getName(e);i&&r.add(n,this.descriptions.createDescription(e,i,t))}}},RG=class{static{s(this,"StreamScope")}static{_(this,"StreamScope")}constructor(e,t,r){this.elements=e,this.outerScope=t,this.caseInsensitive=r?.caseInsensitive??!1,this.concatOuterScope=r?.concatOuterScope??!0}getAllElements(){return this.outerScope?this.elements.concat(this.outerScope.getAllElements()):this.elements}getElement(e){let t=this.caseInsensitive?e.toLowerCase():e,r=this.caseInsensitive?this.elements.find(n=>n.name.toLowerCase()===t):this.elements.find(n=>n.name===e);if(r)return r;if(this.outerScope)return this.outerScope.getElement(e)}getElements(e){let t=this.caseInsensitive?e.toLowerCase():e,r=this.caseInsensitive?this.elements.filter(n=>n.name.toLowerCase()===t):this.elements.filter(n=>n.name===e);return(this.concatOuterScope||r.isEmpty())&&this.outerScope?r.concat(this.outerScope.getElements(e)):r}},s0t=class{static{s(this,"MapScope")}static{_(this,"MapScope")}constructor(e,t,r){this.elements=new Map,this.caseInsensitive=r?.caseInsensitive??!1,this.concatOuterScope=r?.concatOuterScope??!0;for(let n of e){let i=this.caseInsensitive?n.name.toLowerCase():n.name;this.elements.set(i,n)}this.outerScope=t}getElement(e){let t=this.caseInsensitive?e.toLowerCase():e,r=this.elements.get(t);if(r)return r;if(this.outerScope)return this.outerScope.getElement(e)}getElements(e){let t=this.caseInsensitive?e.toLowerCase():e,r=this.elements.get(t),n=r?[r]:[];return(this.concatOuterScope||n.length>0)&&this.outerScope?Ln(n).concat(this.outerScope.getElements(e)):Ln(n)}getAllElements(){let e=Ln(this.elements.values());return this.outerScope&&(e=e.concat(this.outerScope.getAllElements())),e}},H4e=class{static{s(this,"MultiMapScope")}static{_(this,"MultiMapScope")}constructor(e,t,r){this.elements=new bh,this.caseInsensitive=r?.caseInsensitive??!1,this.concatOuterScope=r?.concatOuterScope??!0;for(let n of e){let i=this.caseInsensitive?n.name.toLowerCase():n.name;this.elements.add(i,n)}this.outerScope=t}getElement(e){let t=this.caseInsensitive?e.toLowerCase():e,r=this.elements.get(t)[0];if(r)return r;if(this.outerScope)return this.outerScope.getElement(e)}getElements(e){let t=this.caseInsensitive?e.toLowerCase():e,r=this.elements.get(t);return(this.concatOuterScope||r.length===0)&&this.outerScope?Ln(r).concat(this.outerScope.getElements(e)):Ln(r)}getAllElements(){let e=Ln(this.elements.values());return this.outerScope&&(e=e.concat(this.outerScope.getAllElements())),e}},o0t={getElement(){},getElements(){return D1},getAllElements(){return D1}},HR=class{static{s(this,"DisposableCache")}static{_(this,"DisposableCache")}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")}},LW=class extends HR{static{s(this,"SimpleCache")}static{_(this,"SimpleCache")}constructor(){super(...arguments),this.cache=new Map}has(e){return this.throwIfDisposed(),this.cache.has(e)}set(e,t){this.throwIfDisposed(),this.cache.set(e,t)}get(e,t){if(this.throwIfDisposed(),this.cache.has(e))return this.cache.get(e);if(t){let r=t();return this.cache.set(e,r),r}else return}delete(e){return this.throwIfDisposed(),this.cache.delete(e)}clear(){this.throwIfDisposed(),this.cache.clear()}},UR=class extends HR{static{s(this,"ContextCache")}static{_(this,"ContextCache")}constructor(e){super(),this.cache=new Map,this.converter=e??(t=>t)}has(e,t){return this.throwIfDisposed(),this.cacheForContext(e).has(t)}set(e,t,r){this.throwIfDisposed(),this.cacheForContext(e).set(t,r)}get(e,t,r){this.throwIfDisposed();let n=this.cacheForContext(e);if(n.has(t))return n.get(t);if(r){let i=r();return n.set(t,i),i}else return}delete(e,t){return this.throwIfDisposed(),this.cacheForContext(e).delete(t)}clear(e){if(this.throwIfDisposed(),e){let t=this.converter(e);this.cache.delete(t)}else this.cache.clear()}cacheForContext(e){let t=this.converter(e),r=this.cache.get(t);return r||(r=new Map,this.cache.set(t,r)),r}},U4e=class extends UR{static{s(this,"DocumentCache")}static{_(this,"DocumentCache")}constructor(e,t){super(r=>r.toString()),t?(this.toDispose.push(e.workspace.DocumentBuilder.onDocumentPhase(t,r=>{this.clear(r.uri.toString())})),this.toDispose.push(e.workspace.DocumentBuilder.onUpdate((r,n)=>{for(let i of n)this.clear(i)}))):this.toDispose.push(e.workspace.DocumentBuilder.onUpdate((r,n)=>{let i=r.concat(n);for(let a of i)this.clear(a)}))}},DW=class extends LW{static{s(this,"WorkspaceCache")}static{_(this,"WorkspaceCache")}constructor(e,t){super(),t?(this.toDispose.push(e.workspace.DocumentBuilder.onBuildPhase(t,()=>{this.clear()})),this.toDispose.push(e.workspace.DocumentBuilder.onUpdate((r,n)=>{n.length>0&&this.clear()}))):this.toDispose.push(e.workspace.DocumentBuilder.onUpdate(()=>{this.clear()}))}},Y4e=class{static{s(this,"DefaultScopeProvider")}static{_(this,"DefaultScopeProvider")}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 DW(e.shared)}getScope(e){let t=[],r=this.reflection.getReferenceType(e),n=Yl(e.container).localSymbols;if(n){let a=e.container;do n.has(a)&&t.push(n.getStream(a).filter(o=>this.reflection.isSubtype(o.type,r))),a=a.$container;while(a)}let i=this.getGlobalScope(r,e);for(let a=t.length-1;a>=0;a--)i=this.createScope(t[a],i);return i}createScope(e,t,r){return new RG(Ln(e),t,r)}createScopeForNodes(e,t,r){let n=Ln(e).map(i=>{let a=this.nameProvider.getName(i);if(a)return this.descriptions.createDescription(i,a)}).nonNullable();return new RG(n,t,r)}getGlobalScope(e,t){return this.globalScopeCache.get(e,()=>new H4e(this.indexManager.allElements(e)))}};s(IW,"isAstNodeWithComment");_(IW,"isAstNodeWithComment");s(_G,"isIntermediateReference");_(_G,"isIntermediateReference");j4e=class{static{s(this,"DefaultJsonSerializer")}static{_(this,"DefaultJsonSerializer")}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,t){let r=t??{},n=t?.replacer,i=_((o,l)=>this.replacer(o,l,r),"defaultReplacer"),a=n?(o,l)=>n(o,l,i):i;try{return this.currentDocument=Yl(e),JSON.stringify(e,a,t?.space)}finally{this.currentDocument=void 0}}deserialize(e,t){let r=t??{},n=JSON.parse(e);return this.linkNode(n,n,r),n}replacer(e,t,{refText:r,sourceText:n,textRegions:i,comments:a,uriConverter:o}){if(!this.ignoreProperties.has(e))if(Cs(t)){let l=t.ref,u=r?t.$refText:void 0;if(l){let h=Yl(l),d="";this.currentDocument&&this.currentDocument!==h&&(o?d=o(h.uri,l):d=h.uri.toString());let f=this.astNodeLocator.getAstNodePath(l);return{$ref:`${d}#${f}`,$refText:u}}else return{$error:t.error?.message??"Could not resolve reference",$refText:u}}else if(iu(t)){let l=r?t.$refText:void 0,u=[];for(let h of t.items){let d=h.ref,f=Yl(h.ref),p="";this.currentDocument&&this.currentDocument!==f&&(o?p=o(f.uri,d):p=f.uri.toString());let m=this.astNodeLocator.getAstNodePath(d);u.push(`${p}#${m}`)}return{$refs:u,$refText:l}}else if(Vi(t)){let l;if(i&&(l=this.addAstNodeRegionWithAssignmentsTo({...t}),(!e||t.$document)&&l?.$textRegion&&(l.$textRegion.documentURI=this.currentDocument?.uri.toString())),n&&!e&&(l??(l={...t}),l.$sourceText=t.$cstNode?.text),a){l??(l={...t});let u=this.commentProvider.getComment(t);u&&(l.$comment=u.replace(/\r/g,""))}return l??t}else return t}addAstNodeRegionWithAssignmentsTo(e){let t=_(r=>({offset:r.offset,end:r.end,length:r.length,range:r.range}),"createDocumentSegment");if(e.$cstNode){let r=e.$textRegion=t(e.$cstNode),n=r.assignments={};return Object.keys(e).filter(i=>!i.startsWith("$")).forEach(i=>{let a=kV(e.$cstNode,i).map(t);a.length!==0&&(n[i]=a)}),e}}linkNode(e,t,r,n,i,a){for(let[l,u]of Object.entries(e))if(Array.isArray(u))for(let h=0;h{await this.handleException(()=>e.call(t,r,n,i),"An error occurred during validation",n,r)}}async handleException(e,t,r,n){try{await e()}catch(i){if(Eg(i))throw i;console.error(`${t}:`,i),i instanceof Error&&i.stack&&console.error(i.stack);let a=i instanceof Error?i.message:String(i);r("error",`${t}: ${a}`,{node:n})}}addEntry(e,t){if(e==="AstNode"){this.entries.add("AstNode",t);return}for(let r of this.reflection.getAllSubTypes(e))this.entries.add(r,t)}getChecks(e,t){let r=Ln(this.entries.get(e)).concat(this.entries.get("AstNode"));return t&&(r=r.filter(n=>t.includes(n.category))),r.map(n=>n.check)}registerBeforeDocument(e,t=this){this.entriesBefore.push(this.wrapPreparationException(e,"An error occurred during set-up of the validation",t))}registerAfterDocument(e,t=this){this.entriesAfter.push(this.wrapPreparationException(e,"An error occurred during tear-down of the validation",t))}wrapPreparationException(e,t,r){return async(n,i,a,o)=>{await this.handleException(()=>e.call(r,n,i,a,o),t,i,n)}}get checksBefore(){return this.entriesBefore}get checksAfter(){return this.entriesAfter}getAllValidationCategories(e){return this.knownCategories}},Z4e=Object.freeze({validateNode:!0,validateChildren:!0}),Q4e=class{static{s(this,"DefaultDocumentValidator")}static{_(this,"DefaultDocumentValidator")}constructor(e){this.validationRegistry=e.validation.ValidationRegistry,this.metadata=e.LanguageMetaData,this.profiler=e.shared.profilers.LangiumProfiler,this.languageId=e.LanguageMetaData.languageId}async validateDocument(e,t={},r=Hn.CancellationToken.None){let n=e.parseResult,i=[];if(await Ta(r),(!t.categories||t.categories.includes("built-in"))&&(this.processLexingErrors(n,i,t),t.stopAfterLexingErrors&&i.some(a=>a.data?.code===al.LexingError)||(this.processParsingErrors(n,i,t),t.stopAfterParsingErrors&&i.some(a=>a.data?.code===al.ParsingError))||(this.processLinkingErrors(e,i,t),t.stopAfterLinkingErrors&&i.some(a=>a.data?.code===al.LinkingError))))return i;try{i.push(...await this.validateAst(n.value,t,r))}catch(a){if(Eg(a))throw a;console.error("An error occurred during validation:",a)}return await Ta(r),i}processLexingErrors(e,t,r){let n=[...e.lexerErrors,...e.lexerReport?.diagnostics??[]];for(let i of n){let a=i.severity??"error",o={severity:JT(a),range:{start:{line:i.line-1,character:i.column-1},end:{line:i.line-1,character:i.column+i.length-1}},message:i.message,data:NW(a),source:this.getSource()};t.push(o)}}processParsingErrors(e,t,r){for(let n of e.parserErrors){let i;if(isNaN(n.token.startOffset)){if("previousToken"in n){let a=n.previousToken;if(isNaN(a.startOffset)){let o={line:0,character:0};i={start:o,end:o}}else{let o={line:a.endLine-1,character:a.endColumn};i={start:o,end:o}}}}else i=aC(n.token);if(i){let a={severity:JT("error"),range:i,message:n.message,data:sg(al.ParsingError),source:this.getSource()};t.push(a)}}}processLinkingErrors(e,t,r){for(let n of e.references){let i=n.error;if(i){let a={node:i.info.container,range:n.$refNode?.range,property:i.info.property,index:i.info.index,data:{code:al.LinkingError,containerType:i.info.container.$type,property:i.info.property,refText:i.info.reference.$refText}};t.push(this.toDiagnostic("error",i.message,a))}}}async validateAst(e,t,r=Hn.CancellationToken.None){let n=[],i=_((a,o,l)=>{n.push(this.toDiagnostic(a,o,l))},"acceptor");return await this.validateAstBefore(e,t,i,r),await this.validateAstNodes(e,t,i,r),await this.validateAstAfter(e,t,i,r),n}async validateAstBefore(e,t,r,n=Hn.CancellationToken.None){let i=this.validationRegistry.checksBefore;for(let a of i)await Ta(n),await a(e,r,t.categories??[],n)}async validateAstNodes(e,t,r,n=Hn.CancellationToken.None){if(this.profiler?.isActive("validating")){let i=this.profiler.createTask("validating",this.languageId);i.start();try{let a=jl(e).iterator();for(let o of a){i.startSubTask(o.$type);let l=this.validateSingleNodeOptions(o,t);if(l.validateNode)try{let u=this.validationRegistry.getChecks(o.$type,t.categories);for(let h of u)await h(o,r,n)}finally{i.stopSubTask(o.$type)}l.validateChildren||a.prune()}}finally{i.stop()}}else{let i=jl(e).iterator();for(let a of i){await Ta(n);let o=this.validateSingleNodeOptions(a,t);if(o.validateNode){let l=this.validationRegistry.getChecks(a.$type,t.categories);for(let u of l)await u(a,r,n)}o.validateChildren||i.prune()}}}validateSingleNodeOptions(e,t){return Z4e}async validateAstAfter(e,t,r,n=Hn.CancellationToken.None){let i=this.validationRegistry.checksAfter;for(let a of i)await Ta(n),await a(e,r,t.categories??[],n)}toDiagnostic(e,t,r){return{message:t,range:MW(r),severity:JT(e),code:r.code,codeDescription:r.codeDescription,tags:r.tags,relatedInformation:r.relatedInformation,data:r.data,source:this.getSource()}}getSource(){return this.metadata.languageId}};s(MW,"getDiagnosticRange");_(MW,"getDiagnosticRange");s(JT,"toDiagnosticSeverity");_(JT,"toDiagnosticSeverity");s(NW,"toDiagnosticData");_(NW,"toDiagnosticData");(function(e){e.LexingError="lexing-error",e.LexingWarning="lexing-warning",e.LexingInfo="lexing-info",e.LexingHint="lexing-hint",e.ParsingError="parsing-error",e.LinkingError="linking-error"})(al||(al={}));J4e=class{static{s(this,"DefaultAstNodeDescriptionProvider")}static{_(this,"DefaultAstNodeDescriptionProvider")}constructor(e){this.astNodeLocator=e.workspace.AstNodeLocator,this.nameProvider=e.references.NameProvider}createDescription(e,t,r){let n=r??Yl(e);t??(t=this.nameProvider.getName(e));let i=this.astNodeLocator.getAstNodePath(e);if(!t)throw new Error(`Node at path ${i} has no name.`);let a,o=_(()=>a??(a=B1(this.nameProvider.getNameNode(e)??e.$cstNode)),"nameSegmentGetter");return{node:e,name:t,get nameSegment(){return o()},selectionSegment:B1(e.$cstNode),type:e.$type,documentUri:n.uri,path:i}}},e3e=class{static{s(this,"DefaultReferenceDescriptionProvider")}static{_(this,"DefaultReferenceDescriptionProvider")}constructor(e){this.nodeLocator=e.workspace.AstNodeLocator}async createDescriptions(e,t=Hn.CancellationToken.None){let r=[],n=e.parseResult.value;for(let i of jl(n))await Ta(t),N1(i).forEach(a=>{a.reference.error||r.push(...this.createInfoDescriptions(a))});return r}createInfoDescriptions(e){let t=e.reference;if(t.error||!t.$refNode)return[];let r=[];Cs(t)&&t.$nodeDescription?r=[t.$nodeDescription]:iu(t)&&(r=t.items.map(l=>l.$nodeDescription).filter(l=>l!==void 0));let n=Yl(e.container).uri,i=this.nodeLocator.getAstNodePath(e.container),a=[],o=B1(t.$refNode);for(let l of r)a.push({sourceUri:n,sourcePath:i,targetUri:l.documentUri,targetPath:l.path,segment:o,local:ks.equals(l.documentUri,n)});return a}},t3e=class{static{s(this,"DefaultAstNodeLocator")}static{_(this,"DefaultAstNodeLocator")}constructor(){this.segmentSeparator="/",this.indexSeparator="@"}getAstNodePath(e){if(e.$container){let t=this.getAstNodePath(e.$container),r=this.getPathSegment(e);return t+this.segmentSeparator+r}return""}getPathSegment({$containerProperty:e,$containerIndex:t}){if(!e)throw new Error("Missing '$containerProperty' in AST node.");return t!==void 0?e+this.indexSeparator+t:e}getAstNode(e,t){return t.split(this.segmentSeparator).reduce((n,i)=>{if(!n||i.length===0)return n;let a=i.indexOf(this.indexSeparator);if(a>0){let o=i.substring(0,a),l=parseInt(i.substring(a+1));return n[o]?.[l]}return n[i]},e)}},YR={};eR(YR,Lz(z1(),1));r3e=class{static{s(this,"DefaultConfigurationProvider")}static{_(this,"DefaultConfigurationProvider")}constructor(e){this._ready=new xh,this.onConfigurationSectionUpdateEmitter=new YR.Emitter,this.settings={},this.workspaceConfig=!1,this.serviceRegistry=e.ServiceRegistry}get ready(){return this._ready.promise}initialize(e){this.workspaceConfig=e.capabilities.workspace?.configuration??!1}async initialized(e){if(this.workspaceConfig){if(e.register){let t=this.serviceRegistry.all;e.register({section:t.map(r=>this.toSectionName(r.LanguageMetaData.languageId))})}if(e.fetchConfiguration){let t=this.serviceRegistry.all.map(n=>({section:this.toSectionName(n.LanguageMetaData.languageId)})),r=await e.fetchConfiguration(t);t.forEach((n,i)=>{this.updateSectionConfiguration(n.section,r[i])})}}this._ready.resolve()}updateConfiguration(e){typeof e.settings!="object"||e.settings===null||Object.entries(e.settings).forEach(([t,r])=>{this.updateSectionConfiguration(t,r),this.onConfigurationSectionUpdateEmitter.fire({section:t,configuration:r})})}updateSectionConfiguration(e,t){this.settings[e]=t}async getConfiguration(e,t){await this.ready;let r=this.toSectionName(e);if(this.settings[r])return this.settings[r][t]}toSectionName(e){return`${e}`}get onConfigurationSectionUpdate(){return this.onConfigurationSectionUpdateEmitter.event}},E5=Lz(ndt(),1);(function(e){function t(r){return{dispose:_(async()=>await r(),"dispose")}}s(t,"create"),_(t,"create"),e.create=t})(cg||(cg={}));n3e=class{static{s(this,"DefaultDocumentBuilder")}static{_(this,"DefaultDocumentBuilder")}constructor(e){this.updateBuildOptions={validation:{categories:["built-in","fast"]}},this.updateListeners=[],this.buildPhaseListeners=new bh,this.documentPhaseListeners=new bh,this.buildState=new Map,this.documentBuildWaiters=new Map,this.currentState=Kr.Changed,this.langiumDocuments=e.workspace.LangiumDocuments,this.langiumDocumentFactory=e.workspace.LangiumDocumentFactory,this.textDocuments=e.workspace.TextDocuments,this.indexManager=e.workspace.IndexManager,this.fileSystemProvider=e.workspace.FileSystemProvider,this.workspaceManager=()=>e.workspace.WorkspaceManager,this.serviceRegistry=e.ServiceRegistry}async build(e,t={},r=Hn.CancellationToken.None){for(let n of e){let i=n.uri.toString();if(n.state===Kr.Validated){if(typeof t.validation=="boolean"&&t.validation)this.resetToState(n,Kr.IndexedReferences);else if(typeof t.validation=="object"){let a=this.findMissingValidationCategories(n,t);a.length>0&&(this.buildState.set(i,{completed:!1,options:{validation:{categories:a}},result:this.buildState.get(i)?.result}),n.state=Kr.IndexedReferences)}}else this.buildState.delete(i)}this.currentState=Kr.Changed,await this.emitUpdate(e.map(n=>n.uri),[]),await this.buildDocuments(e,t,r)}async update(e,t,r=Hn.CancellationToken.None){this.currentState=Kr.Changed;let n=[];for(let l of t){let u=this.langiumDocuments.deleteDocuments(l);for(let h of u)n.push(h.uri),this.cleanUpDeleted(h)}let i=(await Promise.all(e.map(l=>this.findChangedUris(l)))).flat();for(let l of i){let u=this.langiumDocuments.getDocument(l);u===void 0&&(u=this.langiumDocumentFactory.fromModel({$type:"INVALID"},l),u.state=Kr.Changed,this.langiumDocuments.addDocument(u)),this.resetToState(u,Kr.Changed)}let a=Ln(i).concat(n).map(l=>l.toString()).toSet();this.langiumDocuments.all.filter(l=>!a.has(l.uri.toString())&&this.shouldRelink(l,a)).forEach(l=>this.resetToState(l,Kr.ComputedScopes)),await this.emitUpdate(i,n),await Ta(r);let o=this.sortDocuments(this.langiumDocuments.all.filter(l=>l.state=1}findMissingValidationCategories(e,t){let r=this.buildState.get(e.uri.toString()),n=this.serviceRegistry.getServices(e.uri).validation.ValidationRegistry.getAllValidationCategories(e),i=r?.result?.validationChecks?new Set(r?.result?.validationChecks):r?.completed?n:new Set,a=t===void 0||t.validation===!0?n:typeof t.validation=="object"?t.validation.categories??n:[];return Ln(a).filter(o=>!i.has(o)).toArray()}async findChangedUris(e){if(this.langiumDocuments.getDocument(e)??this.textDocuments?.get(e))return[e];try{let r=await this.fileSystemProvider.stat(e);if(r.isDirectory)return await this.workspaceManager().searchFolder(e);if(this.workspaceManager().shouldIncludeEntry(r))return[e]}catch{}return[]}async emitUpdate(e,t){await Promise.all(this.updateListeners.map(r=>r(e,t)))}sortDocuments(e){let t=0,r=e.length-1;for(;t=0&&!this.hasTextDocument(e[r]);)r--;tr.error!==void 0)?!0:this.indexManager.isAffected(e,t)}onUpdate(e){return this.updateListeners.push(e),cg.create(()=>{let t=this.updateListeners.indexOf(e);t>=0&&this.updateListeners.splice(t,1)})}resetToState(e,t){switch(t){case Kr.Changed:case Kr.Parsed:this.indexManager.removeContent(e.uri);case Kr.IndexedContent:e.localSymbols=void 0;case Kr.ComputedScopes:this.serviceRegistry.getServices(e.uri).references.Linker.unlink(e);case Kr.Linked:this.indexManager.removeReferences(e.uri);case Kr.IndexedReferences:e.diagnostics=void 0,this.buildState.delete(e.uri.toString());case Kr.Validated:}e.state>t&&(e.state=t)}cleanUpDeleted(e){this.buildState.delete(e.uri.toString()),this.indexManager.remove(e.uri),e.state=Kr.Changed}async buildDocuments(e,t,r){this.prepareBuild(e,t),await this.runCancelable(e,Kr.Parsed,r,a=>this.langiumDocumentFactory.update(a,r)),await this.runCancelable(e,Kr.IndexedContent,r,a=>this.indexManager.updateContent(a,r)),await this.runCancelable(e,Kr.ComputedScopes,r,async a=>{let o=this.serviceRegistry.getServices(a.uri).references.ScopeComputation;a.localSymbols=await o.collectLocalSymbols(a,r)});let n=e.filter(a=>this.shouldLink(a));await this.runCancelable(n,Kr.Linked,r,a=>this.serviceRegistry.getServices(a.uri).references.Linker.link(a,r)),await this.runCancelable(n,Kr.IndexedReferences,r,a=>this.indexManager.updateReferences(a,r));let i=e.filter(a=>this.shouldValidate(a)?!0:(this.markAsCompleted(a),!1));await this.runCancelable(i,Kr.Validated,r,async a=>{await this.validate(a,r),this.markAsCompleted(a)})}markAsCompleted(e){let t=this.buildState.get(e.uri.toString());t&&(t.completed=!0)}prepareBuild(e,t){for(let r of e){let n=r.uri.toString(),i=this.buildState.get(n);(!i||i.completed)&&this.buildState.set(n,{completed:!1,options:t,result:i?.result})}}async runCancelable(e,t,r,n){for(let a of e)a.statea.state===t);await this.notifyBuildPhase(i,t,r),this.currentState=t}onBuildPhase(e,t){return this.buildPhaseListeners.add(e,t),cg.create(()=>{this.buildPhaseListeners.delete(e,t)})}onDocumentPhase(e,t){return this.documentPhaseListeners.add(e,t),cg.create(()=>{this.documentPhaseListeners.delete(e,t)})}waitUntil(e,t,r){let n;return t&&"path"in t?n=t:r=t,r??(r=Hn.CancellationToken.None),n?this.awaitDocumentState(e,n,r):this.awaitBuilderState(e,r)}awaitDocumentState(e,t,r){let n=this.langiumDocuments.getDocument(t);if(n){if(n.state>=e)return Promise.resolve(t);if(r.isCancellationRequested)return Promise.reject(nu);if(this.currentState>=e&&e>n.state)return Promise.reject(new E5.ResponseError(E5.LSPErrorCodes.RequestFailed,`Document state of ${t.toString()} is ${Kr[n.state]}, requiring ${Kr[e]}, but workspace state is already ${Kr[this.currentState]}. Returning undefined.`))}else return Promise.reject(new E5.ResponseError(E5.LSPErrorCodes.ServerCancelled,`No document found for URI: ${t.toString()}`));return new Promise((i,a)=>{let o=this.onDocumentPhase(e,u=>{ks.equals(u.uri,t)&&(o.dispose(),l.dispose(),i(u.uri))}),l=r.onCancellationRequested(()=>{o.dispose(),l.dispose(),a(nu)})})}awaitBuilderState(e,t){return this.currentState>=e?Promise.resolve():t.isCancellationRequested?Promise.reject(nu):new Promise((r,n)=>{let i=this.onBuildPhase(e,()=>{i.dispose(),a.dispose(),r()}),a=t.onCancellationRequested(()=>{i.dispose(),a.dispose(),n(nu)})})}async notifyDocumentPhase(e,t,r){let i=this.documentPhaseListeners.get(t).slice();for(let a of i)try{await Ta(r),await a(e,r)}catch(o){if(!Eg(o))throw o}}async notifyBuildPhase(e,t,r){if(e.length===0)return;let i=this.buildPhaseListeners.get(t).slice();for(let a of i)await Ta(r),await a(e,r)}shouldLink(e){return this.getBuildOptions(e).eagerLinking??!0}shouldValidate(e){return!!this.getBuildOptions(e).validation}async validate(e,t){let r=this.serviceRegistry.getServices(e.uri).validation.DocumentValidator,n=this.getBuildOptions(e),i=typeof n.validation=="object"?{...n.validation}:{};i.categories=this.findMissingValidationCategories(e,n);let a=await r.validateDocument(e,i,t);e.diagnostics?e.diagnostics.push(...a):e.diagnostics=a;let o=this.buildState.get(e.uri.toString());o&&(o.result??(o.result={}),o.result.validationChecks?o.result.validationChecks=Ln(o.result.validationChecks).concat(i.categories).distinct().toArray():o.result.validationChecks=[...i.categories])}getBuildOptions(e){return this.buildState.get(e.uri.toString())?.options??{}}},i3e=class{static{s(this,"DefaultIndexManager")}static{_(this,"DefaultIndexManager")}constructor(e){this.symbolIndex=new Map,this.symbolByTypeIndex=new UR,this.referenceIndex=new Map,this.documents=e.workspace.LangiumDocuments,this.serviceRegistry=e.ServiceRegistry,this.astReflection=e.AstReflection}findAllReferences(e,t){let r=Yl(e).uri,n=[];return this.referenceIndex.forEach(i=>{i.forEach(a=>{ks.equals(a.targetUri,r)&&a.targetPath===t&&n.push(a)})}),Ln(n)}allElements(e,t){let r=Ln(this.symbolIndex.keys());return t&&(r=r.filter(n=>!t||t.has(n))),r.map(n=>this.getFileDescriptions(n,e)).flat()}getFileDescriptions(e,t){return t?this.symbolByTypeIndex.get(e,t,()=>(this.symbolIndex.get(e)??[]).filter(i=>this.astReflection.isSubtype(i.type,t))):this.symbolIndex.get(e)??[]}remove(e){this.removeContent(e),this.removeReferences(e)}removeContent(e){let t=e.toString();this.symbolIndex.delete(t),this.symbolByTypeIndex.clear(t)}removeReferences(e){let t=e.toString();this.referenceIndex.delete(t)}async updateContent(e,t=Hn.CancellationToken.None){let n=await this.serviceRegistry.getServices(e.uri).references.ScopeComputation.collectExportedSymbols(e,t),i=e.uri.toString();this.symbolIndex.set(i,n),this.symbolByTypeIndex.clear(i)}async updateReferences(e,t=Hn.CancellationToken.None){let n=await this.serviceRegistry.getServices(e.uri).workspace.ReferenceDescriptionProvider.createDescriptions(e,t);this.referenceIndex.set(e.uri.toString(),n)}isAffected(e,t){let r=this.referenceIndex.get(e.uri.toString());return r?r.some(n=>!n.local&&t.has(n.targetUri.toString())):!1}},a3e=class{static{s(this,"DefaultWorkspaceManager")}static{_(this,"DefaultWorkspaceManager")}constructor(e){this.initialBuildOptions={},this._ready=new xh,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){this.folders=e.workspaceFolders??void 0}initialized(e){return this.mutex.write(t=>this.initializeWorkspace(this.folders??[],t))}async initializeWorkspace(e,t=Hn.CancellationToken.None){let r=await this.performStartup(e);await Ta(t),await this.documentBuilder.build(r,this.initialBuildOptions,t)}async performStartup(e){let t=[],r=_(a=>{t.push(a),this.langiumDocuments.hasDocument(a.uri)||this.langiumDocuments.addDocument(a)},"collector");await this.loadAdditionalDocuments(e,r);let n=[];await Promise.all(e.map(a=>this.getRootFolder(a)).map(async a=>this.traverseFolder(a,n)));let i=Ln(n).distinct(a=>a.toString()).filter(a=>!this.langiumDocuments.hasDocument(a));return await this.loadWorkspaceDocuments(i,r),this._ready.resolve(),t}async loadWorkspaceDocuments(e,t){await Promise.all(e.map(async r=>{let n=await this.langiumDocuments.getOrCreateDocument(r);t(n)}))}loadAdditionalDocuments(e,t){return Promise.resolve()}getRootFolder(e){return Ao.parse(e.uri)}async traverseFolder(e,t){try{let r=await this.fileSystemProvider.readDirectory(e);await Promise.all(r.map(async n=>{this.shouldIncludeEntry(n)&&(n.isDirectory?await this.traverseFolder(n.uri,t):n.isFile&&t.push(n.uri))}))}catch(r){console.error("Failure to read directory content of "+e.toString(!0),r)}}async searchFolder(e){let t=[];return await this.traverseFolder(e,t),t}shouldIncludeEntry(e){let t=ks.basename(e.uri);return t.startsWith(".")?!1:e.isDirectory?t!=="node_modules"&&t!=="out":e.isFile?this.serviceRegistry.hasServices(e.uri):!1}},s3e=class{static{s(this,"DefaultLexerErrorMessageProvider")}static{_(this,"DefaultLexerErrorMessageProvider")}buildUnexpectedCharactersMessage(e,t,r,n,i){return lG.buildUnexpectedCharactersMessage(e,t,r,n,i)}buildUnableToPopLexerModeMessage(e){return lG.buildUnableToPopLexerModeMessage(e)}},PW={mode:"full"},OW=class{static{s(this,"DefaultLexer")}static{_(this,"DefaultLexer")}constructor(e){this.errorMessageProvider=e.parser.LexerErrorMessageProvider,this.tokenBuilder=e.parser.TokenBuilder;let t=this.tokenBuilder.buildTokens(e.Grammar,{caseInsensitive:e.LanguageMetaData.caseInsensitive});this.tokenTypes=this.toTokenTypeDictionary(t);let r=ZA(t)?Object.values(t):t,n=e.LanguageMetaData.mode==="production";this.chevrotainLexer=new ws(r,{positionTracking:"full",skipValidations:n,errorMessageProvider:this.errorMessageProvider})}get definition(){return this.tokenTypes}tokenize(e,t=PW){let r=this.chevrotainLexer.tokenize(e);return{tokens:r.tokens,errors:r.errors,hidden:r.groups.hidden??[],report:this.tokenBuilder.flushLexingReport?.(e)}}toTokenTypeDictionary(e){if(ZA(e))return e;let t=XR(e)?Object.values(e.modes).flat():e,r={};return t.forEach(n=>r[n.name]=n),r}};s(jR,"isTokenTypeArray");_(jR,"isTokenTypeArray");s(XR,"isIMultiModeLexerDefinition");_(XR,"isIMultiModeLexerDefinition");s(ZA,"isTokenTypeDictionary");_(ZA,"isTokenTypeDictionary");gC();s(BW,"parseJSDoc");_(BW,"parseJSDoc");s($W,"isJSDoc");_($W,"isJSDoc");s(FW,"getLines");_(FW,"getLines");Z2e=/\s*(@([\p{L}][\p{L}\p{N}]*)?)/uy,l0t=/\{(@[\p{L}][\p{L}\p{N}]*)(\s*)([^\r\n}]+)?\}/gu;s(o3e,"tokenize");_(o3e,"tokenize");s(l3e,"buildInlineTokens");_(l3e,"buildInlineTokens");c0t=/\S/,u0t=/\s*$/;s(QA,"skipWhitespace");_(QA,"skipWhitespace");s(c3e,"lastCharacter");_(c3e,"lastCharacter");s(u3e,"parseJSDocComment");_(u3e,"parseJSDocComment");s(h3e,"parseJSDocElement");_(h3e,"parseJSDocElement");s(d3e,"appendEmptyLine");_(d3e,"appendEmptyLine");s(GW,"parseJSDocText");_(GW,"parseJSDocText");s(f3e,"parseJSDocInline");_(f3e,"parseJSDocInline");s(zW,"parseJSDocTag");_(zW,"parseJSDocTag");s(VW,"parseJSDocLine");_(VW,"parseJSDocLine");s(KR,"normalizeOptions");_(KR,"normalizeOptions");s(aA,"normalizeOption");_(aA,"normalizeOption");Q2e=class{static{s(this,"JSDocCommentImpl")}static{_(this,"JSDocCommentImpl")}constructor(e,t){this.elements=e,this.range=t}getTag(e){return this.getAllTags().find(t=>t.name===e)}getTags(e){return this.getAllTags().filter(t=>t.name===e)}getAllTags(){return this.elements.filter(e=>"name"in e)}toString(){let e="";for(let t of this.elements)if(e.length===0)e=t.toString();else{let r=t.toString();e+=DG(e)+r}return e.trim()}toMarkdown(e){let t="";for(let r of this.elements)if(t.length===0)t=r.toMarkdown(e);else{let n=r.toMarkdown(e);t+=DG(t)+n}return t.trim()}},V$=class{static{s(this,"JSDocTagImpl")}static{_(this,"JSDocTagImpl")}constructor(e,t,r,n){this.name=e,this.content=t,this.inline=r,this.range=n}toString(){let e=`@${this.name}`,t=this.content.toString();return this.content.inlines.length===1?e=`${e} ${t}`:this.content.inlines.length>1&&(e=`${e} +${t}`),this.inline?`{${e}}`:e}toMarkdown(e){return e?.renderTag?.(this)??this.toMarkdownDefault(e)}toMarkdownDefault(e){let t=this.content.toMarkdown(e);if(this.inline){let i=p3e(this.name,t,e??{});if(typeof i=="string")return i}let r="";e?.tag==="italic"||e?.tag===void 0?r="*":e?.tag==="bold"?r="**":e?.tag==="bold-italic"&&(r="***");let n=`${r}@${this.name}${r}`;return this.content.inlines.length===1?n=`${n} \u2014 ${t}`:this.content.inlines.length>1&&(n=`${n} +${t}`),this.inline?`{${n}}`:n}};s(p3e,"renderInlineTag");_(p3e,"renderInlineTag");s(m3e,"renderLinkDefault");_(m3e,"renderLinkDefault");LG=class{static{s(this,"JSDocTextImpl")}static{_(this,"JSDocTextImpl")}constructor(e,t){this.inlines=e,this.range=t}toString(){let e="";for(let t=0;tr.range.start.line&&(e+=` +`)}return e}toMarkdown(e){let t="";for(let r=0;rn.range.start.line&&(t+=` +`)}return t}},g3e=class{static{s(this,"JSDocLineImpl")}static{_(this,"JSDocLineImpl")}constructor(e,t){this.text=e,this.range=t}toString(){return this.text}toMarkdown(){return this.text}};s(DG,"fillNewlines");_(DG,"fillNewlines");y3e=class{static{s(this,"JSDocDocumentationProvider")}static{_(this,"JSDocDocumentationProvider")}constructor(e){this.indexManager=e.shared.workspace.IndexManager,this.commentProvider=e.documentation.CommentProvider}getDocumentation(e){let t=this.commentProvider.getComment(e);if(t&&$W(t))return BW(t).toMarkdown({renderLink:_((n,i)=>this.documentationLinkRenderer(e,n,i),"renderLink"),renderTag:_(n=>this.documentationTagRenderer(e,n),"renderTag")})}documentationLinkRenderer(e,t,r){let n=this.findNameInLocalSymbols(e,t)??this.findNameInGlobalScope(e,t);if(n&&n.nameSegment){let i=n.nameSegment.range.start.line+1,a=n.nameSegment.range.start.character+1,o=n.documentUri.with({fragment:`L${i},${a}`});return`[${r}](${o.toString()})`}else return}documentationTagRenderer(e,t){}findNameInLocalSymbols(e,t){let n=Yl(e).localSymbols;if(!n)return;let i=e;do{let o=n.getStream(i).find(l=>l.name===t);if(o)return o;i=i.$container}while(i)}findNameInGlobalScope(e,t){return this.indexManager.allElements().find(n=>n.name===t)}},v3e=class{static{s(this,"DefaultCommentProvider")}static{_(this,"DefaultCommentProvider")}constructor(e){this.grammarConfig=()=>e.parser.GrammarConfig}getComment(e){return IW(e)?e.$comment:lV(e.$cstNode,this.grammarConfig().multilineCommentRules)?.text}},x3e=class{static{s(this,"DefaultAsyncParser")}static{_(this,"DefaultAsyncParser")}constructor(e){this.syncParser=e.parser.LangiumParser}parse(e,t){return Promise.resolve(this.syncParser.parse(e))}},h0t=class{static{s(this,"AbstractThreadedAsyncParser")}static{_(this,"AbstractThreadedAsyncParser")}constructor(e){this.threadCount=8,this.terminationDelay=200,this.workerPool=[],this.queue=[],this.hydrator=e.serializer.Hydrator}initializeWorkers(){for(;this.workerPool.length{if(this.queue.length>0){let t=this.queue.shift();t&&(e.lock(),t.resolve(e))}}),this.workerPool.push(e)}}async parse(e,t){let r=await this.acquireParserWorker(t),n=new xh,i,a=t.onCancellationRequested(()=>{i=setTimeout(()=>{this.terminateWorker(r)},this.terminationDelay)});return r.parse(e).then(o=>{let l=this.hydrator.hydrate(o);n.resolve(l)}).catch(o=>{n.reject(o)}).finally(()=>{a.dispose(),clearTimeout(i)}),n.promise}terminateWorker(e){e.terminate();let t=this.workerPool.indexOf(e);t>=0&&this.workerPool.splice(t,1)}async acquireParserWorker(e){this.initializeWorkers();for(let r of this.workerPool)if(r.ready)return r.lock(),r;let t=new xh;return e.onCancellationRequested(()=>{let r=this.queue.indexOf(t);r>=0&&this.queue.splice(r,1),t.reject(nu)}),this.queue.push(t),t.promise}},d0t=class{static{s(this,"ParserWorker")}static{_(this,"ParserWorker")}get ready(){return this._ready}get onReady(){return this.onReadyEmitter.event}constructor(e,t,r,n){this.onReadyEmitter=new YR.Emitter,this.deferred=new xh,this._ready=!0,this._parsing=!1,this.sendMessage=e,this._terminate=n,t(i=>{let a=i;this.deferred.resolve(a),this.unlock()}),r(i=>{this.deferred.reject(i),this.unlock()})}terminate(){this.deferred.reject(nu),this._terminate()}lock(){this._ready=!1}unlock(){this._parsing=!1,this._ready=!0,this.onReadyEmitter.fire()}parse(e){if(this._parsing)throw new Error("Parser worker is busy");return this._parsing=!0,this.deferred=new xh,this.sendMessage(e),this.deferred.promise}},b3e=class{static{s(this,"DefaultWorkspaceLock")}static{_(this,"DefaultWorkspaceLock")}constructor(){this.previousTokenSource=new Hn.CancellationTokenSource,this.writeQueue=[],this.readQueue=[],this.done=!0}write(e){this.cancelWrite();let t=qR();return this.previousTokenSource=t,this.enqueue(this.writeQueue,e,t.token)}read(e){return this.enqueue(this.readQueue,e)}enqueue(e,t,r=Hn.CancellationToken.None){let n=new xh,i={action:t,deferred:n,cancellationToken:r};return e.push(i),this.performNextOperation(),n.promise}async performNextOperation(){if(!this.done)return;let 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:t,deferred:r,cancellationToken:n})=>{try{let i=await Promise.resolve().then(()=>t(n));r.resolve(i)}catch(i){Eg(i)?r.resolve(void 0):r.reject(i)}})),this.done=!0,this.performNextOperation()}cancelWrite(){this.previousTokenSource.cancel()}},T3e=class{static{s(this,"DefaultHydrator")}static{_(this,"DefaultHydrator")}constructor(e){this.grammarElementIdMap=new XA,this.tokenTypeIdMap=new XA,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(t=>({...t,message:t.message})),value:this.dehydrateAstNode(e.value,this.createDehyrationContext(e.value))}}dehydrateLexerReport(e){return e}createDehyrationContext(e){let t=new Map,r=new Map;for(let n of jl(e))t.set(n,{});if(e.$cstNode)for(let n of O1(e.$cstNode))r.set(n,{});return{astNodes:t,cstNodes:r}}dehydrateAstNode(e,t){let r=t.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,t));for(let[n,i]of Object.entries(e))if(!n.startsWith("$"))if(Array.isArray(i)){let a=[];r[n]=a;for(let o of i)Vi(o)?a.push(this.dehydrateAstNode(o,t)):Cs(o)?a.push(this.dehydrateReference(o,t)):a.push(o)}else Vi(i)?r[n]=this.dehydrateAstNode(i,t):Cs(i)?r[n]=this.dehydrateReference(i,t):i!==void 0&&(r[n]=i);return r}dehydrateReference(e,t){let r={};return r.$refText=e.$refText,e.$refNode&&(r.$refNode=t.cstNodes.get(e.$refNode)),r}dehydrateCstNode(e,t){let r=t.cstNodes.get(e);return nR(e)?r.fullText=e.fullText:r.grammarSource=this.getGrammarElementId(e.grammarSource),r.hidden=e.hidden,r.astNode=t.astNodes.get(e.astNode),dh(e)?r.content=e.content.map(n=>this.dehydrateCstNode(n,t)):pg(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){let t=e.value,r=this.createHydrationContext(t);return"$cstNode"in t&&this.hydrateCstNode(t.$cstNode,r),{lexerErrors:e.lexerErrors,lexerReport:e.lexerReport,parserErrors:e.parserErrors,value:this.hydrateAstNode(t,r)}}createHydrationContext(e){let t=new Map,r=new Map;for(let i of jl(e))t.set(i,{});let n;if(e.$cstNode)for(let i of O1(e.$cstNode)){let a;"fullText"in i?(a=new gW(i.fullText),n=a):"content"in i?a=new FR:"tokenType"in i&&(a=this.hydrateCstLeafNode(i)),a&&(r.set(i,a),a.root=n)}return{astNodes:t,cstNodes:r}}hydrateAstNode(e,t){let r=t.astNodes.get(e);r.$type=e.$type,r.$containerIndex=e.$containerIndex,r.$containerProperty=e.$containerProperty,e.$cstNode&&(r.$cstNode=t.cstNodes.get(e.$cstNode));for(let[n,i]of Object.entries(e))if(!n.startsWith("$"))if(Array.isArray(i)){let a=[];r[n]=a;for(let o of i)Vi(o)?a.push(this.setParent(this.hydrateAstNode(o,t),r)):Cs(o)?a.push(this.hydrateReference(o,r,n,t)):a.push(o)}else Vi(i)?r[n]=this.setParent(this.hydrateAstNode(i,t),r):Cs(i)?r[n]=this.hydrateReference(i,r,n,t):i!==void 0&&(r[n]=i);return r}setParent(e,t){return e.$container=t,e}hydrateReference(e,t,r,n){return this.linker.buildReference(t,r,n.cstNodes.get(e.$refNode),e.$refText)}hydrateCstNode(e,t,r=0){let n=t.cstNodes.get(e);if(typeof e.grammarSource=="number"&&(n.grammarSource=this.getGrammarElement(e.grammarSource)),n.astNode=t.astNodes.get(e.astNode),dh(n))for(let i of e.content){let a=this.hydrateCstNode(i,t,r++);n.content.push(a)}return n}hydrateCstLeafNode(e){let t=this.getTokenType(e.tokenType),r=e.offset,n=e.length,i=e.startLine,a=e.startColumn,o=e.endLine,l=e.endColumn,u=e.hidden;return new qA(r,n,{start:{line:i,character:a},end:{line:o,character:l}},t,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(let t of jl(this.grammar))iR(t)&&this.grammarElementIdMap.set(t,e++)}};s(sn,"createDefaultCoreModule");_(sn,"createDefaultCoreModule");s(on,"createDefaultSharedCoreModule");_(on,"createDefaultSharedCoreModule");(function(e){e.merge=(t,r)=>G1(G1({},t),r)})(IG||(IG={}));s(Lr,"inject");_(Lr,"inject");C3e=Symbol("isProxy");s(WW,"eagerLoad");_(WW,"eagerLoad");s(qW,"_inject");_(qW,"_inject");J2e=Symbol();s(MG,"_resolve");_(MG,"_resolve");s(G1,"_merge");_(G1,"_merge");NG={indentTokenName:"INDENT",dedentTokenName:"DEDENT",whitespaceTokenName:"WS",ignoreIndentationDelimiters:[]};(function(e){e.REGULAR="indentation-sensitive",e.IGNORE_INDENTATION="ignore-indentation"})(og||(og={}));k3e=class extends VR{static{s(this,"IndentationAwareTokenBuilder")}static{_(this,"IndentationAwareTokenBuilder")}constructor(e=NG){super(),this.indentationStack=[0],this.whitespaceRegExp=/[ \t]+/y,this.options={...NG,...e},this.indentTokenType=_1({name:this.options.indentTokenName,pattern:this.indentMatcher.bind(this),line_breaks:!1}),this.dedentTokenType=_1({name:this.options.dedentTokenName,pattern:this.dedentMatcher.bind(this),line_breaks:!1})}buildTokens(e,t){let r=super.buildTokens(e,t);if(!jR(r))throw new Error("Invalid tokens built by default builder");let{indentTokenName:n,dedentTokenName:i,whitespaceTokenName:a,ignoreIndentationDelimiters:o}=this.options,l,u,h,d=[];for(let f of r){for(let[p,m]of o)f.name===p?f.PUSH_MODE=og.IGNORE_INDENTATION:f.name===m&&(f.POP_MODE=!0);f.name===i?l=f:f.name===n?u=f:f.name===a?h=f:d.push(f)}if(!l||!u||!h)throw new Error("Some indentation/whitespace tokens not found!");return o.length>0?{modes:{[og.REGULAR]:[l,u,...d,h],[og.IGNORE_INDENTATION]:[...d,h]},defaultMode:og.REGULAR}:[l,u,h,...d]}flushLexingReport(e){return{...super.flushLexingReport(e),remainingDedents:this.flushRemainingDedents(e)}}isStartOfLine(e,t){return t===0||`\r +`.includes(e[t-1])}matchWhitespace(e,t,r,n){this.whitespaceRegExp.lastIndex=t;let i=this.whitespaceRegExp.exec(e);return{currIndentLevel:i?.[0].length??0,prevIndentLevel:this.indentationStack.at(-1),match:i}}createIndentationTokenInstance(e,t,r,n){let i=this.getLineNumber(t,n);return wC(e,r,n,n+r.length,i,i,1,r.length)}getLineNumber(e,t){return e.substring(0,t).split(/\r\n|\r|\n/).length}indentMatcher(e,t,r,n){if(!this.isStartOfLine(e,t))return null;let{currIndentLevel:i,prevIndentLevel:a,match:o}=this.matchWhitespace(e,t,r,n);return i<=a?null:(this.indentationStack.push(i),o)}dedentMatcher(e,t,r,n){if(!this.isStartOfLine(e,t))return null;let{currIndentLevel:i,prevIndentLevel:a,match:o}=this.matchWhitespace(e,t,r,n);if(i>=a)return null;let l=this.indentationStack.lastIndexOf(i);if(l===-1)return this.diagnostics.push({severity:"error",message:`Invalid dedent level ${i} at offset: ${t}. Current indentation stack: ${this.indentationStack}`,offset:t,length:o?.[0]?.length??0,line:this.getLineNumber(e,t),column:1}),null;let u=this.indentationStack.length-l-1,h=e.substring(0,t).match(/[\r\n]+$/)?.[0].length??1;for(let d=0;d1;)t.push(this.createIndentationTokenInstance(this.dedentTokenType,e,"",e.length)),this.indentationStack.pop();return this.indentationStack=[0],t}},f0t=class extends OW{static{s(this,"IndentationAwareLexer")}static{_(this,"IndentationAwareLexer")}constructor(e){if(super(e),e.parser.TokenBuilder instanceof k3e)this.indentationTokenBuilder=e.parser.TokenBuilder;else throw new Error("IndentationAwareLexer requires an accompanying IndentationAwareTokenBuilder")}tokenize(e,t=PW){let r=super.tokenize(e),n=r.report;t?.mode==="full"&&r.tokens.push(...n.remainingDedents),n.remainingDedents=[];let{indentTokenType:i,dedentTokenType:a}=this.indentationTokenBuilder,o=i.tokenTypeIdx,l=a.tokenTypeIdx,u=[],h=r.tokens.length-1;for(let d=0;d=0&&u.push(r.tokens[h]),r.tokens=u,r}},HW={};Pf(HW,{AstUtils:s(()=>Oz,"AstUtils"),BiMap:s(()=>XA,"BiMap"),Cancellation:s(()=>Hn,"Cancellation"),ContextCache:s(()=>UR,"ContextCache"),CstUtils:s(()=>Mz,"CstUtils"),DONE_RESULT:s(()=>Ts,"DONE_RESULT"),Deferred:s(()=>xh,"Deferred"),Disposable:s(()=>cg,"Disposable"),DisposableCache:s(()=>HR,"DisposableCache"),DocumentCache:s(()=>U4e,"DocumentCache"),EMPTY_STREAM:s(()=>D1,"EMPTY_STREAM"),ErrorWithLocation:s(()=>hR,"ErrorWithLocation"),GrammarUtils:s(()=>dV,"GrammarUtils"),MultiMap:s(()=>bh,"MultiMap"),OperationCancelled:s(()=>nu,"OperationCancelled"),Reduction:s(()=>iC,"Reduction"),RegExpUtils:s(()=>pV,"RegExpUtils"),SimpleCache:s(()=>LW,"SimpleCache"),StreamImpl:s(()=>ru,"StreamImpl"),TreeStreamImpl:s(()=>I1,"TreeStreamImpl"),URI:s(()=>Ao,"URI"),UriTrie:s(()=>RW,"UriTrie"),UriUtils:s(()=>ks,"UriUtils"),WorkspaceCache:s(()=>DW,"WorkspaceCache"),assertCondition:s(()=>fV,"assertCondition"),assertUnreachable:s(()=>Of,"assertUnreachable"),delayNextTick:s(()=>WR,"delayNextTick"),interruptAndCheck:s(()=>Ta,"interruptAndCheck"),isOperationCancelled:s(()=>Eg,"isOperationCancelled"),loadGrammarFromJson:s(()=>Ca,"loadGrammarFromJson"),setInterruptionPeriod:s(()=>SW,"setInterruptionPeriod"),startCancelableOperation:s(()=>qR,"startCancelableOperation"),stream:s(()=>Ln,"stream")});eR(HW,YR);w3e=class{static{s(this,"EmptyFileSystemProvider")}static{_(this,"EmptyFileSystemProvider")}stat(e){throw new Error("No file system is available.")}statSync(e){throw new Error("No file system is available.")}async exists(){return!1}existsSync(){return!1}readBinary(){throw new Error("No file system is available.")}readBinarySync(){throw new Error("No file system is available.")}readFile(){throw new Error("No file system is available.")}readFileSync(){throw new Error("No file system is available.")}async readDirectory(){return[]}readDirectorySync(){return[]}},dn={fileSystemProvider:_(()=>new w3e,"fileSystemProvider")},p0t={Grammar:_(()=>{},"Grammar"),LanguageMetaData:_(()=>({caseInsensitive:!1,fileExtensions:[".langium"],languageId:"langium"}),"LanguageMetaData")},m0t={AstReflection:_(()=>new nV,"AstReflection")};s(S3e,"createMinimalGrammarServices");_(S3e,"createMinimalGrammarServices");s(Ca,"loadGrammarFromJson");_(Ca,"loadGrammarFromJson");eR(RTe,HW);g0t=class{static{s(this,"DefaultLangiumProfiler")}static{_(this,"DefaultLangiumProfiler")}constructor(e){this.activeCategories=new Set,this.allCategories=new Set(["validating","parsing","linking"]),this.activeCategories=e??new Set(this.allCategories),this.records=new bh}isActive(e){return this.activeCategories.has(e)}start(...e){e?e.forEach(t=>this.activeCategories.add(t)):this.activeCategories=new Set(this.allCategories)}stop(...e){e?e.forEach(t=>this.activeCategories.delete(t)):this.activeCategories.clear()}createTask(e,t){if(!this.isActive(e))throw new Error(`Category "${e}" is not active.`);return console.log(`Creating profiling task for '${e}.${t}'.`),new E3e(r=>this.records.add(e,this.dumpRecord(e,r)),t)}dumpRecord(e,t){console.info(`Task ${e}.${t.identifier} executed in ${t.duration.toFixed(2)}ms and ended at ${t.date.toISOString()}`);let r=[];for(let a of t.entries.keys()){let o=t.entries.get(a),l=o.reduce((u,h)=>u+h);r.push({name:`${t.identifier}.${a}`,count:o.length,duration:l})}let n=t.duration-r.map(a=>a.duration).reduce((a,o)=>a+o,0);r.push({name:t.identifier,count:1,duration:n}),r.sort((a,o)=>o.duration-a.duration);function i(a){return Math.round(100*a)/100}return s(i,"Round"),_(i,"Round"),console.table(r.map(a=>({Element:a.name,Count:a.count,"Self %":i(100*a.duration/t.duration),"Time (ms)":i(a.duration)}))),t}getRecords(...e){return e.length===0?this.records.values():this.records.entries().filter(t=>e.some(r=>r===t[0])).flatMap(t=>t[1])}},E3e=class{static{s(this,"ProfilingTask")}static{_(this,"ProfilingTask")}constructor(e,t){this.stack=[],this.entries=new bh,this.addRecord=e,this.identifier=t}start(){if(this.startTime!==void 0)throw new Error(`Task "${this.identifier}" is already started.`);this.startTime=performance.now()}stop(){if(this.startTime===void 0)throw new Error(`Task "${this.identifier}" was not started.`);if(this.stack.length!==0)throw new Error(`Task "${this.identifier}" cannot be stopped before sub-task(s): ${this.stack.map(t=>t.id).join(", ")}.`);let e={identifier:this.identifier,date:new Date,duration:performance.now()-this.startTime,entries:this.entries};this.addRecord(e),this.startTime=void 0,this.entries.clear()}startSubTask(e){this.stack.push({id:e,start:performance.now(),content:0})}stopSubTask(e){let t=this.stack.pop();if(!t)throw new Error(`Task "${this.identifier}.${e}" was not started.`);if(t.id!==e)throw new Error(`Sub-Task "${t.id}" is not already stopped.`);let r=performance.now()-t.start;this.stack.at(-1)!==void 0&&(this.stack[this.stack.length-1].content+=r);let n=r-t.content;this.entries.add(e,n)}};(e=>{e.Terminals={ARROW_DIRECTION:/L|R|T|B/,ARROW_GROUP:/\{group\}/,ARROW_INTO:/<|>/,ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,STRING:/"([^"\\]|\\.)*"|'([^'\\]|\\.)*'/,ID:/[\w]([-\w]*\w)?/,NEWLINE:/\r?\n/,WHITESPACE:/[\t ]+/,YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/,ARCH_ICON:/\([\w-:]+\)/,ARCH_TITLE:/\[(?:"([^"\\]|\\.)*"|'([^'\\]|\\.)*'|[\w ]+)\]/}})(PG||(PG={}));(e=>{e.Terminals={DOMAIN_NAME:/complex|complicated|clear|chaotic|confusion/,ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,STRING:/"([^"\\]|\\.)*"|'([^'\\]|\\.)*'/,NEWLINE:/\r?\n/,WHITESPACE:/[\t ]+/,YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/}})(OG||(OG={}));(e=>{e.Terminals={EM_ID:/[_a-zA-Z][\w_]*/,EM_FID:/\d{1,3}/,EM_DATA_INLINE:/\{(.*)\}|"(.*)"|'(.*)'/,EM_DATA_BLOCK:/\{[\t ]*\r?\n(?:[\S\s]*?\r?\n)?\}(?:\r?\n|(?!\S))/,EM_ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,EM_ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,EM_TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,EM_WS:/\s+/,EM_YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,EM_DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,EM_SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/,EM_ML_COMMENT:/\/\*[\s\S]*?\*\//,EM_SL_COMMENT:/\/\/[^\n\r]*/}})(BG||(BG={}));(e=>{e.Terminals={ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,INT:/0|[1-9][0-9]*(?!\.)/,STRING:/"([^"\\]|\\.)*"|'([^'\\]|\\.)*'/,NEWLINE:/\r?\n/,WHITESPACE:/[\t ]+/,YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/,REFERENCE:/\w([-\./\w]*[-\w])?/}})($G||($G={}));(e=>{e.Terminals={ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,NEWLINE:/\r?\n/,WHITESPACE:/[\t ]+/,YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/}})(FG||(FG={}));(e=>{e.Terminals={ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,INT:/0|[1-9][0-9]*(?!\.)/,STRING:/"([^"\\]|\\.)*"|'([^'\\]|\\.)*'/,NEWLINE:/\r?\n/,WHITESPACE:/[\t ]+/,YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/}})(GG||(GG={}));(e=>{e.Terminals={NUMBER_PIE:/(?:-?[0-9]+\.[0-9]+(?!\.))|(?:-?(0|[1-9][0-9]*)(?!\.))/,ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,STRING:/"([^"\\]|\\.)*"|'([^'\\]|\\.)*'/,NEWLINE:/\r?\n/,WHITESPACE:/[\t ]+/,YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/}})(zG||(zG={}));(e=>{e.Terminals={GRATICULE:/circle|polygon/,BOOLEAN:/true|false/,ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,NUMBER:/(?:[0-9]+\.[0-9]+(?!\.))|(?:0|[1-9][0-9]*(?!\.))/,STRING:/"([^"\\]|\\.)*"|'([^'\\]|\\.)*'/,ID:/[\w]([-\w]*\w)?/,NEWLINE:/\r?\n/,WHITESPACE:/[\t ]+/,YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/}})(VG||(VG={}));(e=>{e.Terminals={TITLE:/title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,ACC_TITLE:/accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,ACC_DESCR:/accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ABNF_RULENAME:/[A-Za-z][A-Za-z0-9-]*/,ABNF_STRING:/"[^"]*"/,ABNF_NUMVAL:/%[xXdDbB][0-9A-Fa-f]+(?:-[0-9A-Fa-f]+|\.[0-9A-Fa-f]+)*/,ABNF_REPEAT:/[0-9]*\*[0-9]*/,ABNF_EXACT_REPEAT:/[0-9]+/,ABNF_WHITESPACE:/[\t \r\n]+/,ABNF_YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,ABNF_DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,ABNF_SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/,ABNF_COMMENT:/;[^\n\r]*/}})(WG||(WG={}));(e=>{e.Terminals={TITLE:/title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,ACC_TITLE:/accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,ACC_DESCR:/accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,EBNF_ID:/[A-Z_a-z][\w-]*/,EBNF_STRING:/"([^"\\]|\\.)*"|'([^'\\]|\\.)*'/,EBNF_SPECIAL_SEQUENCE:/\?(?=[^?;]*[^?\s;][^?;]*\?)[^?;]*\?/,EBNF_WHITESPACE:/[\t \r\n]+/,EBNF_YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,EBNF_DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,EBNF_SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/,EBNF_BLOCK_COMMENT:/\/\*[\s\S]*?\*\//,EBNF_ISO_COMMENT:/\(\*[\s\S]*?\*\)/}})(qG||(qG={}));(e=>{e.Terminals={TITLE:/title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,ACC_TITLE:/accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,ACC_DESCR:/accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,RR_ID:/[A-Z_a-z][\w-]*/,RR_STRING:/"([^"\\]|\\.)*"|'([^'\\]|\\.)*'/,RR_WHITESPACE:/[\t \r\n]+/,RR_YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,RR_DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,RR_SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/,RR_BLOCK_COMMENT:/\/\*[\s\S]*?\*\//}})(HG||(HG={}));(e=>{e.Terminals={TITLE:/title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,ACC_TITLE:/accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,ACC_DESCR:/accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,PEG_ID:/[A-Z_a-z][\w-]*/,PEG_STRING:/"([^"\\]|\\.)*"|'([^'\\]|\\.)*'/,PEG_WHITESPACE:/[\t \r\n]+/,PEG_YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,PEG_DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,PEG_SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/,PEG_LINE_COMMENT:/#[^\n\r]*/}})(UG||(UG={}));(e=>{e.Terminals={ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,TREEMAP_KEYWORD:/treemap-beta|treemap/,CLASS_DEF:/classDef\s+([a-zA-Z_][a-zA-Z0-9_]+)(?:\s+([^;\r\n]*))?(?:;)?/,STYLE_SEPARATOR:/:::/,SEPARATOR:/:/,COMMA:/,/,INDENTATION:/[ \t]{1,}/,WS:/[ \t]+/,ML_COMMENT:/\%\%[^\n]*/,NL:/\r?\n/,ID2:/[a-zA-Z_][a-zA-Z0-9_]*/,NUMBER2:/[0-9_\.\,]+/,STRING2:/"[^"]*"|'[^']*'/}})(YG||(YG={}));(e=>{e.Terminals={ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,CLASS_ANNOTATION:/[ \t]+:::[ \t]*[A-Za-z_][\w-]*/,ICON_ANNOTATION:/[ \t]+icon\([\w-]*(?::[\w-]+)?\)/,DESC_ANNOTATION:/[ \t]+##[^\n\r]*/,INDENTATION:/[ \t]{1,}/,QUOTED_NAME:/"[^"]*"|'[^']*'/,WS:/[ \t]+/,ML_COMMENT:/\%\%[^\n]*/,NL:/\r?\n/,BARE_NAME:/(?!:::|icon\(|##)[^ \t\n\r"'](?:(?![ \t]+:::[ \t]*[A-Za-z_]|[ \t]+icon\(|[ \t]+##)[^\n\r])*/}})(jG||(jG={}));(e=>{e.Terminals={WARDLEY_NUMBER:/[0-9]+\.[0-9]+/,ARROW:/->/,LINK_PORT:/\+<>|\+>|\+|-\.->|>|\+'[^']*'<>|\+'[^']*'<|\+'[^']*'>/,LINK_LABEL:/;[^\n\r]+/,STRATEGY:/build|buy|outsource|market/,KW_WARDLEY:/wardley-beta/,KW_SIZE:/size/,KW_EVOLUTION:/evolution/,KW_ANCHOR:/anchor/,KW_COMPONENT:/component/,KW_LABEL:/label/,KW_INERTIA:/inertia/,KW_EVOLVE:/evolve/,KW_PIPELINE:/pipeline/,KW_NOTE:/note/,KW_ANNOTATIONS:/annotations/,KW_ANNOTATION:/annotation/,KW_ACCELERATOR:/accelerator/,KW_DEACCELERATOR:/deaccelerator/,NAME_WITH_SPACES:/(?!title\s|accTitle|accDescr)[A-Za-z](?:[A-Za-z0-9_()&]|-(?!>))*(?:[ \t]+[A-Za-z(](?:[A-Za-z0-9_()&]|-(?!>))*)*/,WS:/[ \t]+/,ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,INT:/0|[1-9][0-9]*(?!\.)/,STRING:/"([^"\\]|\\.)*"|'([^'\\]|\\.)*'/,ID:/[\w]([-\w]*\w)?/,NEWLINE:/\r?\n/,WHITESPACE:/[\t ]+/,YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/}})(XG||(XG={}));xEr={...PG.Terminals,...OG.Terminals,...BG.Terminals,...$G.Terminals,...FG.Terminals,...GG.Terminals,...zG.Terminals,...VG.Terminals,...WG.Terminals,...qG.Terminals,...HG.Terminals,...UG.Terminals,...jG.Terminals,...YG.Terminals,...XG.Terminals},KG={$type:"AbnfAlternation",alternatives:"alternatives"},ZG={$type:"AbnfConcatenation",elements:"elements"},sA={$type:"AbnfElement",primary:"primary",repeat:"repeat"},QG={$type:"AbnfGroup",element:"element"},JG={$type:"AbnfNumVal",value:"value"},ez={$type:"AbnfOptionalGroup",element:"element"},Mm={$type:"AbnfPrimary"},oA={$type:"AbnfRule",definition:"definition",name:"name"},tz={$type:"AbnfRuleName",name:"name"},rz={$type:"AbnfStringLiteral",value:"value"},A5={$type:"Accelerator",name:"name",x:"x",y:"y"},W$={$type:"Alignment",direction:"direction",members:"members"},R5={$type:"Anchor",evolution:"evolution",name:"name",visibility:"visibility"},ST={$type:"Annotation",number:"number",text:"text",x:"x",y:"y"},q$={$type:"Annotations",x:"x",y:"y"},ql={$type:"Architecture",accDescr:"accDescr",accTitle:"accTitle",alignments:"alignments",edges:"edges",groups:"groups",junctions:"junctions",services:"services",title:"title"};s(A3e,"isArchitecture");_(A3e,"isArchitecture");_5={$type:"Axis",label:"label",name:"name"},eC={$type:"Branch",name:"name",order:"order"};s(R3e,"isBranch");_(R3e,"isBranch");eTe={$type:"Checkout",branch:"branch"},L5={$type:"CherryPicking",id:"id",parent:"parent",tags:"tags"},H$={$type:"ClassDefStatement",className:"className",styleText:"styleText"},Xm={$type:"Commit",id:"id",message:"message",tags:"tags",type:"type"};s(_3e,"isCommit");_(_3e,"isCommit");D5={$type:"Common",accDescr:"accDescr",accTitle:"accTitle",title:"title"},Em={$type:"Component",decorator:"decorator",evolution:"evolution",inertia:"inertia",label:"label",name:"name",visibility:"visibility"},I5={$type:"Curve",entries:"entries",label:"label",name:"name"},_f={$type:"Cynefin",accDescr:"accDescr",accTitle:"accTitle",domains:"domains",title:"title",transitions:"transitions"};s(L3e,"isCynefin");_(L3e,"isCynefin");M5={$type:"Deaccelerator",name:"name",x:"x",y:"y"},tTe={$type:"Decorator",strategy:"strategy"},o1={$type:"Direction",accDescr:"accDescr",accTitle:"accTitle",dir:"dir",statements:"statements",title:"title"},tC={$type:"DomainBlock",domain:"domain",items:"items"};s(D3e,"isDomainBlock");_(D3e,"isDomainBlock");JA={$type:"DomainItem",label:"label"};s(I3e,"isDomainItem");_(I3e,"isDomainItem");nz={$type:"EbnfChoice",alternatives:"alternatives"},iz={$type:"EbnfExceptionPostfix",except:"except"},az={$type:"EbnfGroup",element:"element"},sz={$type:"EbnfNonTerminal",name:"name"},oz={$type:"EbnfOneOrMorePostfix",operator:"operator"},lz={$type:"EbnfOptional",element:"element"},cz={$type:"EbnfOptionalPostfix",operator:"operator"},m1={$type:"EbnfPostfix"},Tf={$type:"EbnfPrimary"},uz={$type:"EbnfRepetition",element:"element"},lA={$type:"EbnfRule",definition:"definition",name:"name"},hz={$type:"EbnfSequence",elements:"elements"},dz={$type:"EbnfSpecial",text:"text"},cA={$type:"EbnfTerm",base:"base",postfixes:"postfixes"},fz={$type:"EbnfTerminal",value:"value"},pz={$type:"EbnfZeroOrMorePostfix",operator:"operator"},Xc={$type:"Edge",lhsDir:"lhsDir",lhsGroup:"lhsGroup",lhsId:"lhsId",lhsInto:"lhsInto",rhsDir:"rhsDir",rhsGroup:"rhsGroup",rhsId:"rhsId",rhsInto:"rhsInto",title:"title"},Nm={$type:"EmDataEntity",dataBlockValue:"dataBlockValue",dataType:"dataType",name:"name"},Cf={$type:"EmFrame"},ET={$type:"EmGwt",givenStatements:"givenStatements",sourceFrame:"sourceFrame",thenStatements:"thenStatements",whenStatements:"whenStatements"},rTe={$type:"EmGwtStatement",entityIdentifier:"entityIdentifier"},U$={$type:"EmModelEntity",name:"name"};s(M3e,"isEmModelEntityType");_(M3e,"isEmModelEntityType");N5={$type:"EmNoteEntity",dataBlockValue:"dataBlockValue",dataType:"dataType",sourceFrame:"sourceFrame"},lh={$type:"EmResetFrame",dataInlineValue:"dataInlineValue",dataReference:"dataReference",dataType:"dataType",entityIdentifier:"entityIdentifier",modelEntityType:"modelEntityType",name:"name",sourceFrames:"sourceFrames"};s(ZR,"isEmResetFrame");_(ZR,"isEmResetFrame");bf={$type:"EmTimeFrame",dataInlineValue:"dataInlineValue",dataReference:"dataReference",dataType:"dataType",entityIdentifier:"entityIdentifier",modelEntityType:"modelEntityType",name:"name",sourceFrames:"sourceFrames"},Y$={$type:"Entry",axis:"axis",value:"value"},Zc={$type:"EventModel",accDescr:"accDescr",accTitle:"accTitle",dataEntities:"dataEntities",frames:"frames",gwtEntities:"gwtEntities",modelEntities:"modelEntities",noteEntities:"noteEntities",title:"title"},nTe={$type:"Evolution",stages:"stages"},P5={$type:"EvolutionStage",boundary:"boundary",name:"name",secondName:"secondName"},j$={$type:"Evolve",component:"component",target:"target"},Lf={$type:"GitGraph",accDescr:"accDescr",accTitle:"accTitle",statements:"statements",title:"title"};s(N3e,"isGitGraph");_(N3e,"isGitGraph");AT={$type:"Group",icon:"icon",id:"id",in:"in",title:"title"},E1={$type:"Info",accDescr:"accDescr",accTitle:"accTitle",title:"title"};s(P3e,"isInfo");_(P3e,"isInfo");RT={$type:"Item",classSelector:"classSelector",name:"name"},X$={$type:"Junction",id:"id",in:"in"},_T={$type:"Label",negX:"negX",negY:"negY",offsetX:"offsetX",offsetY:"offsetY"},O5={$type:"Leaf",classSelector:"classSelector",name:"name",value:"value"},Am={$type:"Link",arrow:"arrow",from:"from",fromPort:"fromPort",linkLabel:"linkLabel",to:"to",toPort:"toPort"},Km={$type:"Merge",branch:"branch",id:"id",tags:"tags",type:"type"};s(O3e,"isMerge");_(O3e,"isMerge");B5={$type:"Note",evolution:"evolution",text:"text",visibility:"visibility"},K$={$type:"Option",name:"name",value:"value"},Zm={$type:"Packet",accDescr:"accDescr",accTitle:"accTitle",blocks:"blocks",title:"title"};s(B3e,"isPacket");_(B3e,"isPacket");Qm={$type:"PacketBlock",bits:"bits",end:"end",label:"label",start:"start"};s($3e,"isPacketBlock");_($3e,"isPacketBlock");mz={$type:"PegAny",dot:"dot"},gz={$type:"PegGroup",element:"element"},yz={$type:"PegIdentifier",name:"name"},vz={$type:"PegLiteral",value:"value"},xz={$type:"PegOrderedChoice",alternatives:"alternatives"},uA={$type:"PegPrefix",operator:"operator",suffix:"suffix"},g1={$type:"PegPrimary"},hA={$type:"PegRule",definition:"definition",name:"name"},bz={$type:"PegSequence",elements:"elements"},dA={$type:"PegSuffix",operator:"operator",primary:"primary"},Df={$type:"Pie",accDescr:"accDescr",accTitle:"accTitle",sections:"sections",showData:"showData",title:"title"};s(F3e,"isPie");_(F3e,"isPie");rC={$type:"PieSection",label:"label",value:"value"};s(G3e,"isPieSection");_(G3e,"isPieSection");Z$={$type:"Pipeline",components:"components",parent:"parent"},$5={$type:"PipelineComponent",evolution:"evolution",label:"label",name:"name"},kf={$type:"Radar",accDescr:"accDescr",accTitle:"accTitle",axes:"axes",curves:"curves",options:"options",title:"title"},Jm={$type:"Railroad",accDescr:"accDescr",accTitle:"accTitle",rules:"rules",title:"title"};s(z3e,"isRailroad");_(z3e,"isRailroad");eg={$type:"RailroadAbnf",accDescr:"accDescr",accTitle:"accTitle",rules:"rules",title:"title"};s(V3e,"isRailroadAbnf");_(V3e,"isRailroadAbnf");Tz={$type:"RailroadChoiceExpr",alternatives:"alternatives"},tg={$type:"RailroadEbnf",accDescr:"accDescr",accTitle:"accTitle",rules:"rules",title:"title"};s(W3e,"isRailroadEbnf");_(W3e,"isRailroadEbnf");Qc={$type:"RailroadExpression"},Cz={$type:"RailroadNonTerminalExpr",name:"name"},kz={$type:"RailroadOneOrMoreExpr",element:"element"},wz={$type:"RailroadOptionalExpr",element:"element"},rg={$type:"RailroadPeg",accDescr:"accDescr",accTitle:"accTitle",rules:"rules",title:"title"};s(q3e,"isRailroadPeg");_(q3e,"isRailroadPeg");fA={$type:"RailroadRule",definition:"definition",name:"name"},Sz={$type:"RailroadSequenceExpr",elements:"elements"},Ez={$type:"RailroadSpecialExpr",text:"text"},Az={$type:"RailroadTerminalExpr",value:"value"},Rz={$type:"RailroadZeroOrMoreExpr",element:"element"},Q$={$type:"Section",classSelector:"classSelector",name:"name"},l1={$type:"Service",icon:"icon",iconText:"iconText",id:"id",in:"in",title:"title"},J$={$type:"Size",height:"height",width:"width"},Pm={$type:"Statement"},A1={$type:"Transition",from:"from",label:"label",to:"to"};s(H3e,"isTransition");_(H3e,"isTransition");ng={$type:"Treemap",accDescr:"accDescr",accTitle:"accTitle",title:"title",TreemapRows:"TreemapRows"};s(U3e,"isTreemap");_(U3e,"isTreemap");eF={$type:"TreemapRow",indent:"indent",item:"item"},Om={$type:"TreeNode",classAnnotation:"classAnnotation",descAnnotation:"descAnnotation",iconAnnotation:"iconAnnotation",indent:"indent",name:"name"},y1={$type:"TreeView",accDescr:"accDescr",accTitle:"accTitle",nodes:"nodes",title:"title"},ba={$type:"Wardley",accDescr:"accDescr",accelerators:"accelerators",accTitle:"accTitle",anchors:"anchors",annotation:"annotation",annotations:"annotations",components:"components",deaccelerators:"deaccelerators",evolution:"evolution",evolves:"evolves",links:"links",notes:"notes",pipelines:"pipelines",size:"size",title:"title"};s(Y3e,"isWardley");_(Y3e,"isWardley");j3e=class extends Pz{static{s(this,"MermaidAstReflection")}constructor(){super(...arguments),this.types={AbnfAlternation:{name:KG.$type,properties:{alternatives:{name:KG.alternatives,defaultValue:[]}},superTypes:[]},AbnfConcatenation:{name:ZG.$type,properties:{elements:{name:ZG.elements,defaultValue:[]}},superTypes:[]},AbnfElement:{name:sA.$type,properties:{primary:{name:sA.primary},repeat:{name:sA.repeat}},superTypes:[]},AbnfGroup:{name:QG.$type,properties:{element:{name:QG.element}},superTypes:[Mm.$type]},AbnfNumVal:{name:JG.$type,properties:{value:{name:JG.value}},superTypes:[Mm.$type]},AbnfOptionalGroup:{name:ez.$type,properties:{element:{name:ez.element}},superTypes:[Mm.$type]},AbnfPrimary:{name:Mm.$type,properties:{},superTypes:[]},AbnfRule:{name:oA.$type,properties:{definition:{name:oA.definition},name:{name:oA.name}},superTypes:[]},AbnfRuleName:{name:tz.$type,properties:{name:{name:tz.name}},superTypes:[Mm.$type]},AbnfStringLiteral:{name:rz.$type,properties:{value:{name:rz.value}},superTypes:[Mm.$type]},Accelerator:{name:A5.$type,properties:{name:{name:A5.name},x:{name:A5.x},y:{name:A5.y}},superTypes:[]},Alignment:{name:W$.$type,properties:{direction:{name:W$.direction},members:{name:W$.members,defaultValue:[]}},superTypes:[]},Anchor:{name:R5.$type,properties:{evolution:{name:R5.evolution},name:{name:R5.name},visibility:{name:R5.visibility}},superTypes:[]},Annotation:{name:ST.$type,properties:{number:{name:ST.number},text:{name:ST.text},x:{name:ST.x},y:{name:ST.y}},superTypes:[]},Annotations:{name:q$.$type,properties:{x:{name:q$.x},y:{name:q$.y}},superTypes:[]},Architecture:{name:ql.$type,properties:{accDescr:{name:ql.accDescr},accTitle:{name:ql.accTitle},alignments:{name:ql.alignments,defaultValue:[]},edges:{name:ql.edges,defaultValue:[]},groups:{name:ql.groups,defaultValue:[]},junctions:{name:ql.junctions,defaultValue:[]},services:{name:ql.services,defaultValue:[]},title:{name:ql.title}},superTypes:[]},Axis:{name:_5.$type,properties:{label:{name:_5.label},name:{name:_5.name}},superTypes:[]},Branch:{name:eC.$type,properties:{name:{name:eC.name},order:{name:eC.order}},superTypes:[Pm.$type]},Checkout:{name:eTe.$type,properties:{branch:{name:eTe.branch}},superTypes:[Pm.$type]},CherryPicking:{name:L5.$type,properties:{id:{name:L5.id},parent:{name:L5.parent},tags:{name:L5.tags,defaultValue:[]}},superTypes:[Pm.$type]},ClassDefStatement:{name:H$.$type,properties:{className:{name:H$.className},styleText:{name:H$.styleText}},superTypes:[]},Commit:{name:Xm.$type,properties:{id:{name:Xm.id},message:{name:Xm.message},tags:{name:Xm.tags,defaultValue:[]},type:{name:Xm.type}},superTypes:[Pm.$type]},Common:{name:D5.$type,properties:{accDescr:{name:D5.accDescr},accTitle:{name:D5.accTitle},title:{name:D5.title}},superTypes:[]},Component:{name:Em.$type,properties:{decorator:{name:Em.decorator},evolution:{name:Em.evolution},inertia:{name:Em.inertia,defaultValue:!1},label:{name:Em.label},name:{name:Em.name},visibility:{name:Em.visibility}},superTypes:[]},Curve:{name:I5.$type,properties:{entries:{name:I5.entries,defaultValue:[]},label:{name:I5.label},name:{name:I5.name}},superTypes:[]},Cynefin:{name:_f.$type,properties:{accDescr:{name:_f.accDescr},accTitle:{name:_f.accTitle},domains:{name:_f.domains,defaultValue:[]},title:{name:_f.title},transitions:{name:_f.transitions,defaultValue:[]}},superTypes:[]},Deaccelerator:{name:M5.$type,properties:{name:{name:M5.name},x:{name:M5.x},y:{name:M5.y}},superTypes:[]},Decorator:{name:tTe.$type,properties:{strategy:{name:tTe.strategy}},superTypes:[]},Direction:{name:o1.$type,properties:{accDescr:{name:o1.accDescr},accTitle:{name:o1.accTitle},dir:{name:o1.dir},statements:{name:o1.statements,defaultValue:[]},title:{name:o1.title}},superTypes:[Lf.$type]},DomainBlock:{name:tC.$type,properties:{domain:{name:tC.domain},items:{name:tC.items,defaultValue:[]}},superTypes:[]},DomainItem:{name:JA.$type,properties:{label:{name:JA.label}},superTypes:[]},EbnfChoice:{name:nz.$type,properties:{alternatives:{name:nz.alternatives,defaultValue:[]}},superTypes:[]},EbnfExceptionPostfix:{name:iz.$type,properties:{except:{name:iz.except}},superTypes:[m1.$type]},EbnfGroup:{name:az.$type,properties:{element:{name:az.element}},superTypes:[Tf.$type]},EbnfNonTerminal:{name:sz.$type,properties:{name:{name:sz.name}},superTypes:[Tf.$type]},EbnfOneOrMorePostfix:{name:oz.$type,properties:{operator:{name:oz.operator}},superTypes:[m1.$type]},EbnfOptional:{name:lz.$type,properties:{element:{name:lz.element}},superTypes:[Tf.$type]},EbnfOptionalPostfix:{name:cz.$type,properties:{operator:{name:cz.operator}},superTypes:[m1.$type]},EbnfPostfix:{name:m1.$type,properties:{},superTypes:[]},EbnfPrimary:{name:Tf.$type,properties:{},superTypes:[]},EbnfRepetition:{name:uz.$type,properties:{element:{name:uz.element}},superTypes:[Tf.$type]},EbnfRule:{name:lA.$type,properties:{definition:{name:lA.definition},name:{name:lA.name}},superTypes:[]},EbnfSequence:{name:hz.$type,properties:{elements:{name:hz.elements,defaultValue:[]}},superTypes:[]},EbnfSpecial:{name:dz.$type,properties:{text:{name:dz.text}},superTypes:[Tf.$type]},EbnfTerm:{name:cA.$type,properties:{base:{name:cA.base},postfixes:{name:cA.postfixes,defaultValue:[]}},superTypes:[]},EbnfTerminal:{name:fz.$type,properties:{value:{name:fz.value}},superTypes:[Tf.$type]},EbnfZeroOrMorePostfix:{name:pz.$type,properties:{operator:{name:pz.operator}},superTypes:[m1.$type]},Edge:{name:Xc.$type,properties:{lhsDir:{name:Xc.lhsDir},lhsGroup:{name:Xc.lhsGroup,defaultValue:!1},lhsId:{name:Xc.lhsId},lhsInto:{name:Xc.lhsInto,defaultValue:!1},rhsDir:{name:Xc.rhsDir},rhsGroup:{name:Xc.rhsGroup,defaultValue:!1},rhsId:{name:Xc.rhsId},rhsInto:{name:Xc.rhsInto,defaultValue:!1},title:{name:Xc.title}},superTypes:[]},EmDataEntity:{name:Nm.$type,properties:{dataBlockValue:{name:Nm.dataBlockValue},dataType:{name:Nm.dataType},name:{name:Nm.name}},superTypes:[]},EmFrame:{name:Cf.$type,properties:{},superTypes:[]},EmGwt:{name:ET.$type,properties:{givenStatements:{name:ET.givenStatements,defaultValue:[]},sourceFrame:{name:ET.sourceFrame,referenceType:Cf.$type},thenStatements:{name:ET.thenStatements,defaultValue:[]},whenStatements:{name:ET.whenStatements,defaultValue:[]}},superTypes:[]},EmGwtStatement:{name:rTe.$type,properties:{entityIdentifier:{name:rTe.entityIdentifier,referenceType:U$.$type}},superTypes:[]},EmModelEntity:{name:U$.$type,properties:{name:{name:U$.name}},superTypes:[]},EmNoteEntity:{name:N5.$type,properties:{dataBlockValue:{name:N5.dataBlockValue},dataType:{name:N5.dataType},sourceFrame:{name:N5.sourceFrame,referenceType:Cf.$type}},superTypes:[]},EmResetFrame:{name:lh.$type,properties:{dataInlineValue:{name:lh.dataInlineValue},dataReference:{name:lh.dataReference,referenceType:Nm.$type},dataType:{name:lh.dataType},entityIdentifier:{name:lh.entityIdentifier},modelEntityType:{name:lh.modelEntityType},name:{name:lh.name},sourceFrames:{name:lh.sourceFrames,defaultValue:[],referenceType:Cf.$type}},superTypes:[Cf.$type]},EmTimeFrame:{name:bf.$type,properties:{dataInlineValue:{name:bf.dataInlineValue},dataReference:{name:bf.dataReference,referenceType:Nm.$type},dataType:{name:bf.dataType},entityIdentifier:{name:bf.entityIdentifier},modelEntityType:{name:bf.modelEntityType},name:{name:bf.name},sourceFrames:{name:bf.sourceFrames,defaultValue:[],referenceType:Cf.$type}},superTypes:[Cf.$type]},Entry:{name:Y$.$type,properties:{axis:{name:Y$.axis,referenceType:_5.$type},value:{name:Y$.value}},superTypes:[]},EventModel:{name:Zc.$type,properties:{accDescr:{name:Zc.accDescr},accTitle:{name:Zc.accTitle},dataEntities:{name:Zc.dataEntities,defaultValue:[]},frames:{name:Zc.frames,defaultValue:[]},gwtEntities:{name:Zc.gwtEntities,defaultValue:[]},modelEntities:{name:Zc.modelEntities,defaultValue:[]},noteEntities:{name:Zc.noteEntities,defaultValue:[]},title:{name:Zc.title}},superTypes:[]},Evolution:{name:nTe.$type,properties:{stages:{name:nTe.stages,defaultValue:[]}},superTypes:[]},EvolutionStage:{name:P5.$type,properties:{boundary:{name:P5.boundary},name:{name:P5.name},secondName:{name:P5.secondName}},superTypes:[]},Evolve:{name:j$.$type,properties:{component:{name:j$.component},target:{name:j$.target}},superTypes:[]},GitGraph:{name:Lf.$type,properties:{accDescr:{name:Lf.accDescr},accTitle:{name:Lf.accTitle},statements:{name:Lf.statements,defaultValue:[]},title:{name:Lf.title}},superTypes:[]},Group:{name:AT.$type,properties:{icon:{name:AT.icon},id:{name:AT.id},in:{name:AT.in},title:{name:AT.title}},superTypes:[]},Info:{name:E1.$type,properties:{accDescr:{name:E1.accDescr},accTitle:{name:E1.accTitle},title:{name:E1.title}},superTypes:[]},Item:{name:RT.$type,properties:{classSelector:{name:RT.classSelector},name:{name:RT.name}},superTypes:[]},Junction:{name:X$.$type,properties:{id:{name:X$.id},in:{name:X$.in}},superTypes:[]},Label:{name:_T.$type,properties:{negX:{name:_T.negX,defaultValue:!1},negY:{name:_T.negY,defaultValue:!1},offsetX:{name:_T.offsetX},offsetY:{name:_T.offsetY}},superTypes:[]},Leaf:{name:O5.$type,properties:{classSelector:{name:O5.classSelector},name:{name:O5.name},value:{name:O5.value}},superTypes:[RT.$type]},Link:{name:Am.$type,properties:{arrow:{name:Am.arrow},from:{name:Am.from},fromPort:{name:Am.fromPort},linkLabel:{name:Am.linkLabel},to:{name:Am.to},toPort:{name:Am.toPort}},superTypes:[]},Merge:{name:Km.$type,properties:{branch:{name:Km.branch},id:{name:Km.id},tags:{name:Km.tags,defaultValue:[]},type:{name:Km.type}},superTypes:[Pm.$type]},Note:{name:B5.$type,properties:{evolution:{name:B5.evolution},text:{name:B5.text},visibility:{name:B5.visibility}},superTypes:[]},Option:{name:K$.$type,properties:{name:{name:K$.name},value:{name:K$.value,defaultValue:!1}},superTypes:[]},Packet:{name:Zm.$type,properties:{accDescr:{name:Zm.accDescr},accTitle:{name:Zm.accTitle},blocks:{name:Zm.blocks,defaultValue:[]},title:{name:Zm.title}},superTypes:[]},PacketBlock:{name:Qm.$type,properties:{bits:{name:Qm.bits},end:{name:Qm.end},label:{name:Qm.label},start:{name:Qm.start}},superTypes:[]},PegAny:{name:mz.$type,properties:{dot:{name:mz.dot}},superTypes:[g1.$type]},PegGroup:{name:gz.$type,properties:{element:{name:gz.element}},superTypes:[g1.$type]},PegIdentifier:{name:yz.$type,properties:{name:{name:yz.name}},superTypes:[g1.$type]},PegLiteral:{name:vz.$type,properties:{value:{name:vz.value}},superTypes:[g1.$type]},PegOrderedChoice:{name:xz.$type,properties:{alternatives:{name:xz.alternatives,defaultValue:[]}},superTypes:[]},PegPrefix:{name:uA.$type,properties:{operator:{name:uA.operator},suffix:{name:uA.suffix}},superTypes:[]},PegPrimary:{name:g1.$type,properties:{},superTypes:[]},PegRule:{name:hA.$type,properties:{definition:{name:hA.definition},name:{name:hA.name}},superTypes:[]},PegSequence:{name:bz.$type,properties:{elements:{name:bz.elements,defaultValue:[]}},superTypes:[]},PegSuffix:{name:dA.$type,properties:{operator:{name:dA.operator},primary:{name:dA.primary}},superTypes:[]},Pie:{name:Df.$type,properties:{accDescr:{name:Df.accDescr},accTitle:{name:Df.accTitle},sections:{name:Df.sections,defaultValue:[]},showData:{name:Df.showData,defaultValue:!1},title:{name:Df.title}},superTypes:[]},PieSection:{name:rC.$type,properties:{label:{name:rC.label},value:{name:rC.value}},superTypes:[]},Pipeline:{name:Z$.$type,properties:{components:{name:Z$.components,defaultValue:[]},parent:{name:Z$.parent}},superTypes:[]},PipelineComponent:{name:$5.$type,properties:{evolution:{name:$5.evolution},label:{name:$5.label},name:{name:$5.name}},superTypes:[]},Radar:{name:kf.$type,properties:{accDescr:{name:kf.accDescr},accTitle:{name:kf.accTitle},axes:{name:kf.axes,defaultValue:[]},curves:{name:kf.curves,defaultValue:[]},options:{name:kf.options,defaultValue:[]},title:{name:kf.title}},superTypes:[]},Railroad:{name:Jm.$type,properties:{accDescr:{name:Jm.accDescr},accTitle:{name:Jm.accTitle},rules:{name:Jm.rules,defaultValue:[]},title:{name:Jm.title}},superTypes:[]},RailroadAbnf:{name:eg.$type,properties:{accDescr:{name:eg.accDescr},accTitle:{name:eg.accTitle},rules:{name:eg.rules,defaultValue:[]},title:{name:eg.title}},superTypes:[]},RailroadChoiceExpr:{name:Tz.$type,properties:{alternatives:{name:Tz.alternatives,defaultValue:[]}},superTypes:[Qc.$type]},RailroadEbnf:{name:tg.$type,properties:{accDescr:{name:tg.accDescr},accTitle:{name:tg.accTitle},rules:{name:tg.rules,defaultValue:[]},title:{name:tg.title}},superTypes:[]},RailroadExpression:{name:Qc.$type,properties:{},superTypes:[]},RailroadNonTerminalExpr:{name:Cz.$type,properties:{name:{name:Cz.name}},superTypes:[Qc.$type]},RailroadOneOrMoreExpr:{name:kz.$type,properties:{element:{name:kz.element}},superTypes:[Qc.$type]},RailroadOptionalExpr:{name:wz.$type,properties:{element:{name:wz.element}},superTypes:[Qc.$type]},RailroadPeg:{name:rg.$type,properties:{accDescr:{name:rg.accDescr},accTitle:{name:rg.accTitle},rules:{name:rg.rules,defaultValue:[]},title:{name:rg.title}},superTypes:[]},RailroadRule:{name:fA.$type,properties:{definition:{name:fA.definition},name:{name:fA.name}},superTypes:[]},RailroadSequenceExpr:{name:Sz.$type,properties:{elements:{name:Sz.elements,defaultValue:[]}},superTypes:[Qc.$type]},RailroadSpecialExpr:{name:Ez.$type,properties:{text:{name:Ez.text}},superTypes:[Qc.$type]},RailroadTerminalExpr:{name:Az.$type,properties:{value:{name:Az.value}},superTypes:[Qc.$type]},RailroadZeroOrMoreExpr:{name:Rz.$type,properties:{element:{name:Rz.element}},superTypes:[Qc.$type]},Section:{name:Q$.$type,properties:{classSelector:{name:Q$.classSelector},name:{name:Q$.name}},superTypes:[RT.$type]},Service:{name:l1.$type,properties:{icon:{name:l1.icon},iconText:{name:l1.iconText},id:{name:l1.id},in:{name:l1.in},title:{name:l1.title}},superTypes:[]},Size:{name:J$.$type,properties:{height:{name:J$.height},width:{name:J$.width}},superTypes:[]},Statement:{name:Pm.$type,properties:{},superTypes:[]},Transition:{name:A1.$type,properties:{from:{name:A1.from},label:{name:A1.label},to:{name:A1.to}},superTypes:[]},TreeNode:{name:Om.$type,properties:{classAnnotation:{name:Om.classAnnotation},descAnnotation:{name:Om.descAnnotation},iconAnnotation:{name:Om.iconAnnotation},indent:{name:Om.indent},name:{name:Om.name}},superTypes:[]},TreeView:{name:y1.$type,properties:{accDescr:{name:y1.accDescr},accTitle:{name:y1.accTitle},nodes:{name:y1.nodes,defaultValue:[]},title:{name:y1.title}},superTypes:[]},Treemap:{name:ng.$type,properties:{accDescr:{name:ng.accDescr},accTitle:{name:ng.accTitle},title:{name:ng.title},TreemapRows:{name:ng.TreemapRows,defaultValue:[]}},superTypes:[]},TreemapRow:{name:eF.$type,properties:{indent:{name:eF.indent},item:{name:eF.item}},superTypes:[]},Wardley:{name:ba.$type,properties:{accDescr:{name:ba.accDescr},accelerators:{name:ba.accelerators,defaultValue:[]},accTitle:{name:ba.accTitle},anchors:{name:ba.anchors,defaultValue:[]},annotation:{name:ba.annotation,defaultValue:[]},annotations:{name:ba.annotations,defaultValue:[]},components:{name:ba.components,defaultValue:[]},deaccelerators:{name:ba.deaccelerators,defaultValue:[]},evolution:{name:ba.evolution},evolves:{name:ba.evolves,defaultValue:[]},links:{name:ba.links,defaultValue:[]},notes:{name:ba.notes,defaultValue:[]},pipelines:{name:ba.pipelines,defaultValue:[]},size:{name:ba.size},title:{name:ba.title}},superTypes:[]}}}static{_(this,"MermaidAstReflection")}},Li=new j3e,y0t=_(()=>iTe??(iTe=Ca(`{"$type":"Grammar","isDeclared":true,"name":"ArchitectureGrammar","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Architecture","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@24"},"arguments":[],"cardinality":"*"},{"$type":"Keyword","value":"architecture-beta"},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@24"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$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":[]}},{"$type":"Assignment","feature":"alignments","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}}]},"entry":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"LeftPort","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":":"},{"$type":"Assignment","feature":"lhsDir","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}}]},"entry":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"RightPort","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"rhsDir","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}},{"$type":"Keyword","value":":"}]},"entry":false,"parameters":[]},{"$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@12"},"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@30"},"arguments":[]}},{"$type":"Keyword","value":"-"}]}]},{"$type":"Assignment","feature":"rhsInto","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]},"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}]},"entry":false,"parameters":[]},{"$type":"ParserRule","name":"Group","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"group"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]}},{"$type":"Assignment","feature":"icon","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@29"},"arguments":[]},"cardinality":"?"},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@30"},"arguments":[]},"cardinality":"?"},{"$type":"Group","elements":[{"$type":"Keyword","value":"in"},{"$type":"Assignment","feature":"in","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Service","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"service"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]}},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"iconText","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}},{"$type":"Assignment","feature":"icon","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@29"},"arguments":[]}}],"cardinality":"?"},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@30"},"arguments":[]},"cardinality":"?"},{"$type":"Group","elements":[{"$type":"Keyword","value":"in"},{"$type":"Assignment","feature":"in","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Junction","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"junction"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"in"},{"$type":"Assignment","feature":"in","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Edge","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"lhsId","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]}},{"$type":"Assignment","feature":"lhsGroup","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]},"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]},{"$type":"Assignment","feature":"rhsId","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]}},{"$type":"Assignment","feature":"rhsGroup","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]},"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Alignment","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"align"},{"$type":"Assignment","feature":"direction","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"row"},{"$type":"Keyword","value":"column"}]}},{"$type":"Assignment","feature":"members","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]}},{"$type":"Assignment","feature":"members","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]},"cardinality":"+"},{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"ARROW_DIRECTION","definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"L"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"R"},"parenthesized":false}],"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"T"},"parenthesized":false}],"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"B"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARROW_GROUP","definition":{"$type":"RegexToken","regex":"/\\\\{group\\\\}/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARROW_INTO","definition":{"$type":"RegexToken","regex":"/<|>/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"ParserRule","name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@24"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@19"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@20"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","name":"ARCH_ICON","definition":{"$type":"RegexToken","regex":"/\\\\([\\\\w-:]+\\\\)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARCH_TITLE","definition":{"$type":"RegexToken","regex":"/\\\\[(?:\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'|[\\\\w ]+)\\\\]/","parenthesized":false},"fragment":false,"hidden":false}],"interfaces":[],"types":[]}`)),"ArchitectureGrammarGrammar"),v0t=_(()=>aTe??(aTe=Ca(`{"$type":"Grammar","isDeclared":true,"name":"CynefinGrammar","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Cynefin","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[],"cardinality":"*"},{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"cynefin-beta"},{"$type":"Keyword","value":"cynefin-beta:"}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[],"cardinality":"*"},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]},{"$type":"Assignment","feature":"domains","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}},{"$type":"Assignment","feature":"transitions","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"DomainBlock","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"domain","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[],"cardinality":"*"},{"$type":"Group","elements":[{"$type":"Assignment","feature":"items","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[],"cardinality":"*"}],"cardinality":"*"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"DomainItem","definition":{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]}},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Transition","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"from","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},{"$type":"Keyword","value":"-->"},{"$type":"Assignment","feature":"to","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":":"},{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"DOMAIN_NAME","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"complex"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"complicated"},"parenthesized":false}],"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"clear"},"parenthesized":false}],"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"chaotic"},"parenthesized":false}],"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"confusion"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"ParserRule","name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"entry":false,"fragment":false,"parameters":[]},{"$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":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@11"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@12"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false}],"interfaces":[],"types":[]}`)),"CynefinGrammarGrammar"),x0t=_(()=>sTe??(sTe=Ca('{"$type":"Grammar","isDeclared":true,"name":"EventModeling","interfaces":[{"$type":"Interface","name":"Common","attributes":[{"$type":"TypeAttribute","name":"accDescr","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accTitle","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"title","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]}],"rules":[{"$type":"ParserRule","entry":true,"name":"EventModel","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"eventmodeling"},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@21"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}},{"$type":"Assignment","feature":"modelEntities","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}},{"$type":"Assignment","feature":"frames","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}},{"$type":"Assignment","feature":"dataEntities","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}},{"$type":"Assignment","feature":"noteEntities","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]}},{"$type":"Assignment","feature":"gwtEntities","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EmModelEntityType","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"rmo"},{"$type":"Keyword","value":"readmodel"},{"$type":"Keyword","value":"ui"},{"$type":"Keyword","value":"cmd"},{"$type":"Keyword","value":"command"},{"$type":"Keyword","value":"evt"},{"$type":"Keyword","value":"event"},{"$type":"Keyword","value":"pcr"},{"$type":"Keyword","value":"processor"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EmDataType","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"json"},{"$type":"Keyword","value":"jsobj"},{"$type":"Keyword","value":"figma"},{"$type":"Keyword","value":"salt"},{"$type":"Keyword","value":"uri"},{"$type":"Keyword","value":"md"},{"$type":"Keyword","value":"html"},{"$type":"Keyword","value":"text"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"EmDataInline","definition":{"$type":"Group","elements":[{"$type":"Group","elements":[{"$type":"Keyword","value":"`"},{"$type":"Assignment","feature":"dataType","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}},{"$type":"Keyword","value":"`"}],"cardinality":"?"},{"$type":"Assignment","feature":"dataInlineValue","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[]}}]},"entry":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"EmDataBlock","definition":{"$type":"Group","elements":[{"$type":"Group","elements":[{"$type":"Keyword","value":"`"},{"$type":"Assignment","feature":"dataType","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}},{"$type":"Keyword","value":"`"}],"cardinality":"?"},{"$type":"Assignment","feature":"dataBlockValue","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}}]},"entry":false,"parameters":[]},{"$type":"ParserRule","name":"QualifiedName","dataType":"string","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]},{"$type":"Group","elements":[{"$type":"Keyword","value":"."},{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]}],"cardinality":"*"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EmTimeFrame","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"tf"},{"$type":"Keyword","value":"timeframe"}]},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}},{"$type":"Assignment","feature":"modelEntityType","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}},{"$type":"Assignment","feature":"entityIdentifier","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"->>"},{"$type":"Assignment","feature":"sourceFrames","operator":"+=","terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@8"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]},"deprecatedSyntax":false,"isMulti":false}}],"cardinality":"*"},{"$type":"Group","elements":[{"$type":"Keyword","value":"[["},{"$type":"Assignment","feature":"dataReference","operator":"=","terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@10"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]},"deprecatedSyntax":false,"isMulti":false}},{"$type":"Keyword","value":"]]"}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[],"cardinality":"?"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EmResetFrame","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"rf"},{"$type":"Keyword","value":"resetframe"}]},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}},{"$type":"Assignment","feature":"modelEntityType","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}},{"$type":"Assignment","feature":"entityIdentifier","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"->>"},{"$type":"Assignment","feature":"sourceFrames","operator":"+=","terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@8"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]},"deprecatedSyntax":false,"isMulti":false}}],"cardinality":"*"},{"$type":"Group","elements":[{"$type":"Keyword","value":"[["},{"$type":"Assignment","feature":"dataReference","operator":"=","terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@10"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]},"deprecatedSyntax":false,"isMulti":false}},{"$type":"Keyword","value":"]]"}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[],"cardinality":"?"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EmFrame","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EmModelEntity","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"entity"},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EmDataEntity","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"data"},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EmNoteEntity","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"note"},{"$type":"Assignment","feature":"sourceFrame","operator":"=","terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@8"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]},"deprecatedSyntax":false,"isMulti":false}},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EmGwt","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"gwt"},{"$type":"Assignment","feature":"sourceFrame","operator":"=","terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@8"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]},"deprecatedSyntax":false,"isMulti":false}},{"$type":"Keyword","value":"given"},{"$type":"Assignment","feature":"givenStatements","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]},"cardinality":"+"},{"$type":"Group","elements":[{"$type":"Keyword","value":"when"},{"$type":"Assignment","feature":"whenStatements","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]},"cardinality":"+"}],"cardinality":"?"},{"$type":"Keyword","value":"then"},{"$type":"Assignment","feature":"thenStatements","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]},"cardinality":"+"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EmGwtStatement","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]},{"$type":"Assignment","feature":"entityIdentifier","operator":"=","terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@9"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]},"deprecatedSyntax":false,"isMulti":false}}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EM_EID","dataType":"string","definition":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EM_FI","dataType":"string","definition":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]},"entry":false,"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"EM_ID","definition":{"$type":"RegexToken","regex":"/[_a-zA-Z][\\\\w_]*/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"EM_FID","definition":{"$type":"RegexToken","regex":"/\\\\d{1,3}/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"EM_DATA_INLINE","definition":{"$type":"RegexToken","regex":"/\\\\{(.*)\\\\}|\\"(.*)\\"|\'(.*)\'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"EM_DATA_BLOCK","definition":{"$type":"RegexToken","regex":"/\\\\{[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?\\\\}(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"EM_ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"EM_ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"EM_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"EM_WS","definition":{"$type":"RegexToken","regex":"/\\\\s+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"EM_YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"EM_DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"EM_SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"EM_ML_COMMENT","definition":{"$type":"RegexToken","regex":"/\\\\/\\\\*[\\\\s\\\\S]*?\\\\*\\\\//","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"EM_SL_COMMENT","definition":{"$type":"RegexToken","regex":"/\\\\/\\\\/[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false}],"imports":[],"types":[]}')),"EventModelingGrammar"),b0t=_(()=>oTe??(oTe=Ca(`{"$type":"Grammar","isDeclared":true,"name":"GitGraphGrammar","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":"*"}]},"fragment":false,"parameters":[]},{"$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":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$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"}]}},"entry":false,"fragment":false,"parameters":[]},{"$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":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$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":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$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":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$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":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$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":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"entry":false,"fragment":false,"parameters":[]},{"$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":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@14"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@15"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","name":"REFERENCE","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\\\w([-\\\\./\\\\w]*[-\\\\w])?/","parenthesized":false},"fragment":false,"hidden":false}],"interfaces":[],"types":[]}`)),"GitGraphGrammarGrammar"),T0t=_(()=>lTe??(lTe=Ca(`{"$type":"Grammar","isDeclared":true,"name":"InfoGrammar","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":"?"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"entry":false,"fragment":false,"parameters":[]},{"$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":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@7"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@8"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false}],"interfaces":[],"types":[]}`)),"InfoGrammarGrammar"),C0t=_(()=>cTe??(cTe=Ca(`{"$type":"Grammar","isDeclared":true,"name":"PacketGrammar","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":"*"}]},"fragment":false,"parameters":[]},{"$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":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"entry":false,"fragment":false,"parameters":[]},{"$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":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@8"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@9"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false}],"interfaces":[],"types":[]}`)),"PacketGrammarGrammar"),k0t=_(()=>uTe??(uTe=Ca(`{"$type":"Grammar","isDeclared":true,"name":"PieGrammar","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":"*"}]},"fragment":false,"parameters":[]},{"$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":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"FLOAT_PIE","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/-?[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT_PIE","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/-?(0|[1-9][0-9]*)(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER_PIE","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@2"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@3"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"ParserRule","name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"entry":false,"fragment":false,"parameters":[]},{"$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":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@11"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@12"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false}],"interfaces":[],"types":[]}`)),"PieGrammarGrammar"),w0t=_(()=>hTe??(hTe=Ca(`{"$type":"Grammar","isDeclared":true,"name":"RadarGrammar","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":"*"}]},"fragment":false,"parameters":[]},{"$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":"]"}]},"entry":false,"parameters":[]},{"$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":"?"}]},"entry":false,"fragment":false,"parameters":[]},{"$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":"}"}]},"entry":false,"fragment":false,"parameters":[]},{"$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":"*"}]}]},"entry":false,"parameters":[]},{"$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,"isMulti":false}},{"$type":"Keyword","value":":","cardinality":"?"},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"NumberEntry","returnType":{"$ref":"#/interfaces@0"},"definition":{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}},"entry":false,"fragment":false,"parameters":[]},{"$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":[]}}]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"GRATICULE","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"circle"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"polygon"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"ParserRule","name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"entry":false,"fragment":false,"parameters":[]},{"$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":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@15"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@16"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false}],"interfaces":[{"$type":"Interface","name":"Entry","attributes":[{"$type":"TypeAttribute","name":"axis","isOptional":true,"type":{"$type":"ReferenceType","referenceType":{"$type":"SimpleType","typeRef":{"$ref":"#/rules@2"}},"isMulti":false}},{"$type":"TypeAttribute","name":"value","type":{"$type":"SimpleType","primitiveType":"number"},"isOptional":false}],"superTypes":[]}],"types":[]}`)),"RadarGrammarGrammar"),S0t=_(()=>dTe??(dTe=Ca('{"$type":"Grammar","isDeclared":true,"name":"RailroadAbnfGrammar","rules":[{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ABNF_RULENAME","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[A-Za-z][A-Za-z0-9-]*/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ABNF_STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"[^\\"]*\\"/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ABNF_NUMVAL","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/%[xXdDbB][0-9A-Fa-f]+(?:-[0-9A-Fa-f]+|\\\\.[0-9A-Fa-f]+)*/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ABNF_REPEAT","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[0-9]*\\\\*[0-9]*/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ABNF_EXACT_REPEAT","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[0-9]+/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"ABNF_WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t \\\\r\\\\n]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"ABNF_YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"ABNF_DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"ABNF_SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"ABNF_COMMENT","definition":{"$type":"RegexToken","regex":"/;[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false},{"$type":"ParserRule","entry":true,"name":"RailroadAbnf","returnType":{"$ref":"#/interfaces@0"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"railroad-abnf-beta"},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@0"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}},{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}}],"cardinality":"*"},{"$type":"Assignment","feature":"rules","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]},"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"AbnfRule","returnType":{"$ref":"#/interfaces@1"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"Keyword","value":"="},{"$type":"Assignment","feature":"definition","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}},{"$type":"Keyword","value":";"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"AbnfAlternation","returnType":{"$ref":"#/interfaces@2"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"alternatives","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"/"},{"$type":"Assignment","feature":"alternatives","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}}],"cardinality":"*"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"AbnfConcatenation","returnType":{"$ref":"#/interfaces@3"},"definition":{"$type":"Assignment","feature":"elements","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]},"cardinality":"+"},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"AbnfElement","returnType":{"$ref":"#/interfaces@4"},"definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"repeat","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}},{"$type":"Assignment","feature":"repeat","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}}],"cardinality":"?"},{"$type":"Assignment","feature":"primary","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[]}}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"AbnfPrimary","returnType":{"$ref":"#/interfaces@5"},"definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@21"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"AbnfStringLiteral","returnType":{"$ref":"#/interfaces@6"},"definition":{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"AbnfNumVal","returnType":{"$ref":"#/interfaces@7"},"definition":{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"AbnfRuleName","returnType":{"$ref":"#/interfaces@8"},"definition":{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"AbnfGroup","returnType":{"$ref":"#/interfaces@9"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"("},{"$type":"Assignment","feature":"element","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}},{"$type":"Keyword","value":")"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"AbnfOptionalGroup","returnType":{"$ref":"#/interfaces@10"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"element","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}},{"$type":"Keyword","value":"]"}]},"entry":false,"fragment":false,"parameters":[]}],"interfaces":[{"$type":"Interface","name":"RailroadAbnf","attributes":[{"$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"}},{"$type":"TypeAttribute","name":"rules","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@1"}}},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"AbnfRule","attributes":[{"$type":"TypeAttribute","name":"name","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false},{"$type":"TypeAttribute","name":"definition","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@2"}},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"AbnfAlternation","attributes":[{"$type":"TypeAttribute","name":"alternatives","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@3"}}},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"AbnfConcatenation","attributes":[{"$type":"TypeAttribute","name":"elements","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@4"}}},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"AbnfElement","attributes":[{"$type":"TypeAttribute","name":"repeat","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"primary","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@5"}},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"AbnfPrimary","attributes":[],"superTypes":[]},{"$type":"Interface","name":"AbnfStringLiteral","superTypes":[{"$ref":"#/interfaces@5"}],"attributes":[{"$type":"TypeAttribute","name":"value","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}]},{"$type":"Interface","name":"AbnfNumVal","superTypes":[{"$ref":"#/interfaces@5"}],"attributes":[{"$type":"TypeAttribute","name":"value","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}]},{"$type":"Interface","name":"AbnfRuleName","superTypes":[{"$ref":"#/interfaces@5"}],"attributes":[{"$type":"TypeAttribute","name":"name","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}]},{"$type":"Interface","name":"AbnfGroup","superTypes":[{"$ref":"#/interfaces@5"}],"attributes":[{"$type":"TypeAttribute","name":"element","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@2"}},"isOptional":false}]},{"$type":"Interface","name":"AbnfOptionalGroup","superTypes":[{"$ref":"#/interfaces@5"}],"attributes":[{"$type":"TypeAttribute","name":"element","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@2"}},"isOptional":false}]}],"imports":[],"types":[]}')),"RailroadAbnfGrammarGrammar"),E0t=_(()=>fTe??(fTe=Ca(`{"$type":"Grammar","isDeclared":true,"name":"RailroadEbnfGrammar","rules":[{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"EBNF_ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[A-Z_a-z][\\\\w-]*/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"EBNF_STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"EBNF_SPECIAL_SEQUENCE","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\\\?(?=[^?;]*[^?\\\\s;][^?;]*\\\\?)[^?;]*\\\\?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"EBNF_WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t \\\\r\\\\n]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"EBNF_YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"EBNF_DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"EBNF_SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"EBNF_BLOCK_COMMENT","definition":{"$type":"RegexToken","regex":"/\\\\/\\\\*[\\\\s\\\\S]*?\\\\*\\\\//","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"EBNF_ISO_COMMENT","definition":{"$type":"RegexToken","regex":"/\\\\(\\\\*[\\\\s\\\\S]*?\\\\*\\\\)/","parenthesized":false},"fragment":false},{"$type":"ParserRule","entry":true,"name":"RailroadEbnf","returnType":{"$ref":"#/interfaces@0"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"railroad-ebnf-beta"},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@0"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}},{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}}],"cardinality":"*"},{"$type":"Assignment","feature":"rules","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]},"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EbnfRule","returnType":{"$ref":"#/interfaces@1"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"="},{"$type":"Keyword","value":"::="}]},{"$type":"Assignment","feature":"definition","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]}},{"$type":"Keyword","value":";"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EbnfChoice","returnType":{"$ref":"#/interfaces@2"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"alternatives","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"|"},{"$type":"Assignment","feature":"alternatives","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}}],"cardinality":"*"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EbnfSequence","returnType":{"$ref":"#/interfaces@3"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"elements","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":",","cardinality":"?"},{"$type":"Assignment","feature":"elements","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}}],"cardinality":"*"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EbnfTerm","returnType":{"$ref":"#/interfaces@4"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"base","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}},{"$type":"Assignment","feature":"postfixes","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@24"},"arguments":[]},"cardinality":"*"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EbnfPrimary","returnType":{"$ref":"#/interfaces@5"},"definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@21"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EbnfTerminal","returnType":{"$ref":"#/interfaces@7"},"definition":{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EbnfNonTerminal","returnType":{"$ref":"#/interfaces@8"},"definition":{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EbnfSpecial","returnType":{"$ref":"#/interfaces@9"},"definition":{"$type":"Assignment","feature":"text","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EbnfGroup","returnType":{"$ref":"#/interfaces@10"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"("},{"$type":"Assignment","feature":"element","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]}},{"$type":"Keyword","value":")"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EbnfOptional","returnType":{"$ref":"#/interfaces@11"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"element","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]}},{"$type":"Keyword","value":"]"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EbnfRepetition","returnType":{"$ref":"#/interfaces@12"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"{"},{"$type":"Assignment","feature":"element","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]}},{"$type":"Keyword","value":"}"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EbnfPostfix","returnType":{"$ref":"#/interfaces@6"},"definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@25"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@26"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@27"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@28"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EbnfOptionalPostfix","returnType":{"$ref":"#/interfaces@13"},"definition":{"$type":"Assignment","feature":"operator","operator":"=","terminal":{"$type":"Keyword","value":"?"}},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EbnfZeroOrMorePostfix","returnType":{"$ref":"#/interfaces@14"},"definition":{"$type":"Assignment","feature":"operator","operator":"=","terminal":{"$type":"Keyword","value":"*"}},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EbnfOneOrMorePostfix","returnType":{"$ref":"#/interfaces@15"},"definition":{"$type":"Assignment","feature":"operator","operator":"=","terminal":{"$type":"Keyword","value":"+"}},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EbnfExceptionPostfix","returnType":{"$ref":"#/interfaces@16"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"-"},{"$type":"Assignment","feature":"except","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},"entry":false,"fragment":false,"parameters":[]}],"interfaces":[{"$type":"Interface","name":"RailroadEbnf","attributes":[{"$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"}},{"$type":"TypeAttribute","name":"rules","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@1"}}},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"EbnfRule","attributes":[{"$type":"TypeAttribute","name":"name","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false},{"$type":"TypeAttribute","name":"definition","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@2"}},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"EbnfChoice","attributes":[{"$type":"TypeAttribute","name":"alternatives","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@3"}}},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"EbnfSequence","attributes":[{"$type":"TypeAttribute","name":"elements","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@4"}}},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"EbnfTerm","attributes":[{"$type":"TypeAttribute","name":"base","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@5"}},"isOptional":false},{"$type":"TypeAttribute","name":"postfixes","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@6"}}},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"EbnfPrimary","attributes":[],"superTypes":[]},{"$type":"Interface","name":"EbnfPostfix","attributes":[],"superTypes":[]},{"$type":"Interface","name":"EbnfTerminal","superTypes":[{"$ref":"#/interfaces@5"}],"attributes":[{"$type":"TypeAttribute","name":"value","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}]},{"$type":"Interface","name":"EbnfNonTerminal","superTypes":[{"$ref":"#/interfaces@5"}],"attributes":[{"$type":"TypeAttribute","name":"name","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}]},{"$type":"Interface","name":"EbnfSpecial","superTypes":[{"$ref":"#/interfaces@5"}],"attributes":[{"$type":"TypeAttribute","name":"text","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}]},{"$type":"Interface","name":"EbnfGroup","superTypes":[{"$ref":"#/interfaces@5"}],"attributes":[{"$type":"TypeAttribute","name":"element","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@2"}},"isOptional":false}]},{"$type":"Interface","name":"EbnfOptional","superTypes":[{"$ref":"#/interfaces@5"}],"attributes":[{"$type":"TypeAttribute","name":"element","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@2"}},"isOptional":false}]},{"$type":"Interface","name":"EbnfRepetition","superTypes":[{"$ref":"#/interfaces@5"}],"attributes":[{"$type":"TypeAttribute","name":"element","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@2"}},"isOptional":false}]},{"$type":"Interface","name":"EbnfOptionalPostfix","superTypes":[{"$ref":"#/interfaces@6"}],"attributes":[{"$type":"TypeAttribute","name":"operator","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}]},{"$type":"Interface","name":"EbnfZeroOrMorePostfix","superTypes":[{"$ref":"#/interfaces@6"}],"attributes":[{"$type":"TypeAttribute","name":"operator","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}]},{"$type":"Interface","name":"EbnfOneOrMorePostfix","superTypes":[{"$ref":"#/interfaces@6"}],"attributes":[{"$type":"TypeAttribute","name":"operator","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}]},{"$type":"Interface","name":"EbnfExceptionPostfix","superTypes":[{"$ref":"#/interfaces@6"}],"attributes":[{"$type":"TypeAttribute","name":"except","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@5"}},"isOptional":false}]}],"imports":[],"types":[]}`)),"RailroadEbnfGrammarGrammar"),A0t=_(()=>pTe??(pTe=Ca(`{"$type":"Grammar","isDeclared":true,"name":"RailroadGrammar","rules":[{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"RR_ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[A-Z_a-z][\\\\w-]*/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"RR_STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"RR_WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t \\\\r\\\\n]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"RR_YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"RR_DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"RR_SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"RR_BLOCK_COMMENT","definition":{"$type":"RegexToken","regex":"/\\\\/\\\\*[\\\\s\\\\S]*?\\\\*\\\\//","parenthesized":false},"fragment":false},{"$type":"ParserRule","entry":true,"name":"Railroad","returnType":{"$ref":"#/interfaces@0"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"railroad-beta"},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@0"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}},{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}}],"cardinality":"*"},{"$type":"Assignment","feature":"rules","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]},"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"RailroadRule","returnType":{"$ref":"#/interfaces@1"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"Keyword","value":"="},{"$type":"Assignment","feature":"definition","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}},{"$type":"Keyword","value":";"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"RailroadExpression","returnType":{"$ref":"#/interfaces@2"},"definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"RailroadSequenceExpr","returnType":{"$ref":"#/interfaces@3"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"sequence"},{"$type":"Keyword","value":"("},{"$type":"Assignment","feature":"elements","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"elements","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}}],"cardinality":"*"},{"$type":"Keyword","value":")"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"RailroadChoiceExpr","returnType":{"$ref":"#/interfaces@4"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"choice"},{"$type":"Keyword","value":"("},{"$type":"Assignment","feature":"alternatives","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"alternatives","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}}],"cardinality":"*"},{"$type":"Keyword","value":")"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"RailroadOptionalExpr","returnType":{"$ref":"#/interfaces@5"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"optional"},{"$type":"Keyword","value":"("},{"$type":"Assignment","feature":"element","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}},{"$type":"Keyword","value":")"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"RailroadOneOrMoreExpr","returnType":{"$ref":"#/interfaces@6"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"oneOrMore"},{"$type":"Keyword","value":"("},{"$type":"Assignment","feature":"element","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}},{"$type":"Keyword","value":")"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"RailroadZeroOrMoreExpr","returnType":{"$ref":"#/interfaces@7"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"zeroOrMore"},{"$type":"Keyword","value":"("},{"$type":"Assignment","feature":"element","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}},{"$type":"Keyword","value":")"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"RailroadTerminalExpr","returnType":{"$ref":"#/interfaces@8"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"terminal"},{"$type":"Keyword","value":"("},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},{"$type":"Keyword","value":")"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"RailroadNonTerminalExpr","returnType":{"$ref":"#/interfaces@9"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"nonterminal"},{"$type":"Keyword","value":"("},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},{"$type":"Keyword","value":")"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"RailroadSpecialExpr","returnType":{"$ref":"#/interfaces@10"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"special"},{"$type":"Keyword","value":"("},{"$type":"Assignment","feature":"text","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},{"$type":"Keyword","value":")"}]},"entry":false,"fragment":false,"parameters":[]}],"interfaces":[{"$type":"Interface","name":"Railroad","attributes":[{"$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"}},{"$type":"TypeAttribute","name":"rules","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@1"}}},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"RailroadRule","attributes":[{"$type":"TypeAttribute","name":"name","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false},{"$type":"TypeAttribute","name":"definition","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@2"}},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"RailroadExpression","attributes":[],"superTypes":[]},{"$type":"Interface","name":"RailroadSequenceExpr","superTypes":[{"$ref":"#/interfaces@2"}],"attributes":[{"$type":"TypeAttribute","name":"elements","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@2"}}},"isOptional":false}]},{"$type":"Interface","name":"RailroadChoiceExpr","superTypes":[{"$ref":"#/interfaces@2"}],"attributes":[{"$type":"TypeAttribute","name":"alternatives","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@2"}}},"isOptional":false}]},{"$type":"Interface","name":"RailroadOptionalExpr","superTypes":[{"$ref":"#/interfaces@2"}],"attributes":[{"$type":"TypeAttribute","name":"element","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@2"}},"isOptional":false}]},{"$type":"Interface","name":"RailroadOneOrMoreExpr","superTypes":[{"$ref":"#/interfaces@2"}],"attributes":[{"$type":"TypeAttribute","name":"element","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@2"}},"isOptional":false}]},{"$type":"Interface","name":"RailroadZeroOrMoreExpr","superTypes":[{"$ref":"#/interfaces@2"}],"attributes":[{"$type":"TypeAttribute","name":"element","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@2"}},"isOptional":false}]},{"$type":"Interface","name":"RailroadTerminalExpr","superTypes":[{"$ref":"#/interfaces@2"}],"attributes":[{"$type":"TypeAttribute","name":"value","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}]},{"$type":"Interface","name":"RailroadNonTerminalExpr","superTypes":[{"$ref":"#/interfaces@2"}],"attributes":[{"$type":"TypeAttribute","name":"name","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}]},{"$type":"Interface","name":"RailroadSpecialExpr","superTypes":[{"$ref":"#/interfaces@2"}],"attributes":[{"$type":"TypeAttribute","name":"text","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}]}],"imports":[],"types":[]}`)),"RailroadGrammarGrammar"),R0t=_(()=>mTe??(mTe=Ca(`{"$type":"Grammar","isDeclared":true,"name":"RailroadPegGrammar","rules":[{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"PEG_ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[A-Z_a-z][\\\\w-]*/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"PEG_STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"PEG_WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t \\\\r\\\\n]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"PEG_YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"PEG_DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"PEG_SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"PEG_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/#[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false},{"$type":"ParserRule","entry":true,"name":"RailroadPeg","returnType":{"$ref":"#/interfaces@0"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"railroad-peg-beta"},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@0"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}},{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}}],"cardinality":"*"},{"$type":"Assignment","feature":"rules","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]},"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"PegRule","returnType":{"$ref":"#/interfaces@1"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"Keyword","value":"<-"},{"$type":"Assignment","feature":"definition","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}},{"$type":"Keyword","value":";"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"PegOrderedChoice","returnType":{"$ref":"#/interfaces@2"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"alternatives","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"/"},{"$type":"Assignment","feature":"alternatives","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}}],"cardinality":"*"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"PegSequence","returnType":{"$ref":"#/interfaces@3"},"definition":{"$type":"Assignment","feature":"elements","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]},"cardinality":"+"},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"PegPrefix","returnType":{"$ref":"#/interfaces@4"},"definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"operator","operator":"=","terminal":{"$type":"Keyword","value":"&"}},{"$type":"Assignment","feature":"operator","operator":"=","terminal":{"$type":"Keyword","value":"!"}}],"cardinality":"?"},{"$type":"Assignment","feature":"suffix","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"PegSuffix","returnType":{"$ref":"#/interfaces@5"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"primary","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"operator","operator":"=","terminal":{"$type":"Keyword","value":"?"}},{"$type":"Assignment","feature":"operator","operator":"=","terminal":{"$type":"Keyword","value":"*"}},{"$type":"Assignment","feature":"operator","operator":"=","terminal":{"$type":"Keyword","value":"+"}}],"cardinality":"?"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"PegPrimary","returnType":{"$ref":"#/interfaces@6"},"definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"PegLiteral","returnType":{"$ref":"#/interfaces@7"},"definition":{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"PegIdentifier","returnType":{"$ref":"#/interfaces@8"},"definition":{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"PegGroup","returnType":{"$ref":"#/interfaces@9"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"("},{"$type":"Assignment","feature":"element","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}},{"$type":"Keyword","value":")"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"PegAny","returnType":{"$ref":"#/interfaces@10"},"definition":{"$type":"Assignment","feature":"dot","operator":"=","terminal":{"$type":"Keyword","value":"."}},"entry":false,"fragment":false,"parameters":[]}],"interfaces":[{"$type":"Interface","name":"RailroadPeg","attributes":[{"$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"}},{"$type":"TypeAttribute","name":"rules","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@1"}}},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"PegRule","attributes":[{"$type":"TypeAttribute","name":"name","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false},{"$type":"TypeAttribute","name":"definition","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@2"}},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"PegOrderedChoice","attributes":[{"$type":"TypeAttribute","name":"alternatives","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@3"}}},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"PegSequence","attributes":[{"$type":"TypeAttribute","name":"elements","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@4"}}},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"PegPrefix","attributes":[{"$type":"TypeAttribute","name":"operator","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"suffix","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@5"}},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"PegSuffix","attributes":[{"$type":"TypeAttribute","name":"primary","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@6"}},"isOptional":false},{"$type":"TypeAttribute","name":"operator","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]},{"$type":"Interface","name":"PegPrimary","attributes":[],"superTypes":[]},{"$type":"Interface","name":"PegLiteral","superTypes":[{"$ref":"#/interfaces@6"}],"attributes":[{"$type":"TypeAttribute","name":"value","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}]},{"$type":"Interface","name":"PegIdentifier","superTypes":[{"$ref":"#/interfaces@6"}],"attributes":[{"$type":"TypeAttribute","name":"name","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}]},{"$type":"Interface","name":"PegGroup","superTypes":[{"$ref":"#/interfaces@6"}],"attributes":[{"$type":"TypeAttribute","name":"element","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@2"}},"isOptional":false}]},{"$type":"Interface","name":"PegAny","superTypes":[{"$ref":"#/interfaces@6"}],"attributes":[{"$type":"TypeAttribute","name":"dot","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}]}],"imports":[],"types":[]}`)),"RailroadPegGrammarGrammar"),_0t=_(()=>gTe??(gTe=Ca(`{"$type":"Grammar","isDeclared":true,"name":"TreemapGrammar","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":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"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@15"},"arguments":[]}}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"TREEMAP_KEYWORD","definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"treemap-beta"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"treemap"},"parenthesized":false}],"parenthesized":false},"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]*))?(?:;)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STYLE_SEPARATOR","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":":::"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"SEPARATOR","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":":"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"COMMA","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":","},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INDENTATION","definition":{"$type":"RegexToken","regex":"/[ \\\\t]{1,}/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WS","definition":{"$type":"RegexToken","regex":"/[ \\\\t]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"ML_COMMENT","definition":{"$type":"RegexToken","regex":"/\\\\%\\\\%[^\\\\n]*/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"NL","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false},{"$type":"ParserRule","name":"TreemapRow","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"indent","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]},"cardinality":"?"},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"item","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"ClassDef","dataType":"string","definition":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Item","returnType":{"$ref":"#/interfaces@0"},"definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$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":"?"}]},"entry":false,"fragment":false,"parameters":[]},{"$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@11"},"arguments":[],"cardinality":"?"},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"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":"?"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"ID2","definition":{"$type":"RegexToken","regex":"/[a-zA-Z_][a-zA-Z0-9_]*/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER2","definition":{"$type":"RegexToken","regex":"/[0-9_\\\\.\\\\,]+/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"ParserRule","name":"MyNumber","dataType":"number","definition":{"$type":"RuleCall","rule":{"$ref":"#/rules@21"},"arguments":[]},"entry":false,"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"STRING2","definition":{"$type":"RegexToken","regex":"/\\"[^\\"]*\\"|'[^']*'/","parenthesized":false},"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@15"}}},"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":[]}],"imports":[],"types":[],"$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 */"}`)),"TreemapGrammarGrammar"),L0t=_(()=>yTe??(yTe=Ca(`{"$type":"Grammar","isDeclared":true,"name":"TreeViewGrammar","rules":[{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"ParserRule","entry":true,"name":"TreeView","returnType":{"$ref":"#/interfaces@0"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"treeView-beta"},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[],"cardinality":"?"},{"$type":"Assignment","feature":"nodes","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]},"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@0"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"CLASS_ANNOTATION","definition":{"$type":"RegexToken","regex":"/[ \\\\t]+:::[ \\\\t]*[A-Za-z_][\\\\w-]*/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ICON_ANNOTATION","definition":{"$type":"RegexToken","regex":"/[ \\\\t]+icon\\\\([\\\\w-]*(?::[\\\\w-]+)?\\\\)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"DESC_ANNOTATION","definition":{"$type":"RegexToken","regex":"/[ \\\\t]+##[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INDENTATION","definition":{"$type":"RegexToken","regex":"/[ \\\\t]{1,}/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"QUOTED_NAME","definition":{"$type":"RegexToken","regex":"/\\"[^\\"]*\\"|'[^']*'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WS","definition":{"$type":"RegexToken","regex":"/[ \\\\t]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"ML_COMMENT","definition":{"$type":"RegexToken","regex":"/\\\\%\\\\%[^\\\\n]*/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"NL","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","name":"BARE_NAME","definition":{"$type":"RegexToken","regex":"/(?!:::|icon\\\\(|##)[^ \\\\t\\\\n\\\\r\\"'](?:(?![ \\\\t]+:::[ \\\\t]*[A-Za-z_]|[ \\\\t]+icon\\\\(|[ \\\\t]+##)[^\\\\n\\\\r])*/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"ParserRule","name":"TreeNode","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"indent","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]},"cardinality":"?"},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}}]},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"classAnnotation","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Assignment","feature":"iconAnnotation","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}},{"$type":"Assignment","feature":"descAnnotation","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}}],"cardinality":"*"}]},"entry":false,"fragment":false,"parameters":[]}],"interfaces":[{"$type":"Interface","name":"TreeView","attributes":[{"$type":"TypeAttribute","name":"nodes","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":[]}],"imports":[],"types":[],"$comment":"/**\\n * TreeView grammar for Langium\\n *\\n * Supports both quoted labels (\\"my file\\") and bare labels (index.js).\\n * Annotations (:::class, icon(), ## description) are parsed directly into\\n * AST fields by the grammar. Value conversion for stripping quotes, extracting\\n * class names, icon names, and description text happens in valueConverter.ts.\\n *\\n * The ML_COMMENT and NL hidden terminals handle whitespace, comments, and newlines\\n * before the treeView keyword, allowing for empty lines and comments before the\\n * treeView declaration.\\n */"}`)),"TreeViewGrammarGrammar"),D0t=_(()=>vTe??(vTe=Ca(`{"$type":"Grammar","isDeclared":true,"name":"WardleyGrammar","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Wardley","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@52"},"arguments":[],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@25"},"arguments":[]},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@52"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@42"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"Statement","definition":{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"size","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}},{"$type":"Assignment","feature":"evolution","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"Assignment","feature":"anchors","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Assignment","feature":"components","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}},{"$type":"Assignment","feature":"links","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}},{"$type":"Assignment","feature":"evolves","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}},{"$type":"Assignment","feature":"pipelines","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]}},{"$type":"Assignment","feature":"notes","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}},{"$type":"Assignment","feature":"annotations","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]}},{"$type":"Assignment","feature":"annotation","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}},{"$type":"Assignment","feature":"accelerators","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}},{"$type":"Assignment","feature":"deaccelerators","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[]}}]},"entry":false,"parameters":[]},{"$type":"ParserRule","name":"Size","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@26"},"arguments":[]},{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"width","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@48"},"arguments":[]}},{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"height","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@48"},"arguments":[]}},{"$type":"Keyword","value":"]"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Evolution","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@27"},"arguments":[]},{"$type":"Assignment","feature":"stages","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]},{"$type":"Assignment","feature":"stages","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}}],"cardinality":"+"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EvolutionStage","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"@"},{"$type":"Assignment","feature":"boundary","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}}],"cardinality":"?"},{"$type":"Group","elements":[{"$type":"Keyword","value":"/"},{"$type":"Assignment","feature":"secondName","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}}],"cardinality":"?"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Anchor","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@28"},"arguments":[]},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}},{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"visibility","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"evolution","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":"]"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Component","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@29"},"arguments":[]},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}},{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"visibility","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"evolution","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":"]"},{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]},"cardinality":"?"},{"$type":"Assignment","feature":"decorator","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]},"cardinality":"?"},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"inertia","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@31"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"("},{"$type":"Assignment","feature":"inertia","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@31"},"arguments":[]}},{"$type":"Keyword","value":")"}]}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Label","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@30"},"arguments":[]},{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"negX","operator":"?=","terminal":{"$type":"Keyword","value":"-"},"cardinality":"?"},{"$type":"Assignment","feature":"offsetX","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@48"},"arguments":[]}},{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"negY","operator":"?=","terminal":{"$type":"Keyword","value":"-"},"cardinality":"?"},{"$type":"Assignment","feature":"offsetY","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@48"},"arguments":[]}},{"$type":"Keyword","value":"]"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Decorator","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"("},{"$type":"Assignment","feature":"strategy","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@24"},"arguments":[]}},{"$type":"Keyword","value":")"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Link","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"from","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}},{"$type":"Assignment","feature":"fromPort","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@21"},"arguments":[]},"cardinality":"?"},{"$type":"Assignment","feature":"arrow","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}]},"cardinality":"?"},{"$type":"Assignment","feature":"to","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}},{"$type":"Assignment","feature":"toPort","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@21"},"arguments":[]},"cardinality":"?"},{"$type":"Assignment","feature":"linkLabel","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]},"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Evolve","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@32"},"arguments":[]},{"$type":"Assignment","feature":"component","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}},{"$type":"Assignment","feature":"target","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Pipeline","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@33"},"arguments":[]},{"$type":"Assignment","feature":"parent","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}},{"$type":"Keyword","value":"{"},{"$type":"RuleCall","rule":{"$ref":"#/rules@52"},"arguments":[],"cardinality":"+"},{"$type":"Assignment","feature":"components","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]},"cardinality":"+"},{"$type":"Keyword","value":"}"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"PipelineComponent","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@29"},"arguments":[]},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}},{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"evolution","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":"]"},{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]},"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Note","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@34"},"arguments":[]},{"$type":"Assignment","feature":"text","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]}},{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"visibility","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"evolution","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":"]"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Annotations","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@35"},"arguments":[]},{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"x","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}},{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"y","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}},{"$type":"Keyword","value":"]"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Annotation","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@36"},"arguments":[]},{"$type":"Assignment","feature":"number","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@48"},"arguments":[]}},{"$type":"Keyword","value":","},{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"x","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}},{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"y","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}},{"$type":"Keyword","value":"]"},{"$type":"Assignment","feature":"text","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"CoordinateValue","dataType":"number","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@48"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Accelerator","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@37"},"arguments":[]},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}},{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"x","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"y","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":"]"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Deaccelerator","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@38"},"arguments":[]},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}},{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"x","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"y","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":"]"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"WARDLEY_NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARROW","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"->"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"LINK_PORT","definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"+<>"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"+>"},"parenthesized":false}],"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"+<"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"LINK_ARROW","definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"-->"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"-.->"},"parenthesized":false}],"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":">"},"parenthesized":false}],"parenthesized":false},{"$type":"RegexToken","regex":"/\\\\+'[^']*'<>/","parenthesized":false}],"parenthesized":false},{"$type":"RegexToken","regex":"/\\\\+'[^']*'/","parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"LINK_LABEL","definition":{"$type":"RegexToken","regex":"/;[^\\\\n\\\\r]+/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRATEGY","definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"build"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"buy"},"parenthesized":false}],"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"outsource"},"parenthesized":false}],"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"market"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_WARDLEY","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"wardley-beta"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_SIZE","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"size"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_EVOLUTION","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"evolution"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_ANCHOR","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"anchor"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_COMPONENT","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"component"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_LABEL","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"label"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_INERTIA","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"inertia"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_EVOLVE","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"evolve"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_PIPELINE","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"pipeline"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_NOTE","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"note"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_ANNOTATIONS","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"annotations"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_ANNOTATION","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"annotation"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_ACCELERATOR","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"accelerator"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_DEACCELERATOR","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"deaccelerator"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NAME_WITH_SPACES","definition":{"$type":"RegexToken","regex":"/(?!title\\\\s|accTitle|accDescr)[A-Za-z](?:[A-Za-z0-9_()&]|-(?!>))*(?:[ \\\\t]+[A-Za-z(](?:[A-Za-z0-9_()&]|-(?!>))*)*/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WS","definition":{"$type":"RegexToken","regex":"/[ \\\\t]+/","parenthesized":false},"fragment":false},{"$type":"ParserRule","name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@52"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@44"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@45"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@46"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@47"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@48"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false}],"interfaces":[],"types":[]}`)),"WardleyGrammarGrammar"),I0t={languageId:"architecture",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},M0t={languageId:"cynefin",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},N0t={languageId:"eventmodeling",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},P0t={languageId:"gitGraph",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},O0t={languageId:"info",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},B0t={languageId:"packet",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},$0t={languageId:"pie",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},F0t={languageId:"radar",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},G0t={languageId:"railroadAbnf",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},z0t={languageId:"railroadEbnf",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},V0t={languageId:"railroad",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},W0t={languageId:"railroadPeg",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},q0t={languageId:"treemap",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},H0t={languageId:"treeView",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},U0t={languageId:"wardley",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},Tn={AstReflection:_(()=>new j3e,"AstReflection")},UW={Grammar:_(()=>y0t(),"Grammar"),LanguageMetaData:_(()=>I0t,"LanguageMetaData"),parser:{}},YW={Grammar:_(()=>v0t(),"Grammar"),LanguageMetaData:_(()=>M0t,"LanguageMetaData"),parser:{}},jW={Grammar:_(()=>x0t(),"Grammar"),LanguageMetaData:_(()=>N0t,"LanguageMetaData"),parser:{}},XW={Grammar:_(()=>b0t(),"Grammar"),LanguageMetaData:_(()=>P0t,"LanguageMetaData"),parser:{}},KW={Grammar:_(()=>T0t(),"Grammar"),LanguageMetaData:_(()=>O0t,"LanguageMetaData"),parser:{}},ZW={Grammar:_(()=>C0t(),"Grammar"),LanguageMetaData:_(()=>B0t,"LanguageMetaData"),parser:{}},QW={Grammar:_(()=>k0t(),"Grammar"),LanguageMetaData:_(()=>$0t,"LanguageMetaData"),parser:{}},JW={Grammar:_(()=>w0t(),"Grammar"),LanguageMetaData:_(()=>F0t,"LanguageMetaData"),parser:{}},eq={Grammar:_(()=>S0t(),"Grammar"),LanguageMetaData:_(()=>G0t,"LanguageMetaData"),parser:{}},tq={Grammar:_(()=>E0t(),"Grammar"),LanguageMetaData:_(()=>z0t,"LanguageMetaData"),parser:{}},rq={Grammar:_(()=>A0t(),"Grammar"),LanguageMetaData:_(()=>V0t,"LanguageMetaData"),parser:{}},nq={Grammar:_(()=>R0t(),"Grammar"),LanguageMetaData:_(()=>W0t,"LanguageMetaData"),parser:{}},iq={Grammar:_(()=>_0t(),"Grammar"),LanguageMetaData:_(()=>q0t,"LanguageMetaData"),parser:{}},aq={Grammar:_(()=>L0t(),"Grammar"),LanguageMetaData:_(()=>H0t,"LanguageMetaData"),parser:{}},sq={Grammar:_(()=>D0t(),"Grammar"),LanguageMetaData:_(()=>U0t,"LanguageMetaData"),parser:{}},Y0t=/accDescr(?:[\t ]*:([^\n\r]*)|\s*{([^}]*)})/,j0t=/accTitle[\t ]*:([^\n\r]*)/,X0t=/title([\t ][^\n\r]*|)/,K0t={ACC_DESCR:Y0t,ACC_TITLE:j0t,TITLE:X0t},Wi=class extends wW{static{s(this,"AbstractMermaidValueConverter")}static{_(this,"AbstractMermaidValueConverter")}runConverter(e,t,r){let n=this.runCommonConverter(e,t,r);return n===void 0&&(n=this.runCustomConverter(e,t,r)),n===void 0?super.runConverter(e,t,r):n}runCommonConverter(e,t,r){let n=K0t[e.name];if(n===void 0)return;let i=n.exec(t);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,` +`)}}},Lo=class extends Wi{static{s(this,"CommonValueConverter")}static{_(this,"CommonValueConverter")}runCustomConverter(e,t,r){}},En=class extends VR{static{s(this,"AbstractMermaidTokenBuilder")}static{_(this,"AbstractMermaidTokenBuilder")}constructor(e){super(),this.keywords=new Set(e)}buildKeywordTokens(e,t,r){let n=super.buildKeywordTokens(e,t,r);return n.forEach(i=>{this.keywords.has(i.name)&&i.PATTERN!==void 0&&(i.PATTERN=new RegExp(i.PATTERN.toString()+"(?:(?=%%)|(?!\\S))"))}),n}},Z0t=class extends En{static{s(this,"CommonTokenBuilder")}static{_(this,"CommonTokenBuilder")}}});function JR(e=dn){let t=Lr(on(e),Tn),r=Lr(sn({shared:t}),JW,QR);return t.ServiceRegistry.register(r),{shared:t,Radar:r}}var Q0t,QR,oq=F(()=>{"use strict";fn();Q0t=class extends En{static{s(this,"RadarTokenBuilder")}static{_(this,"RadarTokenBuilder")}constructor(){super(["radar-beta"])}},QR={parser:{TokenBuilder:_(()=>new Q0t,"TokenBuilder"),ValueConverter:_(()=>new Lo,"ValueConverter")}};s(JR,"createRadarServices");_(JR,"createRadarServices")});function Q1(e=dn){let t=Lr(on(e),Tn),r=Lr(sn({shared:t}),rq,e6);return t.ServiceRegistry.register(r),{shared:t,Railroad:r}}var J0t,X3e,eyt,e6,lq=F(()=>{"use strict";fn();J0t=class extends En{static{s(this,"RailroadTokenBuilder")}static{_(this,"RailroadTokenBuilder")}constructor(){super(["railroad-beta"])}},X3e=_(e=>{let t=e.slice(1,-1),r="";for(let n=0;nnew J0t,"TokenBuilder"),ValueConverter:_(()=>new eyt,"ValueConverter")}};s(Q1,"createRailroadServices");_(Q1,"createRailroadServices")});function J1(e=dn){let t=Lr(on(e),Tn),r=Lr(sn({shared:t}),tq,t6);return t.ServiceRegistry.register(r),{shared:t,RailroadEbnf:r}}var tyt,K3e,ryt,t6,cq=F(()=>{"use strict";fn();tyt=class extends En{static{s(this,"RailroadEbnfTokenBuilder")}static{_(this,"RailroadEbnfTokenBuilder")}constructor(){super(["railroad-ebnf-beta"])}},K3e=_(e=>{let t=e.slice(1,-1),r="";for(let n=0;nnew tyt,"TokenBuilder"),ValueConverter:_(()=>new ryt,"ValueConverter")}};s(J1,"createRailroadEbnfServices");_(J1,"createRailroadEbnfServices")});function ev(e=dn){let t=Lr(on(e),Tn),r=Lr(sn({shared:t}),eq,r6);return t.ServiceRegistry.register(r),{shared:t,RailroadAbnf:r}}var nyt,iyt,r6,uq=F(()=>{"use strict";fn();nyt=class extends En{static{s(this,"RailroadAbnfTokenBuilder")}static{_(this,"RailroadAbnfTokenBuilder")}constructor(){super(["railroad-abnf-beta"])}},iyt=class extends Wi{static{s(this,"RailroadAbnfValueConverter")}static{_(this,"RailroadAbnfValueConverter")}runConverter(e,t,r){let n=super.runConverter(e,t,r);if(e.name==="TITLE"&&typeof n=="string"){let i=n.trim();if(i.startsWith('"')&&i.endsWith('"')||i.startsWith("'")&&i.endsWith("'"))return i.slice(1,-1)}return n}runCustomConverter(e,t,r){if(e.name==="ABNF_STRING")return t.slice(1,-1)}},r6={parser:{TokenBuilder:_(()=>new nyt,"TokenBuilder"),ValueConverter:_(()=>new iyt,"ValueConverter")}};s(ev,"createRailroadAbnfServices");_(ev,"createRailroadAbnfServices")});function tv(e=dn){let t=Lr(on(e),Tn),r=Lr(sn({shared:t}),nq,n6);return t.ServiceRegistry.register(r),{shared:t,RailroadPeg:r}}var ayt,Z3e,syt,n6,hq=F(()=>{"use strict";fn();ayt=class extends En{static{s(this,"RailroadPegTokenBuilder")}static{_(this,"RailroadPegTokenBuilder")}constructor(){super(["railroad-peg-beta"])}},Z3e=_(e=>{let t=e.slice(1,-1),r="";for(let n=0;nnew ayt,"TokenBuilder"),ValueConverter:_(()=>new syt,"ValueConverter")}};s(tv,"createRailroadPegServices");_(tv,"createRailroadPegServices")});function Q3e(e){let t=e.validation.TreemapValidator,r=e.validation.ValidationRegistry;if(r){let n={Treemap:t.checkSingleRoot.bind(t)};r.register(n,t)}}function a6(e=dn){let t=Lr(on(e),Tn),r=Lr(sn({shared:t}),iq,i6);return t.ServiceRegistry.register(r),Q3e(r),{shared:t,Treemap:r}}var oyt,lyt,cyt,uyt,i6,dq=F(()=>{"use strict";fn();oyt=class extends En{static{s(this,"TreemapTokenBuilder")}static{_(this,"TreemapTokenBuilder")}constructor(){super(["treemap"])}},lyt=/classDef\s+([A-Z_a-z]\w+)(?:\s+([^\n\r;]*))?;?/,cyt=class extends Wi{static{s(this,"TreemapValueConverter")}static{_(this,"TreemapValueConverter")}runCustomConverter(e,t,r){if(e.name==="NUMBER2")return parseFloat(t.replace(/,/g,""));if(e.name==="SEPARATOR")return t.substring(1,t.length-1);if(e.name==="STRING2")return t.substring(1,t.length-1);if(e.name==="INDENTATION")return t.length;if(e.name==="ClassDef"){if(typeof t!="string")return t;let n=lyt.exec(t);if(n)return{$type:"ClassDefStatement",className:n[1],styleText:n[2]||void 0}}}};s(Q3e,"registerValidationChecks");_(Q3e,"registerValidationChecks");uyt=class{static{s(this,"TreemapValidator")}static{_(this,"TreemapValidator")}checkSingleRoot(e,t){let r;for(let n of e.TreemapRows)n.item&&(r===void 0&&n.indent===void 0?r=0:n.indent===void 0?t("error","Multiple root nodes are not allowed in a treemap.",{node:n,property:"item"}):r!==void 0&&r>=parseInt(n.indent,10)&&t("error","Multiple root nodes are not allowed in a treemap.",{node:n,property:"item"}))}},i6={parser:{TokenBuilder:_(()=>new oyt,"TokenBuilder"),ValueConverter:_(()=>new cyt,"ValueConverter")},validation:{TreemapValidator:_(()=>new uyt,"TreemapValidator")}};s(a6,"createTreemapServices");_(a6,"createTreemapServices")});function o6(e=dn){let t=Lr(on(e),Tn),r=Lr(sn({shared:t}),sq,s6);return t.ServiceRegistry.register(r),{shared:t,Wardley:r}}var hyt,s6,fq=F(()=>{"use strict";fn();hyt=class extends Wi{static{s(this,"WardleyValueConverter")}static{_(this,"WardleyValueConverter")}runCustomConverter(e,t,r){switch(e.name.toUpperCase()){case"LINK_LABEL":return t.substring(1).trim();default:return}}},s6={parser:{ValueConverter:_(()=>new hyt,"ValueConverter")}};s(o6,"createWardleyServices");_(o6,"createWardleyServices")});function c6(e=dn){let t=Lr(on(e),Tn),r=Lr(sn({shared:t}),YW,l6);return t.ServiceRegistry.register(r),{shared:t,Cynefin:r}}var dyt,l6,pq=F(()=>{"use strict";fn();dyt=class extends En{static{s(this,"CynefinTokenBuilder")}static{_(this,"CynefinTokenBuilder")}constructor(){super(["cynefin-beta"])}},l6={parser:{TokenBuilder:_(()=>new dyt,"TokenBuilder"),ValueConverter:_(()=>new Lo,"ValueConverter")}};s(c6,"createCynefinServices");_(c6,"createCynefinServices")});function h6(e=dn){let t=Lr(on(e),Tn),r=Lr(sn({shared:t}),XW,u6);return t.ServiceRegistry.register(r),{shared:t,GitGraph:r}}var fyt,u6,mq=F(()=>{"use strict";fn();fyt=class extends En{static{s(this,"GitGraphTokenBuilder")}static{_(this,"GitGraphTokenBuilder")}constructor(){super(["gitGraph"])}},u6={parser:{TokenBuilder:_(()=>new fyt,"TokenBuilder"),ValueConverter:_(()=>new Lo,"ValueConverter")}};s(h6,"createGitGraphServices");_(h6,"createGitGraphServices")});function f6(e=dn){let t=Lr(on(e),Tn),r=Lr(sn({shared:t}),KW,d6);return t.ServiceRegistry.register(r),{shared:t,Info:r}}var pyt,d6,gq=F(()=>{"use strict";fn();pyt=class extends En{static{s(this,"InfoTokenBuilder")}static{_(this,"InfoTokenBuilder")}constructor(){super(["info","showInfo"])}},d6={parser:{TokenBuilder:_(()=>new pyt,"TokenBuilder"),ValueConverter:_(()=>new Lo,"ValueConverter")}};s(f6,"createInfoServices");_(f6,"createInfoServices")});function m6(e=dn){let t=Lr(on(e),Tn),r=Lr(sn({shared:t}),ZW,p6);return t.ServiceRegistry.register(r),{shared:t,Packet:r}}var myt,p6,yq=F(()=>{"use strict";fn();myt=class extends En{static{s(this,"PacketTokenBuilder")}static{_(this,"PacketTokenBuilder")}constructor(){super(["packet"])}},p6={parser:{TokenBuilder:_(()=>new myt,"TokenBuilder"),ValueConverter:_(()=>new Lo,"ValueConverter")}};s(m6,"createPacketServices");_(m6,"createPacketServices")});function y6(e=dn){let t=Lr(on(e),Tn),r=Lr(sn({shared:t}),QW,g6);return t.ServiceRegistry.register(r),{shared:t,Pie:r}}var gyt,yyt,g6,vq=F(()=>{"use strict";fn();gyt=class extends En{static{s(this,"PieTokenBuilder")}static{_(this,"PieTokenBuilder")}constructor(){super(["pie","showData"])}},yyt=class extends Wi{static{s(this,"PieValueConverter")}static{_(this,"PieValueConverter")}runCustomConverter(e,t,r){if(e.name==="PIE_SECTION_LABEL")return t.replace(/"/g,"").trim()}},g6={parser:{TokenBuilder:_(()=>new gyt,"TokenBuilder"),ValueConverter:_(()=>new yyt,"ValueConverter")}};s(y6,"createPieServices");_(y6,"createPieServices")});function x6(e=dn){let t=Lr(on(e),Tn),r=Lr(sn({shared:t}),aq,v6);return t.ServiceRegistry.register(r),{shared:t,TreeView:r}}var vyt,xyt,v6,xq=F(()=>{"use strict";fn();vyt=class extends Wi{static{s(this,"TreeViewValueConverter")}static{_(this,"TreeViewValueConverter")}runCustomConverter(e,t,r){if(e.name==="INDENTATION")return t?.length||0;if(e.name==="QUOTED_NAME")return t.substring(1,t.length-1);if(e.name==="BARE_NAME")return t.replace(/[\t ]+$/,"");if(e.name==="CLASS_ANNOTATION")return t.trim().substring(3).trim();if(e.name==="ICON_ANNOTATION"){let n=t.trim();return n.substring(5,n.length-1)}if(e.name==="DESC_ANNOTATION")return t.trim().substring(2).trim()}},xyt=class extends En{static{s(this,"TreeViewTokenBuilder")}static{_(this,"TreeViewTokenBuilder")}constructor(){super(["treeView-beta"])}},v6={parser:{TokenBuilder:_(()=>new xyt,"TokenBuilder"),ValueConverter:_(()=>new vyt,"ValueConverter")}};s(x6,"createTreeViewServices");_(x6,"createTreeViewServices")});function T6(e=dn){let t=Lr(on(e),Tn),r=Lr(sn({shared:t}),UW,b6);return t.ServiceRegistry.register(r),{shared:t,Architecture:r}}var byt,Tyt,b6,bq=F(()=>{"use strict";fn();byt=class extends En{static{s(this,"ArchitectureTokenBuilder")}static{_(this,"ArchitectureTokenBuilder")}constructor(){super(["architecture"])}},Tyt=class extends Wi{static{s(this,"ArchitectureValueConverter")}static{_(this,"ArchitectureValueConverter")}runCustomConverter(e,t,r){if(e.name==="ARCH_ICON")return t.replace(/[()]/g,"").trim();if(e.name==="ARCH_TEXT_ICON")return t.replace(/["()]/g,"");if(e.name==="ARCH_TITLE"){let n=t.replace(/^\[|]$/g,"").trim();return(n.startsWith('"')&&n.endsWith('"')||n.startsWith("'")&&n.endsWith("'"))&&(n=n.slice(1,-1),n=n.replace(/\\"/g,'"').replace(/\\'/g,"'")),n.trim()}}},b6={parser:{TokenBuilder:_(()=>new byt,"TokenBuilder"),ValueConverter:_(()=>new Tyt,"ValueConverter")}};s(T6,"createArchitectureServices");_(T6,"createArchitectureServices")});function n5e(e){let t=e.validation.EventModelingValidator,r=e.validation.ValidationRegistry;if(r){let n={EmTimeFrame:t.checkSourceFrameTypes.bind(t),EmResetFrame:t.checkSourceFrameTypes.bind(t)};r.register(n,t)}}function k6(e=dn){let t=Lr(on(e),Tn),r=Lr(sn({shared:t}),jW,C6);return t.ServiceRegistry.register(r),n5e(r),{shared:t,EventModel:r}}var Cyt,J3e,e5e,Tq,t5e,r5e,kyt,C6,Cq=F(()=>{"use strict";fn();Cyt=class extends En{static{s(this,"EventModelingTokenBuilder")}static{_(this,"EventModelingTokenBuilder")}constructor(){super(["eventmodeling"])}},J3e=new Set(["cmd","command"]),e5e=new Set(["evt","event"]),Tq=new Set(["rmo","readmodel"]),t5e=new Set(["pcr","processor"]),r5e=new Set(["ui"]);s(n5e,"registerValidationChecks");_(n5e,"registerValidationChecks");kyt=class{static{s(this,"EventModelingValidator")}static{_(this,"EventModelingValidator")}checkSourceFrameTypes(e,t){e.sourceFrames.length!==0&&(J3e.has(e.modelEntityType)?this.validateSources(e,new Set([...r5e,...t5e]),"command","ui or processor",t):e5e.has(e.modelEntityType)?this.validateSources(e,J3e,"event","command",t):Tq.has(e.modelEntityType)?this.validateSources(e,e5e,"read model","event",t):t5e.has(e.modelEntityType)?this.validateSources(e,Tq,"processor","read model",t):r5e.has(e.modelEntityType)&&this.validateSources(e,Tq,"ui","read model",t))}validateSources(e,t,r,n,i){for(let a of e.sourceFrames){let o=a.ref;o!==void 0&&!t.has(o.modelEntityType)&&i("error",`A ${r} can only receive input from a ${n}, not from '${o.modelEntityType}'.`,{node:e,property:"sourceFrames"})}}},C6={parser:{TokenBuilder:_(()=>new Cyt,"TokenBuilder"),ValueConverter:_(()=>new Lo,"ValueConverter")},validation:{EventModelingValidator:_(()=>new kyt,"EventModelingValidator")}};s(k6,"createEventModelingServices");_(k6,"createEventModelingServices")});var i5e={};ar(i5e,{InfoModule:()=>d6,createInfoServices:()=>f6});var a5e=F(()=>{"use strict";gq();fn()});var s5e={};ar(s5e,{PacketModule:()=>p6,createPacketServices:()=>m6});var o5e=F(()=>{"use strict";yq();fn()});var l5e={};ar(l5e,{PieModule:()=>g6,createPieServices:()=>y6});var c5e=F(()=>{"use strict";vq();fn()});var u5e={};ar(u5e,{TreeViewModule:()=>v6,createTreeViewServices:()=>x6});var h5e=F(()=>{"use strict";xq();fn()});var d5e={};ar(d5e,{ArchitectureModule:()=>b6,createArchitectureServices:()=>T6});var f5e=F(()=>{"use strict";bq();fn()});var p5e={};ar(p5e,{GitGraphModule:()=>u6,createGitGraphServices:()=>h6});var m5e=F(()=>{"use strict";mq();fn()});var g5e={};ar(g5e,{EventModelingModule:()=>C6,createEventModelingServices:()=>k6});var y5e=F(()=>{"use strict";Cq();fn()});var v5e={};ar(v5e,{RadarModule:()=>QR,createRadarServices:()=>JR});var x5e=F(()=>{"use strict";oq();fn()});var b5e={};ar(b5e,{RailroadModule:()=>e6,createRailroadServices:()=>Q1});var T5e=F(()=>{"use strict";lq();fn()});var C5e={};ar(C5e,{RailroadEbnfModule:()=>t6,createRailroadEbnfServices:()=>J1});var k5e=F(()=>{"use strict";cq();fn()});var w5e={};ar(w5e,{RailroadAbnfModule:()=>r6,createRailroadAbnfServices:()=>ev});var S5e=F(()=>{"use strict";uq();fn()});var E5e={};ar(E5e,{RailroadPegModule:()=>n6,createRailroadPegServices:()=>tv});var A5e=F(()=>{"use strict";hq();fn()});var R5e={};ar(R5e,{TreemapModule:()=>i6,createTreemapServices:()=>a6});var _5e=F(()=>{"use strict";dq();fn()});var L5e={};ar(L5e,{WardleyModule:()=>s6,createWardleyServices:()=>o6});var D5e=F(()=>{"use strict";fq();fn()});var I5e={};ar(I5e,{CynefinModule:()=>l6,createCynefinServices:()=>c6});var M5e=F(()=>{"use strict";pq();fn()});async function pi(e,t){let r=wyt[e];if(!r)throw new Error(`Unknown diagram type: ${e}`);Pa[e]||await r();let i=Pa[e].parse(t);if(i.lexerErrors.length>0||i.parserErrors.length>0)throw new wh(i);return i.value}var Pa,wyt,wh,Oa=F(()=>{"use strict";oq();lq();cq();uq();hq();dq();fq();pq();mq();gq();yq();vq();xq();bq();Cq();fn();Pa={},wyt={info:_(async()=>{let{createInfoServices:e}=await Promise.resolve().then(()=>(a5e(),i5e)),t=e().Info.parser.LangiumParser;Pa.info=t},"info"),packet:_(async()=>{let{createPacketServices:e}=await Promise.resolve().then(()=>(o5e(),s5e)),t=e().Packet.parser.LangiumParser;Pa.packet=t},"packet"),pie:_(async()=>{let{createPieServices:e}=await Promise.resolve().then(()=>(c5e(),l5e)),t=e().Pie.parser.LangiumParser;Pa.pie=t},"pie"),treeView:_(async()=>{let{createTreeViewServices:e}=await Promise.resolve().then(()=>(h5e(),u5e)),t=e().TreeView.parser.LangiumParser;Pa.treeView=t},"treeView"),architecture:_(async()=>{let{createArchitectureServices:e}=await Promise.resolve().then(()=>(f5e(),d5e)),t=e().Architecture.parser.LangiumParser;Pa.architecture=t},"architecture"),gitGraph:_(async()=>{let{createGitGraphServices:e}=await Promise.resolve().then(()=>(m5e(),p5e)),t=e().GitGraph.parser.LangiumParser;Pa.gitGraph=t},"gitGraph"),eventmodeling:_(async()=>{let{createEventModelingServices:e}=await Promise.resolve().then(()=>(y5e(),g5e)),t=e().EventModel.parser.LangiumParser;Pa.eventmodeling=t},"eventmodeling"),radar:_(async()=>{let{createRadarServices:e}=await Promise.resolve().then(()=>(x5e(),v5e)),t=e().Radar.parser.LangiumParser;Pa.radar=t},"radar"),railroad:_(async()=>{let{createRailroadServices:e}=await Promise.resolve().then(()=>(T5e(),b5e)),t=e().Railroad.parser.LangiumParser;Pa.railroad=t},"railroad"),railroadEbnf:_(async()=>{let{createRailroadEbnfServices:e}=await Promise.resolve().then(()=>(k5e(),C5e)),t=e().RailroadEbnf.parser.LangiumParser;Pa.railroadEbnf=t},"railroadEbnf"),railroadAbnf:_(async()=>{let{createRailroadAbnfServices:e}=await Promise.resolve().then(()=>(S5e(),w5e)),t=e().RailroadAbnf.parser.LangiumParser;Pa.railroadAbnf=t},"railroadAbnf"),railroadPeg:_(async()=>{let{createRailroadPegServices:e}=await Promise.resolve().then(()=>(A5e(),E5e)),t=e().RailroadPeg.parser.LangiumParser;Pa.railroadPeg=t},"railroadPeg"),treemap:_(async()=>{let{createTreemapServices:e}=await Promise.resolve().then(()=>(_5e(),R5e)),t=e().Treemap.parser.LangiumParser;Pa.treemap=t},"treemap"),wardley:_(async()=>{let{createWardleyServices:e}=await Promise.resolve().then(()=>(D5e(),L5e)),t=e().Wardley.parser.LangiumParser;Pa.wardley=t},"wardley"),cynefin:_(async()=>{let{createCynefinServices:e}=await Promise.resolve().then(()=>(M5e(),I5e)),t=e().Cynefin.parser.LangiumParser;Pa.cynefin=t},"cynefin")};s(pi,"parse");_(pi,"parse");wh=class extends Error{static{s(this,"MermaidParseError")}constructor(e){let t=e.lexerErrors.map(n=>{let i=n.line!==void 0&&!isNaN(n.line)?n.line:"?",a=n.column!==void 0&&!isNaN(n.column)?n.column:"?";return`Lexer error on line ${i}, column ${a}: ${n.message}`}).join(` +`),r=e.parserErrors.map(n=>{let i=n.token.startLine!==void 0&&!isNaN(n.token.startLine)?n.token.startLine:"?",a=n.token.startColumn!==void 0&&!isNaN(n.token.startColumn)?n.token.startColumn:"?";return`Parse error on line ${i}, column ${a}: ${n.message}`}).join(` +`);super(`Parsing failed: ${t} ${r}`),this.result=e}static{_(this,"MermaidParseError")}}});function Nn(e,t){e.accDescr&&t.setAccDescription?.(e.accDescr),e.accTitle&&t.setAccTitle?.(e.accTitle),e.title&&t.setDiagramTitle?.(e.title)}var _s=F(()=>{"use strict";s(Nn,"populateCommonDb")});var Cn,w6=F(()=>{"use strict";Cn={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4}});var Ff,S6=F(()=>{"use strict";Ff=class{constructor(t){this.init=t;this.records=this.init()}static{s(this,"ImperativeState")}reset(){this.records=this.init()}}});function kq(){return FM({length:7})}function Eyt(e,t){let r=Object.create(null);return e.reduce((n,i)=>{let a=t(i);return r[a]||(r[a]=!0,n.push(i)),n},[])}function N5e(e,t,r){let n=e.indexOf(t);n===-1?e.push(r):e.splice(n,1,r)}function O5e(e){let t=e.reduce((i,a)=>i.seq>a.seq?i:a,e[0]),r="";e.forEach(function(i){i===t?r+=" *":r+=" |"});let n=[r,t.id,t.seq];for(let i in Wt.records.branches)Wt.records.branches.get(i)===t.id&&n.push(i);if(te.debug(n.join(" ")),t.parents&&t.parents.length==2&&t.parents[0]&&t.parents[1]){let i=Wt.records.commits.get(t.parents[0]);N5e(e,t,i),t.parents[1]&&e.push(Wt.records.commits.get(t.parents[1]))}else{if(t.parents.length==0)return;if(t.parents[0]){let i=Wt.records.commits.get(t.parents[0]);N5e(e,t,i)}}e=Eyt(e,i=>i.id),O5e(e)}var Syt,Ag,Wt,Ayt,Ryt,_yt,Lyt,Dyt,Iyt,Myt,P5e,Nyt,Pyt,Oyt,Byt,$yt,B5e,Fyt,Gyt,zyt,E6,wq=F(()=>{"use strict";Tt();Qt();mr();Gr();An();w6();S6();Ni();Syt=hr.gitGraph,Ag=s(()=>Fr({...Syt,...Lt().gitGraph}),"getConfig"),Wt=new Ff(()=>{let e=Ag(),t=e.mainBranchName,r=e.mainBranchOrder;return{mainBranchName:t,commits:new Map,head:null,branchConfig:new Map([[t,{name:t,order:r}]]),branches:new Map([[t,null]]),currBranch:t,direction:"LR",seq:0,options:{}}});s(kq,"getID");s(Eyt,"uniqBy");Ayt=s(function(e){Wt.records.direction=e},"setDirection"),Ryt=s(function(e){te.debug("options str",e),e=e?.trim(),e=e||"{}";try{Wt.records.options=JSON.parse(e)}catch(t){te.error("error while parsing gitGraph options",t.message)}},"setOptions"),_yt=s(function(){return Wt.records.options},"getOptions"),Lyt=s(function(e){let t=e.msg,r=e.id,n=e.type,i=e.tags;te.info("commit",t,r,n,i),te.debug("Entering commit:",t,r,n,i);let a=Ag();r=xt.sanitizeText(r,a),t=xt.sanitizeText(t,a),i=i?.map(l=>xt.sanitizeText(l,a));let o={id:r||Wt.records.seq+"-"+kq(),message:t,seq:Wt.records.seq++,type:n??Cn.NORMAL,tags:i??[],parents:Wt.records.head==null?[]:[Wt.records.head.id],branch:Wt.records.currBranch};Wt.records.head=o,te.info("main branch",a.mainBranchName),Wt.records.commits.has(o.id)&&te.warn(`Commit ID ${o.id} already exists`),Wt.records.commits.set(o.id,o),Wt.records.branches.set(Wt.records.currBranch,o.id),te.debug("in pushCommit "+o.id)},"commit"),Dyt=s(function(e){let t=e.name,r=e.order;if(t=xt.sanitizeText(t,Ag()),Wt.records.branches.has(t))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 ${t}")`);Wt.records.branches.set(t,Wt.records.head!=null?Wt.records.head.id:null),Wt.records.branchConfig.set(t,{name:t,order:r}),P5e(t),te.debug("in createBranch")},"branch"),Iyt=s(e=>{let t=e.branch,r=e.id,n=e.type,i=e.tags,a=Ag();t=xt.sanitizeText(t,a),r&&(r=xt.sanitizeText(r,a));let o=Wt.records.branches.get(Wt.records.currBranch),l=Wt.records.branches.get(t),u=o?Wt.records.commits.get(o):void 0,h=l?Wt.records.commits.get(l):void 0;if(u&&h&&u.branch===t)throw new Error(`Cannot merge branch '${t}' into itself.`);if(Wt.records.currBranch===t){let p=new Error('Incorrect usage of "merge". Cannot merge a branch to itself');throw p.hash={text:`merge ${t}`,token:`merge ${t}`,expected:["branch abc"]},p}if(u===void 0||!u){let p=new Error(`Incorrect usage of "merge". Current branch (${Wt.records.currBranch})has no commits`);throw p.hash={text:`merge ${t}`,token:`merge ${t}`,expected:["commit"]},p}if(!Wt.records.branches.has(t)){let p=new Error('Incorrect usage of "merge". Branch to be merged ('+t+") does not exist");throw p.hash={text:`merge ${t}`,token:`merge ${t}`,expected:[`branch ${t}`]},p}if(h===void 0||!h){let p=new Error('Incorrect usage of "merge". Branch to be merged ('+t+") has no commits");throw p.hash={text:`merge ${t}`,token:`merge ${t}`,expected:['"commit"']},p}if(u===h){let p=new Error('Incorrect usage of "merge". Both branches have same head');throw p.hash={text:`merge ${t}`,token:`merge ${t}`,expected:["branch abc"]},p}if(r&&Wt.records.commits.has(r)){let p=new Error('Incorrect usage of "merge". Commit with id:'+r+" already exists, use different custom id");throw p.hash={text:`merge ${t} ${r} ${n} ${i?.join(" ")}`,token:`merge ${t} ${r} ${n} ${i?.join(" ")}`,expected:[`merge ${t} ${r}_UNIQUE ${n} ${i?.join(" ")}`]},p}let d=l||"",f={id:r||`${Wt.records.seq}-${kq()}`,message:`merged branch ${t} into ${Wt.records.currBranch}`,seq:Wt.records.seq++,parents:Wt.records.head==null?[]:[Wt.records.head.id,d],branch:Wt.records.currBranch,type:Cn.MERGE,customType:n,customId:!!r,tags:i??[]};Wt.records.head=f,Wt.records.commits.set(f.id,f),Wt.records.branches.set(Wt.records.currBranch,f.id),te.debug(Wt.records.branches),te.debug("in mergeBranch")},"merge"),Myt=s(function(e){let t=e.id,r=e.targetId,n=e.tags,i=e.parent;te.debug("Entering cherryPick:",t,r,n);let a=Ag();if(t=xt.sanitizeText(t,a),r=xt.sanitizeText(r,a),n=n?.map(u=>xt.sanitizeText(u,a)),i=xt.sanitizeText(i,a),!t||!Wt.records.commits.has(t)){let u=new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');throw u.hash={text:`cherryPick ${t} ${r}`,token:`cherryPick ${t} ${r}`,expected:["cherry-pick abc"]},u}let o=Wt.records.commits.get(t);if(o===void 0||!o)throw new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');if(i&&!(Array.isArray(o.parents)&&o.parents.includes(i)))throw new Error("Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit.");let l=o.branch;if(o.type===Cn.MERGE&&!i)throw new Error("Incorrect usage of cherry-pick: If the source commit is a merge commit, an immediate parent commit must be specified.");if(!r||!Wt.records.commits.has(r)){if(l===Wt.records.currBranch){let f=new Error('Incorrect usage of "cherryPick". Source commit is already on current branch');throw f.hash={text:`cherryPick ${t} ${r}`,token:`cherryPick ${t} ${r}`,expected:["cherry-pick abc"]},f}let u=Wt.records.branches.get(Wt.records.currBranch);if(u===void 0||!u){let f=new Error(`Incorrect usage of "cherry-pick". Current branch (${Wt.records.currBranch})has no commits`);throw f.hash={text:`cherryPick ${t} ${r}`,token:`cherryPick ${t} ${r}`,expected:["cherry-pick abc"]},f}let h=Wt.records.commits.get(u);if(h===void 0||!h){let f=new Error(`Incorrect usage of "cherry-pick". Current branch (${Wt.records.currBranch})has no commits`);throw f.hash={text:`cherryPick ${t} ${r}`,token:`cherryPick ${t} ${r}`,expected:["cherry-pick abc"]},f}let d={id:Wt.records.seq+"-"+kq(),message:`cherry-picked ${o?.message} into ${Wt.records.currBranch}`,seq:Wt.records.seq++,parents:Wt.records.head==null?[]:[Wt.records.head.id,o.id],branch:Wt.records.currBranch,type:Cn.CHERRY_PICK,tags:n?n.filter(Boolean):[`cherry-pick:${o.id}${o.type===Cn.MERGE?`|parent:${i}`:""}`]};Wt.records.head=d,Wt.records.commits.set(d.id,d),Wt.records.branches.set(Wt.records.currBranch,d.id),te.debug(Wt.records.branches),te.debug("in cherryPick")}},"cherryPick"),P5e=s(function(e){if(e=xt.sanitizeText(e,Ag()),Wt.records.branches.has(e)){Wt.records.currBranch=e;let t=Wt.records.branches.get(Wt.records.currBranch);t===void 0||!t?Wt.records.head=null:Wt.records.head=Wt.records.commits.get(t)??null}else{let t=new Error(`Trying to checkout branch which is not yet created. (Help try using "branch ${e}")`);throw t.hash={text:`checkout ${e}`,token:`checkout ${e}`,expected:[`branch ${e}`]},t}},"checkout");s(N5e,"upsert");s(O5e,"prettyPrintCommitHistory");Nyt=s(function(){te.debug(Wt.records.commits);let e=B5e()[0];O5e([e])},"prettyPrint"),Pyt=s(function(){Wt.reset(),gr()},"clear"),Oyt=s(function(){return[...Wt.records.branchConfig.values()].map((t,r)=>t.order!==null&&t.order!==void 0?t:{...t,order:parseFloat(`0.${r}`)}).sort((t,r)=>(t.order??0)-(r.order??0)).map(({name:t})=>({name:t}))},"getBranchesAsObjArray"),Byt=s(function(){return Wt.records.branches},"getBranches"),$yt=s(function(){return Wt.records.commits},"getCommits"),B5e=s(function(){let e=[...Wt.records.commits.values()];return e.forEach(function(t){te.debug(t.id)}),e.sort((t,r)=>t.seq-r.seq),e},"getCommitsArray"),Fyt=s(function(){return Wt.records.currBranch},"getCurrentBranch"),Gyt=s(function(){return Wt.records.direction},"getDirection"),zyt=s(function(){return Wt.records.head},"getHead"),E6={commitType:Cn,getConfig:Ag,setDirection:Ayt,setOptions:Ryt,getOptions:_yt,commit:Lyt,branch:Dyt,merge:Iyt,cherryPick:Myt,checkout:P5e,prettyPrint:Nyt,clear:Pyt,getBranchesAsObjArray:Oyt,getBranches:Byt,getCommits:$yt,getCommitsArray:B5e,getCurrentBranch:Fyt,getDirection:Gyt,getHead:zyt,setAccTitle:Cr,getAccTitle:Sr,getAccDescription:Ar,setAccDescription:Er,setDiagramTitle:Mr,getDiagramTitle:Rr}});var Vyt,Wyt,qyt,Hyt,Uyt,Yyt,jyt,$5e,F5e=F(()=>{"use strict";Oa();Tt();_s();wq();w6();Vyt=s((e,t)=>{Nn(e,t),e.dir&&t.setDirection(e.dir);for(let r of e.statements)Wyt(r,t)},"populate"),Wyt=s((e,t)=>{let n={Commit:s(i=>t.commit(qyt(i)),"Commit"),Branch:s(i=>t.branch(Hyt(i)),"Branch"),Merge:s(i=>t.merge(Uyt(i)),"Merge"),Checkout:s(i=>t.checkout(Yyt(i)),"Checkout"),CherryPicking:s(i=>t.cherryPick(jyt(i)),"CherryPicking")}[e.$type];n?n(e):te.error(`Unknown statement type: ${e.$type}`)},"parseStatement"),qyt=s(e=>({id:e.id,msg:e.message??"",type:e.type!==void 0?Cn[e.type]:Cn.NORMAL,tags:e.tags??void 0}),"parseCommit"),Hyt=s(e=>({name:e.name,order:e.order??0}),"parseBranch"),Uyt=s(e=>({branch:e.branch,id:e.id??"",type:e.type!==void 0?Cn[e.type]:void 0,tags:e.tags??void 0}),"parseMerge"),Yyt=s(e=>e.branch,"parseCheckout"),jyt=s(e=>({id:e.id,targetId:"",tags:e.tags?.length===0?void 0:e.tags,parent:e.parent}),"parseCherryPicking"),$5e={parse:s(async e=>{let t=await pi("gitGraph",e);te.debug(t),Vyt(t,E6)},"parse")}});var Gf,zf,lu,Sh,Rg,_6,Sq,Eq,Xyt,_g,ao,so,A6,AC,R6,Eh,Qr,Kyt,z5e,V5e,Zyt,Qyt,Jyt,e1t,t1t,r1t,n1t,i1t,a1t,s1t,o1t,l1t,G5e,c1t,RC,u1t,h1t,d1t,f1t,p1t,W5e,q5e=F(()=>{"use strict";$r();Zt();Tt();Qt();w6();Gf=10,zf=40,lu=4,Sh=2,Rg=8,_6=new Set(["redux","redux-dark","redux-color","redux-dark-color"]),Sq=12,Eq=new Set(["redux-color","redux-dark-color"]),Xyt=new Set(["dark","redux-dark","redux-dark-color","neo-dark"]),_g=s((e,t,r=!1)=>r&&e>0?(e-1)%(t-1)+1:e%t,"calcColorIndex"),ao=new Map,so=new Map,A6=30,AC=new Map,R6=[],Eh=0,Qr="LR",Kyt=s(()=>{ao.clear(),so.clear(),AC.clear(),Eh=0,R6=[],Qr="LR"},"clear"),z5e=s(e=>{let t=document.createElementNS("http://www.w3.org/2000/svg","text");return(typeof e=="string"?e.split(/\\n|\n|/gi):e).forEach(n=>{let i=document.createElementNS("http://www.w3.org/2000/svg","tspan");i.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),i.setAttribute("dy","1em"),i.setAttribute("x","0"),i.setAttribute("class","row"),i.textContent=n.trim(),t.appendChild(i)}),t},"drawText"),V5e=s(e=>{let t,r,n;return Qr==="BT"?(r=s((i,a)=>i<=a,"comparisonFunc"),n=1/0):(r=s((i,a)=>i>=a,"comparisonFunc"),n=0),e.forEach(i=>{let a=Qr==="TB"||Qr=="BT"?so.get(i)?.y:so.get(i)?.x;a!==void 0&&r(a,n)&&(t=i,n=a)}),t},"findClosestParent"),Zyt=s(e=>{let t="",r=1/0;return e.forEach(n=>{let i=so.get(n).y;i<=r&&(t=n,r=i)}),t||void 0},"findClosestParentBT"),Qyt=s((e,t,r)=>{let n=r,i=r,a=[];e.forEach(o=>{let l=t.get(o);if(!l)throw new Error(`Commit not found for key ${o}`);l.parents.length?(n=e1t(l),i=Math.max(n,i)):a.push(l),t1t(l,n)}),n=i,a.forEach(o=>{r1t(o,n,r)}),e.forEach(o=>{let l=t.get(o);if(l?.parents.length){let u=Zyt(l.parents);n=so.get(u).y-zf,n<=i&&(i=n);let h=ao.get(l.branch).pos,d=n-Gf;so.set(l.id,{x:h,y:d})}})},"setParallelBTPos"),Jyt=s(e=>{let t=V5e(e.parents.filter(n=>n!==null));if(!t)throw new Error(`Closest parent not found for commit ${e.id}`);let r=so.get(t)?.y;if(r===void 0)throw new Error(`Closest parent position not found for commit ${e.id}`);return r},"findClosestParentPos"),e1t=s(e=>Jyt(e)+zf,"calculateCommitPosition"),t1t=s((e,t)=>{let r=ao.get(e.branch);if(!r)throw new Error(`Branch not found for commit ${e.id}`);let n=r.pos,i=t+Gf;return so.set(e.id,{x:n,y:i}),{x:n,y:i}},"setCommitPosition"),r1t=s((e,t,r)=>{let n=ao.get(e.branch);if(!n)throw new Error(`Branch not found for commit ${e.id}`);let i=t+r,a=n.pos;so.set(e.id,{x:a,y:i})},"setRootPosition"),n1t=s((e,t,r,n,i,a)=>{let{theme:o}=Le(),l=_6.has(o??""),u=Eq.has(o??""),h=Xyt.has(o??"");if(a===Cn.HIGHLIGHT)e.append("rect").attr("x",r.x-10+(l?3:0)).attr("y",r.y-10+(l?3:0)).attr("width",l?14:20).attr("height",l?14:20).attr("class",`commit ${t.id} commit-highlight${_g(i,Rg,u)} ${n}-outer`),e.append("rect").attr("x",r.x-6+(l?2:0)).attr("y",r.y-6+(l?2:0)).attr("width",l?8:12).attr("height",l?8:12).attr("class",`commit ${t.id} commit${_g(i,Rg,u)} ${n}-inner`);else if(a===Cn.CHERRY_PICK)e.append("circle").attr("cx",r.x).attr("cy",r.y).attr("r",l?7:10).attr("class",`commit ${t.id} ${n}`),e.append("circle").attr("cx",r.x-3).attr("cy",r.y+2).attr("r",l?2.5:2.75).attr("fill",h?"#000000":"#fff").attr("class",`commit ${t.id} ${n}`),e.append("circle").attr("cx",r.x+3).attr("cy",r.y+2).attr("r",l?2.5:2.75).attr("fill",h?"#000000":"#fff").attr("class",`commit ${t.id} ${n}`),e.append("line").attr("x1",r.x+3).attr("y1",r.y+1).attr("x2",r.x).attr("y2",r.y-5).attr("stroke",h?"#000000":"#fff").attr("class",`commit ${t.id} ${n}`),e.append("line").attr("x1",r.x-3).attr("y1",r.y+1).attr("x2",r.x).attr("y2",r.y-5).attr("stroke",h?"#000000":"#fff").attr("class",`commit ${t.id} ${n}`);else{let d=e.append("circle");if(d.attr("cx",r.x),d.attr("cy",r.y),d.attr("r",l?7:10),d.attr("class",`commit ${t.id} commit${_g(i,Rg,u)}`),a===Cn.MERGE){let f=e.append("circle");f.attr("cx",r.x),f.attr("cy",r.y),f.attr("r",l?5:6),f.attr("class",`commit ${n} ${t.id} commit${_g(i,Rg,u)}`)}if(a===Cn.REVERSE){let f=e.append("path"),p=l?4:5;f.attr("d",`M ${r.x-p},${r.y-p}L${r.x+p},${r.y+p}M${r.x-p},${r.y+p}L${r.x+p},${r.y-p}`).attr("class",`commit ${n} ${t.id} commit${_g(i,Rg,u)}`)}}},"drawCommitBullet"),i1t=s((e,t,r,n,i)=>{if(t.type!==Cn.CHERRY_PICK&&(t.customId&&t.type===Cn.MERGE||t.type!==Cn.MERGE)&&i.showCommitLabel){let a=e.append("g"),o=a.insert("rect").attr("class","commit-label-bkg"),l=a.append("text").attr("x",n).attr("y",r.y+25).attr("class","commit-label").text(t.id),u=l.node()?.getBBox();if(u&&(o.attr("x",r.posWithOffset-u.width/2-Sh).attr("y",r.y+13.5).attr("width",u.width+2*Sh).attr("height",u.height+2*Sh),Qr==="TB"||Qr==="BT"?(o.attr("x",r.x-(u.width+4*lu+5)).attr("y",r.y-12),l.attr("x",r.x-(u.width+4*lu)).attr("y",r.y+u.height-12)):l.attr("x",r.posWithOffset-u.width/2),i.rotateCommitLabel))if(Qr==="TB"||Qr==="BT")l.attr("transform","rotate(-45, "+r.x+", "+r.y+")"),o.attr("transform","rotate(-45, "+r.x+", "+r.y+")");else{let h=-7.5-(u.width+10)/25*9.5,d=10+u.width/25*8.5;a.attr("transform","translate("+h+", "+d+") rotate(-45, "+n+", "+r.y+")")}}},"drawCommitLabel"),a1t=s((e,t,r,n)=>{if(t.tags.length>0){let i=0,a=0,o=0,l=[];for(let u of t.tags.reverse()){let h=e.insert("polygon"),d=e.append("circle"),f=e.append("text").attr("y",r.y-16-i).attr("class","tag-label").text(u),p=f.node()?.getBBox();if(!p)throw new Error("Tag bbox not found");a=Math.max(a,p.width),o=Math.max(o,p.height),f.attr("x",r.posWithOffset-p.width/2),l.push({tag:f,hole:d,rect:h,yOffset:i}),i+=20}for(let{tag:u,hole:h,rect:d,yOffset:f}of l){let p=o/2,m=r.y-19.2-f;if(d.attr("class","tag-label-bkg").attr("points",` + ${n-a/2-lu/2},${m+Sh} + ${n-a/2-lu/2},${m-Sh} + ${r.posWithOffset-a/2-lu},${m-p-Sh} + ${r.posWithOffset+a/2+lu},${m-p-Sh} + ${r.posWithOffset+a/2+lu},${m+p+Sh} + ${r.posWithOffset-a/2-lu},${m+p+Sh}`),h.attr("cy",m).attr("cx",n-a/2+lu/2).attr("r",1.5).attr("class","tag-hole"),Qr==="TB"||Qr==="BT"){let g=n+f;d.attr("class","tag-label-bkg").attr("points",` + ${r.x},${g+2} + ${r.x},${g-2} + ${r.x+Gf},${g-p-2} + ${r.x+Gf+a+4},${g-p-2} + ${r.x+Gf+a+4},${g+p+2} + ${r.x+Gf},${g+p+2}`).attr("transform","translate(12,12) rotate(45, "+r.x+","+n+")"),h.attr("cx",r.x+lu/2).attr("cy",g).attr("transform","translate(12,12) rotate(45, "+r.x+","+n+")"),u.attr("x",r.x+5).attr("y",g+3).attr("transform","translate(14,14) rotate(45, "+r.x+","+n+")")}}}},"drawCommitTags"),s1t=s(e=>{switch(e.customType??e.type){case Cn.NORMAL:return"commit-normal";case Cn.REVERSE:return"commit-reverse";case Cn.HIGHLIGHT:return"commit-highlight";case Cn.MERGE:return"commit-merge";case Cn.CHERRY_PICK:return"commit-cherry-pick";default:return"commit-normal"}},"getCommitClassType"),o1t=s((e,t,r,n)=>{let i={x:0,y:0};if(e.parents.length>0){let a=V5e(e.parents);if(a){let o=n.get(a)??i;return t==="TB"?o.y+zf:t==="BT"?(n.get(e.id)??i).y-zf:o.x+zf}}else return t==="TB"?A6:t==="BT"?(n.get(e.id)??i).y-zf:0;return 0},"calculatePosition"),l1t=s((e,t,r)=>{let n=Qr==="BT"&&r?t:t+Gf,i=ao.get(e.branch)?.pos,a=Qr==="TB"||Qr==="BT"?ao.get(e.branch)?.pos:n;if(a===void 0||i===void 0)throw new Error(`Position were undefined for commit ${e.id}`);let o=_6.has(Le().theme??""),l=Qr==="TB"||Qr==="BT"?n:i+(o?Sq/2+1:-2);return{x:a,y:l,posWithOffset:n}},"getCommitPosition"),G5e=s((e,t,r,n)=>{let i=e.append("g").attr("class","commit-bullets"),a=e.append("g").attr("class","commit-labels"),o=Qr==="TB"||Qr==="BT"?A6:0,l=[...t.keys()],u=n.parallelCommits??!1,h=s((f,p)=>{let m=t.get(f)?.seq,g=t.get(p)?.seq;return m!==void 0&&g!==void 0?m-g:0},"sortKeys"),d=l.sort(h);Qr==="BT"&&(u&&Qyt(d,t,o),d=d.reverse()),d.forEach(f=>{let p=t.get(f);if(!p)throw new Error(`Commit not found for key ${f}`);u&&(o=o1t(p,Qr,o,so));let m=l1t(p,o,u);if(r){let g=s1t(p),y=p.customType??p.type,v=ao.get(p.branch)?.index??0;n1t(i,p,m,g,v,y),i1t(a,p,m,o,n),a1t(a,p,m,o)}Qr==="TB"||Qr==="BT"?so.set(p.id,{x:m.x,y:m.posWithOffset}):so.set(p.id,{x:m.posWithOffset,y:m.y}),o=Qr==="BT"&&u?o+zf:o+zf+Gf,o>Eh&&(Eh=o)})},"drawCommits"),c1t=s((e,t,r,n,i)=>{let o=(Qr==="TB"||Qr==="BT"?r.xh.branch===o,"isOnBranchToGetCurve"),u=s(h=>h.seq>e.seq&&h.sequ(h)&&l(h))},"shouldRerouteArrow"),RC=s((e,t,r=0)=>{let n=e+Math.abs(e-t)/2;if(r>5)return n;if(R6.every(o=>Math.abs(o-n)>=10))return R6.push(n),n;let a=Math.abs(e-t);return RC(e,t-a/5,r+1)},"findLane"),u1t=s((e,t,r,n)=>{let{theme:i}=Le(),a=Eq.has(i??""),o=so.get(t.id),l=so.get(r.id);if(o===void 0||l===void 0)throw new Error(`Commit positions not found for commits ${t.id} and ${r.id}`);let u=c1t(t,r,o,l,n),h="",d="",f=0,p=0,m=ao.get(r.branch)?.index;r.type===Cn.MERGE&&t.id!==r.parents[0]&&(m=ao.get(t.branch)?.index);let g;if(u){h="A 10 10, 0, 0, 0,",d="A 10 10, 0, 0, 1,",f=10,p=10;let y=o.yl.x&&(h="A 20 20, 0, 0, 0,",d="A 20 20, 0, 0, 1,",f=20,p=20,r.type===Cn.MERGE&&t.id!==r.parents[0]?g=`M ${o.x} ${o.y} L ${o.x} ${l.y-f} ${d} ${o.x-p} ${l.y} L ${l.x} ${l.y}`:g=`M ${o.x} ${o.y} L ${l.x+f} ${o.y} ${h} ${l.x} ${o.y+p} L ${l.x} ${l.y}`),o.x===l.x&&(g=`M ${o.x} ${o.y} L ${l.x} ${l.y}`)):Qr==="BT"?(o.xl.x&&(h="A 20 20, 0, 0, 0,",d="A 20 20, 0, 0, 1,",f=20,p=20,r.type===Cn.MERGE&&t.id!==r.parents[0]?g=`M ${o.x} ${o.y} L ${o.x} ${l.y+f} ${h} ${o.x-p} ${l.y} L ${l.x} ${l.y}`:g=`M ${o.x} ${o.y} L ${l.x+f} ${o.y} ${d} ${l.x} ${o.y-p} L ${l.x} ${l.y}`),o.x===l.x&&(g=`M ${o.x} ${o.y} L ${l.x} ${l.y}`)):(o.yl.y&&(r.type===Cn.MERGE&&t.id!==r.parents[0]?g=`M ${o.x} ${o.y} L ${l.x-f} ${o.y} ${h} ${l.x} ${o.y-p} L ${l.x} ${l.y}`:g=`M ${o.x} ${o.y} L ${o.x} ${l.y+f} ${d} ${o.x+p} ${l.y} L ${l.x} ${l.y}`),o.y===l.y&&(g=`M ${o.x} ${o.y} L ${l.x} ${l.y}`));if(g===void 0)throw new Error("Line definition not found");e.append("path").attr("d",g).attr("class","arrow arrow"+_g(m,Rg,a))},"drawArrow"),h1t=s((e,t)=>{let r=e.append("g").attr("class","commit-arrows");[...t.keys()].forEach(n=>{let i=t.get(n);i.parents&&i.parents.length>0&&i.parents.forEach(a=>{u1t(r,t.get(a),i,t)})})},"drawArrows"),d1t=s((e,t,r,n)=>{let{look:i,theme:a,themeVariables:o}=Le(),{dropShadow:l,THEME_COLOR_LIMIT:u}=o,h=_6.has(a??""),d=Eq.has(a??""),f=e.append("g");t.forEach((p,m)=>{let g=_g(m,h?u:Rg,d),y=ao.get(p.name)?.pos;if(y===void 0)throw new Error(`Position not found for branch ${p.name}`);let v=Qr==="TB"||Qr==="BT"?y:h?y+Sq/2+1:y-2,x=f.append("line");x.attr("x1",0),x.attr("y1",v),x.attr("x2",Eh),x.attr("y2",v),x.attr("class","branch branch"+g),Qr==="TB"?(x.attr("y1",A6),x.attr("x1",y),x.attr("y2",Eh),x.attr("x2",y)):Qr==="BT"&&(x.attr("y1",Eh),x.attr("x1",y),x.attr("y2",A6),x.attr("x2",y)),R6.push(v);let b=p.name,T=z5e(b),w=f.insert("rect"),k=f.insert("g").attr("class","branchLabel").insert("g").attr("class","label branch-label"+g);k.node().appendChild(T);let S=T.getBBox(),A=h?0:4,M=h?16:0,N=h?Sq:0;i==="neo"&&w.attr("data-look","neo"),w.attr("class","branchLabelBkg label"+g).attr("style",i==="neo"?`filter:${h?`url(#${n}-drop-shadow)`:l}`:"").attr("rx",A).attr("ry",A).attr("x",-S.width-4-(r.rotateCommitLabel===!0?30:0)).attr("y",-S.height/2+10).attr("width",S.width+18+M).attr("height",S.height+4+N),k.attr("transform","translate("+(-S.width-14-(r.rotateCommitLabel===!0?30:0)+M/2)+", "+(v-S.height/2-2)+")"),Qr==="TB"?(w.attr("x",y-S.width/2-10).attr("y",0),k.attr("transform","translate("+(y-S.width/2-5)+", 0)"),h&&(w.attr("transform",`translate(${-M/2-3}, ${-N-10})`),k.attr("transform","translate("+(y-S.width/2-5)+", "+(-N*2+7)+")"))):Qr==="BT"?(w.attr("x",y-S.width/2-10).attr("y",Eh),k.attr("transform","translate("+(y-S.width/2-5)+", "+Eh+")"),h&&(w.attr("transform",`translate(${-M/2-3}, ${N+10})`),k.attr("transform","translate("+(y-S.width/2-5)+", "+(Eh+N*2+4)+")"))):w.attr("transform","translate(-19, "+(v-12-N/2)+")")})},"drawBranches"),f1t=s(function(e,t,r,n,i){return ao.set(e,{pos:t,index:r}),t+=50+(i?40:0)+(Qr==="TB"||Qr==="BT"?n.width/2:0),t},"setBranchPosition"),p1t=s(function(e,t,r,n){Kyt(),te.debug("in gitgraph renderer",e+` +`,"id:",t,r);let i=n.db;if(!i.getConfig){te.error("getConfig method is not available on db");return}let a=i.getConfig(),o=a.rotateCommitLabel??!1;AC=i.getCommits();let l=i.getBranchesAsObjArray();Qr=i.getDirection();let u=lt(`[id="${t}"]`),{look:h,theme:d,themeVariables:f}=Le(),{useGradient:p,gradientStart:m,gradientStop:g,filterColor:y}=f;if(p){let x=u.append("defs").append("linearGradient").attr("id",t+"-gradient").attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");x.append("stop").attr("offset","0%").attr("stop-color",m).attr("stop-opacity",1),x.append("stop").attr("offset","100%").attr("stop-color",g).attr("stop-opacity",1)}h==="neo"&&_6.has(d??"")&&u.append("defs").append("filter").attr("id",t+"-drop-shadow").attr("height","130%").attr("width","130%").append("feDropShadow").attr("dx","4").attr("dy","4").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",y);let v=0;l.forEach((x,b)=>{let T=z5e(x.name),w=u.append("g"),C=w.insert("g").attr("class","branchLabel"),k=C.insert("g").attr("class","label branch-label");k.node()?.appendChild(T);let S=T.getBBox();v=f1t(x.name,v,b,S,o),k.remove(),C.remove(),w.remove()}),G5e(u,AC,!1,a),a.showBranches&&d1t(u,l,a,t),h1t(u,AC),G5e(u,AC,!0,a),sr.insertTitle(u,"gitTitleText",a.titleTopMargin??0,i.getDiagramTitle()),Cx(void 0,u,a.diagramPadding,a.useMaxWidth)},"draw"),W5e={draw:p1t}});var H5e,U5e,m1t,g1t,y1t,v1t,x1t,b1t,T1t,C1t,Y5e,j5e=F(()=>{"use strict";mr();H5e=8,U5e=new Set(["redux","redux-dark","redux-color","redux-dark-color"]),m1t=new Set(["redux-color","redux-dark-color"]),g1t=new Set(["neo","neo-dark"]),y1t=new Set(["dark","redux-dark","redux-dark-color","neo-dark"]),v1t=new Set(["redux","redux-dark","redux-color","redux-dark-color","neo","neo-dark"]),x1t=s(e=>{let{svgId:t}=e,r="";if(e.useGradient&&t)for(let n=0;n{let t=Lt(),{theme:r,themeVariables:n}=t,{borderColorArray:i}=n,a=U5e.has(r);if(g1t.has(r)){let o="";for(let l=0;l`${Array.from({length:e.THEME_COLOR_LIMIT},(t,r)=>r).map(t=>{let r=t%H5e;return` + .branch-label${t} { fill: ${e["gitBranchLabel"+r]}; } + .commit${t} { stroke: ${e["git"+r]}; fill: ${e["git"+r]}; } + .commit-highlight${t} { stroke: ${e["gitInv"+r]}; fill: ${e["gitInv"+r]}; } + .label${t} { fill: ${e["git"+r]}; } + .arrow${t} { stroke: ${e["git"+r]}; } + `}).join(` +`)}`,"normalTheme"),C1t=s(e=>{let t=Lt(),{theme:r}=t,n=v1t.has(r);return` + .commit-id, + .commit-msg, + .branch-label { + fill: lightgrey; + color: lightgrey; + font-family: 'trebuchet ms', verdana, arial, sans-serif; + font-family: var(--mermaid-font-family); + } + + ${n?b1t(e):T1t(e)} + + .branch { + stroke-width: ${e.strokeWidth}; + stroke: ${e.commitLineColor??e.lineColor}; + stroke-dasharray: ${n?"4 2":"2"}; + } + .commit-label { font-size: ${e.commitLabelFontSize}; fill: ${n?e.nodeBorder:e.commitLabelColor}; ${n?`font-weight:${e.noteFontWeight};`:""}} + .commit-label-bkg { font-size: ${e.commitLabelFontSize}; fill: ${n?"transparent":e.commitLabelBackground}; opacity: ${n?"":.5}; } + .tag-label { font-size: ${e.tagLabelFontSize}; fill: ${e.tagLabelColor};} + .tag-label-bkg { fill: ${n?e.mainBkg:e.tagLabelBackground}; stroke: ${n?e.nodeBorder:e.tagLabelBorder}; ${n?`filter:${e.dropShadow}`:""} } + .tag-hole { fill: ${e.textColor}; } + + .commit-merge { + stroke: ${n?e.mainBkg:e.primaryColor}; + fill: ${n?e.mainBkg:e.primaryColor}; + } + .commit-reverse { + stroke: ${n?e.mainBkg:e.primaryColor}; + fill: ${n?e.mainBkg:e.primaryColor}; + stroke-width: ${n?e.strokeWidth:3}; + } + .commit-highlight-outer { + } + .commit-highlight-inner { + stroke: ${n?e.mainBkg:e.primaryColor}; + fill: ${n?e.mainBkg:e.primaryColor}; + } + + .arrow { + /* Intentional: neo themes keep the bold 8px arrow (like classic themes); only redux-geometry themes use the thinner options.strokeWidth. */ + stroke-width: ${U5e.has(r)?e.strokeWidth:8}; + stroke-linecap: round; + fill: none + } + .gitTitleText { + text-anchor: middle; + font-size: 18px; + fill: ${e.textColor}; + } +`},"getStyles"),Y5e=C1t});var X5e={};ar(X5e,{diagram:()=>k1t});var k1t,K5e=F(()=>{"use strict";F5e();wq();q5e();j5e();k1t={parser:$5e,db:E6,renderer:W5e,styles:Y5e}});var Aq,J5e,eAe=F(()=>{"use strict";Aq=(function(){var e=s(function(E,I,L,P){for(L=L||{},P=E.length;P--;L[E[P]]=I);return L},"o"),t=[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],r=[1,26],n=[1,27],i=[1,28],a=[1,29],o=[1,30],l=[1,31],u=[1,32],h=[1,33],d=[1,34],f=[1,9],p=[1,10],m=[1,11],g=[1,12],y=[1,13],v=[1,14],x=[1,15],b=[1,16],T=[1,19],w=[1,20],C=[1,21],k=[1,22],S=[1,23],A=[1,25],M=[1,35],N={trace:s(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:s(function(I,L,P,B,O,$,G){var V=$.length-1;switch(O){case 1:return $[V-1];case 2:this.$=[];break;case 3:$[V-1].push($[V]),this.$=$[V-1];break;case 4:case 5:this.$=$[V];break;case 6:case 7:this.$=[];break;case 8:B.setWeekday("monday");break;case 9:B.setWeekday("tuesday");break;case 10:B.setWeekday("wednesday");break;case 11:B.setWeekday("thursday");break;case 12:B.setWeekday("friday");break;case 13:B.setWeekday("saturday");break;case 14:B.setWeekday("sunday");break;case 15:B.setWeekend("friday");break;case 16:B.setWeekend("saturday");break;case 17:B.setDateFormat($[V].substr(11)),this.$=$[V].substr(11);break;case 18:B.enableInclusiveEndDates(),this.$=$[V].substr(18);break;case 19:B.TopAxis(),this.$=$[V].substr(8);break;case 20:B.setAxisFormat($[V].substr(11)),this.$=$[V].substr(11);break;case 21:B.setTickInterval($[V].substr(13)),this.$=$[V].substr(13);break;case 22:B.setExcludes($[V].substr(9)),this.$=$[V].substr(9);break;case 23:B.setIncludes($[V].substr(9)),this.$=$[V].substr(9);break;case 24:B.setTodayMarker($[V].substr(12)),this.$=$[V].substr(12);break;case 27:B.setDiagramTitle($[V].substr(6)),this.$=$[V].substr(6);break;case 28:this.$=$[V].trim(),B.setAccTitle(this.$);break;case 29:case 30:this.$=$[V].trim(),B.setAccDescription(this.$);break;case 31:B.addSection($[V].substr(8)),this.$=$[V].substr(8);break;case 33:B.addTask($[V-1],$[V]),this.$="task";break;case 34:this.$=$[V-1],B.setClickEvent($[V-1],$[V],null);break;case 35:this.$=$[V-2],B.setClickEvent($[V-2],$[V-1],$[V]);break;case 36:this.$=$[V-2],B.setClickEvent($[V-2],$[V-1],null),B.setLink($[V-2],$[V]);break;case 37:this.$=$[V-3],B.setClickEvent($[V-3],$[V-2],$[V-1]),B.setLink($[V-3],$[V]);break;case 38:this.$=$[V-2],B.setClickEvent($[V-2],$[V],null),B.setLink($[V-2],$[V-1]);break;case 39:this.$=$[V-3],B.setClickEvent($[V-3],$[V-1],$[V]),B.setLink($[V-3],$[V-2]);break;case 40:this.$=$[V-1],B.setLink($[V-1],$[V]);break;case 41:case 47:this.$=$[V-1]+" "+$[V];break;case 42:case 43:case 45:this.$=$[V-2]+" "+$[V-1]+" "+$[V];break;case 44:case 46:this.$=$[V-3]+" "+$[V-2]+" "+$[V-1]+" "+$[V];break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},e(t,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:17,12:r,13:n,14:i,15:a,16:o,17:l,18:u,19:18,20:h,21:d,22:f,23:p,24:m,25:g,26:y,27:v,28:x,29:b,30:T,31:w,33:C,35:k,36:S,37:24,38:A,40:M},e(t,[2,7],{1:[2,1]}),e(t,[2,3]),{9:36,11:17,12:r,13:n,14:i,15:a,16:o,17:l,18:u,19:18,20:h,21:d,22:f,23:p,24:m,25:g,26:y,27:v,28:x,29:b,30:T,31:w,33:C,35:k,36:S,37:24,38:A,40:M},e(t,[2,5]),e(t,[2,6]),e(t,[2,17]),e(t,[2,18]),e(t,[2,19]),e(t,[2,20]),e(t,[2,21]),e(t,[2,22]),e(t,[2,23]),e(t,[2,24]),e(t,[2,25]),e(t,[2,26]),e(t,[2,27]),{32:[1,37]},{34:[1,38]},e(t,[2,30]),e(t,[2,31]),e(t,[2,32]),{39:[1,39]},e(t,[2,8]),e(t,[2,9]),e(t,[2,10]),e(t,[2,11]),e(t,[2,12]),e(t,[2,13]),e(t,[2,14]),e(t,[2,15]),e(t,[2,16]),{41:[1,40],43:[1,41]},e(t,[2,4]),e(t,[2,28]),e(t,[2,29]),e(t,[2,33]),e(t,[2,34],{42:[1,42],43:[1,43]}),e(t,[2,40],{41:[1,44]}),e(t,[2,35],{43:[1,45]}),e(t,[2,36]),e(t,[2,38],{42:[1,46]}),e(t,[2,37]),e(t,[2,39])],defaultActions:{},parseError:s(function(I,L){if(L.recoverable)this.trace(I);else{var P=new Error(I);throw P.hash=L,P}},"parseError"),parse:s(function(I){var L=this,P=[0],B=[],O=[null],$=[],G=this.table,V="",z=0,W=0,H=0,j=2,Q=1,U=$.slice.call(arguments,1),ue=Object.create(this.lexer),J={yy:{}};for(var he in this.yy)Object.prototype.hasOwnProperty.call(this.yy,he)&&(J.yy[he]=this.yy[he]);ue.setInput(I,J.yy),J.yy.lexer=ue,J.yy.parser=this,typeof ue.yylloc>"u"&&(ue.yylloc={});var se=ue.yylloc;$.push(se);var oe=ue.options&&ue.options.ranges;typeof J.yy.parseError=="function"?this.parseError=J.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Se(ne){P.length=P.length-2*ne,O.length=O.length-ne,$.length=$.length-ne}s(Se,"popStack");function xe(){var ne;return ne=B.pop()||ue.lex()||Q,typeof ne!="number"&&(ne instanceof Array&&(B=ne,ne=B.pop()),ne=L.symbols_[ne]||ne),ne}s(xe,"lex");for(var Ne,Ye,We,pe,_e,Ee,Re={},Z,ae,ie,le;;){if(We=P[P.length-1],this.defaultActions[We]?pe=this.defaultActions[We]:((Ne===null||typeof Ne>"u")&&(Ne=xe()),pe=G[We]&&G[We][Ne]),typeof pe>"u"||!pe.length||!pe[0]){var ve="";le=[];for(Z in G[We])this.terminals_[Z]&&Z>j&&le.push("'"+this.terminals_[Z]+"'");ue.showPosition?ve="Parse error on line "+(z+1)+`: +`+ue.showPosition()+` +Expecting `+le.join(", ")+", got '"+(this.terminals_[Ne]||Ne)+"'":ve="Parse error on line "+(z+1)+": Unexpected "+(Ne==Q?"end of input":"'"+(this.terminals_[Ne]||Ne)+"'"),this.parseError(ve,{text:ue.match,token:this.terminals_[Ne]||Ne,line:ue.yylineno,loc:se,expected:le})}if(pe[0]instanceof Array&&pe.length>1)throw new Error("Parse Error: multiple actions possible at state: "+We+", token: "+Ne);switch(pe[0]){case 1:P.push(Ne),O.push(ue.yytext),$.push(ue.yylloc),P.push(pe[1]),Ne=null,Ye?(Ne=Ye,Ye=null):(W=ue.yyleng,V=ue.yytext,z=ue.yylineno,se=ue.yylloc,H>0&&H--);break;case 2:if(ae=this.productions_[pe[1]][1],Re.$=O[O.length-ae],Re._$={first_line:$[$.length-(ae||1)].first_line,last_line:$[$.length-1].last_line,first_column:$[$.length-(ae||1)].first_column,last_column:$[$.length-1].last_column},oe&&(Re._$.range=[$[$.length-(ae||1)].range[0],$[$.length-1].range[1]]),Ee=this.performAction.apply(Re,[V,W,z,J.yy,pe[1],O,$].concat(U)),typeof Ee<"u")return Ee;ae&&(P=P.slice(0,-1*ae*2),O=O.slice(0,-1*ae),$=$.slice(0,-1*ae)),P.push(this.productions_[pe[1]][0]),O.push(Re.$),$.push(Re._$),ie=G[P[P.length-2]][P[P.length-1]],P.push(ie);break;case 3:return!0}}return!0},"parse")},D=(function(){var E={EOF:1,parseError:s(function(L,P){if(this.yy.parser)this.yy.parser.parseError(L,P);else throw new Error(L)},"parseError"),setInput:s(function(I,L){return this.yy=L||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:s(function(){var I=this._input[0];this.yytext+=I,this.yyleng++,this.offset++,this.match+=I,this.matched+=I;var L=I.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),I},"input"),unput:s(function(I){var L=I.length,P=I.split(/(?:\r\n?|\n)/g);this._input=I+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-L),this.offset-=L;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),P.length-1&&(this.yylineno-=P.length-1);var O=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:P?(P.length===B.length?this.yylloc.first_column:0)+B[B.length-P.length].length-P[0].length:this.yylloc.first_column-L},this.options.ranges&&(this.yylloc.range=[O[0],O[0]+this.yyleng-L]),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(I){this.unput(this.match.slice(I))},"less"),pastInput:s(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:s(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:s(function(){var I=this.pastInput(),L=new Array(I.length+1).join("-");return I+this.upcomingInput()+` +`+L+"^"},"showPosition"),test_match:s(function(I,L){var P,B,O;if(this.options.backtrack_lexer&&(O={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&&(O.yylloc.range=this.yylloc.range.slice(0))),B=I[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+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],P=this.performAction.call(this,this.yy,this,L,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),P)return P;if(this._backtrack){for(var $ in O)this[$]=O[$];return!1}return!1},"test_match"),next:s(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var I,L,P,B;this._more||(this.yytext="",this.match="");for(var O=this._currentRules(),$=0;$L[0].length)){if(L=P,B=$,this.options.backtrack_lexer){if(I=this.test_match(P,O[$]),I!==!1)return I;if(this._backtrack){L=!1;continue}else return!1}else if(!this.options.flex)break}return L?(I=this.test_match(L,O[B]),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:s(function(){var L=this.next();return L||this.lex()},"lex"),begin:s(function(L){this.conditionStack.push(L)},"begin"),popState:s(function(){var L=this.conditionStack.length-1;return L>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(L){return L=this.conditionStack.length-1-Math.abs(L||0),L>=0?this.conditionStack[L]:"INITIAL"},"topState"),pushState:s(function(L){this.begin(L)},"pushState"),stateStackSize:s(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:s(function(L,P,B,O){var $=O;switch(B){case 0:return this.begin("open_directive"),"open_directive";break;case 1:return this.begin("acc_title"),31;break;case 2:return this.popState(),"acc_title_value";break;case 3:return this.begin("acc_descr"),33;break;case 4:return this.popState(),"acc_descr_value";break;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 E})();N.lexer=D;function R(){this.yy={}}return s(R,"Parser"),R.prototype=N,N.Parser=R,new R})();Aq.parser=Aq;J5e=Aq});var tAe=ho((Rq,_q)=>{"use strict";(function(e,t){typeof Rq=="object"&&typeof _q<"u"?_q.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self).dayjs_plugin_isoWeek=t()})(Rq,(function(){"use strict";var e="day";return function(t,r,n){var i=s(function(l){return l.add(4-l.isoWeekday(),e)},"a"),a=r.prototype;a.isoWeekYear=function(){return i(this).year()},a.isoWeek=function(l){if(!this.$utils().u(l))return this.add(7*(l-this.isoWeek()),e);var u,h,d,f,p=i(this),m=(u=this.isoWeekYear(),h=this.$u,d=(h?n.utc:n)().year(u).startOf("year"),f=4-d.isoWeekday(),d.isoWeekday()>4&&(f+=7),d.add(f,e));return p.diff(m,"week")+1},a.isoWeekday=function(l){return this.$utils().u(l)?this.day()||7:this.day(this.day()%7?l:l-7)};var o=a.startOf;a.startOf=function(l,u){var h=this.$utils(),d=!!h.u(u)||u;return h.p(l)==="isoweek"?d?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):o.bind(this)(l,u)}}}))});var rAe=ho((Lq,Dq)=>{"use strict";(function(e,t){typeof Lq=="object"&&typeof Dq<"u"?Dq.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self).dayjs_plugin_customParseFormat=t()})(Lq,(function(){"use strict";var e={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"},t=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,r=/\d/,n=/\d\d/,i=/\d\d?/,a=/\d*[^-_:/,()\s\d]+/,o={},l=s(function(g){return(g=+g)+(g>68?1900:2e3)},"a"),u=s(function(g){return function(y){this[g]=+y}},"f"),h=[/[+-]\d\d:?(\d\d)?|Z/,function(g){(this.zone||(this.zone={})).offset=(function(y){if(!y||y==="Z")return 0;var v=y.match(/([+-]|\d\d)/g),x=60*v[1]+(+v[2]||0);return x===0?0:v[0]==="+"?-x:x})(g)}],d=s(function(g){var y=o[g];return y&&(y.indexOf?y:y.s.concat(y.f))},"u"),f=s(function(g,y){var v,x=o.meridiem;if(x){for(var b=1;b<=24;b+=1)if(g.indexOf(x(b,0,y))>-1){v=b>12;break}}else v=g===(y?"pm":"PM");return v},"d"),p={A:[a,function(g){this.afternoon=f(g,!1)}],a:[a,function(g){this.afternoon=f(g,!0)}],Q:[r,function(g){this.month=3*(g-1)+1}],S:[r,function(g){this.milliseconds=100*+g}],SS:[n,function(g){this.milliseconds=10*+g}],SSS:[/\d{3}/,function(g){this.milliseconds=+g}],s:[i,u("seconds")],ss:[i,u("seconds")],m:[i,u("minutes")],mm:[i,u("minutes")],H:[i,u("hours")],h:[i,u("hours")],HH:[i,u("hours")],hh:[i,u("hours")],D:[i,u("day")],DD:[n,u("day")],Do:[a,function(g){var y=o.ordinal,v=g.match(/\d+/);if(this.day=v[0],y)for(var x=1;x<=31;x+=1)y(x).replace(/\[|\]/g,"")===g&&(this.day=x)}],w:[i,u("week")],ww:[n,u("week")],M:[i,u("month")],MM:[n,u("month")],MMM:[a,function(g){var y=d("months"),v=(d("monthsShort")||y.map((function(x){return x.slice(0,3)}))).indexOf(g)+1;if(v<1)throw new Error;this.month=v%12||v}],MMMM:[a,function(g){var y=d("months").indexOf(g)+1;if(y<1)throw new Error;this.month=y%12||y}],Y:[/[+-]?\d+/,u("year")],YY:[n,function(g){this.year=l(g)}],YYYY:[/\d{4}/,u("year")],Z:h,ZZ:h};function m(g){var y,v;y=g,v=o&&o.formats;for(var x=(g=y.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(A,M,N){var D=N&&N.toUpperCase();return M||v[N]||e[N]||v[D].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(R,E,I){return E||I.slice(1)}))}))).match(t),b=x.length,T=0;T-1)return new Date((P==="X"?1e3:1)*L);var $=m(P)(L),G=$.year,V=$.month,z=$.day,W=$.hours,H=$.minutes,j=$.seconds,Q=$.milliseconds,U=$.zone,ue=$.week,J=new Date,he=z||(G||V?1:J.getDate()),se=G||J.getFullYear(),oe=0;G&&!V||(oe=V>0?V-1:J.getMonth());var Se,xe=W||0,Ne=H||0,Ye=j||0,We=Q||0;return U?new Date(Date.UTC(se,oe,he,xe,Ne,Ye,We+60*U.offset*1e3)):B?new Date(Date.UTC(se,oe,he,xe,Ne,Ye,We)):(Se=new Date(se,oe,he,xe,Ne,Ye,We),ue&&(Se=O(Se).week(ue).toDate()),Se)}catch{return new Date("")}})(w,S,C,v),this.init(),D&&D!==!0&&(this.$L=this.locale(D).$L),N&&w!=this.format(S)&&(this.$d=new Date("")),o={}}else if(S instanceof Array)for(var R=S.length,E=1;E<=R;E+=1){k[1]=S[E-1];var I=v.apply(this,k);if(I.isValid()){this.$d=I.$d,this.$L=I.$L,this.init();break}E===R&&(this.$d=new Date(""))}else b.call(this,T)}}}))});var nAe=ho((Iq,Mq)=>{"use strict";(function(e,t){typeof Iq=="object"&&typeof Mq<"u"?Mq.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self).dayjs_plugin_advancedFormat=t()})(Iq,(function(){"use strict";return function(e,t){var r=t.prototype,n=r.format;r.format=function(i){var a=this,o=this.$locale();if(!this.isValid())return n.bind(this)(i);var l=this.$utils(),u=(i||"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(h){switch(h){case"Q":return Math.ceil((a.$M+1)/3);case"Do":return o.ordinal(a.$D);case"gggg":return a.weekYear();case"GGGG":return a.isoWeekYear();case"wo":return o.ordinal(a.week(),"W");case"w":case"ww":return l.s(a.week(),h==="w"?1:2,"0");case"W":case"WW":return l.s(a.isoWeek(),h==="W"?1:2,"0");case"k":case"kk":return l.s(String(a.$H===0?24:a.$H),h==="k"?1:2,"0");case"X":return Math.floor(a.$d.getTime()/1e3);case"x":return a.$d.getTime();case"z":return"["+a.offsetName()+"]";case"zzz":return"["+a.offsetName("long")+"]";default:return h}}));return n.bind(this)(u)}}}))});function bAe(e,t,r){let n=!0;for(;n;)n=!1,r.forEach(function(i){let a="^\\s*"+i+"\\s*$",o=new RegExp(a);e[0].match(o)&&(t[i]=!0,e.shift(1),n=!0)})}var sAe,Do,oAe,lAe,cAe,iAe,cu,Bq,$q,Fq,iv,av,Gq,zq,I6,sv,Vq,uAe,Wq,rv,_C,qq,Hq,M6,Nq,A1t,R1t,_1t,L1t,D1t,I1t,M1t,N1t,P1t,O1t,B1t,$1t,F1t,G1t,z1t,V1t,hAe,W1t,q1t,H1t,U1t,Y1t,j1t,X1t,K1t,dAe,Z1t,Q1t,J1t,fAe,evt,Pq,pAe,mAe,L6,nv,tvt,rvt,Oq,D6,ra,gAe,nvt,Lg,ivt,aAe,avt,yAe,svt,vAe,ovt,lvt,xAe,TAe=F(()=>{"use strict";sAe=Ms(d0(),1),Do=Ms(mk(),1),oAe=Ms(tAe(),1),lAe=Ms(rAe(),1),cAe=Ms(nAe(),1);Tt();Zt();Qt();An();Do.default.extend(oAe.default);Do.default.extend(lAe.default);Do.default.extend(cAe.default);iAe={friday:5,saturday:6},cu="",Bq="",Fq="",iv=[],av=[],Gq=new Map,zq=[],I6=[],sv="",Vq="",uAe=["active","done","crit","milestone","vert"],Wq=[],rv="",_C=!1,qq=!1,Hq="sunday",M6="saturday",Nq=0,A1t=s(function(){zq=[],I6=[],sv="",Wq=[],L6=0,Oq=void 0,D6=void 0,ra=[],cu="",Bq="",Vq="",$q=void 0,Fq="",iv=[],av=[],_C=!1,qq=!1,Nq=0,Gq=new Map,rv="",gr(),Hq="sunday",M6="saturday"},"clear"),R1t=s(function(e){rv=e},"setDiagramId"),_1t=s(function(e){Bq=e},"setAxisFormat"),L1t=s(function(){return Bq},"getAxisFormat"),D1t=s(function(e){$q=e},"setTickInterval"),I1t=s(function(){return $q},"getTickInterval"),M1t=s(function(e){Fq=e},"setTodayMarker"),N1t=s(function(){return Fq},"getTodayMarker"),P1t=s(function(e){cu=e},"setDateFormat"),O1t=s(function(){_C=!0},"enableInclusiveEndDates"),B1t=s(function(){return _C},"endDatesAreInclusive"),$1t=s(function(){qq=!0},"enableTopAxis"),F1t=s(function(){return qq},"topAxisEnabled"),G1t=s(function(e){Vq=e},"setDisplayMode"),z1t=s(function(){return Vq},"getDisplayMode"),V1t=s(function(){return cu},"getDateFormat"),hAe=s((e,t)=>{let r=t.toLowerCase().split(/[\s,]+/).filter(n=>n!=="");return[...new Set([...e,...r])]},"mergeTokens"),W1t=s(function(e){iv=hAe(iv,e)},"setIncludes"),q1t=s(function(){return iv},"getIncludes"),H1t=s(function(e){av=hAe(av,e)},"setExcludes"),U1t=s(function(){return av},"getExcludes"),Y1t=s(function(){return Gq},"getLinks"),j1t=s(function(e){sv=e,zq.push(e)},"addSection"),X1t=s(function(){return zq},"getSections"),K1t=s(function(){let e=aAe(),t=10,r=0;for(;!e&&rl))throw new Error("Failed to find a valid date that was not excluded by `excludes` after 10,000 iterations.");e=e.add(1,"d")}return[t,o]},"fixTaskDates"),Pq=s(function(e,t,r){if(r=r.trim(),s(l=>{let u=l.trim();return u==="x"||u==="X"},"isTimestampFormat")(t)&&/^\d+$/.test(r))return new Date(Number(r));let a=/^after\s+(?[\d\w- ]+)/.exec(r);if(a!==null){let l=null;for(let h of a.groups.ids.split(" ")){let d=Lg(h);d!==void 0&&(!l||d.endTime>l.endTime)&&(l=d)}if(l)return l.endTime;let u=new Date;return u.setHours(0,0,0,0),u}let o=(0,Do.default)(r,t.trim(),!0);if(o.isValid())return o.toDate();{te.debug("Invalid date:"+r),te.debug("With date format:"+t.trim());let l=new Date(r);if(l===void 0||isNaN(l.getTime())||l.getFullYear()<-1e4||l.getFullYear()>1e4)throw new Error("Invalid date:"+r);return l}},"getStartDate"),pAe=s(function(e){let t=/^(\d+(?:\.\d+)?)([Mdhmswy]|ms)$/.exec(e.trim());return t!==null?[Number.parseFloat(t[1]),t[2]]:[NaN,"ms"]},"parseDuration"),mAe=s(function(e,t,r,n=!1){r=r.trim();let a=/^until\s+(?[\d\w- ]+)/.exec(r);if(a!==null){let d=null;for(let p of a.groups.ids.split(" ")){let m=Lg(p);m!==void 0&&(!d||m.startTime{window.open(r,"_self")}),Gq.set(n,r))}),yAe(e,"clickable")},"setLink"),yAe=s(function(e,t){e.split(",").forEach(function(r){let n=Lg(r);n!==void 0&&n.classes.push(t)})},"setClass"),svt=s(function(e,t,r){if(Le().securityLevel!=="loose"||t===void 0)return;let n=[];if(typeof r=="string"){n=r.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let a=0;a{sr.runFunc(t,...n)})},"setClickFun"),vAe=s(function(e,t){Wq.push(function(){let r=rv?`${rv}-${e}`:e,n=document.querySelector(`[id="${r}"]`);n!==null&&n.addEventListener("click",function(){t()})},function(){let r=rv?`${rv}-${e}`:e,n=document.querySelector(`[id="${r}-text"]`);n!==null&&n.addEventListener("click",function(){t()})})},"pushFun"),ovt=s(function(e,t,r){e.split(",").forEach(function(n){svt(n,t,r)}),yAe(e,"clickable")},"setClickEvent"),lvt=s(function(e){Wq.forEach(function(t){t(e)})},"bindFunctions"),xAe={getConfig:s(()=>Le().gantt,"getConfig"),clear:A1t,setDateFormat:P1t,getDateFormat:V1t,enableInclusiveEndDates:O1t,endDatesAreInclusive:B1t,enableTopAxis:$1t,topAxisEnabled:F1t,setAxisFormat:_1t,getAxisFormat:L1t,setTickInterval:D1t,getTickInterval:I1t,setTodayMarker:M1t,getTodayMarker:N1t,setAccTitle:Cr,getAccTitle:Sr,setDiagramTitle:Mr,getDiagramTitle:Rr,setDiagramId:R1t,setDisplayMode:G1t,getDisplayMode:z1t,setAccDescription:Er,getAccDescription:Ar,addSection:j1t,getSections:X1t,getTasks:K1t,addTask:nvt,findTaskById:Lg,addTaskOrg:ivt,setIncludes:W1t,getIncludes:q1t,setExcludes:H1t,getExcludes:U1t,setClickEvent:ovt,setLink:avt,getLinks:Y1t,bindFunctions:lvt,parseDuration:pAe,isInvalidDate:dAe,setWeekday:Z1t,getWeekday:Q1t,setWeekend:J1t};s(bAe,"getTaskTags")});var CAe=ho((Uq,Yq)=>{"use strict";(function(e,t){typeof Uq=="object"&&typeof Yq<"u"?Yq.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self).dayjs_plugin_duration=t()})(Uq,(function(){"use strict";var e,t,r=1e3,n=6e4,i=36e5,a=864e5,o=31536e6,l=2628e6,u=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,h=/\[([^\]]+)]|YYYY|YY|Y|M{1,2}|D{1,2}|H{1,2}|m{1,2}|s{1,2}|SSS/g,d={years:o,months:l,days:a,hours:i,minutes:n,seconds:r,milliseconds:1,weeks:6048e5},f=s(function(w){return w instanceof b},"c"),p=s(function(w,C,k){return new b(w,k,C.$l)},"f"),m=s(function(w){return t.p(w)+"s"},"m"),g=s(function(w){return w<0},"l"),y=s(function(w){return g(w)?Math.ceil(w):Math.floor(w)},"$"),v=s(function(w){return Math.abs(w)},"y"),x=s(function(w,C){return w?g(w)?{negative:!0,format:""+v(w)+C}:{negative:!1,format:""+w+C}:{negative:!1,format:""}},"v"),b=(function(){function w(k,S,A){var M=this;if(this.$d={},this.$l=A,k===void 0&&(this.$ms=0,this.parseFromMilliseconds()),S)return p(k*d[m(S)],this);if(typeof k=="number")return this.$ms=k,this.parseFromMilliseconds(),this;if(typeof k=="object")return Object.keys(k).forEach((function(R){M.$d[m(R)]=k[R]})),this.calMilliseconds(),this;if(typeof k=="string"){var N=k.match(u);if(N){var D=N.slice(2).map((function(R){return R!=null?Number(R):0}));return this.$d.years=D[0],this.$d.months=D[1],this.$d.weeks=D[2],this.$d.days=D[3],this.$d.hours=D[4],this.$d.minutes=D[5],this.$d.seconds=D[6],this.calMilliseconds(),this}}return this}s(w,"l");var C=w.prototype;return C.calMilliseconds=function(){var k=this;this.$ms=Object.keys(this.$d).reduce((function(S,A){return S+(k.$d[A]||0)*d[A]}),0)},C.parseFromMilliseconds=function(){var k=this.$ms;this.$d.years=y(k/o),k%=o,this.$d.months=y(k/l),k%=l,this.$d.days=y(k/a),k%=a,this.$d.hours=y(k/i),k%=i,this.$d.minutes=y(k/n),k%=n,this.$d.seconds=y(k/r),k%=r,this.$d.milliseconds=k},C.toISOString=function(){var k=x(this.$d.years,"Y"),S=x(this.$d.months,"M"),A=+this.$d.days||0;this.$d.weeks&&(A+=7*this.$d.weeks);var M=x(A,"D"),N=x(this.$d.hours,"H"),D=x(this.$d.minutes,"M"),R=this.$d.seconds||0;this.$d.milliseconds&&(R+=this.$d.milliseconds/1e3,R=Math.round(1e3*R)/1e3);var E=x(R,"S"),I=k.negative||S.negative||M.negative||N.negative||D.negative||E.negative,L=N.format||D.format||E.format?"T":"",P=(I?"-":"")+"P"+k.format+S.format+M.format+L+N.format+D.format+E.format;return P==="P"||P==="-P"?"P0D":P},C.toJSON=function(){return this.toISOString()},C.format=function(k){var S=k||"YYYY-MM-DDTHH:mm:ss",A={Y:this.$d.years,YY:t.s(this.$d.years,2,"0"),YYYY:t.s(this.$d.years,4,"0"),M:this.$d.months,MM:t.s(this.$d.months,2,"0"),D:this.$d.days,DD:t.s(this.$d.days,2,"0"),H:this.$d.hours,HH:t.s(this.$d.hours,2,"0"),m:this.$d.minutes,mm:t.s(this.$d.minutes,2,"0"),s:this.$d.seconds,ss:t.s(this.$d.seconds,2,"0"),SSS:t.s(this.$d.milliseconds,3,"0")};return S.replace(h,(function(M,N){return N||String(A[M])}))},C.as=function(k){return this.$ms/d[m(k)]},C.get=function(k){var S=this.$ms,A=m(k);return A==="milliseconds"?S%=1e3:S=A==="weeks"?y(S/d[A]):this.$d[A],S||0},C.add=function(k,S,A){var M;return M=S?k*d[m(S)]:f(k)?k.$ms:p(k,this).$ms,p(this.$ms+M*(A?-1:1),this)},C.subtract=function(k,S){return this.add(k,S,!0)},C.locale=function(k){var S=this.clone();return S.$l=k,S},C.clone=function(){return p(this.$ms,this)},C.humanize=function(k){return e().add(this.$ms,"ms").locale(this.$l).fromNow(!k)},C.valueOf=function(){return this.asMilliseconds()},C.milliseconds=function(){return this.get("milliseconds")},C.asMilliseconds=function(){return this.as("milliseconds")},C.seconds=function(){return this.get("seconds")},C.asSeconds=function(){return this.as("seconds")},C.minutes=function(){return this.get("minutes")},C.asMinutes=function(){return this.as("minutes")},C.hours=function(){return this.get("hours")},C.asHours=function(){return this.as("hours")},C.days=function(){return this.get("days")},C.asDays=function(){return this.as("days")},C.weeks=function(){return this.get("weeks")},C.asWeeks=function(){return this.as("weeks")},C.months=function(){return this.get("months")},C.asMonths=function(){return this.as("months")},C.years=function(){return this.get("years")},C.asYears=function(){return this.as("years")},w})(),T=s(function(w,C,k){return w.add(C.years()*k,"y").add(C.months()*k,"M").add(C.days()*k,"d").add(C.hours()*k,"h").add(C.minutes()*k,"m").add(C.seconds()*k,"s").add(C.milliseconds()*k,"ms")},"p");return function(w,C,k){e=k,t=k().$utils(),k.duration=function(M,N){var D=k.locale();return p(M,{$l:D},N)},k.isDuration=f;var S=C.prototype.add,A=C.prototype.subtract;C.prototype.add=function(M,N){return f(M)?T(this,M,1):S.bind(this)(M,N)},C.prototype.subtract=function(M,N){return f(M)?T(this,M,-1):A.bind(this)(M,N)}}}))});var ov,wAe,cvt,kAe,uvt,Ah,jq,hvt,SAe,EAe=F(()=>{"use strict";ov=Ms(mk(),1),wAe=Ms(CAe(),1);Tt();$r();Gr();Zt();Dn();ov.default.extend(wAe.default);cvt=s(function(){te.debug("Something is calling, setConf, remove the call")},"setConf"),kAe={monday:sd,tuesday:dS,wednesday:fS,thursday:yc,friday:pS,saturday:mS,sunday:wl},uvt=s((e,t)=>{let r=[...e].map(()=>-1/0),n=[...e].sort((a,o)=>a.startTime-o.startTime||a.order-o.order),i=0;for(let a of n)for(let o=0;o=r[o]){r[o]=a.endTime,a.order=o+t,o>i&&(i=o);break}return i},"getMaxIntersections"),jq=1e4,hvt=s(function(e,t,r,n){let i=Le().gantt;n.db.setDiagramId(t);let a=Le().securityLevel,o;a==="sandbox"&&(o=lt("#i"+t));let l=a==="sandbox"?lt(o.nodes()[0].contentDocument.body):lt("body"),u=a==="sandbox"?o.nodes()[0].contentDocument:document,h=u.getElementById(t);Ah=h.parentElement.offsetWidth,Ah===void 0&&(Ah=1200),i.useWidth!==void 0&&(Ah=i.useWidth);let d=n.db.getTasks(),f=d.filter(N=>!N.vert),p=[];for(let N of f)p.push(N.type);p=M(p);let m={},g=2*i.topPadding;if(n.db.getDisplayMode()==="compact"||i.displayMode==="compact"){let N={};for(let R of f)N[R.section]===void 0?N[R.section]=[R]:N[R.section].push(R);let D=0;for(let R of Object.keys(N)){let E=uvt(N[R],D)+1;D+=E,g+=E*(i.barHeight+i.barGap),m[R]=E}}else{g+=f.length*(i.barHeight+i.barGap);for(let N of p)m[N]=f.filter(D=>D.type===N).length}h.setAttribute("viewBox","0 0 "+Ah+" "+g);let y=l.select(`[id="${t}"]`),v=vS().domain([kw(d,function(N){return N.startTime}),Cw(d,function(N){return N.endTime})]).rangeRound([0,Ah-i.leftPadding-i.rightPadding]);function x(N,D){let R=N.startTime,E=D.startTime,I=0;return R>E?I=1:RW.vert===H.vert?0:W.vert?1:-1);let B=N.filter(W=>!W.vert),$=[...new Set(B.map(W=>W.order))].map(W=>B.find(H=>H.order===W));y.append("g").selectAll("rect").data($).enter().append("rect").attr("x",0).attr("y",function(W,H){return H=W.order,H*D+R-2}).attr("width",function(){return P-i.rightPadding/2}).attr("height",D).attr("class",function(W){for(let[H,j]of p.entries())if(W.type===j)return"section section"+H%i.numberSectionStyles;return"section section0"}).enter();let G=y.append("g").selectAll("rect").data(N).enter(),V=n.db.getLinks();if(G.append("rect").attr("id",function(W){return t+"-"+W.id}).attr("rx",3).attr("ry",3).attr("x",function(W){return W.milestone?v(W.startTime)+E+.5*(v(W.endTime)-v(W.startTime))-.5*I:v(W.startTime)+E}).attr("y",function(W,H){return H=W.order,W.vert?i.gridLineStartPadding:H*D+R}).attr("width",function(W){return W.milestone?I:W.vert?.08*I:v(W.renderEndTime||W.endTime)-v(W.startTime)}).attr("height",function(W){return W.vert?B.length*(i.barHeight+i.barGap)+i.barHeight*2:I}).attr("transform-origin",function(W,H){return H=W.order,(v(W.startTime)+E+.5*(v(W.endTime)-v(W.startTime))).toString()+"px "+(H*D+R+.5*I).toString()+"px"}).attr("class",function(W){let H="task",j="";W.classes.length>0&&(j=W.classes.join(" "));let Q=0;for(let[ue,J]of p.entries())W.type===J&&(Q=ue%i.numberSectionStyles);let U="";return W.active?W.crit?U+=" activeCrit":U=" active":W.done?W.crit?U=" doneCrit":U=" done":W.crit&&(U+=" crit"),U.length===0&&(U=" task"),W.milestone&&(U=" milestone "+U),W.vert&&(U=" vert "+U),U+=Q,U+=" "+j,H+U}),G.append("text").attr("id",function(W){return t+"-"+W.id+"-text"}).text(function(W){return W.task}).attr("font-size",i.fontSize).attr("x",function(W){let H=v(W.startTime),j=v(W.renderEndTime||W.endTime);if(W.milestone&&(H+=.5*(v(W.endTime)-v(W.startTime))-.5*I,j=H+I),W.vert)return v(W.startTime)+E;let Q=this.getBBox().width;return Q>j-H?j+Q+1.5*i.leftPadding>P?H+E-5:j+E+5:(j-H)/2+H+E}).attr("y",function(W,H){return W.vert?i.gridLineStartPadding+B.length*(i.barHeight+i.barGap)+60:(H=W.order,H*D+i.barHeight/2+(i.fontSize/2-2)+R)}).attr("text-height",I).attr("class",function(W){let H=v(W.startTime),j=v(W.endTime);W.milestone&&(j=H+I);let Q=this.getBBox().width,U="";W.classes.length>0&&(U=W.classes.join(" "));let ue=0;for(let[he,se]of p.entries())W.type===se&&(ue=he%i.numberSectionStyles);let J="";return W.active&&(W.crit?J="activeCritText"+ue:J="activeText"+ue),W.done?W.crit?J=J+" doneCritText"+ue:J=J+" doneText"+ue:W.crit&&(J=J+" critText"+ue),W.milestone&&(J+=" milestoneText"),W.vert&&(J+=" vertText"),Q>j-H?j+Q+1.5*i.leftPadding>P?U+" taskTextOutsideLeft taskTextOutside"+ue+" "+J:U+" taskTextOutsideRight taskTextOutside"+ue+" "+J+" width-"+Q:U+" taskText taskText"+ue+" "+J+" width-"+Q}),Le().securityLevel==="sandbox"){let W;W=lt("#i"+t);let H=W.nodes()[0].contentDocument;G.filter(function(j){return V.has(j.id)}).each(function(j){var Q=H.querySelector("#"+CSS.escape(t+"-"+j.id)),U=H.querySelector("#"+CSS.escape(t+"-"+j.id+"-text"));let ue=Q.parentNode;var J=H.createElement("a");J.setAttribute("xlink:href",V.get(j.id)),J.setAttribute("target","_top"),ue.appendChild(J),J.appendChild(Q),J.appendChild(U)})}}s(T,"drawRects");function w(N,D,R,E,I,L,P,B){if(P.length===0&&B.length===0)return;let O,$;for(let{startTime:j,endTime:Q}of L)(O===void 0||j$)&&($=Q);if(!O||!$)return;if((0,ov.default)($).diff((0,ov.default)(O),"year")>5){te.warn("The difference between the min and max time is more than 5 years. This will cause performance issues. Skipping drawing exclude days.");return}let G=n.db.getDateFormat(),V=[],z=null,W=(0,ov.default)(O);for(;W.valueOf()<=$;)n.db.isInvalidDate(W,G,P,B)?z?z.end=W:z={start:W,end:W}:z&&(V.push(z),z=null),W=W.add(1,"d");y.append("g").selectAll("rect").data(V).enter().append("rect").attr("id",j=>t+"-exclude-"+j.start.format("YYYY-MM-DD")).attr("x",j=>v(j.start.startOf("day"))+R).attr("y",i.gridLineStartPadding).attr("width",j=>v(j.end.endOf("day"))-v(j.start.startOf("day"))).attr("height",I-D-i.gridLineStartPadding).attr("transform-origin",function(j,Q){return(v(j.start)+R+.5*(v(j.end)-v(j.start))).toString()+"px "+(Q*N+.5*I).toString()+"px"}).attr("class","exclude-range")}s(w,"drawExcludeDays");function C(N,D,R,E){if(R<=0||N>D)return 1/0;let I=D-N,L=ov.default.duration({[E??"day"]:R}).asMilliseconds();return L<=0?1/0:Math.ceil(I/L)}s(C,"getEstimatedTickCount");function k(N,D,R,E){let I=n.db.getDateFormat(),L=n.db.getAxisFormat(),P;L?P=L:I==="D"?P="%d":P=i.axisFormat??"%Y-%m-%d";let B=l7(v).tickSize(-E+D+i.gridLineStartPadding).tickFormat(_p(P)),$=/^([1-9]\d*)(millisecond|second|minute|hour|day|week|month)$/.exec(n.db.getTickInterval()||i.tickInterval);if($!==null){let G=parseInt($[1],10);if(isNaN(G)||G<=0)te.warn(`Invalid tick interval value: "${$[1]}". Skipping custom tick interval.`);else{let V=$[2],z=n.db.getWeekday()||i.weekday,W=v.domain(),H=W[0],j=W[1],Q=C(H,j,G,V);if(Q>jq)te.warn(`The tick interval "${G}${V}" would generate ${Q} ticks, which exceeds the maximum allowed (${jq}). This may indicate an invalid date or time range. Skipping custom tick interval.`);else switch(V){case"millisecond":B.ticks(mc.every(G));break;case"second":B.ticks(yo.every(G));break;case"minute":B.ticks(Mu.every(G));break;case"hour":B.ticks(Nu.every(G));break;case"day":B.ticks(zo.every(G));break;case"week":B.ticks(kAe[z].every(G));break;case"month":B.ticks(Pu.every(G));break}}}if(y.append("g").attr("class","grid").attr("transform","translate("+N+", "+(E-50)+")").call(B).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10).attr("dy","1em"),n.db.topAxisEnabled()||i.topAxis){let G=o7(v).tickSize(-E+D+i.gridLineStartPadding).tickFormat(_p(P));if($!==null){let V=parseInt($[1],10);if(isNaN(V)||V<=0)te.warn(`Invalid tick interval value: "${$[1]}". Skipping custom tick interval.`);else{let z=$[2],W=n.db.getWeekday()||i.weekday,H=v.domain(),j=H[0],Q=H[1];if(C(j,Q,V,z)<=jq)switch(z){case"millisecond":G.ticks(mc.every(V));break;case"second":G.ticks(yo.every(V));break;case"minute":G.ticks(Mu.every(V));break;case"hour":G.ticks(Nu.every(V));break;case"day":G.ticks(zo.every(V));break;case"week":G.ticks(kAe[W].every(V));break;case"month":G.ticks(Pu.every(V));break}}}y.append("g").attr("class","grid").attr("transform","translate("+N+", "+D+")").call(G).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10)}}s(k,"makeGrid");function S(N,D){let R=0,E=Object.keys(m).map(I=>[I,m[I]]);y.append("g").selectAll("text").data(E).enter().append(function(I){let L=I[0].split(xt.lineBreakRegex),P=-(L.length-1)/2,B=u.createElementNS("http://www.w3.org/2000/svg","text");B.setAttribute("dy",P+"em");for(let[O,$]of L.entries()){let G=u.createElementNS("http://www.w3.org/2000/svg","tspan");G.setAttribute("alignment-baseline","central"),G.setAttribute("x","10"),O>0&&G.setAttribute("dy","1em"),G.textContent=$,B.appendChild(G)}return B}).attr("x",10).attr("y",function(I,L){if(L>0)for(let P=0;P{"use strict";dvt=s(e=>` + .mermaid-main-font { + font-family: ${e.fontFamily}; + } + + .exclude-range { + fill: ${e.excludeBkgColor}; + } + + .section { + stroke: none; + opacity: 0.2; + } + + .section0 { + fill: ${e.sectionBkgColor}; + } + + .section2 { + fill: ${e.sectionBkgColor2}; + } + + .section1, + .section3 { + fill: ${e.altSectionBkgColor}; + opacity: 0.2; + } + + .sectionTitle0 { + fill: ${e.titleColor}; + } + + .sectionTitle1 { + fill: ${e.titleColor}; + } + + .sectionTitle2 { + fill: ${e.titleColor}; + } + + .sectionTitle3 { + fill: ${e.titleColor}; + } + + .sectionTitle { + text-anchor: start; + font-family: ${e.fontFamily}; + } + + + /* Grid and axis */ + + .grid .tick { + stroke: ${e.gridColor}; + opacity: 0.8; + shape-rendering: crispEdges; + } + + .grid .tick text { + font-family: ${e.fontFamily}; + fill: ${e.textColor}; + } + + .grid path { + stroke-width: 0; + } + + + /* Today line */ + + .today { + fill: none; + stroke: ${e.todayLineColor}; + stroke-width: 2px; + } + + + /* Task styling */ + + /* Default task */ + + .task { + stroke-width: 2; + } + + .taskText { + text-anchor: middle; + font-family: ${e.fontFamily}; + } + + .taskTextOutsideRight { + fill: ${e.taskTextDarkColor}; + text-anchor: start; + font-family: ${e.fontFamily}; + } + + .taskTextOutsideLeft { + fill: ${e.taskTextDarkColor}; + text-anchor: end; + } + + + /* Special case clickable */ + + .task.clickable { + cursor: pointer; + } + + .taskText.clickable { + cursor: pointer; + fill: ${e.taskTextClickableColor} !important; + font-weight: bold; + } + + .taskTextOutsideLeft.clickable { + cursor: pointer; + fill: ${e.taskTextClickableColor} !important; + font-weight: bold; + } + + .taskTextOutsideRight.clickable { + cursor: pointer; + fill: ${e.taskTextClickableColor} !important; + font-weight: bold; + } + + + /* Specific task settings for the sections*/ + + .taskText0, + .taskText1, + .taskText2, + .taskText3 { + fill: ${e.taskTextColor}; + } + + .task0, + .task1, + .task2, + .task3 { + fill: ${e.taskBkgColor}; + stroke: ${e.taskBorderColor}; + } + + .taskTextOutside0, + .taskTextOutside2 + { + fill: ${e.taskTextOutsideColor}; + } + + .taskTextOutside1, + .taskTextOutside3 { + fill: ${e.taskTextOutsideColor}; + } + + + /* Active task */ + + .active0, + .active1, + .active2, + .active3 { + fill: ${e.activeTaskBkgColor}; + stroke: ${e.activeTaskBorderColor}; + } + + .activeText0, + .activeText1, + .activeText2, + .activeText3 { + fill: ${e.taskTextDarkColor} !important; + } + + + /* Completed task */ + + .done0, + .done1, + .done2, + .done3 { + stroke: ${e.doneTaskBorderColor}; + fill: ${e.doneTaskBkgColor}; + stroke-width: 2; + } + + .doneText0, + .doneText1, + .doneText2, + .doneText3 { + fill: ${e.taskTextDarkColor} !important; + } + + /* Done task text displayed outside the bar sits against the diagram background, + not against the done-task bar, so it must use the outside/contrast color. */ + .doneText0.taskTextOutsideLeft, + .doneText0.taskTextOutsideRight, + .doneText1.taskTextOutsideLeft, + .doneText1.taskTextOutsideRight, + .doneText2.taskTextOutsideLeft, + .doneText2.taskTextOutsideRight, + .doneText3.taskTextOutsideLeft, + .doneText3.taskTextOutsideRight { + fill: ${e.taskTextOutsideColor} !important; + } + + + /* Tasks on the critical line */ + + .crit0, + .crit1, + .crit2, + .crit3 { + stroke: ${e.critBorderColor}; + fill: ${e.critBkgColor}; + stroke-width: 2; + } + + .activeCrit0, + .activeCrit1, + .activeCrit2, + .activeCrit3 { + stroke: ${e.critBorderColor}; + fill: ${e.activeTaskBkgColor}; + stroke-width: 2; + } + + .doneCrit0, + .doneCrit1, + .doneCrit2, + .doneCrit3 { + stroke: ${e.critBorderColor}; + fill: ${e.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: ${e.taskTextDarkColor} !important; + } + + /* Done-crit task text outside the bar \u2014 same reasoning as doneText above. */ + .doneCritText0.taskTextOutsideLeft, + .doneCritText0.taskTextOutsideRight, + .doneCritText1.taskTextOutsideLeft, + .doneCritText1.taskTextOutsideRight, + .doneCritText2.taskTextOutsideLeft, + .doneCritText2.taskTextOutsideRight, + .doneCritText3.taskTextOutsideLeft, + .doneCritText3.taskTextOutsideRight { + fill: ${e.taskTextOutsideColor} !important; + } + + .vert { + stroke: ${e.vertLineColor}; + } + + .vertText { + font-size: 15px; + text-anchor: middle; + fill: ${e.vertLineColor} !important; + } + + .activeCritText0, + .activeCritText1, + .activeCritText2, + .activeCritText3 { + fill: ${e.taskTextDarkColor} !important; + } + + .titleText { + text-anchor: middle; + font-size: 18px; + fill: ${e.titleColor||e.textColor}; + font-family: ${e.fontFamily}; + } +`,"getStyles"),AAe=dvt});var _Ae={};ar(_Ae,{diagram:()=>fvt});var fvt,LAe=F(()=>{"use strict";eAe();TAe();EAe();RAe();fvt={parser:J5e,db:xAe,renderer:SAe,styles:AAe}});var MAe,NAe=F(()=>{"use strict";Oa();Tt();MAe={parse:s(async e=>{let t=await pi("info",e);te.debug(t)},"parse")}});var yvt,vvt,PAe,OAe=F(()=>{"use strict";yvt={version:"11.16.0"},vvt=s(()=>yvt.version,"getVersion"),PAe={getVersion:vvt}});var pn,Ba=F(()=>{"use strict";$r();Zt();pn=s(e=>{let{securityLevel:t}=Le(),r=lt("body");if(t==="sandbox"){let a=lt(`#i${e}`).node()?.contentDocument??document;r=lt(a.body)}return r.select(`#${e}`)},"selectSvgElement")});var xvt,BAe,$Ae=F(()=>{"use strict";Tt();Ba();Dn();xvt=s((e,t,r)=>{te.debug(`rendering info diagram +`+e);let n=pn(t);Br(n,100,400,!0),n.append("g").append("text").attr("x",100).attr("y",40).attr("class","version").attr("font-size",32).style("text-anchor","middle").text(`v${r}`)},"draw"),BAe={draw:xvt}});var FAe={};ar(FAe,{diagram:()=>bvt});var bvt,GAe=F(()=>{"use strict";NAe();OAe();$Ae();bvt={parser:MAe,db:PAe,renderer:BAe}});var WAe,Xq,N6,Kq,kvt,wvt,Svt,Evt,Avt,Rvt,_vt,P6,Zq=F(()=>{"use strict";Tt();An();Ni();WAe=hr.pie,Xq={sections:new Map,showData:!1,config:WAe},N6=Xq.sections,Kq=Xq.showData,kvt=structuredClone(WAe),wvt=s(()=>structuredClone(kvt),"getConfig"),Svt=s(()=>{N6=new Map,Kq=Xq.showData,gr()},"clear"),Evt=s(({label:e,value:t})=>{if(t<0)throw new Error(`"${e}" has invalid value: ${t}. Negative values are not allowed in pie charts. All slice values must be >= 0.`);N6.has(e)||(N6.set(e,t),te.debug(`added new section: ${e}, with value: ${t}`))},"addSection"),Avt=s(()=>N6,"getSections"),Rvt=s(e=>{Kq=e},"setShowData"),_vt=s(()=>Kq,"getShowData"),P6={getConfig:wvt,clear:Svt,setDiagramTitle:Mr,getDiagramTitle:Rr,setAccTitle:Cr,getAccTitle:Sr,setAccDescription:Er,getAccDescription:Ar,addSection:Evt,getSections:Avt,setShowData:Rvt,getShowData:_vt}});var Lvt,qAe,HAe=F(()=>{"use strict";Oa();Tt();_s();Zq();Lvt=s((e,t)=>{Nn(e,t),t.setShowData(e.showData),e.sections.map(t.addSection)},"populateDb"),qAe={parse:s(async e=>{let t=await pi("pie",e);te.debug(t),Lvt(t,P6)},"parse")}});var Dvt,UAe,YAe=F(()=>{"use strict";Dvt=s(e=>` + .pieCircle{ + stroke: ${e.pieStrokeColor}; + stroke-width : ${e.pieStrokeWidth}; + opacity : ${e.pieOpacity}; + } + .pieCircle.highlighted{ + scale: 1.05; + opacity: 1; + } + .pieCircle.highlightedOnHover:hover{ + transition-duration: 250ms; + scale: 1.05; + opacity: 1; + } + .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"),UAe=Dvt});var Ivt,Mvt,jAe,XAe=F(()=>{"use strict";$r();Zt();Tt();Ba();Dn();Qt();Ivt=s(e=>{let t=[...e.values()].reduce((i,a)=>i+a,0),r=[...e.entries()].map(([i,a])=>({label:i,value:a})).filter(i=>i.value/t*100>=1);return wS().value(i=>i.value).sort(null)(r)},"createPieArcs"),Mvt=s((e,t,r,n)=>{te.debug(`rendering pie chart +`+e);let i=n.db,a=Le(),o=Fr(i.getConfig(),a.pie),l=40,u=18,h=4,d=450,f=d,p=pn(t),m=p.append("g");m.attr("transform","translate("+f/2+","+d/2+")");let{themeVariables:g}=a,[y]=fs(g.pieOuterStrokeWidth);y??=2;let v=o.legendPosition,x=o.textPosition,b=o.donutHole>0&&o.donutHole<=.9?o.donutHole:0,T=Math.min(f,d)/2-l,w=Al().innerRadius(b*T).outerRadius(T),C=Al().innerRadius(T*x).outerRadius(T*x),k=m.append("g");k.append("circle").attr("cx",0).attr("cy",0).attr("r",T+y/2).attr("class","pieOuterCircle");let S=i.getSections(),A=Ivt(S),M=[g.pie1,g.pie2,g.pie3,g.pie4,g.pie5,g.pie6,g.pie7,g.pie8,g.pie9,g.pie10,g.pie11,g.pie12],N=0;S.forEach(U=>{N+=U});let D=A.filter(U=>(U.data.value/N*100).toFixed(0)!=="0"),R=go(M).domain([...S.keys()]);k.selectAll("mySlices").data(D).enter().append("path").attr("d",w).attr("fill",U=>R(U.data.label)).attr("class",U=>{let ue="pieCircle";return o.highlightSlice==="hover"?ue+=" highlightedOnHover":o.highlightSlice===U.data.label&&(ue+=" highlighted"),ue}),k.selectAll("mySlices").data(D).enter().append("text").text(U=>(U.data.value/N*100).toFixed(0)+"%").attr("transform",U=>"translate("+C.centroid(U)+")").style("text-anchor","middle").attr("class","slice");let E=m.append("text").text(i.getDiagramTitle()).attr("x",0).attr("y",-(d-50)/2).attr("class","pieTitleText"),I=[...S.entries()].map(([U,ue])=>({label:U,value:ue})),L=m.selectAll(".legend").data(I).enter().append("g").attr("class","legend");L.append("rect").attr("width",u).attr("height",u).style("fill",U=>R(U.label)).style("stroke",U=>R(U.label)),L.append("text").attr("x",u+h).attr("y",u-h).text(U=>i.getShowData()?`${U.label} [${U.value}]`:U.label);let P=Math.max(...L.selectAll("text").nodes().map(U=>U?.getBoundingClientRect().width??0)),B=d,O=f+l,$=u+h,G=I.length*$;switch(v){case"center":L.attr("transform",(U,ue)=>{let J=$*I.length/2,he=-P/2-(u+h),se=ue*$-J;return"translate("+he+","+se+")"});break;case"top":B+=G,L.attr("transform",(U,ue)=>{let J=T,he=-P/2-(u+h),se=ue*$-J;return`translate(${he}, ${se})`}),k.attr("transform",()=>`translate(0, ${G+$})`);break;case"bottom":B+=G,L.attr("transform",(U,ue)=>{let J=-T-$,he=-P/2-(u+h),se=ue*$-J;return"translate("+he+","+se+")"});break;case"left":O+=u+h+P,L.attr("transform",(U,ue)=>{let J=$*I.length/2,he=-T-(u+h),se=ue*$-J;return"translate("+he+","+se+")"}),k.attr("transform",()=>`translate(${P+u+h}, 0)`);break;case"right":default:O+=u+h+P,L.attr("transform",(U,ue)=>{let J=$*I.length/2,he=12*u,se=ue*$-J;return"translate("+he+","+se+")"});break}let V=E.node()?.getBoundingClientRect().width??0,z=f/2-V/2,W=f/2+V/2,H=Math.min(0,z),Q=Math.max(O,W)-H;p.attr("viewBox",`${H} 0 ${Q} ${B}`),Br(p,B,Q,o.useMaxWidth)},"draw"),jAe={draw:Mvt}});var KAe={};ar(KAe,{diagram:()=>Nvt});var Nvt,ZAe=F(()=>{"use strict";HAe();Zq();YAe();XAe();Nvt={parser:qAe,db:P6,renderer:jAe,styles:UAe}});var Qq,JAe,eRe=F(()=>{"use strict";Qq=(function(){var e=s(function(X,ye,K,Ge){for(K=K||{},Ge=X.length;Ge--;K[X[Ge]]=ye);return K},"o"),t=[1,3],r=[1,4],n=[1,5],i=[1,6],a=[1,7],o=[1,4,5,10,12,13,14,15,18,25,35,37,39,41,42,48,50,51,52,53,54,55,56,57,60,61,63,64,65,66,67],l=[1,4,5,10,12,13,14,15,18,25,28,35,37,39,41,42,48,50,51,52,53,54,55,56,57,60,61,63,64,65,66,67],u=[55,56,57],h=[2,36],d=[1,37],f=[1,36],p=[1,38],m=[1,35],g=[1,43],y=[1,41],v=[1,45],x=[1,14],b=[1,23],T=[1,18],w=[1,19],C=[1,20],k=[1,21],S=[1,22],A=[1,24],M=[1,25],N=[1,26],D=[1,27],R=[1,28],E=[1,29],I=[1,32],L=[1,33],P=[1,34],B=[1,39],O=[1,40],$=[1,42],G=[1,44],V=[1,63],z=[1,62],W=[4,5,8,10,12,13,14,15,18,44,47,49,55,56,57,63,64,65,66,67],H=[1,66],j=[1,67],Q=[1,68],U=[1,69],ue=[1,70],J=[1,71],he=[1,72],se=[1,73],oe=[1,74],Se=[1,75],xe=[1,76],Ne=[1,77],Ye=[4,5,6,7,8,9,10,11,12,13,14,15,18],We=[1,91],pe=[1,92],_e=[1,93],Ee=[1,100],Re=[1,94],Z=[1,97],ae=[1,95],ie=[1,96],le=[1,98],ve=[1,99],ne=[1,103],Me=[10,55,56,57],re=[4,5,6,8,10,11,13,17,18,19,20,55,56,57],ce={trace:s(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],[58,1],[59,1],[59,1],[59,1]],performAction:s(function(ye,K,Ge,Ae,$e,Oe,at){var Pe=Oe.length-1;switch($e){case 23:this.$=Oe[Pe];break;case 24:this.$=Oe[Pe-1]+""+Oe[Pe];break;case 26:this.$=Oe[Pe-1]+Oe[Pe];break;case 27:this.$=[Oe[Pe].trim()];break;case 28:Oe[Pe-2].push(Oe[Pe].trim()),this.$=Oe[Pe-2];break;case 29:this.$=Oe[Pe-4],Ae.addClass(Oe[Pe-2],Oe[Pe]);break;case 37:this.$=[];break;case 42:this.$=Oe[Pe].trim(),Ae.setDiagramTitle(this.$);break;case 43:this.$=Oe[Pe].trim(),Ae.setAccTitle(this.$);break;case 44:case 45:this.$=Oe[Pe].trim(),Ae.setAccDescription(this.$);break;case 46:Ae.addSection(Oe[Pe].substr(8)),this.$=Oe[Pe].substr(8);break;case 47:Ae.addPoint(Oe[Pe-3],"",Oe[Pe-1],Oe[Pe],[]);break;case 48:Ae.addPoint(Oe[Pe-4],Oe[Pe-3],Oe[Pe-1],Oe[Pe],[]);break;case 49:Ae.addPoint(Oe[Pe-4],"",Oe[Pe-2],Oe[Pe-1],Oe[Pe]);break;case 50:Ae.addPoint(Oe[Pe-5],Oe[Pe-4],Oe[Pe-2],Oe[Pe-1],Oe[Pe]);break;case 51:Ae.setXAxisLeftText(Oe[Pe-2]),Ae.setXAxisRightText(Oe[Pe]);break;case 52:Oe[Pe-1].text+=" \u27F6 ",Ae.setXAxisLeftText(Oe[Pe-1]);break;case 53:Ae.setXAxisLeftText(Oe[Pe]);break;case 54:Ae.setYAxisBottomText(Oe[Pe-2]),Ae.setYAxisTopText(Oe[Pe]);break;case 55:Oe[Pe-1].text+=" \u27F6 ",Ae.setYAxisBottomText(Oe[Pe-1]);break;case 56:Ae.setYAxisBottomText(Oe[Pe]);break;case 57:Ae.setQuadrant1Text(Oe[Pe]);break;case 58:Ae.setQuadrant2Text(Oe[Pe]);break;case 59:Ae.setQuadrant3Text(Oe[Pe]);break;case 60:Ae.setQuadrant4Text(Oe[Pe]);break;case 64:this.$={text:Oe[Pe],type:"text"};break;case 65:this.$={text:Oe[Pe-1].text+""+Oe[Pe],type:Oe[Pe-1].type};break;case 66:this.$={text:Oe[Pe],type:"text"};break;case 67:this.$={text:Oe[Pe],type:"markdown"};break;case 68:this.$=Oe[Pe];break;case 69:this.$=Oe[Pe-1]+""+Oe[Pe];break}},"anonymous"),table:[{18:t,26:1,27:2,28:r,55:n,56:i,57:a},{1:[3]},{18:t,26:8,27:2,28:r,55:n,56:i,57:a},{18:t,26:9,27:2,28:r,55:n,56:i,57:a},e(o,[2,33],{29:10}),e(l,[2,61]),e(l,[2,62]),e(l,[2,63]),{1:[2,30]},{1:[2,31]},e(u,h,{30:11,31:12,24:13,32:15,33:16,34:17,43:30,58:31,1:[2,32],4:d,5:f,10:p,12:m,13:g,14:y,15:v,18:x,25:b,35:T,37:w,39:C,41:k,42:S,48:A,50:M,51:N,52:D,53:R,54:E,60:I,61:L,63:P,64:B,65:O,66:$,67:G}),e(o,[2,34]),{27:46,55:n,56:i,57:a},e(u,[2,37]),e(u,h,{24:13,32:15,33:16,34:17,43:30,58:31,31:47,4:d,5:f,10:p,12:m,13:g,14:y,15:v,18:x,25:b,35:T,37:w,39:C,41:k,42:S,48:A,50:M,51:N,52:D,53:R,54:E,60:I,61:L,63:P,64:B,65:O,66:$,67:G}),e(u,[2,39]),e(u,[2,40]),e(u,[2,41]),{36:[1,48]},{38:[1,49]},{40:[1,50]},e(u,[2,45]),e(u,[2,46]),{18:[1,51]},{4:d,5:f,10:p,12:m,13:g,14:y,15:v,43:52,58:31,60:I,61:L,63:P,64:B,65:O,66:$,67:G},{4:d,5:f,10:p,12:m,13:g,14:y,15:v,43:53,58:31,60:I,61:L,63:P,64:B,65:O,66:$,67:G},{4:d,5:f,10:p,12:m,13:g,14:y,15:v,43:54,58:31,60:I,61:L,63:P,64:B,65:O,66:$,67:G},{4:d,5:f,10:p,12:m,13:g,14:y,15:v,43:55,58:31,60:I,61:L,63:P,64:B,65:O,66:$,67:G},{4:d,5:f,10:p,12:m,13:g,14:y,15:v,43:56,58:31,60:I,61:L,63:P,64:B,65:O,66:$,67:G},{4:d,5:f,10:p,12:m,13:g,14:y,15:v,43:57,58:31,60:I,61:L,63:P,64:B,65:O,66:$,67:G},{4:d,5:f,8:V,10:p,12:m,13:g,14:y,15:v,18:z,44:[1,58],47:[1,59],58:61,59:60,63:P,64:B,65:O,66:$,67:G},e(W,[2,64]),e(W,[2,66]),e(W,[2,67]),e(W,[2,70]),e(W,[2,71]),e(W,[2,72]),e(W,[2,73]),e(W,[2,74]),e(W,[2,75]),e(W,[2,76]),e(W,[2,77]),e(W,[2,78]),e(W,[2,79]),e(W,[2,80]),e(W,[2,81]),e(o,[2,35]),e(u,[2,38]),e(u,[2,42]),e(u,[2,43]),e(u,[2,44]),{3:65,4:H,5:j,6:Q,7:U,8:ue,9:J,10:he,11:se,12:oe,13:Se,14:xe,15:Ne,21:64},e(u,[2,53],{59:60,58:61,4:d,5:f,8:V,10:p,12:m,13:g,14:y,15:v,18:z,49:[1,78],63:P,64:B,65:O,66:$,67:G}),e(u,[2,56],{59:60,58:61,4:d,5:f,8:V,10:p,12:m,13:g,14:y,15:v,18:z,49:[1,79],63:P,64:B,65:O,66:$,67:G}),e(u,[2,57],{59:60,58:61,4:d,5:f,8:V,10:p,12:m,13:g,14:y,15:v,18:z,63:P,64:B,65:O,66:$,67:G}),e(u,[2,58],{59:60,58:61,4:d,5:f,8:V,10:p,12:m,13:g,14:y,15:v,18:z,63:P,64:B,65:O,66:$,67:G}),e(u,[2,59],{59:60,58:61,4:d,5:f,8:V,10:p,12:m,13:g,14:y,15:v,18:z,63:P,64:B,65:O,66:$,67:G}),e(u,[2,60],{59:60,58:61,4:d,5:f,8:V,10:p,12:m,13:g,14:y,15:v,18:z,63:P,64:B,65:O,66:$,67:G}),{45:[1,80]},{44:[1,81]},e(W,[2,65]),e(W,[2,82]),e(W,[2,83]),e(W,[2,84]),{3:83,4:H,5:j,6:Q,7:U,8:ue,9:J,10:he,11:se,12:oe,13:Se,14:xe,15:Ne,18:[1,82]},e(Ye,[2,23]),e(Ye,[2,1]),e(Ye,[2,2]),e(Ye,[2,3]),e(Ye,[2,4]),e(Ye,[2,5]),e(Ye,[2,6]),e(Ye,[2,7]),e(Ye,[2,8]),e(Ye,[2,9]),e(Ye,[2,10]),e(Ye,[2,11]),e(Ye,[2,12]),e(u,[2,52],{58:31,43:84,4:d,5:f,10:p,12:m,13:g,14:y,15:v,60:I,61:L,63:P,64:B,65:O,66:$,67:G}),e(u,[2,55],{58:31,43:85,4:d,5:f,10:p,12:m,13:g,14:y,15:v,60:I,61:L,63:P,64:B,65:O,66:$,67:G}),{46:[1,86]},{45:[1,87]},{4:We,5:pe,6:_e,8:Ee,11:Re,13:Z,16:90,17:ae,18:ie,19:le,20:ve,22:89,23:88},e(Ye,[2,24]),e(u,[2,51],{59:60,58:61,4:d,5:f,8:V,10:p,12:m,13:g,14:y,15:v,18:z,63:P,64:B,65:O,66:$,67:G}),e(u,[2,54],{59:60,58:61,4:d,5:f,8:V,10:p,12:m,13:g,14:y,15:v,18:z,63:P,64:B,65:O,66:$,67:G}),e(u,[2,47],{22:89,16:90,23:101,4:We,5:pe,6:_e,8:Ee,11:Re,13:Z,17:ae,18:ie,19:le,20:ve}),{46:[1,102]},e(u,[2,29],{10:ne}),e(Me,[2,27],{16:104,4:We,5:pe,6:_e,8:Ee,11:Re,13:Z,17:ae,18:ie,19:le,20:ve}),e(re,[2,25]),e(re,[2,13]),e(re,[2,14]),e(re,[2,15]),e(re,[2,16]),e(re,[2,17]),e(re,[2,18]),e(re,[2,19]),e(re,[2,20]),e(re,[2,21]),e(re,[2,22]),e(u,[2,49],{10:ne}),e(u,[2,48],{22:89,16:90,23:105,4:We,5:pe,6:_e,8:Ee,11:Re,13:Z,17:ae,18:ie,19:le,20:ve}),{4:We,5:pe,6:_e,8:Ee,11:Re,13:Z,16:90,17:ae,18:ie,19:le,20:ve,22:106},e(re,[2,26]),e(u,[2,50],{10:ne}),e(Me,[2,28],{16:104,4:We,5:pe,6:_e,8:Ee,11:Re,13:Z,17:ae,18:ie,19:le,20:ve})],defaultActions:{8:[2,30],9:[2,31]},parseError:s(function(ye,K){if(K.recoverable)this.trace(ye);else{var Ge=new Error(ye);throw Ge.hash=K,Ge}},"parseError"),parse:s(function(ye){var K=this,Ge=[0],Ae=[],$e=[null],Oe=[],at=this.table,Pe="",Ke=0,qe=0,Be=0,Xe=2,be=1,vt=Oe.slice.call(arguments,1),ke=Object.create(this.lexer),It={yy:{}};for(var Ft in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Ft)&&(It.yy[Ft]=this.yy[Ft]);ke.setInput(ye,It.yy),It.yy.lexer=ke,It.yy.parser=this,typeof ke.yylloc>"u"&&(ke.yylloc={});var yt=ke.yylloc;Oe.push(yt);var Et=ke.options&&ke.options.ranges;typeof It.yy.parseError=="function"?this.parseError=It.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function gt(Ie){Ge.length=Ge.length-2*Ie,$e.length=$e.length-Ie,Oe.length=Oe.length-Ie}s(gt,"popStack");function ge(){var Ie;return Ie=Ae.pop()||ke.lex()||be,typeof Ie!="number"&&(Ie instanceof Array&&(Ae=Ie,Ie=Ae.pop()),Ie=K.symbols_[Ie]||Ie),Ie}s(ge,"lex");for(var nt,pt,Qe,we,tt,st,mt={},Bt,Gt,Xt,rr;;){if(Qe=Ge[Ge.length-1],this.defaultActions[Qe]?we=this.defaultActions[Qe]:((nt===null||typeof nt>"u")&&(nt=ge()),we=at[Qe]&&at[Qe][nt]),typeof we>"u"||!we.length||!we[0]){var Ct="";rr=[];for(Bt in at[Qe])this.terminals_[Bt]&&Bt>Xe&&rr.push("'"+this.terminals_[Bt]+"'");ke.showPosition?Ct="Parse error on line "+(Ke+1)+`: +`+ke.showPosition()+` +Expecting `+rr.join(", ")+", got '"+(this.terminals_[nt]||nt)+"'":Ct="Parse error on line "+(Ke+1)+": Unexpected "+(nt==be?"end of input":"'"+(this.terminals_[nt]||nt)+"'"),this.parseError(Ct,{text:ke.match,token:this.terminals_[nt]||nt,line:ke.yylineno,loc:yt,expected:rr})}if(we[0]instanceof Array&&we.length>1)throw new Error("Parse Error: multiple actions possible at state: "+Qe+", token: "+nt);switch(we[0]){case 1:Ge.push(nt),$e.push(ke.yytext),Oe.push(ke.yylloc),Ge.push(we[1]),nt=null,pt?(nt=pt,pt=null):(qe=ke.yyleng,Pe=ke.yytext,Ke=ke.yylineno,yt=ke.yylloc,Be>0&&Be--);break;case 2:if(Gt=this.productions_[we[1]][1],mt.$=$e[$e.length-Gt],mt._$={first_line:Oe[Oe.length-(Gt||1)].first_line,last_line:Oe[Oe.length-1].last_line,first_column:Oe[Oe.length-(Gt||1)].first_column,last_column:Oe[Oe.length-1].last_column},Et&&(mt._$.range=[Oe[Oe.length-(Gt||1)].range[0],Oe[Oe.length-1].range[1]]),st=this.performAction.apply(mt,[Pe,qe,Ke,It.yy,we[1],$e,Oe].concat(vt)),typeof st<"u")return st;Gt&&(Ge=Ge.slice(0,-1*Gt*2),$e=$e.slice(0,-1*Gt),Oe=Oe.slice(0,-1*Gt)),Ge.push(this.productions_[we[1]][0]),$e.push(mt.$),Oe.push(mt._$),Xt=at[Ge[Ge.length-2]][Ge[Ge.length-1]],Ge.push(Xt);break;case 3:return!0}}return!0},"parse")},q=(function(){var X={EOF:1,parseError:s(function(K,Ge){if(this.yy.parser)this.yy.parser.parseError(K,Ge);else throw new Error(K)},"parseError"),setInput:s(function(ye,K){return this.yy=K||this.yy||{},this._input=ye,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 ye=this._input[0];this.yytext+=ye,this.yyleng++,this.offset++,this.match+=ye,this.matched+=ye;var K=ye.match(/(?:\r\n?|\n).*/g);return K?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),ye},"input"),unput:s(function(ye){var K=ye.length,Ge=ye.split(/(?:\r\n?|\n)/g);this._input=ye+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-K),this.offset-=K;var Ae=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),Ge.length-1&&(this.yylineno-=Ge.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:Ge?(Ge.length===Ae.length?this.yylloc.first_column:0)+Ae[Ae.length-Ge.length].length-Ge[0].length:this.yylloc.first_column-K},this.options.ranges&&(this.yylloc.range=[$e[0],$e[0]+this.yyleng-K]),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(ye){this.unput(this.match.slice(ye))},"less"),pastInput:s(function(){var ye=this.matched.substr(0,this.matched.length-this.match.length);return(ye.length>20?"...":"")+ye.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:s(function(){var ye=this.match;return ye.length<20&&(ye+=this._input.substr(0,20-ye.length)),(ye.substr(0,20)+(ye.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:s(function(){var ye=this.pastInput(),K=new Array(ye.length+1).join("-");return ye+this.upcomingInput()+` +`+K+"^"},"showPosition"),test_match:s(function(ye,K){var Ge,Ae,$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))),Ae=ye[0].match(/(?:\r\n?|\n).*/g),Ae&&(this.yylineno+=Ae.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:Ae?Ae[Ae.length-1].length-Ae[Ae.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+ye[0].length},this.yytext+=ye[0],this.match+=ye[0],this.matches=ye,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(ye[0].length),this.matched+=ye[0],Ge=this.performAction.call(this,this.yy,this,K,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),Ge)return Ge;if(this._backtrack){for(var Oe in $e)this[Oe]=$e[Oe];return!1}return!1},"test_match"),next:s(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var ye,K,Ge,Ae;this._more||(this.yytext="",this.match="");for(var $e=this._currentRules(),Oe=0;Oe<$e.length;Oe++)if(Ge=this._input.match(this.rules[$e[Oe]]),Ge&&(!K||Ge[0].length>K[0].length)){if(K=Ge,Ae=Oe,this.options.backtrack_lexer){if(ye=this.test_match(Ge,$e[Oe]),ye!==!1)return ye;if(this._backtrack){K=!1;continue}else return!1}else if(!this.options.flex)break}return K?(ye=this.test_match(K,$e[Ae]),ye!==!1?ye:!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 K=this.next();return K||this.lex()},"lex"),begin:s(function(K){this.conditionStack.push(K)},"begin"),popState:s(function(){var K=this.conditionStack.length-1;return K>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(K){return K=this.conditionStack.length-1-Math.abs(K||0),K>=0?this.conditionStack[K]:"INITIAL"},"topState"),pushState:s(function(K){this.begin(K)},"pushState"),stateStackSize:s(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:s(function(K,Ge,Ae,$e){var Oe=$e;switch(Ae){case 0:break;case 1:break;case 2:return 55;case 3:break;case 4:return this.begin("title"),35;break;case 5:return this.popState(),"title_value";break;case 6:return this.begin("acc_title"),37;break;case 7:return this.popState(),"acc_title_value";break;case 8:return this.begin("acc_descr"),39;break;case 9:return this.popState(),"acc_descr_value";break;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;break;case 29:return this.begin("point_start"),44;break;case 30:return this.begin("point_x"),45;break;case 31:this.popState();break;case 32:this.popState(),this.begin("point_y");break;case 33:return this.popState(),46;break;case 34:return 28;case 35:return 4;case 36:return 15;case 37:return 11;case 38:return 64;case 39:return 10;case 40:return 65;case 41:return 65;case 42:return 14;case 43:return 13;case 44:return 67;case 45:return 66;case 46:return 12;case 47:return 8;case 48:return 5;case 49:return 18;case 50:return 56;case 51:return 63;case 52: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,/^(?:[^\x00-\x7F]+)/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,52],inclusive:!0}}};return X})();ce.lexer=q;function de(){this.yy={}}return s(de,"Parser"),de.prototype=ce,ce.Parser=de,new de})();Qq.parser=Qq;JAe=Qq});var Ls,O6,tRe=F(()=>{"use strict";$r();Ni();Tt();ec();Ls=ia(),O6=class{constructor(){this.classes=new Map;this.config=this.getDefaultConfig(),this.themeConfig=this.getDefaultThemeConfig(),this.data=this.getDefaultData()}static{s(this,"QuadrantBuilder")}getDefaultData(){return{titleText:"",quadrant1Text:"",quadrant2Text:"",quadrant3Text:"",quadrant4Text:"",xAxisLeftText:"",xAxisRightText:"",yAxisBottomText:"",yAxisTopText:"",points:[]}}getDefaultConfig(){return{showXAxis:!0,showYAxis:!0,showTitle:!0,chartHeight:hr.quadrantChart?.chartWidth||500,chartWidth:hr.quadrantChart?.chartHeight||500,titlePadding:hr.quadrantChart?.titlePadding||10,titleFontSize:hr.quadrantChart?.titleFontSize||20,quadrantPadding:hr.quadrantChart?.quadrantPadding||5,xAxisLabelPadding:hr.quadrantChart?.xAxisLabelPadding||5,yAxisLabelPadding:hr.quadrantChart?.yAxisLabelPadding||5,xAxisLabelFontSize:hr.quadrantChart?.xAxisLabelFontSize||16,yAxisLabelFontSize:hr.quadrantChart?.yAxisLabelFontSize||16,quadrantLabelFontSize:hr.quadrantChart?.quadrantLabelFontSize||16,quadrantTextTopPadding:hr.quadrantChart?.quadrantTextTopPadding||5,pointTextPadding:hr.quadrantChart?.pointTextPadding||5,pointLabelFontSize:hr.quadrantChart?.pointLabelFontSize||12,pointRadius:hr.quadrantChart?.pointRadius||5,xAxisPosition:hr.quadrantChart?.xAxisPosition||"top",yAxisPosition:hr.quadrantChart?.yAxisPosition||"left",quadrantInternalBorderStrokeWidth:hr.quadrantChart?.quadrantInternalBorderStrokeWidth||1,quadrantExternalBorderStrokeWidth:hr.quadrantChart?.quadrantExternalBorderStrokeWidth||2}}getDefaultThemeConfig(){return{quadrant1Fill:Ls.quadrant1Fill,quadrant2Fill:Ls.quadrant2Fill,quadrant3Fill:Ls.quadrant3Fill,quadrant4Fill:Ls.quadrant4Fill,quadrant1TextFill:Ls.quadrant1TextFill,quadrant2TextFill:Ls.quadrant2TextFill,quadrant3TextFill:Ls.quadrant3TextFill,quadrant4TextFill:Ls.quadrant4TextFill,quadrantPointFill:Ls.quadrantPointFill,quadrantPointTextFill:Ls.quadrantPointTextFill,quadrantXAxisTextFill:Ls.quadrantXAxisTextFill,quadrantYAxisTextFill:Ls.quadrantYAxisTextFill,quadrantTitleFill:Ls.quadrantTitleFill,quadrantInternalBorderStrokeFill:Ls.quadrantInternalBorderStrokeFill,quadrantExternalBorderStrokeFill:Ls.quadrantExternalBorderStrokeFill}}clear(){this.config=this.getDefaultConfig(),this.themeConfig=this.getDefaultThemeConfig(),this.data=this.getDefaultData(),this.classes=new Map,te.info("clear called")}setData(t){this.data={...this.data,...t}}addPoints(t){this.data.points=[...t,...this.data.points]}addClass(t,r){this.classes.set(t,r)}setConfig(t){te.trace("setConfig called with: ",t),this.config={...this.config,...t}}setThemeConfig(t){te.trace("setThemeConfig called with: ",t),this.themeConfig={...this.themeConfig,...t}}calculateSpace(t,r,n,i){let a=this.config.xAxisLabelPadding*2+this.config.xAxisLabelFontSize,o={top:t==="top"&&r?a:0,bottom:t==="bottom"&&r?a:0},l=this.config.yAxisLabelPadding*2+this.config.yAxisLabelFontSize,u={left:this.config.yAxisPosition==="left"&&n?l:0,right:this.config.yAxisPosition==="right"&&n?l:0},h=this.config.titleFontSize+this.config.titlePadding*2,d={top:i?h:0},f=this.config.quadrantPadding+u.left,p=this.config.quadrantPadding+o.top+d.top,m=this.config.chartWidth-this.config.quadrantPadding*2-u.left-u.right,g=this.config.chartHeight-this.config.quadrantPadding*2-o.top-o.bottom-d.top,y=m/2,v=g/2;return{xAxisSpace:o,yAxisSpace:u,titleSpace:d,quadrantSpace:{quadrantLeft:f,quadrantTop:p,quadrantWidth:m,quadrantHalfWidth:y,quadrantHeight:g,quadrantHalfHeight:v}}}getAxisLabels(t,r,n,i){let{quadrantSpace:a,titleSpace:o}=i,{quadrantHalfHeight:l,quadrantHeight:u,quadrantLeft:h,quadrantHalfWidth:d,quadrantTop:f,quadrantWidth:p}=a,m=!!this.data.xAxisRightText,g=!!this.data.yAxisTopText,y=[];return this.data.xAxisLeftText&&r&&y.push({text:this.data.xAxisLeftText,fill:this.themeConfig.quadrantXAxisTextFill,x:h+(m?d/2:0),y:t==="top"?this.config.xAxisLabelPadding+o.top:this.config.xAxisLabelPadding+f+u+this.config.quadrantPadding,fontSize:this.config.xAxisLabelFontSize,verticalPos:m?"center":"left",horizontalPos:"top",rotation:0}),this.data.xAxisRightText&&r&&y.push({text:this.data.xAxisRightText,fill:this.themeConfig.quadrantXAxisTextFill,x:h+d+(m?d/2:0),y:t==="top"?this.config.xAxisLabelPadding+o.top:this.config.xAxisLabelPadding+f+u+this.config.quadrantPadding,fontSize:this.config.xAxisLabelFontSize,verticalPos:m?"center":"left",horizontalPos:"top",rotation:0}),this.data.yAxisBottomText&&n&&y.push({text:this.data.yAxisBottomText,fill:this.themeConfig.quadrantYAxisTextFill,x:this.config.yAxisPosition==="left"?this.config.yAxisLabelPadding:this.config.yAxisLabelPadding+h+p+this.config.quadrantPadding,y:f+u-(g?l/2:0),fontSize:this.config.yAxisLabelFontSize,verticalPos:g?"center":"left",horizontalPos:"top",rotation:-90}),this.data.yAxisTopText&&n&&y.push({text:this.data.yAxisTopText,fill:this.themeConfig.quadrantYAxisTextFill,x:this.config.yAxisPosition==="left"?this.config.yAxisLabelPadding:this.config.yAxisLabelPadding+h+p+this.config.quadrantPadding,y:f+l-(g?l/2:0),fontSize:this.config.yAxisLabelFontSize,verticalPos:g?"center":"left",horizontalPos:"top",rotation:-90}),y}getQuadrants(t){let{quadrantSpace:r}=t,{quadrantHalfHeight:n,quadrantLeft:i,quadrantHalfWidth:a,quadrantTop:o}=r,l=[{text:{text:this.data.quadrant1Text,fill:this.themeConfig.quadrant1TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:i+a,y:o,width:a,height:n,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:i,y:o,width:a,height:n,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:i,y:o+n,width:a,height:n,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:i+a,y:o+n,width:a,height:n,fill:this.themeConfig.quadrant4Fill}];for(let u of l)u.text.x=u.x+u.width/2,this.data.points.length===0?(u.text.y=u.y+u.height/2,u.text.horizontalPos="middle"):(u.text.y=u.y+this.config.quadrantTextTopPadding,u.text.horizontalPos="top");return l}getQuadrantPoints(t){let{quadrantSpace:r}=t,{quadrantHeight:n,quadrantLeft:i,quadrantTop:a,quadrantWidth:o}=r,l=kl().domain([0,1]).range([i,o+i]),u=kl().domain([0,1]).range([n+a,a]);return this.data.points.map(d=>{let f=this.classes.get(d.className);return f&&(d={...f,...d}),{x:l(d.x),y:u(d.y),fill:d.color??this.themeConfig.quadrantPointFill,radius:d.radius??this.config.pointRadius,text:{text:d.text,fill:this.themeConfig.quadrantPointTextFill,x:l(d.x),y:u(d.y)+this.config.pointTextPadding,verticalPos:"center",horizontalPos:"top",fontSize:this.config.pointLabelFontSize,rotation:0},strokeColor:d.strokeColor??this.themeConfig.quadrantPointFill,strokeWidth:d.strokeWidth??"0px"}})}getBorders(t){let r=this.config.quadrantExternalBorderStrokeWidth/2,{quadrantSpace:n}=t,{quadrantHalfHeight:i,quadrantHeight:a,quadrantLeft:o,quadrantHalfWidth:l,quadrantTop:u,quadrantWidth:h}=n;return[{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:o-r,y1:u,x2:o+h+r,y2:u},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:o+h,y1:u+r,x2:o+h,y2:u+a-r},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:o-r,y1:u+a,x2:o+h+r,y2:u+a},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:o,y1:u+r,x2:o,y2:u+a-r},{strokeFill:this.themeConfig.quadrantInternalBorderStrokeFill,strokeWidth:this.config.quadrantInternalBorderStrokeWidth,x1:o+l,y1:u+r,x2:o+l,y2:u+a-r},{strokeFill:this.themeConfig.quadrantInternalBorderStrokeFill,strokeWidth:this.config.quadrantInternalBorderStrokeWidth,x1:o+r,y1:u+i,x2:o+h-r,y2:u+i}]}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(){let t=this.config.showXAxis&&!!(this.data.xAxisLeftText||this.data.xAxisRightText),r=this.config.showYAxis&&!!(this.data.yAxisTopText||this.data.yAxisBottomText),n=this.config.showTitle&&!!this.data.titleText,i=this.data.points.length>0?"bottom":this.config.xAxisPosition,a=this.calculateSpace(i,t,r,n);return{points:this.getQuadrantPoints(a),quadrants:this.getQuadrants(a),axisLabels:this.getAxisLabels(i,t,r,a),borderLines:this.getBorders(a),title:this.getTitle(n)}}}});function Jq(e){return!/^#?([\dA-Fa-f]{6}|[\dA-Fa-f]{3})$/.test(e)}function rRe(e){return!/^\d+$/.test(e)}function nRe(e){return!/^\d+px$/.test(e)}var Dg,iRe=F(()=>{"use strict";Dg=class extends Error{static{s(this,"InvalidStyleError")}constructor(t,r,n){super(`value for ${t} ${r} is invalid, please use a valid ${n}`),this.name="InvalidStyleError"}};s(Jq,"validateHexCode");s(rRe,"validateNumber");s(nRe,"validateSizeInPixels")});function Rh(e){return vr(e.trim(),Le())}function Bvt(e){$a.setData({quadrant1Text:Rh(e.text)})}function $vt(e){$a.setData({quadrant2Text:Rh(e.text)})}function Fvt(e){$a.setData({quadrant3Text:Rh(e.text)})}function Gvt(e){$a.setData({quadrant4Text:Rh(e.text)})}function zvt(e){$a.setData({xAxisLeftText:Rh(e.text)})}function Vvt(e){$a.setData({xAxisRightText:Rh(e.text)})}function Wvt(e){$a.setData({yAxisTopText:Rh(e.text)})}function qvt(e){$a.setData({yAxisBottomText:Rh(e.text)})}function eH(e){let t={};for(let r of e){let[n,i]=r.trim().split(/\s*:\s*/);if(n==="radius"){if(rRe(i))throw new Dg(n,i,"number");t.radius=parseInt(i)}else if(n==="color"){if(Jq(i))throw new Dg(n,i,"hex code");t.color=i}else if(n==="stroke-color"){if(Jq(i))throw new Dg(n,i,"hex code");t.strokeColor=i}else if(n==="stroke-width"){if(nRe(i))throw new Dg(n,i,"number of pixels (eg. 10px)");t.strokeWidth=i}else throw new Error(`style named ${n} is not supported.`)}return t}function Hvt(e,t,r,n,i){let a=eH(i);$a.addPoints([{x:r,y:n,text:Rh(e.text),className:t,...a}])}function Uvt(e,t){$a.addClass(e,eH(t))}function Yvt(e){$a.setConfig({chartWidth:e})}function jvt(e){$a.setConfig({chartHeight:e})}function Xvt(){let e=Le(),{themeVariables:t,quadrantChart:r}=e;return r&&$a.setConfig(r),$a.setThemeConfig({quadrant1Fill:t.quadrant1Fill,quadrant2Fill:t.quadrant2Fill,quadrant3Fill:t.quadrant3Fill,quadrant4Fill:t.quadrant4Fill,quadrant1TextFill:t.quadrant1TextFill,quadrant2TextFill:t.quadrant2TextFill,quadrant3TextFill:t.quadrant3TextFill,quadrant4TextFill:t.quadrant4TextFill,quadrantPointFill:t.quadrantPointFill,quadrantPointTextFill:t.quadrantPointTextFill,quadrantXAxisTextFill:t.quadrantXAxisTextFill,quadrantYAxisTextFill:t.quadrantYAxisTextFill,quadrantExternalBorderStrokeFill:t.quadrantExternalBorderStrokeFill,quadrantInternalBorderStrokeFill:t.quadrantInternalBorderStrokeFill,quadrantTitleFill:t.quadrantTitleFill}),$a.setData({titleText:Rr()}),$a.build()}var $a,Kvt,aRe,sRe=F(()=>{"use strict";Zt();Gr();An();tRe();iRe();s(Rh,"textSanitizer");$a=new O6;s(Bvt,"setQuadrant1Text");s($vt,"setQuadrant2Text");s(Fvt,"setQuadrant3Text");s(Gvt,"setQuadrant4Text");s(zvt,"setXAxisLeftText");s(Vvt,"setXAxisRightText");s(Wvt,"setYAxisTopText");s(qvt,"setYAxisBottomText");s(eH,"parseStyles");s(Hvt,"addPoint");s(Uvt,"addClass");s(Yvt,"setWidth");s(jvt,"setHeight");s(Xvt,"getQuadrantData");Kvt=s(function(){$a.clear(),gr()},"clear"),aRe={setWidth:Yvt,setHeight:jvt,setQuadrant1Text:Bvt,setQuadrant2Text:$vt,setQuadrant3Text:Fvt,setQuadrant4Text:Gvt,setXAxisLeftText:zvt,setXAxisRightText:Vvt,setYAxisTopText:Wvt,setYAxisBottomText:qvt,parseStyles:eH,addPoint:Hvt,addClass:Uvt,getQuadrantData:Xvt,clear:Kvt,setAccTitle:Cr,getAccTitle:Sr,setDiagramTitle:Mr,getDiagramTitle:Rr,getAccDescription:Ar,setAccDescription:Er}});var Zvt,oRe,lRe=F(()=>{"use strict";$r();Zt();Tt();Dn();Zvt=s((e,t,r,n)=>{function i(A){return A==="top"?"hanging":"middle"}s(i,"getDominantBaseLine");function a(A){return A==="left"?"start":"middle"}s(a,"getTextAnchor");function o(A){return`translate(${A.x}, ${A.y}) rotate(${A.rotation||0})`}s(o,"getTransformation");let l=Le();te.debug(`Rendering quadrant chart +`+e);let u=l.securityLevel,h;u==="sandbox"&&(h=lt("#i"+t));let f=(u==="sandbox"?lt(h.nodes()[0].contentDocument.body):lt("body")).select(`[id="${t}"]`),p=f.append("g").attr("class","main"),m=l.quadrantChart?.chartWidth??500,g=l.quadrantChart?.chartHeight??500;Br(f,g,m,l.quadrantChart?.useMaxWidth??!0),f.attr("viewBox","0 0 "+m+" "+g),n.db.setHeight(g),n.db.setWidth(m);let y=n.db.getQuadrantData(),v=p.append("g").attr("class","quadrants"),x=p.append("g").attr("class","border"),b=p.append("g").attr("class","data-points"),T=p.append("g").attr("class","labels"),w=p.append("g").attr("class","title");y.title&&w.append("text").attr("x",0).attr("y",0).attr("fill",y.title.fill).attr("font-size",y.title.fontSize).attr("dominant-baseline",i(y.title.horizontalPos)).attr("text-anchor",a(y.title.verticalPos)).attr("transform",o(y.title)).text(y.title.text),y.borderLines&&x.selectAll("line").data(y.borderLines).enter().append("line").attr("x1",A=>A.x1).attr("y1",A=>A.y1).attr("x2",A=>A.x2).attr("y2",A=>A.y2).style("stroke",A=>A.strokeFill).style("stroke-width",A=>A.strokeWidth);let C=v.selectAll("g.quadrant").data(y.quadrants).enter().append("g").attr("class","quadrant");C.append("rect").attr("x",A=>A.x).attr("y",A=>A.y).attr("width",A=>A.width).attr("height",A=>A.height).attr("fill",A=>A.fill),C.append("text").attr("x",0).attr("y",0).attr("fill",A=>A.text.fill).attr("font-size",A=>A.text.fontSize).attr("dominant-baseline",A=>i(A.text.horizontalPos)).attr("text-anchor",A=>a(A.text.verticalPos)).attr("transform",A=>o(A.text)).text(A=>A.text.text),T.selectAll("g.label").data(y.axisLabels).enter().append("g").attr("class","label").append("text").attr("x",0).attr("y",0).text(A=>A.text).attr("fill",A=>A.fill).attr("font-size",A=>A.fontSize).attr("dominant-baseline",A=>i(A.horizontalPos)).attr("text-anchor",A=>a(A.verticalPos)).attr("transform",A=>o(A));let S=b.selectAll("g.data-point").data(y.points).enter().append("g").attr("class","data-point");S.append("circle").attr("cx",A=>A.x).attr("cy",A=>A.y).attr("r",A=>A.radius).attr("fill",A=>A.fill).attr("stroke",A=>A.strokeColor).attr("stroke-width",A=>A.strokeWidth),S.append("text").attr("x",0).attr("y",0).text(A=>A.text.text).attr("fill",A=>A.text.fill).attr("font-size",A=>A.text.fontSize).attr("dominant-baseline",A=>i(A.text.horizontalPos)).attr("text-anchor",A=>a(A.text.verticalPos)).attr("transform",A=>o(A.text))},"draw"),oRe={draw:Zvt}});var cRe={};ar(cRe,{diagram:()=>Qvt});var Qvt,uRe=F(()=>{"use strict";eRe();sRe();lRe();Qvt={parser:JAe,db:aRe,renderer:oRe,styles:s(()=>"","styles")}});var tH,fRe,pRe=F(()=>{"use strict";tH=(function(){var e=s(function(P,B,O,$){for(O=O||{},$=P.length;$--;O[P[$]]=B);return O},"o"),t=[1,10,12,14,16,18,19,21,23],r=[2,6],n=[1,3],i=[1,5],a=[1,6],o=[1,7],l=[1,5,10,12,14,16,18,19,21,23,36,37,38],u=[1,25],h=[1,26],d=[1,28],f=[1,29],p=[1,30],m=[1,31],g=[1,32],y=[1,33],v=[1,34],x=[1,35],b=[1,36],T=[1,37],w=[1,43],C=[1,42],k=[1,47],S=[1,50],A=[1,10,12,14,16,18,19,21,23,36,37,38],M=[1,10,12,14,16,18,19,21,23,24,26,28,29,36,37,38],N=[1,10,12,14,16,18,19,21,23,24,26,28,29,36,37,38,42,43,44,45,46,47,48,49,50,51],D=[1,65],R=[26,28],E={trace:s(function(){},"trace"),yy:{},symbols_:{error:2,start:3,eol:4,XYCHART:5,chartConfig:6,document:7,CHART_ORIENTATION:8,statement:9,title:10,text:11,X_AXIS:12,parseXAxis:13,Y_AXIS:14,parseYAxis:15,LINE:16,plotData:17,BAR:18,acc_title:19,acc_title_value:20,acc_descr:21,acc_descr_value:22,acc_descr_multiline_value:23,SQUARE_BRACES_START:24,dataPoints:25,SQUARE_BRACES_END:26,dataPoint:27,COMMA:28,NUMBER_WITH_DECIMAL:29,STR:30,xAxisData:31,bandData:32,ARROW_DELIMITER:33,commaSeparatedTexts:34,yAxisData:35,NEWLINE:36,SEMI:37,EOF:38,alphaNum:39,MD_STR:40,alphaNumToken:41,AMP:42,NUM:43,ALPHA:44,PLUS:45,EQUALS:46,MULT:47,DOT:48,BRKT:49,MINUS:50,UNDERSCORE:51,$accept:0,$end:1},terminals_:{2:"error",5:"XYCHART",8:"CHART_ORIENTATION",10:"title",12:"X_AXIS",14:"Y_AXIS",16:"LINE",18:"BAR",19:"acc_title",20:"acc_title_value",21:"acc_descr",22:"acc_descr_value",23:"acc_descr_multiline_value",24:"SQUARE_BRACES_START",26:"SQUARE_BRACES_END",28:"COMMA",29:"NUMBER_WITH_DECIMAL",30:"STR",33:"ARROW_DELIMITER",36:"NEWLINE",37:"SEMI",38:"EOF",40:"MD_STR",42:"AMP",43:"NUM",44:"ALPHA",45:"PLUS",46:"EQUALS",47:"MULT",48:"DOT",49:"BRKT",50:"MINUS",51:"UNDERSCORE"},productions_:[0,[3,2],[3,3],[3,2],[3,1],[6,1],[7,0],[7,2],[9,2],[9,2],[9,2],[9,2],[9,2],[9,3],[9,2],[9,3],[9,2],[9,2],[9,1],[17,3],[25,3],[25,1],[27,2],[27,1],[13,1],[13,2],[13,1],[31,1],[31,3],[32,3],[34,3],[34,1],[15,1],[15,2],[15,1],[35,3],[4,1],[4,1],[4,1],[11,1],[11,1],[11,1],[39,1],[39,2],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1]],performAction:s(function(B,O,$,G,V,z,W){var H=z.length-1;switch(V){case 5:G.setOrientation(z[H]);break;case 9:G.setDiagramTitle(z[H].text.trim());break;case 12:G.setLineData({text:"",type:"text"},z[H]);break;case 13:G.setLineData(z[H-1],z[H]);break;case 14:G.setBarData({text:"",type:"text"},z[H]);break;case 15:G.setBarData(z[H-1],z[H]);break;case 16:this.$=z[H].trim(),G.setAccTitle(this.$);break;case 17:case 18:this.$=z[H].trim(),G.setAccDescription(this.$);break;case 19:this.$=z[H-1];break;case 20:case 30:this.$=[z[H-2],...z[H]];break;case 21:case 31:this.$=[z[H]];break;case 22:this.$={value:Number(z[H-1]),label:z[H]};break;case 23:this.$={value:Number(z[H]),label:""};break;case 24:G.setXAxisTitle(z[H]);break;case 25:G.setXAxisTitle(z[H-1]);break;case 26:G.setXAxisTitle({type:"text",text:""});break;case 27:G.setXAxisBand(z[H]);break;case 28:G.setXAxisRangeData(Number(z[H-2]),Number(z[H]));break;case 29:this.$=z[H-1];break;case 32:G.setYAxisTitle(z[H]);break;case 33:G.setYAxisTitle(z[H-1]);break;case 34:G.setYAxisTitle({type:"text",text:""});break;case 35:G.setYAxisRangeData(Number(z[H-2]),Number(z[H]));break;case 39:this.$={text:z[H],type:"text"};break;case 40:this.$={text:z[H],type:"text"};break;case 41:this.$={text:z[H],type:"markdown"};break;case 42:this.$=z[H];break;case 43:this.$=z[H-1]+""+z[H];break}},"anonymous"),table:[e(t,r,{3:1,4:2,7:4,5:n,36:i,37:a,38:o}),{1:[3]},e(t,r,{4:2,7:4,3:8,5:n,36:i,37:a,38:o}),e(t,r,{4:2,7:4,6:9,3:10,5:n,8:[1,11],36:i,37:a,38:o}),{1:[2,4],9:12,10:[1,13],12:[1,14],14:[1,15],16:[1,16],18:[1,17],19:[1,18],21:[1,19],23:[1,20]},e(l,[2,36]),e(l,[2,37]),e(l,[2,38]),{1:[2,1]},e(t,r,{4:2,7:4,3:21,5:n,36:i,37:a,38:o}),{1:[2,3]},e(l,[2,5]),e(t,[2,7],{4:22,36:i,37:a,38:o}),{11:23,30:u,39:24,40:h,41:27,42:d,43:f,44:p,45:m,46:g,47:y,48:v,49:x,50:b,51:T},{11:39,13:38,24:w,29:C,30:u,31:40,32:41,39:24,40:h,41:27,42:d,43:f,44:p,45:m,46:g,47:y,48:v,49:x,50:b,51:T},{11:45,15:44,29:k,30:u,35:46,39:24,40:h,41:27,42:d,43:f,44:p,45:m,46:g,47:y,48:v,49:x,50:b,51:T},{11:49,17:48,24:S,30:u,39:24,40:h,41:27,42:d,43:f,44:p,45:m,46:g,47:y,48:v,49:x,50:b,51:T},{11:52,17:51,24:S,30:u,39:24,40:h,41:27,42:d,43:f,44:p,45:m,46:g,47:y,48:v,49:x,50:b,51:T},{20:[1,53]},{22:[1,54]},e(A,[2,18]),{1:[2,2]},e(A,[2,8]),e(A,[2,9]),e(M,[2,39],{41:55,42:d,43:f,44:p,45:m,46:g,47:y,48:v,49:x,50:b,51:T}),e(M,[2,40]),e(M,[2,41]),e(N,[2,42]),e(N,[2,44]),e(N,[2,45]),e(N,[2,46]),e(N,[2,47]),e(N,[2,48]),e(N,[2,49]),e(N,[2,50]),e(N,[2,51]),e(N,[2,52]),e(N,[2,53]),e(A,[2,10]),e(A,[2,24],{32:41,31:56,24:w,29:C}),e(A,[2,26]),e(A,[2,27]),{33:[1,57]},{11:59,30:u,34:58,39:24,40:h,41:27,42:d,43:f,44:p,45:m,46:g,47:y,48:v,49:x,50:b,51:T},e(A,[2,11]),e(A,[2,32],{35:60,29:k}),e(A,[2,34]),{33:[1,61]},e(A,[2,12]),{17:62,24:S},{25:63,27:64,29:D},e(A,[2,14]),{17:66,24:S},e(A,[2,16]),e(A,[2,17]),e(N,[2,43]),e(A,[2,25]),{29:[1,67]},{26:[1,68]},{26:[2,31],28:[1,69]},e(A,[2,33]),{29:[1,70]},e(A,[2,13]),{26:[1,71]},{26:[2,21],28:[1,72]},e(R,[2,23],{30:[1,73]}),e(A,[2,15]),e(A,[2,28]),e(A,[2,29]),{11:59,30:u,34:74,39:24,40:h,41:27,42:d,43:f,44:p,45:m,46:g,47:y,48:v,49:x,50:b,51:T},e(A,[2,35]),e(A,[2,19]),{25:75,27:64,29:D},e(R,[2,22]),{26:[2,30]},{26:[2,20]}],defaultActions:{8:[2,1],10:[2,3],21:[2,2],74:[2,30],75:[2,20]},parseError:s(function(B,O){if(O.recoverable)this.trace(B);else{var $=new Error(B);throw $.hash=O,$}},"parseError"),parse:s(function(B){var O=this,$=[0],G=[],V=[null],z=[],W=this.table,H="",j=0,Q=0,U=0,ue=2,J=1,he=z.slice.call(arguments,1),se=Object.create(this.lexer),oe={yy:{}};for(var Se in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Se)&&(oe.yy[Se]=this.yy[Se]);se.setInput(B,oe.yy),oe.yy.lexer=se,oe.yy.parser=this,typeof se.yylloc>"u"&&(se.yylloc={});var xe=se.yylloc;z.push(xe);var Ne=se.options&&se.options.ranges;typeof oe.yy.parseError=="function"?this.parseError=oe.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Ye(ce){$.length=$.length-2*ce,V.length=V.length-ce,z.length=z.length-ce}s(Ye,"popStack");function We(){var ce;return ce=G.pop()||se.lex()||J,typeof ce!="number"&&(ce instanceof Array&&(G=ce,ce=G.pop()),ce=O.symbols_[ce]||ce),ce}s(We,"lex");for(var pe,_e,Ee,Re,Z,ae,ie={},le,ve,ne,Me;;){if(Ee=$[$.length-1],this.defaultActions[Ee]?Re=this.defaultActions[Ee]:((pe===null||typeof pe>"u")&&(pe=We()),Re=W[Ee]&&W[Ee][pe]),typeof Re>"u"||!Re.length||!Re[0]){var re="";Me=[];for(le in W[Ee])this.terminals_[le]&&le>ue&&Me.push("'"+this.terminals_[le]+"'");se.showPosition?re="Parse error on line "+(j+1)+`: +`+se.showPosition()+` +Expecting `+Me.join(", ")+", got '"+(this.terminals_[pe]||pe)+"'":re="Parse error on line "+(j+1)+": Unexpected "+(pe==J?"end of input":"'"+(this.terminals_[pe]||pe)+"'"),this.parseError(re,{text:se.match,token:this.terminals_[pe]||pe,line:se.yylineno,loc:xe,expected:Me})}if(Re[0]instanceof Array&&Re.length>1)throw new Error("Parse Error: multiple actions possible at state: "+Ee+", token: "+pe);switch(Re[0]){case 1:$.push(pe),V.push(se.yytext),z.push(se.yylloc),$.push(Re[1]),pe=null,_e?(pe=_e,_e=null):(Q=se.yyleng,H=se.yytext,j=se.yylineno,xe=se.yylloc,U>0&&U--);break;case 2:if(ve=this.productions_[Re[1]][1],ie.$=V[V.length-ve],ie._$={first_line:z[z.length-(ve||1)].first_line,last_line:z[z.length-1].last_line,first_column:z[z.length-(ve||1)].first_column,last_column:z[z.length-1].last_column},Ne&&(ie._$.range=[z[z.length-(ve||1)].range[0],z[z.length-1].range[1]]),ae=this.performAction.apply(ie,[H,Q,j,oe.yy,Re[1],V,z].concat(he)),typeof ae<"u")return ae;ve&&($=$.slice(0,-1*ve*2),V=V.slice(0,-1*ve),z=z.slice(0,-1*ve)),$.push(this.productions_[Re[1]][0]),V.push(ie.$),z.push(ie._$),ne=W[$[$.length-2]][$[$.length-1]],$.push(ne);break;case 3:return!0}}return!0},"parse")},I=(function(){var P={EOF:1,parseError:s(function(O,$){if(this.yy.parser)this.yy.parser.parseError(O,$);else throw new Error(O)},"parseError"),setInput:s(function(B,O){return this.yy=O||this.yy||{},this._input=B,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 B=this._input[0];this.yytext+=B,this.yyleng++,this.offset++,this.match+=B,this.matched+=B;var O=B.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),B},"input"),unput:s(function(B){var O=B.length,$=B.split(/(?:\r\n?|\n)/g);this._input=B+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-O),this.offset-=O;var G=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),$.length-1&&(this.yylineno-=$.length-1);var V=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:$?($.length===G.length?this.yylloc.first_column:0)+G[G.length-$.length].length-$[0].length:this.yylloc.first_column-O},this.options.ranges&&(this.yylloc.range=[V[0],V[0]+this.yyleng-O]),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(B){this.unput(this.match.slice(B))},"less"),pastInput:s(function(){var B=this.matched.substr(0,this.matched.length-this.match.length);return(B.length>20?"...":"")+B.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:s(function(){var B=this.match;return B.length<20&&(B+=this._input.substr(0,20-B.length)),(B.substr(0,20)+(B.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:s(function(){var B=this.pastInput(),O=new Array(B.length+1).join("-");return B+this.upcomingInput()+` +`+O+"^"},"showPosition"),test_match:s(function(B,O){var $,G,V;if(this.options.backtrack_lexer&&(V={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&&(V.yylloc.range=this.yylloc.range.slice(0))),G=B[0].match(/(?:\r\n?|\n).*/g),G&&(this.yylineno+=G.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:G?G[G.length-1].length-G[G.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+B[0].length},this.yytext+=B[0],this.match+=B[0],this.matches=B,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(B[0].length),this.matched+=B[0],$=this.performAction.call(this,this.yy,this,O,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),$)return $;if(this._backtrack){for(var z in V)this[z]=V[z];return!1}return!1},"test_match"),next:s(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var B,O,$,G;this._more||(this.yytext="",this.match="");for(var V=this._currentRules(),z=0;zO[0].length)){if(O=$,G=z,this.options.backtrack_lexer){if(B=this.test_match($,V[z]),B!==!1)return B;if(this._backtrack){O=!1;continue}else return!1}else if(!this.options.flex)break}return O?(B=this.test_match(O,V[G]),B!==!1?B:!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 O=this.next();return O||this.lex()},"lex"),begin:s(function(O){this.conditionStack.push(O)},"begin"),popState:s(function(){var O=this.conditionStack.length-1;return O>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(O){return O=this.conditionStack.length-1-Math.abs(O||0),O>=0?this.conditionStack[O]:"INITIAL"},"topState"),pushState:s(function(O){this.begin(O)},"pushState"),stateStackSize:s(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:s(function(O,$,G,V){var z=V;switch(G){case 0:break;case 1:break;case 2:return this.popState(),36;break;case 3:return this.popState(),36;break;case 4:return 36;case 5:break;case 6:return 10;case 7:return this.pushState("acc_title"),19;break;case 8:return this.popState(),"acc_title_value";break;case 9:return this.pushState("acc_descr"),21;break;case 10:return this.popState(),"acc_descr_value";break;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";break;case 18:return this.pushState("axis_data"),"Y_AXIS";break;case 19:return this.pushState("axis_band_data"),24;break;case 20:return 33;case 21:return this.pushState("data"),16;break;case 22:return this.pushState("data"),18;break;case 23:return this.pushState("data_inner"),24;break;case 24:return 29;case 25:return this.popState(),26;break;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 44;case 33:return"COLON";case 34:return 45;case 35:return 28;case 36:return 46;case 37:return 47;case 38:return 49;case 39:return 51;case 40:return 48;case 41:return 42;case 42:return 50;case 43:return 43;case 44:break;case 45:return 37;case 46:return 38}},"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 P})();E.lexer=I;function L(){this.yy={}}return s(L,"Parser"),L.prototype=E,E.Parser=L,new L})();tH.parser=tH;fRe=tH});function LC(e){return e.type==="bar"}function DC(e){return e.type==="band"}function lv(e){return e.type==="linear"}var IC=F(()=>{"use strict";s(LC,"isBarPlot");s(DC,"isBandAxisData");s(lv,"isLinearAxisData")});var Vf,B6=F(()=>{"use strict";qo();Vf=class{constructor(t){this.parentGroup=t}static{s(this,"TextDimensionCalculatorWithFont")}getMaxDimension(t,r){if(!this.parentGroup)return{width:t.reduce((a,o)=>Math.max(o.length,a),0)*r,height:r};let n={width:0,height:0},i=this.parentGroup.append("g").attr("visibility","hidden").attr("font-size",r);for(let a of t){let o=qie(i,1,a),l=o?o.width:a.length*r,u=o?o.height:r;n.width=Math.max(n.width,l),n.height=Math.max(n.height,u)}return i.remove(),n}}});var cv,rH=F(()=>{"use strict";cv=class{constructor(t,r,n,i){this.axisConfig=t;this.title=r;this.textDimensionCalculator=n;this.axisThemeConfig=i;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.normalizedLabelRotationInRad=0;this.range=[0,10],this.boundingRect={x:0,y:0,width:0,height:0},this.axisPosition="left",this.normalizedLabelRotationInRad=this.axisConfig.labelRotation>=-90&&this.axisConfig.labelRotation<=90?this.axisConfig.labelRotation*Math.PI/180:0}static{s(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(){let 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(){.7*this.getTickDistance()>this.outerPadding*2&&(this.outerPadding=Math.floor(.7*this.getTickDistance()/2)),this.recalculateScale()}calculateSpaceIfDrawnHorizontally(t){let r=t.height;if(this.axisConfig.showAxisLine&&r>this.axisConfig.axisLineWidth&&(r-=this.axisConfig.axisLineWidth,this.showAxisLine=!0),this.axisConfig.showLabel){let n=this.getLabelDimension(),i=.2*t.width;this.outerPadding=Math.min(n.width/2,i);let a=n.height;this.axisPosition==="bottom"&&this.normalizedLabelRotationInRad!==0&&(a=Math.max(a,Math.abs(Math.sin(this.normalizedLabelRotationInRad)*n.width)+Math.abs(Math.cos(this.normalizedLabelRotationInRad)*n.height))),a+=this.axisConfig.labelPadding*2,this.labelTextHeight=n.height,a<=r&&(r-=a,this.showLabel=!0)}if(this.axisConfig.showTick&&r>=this.axisConfig.tickLength&&(this.showTick=!0,r-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title){let n=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),i=n.height+this.axisConfig.titlePadding*2;this.titleTextHeight=n.height,i<=r&&(r-=i,this.showTitle=!0)}this.boundingRect.width=t.width,this.boundingRect.height=t.height-r}calculateSpaceIfDrawnVertical(t){let r=t.width;if(this.axisConfig.showAxisLine&&r>this.axisConfig.axisLineWidth&&(r-=this.axisConfig.axisLineWidth,this.showAxisLine=!0),this.axisConfig.showLabel){let n=this.getLabelDimension(),i=.2*t.height;this.outerPadding=Math.min(n.height/2,i);let a=n.width+this.axisConfig.labelPadding*2;a<=r&&(r-=a,this.showLabel=!0)}if(this.axisConfig.showTick&&r>=this.axisConfig.tickLength&&(this.showTick=!0,r-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title){let n=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),i=n.height+this.axisConfig.titlePadding*2;this.titleTextHeight=n.height,i<=r&&(r-=i,this.showTitle=!0)}this.boundingRect.width=t.width-r,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}calculateOffsetByRotation(t){let r=this.normalizedLabelRotationInRad;return r===0?0:Math.sin(r)*this.getLabelDimension()[t]/2}getDrawableElementsForLeftAxis(){let t=[];if(this.showAxisLine){let r=this.boundingRect.x+this.boundingRect.width-this.axisConfig.axisLineWidth/2;t.push({type:"path",groupTexts:["left-axis","axisl-line"],data:[{path:`M ${r},${this.boundingRect.y} L ${r},${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(r=>({text:r.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(r),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"middle",horizontalPos:"right"}))}),this.showTick){let r=this.boundingRect.x+this.boundingRect.width-(this.showAxisLine?this.axisConfig.axisLineWidth:0);t.push({type:"path",groupTexts:["left-axis","ticks"],data:this.getTickValues().map(n=>({path:`M ${r},${this.getScaleValue(n)} L ${r-this.axisConfig.tickLength},${this.getScaleValue(n)}`,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(){let t=[];if(this.showAxisLine){let r=this.boundingRect.y+this.axisConfig.axisLineWidth/2;t.push({type:"path",groupTexts:["bottom-axis","axis-line"],data:[{path:`M ${this.boundingRect.x},${r} L ${this.boundingRect.x+this.boundingRect.width},${r}`,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&t.push({type:"text",groupTexts:["bottom-axis","label"],data:this.getTickValues().map(r=>({text:r.toString(),x:this.getScaleValue(r)+this.calculateOffsetByRotation("height"),y:this.boundingRect.y+this.axisConfig.labelPadding+(this.showTick?this.axisConfig.tickLength:0)+(this.showAxisLine?this.axisConfig.axisLineWidth:0)+Math.abs(this.calculateOffsetByRotation("width")),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:this.normalizedLabelRotationInRad*180/Math.PI,verticalPos:"top",horizontalPos:"center"}))}),this.showTick){let r=this.boundingRect.y+(this.showAxisLine?this.axisConfig.axisLineWidth:0);t.push({type:"path",groupTexts:["bottom-axis","ticks"],data:this.getTickValues().map(n=>({path:`M ${this.getScaleValue(n)},${r} L ${this.getScaleValue(n)},${r+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(){let t=[];if(this.showAxisLine){let r=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},${r} L ${this.boundingRect.x+this.boundingRect.width},${r}`,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&t.push({type:"text",groupTexts:["top-axis","label"],data:this.getTickValues().map(r=>({text:r.toString(),x:this.getScaleValue(r),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){let r=this.boundingRect.y;t.push({type:"path",groupTexts:["top-axis","ticks"],data:this.getTickValues().map(n=>({path:`M ${this.getScaleValue(n)},${r+this.boundingRect.height-(this.showAxisLine?this.axisConfig.axisLineWidth:0)} L ${this.getScaleValue(n)},${r+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():[]}}});var $6,mRe=F(()=>{"use strict";$r();Tt();rH();$6=class extends cv{static{s(this,"BandAxis")}constructor(t,r,n,i,a){super(t,i,a,r),this.categories=n,this.scale=_0().domain(this.categories).range(this.getRange())}setRange(t){super.setRange(t)}recalculateScale(){this.scale=_0().domain(this.categories).range(this.getRange()).paddingInner(1).paddingOuter(0).align(.5),te.trace("BandAxis axis final categories, range: ",this.categories,this.getRange())}getTickValues(){return this.categories}getScaleValue(t){return this.scale(t)??this.getRange()[0]}}});var F6,gRe=F(()=>{"use strict";$r();rH();F6=class extends cv{static{s(this,"LinearAxis")}constructor(t,r,n,i,a){super(t,i,a,r),this.domain=n,this.scale=kl().domain(this.domain).range(this.getRange())}getTickValues(){return this.scale.ticks()}recalculateScale(){let t=[...this.domain];this.axisPosition==="left"&&t.reverse(),this.scale=kl().domain(t).range(this.getRange())}getScaleValue(t){return this.scale(t)}}});function nH(e,t,r,n){let i=new Vf(n);return DC(e)?new $6(t,r,e.categories,e.title,i):new F6(t,r,[e.min,e.max],e.title,i)}var yRe=F(()=>{"use strict";IC();B6();mRe();gRe();s(nH,"getAxis")});function vRe(e,t,r,n){let i=new Vf(n);return new iH(i,e,t,r)}var iH,xRe=F(()=>{"use strict";B6();iH=class{constructor(t,r,n,i){this.textDimensionCalculator=t;this.chartConfig=r;this.chartData=n;this.chartThemeConfig=i;this.boundingRect={x:0,y:0,width:0,height:0},this.showChartTitle=!1}static{s(this,"ChartTitle")}setBoundingBoxXY(t){this.boundingRect.x=t.x,this.boundingRect.y=t.y}calculateSpace(t){let r=this.textDimensionCalculator.getMaxDimension([this.chartData.title],this.chartConfig.titleFontSize),n=Math.max(r.width,t.width),i=r.height+2*this.chartConfig.titlePadding;return r.width<=n&&r.height<=i&&this.chartConfig.showTitle&&this.chartData.title&&(this.boundingRect.width=n,this.boundingRect.height=i,this.showChartTitle=!0),{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){let 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}};s(vRe,"getChartTitleComponent")});function bRe(e){return{fontSize:e,markerSize:e*rxt,markerSpacing:e*ixt,itemSpacing:e*nxt}}function TRe(e,t,r,n){let i=new Vf(n);return new aH(i,e,t,r)}var rxt,nxt,ixt,aH,CRe=F(()=>{"use strict";IC();B6();rxt=.75,nxt=.5,ixt=.35;s(bRe,"getLegendLayout");aH=class{constructor(t,r,n,i){this.textDimensionCalculator=t;this.chartConfig=r;this.chartData=n;this.chartThemeConfig=i;this.boundingRect={x:0,y:0,width:0,height:0};this.visiblePlots=[]}static{s(this,"ChartLegend")}setBoundingBoxXY(t){this.boundingRect.x=t.x,this.boundingRect.y=t.y}calculateSpace(t){if(this.visiblePlots=this.chartConfig.showLegend?this.chartData.plots.filter(h=>h.title):[],this.visiblePlots.length===0)return this.boundingRect.width=0,this.boundingRect.height=0,{width:0,height:0};let{fontSize:r,markerSize:n,markerSpacing:i,itemSpacing:a}=bRe(this.chartConfig.legendFontSize),o=this.textDimensionCalculator.getMaxDimension(this.visiblePlots.map(h=>h.title),r),l=this.chartConfig.legendPadding*2+n+i+o.width,u=this.chartConfig.legendPadding*2+this.visiblePlots.length*r+(this.visiblePlots.length-1)*a;return l<=t.width&&u<=t.height?(this.boundingRect.width=l,this.boundingRect.height=u):(this.visiblePlots=[],this.boundingRect.width=0,this.boundingRect.height=0),{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){if(this.visiblePlots.length===0)return[];let{fontSize:t,markerSize:r,markerSpacing:n,itemSpacing:i}=bRe(this.chartConfig.legendFontSize),a=t+i,o=this.boundingRect.x+this.chartConfig.legendPadding,l=this.boundingRect.y+this.chartConfig.legendPadding,u=[],h=[];for(let[d,f]of this.visiblePlots.entries())if(LC(f))u.push({x:o,y:l+d*a,width:r,height:r,fill:f.fill,strokeFill:f.fill,strokeWidth:0});else{let p=l+d*a+r/2;h.push({path:`M ${o},${p} L ${o+r},${p}`,strokeFill:f.strokeFill,strokeWidth:f.strokeWidth})}return[{groupTexts:["legend","markers"],type:"rect",data:u},{groupTexts:["legend","markers"],type:"path",data:h},{groupTexts:["legend","label"],type:"text",data:this.visiblePlots.map((d,f)=>({text:d.title,x:o+r+n,y:l+f*a+r/2,fill:this.chartThemeConfig.legendTextColor,fontSize:t,rotation:0,verticalPos:"middle",horizontalPos:"left"}))}]}};s(TRe,"getChartLegendComponent")});var G6,kRe=F(()=>{"use strict";$r();G6=class{constructor(t,r,n,i,a){this.plotData=t;this.xAxis=r;this.yAxis=n;this.orientation=i;this.plotIndex=a}static{s(this,"LinePlot")}getDrawableElement(){let t=this.plotData.data.map(i=>[this.xAxis.getScaleValue(i[0]),this.yAxis.getScaleValue(i[1])]),r;if(this.orientation==="horizontal"?r=Ou().y(i=>i[0]).x(i=>i[1])(t):r=Ou().x(i=>i[0]).y(i=>i[1])(t),!r)return[];let n=[{groupTexts:["plot",`line-plot-${this.plotIndex}`],type:"path",data:[{path:r,strokeFill:this.plotData.strokeFill,strokeWidth:this.plotData.strokeWidth}]}];if(this.plotData.pointLabels&&this.plotData.pointLabels.length>0){let o=[];for(let[l,[u,h]]of t.entries()){let d=this.plotData.pointLabels[l];d&&(this.orientation==="horizontal"?o.push({x:h+10,y:u,text:d,fill:this.plotData.strokeFill,verticalPos:"middle",horizontalPos:"left",fontSize:12,rotation:0}):o.push({x:u,y:h-10,text:d,fill:this.plotData.strokeFill,verticalPos:"middle",horizontalPos:"center",fontSize:12,rotation:0}))}o.length>0&&n.push({groupTexts:["plot",`line-plot-${this.plotIndex}`,"labels"],type:"text",data:o})}return n}}});var z6,wRe=F(()=>{"use strict";z6=class{constructor(t,r,n,i,a,o){this.barData=t;this.boundingRect=r;this.xAxis=n;this.yAxis=i;this.orientation=a;this.plotIndex=o}static{s(this,"BarPlot")}getDrawableElement(){let t=this.barData.data.map(a=>[this.xAxis.getScaleValue(a[0]),this.yAxis.getScaleValue(a[1])]),n=Math.min(this.xAxis.getAxisOuterPadding()*2,this.xAxis.getTickDistance())*(1-.05),i=n/2;return this.orientation==="horizontal"?[{groupTexts:["plot",`bar-plot-${this.plotIndex}`],type:"rect",data:t.map(a=>({x:this.boundingRect.x,y:a[0]-i,height:n,width:a[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(a=>({x:a[0]-i,y:a[1],width:n,height:this.boundingRect.y+this.boundingRect.height-a[1],fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill}))}]}}});function SRe(e,t,r){return new sH(e,t,r)}var sH,ERe=F(()=>{"use strict";kRe();wRe();sH=class{constructor(t,r,n){this.chartConfig=t;this.chartData=r;this.chartThemeConfig=n;this.boundingRect={x:0,y:0,width:0,height:0}}static{s(this,"BasePlot")}setAxes(t,r){this.xAxis=t,this.yAxis=r}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");let t=[];for(let[r,n]of this.chartData.plots.entries())switch(n.type){case"line":{let i=new G6(n,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,r);t.push(...i.getDrawableElement())}break;case"bar":{let i=new z6(n,this.boundingRect,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,r);t.push(...i.getDrawableElement())}break}return t}};s(SRe,"getPlotComponent")});var V6,ARe=F(()=>{"use strict";yRe();xRe();CRe();ERe();IC();V6=class{constructor(t,r,n,i){this.chartConfig=t;this.chartData=r;this.componentStore={title:vRe(t,r,n,i),plot:SRe(t,r,n),legend:TRe(t,r,n,i),xAxis:nH(r.xAxis,t.xAxis,{titleColor:n.xAxisTitleColor,labelColor:n.xAxisLabelColor,tickColor:n.xAxisTickColor,axisLineColor:n.xAxisLineColor},i),yAxis:nH(r.yAxis,t.yAxis,{titleColor:n.yAxisTitleColor,labelColor:n.yAxisLabelColor,tickColor:n.yAxisTickColor,axisLineColor:n.yAxisLineColor},i)}}static{s(this,"Orchestrator")}calculateVerticalSpace(){let t=this.chartConfig.width,r=this.chartConfig.height,n=0,i=0,a={width:0,height:0},o=Math.floor(t*this.chartConfig.plotReservedSpacePercent/100),l=Math.floor(r*this.chartConfig.plotReservedSpacePercent/100),u=this.componentStore.plot.calculateSpace({width:o,height:l});t-=u.width,r-=u.height,u=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:r}),i=u.height,r-=u.height,this.componentStore.xAxis.setAxisPosition("bottom"),u=this.componentStore.xAxis.calculateSpace({width:t,height:r}),r-=u.height,this.componentStore.yAxis.setAxisPosition("left"),u=this.componentStore.yAxis.calculateSpace({width:t,height:r}),n=u.width,t-=u.width,a=this.componentStore.legend.calculateSpace({width:t,height:l}),t-=a.width,t>0&&(o+=t,t=0),r>0&&(l+=r,r=0),this.componentStore.plot.calculateSpace({width:o,height:l}),this.componentStore.plot.setBoundingBoxXY({x:n,y:i}),this.componentStore.legend.setBoundingBoxXY({x:n+o,y:i+Math.max((l-a.height)/2,0)}),this.componentStore.xAxis.setRange([n,n+o]),this.componentStore.xAxis.setBoundingBoxXY({x:n,y:i+l}),this.componentStore.yAxis.setRange([i,i+l]),this.componentStore.yAxis.setBoundingBoxXY({x:0,y:i}),this.chartData.plots.some(h=>LC(h))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateHorizontalSpace(){let t=this.chartConfig.width,r=this.chartConfig.height,n=0,i=0,a=0,o={width:0,height:0},l=Math.floor(t*this.chartConfig.plotReservedSpacePercent/100),u=Math.floor(r*this.chartConfig.plotReservedSpacePercent/100),h=this.componentStore.plot.calculateSpace({width:l,height:u});t-=h.width,r-=h.height,h=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:r}),n=h.height,r-=h.height,this.componentStore.xAxis.setAxisPosition("left"),h=this.componentStore.xAxis.calculateSpace({width:t,height:r}),t-=h.width,i=h.width,this.componentStore.yAxis.setAxisPosition("top"),h=this.componentStore.yAxis.calculateSpace({width:t,height:r}),r-=h.height,a=n+h.height,o=this.componentStore.legend.calculateSpace({width:t,height:u}),t-=o.width,t>0&&(l+=t,t=0),r>0&&(u+=r,r=0),this.componentStore.plot.calculateSpace({width:l,height:u}),this.componentStore.plot.setBoundingBoxXY({x:i,y:a}),this.componentStore.legend.setBoundingBoxXY({x:i+l,y:a+Math.max((u-o.height)/2,0)}),this.componentStore.yAxis.setRange([i,i+l]),this.componentStore.yAxis.setBoundingBoxXY({x:i,y:n}),this.componentStore.xAxis.setRange([a,a+u]),this.componentStore.xAxis.setBoundingBoxXY({x:0,y:a}),this.chartData.plots.some(d=>LC(d))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateSpace(){this.chartConfig.chartOrientation==="horizontal"?this.calculateHorizontalSpace():this.calculateVerticalSpace()}getDrawableElement(){this.calculateSpace();let t=[];this.componentStore.plot.setAxes(this.componentStore.xAxis,this.componentStore.yAxis);for(let r of Object.values(this.componentStore))t.push(...r.getDrawableElements());return t}}});var W6,RRe=F(()=>{"use strict";ARe();W6=class{static{s(this,"XYChartBuilder")}static build(t,r,n,i){return new V6(t,r,n,i).getDrawableElement()}}});function LRe(){let e=ia(),t=Lt();return Fr(e.xyChart,t.themeVariables.xyChart)}function DRe(){let e=Lt();return Fr(hr.xyChart,e.xyChart)}function IRe(){return{yAxis:{type:"linear",title:"",min:1/0,max:-1/0},xAxis:{type:"band",title:"",categories:[]},title:"",plots:[]}}function uv(e){let t=Lt();return vr(e.trim(),t)}function axt(e){_Re=e}function sxt(e){e==="horizontal"?NC.chartOrientation="horizontal":NC.chartOrientation="vertical"}function oxt(e){ln.xAxis.title=uv(e.text)}function MRe(e,t){ln.xAxis={type:"linear",title:ln.xAxis.title,min:e,max:t},q6=!0}function lxt(e){ln.xAxis={type:"band",title:ln.xAxis.title,categories:e.map(t=>uv(t.text))},q6=!0}function cxt(e){ln.yAxis.title=uv(e.text)}function uxt(e,t){ln.yAxis={type:"linear",title:ln.yAxis.title,min:e,max:t},lH=!0}function hxt(e){let t=Math.min(...e),r=Math.max(...e),n=lv(ln.yAxis)?ln.yAxis.min:1/0,i=lv(ln.yAxis)?ln.yAxis.max:-1/0;ln.yAxis={type:"linear",title:ln.yAxis.title,min:Math.min(n,t),max:Math.max(i,r)}}function NRe(e){let t=[];if(e.length===0)return t;if(!q6){let r=lv(ln.xAxis)?ln.xAxis.min:1/0,n=lv(ln.xAxis)?ln.xAxis.max:-1/0;MRe(Math.min(r,1),Math.max(n,e.length))}if(DC(ln.xAxis)&&e.length>ln.xAxis.categories.length&&(e=e.slice(0,ln.xAxis.categories.length)),lH||hxt(e),DC(ln.xAxis)&&(t=ln.xAxis.categories.map((r,n)=>[r,e[n]])),lv(ln.xAxis)){let r=ln.xAxis.min,n=ln.xAxis.max,i=(n-r)/(e.length-1),a=[];for(let o=r;o<=n;o+=i)a.push(`${o}`);t=a.map((o,l)=>[o,e[l]])}return t}function PRe(e){return oH[e===0?0:e%oH.length]}function dxt(e,t){let r=t.map(o=>o.value),n=t.map(o=>o.label?uv(o.label):""),i=NRe(r),a=n.some(o=>o!=="");ln.plots.push({type:"line",title:uv(e.text),strokeFill:PRe(MC),strokeWidth:2,data:i,...a?{pointLabels:n}:{}}),MC++}function fxt(e,t){let r=t.map(i=>i.value),n=NRe(r);ln.plots.push({type:"bar",title:uv(e.text),fill:PRe(MC),data:n}),MC++}function pxt(){if(ln.plots.length===0)throw Error("No Plot to render, please provide a plot with some data");return ln.title=Rr(),W6.build(NC,ln,PC,_Re)}function mxt(){return PC}function gxt(){return NC}function yxt(){return ln}var MC,_Re,NC,PC,ln,oH,q6,lH,vxt,ORe,BRe=F(()=>{"use strict";mr();Ni();ec();Qt();Gr();An();RRe();IC();MC=0,NC=DRe(),PC=LRe(),ln=IRe(),oH=PC.plotColorPalette.split(",").map(e=>e.trim()),q6=!1,lH=!1;s(LRe,"getChartDefaultThemeConfig");s(DRe,"getChartDefaultConfig");s(IRe,"getChartDefaultData");s(uv,"textSanitizer");s(axt,"setTmpSVGG");s(sxt,"setOrientation");s(oxt,"setXAxisTitle");s(MRe,"setXAxisRangeData");s(lxt,"setXAxisBand");s(cxt,"setYAxisTitle");s(uxt,"setYAxisRangeData");s(hxt,"setYAxisRangeFromPlotData");s(NRe,"transformDataWithoutCategory");s(PRe,"getPlotColorFromPalette");s(dxt,"setLineData");s(fxt,"setBarData");s(pxt,"getDrawableElem");s(mxt,"getChartThemeConfig");s(gxt,"getChartConfig");s(yxt,"getXYChartData");vxt=s(function(){gr(),MC=0,NC=DRe(),ln=IRe(),PC=LRe(),oH=PC.plotColorPalette.split(",").map(e=>e.trim()),q6=!1,lH=!1},"clear"),ORe={getDrawableElem:pxt,clear:vxt,setAccTitle:Cr,getAccTitle:Sr,setDiagramTitle:Mr,getDiagramTitle:Rr,getAccDescription:Ar,setAccDescription:Er,setOrientation:sxt,setXAxisTitle:oxt,setXAxisRangeData:MRe,setXAxisBand:lxt,setYAxisTitle:cxt,setYAxisRangeData:uxt,setLineData:dxt,setBarData:fxt,setTmpSVGG:axt,getChartThemeConfig:mxt,getChartConfig:gxt,getXYChartData:yxt}});var xxt,$Re,FRe=F(()=>{"use strict";Tt();Ba();Dn();xxt=s((e,t,r,n)=>{let i=n.db,a=i.getChartThemeConfig(),o=i.getChartConfig(),l=i.getXYChartData().plots[0].data.map(T=>T[1]);function u(T){return T==="top"?"text-before-edge":"middle"}s(u,"getDominantBaseLine");function h(T){return T==="left"?"start":T==="right"?"end":"middle"}s(h,"getTextAnchor");function d(T){return`translate(${T.x}, ${T.y}) rotate(${T.rotation||0})`}s(d,"getTextTransformation"),te.debug(`Rendering xychart chart +`+e);let f=pn(t),p=f.append("g").attr("class","main"),m=p.append("rect").attr("width",o.width).attr("height",o.height).attr("class","background");Br(f,o.height,o.width,!0),f.attr("viewBox",`0 0 ${o.width} ${o.height}`),m.attr("fill",a.backgroundColor),i.setTmpSVGG(f.append("g").attr("class","mermaid-tmp-group"));let g=i.getDrawableElem(),y={};function v(T){let w=p,C="";for(let[k]of T.entries()){let S=p;k>0&&y[C]&&(S=y[C]),C+=T[k],w=y[C],w||(w=y[C]=S.append("g").attr("class",T[k]))}return w}s(v,"getGroup");for(let T of g){if(T.data.length===0)continue;let w=v(T.groupTexts);switch(T.type){case"rect":if(w.selectAll("rect").data(T.data).enter().append("rect").attr("x",C=>C.x).attr("y",C=>C.y).attr("width",C=>C.width).attr("height",C=>C.height).attr("fill",C=>C.fill).attr("stroke",C=>C.strokeFill).attr("stroke-width",C=>C.strokeWidth),o.showDataLabel){let C=o.showDataLabelOutsideBar;if(o.chartOrientation==="horizontal"){let M=function(E,I){let{data:L,label:P}=E;return I*P.length*.7<=L.width-10};var x=M;s(M,"fitsHorizontally");let k=.7,S=10,A=T.data.map((E,I)=>({data:E,label:l[I].toString()})).filter(E=>E.data.width>0&&E.data.height>0),N=A.map(E=>{let{data:I}=E,L=I.height*.7;for(;!M(E,L)&&L>0;)L-=1;return L}),D=Math.floor(Math.min(...N)),R=s(E=>C?E.data.x+E.data.width+10:E.data.x+E.data.width-10,"determineLabelXPosition");w.selectAll("text").data(A).enter().append("text").attr("x",R).attr("y",E=>E.data.y+E.data.height/2).attr("text-anchor",C?"start":"end").attr("dominant-baseline","middle").attr("fill",a.dataLabelColor).attr("font-size",`${D}px`).text(E=>E.label)}else{let A=function(R,E,I){let{data:L,label:P}=R,O=E*P.length*.7,$=L.x+L.width/2,G=$-O/2,V=$+O/2,z=G>=L.x&&V<=L.x+L.width,W=L.y+I+E<=L.y+L.height;return z&&W};var b=A;s(A,"fitsInBar");let k=10,S=T.data.map((R,E)=>({data:R,label:l[E].toString()})).filter(R=>R.data.width>0&&R.data.height>0),M=S.map(R=>{let{data:E,label:I}=R,L=E.width/(I.length*.7);for(;!A(R,L,10)&&L>0;)L-=1;return L}),N=Math.floor(Math.min(...M)),D=s(R=>C?R.data.y-10:R.data.y+10,"determineLabelYPosition");w.selectAll("text").data(S).enter().append("text").attr("x",R=>R.data.x+R.data.width/2).attr("y",D).attr("text-anchor","middle").attr("dominant-baseline",C?"auto":"hanging").attr("fill",a.dataLabelColor).attr("font-size",`${N}px`).text(R=>R.label)}}break;case"text":w.selectAll("text").data(T.data).enter().append("text").attr("x",0).attr("y",0).attr("fill",C=>C.fill).attr("font-size",C=>C.fontSize).attr("dominant-baseline",C=>u(C.verticalPos)).attr("text-anchor",C=>h(C.horizontalPos)).attr("transform",C=>d(C)).text(C=>C.text);break;case"path":w.selectAll("path").data(T.data).enter().append("path").attr("d",C=>C.path).attr("fill",C=>C.fill?C.fill:"none").attr("stroke",C=>C.strokeFill).attr("stroke-width",C=>C.strokeWidth);break}}},"draw"),$Re={draw:xxt}});var GRe={};ar(GRe,{diagram:()=>bxt});var bxt,zRe=F(()=>{"use strict";pRe();BRe();FRe();bxt={parser:fRe,db:ORe,renderer:$Re}});var cH,qRe,HRe=F(()=>{"use strict";cH=(function(){var e=s(function(re,ce,q,de){for(q=q||{},de=re.length;de--;q[re[de]]=ce);return q},"o"),t=[1,3],r=[1,4],n=[1,5],i=[1,6],a=[5,6,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],o=[1,22],l=[2,7],u=[1,26],h=[1,27],d=[1,28],f=[1,29],p=[1,33],m=[1,34],g=[1,35],y=[1,36],v=[1,37],x=[1,38],b=[1,24],T=[1,31],w=[1,32],C=[1,30],k=[1,39],S=[1,40],A=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],M=[1,61],N=[89,90],D=[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],R=[27,29],E=[1,70],I=[1,71],L=[1,72],P=[1,73],B=[1,74],O=[1,75],$=[1,76],G=[1,83],V=[1,80],z=[1,84],W=[1,85],H=[1,86],j=[1,87],Q=[1,88],U=[1,89],ue=[1,90],J=[1,91],he=[1,92],se=[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],oe=[63,64],Se=[1,101],xe=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,76,77,89,90],Ne=[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],Ye=[1,110],We=[1,106],pe=[1,107],_e=[1,108],Ee=[1,109],Re=[1,111],Z=[1,116],ae=[1,117],ie=[1,114],le=[1,115],ve={trace:s(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:s(function(ce,q,de,X,ye,K,Ge){var Ae=K.length-1;switch(ye){case 4:this.$=K[Ae].trim(),X.setAccTitle(this.$);break;case 5:case 6:this.$=K[Ae].trim(),X.setAccDescription(this.$);break;case 7:this.$=[];break;case 17:X.setDirection("TB");break;case 18:X.setDirection("BT");break;case 19:X.setDirection("RL");break;case 20:X.setDirection("LR");break;case 21:X.addRequirement(K[Ae-3],K[Ae-4]);break;case 22:X.addRequirement(K[Ae-5],K[Ae-6]),X.setClass([K[Ae-5]],K[Ae-3]);break;case 23:X.setNewReqId(K[Ae-2]);break;case 24:X.setNewReqText(K[Ae-2]);break;case 25:X.setNewReqRisk(K[Ae-2]);break;case 26:X.setNewReqVerifyMethod(K[Ae-2]);break;case 29:this.$=X.RequirementType.REQUIREMENT;break;case 30:this.$=X.RequirementType.FUNCTIONAL_REQUIREMENT;break;case 31:this.$=X.RequirementType.INTERFACE_REQUIREMENT;break;case 32:this.$=X.RequirementType.PERFORMANCE_REQUIREMENT;break;case 33:this.$=X.RequirementType.PHYSICAL_REQUIREMENT;break;case 34:this.$=X.RequirementType.DESIGN_CONSTRAINT;break;case 35:this.$=X.RiskLevel.LOW_RISK;break;case 36:this.$=X.RiskLevel.MED_RISK;break;case 37:this.$=X.RiskLevel.HIGH_RISK;break;case 38:this.$=X.VerifyType.VERIFY_ANALYSIS;break;case 39:this.$=X.VerifyType.VERIFY_DEMONSTRATION;break;case 40:this.$=X.VerifyType.VERIFY_INSPECTION;break;case 41:this.$=X.VerifyType.VERIFY_TEST;break;case 42:X.addElement(K[Ae-3]);break;case 43:X.addElement(K[Ae-5]),X.setClass([K[Ae-5]],K[Ae-3]);break;case 44:X.setNewElementType(K[Ae-2]);break;case 45:X.setNewElementDocRef(K[Ae-2]);break;case 48:X.addRelationship(K[Ae-2],K[Ae],K[Ae-4]);break;case 49:X.addRelationship(K[Ae-2],K[Ae-4],K[Ae]);break;case 50:this.$=X.Relationships.CONTAINS;break;case 51:this.$=X.Relationships.COPIES;break;case 52:this.$=X.Relationships.DERIVES;break;case 53:this.$=X.Relationships.SATISFIES;break;case 54:this.$=X.Relationships.VERIFIES;break;case 55:this.$=X.Relationships.REFINES;break;case 56:this.$=X.Relationships.TRACES;break;case 57:this.$=K[Ae-2],X.defineClass(K[Ae-1],K[Ae]);break;case 58:X.setClass(K[Ae-1],K[Ae]);break;case 59:X.setClass([K[Ae-2]],K[Ae]);break;case 60:case 62:this.$=[K[Ae]];break;case 61:case 63:this.$=K[Ae-2].concat([K[Ae]]);break;case 64:this.$=K[Ae-2],X.setCssStyle(K[Ae-1],K[Ae]);break;case 65:this.$=[K[Ae]];break;case 66:K[Ae-2].push(K[Ae]),this.$=K[Ae-2];break;case 68:this.$=K[Ae-1]+K[Ae];break}},"anonymous"),table:[{3:1,4:2,6:t,9:r,11:n,13:i},{1:[3]},{3:8,4:2,5:[1,7],6:t,9:r,11:n,13:i},{5:[1,9]},{10:[1,10]},{12:[1,11]},e(a,[2,6]),{3:12,4:2,6:t,9:r,11:n,13:i},{1:[2,2]},{4:17,5:o,7:13,8:l,9:r,11:n,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:u,22:h,23:d,24:f,25:23,33:25,41:p,42:m,43:g,44:y,45:v,46:x,54:b,72:T,74:w,77:C,89:k,90:S},e(a,[2,4]),e(a,[2,5]),{1:[2,1]},{8:[1,41]},{4:17,5:o,7:42,8:l,9:r,11:n,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:u,22:h,23:d,24:f,25:23,33:25,41:p,42:m,43:g,44:y,45:v,46:x,54:b,72:T,74:w,77:C,89:k,90:S},{4:17,5:o,7:43,8:l,9:r,11:n,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:u,22:h,23:d,24:f,25:23,33:25,41:p,42:m,43:g,44:y,45:v,46:x,54:b,72:T,74:w,77:C,89:k,90:S},{4:17,5:o,7:44,8:l,9:r,11:n,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:u,22:h,23:d,24:f,25:23,33:25,41:p,42:m,43:g,44:y,45:v,46:x,54:b,72:T,74:w,77:C,89:k,90:S},{4:17,5:o,7:45,8:l,9:r,11:n,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:u,22:h,23:d,24:f,25:23,33:25,41:p,42:m,43:g,44:y,45:v,46:x,54:b,72:T,74:w,77:C,89:k,90:S},{4:17,5:o,7:46,8:l,9:r,11:n,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:u,22:h,23:d,24:f,25:23,33:25,41:p,42:m,43:g,44:y,45:v,46:x,54:b,72:T,74:w,77:C,89:k,90:S},{4:17,5:o,7:47,8:l,9:r,11:n,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:u,22:h,23:d,24:f,25:23,33:25,41:p,42:m,43:g,44:y,45:v,46:x,54:b,72:T,74:w,77:C,89:k,90:S},{4:17,5:o,7:48,8:l,9:r,11:n,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:u,22:h,23:d,24:f,25:23,33:25,41:p,42:m,43:g,44:y,45:v,46:x,54:b,72:T,74:w,77:C,89:k,90:S},{4:17,5:o,7:49,8:l,9:r,11:n,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:u,22:h,23:d,24:f,25:23,33:25,41:p,42:m,43:g,44:y,45:v,46:x,54:b,72:T,74:w,77:C,89:k,90:S},{4:17,5:o,7:50,8:l,9:r,11:n,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:u,22:h,23:d,24:f,25:23,33:25,41:p,42:m,43:g,44:y,45:v,46:x,54:b,72:T,74:w,77:C,89:k,90:S},{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(A,[2,17]),e(A,[2,18]),e(A,[2,19]),e(A,[2,20]),{30:60,33:62,75:M,89:k,90:S},{30:63,33:62,75:M,89:k,90:S},{30:64,33:62,75:M,89:k,90:S},e(N,[2,29]),e(N,[2,30]),e(N,[2,31]),e(N,[2,32]),e(N,[2,33]),e(N,[2,34]),e(D,[2,81]),e(D,[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(R,[2,79]),e(R,[2,80]),{27:[1,67],29:[1,68]},e(R,[2,85]),e(R,[2,86]),{62:69,65:E,66:I,67:L,68:P,69:B,70:O,71:$},{62:77,65:E,66:I,67:L,68:P,69:B,70:O,71:$},{30:78,33:62,75:M,89:k,90:S},{73:79,75:G,76:V,78:81,79:82,80:z,81:W,82:H,83:j,84:Q,85:U,86:ue,87:J,88:he},e(se,[2,60]),e(se,[2,62]),{73:93,75:G,76:V,78:81,79:82,80:z,81:W,82:H,83:j,84:Q,85:U,86:ue,87:J,88:he},{30:94,33:62,75:M,76:V,89:k,90:S},{5:[1,95]},{30:96,33:62,75:M,89:k,90:S},{5:[1,97]},{30:98,33:62,75:M,89:k,90:S},{63:[1,99]},e(oe,[2,50]),e(oe,[2,51]),e(oe,[2,52]),e(oe,[2,53]),e(oe,[2,54]),e(oe,[2,55]),e(oe,[2,56]),{64:[1,100]},e(A,[2,59],{76:V}),e(A,[2,64],{76:Se}),{33:103,75:[1,102],89:k,90:S},e(xe,[2,65],{79:104,75:G,80:z,81:W,82:H,83:j,84:Q,85:U,86:ue,87:J,88:he}),e(Ne,[2,67]),e(Ne,[2,69]),e(Ne,[2,70]),e(Ne,[2,71]),e(Ne,[2,72]),e(Ne,[2,73]),e(Ne,[2,74]),e(Ne,[2,75]),e(Ne,[2,76]),e(Ne,[2,77]),e(Ne,[2,78]),e(A,[2,57],{76:Se}),e(A,[2,58],{76:V}),{5:Ye,28:105,31:We,34:pe,36:_e,38:Ee,40:Re},{27:[1,112],76:V},{5:Z,40:ae,56:113,57:ie,59:le},{27:[1,118],76:V},{33:119,89:k,90:S},{33:120,89:k,90:S},{75:G,78:121,79:82,80:z,81:W,82:H,83:j,84:Q,85:U,86:ue,87:J,88:he},e(se,[2,61]),e(se,[2,63]),e(Ne,[2,68]),e(A,[2,21]),{32:[1,122]},{32:[1,123]},{32:[1,124]},{32:[1,125]},{5:Ye,28:126,31:We,34:pe,36:_e,38:Ee,40:Re},e(A,[2,28]),{5:[1,127]},e(A,[2,42]),{32:[1,128]},{32:[1,129]},{5:Z,40:ae,56:130,57:ie,59:le},e(A,[2,47]),{5:[1,131]},e(A,[2,48]),e(A,[2,49]),e(xe,[2,66],{79:104,75:G,80:z,81:W,82:H,83:j,84:Q,85:U,86:ue,87:J,88:he}),{33:132,89:k,90:S},{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(A,[2,27]),{5:Ye,28:145,31:We,34:pe,36:_e,38:Ee,40:Re},{58:146,89:[1,147],90:[1,148]},{60:149,89:[1,150],90:[1,151]},e(A,[2,46]),{5:Z,40:ae,56:152,57:ie,59:le},{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(A,[2,22]),{5:[1,157]},{5:[2,87]},{5:[2,88]},{5:[1,158]},{5:[2,89]},{5:[2,90]},e(A,[2,43]),{5:Ye,28:159,31:We,34:pe,36:_e,38:Ee,40:Re},{5:Ye,28:160,31:We,34:pe,36:_e,38:Ee,40:Re},{5:Ye,28:161,31:We,34:pe,36:_e,38:Ee,40:Re},{5:Ye,28:162,31:We,34:pe,36:_e,38:Ee,40:Re},{5:Z,40:ae,56:163,57:ie,59:le},{5:Z,40:ae,56:164,57:ie,59:le},e(A,[2,23]),e(A,[2,24]),e(A,[2,25]),e(A,[2,26]),e(A,[2,44]),e(A,[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:s(function(ce,q){if(q.recoverable)this.trace(ce);else{var de=new Error(ce);throw de.hash=q,de}},"parseError"),parse:s(function(ce){var q=this,de=[0],X=[],ye=[null],K=[],Ge=this.table,Ae="",$e=0,Oe=0,at=0,Pe=2,Ke=1,qe=K.slice.call(arguments,1),Be=Object.create(this.lexer),Xe={yy:{}};for(var be in this.yy)Object.prototype.hasOwnProperty.call(this.yy,be)&&(Xe.yy[be]=this.yy[be]);Be.setInput(ce,Xe.yy),Xe.yy.lexer=Be,Xe.yy.parser=this,typeof Be.yylloc>"u"&&(Be.yylloc={});var vt=Be.yylloc;K.push(vt);var ke=Be.options&&Be.options.ranges;typeof Xe.yy.parseError=="function"?this.parseError=Xe.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function It(Gt){de.length=de.length-2*Gt,ye.length=ye.length-Gt,K.length=K.length-Gt}s(It,"popStack");function Ft(){var Gt;return Gt=X.pop()||Be.lex()||Ke,typeof Gt!="number"&&(Gt instanceof Array&&(X=Gt,Gt=X.pop()),Gt=q.symbols_[Gt]||Gt),Gt}s(Ft,"lex");for(var yt,Et,gt,ge,nt,pt,Qe={},we,tt,st,mt;;){if(gt=de[de.length-1],this.defaultActions[gt]?ge=this.defaultActions[gt]:((yt===null||typeof yt>"u")&&(yt=Ft()),ge=Ge[gt]&&Ge[gt][yt]),typeof ge>"u"||!ge.length||!ge[0]){var Bt="";mt=[];for(we in Ge[gt])this.terminals_[we]&&we>Pe&&mt.push("'"+this.terminals_[we]+"'");Be.showPosition?Bt="Parse error on line "+($e+1)+`: +`+Be.showPosition()+` +Expecting `+mt.join(", ")+", got '"+(this.terminals_[yt]||yt)+"'":Bt="Parse error on line "+($e+1)+": Unexpected "+(yt==Ke?"end of input":"'"+(this.terminals_[yt]||yt)+"'"),this.parseError(Bt,{text:Be.match,token:this.terminals_[yt]||yt,line:Be.yylineno,loc:vt,expected:mt})}if(ge[0]instanceof Array&&ge.length>1)throw new Error("Parse Error: multiple actions possible at state: "+gt+", token: "+yt);switch(ge[0]){case 1:de.push(yt),ye.push(Be.yytext),K.push(Be.yylloc),de.push(ge[1]),yt=null,Et?(yt=Et,Et=null):(Oe=Be.yyleng,Ae=Be.yytext,$e=Be.yylineno,vt=Be.yylloc,at>0&&at--);break;case 2:if(tt=this.productions_[ge[1]][1],Qe.$=ye[ye.length-tt],Qe._$={first_line:K[K.length-(tt||1)].first_line,last_line:K[K.length-1].last_line,first_column:K[K.length-(tt||1)].first_column,last_column:K[K.length-1].last_column},ke&&(Qe._$.range=[K[K.length-(tt||1)].range[0],K[K.length-1].range[1]]),pt=this.performAction.apply(Qe,[Ae,Oe,$e,Xe.yy,ge[1],ye,K].concat(qe)),typeof pt<"u")return pt;tt&&(de=de.slice(0,-1*tt*2),ye=ye.slice(0,-1*tt),K=K.slice(0,-1*tt)),de.push(this.productions_[ge[1]][0]),ye.push(Qe.$),K.push(Qe._$),st=Ge[de[de.length-2]][de[de.length-1]],de.push(st);break;case 3:return!0}}return!0},"parse")},ne=(function(){var re={EOF:1,parseError:s(function(q,de){if(this.yy.parser)this.yy.parser.parseError(q,de);else throw new Error(q)},"parseError"),setInput:s(function(ce,q){return this.yy=q||this.yy||{},this._input=ce,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 ce=this._input[0];this.yytext+=ce,this.yyleng++,this.offset++,this.match+=ce,this.matched+=ce;var q=ce.match(/(?:\r\n?|\n).*/g);return q?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),ce},"input"),unput:s(function(ce){var q=ce.length,de=ce.split(/(?:\r\n?|\n)/g);this._input=ce+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-q),this.offset-=q;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),de.length-1&&(this.yylineno-=de.length-1);var ye=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:de?(de.length===X.length?this.yylloc.first_column:0)+X[X.length-de.length].length-de[0].length:this.yylloc.first_column-q},this.options.ranges&&(this.yylloc.range=[ye[0],ye[0]+this.yyleng-q]),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(ce){this.unput(this.match.slice(ce))},"less"),pastInput:s(function(){var ce=this.matched.substr(0,this.matched.length-this.match.length);return(ce.length>20?"...":"")+ce.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:s(function(){var ce=this.match;return ce.length<20&&(ce+=this._input.substr(0,20-ce.length)),(ce.substr(0,20)+(ce.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:s(function(){var ce=this.pastInput(),q=new Array(ce.length+1).join("-");return ce+this.upcomingInput()+` +`+q+"^"},"showPosition"),test_match:s(function(ce,q){var de,X,ye;if(this.options.backtrack_lexer&&(ye={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&&(ye.yylloc.range=this.yylloc.range.slice(0))),X=ce[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+ce[0].length},this.yytext+=ce[0],this.match+=ce[0],this.matches=ce,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(ce[0].length),this.matched+=ce[0],de=this.performAction.call(this,this.yy,this,q,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),de)return de;if(this._backtrack){for(var K in ye)this[K]=ye[K];return!1}return!1},"test_match"),next:s(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var ce,q,de,X;this._more||(this.yytext="",this.match="");for(var ye=this._currentRules(),K=0;Kq[0].length)){if(q=de,X=K,this.options.backtrack_lexer){if(ce=this.test_match(de,ye[K]),ce!==!1)return ce;if(this._backtrack){q=!1;continue}else return!1}else if(!this.options.flex)break}return q?(ce=this.test_match(q,ye[X]),ce!==!1?ce:!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 q=this.next();return q||this.lex()},"lex"),begin:s(function(q){this.conditionStack.push(q)},"begin"),popState:s(function(){var q=this.conditionStack.length-1;return q>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(q){return q=this.conditionStack.length-1-Math.abs(q||0),q>=0?this.conditionStack[q]:"INITIAL"},"topState"),pushState:s(function(q){this.begin(q)},"pushState"),stateStackSize:s(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:s(function(q,de,X,ye){var K=ye;switch(X){case 0:return"title";case 1:return this.begin("acc_title"),9;break;case 2:return this.popState(),"acc_title_value";break;case 3:return this.begin("acc_descr"),11;break;case 4:return this.popState(),"acc_descr_value";break;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;break;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;break;case 60:return this.begin("style"),74;break;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 de.yytext=de.yytext.trim(),89;break;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 re})();ve.lexer=ne;function Me(){this.yy={}}return s(Me,"Parser"),Me.prototype=ve,ve.Parser=Me,new Me})();cH.parser=cH;qRe=cH});var H6,URe=F(()=>{"use strict";Zt();Tt();An();H6=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=Cr;this.getAccTitle=Sr;this.setAccDescription=Er;this.getAccDescription=Ar;this.setDiagramTitle=Mr;this.getDiagramTitle=Rr;this.getConfig=s(()=>Le().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{s(this,"RequirementDB")}getDirection(){return this.direction}setDirection(t){this.direction=t}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(t,r){return this.requirements.has(t)||this.requirements.set(t,{name:t,type:r,requirementId:this.latestRequirement.requirementId,text:this.latestRequirement.text,risk:this.latestRequirement.risk,verifyMethod:this.latestRequirement.verifyMethod,cssStyles:[],classes:["default"]}),this.resetLatestRequirement(),this.requirements.get(t)}getRequirements(){return this.requirements}setNewReqId(t){this.latestRequirement!==void 0&&(this.latestRequirement.requirementId=t)}setNewReqText(t){this.latestRequirement!==void 0&&(this.latestRequirement.text=t)}setNewReqRisk(t){this.latestRequirement!==void 0&&(this.latestRequirement.risk=t)}setNewReqVerifyMethod(t){this.latestRequirement!==void 0&&(this.latestRequirement.verifyMethod=t)}addElement(t){return this.elements.has(t)||(this.elements.set(t,{name:t,type:this.latestElement.type,docRef:this.latestElement.docRef,cssStyles:[],classes:["default"]}),te.info("Added new element: ",t)),this.resetLatestElement(),this.elements.get(t)}getElements(){return this.elements}setNewElementType(t){this.latestElement!==void 0&&(this.latestElement.type=t)}setNewElementDocRef(t){this.latestElement!==void 0&&(this.latestElement.docRef=t)}addRelationship(t,r,n){this.relations.push({type:t,src:r,dst:n})}getRelationships(){return this.relations}clear(){this.relations=[],this.resetLatestRequirement(),this.requirements=new Map,this.resetLatestElement(),this.elements=new Map,this.classes=new Map,gr()}setCssStyle(t,r){for(let n of t){let i=this.requirements.get(n)??this.elements.get(n);if(!r||!i)return;for(let a of r)a.includes(",")?i.cssStyles.push(...a.split(",")):i.cssStyles.push(a)}}setClass(t,r){for(let n of t){let i=this.requirements.get(n)??this.elements.get(n);if(i)for(let a of r){i.classes.push(a);let o=this.classes.get(a)?.styles;o&&i.cssStyles.push(...o)}}}defineClass(t,r){for(let n of t){let i=this.classes.get(n);i===void 0&&(i={id:n,styles:[],textStyles:[]},this.classes.set(n,i)),r&&r.forEach(function(a){if(/color/.exec(a)){let o=a.replace("fill","bgFill");i.textStyles.push(o)}i.styles.push(a)}),this.requirements.forEach(a=>{a.classes.includes(n)&&a.cssStyles.push(...r.flatMap(o=>o.split(",")))}),this.elements.forEach(a=>{a.classes.includes(n)&&a.cssStyles.push(...r.flatMap(o=>o.split(",")))})}}getClasses(){return this.classes}getData(){let t=Le(),r=[],n=[];for(let a of this.requirements.values()){let o=a;o.id=a.name,o.cssStyles=a.cssStyles,o.cssClasses=a.classes.join(" "),o.shape="requirementBox",o.look=t.look,o.colorIndex=r.length,r.push(o)}for(let a of this.elements.values()){let o=a;o.shape="requirementBox",o.look=t.look,o.id=a.name,o.cssStyles=a.cssStyles,o.cssClasses=a.classes.join(" "),o.colorIndex=r.length,r.push(o)}let i=0;for(let a of this.relations){let o=a.type===this.Relationships.CONTAINS,l={id:`${a.src}-${a.dst}-${i++}`,start:this.requirements.get(a.src)?.name??this.elements.get(a.src)?.name,end:this.requirements.get(a.dst)?.name??this.elements.get(a.dst)?.name,label:`<<${a.type}>>`,classes:"relationshipLine",style:["fill:none",o?"":"stroke-dasharray: 10,7"],labelpos:"c",thickness:"normal",type:"normal",pattern:o?"normal":"dashed",arrowTypeStart:o?"requirement_contains":"",arrowTypeEnd:o?"":"requirement_arrow",look:t.look,labelType:"markdown"};n.push(l)}return{nodes:r,edges:n,other:{},config:t,direction:this.getDirection()}}}});var wxt,Sxt,YRe,jRe=F(()=>{"use strict";mr();wxt=s(e=>{let t=Lt(),{themeVariables:r,look:n}=t,{bkgColorArray:i,borderColorArray:a}=r;if(!a?.length)return"";let o="";for(let l=0;l{let t=Lt(),{look:r,themeVariables:n}=t,{requirementEdgeLabelBackground:i}=n;return` + ${wxt(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: ${r==="neo"?e.strokeWidth:"1px"}; + } + .relationshipLabel { + fill: ${e.relationLabelColor}; + } + .edgeLabel { + background-color: ${e.edgeLabelBackground}; + } + .edgeLabel .label rect { + fill: ${e.edgeLabelBackground}; + } + .edgeLabel .label text { + 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: ${i??e.edgeLabelBackground}; + } + +`},"getStyles"),YRe=Sxt});var uH={};ar(uH,{draw:()=>Ext});var Ext,XRe=F(()=>{"use strict";Zt();Tt();Hp();vf();xf();Qt();Ext=s(async function(e,t,r,n){te.info("REF0:"),te.info("Drawing requirement diagram (unified)",t);let{securityLevel:i,state:a,layout:o,look:l}=Le(),u=n.db.getData(),h=Uo(t,i);u.type=n.type,u.layoutAlgorithm=Yc(o),u.nodeSpacing=a?.nodeSpacing??50,u.rankSpacing=a?.rankSpacing??50,u.markers=l==="neo"?["requirement_contains_neo","requirement_arrow_neo"]:["requirement_contains","requirement_arrow"],u.diagramId=t,await il(u,h);let d=8;sr.insertTitle(h,"requirementDiagramTitleText",a?.titleTopMargin??25,n.db.getDiagramTitle()),Js(h,d,"requirementDiagram",a?.useMaxWidth??!0)},"draw")});var KRe={};ar(KRe,{diagram:()=>Axt});var Axt,ZRe=F(()=>{"use strict";HRe();URe();jRe();XRe();Axt={parser:qRe,get db(){return new H6},renderer:uH,styles:YRe}});var hH,e6e,t6e=F(()=>{"use strict";hH=(function(){var e=s(function(at,Pe,Ke,qe){for(Ke=Ke||{},qe=at.length;qe--;Ke[at[qe]]=Pe);return Ke},"o"),t=[1,2],r=[1,3],n=[1,4],i=[2,4],a=[1,9],o=[1,11],l=[1,12],u=[1,14],h=[1,15],d=[1,17],f=[1,18],p=[1,19],m=[1,25],g=[1,26],y=[1,27],v=[1,28],x=[1,29],b=[1,30],T=[1,31],w=[1,32],C=[1,33],k=[1,34],S=[1,35],A=[1,36],M=[1,37],N=[1,38],D=[1,39],R=[1,40],E=[1,41],I=[1,43],L=[1,44],P=[1,45],B=[1,46],O=[1,47],$=[1,48],G=[1,4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,48,49,50,51,53,54,55,57,62,63,64,65,74],V=[1,75],z=[1,83],W=[1,84],H=[1,85],j=[1,86],Q=[1,87],U=[1,88],ue=[1,89],J=[1,90],he=[1,91],se=[1,92],oe=[1,93],Se=[1,94],xe=[1,95],Ne=[1,96],Ye=[1,97],We=[1,98],pe=[1,99],_e=[1,100],Ee=[1,101],Re=[1,102],Z=[1,103],ae=[1,104],ie=[1,105],le=[1,106],ve=[1,107],ne=[1,108],Me=[2,86],re=[4,5,17,51,53,54,55],ce=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,51,53,54,55,57,62,63,64,65,74],q=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,50,51,53,54,55,57,62,63,64,65,74],de=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,49,51,53,54,55,57,62,63,64,65,74],X=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,48,51,53,54,55,57,62,63,64,65,74],ye=[5,52],K=[71,72,73,74],Ge=[1,158],Ae={trace:s(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SPACE:4,NEWLINE:5,SD:6,document:7,line:8,statement:9,INVALID:10,box_section:11,box_line:12,participant_statement:13,create:14,box:15,restOfLine:16,end:17,signal:18,autonumber:19,NUM:20,off:21,activate:22,actor:23,deactivate:24,note_statement:25,links_statement:26,link_statement:27,properties_statement:28,details_statement:29,title:30,legacy_title:31,acc_title:32,acc_title_value:33,acc_descr:34,acc_descr_value:35,acc_descr_multiline_value:36,loop:37,rect:38,opt:39,alt:40,else_sections:41,par:42,par_sections:43,par_over:44,critical:45,option_sections:46,break:47,option:48,and:49,else:50,participant:51,AS:52,participant_actor:53,future:54,destroy:55,actor_with_config:56,note:57,placement:58,text2:59,over:60,actor_pair:61,links:62,link:63,properties:64,details:65,spaceList:66,",":67,left_of:68,right_of:69,signaltype:70,"+":71,"-":72,"()":73,ACTOR:74,config_object:75,CONFIG_START:76,CONFIG_CONTENT:77,CONFIG_END:78,SOLID_OPEN_ARROW:79,DOTTED_OPEN_ARROW:80,SOLID_ARROW:81,SOLID_ARROW_TOP:82,SOLID_ARROW_BOTTOM:83,STICK_ARROW_TOP:84,STICK_ARROW_BOTTOM:85,SOLID_ARROW_TOP_DOTTED:86,SOLID_ARROW_BOTTOM_DOTTED:87,STICK_ARROW_TOP_DOTTED:88,STICK_ARROW_BOTTOM_DOTTED:89,SOLID_ARROW_TOP_REVERSE:90,SOLID_ARROW_BOTTOM_REVERSE:91,STICK_ARROW_TOP_REVERSE:92,STICK_ARROW_BOTTOM_REVERSE:93,SOLID_ARROW_TOP_REVERSE_DOTTED:94,SOLID_ARROW_BOTTOM_REVERSE_DOTTED:95,STICK_ARROW_TOP_REVERSE_DOTTED:96,STICK_ARROW_BOTTOM_REVERSE_DOTTED:97,BIDIRECTIONAL_SOLID_ARROW:98,DOTTED_ARROW:99,BIDIRECTIONAL_DOTTED_ARROW:100,SOLID_CROSS:101,DOTTED_CROSS:102,SOLID_POINT:103,DOTTED_POINT:104,TXT:105,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NEWLINE",6:"SD",10:"INVALID",14:"create",15:"box",16:"restOfLine",17:"end",19:"autonumber",20:"NUM",21:"off",22:"activate",24:"deactivate",30:"title",31:"legacy_title",32:"acc_title",33:"acc_title_value",34:"acc_descr",35:"acc_descr_value",36:"acc_descr_multiline_value",37:"loop",38:"rect",39:"opt",40:"alt",42:"par",44:"par_over",45:"critical",47:"break",48:"option",49:"and",50:"else",51:"participant",52:"AS",53:"participant_actor",54:"future",55:"destroy",57:"note",60:"over",62:"links",63:"link",64:"properties",65:"details",67:",",68:"left_of",69:"right_of",71:"+",72:"-",73:"()",74:"ACTOR",76:"CONFIG_START",77:"CONFIG_CONTENT",78:"CONFIG_END",79:"SOLID_OPEN_ARROW",80:"DOTTED_OPEN_ARROW",81:"SOLID_ARROW",82:"SOLID_ARROW_TOP",83:"SOLID_ARROW_BOTTOM",84:"STICK_ARROW_TOP",85:"STICK_ARROW_BOTTOM",86:"SOLID_ARROW_TOP_DOTTED",87:"SOLID_ARROW_BOTTOM_DOTTED",88:"STICK_ARROW_TOP_DOTTED",89:"STICK_ARROW_BOTTOM_DOTTED",90:"SOLID_ARROW_TOP_REVERSE",91:"SOLID_ARROW_BOTTOM_REVERSE",92:"STICK_ARROW_TOP_REVERSE",93:"STICK_ARROW_BOTTOM_REVERSE",94:"SOLID_ARROW_TOP_REVERSE_DOTTED",95:"SOLID_ARROW_BOTTOM_REVERSE_DOTTED",96:"STICK_ARROW_TOP_REVERSE_DOTTED",97:"STICK_ARROW_BOTTOM_REVERSE_DOTTED",98:"BIDIRECTIONAL_SOLID_ARROW",99:"DOTTED_ARROW",100:"BIDIRECTIONAL_DOTTED_ARROW",101:"SOLID_CROSS",102:"DOTTED_CROSS",103:"SOLID_POINT",104:"DOTTED_POINT",105:"TXT"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[8,1],[11,0],[11,2],[12,2],[12,1],[12,1],[9,1],[9,2],[9,4],[9,2],[9,4],[9,3],[9,3],[9,2],[9,3],[9,3],[9,2],[9,2],[9,2],[9,2],[9,2],[9,1],[9,1],[9,2],[9,2],[9,1],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[46,1],[46,4],[43,1],[43,4],[41,1],[41,4],[13,5],[13,3],[13,5],[13,3],[13,6],[13,4],[13,6],[13,4],[13,3],[13,5],[13,3],[13,5],[13,3],[13,6],[13,4],[13,6],[13,4],[25,4],[25,4],[26,3],[27,3],[28,3],[29,3],[66,2],[66,1],[61,3],[61,1],[58,1],[58,1],[18,5],[18,5],[18,5],[18,5],[18,6],[18,4],[56,2],[75,3],[23,1],[70,1],[70,1],[70,1],[70,1],[70,1],[70,1],[70,1],[70,1],[70,1],[70,1],[70,1],[70,1],[70,1],[70,1],[70,1],[70,1],[70,1],[70,1],[70,1],[70,1],[70,1],[70,1],[70,1],[70,1],[70,1],[70,1],[59,1]],performAction:s(function(Pe,Ke,qe,Be,Xe,be,vt){var ke=be.length-1;switch(Xe){case 3:return Be.apply(be[ke]),be[ke];break;case 4:case 10:this.$=[];break;case 5:case 11:be[ke-1].push(be[ke]),this.$=be[ke-1];break;case 6:case 7:case 12:case 13:this.$=be[ke];break;case 8:case 9:case 14:this.$=[];break;case 16:be[ke].type="createParticipant",this.$=be[ke];break;case 17:be[ke-1].unshift({type:"boxStart",boxData:Be.parseBoxData(be[ke-2])}),be[ke-1].push({type:"boxEnd",boxText:be[ke-2]}),this.$=be[ke-1];break;case 19:this.$={type:"sequenceIndex",sequenceIndex:Number(be[ke-2]),sequenceIndexStep:Number(be[ke-1]),sequenceVisible:!0,signalType:Be.LINETYPE.AUTONUMBER};break;case 20:this.$={type:"sequenceIndex",sequenceIndex:Number(be[ke-1]),sequenceIndexStep:1,sequenceVisible:!0,signalType:Be.LINETYPE.AUTONUMBER};break;case 21:this.$={type:"sequenceIndex",sequenceVisible:!1,signalType:Be.LINETYPE.AUTONUMBER};break;case 22:this.$={type:"sequenceIndex",sequenceVisible:!0,signalType:Be.LINETYPE.AUTONUMBER};break;case 23:this.$={type:"activeStart",signalType:Be.LINETYPE.ACTIVE_START,actor:be[ke-1].actor};break;case 24:this.$={type:"activeEnd",signalType:Be.LINETYPE.ACTIVE_END,actor:be[ke-1].actor};break;case 30:Be.setDiagramTitle(be[ke].substring(6)),this.$=be[ke].substring(6);break;case 31:Be.setDiagramTitle(be[ke].substring(7)),this.$=be[ke].substring(7);break;case 32:this.$=be[ke].trim(),Be.setAccTitle(this.$);break;case 33:case 34:this.$=be[ke].trim(),Be.setAccDescription(this.$);break;case 35:be[ke-1].unshift({type:"loopStart",loopText:Be.parseMessage(be[ke-2]),signalType:Be.LINETYPE.LOOP_START}),be[ke-1].push({type:"loopEnd",loopText:be[ke-2],signalType:Be.LINETYPE.LOOP_END}),this.$=be[ke-1];break;case 36:be[ke-1].unshift({type:"rectStart",color:Be.parseMessage(be[ke-2]),signalType:Be.LINETYPE.RECT_START}),be[ke-1].push({type:"rectEnd",color:Be.parseMessage(be[ke-2]),signalType:Be.LINETYPE.RECT_END}),this.$=be[ke-1];break;case 37:be[ke-1].unshift({type:"optStart",optText:Be.parseMessage(be[ke-2]),signalType:Be.LINETYPE.OPT_START}),be[ke-1].push({type:"optEnd",optText:Be.parseMessage(be[ke-2]),signalType:Be.LINETYPE.OPT_END}),this.$=be[ke-1];break;case 38:be[ke-1].unshift({type:"altStart",altText:Be.parseMessage(be[ke-2]),signalType:Be.LINETYPE.ALT_START}),be[ke-1].push({type:"altEnd",signalType:Be.LINETYPE.ALT_END}),this.$=be[ke-1];break;case 39:be[ke-1].unshift({type:"parStart",parText:Be.parseMessage(be[ke-2]),signalType:Be.LINETYPE.PAR_START}),be[ke-1].push({type:"parEnd",signalType:Be.LINETYPE.PAR_END}),this.$=be[ke-1];break;case 40:be[ke-1].unshift({type:"parStart",parText:Be.parseMessage(be[ke-2]),signalType:Be.LINETYPE.PAR_OVER_START}),be[ke-1].push({type:"parEnd",signalType:Be.LINETYPE.PAR_END}),this.$=be[ke-1];break;case 41:be[ke-1].unshift({type:"criticalStart",criticalText:Be.parseMessage(be[ke-2]),signalType:Be.LINETYPE.CRITICAL_START}),be[ke-1].push({type:"criticalEnd",signalType:Be.LINETYPE.CRITICAL_END}),this.$=be[ke-1];break;case 42:be[ke-1].unshift({type:"breakStart",breakText:Be.parseMessage(be[ke-2]),signalType:Be.LINETYPE.BREAK_START}),be[ke-1].push({type:"breakEnd",optText:Be.parseMessage(be[ke-2]),signalType:Be.LINETYPE.BREAK_END}),this.$=be[ke-1];break;case 44:this.$=be[ke-3].concat([{type:"option",optionText:Be.parseMessage(be[ke-1]),signalType:Be.LINETYPE.CRITICAL_OPTION},be[ke]]);break;case 46:this.$=be[ke-3].concat([{type:"and",parText:Be.parseMessage(be[ke-1]),signalType:Be.LINETYPE.PAR_AND},be[ke]]);break;case 48:this.$=be[ke-3].concat([{type:"else",altText:Be.parseMessage(be[ke-1]),signalType:Be.LINETYPE.ALT_ELSE},be[ke]]);break;case 49:be[ke-3].draw="participant",be[ke-3].type="addParticipant",be[ke-3].description=Be.parseMessage(be[ke-1]),this.$=be[ke-3];break;case 50:be[ke-1].draw="participant",be[ke-1].type="addParticipant",this.$=be[ke-1];break;case 51:be[ke-3].draw="actor",be[ke-3].type="addParticipant",be[ke-3].description=Be.parseMessage(be[ke-1]),this.$=be[ke-3];break;case 52:case 61:be[ke-1].draw="actor",be[ke-1].type="addParticipant",this.$=be[ke-1];break;case 53:case 62:be[ke-3].draw="participant",be[ke-3].type="addFutureParticipant",be[ke-3].description=Be.parseMessage(be[ke-1]),this.$=be[ke-3];break;case 54:case 63:be[ke-1].draw="participant",be[ke-1].type="addFutureParticipant",this.$=be[ke-1];break;case 55:case 64:be[ke-3].draw="actor",be[ke-3].type="addFutureParticipant",be[ke-3].description=Be.parseMessage(be[ke-1]),this.$=be[ke-3];break;case 56:case 65:be[ke-1].draw="actor",be[ke-1].type="addFutureParticipant",this.$=be[ke-1];break;case 57:be[ke-1].type="destroyParticipant",this.$=be[ke-1];break;case 58:be[ke-3].draw="participant",be[ke-3].type="addParticipant",be[ke-3].description=Be.parseMessage(be[ke-1]),this.$=be[ke-3];break;case 59:be[ke-1].draw="participant",be[ke-1].type="addParticipant",this.$=be[ke-1];break;case 60:be[ke-3].draw="actor",be[ke-3].type="addParticipant",be[ke-3].description=Be.parseMessage(be[ke-1]),this.$=be[ke-3];break;case 66:this.$=[be[ke-1],{type:"addNote",placement:be[ke-2],actor:be[ke-1].actor,text:be[ke]}];break;case 67:be[ke-2]=[].concat(be[ke-1],be[ke-1]).slice(0,2),be[ke-2][0]=be[ke-2][0].actor,be[ke-2][1]=be[ke-2][1].actor,this.$=[be[ke-1],{type:"addNote",placement:Be.PLACEMENT.OVER,actor:be[ke-2].slice(0,2),text:be[ke]}];break;case 68:this.$=[be[ke-1],{type:"addLinks",actor:be[ke-1].actor,text:be[ke]}];break;case 69:this.$=[be[ke-1],{type:"addALink",actor:be[ke-1].actor,text:be[ke]}];break;case 70:this.$=[be[ke-1],{type:"addProperties",actor:be[ke-1].actor,text:be[ke]}];break;case 71:this.$=[be[ke-1],{type:"addDetails",actor:be[ke-1].actor,text:be[ke]}];break;case 74:this.$=[be[ke-2],be[ke]];break;case 75:this.$=be[ke];break;case 76:this.$=Be.PLACEMENT.LEFTOF;break;case 77:this.$=Be.PLACEMENT.RIGHTOF;break;case 78:this.$=[be[ke-4],be[ke-1],{type:"addMessage",from:be[ke-4].actor,to:be[ke-1].actor,signalType:be[ke-3],msg:be[ke],activate:!0},{type:"activeStart",signalType:Be.LINETYPE.ACTIVE_START,actor:be[ke-1].actor}];break;case 79:this.$=[be[ke-4],be[ke-1],{type:"addMessage",from:be[ke-4].actor,to:be[ke-1].actor,signalType:be[ke-3],msg:be[ke]},{type:"activeEnd",signalType:Be.LINETYPE.ACTIVE_END,actor:be[ke-4].actor}];break;case 80:this.$=[be[ke-4],be[ke-1],{type:"addMessage",from:be[ke-4].actor,to:be[ke-1].actor,signalType:be[ke-3],msg:be[ke],activate:!0,centralConnection:Be.LINETYPE.CENTRAL_CONNECTION},{type:"centralConnection",signalType:Be.LINETYPE.CENTRAL_CONNECTION,actor:be[ke-1].actor}];break;case 81:this.$=[be[ke-4],be[ke-1],{type:"addMessage",from:be[ke-4].actor,to:be[ke-1].actor,signalType:be[ke-2],msg:be[ke],activate:!1,centralConnection:Be.LINETYPE.CENTRAL_CONNECTION_REVERSE},{type:"centralConnectionReverse",signalType:Be.LINETYPE.CENTRAL_CONNECTION_REVERSE,actor:be[ke-4].actor}];break;case 82:this.$=[be[ke-5],be[ke-1],{type:"addMessage",from:be[ke-5].actor,to:be[ke-1].actor,signalType:be[ke-3],msg:be[ke],activate:!0,centralConnection:Be.LINETYPE.CENTRAL_CONNECTION_DUAL},{type:"centralConnection",signalType:Be.LINETYPE.CENTRAL_CONNECTION,actor:be[ke-1].actor},{type:"centralConnectionReverse",signalType:Be.LINETYPE.CENTRAL_CONNECTION_REVERSE,actor:be[ke-5].actor}];break;case 83:this.$=[be[ke-3],be[ke-1],{type:"addMessage",from:be[ke-3].actor,to:be[ke-1].actor,signalType:be[ke-2],msg:be[ke]}];break;case 84:this.$={type:"addParticipant",actor:be[ke-1],config:be[ke]};break;case 85:this.$=be[ke-1].trim();break;case 86:this.$={type:"addParticipant",actor:be[ke]};break;case 87:this.$=Be.LINETYPE.SOLID_OPEN;break;case 88:this.$=Be.LINETYPE.DOTTED_OPEN;break;case 89:this.$=Be.LINETYPE.SOLID;break;case 90:this.$=Be.LINETYPE.SOLID_TOP;break;case 91:this.$=Be.LINETYPE.SOLID_BOTTOM;break;case 92:this.$=Be.LINETYPE.STICK_TOP;break;case 93:this.$=Be.LINETYPE.STICK_BOTTOM;break;case 94:this.$=Be.LINETYPE.SOLID_TOP_DOTTED;break;case 95:this.$=Be.LINETYPE.SOLID_BOTTOM_DOTTED;break;case 96:this.$=Be.LINETYPE.STICK_TOP_DOTTED;break;case 97:this.$=Be.LINETYPE.STICK_BOTTOM_DOTTED;break;case 98:this.$=Be.LINETYPE.SOLID_ARROW_TOP_REVERSE;break;case 99:this.$=Be.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE;break;case 100:this.$=Be.LINETYPE.STICK_ARROW_TOP_REVERSE;break;case 101:this.$=Be.LINETYPE.STICK_ARROW_BOTTOM_REVERSE;break;case 102:this.$=Be.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED;break;case 103:this.$=Be.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED;break;case 104:this.$=Be.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED;break;case 105:this.$=Be.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED;break;case 106:this.$=Be.LINETYPE.BIDIRECTIONAL_SOLID;break;case 107:this.$=Be.LINETYPE.DOTTED;break;case 108:this.$=Be.LINETYPE.BIDIRECTIONAL_DOTTED;break;case 109:this.$=Be.LINETYPE.SOLID_CROSS;break;case 110:this.$=Be.LINETYPE.DOTTED_CROSS;break;case 111:this.$=Be.LINETYPE.SOLID_POINT;break;case 112:this.$=Be.LINETYPE.DOTTED_POINT;break;case 113:this.$=Be.parseMessage(be[ke].trim().substring(1));break}},"anonymous"),table:[{3:1,4:t,5:r,6:n},{1:[3]},{3:5,4:t,5:r,6:n},{3:6,4:t,5:r,6:n},e([1,4,5,10,14,15,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,51,53,54,55,57,62,63,64,65,74],i,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:a,5:o,8:8,9:10,10:l,13:13,14:u,15:h,18:16,19:d,22:f,23:42,24:p,25:20,26:21,27:22,28:23,29:24,30:m,31:g,32:y,34:v,36:x,37:b,38:T,39:w,40:C,42:k,44:S,45:A,47:M,51:N,53:D,54:R,55:E,57:I,62:L,63:P,64:B,65:O,74:$},e(G,[2,5]),{9:49,13:13,14:u,15:h,18:16,19:d,22:f,23:42,24:p,25:20,26:21,27:22,28:23,29:24,30:m,31:g,32:y,34:v,36:x,37:b,38:T,39:w,40:C,42:k,44:S,45:A,47:M,51:N,53:D,54:R,55:E,57:I,62:L,63:P,64:B,65:O,74:$},e(G,[2,7]),e(G,[2,8]),e(G,[2,9]),e(G,[2,15]),{13:50,51:N,53:D,54:R,55:E},{16:[1,51]},{5:[1,52]},{5:[1,55],20:[1,53],21:[1,54]},{23:56,74:$},{23:57,74:$},{5:[1,58]},{5:[1,59]},{5:[1,60]},{5:[1,61]},{5:[1,62]},e(G,[2,30]),e(G,[2,31]),{33:[1,63]},{35:[1,64]},e(G,[2,34]),{16:[1,65]},{16:[1,66]},{16:[1,67]},{16:[1,68]},{16:[1,69]},{16:[1,70]},{16:[1,71]},{16:[1,72]},{23:73,56:74,74:V},{23:76,56:77,74:V},{51:[1,78],53:[1,79]},{23:80,74:$},{70:81,73:[1,82],79:z,80:W,81:H,82:j,83:Q,84:U,85:ue,86:J,87:he,88:se,89:oe,90:Se,91:xe,92:Ne,93:Ye,94:We,95:pe,96:_e,97:Ee,98:Re,99:Z,100:ae,101:ie,102:le,103:ve,104:ne},{58:109,60:[1,110],68:[1,111],69:[1,112]},{23:113,74:$},{23:114,74:$},{23:115,74:$},{23:116,74:$},e([5,67,73,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105],Me),e(G,[2,6]),e(G,[2,16]),e(re,[2,10],{11:117}),e(G,[2,18]),{5:[1,119],20:[1,118]},{5:[1,120]},e(G,[2,22]),{5:[1,121]},{5:[1,122]},e(G,[2,25]),e(G,[2,26]),e(G,[2,27]),e(G,[2,28]),e(G,[2,29]),e(G,[2,32]),e(G,[2,33]),e(ce,i,{7:123}),e(ce,i,{7:124}),e(ce,i,{7:125}),e(q,i,{41:126,7:127}),e(de,i,{43:128,7:129}),e(de,i,{7:129,43:130}),e(X,i,{46:131,7:132}),e(ce,i,{7:133}),{5:[1,135],52:[1,134]},{5:[1,137],52:[1,136]},e(ye,Me,{75:138,76:[1,139]}),{5:[1,141],52:[1,140]},{5:[1,143],52:[1,142]},{23:144,56:145,74:V},{23:146,56:147,74:V},{5:[1,148]},{23:152,71:[1,149],72:[1,150],73:[1,151],74:$},{70:153,79:z,80:W,81:H,82:j,83:Q,84:U,85:ue,86:J,87:he,88:se,89:oe,90:Se,91:xe,92:Ne,93:Ye,94:We,95:pe,96:_e,97:Ee,98:Re,99:Z,100:ae,101:ie,102:le,103:ve,104:ne},e(K,[2,87]),e(K,[2,88]),e(K,[2,89]),e(K,[2,90]),e(K,[2,91]),e(K,[2,92]),e(K,[2,93]),e(K,[2,94]),e(K,[2,95]),e(K,[2,96]),e(K,[2,97]),e(K,[2,98]),e(K,[2,99]),e(K,[2,100]),e(K,[2,101]),e(K,[2,102]),e(K,[2,103]),e(K,[2,104]),e(K,[2,105]),e(K,[2,106]),e(K,[2,107]),e(K,[2,108]),e(K,[2,109]),e(K,[2,110]),e(K,[2,111]),e(K,[2,112]),{23:154,74:$},{23:156,61:155,74:$},{74:[2,76]},{74:[2,77]},{59:157,105:Ge},{59:159,105:Ge},{59:160,105:Ge},{59:161,105:Ge},{4:[1,164],5:[1,166],12:163,13:165,17:[1,162],51:N,53:D,54:R,55:E},{5:[1,167]},e(G,[2,20]),e(G,[2,21]),e(G,[2,23]),e(G,[2,24]),{4:a,5:o,8:8,9:10,10:l,13:13,14:u,15:h,17:[1,168],18:16,19:d,22:f,23:42,24:p,25:20,26:21,27:22,28:23,29:24,30:m,31:g,32:y,34:v,36:x,37:b,38:T,39:w,40:C,42:k,44:S,45:A,47:M,51:N,53:D,54:R,55:E,57:I,62:L,63:P,64:B,65:O,74:$},{4:a,5:o,8:8,9:10,10:l,13:13,14:u,15:h,17:[1,169],18:16,19:d,22:f,23:42,24:p,25:20,26:21,27:22,28:23,29:24,30:m,31:g,32:y,34:v,36:x,37:b,38:T,39:w,40:C,42:k,44:S,45:A,47:M,51:N,53:D,54:R,55:E,57:I,62:L,63:P,64:B,65:O,74:$},{4:a,5:o,8:8,9:10,10:l,13:13,14:u,15:h,17:[1,170],18:16,19:d,22:f,23:42,24:p,25:20,26:21,27:22,28:23,29:24,30:m,31:g,32:y,34:v,36:x,37:b,38:T,39:w,40:C,42:k,44:S,45:A,47:M,51:N,53:D,54:R,55:E,57:I,62:L,63:P,64:B,65:O,74:$},{17:[1,171]},{4:a,5:o,8:8,9:10,10:l,13:13,14:u,15:h,17:[2,47],18:16,19:d,22:f,23:42,24:p,25:20,26:21,27:22,28:23,29:24,30:m,31:g,32:y,34:v,36:x,37:b,38:T,39:w,40:C,42:k,44:S,45:A,47:M,50:[1,172],51:N,53:D,54:R,55:E,57:I,62:L,63:P,64:B,65:O,74:$},{17:[1,173]},{4:a,5:o,8:8,9:10,10:l,13:13,14:u,15:h,17:[2,45],18:16,19:d,22:f,23:42,24:p,25:20,26:21,27:22,28:23,29:24,30:m,31:g,32:y,34:v,36:x,37:b,38:T,39:w,40:C,42:k,44:S,45:A,47:M,49:[1,174],51:N,53:D,54:R,55:E,57:I,62:L,63:P,64:B,65:O,74:$},{17:[1,175]},{17:[1,176]},{4:a,5:o,8:8,9:10,10:l,13:13,14:u,15:h,17:[2,43],18:16,19:d,22:f,23:42,24:p,25:20,26:21,27:22,28:23,29:24,30:m,31:g,32:y,34:v,36:x,37:b,38:T,39:w,40:C,42:k,44:S,45:A,47:M,48:[1,177],51:N,53:D,54:R,55:E,57:I,62:L,63:P,64:B,65:O,74:$},{4:a,5:o,8:8,9:10,10:l,13:13,14:u,15:h,17:[1,178],18:16,19:d,22:f,23:42,24:p,25:20,26:21,27:22,28:23,29:24,30:m,31:g,32:y,34:v,36:x,37:b,38:T,39:w,40:C,42:k,44:S,45:A,47:M,51:N,53:D,54:R,55:E,57:I,62:L,63:P,64:B,65:O,74:$},{16:[1,179]},e(G,[2,50]),{16:[1,180]},e(G,[2,59]),e(ye,[2,84]),{77:[1,181]},{16:[1,182]},e(G,[2,52]),{16:[1,183]},e(G,[2,61]),{5:[1,185],52:[1,184]},{5:[1,187],52:[1,186]},{5:[1,189],52:[1,188]},{5:[1,191],52:[1,190]},e(G,[2,57]),{23:192,74:$},{23:193,74:$},{23:194,74:$},{59:195,105:Ge},{23:196,73:[1,197],74:$},{59:198,105:Ge},{59:199,105:Ge},{67:[1,200],105:[2,75]},{5:[2,68]},{5:[2,113]},{5:[2,69]},{5:[2,70]},{5:[2,71]},e(G,[2,17]),e(re,[2,11]),{13:201,51:N,53:D,54:R,55:E},e(re,[2,13]),e(re,[2,14]),e(G,[2,19]),e(G,[2,35]),e(G,[2,36]),e(G,[2,37]),e(G,[2,38]),{16:[1,202]},e(G,[2,39]),{16:[1,203]},e(G,[2,40]),e(G,[2,41]),{16:[1,204]},e(G,[2,42]),{5:[1,205]},{5:[1,206]},{78:[1,207]},{5:[1,208]},{5:[1,209]},{16:[1,210]},e(G,[2,54]),{16:[1,211]},e(G,[2,63]),{16:[1,212]},e(G,[2,56]),{16:[1,213]},e(G,[2,65]),{59:214,105:Ge},{59:215,105:Ge},{59:216,105:Ge},{5:[2,83]},{59:217,105:Ge},{23:218,74:$},{5:[2,66]},{5:[2,67]},{23:219,74:$},e(re,[2,12]),e(q,i,{7:127,41:220}),e(de,i,{7:129,43:221}),e(X,i,{7:132,46:222}),e(G,[2,49]),e(G,[2,58]),e(ye,[2,85]),e(G,[2,51]),e(G,[2,60]),{5:[1,223]},{5:[1,224]},{5:[1,225]},{5:[1,226]},{5:[2,78]},{5:[2,79]},{5:[2,80]},{5:[2,81]},{59:227,105:Ge},{105:[2,74]},{17:[2,48]},{17:[2,46]},{17:[2,44]},e(G,[2,53]),e(G,[2,62]),e(G,[2,55]),e(G,[2,64]),{5:[2,82]}],defaultActions:{5:[2,1],6:[2,2],111:[2,76],112:[2,77],157:[2,68],158:[2,113],159:[2,69],160:[2,70],161:[2,71],195:[2,83],198:[2,66],199:[2,67],214:[2,78],215:[2,79],216:[2,80],217:[2,81],219:[2,74],220:[2,48],221:[2,46],222:[2,44],227:[2,82]},parseError:s(function(Pe,Ke){if(Ke.recoverable)this.trace(Pe);else{var qe=new Error(Pe);throw qe.hash=Ke,qe}},"parseError"),parse:s(function(Pe){var Ke=this,qe=[0],Be=[],Xe=[null],be=[],vt=this.table,ke="",It=0,Ft=0,yt=0,Et=2,gt=1,ge=be.slice.call(arguments,1),nt=Object.create(this.lexer),pt={yy:{}};for(var Qe in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Qe)&&(pt.yy[Qe]=this.yy[Qe]);nt.setInput(Pe,pt.yy),pt.yy.lexer=nt,pt.yy.parser=this,typeof nt.yylloc>"u"&&(nt.yylloc={});var we=nt.yylloc;be.push(we);var tt=nt.options&&nt.options.ranges;typeof pt.yy.parseError=="function"?this.parseError=pt.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function st(Yt){qe.length=qe.length-2*Yt,Xe.length=Xe.length-Yt,be.length=be.length-Yt}s(st,"popStack");function mt(){var Yt;return Yt=Be.pop()||nt.lex()||gt,typeof Yt!="number"&&(Yt instanceof Array&&(Be=Yt,Yt=Be.pop()),Yt=Ke.symbols_[Yt]||Yt),Yt}s(mt,"lex");for(var Bt,Gt,Xt,rr,Ct,Ie,it={},Ve,Ze,bt,Ut;;){if(Xt=qe[qe.length-1],this.defaultActions[Xt]?rr=this.defaultActions[Xt]:((Bt===null||typeof Bt>"u")&&(Bt=mt()),rr=vt[Xt]&&vt[Xt][Bt]),typeof rr>"u"||!rr.length||!rr[0]){var ir="";Ut=[];for(Ve in vt[Xt])this.terminals_[Ve]&&Ve>Et&&Ut.push("'"+this.terminals_[Ve]+"'");nt.showPosition?ir="Parse error on line "+(It+1)+`: +`+nt.showPosition()+` +Expecting `+Ut.join(", ")+", got '"+(this.terminals_[Bt]||Bt)+"'":ir="Parse error on line "+(It+1)+": Unexpected "+(Bt==gt?"end of input":"'"+(this.terminals_[Bt]||Bt)+"'"),this.parseError(ir,{text:nt.match,token:this.terminals_[Bt]||Bt,line:nt.yylineno,loc:we,expected:Ut})}if(rr[0]instanceof Array&&rr.length>1)throw new Error("Parse Error: multiple actions possible at state: "+Xt+", token: "+Bt);switch(rr[0]){case 1:qe.push(Bt),Xe.push(nt.yytext),be.push(nt.yylloc),qe.push(rr[1]),Bt=null,Gt?(Bt=Gt,Gt=null):(Ft=nt.yyleng,ke=nt.yytext,It=nt.yylineno,we=nt.yylloc,yt>0&&yt--);break;case 2:if(Ze=this.productions_[rr[1]][1],it.$=Xe[Xe.length-Ze],it._$={first_line:be[be.length-(Ze||1)].first_line,last_line:be[be.length-1].last_line,first_column:be[be.length-(Ze||1)].first_column,last_column:be[be.length-1].last_column},tt&&(it._$.range=[be[be.length-(Ze||1)].range[0],be[be.length-1].range[1]]),Ie=this.performAction.apply(it,[ke,Ft,It,pt.yy,rr[1],Xe,be].concat(ge)),typeof Ie<"u")return Ie;Ze&&(qe=qe.slice(0,-1*Ze*2),Xe=Xe.slice(0,-1*Ze),be=be.slice(0,-1*Ze)),qe.push(this.productions_[rr[1]][0]),Xe.push(it.$),be.push(it._$),bt=vt[qe[qe.length-2]][qe[qe.length-1]],qe.push(bt);break;case 3:return!0}}return!0},"parse")},$e=(function(){var at={EOF:1,parseError:s(function(Ke,qe){if(this.yy.parser)this.yy.parser.parseError(Ke,qe);else throw new Error(Ke)},"parseError"),setInput:s(function(Pe,Ke){return this.yy=Ke||this.yy||{},this._input=Pe,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 Pe=this._input[0];this.yytext+=Pe,this.yyleng++,this.offset++,this.match+=Pe,this.matched+=Pe;var Ke=Pe.match(/(?:\r\n?|\n).*/g);return Ke?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),Pe},"input"),unput:s(function(Pe){var Ke=Pe.length,qe=Pe.split(/(?:\r\n?|\n)/g);this._input=Pe+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-Ke),this.offset-=Ke;var Be=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),qe.length-1&&(this.yylineno-=qe.length-1);var Xe=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:qe?(qe.length===Be.length?this.yylloc.first_column:0)+Be[Be.length-qe.length].length-qe[0].length:this.yylloc.first_column-Ke},this.options.ranges&&(this.yylloc.range=[Xe[0],Xe[0]+this.yyleng-Ke]),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(Pe){this.unput(this.match.slice(Pe))},"less"),pastInput:s(function(){var Pe=this.matched.substr(0,this.matched.length-this.match.length);return(Pe.length>20?"...":"")+Pe.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:s(function(){var Pe=this.match;return Pe.length<20&&(Pe+=this._input.substr(0,20-Pe.length)),(Pe.substr(0,20)+(Pe.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:s(function(){var Pe=this.pastInput(),Ke=new Array(Pe.length+1).join("-");return Pe+this.upcomingInput()+` +`+Ke+"^"},"showPosition"),test_match:s(function(Pe,Ke){var qe,Be,Xe;if(this.options.backtrack_lexer&&(Xe={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&&(Xe.yylloc.range=this.yylloc.range.slice(0))),Be=Pe[0].match(/(?:\r\n?|\n).*/g),Be&&(this.yylineno+=Be.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:Be?Be[Be.length-1].length-Be[Be.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+Pe[0].length},this.yytext+=Pe[0],this.match+=Pe[0],this.matches=Pe,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(Pe[0].length),this.matched+=Pe[0],qe=this.performAction.call(this,this.yy,this,Ke,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),qe)return qe;if(this._backtrack){for(var be in Xe)this[be]=Xe[be];return!1}return!1},"test_match"),next:s(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var Pe,Ke,qe,Be;this._more||(this.yytext="",this.match="");for(var Xe=this._currentRules(),be=0;beKe[0].length)){if(Ke=qe,Be=be,this.options.backtrack_lexer){if(Pe=this.test_match(qe,Xe[be]),Pe!==!1)return Pe;if(this._backtrack){Ke=!1;continue}else return!1}else if(!this.options.flex)break}return Ke?(Pe=this.test_match(Ke,Xe[Be]),Pe!==!1?Pe:!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 Ke=this.next();return Ke||this.lex()},"lex"),begin:s(function(Ke){this.conditionStack.push(Ke)},"begin"),popState:s(function(){var Ke=this.conditionStack.length-1;return Ke>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(Ke){return Ke=this.conditionStack.length-1-Math.abs(Ke||0),Ke>=0?this.conditionStack[Ke]:"INITIAL"},"topState"),pushState:s(function(Ke){this.begin(Ke)},"pushState"),stateStackSize:s(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:s(function(Ke,qe,Be,Xe){var be=Xe;switch(Be){case 0:return 5;case 1:break;case 2:break;case 3:break;case 4:break;case 5:break;case 6:return 20;case 7:return this.begin("CONFIG"),76;break;case 8:return 77;case 9:return this.popState(),this.begin("ALIAS"),78;break;case 10:return this.popState(),this.popState(),78;break;case 11:return qe.yytext=qe.yytext.trim(),74;break;case 12:return qe.yytext=qe.yytext.trim(),this.begin("ALIAS"),74;break;case 13:return qe.yytext=qe.yytext.trim(),this.popState(),74;break;case 14:return this.popState(),10;break;case 15:return qe.yytext=qe.yytext.trim(),this.popState(),10;break;case 16:return this.begin("LINE"),15;break;case 17:return this.begin("ID"),51;break;case 18:return this.begin("ID"),53;break;case 19:return 54;case 20:return 14;case 21:return this.begin("ID"),55;break;case 22:return this.popState(),this.popState(),this.begin("LINE"),52;break;case 23:return this.popState(),this.popState(),5;break;case 24:return this.begin("LINE"),37;break;case 25:return this.begin("LINE"),38;break;case 26:return this.begin("LINE"),39;break;case 27:return this.begin("LINE"),40;break;case 28:return this.begin("LINE"),50;break;case 29:return this.begin("LINE"),42;break;case 30:return this.begin("LINE"),44;break;case 31:return this.begin("LINE"),49;break;case 32:return this.begin("LINE"),45;break;case 33:return this.begin("LINE"),48;break;case 34:return this.begin("LINE"),47;break;case 35:return this.popState(),16;break;case 36:return 17;case 37:return 68;case 38:return 69;case 39:return 62;case 40:return 63;case 41:return 64;case 42:return 65;case 43:return 60;case 44:return 57;case 45:return this.begin("ID"),22;break;case 46:return this.begin("ID"),24;break;case 47:return 30;case 48:return 31;case 49:return this.begin("acc_title"),32;break;case 50:return this.popState(),"acc_title_value";break;case 51:return this.begin("acc_descr"),34;break;case 52:return this.popState(),"acc_descr_value";break;case 53:this.begin("acc_descr_multiline");break;case 54:this.popState();break;case 55:return"acc_descr_multiline_value";case 56:return 6;case 57:return 19;case 58:return 21;case 59:return 67;case 60:return 5;case 61:return qe.yytext=qe.yytext.trim(),74;break;case 62:return 81;case 63:return 98;case 64:return 99;case 65:return 100;case 66:return 79;case 67:return 80;case 68:return 101;case 69:return 102;case 70:return 103;case 71:return 104;case 72:return 86;case 73:return 87;case 74:return 88;case 75:return 89;case 76:return 94;case 77:return 95;case 78:return 96;case 79:return 97;case 80:return 82;case 81:return 83;case 82:return 84;case 83:return 85;case 84:return 90;case 85:return 91;case 86:return 92;case 87:return 93;case 88:return 105;case 89:return 105;case 90:return 71;case 91:return 72;case 92:return 73;case 93:return 5;case 94:return 10}},"anonymous"),rules:[/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:([0-9]+(\.[0-9]{1,2})?|\.[0-9]{1,2})(?=[ \n]+))/i,/^(?:@\{)/i,/^(?:[^\}]+)/i,/^(?:\}(?=\s+as\s))/i,/^(?:\})/i,/^(?:[^\<->\->:\n,;@\s]+(?=@\{))/i,/^(?:[^<>:\n,;@\s]+(?=\s+as\s))/i,/^(?:[^<>:\n,;@]+(?=\s*[\n;#]|$))/i,/^(?:[^<>:\n,;@]*<[^\n]*)/i,/^(?:[^\n]+)/i,/^(?:box\b)/i,/^(?:participant\b)/i,/^(?:actor\b)/i,/^(?:future\b)/i,/^(?:create\b)/i,/^(?:destroy\b)/i,/^(?:as\b)/i,/^(?:(?:))/i,/^(?:loop\b)/i,/^(?:rect\b)/i,/^(?:opt\b)/i,/^(?:alt\b)/i,/^(?:else\b)/i,/^(?:par\b)/i,/^(?:par_over\b)/i,/^(?:and\b)/i,/^(?:critical\b)/i,/^(?:option\b)/i,/^(?:break\b)/i,/^(?:(?:[:]?(?:no)?wrap)?[^#\n;]*)/i,/^(?:end\b)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:links\b)/i,/^(?:link\b)/i,/^(?:properties\b)/i,/^(?:details\b)/i,/^(?:over\b)/i,/^(?:note\b)/i,/^(?:activate\b)/i,/^(?:deactivate\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:title:\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:sequenceDiagram\b)/i,/^(?:autonumber\b)/i,/^(?:off\b)/i,/^(?:,)/i,/^(?:;)/i,/^(?:[^\/\\\+\()\+<\->\->:\n,;]+((?!(-x|--x|-\)|--\)|-\|\\|-\\|-\/|-\/\/|-\|\/|\/\|-|\\\|-|\/\/-|\\\\-|\/\|-|--\|\\|--|\(\)))[\-]*[^\+<\->\->:\n,;]+)*)/i,/^(?:->>)/i,/^(?:<<->>)/i,/^(?:-->>)/i,/^(?:<<-->>)/i,/^(?:->)/i,/^(?:-->)/i,/^(?:-[x])/i,/^(?:--[x])/i,/^(?:-[\)])/i,/^(?:--[\)])/i,/^(?:--\|\\)/i,/^(?:--\|\/)/i,/^(?:--\\\\)/i,/^(?:--\/\/)/i,/^(?:\/\|--)/i,/^(?:\\\|--)/i,/^(?:\/\/--)/i,/^(?:\\\\--)/i,/^(?:-\|\\)/i,/^(?:-\|\/)/i,/^(?:-\\\\)/i,/^(?:-\/\/)/i,/^(?:\/\|-)/i,/^(?:\\\|-)/i,/^(?:\/\/-)/i,/^(?:\\\\-)/i,/^(?::(?:(?:no)?wrap)?[^#\n;]*)/i,/^(?::)/i,/^(?:\+)/i,/^(?:-)/i,/^(?:\(\))/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[54,55],inclusive:!1},acc_descr:{rules:[52],inclusive:!1},acc_title:{rules:[50],inclusive:!1},ID:{rules:[2,3,7,11,12,13,14,15],inclusive:!1},ALIAS:{rules:[2,3,22,23],inclusive:!1},LINE:{rules:[2,3,35],inclusive:!1},CONFIG:{rules:[8,9,10],inclusive:!1},CONFIG_DATA:{rules:[],inclusive:!1},INITIAL:{rules:[0,1,3,4,5,6,16,17,18,19,20,21,24,25,26,27,28,29,30,31,32,33,34,36,37,38,39,40,41,42,43,44,45,46,47,48,49,51,53,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94],inclusive:!0}}};return at})();Ae.lexer=$e;function Oe(){this.yy={}}return s(Oe,"Parser"),Oe.prototype=Ae,Ae.Parser=Oe,new Oe})();hH.parser=hH;e6e=hH});var Dxt,Ixt,Mxt,OC,U6,dH=F(()=>{"use strict";Zt();Gb();Tt();S6();Gr();An();Dxt={SOLID:0,DOTTED:1,NOTE:2,SOLID_CROSS:3,DOTTED_CROSS:4,SOLID_OPEN:5,DOTTED_OPEN:6,LOOP_START:10,LOOP_END:11,ALT_START:12,ALT_ELSE:13,ALT_END:14,OPT_START:15,OPT_END:16,ACTIVE_START:17,ACTIVE_END:18,PAR_START:19,PAR_AND:20,PAR_END:21,RECT_START:22,RECT_END:23,SOLID_POINT:24,DOTTED_POINT:25,AUTONUMBER:26,CRITICAL_START:27,CRITICAL_OPTION:28,CRITICAL_END:29,BREAK_START:30,BREAK_END:31,PAR_OVER_START:32,BIDIRECTIONAL_SOLID:33,BIDIRECTIONAL_DOTTED:34,SOLID_TOP:41,SOLID_BOTTOM:42,STICK_TOP:43,STICK_BOTTOM:44,SOLID_ARROW_TOP_REVERSE:45,SOLID_ARROW_BOTTOM_REVERSE:46,STICK_ARROW_TOP_REVERSE:47,STICK_ARROW_BOTTOM_REVERSE:48,SOLID_TOP_DOTTED:51,SOLID_BOTTOM_DOTTED:52,STICK_TOP_DOTTED:53,STICK_BOTTOM_DOTTED:54,SOLID_ARROW_TOP_REVERSE_DOTTED:55,SOLID_ARROW_BOTTOM_REVERSE_DOTTED:56,STICK_ARROW_TOP_REVERSE_DOTTED:57,STICK_ARROW_BOTTOM_REVERSE_DOTTED:58,CENTRAL_CONNECTION:59,CENTRAL_CONNECTION_REVERSE:60,CENTRAL_CONNECTION_DUAL:61},Ixt={FILLED:0,OPEN:1},Mxt={LEFTOF:0,RIGHTOF:1,OVER:2},OC={ACTOR:"actor",BOUNDARY:"boundary",COLLECTIONS:"collections",CONTROL:"control",DATABASE:"database",ENTITY:"entity",PARTICIPANT:"participant",QUEUE:"queue"},U6=class{constructor(){this.state=new Ff(()=>({prevActor:void 0,actors:new Map,futureActors:new Set,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=Cr;this.setAccDescription=Er;this.setDiagramTitle=Mr;this.getAccTitle=Sr;this.getAccDescription=Ar;this.getDiagramTitle=Rr;this.apply=this.apply.bind(this),this.parseBoxData=this.parseBoxData.bind(this),this.parseMessage=this.parseMessage.bind(this),this.clear(),this.setWrap(Le().wrap),this.LINETYPE=Dxt,this.ARROWTYPE=Ixt,this.PLACEMENT=Mxt}static{s(this,"SequenceDB")}addBox(t){this.state.records.boxes.push({name:t.text,wrap:t.wrap??this.autoWrap(),fill:t.color,actorKeys:[]}),this.state.records.currentBox=this.state.records.boxes.slice(-1)[0]}addActor(t,r,n,i,a){let o=this.state.records.currentBox,l;if(a!==void 0){let h;a.includes(` +`)?h=a+` +`:h=`{ +`+a+` +}`,l=yd(h,{schema:gd})}i=l?.type??i,l?.alias&&(!n||n.text===r)&&(n={text:l.alias,wrap:n?.wrap,type:i});let u=this.state.records.actors.get(t);if(u){if(this.state.records.currentBox&&u.box&&this.state.records.currentBox!==u.box)throw new Error(`A same participant should only be defined in one Box: ${u.name} can't be in '${u.box.name}' and in '${this.state.records.currentBox.name}' at the same time.`);if(o=u.box?u.box:this.state.records.currentBox,u.box=o,u&&r===u.name&&n==null)return}if(n?.text==null&&(n={text:r,type:i}),(i==null||n.text==null)&&(n={text:r,type:i}),this.state.records.actors.set(t,{box:o,name:r,description:n.text,wrap:n.wrap??this.autoWrap(),prevActor:this.state.records.prevActor,links:{},properties:{},actorCnt:null,rectData:null,type:i??"participant"}),this.state.records.prevActor){let h=this.state.records.actors.get(this.state.records.prevActor);h&&(h.nextActor=t)}this.state.records.currentBox&&this.state.records.currentBox.actorKeys.push(t),this.state.records.prevActor=t}activationCount(t){let r,n=0;if(!t)return 0;for(r=0;r>-",token:"->>-",line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["'ACTIVE_PARTICIPANT'"]},u}return this.state.records.messages.push({id:this.state.records.messages.length.toString(),from:t,to:r,message:n?.text??"",wrap:n?.wrap??this.autoWrap(),type:i,activate:a,centralConnection:o??0}),!0}hasAtLeastOneBox(){return this.state.records.boxes.length>0}hasAtLeastOneBoxWithTitle(){return this.state.records.boxes.some(t=>t.name)}getMessages(){return this.state.records.messages}getBoxes(){return this.state.records.boxes}getActors(){return this.state.records.actors}getCreatedActors(){return this.state.records.createdActors}getDestroyedActors(){return this.state.records.destroyedActors}getActor(t){return this.state.records.actors.get(t)}getActorKeys(){return[...this.state.records.actors.keys()]}findFutureActorByName(t){for(let r of this.state.records.futureActors)if(r.name===t)return r}isFutureActor(t){return t?!!this.findFutureActorByName(t):!1}getActorOrNameRef(t){let r=this.state.records.actors.get(t);return r||{name:t,description:t,wrap:this.autoWrap(),links:{},properties:{},actorCnt:null,rectData:null,type:"participant"}}validateFutureParticipantsResolved(){if(this.state.records.futureActors.size===0)return;let t=[...this.state.records.futureActors].map(r=>r.name).join(", ");throw new Error(`Future participant declarations must be resolved using matching create directives. Unresolved participants: ${t}.`)}enableSequenceNumbers(){this.state.records.sequenceNumbersEnabled=!0}disableSequenceNumbers(){this.state.records.sequenceNumbersEnabled=!1}showSequenceNumbers(){return this.state.records.sequenceNumbersEnabled}setWrap(t){this.state.records.wrapEnabled=t}extractWrap(t){if(t===void 0)return{};t=t.trim();let r=/^:?wrap:/.exec(t)!==null?!0:/^:?nowrap:/.exec(t)!==null?!1:void 0;return{cleanedText:(r===void 0?t:t.replace(/^:?(?:no)?wrap:/,"")).trim(),wrap:r}}autoWrap(){return this.state.records.wrapEnabled!==void 0?this.state.records.wrapEnabled:Le().sequence?.wrap??!1}clear(){this.state.reset(),gr()}parseMessage(t){let r=t.trim(),{wrap:n,cleanedText:i}=this.extractWrap(r),a={text:i,wrap:n};return te.debug(`parseMessage: ${JSON.stringify(a)}`),a}parseBoxData(t){let r=/^((?:rgba?|hsla?)\s*\(.*\)|\w*)(.*)$/.exec(t),n=r?.[1]?r[1].trim():"transparent",i=r?.[2]?r[2].trim():void 0;if(window?.CSS)window.CSS.supports("color",n)||(n="transparent",i=t.trim());else{let l=new Option().style;l.color=n,l.color!==n&&(n="transparent",i=t.trim())}let{wrap:a,cleanedText:o}=this.extractWrap(i);return{text:o?vr(o,Le()):void 0,color:n,wrap:a}}addNote(t,r,n){let i={actor:t,placement:r,message:n.text,wrap:n.wrap??this.autoWrap()},a=[].concat(t,t);this.state.records.notes.push(i),this.state.records.messages.push({id:this.state.records.messages.length.toString(),from:a[0],to:a[1],message:n.text,wrap:n.wrap??this.autoWrap(),type:this.LINETYPE.NOTE,placement:r})}addLinks(t,r){let n=this.getActor(t);try{let i=vr(r.text,Le());i=i.replace(/=/g,"="),i=i.replace(/&/g,"&");let a=JSON.parse(i);this.insertLinks(n,a)}catch(i){te.error("error while parsing actor link text",i)}}addALink(t,r){let n=this.getActor(t);try{let i={},a=vr(r.text,Le()),o=a.indexOf("@");a=a.replace(/=/g,"="),a=a.replace(/&/g,"&");let l=a.slice(0,o-1).trim(),u=a.slice(o+1).trim();i[l]=u,this.insertLinks(n,i)}catch(i){te.error("error while parsing actor link text",i)}}insertLinks(t,r){if(t.links==null)t.links=r;else for(let n in r)t.links[n]=r[n]}addProperties(t,r){let n=this.getActor(t);try{let i=vr(r.text,Le()),a=JSON.parse(i);this.insertProperties(n,a)}catch(i){te.error("error while parsing actor properties text",i)}}insertProperties(t,r){if(t.properties==null)t.properties=r;else for(let n in r)t.properties[n]=r[n]}boxEnd(){this.state.records.currentBox=void 0}addDetails(t,r){let n=this.getActor(t),i=document.getElementById(r.text);try{let a=i.innerHTML,o=JSON.parse(a);o.properties&&this.insertProperties(n,o.properties),o.links&&this.insertLinks(n,o.links)}catch(a){te.error("error while parsing actor details text",a)}}getActorProperty(t,r){if(t?.properties!==void 0)return t.properties[r]}apply(t){Array.isArray(t)?(t.forEach(r=>{this.applyItem(r)}),this.validateFutureParticipantsResolved()):this.applyItem(t)}applyItem(t){if(Array.isArray(t)){t.forEach(r=>this.applyItem(r));return}switch(t.type){case"sequenceIndex":this.state.records.messages.push({id:this.state.records.messages.length.toString(),from:void 0,to:void 0,message:{start:t.sequenceIndex,step:t.sequenceIndexStep,visible:t.sequenceVisible},wrap:!1,type:t.signalType});break;case"addParticipant":this.addActor(t.actor,t.actor,t.description,t.draw,t.config);break;case"addFutureParticipant":this.addActor(t.actor,t.actor,t.description,t.draw,t.config);{let r=this.state.records.actors.get(t.actor);r&&this.state.records.futureActors.add(r)}break;case"createParticipant":if(this.state.records.actors.has(t.actor)){let r=this.findFutureActorByName(t.actor);if(!r)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");let n=this.state.records.actors.get(t.actor);if(n&&n.type!==t.draw)throw new Error(`Future ${n.type} ${t.actor} must be created using 'create ${n.type} ${t.actor}'.`);this.state.records.futureActors.delete(r),this.state.records.lastCreated=n,this.state.records.createdActors.set(t.actor,this.state.records.messages.length);break}this.addActor(t.actor,t.actor,t.description,t.draw,t.config),this.state.records.lastCreated=this.state.records.actors.get(t.actor),this.state.records.createdActors.set(t.actor,this.state.records.messages.length);break;case"destroyParticipant":this.state.records.lastDestroyed=this.getActorOrNameRef(t.actor),this.state.records.destroyedActors.set(t.actor,this.state.records.messages.length);break;case"activeStart":this.addSignal(t.actor,void 0,void 0,t.signalType);break;case"centralConnection":this.addSignal(t.actor,void 0,void 0,t.signalType);break;case"centralConnectionReverse":this.addSignal(t.actor,void 0,void 0,t.signalType);break;case"activeEnd":this.addSignal(t.actor,void 0,void 0,t.signalType);break;case"addNote":this.addNote(t.actor,t.placement,t.text);break;case"addLinks":this.addLinks(t.actor,t.text);break;case"addALink":this.addALink(t.actor,t.text);break;case"addProperties":this.addProperties(t.actor,t.text);break;case"addDetails":this.addDetails(t.actor,t.text);break;case"addMessage":if(this.state.records.lastCreated){if(t.to!==this.state.records.lastCreated.name)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.createdActors.set(this.state.records.lastCreated.name,this.state.records.messages.length),this.state.records.lastCreated=void 0}else if(this.state.records.lastDestroyed){if(t.to!==this.state.records.lastDestroyed.name&&t.from!==this.state.records.lastDestroyed.name)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(t.from,t.to,t.msg,t.signalType,t.activate,t.centralConnection);break;case"boxStart":this.addBox(t.boxData);break;case"boxEnd":this.boxEnd();break;case"loopStart":this.addSignal(void 0,void 0,t.loopText,t.signalType);break;case"loopEnd":this.addSignal(void 0,void 0,void 0,t.signalType);break;case"rectStart":this.addSignal(void 0,void 0,t.color,t.signalType);break;case"rectEnd":this.addSignal(void 0,void 0,void 0,t.signalType);break;case"optStart":this.addSignal(void 0,void 0,t.optText,t.signalType);break;case"optEnd":this.addSignal(void 0,void 0,void 0,t.signalType);break;case"altStart":this.addSignal(void 0,void 0,t.altText,t.signalType);break;case"else":this.addSignal(void 0,void 0,t.altText,t.signalType);break;case"altEnd":this.addSignal(void 0,void 0,void 0,t.signalType);break;case"setAccTitle":Cr(t.text);break;case"parStart":this.addSignal(void 0,void 0,t.parText,t.signalType);break;case"and":this.addSignal(void 0,void 0,t.parText,t.signalType);break;case"parEnd":this.addSignal(void 0,void 0,void 0,t.signalType);break;case"criticalStart":this.addSignal(void 0,void 0,t.criticalText,t.signalType);break;case"option":this.addSignal(void 0,void 0,t.optionText,t.signalType);break;case"criticalEnd":this.addSignal(void 0,void 0,void 0,t.signalType);break;case"breakStart":this.addSignal(void 0,void 0,t.breakText,t.signalType);break;case"breakEnd":this.addSignal(void 0,void 0,void 0,t.signalType);break}}getConfig(){return Le().sequence}}});var Nxt,r6e,n6e=F(()=>{"use strict";Zt();Nxt=s(e=>{let t=e.dropShadow??"none",{look:r}=Le();return`.actor { + stroke: ${e.actorBorder}; + fill: ${e.actorBkg}; + stroke-width: ${e.strokeWidth??1}; + } + + rect.actor.outer-path[data-look="neo"] { + filter: ${t}; + } + + rect.note[data-look="neo"] { + stroke:${e.noteBorderColor}; + fill:${e.noteBkgColor}; + filter: ${t}; + } + + 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}; + } + + [id$="-arrowhead"] path { + fill: ${e.signalColor}; + stroke: ${e.signalColor}; + } + + .sequenceNumber { + fill: ${e.sequenceNumberColor}; + } + + [id$="-sequencenumber"] { + fill: ${e.signalColor}; + } + + [id$="-crosshead"] path { + fill: ${e.signalColor}; + stroke: ${e.signalColor}; + } + + .messageText { + fill: ${e.signalTextColor}; + stroke: none; + } + + .labelBox { + stroke: ${e.labelBoxBorderColor}; + fill: ${e.labelBoxBkgColor}; + filter: ${r==="neo"?t:"none"}; + } + + .labelText, .labelText > tspan { + fill: ${e.labelTextColor}; + stroke: none; + } + + .loopText, .loopText > tspan { + fill: ${e.loopTextColor}; + stroke: none; + } + + .sectionTitle, .sectionTitle > 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; + ${e.noteFontWeight?`font-weight: ${e.noteFontWeight};`:""} + } + + .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 circle, line { + fill: ${e.actorBkg}; + stroke-width: 2px; + } + + g rect.rect { + filter: ${t}; + stroke: ${e.nodeBorder}; + } +`},"getStyles"),r6e=Nxt});var fH,Wf,qf,Hf,Y6,Ig,_h,BC,Pxt,j6,$C,Mg,i6e,Jr,pH,Oxt,Bxt,$xt,Fxt,Gxt,zxt,Vxt,Wxt,qxt,Hxt,Uxt,Yxt,jxt,a6e,Xxt,Kxt,Zxt,Qxt,Jxt,ebt,tbt,rbt,s6e,nbt,Lh,ibt,abt,sbt,obt,lbt,Fn,o6e=F(()=>{"use strict";fH=Ms(d0(),1);mr();Qt();Gr();ud();Wf=36,qf="actor-top",Hf="actor-bottom",Y6="actor-box",Ig="actor-man",_h=new Set(["redux-color","redux-dark-color"]),BC=s(function(e,t){let r=Dp(e,t);return Lt().look==="neo"&&r.attr("data-look","neo"),r},"drawRect"),Pxt=s(function(e,t,r,n,i){if(t.links===void 0||t.links===null||Object.keys(t.links).length===0)return{height:0,width:0};let a=t.links,o=t.actorCnt,l=t.rectData;var u="none";i&&(u="block !important");let h=e.append("g");h.attr("id","actor"+o+"_popup"),h.attr("class","actorPopupMenu"),h.attr("display",u);var d="";l.class!==void 0&&(d=" "+l.class);let f=l.width>r?l.width:r,p=h.append("rect");if(p.attr("class","actorPopupMenuPanel"+d),p.attr("x",l.x),p.attr("y",l.height),p.attr("fill",l.fill),p.attr("stroke",l.stroke),p.attr("width",f),p.attr("height",l.height),p.attr("rx",l.rx),p.attr("ry",l.ry),a!=null){var m=20;for(let v in a){var g=h.append("a"),y=(0,fH.sanitizeUrl)(a[v]);g.attr("xlink:href",y),g.attr("target","_blank"),ibt(n)(v,g,l.x+10,l.height+m,f,20,{class:"actor"},n),m+=30}}return p.attr("height",m),{height:l.height+m,width:f}},"drawPopup"),j6=s(function(e){return"var pu = document.getElementById('"+e+"'); if (pu != null) { pu.style.display = pu.style.display == 'block' ? 'none' : 'block'; }"},"popupMenuToggle"),$C=s(async function(e,t,r=null){let n=e.append("foreignObject"),i=await l0(t.text,Lt()),o=n.append("xhtml:div").attr("style","width: fit-content;").attr("xmlns","http://www.w3.org/1999/xhtml").html(i).node().getBoundingClientRect();if(n.attr("height",Math.round(o.height)).attr("width",Math.round(o.width)),t.class==="noteText"){let l=e.node().firstChild;l.setAttribute("height",o.height+2*t.textMargin);let u=l.getBBox();n.attr("x",Math.round(u.x+u.width/2-o.width/2)).attr("y",Math.round(u.y+u.height/2-o.height/2))}else if(r){let{startx:l,stopx:u,starty:h}=r;if(l>u){let d=l;l=u,u=d}n.attr("x",Math.round(l+Math.abs(l-u)/2-o.width/2)),t.class==="loopText"?n.attr("y",Math.round(h)):n.attr("y",Math.round(h-o.height))}return[n]},"drawKatex"),Mg=s(function(e,t){let r=0,n=0,i=t.text.split(xt.lineBreakRegex),[a,o]=fs(t.fontSize),l=[],u=0,h=s(()=>t.y,"yfunc");if(t.valign!==void 0&&t.textMargin!==void 0&&t.textMargin>0)switch(t.valign){case"top":case"start":h=s(()=>Math.round(t.y+t.textMargin),"yfunc");break;case"middle":case"center":h=s(()=>Math.round(t.y+(r+n+t.textMargin)/2),"yfunc");break;case"bottom":case"end":h=s(()=>Math.round(t.y+(r+n+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[d,f]of i.entries()){t.textMargin!==void 0&&t.textMargin===0&&a!==void 0&&(u=d*a);let p=e.append("text");p.attr("x",t.x),p.attr("y",h()),t.anchor!==void 0&&p.attr("text-anchor",t.anchor).attr("dominant-baseline",t.dominantBaseline).attr("alignment-baseline",t.alignmentBaseline),t.fontFamily!==void 0&&p.style("font-family",t.fontFamily),o!==void 0&&p.style("font-size",o),t.fontWeight!==void 0&&p.style("font-weight",t.fontWeight),t.fill!==void 0&&p.attr("fill",t.fill),t.class!==void 0&&p.attr("class",t.class),t.dy!==void 0?p.attr("dy",t.dy):u!==0&&p.attr("dy",u);let m=f||NM;if(t.tspan){let g=p.append("tspan");g.attr("x",t.x),t.fill!==void 0&&g.attr("fill",t.fill),g.text(m)}else p.text(m);t.valign!==void 0&&t.textMargin!==void 0&&t.textMargin>0&&(n+=(p._groups||p)[0][0].getBBox().height,r=n),l.push(p)}return l},"drawText"),i6e=s(function(e,t){function r(i,a,o,l,u){return i+","+a+" "+(i+o)+","+a+" "+(i+o)+","+(a+l-u)+" "+(i+o-u*1.2)+","+(a+l)+" "+i+","+(a+l)}s(r,"genPoints");let n=e.append("polygon");return n.attr("points",r(t.x,t.y,t.width,t.height,7)),n.attr("class","labelBox"),t.y=t.y+t.height/2,Mg(e,t),n},"drawLabel"),Jr=-1,pH=s((e,t,r,n)=>{e.select&&r.forEach(i=>{let a=t.get(i),o=e.select("#actor"+a.actorCnt);!n.mirrorActors&&a.stopy?o.attr("y2",a.stopy+a.height/2):n.mirrorActors&&o.attr("y2",a.stopy)})},"fixLifeLineHeights"),Oxt=s(function(e,t,r,n,i){let a=n?t.stopy:t.starty,o=t.x+t.width/2,l=a+t.height,{look:u,theme:h,themeVariables:d}=r,{bkgColorArray:f,borderColorArray:p}=d,m=e.append("g").lower();var g=m;n||(Jr++,Object.keys(t.links||{}).length&&!r.forceMenus&&g.attr("onclick",j6(`actor${Jr}_popup`)).attr("cursor","pointer"),g.append("line").attr("id","actor"+Jr).attr("x1",o).attr("y1",l).attr("x2",o).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",t.name).attr("data-et","life-line").attr("data-id",t.name),g=m.append("g"),t.actorCnt=Jr,t.links!=null&&g.attr("id","root-"+Jr),u==="neo"&&g.attr("data-look","neo"));let y=Ra();var v="actor";t.properties?.class?v=t.properties.class:y.fill="#eaeaea",n?v+=` ${Hf}`:v+=` ${qf}`,y.x=t.x,y.y=a,y.width=t.width,y.height=t.height,y.class=v,y.rx=3,y.ry=3,y.name=t.name,u==="neo"&&(y.rx=6,y.ry=6);let x=BC(g,y),b=i.get(t.name)??0;if(_h.has(h)&&(x.style("stroke",p[b%p.length]),x.style("fill",f[b%p.length])),u==="neo"&&x.attr("filter","url(#drop-shadow)"),t.rectData=y,t.properties?.icon){let w=t.properties.icon.trim();w.charAt(0)==="@"?BS(g,y.x+y.width-20,y.y+10,w.substr(1)):OS(g,y.x+y.width-20,y.y+10,w)}n||(g.attr("data-et","participant"),g.attr("data-type","participant"),g.attr("data-id",t.name)),Lh(r,jn(t.description))(t.description,g,y.x,y.y,y.width,y.height,{class:`actor ${Y6}`},r);let T=t.height;if(x.node){let w=x.node().getBBox();t.height=w.height,T=w.height}return T},"drawActorTypeParticipant"),Bxt=s(function(e,t,r,n,i){let a=n?t.stopy:t.starty,o=t.x+t.width/2,l=a+t.height,{look:u,theme:h,themeVariables:d}=r,{bkgColorArray:f,borderColorArray:p}=d,m=e.append("g").lower();var g=m;n||(Jr++,Object.keys(t.links||{}).length&&!r.forceMenus&&g.attr("onclick",j6(`actor${Jr}_popup`)).attr("cursor","pointer"),g.append("line").attr("id","actor"+Jr).attr("x1",o).attr("y1",l).attr("x2",o).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",t.name).attr("data-et","life-line").attr("data-id",t.name),g=m.append("g"),t.actorCnt=Jr,t.links!=null&&g.attr("id","root-"+Jr),u==="neo"&&g.attr("data-look","neo"));let y=Ra();var v="actor";t.properties?.class?v=t.properties.class:y.fill="#eaeaea",n?v+=` ${Hf}`:v+=` ${qf}`,y.x=t.x,y.y=a,y.width=t.width,y.height=t.height,y.class=v,y.name=t.name;let x=6,b={...y,x:y.x+-x,y:y.y+ +x,class:"actor"},T=BC(g,y),w=BC(g,b);t.rectData=y,u==="neo"&&g.attr("filter","url(#drop-shadow)");let C=i.get(t.name)??0;if(_h.has(h)&&(T.style("stroke",p[C%p.length]),T.style("fill",f[C%p.length]),w.style("stroke",p[C%p.length]),w.style("fill",f[C%p.length])),t.properties?.icon){let S=t.properties.icon.trim();S.charAt(0)==="@"?BS(g,y.x+y.width-20,y.y+10,S.substr(1)):OS(g,y.x+y.width-20,y.y+10,S)}Lh(r,jn(t.description))(t.description,g,y.x-x,y.y+x,y.width,y.height,{class:`actor ${Y6}`},r);let k=t.height;if(T.node){let S=T.node().getBBox();t.height=S.height,k=S.height}return n||(g.attr("data-et","participant"),g.attr("data-type","collections"),g.attr("data-id",t.name)),k},"drawActorTypeCollections"),$xt=s(function(e,t,r,n,i){let a=n?t.stopy:t.starty,o=t.x+t.width/2,l=a+t.height,{look:u,theme:h,themeVariables:d}=r,{bkgColorArray:f,borderColorArray:p}=d,m=e.append("g").lower(),g=m;n||(Jr++,Object.keys(t.links||{}).length&&!r.forceMenus&&g.attr("onclick",j6(`actor${Jr}_popup`)).attr("cursor","pointer"),g.append("line").attr("id","actor"+Jr).attr("x1",o).attr("y1",l).attr("x2",o).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",t.name).attr("data-et","life-line").attr("data-id",t.name),g=m.append("g"),t.actorCnt=Jr,t.links!=null&&g.attr("id","root-"+Jr),u==="neo"&&g.attr("data-look","neo"));let y=Ra(),v="actor";t.properties?.class?v=t.properties.class:y.fill="#eaeaea",n?v+=` ${Hf}`:v+=` ${qf}`,g.attr("class",v),y.x=t.x,y.y=a,y.width=t.width,y.height=t.height,y.name=t.name;let x=y.height/2,b=x/(2.5+y.height/50),T=g.append("g"),w=g.append("g"),C=`M ${y.x},${y.y+x} + a ${b},${x} 0 0 0 0,${y.height} + h ${y.width-2*b} + a ${b},${x} 0 0 0 0,-${y.height} + Z + `;T.append("path").attr("d",C),w.append("path").attr("d",`M ${y.x},${y.y+x} + a ${b},${x} 0 0 0 0,${y.height}`),T.attr("transform",`translate(${b}, ${-(y.height/2)})`),w.attr("transform",`translate(${y.width-b}, ${-y.height/2})`),t.rectData=y,u==="neo"&&T.attr("filter","url(#drop-shadow)");let k=i.get(t.name)??0;if(_h.has(h)&&(T.style("stroke",p[k%p.length]),T.style("fill",f[k%p.length]),w.style("stroke",p[k%p.length]),w.style("fill",f[k%p.length])),t.properties?.icon){let M=t.properties.icon.trim(),N=y.x+y.width-20,D=y.y+10;M.charAt(0)==="@"?BS(g,N,D,M.substr(1)):OS(g,N,D,M)}Lh(r,jn(t.description))(t.description,g,y.x,y.y,y.width,y.height,{class:`actor ${Y6}`},r);let S=t.height,A=T.select("path:last-child");if(A.node()){let M=A.node().getBBox();t.height=M.height,S=M.height}return n||(g.attr("data-et","participant"),g.attr("data-type","queue"),g.attr("data-id",t.name)),S},"drawActorTypeQueue"),Fxt=s(function(e,t,r,n,i,a){let o=n?t.stopy:t.starty,l=t.x+t.width/2,u=o+75,{look:h,theme:d,themeVariables:f}=r,{bkgColorArray:p,borderColorArray:m,actorBorder:g,actorBkg:y}=f,v=e.append("g").lower();n||(Jr++,v.append("line").attr("id","actor"+Jr).attr("x1",l).attr("y1",u).attr("x2",l).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",t.name).attr("data-et","life-line").attr("data-id",t.name),t.actorCnt=Jr);let x=e.append("g"),b=Ig;n?b+=` ${Hf}`:b+=` ${qf}`,x.attr("class",b),x.attr("name",t.name);let T=Ra();T.x=t.x,T.y=o,T.fill="#eaeaea",T.width=t.width,T.height=t.height,T.class="actor";let w=t.x+t.width/2,C=o+32,k=22;x.append("defs").append("marker").attr("id",i+"-filled-head-control").attr("refX",11).attr("refY",5.8).attr("markerWidth",20).attr("markerHeight",28).attr("orient","172.5").attr("stroke-width",1.2).append("path").attr("d","M 14.4 5.6 L 7.2 10.4 L 8.8 5.6 L 7.2 0.8 Z"),x.append("circle").attr("cx",w).attr("cy",C).attr("r",k).attr("filter",`${h==="neo"?"url(#drop-shadow)":""}`),x.append("line").attr("marker-end","url(#"+i+"-filled-head-control)").attr("transform",`translate(${w}, ${C-k})`);let S=a.get(t.name)??0;_h.has(d)?(x.style("stroke",m[S%m.length]),x.style("fill",p[S%m.length])):(x.style("stroke",g),x.style("fill",y));let A=x.node().getBBox();return t.height=A.height+2*(r?.sequence?.labelBoxHeight??0),Lh(r,jn(t.description))(t.description,x,T.x,T.y+k+(n?5:12),T.width,T.height,{class:`actor ${Ig}`},r),n||(x.attr("data-et","participant"),x.attr("data-type","control"),x.attr("data-id",t.name)),t.height},"drawActorTypeControl"),Gxt=s(function(e,t,r,n,i){let a=n?t.stopy:t.starty,o=t.x+t.width/2,l=a+75,{look:u,theme:h,themeVariables:d}=r,{bkgColorArray:f,borderColorArray:p}=d,m=e.append("g").lower(),g=e.append("g"),y="actor";n?y+=` ${Hf}`:y+=` ${qf}`,g.attr("class",y),g.attr("name",t.name);let v=Ra();v.x=t.x,v.y=a,v.fill="#eaeaea",v.width=t.width,v.height=t.height,v.class="actor";let x=t.x+t.width/2,b=a+(n?10:25),T=22;g.append("circle").attr("cx",x).attr("cy",b).attr("r",T).attr("width",t.width).attr("height",t.height),g.append("line").attr("x1",x-T).attr("x2",x+T).attr("y1",b+T).attr("y2",b+T).attr("stroke-width",2),u==="neo"&&g.attr("filter","url(#drop-shadow)");let w=i.get(t.name)??0;_h.has(h)&&(g.style("stroke",p[w%p.length]),g.style("fill",f[w%p.length]));let C=g.node().getBBox();return t.height=C.height+(r?.sequence?.labelBoxHeight??0),n||(Jr++,m.append("line").attr("id","actor"+Jr).attr("x1",o).attr("y1",l).attr("x2",o).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",t.name).attr("data-et","life-line").attr("data-id",t.name),t.actorCnt=Jr),Lh(r,jn(t.description))(t.description,g,v.x,v.y+(n?15:30),v.width,v.height,{class:`actor ${Ig}`},r),n?g.attr("transform",`translate(0, ${T})`):(g.attr("transform",`translate(0, ${T/2-5})`),g.attr("data-et","participant"),g.attr("data-type","entity"),g.attr("data-id",t.name)),t.height},"drawActorTypeEntity"),zxt=s(function(e,t,r,n,i){let a=n?t.stopy:t.starty,o=t.x+t.width/2,l=a+t.height+2*r.boxTextMargin,{theme:u,themeVariables:h,look:d}=r,{bkgColorArray:f,borderColorArray:p,actorBorder:m}=h,g=e.append("g").lower(),y=g;n||(Jr++,Object.keys(t.links||{}).length&&!r.forceMenus&&y.attr("onclick",j6(`actor${Jr}_popup`)).attr("cursor","pointer"),y.append("line").attr("id","actor"+Jr).attr("x1",o).attr("y1",l).attr("x2",o).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",t.name).attr("data-et","life-line").attr("data-id",t.name),y=g.append("g"),t.actorCnt=Jr,t.links!=null&&y.attr("id","root-"+Jr),d==="neo"&&y.attr("data-look","neo"));let v=Ra(),x="actor";t.properties?.class?x=t.properties.class:v.fill="#eaeaea",n?x+=` ${Hf}`:x+=` ${qf}`,v.x=t.x,v.y=a,v.width=t.width,v.height=t.height,v.class=x,v.name=t.name,v.x=t.x,v.y=a;let b=v.width/3,T=v.width/3,w=b/2,C=w/(2.5+b/50),k=y.append("g");k.attr("class",x);let S=` + M ${v.x},${v.y+C} + a ${w},${C} 0 0 0 ${b},0 + a ${w},${C} 0 0 0 -${b},0 + l 0,${T-2*C} + a ${w},${C} 0 0 0 ${b},0 + l 0,-${T-2*C} +`;k.append("path").attr("d",S),d==="neo"&&k.attr("filter","url(#drop-shadow)");let A=i.get(t.name)??0;_h.has(u)?(k.style("stroke",p[A%p.length]),k.style("fill",f[A%p.length])):k.style("stroke",m),k.attr("transform",`translate(${b}, ${C})`),t.rectData=v,Lh(r,jn(t.description))(t.description,y,v.x,v.y+35,v.width,v.height,{class:`actor ${Y6}`},r);let M=k.select("path:last-child");if(M.node()){let N=M.node().getBBox();t.height=N.height+(r.sequence.labelBoxHeight??0)}return n||(y.attr("data-et","participant"),y.attr("data-type","database"),y.attr("data-id",t.name)),t.height},"drawActorTypeDatabase"),Vxt=s(function(e,t,r,n,i){let a=n?t.stopy:t.starty,o=t.x+t.width/2,l=a+80,u=22,h=e.append("g").lower(),{look:d,theme:f,themeVariables:p}=r,{bkgColorArray:m,borderColorArray:g,actorBorder:y}=p;n||(Jr++,h.append("line").attr("id","actor"+Jr).attr("x1",o).attr("y1",l).attr("x2",o).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",t.name).attr("data-et","life-line").attr("data-id",t.name),t.actorCnt=Jr);let v=e.append("g"),x=Ig;n?x+=` ${Hf}`:x+=` ${qf}`,v.attr("class",x),v.attr("name",t.name);let b=Ra();b.x=t.x,b.y=a,b.fill="#eaeaea",b.width=t.width,b.height=t.height,b.class="actor",v.append("line").attr("id","actor-man-torso"+Jr).attr("x1",t.x+t.width/2-u*2.5).attr("y1",a+12).attr("x2",t.x+t.width/2-15).attr("y2",a+12),v.append("line").attr("id","actor-man-arms"+Jr).attr("x1",t.x+t.width/2-u*2.5).attr("y1",a+2).attr("x2",t.x+t.width/2-u*2.5).attr("y2",a+22),v.append("circle").attr("cx",t.x+t.width/2).attr("cy",a+12).attr("r",u),d==="neo"&&v.attr("filter","url(#drop-shadow)");let T=i.get(t.name)??0;_h.has(f)?(v.style("stroke",g[T%g.length]),v.style("fill",m[T%g.length])):v.style("stroke",y);let w=v.node().getBBox();return t.height=w.height+(r.sequence.labelBoxHeight??0),Lh(r,jn(t.description))(t.description,v,b.x,b.y+15,b.width,b.height,{class:`actor ${Ig}`},r),v.attr("transform",`translate(0,${u/2+10})`),n||(v.attr("data-et","participant"),v.attr("data-type","boundary"),v.attr("data-id",t.name)),t.height},"drawActorTypeBoundary"),Wxt=s(function(e,t,r,n,i){let a=n?t.stopy:t.starty,o=t.x+t.width/2,l=a+80,{look:u,theme:h,themeVariables:d}=r,{bkgColorArray:f,borderColorArray:p,actorBorder:m}=d,g=e.append("g").lower();n||(Jr++,g.append("line").attr("id","actor"+Jr).attr("x1",o).attr("y1",l).attr("x2",o).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",t.name).attr("data-et","life-line").attr("data-id",t.name),t.actorCnt=Jr);let y=e.append("g"),v=Ig;n?v+=` ${Hf}`:v+=` ${qf}`,y.attr("class",v),y.attr("name",t.name),n||y.attr("data-et","participant").attr("data-type","actor").attr("data-id",t.name);let x=u==="neo"?.5:1,b=u==="neo"?a+(1-x)*30:a;y.append("line").attr("id","actor-man-torso"+Jr).attr("x1",o).attr("y1",b+25*x).attr("x2",o).attr("y2",b+45*x),y.append("line").attr("id","actor-man-arms"+Jr).attr("x1",o-Wf/2*x).attr("y1",b+33*x).attr("x2",o+Wf/2*x).attr("y2",b+33*x),y.append("line").attr("x1",o-Wf/2*x).attr("y1",b+60*x).attr("x2",o).attr("y2",b+45*x),y.append("line").attr("x1",o).attr("y1",b+45*x).attr("x2",o+(Wf/2-2)*x).attr("y2",b+60*x);let T=y.append("circle");T.attr("cx",t.x+t.width/2),T.attr("cy",b+10*x),T.attr("r",15*x),T.attr("width",t.width*x),T.attr("height",t.height*x);let w=y.node().getBBox();t.height=w.height;let C=Ra();C.x=t.x,C.y=b,C.fill="#eaeaea",C.width=t.width,C.height=t.height/x,C.class="actor",C.rx=3,C.ry=3;let k=i.get(t.name)??0;return _h.has(h)?(y.style("stroke",p[k%p.length]),y.style("fill",f[k%p.length])):y.style("stroke",m),Lh(r,jn(t.description))(t.description,y,C.x,b+35*x-(u==="neo"?10:0),C.width,C.height,{class:`actor ${Ig}`},r),t.height},"drawActorTypeActor"),qxt=s(async function(e,t,r,n,i,a,o){let l=o??new Map([...a.db.getActors().values()].map((u,h)=>[u.name,h]));switch(t.type){case"actor":return await Wxt(e,t,r,n,l);case"participant":return await Oxt(e,t,r,n,l);case"boundary":return await Vxt(e,t,r,n,l);case"control":return await Fxt(e,t,r,n,i,l);case"entity":return await Gxt(e,t,r,n,l);case"database":return await zxt(e,t,r,n,l);case"collections":return await Bxt(e,t,r,n,l);case"queue":return await $xt(e,t,r,n,l)}},"drawActor"),Hxt=s(function(e,t,r){let i=e.append("g");a6e(i,t),t.name&&Lh(r)(t.name,i,t.x,t.y+r.boxTextMargin+(t.textMaxHeight||0)/2,t.width,0,{class:"text"},r),i.lower()},"drawBox"),Uxt=s(function(e){return e.append("g")},"anchorElement"),Yxt=s(function(e,t,r,n,i,a,o){let{theme:l,themeVariables:u}=n,{bkgColorArray:h,borderColorArray:d,mainBkg:f}=u,p=Ra(),m=t.anchored,g=t.actor;p.x=t.startx,p.y=t.starty,p.class="activation"+i%3,p.width=t.stopx-t.startx,p.height=r-t.starty;let y=BC(m,p),x=(o??new Map([...a.db.getActors().values()].map((b,T)=>[b.name,T]))).get(g)??0;_h.has(l)&&(y.style("stroke",d[x%d.length]),y.style("fill",h[x%d.length]??f))},"drawActivation"),jxt=s(async function(e,t,r,n,i){let{boxMargin:a,boxTextMargin:o,labelBoxHeight:l,labelBoxWidth:u,messageFontFamily:h,messageFontSize:d,messageFontWeight:f}=n,p=e.append("g").attr("data-et","control-structure").attr("data-id","i"+i.id),m=s(function(v,x,b,T){return p.append("line").attr("x1",v).attr("y1",x).attr("x2",b).attr("y2",T).attr("class","loopLine")},"drawLoopLine");m(t.startx,t.starty,t.stopx,t.starty),m(t.stopx,t.starty,t.stopx,t.stopy),m(t.startx,t.stopy,t.stopx,t.stopy),m(t.startx,t.starty,t.startx,t.stopy),t.sections!==void 0&&t.sections.forEach(function(v){m(t.startx,v.y,t.stopx,v.y).style("stroke-dasharray","3, 3")});let g=xb();g.text=r,g.x=t.startx,g.y=t.starty,g.fontFamily=h,g.fontSize=d,g.fontWeight=f,g.anchor="middle",g.valign="middle",g.tspan=!1,g.width=Math.max(u??0,50),g.height=l+(n.look==="neo"?15:0)||20,g.textMargin=o,g.class="labelText",i6e(p,g),g=s6e(),g.text=t.title,g.x=t.startx+u/2+(t.stopx-t.startx)/2,g.y=t.starty+a+o,g.anchor="middle",g.valign="middle",g.textMargin=o,g.class="loopText",g.fontFamily=h,g.fontSize=d,g.fontWeight=f,g.wrap=!0;let y=jn(g.text)?await $C(p,g,t):Mg(p,g);if(t.sectionTitles!==void 0){for(let[v,x]of Object.entries(t.sectionTitles))if(x.message){g.text=x.message,g.x=t.startx+(t.stopx-t.startx)/2,g.y=t.sections[v].y+a+o,g.class="sectionTitle",g.anchor="middle",g.valign="middle",g.tspan=!1,g.fontFamily=h,g.fontSize=d,g.fontWeight=f,g.wrap=t.wrap,jn(g.text)?(t.starty=t.sections[v].y,await $C(p,g,t)):Mg(p,g);let b=Math.round(y.map(T=>(T._groups||T)[0][0].getBBox().height).reduce((T,w)=>T+w));t.sections[v].height+=b-(a+o)}}return t.height=Math.round(t.stopy-t.starty),p},"drawLoop"),a6e=s(function(e,t){PS(e,t)},"drawBackgroundRect"),Xxt=s(function(e,t){e.append("defs").append("symbol").attr("id",t+"-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"),Kxt=s(function(e,t){e.append("defs").append("symbol").attr("id",t+"-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"),Zxt=s(function(e,t){e.append("defs").append("symbol").attr("id",t+"-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"),Qxt=s(function(e,t){e.append("defs").append("marker").attr("id",t+"-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"),Jxt=s(function(e,t){e.append("defs").append("marker").attr("id",t+"-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"),ebt=s(function(e,t){e.append("defs").append("marker").attr("id",t+"-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"),tbt=s(function(e,t){e.append("defs").append("marker").attr("id",t+"-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"),rbt=s(function(e,t){let{theme:r}=t;e.append("defs").append("filter").attr("id","drop-shadow").attr("height","130%").attr("width","130%").append("feDropShadow").attr("dx","4").attr("dy","4").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",`${r==="redux"||r==="redux-color"?"#000000":"#FFFFFF"}`)},"insertDropShadow"),s6e=s(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"),nbt=s(function(){return{x:0,y:0,fill:"#EDF2AE",stroke:"#666",width:100,anchor:"start",height:100,rx:0,ry:0}},"getNoteRect"),Lh=(function(){function e(a,o,l,u,h,d,f){let p=o.append("text").attr("x",l+h/2).attr("y",u+d/2+5).style("text-anchor","middle").text(a);i(p,f)}s(e,"byText");function t(a,o,l,u,h,d,f,p){let{actorFontSize:m,actorFontFamily:g,actorFontWeight:y}=p,[v,x]=fs(m),b=a.split(xt.lineBreakRegex);for(let T=0;T{let o=Ng(je),l=a.actorKeys.reduce((f,p)=>f+=e.get(p).width+(e.get(p).margin||0),0),u=je.boxMargin*8;l+=u,l-=2*je.boxTextMargin,a.wrap&&(a.name=sr.wrapLabel(a.name,l-2*je.wrapPadding,o));let h=sr.calculateTextDimensions(a.name,o);i=xt.getMax(h.height,i);let d=xt.getMax(l,h.width+2*je.wrapPadding);if(a.margin=je.boxTextMargin,la.textMaxHeight=i),xt.getMax(n,je.height)}var je,Rt,cbt,l6e,Ng,hv,gH,hbt,dbt,yH,u6e,h6e,X6,c6e,pbt,gbt,vbt,xbt,bbt,mH,Tbt,d6e,Cbt,kbt,wbt,f6e,p6e=F(()=>{"use strict";$r();o6e();Tt();Gr();Gr();ud();Zt();Xg();Qt();Dn();dH();je={},Rt={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],activations:[],models:{getHeight:s(function(){return Math.max.apply(null,this.actors.length===0?[0]:this.actors.map(e=>e.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:s(function(){this.actors=[],this.boxes=[],this.loops=[],this.messages=[],this.notes=[]},"clear"),addBox:s(function(e){this.boxes.push(e)},"addBox"),addActor:s(function(e){this.actors.push(e)},"addActor"),addLoop:s(function(e){this.loops.push(e)},"addLoop"),addMessage:s(function(e){this.messages.push(e)},"addMessage"),addNote:s(function(e){this.notes.push(e)},"addNote"),lastActor:s(function(){return this.actors[this.actors.length-1]},"lastActor"),lastLoop:s(function(){return this.loops[this.loops.length-1]},"lastLoop"),lastMessage:s(function(){return this.messages[this.messages.length-1]},"lastMessage"),lastNote:s(function(){return this.notes[this.notes.length-1]},"lastNote"),actors:[],boxes:[],loops:[],messages:[],notes:[]},init:s(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,h6e(Le())},"init"),updateVal:s(function(e,t,r,n){e[t]===void 0?e[t]=r:e[t]=n(r,e[t])},"updateVal"),updateBounds:s(function(e,t,r,n){let i=this,a=0;function o(l){return s(function(h){a++;let d=i.sequenceItems.length-a+1;i.updateVal(h,"starty",t-d*je.boxMargin,Math.min),i.updateVal(h,"stopy",n+d*je.boxMargin,Math.max),i.updateVal(Rt.data,"startx",e-d*je.boxMargin,Math.min),i.updateVal(Rt.data,"stopx",r+d*je.boxMargin,Math.max),l!=="activation"&&(i.updateVal(h,"startx",e-d*je.boxMargin,Math.min),i.updateVal(h,"stopx",r+d*je.boxMargin,Math.max),i.updateVal(Rt.data,"starty",t-d*je.boxMargin,Math.min),i.updateVal(Rt.data,"stopy",n+d*je.boxMargin,Math.max))},"updateItemBounds")}s(o,"updateFn"),this.sequenceItems.forEach(o()),this.activations.forEach(o("activation"))},"updateBounds"),insert:s(function(e,t,r,n){let i=xt.getMin(e,r),a=xt.getMax(e,r),o=xt.getMin(t,n),l=xt.getMax(t,n);this.updateVal(Rt.data,"startx",i,Math.min),this.updateVal(Rt.data,"starty",o,Math.min),this.updateVal(Rt.data,"stopx",a,Math.max),this.updateVal(Rt.data,"stopy",l,Math.max),this.updateBounds(i,o,a,l)},"insert"),newActivation:s(function(e,t,r){let n=r.get(e.from),i=X6(e.from).length||0,a=n.x+n.width/2+(i-1)*je.activationWidth/2;this.activations.push({startx:a,starty:this.verticalPos+2,stopx:a+je.activationWidth,stopy:void 0,actor:e.from,anchored:Fn.anchorElement(t)})},"newActivation"),endActivation:s(function(e){let t=this.activations.map(function(r){return r.actor}).lastIndexOf(e.from);return this.activations.splice(t,1)[0]},"endActivation"),createLoop:s(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:s(function(e={message:void 0,wrap:!1,width:void 0},t){this.sequenceItems.push(this.createLoop(e,t))},"newLoop"),endLoop:s(function(){return this.sequenceItems.pop()},"endLoop"),isLoopOverlap:s(function(){return this.sequenceItems.length?this.sequenceItems[this.sequenceItems.length-1].overlap:!1},"isLoopOverlap"),addSectionToLoop:s(function(e){let t=this.sequenceItems.pop();t.sections=t.sections||[],t.sectionTitles=t.sectionTitles||[],t.sections.push({y:Rt.getVerticalPos(),height:0}),t.sectionTitles.push(e),this.sequenceItems.push(t)},"addSectionToLoop"),saveVerticalPos:s(function(){this.isLoopOverlap()&&(this.savedVerticalPos=this.verticalPos)},"saveVerticalPos"),resetVerticalPos:s(function(){this.isLoopOverlap()&&(this.verticalPos=this.savedVerticalPos)},"resetVerticalPos"),bumpVerticalPos:s(function(e){this.verticalPos=this.verticalPos+e,this.data.stopy=xt.getMax(this.data.stopy,this.verticalPos)},"bumpVerticalPos"),getVerticalPos:s(function(){return this.verticalPos},"getVerticalPos"),getBounds:s(function(){return{bounds:this.data,models:this.models}},"getBounds")},cbt=s(async function(e,t,r){Rt.bumpVerticalPos(je.boxMargin),t.height=je.boxMargin,t.starty=Rt.getVerticalPos();let n=Ra();n.x=t.startx,n.y=t.starty,n.width=t.width||je.width,n.class="note";let i=e.append("g");i.attr("data-et","note"),i.attr("data-id","i"+r);let a=Fn.drawRect(i,n),o=xb();o.x=t.startx,o.y=t.starty,o.width=n.width,o.dy="1em",o.text=t.message,o.class="noteText",o.fontFamily=je.noteFontFamily,o.fontSize=je.noteFontSize,o.fontWeight=je.noteFontWeight,o.anchor=je.noteAlign,o.textMargin=je.noteMargin,o.valign="center";let l=jn(o.text)?await $C(i,o):Mg(i,o),u=Math.round(l.map(h=>(h._groups||h)[0][0].getBBox().height).reduce((h,d)=>h+d));a.attr("height",u+2*je.noteMargin),t.height+=u+2*je.noteMargin,Rt.bumpVerticalPos(u+2*je.noteMargin),t.stopy=t.starty+u+2*je.noteMargin,t.stopx=t.startx+n.width,Rt.insert(t.startx,t.starty,t.stopx,t.stopy),Rt.models.addNote(t)},"drawNote"),l6e=s(function(e,t,r,n,i,a,o){let l=n.db.getActors(),u=l.get(t.from),h=l.get(t.to),d=r.sequenceVisible,f=u.x+u.width/2,p=h.x+h.width/2,m=f<=p,g=d6e(t,n),y=e.append("g"),v=16.5,x=s((k,S)=>{let A=k?v:-v;return S?-A:A},"getCircleOffset"),b=s(k=>{y.append("circle").attr("cx",k).attr("cy",o).attr("r",5).attr("width",10).attr("height",10)},"drawCircle"),{CENTRAL_CONNECTION:T,CENTRAL_CONNECTION_REVERSE:w,CENTRAL_CONNECTION_DUAL:C}=n.db.LINETYPE;if(d)switch(t.centralConnection){case T:g&&(p+=x(m,!0));break;case w:g||(f+=x(m,!1));break;case C:g?p+=x(m,!0):f+=x(m,!1);break}switch(t.centralConnection){case T:b(p);break;case w:b(f);break;case C:b(f),b(p);break}},"drawCentralConnection"),Ng=s(e=>({fontFamily:e.messageFontFamily,fontSize:e.messageFontSize,fontWeight:e.messageFontWeight}),"messageFont"),hv=s(e=>({fontFamily:e.noteFontFamily,fontSize:e.noteFontSize,fontWeight:e.noteFontWeight}),"noteFont"),gH=s(e=>({fontFamily:e.actorFontFamily,fontSize:e.actorFontSize,fontWeight:e.actorFontWeight}),"actorFont");s(ubt,"boundMessage");hbt=s(async function(e,t,r,n,i,a){let{startx:o,stopx:l,starty:u,message:h,type:d,sequenceIndex:f,sequenceVisible:p}=t,m=sr.calculateTextDimensions(h,Ng(je)),g=xb();g.x=Math.min(o,l),g.y=u+10,g.width=Math.abs(l-o),g.class="messageText",g.dy="1em",g.text=h,g.fontFamily=je.messageFontFamily,g.fontSize=je.messageFontSize,g.fontWeight=je.messageFontWeight,g.anchor=je.messageAlign,g.valign="center",g.textMargin=je.wrapPadding,g.tspan=!1,jn(g.text)?await $C(e,g,{startx:o,stopx:l,starty:r}):Mg(e,g);let y=m.width,v;if(o===l){let b=p||je.showSequenceNumbers,T=d6e(i,n),w=Cbt(i,n),C=o+(b&&(T||w)?10:0);je.rightAngles?v=e.append("path").attr("d",`M ${C},${r} H ${o+xt.getMax(je.width/2,y/2)} V ${r+25} H ${o}`):v=e.append("path").attr("d","M "+C+","+r+" C "+(C+60)+","+(r-10)+" "+(o+60)+","+(r+30)+" "+o+","+(r+20)),mH(i,n)&&l6e(e,i,t,n,o,l,r)}else v=e.append("line"),v.attr("x1",o),v.attr("y1",r),v.attr("x2",l),v.attr("y2",r),mH(i,n)&&l6e(e,i,t,n,o,l,r);d===n.db.LINETYPE.DOTTED||d===n.db.LINETYPE.DOTTED_CROSS||d===n.db.LINETYPE.DOTTED_POINT||d===n.db.LINETYPE.DOTTED_OPEN||d===n.db.LINETYPE.BIDIRECTIONAL_DOTTED||d===n.db.LINETYPE.SOLID_TOP_DOTTED||d===n.db.LINETYPE.SOLID_BOTTOM_DOTTED||d===n.db.LINETYPE.STICK_TOP_DOTTED||d===n.db.LINETYPE.STICK_BOTTOM_DOTTED||d===n.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED||d===n.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED||d===n.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED||d===n.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED?(v.style("stroke-dasharray","3, 3"),v.attr("class","messageLine1")):v.attr("class","messageLine0"),v.attr("data-et","message"),v.attr("data-id","i"+t.id),v.attr("data-from",t.from),v.attr("data-to",t.to);let x="";if(je.arrowMarkerAbsolute&&(x=gx(!0)),v.attr("stroke-width",2),v.attr("stroke","none"),v.style("fill","none"),(d===n.db.LINETYPE.SOLID_TOP||d===n.db.LINETYPE.SOLID_TOP_DOTTED)&&v.attr("marker-end","url("+x+"#"+a+"-solidTopArrowHead)"),(d===n.db.LINETYPE.SOLID_BOTTOM||d===n.db.LINETYPE.SOLID_BOTTOM_DOTTED)&&v.attr("marker-end","url("+x+"#"+a+"-solidBottomArrowHead)"),(d===n.db.LINETYPE.STICK_TOP||d===n.db.LINETYPE.STICK_TOP_DOTTED)&&v.attr("marker-end","url("+x+"#"+a+"-stickTopArrowHead)"),(d===n.db.LINETYPE.STICK_BOTTOM||d===n.db.LINETYPE.STICK_BOTTOM_DOTTED)&&v.attr("marker-end","url("+x+"#"+a+"-stickBottomArrowHead)"),(d===n.db.LINETYPE.SOLID_ARROW_TOP_REVERSE||d===n.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED)&&v.attr("marker-start","url("+x+"#"+a+"-solidBottomArrowHead)"),(d===n.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE||d===n.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED)&&v.attr("marker-start","url("+x+"#"+a+"-solidTopArrowHead)"),(d===n.db.LINETYPE.STICK_ARROW_TOP_REVERSE||d===n.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED)&&v.attr("marker-start","url("+x+"#"+a+"-stickBottomArrowHead)"),(d===n.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE||d===n.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED)&&v.attr("marker-start","url("+x+"#"+a+"-stickTopArrowHead)"),(d===n.db.LINETYPE.SOLID||d===n.db.LINETYPE.DOTTED)&&v.attr("marker-end","url("+x+"#"+a+"-arrowhead)"),(d===n.db.LINETYPE.BIDIRECTIONAL_SOLID||d===n.db.LINETYPE.BIDIRECTIONAL_DOTTED)&&(v.attr("marker-start","url("+x+"#"+a+"-arrowhead)"),v.attr("marker-end","url("+x+"#"+a+"-arrowhead)")),(d===n.db.LINETYPE.SOLID_POINT||d===n.db.LINETYPE.DOTTED_POINT)&&v.attr("marker-end","url("+x+"#"+a+"-filled-head)"),(d===n.db.LINETYPE.SOLID_CROSS||d===n.db.LINETYPE.DOTTED_CROSS)&&v.attr("marker-end","url("+x+"#"+a+"-crosshead)"),p||je.showSequenceNumbers){let b=d===n.db.LINETYPE.BIDIRECTIONAL_SOLID||d===n.db.LINETYPE.BIDIRECTIONAL_DOTTED,T=d===n.db.LINETYPE.SOLID_ARROW_TOP_REVERSE||d===n.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED||d===n.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE||d===n.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED||d===n.db.LINETYPE.STICK_ARROW_TOP_REVERSE||d===n.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED||d===n.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE||d===n.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED,w=6,C=mH(i,n),k=o,S=l;b?(oo?S=l-2*w:(S=l-w,k+=i?.centralConnection===n.db.LINETYPE.CENTRAL_CONNECTION_DUAL||i?.centralConnection===n.db.LINETYPE.CENTRAL_CONNECTION_REVERSE?-7.5:0),S+=C?15:0,v.attr("x2",S),v.attr("x1",k)):v.attr("x1",o+w);let A=0,M=o===l,N=o<=l;M?A=t.fromBounds+1:T?A=N?t.toBounds-1:t.fromBounds+1:A=N?t.fromBounds+1:t.toBounds-1;let D="12px",R=f.toString().length;R>5?D="7px":R>3&&(D="9px"),e.append("line").attr("x1",A).attr("y1",r).attr("x2",A).attr("y2",r).attr("stroke-width",0).attr("marker-start","url("+x+"#"+a+"-sequencenumber)"),e.append("text").attr("x",A).attr("y",r+4).attr("font-family","sans-serif").attr("font-size",D).attr("text-anchor","middle").attr("class","sequenceNumber").text(f)}},"drawMessage"),dbt=s(function(e,t,r,n,i,a,o){let l=0,u=0,h,d=0;for(let f of n){let p=t.get(f),m=p.box;h&&h!=m&&(o||Rt.models.addBox(h),u+=je.boxMargin+h.margin),m&&m!=h&&(o||(m.x=l+u,m.y=i),u+=m.margin),p.width=xt.getMax(p.width||je.width,je.width),p.height=xt.getMax(p.height||je.height,je.height),p.margin=p.margin||je.actorMargin,d=xt.getMax(d,p.height),r.get(p.name)&&(u+=p.width/2),p.x=l+u,p.starty=Rt.getVerticalPos(),Rt.insert(p.x,i,p.x+p.width,p.height),l+=p.width+u,p.box&&(p.box.width=l+m.margin-p.box.x),u=p.margin,h=p.box,Rt.models.addActor(p)}h&&!o&&Rt.models.addBox(h),Rt.bumpVerticalPos(d)},"addActorRenderingData"),yH=s(async function(e,t,r,n,i,a,o){if(n){let l=0;Rt.bumpVerticalPos(je.boxMargin*2);for(let u of r){let h=t.get(u);h.stopy||(h.stopy=Rt.getVerticalPos());let d=await Fn.drawActor(e,h,je,!0,i,a,o);l=xt.getMax(l,d)}Rt.bumpVerticalPos(l+je.boxMargin)}else for(let l of r){let u=t.get(l);await Fn.drawActor(e,u,je,!1,i,a,o)}},"drawActors"),u6e=s(function(e,t,r,n){let i=0,a=0;for(let o of r){let l=t.get(o),u=gbt(l),h=Fn.drawPopup(e,l,u,je,je.forceMenus,n);h.height>i&&(i=h.height),h.width+l.x>a&&(a=h.width+l.x)}return{maxHeight:i,maxWidth:a}},"drawActorsPopup"),h6e=s(function(e){Gn(je,e),e.fontFamily&&(je.actorFontFamily=je.noteFontFamily=je.messageFontFamily=e.fontFamily),e.fontSize&&(je.actorFontSize=je.noteFontSize=je.messageFontSize=e.fontSize),e.fontWeight&&(je.actorFontWeight=je.noteFontWeight=je.messageFontWeight=e.fontWeight)},"setConf"),X6=s(function(e){return Rt.activations.filter(function(t){return t.actor===e})},"actorActivations"),c6e=s(function(e,t){let r=t.get(e),n=X6(e),i=n.reduce(function(o,l){return xt.getMin(o,l.startx)},r.x+r.width/2-1),a=n.reduce(function(o,l){return xt.getMax(o,l.stopx)},r.x+r.width/2+1);return[i,a]},"activationBounds");s(uu,"adjustLoopHeightForWrap");s(fbt,"adjustCreatedDestroyedData");pbt=s(async function(e,t,r,n){let{securityLevel:i,sequence:a,look:o,themeVariables:l}=Le();je=a;let u;i==="sandbox"&&(u=lt("#i"+t));let h=i==="sandbox"?lt(u.nodes()[0].contentDocument.body):lt("body"),d=i==="sandbox"?u.nodes()[0].contentDocument:document;Rt.init(),te.debug(n.db);let f=i==="sandbox"?h.select(`[id="${t}"]`):lt(`[id="${t}"]`),p=n.db.getActors(),m=n.db.getCreatedActors(),g=n.db.getDestroyedActors(),y=n.db.getBoxes(),v=n.db.getActorKeys(),x=n.db.getMessages(),b=n.db.getDiagramTitle(),T=n.db.hasAtLeastOneBox(),w=n.db.hasAtLeastOneBoxWithTitle(),C=await mbt(p,x,n);if(je.height=await ybt(p,C,y),Fn.insertComputerIcon(f,t),Fn.insertDatabaseIcon(f,t),Fn.insertClockIcon(f,t),T&&(Rt.bumpVerticalPos(je.boxMargin),w&&Rt.bumpVerticalPos(y[0].textMaxHeight)),je.hideUnusedParticipants===!0){let z=new Set;x.forEach(W=>{z.add(W.from),z.add(W.to)}),v=v.filter(W=>z.has(W))}let k=new Map(v.map((z,W)=>[p.get(z)?.name??z,W]));dbt(f,p,m,v,0,x,!1);let S=await wbt(x,p,C,n);Fn.insertArrowHead(f,t),Fn.insertArrowCrossHead(f,t),Fn.insertArrowFilledHead(f,t),Fn.insertSequenceNumber(f,t),Fn.insertSolidTopArrowHead(f,t),Fn.insertSolidBottomArrowHead(f,t),Fn.insertStickTopArrowHead(f,t),Fn.insertStickBottomArrowHead(f,t),o==="neo"&&Fn.insertDropShadow(f,je);function A(z,W){let H=Rt.endActivation(z);H.starty+18>W&&(H.starty=W-6,W+=12),Fn.drawActivation(f,H,W,je,X6(z.from).length,n,k),Rt.insert(H.startx,W-10,H.stopx,W)}s(A,"activeEnd");let M=1,N=1,D=[],R=[],E=0;for(let z of x){let W,H,j;switch(z.type){case n.db.LINETYPE.NOTE:Rt.resetVerticalPos(),H=z.noteModel,await cbt(f,H,z.id);break;case n.db.LINETYPE.ACTIVE_START:Rt.newActivation(z,f,p);break;case n.db.LINETYPE.CENTRAL_CONNECTION:Rt.newActivation(z,f,p);break;case n.db.LINETYPE.CENTRAL_CONNECTION_REVERSE:Rt.newActivation(z,f,p);break;case n.db.LINETYPE.ACTIVE_END:A(z,Rt.getVerticalPos());break;case n.db.LINETYPE.LOOP_START:uu(S,z,je.boxMargin,je.boxMargin+je.boxTextMargin,Q=>Rt.newLoop(Q));break;case n.db.LINETYPE.LOOP_END:W=Rt.endLoop(),await Fn.drawLoop(f,W,"loop",je,z),Rt.bumpVerticalPos(W.stopy-Rt.getVerticalPos()),Rt.models.addLoop(W);break;case n.db.LINETYPE.RECT_START:uu(S,z,je.boxMargin,je.boxMargin,Q=>{let U=Q.message;U||(U=l?.rectBkgColor||l?.actorBkg||"rgba(128, 128, 128, 0.5)"),Rt.newLoop(void 0,U)});break;case n.db.LINETYPE.RECT_END:W=Rt.endLoop(),R.push(W),Rt.models.addLoop(W),Rt.bumpVerticalPos(W.stopy-Rt.getVerticalPos());break;case n.db.LINETYPE.OPT_START:uu(S,z,je.boxMargin,je.boxMargin+je.boxTextMargin,Q=>Rt.newLoop(Q));break;case n.db.LINETYPE.OPT_END:W=Rt.endLoop(),await Fn.drawLoop(f,W,"opt",je,z),Rt.bumpVerticalPos(W.stopy-Rt.getVerticalPos()),Rt.models.addLoop(W);break;case n.db.LINETYPE.ALT_START:uu(S,z,je.boxMargin,je.boxMargin+je.boxTextMargin,Q=>Rt.newLoop(Q));break;case n.db.LINETYPE.ALT_ELSE:uu(S,z,je.boxMargin+je.boxTextMargin,je.boxMargin,Q=>Rt.addSectionToLoop(Q));break;case n.db.LINETYPE.ALT_END:W=Rt.endLoop(),await Fn.drawLoop(f,W,"alt",je,z),Rt.bumpVerticalPos(W.stopy-Rt.getVerticalPos()),Rt.models.addLoop(W);break;case n.db.LINETYPE.PAR_START:case n.db.LINETYPE.PAR_OVER_START:uu(S,z,je.boxMargin,je.boxMargin+je.boxTextMargin,Q=>Rt.newLoop(Q)),Rt.saveVerticalPos();break;case n.db.LINETYPE.PAR_AND:uu(S,z,je.boxMargin+je.boxTextMargin,je.boxMargin,Q=>Rt.addSectionToLoop(Q));break;case n.db.LINETYPE.PAR_END:W=Rt.endLoop(),await Fn.drawLoop(f,W,"par",je,z),Rt.bumpVerticalPos(W.stopy-Rt.getVerticalPos()),Rt.models.addLoop(W);break;case n.db.LINETYPE.AUTONUMBER:M=z.message.start||M,N=z.message.step||N,z.message.visible?n.db.enableSequenceNumbers():n.db.disableSequenceNumbers();break;case n.db.LINETYPE.CRITICAL_START:uu(S,z,je.boxMargin,je.boxMargin+je.boxTextMargin,Q=>Rt.newLoop(Q));break;case n.db.LINETYPE.CRITICAL_OPTION:uu(S,z,je.boxMargin+je.boxTextMargin,je.boxMargin,Q=>Rt.addSectionToLoop(Q));break;case n.db.LINETYPE.CRITICAL_END:W=Rt.endLoop(),await Fn.drawLoop(f,W,"critical",je,z),Rt.bumpVerticalPos(W.stopy-Rt.getVerticalPos()),Rt.models.addLoop(W);break;case n.db.LINETYPE.BREAK_START:uu(S,z,je.boxMargin,je.boxMargin+je.boxTextMargin,Q=>Rt.newLoop(Q));break;case n.db.LINETYPE.BREAK_END:W=Rt.endLoop(),await Fn.drawLoop(f,W,"break",je,z),Rt.bumpVerticalPos(W.stopy-Rt.getVerticalPos()),Rt.models.addLoop(W);break;default:try{j=z.msgModel,j.starty=Rt.getVerticalPos(),j.sequenceIndex=M,j.sequenceVisible=n.db.showSequenceNumbers(),j.id=z.id,j.from=z.from,j.to=z.to;let Q=await ubt(f,j);fbt(z,j,Q,E,p,m,g),D.push({messageModel:j,lineStartY:Q,msg:z}),Rt.models.addMessage(j)}catch(Q){te.error("error while drawing message",Q)}}[n.db.LINETYPE.SOLID_OPEN,n.db.LINETYPE.DOTTED_OPEN,n.db.LINETYPE.SOLID,n.db.LINETYPE.SOLID_TOP,n.db.LINETYPE.SOLID_BOTTOM,n.db.LINETYPE.STICK_TOP,n.db.LINETYPE.STICK_BOTTOM,n.db.LINETYPE.SOLID_TOP_DOTTED,n.db.LINETYPE.SOLID_BOTTOM_DOTTED,n.db.LINETYPE.STICK_TOP_DOTTED,n.db.LINETYPE.STICK_BOTTOM_DOTTED,n.db.LINETYPE.SOLID_ARROW_TOP_REVERSE,n.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE,n.db.LINETYPE.STICK_ARROW_TOP_REVERSE,n.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE,n.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED,n.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED,n.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED,n.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED,n.db.LINETYPE.DOTTED,n.db.LINETYPE.SOLID_CROSS,n.db.LINETYPE.DOTTED_CROSS,n.db.LINETYPE.SOLID_POINT,n.db.LINETYPE.DOTTED_POINT,n.db.LINETYPE.BIDIRECTIONAL_SOLID,n.db.LINETYPE.BIDIRECTIONAL_DOTTED].includes(z.type)&&(M=Math.round((M+N)*100)/100),E++}te.debug("createdActors",m),te.debug("destroyedActors",g),await yH(f,p,v,!1,t,n,k);for(let z of D)await hbt(f,z.messageModel,z.lineStartY,n,z.msg,t);je.mirrorActors&&await yH(f,p,v,!0,t,n,k),R.forEach(z=>Fn.drawBackgroundRect(f,z)),pH(f,p,v,je);for(let z of Rt.models.boxes){z.height=Rt.getVerticalPos()-z.y,Rt.insert(z.x,z.y,z.x+z.width,z.height);let W=je.boxMargin*2;z.startx=z.x-W,z.starty=z.y-W*.25,z.stopx=z.startx+z.width+2*W,z.stopy=z.starty+z.height+W*.75,z.stroke="rgb(0,0,0, 0.5)",Fn.drawBox(f,z,je)}T&&Rt.bumpVerticalPos(je.boxMargin);let I=u6e(f,p,v,d),{bounds:L}=Rt.getBounds();L.startx===void 0&&(L.startx=0),L.starty===void 0&&(L.starty=0),L.stopx===void 0&&(L.stopx=0),L.stopy===void 0&&(L.stopy=0);let P=L.stopy-L.starty;P2,p=s(v=>u?-v:v,"adjustValue");e.from===e.to?d=h:(e.activate&&!f&&(d+=p(je.activationWidth/2-1)),[r.db.LINETYPE.SOLID_OPEN,r.db.LINETYPE.DOTTED_OPEN,r.db.LINETYPE.STICK_TOP,r.db.LINETYPE.STICK_BOTTOM,r.db.LINETYPE.STICK_TOP_DOTTED,r.db.LINETYPE.STICK_BOTTOM_DOTTED,r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED,r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED,r.db.LINETYPE.STICK_ARROW_TOP_REVERSE,r.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE,r.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED,r.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED,r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE,r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE].includes(e.type)||(d+=p(3)),[r.db.LINETYPE.BIDIRECTIONAL_SOLID,r.db.LINETYPE.BIDIRECTIONAL_DOTTED,r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED,r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED,r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE,r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE].includes(e.type)&&(h-=p(3)));let m=[i,a,o,l],g=Math.abs(h-d);e.wrap&&e.message&&(e.message=sr.wrapLabel(e.message,xt.getMax(g+2*je.wrapPadding,je.width),Ng(je)));let y=sr.calculateTextDimensions(e.message,Ng(je));return{width:xt.getMax(e.wrap?0:y.width+2*je.wrapPadding,g+2*je.wrapPadding,je.width),height:0,startx:h,stopx:d,starty:0,stopy:0,message:e.message,type:e.type,wrap:e.wrap,fromBounds:Math.min.apply(null,m),toBounds:Math.max.apply(null,m)}},"buildMessageModel"),wbt=s(async function(e,t,r,n){let i={},a=[],o,l,u;for(let h of e){switch(h.type){case n.db.LINETYPE.LOOP_START:case n.db.LINETYPE.ALT_START:case n.db.LINETYPE.OPT_START:case n.db.LINETYPE.PAR_START:case n.db.LINETYPE.PAR_OVER_START:case n.db.LINETYPE.CRITICAL_START:case n.db.LINETYPE.BREAK_START:a.push({id:h.id,msg:h.message,from:Number.MAX_SAFE_INTEGER,to:Number.MIN_SAFE_INTEGER,width:0});break;case n.db.LINETYPE.ALT_ELSE:case n.db.LINETYPE.PAR_AND:case n.db.LINETYPE.CRITICAL_OPTION:h.message&&(o=a.pop(),i[o.id]=o,i[h.id]=o,a.push(o));break;case n.db.LINETYPE.LOOP_END:case n.db.LINETYPE.ALT_END:case n.db.LINETYPE.OPT_END:case n.db.LINETYPE.PAR_END:case n.db.LINETYPE.CRITICAL_END:case n.db.LINETYPE.BREAK_END:o=a.pop(),i[o.id]=o;break;case n.db.LINETYPE.ACTIVE_START:{let f=t.get(h.from?h.from:h.to.actor),p=X6(h.from?h.from:h.to.actor).length,m=f.x+f.width/2+(p-1)*je.activationWidth/2,g={startx:m,stopx:m+je.activationWidth,actor:h.from,enabled:!0};Rt.activations.push(g)}break;case n.db.LINETYPE.ACTIVE_END:{let f=Rt.activations.map(p=>p.actor).lastIndexOf(h.from);Rt.activations.splice(f,1).splice(0,1)}break}h.placement!==void 0?(l=await vbt(h,t,n),h.noteModel=l,a.forEach(f=>{o=f,o.from=xt.getMin(o.from,l.startx),o.to=xt.getMax(o.to,l.startx+l.width),o.width=xt.getMax(o.width,Math.abs(o.from-o.to))-je.labelBoxWidth})):(u=kbt(h,t,n),h.msgModel=u,u.startx&&u.stopx&&a.length>0&&a.forEach(f=>{if(o=f,u.startx===u.stopx){let p=t.get(h.from),m=t.get(h.to);o.from=xt.getMin(p.x-u.width/2,p.x-p.width/2,o.from),o.to=xt.getMax(m.x+u.width/2,m.x+p.width/2,o.to),o.width=xt.getMax(o.width,Math.abs(o.to-o.from))-je.labelBoxWidth}else o.from=xt.getMin(u.startx,o.from),o.to=xt.getMax(u.stopx,o.to),o.width=xt.getMax(o.width,u.width)-je.labelBoxWidth}))}return Rt.activations=[],te.debug("Loop type widths:",i),i},"calculateLoopBounds"),f6e={bounds:Rt,drawActors:yH,drawActorsPopup:u6e,setConf:h6e,draw:pbt}});var m6e={};ar(m6e,{diagram:()=>Sbt});var Sbt,g6e=F(()=>{"use strict";t6e();dH();n6e();Zt();p6e();Sbt={parser:e6e,get db(){return new U6},renderer:f6e,styles:r6e,init:s(e=>{e.sequence||(e.sequence={}),e.wrap&&(e.sequence.wrap=e.wrap,bx({sequence:{wrap:e.wrap}}))},"init")}});var vH,K6,xH=F(()=>{"use strict";vH=(function(){var e=s(function(ne,Me,re,ce){for(re=re||{},ce=ne.length;ce--;re[ne[ce]]=Me);return re},"o"),t=[1,18],r=[1,19],n=[1,20],i=[1,41],a=[1,26],o=[1,42],l=[1,24],u=[1,25],h=[1,32],d=[1,33],f=[1,34],p=[1,45],m=[1,35],g=[1,36],y=[1,37],v=[1,38],x=[1,27],b=[1,28],T=[1,29],w=[1,30],C=[1,31],k=[1,44],S=[1,46],A=[1,43],M=[1,47],N=[1,9],D=[1,8,9],R=[1,58],E=[1,59],I=[1,60],L=[1,61],P=[1,62],B=[1,63],O=[1,64],$=[1,8,9,41],G=[1,77],V=[1,8,9,12,13,22,39,41,44,46,68,69,70,71,72,73,74,79,81],z=[1,8,9,12,13,18,20,22,39,41,44,46,47,60,68,69,70,71,72,73,74,79,81,86,100,102,103],W=[13,60,86,100,102,103],H=[13,60,73,74,86,100,102,103],j=[13,60,68,69,70,71,72,86,100,102,103],Q=[1,103],U=[1,121],ue=[1,117],J=[1,113],he=[1,119],se=[1,114],oe=[1,115],Se=[1,116],xe=[1,118],Ne=[1,120],Ye=[22,50,60,61,82,86,87,88,89,90],We=[1,128],pe=[12,39],_e=[1,8,9,39,41,44,46],Ee=[1,8,9,22],Re=[1,153],Z=[1,8,9,61],ae=[1,8,9,22,50,60,61,82,86,87,88,89,90],ie={trace:s(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,ANNOTATION_START:46,ANNOTATION_END:47,CLASS:48,emptyBody:49,SPACE: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:"ANNOTATION_START",47:"ANNOTATION_END",48:"CLASS",50:"SPACE",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],[38,3],[40,1],[40,2],[40,3],[40,1],[40,2],[40,3],[40,1],[40,2],[40,3],[24,1],[24,3],[24,4],[24,3],[24,6],[24,4],[24,7],[24,6],[43,2],[43,3],[49,0],[49,2],[49,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:s(function(Me,re,ce,q,de,X,ye){var K=X.length-1;switch(de){case 8:this.$=X[K-1];break;case 9:case 10:case 13:case 15:this.$=X[K];break;case 11:case 14:this.$=X[K-2]+"."+X[K];break;case 12:case 16:this.$=X[K-1]+X[K];break;case 17:case 18:this.$=X[K-1]+"~"+X[K]+"~";break;case 19:q.addRelation(X[K]);break;case 20:X[K-1].title=q.cleanupLabel(X[K]),q.addRelation(X[K-1]);break;case 31:this.$=X[K].trim(),q.setAccTitle(this.$);break;case 32:case 33:this.$=X[K].trim(),q.setAccDescription(this.$);break;case 34:q.addClassesToNamespace(X[K-3],X[K-1][0],X[K-1][1]),q.popNamespace();break;case 35:q.addClassesToNamespace(X[K-4],X[K-1][0],X[K-1][1]),q.popNamespace();break;case 36:this.$=q.addNamespace(X[K]);break;case 37:this.$=q.addNamespace(X[K-1],X[K]);break;case 38:this.$=[[X[K]],[]];break;case 39:this.$=[[X[K-1]],[]];break;case 40:X[K][0].unshift(X[K-2]),this.$=X[K];break;case 41:this.$=[[],[X[K]]];break;case 42:this.$=[[],[X[K-1]]];break;case 43:X[K][1].unshift(X[K-2]),this.$=X[K];break;case 44:case 45:this.$=[[],[]];break;case 46:this.$=X[K];break;case 48:q.setCssClass(X[K-2],X[K]);break;case 49:q.addMembers(X[K-3],X[K-1]);break;case 51:q.setCssClass(X[K-5],X[K-3]),q.addMembers(X[K-5],X[K-1]);break;case 52:q.addAnnotation(X[K-3],X[K-1]);break;case 53:q.addAnnotation(X[K-6],X[K-4]),q.addMembers(X[K-6],X[K-1]);break;case 54:q.addAnnotation(X[K-5],X[K-3]);break;case 55:this.$=X[K],q.addClass(X[K]);break;case 56:this.$=X[K-1],q.addClass(X[K-1]),q.setClassLabel(X[K-1],X[K]);break;case 60:q.addAnnotation(X[K],X[K-2]);break;case 61:case 74:this.$=[X[K]];break;case 62:X[K].push(X[K-1]),this.$=X[K];break;case 63:break;case 64:q.addMember(X[K-1],q.cleanupLabel(X[K]));break;case 65:break;case 66:break;case 67:this.$={id1:X[K-2],id2:X[K],relation:X[K-1],relationTitle1:"none",relationTitle2:"none"};break;case 68:this.$={id1:X[K-3],id2:X[K],relation:X[K-1],relationTitle1:X[K-2],relationTitle2:"none"};break;case 69:this.$={id1:X[K-3],id2:X[K],relation:X[K-2],relationTitle1:"none",relationTitle2:X[K-1]};break;case 70:this.$={id1:X[K-4],id2:X[K],relation:X[K-2],relationTitle1:X[K-3],relationTitle2:X[K-1]};break;case 71:this.$=q.addNote(X[K],X[K-1]);break;case 72:this.$=q.addNote(X[K]);break;case 73:this.$=X[K-2],q.defineClass(X[K-1],X[K]);break;case 75:this.$=X[K-2].concat([X[K]]);break;case 76:q.setDirection("TB");break;case 77:q.setDirection("BT");break;case 78:q.setDirection("RL");break;case 79:q.setDirection("LR");break;case 80:this.$={type1:X[K-2],type2:X[K],lineType:X[K-1]};break;case 81:this.$={type1:"none",type2:X[K],lineType:X[K-1]};break;case 82:this.$={type1:X[K-1],type2:"none",lineType:X[K]};break;case 83:this.$={type1:"none",type2:"none",lineType:X[K]};break;case 84:this.$=q.relationType.AGGREGATION;break;case 85:this.$=q.relationType.EXTENSION;break;case 86:this.$=q.relationType.COMPOSITION;break;case 87:this.$=q.relationType.DEPENDENCY;break;case 88:this.$=q.relationType.LOLLIPOP;break;case 89:this.$=q.lineType.LINE;break;case 90:this.$=q.lineType.DOTTED_LINE;break;case 91:case 97:this.$=X[K-2],q.setClickEvent(X[K-1],X[K]);break;case 92:case 98:this.$=X[K-3],q.setClickEvent(X[K-2],X[K-1]),q.setTooltip(X[K-2],X[K]);break;case 93:this.$=X[K-2],q.setLink(X[K-1],X[K]);break;case 94:this.$=X[K-3],q.setLink(X[K-2],X[K-1],X[K]);break;case 95:this.$=X[K-3],q.setLink(X[K-2],X[K-1]),q.setTooltip(X[K-2],X[K]);break;case 96:this.$=X[K-4],q.setLink(X[K-3],X[K-2],X[K]),q.setTooltip(X[K-3],X[K-1]);break;case 99:this.$=X[K-3],q.setClickEvent(X[K-2],X[K-1],X[K]);break;case 100:this.$=X[K-4],q.setClickEvent(X[K-3],X[K-2],X[K-1]),q.setTooltip(X[K-3],X[K]);break;case 101:this.$=X[K-3],q.setLink(X[K-2],X[K]);break;case 102:this.$=X[K-4],q.setLink(X[K-3],X[K-1],X[K]);break;case 103:this.$=X[K-4],q.setLink(X[K-3],X[K-1]),q.setTooltip(X[K-3],X[K]);break;case 104:this.$=X[K-5],q.setLink(X[K-4],X[K-2],X[K]),q.setTooltip(X[K-4],X[K-1]);break;case 105:this.$=X[K-2],q.setCssStyle(X[K-1],X[K]);break;case 106:q.setCssClass(X[K-1],X[K]);break;case 107:this.$=[X[K]];break;case 108:X[K-2].push(X[K]),this.$=X[K-2];break;case 110:this.$=X[K-1]+X[K];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:t,35:r,37:n,38:22,42:i,43:23,46:a,48:o,51:l,52:u,54:h,56:d,57:f,60:p,62:m,63:g,64:y,65:v,75:x,76:b,78:T,82:w,83:C,86:k,100:S,102:A,103:M},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,3]},e(N,[2,5],{8:[1,48]}),{8:[1,49]},e(D,[2,19],{22:[1,50]}),e(D,[2,21]),e(D,[2,22]),e(D,[2,23]),e(D,[2,24]),e(D,[2,25]),e(D,[2,26]),e(D,[2,27]),e(D,[2,28]),e(D,[2,29]),e(D,[2,30]),{34:[1,51]},{36:[1,52]},e(D,[2,33]),e(D,[2,63],{53:53,66:56,67:57,13:[1,54],22:[1,55],68:R,69:E,70:I,71:L,72:P,73:B,74:O}),{39:[1,65]},e($,[2,47],{39:[1,67],44:[1,66],46:[1,68]}),e(D,[2,65]),e(D,[2,66]),{16:69,60:p,86:k,100:S,102:A},{16:39,17:40,19:70,60:p,86:k,100:S,102:A,103:M},{16:39,17:40,19:71,60:p,86:k,100:S,102:A,103:M},{16:39,17:40,19:72,60:p,86:k,100:S,102:A,103:M},{60:[1,73]},{13:[1,74]},{16:39,17:40,19:75,60:p,86:k,100:S,102:A,103:M},{13:G,55:76},{58:78,60:[1,79]},e(D,[2,76]),e(D,[2,77]),e(D,[2,78]),e(D,[2,79]),e(V,[2,13],{16:39,17:40,19:81,18:[1,80],20:[1,82],60:p,86:k,100:S,102:A,103:M}),e(V,[2,15],{20:[1,83]}),{15:84,16:85,17:86,60:p,86:k,100:S,102:A,103:M},{16:39,17:40,19:87,60:p,86:k,100:S,102:A,103:M},e(z,[2,133]),e(z,[2,134]),e(z,[2,135]),e(z,[2,136]),e([1,8,9,12,13,20,22,39,41,44,46,68,69,70,71,72,73,74,79,81],[2,137]),e(N,[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:88,33:t,35:r,37:n,42:i,46:a,48:o,51:l,52:u,54:h,56:d,57:f,60:p,62:m,63:g,64:y,65:v,75:x,76:b,78:T,82:w,83:C,86:k,100:S,102:A,103:M}),{5:89,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:t,35:r,37:n,38:22,42:i,43:23,46:a,48:o,51:l,52:u,54:h,56:d,57:f,60:p,62:m,63:g,64:y,65:v,75:x,76:b,78:T,82:w,83:C,86:k,100:S,102:A,103:M},e(D,[2,20]),e(D,[2,31]),e(D,[2,32]),{13:[1,91],16:39,17:40,19:90,60:p,86:k,100:S,102:A,103:M},{53:92,66:56,67:57,68:R,69:E,70:I,71:L,72:P,73:B,74:O},e(D,[2,64]),{67:93,73:B,74:O},e(W,[2,83],{66:94,68:R,69:E,70:I,71:L,72:P}),e(H,[2,84]),e(H,[2,85]),e(H,[2,86]),e(H,[2,87]),e(H,[2,88]),e(j,[2,89]),e(j,[2,90]),{8:[1,96],23:99,24:97,30:98,38:22,40:95,42:i,43:23,48:o,54:h,56:d},{16:100,60:p,86:k,100:S,102:A},{41:[1,102],45:101,51:Q},{16:104,60:p,86:k,100:S,102:A},{47:[1,105]},{13:[1,106]},{13:[1,107]},{79:[1,108],81:[1,109]},{22:U,50:ue,59:110,60:J,82:he,84:111,85:112,86:se,87:oe,88:Se,89:xe,90:Ne},{60:[1,122]},{13:G,55:123},e($,[2,72]),e($,[2,138]),{22:U,50:ue,59:124,60:J,61:[1,125],82:he,84:111,85:112,86:se,87:oe,88:Se,89:xe,90:Ne},e(Ye,[2,74]),{16:39,17:40,19:126,60:p,86:k,100:S,102:A,103:M},e(V,[2,16]),e(V,[2,17]),e(V,[2,18]),{11:127,12:We,39:[2,36]},e(pe,[2,9],{16:85,17:86,15:130,18:[1,129],60:p,86:k,100:S,102:A,103:M}),e(pe,[2,10]),e(_e,[2,55],{11:131,12:We}),e(N,[2,7]),{9:[1,132]},e(Ee,[2,67]),{16:39,17:40,19:133,60:p,86:k,100:S,102:A,103:M},{13:[1,135],16:39,17:40,19:134,60:p,86:k,100:S,102:A,103:M},e(W,[2,82],{66:136,68:R,69:E,70:I,71:L,72:P}),e(W,[2,81]),{41:[1,137]},{23:99,24:97,30:98,38:22,40:138,42:i,43:23,48:o,54:h,56:d},{8:[1,139],41:[2,38]},{8:[1,140],41:[2,41]},{8:[1,141],41:[2,44]},e($,[2,48],{39:[1,142]}),{41:[1,143]},e($,[2,50]),{41:[2,61],45:144,51:Q},{47:[1,145]},{16:39,17:40,19:146,60:p,86:k,100:S,102:A,103:M},e(D,[2,91],{13:[1,147]}),e(D,[2,93],{13:[1,149],77:[1,148]}),e(D,[2,97],{13:[1,150],80:[1,151]}),{13:[1,152]},e(D,[2,105],{61:Re}),e(Z,[2,107],{85:154,22:U,50:ue,60:J,82:he,86:se,87:oe,88:Se,89:xe,90:Ne}),e(ae,[2,109]),e(ae,[2,111]),e(ae,[2,112]),e(ae,[2,113]),e(ae,[2,114]),e(ae,[2,115]),e(ae,[2,116]),e(ae,[2,117]),e(ae,[2,118]),e(ae,[2,119]),e(D,[2,106]),e($,[2,71]),e(D,[2,73],{61:Re}),{60:[1,155]},e(V,[2,14]),{39:[2,37]},{13:[1,156]},{15:157,16:85,17:86,60:p,86:k,100:S,102:A,103:M},e(pe,[2,12]),e(_e,[2,56]),{1:[2,4]},e(Ee,[2,69]),e(Ee,[2,68]),{16:39,17:40,19:158,60:p,86:k,100:S,102:A,103:M},e(W,[2,80]),e($,[2,34]),{41:[1,159]},{23:99,24:97,30:98,38:22,40:160,41:[2,39],42:i,43:23,48:o,54:h,56:d},{23:99,24:97,30:98,38:22,40:161,41:[2,42],42:i,43:23,48:o,54:h,56:d},{23:99,24:97,30:98,38:22,40:162,41:[2,45],42:i,43:23,48:o,54:h,56:d},{45:163,51:Q},e($,[2,49]),{41:[2,62]},e($,[2,52],{39:[1,164]}),e(D,[2,60]),e(D,[2,92]),e(D,[2,94]),e(D,[2,95],{77:[1,165]}),e(D,[2,98]),e(D,[2,99],{13:[1,166]}),e(D,[2,101],{13:[1,168],77:[1,167]}),{22:U,50:ue,60:J,82:he,84:169,85:112,86:se,87:oe,88:Se,89:xe,90:Ne},e(ae,[2,110]),e(Ye,[2,75]),{14:[1,170]},e(pe,[2,11]),e(Ee,[2,70]),e($,[2,35]),{41:[2,40]},{41:[2,43]},{41:[2,46]},{41:[1,171]},{41:[1,173],45:172,51:Q},e(D,[2,96]),e(D,[2,100]),e(D,[2,102]),e(D,[2,103],{77:[1,174]}),e(Z,[2,108],{85:154,22:U,50:ue,60:J,82:he,86:se,87:oe,88:Se,89:xe,90:Ne}),e(_e,[2,8]),e($,[2,51]),{41:[1,175]},e($,[2,54]),e(D,[2,104]),e($,[2,53])],defaultActions:{2:[2,1],3:[2,2],4:[2,3],127:[2,37],132:[2,4],144:[2,62],160:[2,40],161:[2,43],162:[2,46]},parseError:s(function(Me,re){if(re.recoverable)this.trace(Me);else{var ce=new Error(Me);throw ce.hash=re,ce}},"parseError"),parse:s(function(Me){var re=this,ce=[0],q=[],de=[null],X=[],ye=this.table,K="",Ge=0,Ae=0,$e=0,Oe=2,at=1,Pe=X.slice.call(arguments,1),Ke=Object.create(this.lexer),qe={yy:{}};for(var Be in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Be)&&(qe.yy[Be]=this.yy[Be]);Ke.setInput(Me,qe.yy),qe.yy.lexer=Ke,qe.yy.parser=this,typeof Ke.yylloc>"u"&&(Ke.yylloc={});var Xe=Ke.yylloc;X.push(Xe);var be=Ke.options&&Ke.options.ranges;typeof qe.yy.parseError=="function"?this.parseError=qe.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function vt(mt){ce.length=ce.length-2*mt,de.length=de.length-mt,X.length=X.length-mt}s(vt,"popStack");function ke(){var mt;return mt=q.pop()||Ke.lex()||at,typeof mt!="number"&&(mt instanceof Array&&(q=mt,mt=q.pop()),mt=re.symbols_[mt]||mt),mt}s(ke,"lex");for(var It,Ft,yt,Et,gt,ge,nt={},pt,Qe,we,tt;;){if(yt=ce[ce.length-1],this.defaultActions[yt]?Et=this.defaultActions[yt]:((It===null||typeof It>"u")&&(It=ke()),Et=ye[yt]&&ye[yt][It]),typeof Et>"u"||!Et.length||!Et[0]){var st="";tt=[];for(pt in ye[yt])this.terminals_[pt]&&pt>Oe&&tt.push("'"+this.terminals_[pt]+"'");Ke.showPosition?st="Parse error on line "+(Ge+1)+`: +`+Ke.showPosition()+` +Expecting `+tt.join(", ")+", got '"+(this.terminals_[It]||It)+"'":st="Parse error on line "+(Ge+1)+": Unexpected "+(It==at?"end of input":"'"+(this.terminals_[It]||It)+"'"),this.parseError(st,{text:Ke.match,token:this.terminals_[It]||It,line:Ke.yylineno,loc:Xe,expected:tt})}if(Et[0]instanceof Array&&Et.length>1)throw new Error("Parse Error: multiple actions possible at state: "+yt+", token: "+It);switch(Et[0]){case 1:ce.push(It),de.push(Ke.yytext),X.push(Ke.yylloc),ce.push(Et[1]),It=null,Ft?(It=Ft,Ft=null):(Ae=Ke.yyleng,K=Ke.yytext,Ge=Ke.yylineno,Xe=Ke.yylloc,$e>0&&$e--);break;case 2:if(Qe=this.productions_[Et[1]][1],nt.$=de[de.length-Qe],nt._$={first_line:X[X.length-(Qe||1)].first_line,last_line:X[X.length-1].last_line,first_column:X[X.length-(Qe||1)].first_column,last_column:X[X.length-1].last_column},be&&(nt._$.range=[X[X.length-(Qe||1)].range[0],X[X.length-1].range[1]]),ge=this.performAction.apply(nt,[K,Ae,Ge,qe.yy,Et[1],de,X].concat(Pe)),typeof ge<"u")return ge;Qe&&(ce=ce.slice(0,-1*Qe*2),de=de.slice(0,-1*Qe),X=X.slice(0,-1*Qe)),ce.push(this.productions_[Et[1]][0]),de.push(nt.$),X.push(nt._$),we=ye[ce[ce.length-2]][ce[ce.length-1]],ce.push(we);break;case 3:return!0}}return!0},"parse")},le=(function(){var ne={EOF:1,parseError:s(function(re,ce){if(this.yy.parser)this.yy.parser.parseError(re,ce);else throw new Error(re)},"parseError"),setInput:s(function(Me,re){return this.yy=re||this.yy||{},this._input=Me,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 Me=this._input[0];this.yytext+=Me,this.yyleng++,this.offset++,this.match+=Me,this.matched+=Me;var re=Me.match(/(?:\r\n?|\n).*/g);return re?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),Me},"input"),unput:s(function(Me){var re=Me.length,ce=Me.split(/(?:\r\n?|\n)/g);this._input=Me+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-re),this.offset-=re;var q=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),ce.length-1&&(this.yylineno-=ce.length-1);var de=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:ce?(ce.length===q.length?this.yylloc.first_column:0)+q[q.length-ce.length].length-ce[0].length:this.yylloc.first_column-re},this.options.ranges&&(this.yylloc.range=[de[0],de[0]+this.yyleng-re]),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(Me){this.unput(this.match.slice(Me))},"less"),pastInput:s(function(){var Me=this.matched.substr(0,this.matched.length-this.match.length);return(Me.length>20?"...":"")+Me.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:s(function(){var Me=this.match;return Me.length<20&&(Me+=this._input.substr(0,20-Me.length)),(Me.substr(0,20)+(Me.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:s(function(){var Me=this.pastInput(),re=new Array(Me.length+1).join("-");return Me+this.upcomingInput()+` +`+re+"^"},"showPosition"),test_match:s(function(Me,re){var ce,q,de;if(this.options.backtrack_lexer&&(de={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&&(de.yylloc.range=this.yylloc.range.slice(0))),q=Me[0].match(/(?:\r\n?|\n).*/g),q&&(this.yylineno+=q.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:q?q[q.length-1].length-q[q.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+Me[0].length},this.yytext+=Me[0],this.match+=Me[0],this.matches=Me,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(Me[0].length),this.matched+=Me[0],ce=this.performAction.call(this,this.yy,this,re,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),ce)return ce;if(this._backtrack){for(var X in de)this[X]=de[X];return!1}return!1},"test_match"),next:s(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var Me,re,ce,q;this._more||(this.yytext="",this.match="");for(var de=this._currentRules(),X=0;Xre[0].length)){if(re=ce,q=X,this.options.backtrack_lexer){if(Me=this.test_match(ce,de[X]),Me!==!1)return Me;if(this._backtrack){re=!1;continue}else return!1}else if(!this.options.flex)break}return re?(Me=this.test_match(re,de[q]),Me!==!1?Me:!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 re=this.next();return re||this.lex()},"lex"),begin:s(function(re){this.conditionStack.push(re)},"begin"),popState:s(function(){var re=this.conditionStack.length-1;return re>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(re){return re=this.conditionStack.length-1-Math.abs(re||0),re>=0?this.conditionStack[re]:"INITIAL"},"topState"),pushState:s(function(re){this.begin(re)},"pushState"),stateStackSize:s(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:s(function(re,ce,q,de){var X=de;switch(q){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;break;case 7:return this.popState(),"acc_title_value";break;case 8:return this.begin("acc_descr"),35;break;case 9:return this.popState(),"acc_descr_value";break;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;break;case 30:return this.popState(),8;break;case 31:break;case 32:return this.begin("namespace-body"),39;break;case 33:this.popState(),this.less(0);break;case 34:return this.popState(),41;break;case 35:return"EOF_IN_STRUCT";case 36:return 8;case 37:break;case 38:return"EDGE_STATE";case 39:return this.begin("class"),48;break;case 40:return this.popState(),8;break;case 41:break;case 42:return this.popState(),this.popState(),41;break;case 43:return this.begin("class-body"),39;break;case 44:return this.popState(),41;break;case 45:return"EOF_IN_STRUCT";case 46:return"EDGE_STATE";case 47:return"OPEN_IN_STRUCT";case 48:break;case 49:return"MEMBER";case 50:return 83;case 51:return 75;case 52:return 76;case 53:return 78;case 54:return 54;case 55:return 56;case 56:return 46;case 57:return 47;case 58:return 81;case 59:this.popState();break;case 60:return"GENERICTYPE";case 61:this.begin("generic");break;case 62:this.popState();break;case 63:return"BQUOTE_STR";case 64:this.begin("bqstring");break;case 65:return 77;case 66:return 77;case 67:return 77;case 68:return 77;case 69:return 69;case 70:return 69;case 71:return 71;case 72:return 71;case 73:return 70;case 74:return 68;case 75:return 72;case 76:return 73;case 77:return 74;case 78:return 22;case 79:return 44;case 80:return 100;case 81:return 18;case 82:return"PLUS";case 83:return 87;case 84:return 61;case 85:return 89;case 86:return 89;case 87:return 90;case 88:return"EQUALS";case 89:return"EQUALS";case 90:return 60;case 91:return 12;case 92:return 14;case 93:return"PUNCTUATION";case 94:return 86;case 95:return 102;case 96:return 50;case 97:return 50;case 98: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,29,34,35,36,37,38,39,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},namespace:{rules:[26,29,30,31,32,33,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},"class-body":{rules:[26,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},class:{rules:[26,40,41,42,43,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},acc_descr_multiline:{rules:[11,12,26,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},acc_descr:{rules:[9,26,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},acc_title:{rules:[7,26,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},callback_args:{rules:[22,23,26,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},callback_name:{rules:[19,20,21,26,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},href:{rules:[26,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},struct:{rules:[26,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},generic:{rules:[26,50,51,52,53,54,55,56,57,58,59,60,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},bqstring:{rules:[26,50,51,52,53,54,55,56,57,58,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},string:{rules:[24,25,26,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,8,10,13,14,15,16,17,18,26,27,28,29,39,50,51,52,53,54,55,56,57,58,61,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,98],inclusive:!0}}};return ne})();ie.lexer=le;function ve(){this.yy={}}return s(ve,"Parser"),ve.prototype=ie,ie.Parser=ve,new ve})();vH.parser=vH;K6=vH});var x6e,FC,b6e=F(()=>{"use strict";Zt();Gr();x6e=["#","+","~","-",""],FC=class{static{s(this,"ClassMember")}constructor(t,r){this.memberType=r,this.visibility="",this.classifier="",this.text="";let n=vr(t,Le());this.parseMember(n)}getDisplayDetails(){let t=this.visibility+cc(this.id);this.memberType==="method"&&(t+=`(${cc(this.parameters.trim())})`,this.returnType&&(t+=" : "+cc(this.returnType))),t=t.trim();let r=this.parseClassifier();return{displayText:t,cssStyle:r}}parseMember(t){let r="";if(this.memberType==="method"){let a=/([#+~-])?(.+)\((.*)\)([\s$*])?(.*)([$*])?/.exec(t);if(a){let o=a[1]?a[1].trim():"";if(x6e.includes(o)&&(this.visibility=o),this.id=a[2],this.parameters=a[3]?a[3].trim():"",r=a[4]?a[4].trim():"",this.returnType=a[5]?a[5].trim():"",r===""){let l=this.returnType.substring(this.returnType.length-1);/[$*]/.exec(l)&&(r=l,this.returnType=this.returnType.substring(0,this.returnType.length-1))}}}else{let i=t.length,a=t.substring(0,1),o=t.substring(i-1);x6e.includes(a)&&(this.visibility=a),/[$*]/.exec(o)&&(r=o),this.id=t.substring(this.visibility===""?0:1,r===""?i:i-1)}this.classifier=r,this.id=this.id.startsWith(" ")?" "+this.id.trim():this.id.trim();let n=`${this.visibility?"\\"+this.visibility:""}${cc(this.id)}${this.memberType==="method"?`(${cc(this.parameters)})${this.returnType?" : "+cc(this.returnType):""}`:""}`;this.text=n.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""}}}});var Z6,T6e,Pg,dv,bH=F(()=>{"use strict";$r();Tt();Zt();Gr();Qt();An();ud();b6e();Jg();Z6="classId-",T6e=0,Pg=s(e=>xt.sanitizeText(e,Le()),"sanitizeText"),dv=class e{constructor(){this.relations=[];this.classes=new Map;this.styleClasses=new Map;this.notes=new Map;this.interfaces=[];this.namespaces=new Map;this.namespaceCounter=0;this.namespaceStack=[];this.diagramId="";this.functions=[];this.lineType={LINE:0,DOTTED_LINE:1};this.relationType={AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3,LOLLIPOP:4};this.setupToolTips=s(t=>{let r=F0();lt(t).select("svg").selectAll("g").filter(function(){return lt(this).attr("title")!==null}).on("mouseover",a=>{let o=lt(a.currentTarget),l=o.attr("title");if(!l)return;let u=a.currentTarget.getBoundingClientRect();r.transition().duration(200).style("opacity",".9"),r.html(Ps.sanitize(l)).style("left",`${window.scrollX+u.left+u.width/2}px`).style("top",`${window.scrollY+u.bottom+4}px`),o.classed("hover",!0)}).on("mouseout",a=>{r.transition().duration(500).style("opacity",0),lt(a.currentTarget).classed("hover",!1)})},"setupToolTips");this.direction="TB";this.setAccTitle=Cr;this.getAccTitle=Sr;this.setAccDescription=Er;this.getAccDescription=Ar;this.setDiagramTitle=Mr;this.getDiagramTitle=Rr;this.getConfig=s(()=>Le().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.popNamespace=this.popNamespace.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{s(this,"ClassDB")}splitClassNameAndType(t){let r=xt.sanitizeText(t,Le()),n="",i=r;if(r.indexOf("~")>0){let a=r.split("~");i=Pg(a[0]),n=Pg(a[1])}return{className:i,type:n}}setClassLabel(t,r){let n=xt.sanitizeText(t,Le());r&&(r=Pg(r));let{className:i}=this.splitClassNameAndType(n);this.classes.get(i).label=r,this.classes.get(i).text=`${r}${this.classes.get(i).type?`<${this.classes.get(i).type}>`:""}`}addClass(t){let r=xt.sanitizeText(t,Le()),{className:n,type:i}=this.splitClassNameAndType(r);if(this.classes.has(n))return;let a=xt.sanitizeText(n,Le());this.classes.set(a,{id:a,type:i,label:a,text:`${a}${i?`<${i}>`:""}`,shape:"classBox",cssClasses:"default",methods:[],members:[],annotations:[],styles:[],domId:Z6+a+"-"+T6e}),T6e++}addInterface(t,r){let n={id:`interface${this.interfaces.length}`,label:t,classId:r};this.interfaces.push(n)}setDiagramId(t){this.diagramId=t}lookUpDomId(t){let r=xt.sanitizeText(t,Le());if(this.classes.has(r)){let n=this.classes.get(r).domId;return this.diagramId?`${this.diagramId}-${n}`:n}throw new Error("Class not found: "+r)}clear(){this.relations=[],this.classes=new Map,this.notes=new Map,this.interfaces=[],this.functions=[],this.functions.push(this.setupToolTips.bind(this)),this.namespaces=new Map,this.namespaceCounter=0,this.namespaceStack=[],this.diagramId="",this.direction="TB",gr()}getClass(t){return this.classes.get(t)}getClasses(){return this.classes}getRelations(){return this.relations}getNote(t){let r=typeof t=="number"?`note${t}`:t;return this.notes.get(r)}getNotes(){return this.notes}addRelation(t){te.debug("Adding relation: "+JSON.stringify(t));let r=[this.relationType.LOLLIPOP,this.relationType.AGGREGATION,this.relationType.COMPOSITION,this.relationType.DEPENDENCY,this.relationType.EXTENSION];t.relation.type1===this.relationType.LOLLIPOP&&!r.includes(t.relation.type2)?(this.addClass(t.id2),this.addInterface(t.id1,t.id2),t.id1=`interface${this.interfaces.length-1}`):t.relation.type2===this.relationType.LOLLIPOP&&!r.includes(t.relation.type1)?(this.addClass(t.id1),this.addInterface(t.id2,t.id1),t.id2=`interface${this.interfaces.length-1}`):(this.addClass(t.id1),this.addClass(t.id2)),t.id1=this.splitClassNameAndType(t.id1).className,t.id2=this.splitClassNameAndType(t.id2).className,t.relationTitle1=xt.sanitizeText(t.relationTitle1.trim(),Le()),t.relationTitle2=xt.sanitizeText(t.relationTitle2.trim(),Le()),this.relations.push(t)}addAnnotation(t,r){let n=this.splitClassNameAndType(t).className;this.classes.get(n).annotations.push(r)}addMember(t,r){this.addClass(t);let n=this.splitClassNameAndType(t).className,i=this.classes.get(n);if(typeof r=="string"){let a=r.trim();a.startsWith("<<")&&a.endsWith(">>")?i.annotations.push(Pg(a.substring(2,a.length-2))):a.indexOf(")")>0?i.methods.push(new FC(a,"method")):a&&i.members.push(new FC(a,"attribute"))}}addMembers(t,r){Array.isArray(r)&&(r.reverse(),r.forEach(n=>this.addMember(t,n)))}addNote(t,r){let n=this.notes.size,i={id:`note${n}`,class:r,text:t,index:n};return this.notes.set(i.id,i),i.id}cleanupLabel(t){return t.startsWith(":")&&(t=t.substring(1)),Pg(t.trim())}setCssClass(t,r){t.split(",").forEach(n=>{let i=n;/\d/.exec(n[0])&&(i=Z6+i),i=this.splitClassNameAndType(i).className;let a=this.classes.get(i);a&&(a.cssClasses+=" "+r)})}defineClass(t,r){for(let n of t){let i=this.styleClasses.get(n);i===void 0&&(i={id:n,styles:[],textStyles:[]},this.styleClasses.set(n,i)),r&&r.forEach(a=>{if(/color/.exec(a)){let o=a.replace("fill","bgFill");i.textStyles.push(o)}i.styles.push(a)}),this.classes.forEach(a=>{a.cssClasses.includes(n)&&a.styles.push(...r.flatMap(o=>o.split(",")))})}}setTooltip(t,r){t.split(",").forEach(n=>{if(r!==void 0){let i=this.splitClassNameAndType(n).className,a=this.classes.get(i);a&&(a.tooltip=Pg(r))}})}getTooltip(t,r){return r&&this.namespaces.has(r)?this.namespaces.get(r).classes.get(t).tooltip:this.classes.get(t).tooltip}setLink(t,r,n){let i=Le();t.split(",").forEach(a=>{let o=a;/\d/.exec(a[0])&&(o=Z6+o),o=this.splitClassNameAndType(o).className;let l=this.classes.get(o);l&&(l.link=sr.formatUrl(r,i),i.securityLevel==="sandbox"?l.linkTarget="_top":typeof n=="string"?l.linkTarget=Pg(n):l.linkTarget="_blank")}),this.setCssClass(t,"clickable")}setClickEvent(t,r,n){t.split(",").forEach(i=>{this.setClickFunc(i,r,n);let a=this.splitClassNameAndType(i).className,o=this.classes.get(a);o&&(o.haveCallback=!0)}),this.setCssClass(t,"clickable")}setClickFunc(t,r,n){let i=xt.sanitizeText(t,Le());if(Le().securityLevel!=="loose"||r===void 0)return;let o=this.splitClassNameAndType(i).className;if(this.classes.has(o)){let l=[];if(typeof n=="string"){l=n.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let u=0;u{let u=this.lookUpDomId(o),h=document.querySelector(`[id="${u}"]`);h!==null&&h.addEventListener("click",()=>{sr.runFunc(r,...l)},!1)})}}bindFunctions(t){this.functions.forEach(r=>{r(t)})}escapeHtml(t){return t.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}getDirection(){return this.direction}setDirection(t){this.direction=t}static resolveQualifiedId(t,r){let n=r.at(-1);return n?`${n}.${t}`:t}static getAncestorIds(t){let r=t.split("."),n=new Array(r.length);n[0]=r[0];for(let i=1;i0?a[o-1]:void 0,h=o===a.length-1,d=h&&r?r:i[o];this.namespaces.has(l)?h&&(this.namespaces.get(l).explicit=!0):this.namespaces.set(l,this.createNamespaceNode(l,d,u,h)),u&&this.linkParentChild(u,l)}return n}popNamespace(){this.namespaceStack.pop()}getNamespace(t){return this.namespaces.get(t)}getNamespaces(){return this.namespaces}addClassesToNamespace(t,r,n){if(this.namespaces.has(t)){for(let i of r){let{className:a}=this.splitClassNameAndType(i),o=this.getClass(a);o.parent=t,this.namespaces.get(t).classes.set(a,o)}for(let i of n){let a=this.getNote(i);a.parent=t,this.namespaces.get(t).notes.set(i,a)}}}setCssStyle(t,r){let n=this.classes.get(t);if(!(!r||!n))for(let i of r)i.includes(",")?n.styles.push(...i.split(",")):n.styles.push(i)}getArrowMarker(t){let r;switch(t){case 0:r="aggregation";break;case 1:r="extension";break;case 2:r="composition";break;case 3:r="dependency";break;case 4:r="lollipop";break;default:r="none"}return r}resolveExplicitAncestor(t){let r=t;for(;r;){let n=this.namespaces.get(r);if(!n)return;if(n.explicit)return r;r=n.parent}}getData(){let t=[],r=[],n=Le(),i=n.class?.hierarchicalNamespaces??!0;for(let o of this.namespaces.values()){if(!i&&!o.explicit)continue;let l={id:o.id,label:i?o.label:o.id,isGroup:!0,padding:n.class.padding??16,shape:"rect",cssStyles:[],look:n.look,parentId:i?o.parent:void 0};t.push(l)}for(let o of this.classes.values()){let l=i?o.parent:this.resolveExplicitAncestor(o.parent),u={...o,type:void 0,isGroup:!1,parentId:l,look:n.look};t.push(u)}for(let o of this.notes.values()){let l=i?o.parent:this.resolveExplicitAncestor(o.parent),u={id:o.id,label:o.text,isGroup:!1,shape:"note",padding:n.class.padding??6,cssStyles:["text-align: left","white-space: nowrap",`fill: ${n.themeVariables.noteBkgColor}`,`stroke: ${n.themeVariables.noteBorderColor}`],look:n.look,parentId:l,labelType:"markdown"};t.push(u);let h=this.classes.get(o.class)?.id;if(h){let d={id:`edgeNote${o.index}`,start:o.id,end:h,type:"normal",thickness:"normal",classes:"relation",arrowTypeStart:"none",arrowTypeEnd:"none",arrowheadStyle:"",labelStyle:[""],style:["fill: none"],pattern:"dotted",look:n.look};r.push(d)}}for(let o of this.interfaces){let l={id:o.id,label:o.label,isGroup:!1,shape:"rect",cssStyles:["opacity: 0;"],look:n.look};t.push(l)}let a=0;for(let o of this.relations){a++;let l={id:xc(o.id1,o.id2,{prefix:"id",counter:a}),start:o.id1,end:o.id2,type:"normal",label:o.title,labelpos:"c",thickness:"normal",classes:"relation",arrowTypeStart:this.getArrowMarker(o.relation.type1),arrowTypeEnd:this.getArrowMarker(o.relation.type2),startLabelRight:o.relationTitle1==="none"?"":o.relationTitle1,endLabelLeft:o.relationTitle2==="none"?"":o.relationTitle2,arrowheadStyle:"",labelStyle:["display: inline-block"],style:o.style||"",pattern:o.relation.lineType==1?"dashed":"solid",look:n.look,labelType:"markdown"};r.push(l)}return{nodes:t,edges:r,other:{},config:n,direction:this.getDirection()}}}});var _bt,Q6,TH=F(()=>{"use strict";s1();_bt=s(e=>`g.classGroup text { + fill: ${e.nodeBorder||e.classText}; + stroke: none; + font-family: ${e.fontFamily}; + font-size: 10px; + + .title { + font-weight: bolder; + } + +} + + .cluster-label text { + fill: ${e.titleColor}; + } + .cluster-label span { + color: ${e.titleColor}; + } + .cluster-label span p { + background-color: transparent; + } + + .cluster rect { + fill: ${e.clusterBkg}; + stroke: ${e.clusterBorder}; + stroke-width: 1px; + } + + .cluster text { + fill: ${e.titleColor}; + } + + .cluster span { + color: ${e.titleColor}; + } + +.nodeLabel, .edgeLabel { + color: ${e.classText}; +} + +.noteLabel .nodeLabel, .noteLabel .edgeLabel { + color: ${e.noteTextColor}; +} +.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: ${e.strokeWidth}; + } + + +.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: ${e.strokeWidth}; + fill: none; +} + +.dashed-line{ + stroke-dasharray: 3; +} + +.dotted-line{ + stroke-dasharray: 1 2; +} + +[id$="-compositionStart"], .composition { + fill: ${e.lineColor} !important; + stroke: ${e.lineColor} !important; + stroke-width: 1; +} + +[id$="-compositionEnd"], .composition { + fill: ${e.lineColor} !important; + stroke: ${e.lineColor} !important; + stroke-width: 1; +} + +[id$="-dependencyStart"], .dependency { + fill: ${e.lineColor} !important; + stroke: ${e.lineColor} !important; + stroke-width: 1; +} + +[id$="-dependencyEnd"], .dependency { + fill: ${e.lineColor} !important; + stroke: ${e.lineColor} !important; + stroke-width: 1; +} + +[id$="-extensionStart"], .extension { + fill: transparent !important; + stroke: ${e.lineColor} !important; + stroke-width: 1; +} + +[id$="-extensionEnd"], .extension { + fill: transparent !important; + stroke: ${e.lineColor} !important; + stroke-width: 1; +} + +[id$="-aggregationStart"], .aggregation { + fill: transparent !important; + stroke: ${e.lineColor} !important; + stroke-width: 1; +} + +[id$="-aggregationEnd"], .aggregation { + fill: transparent !important; + stroke: ${e.lineColor} !important; + stroke-width: 1; +} + +[id$="-lollipopStart"], .lollipop { + fill: ${e.mainBkg} !important; + stroke: ${e.lineColor} !important; + stroke-width: 1; +} + +[id$="-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}; +} + +.edgeLabel[data-look="neo"] { + background-color: ${e.edgeLabelBackground}; + p { + background-color: ${e.edgeLabelBackground}; + } + rect { + opacity: 0.5; + background-color: ${e.edgeLabelBackground}; + fill: ${e.edgeLabelBackground}; + } + text-align: center; +} + ${jc()} +`,"getStyles"),Q6=_bt});var Lbt,Dbt,Ibt,J6,CH=F(()=>{"use strict";Zt();Tt();Hp();vf();xf();Qt();Lbt=s((e,t="TB")=>{if(!e.doc)return t;let r=t;for(let n of e.doc)n.stmt==="dir"&&(r=n.value);return r},"getDir"),Dbt=s(function(e,t){return t.db.getClasses()},"getClasses"),Ibt=s(async function(e,t,r,n){te.info("REF0:"),te.info("Drawing class diagram (v3)",t);let{securityLevel:i,state:a,layout:o}=Le();n.db.setDiagramId(t);let l=n.db.getData(),u=Uo(t,i);l.type=n.type,l.layoutAlgorithm=Yc(o),l.nodeSpacing=a?.nodeSpacing||50,l.rankSpacing=a?.rankSpacing||50,l.markers=["aggregation","extension","composition","dependency","lollipop"],l.diagramId=t,await il(l,u);let h=8;sr.insertTitle(u,"classDiagramTitleText",a?.titleTopMargin??25,n.db.getDiagramTitle()),Js(u,h,"classDiagram",a?.useMaxWidth??!0)},"draw"),J6={getClasses:Dbt,draw:Ibt,getDir:Lbt}});var C6e={};ar(C6e,{diagram:()=>Mbt});var Mbt,k6e=F(()=>{"use strict";xH();bH();TH();CH();Mbt={parser:K6,get db(){return new dv},renderer:J6,styles:Q6,init:s(e=>{e.class||(e.class={}),e.class.arrowMarkerAbsolute=e.arrowMarkerAbsolute},"init")}});var E6e={};ar(E6e,{diagram:()=>Bbt});var Bbt,A6e=F(()=>{"use strict";xH();bH();TH();CH();Bbt={parser:K6,get db(){return new dv},renderer:J6,styles:Q6,init:s(e=>{e.class||(e.class={}),e.class.arrowMarkerAbsolute=e.arrowMarkerAbsolute},"init")}});var kH,e_,wH=F(()=>{"use strict";kH=(function(){var e=s(function($,G,V,z){for(V=V||{},z=$.length;z--;V[$[z]]=G);return V},"o"),t=[1,2],r=[1,3],n=[1,4],i=[2,4],a=[1,9],o=[1,11],l=[1,16],u=[1,17],h=[1,18],d=[1,19],f=[1,33],p=[1,20],m=[1,21],g=[1,22],y=[1,23],v=[1,24],x=[1,26],b=[1,27],T=[1,28],w=[1,29],C=[1,30],k=[1,31],S=[1,32],A=[1,35],M=[1,36],N=[1,37],D=[1,38],R=[1,34],E=[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],I=[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],L=[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],P={trace:s(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:s(function(G,V,z,W,H,j,Q){var U=j.length-1;switch(H){case 3:return W.setRootDoc(j[U]),j[U];break;case 4:this.$=[];break;case 5:j[U]!="nl"&&(j[U-1].push(j[U]),this.$=j[U-1]);break;case 6:case 7:this.$=j[U];break;case 8:this.$="nl";break;case 12:this.$=j[U];break;case 13:let se=j[U-1];se.description=W.trimColon(j[U]),this.$=se;break;case 14:this.$={stmt:"relation",state1:j[U-2],state2:j[U]};break;case 15:let oe=W.trimColon(j[U]);this.$={stmt:"relation",state1:j[U-3],state2:j[U-1],description:oe};break;case 19:this.$={stmt:"state",id:j[U-3],type:"default",description:"",doc:j[U-1]};break;case 20:var ue=j[U],J=j[U-2].trim();if(j[U].match(":")){var he=j[U].split(":");ue=he[0],J=[J,he[1]]}this.$={stmt:"state",id:ue,type:"default",description:J};break;case 21:this.$={stmt:"state",id:j[U-3],type:"default",description:j[U-5],doc:j[U-1]};break;case 22:this.$={stmt:"state",id:j[U],type:"fork"};break;case 23:this.$={stmt:"state",id:j[U],type:"join"};break;case 24:this.$={stmt:"state",id:j[U],type:"choice"};break;case 25:this.$={stmt:"state",id:W.getDividerId(),type:"divider"};break;case 26:this.$={stmt:"state",id:j[U-1].trim(),note:{position:j[U-2].trim(),text:j[U].trim()}};break;case 29:this.$=j[U].trim(),W.setAccTitle(this.$);break;case 30:case 31:this.$=j[U].trim(),W.setAccDescription(this.$);break;case 32:this.$={stmt:"click",id:j[U-3],url:j[U-2],tooltip:j[U-1]};break;case 33:this.$={stmt:"click",id:j[U-3],url:j[U-1],tooltip:""};break;case 34:case 35:this.$={stmt:"classDef",id:j[U-1].trim(),classes:j[U].trim()};break;case 36:this.$={stmt:"style",id:j[U-1].trim(),styleClass:j[U].trim()};break;case 37:this.$={stmt:"applyClass",id:j[U-1].trim(),styleClass:j[U].trim()};break;case 38:W.setDirection("TB"),this.$={stmt:"dir",value:"TB"};break;case 39:W.setDirection("BT"),this.$={stmt:"dir",value:"BT"};break;case 40:W.setDirection("RL"),this.$={stmt:"dir",value:"RL"};break;case 41:W.setDirection("LR"),this.$={stmt:"dir",value:"LR"};break;case 44:case 45:this.$={stmt:"state",id:j[U].trim(),type:"default",description:""};break;case 46:this.$={stmt:"state",id:j[U-2].trim(),classes:[j[U].trim()],type:"default",description:""};break;case 47:this.$={stmt:"state",id:j[U-2].trim(),classes:[j[U].trim()],type:"default",description:""};break}},"anonymous"),table:[{3:1,4:t,5:r,6:n},{1:[3]},{3:5,4:t,5:r,6:n},{3:6,4:t,5:r,6:n},e([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],i,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:a,5:o,8:8,9:10,10:12,11:13,12:14,13:15,16:l,17:u,19:h,22:d,24:f,25:p,26:m,27:g,28:y,29:v,32:25,33:x,35:b,37:T,38:w,41:C,45:k,48:S,51:A,52:M,53:N,54:D,57:R},e(E,[2,5]),{9:39,10:12,11:13,12:14,13:15,16:l,17:u,19:h,22:d,24:f,25:p,26:m,27:g,28:y,29:v,32:25,33:x,35:b,37:T,38:w,41:C,45:k,48:S,51:A,52:M,53:N,54:D,57:R},e(E,[2,7]),e(E,[2,8]),e(E,[2,9]),e(E,[2,10]),e(E,[2,11]),e(E,[2,12],{14:[1,40],15:[1,41]}),e(E,[2,16]),{18:[1,42]},e(E,[2,18],{20:[1,43]}),{23:[1,44]},e(E,[2,22]),e(E,[2,23]),e(E,[2,24]),e(E,[2,25]),{30:45,31:[1,46],59:[1,47],60:[1,48]},e(E,[2,28]),{34:[1,49]},{36:[1,50]},e(E,[2,31]),{13:51,24:f,57:R},{42:[1,52],44:[1,53]},{46:[1,54]},{49:[1,55]},e(I,[2,44],{58:[1,56]}),e(I,[2,45],{58:[1,57]}),e(E,[2,38]),e(E,[2,39]),e(E,[2,40]),e(E,[2,41]),e(E,[2,6]),e(E,[2,13]),{13:58,24:f,57:R},e(E,[2,17]),e(L,i,{7:59}),{24:[1,60]},{24:[1,61]},{23:[1,62]},{24:[2,48]},{24:[2,49]},e(E,[2,29]),e(E,[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]},e(E,[2,14],{14:[1,71]}),{4:a,5:o,8:8,9:10,10:12,11:13,12:14,13:15,16:l,17:u,19:h,21:[1,72],22:d,24:f,25:p,26:m,27:g,28:y,29:v,32:25,33:x,35:b,37:T,38:w,41:C,45:k,48:S,51:A,52:M,53:N,54:D,57:R},e(E,[2,20],{20:[1,73]}),{31:[1,74]},{24:[1,75]},{39:[1,76]},{39:[1,77]},e(E,[2,34]),e(E,[2,35]),e(E,[2,36]),e(E,[2,37]),e(I,[2,46]),e(I,[2,47]),e(E,[2,15]),e(E,[2,19]),e(L,i,{7:78}),e(E,[2,26]),e(E,[2,27]),{5:[1,79]},{5:[1,80]},{4:a,5:o,8:8,9:10,10:12,11:13,12:14,13:15,16:l,17:u,19:h,21:[1,81],22:d,24:f,25:p,26:m,27:g,28:y,29:v,32:25,33:x,35:b,37:T,38:w,41:C,45:k,48:S,51:A,52:M,53:N,54:D,57:R},e(E,[2,32]),e(E,[2,33]),e(E,[2,21])],defaultActions:{5:[2,1],6:[2,2],47:[2,48],48:[2,49]},parseError:s(function(G,V){if(V.recoverable)this.trace(G);else{var z=new Error(G);throw z.hash=V,z}},"parseError"),parse:s(function(G){var V=this,z=[0],W=[],H=[null],j=[],Q=this.table,U="",ue=0,J=0,he=0,se=2,oe=1,Se=j.slice.call(arguments,1),xe=Object.create(this.lexer),Ne={yy:{}};for(var Ye in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Ye)&&(Ne.yy[Ye]=this.yy[Ye]);xe.setInput(G,Ne.yy),Ne.yy.lexer=xe,Ne.yy.parser=this,typeof xe.yylloc>"u"&&(xe.yylloc={});var We=xe.yylloc;j.push(We);var pe=xe.options&&xe.options.ranges;typeof Ne.yy.parseError=="function"?this.parseError=Ne.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function _e(X){z.length=z.length-2*X,H.length=H.length-X,j.length=j.length-X}s(_e,"popStack");function Ee(){var X;return X=W.pop()||xe.lex()||oe,typeof X!="number"&&(X instanceof Array&&(W=X,X=W.pop()),X=V.symbols_[X]||X),X}s(Ee,"lex");for(var Re,Z,ae,ie,le,ve,ne={},Me,re,ce,q;;){if(ae=z[z.length-1],this.defaultActions[ae]?ie=this.defaultActions[ae]:((Re===null||typeof Re>"u")&&(Re=Ee()),ie=Q[ae]&&Q[ae][Re]),typeof ie>"u"||!ie.length||!ie[0]){var de="";q=[];for(Me in Q[ae])this.terminals_[Me]&&Me>se&&q.push("'"+this.terminals_[Me]+"'");xe.showPosition?de="Parse error on line "+(ue+1)+`: +`+xe.showPosition()+` +Expecting `+q.join(", ")+", got '"+(this.terminals_[Re]||Re)+"'":de="Parse error on line "+(ue+1)+": Unexpected "+(Re==oe?"end of input":"'"+(this.terminals_[Re]||Re)+"'"),this.parseError(de,{text:xe.match,token:this.terminals_[Re]||Re,line:xe.yylineno,loc:We,expected:q})}if(ie[0]instanceof Array&&ie.length>1)throw new Error("Parse Error: multiple actions possible at state: "+ae+", token: "+Re);switch(ie[0]){case 1:z.push(Re),H.push(xe.yytext),j.push(xe.yylloc),z.push(ie[1]),Re=null,Z?(Re=Z,Z=null):(J=xe.yyleng,U=xe.yytext,ue=xe.yylineno,We=xe.yylloc,he>0&&he--);break;case 2:if(re=this.productions_[ie[1]][1],ne.$=H[H.length-re],ne._$={first_line:j[j.length-(re||1)].first_line,last_line:j[j.length-1].last_line,first_column:j[j.length-(re||1)].first_column,last_column:j[j.length-1].last_column},pe&&(ne._$.range=[j[j.length-(re||1)].range[0],j[j.length-1].range[1]]),ve=this.performAction.apply(ne,[U,J,ue,Ne.yy,ie[1],H,j].concat(Se)),typeof ve<"u")return ve;re&&(z=z.slice(0,-1*re*2),H=H.slice(0,-1*re),j=j.slice(0,-1*re)),z.push(this.productions_[ie[1]][0]),H.push(ne.$),j.push(ne._$),ce=Q[z[z.length-2]][z[z.length-1]],z.push(ce);break;case 3:return!0}}return!0},"parse")},B=(function(){var $={EOF:1,parseError:s(function(V,z){if(this.yy.parser)this.yy.parser.parseError(V,z);else throw new Error(V)},"parseError"),setInput:s(function(G,V){return this.yy=V||this.yy||{},this._input=G,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 G=this._input[0];this.yytext+=G,this.yyleng++,this.offset++,this.match+=G,this.matched+=G;var V=G.match(/(?:\r\n?|\n).*/g);return V?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),G},"input"),unput:s(function(G){var V=G.length,z=G.split(/(?:\r\n?|\n)/g);this._input=G+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-V),this.offset-=V;var W=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),z.length-1&&(this.yylineno-=z.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:z?(z.length===W.length?this.yylloc.first_column:0)+W[W.length-z.length].length-z[0].length:this.yylloc.first_column-V},this.options.ranges&&(this.yylloc.range=[H[0],H[0]+this.yyleng-V]),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(G){this.unput(this.match.slice(G))},"less"),pastInput:s(function(){var G=this.matched.substr(0,this.matched.length-this.match.length);return(G.length>20?"...":"")+G.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:s(function(){var G=this.match;return G.length<20&&(G+=this._input.substr(0,20-G.length)),(G.substr(0,20)+(G.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:s(function(){var G=this.pastInput(),V=new Array(G.length+1).join("-");return G+this.upcomingInput()+` +`+V+"^"},"showPosition"),test_match:s(function(G,V){var z,W,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))),W=G[0].match(/(?:\r\n?|\n).*/g),W&&(this.yylineno+=W.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:W?W[W.length-1].length-W[W.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+G[0].length},this.yytext+=G[0],this.match+=G[0],this.matches=G,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(G[0].length),this.matched+=G[0],z=this.performAction.call(this,this.yy,this,V,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),z)return z;if(this._backtrack){for(var j in H)this[j]=H[j];return!1}return!1},"test_match"),next:s(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var G,V,z,W;this._more||(this.yytext="",this.match="");for(var H=this._currentRules(),j=0;jV[0].length)){if(V=z,W=j,this.options.backtrack_lexer){if(G=this.test_match(z,H[j]),G!==!1)return G;if(this._backtrack){V=!1;continue}else return!1}else if(!this.options.flex)break}return V?(G=this.test_match(V,H[W]),G!==!1?G:!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 V=this.next();return V||this.lex()},"lex"),begin:s(function(V){this.conditionStack.push(V)},"begin"),popState:s(function(){var V=this.conditionStack.length-1;return V>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(V){return V=this.conditionStack.length-1-Math.abs(V||0),V>=0?this.conditionStack[V]:"INITIAL"},"topState"),pushState:s(function(V){this.begin(V)},"pushState"),stateStackSize:s(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:s(function(V,z,W,H){function j(){let U=z.yytext.indexOf("%%");if(U===0)return!1;if(U>0){let ue=z.yytext.slice(0,U),J=z.yytext.slice(U);J&&V.lexer.unput(J),z.yytext=ue}return!0}s(j,"processId");var Q=H;switch(W){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:return 5;case 9:break;case 10:break;case 11:break;case 12:break;case 13:return this.pushState("SCALE"),17;break;case 14:return 18;case 15:this.popState();break;case 16:return this.begin("acc_title"),33;break;case 17:return this.popState(),"acc_title_value";break;case 18:return this.begin("acc_descr"),35;break;case 19:return this.popState(),"acc_descr_value";break;case 20:this.begin("acc_descr_multiline");break;case 21:this.popState();break;case 22:return"acc_descr_multiline_value";case 23:return this.pushState("CLASSDEF"),41;break;case 24:return this.popState(),this.pushState("CLASSDEFID"),"DEFAULT_CLASSDEF_ID";break;case 25:return this.popState(),this.pushState("CLASSDEFID"),42;break;case 26:return this.popState(),43;break;case 27:return this.pushState("CLASS"),48;break;case 28:return this.popState(),this.pushState("CLASS_STYLE"),49;break;case 29:return this.popState(),50;break;case 30:return this.pushState("STYLE"),45;break;case 31:return this.popState(),this.pushState("STYLEDEF_STYLES"),46;break;case 32:return this.popState(),47;break;case 33:return this.pushState("SCALE"),17;break;case 34:return 18;case 35:this.popState();break;case 36:this.pushState("STATE");break;case 37:return this.popState(),z.yytext=z.yytext.slice(0,-8).trim(),25;break;case 38:return this.popState(),z.yytext=z.yytext.slice(0,-8).trim(),26;break;case 39:return this.popState(),z.yytext=z.yytext.slice(0,-10).trim(),27;break;case 40:return this.popState(),z.yytext=z.yytext.slice(0,-8).trim(),25;break;case 41:return this.popState(),z.yytext=z.yytext.slice(0,-8).trim(),26;break;case 42:return this.popState(),z.yytext=z.yytext.slice(0,-10).trim(),27;break;case 43:return 51;case 44:return 52;case 45:return 53;case 46:return 54;case 47:this.pushState("STATE_STRING");break;case 48:return this.pushState("STATE_ID"),"AS";break;case 49:if(!j())return;return this.popState(),"ID";break;case 50:this.popState();break;case 51:return"STATE_DESCR";case 52:throw new Error('Error: State name must be a single word. Found: "'+z.yytext.trim()+'"');case 53:return 19;case 54:this.popState();break;case 55:return this.popState(),this.pushState("struct"),20;break;case 56:return this.popState(),21;break;case 57:break;case 58:return this.begin("NOTE"),29;break;case 59:return this.popState(),this.pushState("NOTE_ID"),59;break;case 60:return this.popState(),this.pushState("NOTE_ID"),60;break;case 61:this.popState(),this.pushState("FLOATING_NOTE");break;case 62:return this.popState(),this.pushState("FLOATING_NOTE_ID"),"AS";break;case 63:break;case 64:return"NOTE_TEXT";case 65:if(!j())return;return this.popState(),"ID";break;case 66:if(!j())return;return this.popState(),this.pushState("NOTE_TEXT"),24;break;case 67:return this.popState(),z.yytext=z.yytext.substr(2).trim(),31;break;case 68:return this.popState(),z.yytext=z.yytext.slice(0,-8).trim(),31;break;case 69:return 6;case 70:return 6;case 71:return 16;case 72:return 57;case 73:return j()?24:void 0;case 74:return z.yytext=z.yytext.trim(),14;break;case 75:return 15;case 76:return 28;case 77:return 58;case 78:return 5;case 79: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,/^(?:[\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,/^(?:\w+\s+\w+.*?\{)/i,/^(?:[^\n\s\{]+)/i,/^(?:\n)/i,/^(?:\{)/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]*?\n\s*end note\b)/i,/^(?:stateDiagram\s+)/i,/^(?:stateDiagram-v2\s+)/i,/^(?:hide empty description\b)/i,/^(?:\[\*\])/i,/^(?:[^:\n\s\-\{]+)/i,/^(?:\s*:(?:[^:\n;]|:[^:\n;])+)/i,/^(?:-->)/i,/^(?:--)/i,/^(?::::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{LINE:{rules:[10,11,12],inclusive:!1},struct:{rules:[10,11,12,23,27,30,36,43,44,45,46,56,57,58,72,73,74,75,76,77],inclusive:!1},FLOATING_NOTE_ID:{rules:[65],inclusive:!1},FLOATING_NOTE:{rules:[62,63,64],inclusive:!1},NOTE_TEXT:{rules:[67,68],inclusive:!1},NOTE_ID:{rules:[66],inclusive:!1},NOTE:{rules:[59,60,61],inclusive:!1},STYLEDEF_STYLEOPTS:{rules:[],inclusive:!1},STYLEDEF_STYLES:{rules:[32],inclusive:!1},STYLE_IDS:{rules:[],inclusive:!1},STYLE:{rules:[31],inclusive:!1},CLASS_STYLE:{rules:[29],inclusive:!1},CLASS:{rules:[28],inclusive:!1},CLASSDEFID:{rules:[26],inclusive:!1},CLASSDEF:{rules:[24,25],inclusive:!1},acc_descr_multiline:{rules:[21,22],inclusive:!1},acc_descr:{rules:[19],inclusive:!1},acc_title:{rules:[17],inclusive:!1},SCALE:{rules:[14,15,34,35],inclusive:!1},ALIAS:{rules:[],inclusive:!1},STATE_ID:{rules:[49],inclusive:!1},STATE_STRING:{rules:[50,51],inclusive:!1},FORK_STATE:{rules:[],inclusive:!1},STATE:{rules:[10,11,12,37,38,39,40,41,42,47,48,52,53,54,55],inclusive:!1},ID:{rules:[10,11,12],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,11,12,13,16,18,20,23,27,30,33,36,55,58,69,70,71,72,73,74,75,77,78,79],inclusive:!0}}};return $})();P.lexer=B;function O(){this.yy={}}return s(O,"Parser"),O.prototype=P,P.Parser=O,new O})();kH.parser=kH;e_=kH});var Uf,Og,GC,L6e,D6e,I6e,Bg,t_,SH,EH,AH,RH,r_,n_,M6e,N6e,_H,LH,P6e,O6e,fv,zbt,B6e,DH,Vbt,Wbt,$6e,F6e,qbt,G6e,Hbt,z6e,IH,MH,V6e,i_,W6e,NH,a_=F(()=>{"use strict";Uf="state",Og="root",GC="relation",L6e="classDef",D6e="style",I6e="applyClass",Bg="default",t_="divider",SH="fill:none",EH="fill: #333",AH="markdown",RH="normal",r_="rect",n_="rectWithTitle",M6e="stateStart",N6e="stateEnd",_H="divider",LH="roundedWithTitle",P6e="note",O6e="noteGroup",fv="statediagram",zbt="state",B6e=`${fv}-${zbt}`,DH="transition",Vbt="note",Wbt="note-edge",$6e=`${DH} ${Wbt}`,F6e=`${fv}-${Vbt}`,qbt="cluster",G6e=`${fv}-${qbt}`,Hbt="cluster-alt",z6e=`${fv}-${Hbt}`,IH="parent",MH="note",V6e="state",i_="----",W6e=`${i_}${MH}`,NH=`${i_}${IH}`});function PH(e="",t=0,r="",n=i_){let i=r!==null&&r.length>0?`${n}${r}`:"";return`${V6e}-${e}${i}-${t}`}function s_(e,t,r){if(!t.id||t.id===""||t.id==="")return;t.cssClasses&&(Array.isArray(t.cssCompiledStyles)||(t.cssCompiledStyles=[]),t.cssClasses.split(" ").forEach(i=>{let a=r.get(i);a&&(t.cssCompiledStyles=[...t.cssCompiledStyles??[],...a.styles])}));let n=e.find(i=>i.id===t.id);n?Object.assign(n,t):e.push(t)}function Ybt(e){return e?.classes?.join(" ")??""}function jbt(e){return e?.styles??[]}var o_,Yf,Ubt,q6e,pv,U6e,Y6e=F(()=>{"use strict";Zt();Tt();Gr();a_();o_=new Map,Yf=0;s(PH,"stateDomId");Ubt=s((e,t,r,n,i,a,o,l)=>{te.trace("items",t),t.forEach(u=>{switch(u.stmt){case Uf:pv(e,u,r,n,i,a,o,l);break;case Bg:pv(e,u,r,n,i,a,o,l);break;case GC:{pv(e,u.state1,r,n,i,a,o,l),pv(e,u.state2,r,n,i,a,o,l);let h=o==="neo",d={id:"edge"+Yf,start:u.state1.id,end:u.state2.id,arrowhead:"normal",arrowTypeEnd:h?"arrow_barb_neo":"arrow_barb",style:SH,labelStyle:"",label:xt.sanitizeText(u.description??"",Le()),arrowheadStyle:EH,labelpos:"c",labelType:AH,thickness:RH,classes:DH,look:o};i.push(d),Yf++}break}})},"setupDoc"),q6e=s((e,t="TB")=>{let r=t;if(e.doc)for(let n of e.doc)n.stmt==="dir"&&(r=n.value);return r},"getDir");s(s_,"insertOrUpdateNode");s(Ybt,"getClassesFromDbInfo");s(jbt,"getStylesFromDbInfo");pv=s((e,t,r,n,i,a,o,l)=>{let u=t.id,h=r.get(u),d=Ybt(h),f=jbt(h),p=Le();if(te.info("dataFetcher parsedItem",t,h,f),u!=="root"){let m=r_;t.start===!0?m=M6e:t.start===!1&&(m=N6e),t.type!==Bg&&(m=t.type),o_.get(u)||o_.set(u,{id:u,shape:m,description:xt.sanitizeText(u,p),cssClasses:`${d} ${B6e}`,cssStyles:f});let g=o_.get(u);t.description&&(Array.isArray(g.description)?(g.shape=n_,g.description.push(t.description)):g.description?.length&&g.description.length>0?(g.shape=n_,g.description===u?g.description=[t.description]:g.description=[g.description,t.description]):(g.shape=r_,g.description=t.description),g.description=xt.sanitizeTextOrArray(g.description,p)),g.description?.length===1&&g.shape===n_&&(g.type==="group"?g.shape=LH:g.shape=r_),!g.type&&t.doc&&(te.info("Setting cluster for XCX",u,q6e(t)),g.type="group",g.isGroup=!0,g.dir=q6e(t),g.explicitDir=t.doc.some(v=>v.stmt==="dir"),g.shape=t.type===t_?_H:LH,g.cssClasses=`${g.cssClasses} ${G6e} ${a?z6e:""}`);let y={labelStyle:"",shape:g.shape,label:g.description,cssClasses:g.cssClasses,cssCompiledStyles:[],cssStyles:g.cssStyles,id:u,dir:g.dir,domId:PH(u,Yf),type:g.type,isGroup:g.type==="group",padding:8,rx:10,ry:10,look:o,labelType:"markdown"};if(y.shape===_H&&(y.label=""),e&&e.id!=="root"&&(te.trace("Setting node ",u," to be child of its parent ",e.id),y.parentId=e.id),y.centerLabel=!0,t.note){let v={labelStyle:"",shape:P6e,label:t.note.text,labelType:"markdown",cssClasses:F6e,cssStyles:[],cssCompiledStyles:[],id:u+W6e+"-"+Yf,domId:PH(u,Yf,MH),type:g.type,isGroup:g.type==="group",padding:p.flowchart?.padding,look:o,position:t.note.position},x=u+NH,b={labelStyle:"",shape:O6e,label:t.note.text,cssClasses:g.cssClasses,cssStyles:[],id:u+NH,domId:PH(u,Yf,IH),type:"group",isGroup:!0,padding:16,look:o,position:t.note.position};Yf++,b.id=x,v.parentId=x,s_(n,b,l),s_(n,v,l),s_(n,y,l);let T=u,w=v.id;t.note.position==="left of"&&(T=v.id,w=u),i.push({id:T+"-"+w,start:T,end:w,arrowhead:"none",arrowTypeEnd:"",style:SH,labelStyle:"",classes:$6e,arrowheadStyle:EH,labelpos:"c",labelType:AH,thickness:RH,look:o})}else s_(n,y,l)}t.doc&&(te.trace("Adding nodes children "),Ubt(t,t.doc,r,n,i,!a,o,l))},"dataFetcher"),U6e=s(()=>{o_.clear(),Yf=0},"reset")});var BH,Xbt,Kbt,j6e,$H=F(()=>{"use strict";Zt();Tt();Hp();vf();xf();Qt();a_();BH=s((e,t="TB")=>{if(!e.doc)return t;let r=t;for(let n of e.doc)n.stmt==="dir"&&(r=n.value);return r},"getDir"),Xbt=s(function(e,t){return t.db.getClasses()},"getClasses"),Kbt=s(async function(e,t,r,n){te.info("REF0:"),te.info("Drawing state diagram (v2)",t);let{securityLevel:i,state:a,layout:o}=Le();n.db.extract(n.db.getRootDocV2());let l=n.db.getData(),u=Uo(t,i);l.type=n.type,l.layoutAlgorithm=o,l.nodeSpacing=a?.nodeSpacing||50,l.rankSpacing=a?.rankSpacing||50,Le().look==="neo"?l.markers=["barbNeo"]:l.markers=["barb"],l.diagramId=t,await il(l,u);let d=8;try{(typeof n.db.getLinks=="function"?n.db.getLinks():new Map).forEach((p,m)=>{let g=typeof m=="string"?m:typeof m?.id=="string"?m.id:"",y=l.nodes.find(C=>C.id===g);if(!g){te.warn("\u26A0\uFE0F Invalid or missing stateId from key:",JSON.stringify(m));return}let v=u.node()?.querySelectorAll("g.node, g.rough-node"),x;if(v?.forEach(C=>{let k=C.textContent?.trim();(C.id===y?.domId||k===g)&&(x=C)}),!x){te.warn("\u26A0\uFE0F Could not find node matching text:",g);return}let b=x.parentNode;if(!b){te.warn("\u26A0\uFE0F Node has no parent, cannot wrap:",g);return}let T=document.createElementNS("http://www.w3.org/2000/svg","a"),w=p.url.replace(/^"+|"+$/g,"");if(T.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",w),T.setAttribute("target","_blank"),p.tooltip){let C=p.tooltip.replace(/^"+|"+$/g,"");T.setAttribute("title",C),x.setAttribute("title",C)}b.replaceChild(T,x),T.appendChild(x),te.info("\u{1F517} Wrapped node in
    tag for:",g,p.url)})}catch(f){te.error("\u274C Error injecting clickable links:",f)}sr.insertTitle(u,"statediagramTitleText",a?.titleTopMargin??25,n.db.getDiagramTitle()),Js(u,d,fv,a?.useMaxWidth??!0)},"draw"),j6e={getClasses:Xbt,draw:Kbt,getDir:BH}});var Ds,K6e,Z6e,l_,ol,c_=F(()=>{"use strict";$r();Jg();Zt();Tt();Qt();Gr();An();ud();Y6e();$H();a_();Ds={START_NODE:"[*]",START_TYPE:"start",END_NODE:"[*]",END_TYPE:"end",COLOR_KEYWORD:"color",FILL_KEYWORD:"fill",BG_FILL:"bgFill",STYLECLASS_SEP:","},K6e=s(()=>new Map,"newClassesList"),Z6e=s(()=>({relations:[],states:new Map,documents:{}}),"newDoc"),l_=s(e=>JSON.parse(JSON.stringify(e)),"clone"),ol=class{constructor(t){this.version=t;this.nodes=[];this.edges=[];this.rootDoc=[];this.classes=K6e();this.documents={root:Z6e()};this.currentDocument=this.documents.root;this.startEndCount=0;this.dividerCnt=0;this.links=new Map;this.funs=[];this.getAccTitle=Sr;this.setAccTitle=Cr;this.getAccDescription=Ar;this.setAccDescription=Er;this.setDiagramTitle=Mr;this.getDiagramTitle=Rr;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),this.bindFunctions=this.bindFunctions.bind(this)}static{s(this,"StateDB")}static{this.relationType={AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3}}extract(t){this.clear(!0);for(let i of Array.isArray(t)?t:t.doc)switch(i.stmt){case Uf:this.addState(i.id.trim(),i.type,i.doc,i.description,i.note);break;case GC:this.addRelation(i.state1,i.state2,i.description);break;case L6e:this.addStyleClass(i.id.trim(),i.classes);break;case D6e:this.handleStyleDef(i);break;case I6e:this.setCssClass(i.id.trim(),i.styleClass);break;case"click":this.addLink(i.id,i.url,i.tooltip);break}let r=this.getStates(),n=Le();U6e(),pv(void 0,this.getRootDocV2(),r,this.nodes,this.edges,!0,n.look,this.classes);for(let i of this.nodes)if(Array.isArray(i.label)){if(i.description=i.label.slice(1),i.isGroup&&i.description.length>0)throw new Error(`Group nodes can only have label. Remove the additional description for node [${i.id}]`);i.label=i.label[0]}}handleStyleDef(t){let r=t.id.trim().split(","),n=t.styleClass.split(",");for(let i of r){let a=this.getState(i);if(!a){let o=i.trim();this.addState(o),a=this.getState(o)}a&&(a.styles=n.map(o=>o.replace(/;/g,"")?.trim()))}}setRootDoc(t){te.info("Setting root doc",t),this.rootDoc=t,this.version===1?this.extract(t):this.extract(this.getRootDocV2())}docTranslator(t,r,n){if(r.stmt===GC){this.docTranslator(t,r.state1,!0),this.docTranslator(t,r.state2,!1);return}if(r.stmt===Uf&&(r.id===Ds.START_NODE?(r.id=t.id+(n?"_start":"_end"),r.start=n):r.id=r.id.trim()),r.stmt!==Og&&r.stmt!==Uf||!r.doc)return;let i=[],a=[];for(let o of r.doc)if(o.type===t_){let l=l_(o);l.doc=l_(a),i.push(l),a=[]}else a.push(o);if(i.length>0&&a.length>0){let o={stmt:Uf,id:$M(),type:"divider",doc:l_(a)};i.push(l_(o)),r.doc=i}r.doc.forEach(o=>this.docTranslator(r,o,!0))}getRootDocV2(){return this.docTranslator({id:Og,stmt:Og},{id:Og,stmt:Og,doc:this.rootDoc},!0),{id:Og,doc:this.rootDoc}}addState(t,r=Bg,n=void 0,i=void 0,a=void 0,o=void 0,l=void 0,u=void 0){let h=t?.trim();if(!this.currentDocument.states.has(h))te.info("Adding state ",h,i),this.currentDocument.states.set(h,{stmt:Uf,id:h,descriptions:[],type:r,doc:n,note:a,classes:[],styles:[],textStyles:[]});else{let d=this.currentDocument.states.get(h);if(!d)throw new Error(`State not found: ${h}`);d.doc||(d.doc=n),d.type||(d.type=r)}if(i&&(te.info("Setting state description",h,i),(Array.isArray(i)?i:[i]).forEach(f=>this.addDescription(h,f.trim()))),a){let d=this.currentDocument.states.get(h);if(!d)throw new Error(`State not found: ${h}`);d.note=a,d.note.text=xt.sanitizeText(d.note.text,Le())}o&&(te.info("Setting state classes",h,o),(Array.isArray(o)?o:[o]).forEach(f=>this.setCssClass(h,f.trim()))),l&&(te.info("Setting state styles",h,l),(Array.isArray(l)?l:[l]).forEach(f=>this.setStyle(h,f.trim()))),u&&(te.info("Setting state styles",h,l),(Array.isArray(u)?u:[u]).forEach(f=>this.setTextStyle(h,f.trim())))}clear(t){this.nodes=[],this.edges=[],this.funs=[this.setupToolTips.bind(this)],this.documents={root:Z6e()},this.currentDocument=this.documents.root,this.startEndCount=0,this.classes=K6e(),t||(this.links=new Map,gr())}getState(t){return this.currentDocument.states.get(t)}getStates(){return this.currentDocument.states}logDocuments(){te.info("Documents = ",this.documents)}getRelations(){return this.currentDocument.relations}addLink(t,r,n){this.links.set(t,{url:r,tooltip:n}),te.warn("Adding link",t,r,n)}getLinks(){return this.links}startIdIfNeeded(t=""){return t===Ds.START_NODE?(this.startEndCount++,`${Ds.START_TYPE}${this.startEndCount}`):t}startTypeIfNeeded(t="",r=Bg){return t===Ds.START_NODE?Ds.START_TYPE:r}endIdIfNeeded(t=""){return t===Ds.END_NODE?(this.startEndCount++,`${Ds.END_TYPE}${this.startEndCount}`):t}endTypeIfNeeded(t="",r=Bg){return t===Ds.END_NODE?Ds.END_TYPE:r}addRelationObjs(t,r,n=""){let i=this.startIdIfNeeded(t.id.trim()),a=this.startTypeIfNeeded(t.id.trim(),t.type),o=this.startIdIfNeeded(r.id.trim()),l=this.startTypeIfNeeded(r.id.trim(),r.type);this.addState(i,a,t.doc,t.description,t.note,t.classes,t.styles,t.textStyles),this.addState(o,l,r.doc,r.description,r.note,r.classes,r.styles,r.textStyles),this.currentDocument.relations.push({id1:i,id2:o,relationTitle:xt.sanitizeText(n,Le())})}addRelation(t,r,n){if(typeof t=="object"&&typeof r=="object")this.addRelationObjs(t,r,n);else if(typeof t=="string"&&typeof r=="string"){let i=this.startIdIfNeeded(t.trim()),a=this.startTypeIfNeeded(t),o=this.endIdIfNeeded(r.trim()),l=this.endTypeIfNeeded(r);this.addState(i,a),this.addState(o,l),this.currentDocument.relations.push({id1:i,id2:o,relationTitle:n?xt.sanitizeText(n,Le()):void 0})}}addDescription(t,r){let n=this.currentDocument.states.get(t),i=r.startsWith(":")?r.replace(":","").trim():r;n?.descriptions?.push(xt.sanitizeText(i,Le()))}cleanupLabel(t){return t.startsWith(":")?t.slice(2).trim():t.trim()}getDividerId(){return this.dividerCnt++,`divider-id-${this.dividerCnt}`}addStyleClass(t,r=""){this.classes.has(t)||this.classes.set(t,{id:t,styles:[],textStyles:[]});let n=this.classes.get(t);r&&n&&r.split(Ds.STYLECLASS_SEP).forEach(i=>{let a=i.replace(/([^;]*);/,"$1").trim();if(RegExp(Ds.COLOR_KEYWORD).exec(i)){let l=a.replace(Ds.FILL_KEYWORD,Ds.BG_FILL).replace(Ds.COLOR_KEYWORD,Ds.FILL_KEYWORD);n.textStyles.push(l)}n.styles.push(a)})}getClasses(){return this.classes}setupToolTips(t){let r=F0();lt(t).select("svg").selectAll("g.node, g.rough-node").on("mouseover",a=>{let o=lt(a.currentTarget),l=o.attr("title");if(l===null)return;let u=a.currentTarget?.getBoundingClientRect();r.transition().duration(200).style("opacity",".9"),r.style("left",window.scrollX+u.left+(u.right-u.left)/2+"px").style("top",window.scrollY+u.bottom+"px"),r.html(Ps.sanitize(l)),o.classed("hover",!0)}).on("mouseout",a=>{r.transition().duration(500).style("opacity",0),lt(a.currentTarget).classed("hover",!1)})}setCssClass(t,r){t.split(",").forEach(n=>{let i=this.getState(n);if(!i){let a=n.trim();this.addState(a),i=this.getState(a)}i?.classes?.push(r)})}setStyle(t,r){this.getState(t)?.styles?.push(r)}setTextStyle(t,r){this.getState(t)?.textStyles?.push(r)}bindFunctions(t){this.funs.forEach(r=>{r(t)})}getDirectionStatement(){return this.rootDoc.find(t=>t.stmt==="dir")}getDirection(){return this.getDirectionStatement()?.value??"TB"}setDirection(t){let r=this.getDirectionStatement();r?r.value=t:this.rootDoc.unshift({stmt:"dir",value:t})}trimColon(t){return t.startsWith(":")?t.slice(1).trim():t.trim()}getData(){let t=Le();return{nodes:this.nodes,edges:this.edges,other:{},config:t,direction:BH(this.getRootDocV2())}}getConfig(){return Le().state}}});var Qbt,u_,FH=F(()=>{"use strict";Qbt=s(e=>` +defs [id$="-barbEnd"] { + fill: ${e.transitionColor}; + stroke: ${e.transitionColor}; + } +g.stateGroup text { + fill: ${e.nodeBorder}; + stroke: none; + font-size: 10px; +} +g.stateGroup text { + fill: ${e.textColor}; + stroke: none; + font-size: 10px; + +} +g.stateGroup .state-title { + font-weight: bolder; + fill: ${e.stateLabelColor}; +} + +g.stateGroup rect { + fill: ${e.mainBkg}; + stroke: ${e.nodeBorder}; +} + +g.stateGroup line { + stroke: ${e.lineColor}; + stroke-width: ${e.strokeWidth||1}; +} + +.transition { + stroke: ${e.transitionColor}; + stroke-width: ${e.strokeWidth||1}; + fill: none; +} + +.stateGroup .composit { + fill: ${e.background}; + border-bottom: 1px +} + +.stateGroup .alt-composit { + fill: #e0e0e0; + border-bottom: 1px +} + +.state-note { + stroke: ${e.noteBorderColor}; + fill: ${e.noteBkgColor}; + + text { + fill: ${e.noteTextColor}; + stroke: none; + font-size: 10px; + } +} + +.stateLabel .box { + stroke: none; + stroke-width: 0; + fill: ${e.mainBkg}; + opacity: 0.5; +} + +.edgeLabel .label rect { + fill: ${e.labelBackgroundColor}; + opacity: 0.5; +} +.edgeLabel { + background-color: ${e.edgeLabelBackground}; + p { + background-color: ${e.edgeLabelBackground}; + } + rect { + opacity: 0.5; + background-color: ${e.edgeLabelBackground}; + fill: ${e.edgeLabelBackground}; + } + text-align: center; +} +.edgeLabel .label text { + fill: ${e.transitionLabelColor||e.tertiaryTextColor}; +} +.label div .edgeLabel { + color: ${e.transitionLabelColor||e.tertiaryTextColor}; +} + +.stateLabel text { + fill: ${e.stateLabelColor}; + font-size: 10px; + font-weight: bold; +} + +.node circle.state-start { + fill: ${e.specialStateColor}; + stroke: ${e.specialStateColor}; +} + +.node .fork-join { + fill: ${e.specialStateColor}; + stroke: ${e.specialStateColor}; +} + +.node circle.state-end { + fill: ${e.innerEndBackground}; + stroke: ${e.background}; + stroke-width: 1.5 +} +.end-state-inner { + fill: ${e.compositeBackground||e.background}; + // stroke: ${e.background}; + stroke-width: 1.5 +} + +.node rect { + fill: ${e.stateBkg||e.mainBkg}; + stroke: ${e.stateBorder||e.nodeBorder}; + stroke-width: ${e.strokeWidth||1}px; +} +.node polygon { + fill: ${e.mainBkg}; + stroke: ${e.stateBorder||e.nodeBorder};; + stroke-width: ${e.strokeWidth||1}px; +} +[id$="-barbEnd"] { + fill: ${e.lineColor}; +} + +.statediagram-cluster rect { + fill: ${e.compositeTitleBackground}; + stroke: ${e.stateBorder||e.nodeBorder}; + stroke-width: ${e.strokeWidth||1}px; +} + +.cluster-label, .nodeLabel { + color: ${e.stateLabelColor}; + // line-height: 1; +} + +.statediagram-cluster rect.outer { + rx: 5px; + ry: 5px; +} +.statediagram-state .divider { + stroke: ${e.stateBorder||e.nodeBorder}; +} + +.statediagram-state .title-state { + rx: 5px; + ry: 5px; +} +.statediagram-cluster.statediagram-cluster .inner { + fill: ${e.compositeBackground||e.background}; +} +.statediagram-cluster.statediagram-cluster-alt .inner { + fill: ${e.altBackground?e.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: ${e.altBackground?e.altBackground:"#efefef"}; +} + +.note-edge { + stroke-dasharray: 5; +} + +.statediagram-note rect { + fill: ${e.noteBkgColor}; + stroke: ${e.noteBorderColor}; + stroke-width: 1px; + rx: 0; + ry: 0; +} +.statediagram-note rect { + fill: ${e.noteBkgColor}; + stroke: ${e.noteBorderColor}; + stroke-width: 1px; + rx: 0; + ry: 0; +} + +.statediagram-note text { + fill: ${e.noteTextColor}; +} + +.statediagram-note .nodeLabel { + color: ${e.noteTextColor}; +} +.statediagram .edgeLabel { + color: red; // ${e.noteTextColor}; +} + +[id$="-dependencyStart"], [id$="-dependencyEnd"] { + fill: ${e.lineColor}; + stroke: ${e.lineColor}; + stroke-width: ${e.strokeWidth||1}; +} + +.statediagramTitleText { + text-anchor: middle; + font-size: 18px; + fill: ${e.textColor}; +} + +[data-look="neo"].statediagram-cluster rect { + fill: ${e.mainBkg}; + stroke: ${e.useGradient?"url("+e.svgId+"-gradient)":e.stateBorder||e.nodeBorder}; + stroke-width: ${e.strokeWidth??1}; +} +[data-look="neo"].statediagram-cluster rect.outer { + rx: ${e.radius}px; + ry: ${e.radius}px; + filter: ${e.dropShadow?e.dropShadow.replace("url(#drop-shadow)",`url(${e.svgId}-drop-shadow)`):"none"} +} +`,"getStyles"),u_=Qbt});var Jbt,e2t,t2t,r2t,J6e,n2t,i2t,a2t,s2t,GH,Q6e,e_e,t_e=F(()=>{"use strict";$r();c_();Qt();Gr();Zt();Tt();Jbt=s(e=>e.append("circle").attr("class","start-state").attr("r",Le().state.sizeUnit).attr("cx",Le().state.padding+Le().state.sizeUnit).attr("cy",Le().state.padding+Le().state.sizeUnit),"drawStartState"),e2t=s(e=>e.append("line").style("stroke","grey").style("stroke-dasharray","3").attr("x1",Le().state.textHeight).attr("class","divider").attr("x2",Le().state.textHeight*2).attr("y1",0).attr("y2",0),"drawDivider"),t2t=s((e,t)=>{let r=e.append("text").attr("x",2*Le().state.padding).attr("y",Le().state.textHeight+2*Le().state.padding).attr("font-size",Le().state.fontSize).attr("class","state-title").text(t.id),n=r.node().getBBox();return e.insert("rect",":first-child").attr("x",Le().state.padding).attr("y",Le().state.padding).attr("width",n.width+2*Le().state.padding).attr("height",n.height+2*Le().state.padding).attr("rx",Le().state.radius),r},"drawSimpleState"),r2t=s((e,t)=>{let r=s(function(p,m,g){let y=p.append("tspan").attr("x",2*Le().state.padding).text(m);g||y.attr("dy",Le().state.textHeight)},"addTspan"),i=e.append("text").attr("x",2*Le().state.padding).attr("y",Le().state.textHeight+1.3*Le().state.padding).attr("font-size",Le().state.fontSize).attr("class","state-title").text(t.descriptions[0]).node().getBBox(),a=i.height,o=e.append("text").attr("x",Le().state.padding).attr("y",a+Le().state.padding*.4+Le().state.dividerMargin+Le().state.textHeight).attr("class","state-description"),l=!0,u=!0;t.descriptions.forEach(function(p){l||(r(o,p,u),u=!1),l=!1});let h=e.append("line").attr("x1",Le().state.padding).attr("y1",Le().state.padding+a+Le().state.dividerMargin/2).attr("y2",Le().state.padding+a+Le().state.dividerMargin/2).attr("class","descr-divider"),d=o.node().getBBox(),f=Math.max(d.width,i.width);return h.attr("x2",f+3*Le().state.padding),e.insert("rect",":first-child").attr("x",Le().state.padding).attr("y",Le().state.padding).attr("width",f+2*Le().state.padding).attr("height",d.height+a+2*Le().state.padding).attr("rx",Le().state.radius),e},"drawDescrState"),J6e=s((e,t,r)=>{let n=Le().state.padding,i=2*Le().state.padding,a=e.node().getBBox(),o=a.width,l=a.x,u=e.append("text").attr("x",0).attr("y",Le().state.titleShift).attr("font-size",Le().state.fontSize).attr("class","state-title").text(t.id),d=u.node().getBBox().width+i,f=Math.max(d,o);f===o&&(f=f+i);let p,m=e.node().getBBox();t.doc,p=l-n,d>o&&(p=(o-f)/2+n),Math.abs(l-m.x)o&&(p=l-(d-o)/2);let g=1-Le().state.textHeight;return e.insert("rect",":first-child").attr("x",p).attr("y",g).attr("class",r?"alt-composit":"composit").attr("width",f).attr("height",m.height+Le().state.textHeight+Le().state.titleShift+1).attr("rx","0"),u.attr("x",p+n),d<=o&&u.attr("x",l+(f-i)/2-d/2+n),e.insert("rect",":first-child").attr("x",p).attr("y",Le().state.titleShift-Le().state.textHeight-Le().state.padding).attr("width",f).attr("height",Le().state.textHeight*3).attr("rx",Le().state.radius),e.insert("rect",":first-child").attr("x",p).attr("y",Le().state.titleShift-Le().state.textHeight-Le().state.padding).attr("width",f).attr("height",m.height+3+2*Le().state.textHeight).attr("rx",Le().state.radius),e},"addTitleAndBox"),n2t=s(e=>(e.append("circle").attr("class","end-state-outer").attr("r",Le().state.sizeUnit+Le().state.miniPadding).attr("cx",Le().state.padding+Le().state.sizeUnit+Le().state.miniPadding).attr("cy",Le().state.padding+Le().state.sizeUnit+Le().state.miniPadding),e.append("circle").attr("class","end-state-inner").attr("r",Le().state.sizeUnit).attr("cx",Le().state.padding+Le().state.sizeUnit+2).attr("cy",Le().state.padding+Le().state.sizeUnit+2)),"drawEndState"),i2t=s((e,t)=>{let r=Le().state.forkWidth,n=Le().state.forkHeight;if(t.parentId){let i=r;r=n,n=i}return e.append("rect").style("stroke","black").style("fill","black").attr("width",r).attr("height",n).attr("x",Le().state.padding).attr("y",Le().state.padding)},"drawForkJoinState"),a2t=s((e,t,r,n)=>{let i=0,a=n.append("text");a.style("text-anchor","start"),a.attr("class","noteText");let o=e.replace(/\r\n/g,"
    ");o=o.replace(/\n/g,"
    ");let l=o.split(xt.lineBreakRegex),u=1.25*Le().state.noteMargin;for(let h of l){let d=h.trim();if(d.length>0){let f=a.append("tspan");if(f.text(d),u===0){let p=f.node().getBBox();u+=p.height}i+=u,f.attr("x",t+Le().state.noteMargin),f.attr("y",r+i+1.25*Le().state.noteMargin)}}return{textWidth:a.node().getBBox().width,textHeight:i}},"_drawLongText"),s2t=s((e,t)=>{t.attr("class","state-note");let r=t.append("rect").attr("x",0).attr("y",Le().state.padding),n=t.append("g"),{textWidth:i,textHeight:a}=a2t(e,0,0,n);return r.attr("height",a+2*Le().state.noteMargin),r.attr("width",i+Le().state.noteMargin*2),r},"drawNote"),GH=s(function(e,t){let r=t.id,n={id:r,label:t.id,width:0,height:0},i=e.append("g").attr("id",r).attr("class","stateGroup");t.type==="start"&&Jbt(i),t.type==="end"&&n2t(i),(t.type==="fork"||t.type==="join")&&i2t(i,t),t.type==="note"&&s2t(t.note.text,i),t.type==="divider"&&e2t(i),t.type==="default"&&t.descriptions.length===0&&t2t(i,t),t.type==="default"&&t.descriptions.length>0&&r2t(i,t);let a=i.node().getBBox();return n.width=a.width+2*Le().state.padding,n.height=a.height+2*Le().state.padding,n},"drawState"),Q6e=0,e_e=s(function(e,t,r){let n=s(function(u){switch(u){case ol.relationType.AGGREGATION:return"aggregation";case ol.relationType.EXTENSION:return"extension";case ol.relationType.COMPOSITION:return"composition";case ol.relationType.DEPENDENCY:return"dependency"}},"getRelationType");t.points=t.points.filter(u=>!Number.isNaN(u.y));let i=t.points,a=Ou().x(function(u){return u.x}).y(function(u){return u.y}).curve(Bu),o=e.append("path").attr("d",a(i)).attr("id","edge"+Q6e).attr("class","transition"),l="";if(Le().state.arrowMarkerAbsolute&&(l=gx(!0)),o.attr("marker-end","url("+l+"#"+n(ol.relationType.DEPENDENCY)+"End)"),r.title!==void 0){let u=e.append("g").attr("class","stateLabel"),{x:h,y:d}=sr.calcLabelPosition(t.points),f=xt.getRows(r.title),p=0,m=[],g=0,y=0;for(let b=0;b<=f.length;b++){let T=u.append("text").attr("text-anchor","middle").text(f[b]).attr("x",h).attr("y",d+p),w=T.node().getBBox();g=Math.max(g,w.width),y=Math.min(y,w.x),te.info(w.x,h,d+p),p===0&&(p=T.node().getBBox().height,te.info("Title height",p,d)),m.push(T)}let v=p*f.length;if(f.length>1){let b=(f.length-1)*p*.5;m.forEach((T,w)=>T.attr("y",d+w*p-b)),v=p*f.length}let x=u.node().getBBox();u.insert("rect",":first-child").attr("class","box").attr("x",h-g/2-Le().state.padding/2).attr("y",d-v/2-Le().state.padding/2-3.5).attr("width",g+Le().state.padding).attr("height",v+Le().state.padding),te.info(x)}Q6e++},"drawEdge")});var Io,zH,o2t,l2t,c2t,u2t,r_e,n_e,i_e=F(()=>{"use strict";$r();bO();wo();Tt();Gr();t_e();Zt();Dn();zH={},o2t=s(function(){},"setConf"),l2t=s(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"),c2t=s(function(e,t,r,n){Io=Le().state;let i=Le().securityLevel,a;i==="sandbox"&&(a=lt("#i"+t));let o=i==="sandbox"?lt(a.nodes()[0].contentDocument.body):lt("body"),l=i==="sandbox"?a.nodes()[0].contentDocument:document;te.debug("Rendering diagram "+e);let u=o.select(`[id='${t}']`);l2t(u);let h=n.db.getRootDoc(),d=u.append("g").attr("id",t+"-root");r_e(h,d,void 0,!1,o,l,n);let f=Io.padding,p=u.node().getBBox(),m=p.width+f*2,g=p.height+f*2,y=m*1.75;Br(u,g,y,Io.useMaxWidth),u.attr("viewBox",`${p.x-Io.padding} ${p.y-Io.padding} `+m+" "+g)},"draw"),u2t=s(e=>e?e.length*Io.fontSizeFactor:1,"getLabelWidth"),r_e=s((e,t,r,n,i,a,o)=>{let l=new un({compound:!0,multigraph:!0}),u,h=!0;for(u=0;u{let C=w.parentElement,k=0,S=0;C&&(C.parentElement&&(k=C.parentElement.getBBox().width),S=parseInt(C.getAttribute("data-x-shift"),10),Number.isNaN(S)&&(S=0)),w.setAttribute("x1",0-S+8),w.setAttribute("x2",k-S-8)})):te.debug("No Node "+b+": "+JSON.stringify(l.node(b)))});let v=y.getBBox();l.edges().forEach(function(b){b!==void 0&&l.edge(b)!==void 0&&(te.debug("Edge "+b.v+" -> "+b.w+": "+JSON.stringify(l.edge(b))),e_e(t,l.edge(b),l.edge(b).relation))}),v=y.getBBox();let x={id:r||"root",label:r||"root",width:0,height:0};return x.width=v.width+2*Io.padding,x.height=v.height+2*Io.padding,te.debug("Doc rendered",x,l),x},"renderDoc"),n_e={setConf:o2t,draw:c2t}});var a_e={};ar(a_e,{diagram:()=>h2t});var h2t,s_e=F(()=>{"use strict";wH();c_();FH();i_e();h2t={parser:e_,get db(){return new ol(1)},renderer:n_e,styles:u_,init:s(e=>{e.state||(e.state={}),e.state.arrowMarkerAbsolute=e.arrowMarkerAbsolute},"init")}});var c_e={};ar(c_e,{diagram:()=>m2t});var m2t,u_e=F(()=>{"use strict";wH();c_();FH();$H();m2t={parser:e_,get db(){return new ol(2)},renderer:j6e,styles:u_,init:s(e=>{e.state||(e.state={}),e.state.arrowMarkerAbsolute=e.arrowMarkerAbsolute},"init")}});var VH,f_e,p_e=F(()=>{"use strict";VH=(function(){var e=s(function(f,p,m,g){for(m=m||{},g=f.length;g--;m[f[g]]=p);return m},"o"),t=[6,8,10,11,12,14,16,17,18],r=[1,9],n=[1,10],i=[1,11],a=[1,12],o=[1,13],l=[1,14],u={trace:s(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:s(function(p,m,g,y,v,x,b){var T=x.length-1;switch(v){case 1:return x[T-1];case 2:this.$=[];break;case 3:x[T-1].push(x[T]),this.$=x[T-1];break;case 4:case 5:this.$=x[T];break;case 6:case 7:this.$=[];break;case 8:y.setDiagramTitle(x[T].substr(6)),this.$=x[T].substr(6);break;case 9:this.$=x[T].trim(),y.setAccTitle(this.$);break;case 10:case 11:this.$=x[T].trim(),y.setAccDescription(this.$);break;case 12:y.addSection(x[T].substr(8)),this.$=x[T].substr(8);break;case 13:y.addTask(x[T-1],x[T]),this.$="task";break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},e(t,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:r,12:n,14:i,16:a,17:o,18:l},e(t,[2,7],{1:[2,1]}),e(t,[2,3]),{9:15,11:r,12:n,14:i,16:a,17:o,18:l},e(t,[2,5]),e(t,[2,6]),e(t,[2,8]),{13:[1,16]},{15:[1,17]},e(t,[2,11]),e(t,[2,12]),{19:[1,18]},e(t,[2,4]),e(t,[2,9]),e(t,[2,10]),e(t,[2,13])],defaultActions:{},parseError:s(function(p,m){if(m.recoverable)this.trace(p);else{var g=new Error(p);throw g.hash=m,g}},"parseError"),parse:s(function(p){var m=this,g=[0],y=[],v=[null],x=[],b=this.table,T="",w=0,C=0,k=0,S=2,A=1,M=x.slice.call(arguments,1),N=Object.create(this.lexer),D={yy:{}};for(var R in this.yy)Object.prototype.hasOwnProperty.call(this.yy,R)&&(D.yy[R]=this.yy[R]);N.setInput(p,D.yy),D.yy.lexer=N,D.yy.parser=this,typeof N.yylloc>"u"&&(N.yylloc={});var E=N.yylloc;x.push(E);var I=N.options&&N.options.ranges;typeof D.yy.parseError=="function"?this.parseError=D.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function L(J){g.length=g.length-2*J,v.length=v.length-J,x.length=x.length-J}s(L,"popStack");function P(){var J;return J=y.pop()||N.lex()||A,typeof J!="number"&&(J instanceof Array&&(y=J,J=y.pop()),J=m.symbols_[J]||J),J}s(P,"lex");for(var B,O,$,G,V,z,W={},H,j,Q,U;;){if($=g[g.length-1],this.defaultActions[$]?G=this.defaultActions[$]:((B===null||typeof B>"u")&&(B=P()),G=b[$]&&b[$][B]),typeof G>"u"||!G.length||!G[0]){var ue="";U=[];for(H in b[$])this.terminals_[H]&&H>S&&U.push("'"+this.terminals_[H]+"'");N.showPosition?ue="Parse error on line "+(w+1)+`: +`+N.showPosition()+` +Expecting `+U.join(", ")+", got '"+(this.terminals_[B]||B)+"'":ue="Parse error on line "+(w+1)+": Unexpected "+(B==A?"end of input":"'"+(this.terminals_[B]||B)+"'"),this.parseError(ue,{text:N.match,token:this.terminals_[B]||B,line:N.yylineno,loc:E,expected:U})}if(G[0]instanceof Array&&G.length>1)throw new Error("Parse Error: multiple actions possible at state: "+$+", token: "+B);switch(G[0]){case 1:g.push(B),v.push(N.yytext),x.push(N.yylloc),g.push(G[1]),B=null,O?(B=O,O=null):(C=N.yyleng,T=N.yytext,w=N.yylineno,E=N.yylloc,k>0&&k--);break;case 2:if(j=this.productions_[G[1]][1],W.$=v[v.length-j],W._$={first_line:x[x.length-(j||1)].first_line,last_line:x[x.length-1].last_line,first_column:x[x.length-(j||1)].first_column,last_column:x[x.length-1].last_column},I&&(W._$.range=[x[x.length-(j||1)].range[0],x[x.length-1].range[1]]),z=this.performAction.apply(W,[T,C,w,D.yy,G[1],v,x].concat(M)),typeof z<"u")return z;j&&(g=g.slice(0,-1*j*2),v=v.slice(0,-1*j),x=x.slice(0,-1*j)),g.push(this.productions_[G[1]][0]),v.push(W.$),x.push(W._$),Q=b[g[g.length-2]][g[g.length-1]],g.push(Q);break;case 3:return!0}}return!0},"parse")},h=(function(){var f={EOF:1,parseError:s(function(m,g){if(this.yy.parser)this.yy.parser.parseError(m,g);else throw new Error(m)},"parseError"),setInput:s(function(p,m){return this.yy=m||this.yy||{},this._input=p,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 p=this._input[0];this.yytext+=p,this.yyleng++,this.offset++,this.match+=p,this.matched+=p;var m=p.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),p},"input"),unput:s(function(p){var m=p.length,g=p.split(/(?:\r\n?|\n)/g);this._input=p+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-m),this.offset-=m;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),g.length-1&&(this.yylineno-=g.length-1);var v=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:g?(g.length===y.length?this.yylloc.first_column:0)+y[y.length-g.length].length-g[0].length:this.yylloc.first_column-m},this.options.ranges&&(this.yylloc.range=[v[0],v[0]+this.yyleng-m]),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(p){this.unput(this.match.slice(p))},"less"),pastInput:s(function(){var p=this.matched.substr(0,this.matched.length-this.match.length);return(p.length>20?"...":"")+p.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:s(function(){var p=this.match;return p.length<20&&(p+=this._input.substr(0,20-p.length)),(p.substr(0,20)+(p.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:s(function(){var p=this.pastInput(),m=new Array(p.length+1).join("-");return p+this.upcomingInput()+` +`+m+"^"},"showPosition"),test_match:s(function(p,m){var g,y,v;if(this.options.backtrack_lexer&&(v={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&&(v.yylloc.range=this.yylloc.range.slice(0))),y=p[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+p[0].length},this.yytext+=p[0],this.match+=p[0],this.matches=p,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(p[0].length),this.matched+=p[0],g=this.performAction.call(this,this.yy,this,m,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),g)return g;if(this._backtrack){for(var x in v)this[x]=v[x];return!1}return!1},"test_match"),next:s(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var p,m,g,y;this._more||(this.yytext="",this.match="");for(var v=this._currentRules(),x=0;xm[0].length)){if(m=g,y=x,this.options.backtrack_lexer){if(p=this.test_match(g,v[x]),p!==!1)return p;if(this._backtrack){m=!1;continue}else return!1}else if(!this.options.flex)break}return m?(p=this.test_match(m,v[y]),p!==!1?p:!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 m=this.next();return m||this.lex()},"lex"),begin:s(function(m){this.conditionStack.push(m)},"begin"),popState:s(function(){var m=this.conditionStack.length-1;return m>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(m){return m=this.conditionStack.length-1-Math.abs(m||0),m>=0?this.conditionStack[m]:"INITIAL"},"topState"),pushState:s(function(m){this.begin(m)},"pushState"),stateStackSize:s(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:s(function(m,g,y,v){var x=v;switch(y){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;break;case 8:return this.popState(),"acc_title_value";break;case 9:return this.begin("acc_descr"),14;break;case 10:return this.popState(),"acc_descr_value";break;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 f})();u.lexer=h;function d(){this.yy={}}return s(d,"Parser"),d.prototype=u,u.Parser=d,new d})();VH.parser=VH;f_e=VH});var mv,WH,zC,VC,x2t,b2t,T2t,C2t,k2t,w2t,S2t,m_e,E2t,qH,g_e=F(()=>{"use strict";Zt();An();mv="",WH=[],zC=[],VC=[],x2t=s(function(){WH.length=0,zC.length=0,mv="",VC.length=0,gr()},"clear"),b2t=s(function(e){mv=e,WH.push(e)},"addSection"),T2t=s(function(){return WH},"getSections"),C2t=s(function(){let e=m_e(),t=100,r=0;for(;!e&&r{r.people&&e.push(...r.people)}),[...new Set(e)].sort()},"updateActors"),w2t=s(function(e,t){let r=t.substr(1).split(":"),n=0,i=[];r.length===1?(n=Number(r[0]),i=[]):(n=Number(r[0]),i=r[1].split(","));let a=i.map(l=>l.trim()),o={section:mv,type:mv,people:a,task:e,score:n};VC.push(o)},"addTask"),S2t=s(function(e){let t={section:mv,type:mv,description:e,task:e,classes:[]};zC.push(t)},"addTaskOrg"),m_e=s(function(){let e=s(function(r){return VC[r].processed},"compileTask"),t=!0;for(let[r,n]of VC.entries())e(r),t=t&&n.processed;return t},"compileTasks"),E2t=s(function(){return k2t()},"getActors"),qH={getConfig:s(()=>Le().journey,"getConfig"),clear:x2t,setDiagramTitle:Mr,getDiagramTitle:Rr,setAccTitle:Cr,getAccTitle:Sr,setAccDescription:Er,getAccDescription:Ar,addSection:b2t,getSections:T2t,getTasks:C2t,addTask:w2t,addTaskOrg:S2t,getActors:E2t}});var A2t,y_e,v_e=F(()=>{"use strict";s1();A2t=s(e=>`.label { + font-family: ${e.fontFamily}; + color: ${e.textColor}; + } + .mouth { + stroke: #666; + } + + line { + stroke: ${e.textColor} + } + + .legend { + fill: ${e.textColor}; + font-family: ${e.fontFamily}; + } + + .label text { + fill: #333; + } + .label { + color: ${e.textColor} + } + + .face { + ${e.faceColor?`fill: ${e.faceColor}`:"fill: #FFF8DC"}; + stroke: #999; + } + + .node rect, + .node circle, + .node ellipse, + .node polygon, + .node path { + fill: ${e.mainBkg}; + stroke: ${e.nodeBorder}; + stroke-width: 1px; + } + + .node .label { + text-align: center; + } + .node.clickable { + cursor: pointer; + } + + .arrowheadPath { + fill: ${e.arrowheadColor}; + } + + .edgePath .path { + stroke: ${e.lineColor}; + stroke-width: 1.5px; + } + + .flowchart-link { + stroke: ${e.lineColor}; + fill: none; + } + + .edgeLabel { + background-color: ${e.edgeLabelBackground}; + rect { + opacity: 0.5; + } + text-align: center; + } + + .cluster rect { + } + + .cluster text { + fill: ${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; + } + + .task-type-0, .section-type-0 { + ${e.fillType0?`fill: ${e.fillType0}`:""}; + } + .task-type-1, .section-type-1 { + ${e.fillType0?`fill: ${e.fillType1}`:""}; + } + .task-type-2, .section-type-2 { + ${e.fillType0?`fill: ${e.fillType2}`:""}; + } + .task-type-3, .section-type-3 { + ${e.fillType0?`fill: ${e.fillType3}`:""}; + } + .task-type-4, .section-type-4 { + ${e.fillType0?`fill: ${e.fillType4}`:""}; + } + .task-type-5, .section-type-5 { + ${e.fillType0?`fill: ${e.fillType5}`:""}; + } + .task-type-6, .section-type-6 { + ${e.fillType0?`fill: ${e.fillType6}`:""}; + } + .task-type-7, .section-type-7 { + ${e.fillType0?`fill: ${e.fillType7}`:""}; + } + + .actor-0 { + ${e.actor0?`fill: ${e.actor0}`:""}; + } + .actor-1 { + ${e.actor1?`fill: ${e.actor1}`:""}; + } + .actor-2 { + ${e.actor2?`fill: ${e.actor2}`:""}; + } + .actor-3 { + ${e.actor3?`fill: ${e.actor3}`:""}; + } + .actor-4 { + ${e.actor4?`fill: ${e.actor4}`:""}; + } + .actor-5 { + ${e.actor5?`fill: ${e.actor5}`:""}; + } + ${jc()} +`,"getStyles"),y_e=A2t});var UH,R2t,x_e,b_e,_2t,L2t,HH,D2t,I2t,T_e,M2t,gv,C_e=F(()=>{"use strict";$r();ud();UH=s(function(e,t){return Dp(e,t)},"drawRect"),R2t=s(function(e,t){let n=e.append("circle").attr("cx",t.cx).attr("cy",t.cy).attr("class","face").attr("r",15).attr("stroke-width",2).attr("overflow","visible"),i=e.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 a(u){let h=Al().startAngle(Math.PI/2).endAngle(3*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);u.append("path").attr("class","mouth").attr("d",h).attr("transform","translate("+t.cx+","+(t.cy+2)+")")}s(a,"smile");function o(u){let h=Al().startAngle(3*Math.PI/2).endAngle(5*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);u.append("path").attr("class","mouth").attr("d",h).attr("transform","translate("+t.cx+","+(t.cy+7)+")")}s(o,"sad");function l(u){u.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(l,"ambivalent"),t.score>3?a(i):t.score<3?o(i):l(i),n},"drawFace"),x_e=s(function(e,t){let r=e.append("circle");return r.attr("cx",t.cx),r.attr("cy",t.cy),r.attr("class","actor-"+t.pos),r.attr("fill",t.fill),r.attr("stroke",t.stroke),r.attr("r",t.r),r.class!==void 0&&r.attr("class",r.class),t.title!==void 0&&r.append("title").text(t.title),r},"drawCircle"),b_e=s(function(e,t){return Ire(e,t)},"drawText"),_2t=s(function(e,t){function r(i,a,o,l,u){return i+","+a+" "+(i+o)+","+a+" "+(i+o)+","+(a+l-u)+" "+(i+o-u*1.2)+","+(a+l)+" "+i+","+(a+l)}s(r,"genPoints");let n=e.append("polygon");n.attr("points",r(t.x,t.y,50,20,7)),n.attr("class","labelBox"),t.y=t.y+t.labelMargin,t.x=t.x+.5*t.labelMargin,b_e(e,t)},"drawLabel"),L2t=s(function(e,t,r){let n=e.append("g"),i=Ra();i.x=t.x,i.y=t.y,i.fill=t.fill,i.width=r.width*t.taskCount+r.diagramMarginX*(t.taskCount-1),i.height=r.height,i.class="journey-section section-type-"+t.num,i.rx=3,i.ry=3,UH(n,i),T_e(r)(t.text,n,i.x,i.y,i.width,i.height,{class:"journey-section section-type-"+t.num},r,t.colour)},"drawSection"),HH=-1,D2t=s(function(e,t,r,n){let i=t.x+r.width/2,a=e.append("g");HH++,a.append("line").attr("id",n+"-task"+HH).attr("x1",i).attr("y1",t.y).attr("x2",i).attr("y2",450).attr("class","task-line").attr("stroke-width","1px").attr("stroke-dasharray","4 2").attr("stroke","#666"),R2t(a,{cx:i,cy:300+(5-t.score)*30,score:t.score});let l=Ra();l.x=t.x,l.y=t.y,l.fill=t.fill,l.width=r.width,l.height=r.height,l.class="task task-type-"+t.num,l.rx=3,l.ry=3,UH(a,l);let u=t.x+14;t.people.forEach(h=>{let d=t.actors[h].color,f={cx:u,cy:t.y,r:7,fill:d,stroke:"#000",title:h,pos:t.actors[h].position};x_e(a,f),u+=10}),T_e(r)(t.task,a,l.x,l.y,l.width,l.height,{class:"task"},r,t.colour)},"drawTask"),I2t=s(function(e,t){PS(e,t)},"drawBackgroundRect"),T_e=(function(){function e(i,a,o,l,u,h,d,f){let p=a.append("text").attr("x",o+u/2).attr("y",l+h/2+5).style("font-color",f).style("text-anchor","middle").text(i);n(p,d)}s(e,"byText");function t(i,a,o,l,u,h,d,f,p){let{taskFontSize:m,taskFontFamily:g}=f,y=i.split(//gi);for(let v=0;v{let a=Dh[i].color,o={cx:20,cy:n,r:7,fill:a,stroke:"#000",pos:Dh[i].position};gv.drawCircle(e,o);let l=e.append("text").attr("visibility","hidden").text(i),u=l.node().getBoundingClientRect().width;l.remove();let h=[];if(u<=r)h=[i];else{let d=i.split(" "),f="";l=e.append("text").attr("visibility","hidden"),d.forEach(p=>{let m=f?`${f} ${p}`:p;if(l.text(m),l.node().getBoundingClientRect().width>r){if(f&&h.push(f),f=p,l.text(p),l.node().getBoundingClientRect().width>r){let y="";for(let v of p)y+=v,l.text(y+"-"),l.node().getBoundingClientRect().width>r&&(h.push(y.slice(0,-1)+"-"),y=v);f=y}}else f=m}),f&&h.push(f),l.remove()}h.forEach((d,f)=>{let p={x:40,y:n+7+f*20,fill:"#666",text:d,textMargin:t.boxTextMargin??5},g=gv.drawText(e,p).node().getBoundingClientRect().width;g>h_&&g>t.leftMargin-g&&(h_=g)}),n+=Math.max(20,h.length*20)})}var N2t,Dh,h_,Kl,jf,O2t,ll,YH,k_e,B2t,jH,w_e=F(()=>{"use strict";$r();C_e();Zt();Dn();N2t=s(function(e){Object.keys(e).forEach(function(r){Kl[r]=e[r]})},"setConf"),Dh={},h_=0;s(P2t,"drawActorLegend");Kl=Le().journey,jf=0,O2t=s(function(e,t,r,n){let i=Le(),a=i.journey.titleColor,o=i.journey.titleFontSize,l=i.journey.titleFontFamily,u=i.securityLevel,h;u==="sandbox"&&(h=lt("#i"+t));let d=u==="sandbox"?lt(h.nodes()[0].contentDocument.body):lt("body");ll.init();let f=d.select("#"+t);gv.initGraphics(f,t);let p=n.db.getTasks(),m=n.db.getDiagramTitle(),g=n.db.getActors();for(let w in Dh)delete Dh[w];let y=0;g.forEach(w=>{Dh[w]={color:Kl.actorColours[y%Kl.actorColours.length],position:y},y++}),P2t(f),jf=Kl.leftMargin+h_,ll.insert(0,0,jf,Object.keys(Dh).length*50),B2t(f,p,0,t);let v=ll.getBounds();m&&f.append("text").text(m).attr("x",jf).attr("font-size",o).attr("font-weight","bold").attr("y",25).attr("fill",a).attr("font-family",l);let x=v.stopy-v.starty+2*Kl.diagramMarginY,b=jf+v.stopx+2*Kl.diagramMarginX;Br(f,x,b,Kl.useMaxWidth),f.append("line").attr("x1",jf).attr("y1",Kl.height*4).attr("x2",b-jf-4).attr("y2",Kl.height*4).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#"+t+"-arrowhead)");let T=m?70:0;f.attr("viewBox",`${v.startx} -25 ${b} ${x+T}`),f.attr("preserveAspectRatio","xMinYMin meet"),f.attr("height",x+T+25)},"draw"),ll={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],init:s(function(){this.sequenceItems=[],this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},this.verticalPos=0},"init"),updateVal:s(function(e,t,r,n){e[t]===void 0?e[t]=r:e[t]=n(r,e[t])},"updateVal"),updateBounds:s(function(e,t,r,n){let i=Le().journey,a=this,o=0;function l(u){return s(function(d){o++;let f=a.sequenceItems.length-o+1;a.updateVal(d,"starty",t-f*i.boxMargin,Math.min),a.updateVal(d,"stopy",n+f*i.boxMargin,Math.max),a.updateVal(ll.data,"startx",e-f*i.boxMargin,Math.min),a.updateVal(ll.data,"stopx",r+f*i.boxMargin,Math.max),u!=="activation"&&(a.updateVal(d,"startx",e-f*i.boxMargin,Math.min),a.updateVal(d,"stopx",r+f*i.boxMargin,Math.max),a.updateVal(ll.data,"starty",t-f*i.boxMargin,Math.min),a.updateVal(ll.data,"stopy",n+f*i.boxMargin,Math.max))},"updateItemBounds")}s(l,"updateFn"),this.sequenceItems.forEach(l())},"updateBounds"),insert:s(function(e,t,r,n){let i=Math.min(e,r),a=Math.max(e,r),o=Math.min(t,n),l=Math.max(t,n);this.updateVal(ll.data,"startx",i,Math.min),this.updateVal(ll.data,"starty",o,Math.min),this.updateVal(ll.data,"stopx",a,Math.max),this.updateVal(ll.data,"stopy",l,Math.max),this.updateBounds(i,o,a,l)},"insert"),bumpVerticalPos:s(function(e){this.verticalPos=this.verticalPos+e,this.data.stopy=this.verticalPos},"bumpVerticalPos"),getVerticalPos:s(function(){return this.verticalPos},"getVerticalPos"),getBounds:s(function(){return this.data},"getBounds")},YH=Kl.sectionFills,k_e=Kl.sectionColours,B2t=s(function(e,t,r,n){let i=Le().journey,a="",o=i.height*2+i.diagramMarginY,l=r+o,u=0,h="#CCC",d="black",f=0;for(let[p,m]of t.entries()){if(a!==m.section){h=YH[u%YH.length],f=u%YH.length,d=k_e[u%k_e.length];let y=0,v=m.section;for(let b=p;b(Dh[v]&&(y[v]=Dh[v]),y),{});m.x=p*i.taskMargin+p*i.width+jf,m.y=l,m.width=i.diagramMarginX,m.height=i.diagramMarginY,m.colour=d,m.fill=h,m.num=f,m.actors=g,gv.drawTask(e,m,i,n),ll.insert(m.x,m.y,m.x+m.width+i.taskMargin,450)}},"drawTasks"),jH={setConf:N2t,draw:O2t}});var S_e={};ar(S_e,{diagram:()=>$2t});var $2t,E_e=F(()=>{"use strict";p_e();g_e();v_e();w_e();$2t={parser:f_e,db:qH,renderer:jH,styles:y_e,init:s(e=>{jH.setConf(e.journey),qH.clear()},"init")}});var KH,M_e,N_e=F(()=>{"use strict";KH=(function(){var e=s(function(p,m,g,y){for(g=g||{},y=p.length;y--;g[p[y]]=m);return g},"o"),t=[6,11,13,14,15,17,19,20,23,24],r=[1,12],n=[1,13],i=[1,14],a=[1,15],o=[1,16],l=[1,19],u=[1,20],h={trace:s(function(){},"trace"),yy:{},symbols_:{error:2,start:3,timeline_header:4,document:5,EOF:6,timeline:7,timeline_lr:8,timeline_td:9,line:10,SPACE:11,statement:12,NEWLINE:13,title:14,acc_title:15,acc_title_value:16,acc_descr:17,acc_descr_value:18,acc_descr_multiline_value:19,section:20,period_statement:21,event_statement:22,period:23,event:24,$accept:0,$end:1},terminals_:{2:"error",6:"EOF",7:"timeline",8:"timeline_lr",9:"timeline_td",11:"SPACE",13:"NEWLINE",14:"title",15:"acc_title",16:"acc_title_value",17:"acc_descr",18:"acc_descr_value",19:"acc_descr_multiline_value",20:"section",23:"period",24:"event"},productions_:[0,[3,3],[4,1],[4,1],[4,1],[5,0],[5,2],[10,2],[10,1],[10,1],[10,1],[12,1],[12,2],[12,2],[12,1],[12,1],[12,1],[12,1],[21,1],[22,1]],performAction:s(function(m,g,y,v,x,b,T){var w=b.length-1;switch(x){case 1:return b[w-1];case 3:v.setDirection("LR");break;case 4:v.setDirection("TD");break;case 5:this.$=[];break;case 6:b[w-1].push(b[w]),this.$=b[w-1];break;case 7:case 8:this.$=b[w];break;case 9:case 10:this.$=[];break;case 11:v.getCommonDb().setDiagramTitle(b[w].substr(6)),this.$=b[w].substr(6);break;case 12:this.$=b[w].trim(),v.getCommonDb().setAccTitle(this.$);break;case 13:case 14:this.$=b[w].trim(),v.getCommonDb().setAccDescription(this.$);break;case 15:v.addSection(b[w].substr(8)),this.$=b[w].substr(8);break;case 18:v.addTask(b[w],0,""),this.$=b[w];break;case 19:v.addEvent(b[w].substr(2)),this.$=b[w];break}},"anonymous"),table:[{3:1,4:2,7:[1,3],8:[1,4],9:[1,5]},{1:[3]},e(t,[2,5],{5:6}),e(t,[2,2]),e(t,[2,3]),e(t,[2,4]),{6:[1,7],10:8,11:[1,9],12:10,13:[1,11],14:r,15:n,17:i,19:a,20:o,21:17,22:18,23:l,24:u},e(t,[2,10],{1:[2,1]}),e(t,[2,6]),{12:21,14:r,15:n,17:i,19:a,20:o,21:17,22:18,23:l,24:u},e(t,[2,8]),e(t,[2,9]),e(t,[2,11]),{16:[1,22]},{18:[1,23]},e(t,[2,14]),e(t,[2,15]),e(t,[2,16]),e(t,[2,17]),e(t,[2,18]),e(t,[2,19]),e(t,[2,7]),e(t,[2,12]),e(t,[2,13])],defaultActions:{},parseError:s(function(m,g){if(g.recoverable)this.trace(m);else{var y=new Error(m);throw y.hash=g,y}},"parseError"),parse:s(function(m){var g=this,y=[0],v=[],x=[null],b=[],T=this.table,w="",C=0,k=0,S=0,A=2,M=1,N=b.slice.call(arguments,1),D=Object.create(this.lexer),R={yy:{}};for(var E in this.yy)Object.prototype.hasOwnProperty.call(this.yy,E)&&(R.yy[E]=this.yy[E]);D.setInput(m,R.yy),R.yy.lexer=D,R.yy.parser=this,typeof D.yylloc>"u"&&(D.yylloc={});var I=D.yylloc;b.push(I);var L=D.options&&D.options.ranges;typeof R.yy.parseError=="function"?this.parseError=R.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function P(he){y.length=y.length-2*he,x.length=x.length-he,b.length=b.length-he}s(P,"popStack");function B(){var he;return he=v.pop()||D.lex()||M,typeof he!="number"&&(he instanceof Array&&(v=he,he=v.pop()),he=g.symbols_[he]||he),he}s(B,"lex");for(var O,$,G,V,z,W,H={},j,Q,U,ue;;){if(G=y[y.length-1],this.defaultActions[G]?V=this.defaultActions[G]:((O===null||typeof O>"u")&&(O=B()),V=T[G]&&T[G][O]),typeof V>"u"||!V.length||!V[0]){var J="";ue=[];for(j in T[G])this.terminals_[j]&&j>A&&ue.push("'"+this.terminals_[j]+"'");D.showPosition?J="Parse error on line "+(C+1)+`: +`+D.showPosition()+` +Expecting `+ue.join(", ")+", got '"+(this.terminals_[O]||O)+"'":J="Parse error on line "+(C+1)+": Unexpected "+(O==M?"end of input":"'"+(this.terminals_[O]||O)+"'"),this.parseError(J,{text:D.match,token:this.terminals_[O]||O,line:D.yylineno,loc:I,expected:ue})}if(V[0]instanceof Array&&V.length>1)throw new Error("Parse Error: multiple actions possible at state: "+G+", token: "+O);switch(V[0]){case 1:y.push(O),x.push(D.yytext),b.push(D.yylloc),y.push(V[1]),O=null,$?(O=$,$=null):(k=D.yyleng,w=D.yytext,C=D.yylineno,I=D.yylloc,S>0&&S--);break;case 2:if(Q=this.productions_[V[1]][1],H.$=x[x.length-Q],H._$={first_line:b[b.length-(Q||1)].first_line,last_line:b[b.length-1].last_line,first_column:b[b.length-(Q||1)].first_column,last_column:b[b.length-1].last_column},L&&(H._$.range=[b[b.length-(Q||1)].range[0],b[b.length-1].range[1]]),W=this.performAction.apply(H,[w,k,C,R.yy,V[1],x,b].concat(N)),typeof W<"u")return W;Q&&(y=y.slice(0,-1*Q*2),x=x.slice(0,-1*Q),b=b.slice(0,-1*Q)),y.push(this.productions_[V[1]][0]),x.push(H.$),b.push(H._$),U=T[y[y.length-2]][y[y.length-1]],y.push(U);break;case 3:return!0}}return!0},"parse")},d=(function(){var p={EOF:1,parseError:s(function(g,y){if(this.yy.parser)this.yy.parser.parseError(g,y);else throw new Error(g)},"parseError"),setInput:s(function(m,g){return this.yy=g||this.yy||{},this._input=m,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 m=this._input[0];this.yytext+=m,this.yyleng++,this.offset++,this.match+=m,this.matched+=m;var g=m.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),m},"input"),unput:s(function(m){var g=m.length,y=m.split(/(?:\r\n?|\n)/g);this._input=m+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-g),this.offset-=g;var v=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),y.length-1&&(this.yylineno-=y.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:y?(y.length===v.length?this.yylloc.first_column:0)+v[v.length-y.length].length-y[0].length:this.yylloc.first_column-g},this.options.ranges&&(this.yylloc.range=[x[0],x[0]+this.yyleng-g]),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(m){this.unput(this.match.slice(m))},"less"),pastInput:s(function(){var m=this.matched.substr(0,this.matched.length-this.match.length);return(m.length>20?"...":"")+m.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:s(function(){var m=this.match;return m.length<20&&(m+=this._input.substr(0,20-m.length)),(m.substr(0,20)+(m.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:s(function(){var m=this.pastInput(),g=new Array(m.length+1).join("-");return m+this.upcomingInput()+` +`+g+"^"},"showPosition"),test_match:s(function(m,g){var y,v,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))),v=m[0].match(/(?:\r\n?|\n).*/g),v&&(this.yylineno+=v.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:v?v[v.length-1].length-v[v.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+m[0].length},this.yytext+=m[0],this.match+=m[0],this.matches=m,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(m[0].length),this.matched+=m[0],y=this.performAction.call(this,this.yy,this,g,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),y)return y;if(this._backtrack){for(var b in x)this[b]=x[b];return!1}return!1},"test_match"),next:s(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var m,g,y,v;this._more||(this.yytext="",this.match="");for(var x=this._currentRules(),b=0;bg[0].length)){if(g=y,v=b,this.options.backtrack_lexer){if(m=this.test_match(y,x[b]),m!==!1)return m;if(this._backtrack){g=!1;continue}else return!1}else if(!this.options.flex)break}return g?(m=this.test_match(g,x[v]),m!==!1?m:!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 g=this.next();return g||this.lex()},"lex"),begin:s(function(g){this.conditionStack.push(g)},"begin"),popState:s(function(){var g=this.conditionStack.length-1;return g>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(g){return g=this.conditionStack.length-1-Math.abs(g||0),g>=0?this.conditionStack[g]:"INITIAL"},"topState"),pushState:s(function(g){this.begin(g)},"pushState"),stateStackSize:s(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:s(function(g,y,v,x){var b=x;switch(v){case 0:break;case 1:break;case 2:return 13;case 3:break;case 4:break;case 5:return 8;case 6:return 9;case 7:return 7;case 8:return 14;case 9:return this.begin("acc_title"),15;break;case 10:return this.popState(),"acc_title_value";break;case 11:return this.begin("acc_descr"),17;break;case 12:return this.popState(),"acc_descr_value";break;case 13:this.begin("acc_descr_multiline");break;case 14:this.popState();break;case 15:return"acc_descr_multiline_value";case 16:return 20;case 17:return 24;case 18:return 23;case 19:return 6;case 20:return"INVALID"}},"anonymous"),rules:[/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:timeline[ \t]+LR\b)/i,/^(?:timeline[ \t]+TD\b)/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:[14,15],inclusive:!1},acc_descr:{rules:[12],inclusive:!1},acc_title:{rules:[10],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,11,13,16,17,18,19,20],inclusive:!0}}};return p})();h.lexer=d;function f(){this.yy={}}return s(f,"Parser"),f.prototype=h,h.Parser=f,new f})();KH.parser=KH;M_e=KH});var JH={};ar(JH,{addEvent:()=>H_e,addSection:()=>z_e,addTask:()=>q_e,addTaskOrg:()=>U_e,clear:()=>$_e,default:()=>Y2t,getCommonDb:()=>B_e,getDirection:()=>G_e,getSections:()=>V_e,getTasks:()=>W_e,setDirection:()=>F_e});var yv,O_e,ZH,QH,d_,vv,B_e,$_e,F_e,G_e,z_e,V_e,W_e,q_e,H_e,U_e,P_e,Y2t,Y_e=F(()=>{"use strict";An();yv="",O_e=0,ZH="LR",QH=[],d_=[],vv=[],B_e=s(()=>xx,"getCommonDb"),$_e=s(function(){QH.length=0,d_.length=0,yv="",vv.length=0,ZH="LR",gr()},"clear"),F_e=s(function(e){ZH=e},"setDirection"),G_e=s(function(){return ZH},"getDirection"),z_e=s(function(e){yv=e,QH.push(e)},"addSection"),V_e=s(function(){return QH},"getSections"),W_e=s(function(){let e=P_e(),t=100,r=0;for(;!e&&rr.id===O_e-1).events.push(e)},"addEvent"),U_e=s(function(e){let t={section:yv,type:yv,description:e,task:e,classes:[]};d_.push(t)},"addTaskOrg"),P_e=s(function(){let e=s(function(r){return vv[r].processed},"compileTask"),t=!0;for(let[r,n]of vv.entries())e(r),t=t&&n.processed;return t},"compileTasks"),Y2t={clear:$_e,getCommonDb:B_e,getDirection:G_e,setDirection:F_e,addSection:z_e,getSections:V_e,getTasks:W_e,addTask:q_e,addTaskOrg:U_e,addEvent:H_e}});function Z_e(e,t){e.each(function(){var r=lt(this),n=r.text().split(/(\s+|
    )/).reverse(),i,a=[],o=1.1,l=r.attr("y"),u=parseFloat(r.attr("dy")),h=r.text(null).append("tspan").attr("x",0).attr("y",l).attr("dy",u+"em");for(let d=0;dt||i==="
    ")&&(a.pop(),h.text(a.join(" ").trim()),i==="
    "?a=[""]:a=[i],h=r.append("tspan").attr("x",0).attr("y",l).attr("dy",o+"em").text(i))})}var j_e,f_,j2t,X2t,X_e,K2t,Z2t,eU,Q2t,J2t,eTt,tU,K_e,tTt,rTt,nTt,iTt,es,rU=F(()=>{"use strict";$r();j_e=0,f_=s(function(e,t){let r=e.append("rect");return r.attr("x",t.x),r.attr("y",t.y),r.attr("fill",t.fill),r.attr("stroke",t.stroke),r.attr("width",t.width),r.attr("height",t.height),r.attr("rx",t.rx),r.attr("ry",t.ry),t.class!==void 0&&r.attr("class",t.class),r},"drawRect"),j2t=s(function(e,t){let n=e.append("circle").attr("cx",t.cx).attr("cy",t.cy).attr("class","face").attr("r",15).attr("stroke-width",2).attr("overflow","visible"),i=e.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 a(u){let h=Al().startAngle(Math.PI/2).endAngle(3*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);u.append("path").attr("class","mouth").attr("d",h).attr("transform","translate("+t.cx+","+(t.cy+2)+")")}s(a,"smile");function o(u){let h=Al().startAngle(3*Math.PI/2).endAngle(5*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);u.append("path").attr("class","mouth").attr("d",h).attr("transform","translate("+t.cx+","+(t.cy+7)+")")}s(o,"sad");function l(u){u.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(l,"ambivalent"),t.score>3?a(i):t.score<3?o(i):l(i),n},"drawFace"),X2t=s(function(e,t){let r=e.append("circle");return r.attr("cx",t.cx),r.attr("cy",t.cy),r.attr("class","actor-"+t.pos),r.attr("fill",t.fill),r.attr("stroke",t.stroke),r.attr("r",t.r),r.class!==void 0&&r.attr("class",r.class),t.title!==void 0&&r.append("title").text(t.title),r},"drawCircle"),X_e=s(function(e,t){let r=t.text.replace(//gi," "),n=e.append("text");n.attr("x",t.x),n.attr("y",t.y),n.attr("class","legend"),n.style("text-anchor",t.anchor),t.class!==void 0&&n.attr("class",t.class);let i=n.append("tspan");return i.attr("x",t.x+t.textMargin*2),i.text(r),n},"drawText"),K2t=s(function(e,t){function r(i,a,o,l,u){return i+","+a+" "+(i+o)+","+a+" "+(i+o)+","+(a+l-u)+" "+(i+o-u*1.2)+","+(a+l)+" "+i+","+(a+l)}s(r,"genPoints");let n=e.append("polygon");n.attr("points",r(t.x,t.y,50,20,7)),n.attr("class","labelBox"),t.y=t.y+t.labelMargin,t.x=t.x+.5*t.labelMargin,X_e(e,t)},"drawLabel"),Z2t=s(function(e,t,r){let n=e.append("g"),i=tU();i.x=t.x,i.y=t.y,i.fill=t.fill,i.width=r.width,i.height=r.height,i.class="journey-section section-type-"+t.num,i.rx=3,i.ry=3,f_(n,i),K_e(r)(t.text,n,i.x,i.y,i.width,i.height,{class:"journey-section section-type-"+t.num},r,t.colour)},"drawSection"),eU=-1,Q2t=s(function(e,t,r,n){let i=t.x+r.width/2,a=e.append("g");eU++,a.append("line").attr("id",n+"-task"+eU).attr("x1",i).attr("y1",t.y).attr("x2",i).attr("y2",450).attr("class","task-line").attr("stroke-width","1px").attr("stroke-dasharray","4 2").attr("stroke","#666"),j2t(a,{cx:i,cy:300+(5-t.score)*30,score:t.score});let l=tU();l.x=t.x,l.y=t.y,l.fill=t.fill,l.width=r.width,l.height=r.height,l.class="task task-type-"+t.num,l.rx=3,l.ry=3,f_(a,l),K_e(r)(t.task,a,l.x,l.y,l.width,l.height,{class:"task"},r,t.colour)},"drawTask"),J2t=s(function(e,t){f_(e,{x:t.startx,y:t.starty,width:t.stopx-t.startx,height:t.stopy-t.starty,fill:t.fill,class:"rect"}).lower()},"drawBackgroundRect"),eTt=s(function(){return{x:0,y:0,fill:void 0,"text-anchor":"start",width:100,height:100,textMargin:0,rx:0,ry:0}},"getTextObj"),tU=s(function(){return{x:0,y:0,width:100,anchor:"start",height:100,rx:0,ry:0}},"getNoteRect"),K_e=(function(){function e(i,a,o,l,u,h,d,f){let p=a.append("text").attr("x",o+u/2).attr("y",l+h/2+5).style("font-color",f).style("text-anchor","middle").text(i);n(p,d)}s(e,"byText");function t(i,a,o,l,u,h,d,f,p){let{taskFontSize:m,taskFontFamily:g}=f,y=i.split(//gi);for(let v=0;v0?`M0 ${t.height-l} v${-t.height+2*l} q0,-${o},${o},-${o} h${t.width-2*l} q${o},0,${o},${o} v${t.height-l} H0 Z`:`M0 ${t.height-l} v${-(t.height-l)} h${t.width} v${t.height} H0 Z`;e.append("path").attr("id",n+"-node-"+j_e++).attr("class","node-bkg node-"+t.type).attr("d",u),a?.includes("redux")||e.append("line").attr("class","node-line-"+r).attr("x1",0).attr("y1",t.height).attr("x2",t.width).attr("y2",t.height)},"defaultBkg"),es={drawRect:f_,drawCircle:X2t,drawSection:Z2t,drawText:X_e,drawLabel:K2t,drawTask:Q2t,drawBackgroundRect:J2t,getTextObj:eTt,getNoteRect:tU,initGraphics:tTt,drawNode:rTt,getVirtualNodeHeight:nTt}});var aTt,Q_e,sTt,J_e,eLe=F(()=>{"use strict";$r();rU();Tt();Zt();Dn();aTt=s(function(e,t,r,n){let i=Le(),{look:a,theme:o,themeVariables:l}=i,{useGradient:u,gradientStart:h,gradientStop:d}=l,f=i.timeline?.leftMargin??50;te.debug("timeline",n.db);let p=i.securityLevel,m;p==="sandbox"&&(m=lt("#i"+t));let y=(p==="sandbox"?lt(m.nodes()[0].contentDocument.body):lt("body")).select("#"+t);y.append("g");let v=n.db.getTasks(),x=n.db.getCommonDb().getDiagramTitle();te.debug("task",v),es.initGraphics(y,t);let b=n.db.getSections();te.debug("sections",b);let T=0,w=0,C=0,k=0,S=50+f,A=50;k=50;let M=0,N=!0;b.forEach(function(L){let P={number:M,descr:L,section:M,width:150,padding:20,maxHeight:T},B=es.getVirtualNodeHeight(y,P,i);te.debug("sectionHeight before draw",B),T=Math.max(T,B+20)});let D=0,R=0;te.debug("tasks.length",v.length);for(let[L,P]of v.entries()){let B={number:L,descr:P,section:P.section,width:150,padding:20,maxHeight:w},O=es.getVirtualNodeHeight(y,B,i);te.debug("taskHeight before draw",O),w=Math.max(w,O+20),D=Math.max(D,P.events.length);let $=0;for(let G of P.events){let V={descr:G,section:P.section,number:P.section,width:150,padding:20,maxHeight:50};$+=es.getVirtualNodeHeight(y,V,i)}P.events.length>0&&($+=(P.events.length-1)*10),R=Math.max(R,$)}te.debug("maxSectionHeight before draw",T),te.debug("maxTaskHeight before draw",w),b&&b.length>0?b.forEach(L=>{let P=v.filter(G=>G.section===L),B={number:M,descr:L,section:M,width:200*Math.max(P.length,1)-50,padding:20,maxHeight:T};te.debug("sectionNode",B);let O=y.append("g"),$=es.drawNode(O,B,M,i,t);te.debug("sectionNode output",$),O.attr("transform",`translate(${S}, ${k})`),A+=T+50,P.length>0&&Q_e(y,P,M,S,A,w,i,D,R,T,!1,t),S+=200*Math.max(P.length,1),A=k,M++}):(N=!1,Q_e(y,v,M,S,A,w,i,D,R,T,!0,t));let E=y.node().getBBox();if(te.debug("bounds",E),x&&y.append("text").text(x).attr("x",a==="neo"?E.x*2+f:E.width/2-f).attr("font-size","4ex").attr("font-weight","bold").attr("y",20),C=N?T+w+150:w+100,y.append("g").attr("class","lineWrapper").append("line").attr("x1",f).attr("y1",C).attr("x2",E.width+3*f).attr("y2",C).attr("stroke-width",4).attr("stroke","black").attr("marker-end",`url(#${t}-arrowhead)`),a==="neo"&&u&&o!=="neutral"){let L=y.select("defs"),B=(L.empty()?y.append("defs"):L).append("linearGradient").attr("id",y.attr("id")+"-gradient").attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");B.append("stop").attr("offset","0%").attr("stop-color",h).attr("stop-opacity",1),B.append("stop").attr("offset","100%").attr("stop-color",d).attr("stop-opacity",1)}Go(void 0,y,i.timeline?.padding??50,i.timeline?.useMaxWidth??!1)},"draw"),Q_e=s(function(e,t,r,n,i,a,o,l,u,h,d,f){for(let p of t){let m={descr:p.task,section:r,number:r,width:150,padding:20,maxHeight:a};te.debug("taskNode",m);let g=e.append("g").attr("class","taskWrapper"),v=es.drawNode(g,m,r,o,f).height;if(te.debug("taskHeight after draw",v),g.attr("transform",`translate(${n}, ${i})`),a=Math.max(a,v),p.events){let x=e.append("g").attr("class","lineWrapper"),b=a;i+=100,b=b+sTt(e,p.events,r,n,i,o,f),i-=100,x.append("line").attr("x1",n+190/2).attr("y1",i+a).attr("x2",n+190/2).attr("y2",i+a+100+u+100).attr("stroke-width",2).attr("stroke","black").attr("marker-end",`url(#${f}-arrowhead)`).attr("stroke-dasharray","5,5")}n=n+200,d&&!o.timeline?.disableMulticolor&&r++}i=i-10},"drawTasks"),sTt=s(function(e,t,r,n,i,a,o){let l=0,u=i;i=i+100;for(let h of t){let d={descr:h,section:r,number:r,width:150,padding:20,maxHeight:50};te.debug("eventNode",d);let f=e.append("g").attr("class","eventWrapper"),m=es.drawNode(f,d,r,a,o,!0).height;l=l+m,f.attr("transform",`translate(${n}, ${i})`),i=i+10+m}return i=u,l},"drawEvents"),J_e={setConf:s(()=>{},"setConf"),draw:aTt}});var p_,Ih,oTt,nU,lTt,iLe,cTt,tLe,aLe,rLe,sLe,uTt,nLe,hTt,oLe,lLe=F(()=>{"use strict";rU();Tt();Zt();Dn();Ba();Qt();p_=200,Ih=5,oTt=p_+Ih*2,nU=p_+100,lTt=nU+Ih*2,iLe=10,cTt=0,tLe=20,aLe=20,rLe=30,sLe=50,uTt=s(function(e,t,r,n){let i=Le(),a=i.timeline?.leftMargin??50;te.debug("timeline",n.db);let o=pn(t);o.append("g");let l=n.db.getTasks(),u=n.db.getCommonDb().getDiagramTitle();te.debug("task",l),es.initGraphics(o);let h=n.db.getSections();te.debug("sections",h);let d=0,f=0,p=50+a,m=50,g=m,y=p,v=oTt+aLe,x=lTt+sLe,b=y+v,T=0,w=h&&h.length>0,C=w?b:p+v,k=Math.max(50,v+x-Ih*2);h.forEach(function(L){let P={number:T,descr:L,section:T,width:k,padding:Ih,maxHeight:d},B=es.getVirtualNodeHeight(o,P,i);te.debug("sectionHeight before draw",B),d=Math.max(d,B)});let S=0;te.debug("tasks.length",l.length);for(let[L,P]of l.entries()){let B={number:L,descr:P,section:P.section,width:p_,padding:Ih,maxHeight:f},O=es.getVirtualNodeHeight(o,B,i);te.debug("taskHeight before draw",O),f=Math.max(f,O);let $=0;for(let G of P.events){let V={descr:G,section:P.section,number:P.section,width:nU,padding:Ih,maxHeight:50};$+=es.getVirtualNodeHeight(o,V,i)}P.events.length>0&&($+=(P.events.length-1)*iLe),S=Math.max(S,$)+cTt}te.debug("maxSectionHeight before draw",d),te.debug("maxTaskHeight before draw",f);let M=Math.max(f,S)+rLe;w?h.forEach(L=>{let P=l.filter(H=>H.section===L),B={number:T,descr:L,section:T,width:k,padding:Ih,maxHeight:d};te.debug("sectionNode",B);let O=o.append("g"),$=es.drawNode(O,B,T,i);te.debug("sectionNode output",$);let G=C-v;O.attr("transform",`translate(${G}, ${m})`);let V=m+$.height+tLe;P.length>0&&nLe(o,P,T,C,V,f,i,M,!1);let z=P.length,W=$.height+tLe+M*Math.max(z,1)-(z>0?rLe*2:0);m+=W,T++}):nLe(o,l,T,C,m,f,i,M,!0);let N=o.node()?.getBBox();if(!N)throw new Error("bbox not found");if(te.debug("bounds",N),u){if(o.append("text").text(u).attr("x",N.width/2-a).attr("font-size","4ex").attr("font-weight","bold").attr("y",20),N=o.node()?.getBBox(),!N)throw new Error("bbox not found");te.debug("bounds after title",N)}let[D]=fs(i.fontSize),R=(D??16)*2,E=(D??16)*.5+20,I=o.append("g").attr("class","lineWrapper");I.append("line").attr("x1",C).attr("y1",g-R).attr("x2",C).attr("y2",N.y+N.height+E).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#arrowhead)"),I.lower(),Go(void 0,o,i.timeline?.padding??50,i.timeline?.useMaxWidth??!1)},"draw"),nLe=s(function(e,t,r,n,i,a,o,l,u){for(let h of t){let d={descr:h.task,section:r,number:r,width:p_,padding:Ih,maxHeight:a};te.debug("taskNode",d);let f=e.append("g").attr("class","taskWrapper"),p=es.drawNode(f,d,r,o),m=p.height;te.debug("taskHeight after draw",m);let g=n-aLe-p.width;if(f.attr("transform",`translate(${g}, ${i})`),a=Math.max(a,m),h.events&&h.events.length>0){let y=i,v=n+sLe;hTt(e,h.events,r,n,v,y,o)}i=i+l,u&&!o.timeline?.disableMulticolor&&r++}},"drawTasks"),hTt=s(function(e,t,r,n,i,a,o){let l=a;for(let u of t){let h={descr:u,section:r,number:r,width:nU,padding:Ih,maxHeight:0};te.debug("eventNode",h);let d=e.append("g").attr("class","eventWrapper"),p=es.drawNode(d,h,r,o).height;d.attr("transform",`translate(${i}, ${l})`);let m=e.append("g").attr("class","lineWrapper"),g=l+p/2;m.append("line").attr("x1",n).attr("y1",g).attr("x2",i).attr("y2",g).attr("stroke-width",2).attr("stroke","black").attr("marker-end","url(#arrowhead)").attr("stroke-dasharray","5,5"),l=l+p+iLe}return l-a},"drawEvents"),oLe={setConf:s(()=>{},"setConf"),draw:uTt}});var dTt,fTt,pTt,cLe,uLe=F(()=>{"use strict";Di();mr();dTt=s(e=>{let{theme:t}=Lt(),r=t?.includes("dark"),n=t?.includes("color"),i=e.svgId?.replace(/^#/,"")??"",a=i?`url(#${i}-drop-shadow)`:e.dropShadow??"none",o="";for(let l=0;l{let t="";for(let r=0;r{let{theme:t}=Lt(),r=t?.includes("redux"),n=t==="neutral",i=e.svgId?.replace(/^#/,"")??"",a="";if(e.useGradient&&i&&e.THEME_COLOR_LIMIT&&!n)for(let o=0;ogTt});var mTt,gTt,dLe=F(()=>{"use strict";N_e();Y_e();eLe();lLe();uLe();mTt={setConf:s(()=>{},"setConf"),draw:s((e,t,r,n)=>(n?.db?.getDirection?.()??"LR")==="TD"?oLe.draw(e,t,r,n):J_e.draw(e,t,r,n),"draw")},gTt={db:JH,renderer:mTt,parser:M_e,styles:cLe}});var iU,mLe,gLe=F(()=>{"use strict";iU=(function(){var e=s(function(w,C,k,S){for(k=k||{},S=w.length;S--;k[w[S]]=C);return k},"o"),t=[1,4],r=[1,13],n=[1,12],i=[1,15],a=[1,16],o=[1,20],l=[1,19],u=[6,7,8],h=[1,26],d=[1,24],f=[1,25],p=[6,7,11],m=[1,6,13,15,16,19,22],g=[1,33],y=[1,34],v=[1,6,7,11,13,15,16,19,22],x={trace:s(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:s(function(C,k,S,A,M,N,D){var R=N.length-1;switch(M){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: ",N[R].id),A.addNode(N[R-1].length,N[R].id,N[R].descr,N[R].type);break;case 16:A.getLogger().trace("Icon: ",N[R]),A.decorateNode({icon:N[R]});break;case 17:case 21:A.decorateNode({class:N[R]});break;case 18:A.getLogger().trace("SPACELIST");break;case 19:A.getLogger().trace("Node: ",N[R].id),A.addNode(0,N[R].id,N[R].descr,N[R].type);break;case 20:A.decorateNode({icon:N[R]});break;case 25:A.getLogger().trace("node found ..",N[R-2]),this.$={id:N[R-1],descr:N[R-1],type:A.getType(N[R-2],N[R])};break;case 26:this.$={id:N[R],descr:N[R],type:A.nodeType.DEFAULT};break;case 27:A.getLogger().trace("node found ..",N[R-3]),this.$={id:N[R-3],descr:N[R-1],type:A.getType(N[R-2],N[R])};break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:t},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:t},{6:r,7:[1,10],9:9,12:11,13:n,14:14,15:i,16:a,17:17,18:18,19:o,22:l},e(u,[2,3]),{1:[2,2]},e(u,[2,4]),e(u,[2,5]),{1:[2,6],6:r,12:21,13:n,14:14,15:i,16:a,17:17,18:18,19:o,22:l},{6:r,9:22,12:11,13:n,14:14,15:i,16:a,17:17,18:18,19:o,22:l},{6:h,7:d,10:23,11:f},e(p,[2,22],{17:17,18:18,14:27,15:[1,28],16:[1,29],19:o,22:l}),e(p,[2,18]),e(p,[2,19]),e(p,[2,20]),e(p,[2,21]),e(p,[2,23]),e(p,[2,24]),e(p,[2,26],{19:[1,30]}),{20:[1,31]},{6:h,7:d,10:32,11:f},{1:[2,7],6:r,12:21,13:n,14:14,15:i,16:a,17:17,18:18,19:o,22:l},e(m,[2,14],{7:g,11:y}),e(v,[2,8]),e(v,[2,9]),e(v,[2,10]),e(p,[2,15]),e(p,[2,16]),e(p,[2,17]),{20:[1,35]},{21:[1,36]},e(m,[2,13],{7:g,11:y}),e(v,[2,11]),e(v,[2,12]),{21:[1,37]},e(p,[2,25]),e(p,[2,27])],defaultActions:{2:[2,1],6:[2,2]},parseError:s(function(C,k){if(k.recoverable)this.trace(C);else{var S=new Error(C);throw S.hash=k,S}},"parseError"),parse:s(function(C){var k=this,S=[0],A=[],M=[null],N=[],D=this.table,R="",E=0,I=0,L=0,P=2,B=1,O=N.slice.call(arguments,1),$=Object.create(this.lexer),G={yy:{}};for(var V in this.yy)Object.prototype.hasOwnProperty.call(this.yy,V)&&(G.yy[V]=this.yy[V]);$.setInput(C,G.yy),G.yy.lexer=$,G.yy.parser=this,typeof $.yylloc>"u"&&($.yylloc={});var z=$.yylloc;N.push(z);var W=$.options&&$.options.ranges;typeof G.yy.parseError=="function"?this.parseError=G.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function H(pe){S.length=S.length-2*pe,M.length=M.length-pe,N.length=N.length-pe}s(H,"popStack");function j(){var pe;return pe=A.pop()||$.lex()||B,typeof pe!="number"&&(pe instanceof Array&&(A=pe,pe=A.pop()),pe=k.symbols_[pe]||pe),pe}s(j,"lex");for(var Q,U,ue,J,he,se,oe={},Se,xe,Ne,Ye;;){if(ue=S[S.length-1],this.defaultActions[ue]?J=this.defaultActions[ue]:((Q===null||typeof Q>"u")&&(Q=j()),J=D[ue]&&D[ue][Q]),typeof J>"u"||!J.length||!J[0]){var We="";Ye=[];for(Se in D[ue])this.terminals_[Se]&&Se>P&&Ye.push("'"+this.terminals_[Se]+"'");$.showPosition?We="Parse error on line "+(E+1)+`: +`+$.showPosition()+` +Expecting `+Ye.join(", ")+", got '"+(this.terminals_[Q]||Q)+"'":We="Parse error on line "+(E+1)+": Unexpected "+(Q==B?"end of input":"'"+(this.terminals_[Q]||Q)+"'"),this.parseError(We,{text:$.match,token:this.terminals_[Q]||Q,line:$.yylineno,loc:z,expected:Ye})}if(J[0]instanceof Array&&J.length>1)throw new Error("Parse Error: multiple actions possible at state: "+ue+", token: "+Q);switch(J[0]){case 1:S.push(Q),M.push($.yytext),N.push($.yylloc),S.push(J[1]),Q=null,U?(Q=U,U=null):(I=$.yyleng,R=$.yytext,E=$.yylineno,z=$.yylloc,L>0&&L--);break;case 2:if(xe=this.productions_[J[1]][1],oe.$=M[M.length-xe],oe._$={first_line:N[N.length-(xe||1)].first_line,last_line:N[N.length-1].last_line,first_column:N[N.length-(xe||1)].first_column,last_column:N[N.length-1].last_column},W&&(oe._$.range=[N[N.length-(xe||1)].range[0],N[N.length-1].range[1]]),se=this.performAction.apply(oe,[R,I,E,G.yy,J[1],M,N].concat(O)),typeof se<"u")return se;xe&&(S=S.slice(0,-1*xe*2),M=M.slice(0,-1*xe),N=N.slice(0,-1*xe)),S.push(this.productions_[J[1]][0]),M.push(oe.$),N.push(oe._$),Ne=D[S[S.length-2]][S[S.length-1]],S.push(Ne);break;case 3:return!0}}return!0},"parse")},b=(function(){var w={EOF:1,parseError:s(function(k,S){if(this.yy.parser)this.yy.parser.parseError(k,S);else throw new Error(k)},"parseError"),setInput:s(function(C,k){return this.yy=k||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:s(function(){var C=this._input[0];this.yytext+=C,this.yyleng++,this.offset++,this.match+=C,this.matched+=C;var k=C.match(/(?:\r\n?|\n).*/g);return k?(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:s(function(C){var k=C.length,S=C.split(/(?:\r\n?|\n)/g);this._input=C+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-k),this.offset-=k;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),S.length-1&&(this.yylineno-=S.length-1);var M=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:S?(S.length===A.length?this.yylloc.first_column:0)+A[A.length-S.length].length-S[0].length:this.yylloc.first_column-k},this.options.ranges&&(this.yylloc.range=[M[0],M[0]+this.yyleng-k]),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(C){this.unput(this.match.slice(C))},"less"),pastInput:s(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:s(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:s(function(){var C=this.pastInput(),k=new Array(C.length+1).join("-");return C+this.upcomingInput()+` +`+k+"^"},"showPosition"),test_match:s(function(C,k){var S,A,M;if(this.options.backtrack_lexer&&(M={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&&(M.yylloc.range=this.yylloc.range.slice(0))),A=C[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+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],S=this.performAction.call(this,this.yy,this,k,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),S)return S;if(this._backtrack){for(var N in M)this[N]=M[N];return!1}return!1},"test_match"),next:s(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var C,k,S,A;this._more||(this.yytext="",this.match="");for(var M=this._currentRules(),N=0;Nk[0].length)){if(k=S,A=N,this.options.backtrack_lexer){if(C=this.test_match(S,M[N]),C!==!1)return C;if(this._backtrack){k=!1;continue}else return!1}else if(!this.options.flex)break}return k?(C=this.test_match(k,M[A]),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:s(function(){var k=this.next();return k||this.lex()},"lex"),begin:s(function(k){this.conditionStack.push(k)},"begin"),popState:s(function(){var k=this.conditionStack.length-1;return k>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(k){return k=this.conditionStack.length-1-Math.abs(k||0),k>=0?this.conditionStack[k]:"INITIAL"},"topState"),pushState:s(function(k){this.begin(k)},"pushState"),stateStackSize:s(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:s(function(k,S,A,M){var N=M;switch(A){case 0:return k.getLogger().trace("Found comment",S.yytext),6;break;case 1:return 8;case 2:this.begin("CLASS");break;case 3:return this.popState(),16;break;case 4:this.popState();break;case 5:k.getLogger().trace("Begin icon"),this.begin("ICON");break;case 6:return k.getLogger().trace("SPACELINE"),6;break;case 7:return 7;case 8:return 15;case 9:k.getLogger().trace("end icon"),this.popState();break;case 10:return k.getLogger().trace("Exploding node"),this.begin("NODE"),19;break;case 11:return k.getLogger().trace("Cloud"),this.begin("NODE"),19;break;case 12:return k.getLogger().trace("Explosion Bang"),this.begin("NODE"),19;break;case 13:return k.getLogger().trace("Cloud Bang"),this.begin("NODE"),19;break;case 14:return this.begin("NODE"),19;break;case 15:return this.begin("NODE"),19;break;case 16:return this.begin("NODE"),19;break;case 17:return this.begin("NODE"),19;break;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:k.getLogger().trace("Starting NSTR"),this.begin("NSTR");break;case 25:return k.getLogger().trace("description:",S.yytext),"NODE_DESCR";break;case 26:this.popState();break;case 27:return this.popState(),k.getLogger().trace("node end ))"),"NODE_DEND";break;case 28:return this.popState(),k.getLogger().trace("node end )"),"NODE_DEND";break;case 29:return this.popState(),k.getLogger().trace("node end ...",S.yytext),"NODE_DEND";break;case 30:return this.popState(),k.getLogger().trace("node end (("),"NODE_DEND";break;case 31:return this.popState(),k.getLogger().trace("node end (-"),"NODE_DEND";break;case 32:return this.popState(),k.getLogger().trace("node end (-"),"NODE_DEND";break;case 33:return this.popState(),k.getLogger().trace("node end (("),"NODE_DEND";break;case 34:return this.popState(),k.getLogger().trace("node end (("),"NODE_DEND";break;case 35:return k.getLogger().trace("Long description:",S.yytext),20;break;case 36:return k.getLogger().trace("Long description:",S.yytext),20;break}},"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 w})();x.lexer=b;function T(){this.yy={}}return s(T,"Parser"),T.prototype=x,x.Parser=T,new T})();iU.parser=iU;mLe=iU});function yLe(e,t=0){return(Fa[e[t+0]]+Fa[e[t+1]]+Fa[e[t+2]]+Fa[e[t+3]]+"-"+Fa[e[t+4]]+Fa[e[t+5]]+"-"+Fa[e[t+6]]+Fa[e[t+7]]+"-"+Fa[e[t+8]]+Fa[e[t+9]]+"-"+Fa[e[t+10]]+Fa[e[t+11]]+Fa[e[t+12]]+Fa[e[t+13]]+Fa[e[t+14]]+Fa[e[t+15]]).toLowerCase()}var Fa,vLe=F(()=>{"use strict";Fa=[];for(let e=0;e<256;++e)Fa.push((e+256).toString(16).slice(1));s(yLe,"unsafeStringify")});function aU(){return crypto.getRandomValues(bTt)}var bTt,xLe=F(()=>{"use strict";bTt=new Uint8Array(16);s(aU,"rng")});function TTt(e,t,r){return!t&&!e&&crypto.randomUUID?crypto.randomUUID():CTt(e,t,r)}function CTt(e,t,r){e=e||{};let n=e.random??e.rng?.()??aU();if(n.length<16)throw new Error("Random bytes length must be >= 16");if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,t){if(r=r||0,r<0||r+16>t.length)throw new RangeError(`UUID byte range ${r}:${r+15} is out of buffer bounds`);for(let i=0;i<16;++i)t[r+i]=n[i];return t}return yLe(n)}var sU,bLe=F(()=>{"use strict";xLe();vLe();s(TTt,"v4");s(CTt,"_v4");sU=TTt});var TLe=F(()=>{"use strict";bLe()});var CLe,kLe=F(()=>{"use strict";qo();Qt();CLe=12});var Mh,m_,wLe=F(()=>{"use strict";Zt();TLe();Gr();Tt();Ni();mr();kLe();Mh={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},m_=class{constructor(){this.nodes=[];this.count=0;this.elements={};this.getLogger=this.getLogger.bind(this),this.nodeType=Mh,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{s(this,"MindmapDB")}clear(){this.nodes=[],this.count=0,this.elements={},this.baseLevel=void 0}getParent(t){for(let r=this.nodes.length-1;r>=0;r--)if(this.nodes[r].level0?this.nodes[0]:null}addNode(t,r,n,i){te.info("addNode",t,r,n,i);let a=!1;this.nodes.length===0?(this.baseLevel=t,t=0,a=!0):this.baseLevel!==void 0&&(t=t-this.baseLevel,a=!1);let o=Le(),l=o.mindmap?.padding??hr.mindmap.padding;switch(i){case this.nodeType.ROUNDED_RECT:case this.nodeType.RECT:case this.nodeType.HEXAGON:l*=2;break}let u={id:this.count++,nodeId:vr(r,o),level:t,descr:vr(n,o),type:i,children:[],width:o.mindmap?.maxNodeWidth??hr.mindmap.maxNodeWidth,padding:l,isRoot:a},h=this.getParent(t);if(h)h.children.push(u),this.nodes.push(u);else if(a)this.nodes.push(u);else throw new Error(`There can be only one root. No parent could be found for ("${u.descr}")`)}getType(t,r){switch(te.debug("In get type",t,r),t){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(t,r){this.elements[t]=r}getElementById(t){return this.elements[t]}decorateNode(t){if(!t)return;let r=Le(),n=this.nodes[this.nodes.length-1];t.icon&&(n.icon=vr(t.icon,r)),t.class&&(n.class=vr(t.class,r))}type2Str(t){switch(t){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(t,r){if(t.level===0?t.section=void 0:t.section=r,t.children)for(let[n,i]of t.children.entries()){let a=t.level===0?n%(CLe-1):r;this.assignSections(i,a)}}flattenNodes(t,r){let n=Le(),i=["mindmap-node"];t.isRoot===!0?i.push("section-root","section--1"):t.section!==void 0&&i.push(`section-${t.section}`),t.class&&i.push(t.class);let a=i.join(" "),o=s(u=>{let d=(n.theme?.toLowerCase()??"").includes("redux");switch(u){case Mh.CIRCLE:return"mindmapCircle";case Mh.RECT:return"rect";case Mh.ROUNDED_RECT:return"rounded";case Mh.CLOUD:return"cloud";case Mh.BANG:return"bang";case Mh.HEXAGON:return"hexagon";case Mh.DEFAULT:return d?"rounded":"defaultMindmapNode";case Mh.NO_BORDER:default:return"rect"}},"getShapeFromType"),l={id:t.id.toString(),domId:"node_"+t.id.toString(),label:t.descr,labelType:"markdown",isGroup:!1,shape:o(t.type),width:t.width,height:t.height??0,padding:t.padding,cssClasses:a,cssStyles:[],look:n.look,icon:t.icon,x:t.x,y:t.y,level:t.level,nodeId:t.nodeId,type:t.type,section:t.section};if(r.push(l),t.children)for(let u of t.children)this.flattenNodes(u,r)}generateEdges(t,r){if(!t.children)return;let n=Le();for(let i of t.children){let a="edge";i.section!==void 0&&(a+=` section-edge-${i.section}`);let o=t.level+1;a+=` edge-depth-${o}`;let l={id:`edge_${t.id}_${i.id}`,start:t.id.toString(),end:i.id.toString(),type:"normal",curve:"basis",thickness:"normal",look:n.look,classes:a,depth:t.level,section:i.section};r.push(l),this.generateEdges(i,r)}}getData(){let t=this.getMindmap(),r=Le(),i=Ak().layout!==void 0,a=r;if(i||(a.layout="cose-bilkent"),!t)return{nodes:[],edges:[],config:a};te.debug("getData: mindmapRoot",t,r),this.assignSections(t);let o=[],l=[];this.flattenNodes(t,o),this.generateEdges(t,l),te.debug(`getData: processed ${o.length} nodes and ${l.length} edges`);let u=new Map;for(let h of o)u.set(h.id,{shape:h.shape,width:h.width,height:h.height,padding:h.padding});return{nodes:o,edges:l,config:a,rootNode:t,markers:["point"],direction:"TB",nodeSpacing:50,rankSpacing:50,shapes:Object.fromEntries(u),type:"mindmap",diagramId:"mindmap-"+sU()}}getLogger(){return te}}});var kTt,SLe,ELe=F(()=>{"use strict";Tt();Hp();vf();xf();Ni();mr();kTt=s(async(e,t,r,n)=>{te.debug(`Rendering mindmap diagram +`+e);let i=n.db,a=i.getData(),o=Uo(t,a.config.securityLevel);if(a.type=n.type,a.layoutAlgorithm=Yc(a.config.layout,{fallback:"cose-bilkent"}),a.diagramId=t,!i.getMindmap())return;a.nodes.forEach(p=>{p.shape==="rounded"?(p.radius=15,p.taper=15,p.stroke="none",p.width=0,p.padding=15):p.shape==="circle"?p.padding=10:p.shape==="rect"?(p.width=0,p.padding=10):p.shape==="hexagon"&&(p.width=0,p.height=0)}),await il(a,o);let{themeVariables:u}=Lt(),{useGradient:h,gradientStart:d,gradientStop:f}=u;if(h&&d&&f){let p=o.attr("id"),m=o.append("defs").append("linearGradient").attr("id",`${p}-gradient`).attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");m.append("stop").attr("offset","0%").attr("stop-color",d).attr("stop-opacity",1),m.append("stop").attr("offset","100%").attr("stop-color",f).attr("stop-opacity",1)}Js(o,a.config.mindmap?.padding??hr.mindmap.padding,"mindmapDiagram",a.config.mindmap?.useMaxWidth??hr.mindmap.useMaxWidth)},"draw"),SLe={draw:kTt}});var wTt,STt,ETt,ALe,RLe=F(()=>{"use strict";Di();wTt=s(e=>{let{theme:t,look:r}=e,n="";for(let i=0;i{let n="";for(let i=0;i{let{theme:t}=e,r=e.svgId,n=e.dropShadow?e.dropShadow.replace("url(#drop-shadow)",`url(${r}-drop-shadow)`):"none";return` + .edge { + stroke-width: 3; + } + ${wTt(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: ${t?.includes("redux")?e.nodeBorder: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; + } + [data-look="neo"].mindmap-node { + filter: ${n}; + } + [data-look="neo"].mindmap-node.section-root rect, [data-look="neo"].mindmap-node.section-root path, [data-look="neo"].mindmap-node.section-root circle, [data-look="neo"].mindmap-node.section-root polygon { + fill: ${t?.includes("redux")?e.mainBkg:e.git0}; + } + [data-look="neo"].mindmap-node.section-root .text-inner-tspan { + fill: ${t?.includes("redux")?e.nodeBorder:e["cScaleLabel"+(t==="neutral"?1:0)]}; + } + ${e.useGradient&&r&&e.mainBkg?STt(e.THEME_COLOR_LIMIT,r,e.mainBkg):""} +`},"getStyles"),ALe=ETt});var _Le={};ar(_Le,{diagram:()=>ATt});var ATt,LLe=F(()=>{"use strict";gLe();wLe();ELe();RLe();ATt={get db(){return new m_},renderer:SLe,parser:mLe,styles:ALe}});var oU,MLe,NLe=F(()=>{"use strict";oU=(function(){var e=s(function(S,A,M,N){for(M=M||{},N=S.length;N--;M[S[N]]=A);return M},"o"),t=[1,4],r=[1,13],n=[1,12],i=[1,15],a=[1,16],o=[1,20],l=[1,19],u=[6,7,8],h=[1,26],d=[1,24],f=[1,25],p=[6,7,11],m=[1,31],g=[6,7,11,24],y=[1,6,13,16,17,20,23],v=[1,35],x=[1,36],b=[1,6,7,11,13,16,17,20,23],T=[1,38],w={trace:s(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:s(function(A,M,N,D,R,E,I){var L=E.length-1;switch(R){case 6:case 7:return D;case 8:D.getLogger().trace("Stop NL ");break;case 9:D.getLogger().trace("Stop EOF ");break;case 11:D.getLogger().trace("Stop NL2 ");break;case 12:D.getLogger().trace("Stop EOF2 ");break;case 15:D.getLogger().info("Node: ",E[L-1].id),D.addNode(E[L-2].length,E[L-1].id,E[L-1].descr,E[L-1].type,E[L]);break;case 16:D.getLogger().info("Node: ",E[L].id),D.addNode(E[L-1].length,E[L].id,E[L].descr,E[L].type);break;case 17:D.getLogger().trace("Icon: ",E[L]),D.decorateNode({icon:E[L]});break;case 18:case 23:D.decorateNode({class:E[L]});break;case 19:D.getLogger().trace("SPACELIST");break;case 20:D.getLogger().trace("Node: ",E[L-1].id),D.addNode(0,E[L-1].id,E[L-1].descr,E[L-1].type,E[L]);break;case 21:D.getLogger().trace("Node: ",E[L].id),D.addNode(0,E[L].id,E[L].descr,E[L].type);break;case 22:D.decorateNode({icon:E[L]});break;case 27:D.getLogger().trace("node found ..",E[L-2]),this.$={id:E[L-1],descr:E[L-1],type:D.getType(E[L-2],E[L])};break;case 28:this.$={id:E[L],descr:E[L],type:0};break;case 29:D.getLogger().trace("node found ..",E[L-3]),this.$={id:E[L-3],descr:E[L-1],type:D.getType(E[L-2],E[L])};break;case 30:this.$=E[L-1]+E[L];break;case 31:this.$=E[L];break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:t},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:t},{6:r,7:[1,10],9:9,12:11,13:n,14:14,16:i,17:a,18:17,19:18,20:o,23:l},e(u,[2,3]),{1:[2,2]},e(u,[2,4]),e(u,[2,5]),{1:[2,6],6:r,12:21,13:n,14:14,16:i,17:a,18:17,19:18,20:o,23:l},{6:r,9:22,12:11,13:n,14:14,16:i,17:a,18:17,19:18,20:o,23:l},{6:h,7:d,10:23,11:f},e(p,[2,24],{18:17,19:18,14:27,16:[1,28],17:[1,29],20:o,23:l}),e(p,[2,19]),e(p,[2,21],{15:30,24:m}),e(p,[2,22]),e(p,[2,23]),e(g,[2,25]),e(g,[2,26]),e(g,[2,28],{20:[1,32]}),{21:[1,33]},{6:h,7:d,10:34,11:f},{1:[2,7],6:r,12:21,13:n,14:14,16:i,17:a,18:17,19:18,20:o,23:l},e(y,[2,14],{7:v,11:x}),e(b,[2,8]),e(b,[2,9]),e(b,[2,10]),e(p,[2,16],{15:37,24:m}),e(p,[2,17]),e(p,[2,18]),e(p,[2,20],{24:T}),e(g,[2,31]),{21:[1,39]},{22:[1,40]},e(y,[2,13],{7:v,11:x}),e(b,[2,11]),e(b,[2,12]),e(p,[2,15],{24:T}),e(g,[2,30]),{22:[1,41]},e(g,[2,27]),e(g,[2,29])],defaultActions:{2:[2,1],6:[2,2]},parseError:s(function(A,M){if(M.recoverable)this.trace(A);else{var N=new Error(A);throw N.hash=M,N}},"parseError"),parse:s(function(A){var M=this,N=[0],D=[],R=[null],E=[],I=this.table,L="",P=0,B=0,O=0,$=2,G=1,V=E.slice.call(arguments,1),z=Object.create(this.lexer),W={yy:{}};for(var H in this.yy)Object.prototype.hasOwnProperty.call(this.yy,H)&&(W.yy[H]=this.yy[H]);z.setInput(A,W.yy),W.yy.lexer=z,W.yy.parser=this,typeof z.yylloc>"u"&&(z.yylloc={});var j=z.yylloc;E.push(j);var Q=z.options&&z.options.ranges;typeof W.yy.parseError=="function"?this.parseError=W.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function U(Re){N.length=N.length-2*Re,R.length=R.length-Re,E.length=E.length-Re}s(U,"popStack");function ue(){var Re;return Re=D.pop()||z.lex()||G,typeof Re!="number"&&(Re instanceof Array&&(D=Re,Re=D.pop()),Re=M.symbols_[Re]||Re),Re}s(ue,"lex");for(var J,he,se,oe,Se,xe,Ne={},Ye,We,pe,_e;;){if(se=N[N.length-1],this.defaultActions[se]?oe=this.defaultActions[se]:((J===null||typeof J>"u")&&(J=ue()),oe=I[se]&&I[se][J]),typeof oe>"u"||!oe.length||!oe[0]){var Ee="";_e=[];for(Ye in I[se])this.terminals_[Ye]&&Ye>$&&_e.push("'"+this.terminals_[Ye]+"'");z.showPosition?Ee="Parse error on line "+(P+1)+`: +`+z.showPosition()+` +Expecting `+_e.join(", ")+", got '"+(this.terminals_[J]||J)+"'":Ee="Parse error on line "+(P+1)+": Unexpected "+(J==G?"end of input":"'"+(this.terminals_[J]||J)+"'"),this.parseError(Ee,{text:z.match,token:this.terminals_[J]||J,line:z.yylineno,loc:j,expected:_e})}if(oe[0]instanceof Array&&oe.length>1)throw new Error("Parse Error: multiple actions possible at state: "+se+", token: "+J);switch(oe[0]){case 1:N.push(J),R.push(z.yytext),E.push(z.yylloc),N.push(oe[1]),J=null,he?(J=he,he=null):(B=z.yyleng,L=z.yytext,P=z.yylineno,j=z.yylloc,O>0&&O--);break;case 2:if(We=this.productions_[oe[1]][1],Ne.$=R[R.length-We],Ne._$={first_line:E[E.length-(We||1)].first_line,last_line:E[E.length-1].last_line,first_column:E[E.length-(We||1)].first_column,last_column:E[E.length-1].last_column},Q&&(Ne._$.range=[E[E.length-(We||1)].range[0],E[E.length-1].range[1]]),xe=this.performAction.apply(Ne,[L,B,P,W.yy,oe[1],R,E].concat(V)),typeof xe<"u")return xe;We&&(N=N.slice(0,-1*We*2),R=R.slice(0,-1*We),E=E.slice(0,-1*We)),N.push(this.productions_[oe[1]][0]),R.push(Ne.$),E.push(Ne._$),pe=I[N[N.length-2]][N[N.length-1]],N.push(pe);break;case 3:return!0}}return!0},"parse")},C=(function(){var S={EOF:1,parseError:s(function(M,N){if(this.yy.parser)this.yy.parser.parseError(M,N);else throw new Error(M)},"parseError"),setInput:s(function(A,M){return this.yy=M||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:s(function(){var A=this._input[0];this.yytext+=A,this.yyleng++,this.offset++,this.match+=A,this.matched+=A;var M=A.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),A},"input"),unput:s(function(A){var M=A.length,N=A.split(/(?:\r\n?|\n)/g);this._input=A+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-M),this.offset-=M;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),N.length-1&&(this.yylineno-=N.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:N?(N.length===D.length?this.yylloc.first_column:0)+D[D.length-N.length].length-N[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: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(A){this.unput(this.match.slice(A))},"less"),pastInput:s(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:s(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:s(function(){var A=this.pastInput(),M=new Array(A.length+1).join("-");return A+this.upcomingInput()+` +`+M+"^"},"showPosition"),test_match:s(function(A,M){var N,D,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))),D=A[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+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],N=this.performAction.call(this,this.yy,this,M,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),N)return N;if(this._backtrack){for(var E in R)this[E]=R[E];return!1}return!1},"test_match"),next:s(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var A,M,N,D;this._more||(this.yytext="",this.match="");for(var R=this._currentRules(),E=0;EM[0].length)){if(M=N,D=E,this.options.backtrack_lexer){if(A=this.test_match(N,R[E]),A!==!1)return A;if(this._backtrack){M=!1;continue}else return!1}else if(!this.options.flex)break}return M?(A=this.test_match(M,R[D]),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:s(function(){var M=this.next();return M||this.lex()},"lex"),begin:s(function(M){this.conditionStack.push(M)},"begin"),popState:s(function(){var M=this.conditionStack.length-1;return M>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(M){return M=this.conditionStack.length-1-Math.abs(M||0),M>=0?this.conditionStack[M]:"INITIAL"},"topState"),pushState:s(function(M){this.begin(M)},"pushState"),stateStackSize:s(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:s(function(M,N,D,R){var E=R;switch(D){case 0:return this.pushState("shapeData"),N.yytext="",24;break;case 1:return this.pushState("shapeDataStr"),24;break;case 2:return this.popState(),24;break;case 3:let I=/\n\s*/g;return N.yytext=N.yytext.replace(I,"
    "),24;break;case 4:return 24;case 5:this.popState();break;case 6:return M.getLogger().trace("Found comment",N.yytext),6;break;case 7:return 8;case 8:this.begin("CLASS");break;case 9:return this.popState(),17;break;case 10:this.popState();break;case 11:M.getLogger().trace("Begin icon"),this.begin("ICON");break;case 12:return M.getLogger().trace("SPACELINE"),6;break;case 13:return 7;case 14:return 16;case 15:M.getLogger().trace("end icon"),this.popState();break;case 16:return M.getLogger().trace("Exploding node"),this.begin("NODE"),20;break;case 17:return M.getLogger().trace("Cloud"),this.begin("NODE"),20;break;case 18:return M.getLogger().trace("Explosion Bang"),this.begin("NODE"),20;break;case 19:return M.getLogger().trace("Cloud Bang"),this.begin("NODE"),20;break;case 20:return this.begin("NODE"),20;break;case 21:return this.begin("NODE"),20;break;case 22:return this.begin("NODE"),20;break;case 23:return this.begin("NODE"),20;break;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:M.getLogger().trace("Starting NSTR"),this.begin("NSTR");break;case 31:return M.getLogger().trace("description:",N.yytext),"NODE_DESCR";break;case 32:this.popState();break;case 33:return this.popState(),M.getLogger().trace("node end ))"),"NODE_DEND";break;case 34:return this.popState(),M.getLogger().trace("node end )"),"NODE_DEND";break;case 35:return this.popState(),M.getLogger().trace("node end ...",N.yytext),"NODE_DEND";break;case 36:return this.popState(),M.getLogger().trace("node end (("),"NODE_DEND";break;case 37:return this.popState(),M.getLogger().trace("node end (-"),"NODE_DEND";break;case 38:return this.popState(),M.getLogger().trace("node end (-"),"NODE_DEND";break;case 39:return this.popState(),M.getLogger().trace("node end (("),"NODE_DEND";break;case 40:return this.popState(),M.getLogger().trace("node end (("),"NODE_DEND";break;case 41:return M.getLogger().trace("Long description:",N.yytext),21;break;case 42:return M.getLogger().trace("Long description:",N.yytext),21;break}},"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 S})();w.lexer=C;function k(){this.yy={}}return s(k,"Parser"),k.prototype=w,w.Parser=k,new k})();oU.parser=oU;MLe=oU});var cl,cU,lU,uU,DTt,ITt,PLe,MTt,NTt,na,PTt,OTt,BTt,$Tt,FTt,GTt,zTt,OLe,BLe=F(()=>{"use strict";Zt();Gr();Tt();Ni();Gb();cl=[],cU=[],lU=0,uU={},DTt=s(()=>{cl=[],cU=[],lU=0,uU={}},"clear"),ITt=s(e=>{if(cl.length===0)return null;let t=cl[0].level,r=null;for(let n=cl.length-1;n>=0;n--)if(cl[n].level===t&&!r&&(r=cl[n]),cl[n].levell.parentId===i.id);for(let l of o){let u={id:l.id,parentId:i.id,label:vr(l.label??"",n),labelType:"markdown",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"]};t.push(u)}}return{nodes:t,edges:e,other:{},config:Le()}},"getData"),NTt=s((e,t,r,n,i)=>{let a=Le(),o=a.mindmap?.padding??hr.mindmap.padding;switch(n){case na.ROUNDED_RECT:case na.RECT:case na.HEXAGON:o*=2}let l={id:vr(t,a)||"kbn"+lU++,level:e,label:vr(r,a),width:a.mindmap?.maxNodeWidth??hr.mindmap.maxNodeWidth,padding:o,isGroup:!1};if(i!==void 0){let h;i.includes(` +`)?h=i+` +`:h=`{ +`+i+` +}`;let d=yd(h,{schema:gd});if(d.shape&&(d.shape!==d.shape.toLowerCase()||d.shape.includes("_")))throw new Error(`No such shape: ${d.shape}. Shape names should be lowercase.`);d?.shape&&d.shape==="kanbanItem"&&(l.shape=d?.shape),d?.label&&(l.label=d?.label),d?.icon&&(l.icon=d?.icon.toString()),d?.assigned&&(l.assigned=d?.assigned.toString()),d?.ticket&&(l.ticket=d?.ticket.toString()),d?.priority&&(l.priority=d?.priority)}let u=ITt(e);u?l.parentId=u.id||"kbn"+lU++:cU.push(l),cl.push(l)},"addNode"),na={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},PTt=s((e,t)=>{switch(te.debug("In get type",e,t),e){case"[":return na.RECT;case"(":return t===")"?na.ROUNDED_RECT:na.CLOUD;case"((":return na.CIRCLE;case")":return na.CLOUD;case"))":return na.BANG;case"{{":return na.HEXAGON;default:return na.DEFAULT}},"getType"),OTt=s((e,t)=>{uU[e]=t},"setElementForId"),BTt=s(e=>{if(!e)return;let t=Le(),r=cl[cl.length-1];e.icon&&(r.icon=vr(e.icon,t)),e.class&&(r.cssClasses=vr(e.class,t))},"decorateNode"),$Tt=s(e=>{switch(e){case na.DEFAULT:return"no-border";case na.RECT:return"rect";case na.ROUNDED_RECT:return"rounded-rect";case na.CIRCLE:return"circle";case na.CLOUD:return"cloud";case na.BANG:return"bang";case na.HEXAGON:return"hexgon";default:return"no-border"}},"type2Str"),FTt=s(()=>te,"getLogger"),GTt=s(e=>uU[e],"getElementById"),zTt={clear:DTt,addNode:NTt,getSections:PLe,getData:MTt,nodeType:na,getType:PTt,setElementForId:OTt,decorateNode:BTt,type2Str:$Tt,getLogger:FTt,getElementById:GTt},OLe=zTt});var VTt,$Le,FLe=F(()=>{"use strict";Zt();Tt();Ba();Dn();Ni();e2();Yp();VTt=s(async(e,t,r,n)=>{te.debug(`Rendering kanban diagram +`+e);let a=n.db.getData(),o=Le();o.htmlLabels=!1;let l=pn(t);for(let v of a.nodes)v.domId=`${t}-${v.id}`;let u=l.append("g");u.attr("class","sections");let h=l.append("g");h.attr("class","items");let d=a.nodes.filter(v=>v.isGroup),f=0,p=10,m=[],g=25;for(let v of d){let x=o?.kanban?.sectionWidth||200;f=f+1,v.x=x*f+(f-1)*p/2,v.width=x,v.y=0,v.height=x*3,v.rx=5,v.ry=5,v.cssClasses=v.cssClasses+" section-"+f;let b=await Cd(u,v);g=Math.max(g,b?.labelBBox?.height),m.push(b)}let y=0;for(let v of d){let x=m[y];y=y+1;let b=o?.kanban?.sectionWidth||200,T=-b*3/2+g,w=T,C=a.nodes.filter(A=>A.parentId===v.id);for(let A of C){if(A.isGroup)throw new Error("Groups within groups are not allowed in Kanban diagrams");A.x=v.x,A.width=b-1.5*p;let N=(await Hu(h,A,{config:o})).node().getBBox();A.y=w+N.height/2,await Sc(A),w=A.y+N.height/2+p/2}let k=x.cluster.select("rect"),S=Math.max(w-T+3*p,50)+(g-25);k.attr("height",S)}Go(void 0,l,o.mindmap?.padding??hr.kanban.padding,o.mindmap?.useMaxWidth??hr.kanban.useMaxWidth)},"draw"),$Le={draw:VTt}});var WTt,qTt,GLe,zLe=F(()=>{"use strict";Di();s1();WTt=s(e=>{let t="";for(let n=0;ne.darkMode?et(n,i):Je(n,i),"adjuster");for(let n=0;n` + .edge { + stroke-width: 3; + } + ${WTt(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; + } + ${jc()} +`,"getStyles"),GLe=qTt});var VLe={};ar(VLe,{diagram:()=>HTt});var HTt,WLe=F(()=>{"use strict";NLe();BLe();FLe();zLe();HTt={db:OLe,renderer:$Le,parser:MLe,styles:GLe}});var hU,WC,ULe=F(()=>{"use strict";hU=(function(){var e=s(function(l,u,h,d){for(h=h||{},d=l.length;d--;h[l[d]]=u);return h},"o"),t=[1,9],r=[1,10],n=[1,5,10,12],i={trace:s(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:s(function(u,h,d,f,p,m,g){var y=m.length-1;switch(p){case 7:let v=f.findOrCreateNode(m[y-4].trim().replaceAll('""','"')),x=f.findOrCreateNode(m[y-2].trim().replaceAll('""','"')),b=parseFloat(m[y].trim());f.addLink(v,x,b);break;case 8:case 9:case 11:this.$=m[y];break;case 10:this.$=m[y-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:t,20:r},{1:[2,6],7:11,10:[1,12]},e(r,[2,4],{9:13,5:[1,14]}),{12:[1,15]},e(n,[2,8]),e(n,[2,9]),{19:[1,16]},e(n,[2,11]),{1:[2,1]},{1:[2,5]},e(r,[2,2]),{6:17,8:5,15:6,16:7,17:8,18:t,20:r},{15:18,16:7,17:8,18:t,20:r},{18:[1,19]},e(r,[2,3]),{12:[1,20]},e(n,[2,10]),{15:21,16:7,17:8,18:t,20:r},e([1,5,10],[2,7])],defaultActions:{11:[2,1],12:[2,5]},parseError:s(function(u,h){if(h.recoverable)this.trace(u);else{var d=new Error(u);throw d.hash=h,d}},"parseError"),parse:s(function(u){var h=this,d=[0],f=[],p=[null],m=[],g=this.table,y="",v=0,x=0,b=0,T=2,w=1,C=m.slice.call(arguments,1),k=Object.create(this.lexer),S={yy:{}};for(var A in this.yy)Object.prototype.hasOwnProperty.call(this.yy,A)&&(S.yy[A]=this.yy[A]);k.setInput(u,S.yy),S.yy.lexer=k,S.yy.parser=this,typeof k.yylloc>"u"&&(k.yylloc={});var M=k.yylloc;m.push(M);var N=k.options&&k.options.ranges;typeof S.yy.parseError=="function"?this.parseError=S.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function D(j){d.length=d.length-2*j,p.length=p.length-j,m.length=m.length-j}s(D,"popStack");function R(){var j;return j=f.pop()||k.lex()||w,typeof j!="number"&&(j instanceof Array&&(f=j,j=f.pop()),j=h.symbols_[j]||j),j}s(R,"lex");for(var E,I,L,P,B,O,$={},G,V,z,W;;){if(L=d[d.length-1],this.defaultActions[L]?P=this.defaultActions[L]:((E===null||typeof E>"u")&&(E=R()),P=g[L]&&g[L][E]),typeof P>"u"||!P.length||!P[0]){var H="";W=[];for(G in g[L])this.terminals_[G]&&G>T&&W.push("'"+this.terminals_[G]+"'");k.showPosition?H="Parse error on line "+(v+1)+`: +`+k.showPosition()+` +Expecting `+W.join(", ")+", got '"+(this.terminals_[E]||E)+"'":H="Parse error on line "+(v+1)+": Unexpected "+(E==w?"end of input":"'"+(this.terminals_[E]||E)+"'"),this.parseError(H,{text:k.match,token:this.terminals_[E]||E,line:k.yylineno,loc:M,expected:W})}if(P[0]instanceof Array&&P.length>1)throw new Error("Parse Error: multiple actions possible at state: "+L+", token: "+E);switch(P[0]){case 1:d.push(E),p.push(k.yytext),m.push(k.yylloc),d.push(P[1]),E=null,I?(E=I,I=null):(x=k.yyleng,y=k.yytext,v=k.yylineno,M=k.yylloc,b>0&&b--);break;case 2:if(V=this.productions_[P[1]][1],$.$=p[p.length-V],$._$={first_line:m[m.length-(V||1)].first_line,last_line:m[m.length-1].last_line,first_column:m[m.length-(V||1)].first_column,last_column:m[m.length-1].last_column},N&&($._$.range=[m[m.length-(V||1)].range[0],m[m.length-1].range[1]]),O=this.performAction.apply($,[y,x,v,S.yy,P[1],p,m].concat(C)),typeof O<"u")return O;V&&(d=d.slice(0,-1*V*2),p=p.slice(0,-1*V),m=m.slice(0,-1*V)),d.push(this.productions_[P[1]][0]),p.push($.$),m.push($._$),z=g[d[d.length-2]][d[d.length-1]],d.push(z);break;case 3:return!0}}return!0},"parse")},a=(function(){var l={EOF:1,parseError:s(function(h,d){if(this.yy.parser)this.yy.parser.parseError(h,d);else throw new Error(h)},"parseError"),setInput:s(function(u,h){return this.yy=h||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:s(function(){var u=this._input[0];this.yytext+=u,this.yyleng++,this.offset++,this.match+=u,this.matched+=u;var h=u.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),u},"input"),unput:s(function(u){var h=u.length,d=u.split(/(?:\r\n?|\n)/g);this._input=u+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-h),this.offset-=h;var f=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 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:d?(d.length===f.length?this.yylloc.first_column:0)+f[f.length-d.length].length-d[0].length:this.yylloc.first_column-h},this.options.ranges&&(this.yylloc.range=[p[0],p[0]+this.yyleng-h]),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(u){this.unput(this.match.slice(u))},"less"),pastInput:s(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:s(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:s(function(){var u=this.pastInput(),h=new Array(u.length+1).join("-");return u+this.upcomingInput()+` +`+h+"^"},"showPosition"),test_match:s(function(u,h){var d,f,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))),f=u[0].match(/(?:\r\n?|\n).*/g),f&&(this.yylineno+=f.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:f?f[f.length-1].length-f[f.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],d=this.performAction.call(this,this.yy,this,h,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),d)return d;if(this._backtrack){for(var m in p)this[m]=p[m];return!1}return!1},"test_match"),next:s(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var u,h,d,f;this._more||(this.yytext="",this.match="");for(var p=this._currentRules(),m=0;mh[0].length)){if(h=d,f=m,this.options.backtrack_lexer){if(u=this.test_match(d,p[m]),u!==!1)return u;if(this._backtrack){h=!1;continue}else return!1}else if(!this.options.flex)break}return h?(u=this.test_match(h,p[f]),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:s(function(){var h=this.next();return h||this.lex()},"lex"),begin:s(function(h){this.conditionStack.push(h)},"begin"),popState:s(function(){var h=this.conditionStack.length-1;return h>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(h){return h=this.conditionStack.length-1-Math.abs(h||0),h>=0?this.conditionStack[h]:"INITIAL"},"topState"),pushState:s(function(h){this.begin(h)},"pushState"),stateStackSize:s(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:s(function(h,d,f,p){var m=p;switch(f){case 0:return this.pushState("csv"),4;break;case 1:return this.pushState("csv"),4;break;case 2:return 10;case 3:return 5;case 4:return 12;case 5:return this.pushState("escaped_text"),18;break;case 6:return 20;case 7:return this.popState("escaped_text"),18;break;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 l})();i.lexer=a;function o(){this.yy={}}return s(o,"Parser"),o.prototype=i,i.Parser=o,new o})();hU.parser=hU;WC=hU});var y_,v_,g_,XTt,dU,KTt,fU,ZTt,QTt,JTt,eCt,YLe,jLe=F(()=>{"use strict";Zt();Gr();An();y_=[],v_=[],g_=new Map,XTt=s(()=>{y_=[],v_=[],g_=new Map,gr()},"clear"),dU=class{constructor(t,r,n=0){this.source=t;this.target=r;this.value=n}static{s(this,"SankeyLink")}},KTt=s((e,t,r)=>{y_.push(new dU(e,t,r))},"addLink"),fU=class{constructor(t){this.ID=t}static{s(this,"SankeyNode")}},ZTt=s(e=>{e=xt.sanitizeText(e,Le());let t=g_.get(e);return t===void 0&&(t=new fU(e),g_.set(e,t),v_.push(t)),t},"findOrCreateNode"),QTt=s(()=>v_,"getNodes"),JTt=s(()=>y_,"getLinks"),eCt=s(()=>({nodes:v_.map(e=>({id:e.ID})),links:y_.map(e=>({source:e.source.ID,target:e.target.ID,value:e.value}))}),"getGraph"),YLe={nodesMap:g_,getConfig:s(()=>Le().sankey,"getConfig"),getNodes:QTt,getLinks:JTt,getGraph:eCt,addLink:KTt,findOrCreateNode:ZTt,getAccTitle:Sr,setAccTitle:Cr,getAccDescription:Ar,setAccDescription:Er,getDiagramTitle:Rr,setDiagramTitle:Mr,clear:XTt}});function qC(e,t){let r;if(t===void 0)for(let n of e)n!=null&&(r=n)&&(r=n);else{let n=-1;for(let i of e)(i=t(i,++n,e))!=null&&(r=i)&&(r=i)}return r}var XLe=F(()=>{"use strict";s(qC,"max")});function xv(e,t){let r;if(t===void 0)for(let n of e)n!=null&&(r>n||r===void 0&&n>=n)&&(r=n);else{let n=-1;for(let i of e)(i=t(i,++n,e))!=null&&(r>i||r===void 0&&i>=i)&&(r=i)}return r}var KLe=F(()=>{"use strict";s(xv,"min")});function bv(e,t){let r=0;if(t===void 0)for(let n of e)(n=+n)&&(r+=n);else{let n=-1;for(let i of e)(i=+t(i,++n,e))&&(r+=i)}return r}var ZLe=F(()=>{"use strict";s(bv,"sum")});var pU=F(()=>{"use strict";XLe();KLe();ZLe()});function tCt(e){return e.target.depth}function mU(e){return e.depth}function gU(e,t){return t-1-e.height}function HC(e,t){return e.sourceLinks.length?e.depth:t-1}function yU(e){return e.targetLinks.length?e.depth:e.sourceLinks.length?xv(e.sourceLinks,tCt)-1:0}var vU=F(()=>{"use strict";pU();s(tCt,"targetDepth");s(mU,"left");s(gU,"right");s(HC,"justify");s(yU,"center")});function Tv(e){return function(){return e}}var QLe=F(()=>{"use strict";s(Tv,"constant")});function JLe(e,t){return x_(e.source,t.source)||e.index-t.index}function eDe(e,t){return x_(e.target,t.target)||e.index-t.index}function x_(e,t){return e.y0-t.y0}function xU(e){return e.value}function rCt(e){return e.index}function nCt(e){return e.nodes}function iCt(e){return e.links}function tDe(e,t){let r=e.get(t);if(!r)throw new Error("missing: "+t);return r}function rDe({nodes:e}){for(let t of e){let r=t.y0,n=r;for(let i of t.sourceLinks)i.y0=r+i.width/2,r+=i.width;for(let i of t.targetLinks)i.y1=n+i.width/2,n+=i.width}}function b_(){let e=0,t=0,r=1,n=1,i=24,a=8,o,l=rCt,u=HC,h,d,f=nCt,p=iCt,m=6;function g(){let L={nodes:f.apply(null,arguments),links:p.apply(null,arguments)};return y(L),v(L),x(L),b(L),C(L),rDe(L),L}s(g,"sankey"),g.update=function(L){return rDe(L),L},g.nodeId=function(L){return arguments.length?(l=typeof L=="function"?L:Tv(L),g):l},g.nodeAlign=function(L){return arguments.length?(u=typeof L=="function"?L:Tv(L),g):u},g.nodeSort=function(L){return arguments.length?(h=L,g):h},g.nodeWidth=function(L){return arguments.length?(i=+L,g):i},g.nodePadding=function(L){return arguments.length?(a=o=+L,g):a},g.nodes=function(L){return arguments.length?(f=typeof L=="function"?L:Tv(L),g):f},g.links=function(L){return arguments.length?(p=typeof L=="function"?L:Tv(L),g):p},g.linkSort=function(L){return arguments.length?(d=L,g):d},g.size=function(L){return arguments.length?(e=t=0,r=+L[0],n=+L[1],g):[r-e,n-t]},g.extent=function(L){return arguments.length?(e=+L[0][0],r=+L[1][0],t=+L[0][1],n=+L[1][1],g):[[e,t],[r,n]]},g.iterations=function(L){return arguments.length?(m=+L,g):m};function y({nodes:L,links:P}){for(let[O,$]of L.entries())$.index=O,$.sourceLinks=[],$.targetLinks=[];let B=new Map(L.map((O,$)=>[l(O,$,L),O]));for(let[O,$]of P.entries()){$.index=O;let{source:G,target:V}=$;typeof G!="object"&&(G=$.source=tDe(B,G)),typeof V!="object"&&(V=$.target=tDe(B,V)),G.sourceLinks.push($),V.targetLinks.push($)}if(d!=null)for(let{sourceLinks:O,targetLinks:$}of L)O.sort(d),$.sort(d)}s(y,"computeNodeLinks");function v({nodes:L}){for(let P of L)P.value=P.fixedValue===void 0?Math.max(bv(P.sourceLinks,xU),bv(P.targetLinks,xU)):P.fixedValue}s(v,"computeNodeValues");function x({nodes:L}){let P=L.length,B=new Set(L),O=new Set,$=0;for(;B.size;){for(let G of B){G.depth=$;for(let{target:V}of G.sourceLinks)O.add(V)}if(++$>P)throw new Error("circular link");B=O,O=new Set}}s(x,"computeNodeDepths");function b({nodes:L}){let P=L.length,B=new Set(L),O=new Set,$=0;for(;B.size;){for(let G of B){G.height=$;for(let{source:V}of G.targetLinks)O.add(V)}if(++$>P)throw new Error("circular link");B=O,O=new Set}}s(b,"computeNodeHeights");function T({nodes:L}){let P=qC(L,$=>$.depth)+1,B=(r-e-i)/(P-1),O=new Array(P);for(let $ of L){let G=Math.max(0,Math.min(P-1,Math.floor(u.call(null,$,P))));$.layer=G,$.x0=e+G*B,$.x1=$.x0+i,O[G]?O[G].push($):O[G]=[$]}if(h)for(let $ of O)$.sort(h);return O}s(T,"computeNodeLayers");function w(L){let P=xv(L,B=>(n-t-(B.length-1)*o)/bv(B,xU));for(let B of L){let O=t;for(let $ of B){$.y0=O,$.y1=O+$.value*P,O=$.y1+o;for(let G of $.sourceLinks)G.width=G.value*P}O=(n-O+o)/(B.length+1);for(let $=0;$B.length)-1)),w(P);for(let B=0;B0))continue;let H=(z/W-V.y0)*P;V.y0+=H,V.y1+=H,D(V)}h===void 0&&G.sort(x_),A(G,B)}}s(k,"relaxLeftToRight");function S(L,P,B){for(let O=L.length,$=O-2;$>=0;--$){let G=L[$];for(let V of G){let z=0,W=0;for(let{target:j,value:Q}of V.sourceLinks){let U=Q*(j.layer-V.layer);z+=I(V,j)*U,W+=U}if(!(W>0))continue;let H=(z/W-V.y0)*P;V.y0+=H,V.y1+=H,D(V)}h===void 0&&G.sort(x_),A(G,B)}}s(S,"relaxRightToLeft");function A(L,P){let B=L.length>>1,O=L[B];N(L,O.y0-o,B-1,P),M(L,O.y1+o,B+1,P),N(L,n,L.length-1,P),M(L,t,0,P)}s(A,"resolveCollisions");function M(L,P,B,O){for(;B1e-6&&($.y0+=G,$.y1+=G),P=$.y1+o}}s(M,"resolveCollisionsTopToBottom");function N(L,P,B,O){for(;B>=0;--B){let $=L[B],G=($.y1-P)*O;G>1e-6&&($.y0-=G,$.y1-=G),P=$.y0-o}}s(N,"resolveCollisionsBottomToTop");function D({sourceLinks:L,targetLinks:P}){if(d===void 0){for(let{source:{sourceLinks:B}}of P)B.sort(eDe);for(let{target:{targetLinks:B}}of L)B.sort(JLe)}}s(D,"reorderNodeLinks");function R(L){if(d===void 0)for(let{sourceLinks:P,targetLinks:B}of L)P.sort(eDe),B.sort(JLe)}s(R,"reorderLinks");function E(L,P){let B=L.y0-(L.sourceLinks.length-1)*o/2;for(let{target:O,width:$}of L.sourceLinks){if(O===P)break;B+=$+o}for(let{source:O,width:$}of P.targetLinks){if(O===L)break;B-=$}return B}s(E,"targetTop");function I(L,P){let B=P.y0-(P.targetLinks.length-1)*o/2;for(let{source:O,width:$}of P.targetLinks){if(O===L)break;B+=$+o}for(let{target:O,width:$}of L.sourceLinks){if(O===P)break;B-=$}return B}return s(I,"sourceTop"),g}var nDe=F(()=>{"use strict";pU();vU();QLe();s(JLe,"ascendingSourceBreadth");s(eDe,"ascendingTargetBreadth");s(x_,"ascendingBreadth");s(xU,"value");s(rCt,"defaultId");s(nCt,"defaultNodes");s(iCt,"defaultLinks");s(tDe,"find");s(rDe,"computeLinkBreadths");s(b_,"Sankey")});function CU(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function iDe(){return new CU}var bU,TU,$g,aCt,kU,aDe=F(()=>{"use strict";bU=Math.PI,TU=2*bU,$g=1e-6,aCt=TU-$g;s(CU,"Path");s(iDe,"path");CU.prototype=iDe.prototype={constructor:CU,moveTo:s(function(e,t){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)},"moveTo"),closePath:s(function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},"closePath"),lineTo:s(function(e,t){this._+="L"+(this._x1=+e)+","+(this._y1=+t)},"lineTo"),quadraticCurveTo:s(function(e,t,r,n){this._+="Q"+ +e+","+ +t+","+(this._x1=+r)+","+(this._y1=+n)},"quadraticCurveTo"),bezierCurveTo:s(function(e,t,r,n,i,a){this._+="C"+ +e+","+ +t+","+ +r+","+ +n+","+(this._x1=+i)+","+(this._y1=+a)},"bezierCurveTo"),arcTo:s(function(e,t,r,n,i){e=+e,t=+t,r=+r,n=+n,i=+i;var a=this._x1,o=this._y1,l=r-e,u=n-t,h=a-e,d=o-t,f=h*h+d*d;if(i<0)throw new Error("negative radius: "+i);if(this._x1===null)this._+="M"+(this._x1=e)+","+(this._y1=t);else if(f>$g)if(!(Math.abs(d*l-u*h)>$g)||!i)this._+="L"+(this._x1=e)+","+(this._y1=t);else{var p=r-a,m=n-o,g=l*l+u*u,y=p*p+m*m,v=Math.sqrt(g),x=Math.sqrt(f),b=i*Math.tan((bU-Math.acos((g+f-y)/(2*v*x)))/2),T=b/x,w=b/v;Math.abs(T-1)>$g&&(this._+="L"+(e+T*h)+","+(t+T*d)),this._+="A"+i+","+i+",0,0,"+ +(d*p>h*m)+","+(this._x1=e+w*l)+","+(this._y1=t+w*u)}},"arcTo"),arc:s(function(e,t,r,n,i,a){e=+e,t=+t,r=+r,a=!!a;var o=r*Math.cos(n),l=r*Math.sin(n),u=e+o,h=t+l,d=1^a,f=a?n-i:i-n;if(r<0)throw new Error("negative radius: "+r);this._x1===null?this._+="M"+u+","+h:(Math.abs(this._x1-u)>$g||Math.abs(this._y1-h)>$g)&&(this._+="L"+u+","+h),r&&(f<0&&(f=f%TU+TU),f>aCt?this._+="A"+r+","+r+",0,1,"+d+","+(e-o)+","+(t-l)+"A"+r+","+r+",0,1,"+d+","+(this._x1=u)+","+(this._y1=h):f>$g&&(this._+="A"+r+","+r+",0,"+ +(f>=bU)+","+d+","+(this._x1=e+r*Math.cos(i))+","+(this._y1=t+r*Math.sin(i))))},"arc"),rect:s(function(e,t,r,n){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)+"h"+ +r+"v"+ +n+"h"+-r+"Z"},"rect"),toString:s(function(){return this._},"toString")};kU=iDe});var sDe=F(()=>{"use strict";aDe()});function T_(e){return s(function(){return e},"constant")}var oDe=F(()=>{"use strict";s(T_,"default")});function lDe(e){return e[0]}function cDe(e){return e[1]}var uDe=F(()=>{"use strict";s(lDe,"x");s(cDe,"y")});var hDe,dDe=F(()=>{"use strict";hDe=Array.prototype.slice});function sCt(e){return e.source}function oCt(e){return e.target}function lCt(e){var t=sCt,r=oCt,n=lDe,i=cDe,a=null;function o(){var l,u=hDe.call(arguments),h=t.apply(this,u),d=r.apply(this,u);if(a||(a=l=kU()),e(a,+n.apply(this,(u[0]=h,u)),+i.apply(this,u),+n.apply(this,(u[0]=d,u)),+i.apply(this,u)),l)return a=null,l+""||null}return s(o,"link"),o.source=function(l){return arguments.length?(t=l,o):t},o.target=function(l){return arguments.length?(r=l,o):r},o.x=function(l){return arguments.length?(n=typeof l=="function"?l:T_(+l),o):n},o.y=function(l){return arguments.length?(i=typeof l=="function"?l:T_(+l),o):i},o.context=function(l){return arguments.length?(a=l??null,o):a},o}function cCt(e,t,r,n,i){e.moveTo(t,r),e.bezierCurveTo(t=(t+n)/2,r,t,i,n,i)}function wU(){return lCt(cCt)}var fDe=F(()=>{"use strict";sDe();dDe();oDe();uDe();s(sCt,"linkSource");s(oCt,"linkTarget");s(lCt,"link");s(cCt,"curveHorizontal");s(wU,"linkHorizontal")});var pDe=F(()=>{"use strict";fDe()});function uCt(e){return[e.source.x1,e.y0]}function hCt(e){return[e.target.x0,e.y1]}function C_(){return wU().source(uCt).target(hCt)}var mDe=F(()=>{"use strict";pDe();s(uCt,"horizontalSource");s(hCt,"horizontalTarget");s(C_,"default")});var gDe=F(()=>{"use strict";nDe();vU();mDe()});var UC,yDe=F(()=>{"use strict";UC=class e{static{s(this,"Uid")}static{this.count=0}static next(t){return new e(t+ ++e.count)}constructor(t){this.id=t,this.href=`#${t}`}toString(){return"url("+this.href+")"}}});var dCt,fCt,pCt,vDe,xDe=F(()=>{"use strict";Zt();$r();gDe();Dn();yDe();dCt={left:mU,right:gU,center:yU,justify:HC},fCt=s(e=>{let t=0,r=0;for(let n of e){let i=n.value??0;i>t&&(t=i,r=n.layer??0)}return r},"findCentralNodeLayer"),pCt=s(function(e,t,r,n){let{securityLevel:i,sankey:a}=Le(),o=gw.sankey,l;i==="sandbox"&&(l=lt("#i"+t));let u=i==="sandbox"?lt(l.nodes()[0].contentDocument.body):lt("body"),h=i==="sandbox"?u.select(`[id="${t}"]`):lt(`[id="${t}"]`),d=a?.width??o.width,f=a?.height??o.width,p=a?.useMaxWidth??o.useMaxWidth,m=a?.nodeAlignment??o.nodeAlignment,g=a?.prefix??o.prefix,y=a?.suffix??o.suffix,v=a?.showValues??o.showValues,x=a?.nodeWidth??o.nodeWidth??10,b=a?.nodePadding??o.nodePadding??12,T=a?.labelStyle??o.labelStyle??"legacy",w=a?.nodeColors??{},C=n.db.getGraph(),k=dCt[m];b_().nodeId(O=>O.id).nodeWidth(x).nodePadding(b+(v?15:0)).nodeAlign(k).extent([[0,0],[d,f]])(C);let A=fCt(C.nodes),M=go(iM),N=s(O=>w[O]??M(O),"getNodeColor");h.append("g").attr("class","nodes").selectAll(".node").data(C.nodes).join("g").attr("class","node").attr("id",O=>(O.uid=UC.next("node-")).id).attr("transform",function(O){return"translate("+O.x0+","+O.y0+")"}).attr("x",O=>O.x0).attr("y",O=>O.y0).append("rect").attr("height",O=>O.y1-O.y0).attr("width",O=>O.x1-O.x0).attr("fill",O=>N(O.id));let D=s(({id:O,value:$})=>v?`${O} +${g}${Math.round($*100)/100}${y}`:O,"getText"),R=s(O=>T==="outlined"?(O.layer??0)E.selectAll(O?`.${O}`:"text").data(C.nodes).join("text").attr("class",O??null).attr("x",$=>R($).x).attr("y",$=>($.y1+$.y0)/2).attr("dy",`${v?"0":"0.35"}em`).attr("text-anchor",$=>R($).anchor).text(D),"appendLabel");T==="outlined"?(I("sankey-label-bg"),I("sankey-label-fg")):I();let L=h.append("g").attr("class","links").attr("fill","none").attr("stroke-opacity",.5).selectAll(".link").data(C.links).join("g").attr("class","link").style("mix-blend-mode","multiply"),P=a?.linkColor??"gradient";if(P==="gradient"){let O=L.append("linearGradient").attr("id",$=>($.uid=UC.next("linearGradient-")).id).attr("gradientUnits","userSpaceOnUse").attr("x1",$=>$.source.x1).attr("x2",$=>$.target.x0);O.append("stop").attr("offset","0%").attr("stop-color",$=>N($.source.id)),O.append("stop").attr("offset","100%").attr("stop-color",$=>N($.target.id))}let B;switch(P){case"gradient":B=s(O=>O.uid,"coloring");break;case"source":B=s(O=>N(O.source.id),"coloring");break;case"target":B=s(O=>N(O.target.id),"coloring");break;default:B=P}L.append("path").attr("d",C_()).attr("stroke",B).attr("stroke-width",O=>Math.max(1,O.width)),Go(void 0,h,0,p)},"draw"),vDe={draw:pCt}});var bDe,TDe=F(()=>{"use strict";bDe=s(e=>e.replaceAll(/^[^\S\n\r]+|[^\S\n\r]+$/g,"").replaceAll(/([\n\r])+/g,` +`).trim(),"prepareTextForParsing")});var mCt,CDe,kDe=F(()=>{"use strict";mCt=s(e=>`.label { + font-family: ${e.fontFamily}; + } + + .node-labels { + font-family: ${e.fontFamily}; + } + + /* Outlined label style - background stroke for better readability */ + .sankey-label-bg { + stroke: ${e.mainBkg||e.background||"#fff"}; + stroke-width: 4px; + stroke-linejoin: round; + paint-order: stroke; + } + + /* Foreground label text */ + .sankey-label-fg { + fill: ${e.textColor}; + } + + /* Node styling */ + .node rect { + shape-rendering: crispEdges; + } + + /* Link styling */ + .link { + fill: none; + stroke-opacity: 0.5; + mix-blend-mode: multiply; + } +`,"getStyles"),CDe=mCt});var wDe={};ar(wDe,{diagram:()=>yCt});var gCt,yCt,SDe=F(()=>{"use strict";ULe();jLe();xDe();TDe();kDe();gCt=WC.parse.bind(WC);WC.parse=e=>gCt(bDe(e));yCt={styles:CDe,parser:WC,db:YLe,renderer:vDe}});var TCt,Cv,SU=F(()=>{"use strict";mr();Ni();Qt();An();TCt=hr.packet,Cv=class{constructor(){this.packet=[];this.setAccTitle=Cr;this.getAccTitle=Sr;this.setDiagramTitle=Mr;this.getDiagramTitle=Rr;this.getAccDescription=Ar;this.setAccDescription=Er}static{s(this,"PacketDB")}getConfig(){let t=Fr({...TCt,...Lt().packet});return t.showBits&&(t.paddingY+=10),t}getPacket(){return this.packet}pushWord(t){t.length>0&&this.packet.push(t)}clear(){gr(),this.packet=[]}}});var CCt,kCt,wCt,EU,RDe=F(()=>{"use strict";Oa();Tt();_s();SU();CCt=1e4,kCt=s((e,t)=>{Nn(e,t);let r=-1,n=[],i=1,{bitsPerRow:a}=t.getConfig();for(let{start:o,end:l,bits:u,label:h}of e.blocks){if(o!==void 0&&l!==void 0&&l{if(e.start===void 0)throw new Error("start should have been set during first phase");if(e.end===void 0)throw new Error("end should have been set during first phase");if(e.start>e.end)throw new Error(`Block start ${e.start} is greater than block end ${e.end}.`);if(e.end+1<=t*r)return[e,void 0];let n=t*r-1,i=t*r;return[{start:e.start,end:n,label:e.label,bits:n-e.start},{start:i,end:e.end,label:e.label,bits:e.end-i}]},"getNextFittingBlock"),EU={parser:{yy:void 0},parse:s(async e=>{let t=await pi("packet",e),r=EU.parser?.yy;if(!(r instanceof Cv))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.");te.debug(t),kCt(t,r)},"parse")}});var SCt,ECt,_De,LDe=F(()=>{"use strict";Ba();Dn();SCt=s((e,t,r,n)=>{let i=n.db,a=i.getConfig(),{rowHeight:o,paddingY:l,bitWidth:u,bitsPerRow:h}=a,d=i.getPacket(),f=i.getDiagramTitle(),p=o+l,m=p*(d.length+1)-(f?0:o),g=u*h+2,y=pn(t);y.attr("viewBox",`0 0 ${g} ${m}`),Br(y,m,g,a.useMaxWidth);for(let[v,x]of d.entries())ECt(y,x,v,a);y.append("text").text(f).attr("x",g/2).attr("y",m-p/2).attr("dominant-baseline","middle").attr("text-anchor","middle").attr("class","packetTitle")},"draw"),ECt=s((e,t,r,{rowHeight:n,paddingX:i,paddingY:a,bitWidth:o,bitsPerRow:l,showBits:u})=>{let h=e.append("g"),d=r*(n+a)+a;for(let f of t){let p=f.start%l*o+1,m=(f.end-f.start+1)*o-i;if(h.append("rect").attr("x",p).attr("y",d).attr("width",m).attr("height",n).attr("class","packetBlock"),h.append("text").attr("x",p+m/2).attr("y",d+n/2).attr("class","packetLabel").attr("dominant-baseline","middle").attr("text-anchor","middle").text(f.label),!u)continue;let g=f.end===f.start,y=d-2;h.append("text").attr("x",p+(g?m/2:0)).attr("y",y).attr("class","packetByte start").attr("dominant-baseline","auto").attr("text-anchor",g?"middle":"start").text(f.start),g||h.append("text").attr("x",p+m).attr("y",y).attr("class","packetByte end").attr("dominant-baseline","auto").attr("text-anchor","end").text(f.end)}},"drawWord"),_De={draw:SCt}});var ACt,DDe,IDe=F(()=>{"use strict";Qt();ACt={byteFontSize:"10px",startByteColor:"black",endByteColor:"black",labelColor:"black",labelFontSize:"12px",titleColor:"black",titleFontSize:"14px",blockStrokeColor:"black",blockStrokeWidth:"1",blockFillColor:"#efefef"},DDe=s(({packet:e}={})=>{let t=Fr(ACt,e);return` + .packetByte { + font-size: ${t.byteFontSize}; + } + .packetByte.start { + fill: ${t.startByteColor}; + } + .packetByte.end { + fill: ${t.endByteColor}; + } + .packetLabel { + fill: ${t.labelColor}; + font-size: ${t.labelFontSize}; + } + .packetTitle { + fill: ${t.titleColor}; + font-size: ${t.titleFontSize}; + } + .packetBlock { + stroke: ${t.blockStrokeColor}; + stroke-width: ${t.blockStrokeWidth}; + fill: ${t.blockFillColor}; + } + `},"styles")});var MDe={};ar(MDe,{diagram:()=>RCt});var RCt,NDe=F(()=>{"use strict";SU();RDe();LDe();IDe();RCt={parser:EU,get db(){return new Cv},renderer:_De,styles:DDe}});var kv,BDe,Fg,DCt,ICt,$De,MCt,NCt,PCt,OCt,BCt,$Ct,FCt,Gg,AU=F(()=>{"use strict";mr();Ni();Qt();An();kv={showLegend:!0,ticks:5,max:null,min:0,graticule:"circle"},BDe={axes:[],curves:[],options:kv},Fg=structuredClone(BDe),DCt=hr.radar,ICt=s(()=>Fr({...DCt,...Lt().radar}),"getConfig"),$De=s(()=>Fg.axes,"getAxes"),MCt=s(()=>Fg.curves,"getCurves"),NCt=s(()=>Fg.options,"getOptions"),PCt=s(e=>{Fg.axes=e.map(t=>({name:t.name,label:t.label??t.name}))},"setAxes"),OCt=s(e=>{Fg.curves=e.map(t=>({name:t.name,label:t.label??t.name,entries:BCt(t.entries)}))},"setCurves"),BCt=s(e=>{if(e[0].axis==null)return e.map(r=>r.value);let t=$De();if(t.length===0)throw new Error("Axes must be populated before curves for reference entries");return t.map(r=>{let n=e.find(i=>i.axis?.$refText===r.name);if(n===void 0)throw new Error("Missing entry for axis "+r.label);return n.value})},"computeCurveEntries"),$Ct=s(e=>{let t=e.reduce((r,n)=>(r[n.name]=n,r),{});Fg.options={showLegend:t.showLegend?.value??kv.showLegend,ticks:t.ticks?.value??kv.ticks,max:t.max?.value??kv.max,min:t.min?.value??kv.min,graticule:t.graticule?.value??kv.graticule}},"setOptions"),FCt=s(()=>{gr(),Fg=structuredClone(BDe)},"clear"),Gg={getAxes:$De,getCurves:MCt,getOptions:NCt,setAxes:PCt,setCurves:OCt,setOptions:$Ct,getConfig:ICt,clear:FCt,setAccTitle:Cr,getAccTitle:Sr,setDiagramTitle:Mr,getDiagramTitle:Rr,getAccDescription:Ar,setAccDescription:Er}});var GCt,FDe,GDe=F(()=>{"use strict";Oa();Tt();_s();AU();GCt=s(e=>{Nn(e,Gg);let{axes:t,curves:r,options:n}=e;Gg.setAxes(t),Gg.setCurves(r),Gg.setOptions(n)},"populate"),FDe={parse:s(async e=>{let t=await pi("radar",e);te.debug(t),GCt(t)},"parse")}});function HCt(e,t,r,n,i,a,o){let l=t.length,u=Math.min(o.width,o.height)/2;r.forEach((h,d)=>{if(h.entries.length!==l)return;let f=h.entries.map((p,m)=>{let g=2*Math.PI*m/l-Math.PI/2,y=UCt(p,n,i,u),v=y*Math.cos(g),x=y*Math.sin(g);return{x:v,y:x}});a==="circle"?e.append("path").attr("d",YCt(f,o.curveTension)).attr("class",`radarCurve-${d}`):a==="polygon"&&e.append("polygon").attr("points",f.map(p=>`${p.x},${p.y}`).join(" ")).attr("class",`radarCurve-${d}`)})}function UCt(e,t,r,n){let i=Math.min(Math.max(e,t),r);return n*(i-t)/(r-t)}function YCt(e,t){let r=e.length,n=`M${e[0].x},${e[0].y}`;for(let i=0;i{let h=e.append("g").attr("transform",`translate(${i}, ${a+u*o})`);h.append("rect").attr("width",12).attr("height",12).attr("class",`radarLegendBox-${u}`),h.append("text").attr("x",16).attr("y",0).attr("class","radarLegendText").text(l.label)})}var zCt,VCt,WCt,qCt,zDe,VDe=F(()=>{"use strict";Ba();Dn();zCt=s((e,t,r,n)=>{let i=n.db,a=i.getAxes(),o=i.getCurves(),l=i.getOptions(),u=i.getConfig(),h=i.getDiagramTitle(),d=pn(t),f=VCt(d,u),p=l.max??Math.max(...o.map(y=>Math.max(...y.entries))),m=l.min,g=Math.min(u.width,u.height)/2;WCt(f,a,g,l.ticks,l.graticule),qCt(f,a,g,u),HCt(f,a,o,m,p,l.graticule,u),jCt(f,o,l.showLegend,u),f.append("text").attr("class","radarTitle").text(h).attr("x",0).attr("y",-u.height/2-u.marginTop)},"draw"),VCt=s((e,t)=>{let r=t.width+t.marginLeft+t.marginRight,n=t.height+t.marginTop+t.marginBottom,i={x:t.marginLeft+t.width/2,y:t.marginTop+t.height/2};return Br(e,n,r,t.useMaxWidth??!0),e.attr("viewBox",`0 0 ${r} ${n}`).attr("overflow","visible"),e.append("g").attr("transform",`translate(${i.x}, ${i.y})`)},"drawFrame"),WCt=s((e,t,r,n,i)=>{if(i==="circle")for(let a=0;a{let f=2*d*Math.PI/a-Math.PI/2,p=l*Math.cos(f),m=l*Math.sin(f);return`${p},${m}`}).join(" ");e.append("polygon").attr("points",u).attr("class","radarGraticule")}}},"drawGraticule"),qCt=s((e,t,r,n)=>{let i=t.length;for(let a=0;a.01?"start":u<-.01?"end":"middle",f=h>.01?"hanging":h<-.01?"auto":"central",p=4;e.append("text").text(o).attr("x",r*n.axisLabelFactor*u+p*u).attr("y",r*n.axisLabelFactor*h+p*h).attr("text-anchor",d).attr("dominant-baseline",f).attr("class","radarAxisLabel")}},"drawAxes");s(HCt,"drawCurves");s(UCt,"relativeRadius");s(YCt,"closedRoundCurve");s(jCt,"drawLegend");zDe={draw:zCt}});var XCt,KCt,WDe,qDe=F(()=>{"use strict";Qt();ec();mr();XCt=s((e,t)=>{let r="";for(let n=0;n{let t=ia(),r=Lt(),n=Fr(t,r.themeVariables),i=Fr(n.radar,e);return{themeVariables:n,radarOptions:i}},"buildRadarStyleOptions"),WDe=s(({radar:e}={})=>{let{themeVariables:t,radarOptions:r}=KCt(e);return` + .radarTitle { + font-size: ${t.fontSize}; + color: ${t.titleColor}; + dominant-baseline: hanging; + text-anchor: middle; + } + .radarAxisLine { + stroke: ${r.axisColor}; + stroke-width: ${r.axisStrokeWidth}; + } + .radarAxisLabel { + font-size: ${r.axisLabelFontSize}px; + color: ${r.axisColor}; + } + .radarGraticule { + fill: ${r.graticuleColor}; + fill-opacity: ${r.graticuleOpacity}; + stroke: ${r.graticuleColor}; + stroke-width: ${r.graticuleStrokeWidth}; + } + .radarLegendText { + text-anchor: start; + font-size: ${r.legendFontSize}px; + dominant-baseline: hanging; + } + ${XCt(t,r)} + `},"styles")});var HDe={};ar(HDe,{diagram:()=>ZCt});var ZCt,UDe=F(()=>{"use strict";AU();GDe();VDe();qDe();ZCt={parser:FDe,db:Gg,renderer:zDe,styles:WDe}});var RU,XDe,KDe=F(()=>{"use strict";RU=(function(){var e=s(function(T,w,C,k){for(C=C||{},k=T.length;k--;C[T[k]]=w);return C},"o"),t=[1,15],r=[1,7],n=[1,13],i=[1,14],a=[1,19],o=[1,16],l=[1,17],u=[1,18],h=[8,30],d=[8,10,21,28,29,30,31,39,43,46],f=[1,23],p=[1,24],m=[8,10,15,16,21,28,29,30,31,39,43,46],g=[8,10,15,16,21,27,28,29,30,31,39,43,46],y=[1,49],v={trace:s(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:s(function(w,C,k,S,A,M,N){var D=M.length-1;switch(A){case 4:S.getLogger().debug("Rule: separator (NL) ");break;case 5:S.getLogger().debug("Rule: separator (Space) ");break;case 6:S.getLogger().debug("Rule: separator (EOF) ");break;case 7:S.getLogger().debug("Rule: hierarchy: ",M[D-1]),S.setHierarchy(M[D-1]);break;case 8:S.getLogger().debug("Stop NL ");break;case 9:S.getLogger().debug("Stop EOF ");break;case 10:S.getLogger().debug("Stop NL2 ");break;case 11:S.getLogger().debug("Stop EOF2 ");break;case 12:S.getLogger().debug("Rule: statement: ",M[D]),typeof M[D].length=="number"?this.$=M[D]:this.$=[M[D]];break;case 13:S.getLogger().debug("Rule: statement #2: ",M[D-1]),this.$=[M[D-1]].concat(M[D]);break;case 14:S.getLogger().debug("Rule: link: ",M[D],w),this.$={edgeTypeStr:M[D],label:""};break;case 15:S.getLogger().debug("Rule: LABEL link: ",M[D-3],M[D-1],M[D]),this.$={edgeTypeStr:M[D],label:M[D-1]};break;case 18:let R=parseInt(M[D]),E=S.generateId();this.$={id:E,type:"space",label:"",width:R,children:[]};break;case 23:S.getLogger().debug("Rule: (nodeStatement link node) ",M[D-2],M[D-1],M[D]," typestr: ",M[D-1].edgeTypeStr);let I=S.edgeStrToEdgeData(M[D-1].edgeTypeStr),L=S.edgeStrToEdgeStartData(M[D-1].edgeTypeStr),P=S.edgeStrToThickness(M[D-1].edgeTypeStr),B=S.edgeStrToPattern(M[D-1].edgeTypeStr);this.$=[{id:M[D-2].id,label:M[D-2].label,type:M[D-2].type,directions:M[D-2].directions},{id:M[D-2].id+"-"+M[D].id,start:M[D-2].id,end:M[D].id,label:M[D-1].label,type:"edge",thickness:P,pattern:B,directions:M[D].directions,arrowTypeEnd:I,arrowTypeStart:L},{id:M[D].id,label:M[D].label,type:S.typeStr2Type(M[D].typeStr),directions:M[D].directions}];break;case 24:S.getLogger().debug("Rule: nodeStatement (abc88 node size) ",M[D-1],M[D]),this.$={id:M[D-1].id,label:M[D-1].label,type:S.typeStr2Type(M[D-1].typeStr),directions:M[D-1].directions,widthInColumns:parseInt(M[D],10)};break;case 25:S.getLogger().debug("Rule: nodeStatement (node) ",M[D]),this.$={id:M[D].id,label:M[D].label,type:S.typeStr2Type(M[D].typeStr),directions:M[D].directions,widthInColumns:1};break;case 26:S.getLogger().debug("APA123",this?this:"na"),S.getLogger().debug("COLUMNS: ",M[D]),this.$={type:"column-setting",columns:M[D]==="auto"?-1:parseInt(M[D])};break;case 27:S.getLogger().debug("Rule: id-block statement : ",M[D-2],M[D-1]);let O=S.generateId();this.$={...M[D-2],type:"composite",children:M[D-1]};break;case 28:S.getLogger().debug("Rule: blockStatement : ",M[D-2],M[D-1],M[D]);let $=S.generateId();this.$={id:$,type:"composite",label:"",children:M[D-1]};break;case 29:S.getLogger().debug("Rule: node (NODE_ID separator): ",M[D]),this.$={id:M[D]};break;case 30:S.getLogger().debug("Rule: node (NODE_ID nodeShapeNLabel separator): ",M[D-1],M[D]),this.$={id:M[D-1],label:M[D].label,typeStr:M[D].typeStr,directions:M[D].directions};break;case 31:S.getLogger().debug("Rule: dirList: ",M[D]),this.$=[M[D]];break;case 32:S.getLogger().debug("Rule: dirList: ",M[D-1],M[D]),this.$=[M[D-1]].concat(M[D]);break;case 33:S.getLogger().debug("Rule: nodeShapeNLabel: ",M[D-2],M[D-1],M[D]),this.$={typeStr:M[D-2]+M[D],label:M[D-1]};break;case 34:S.getLogger().debug("Rule: BLOCK_ARROW nodeShapeNLabel: ",M[D-3],M[D-2]," #3:",M[D-1],M[D]),this.$={typeStr:M[D-3]+M[D],label:M[D-2],directions:M[D-1]};break;case 35:case 36:this.$={type:"classDef",id:M[D-1].trim(),css:M[D].trim()};break;case 37:this.$={type:"applyClass",id:M[D-1].trim(),styleClass:M[D].trim()};break;case 38:this.$={type:"applyStyles",id:M[D-1].trim(),stylesStr:M[D].trim()};break}},"anonymous"),table:[{9:1,10:[1,2]},{1:[3]},{10:t,11:3,13:4,19:5,20:6,21:r,22:8,23:9,24:10,25:11,26:12,28:n,29:i,31:a,39:o,43:l,46:u},{8:[1,20]},e(h,[2,12],{13:4,19:5,20:6,22:8,23:9,24:10,25:11,26:12,11:21,10:t,21:r,28:n,29:i,31:a,39:o,43:l,46:u}),e(d,[2,16],{14:22,15:f,16:p}),e(d,[2,17]),e(d,[2,18]),e(d,[2,19]),e(d,[2,20]),e(d,[2,21]),e(d,[2,22]),e(m,[2,25],{27:[1,25]}),e(d,[2,26]),{19:26,26:12,31:a},{10:t,11:27,13:4,19:5,20:6,21:r,22:8,23:9,24:10,25:11,26:12,28:n,29:i,31:a,39:o,43:l,46:u},{40:[1,28],42:[1,29]},{44:[1,30]},{47:[1,31]},e(g,[2,29],{32:32,35:[1,33],37:[1,34]}),{1:[2,7]},e(h,[2,13]),{26:35,31:a},{31:[2,14]},{17:[1,36]},e(m,[2,24]),{10:t,11:37,13:4,14:22,15:f,16:p,19:5,20:6,21:r,22:8,23:9,24:10,25:11,26:12,28:n,29:i,31:a,39:o,43:l,46:u},{30:[1,38]},{41:[1,39]},{41:[1,40]},{45:[1,41]},{48:[1,42]},e(g,[2,30]),{18:[1,43]},{18:[1,44]},e(m,[2,23]),{18:[1,45]},{30:[1,46]},e(d,[2,28]),e(d,[2,35]),e(d,[2,36]),e(d,[2,37]),e(d,[2,38]),{36:[1,47]},{33:48,34:y},{15:[1,50]},e(d,[2,27]),e(g,[2,33]),{38:[1,51]},{33:52,34:y,38:[2,31]},{31:[2,15]},e(g,[2,34]),{38:[2,32]}],defaultActions:{20:[2,7],23:[2,14],50:[2,15],52:[2,32]},parseError:s(function(w,C){if(C.recoverable)this.trace(w);else{var k=new Error(w);throw k.hash=C,k}},"parseError"),parse:s(function(w){var C=this,k=[0],S=[],A=[null],M=[],N=this.table,D="",R=0,E=0,I=0,L=2,P=1,B=M.slice.call(arguments,1),O=Object.create(this.lexer),$={yy:{}};for(var G in this.yy)Object.prototype.hasOwnProperty.call(this.yy,G)&&($.yy[G]=this.yy[G]);O.setInput(w,$.yy),$.yy.lexer=O,$.yy.parser=this,typeof O.yylloc>"u"&&(O.yylloc={});var V=O.yylloc;M.push(V);var z=O.options&&O.options.ranges;typeof $.yy.parseError=="function"?this.parseError=$.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function W(We){k.length=k.length-2*We,A.length=A.length-We,M.length=M.length-We}s(W,"popStack");function H(){var We;return We=S.pop()||O.lex()||P,typeof We!="number"&&(We instanceof Array&&(S=We,We=S.pop()),We=C.symbols_[We]||We),We}s(H,"lex");for(var j,Q,U,ue,J,he,se={},oe,Se,xe,Ne;;){if(U=k[k.length-1],this.defaultActions[U]?ue=this.defaultActions[U]:((j===null||typeof j>"u")&&(j=H()),ue=N[U]&&N[U][j]),typeof ue>"u"||!ue.length||!ue[0]){var Ye="";Ne=[];for(oe in N[U])this.terminals_[oe]&&oe>L&&Ne.push("'"+this.terminals_[oe]+"'");O.showPosition?Ye="Parse error on line "+(R+1)+`: +`+O.showPosition()+` +Expecting `+Ne.join(", ")+", got '"+(this.terminals_[j]||j)+"'":Ye="Parse error on line "+(R+1)+": Unexpected "+(j==P?"end of input":"'"+(this.terminals_[j]||j)+"'"),this.parseError(Ye,{text:O.match,token:this.terminals_[j]||j,line:O.yylineno,loc:V,expected:Ne})}if(ue[0]instanceof Array&&ue.length>1)throw new Error("Parse Error: multiple actions possible at state: "+U+", token: "+j);switch(ue[0]){case 1:k.push(j),A.push(O.yytext),M.push(O.yylloc),k.push(ue[1]),j=null,Q?(j=Q,Q=null):(E=O.yyleng,D=O.yytext,R=O.yylineno,V=O.yylloc,I>0&&I--);break;case 2:if(Se=this.productions_[ue[1]][1],se.$=A[A.length-Se],se._$={first_line:M[M.length-(Se||1)].first_line,last_line:M[M.length-1].last_line,first_column:M[M.length-(Se||1)].first_column,last_column:M[M.length-1].last_column},z&&(se._$.range=[M[M.length-(Se||1)].range[0],M[M.length-1].range[1]]),he=this.performAction.apply(se,[D,E,R,$.yy,ue[1],A,M].concat(B)),typeof he<"u")return he;Se&&(k=k.slice(0,-1*Se*2),A=A.slice(0,-1*Se),M=M.slice(0,-1*Se)),k.push(this.productions_[ue[1]][0]),A.push(se.$),M.push(se._$),xe=N[k[k.length-2]][k[k.length-1]],k.push(xe);break;case 3:return!0}}return!0},"parse")},x=(function(){var T={EOF:1,parseError:s(function(C,k){if(this.yy.parser)this.yy.parser.parseError(C,k);else throw new Error(C)},"parseError"),setInput:s(function(w,C){return this.yy=C||this.yy||{},this._input=w,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 w=this._input[0];this.yytext+=w,this.yyleng++,this.offset++,this.match+=w,this.matched+=w;var C=w.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),w},"input"),unput:s(function(w){var C=w.length,k=w.split(/(?:\r\n?|\n)/g);this._input=w+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-C),this.offset-=C;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),k.length-1&&(this.yylineno-=k.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:k?(k.length===S.length?this.yylloc.first_column:0)+S[S.length-k.length].length-k[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: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(w){this.unput(this.match.slice(w))},"less"),pastInput:s(function(){var w=this.matched.substr(0,this.matched.length-this.match.length);return(w.length>20?"...":"")+w.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:s(function(){var w=this.match;return w.length<20&&(w+=this._input.substr(0,20-w.length)),(w.substr(0,20)+(w.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:s(function(){var w=this.pastInput(),C=new Array(w.length+1).join("-");return w+this.upcomingInput()+` +`+C+"^"},"showPosition"),test_match:s(function(w,C){var k,S,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))),S=w[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+w[0].length},this.yytext+=w[0],this.match+=w[0],this.matches=w,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(w[0].length),this.matched+=w[0],k=this.performAction.call(this,this.yy,this,C,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),k)return k;if(this._backtrack){for(var M in A)this[M]=A[M];return!1}return!1},"test_match"),next:s(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var w,C,k,S;this._more||(this.yytext="",this.match="");for(var A=this._currentRules(),M=0;MC[0].length)){if(C=k,S=M,this.options.backtrack_lexer){if(w=this.test_match(k,A[M]),w!==!1)return w;if(this._backtrack){C=!1;continue}else return!1}else if(!this.options.flex)break}return C?(w=this.test_match(C,A[S]),w!==!1?w:!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 C=this.next();return C||this.lex()},"lex"),begin:s(function(C){this.conditionStack.push(C)},"begin"),popState:s(function(){var C=this.conditionStack.length-1;return C>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(C){return C=this.conditionStack.length-1-Math.abs(C||0),C>=0?this.conditionStack[C]:"INITIAL"},"topState"),pushState:s(function(C){this.begin(C)},"pushState"),stateStackSize:s(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:s(function(C,k,S,A){var M=A;switch(S){case 0:return C.getLogger().debug("Found block-beta"),10;break;case 1:return C.getLogger().debug("Found id-block"),29;break;case 2:return C.getLogger().debug("Found block"),10;break;case 3:C.getLogger().debug(".",k.yytext);break;case 4:C.getLogger().debug("_",k.yytext);break;case 5:return 5;case 6:return k.yytext=-1,28;break;case 7:return k.yytext=k.yytext.replace(/columns\s+/,""),C.getLogger().debug("COLUMNS (LEX)",k.yytext),28;break;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:C.getLogger().debug("LEX: POPPING STR:",k.yytext),this.popState();break;case 13:return C.getLogger().debug("LEX: STR end:",k.yytext),"STR";break;case 14:return k.yytext=k.yytext.replace(/space\:/,""),C.getLogger().debug("SPACE NUM (LEX)",k.yytext),21;break;case 15:return k.yytext="1",C.getLogger().debug("COLUMNS (LEX)",k.yytext),21;break;case 16:return 42;case 17:return"LINKSTYLE";case 18:return"INTERPOLATE";case 19:return this.pushState("CLASSDEF"),39;break;case 20:return this.popState(),this.pushState("CLASSDEFID"),"DEFAULT_CLASSDEF_ID";break;case 21:return this.popState(),this.pushState("CLASSDEFID"),40;break;case 22:return this.popState(),41;break;case 23:return this.pushState("CLASS"),43;break;case 24:return this.popState(),this.pushState("CLASS_STYLE"),44;break;case 25:return this.popState(),45;break;case 26:return this.pushState("STYLE_STMNT"),46;break;case 27:return this.popState(),this.pushState("STYLE_DEFINITION"),47;break;case 28:return this.popState(),48;break;case 29:return this.pushState("acc_title"),"acc_title";break;case 30:return this.popState(),"acc_title_value";break;case 31:return this.pushState("acc_descr"),"acc_descr";break;case 32:return this.popState(),"acc_descr_value";break;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(),C.getLogger().debug("Lex: (("),"NODE_DEND";break;case 38:return this.popState(),C.getLogger().debug("Lex: (("),"NODE_DEND";break;case 39:return this.popState(),C.getLogger().debug("Lex: ))"),"NODE_DEND";break;case 40:return this.popState(),C.getLogger().debug("Lex: (("),"NODE_DEND";break;case 41:return this.popState(),C.getLogger().debug("Lex: (("),"NODE_DEND";break;case 42:return this.popState(),C.getLogger().debug("Lex: (-"),"NODE_DEND";break;case 43:return this.popState(),C.getLogger().debug("Lex: -)"),"NODE_DEND";break;case 44:return this.popState(),C.getLogger().debug("Lex: (("),"NODE_DEND";break;case 45:return this.popState(),C.getLogger().debug("Lex: ]]"),"NODE_DEND";break;case 46:return this.popState(),C.getLogger().debug("Lex: ("),"NODE_DEND";break;case 47:return this.popState(),C.getLogger().debug("Lex: ])"),"NODE_DEND";break;case 48:return this.popState(),C.getLogger().debug("Lex: /]"),"NODE_DEND";break;case 49:return this.popState(),C.getLogger().debug("Lex: /]"),"NODE_DEND";break;case 50:return this.popState(),C.getLogger().debug("Lex: )]"),"NODE_DEND";break;case 51:return this.popState(),C.getLogger().debug("Lex: )"),"NODE_DEND";break;case 52:return this.popState(),C.getLogger().debug("Lex: ]>"),"NODE_DEND";break;case 53:return this.popState(),C.getLogger().debug("Lex: ]"),"NODE_DEND";break;case 54:return C.getLogger().debug("Lexa: -)"),this.pushState("NODE"),35;break;case 55:return C.getLogger().debug("Lexa: (-"),this.pushState("NODE"),35;break;case 56:return C.getLogger().debug("Lexa: ))"),this.pushState("NODE"),35;break;case 57:return C.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;break;case 58:return C.getLogger().debug("Lex: ((("),this.pushState("NODE"),35;break;case 59:return C.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;break;case 60:return C.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;break;case 61:return C.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;break;case 62:return C.getLogger().debug("Lexc: >"),this.pushState("NODE"),35;break;case 63:return C.getLogger().debug("Lexa: (["),this.pushState("NODE"),35;break;case 64:return C.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;break;case 65:return this.pushState("NODE"),35;break;case 66:return this.pushState("NODE"),35;break;case 67:return this.pushState("NODE"),35;break;case 68:return this.pushState("NODE"),35;break;case 69:return this.pushState("NODE"),35;break;case 70:return this.pushState("NODE"),35;break;case 71:return this.pushState("NODE"),35;break;case 72:return C.getLogger().debug("Lexa: ["),this.pushState("NODE"),35;break;case 73:return this.pushState("BLOCK_ARROW"),C.getLogger().debug("LEX ARR START"),37;break;case 74:return C.getLogger().debug("Lex: NODE_ID",k.yytext),31;break;case 75:return C.getLogger().debug("Lex: EOF",k.yytext),8;break;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:C.getLogger().debug("Lex: Starting string"),this.pushState("string");break;case 81:C.getLogger().debug("LEX ARR: Starting string"),this.pushState("string");break;case 82:return C.getLogger().debug("LEX: NODE_DESCR:",k.yytext),"NODE_DESCR";break;case 83:C.getLogger().debug("LEX POPPING"),this.popState();break;case 84:C.getLogger().debug("Lex: =>BAE"),this.pushState("ARROW_DIR");break;case 85:return k.yytext=k.yytext.replace(/^,\s*/,""),C.getLogger().debug("Lex (right): dir:",k.yytext),"DIR";break;case 86:return k.yytext=k.yytext.replace(/^,\s*/,""),C.getLogger().debug("Lex (left):",k.yytext),"DIR";break;case 87:return k.yytext=k.yytext.replace(/^,\s*/,""),C.getLogger().debug("Lex (x):",k.yytext),"DIR";break;case 88:return k.yytext=k.yytext.replace(/^,\s*/,""),C.getLogger().debug("Lex (y):",k.yytext),"DIR";break;case 89:return k.yytext=k.yytext.replace(/^,\s*/,""),C.getLogger().debug("Lex (up):",k.yytext),"DIR";break;case 90:return k.yytext=k.yytext.replace(/^,\s*/,""),C.getLogger().debug("Lex (down):",k.yytext),"DIR";break;case 91:return k.yytext="]>",C.getLogger().debug("Lex (ARROW_DIR end):",k.yytext),this.popState(),this.popState(),"BLOCK_ARROW_END";break;case 92:return C.getLogger().debug("Lex: LINK","#"+k.yytext+"#"),15;break;case 93:return C.getLogger().debug("Lex: LINK",k.yytext),15;break;case 94:return C.getLogger().debug("Lex: LINK",k.yytext),15;break;case 95:return C.getLogger().debug("Lex: LINK",k.yytext),15;break;case 96:return C.getLogger().debug("Lex: START_LINK",k.yytext),this.pushState("LLABEL"),16;break;case 97:return C.getLogger().debug("Lex: START_LINK",k.yytext),this.pushState("LLABEL"),16;break;case 98:return C.getLogger().debug("Lex: START_LINK",k.yytext),this.pushState("LLABEL"),16;break;case 99:this.pushState("md_string");break;case 100:return C.getLogger().debug("Lex: Starting string"),this.pushState("string"),"LINK_LABEL";break;case 101:return this.popState(),C.getLogger().debug("Lex: LINK","#"+k.yytext+"#"),15;break;case 102:return this.popState(),C.getLogger().debug("Lex: LINK",k.yytext),15;break;case 103:return this.popState(),C.getLogger().debug("Lex: LINK",k.yytext),15;break;case 104:return C.getLogger().debug("Lex: COLON",k.yytext),k.yytext=k.yytext.slice(1),27;break}},"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 T})();v.lexer=x;function b(){this.yy={}}return s(b,"Parser"),b.prototype=v,v.Parser=b,new b})();RU.parser=RU;XDe=RU});function skt(e){switch(te.debug("typeStr2Type",e),e){case"[]":return"square";case"()":return te.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"}}function okt(e){switch(te.debug("typeStr2Type",e),e){case"==":return"thick";default:return"normal"}}function lkt(e){switch(e.trim().slice(-1)){case"x":return"arrow_cross";case"o":return"arrow_circle";case">":return"arrow_point";default:return""}}function ckt(e){switch(e.trim().charAt(0)){case"x":return"arrow_cross";case"o":return"arrow_circle";case"<":return"arrow_point";default:return"arrow_open"}}function ukt(e){return e.includes("==")?"thick":"normal"}function hkt(e){return e.includes(".-")?"dotted":"solid"}var Zl,LU,_U,ZDe,QDe,ekt,e7e,k_,DU,tkt,rkt,nkt,ikt,t7e,IU,YC,akt,JDe,dkt,fkt,pkt,mkt,gkt,ykt,vkt,xkt,bkt,Tkt,Ckt,kkt,wkt,r7e,n7e=F(()=>{"use strict";nE();mr();Zt();Tt();Gr();An();Zl=new Map,LU=[],_U=new Map,ZDe="color",QDe="fill",ekt="bgFill",e7e=",",k_=new Map,DU="",tkt=s(e=>xt.sanitizeText(e,Le()),"sanitizeText"),rkt=s(function(e,t=""){let r=k_.get(e);r||(r={id:e,styles:[],textStyles:[]},k_.set(e,r)),t?.split(e7e).forEach(n=>{let i=n.replace(/([^;]*);/,"$1").trim();if(RegExp(ZDe).exec(n)){let o=i.replace(QDe,ekt).replace(ZDe,QDe);r.textStyles.push(o)}r.styles.push(i)})},"addStyleClass"),nkt=s(function(e,t=""){let r=Zl.get(e);t!=null&&(r.styles=t.split(e7e))},"addStyle2Node"),ikt=s(function(e,t){e.split(",").forEach(function(r){let n=Zl.get(r);if(n===void 0){let i=r.trim();n={id:i,type:"na",children:[]},Zl.set(i,n)}n.classes||(n.classes=[]),n.classes.push(t)})},"setCssClass"),t7e=s((e,t)=>{let r=e.flat(),n=[],a=r.find(o=>o?.type==="column-setting")?.columns??-1;for(let o of r){if(typeof a=="number"&&a>0&&o.type!=="column-setting"&&typeof o.widthInColumns=="number"&&o.widthInColumns>a&&te.warn(`Block ${o.id} width ${o.widthInColumns} exceeds configured column width ${a}`),o.label&&(o.label=tkt(o.label)),o.type==="classDef"){rkt(o.id,o.css);continue}if(o.type==="applyClass"){ikt(o.id,o?.styleClass??"");continue}if(o.type==="applyStyles"){o?.stylesStr&&nkt(o.id,o?.stylesStr);continue}if(o.type==="column-setting")t.columns=o.columns??-1;else if(o.type==="edge"){let l=(_U.get(o.id)??0)+1;_U.set(o.id,l),o.id=l+"-"+o.id,LU.push(o)}else{o.label||(o.type==="composite"?o.label="":o.label=o.id);let l=Zl.get(o.id);if(l===void 0?Zl.set(o.id,o):(o.type!=="na"&&(l.type=o.type),o.label!==o.id&&(l.label=o.label)),o.children&&t7e(o.children,o),o.type==="space"){let u=o.width??1;for(let h=0;h{te.debug("Clear called"),gr(),YC={id:"root",type:"composite",children:[],columns:-1},Zl=new Map([["root",YC]]),IU=[],k_=new Map,LU=[],_U=new Map,DU=""},"clear");s(skt,"typeStr2Type");s(okt,"edgeTypeStr2Type");s(lkt,"edgeStrToEdgeData");s(ckt,"edgeStrToEdgeStartData");s(ukt,"edgeStrToThickness");s(hkt,"edgeStrToPattern");JDe=0,dkt=s(()=>(JDe++,"id-"+Math.random().toString(36).substr(2,12)+"-"+JDe),"generateId"),fkt=s(e=>{YC.children=e,t7e(e,YC),IU=YC.children},"setHierarchy"),pkt=s(e=>{let t=Zl.get(e);return t?t.columns?t.columns:t.children?t.children.length:-1:-1},"getColumns"),mkt=s(()=>[...Zl.values()],"getBlocksFlat"),gkt=s(()=>IU||[],"getBlocks"),ykt=s(()=>LU,"getEdges"),vkt=s(e=>Zl.get(e),"getBlock"),xkt=s(e=>{Zl.set(e.id,e)},"setBlock"),bkt=s(e=>{DU=e},"setDiagramId"),Tkt=s(()=>DU,"getDiagramId"),Ckt=s(()=>te,"getLogger"),kkt=s(function(){return k_},"getClasses"),wkt={getConfig:s(()=>Lt().block,"getConfig"),typeStr2Type:skt,edgeTypeStr2Type:okt,edgeStrToEdgeData:lkt,edgeStrToEdgeStartData:ckt,edgeStrToThickness:ukt,edgeStrToPattern:hkt,getLogger:Ckt,getBlocksFlat:mkt,getBlocks:gkt,getEdges:ykt,setHierarchy:fkt,getBlock:vkt,setBlock:xkt,getColumns:pkt,getClasses:kkt,clear:akt,generateId:dkt,setDiagramId:bkt,getDiagramId:Tkt},r7e=wkt});var MU,Skt,i7e,a7e=F(()=>{"use strict";Di();s1();MU=s((e,t)=>{let r=rp,n=r(e,"r"),i=r(e,"g"),a=r(e,"b");return Ai(n,i,a,t)},"fade"),Skt=s(e=>`.label { + font-family: ${e.fontFamily}; + color: ${e.nodeTextColor||e.textColor}; + } + .cluster-label text { + fill: ${e.titleColor}; + } + .cluster-label span { + color: ${e.titleColor}; + } + + + + .label text,span { + 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}; + /* + * This is for backward compatibility with existing code that didn't + * add a \`

    \` around edge labels. + * + * TODO: We should probably remove this in a future release. + */ + p { + margin: 0; + padding: 0; + display: inline; + } + rect { + opacity: 0.5; + background-color: ${e.edgeLabelBackground}; + fill: ${e.edgeLabelBackground}; + } + text-align: center; + } + + /* For html labels only */ + .labelBkg { + background-color: ${e.edgeLabelBackground}; + } + + .node .cluster { + // fill: ${MU(e.mainBkg,.5)}; + fill: ${MU(e.clusterBkg,.5)}; + stroke: ${MU(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 { + 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}; + } + ${jc()} +`,"getStyles"),i7e=Skt});function s7e(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};let r=t%e,n=Math.floor(t/e);return{px:r,py:n}}function NU(e,t,r=0,n=0,i=8){te.debug("setBlockSizes abc95 (start)",e.id,e?.size?.x,"block width =",e?.size,"siblingWidth",r),e?.size?.width||(e.size={width:r,height:n,x:0,y:0});let a=0,o=0;if(e.children?.length>0){for(let g of e.children)NU(g,t,0,0,i);let l=Ekt(e);a=l.width,o=l.height,te.debug("setBlockSizes abc95 maxWidth of",e.id,":s children is ",a,o);for(let g of e.children)g.size&&(te.debug(`abc95 Setting size of children of ${e.id} id=${g.id} ${a} ${o} ${JSON.stringify(g.size)}`),g.size.width=a*(g.widthInColumns??1)+i*((g.widthInColumns??1)-1),g.size.height=o,g.size.x=0,g.size.y=0,te.debug(`abc95 updating size of ${e.id} children child:${g.id} maxWidth:${a} maxHeight:${o}`));for(let g of e.children)NU(g,t,a,o,i);let u=e.columns??-1,h=0;for(let g of e.children)h+=g.widthInColumns??1;let d=e.children.length;u>0&&u0?Math.min(e.children.length,u):e.children.length;if(g>0){let y=(p-g*i-i)/g;te.debug("abc95 (growing to fit) width",e.id,p,e.size?.width,y);for(let v of e.children)v.size&&(v.size.width=y)}}e.size={width:p,height:m,x:0,y:0}}te.debug("setBlockSizes abc94 (done)",e.id,e?.size?.x,e?.size?.width,e?.size?.y,e?.size?.height)}function o7e(e,t,r=8){te.debug(`abc85 layout blocks (=>layoutBlocks) ${e.id} x: ${e?.size?.x} y: ${e?.size?.y} width: ${e?.size?.width}`);let n=e.columns??-1;if(te.debug("layoutBlocks columns abc95",e.id,"=>",n,e),e.children&&e.children.length>0){let i=e?.children[0]?.size?.width??0,a=e.children.length*i+(e.children.length-1)*r;te.debug("widthOfChildren 88",a,"posX");let o=new Map;{let f=0;for(let p of e.children){if(!p.size)continue;let{py:m}=s7e(n,f),g=o.get(m)??0;p.size.height>g&&o.set(m,p.size.height);let y=p?.widthInColumns??1;n>0&&(y=Math.min(y,n-f%n)),f+=y}}let l=new Map;{let f=0,p=[...o.keys()].sort((m,g)=>m-g);for(let m of p)l.set(m,f),f+=(o.get(m)??0)+r}let u=0;te.debug("abc91 block?.size?.x",e.id,e?.size?.x);let h=e?.size?.x?e?.size?.x+(-e?.size?.width/2||0):-r,d=0;for(let f of e.children){let p=e;if(!f.size)continue;let{width:m,height:g}=f.size,{px:y,py:v}=s7e(n,u);if(v!=d&&(d=v,h=e?.size?.x?e?.size?.x+(-e?.size?.width/2||0):-r,te.debug("New row in layout for block",e.id," and child ",f.id,d)),te.debug(`abc89 layout blocks (child) id: ${f.id} Pos: ${u} (px, py) ${y},${v} (${p?.size?.x},${p?.size?.y}) parent: ${p.id} width: ${m}${r}`),p.size){let b=m/2;f.size.x=h+r+b,te.debug(`abc91 layout blocks (calc) px, pyid:${f.id} startingPos=X${h} new startingPosX${f.size.x} ${b} padding=${r} width=${m} halfWidth=${b} => x:${f.size.x} y:${f.size.y} ${f.widthInColumns} (width * (child?.w || 1)) / 2 ${m*(f?.widthInColumns??1)/2}`),h=f.size.x+b;let T=l.get(v)??0,w=o.get(v)??g;f.size.y=p.size.y-p.size.height/2+T+w/2+r,te.debug(`abc88 layout blocks (calc) px, pyid:${f.id}startingPosX${h}${r}${b}=>x:${f.size.x}y:${f.size.y}${f.widthInColumns}(width * (child?.w || 1)) / 2${m*(f?.widthInColumns??1)/2}`)}f.children&&o7e(f,t,r);let x=f?.widthInColumns??1;n>0&&(x=Math.min(x,n-u%n)),u+=x,te.debug("abc88 columnsPos",f,u)}}te.debug(`layout blocks (<==layoutBlocks) ${e.id} x: ${e?.size?.x} y: ${e?.size?.y} width: ${e?.size?.width}`)}function l7e(e,{minX:t,minY:r,maxX:n,maxY:i}={minX:0,minY:0,maxX:0,maxY:0}){if(e.size&&e.id!=="root"){let{x:a,y:o,width:l,height:u}=e.size;a-l/2n&&(n=a+l/2),o+u/2>i&&(i=o+u/2)}if(e.children)for(let a of e.children)({minX:t,minY:r,maxX:n,maxY:i}=l7e(a,{minX:t,minY:r,maxX:n,maxY:i}));return{minX:t,minY:r,maxX:n,maxY:i}}function c7e(e){let t=e.getBlock("root");if(!t)return;let r=Le()?.block?.padding??8;NU(t,e,0,0,r),o7e(t,e,r),te.debug("getBlocks",JSON.stringify(t,null,2));let{minX:n,minY:i,maxX:a,maxY:o}=l7e(t),l=o-i,u=a-n;return{x:n,y:i,width:u,height:l}}var Ekt,u7e=F(()=>{"use strict";Tt();Zt();s(s7e,"calculateBlockPosition");Ekt=s(e=>{let t=0,r=0;for(let n of e.children){let{width:i,height:a,x:o,y:l}=n.size??{width:0,height:0,x:0,y:0};if(te.debug("getMaxChildSize abc95 child:",n.id,"width:",i,"height:",a,"x:",o,"y:",l,n.type),n.type==="space")continue;let u=i/(n.widthInColumns??1);u>t&&(t=u),a>r&&(r=a)}return{width:t,height:r}},"getMaxChildSize");s(NU,"setBlockSizes");s(o7e,"layoutBlocks");s(l7e,"findBounds");s(c7e,"layout")});function h7e(e,t,r=!1){let n=e,i="default";(n?.classes?.length||0)>0&&(i=(n?.classes??[]).join(" ")),i=i+" flowchart-label";let a=(n?.classes??[]).flatMap(g=>t.getClasses().get(g)?.styles??[]),o=0,l="rect",u;switch(n.type){case"round":o=5,l="rect";break;case"composite":o=0,l="composite",u=0;break;case"square":l="rect";break;case"diamond":l="question";break;case"hexagon":l="hexagon";break;case"block_arrow":l="block_arrow";break;case"odd":l="rect_left_inv_arrow";break;case"lean_right":l="lean_right";break;case"lean_left":l="lean_left";break;case"trapezoid":l="trapezoid";break;case"inv_trapezoid":l="inv_trapezoid";break;case"rect_left_inv_arrow":l="rect_left_inv_arrow";break;case"circle":l="circle";break;case"ellipse":l="ellipse";break;case"stadium":l="stadium";break;case"subroutine":l="subroutine";break;case"cylinder":l="cylinder";break;case"group":l="rect";break;case"doublecircle":l="doublecircle";break;default:l="rect"}let h=BM(n?.styles??[]),d=n.label,f=n.size??{width:0,height:0,x:0,y:0},p=t.getDiagramId();return{labelStyle:h.labelStyle,shape:l,label:d,labelText:d,rx:o,ry:o,class:i,cssClasses:i,cssStyles:n?.styles??[],cssCompiledStyles:a,style:h.style,id:n.id,domId:p?`${p}-${n.id}`:n.id,isGroup:!1,directions:n.directions,width:f.width||void 0,height:f.height||void 0,x:f.x,y:f.y,positioned:r,intersect:void 0,padding:u??Lt()?.block?.padding??0,widthInColumns:n.widthInColumns??1}}async function Akt(e,t,r){let n=h7e(t,r,!1);if(t.type==="group")return;let i=Lt(),a=await Hu(e,n,{config:i}),o=a.node()?.getBBox()??{width:0,height:0},l=r.getBlock(n.id);l.size={width:o.width,height:o.height,x:0,y:0,node:a},r.setBlock(l),a.remove()}async function Rkt(e,t,r){let n=h7e(t,r,!0);if(r.getBlock(n.id).type!=="space"){let a=Lt();await Hu(e,n,{config:a}),t.intersect=n?.intersect,Sc(n)}}async function PU(e,t,r,n){for(let i of t)await n(e,i,r),i.children&&await PU(e,i.children,r,n)}async function d7e(e,t,r){await PU(e,t,r,Akt)}async function f7e(e,t,r){await PU(e,t,r,Rkt)}async function p7e(e,t,r,n,i){let a=new un({multigraph:!0,compound:!0});a.setGraph({rankdir:"TB",nodesep:10,ranksep:10,marginx:8,marginy:8});for(let o of r)o.size&&a.setNode(o.id,{width:o.size.width,height:o.size.height,intersect:o.intersect});for(let o of t)if(o.start&&o.end){let l=n.getBlock(o.start),u=n.getBlock(o.end);if(l?.size&&u?.size){let h=l.size,d=u.size,f=[{x:h.x,y:h.y},{x:h.x+(d.x-h.x)/2,y:h.y+(d.y-h.y)/2},{x:d.x,y:d.y}],p=i?`${i}-${o.id}`:o.id,m=o.thickness==="thick"?"edge-thickness-thick":"edge-thickness-normal",g=o.pattern==="dotted"?"edge-pattern-dotted":"edge-pattern-solid",y=`${m} ${g} flowchart-link LS-a1 LE-b1`;kd(e,{...o,id:p,arrowTypeEnd:o.arrowTypeEnd,arrowTypeStart:o.arrowTypeStart,points:f,classes:y},{},"block",a.node(o.start),a.node(o.end),i),o.label&&(await Il(e,{...o,label:o.label,labelStyle:"stroke: #333; stroke-width: 1.5px;fill:none;",arrowTypeEnd:o.arrowTypeEnd,arrowTypeStart:o.arrowTypeStart,points:f,classes:y}),Q0({...o,x:f[1].x,y:f[1].y},{originalPath:f}))}}}var m7e=F(()=>{"use strict";wo();mr();J0();Yp();Qt();s(h7e,"getNodeFromBlock");s(Akt,"calculateBlockSize");s(Rkt,"insertBlockPositioned");s(PU,"performOperations");s(d7e,"calculateBlockSizes");s(f7e,"insertBlocks");s(p7e,"insertEdges")});var _kt,Lkt,g7e,y7e=F(()=>{"use strict";$r();mr();Tt();VE();Dn();u7e();m7e();_kt=s(function(e,t){return t.db.getClasses()},"getClasses"),Lkt=s(async function(e,t,r,n){let{securityLevel:i,block:a}=Lt(),o=n.db;o.setDiagramId(t);let l;i==="sandbox"&&(l=lt("#i"+t));let u=i==="sandbox"?lt(l.nodes()[0].contentDocument.body):lt("body"),h=i==="sandbox"?u.select(`[id="${t}"]`):lt(`[id="${t}"]`);ey(h,["point","circle","cross"],n.type,t);let f=o.getBlocks(),p=o.getBlocksFlat(),m=o.getEdges(),g=h.insert("g").attr("class","block");await d7e(g,f,o);let y=c7e(o);await f7e(g,f,o),await p7e(g,m,p,o,t);let v=g.node()?.getBBox(),x=v&&Number.isFinite(v.width)&&Number.isFinite(v.height)?v:y;if(x){let b=Math.max(1,Math.round(.125*(x.width/x.height))),T=x.height+b+10,w=x.width+10,{useMaxWidth:C}=a;Br(h,T,w,!!C),te.debug("Here Bounds",y,x),h.attr("viewBox",`${x.x-5} ${x.y-5} ${x.width+10} ${x.height+10}`)}},"draw"),g7e={draw:Lkt,getClasses:_kt}});var v7e={};ar(v7e,{diagram:()=>Dkt});var Dkt,x7e=F(()=>{"use strict";KDe();n7e();a7e();y7e();Dkt={parser:XDe,db:r7e,renderer:g7e,styles:i7e}});function Bkt(e){return e.some(t=>S7e.test(t))}function $kt(e){for(let t of e){let r=E7e.exec(t);if(r?.index&&r.index>0)return r.index}return 4}function A7e(e,t){return e.replace(/\bline\s+(\d+)\b/gi,(r,n)=>{let i=parseInt(n,10),a=t.get(i);return a?`line ${a}`:r})}function R7e(e){let t=e.split(` +`),r=new Map,n=-1;for(let[u,h]of t.entries())if(h.trim()==="treeView-beta"){n=u;break}if(n===-1)return{text:e,lineMap:r};let i=[];for(let u=n+1;u{"use strict";S7e=/[─━│┃└┗├┣]/,E7e=/[└┗├┣]/,Pkt=/[─━]/,C7e=/^[\s│┃]+$/,k7e=/^\s*(title[\t ]|accTitle[\t ]*:|accDescr[\t ]*[:{])/,w7e=/^\s*%%/,Okt=" ";s(Bkt,"isBoxDrawingFormat");s($kt,"inferSegmentWidth");s(A7e,"remapErrorLines");s(R7e,"preprocessBoxDrawing")});var hu,Fkt,Gkt,zkt,Vkt,Wkt,qkt,Hkt,jC,OU=F(()=>{"use strict";mr();Ni();Qt();S6();An();hu=new Ff(()=>({cnt:1,stack:[{id:0,level:-1,name:"/",nodeType:"directory",children:[]}]})),Fkt=s(()=>{hu.reset(),gr()},"clear"),Gkt=s(()=>hu.records.stack[0],"getRoot"),zkt=s(()=>hu.records.cnt,"getCount"),Vkt=hr.treeView,Wkt=s(()=>Fr(Vkt,Lt().treeView),"getConfig"),qkt=s((e,t,r,n,i,a)=>{for(;e<=hu.records.stack[hu.records.stack.length-1].level;)hu.records.stack.pop();let o={id:hu.records.cnt++,level:e,name:t,nodeType:r,icon:i,cssClass:n,description:a,children:[]};hu.records.stack[hu.records.stack.length-1].children.push(o),hu.records.stack.push(o)},"addNode"),Hkt={clear:Fkt,addNode:qkt,getRoot:Gkt,getCount:zkt,getConfig:Wkt,getAccTitle:Sr,getAccDescription:Ar,getDiagramTitle:Rr,setAccDescription:Er,setAccTitle:Cr,setDiagramTitle:Mr},jC=Hkt});var Ukt,L7e,D7e=F(()=>{"use strict";Oa();mr();Tt();Gr();_s();_7e();OU();Ukt=s(e=>{Nn(e,jC);for(let t of e.nodes){let r=typeof t.indent=="number"?t.indent:0,n=t.name,i=n.endsWith("/");i&&(n=n.slice(0,-1));let a=i?"directory":"file",o=t.classAnnotation||void 0,l=t.iconAnnotation,u=l!==void 0?l||"none":void 0,h=t.descAnnotation||void 0,d=h?vr(h,Lt()):void 0;jC.addNode(r,n,a,o,u,d)}},"populate"),L7e={parse:s(async e=>{let{text:t,lineMap:r}=R7e(e);try{let n=await pi("treeView",t);te.debug(n),Ukt(n)}catch(n){throw r.size>0&&n instanceof Error&&(n.message=A7e(n.message,r)),n}},"parse")}});function Ykt(e,t){let r=t?.filenameIcons?.[e];if(r)return r;let n=e.lastIndexOf(".");if(n>0){let i=e.substring(n).toLowerCase(),a=t?.extensionIcons;return a?.[i]??a?.[i.slice(1)]}}function I7e(e,t){return e.includes(":")?e:e in wv.icons||!t?`${wv.prefix}:${e}`:`${t}:${e}`}function BU(e,t){if(e.icon!=="none"){if(e.icon)return I7e(e.icon,t.defaultIconPack);if(t.showIcons){if(e.nodeType==="file"){let r=Ykt(e.name,t);if(r==="none")return;if(r)return I7e(r,t.defaultIconPack)}return`${wv.prefix}:${e.nodeType==="directory"?"folder":"file"}`}}}var wv,M7e=F(()=>{"use strict";wv={prefix:"mermaid-treeview",height:24,width:24,icons:{folder:{body:''},file:{body:''}}};s(Ykt,"detectIcon");s(I7e,"qualifyIcon");s(BU,"getNodeIcon")});var $U,jkt,Xkt,Kkt,Zkt,N7e,Qkt,Jkt,ewt,P7e,O7e=F(()=>{"use strict";Tt();ml();Ba();Dn();M7e();c0([{name:wv.prefix,icons:wv}]);$U=14,jkt=4,Xkt=16,Kkt=s(async(e,t)=>{let r=[],n=s(a=>{let o=BU(a,t);o&&r.push({icon:o,node:a}),a.children.forEach(n)},"collect");n(e);let i=await Promise.all(r.map(async({icon:a,node:o})=>({id:o.id,svg:await Va(a,{height:$U,width:$U})})));return new Map(i.map(({id:a,svg:o})=>[a,o]))},"resolveNodeIcons"),Zkt=s((e,t,r,n,i,a)=>{let o=n.append("g"),l="treeView-node-label";r.nodeType==="directory"&&(l+=" treeView-node-dir"),r.cssClass&&(l+=` ${r.cssClass}`);let u=$U+jkt,h=BU(r,i),d=h!==void 0;h&&o.append("g").attr("class","treeView-node-icon").attr("transform",`translate(${e+i.paddingX}, ${t+i.paddingY})`).html(a.get(r.id)??"");let f=o.append("text").text(r.name).attr("dominant-baseline","middle").attr("class",l),{height:p,width:m}=f.node().getBBox(),g=p+i.paddingY*2,y=e+i.paddingX+(d?u:0);f.attr("x",y),f.attr("y",t+g/2);let v=y+m,x=m+i.paddingX*2+(d?u:0);return r.BBox={x:e,y:t,width:x,height:g},r.cssClass?.split(/\s+/).includes("highlight")&&o.insert("rect",":first-child").attr("x",e).attr("y",t+1).attr("width",0).attr("height",g-2).attr("rx",3).attr("class","treeView-highlight-bg"),{node:r,nodeGroup:o,labelRightEdge:v,centerY:t+g/2}},"positionLabel"),N7e=s((e,t,r,n,i,a)=>e.append("line").attr("x1",t).attr("y1",r).attr("x2",n).attr("y2",i).attr("stroke-width",a).attr("class","treeView-node-line"),"positionLine"),Qkt=s((e,t,r,n)=>{let i=0,a=0,o=[],l=s((d,f,p,m)=>{let g=m*(p.rowIndent+p.paddingX),y=Zkt(g,i,f,d,p,n);o.push(y);let{height:v,width:x}=f.BBox;N7e(d,g-p.rowIndent,i+v/2,g,i+v/2,p.lineThickness),a=Math.max(a,g+x),i+=v},"drawNode"),u=s((d,f=0)=>{l(e,d,r,f),d.children.forEach(y=>{u(y,f+1)});let{x:p,y:m,height:g}=d.BBox;if(d.children.length){let{y,height:v}=d.children[d.children.length-1].BBox;N7e(e,p+r.paddingX,m+g,p+r.paddingX,y+v/2+r.lineThickness/2,r.lineThickness)}},"processNode");u(t);let h=o.filter(d=>d.node.description);if(h.length>0){let f=Math.max(...o.map(p=>p.labelRightEdge))+Xkt;for(let p of h){let g=p.nodeGroup.append("text").text(p.node.description).attr("dominant-baseline","middle").attr("class","treeView-node-description").attr("x",f).attr("y",p.centerY).node().getBBox();a=Math.max(a,f+g.width+r.paddingX)}}for(let d of o)if(d.node.cssClass?.split(/\s+/).includes("highlight")){let f=d.nodeGroup.select(".treeView-highlight-bg");if(!f.empty()){let p=a-d.node.BBox.x+8;f.attr("width",p),a=Math.max(a,d.node.BBox.x+p+2)}}return{totalHeight:i,totalWidth:a}},"drawTree"),Jkt=s(async(e,t,r,n)=>{te.debug(`Rendering treeView diagram +`+e);let i=n.db,a=i.getRoot(),o=i.getConfig(),l=pn(t),u=l.append("g");u.attr("class","tree-view");let h=await Kkt(a,o),{totalHeight:d,totalWidth:f}=Qkt(u,a,o,h);l.attr("viewBox",`-${o.lineThickness/2} 0 ${f} ${d}`),Br(l,d,f,o.useMaxWidth)},"draw"),ewt={draw:Jkt},P7e=ewt});var twt,rwt,B7e,$7e=F(()=>{"use strict";Qt();twt={labelFontSize:"16px",labelColor:"black",lineColor:"black",iconColor:"#546e7a",descriptionColor:"#6a9955",highlightBg:"rgba(255, 193, 7, 0.15)",highlightStroke:"#ffc107"},rwt=s(({treeView:e})=>{let{labelFontSize:t,labelColor:r,lineColor:n,iconColor:i,descriptionColor:a,highlightBg:o,highlightStroke:l}=Fr(twt,e);return` + .treeView-node-label { + font-size: ${t}; + fill: ${r}; + white-space: pre; + } + .treeView-node-dir { + font-weight: bold; + } + .treeView-node-line { + stroke: ${n}; + } + .treeView-node-icon { + color: ${i}; + } + .treeView-node-description { + font-size: ${t}; + fill: ${a}; + font-style: italic; + white-space: pre; + } + .treeView-highlight-bg { + fill: ${o}; + stroke: ${l}; + stroke-width: 1; + } + `},"styles"),B7e=rwt});var F7e={};ar(F7e,{diagram:()=>nwt});var nwt,G7e=F(()=>{"use strict";D7e();OU();O7e();$7e();nwt={db:jC,renderer:P7e,parser:L7e,styles:B7e}});var FU,GU,XC,W7e,zU,ts,du,KC,q7e,owt,ZC,H7e,U7e,Y7e,j7e,X7e,w_,Xf,S_=F(()=>{"use strict";FU={L:"left",R:"right",T:"top",B:"bottom"},GU={L:s(e=>`${e},${e/2} 0,${e} 0,0`,"L"),R:s(e=>`0,${e/2} ${e},0 ${e},${e}`,"R"),T:s(e=>`0,0 ${e},0 ${e/2},${e}`,"T"),B:s(e=>`${e/2},0 ${e},${e} 0,${e}`,"B")},XC={L:s((e,t)=>e-t+2,"L"),R:s((e,t)=>e-2,"R"),T:s((e,t)=>e-t+2,"T"),B:s((e,t)=>e-2,"B")},W7e=s(function(e){return ts(e)?e==="L"?"R":"L":e==="T"?"B":"T"},"getOppositeArchitectureDirection"),zU=s(function(e){let t=e;return t==="L"||t==="R"||t==="T"||t==="B"},"isArchitectureDirection"),ts=s(function(e){let t=e;return t==="L"||t==="R"},"isArchitectureDirectionX"),du=s(function(e){let t=e;return t==="T"||t==="B"},"isArchitectureDirectionY"),KC=s(function(e,t){let r=ts(e)&&du(t),n=du(e)&&ts(t);return r||n},"isArchitectureDirectionXY"),q7e=s(function(e){let t=e[0],r=e[1],n=ts(t)&&du(r),i=du(t)&&ts(r);return n||i},"isArchitecturePairXY"),owt=s(function(e){return e!=="LL"&&e!=="RR"&&e!=="TT"&&e!=="BB"},"isValidArchitectureDirectionPair"),ZC=s(function(e,t){let r=`${e}${t}`;return owt(r)?r:void 0},"getArchitectureDirectionPair"),H7e=s(function([e,t],r){let n=r[0],i=r[1];return ts(n)?du(i)?[e+(n==="L"?-1:1),t+(i==="T"?1:-1)]:[e+(n==="L"?-1:1),t]:ts(i)?[e+(i==="L"?1:-1),t+(n==="T"?1:-1)]:[e,t+(n==="T"?1:-1)]},"shiftPositionByArchitectureDirectionPair"),U7e=s(function(e){return e==="LT"||e==="TL"?[1,1]:e==="BL"||e==="LB"?[1,-1]:e==="BR"||e==="RB"?[-1,-1]:[-1,1]},"getArchitectureDirectionXYFactors"),Y7e=s(function(e,t){return KC(e,t)?"bend":ts(e)?"horizontal":"vertical"},"getArchitectureDirectionAlignment"),j7e=s(function(e){return e.type==="service"},"isArchitectureService"),X7e=s(function(e){return e.type==="junction"},"isArchitectureJunction"),w_=s(e=>e.data(),"edgeData"),Xf=s(e=>e.data(),"nodeData")});var lwt,Sv,VU=F(()=>{"use strict";mr();Ni();Qt();An();S_();lwt=hr.architecture,Sv=class{constructor(){this.nodes={};this.groups={};this.edges=[];this.layoutHints=[];this.registeredIds={};this.elements={};this.diagramId="";this.setAccTitle=Cr;this.getAccTitle=Sr;this.setDiagramTitle=Mr;this.getDiagramTitle=Rr;this.getAccDescription=Ar;this.setAccDescription=Er;this.clear()}static{s(this,"ArchitectureDB")}setDiagramId(t){this.diagramId=t}getDiagramId(){return this.diagramId}clear(){this.nodes={},this.groups={},this.edges=[],this.layoutHints=[],this.registeredIds={},this.dataStructures=void 0,this.elements={},this.diagramId="",gr()}addService({id:t,icon:r,in:n,title:i,iconText:a}){if(this.registeredIds[t]!==void 0)throw new Error(`The service id [${t}] is already in use by another ${this.registeredIds[t]}`);if(n!==void 0){if(t===n)throw new Error(`The service [${t}] cannot be placed within itself`);if(this.registeredIds[n]===void 0)throw new Error(`The service [${t}]'s parent does not exist. Please make sure the parent is created before this service`);if(this.registeredIds[n]==="node")throw new Error(`The service [${t}]'s parent is not a group`)}this.registeredIds[t]="node",this.nodes[t]={id:t,type:"service",icon:r,iconText:a,title:i,edges:[],in:n}}getServices(){return Object.values(this.nodes).filter(j7e)}addJunction({id:t,in:r}){if(this.registeredIds[t]!==void 0)throw new Error(`The junction id [${t}] is already in use by another ${this.registeredIds[t]}`);if(r!==void 0){if(t===r)throw new Error(`The junction [${t}] cannot be placed within itself`);if(this.registeredIds[r]===void 0)throw new Error(`The junction [${t}]'s parent does not exist. Please make sure the parent is created before this junction`);if(this.registeredIds[r]==="node")throw new Error(`The junction [${t}]'s parent is not a group`)}this.registeredIds[t]="node",this.nodes[t]={id:t,type:"junction",edges:[],in:r}}getJunctions(){return Object.values(this.nodes).filter(X7e)}getNodes(){return Object.values(this.nodes)}getNode(t){return this.nodes[t]??null}addGroup({id:t,icon:r,in:n,title:i}){if(this.registeredIds?.[t]!==void 0)throw new Error(`The group id [${t}] is already in use by another ${this.registeredIds[t]}`);if(n!==void 0){if(t===n)throw new Error(`The group [${t}] cannot be placed within itself`);if(this.registeredIds?.[n]===void 0)throw new Error(`The group [${t}]'s parent does not exist. Please make sure the parent is created before this group`);if(this.registeredIds?.[n]==="node")throw new Error(`The group [${t}]'s parent is not a group`)}this.registeredIds[t]="group",this.groups[t]={id:t,icon:r,title:i,in:n}}getGroups(){return Object.values(this.groups)}addEdge({lhsId:t,rhsId:r,lhsDir:n,rhsDir:i,lhsInto:a,rhsInto:o,lhsGroup:l,rhsGroup:u,title:h}){if(!zU(n))throw new Error(`Invalid direction given for left hand side of edge ${t}--${r}. Expected (L,R,T,B) got ${String(n)}`);if(!zU(i))throw new Error(`Invalid direction given for right hand side of edge ${t}--${r}. Expected (L,R,T,B) got ${String(i)}`);if(this.nodes[t]===void 0&&this.groups[t]===void 0)throw new Error(`The left-hand id [${t}] does not yet exist. Please create the service/group before declaring an edge to it.`);if(this.nodes[r]===void 0&&this.groups[r]===void 0)throw new Error(`The right-hand id [${r}] does not yet exist. Please create the service/group before declaring an edge to it.`);let d=this.nodes[t].in,f=this.nodes[r].in;if(l&&d&&f&&d==f)throw new Error(`The left-hand id [${t}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);if(u&&d&&f&&d==f)throw new Error(`The right-hand id [${r}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);let p={lhsId:t,lhsDir:n,lhsInto:a,lhsGroup:l,rhsId:r,rhsDir:i,rhsInto:o,rhsGroup:u,title:h};this.edges.push(p),this.nodes[t]&&this.nodes[r]&&(this.nodes[t].edges.push(this.edges[this.edges.length-1]),this.nodes[r].edges.push(this.edges[this.edges.length-1]))}getEdges(){return this.edges}addLayoutHint(t){if(t.members.length<2)throw new Error(`An align directive requires at least two members; got ${t.members.length}`);let r=new Set;t.members.forEach(n=>{if(this.registeredIds[n]!=="node")throw new Error(`align ${t.direction} references [${n}], which is not a service or junction`);if(r.has(n))throw new Error(`align ${t.direction} lists [${n}] more than once`);r.add(n)}),this.layoutHints.push(t)}getLayoutHints(){return this.layoutHints}getDataStructures(){if(this.dataStructures===void 0){let t={},r=Object.entries(this.nodes).reduce((u,[h,d])=>(u[h]=d.edges.reduce((f,p)=>{let m=this.getNode(p.lhsId)?.in,g=this.getNode(p.rhsId)?.in;if(m&&g&&m!==g){let y=Y7e(p.lhsDir,p.rhsDir);y!=="bend"&&(t[m]??={},t[m][g]=y,t[g]??={},t[g][m]=y)}if(p.lhsId===h){let y=ZC(p.lhsDir,p.rhsDir);y&&(f[y]=p.rhsId)}else{let y=ZC(p.rhsDir,p.lhsDir);y&&(f[y]=p.lhsId)}return f},{}),u),{}),n=Object.keys(r)[0],i={[n]:1},a=Object.keys(r).reduce((u,h)=>h===n?u:{...u,[h]:1},{}),o=s(u=>{let h={[u]:[0,0]},d=[u];for(;d.length>0;){let f=d.shift();if(f){i[f]=1,delete a[f];let p=r[f],[m,g]=h[f];Object.entries(p).forEach(([y,v])=>{i[v]||(h[v]=H7e([m,g],y),d.push(v))})}}return h},"BFS"),l=[o(n)];for(;Object.keys(a).length>0;)l.push(o(Object.keys(a)[0]));this.dataStructures={adjList:r,spatialMaps:l,groupAlignments:t}}return this.dataStructures}setElementForId(t,r){this.elements[t]=r}getElementById(t){return this.elements[t]}getConfig(){return Fr({...lwt,...Lt().architecture})}getConfigField(t){return this.getConfig()[t]}}});var cwt,WU,K7e=F(()=>{"use strict";Oa();Tt();_s();VU();cwt=s((e,t)=>{Nn(e,t),e.groups.map(r=>t.addGroup(r)),e.services.map(r=>t.addService({...r,type:"service"})),e.junctions.map(r=>t.addJunction({...r,type:"junction"})),e.edges.map(r=>t.addEdge(r)),e.alignments?.map(r=>t.addLayoutHint({direction:r.direction,members:[...r.members]}))},"populateDb"),WU={parser:{yy:void 0},parse:s(async e=>{let t=await pi("architecture",e);te.debug(t);let r=WU.parser?.yy;if(!(r instanceof Sv))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.");cwt(t,r)},"parse")}});var uwt,Z7e,Q7e=F(()=>{"use strict";uwt=s(e=>` + .edge { + stroke-width: ${e.archEdgeWidth}; + stroke: ${e.archEdgeColor}; + fill: none; + } + + .arrow { + fill: ${e.archEdgeArrowColor}; + } + + .node-bkg { + fill: none; + stroke: ${e.archGroupBorderColor}; + stroke-width: ${e.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"),Z7e=uwt});var HU=ho((QC,qU)=>{"use strict";s((function(t,r){typeof QC=="object"&&typeof qU=="object"?qU.exports=r():typeof define=="function"&&define.amd?define([],r):typeof QC=="object"?QC.layoutBase=r():t.layoutBase=r()}),"webpackUniversalModuleDefinition")(QC,function(){return(function(e){var t={};function r(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return s(r,"__webpack_require__"),r.m=e,r.c=t,r.i=function(n){return n},r.d=function(n,i,a){r.o(n,i)||Object.defineProperty(n,i,{configurable:!1,enumerable:!0,get:a})},r.n=function(n){var i=n&&n.__esModule?s(function(){return n.default},"getDefault"):s(function(){return n},"getModuleExports");return r.d(i,"a",i),i},r.o=function(n,i){return Object.prototype.hasOwnProperty.call(n,i)},r.p="",r(r.s=28)})([(function(e,t,r){"use strict";function n(){}s(n,"LayoutConstants"),n.QUALITY=1,n.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,n.DEFAULT_INCREMENTAL=!1,n.DEFAULT_ANIMATION_ON_LAYOUT=!0,n.DEFAULT_ANIMATION_DURING_LAYOUT=!1,n.DEFAULT_ANIMATION_PERIOD=50,n.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,n.DEFAULT_GRAPH_MARGIN=15,n.NODE_DIMENSIONS_INCLUDE_LABELS=!1,n.SIMPLE_NODE_SIZE=40,n.SIMPLE_NODE_HALF_SIZE=n.SIMPLE_NODE_SIZE/2,n.EMPTY_COMPOUND_NODE_SIZE=40,n.MIN_EDGE_LENGTH=1,n.WORLD_BOUNDARY=1e6,n.INITIAL_WORLD_BOUNDARY=n.WORLD_BOUNDARY/1e3,n.WORLD_CENTER_X=1200,n.WORLD_CENTER_Y=900,e.exports=n}),(function(e,t,r){"use strict";var n=r(2),i=r(8),a=r(9);function o(u,h,d){n.call(this,d),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=d,this.bendpoints=[],this.source=u,this.target=h}s(o,"LEdge"),o.prototype=Object.create(n.prototype);for(var l in n)o[l]=n[l];o.prototype.getSource=function(){return this.source},o.prototype.getTarget=function(){return this.target},o.prototype.isInterGraph=function(){return this.isInterGraph},o.prototype.getLength=function(){return this.length},o.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},o.prototype.getBendpoints=function(){return this.bendpoints},o.prototype.getLca=function(){return this.lca},o.prototype.getSourceInLca=function(){return this.sourceInLca},o.prototype.getTargetInLca=function(){return this.targetInLca},o.prototype.getOtherEnd=function(u){if(this.source===u)return this.target;if(this.target===u)return this.source;throw"Node is not incident with this edge"},o.prototype.getOtherEndInGraph=function(u,h){for(var d=this.getOtherEnd(u),f=h.getGraphManager().getRoot();;){if(d.getOwner()==h)return d;if(d.getOwner()==f)break;d=d.getOwner().getParent()}return null},o.prototype.updateLength=function(){var u=new Array(4);this.isOverlapingSourceAndTarget=i.getIntersection(this.target.getRect(),this.source.getRect(),u),this.isOverlapingSourceAndTarget||(this.lengthX=u[0]-u[2],this.lengthY=u[1]-u[3],Math.abs(this.lengthX)<1&&(this.lengthX=a.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=a.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},o.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=a.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=a.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},e.exports=o}),(function(e,t,r){"use strict";function n(i){this.vGraphObject=i}s(n,"LGraphObject"),e.exports=n}),(function(e,t,r){"use strict";var n=r(2),i=r(10),a=r(13),o=r(0),l=r(16),u=r(5);function h(f,p,m,g){m==null&&g==null&&(g=p),n.call(this,g),f.graphManager!=null&&(f=f.graphManager),this.estimatedSize=i.MIN_VALUE,this.inclusionTreeDepth=i.MAX_VALUE,this.vGraphObject=g,this.edges=[],this.graphManager=f,m!=null&&p!=null?this.rect=new a(p.x,p.y,m.width,m.height):this.rect=new a}s(h,"LNode"),h.prototype=Object.create(n.prototype);for(var d in n)h[d]=n[d];h.prototype.getEdges=function(){return this.edges},h.prototype.getChild=function(){return this.child},h.prototype.getOwner=function(){return this.owner},h.prototype.getWidth=function(){return this.rect.width},h.prototype.setWidth=function(f){this.rect.width=f},h.prototype.getHeight=function(){return this.rect.height},h.prototype.setHeight=function(f){this.rect.height=f},h.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},h.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},h.prototype.getCenter=function(){return new u(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},h.prototype.getLocation=function(){return new u(this.rect.x,this.rect.y)},h.prototype.getRect=function(){return this.rect},h.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},h.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},h.prototype.setRect=function(f,p){this.rect.x=f.x,this.rect.y=f.y,this.rect.width=p.width,this.rect.height=p.height},h.prototype.setCenter=function(f,p){this.rect.x=f-this.rect.width/2,this.rect.y=p-this.rect.height/2},h.prototype.setLocation=function(f,p){this.rect.x=f,this.rect.y=p},h.prototype.moveBy=function(f,p){this.rect.x+=f,this.rect.y+=p},h.prototype.getEdgeListToNode=function(f){var p=[],m,g=this;return g.edges.forEach(function(y){if(y.target==f){if(y.source!=g)throw"Incorrect edge source!";p.push(y)}}),p},h.prototype.getEdgesBetween=function(f){var p=[],m,g=this;return g.edges.forEach(function(y){if(!(y.source==g||y.target==g))throw"Incorrect edge source and/or target";(y.target==f||y.source==f)&&p.push(y)}),p},h.prototype.getNeighborsList=function(){var f=new Set,p=this;return p.edges.forEach(function(m){if(m.source==p)f.add(m.target);else{if(m.target!=p)throw"Incorrect incidency!";f.add(m.source)}}),f},h.prototype.withChildren=function(){var f=new Set,p,m;if(f.add(this),this.child!=null)for(var g=this.child.getNodes(),y=0;yp?(this.rect.x-=(this.labelWidth-p)/2,this.setWidth(this.labelWidth)):this.labelPosHorizontal=="right"&&this.setWidth(p+this.labelWidth)),this.labelHeight&&(this.labelPosVertical=="top"?(this.rect.y-=this.labelHeight,this.setHeight(m+this.labelHeight)):this.labelPosVertical=="center"&&this.labelHeight>m?(this.rect.y-=(this.labelHeight-m)/2,this.setHeight(this.labelHeight)):this.labelPosVertical=="bottom"&&this.setHeight(m+this.labelHeight))}}},h.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==i.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},h.prototype.transform=function(f){var p=this.rect.x;p>o.WORLD_BOUNDARY?p=o.WORLD_BOUNDARY:p<-o.WORLD_BOUNDARY&&(p=-o.WORLD_BOUNDARY);var m=this.rect.y;m>o.WORLD_BOUNDARY?m=o.WORLD_BOUNDARY:m<-o.WORLD_BOUNDARY&&(m=-o.WORLD_BOUNDARY);var g=new u(p,m),y=f.inverseTransformPoint(g);this.setLocation(y.x,y.y)},h.prototype.getLeft=function(){return this.rect.x},h.prototype.getRight=function(){return this.rect.x+this.rect.width},h.prototype.getTop=function(){return this.rect.y},h.prototype.getBottom=function(){return this.rect.y+this.rect.height},h.prototype.getParent=function(){return this.owner==null?null:this.owner.getParent()},e.exports=h}),(function(e,t,r){"use strict";var n=r(0);function i(){}s(i,"FDLayoutConstants");for(var a in n)i[a]=n[a];i.MAX_ITERATIONS=2500,i.DEFAULT_EDGE_LENGTH=50,i.DEFAULT_SPRING_STRENGTH=.45,i.DEFAULT_REPULSION_STRENGTH=4500,i.DEFAULT_GRAVITY_STRENGTH=.4,i.DEFAULT_COMPOUND_GRAVITY_STRENGTH=1,i.DEFAULT_GRAVITY_RANGE_FACTOR=3.8,i.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=1.5,i.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION=!0,i.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION=!0,i.DEFAULT_COOLING_FACTOR_INCREMENTAL=.3,i.COOLING_ADAPTATION_FACTOR=.33,i.ADAPTATION_LOWER_NODE_LIMIT=1e3,i.ADAPTATION_UPPER_NODE_LIMIT=5e3,i.MAX_NODE_DISPLACEMENT_INCREMENTAL=100,i.MAX_NODE_DISPLACEMENT=i.MAX_NODE_DISPLACEMENT_INCREMENTAL*3,i.MIN_REPULSION_DIST=i.DEFAULT_EDGE_LENGTH/10,i.CONVERGENCE_CHECK_PERIOD=100,i.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=.1,i.MIN_EDGE_LENGTH=1,i.GRID_CALCULATION_CHECK_PERIOD=10,e.exports=i}),(function(e,t,r){"use strict";function n(i,a){i==null&&a==null?(this.x=0,this.y=0):(this.x=i,this.y=a)}s(n,"PointD"),n.prototype.getX=function(){return this.x},n.prototype.getY=function(){return this.y},n.prototype.setX=function(i){this.x=i},n.prototype.setY=function(i){this.y=i},n.prototype.getDifference=function(i){return new DimensionD(this.x-i.x,this.y-i.y)},n.prototype.getCopy=function(){return new n(this.x,this.y)},n.prototype.translate=function(i){return this.x+=i.width,this.y+=i.height,this},e.exports=n}),(function(e,t,r){"use strict";var n=r(2),i=r(10),a=r(0),o=r(7),l=r(3),u=r(1),h=r(13),d=r(12),f=r(11);function p(g,y,v){n.call(this,v),this.estimatedSize=i.MIN_VALUE,this.margin=a.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=g,y!=null&&y instanceof o?this.graphManager=y:y!=null&&y instanceof Layout&&(this.graphManager=y.graphManager)}s(p,"LGraph"),p.prototype=Object.create(n.prototype);for(var m in n)p[m]=n[m];p.prototype.getNodes=function(){return this.nodes},p.prototype.getEdges=function(){return this.edges},p.prototype.getGraphManager=function(){return this.graphManager},p.prototype.getParent=function(){return this.parent},p.prototype.getLeft=function(){return this.left},p.prototype.getRight=function(){return this.right},p.prototype.getTop=function(){return this.top},p.prototype.getBottom=function(){return this.bottom},p.prototype.isConnected=function(){return this.isConnected},p.prototype.add=function(g,y,v){if(y==null&&v==null){var x=g;if(this.graphManager==null)throw"Graph has no graph mgr!";if(this.getNodes().indexOf(x)>-1)throw"Node already in graph!";return x.owner=this,this.getNodes().push(x),x}else{var b=g;if(!(this.getNodes().indexOf(y)>-1&&this.getNodes().indexOf(v)>-1))throw"Source or target not in graph!";if(!(y.owner==v.owner&&y.owner==this))throw"Both owners must be this graph!";return y.owner!=v.owner?null:(b.source=y,b.target=v,b.isInterGraph=!1,this.getEdges().push(b),y.edges.push(b),v!=y&&v.edges.push(b),b)}},p.prototype.remove=function(g){var y=g;if(g instanceof l){if(y==null)throw"Node is null!";if(!(y.owner!=null&&y.owner==this))throw"Owner graph is invalid!";if(this.graphManager==null)throw"Owner graph manager is invalid!";for(var v=y.edges.slice(),x,b=v.length,T=0;T-1&&k>-1))throw"Source and/or target doesn't know this edge!";x.source.edges.splice(C,1),x.target!=x.source&&x.target.edges.splice(k,1);var w=x.source.owner.getEdges().indexOf(x);if(w==-1)throw"Not in owner's edge list!";x.source.owner.getEdges().splice(w,1)}},p.prototype.updateLeftTop=function(){for(var g=i.MAX_VALUE,y=i.MAX_VALUE,v,x,b,T=this.getNodes(),w=T.length,C=0;Cv&&(g=v),y>x&&(y=x)}return g==i.MAX_VALUE?null:(T[0].getParent().paddingLeft!=null?b=T[0].getParent().paddingLeft:b=this.margin,this.left=y-b,this.top=g-b,new d(this.left,this.top))},p.prototype.updateBounds=function(g){for(var y=i.MAX_VALUE,v=-i.MAX_VALUE,x=i.MAX_VALUE,b=-i.MAX_VALUE,T,w,C,k,S,A=this.nodes,M=A.length,N=0;NT&&(y=T),vC&&(x=C),bT&&(y=T),vC&&(x=C),b=this.nodes.length){var M=0;v.forEach(function(N){N.owner==g&&M++}),M==this.nodes.length&&(this.isConnected=!0)}},e.exports=p}),(function(e,t,r){"use strict";var n,i=r(1);function a(o){n=r(6),this.layout=o,this.graphs=[],this.edges=[]}s(a,"LGraphManager"),a.prototype.addRoot=function(){var o=this.layout.newGraph(),l=this.layout.newNode(null),u=this.add(o,l);return this.setRootGraph(u),this.rootGraph},a.prototype.add=function(o,l,u,h,d){if(u==null&&h==null&&d==null){if(o==null)throw"Graph is null!";if(l==null)throw"Parent node is null!";if(this.graphs.indexOf(o)>-1)throw"Graph already in this graph mgr!";if(this.graphs.push(o),o.parent!=null)throw"Already has a parent!";if(l.child!=null)throw"Already has a child!";return o.parent=l,l.child=o,o}else{d=u,h=l,u=o;var f=h.getOwner(),p=d.getOwner();if(!(f!=null&&f.getGraphManager()==this))throw"Source not in this graph mgr!";if(!(p!=null&&p.getGraphManager()==this))throw"Target not in this graph mgr!";if(f==p)return u.isInterGraph=!1,f.add(u,h,d);if(u.isInterGraph=!0,u.source=h,u.target=d,this.edges.indexOf(u)>-1)throw"Edge already in inter-graph edge list!";if(this.edges.push(u),!(u.source!=null&&u.target!=null))throw"Edge source and/or target is null!";if(!(u.source.edges.indexOf(u)==-1&&u.target.edges.indexOf(u)==-1))throw"Edge already in source and/or target incidency list!";return u.source.edges.push(u),u.target.edges.push(u),u}},a.prototype.remove=function(o){if(o instanceof n){var l=o;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 u=[];u=u.concat(l.getEdges());for(var h,d=u.length,f=0;f=o.getRight()?l[0]+=Math.min(o.getX()-a.getX(),a.getRight()-o.getRight()):o.getX()<=a.getX()&&o.getRight()>=a.getRight()&&(l[0]+=Math.min(a.getX()-o.getX(),o.getRight()-a.getRight())),a.getY()<=o.getY()&&a.getBottom()>=o.getBottom()?l[1]+=Math.min(o.getY()-a.getY(),a.getBottom()-o.getBottom()):o.getY()<=a.getY()&&o.getBottom()>=a.getBottom()&&(l[1]+=Math.min(a.getY()-o.getY(),o.getBottom()-a.getBottom()));var d=Math.abs((o.getCenterY()-a.getCenterY())/(o.getCenterX()-a.getCenterX()));o.getCenterY()===a.getCenterY()&&o.getCenterX()===a.getCenterX()&&(d=1);var f=d*l[0],p=l[1]/d;l[0]f)return l[0]=u,l[1]=m,l[2]=d,l[3]=A,!1;if(hd)return l[0]=p,l[1]=h,l[2]=k,l[3]=f,!1;if(ud?(l[0]=y,l[1]=v,R=!0):(l[0]=g,l[1]=m,R=!0):I===P&&(u>d?(l[0]=p,l[1]=m,R=!0):(l[0]=x,l[1]=v,R=!0)),-L===P?d>u?(l[2]=S,l[3]=A,E=!0):(l[2]=k,l[3]=C,E=!0):L===P&&(d>u?(l[2]=w,l[3]=C,E=!0):(l[2]=M,l[3]=A,E=!0)),R&&E)return!1;if(u>d?h>f?(B=this.getCardinalDirection(I,P,4),O=this.getCardinalDirection(L,P,2)):(B=this.getCardinalDirection(-I,P,3),O=this.getCardinalDirection(-L,P,1)):h>f?(B=this.getCardinalDirection(-I,P,1),O=this.getCardinalDirection(-L,P,3)):(B=this.getCardinalDirection(I,P,2),O=this.getCardinalDirection(L,P,4)),!R)switch(B){case 1:G=m,$=u+-T/P,l[0]=$,l[1]=G;break;case 2:$=x,G=h+b*P,l[0]=$,l[1]=G;break;case 3:G=v,$=u+T/P,l[0]=$,l[1]=G;break;case 4:$=y,G=h+-b*P,l[0]=$,l[1]=G;break}if(!E)switch(O){case 1:z=C,V=d+-D/P,l[2]=V,l[3]=z;break;case 2:V=M,z=f+N*P,l[2]=V,l[3]=z;break;case 3:z=A,V=d+D/P,l[2]=V,l[3]=z;break;case 4:V=S,z=f+-N*P,l[2]=V,l[3]=z;break}}return!1},i.getCardinalDirection=function(a,o,l){return a>o?l:1+l%4},i.getIntersection=function(a,o,l,u){if(u==null)return this.getIntersection2(a,o,l);var h=a.x,d=a.y,f=o.x,p=o.y,m=l.x,g=l.y,y=u.x,v=u.y,x=void 0,b=void 0,T=void 0,w=void 0,C=void 0,k=void 0,S=void 0,A=void 0,M=void 0;return T=p-d,C=h-f,S=f*d-h*p,w=v-g,k=m-y,A=y*g-m*v,M=T*k-w*C,M===0?null:(x=(C*A-k*S)/M,b=(w*S-T*A)/M,new n(x,b))},i.angleOfVector=function(a,o,l,u){var h=void 0;return a!==l?(h=Math.atan((u-o)/(l-a)),l=0){var v=(-m+Math.sqrt(m*m-4*p*g))/(2*p),x=(-m-Math.sqrt(m*m-4*p*g))/(2*p),b=null;return v>=0&&v<=1?[v]:x>=0&&x<=1?[x]:b}else return null},i.HALF_PI=.5*Math.PI,i.ONE_AND_HALF_PI=1.5*Math.PI,i.TWO_PI=2*Math.PI,i.THREE_PI=3*Math.PI,e.exports=i}),(function(e,t,r){"use strict";function n(){}s(n,"IMath"),n.sign=function(i){return i>0?1:i<0?-1:0},n.floor=function(i){return i<0?Math.ceil(i):Math.floor(i)},n.ceil=function(i){return i<0?Math.floor(i):Math.ceil(i)},e.exports=n}),(function(e,t,r){"use strict";function n(){}s(n,"Integer"),n.MAX_VALUE=2147483647,n.MIN_VALUE=-2147483648,e.exports=n}),(function(e,t,r){"use strict";var n=(function(){function h(d,f){for(var p=0;p"u"?"undefined":n(a);return a==null||o!="object"&&o!="function"},e.exports=i}),(function(e,t,r){"use strict";function n(m){if(Array.isArray(m)){for(var g=0,y=Array(m.length);g0&&g;){for(T.push(C[0]);T.length>0&&g;){var k=T[0];T.splice(0,1),b.add(k);for(var S=k.getEdges(),x=0;x-1&&C.splice(D,1)}b=new Set,w=new Map}}return m},p.prototype.createDummyNodesForBendpoints=function(m){for(var g=[],y=m.source,v=this.graphManager.calcLowestCommonAncestor(m.source,m.target),x=0;x0){for(var v=this.edgeToDummyNodes.get(y),x=0;x=0&&g.splice(A,1);var M=w.getNeighborsList();M.forEach(function(R){if(y.indexOf(R)<0){var E=v.get(R),I=E-1;I==1&&k.push(R),v.set(R,I)}})}y=y.concat(k),(g.length==1||g.length==2)&&(x=!0,b=g[0])}return b},p.prototype.setGraphManager=function(m){this.graphManager=m},e.exports=p}),(function(e,t,r){"use strict";function n(){}s(n,"RandomSeed"),n.seed=1,n.x=0,n.nextDouble=function(){return n.x=Math.sin(n.seed++)*1e4,n.x-Math.floor(n.x)},e.exports=n}),(function(e,t,r){"use strict";var n=r(5);function i(a,o){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}s(i,"Transform"),i.prototype.getWorldOrgX=function(){return this.lworldOrgX},i.prototype.setWorldOrgX=function(a){this.lworldOrgX=a},i.prototype.getWorldOrgY=function(){return this.lworldOrgY},i.prototype.setWorldOrgY=function(a){this.lworldOrgY=a},i.prototype.getWorldExtX=function(){return this.lworldExtX},i.prototype.setWorldExtX=function(a){this.lworldExtX=a},i.prototype.getWorldExtY=function(){return this.lworldExtY},i.prototype.setWorldExtY=function(a){this.lworldExtY=a},i.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},i.prototype.setDeviceOrgX=function(a){this.ldeviceOrgX=a},i.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},i.prototype.setDeviceOrgY=function(a){this.ldeviceOrgY=a},i.prototype.getDeviceExtX=function(){return this.ldeviceExtX},i.prototype.setDeviceExtX=function(a){this.ldeviceExtX=a},i.prototype.getDeviceExtY=function(){return this.ldeviceExtY},i.prototype.setDeviceExtY=function(a){this.ldeviceExtY=a},i.prototype.transformX=function(a){var o=0,l=this.lworldExtX;return l!=0&&(o=this.ldeviceOrgX+(a-this.lworldOrgX)*this.ldeviceExtX/l),o},i.prototype.transformY=function(a){var o=0,l=this.lworldExtY;return l!=0&&(o=this.ldeviceOrgY+(a-this.lworldOrgY)*this.ldeviceExtY/l),o},i.prototype.inverseTransformX=function(a){var o=0,l=this.ldeviceExtX;return l!=0&&(o=this.lworldOrgX+(a-this.ldeviceOrgX)*this.lworldExtX/l),o},i.prototype.inverseTransformY=function(a){var o=0,l=this.ldeviceExtY;return l!=0&&(o=this.lworldOrgY+(a-this.ldeviceOrgY)*this.lworldExtY/l),o},i.prototype.inverseTransformPoint=function(a){var o=new n(this.inverseTransformX(a.x),this.inverseTransformY(a.y));return o},e.exports=i}),(function(e,t,r){"use strict";function n(f){if(Array.isArray(f)){for(var p=0,m=Array(f.length);pa.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*a.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(f-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):(f>a.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(a.COOLING_ADAPTATION_FACTOR,1-(f-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()},h.prototype.calcSpringForces=function(){for(var f=this.getAllEdges(),p,m=0;m0&&arguments[0]!==void 0?arguments[0]:!0,p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,m,g,y,v,x=this.getAllNodes(),b;if(this.useFRGridVariant)for(this.totalIterations%a.GRID_CALCULATION_CHECK_PERIOD==1&&f&&this.updateGrid(),b=new Set,m=0;mT||b>T)&&(f.gravitationForceX=-this.gravityConstant*y,f.gravitationForceY=-this.gravityConstant*v)):(T=p.getEstimatedSize()*this.compoundGravityRangeFactor,(x>T||b>T)&&(f.gravitationForceX=-this.gravityConstant*y*this.compoundGravityConstant,f.gravitationForceY=-this.gravityConstant*v*this.compoundGravityConstant))},h.prototype.isConverged=function(){var f,p=!1;return this.totalIterations>this.maxIterations/3&&(p=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),f=this.totalDisplacement=x.length||T>=x[0].length)){for(var w=0;wh},"_defaultCompareFunction")}]),l})();e.exports=o}),(function(e,t,r){"use strict";function n(){}s(n,"SVD"),n.svd=function(i){this.U=null,this.V=null,this.s=null,this.m=0,this.n=0,this.m=i.length,this.n=i[0].length;var a=Math.min(this.m,this.n);this.s=(function(Et){for(var gt=[];Et-- >0;)gt.push(0);return gt})(Math.min(this.m+1,this.n)),this.U=(function(Et){var gt=s(function ge(nt){if(nt.length==0)return 0;for(var pt=[],Qe=0;Qe0;)gt.push(0);return gt})(this.n),l=(function(Et){for(var gt=[];Et-- >0;)gt.push(0);return gt})(this.m),u=!0,h=!0,d=Math.min(this.m-1,this.n),f=Math.max(0,Math.min(this.n-2,this.m)),p=0;p=0;P--)if(this.s[P]!==0){for(var B=P+1;B=0;H--){if((function(Et,gt){return Et&>})(H0;){var xe=void 0,Ne=void 0;for(xe=E-2;xe>=-1&&xe!==-1;xe--)if(Math.abs(o[xe])<=Se+oe*(Math.abs(this.s[xe])+Math.abs(this.s[xe+1]))){o[xe]=0;break}if(xe===E-2)Ne=4;else{var Ye=void 0;for(Ye=E-1;Ye>=xe&&Ye!==xe;Ye--){var We=(Ye!==E?Math.abs(o[Ye]):0)+(Ye!==xe+1?Math.abs(o[Ye-1]):0);if(Math.abs(this.s[Ye])<=Se+oe*We){this.s[Ye]=0;break}}Ye===xe?Ne=3:Ye===E-1?Ne=1:(Ne=2,xe=Ye)}switch(xe++,Ne){case 1:{var pe=o[E-2];o[E-2]=0;for(var _e=E-2;_e>=xe;_e--){var Ee=n.hypot(this.s[_e],pe),Re=this.s[_e]/Ee,Z=pe/Ee;if(this.s[_e]=Ee,_e!==xe&&(pe=-Z*o[_e-1],o[_e-1]=Re*o[_e-1]),h)for(var ae=0;ae=this.s[xe+1]);){var ke=this.s[xe];if(this.s[xe]=this.s[xe+1],this.s[xe+1]=ke,h&&xeMath.abs(a)?(o=a/i,o=Math.abs(i)*Math.sqrt(1+o*o)):a!=0?(o=i/a,o=Math.abs(a)*Math.sqrt(1+o*o)):o=0,o},e.exports=n}),(function(e,t,r){"use strict";var n=(function(){function o(l,u){for(var h=0;h2&&arguments[2]!==void 0?arguments[2]:1,d=arguments.length>3&&arguments[3]!==void 0?arguments[3]:-1,f=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1;i(this,o),this.sequence1=l,this.sequence2=u,this.match_score=h,this.mismatch_penalty=d,this.gap_penalty=f,this.iMax=l.length+1,this.jMax=u.length+1,this.grid=new Array(this.iMax);for(var p=0;p=0;l--){var u=this.listeners[l];u.event===a&&u.callback===o&&this.listeners.splice(l,1)}},i.emit=function(a,o){for(var l=0;l{"use strict";s((function(t,r){typeof JC=="object"&&typeof UU=="object"?UU.exports=r(HU()):typeof define=="function"&&define.amd?define(["layout-base"],r):typeof JC=="object"?JC.coseBase=r(HU()):t.coseBase=r(t.layoutBase)}),"webpackUniversalModuleDefinition")(JC,function(e){return(()=>{"use strict";var t={45:((a,o,l)=>{var u={};u.layoutBase=l(551),u.CoSEConstants=l(806),u.CoSEEdge=l(767),u.CoSEGraph=l(880),u.CoSEGraphManager=l(578),u.CoSELayout=l(765),u.CoSENode=l(991),u.ConstraintHandler=l(902),a.exports=u}),806:((a,o,l)=>{var u=l(551).FDLayoutConstants;function h(){}s(h,"CoSEConstants");for(var d in u)h[d]=u[d];h.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,h.DEFAULT_RADIAL_SEPARATION=u.DEFAULT_EDGE_LENGTH,h.DEFAULT_COMPONENT_SEPERATION=60,h.TILE=!0,h.TILING_PADDING_VERTICAL=10,h.TILING_PADDING_HORIZONTAL=10,h.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,h.ENFORCE_CONSTRAINTS=!0,h.APPLY_LAYOUT=!0,h.RELAX_MOVEMENT_ON_CONSTRAINTS=!0,h.TREE_REDUCTION_ON_INCREMENTAL=!0,h.PURE_INCREMENTAL=h.DEFAULT_INCREMENTAL,a.exports=h}),767:((a,o,l)=>{var u=l(551).FDLayoutEdge;function h(f,p,m){u.call(this,f,p,m)}s(h,"CoSEEdge"),h.prototype=Object.create(u.prototype);for(var d in u)h[d]=u[d];a.exports=h}),880:((a,o,l)=>{var u=l(551).LGraph;function h(f,p,m){u.call(this,f,p,m)}s(h,"CoSEGraph"),h.prototype=Object.create(u.prototype);for(var d in u)h[d]=u[d];a.exports=h}),578:((a,o,l)=>{var u=l(551).LGraphManager;function h(f){u.call(this,f)}s(h,"CoSEGraphManager"),h.prototype=Object.create(u.prototype);for(var d in u)h[d]=u[d];a.exports=h}),765:((a,o,l)=>{var u=l(551).FDLayout,h=l(578),d=l(880),f=l(991),p=l(767),m=l(806),g=l(902),y=l(551).FDLayoutConstants,v=l(551).LayoutConstants,x=l(551).Point,b=l(551).PointD,T=l(551).DimensionD,w=l(551).Layout,C=l(551).Integer,k=l(551).IGeometry,S=l(551).LGraph,A=l(551).Transform,M=l(551).LinkedList;function N(){u.call(this),this.toBeTiled={},this.constraints={}}s(N,"CoSELayout"),N.prototype=Object.create(u.prototype);for(var D in u)N[D]=u[D];N.prototype.newGraphManager=function(){var R=new h(this);return this.graphManager=R,R},N.prototype.newGraph=function(R){return new d(null,this.graphManager,R)},N.prototype.newNode=function(R){return new f(this.graphManager,R)},N.prototype.newEdge=function(R){return new p(null,null,R)},N.prototype.initParameters=function(){u.prototype.initParameters.call(this,arguments),this.isSubLayout||(m.DEFAULT_EDGE_LENGTH<10?this.idealEdgeLength=10:this.idealEdgeLength=m.DEFAULT_EDGE_LENGTH,this.useSmartIdealEdgeLengthCalculation=m.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.gravityConstant=y.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=y.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=y.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=y.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.prunedNodesAll=[],this.growTreeIterations=0,this.afterGrowthIterations=0,this.isTreeGrowing=!1,this.isGrowthFinished=!1)},N.prototype.initSpringEmbedder=function(){u.prototype.initSpringEmbedder.call(this),this.coolingCycle=0,this.maxCoolingCycle=this.maxIterations/y.CONVERGENCE_CHECK_PERIOD,this.finalTemperature=.04,this.coolingAdjuster=1},N.prototype.layout=function(){var R=v.DEFAULT_CREATE_BENDS_AS_NEEDED;return R&&(this.createBendpoints(),this.graphManager.resetAllEdges()),this.level=0,this.classicLayout()},N.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(m.TREE_REDUCTION_ON_INCREMENTAL){this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var E=new Set(this.getAllNodes()),I=this.nodesWithGravity.filter(function(B){return E.has(B)});this.graphManager.setAllNodesToApplyGravitation(I)}}else{var R=this.getFlatForest();if(R.length>0)this.positionNodesRadially(R);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var E=new Set(this.getAllNodes()),I=this.nodesWithGravity.filter(function(L){return E.has(L)});this.graphManager.setAllNodesToApplyGravitation(I),this.positionNodesRandomly()}}return Object.keys(this.constraints).length>0&&(g.handleConstraints(this),this.initConstraintVariables()),this.initSpringEmbedder(),m.APPLY_LAYOUT&&this.runSpringEmbedder(),!0},N.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%y.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 R=new Set(this.getAllNodes()),E=this.nodesWithGravity.filter(function(P){return R.has(P)});this.graphManager.setAllNodesToApplyGravitation(E),this.graphManager.updateBounds(),this.updateGrid(),m.PURE_INCREMENTAL?this.coolingFactor=y.DEFAULT_COOLING_FACTOR_INCREMENTAL/2:this.coolingFactor=y.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()),m.PURE_INCREMENTAL?this.coolingFactor=y.DEFAULT_COOLING_FACTOR_INCREMENTAL/2*((100-this.afterGrowthIterations)/100):this.coolingFactor=y.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var I=!this.isTreeGrowing&&!this.isGrowthFinished,L=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(I,L),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},N.prototype.getPositionsData=function(){for(var R=this.graphManager.getAllNodes(),E={},I=0;I0&&this.updateDisplacements();for(var I=0;I0&&(L.fixedNodeWeight=B)}}if(this.constraints.relativePlacementConstraint){var O=new Map,$=new Map;if(this.dummyToNodeForVerticalAlignment=new Map,this.dummyToNodeForHorizontalAlignment=new Map,this.fixedNodesOnHorizontal=new Set,this.fixedNodesOnVertical=new Set,this.fixedNodeSet.forEach(function(U){R.fixedNodesOnHorizontal.add(U),R.fixedNodesOnVertical.add(U)}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var G=this.constraints.alignmentConstraint.vertical,I=0;I=2*U.length/3;he--)ue=Math.floor(Math.random()*(he+1)),J=U[he],U[he]=U[ue],U[ue]=J;return U},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(U){if(U.left){var ue=O.has(U.left)?O.get(U.left):U.left,J=O.has(U.right)?O.get(U.right):U.right;R.nodesInRelativeHorizontal.includes(ue)||(R.nodesInRelativeHorizontal.push(ue),R.nodeToRelativeConstraintMapHorizontal.set(ue,[]),R.dummyToNodeForVerticalAlignment.has(ue)?R.nodeToTempPositionMapHorizontal.set(ue,R.idToNodeMap.get(R.dummyToNodeForVerticalAlignment.get(ue)[0]).getCenterX()):R.nodeToTempPositionMapHorizontal.set(ue,R.idToNodeMap.get(ue).getCenterX())),R.nodesInRelativeHorizontal.includes(J)||(R.nodesInRelativeHorizontal.push(J),R.nodeToRelativeConstraintMapHorizontal.set(J,[]),R.dummyToNodeForVerticalAlignment.has(J)?R.nodeToTempPositionMapHorizontal.set(J,R.idToNodeMap.get(R.dummyToNodeForVerticalAlignment.get(J)[0]).getCenterX()):R.nodeToTempPositionMapHorizontal.set(J,R.idToNodeMap.get(J).getCenterX())),R.nodeToRelativeConstraintMapHorizontal.get(ue).push({right:J,gap:U.gap}),R.nodeToRelativeConstraintMapHorizontal.get(J).push({left:ue,gap:U.gap})}else{var he=$.has(U.top)?$.get(U.top):U.top,se=$.has(U.bottom)?$.get(U.bottom):U.bottom;R.nodesInRelativeVertical.includes(he)||(R.nodesInRelativeVertical.push(he),R.nodeToRelativeConstraintMapVertical.set(he,[]),R.dummyToNodeForHorizontalAlignment.has(he)?R.nodeToTempPositionMapVertical.set(he,R.idToNodeMap.get(R.dummyToNodeForHorizontalAlignment.get(he)[0]).getCenterY()):R.nodeToTempPositionMapVertical.set(he,R.idToNodeMap.get(he).getCenterY())),R.nodesInRelativeVertical.includes(se)||(R.nodesInRelativeVertical.push(se),R.nodeToRelativeConstraintMapVertical.set(se,[]),R.dummyToNodeForHorizontalAlignment.has(se)?R.nodeToTempPositionMapVertical.set(se,R.idToNodeMap.get(R.dummyToNodeForHorizontalAlignment.get(se)[0]).getCenterY()):R.nodeToTempPositionMapVertical.set(se,R.idToNodeMap.get(se).getCenterY())),R.nodeToRelativeConstraintMapVertical.get(he).push({bottom:se,gap:U.gap}),R.nodeToRelativeConstraintMapVertical.get(se).push({top:he,gap:U.gap})}});else{var z=new Map,W=new Map;this.constraints.relativePlacementConstraint.forEach(function(U){if(U.left){var ue=O.has(U.left)?O.get(U.left):U.left,J=O.has(U.right)?O.get(U.right):U.right;z.has(ue)?z.get(ue).push(J):z.set(ue,[J]),z.has(J)?z.get(J).push(ue):z.set(J,[ue])}else{var he=$.has(U.top)?$.get(U.top):U.top,se=$.has(U.bottom)?$.get(U.bottom):U.bottom;W.has(he)?W.get(he).push(se):W.set(he,[se]),W.has(se)?W.get(se).push(he):W.set(se,[he])}});var H=s(function(ue,J){var he=[],se=[],oe=new M,Se=new Set,xe=0;return ue.forEach(function(Ne,Ye){if(!Se.has(Ye)){he[xe]=[],se[xe]=!1;var We=Ye;for(oe.push(We),Se.add(We),he[xe].push(We);oe.length!=0;){We=oe.shift(),J.has(We)&&(se[xe]=!0);var pe=ue.get(We);pe.forEach(function(_e){Se.has(_e)||(oe.push(_e),Se.add(_e),he[xe].push(_e))})}xe++}}),{components:he,isFixed:se}},"constructComponents"),j=H(z,R.fixedNodesOnHorizontal);this.componentsOnHorizontal=j.components,this.fixedComponentsOnHorizontal=j.isFixed;var Q=H(W,R.fixedNodesOnVertical);this.componentsOnVertical=Q.components,this.fixedComponentsOnVertical=Q.isFixed}}},N.prototype.updateDisplacements=function(){var R=this;if(this.constraints.fixedNodeConstraint&&this.constraints.fixedNodeConstraint.forEach(function(Q){var U=R.idToNodeMap.get(Q.nodeId);U.displacementX=0,U.displacementY=0}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var E=this.constraints.alignmentConstraint.vertical,I=0;I1){var $;for($=0;$L&&(L=Math.floor(O.y)),B=Math.floor(O.x+m.DEFAULT_COMPONENT_SEPERATION)}this.transform(new b(v.WORLD_CENTER_X-O.x/2,v.WORLD_CENTER_Y-O.y/2))},N.radialLayout=function(R,E,I){var L=Math.max(this.maxDiagonalInTree(R),m.DEFAULT_RADIAL_SEPARATION);N.branchRadialLayout(E,null,0,359,0,L);var P=S.calculateBounds(R),B=new A;B.setDeviceOrgX(P.getMinX()),B.setDeviceOrgY(P.getMinY()),B.setWorldOrgX(I.x),B.setWorldOrgY(I.y);for(var O=0;O1;){var he=J[0];J.splice(0,1);var se=H.indexOf(he);se>=0&&H.splice(se,1),U--,j--}E!=null?ue=(H.indexOf(J[0])+1)%U:ue=0;for(var oe=Math.abs(L-I)/j,Se=ue;Q!=j;Se=++Se%U){var xe=H[Se].getOtherEnd(R);if(xe!=E){var Ne=(I+Q*oe)%360,Ye=(Ne+oe)%360;N.branchRadialLayout(xe,R,Ne,Ye,P+B,B),Q++}}},N.maxDiagonalInTree=function(R){for(var E=C.MIN_VALUE,I=0;IE&&(E=P)}return E},N.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},N.prototype.groupZeroDegreeMembers=function(){var R=this,E={};this.memberGroups={},this.idToDummyNode={};for(var I=[],L=this.graphManager.getAllNodes(),P=0;P"u"&&(E[$]=[]),E[$]=E[$].concat(B)}Object.keys(E).forEach(function(G){if(E[G].length>1){var V="DummyCompound_"+G;R.memberGroups[V]=E[G];var z=E[G][0].getParent(),W=new f(R.graphManager);W.id=V,W.paddingLeft=z.paddingLeft||0,W.paddingRight=z.paddingRight||0,W.paddingBottom=z.paddingBottom||0,W.paddingTop=z.paddingTop||0,R.idToDummyNode[V]=W;var H=R.getGraphManager().add(R.newGraph(),W),j=z.getChild();j.add(W);for(var Q=0;QP?(L.rect.x-=(L.labelWidth-P)/2,L.setWidth(L.labelWidth),L.labelMarginLeft=(L.labelWidth-P)/2):L.labelPosHorizontal=="right"&&L.setWidth(P+L.labelWidth)),L.labelHeight&&(L.labelPosVertical=="top"?(L.rect.y-=L.labelHeight,L.setHeight(B+L.labelHeight),L.labelMarginTop=L.labelHeight):L.labelPosVertical=="center"&&L.labelHeight>B?(L.rect.y-=(L.labelHeight-B)/2,L.setHeight(L.labelHeight),L.labelMarginTop=(L.labelHeight-B)/2):L.labelPosVertical=="bottom"&&L.setHeight(B+L.labelHeight))}})},N.prototype.repopulateCompounds=function(){for(var R=this.compoundOrder.length-1;R>=0;R--){var E=this.compoundOrder[R],I=E.id,L=E.paddingLeft,P=E.paddingTop,B=E.labelMarginLeft,O=E.labelMarginTop;this.adjustLocations(this.tiledMemberPack[I],E.rect.x,E.rect.y,L,P,B,O)}},N.prototype.repopulateZeroDegreeMembers=function(){var R=this,E=this.tiledZeroDegreePack;Object.keys(E).forEach(function(I){var L=R.idToDummyNode[I],P=L.paddingLeft,B=L.paddingTop,O=L.labelMarginLeft,$=L.labelMarginTop;R.adjustLocations(E[I],L.rect.x,L.rect.y,P,B,O,$)})},N.prototype.getToBeTiled=function(R){var E=R.id;if(this.toBeTiled[E]!=null)return this.toBeTiled[E];var I=R.getChild();if(I==null)return this.toBeTiled[E]=!1,!1;for(var L=I.getNodes(),P=0;P0)return this.toBeTiled[E]=!1,!1;if(B.getChild()==null){this.toBeTiled[B.id]=!1;continue}if(!this.getToBeTiled(B))return this.toBeTiled[E]=!1,!1}return this.toBeTiled[E]=!0,!0},N.prototype.getNodeDegree=function(R){for(var E=R.id,I=R.getEdges(),L=0,P=0;Pz&&(z=H.rect.height)}I+=z+R.verticalPadding}},N.prototype.tileCompoundMembers=function(R,E){var I=this;this.tiledMemberPack=[],Object.keys(R).forEach(function(L){var P=E[L];if(I.tiledMemberPack[L]=I.tileNodes(R[L],P.paddingLeft+P.paddingRight),P.rect.width=I.tiledMemberPack[L].width,P.rect.height=I.tiledMemberPack[L].height,P.setCenter(I.tiledMemberPack[L].centerX,I.tiledMemberPack[L].centerY),P.labelMarginLeft=0,P.labelMarginTop=0,m.NODE_DIMENSIONS_INCLUDE_LABELS){var B=P.rect.width,O=P.rect.height;P.labelWidth&&(P.labelPosHorizontal=="left"?(P.rect.x-=P.labelWidth,P.setWidth(B+P.labelWidth),P.labelMarginLeft=P.labelWidth):P.labelPosHorizontal=="center"&&P.labelWidth>B?(P.rect.x-=(P.labelWidth-B)/2,P.setWidth(P.labelWidth),P.labelMarginLeft=(P.labelWidth-B)/2):P.labelPosHorizontal=="right"&&P.setWidth(B+P.labelWidth)),P.labelHeight&&(P.labelPosVertical=="top"?(P.rect.y-=P.labelHeight,P.setHeight(O+P.labelHeight),P.labelMarginTop=P.labelHeight):P.labelPosVertical=="center"&&P.labelHeight>O?(P.rect.y-=(P.labelHeight-O)/2,P.setHeight(P.labelHeight),P.labelMarginTop=(P.labelHeight-O)/2):P.labelPosVertical=="bottom"&&P.setHeight(O+P.labelHeight))}})},N.prototype.tileNodes=function(R,E){var I=this.tileNodesByFavoringDim(R,E,!0),L=this.tileNodesByFavoringDim(R,E,!1),P=this.getOrgRatio(I),B=this.getOrgRatio(L),O;return B$&&($=Q.getWidth())});var G=B/P,V=O/P,z=Math.pow(I-L,2)+4*(G+L)*(V+I)*P,W=(L-I+Math.sqrt(z))/(2*(G+L)),H;E?(H=Math.ceil(W),H==W&&H++):H=Math.floor(W);var j=H*(G+L)-L;return $>j&&(j=$),j+=L*2,j},N.prototype.tileNodesByFavoringDim=function(R,E,I){var L=m.TILING_PADDING_VERTICAL,P=m.TILING_PADDING_HORIZONTAL,B=m.TILING_COMPARE_BY,O={rows:[],rowWidth:[],rowHeight:[],width:0,height:E,verticalPadding:L,horizontalPadding:P,centerX:0,centerY:0};B&&(O.idealRowWidth=this.calcIdealRowWidth(R,I));var $=s(function(U){return U.rect.width*U.rect.height},"getNodeArea"),G=s(function(U,ue){return $(ue)-$(U)},"areaCompareFcn");R.sort(function(Q,U){var ue=G;return O.idealRowWidth?(ue=B,ue(Q.id,U.id)):ue(Q,U)});for(var V=0,z=0,W=0;W0&&(O+=R.horizontalPadding),R.rowWidth[I]=O,R.width0&&($+=R.verticalPadding);var G=0;$>R.rowHeight[I]&&(G=R.rowHeight[I],R.rowHeight[I]=$,G=R.rowHeight[I]-G),R.height+=G,R.rows[I].push(E)},N.prototype.getShortestRowIndex=function(R){for(var E=-1,I=Number.MAX_VALUE,L=0;LI&&(E=L,I=R.rowWidth[L]);return E},N.prototype.canAddHorizontal=function(R,E,I){if(R.idealRowWidth){var L=R.rows.length-1,P=R.rowWidth[L];return P+E+R.horizontalPadding<=R.idealRowWidth}var B=this.getShortestRowIndex(R);if(B<0)return!0;var O=R.rowWidth[B];if(O+R.horizontalPadding+E<=R.width)return!0;var $=0;R.rowHeight[B]0&&($=I+R.verticalPadding-R.rowHeight[B]);var G;R.width-O>=E+R.horizontalPadding?G=(R.height+$)/(O+E+R.horizontalPadding):G=(R.height+$)/R.width,$=I+R.verticalPadding;var V;return R.widthB&&E!=I){L.splice(-1,1),R.rows[I].push(P),R.rowWidth[E]=R.rowWidth[E]-B,R.rowWidth[I]=R.rowWidth[I]+B,R.width=R.rowWidth[instance.getLongestRowIndex(R)];for(var O=Number.MIN_VALUE,$=0;$O&&(O=L[$].height);E>0&&(O+=R.verticalPadding);var G=R.rowHeight[E]+R.rowHeight[I];R.rowHeight[E]=O,R.rowHeight[I]0)for(var j=P;j<=B;j++)H[0]+=this.grid[j][O-1].length+this.grid[j][O].length-1;if(B0)for(var j=O;j<=$;j++)H[3]+=this.grid[P-1][j].length+this.grid[P][j].length-1;for(var Q=C.MAX_VALUE,U,ue,J=0;J{var u=l(551).FDLayoutNode,h=l(551).IMath;function d(p,m,g,y){u.call(this,p,m,g,y)}s(d,"CoSENode"),d.prototype=Object.create(u.prototype);for(var f in u)d[f]=u[f];d.prototype.calculateDisplacement=function(){var p=this.graphManager.getLayout();this.getChild()!=null&&this.fixedNodeWeight?(this.displacementX+=p.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.fixedNodeWeight,this.displacementY+=p.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.fixedNodeWeight):(this.displacementX+=p.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY+=p.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren),Math.abs(this.displacementX)>p.coolingFactor*p.maxNodeDisplacement&&(this.displacementX=p.coolingFactor*p.maxNodeDisplacement*h.sign(this.displacementX)),Math.abs(this.displacementY)>p.coolingFactor*p.maxNodeDisplacement&&(this.displacementY=p.coolingFactor*p.maxNodeDisplacement*h.sign(this.displacementY)),this.child&&this.child.getNodes().length>0&&this.propogateDisplacementToChildren(this.displacementX,this.displacementY)},d.prototype.propogateDisplacementToChildren=function(p,m){for(var g=this.getChild().getNodes(),y,v=0;v{function u(g){if(Array.isArray(g)){for(var y=0,v=Array(g.length);y0){var be=0;Xe.forEach(function(ke){de=="horizontal"?($e.set(ke,x.has(ke)?b[x.get(ke)]:ye.get(ke)),be+=$e.get(ke)):($e.set(ke,x.has(ke)?T[x.get(ke)]:ye.get(ke)),be+=$e.get(ke))}),be=be/Xe.length,Be.forEach(function(ke){X.has(ke)||$e.set(ke,be)})}else{var vt=0;Be.forEach(function(ke){de=="horizontal"?vt+=x.has(ke)?b[x.get(ke)]:ye.get(ke):vt+=x.has(ke)?T[x.get(ke)]:ye.get(ke)}),vt=vt/Be.length,Be.forEach(function(ke){$e.set(ke,vt)})}});for(var Pe=s(function(){var Xe=at.shift(),be=q.get(Xe);be.forEach(function(vt){if($e.get(vt.id)<$e.get(Xe)+vt.gap)if(X&&X.has(vt.id)){var ke=void 0;if(de=="horizontal"?ke=x.has(vt.id)?b[x.get(vt.id)]:ye.get(vt.id):ke=x.has(vt.id)?T[x.get(vt.id)]:ye.get(vt.id),$e.set(vt.id,ke),ke<$e.get(Xe)+vt.gap){var It=$e.get(Xe)+vt.gap-ke;Oe.get(Xe).forEach(function(Ft){$e.set(Ft,$e.get(Ft)-It)})}}else $e.set(vt.id,$e.get(Xe)+vt.gap);Ae.set(vt.id,Ae.get(vt.id)-1),Ae.get(vt.id)==0&&at.push(vt.id),X&&Oe.set(vt.id,Ge(Oe.get(Xe),Oe.get(vt.id)))})},"_loop");at.length!=0;)Pe();if(X){var Ke=new Set;q.forEach(function(Be,Xe){Be.length==0&&Ke.add(Xe)});var qe=[];Oe.forEach(function(Be,Xe){if(Ke.has(Xe)){var be=!1,vt=!0,ke=!1,It=void 0;try{for(var Ft=Be[Symbol.iterator](),yt;!(vt=(yt=Ft.next()).done);vt=!0){var Et=yt.value;X.has(Et)&&(be=!0)}}catch(nt){ke=!0,It=nt}finally{try{!vt&&Ft.return&&Ft.return()}finally{if(ke)throw It}}if(!be){var gt=!1,ge=void 0;qe.forEach(function(nt,pt){nt.has([].concat(u(Be))[0])&&(gt=!0,ge=pt)}),gt?Be.forEach(function(nt){qe[ge].add(nt)}):qe.push(new Set(Be))}}}),qe.forEach(function(Be,Xe){var be=Number.POSITIVE_INFINITY,vt=Number.POSITIVE_INFINITY,ke=Number.NEGATIVE_INFINITY,It=Number.NEGATIVE_INFINITY,Ft=!0,yt=!1,Et=void 0;try{for(var gt=Be[Symbol.iterator](),ge;!(Ft=(ge=gt.next()).done);Ft=!0){var nt=ge.value,pt=void 0;de=="horizontal"?pt=x.has(nt)?b[x.get(nt)]:ye.get(nt):pt=x.has(nt)?T[x.get(nt)]:ye.get(nt);var Qe=$e.get(nt);ptke&&(ke=pt),QeIt&&(It=Qe)}}catch(rr){yt=!0,Et=rr}finally{try{!Ft&>.return&>.return()}finally{if(yt)throw Et}}var we=(be+ke)/2-(vt+It)/2,tt=!0,st=!1,mt=void 0;try{for(var Bt=Be[Symbol.iterator](),Gt;!(tt=(Gt=Bt.next()).done);tt=!0){var Xt=Gt.value;$e.set(Xt,$e.get(Xt)+we)}}catch(rr){st=!0,mt=rr}finally{try{!tt&&Bt.return&&Bt.return()}finally{if(st)throw mt}}})}return $e},"findAppropriatePositionForRelativePlacement"),D=s(function(q){var de=0,X=0,ye=0,K=0;if(q.forEach(function(Oe){Oe.left?b[x.get(Oe.left)]-b[x.get(Oe.right)]>=0?de++:X++:T[x.get(Oe.top)]-T[x.get(Oe.bottom)]>=0?ye++:K++}),de>X&&ye>K)for(var Ge=0;GeX)for(var Ae=0;AeK)for(var $e=0;$e1)y.fixedNodeConstraint.forEach(function(ce,q){L[q]=[ce.position.x,ce.position.y],P[q]=[b[x.get(ce.nodeId)],T[x.get(ce.nodeId)]]}),B=!0;else if(y.alignmentConstraint)(function(){var ce=0;if(y.alignmentConstraint.vertical){for(var q=y.alignmentConstraint.vertical,de=s(function($e){var Oe=new Set;q[$e].forEach(function(Ke){Oe.add(Ke)});var at=new Set([].concat(u(Oe)).filter(function(Ke){return $.has(Ke)})),Pe=void 0;at.size>0?Pe=b[x.get(at.values().next().value)]:Pe=M(Oe).x,q[$e].forEach(function(Ke){L[ce]=[Pe,T[x.get(Ke)]],P[ce]=[b[x.get(Ke)],T[x.get(Ke)]],ce++})},"_loop2"),X=0;X0?Pe=b[x.get(at.values().next().value)]:Pe=M(Oe).y,ye[$e].forEach(function(Ke){L[ce]=[b[x.get(Ke)],Pe],P[ce]=[b[x.get(Ke)],T[x.get(Ke)]],ce++})},"_loop3"),Ge=0;GeW&&(W=z[j].length,H=j);if(W0){var Re={x:0,y:0};y.fixedNodeConstraint.forEach(function(ce,q){var de={x:b[x.get(ce.nodeId)],y:T[x.get(ce.nodeId)]},X=ce.position,ye=A(X,de);Re.x+=ye.x,Re.y+=ye.y}),Re.x/=y.fixedNodeConstraint.length,Re.y/=y.fixedNodeConstraint.length,b.forEach(function(ce,q){b[q]+=Re.x}),T.forEach(function(ce,q){T[q]+=Re.y}),y.fixedNodeConstraint.forEach(function(ce){b[x.get(ce.nodeId)]=ce.position.x,T[x.get(ce.nodeId)]=ce.position.y})}if(y.alignmentConstraint){if(y.alignmentConstraint.vertical)for(var Z=y.alignmentConstraint.vertical,ae=s(function(q){var de=new Set;Z[q].forEach(function(K){de.add(K)});var X=new Set([].concat(u(de)).filter(function(K){return $.has(K)})),ye=void 0;X.size>0?ye=b[x.get(X.values().next().value)]:ye=M(de).x,de.forEach(function(K){$.has(K)||(b[x.get(K)]=ye)})},"_loop4"),ie=0;ie0?ye=T[x.get(X.values().next().value)]:ye=M(de).y,de.forEach(function(K){$.has(K)||(T[x.get(K)]=ye)})},"_loop5"),ne=0;ne{a.exports=e})},r={};function n(a){var o=r[a];if(o!==void 0)return o.exports;var l=r[a]={exports:{}};return t[a](l,l.exports,n),l.exports}s(n,"__webpack_require__");var i=n(45);return i})()})});var J7e=ho((ek,jU)=>{"use strict";s((function(t,r){typeof ek=="object"&&typeof jU=="object"?jU.exports=r(YU()):typeof define=="function"&&define.amd?define(["cose-base"],r):typeof ek=="object"?ek.cytoscapeFcose=r(YU()):t.cytoscapeFcose=r(t.coseBase)}),"webpackUniversalModuleDefinition")(ek,function(e){return(()=>{"use strict";var t={658:(a=>{a.exports=Object.assign!=null?Object.assign.bind(Object):function(o){for(var l=arguments.length,u=Array(l>1?l-1:0),h=1;h{var u=(function(){function f(p,m){var g=[],y=!0,v=!1,x=void 0;try{for(var b=p[Symbol.iterator](),T;!(y=(T=b.next()).done)&&(g.push(T.value),!(m&&g.length===m));y=!0);}catch(w){v=!0,x=w}finally{try{!y&&b.return&&b.return()}finally{if(v)throw x}}return g}return s(f,"sliceIterator"),function(p,m){if(Array.isArray(p))return p;if(Symbol.iterator in Object(p))return f(p,m);throw new TypeError("Invalid attempt to destructure non-iterable instance")}})(),h=l(140).layoutBase.LinkedList,d={};d.getTopMostNodes=function(f){for(var p={},m=0;m0&&B.merge(V)});for(var O=0;O1){T=x[0],w=T.connectedEdges().length,x.forEach(function(P){P.connectedEdges().length0&&g.set("dummy"+(g.size+1),S),A},d.relocateComponent=function(f,p,m){if(!m.fixedNodeConstraint){var g=Number.POSITIVE_INFINITY,y=Number.NEGATIVE_INFINITY,v=Number.POSITIVE_INFINITY,x=Number.NEGATIVE_INFINITY;if(m.quality=="draft"){var b=!0,T=!1,w=void 0;try{for(var C=p.nodeIndexes[Symbol.iterator](),k;!(b=(k=C.next()).done);b=!0){var S=k.value,A=u(S,2),M=A[0],N=A[1],D=m.cy.getElementById(M);if(D){var R=D.boundingBox(),E=p.xCoords[N]-R.w/2,I=p.xCoords[N]+R.w/2,L=p.yCoords[N]-R.h/2,P=p.yCoords[N]+R.h/2;Ey&&(y=I),Lx&&(x=P)}}}catch(V){T=!0,w=V}finally{try{!b&&C.return&&C.return()}finally{if(T)throw w}}var B=f.x-(y+g)/2,O=f.y-(x+v)/2;p.xCoords=p.xCoords.map(function(V){return V+B}),p.yCoords=p.yCoords.map(function(V){return V+O})}else{Object.keys(p).forEach(function(V){var z=p[V],W=z.getRect().x,H=z.getRect().x+z.getRect().width,j=z.getRect().y,Q=z.getRect().y+z.getRect().height;Wy&&(y=H),jx&&(x=Q)});var $=f.x-(y+g)/2,G=f.y-(x+v)/2;Object.keys(p).forEach(function(V){var z=p[V];z.setCenter(z.getCenterX()+$,z.getCenterY()+G)})}}},d.calcBoundingBox=function(f,p,m,g){for(var y=Number.MAX_SAFE_INTEGER,v=Number.MIN_SAFE_INTEGER,x=Number.MAX_SAFE_INTEGER,b=Number.MIN_SAFE_INTEGER,T=void 0,w=void 0,C=void 0,k=void 0,S=f.descendants().not(":parent"),A=S.length,M=0;MT&&(y=T),vC&&(x=C),b{var u=l(548),h=l(140).CoSELayout,d=l(140).CoSENode,f=l(140).layoutBase.PointD,p=l(140).layoutBase.DimensionD,m=l(140).layoutBase.LayoutConstants,g=l(140).layoutBase.FDLayoutConstants,y=l(140).CoSEConstants,v=s(function(b,T){var w=b.cy,C=b.eles,k=C.nodes(),S=C.edges(),A=void 0,M=void 0,N=void 0,D={};b.randomize&&(A=T.nodeIndexes,M=T.xCoords,N=T.yCoords);var R=s(function(V){return typeof V=="function"},"isFn"),E=s(function(V,z){return R(V)?V(z):V},"optFn"),I=u.calcParentsWithoutChildren(w,C),L=s(function G(V,z,W,H){for(var j=z.length,Q=0;Q0){var oe=void 0;oe=W.getGraphManager().add(W.newGraph(),J),G(oe,ue,W,H)}}},"processChildrenList"),P=s(function(V,z,W){for(var H=0,j=0,Q=0;Q0?y.DEFAULT_EDGE_LENGTH=g.DEFAULT_EDGE_LENGTH=H/j:R(b.idealEdgeLength)?y.DEFAULT_EDGE_LENGTH=g.DEFAULT_EDGE_LENGTH=50:y.DEFAULT_EDGE_LENGTH=g.DEFAULT_EDGE_LENGTH=b.idealEdgeLength,y.MIN_REPULSION_DIST=g.MIN_REPULSION_DIST=g.DEFAULT_EDGE_LENGTH/10,y.DEFAULT_RADIAL_SEPARATION=g.DEFAULT_EDGE_LENGTH)},"processEdges"),B=s(function(V,z){z.fixedNodeConstraint&&(V.constraints.fixedNodeConstraint=z.fixedNodeConstraint),z.alignmentConstraint&&(V.constraints.alignmentConstraint=z.alignmentConstraint),z.relativePlacementConstraint&&(V.constraints.relativePlacementConstraint=z.relativePlacementConstraint)},"processConstraints");b.nestingFactor!=null&&(y.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=g.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=b.nestingFactor),b.gravity!=null&&(y.DEFAULT_GRAVITY_STRENGTH=g.DEFAULT_GRAVITY_STRENGTH=b.gravity),b.numIter!=null&&(y.MAX_ITERATIONS=g.MAX_ITERATIONS=b.numIter),b.gravityRange!=null&&(y.DEFAULT_GRAVITY_RANGE_FACTOR=g.DEFAULT_GRAVITY_RANGE_FACTOR=b.gravityRange),b.gravityCompound!=null&&(y.DEFAULT_COMPOUND_GRAVITY_STRENGTH=g.DEFAULT_COMPOUND_GRAVITY_STRENGTH=b.gravityCompound),b.gravityRangeCompound!=null&&(y.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=g.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=b.gravityRangeCompound),b.initialEnergyOnIncremental!=null&&(y.DEFAULT_COOLING_FACTOR_INCREMENTAL=g.DEFAULT_COOLING_FACTOR_INCREMENTAL=b.initialEnergyOnIncremental),b.tilingCompareBy!=null&&(y.TILING_COMPARE_BY=b.tilingCompareBy),b.quality=="proof"?m.QUALITY=2:m.QUALITY=0,y.NODE_DIMENSIONS_INCLUDE_LABELS=g.NODE_DIMENSIONS_INCLUDE_LABELS=m.NODE_DIMENSIONS_INCLUDE_LABELS=b.nodeDimensionsIncludeLabels,y.DEFAULT_INCREMENTAL=g.DEFAULT_INCREMENTAL=m.DEFAULT_INCREMENTAL=!b.randomize,y.ANIMATE=g.ANIMATE=m.ANIMATE=b.animate,y.TILE=b.tile,y.TILING_PADDING_VERTICAL=typeof b.tilingPaddingVertical=="function"?b.tilingPaddingVertical.call():b.tilingPaddingVertical,y.TILING_PADDING_HORIZONTAL=typeof b.tilingPaddingHorizontal=="function"?b.tilingPaddingHorizontal.call():b.tilingPaddingHorizontal,y.DEFAULT_INCREMENTAL=g.DEFAULT_INCREMENTAL=m.DEFAULT_INCREMENTAL=!0,y.PURE_INCREMENTAL=!b.randomize,m.DEFAULT_UNIFORM_LEAF_NODE_SIZES=b.uniformNodeDimensions,b.step=="transformed"&&(y.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,y.ENFORCE_CONSTRAINTS=!1,y.APPLY_LAYOUT=!1),b.step=="enforced"&&(y.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,y.ENFORCE_CONSTRAINTS=!0,y.APPLY_LAYOUT=!1),b.step=="cose"&&(y.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,y.ENFORCE_CONSTRAINTS=!1,y.APPLY_LAYOUT=!0),b.step=="all"&&(b.randomize?y.TRANSFORM_ON_CONSTRAINT_HANDLING=!0:y.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,y.ENFORCE_CONSTRAINTS=!0,y.APPLY_LAYOUT=!0),b.fixedNodeConstraint||b.alignmentConstraint||b.relativePlacementConstraint?y.TREE_REDUCTION_ON_INCREMENTAL=!1:y.TREE_REDUCTION_ON_INCREMENTAL=!0;var O=new h,$=O.newGraphManager();return L($.addRoot(),u.getTopMostNodes(k),O,b),P(O,$,S),B(O,b),O.runLayout(),D},"coseLayout");a.exports={coseLayout:v}}),212:((a,o,l)=>{var u=(function(){function b(T,w){for(var C=0;C0)if(P){var $=f.getTopMostNodes(C.eles.nodes());if(R=f.connectComponents(k,C.eles,$),R.forEach(function(We){var pe=We.boundingBox();E.push({x:pe.x1+pe.w/2,y:pe.y1+pe.h/2})}),C.randomize&&R.forEach(function(We){C.eles=We,A.push(m(C))}),C.quality=="default"||C.quality=="proof"){var G=k.collection();if(C.tile){var V=new Map,z=[],W=[],H=0,j={nodeIndexes:V,xCoords:z,yCoords:W},Q=[];if(R.forEach(function(We,pe){We.edges().length==0&&(We.nodes().forEach(function(_e,Ee){G.merge(We.nodes()[Ee]),_e.isParent()||(j.nodeIndexes.set(We.nodes()[Ee].id(),H++),j.xCoords.push(We.nodes()[0].position().x),j.yCoords.push(We.nodes()[0].position().y))}),Q.push(pe))}),G.length>1){var U=G.boundingBox();E.push({x:U.x1+U.w/2,y:U.y1+U.h/2}),R.push(G),A.push(j);for(var ue=Q.length-1;ue>=0;ue--)R.splice(Q[ue],1),A.splice(Q[ue],1),E.splice(Q[ue],1)}}R.forEach(function(We,pe){C.eles=We,D.push(y(C,A[pe])),f.relocateComponent(E[pe],D[pe],C)})}else R.forEach(function(We,pe){f.relocateComponent(E[pe],A[pe],C)});var J=new Set;if(R.length>1){var he=[],se=S.filter(function(We){return We.css("display")=="none"});R.forEach(function(We,pe){var _e=void 0;if(C.quality=="draft"&&(_e=A[pe].nodeIndexes),We.nodes().not(se).length>0){var Ee={};Ee.edges=[],Ee.nodes=[];var Re=void 0;We.nodes().not(se).forEach(function(Z){if(C.quality=="draft")if(!Z.isParent())Re=_e.get(Z.id()),Ee.nodes.push({x:A[pe].xCoords[Re]-Z.boundingbox().w/2,y:A[pe].yCoords[Re]-Z.boundingbox().h/2,width:Z.boundingbox().w,height:Z.boundingbox().h});else{var ae=f.calcBoundingBox(Z,A[pe].xCoords,A[pe].yCoords,_e);Ee.nodes.push({x:ae.topLeftX,y:ae.topLeftY,width:ae.width,height:ae.height})}else D[pe][Z.id()]&&Ee.nodes.push({x:D[pe][Z.id()].getLeft(),y:D[pe][Z.id()].getTop(),width:D[pe][Z.id()].getWidth(),height:D[pe][Z.id()].getHeight()})}),We.edges().forEach(function(Z){var ae=Z.source(),ie=Z.target();if(ae.css("display")!="none"&&ie.css("display")!="none")if(C.quality=="draft"){var le=_e.get(ae.id()),ve=_e.get(ie.id()),ne=[],Me=[];if(ae.isParent()){var re=f.calcBoundingBox(ae,A[pe].xCoords,A[pe].yCoords,_e);ne.push(re.topLeftX+re.width/2),ne.push(re.topLeftY+re.height/2)}else ne.push(A[pe].xCoords[le]),ne.push(A[pe].yCoords[le]);if(ie.isParent()){var ce=f.calcBoundingBox(ie,A[pe].xCoords,A[pe].yCoords,_e);Me.push(ce.topLeftX+ce.width/2),Me.push(ce.topLeftY+ce.height/2)}else Me.push(A[pe].xCoords[ve]),Me.push(A[pe].yCoords[ve]);Ee.edges.push({startX:ne[0],startY:ne[1],endX:Me[0],endY:Me[1]})}else D[pe][ae.id()]&&D[pe][ie.id()]&&Ee.edges.push({startX:D[pe][ae.id()].getCenterX(),startY:D[pe][ae.id()].getCenterY(),endX:D[pe][ie.id()].getCenterX(),endY:D[pe][ie.id()].getCenterY()})}),Ee.nodes.length>0&&(he.push(Ee),J.add(pe))}});var oe=L.packComponents(he,C.randomize).shifts;if(C.quality=="draft")A.forEach(function(We,pe){var _e=We.xCoords.map(function(Re){return Re+oe[pe].dx}),Ee=We.yCoords.map(function(Re){return Re+oe[pe].dy});We.xCoords=_e,We.yCoords=Ee});else{var Se=0;J.forEach(function(We){Object.keys(D[We]).forEach(function(pe){var _e=D[We][pe];_e.setCenter(_e.getCenterX()+oe[Se].dx,_e.getCenterY()+oe[Se].dy)}),Se++})}}}else{var B=C.eles.boundingBox();if(E.push({x:B.x1+B.w/2,y:B.y1+B.h/2}),C.randomize){var O=m(C);A.push(O)}C.quality=="default"||C.quality=="proof"?(D.push(y(C,A[0])),f.relocateComponent(E[0],D[0],C)):f.relocateComponent(E[0],A[0],C)}var xe=s(function(pe,_e){if(C.quality=="default"||C.quality=="proof"){typeof pe=="number"&&(pe=_e);var Ee=void 0,Re=void 0,Z=pe.data("id");return D.forEach(function(ie){Z in ie&&(Ee={x:ie[Z].getRect().getCenterX(),y:ie[Z].getRect().getCenterY()},Re=ie[Z])}),C.nodeDimensionsIncludeLabels&&(Re.labelWidth&&(Re.labelPosHorizontal=="left"?Ee.x+=Re.labelWidth/2:Re.labelPosHorizontal=="right"&&(Ee.x-=Re.labelWidth/2)),Re.labelHeight&&(Re.labelPosVertical=="top"?Ee.y+=Re.labelHeight/2:Re.labelPosVertical=="bottom"&&(Ee.y-=Re.labelHeight/2))),Ee==null&&(Ee={x:pe.position("x"),y:pe.position("y")}),{x:Ee.x,y:Ee.y}}else{var ae=void 0;return A.forEach(function(ie){var le=ie.nodeIndexes.get(pe.id());le!=null&&(ae={x:ie.xCoords[le],y:ie.yCoords[le]})}),ae==null&&(ae={x:pe.position("x"),y:pe.position("y")}),{x:ae.x,y:ae.y}}},"getPositions");if(C.quality=="default"||C.quality=="proof"||C.randomize){var Ne=f.calcParentsWithoutChildren(k,S),Ye=S.filter(function(We){return We.css("display")=="none"});C.eles=S.not(Ye),S.nodes().not(":parent").not(Ye).layoutPositions(w,C,xe),Ne.length>0&&Ne.forEach(function(We){We.position(xe(We))})}else console.log("If randomize option is set to false, then quality option must be 'default' or 'proof'.")},"run")}]),b})();a.exports=x}),657:((a,o,l)=>{var u=l(548),h=l(140).layoutBase.Matrix,d=l(140).layoutBase.SVD,f=s(function(m){var g=m.cy,y=m.eles,v=y.nodes(),x=y.nodes(":parent"),b=new Map,T=new Map,w=new Map,C=[],k=[],S=[],A=[],M=[],N=[],D=[],R=[],E=void 0,I=void 0,L=1e8,P=1e-9,B=m.piTol,O=m.samplingType,$=m.nodeSeparation,G=void 0,V=s(function(){for(var de=0,X=0,ye=!1;X=Ge;){$e=K[Ge++];for(var Be=C[$e],Xe=0;XePe&&(Pe=M[vt],Ke=vt)}return Ke},"BFS"),W=s(function(de){var X=void 0;if(de){X=Math.floor(Math.random()*I),E=X;for(var K=0;K=1)break;Pe=at}for(var Be=0;Be=1)break;Pe=at}for(var be=0;be0&&(X.isParent()?C[de].push(w.get(X.id())):C[de].push(X.id()))})});var Ne=s(function(de){var X=T.get(de),ye=void 0;b.get(de).forEach(function(K){g.getElementById(K).isParent()?ye=w.get(K):ye=K,C[X].push(ye),C[T.get(ye)].push(de)})},"_loop"),Ye=!0,We=!1,pe=void 0;try{for(var _e=b.keys()[Symbol.iterator](),Ee;!(Ye=(Ee=_e.next()).done);Ye=!0){var Re=Ee.value;Ne(Re)}}catch(q){We=!0,pe=q}finally{try{!Ye&&_e.return&&_e.return()}finally{if(We)throw pe}}I=T.size;var Z=void 0;if(I>2){G=I{var u=l(212),h=s(function(f){f&&f("layout","fcose",u)},"register");typeof cytoscape<"u"&&h(cytoscape),a.exports=h}),140:(a=>{a.exports=e})},r={};function n(a){var o=r[a];if(o!==void 0)return o.exports;var l=r[a]={exports:{}};return t[a](l,l.exports,n),l.exports}s(n,"__webpack_require__");var i=n(579);return i})()})});function XU(e,t){if(e===0)return t();let r=Math.random,n=e>>>0;Math.random=function(){n=n+1831565813>>>0;let i=n;return i=Math.imul(i^i>>>15,i|1),i^=i+Math.imul(i^i>>>7,i|61),((i^i>>>14)>>>0)/4294967296};try{return t()}finally{Math.random=r}}var e8e=F(()=>{"use strict";s(XU,"withSeededRandom")});var Ev,zg,KU=F(()=>{"use strict";ml();Ev=s(e=>`${e}`,"wrapIcon"),zg={prefix:"mermaid-architecture",height:80,width:80,icons:{database:{body:Ev('')},server:{body:Ev('')},disk:{body:Ev('')},internet:{body:Ev('')},cloud:{body:Ev('')},unknown:OD,blank:{body:Ev("")}}}});var t8e,r8e,n8e,i8e,a8e=F(()=>{"use strict";Zt();qo();ml();Gr();KU();S_();Qt();t8e=s(async function(e,t,r,n){let i=r.getConfigField("padding"),a=r.getConfigField("iconSize"),o=a/2,l=a/6,u=l/2;await Promise.all(t.edges().map(async h=>{let{source:d,sourceDir:f,sourceArrow:p,sourceGroup:m,target:g,targetDir:y,targetArrow:v,targetGroup:x,label:b}=w_(h),{x:T,y:w}=h[0].sourceEndpoint(),{x:C,y:k}=h[0].midpoint(),{x:S,y:A}=h[0].targetEndpoint(),M=i+4;if(m&&(ts(f)?T+=f==="L"?-M:M:w+=f==="T"?-M:M+18),x&&(ts(y)?S+=y==="L"?-M:M:A+=y==="T"?-M:M+18),!m&&r.getNode(d)?.type==="junction"&&(ts(f)?T+=f==="L"?o:-o:w+=f==="T"?o:-o),!x&&r.getNode(g)?.type==="junction"&&(ts(y)?S+=y==="L"?o:-o:A+=y==="T"?o:-o),h[0]._private.rscratch){let N=e.insert("g");if(N.insert("path").attr("d",`M ${T},${w} L ${C},${k} L${S},${A} `).attr("class","edge").attr("id",`${n}-${xc(d,g,{prefix:"L"})}`),p){let D=ts(f)?XC[f](T,l):T-u,R=du(f)?XC[f](w,l):w-u;N.insert("polygon").attr("points",GU[f](l)).attr("transform",`translate(${D},${R})`).attr("class","arrow")}if(v){let D=ts(y)?XC[y](S,l):S-u,R=du(y)?XC[y](A,l):A-u;N.insert("polygon").attr("points",GU[y](l)).attr("transform",`translate(${D},${R})`).attr("class","arrow")}if(b){let D=KC(f,y)?"XY":ts(f)?"X":"Y",R=0;D==="X"?R=Math.abs(T-S):D==="Y"?R=Math.abs(w-A)/1.5:R=Math.abs(T-S)/2;let E=N.append("g");if(await li(E,b,{useHtmlLabels:!1,width:R,classes:"architecture-service-label"},Le()),E.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle"),D==="X")E.attr("transform","translate("+C+", "+k+")");else if(D==="Y")E.attr("transform","translate("+C+", "+k+") rotate(-90)");else if(D==="XY"){let I=ZC(f,y);if(I&&q7e(I)){let L=E.node().getBoundingClientRect(),[P,B]=U7e(I);E.attr("dominant-baseline","auto").attr("transform",`rotate(${-1*P*B*45})`);let O=E.node().getBoundingClientRect();E.attr("transform",` + translate(${C}, ${k-L.height/2}) + translate(${P*O.width/2}, ${B*O.height/2}) + rotate(${-1*P*B*45}, 0, ${L.height/2}) + `)}}}}}))},"drawEdges"),r8e=s(async function(e,t,r,n){let a=r.getConfigField("padding")*.75,o=r.getConfigField("fontSize"),u=r.getConfigField("iconSize")/2;await Promise.all(t.nodes().map(async h=>{let d=Xf(h);if(d.type==="group"){let{h:f,w:p,x1:m,y1:g}=h.boundingBox(),y=e.append("rect");y.attr("id",`${n}-group-${d.id}`).attr("x",m+u).attr("y",g+u).attr("width",p).attr("height",f).attr("class","node-bkg");let v=e.append("g"),x=m,b=g;if(d.icon){let T=v.append("g");T.html(`${await Va(d.icon,{height:a,width:a,fallbackPrefix:zg.prefix})}`),T.attr("transform","translate("+(x+u+1)+", "+(b+u+1)+")"),x+=a,b+=o/2-1-2}if(d.label){let T=v.append("g");await li(T,d.label,{useHtmlLabels:!1,width:p,classes:"architecture-service-label"},Le()),T.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","start").attr("text-anchor","start"),T.attr("transform","translate("+(x+u+4)+", "+(b+u+2)+")")}r.setElementForId(d.id,y)}}))},"drawGroups"),n8e=s(async function(e,t,r,n){let i=Le();for(let a of r){let o=t.append("g"),l=e.getConfigField("iconSize");if(a.title){let f=o.append("g");await li(f,a.title,{useHtmlLabels:!1,width:l*1.5,classes:"architecture-service-label"},i),f.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle"),f.attr("transform","translate("+l/2+", "+l+")")}let u=o.append("g");if(a.icon)u.html(`${await Va(a.icon,{height:l,width:l,fallbackPrefix:zg.prefix})}`);else if(a.iconText){u.html(`${await Va("blank",{height:l,width:l,fallbackPrefix:zg.prefix})}`);let m=u.append("g").append("foreignObject").attr("width",l).attr("height",l).append("div").attr("class","node-icon-text").attr("style",`height: ${l}px;`).append("div").html(vr(a.iconText,i)),g=parseInt(window.getComputedStyle(m.node(),null).getPropertyValue("font-size").replace(/\D/g,""))??16;m.attr("style",`-webkit-line-clamp: ${Math.floor((l-2)/g)};`)}else u.append("path").attr("class","node-bkg").attr("id",`${n}-node-${a.id}`).attr("d",`M0,${l} V5 Q0,0 5,0 H${l-5} Q${l},0 ${l},5 V${l} Z`);o.attr("id",`${n}-service-${a.id}`).attr("class","architecture-service");let{width:h,height:d}=o.node().getBBox();a.width=h,a.height=d,e.setElementForId(a.id,o)}return 0},"drawServices"),i8e=s(function(e,t,r,n){r.forEach(i=>{let a=t.append("g"),o=e.getConfigField("iconSize");a.append("g").append("rect").attr("id",`${n}-node-${i.id}`).attr("fill-opacity","0").attr("width",o).attr("height",o),a.attr("class","architecture-junction");let{width:u,height:h}=a._groups[0][0].getBBox();a.width=u,a.height=h,e.setElementForId(i.id,a)})},"drawJunctions")});function hwt(e,t,r){e.forEach(n=>{t.add({group:"nodes",data:{type:"service",id:n.id,icon:n.icon,label:n.title,parent:n.in,width:r.getConfigField("iconSize"),height:r.getConfigField("iconSize")},classes:"node-service"})})}function dwt(e,t,r){e.forEach(n=>{t.add({group:"nodes",data:{type:"junction",id:n.id,parent:n.in,width:r.getConfigField("iconSize"),height:r.getConfigField("iconSize")},classes:"node-junction"})})}function fwt(e,t){t.nodes().map(r=>{let n=Xf(r);if(n.type==="group")return;n.x=r.position().x,n.y=r.position().y,e.getElementById(n.id).attr("transform","translate("+(n.x||0)+","+(n.y||0)+")")})}function pwt(e,t){e.forEach(r=>{t.add({group:"nodes",data:{type:"group",id:r.id,icon:r.icon,label:r.title,parent:r.in},classes:"node-group"})})}function mwt(e,t){e.forEach(r=>{let{lhsId:n,rhsId:i,lhsInto:a,lhsGroup:o,rhsInto:l,lhsDir:u,rhsDir:h,rhsGroup:d,title:f}=r,p=KC(r.lhsDir,r.rhsDir)?"segments":"straight",m={id:`${n}-${i}`,label:f,source:n,sourceDir:u,sourceArrow:a,sourceGroup:o,sourceEndpoint:u==="L"?"0 50%":u==="R"?"100% 50%":u==="T"?"50% 0":"50% 100%",target:i,targetDir:h,targetArrow:l,targetGroup:d,targetEndpoint:h==="L"?"0 50%":h==="R"?"100% 50%":h==="T"?"50% 0":"50% 100%"};t.add({group:"edges",data:m,classes:p})})}function gwt(e,t,r,n=[]){let i=s((p,m)=>Object.entries(p).reduce((g,[y,v])=>{let x=0,b=Object.entries(v);if(b.length===1)return g[y]=b[0][1],g;for(let T=0;T{let m={},g={};return Object.entries(p).forEach(([y,[v,x]])=>{let b=e.getNode(y)?.in??"default";m[x]??={},m[x][b]??=[],m[x][b].push(y),g[v]??={},g[v][b]??=[],g[v][b].push(y)}),{horiz:Object.values(i(m,"horizontal")).filter(y=>y.length>1),vert:Object.values(i(g,"vertical")).filter(y=>y.length>1)}}),[o,l]=a.reduce(([p,m],{horiz:g,vert:y})=>[[...p,...g],[...m,...y]],[[],[]]),u=new Set;n.forEach(p=>p.members.forEach(m=>u.add(m)));let h=s(p=>p.filter(m=>!m.some(g=>u.has(g))),"dropOverlapping"),d=h(o),f=h(l);return n.forEach(p=>{p.members.length<2||(p.direction==="row"?d.push([...p.members]):f.push([...p.members]))}),{horizontal:d,vertical:f}}function ywt(e,t,r=[]){let n=[],i=t.getConfigField("iconSize"),a=t.getConfigField("idealEdgeLengthMultiplier"),o=a*i,l=new Set;r.forEach(d=>{for(let f=0;f`${d[0]},${d[1]}`,"posToStr"),h=s(d=>d.split(",").map(f=>parseInt(f)),"strToPos");return e.forEach(d=>{let f=Object.fromEntries(Object.entries(d).map(([y,v])=>[u(v),y])),p=[u([0,0])],m={},g={L:[-1,0],R:[1,0],T:[0,1],B:[0,-1]};for(;p.length>0;){let y=p.shift();if(y){m[y]=1;let v=f[y];if(v){let x=h(y);Object.entries(g).forEach(([b,T])=>{let w=u([x[0]+T[0],x[1]+T[1]]),C=f[w];if(C&&!m[w]){if(p.push(w),l.has(`${v}|${C}`))return;n.push({[FU[b]]:C,[FU[W7e(b)]]:v,gap:a*i})}})}}}}),n}function vwt(e,t,r,n,i,{spatialMaps:a,groupAlignments:o}){return new Promise(l=>{let u=lt("body").append("div").attr("id","cy").attr("style","display:none"),h=nl({container:document.getElementById("cy"),style:[{selector:"edge",style:{"curve-style":"straight","source-endpoint":"data(sourceEndpoint)","target-endpoint":"data(targetEndpoint)"}},{selector:"edge[label]",style:{label:"data(label)"}},{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":`${i.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:`${i.getConfigField("padding")}px`}}],layout:{name:"grid",boundingBox:{x1:0,x2:100,y1:0,y2:100}}});u.remove(),pwt(r,h),hwt(e,h,i),dwt(t,h,i),mwt(n,h);let d=i.getLayoutHints(),f=gwt(i,a,o,d),p=ywt(a,i,d),m=i.getConfigField("iconSize"),g=i.getConfigField("idealEdgeLengthMultiplier")*m,y=.5*m,v=i.getConfigField("edgeElasticity"),x=i.getConfigField("seed"),b=h.layout({name:"fcose",quality:"proof",randomize:i.getConfigField("randomize"),nodeSeparation:i.getConfigField("nodeSeparation"),numIter:i.getConfigField("numIter"),styleEnabled:!1,animate:!1,nodeDimensionsIncludeLabels:!1,idealEdgeLength(T){let[w,C]=T.connectedNodes(),{parent:k}=Xf(w),{parent:S}=Xf(C);return k===S?g:y},edgeElasticity(T){let[w,C]=T.connectedNodes(),{parent:k}=Xf(w),{parent:S}=Xf(C);return k===S?v:.001},alignmentConstraint:f,relativePlacementConstraint:p});b.one("layoutstop",()=>{function T(w,C,k,S){let A,M,{x:N,y:D}=w,{x:R,y:E}=C;M=(S-D+(N-k)*(D-E)/(N-R))/Math.sqrt(1+Math.pow((D-E)/(N-R),2)),A=Math.sqrt(Math.pow(S-D,2)+Math.pow(k-N,2)-Math.pow(M,2));let I=Math.sqrt(Math.pow(R-N,2)+Math.pow(E-D,2));A=A/I;let L=(R-N)*(S-D)-(E-D)*(k-N);switch(!0){case L>=0:L=1;break;case L<0:L=-1;break}let P=(R-N)*(k-N)+(E-D)*(S-D);switch(!0){case P>=0:P=1;break;case P<0:P=-1;break}return M=Math.abs(M)*L,A=A*P,{distances:M,weights:A}}s(T,"getSegmentWeights"),h.startBatch();for(let w of Object.values(h.edges()))if(w.data?.()){let{x:C,y:k}=w.source().position(),{x:S,y:A}=w.target().position();if(C!==S&&k!==A){let M=w.sourceEndpoint(),N=w.targetEndpoint(),{sourceDir:D}=w_(w),[R,E]=du(D)?[M.x,N.y]:[N.x,M.y],{weights:I,distances:L}=T(M,N,R,E);w.style("segment-distances",L),w.style("segment-weights",I)}}h.endBatch(),XU(x,()=>b.run())});try{XU(x,()=>b.run())}catch(T){throw T instanceof RangeError&&T.message.includes("Invalid array length")?new Error("Architecture layout failed: a declared `align row|column` directive likely contradicts the edge directions, or two declared alignments overlap on a shared node. Check that the order of members in each `align` chain is consistent with the edges between them, and that no node appears in two `align` directives along the same axis."):T}h.ready(T=>{te.info("Ready",T),l(h)})})}var s8e,xwt,o8e,l8e=F(()=>{"use strict";w$();s8e=Ms(J7e(),1);e8e();$r();Tt();ml();Ba();Dn();KU();S_();a8e();c0([{name:zg.prefix,icons:zg}]);nl.use(s8e.default);s(hwt,"addServices");s(dwt,"addJunctions");s(fwt,"positionNodes");s(pwt,"addGroups");s(mwt,"addEdges");s(gwt,"getAlignments");s(ywt,"getRelativeConstraints");s(vwt,"layoutArchitecture");xwt=s(async(e,t,r,n)=>{let i=n.db;i.setDiagramId(t);let a=i.getServices(),o=i.getJunctions(),l=i.getGroups(),u=i.getEdges(),h=i.getDataStructures(),d=pn(t),f=d.append("g");f.attr("class","architecture-edges");let p=d.append("g");p.attr("class","architecture-services");let m=d.append("g");m.attr("class","architecture-groups"),await n8e(i,p,a,t),i8e(i,p,o,t);let g=await vwt(a,o,l,u,i,h);await t8e(f,g,i,t),await r8e(m,g,i,t),fwt(i,g),Go(void 0,d,i.getConfigField("padding"),i.getConfigField("useMaxWidth"))},"draw"),o8e={draw:xwt}});var c8e={};ar(c8e,{diagram:()=>bwt});var bwt,u8e=F(()=>{"use strict";K7e();VU();Q7e();l8e();bwt={parser:WU,get db(){return new Sv},renderer:o8e,styles:Z7e}});var ZU,QU,E_,JU,f8e=F(()=>{"use strict";ZU="position frame",QU="frame positioned",E_="position relation",JU="relation positioned"});function Awt(){rY={}}function Lwt(){let e=Iwt,{ast:t}=rY,r=m8e();if(!t)throw new Error("No data for EventModel");return t.frames.forEach((n,i)=>{let a=$wt(n,t.dataEntities,r);e=tY(e,{$kind:ZU,index:i,frame:n,textProps:a});let o;qwt(n)?(te.debug("source frame",n.sourceFrames),o=t.frames.filter(l=>n.sourceFrames.some(u=>u.$refText===l.name)),o.forEach(l=>{e=tY(e,{$kind:E_,index:i,frame:n,sourceFrame:l})})):e=tY(e,{$kind:E_,index:i,frame:n})}),e={...e,sortedSwimlanesArray:g8e(e.swimlanes)},e}function Dwt(e){rY.ast=e}function m8e(){return mn}function Mwt(e){let t=e.split(".");if(t.length===2)return t[0]}function Nwt(e){let t=e.split(".");return t.length===2?t[1]:e}function Pwt(e,t){if(!(!t||t.length===0))return Object.values(e).find(r=>r.namespace===t)}function eY(e,t,r){return Math.max(t,...Object.keys(e).filter(n=>{let i=Number.parseInt(n);return i>t&&iNumber.parseInt(n)))+1}function Owt(e,t){let r=Mwt(e.entityIdentifier),n=Pwt(t,r);switch(e.modelEntityType){case"ui":case"pcr":case"processor":return n?{index:n.index,label:n.namespace||mn.labelUiAutomation}:r?{index:eY(t,0,100),label:mn.labelUiAutomationPrefix+r}:{index:0,label:mn.labelUiAutomation};case"rmo":case"readmodel":case"cmd":case"command":return n?{index:n.index,label:n.namespace||mn.labelCommandReadModel}:r?{index:eY(t,100,200),label:mn.labelCommandReadModelPrefix+r}:{index:100,label:mn.labelCommandReadModel};case"evt":case"event":default:return n?{index:n.index,label:n.namespace||mn.labelEvents}:r?{index:eY(t,200,300),label:mn.labelEventsPrefix+r}:{index:200,label:mn.labelEvents}}}function Bwt(e){let{themeVariables:t}=Lt();switch(e.modelEntityType){case"ui":return{fill:t.emUiFill??"white",stroke:t.emUiStroke??"#dbdada"};case"pcr":case"processor":return{fill:t.emProcessorFill??"#edb3f6",stroke:t.emProcessorStroke??"#b88cbf"};case"rmo":case"readmodel":return{fill:t.emReadModelFill??"#d3f1a2",stroke:t.emReadModelStroke??"#a3b732"};case"cmd":case"command":return{fill:t.emCommandFill??"#bcd6fe",stroke:t.emCommandStroke??"#679ac3"};case"evt":case"event":return{fill:t.emEventFill??"#ffb778",stroke:t.emEventStroke??"#c19a0f"};default:return{fill:"red",stroke:"black"}}}function $wt(e,t,r){let n=Lt(),i=vr(Nwt(e.entityIdentifier)??"",n),a,o={fontSize:16,fontWeight:700,fontFamily:'"trebuchet ms", verdana, arial, sans-serif',joinWith:"
    "},u=`${Op(i,r.textMaxWidth,o)}`;if(e.dataInlineValue&&(a=e.dataInlineValue,a=a.substring(a.indexOf("{")+1),a=a.substring(0,a.lastIndexOf("}")-1),a=vr(a,n),a=Op(a,r.textMaxWidth,o),a=a.replaceAll(" "," ")),e.dataReference){let g=t.find(y=>y.name===e.dataReference?.$refText);g&&(a=g.dataBlockValue,a=a.substring(a.indexOf(`{ +`)+2),a=a.substring(0,a.lastIndexOf("}")-1),a=vr(a,n),a=Op(a,r.textMaxWidth,o),a=a.replaceAll(" "," "),a+="
    ")}let h=a!==void 0;h&&(u+=`

    ${a}`);let d={fontSize:o.fontSize,fontWeight:o.fontWeight,fontFamily:o.fontFamily},f=Db(u,d),p=h?f.width/3:f.width,m={content:u,width:p,height:f.height};return te.debug(`[${e.name}] ${e.entityIdentifier} text`,m),m}function Fwt(e,t){let r=t,n=Bwt(r.frame),i={width:r.textProps.width+2*mn.boxTextPadding,height:r.textProps.height+2*mn.boxTextPadding};return[{$kind:QU,frame:r.frame,index:r.index,visual:n,dimension:i,textProps:r.textProps}]}function Gwt(e,t,r){return t===void 0?mn.contentStartX:t.index===e.index&&e.r?e.r+mn.boxPadding:r===void 0?mn.contentStartX:r.r-mn.boxOverlap+mn.boxPadding}function zwt(e,t){let r=[...e.map(n=>n.r),t];return Math.max(...r)}function g8e(e){return Object.values(e).sort((t,r)=>t.index-r.index)}function Vwt(e,t){let r=t,n=Owt(r.frame,e.swimlanes),i;n.index in e.swimlanes?i=e.swimlanes[n.index]:i={index:n.index,label:n.label,r:0,y:n.index*mn.swimlaneMinHeight+mn.swimlaneGap,height:mn.swimlaneMinHeight,maxHeight:mn.swimlaneMinHeight};let a=e.boxes.length>0?e.boxes[e.boxes.length-1]:void 0,o=e.previousSwimlaneNumber!==void 0?e.swimlanes[e.previousSwimlaneNumber]:void 0,l={width:Math.max(mn.boxMinWidth,Math.min(mn.boxMaxWidth,r.dimension.width))+2*mn.boxPadding,height:Math.max(mn.boxMinHeight,Math.min(mn.boxMaxHeight,r.dimension.height))+2*mn.boxPadding},u=Gwt(i,o,a),h=u+l.width+mn.boxPadding,d=zwt(Object.values(e.swimlanes),h);i.r=u+l.width,i.maxHeight=Math.max(i.maxHeight,l.height),i.height=Math.max(mn.swimlaneMinHeight,i.maxHeight)+2*mn.swimlanePadding;let f={x:u,y:mn.swimlanePadding+i.y,r:h,dimension:l,leftSibling:!1,swimlane:i,visual:r.visual,text:r.textProps.content,frame:r.frame,index:r.index},p={...e,boxes:[...e.boxes,f],swimlanes:{...e.swimlanes,[`${i.index}`]:i},previousSwimlaneNumber:n.index,previousFrame:r.frame,maxR:d},m=g8e(p.swimlanes);m.length>0&&(m[0].y=0);for(let g=1;g0}function p8e(e,t){if(t!=null)return e.find(r=>r.frame.name===t.name)}function Hwt(e,t,r){if(!(r<0))for(let n=r;n>=0;n--){let i=e[n];if(i.swimlane.index!==t)return i}}function Uwt(e,t){let r=t;if(ZR(r.frame)||Wwt(r.index,r.frame))return[];let n=p8e(e.boxes,r.frame);if(n===void 0)throw new Error(`Target box not found for frame ${r.frame.name}`);let i;return r.sourceFrame?i=p8e(e.boxes,r.sourceFrame):i=Hwt(e.boxes,n.swimlane.index,r.index-1),i===void 0?[]:[{$kind:JU,frame:r.frame,index:r.index,sourceBox:i,targetBox:n}]}function Ywt(e,t){let r=t,n={visual:{fill:"none",stroke:"#000"},source:{x:r.sourceBox.x,y:r.sourceBox.y},target:{x:r.targetBox.x,y:r.targetBox.y},sourceBox:r.sourceBox,targetBox:r.targetBox};return{...e,relations:[...e.relations,n]}}function Kwt(e,t){let r=jwt[t.$kind];if(r==null)return[];let n=r(e,t);return te.debug("decided events",n),n}function Zwt(e,t){let r=t.reduce((n,i)=>{let a=Xwt[i.$kind];return a==null?n:a(n,i)},e);return te.debug("evolve events",{state:e,newState:r,events:t}),r}function tY(e,t){let r=Kwt(e,t);return Zwt(e,r)}var wwt,Swt,Ewt,Rwt,_wt,rY,mn,Iwt,jwt,Xwt,tk,nY=F(()=>{"use strict";Tt();Qt();Qt();mr();An();Gr();Ni();Oa();f8e();wwt=s(function(e){te.debug("options str",e)},"setOptions"),Swt=s(function(){return{}},"getOptions"),Ewt=s(function(){Awt(),gr()},"clear");s(Awt,"reset");Rwt=hr.eventmodeling,_wt=s(()=>Fr({...Rwt,...Lt().eventmodeling}),"getConfig"),rY={};s(Lwt,"getState");s(Dwt,"setAst");mn={swimlaneMinHeight:70,swimlanePadding:15,swimlaneGap:10,boxPadding:10,boxOverlap:90,boxDefaultY:0,boxMinWidth:80,boxMaxWidth:450,boxMinHeight:80,boxMaxHeight:750,contentStartX:250,textMaxWidth:430,boxTextFontWeight:"bold",boxTextPadding:10,swimlaneTextFontWeight:"bold",labelUiAutomation:"UI/Automation",labelUiAutomationPrefix:"UI/A: ",labelCommandReadModel:"Command/Read Model",labelCommandReadModelPrefix:"C/RM: ",labelEvents:"Events",labelEventsPrefix:"Stream: "};s(m8e,"getDiagramProps");Iwt={boxes:[],swimlanes:{},relations:[],maxR:0,sortedSwimlanesArray:[]};s(Mwt,"extractNamespace");s(Nwt,"extractName");s(Pwt,"findSwimlaneByNamespace");s(eY,"findNextAvailableIndex");s(Owt,"calculateSwimlaneProps");s(Bwt,"calculateEntityVisualProps");s($wt,"calculateTextProps");s(Fwt,"decidePositionFrame");s(Gwt,"calculateX");s(zwt,"calculateMaxRight");s(g8e,"sortedSwimlanesArray");s(Vwt,"evolveFramePositioned");s(Wwt,"isFirstFrame");s(qwt,"hasSourceFrame");s(p8e,"findBoxByFrame");s(Hwt,"findBoxByLineIndex");s(Uwt,"decidePositionRelation");s(Ywt,"evolveRelationPositioned");jwt={[ZU]:Fwt,[E_]:Uwt},Xwt={[QU]:Vwt,[JU]:Ywt};s(Kwt,"decide");s(Zwt,"evolve");s(tY,"dispatch");tk={getConfig:_wt,setOptions:wwt,getOptions:Swt,clear:Ewt,setAccTitle:Cr,getAccTitle:Sr,getAccDescription:Ar,setAccDescription:Er,setDiagramTitle:Mr,getDiagramTitle:Rr,setAst:Dwt,getDiagramProps:m8e,getState:Lwt}});var y8e,v8e=F(()=>{"use strict";Oa();Tt();_s();nY();y8e={parse:s(async e=>{let t=await pi("eventmodeling",e);te.debug(t),tk.setAst(t),Nn(t,tk)},"parse")}});function eSt(e,t){return r=>{let n=r.swimlane.y+t.swimlanePadding,i=e.append("g").attr("class","em-box");i.append("rect").attr("x",r.x).attr("y",n).attr("rx","3").attr("width",r.dimension.width).attr("height",r.dimension.height).attr("stroke",r.visual.stroke).attr("fill",r.visual.fill),i.append("foreignObject").attr("x",r.x+t.boxPadding).attr("y",n+10).attr("width",r.dimension.width-2*t.boxPadding).attr("height",r.dimension.height-2*t.boxPadding).append("xhtml:div").style("display","table").style("height","100%").style("width","100%").append("span").style("display","table-cell").style("text-align","center").style("vertical-align","middle").html(r.text)}}function tSt(e,t){return e>t}function rSt(e,t,r,n){return i=>{let a=i.sourceBox.swimlane.y+t.swimlanePadding,o=i.targetBox.swimlane.y+t.swimlanePadding,l=tSt(a,o),u=i.sourceBox.x+i.sourceBox.dimension.width*2/3,h=i.targetBox.x+i.targetBox.dimension.width/3,d,f;te.debug(`rendering relation up=${l} for `,{sourceBox:i.sourceBox,targetBox:i.targetBox}),l?(d=a,f=o+i.targetBox.dimension.height):(d=a+i.sourceBox.dimension.height,f=o);let p=n.emRelationStroke??i.visual.stroke;e.append("path").attr("class","em-relation").attr("fill",i.visual.fill).attr("stroke",p).attr("stroke-width","1").attr("marker-end",`url(#${r})`).attr("d",`M${u} ${d} L${h} ${f}`)}}function nSt(e,t,r,n){return i=>{let a=e.append("g").attr("class","em-swimlane"),o=n.emSwimlaneBackgroundOdd??"rgb(250,250,250)",l=n.emSwimlaneBackgroundStroke??"rgb(240,240,240)";a.append("rect").attr("x",0).attr("y",i.y).attr("rx","3").attr("width",t+r.swimlanePadding).attr("height",i.height).attr("fill",o).attr("stroke",l),a.append("text").attr("font-weight",r.swimlaneTextFontWeight).attr("x",30).attr("y",i.y+30).text(i.label)}}var Qwt,Jwt,iSt,x8e,b8e=F(()=>{"use strict";$r();Zt();Tt();Qwt=Le(),Jwt=Qwt?.eventmodeling;s(eSt,"renderD3Box");s(tSt,"dirUpwards");s(rSt,"renderD3Relation");s(nSt,"renderD3Swimlane");iSt=s(function(e,t,r,n){if(te.debug("in eventmodeling renderer",e+` +`,"id:",t,r),!Jwt)throw new Error("EventModeling config not found");let i=n.db,{themeVariables:a,eventmodeling:o}=Le(),l=lt(`[id="${t}"]`),u=i.getDiagramProps(),h=i.getState(),d=`em-arrowhead-${t}`,f=a.emArrowhead??"#000000";h.sortedSwimlanesArray.forEach(nSt(l,h.maxR,u,a)),h.boxes.forEach(eSt(l,u)),h.relations.forEach(rSt(l,u,d,a)),l.append("defs").append("marker").attr("id",d).attr("markerWidth","10").attr("markerHeight","7").attr("refX","10").attr("refY","3.5").attr("orient","auto").append("polygon").attr("points","0 0, 10 3.5, 0 7").attr("fill",f),Cx(void 0,l,o?.padding??30,o?.useMaxWidth)},"draw"),x8e={draw:iSt}});var aSt,T8e,C8e=F(()=>{"use strict";aSt=s(e=>"","getStyles"),T8e=aSt});var k8e={};ar(k8e,{diagram:()=>sSt});var sSt,w8e=F(()=>{"use strict";v8e();nY();b8e();C8e();sSt={parser:y8e,db:tk,renderer:x8e,styles:T8e}});var iY,A8e,R8e=F(()=>{"use strict";iY=(function(){var e=s(function(x,b,T,w){for(T=T||{},w=x.length;w--;T[x[w]]=b);return T},"o"),t=[1,4],r=[1,14],n=[1,12],i=[1,13],a=[6,7,8],o=[1,20],l=[1,18],u=[1,19],h=[6,7,11],d=[1,6,13,14],f=[1,23],p=[1,24],m=[1,6,7,11,13,14],g={trace:s(function(){},"trace"),yy:{},symbols_:{error:2,start:3,ishikawa:4,spaceLines:5,SPACELINE:6,NL:7,ISHIKAWA:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,TEXT:14,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"ISHIKAWA",11:"EOF",13:"SPACELIST",14:"TEXT"},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,1],[12,1],[12,1]],performAction:s(function(b,T,w,C,k,S,A){var M=S.length-1;switch(k){case 6:case 7:return C;case 15:C.addNode(S[M-1].length,S[M].trim());break;case 16:C.addNode(0,S[M].trim());break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:t},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:t},{6:r,7:[1,10],9:9,12:11,13:n,14:i},e(a,[2,3]),{1:[2,2]},e(a,[2,4]),e(a,[2,5]),{1:[2,6],6:r,12:15,13:n,14:i},{6:r,9:16,12:11,13:n,14:i},{6:o,7:l,10:17,11:u},e(h,[2,18],{14:[1,21]}),e(h,[2,16]),e(h,[2,17]),{6:o,7:l,10:22,11:u},{1:[2,7],6:r,12:15,13:n,14:i},e(d,[2,14],{7:f,11:p}),e(m,[2,8]),e(m,[2,9]),e(m,[2,10]),e(h,[2,15]),e(d,[2,13],{7:f,11:p}),e(m,[2,11]),e(m,[2,12])],defaultActions:{2:[2,1],6:[2,2]},parseError:s(function(b,T){if(T.recoverable)this.trace(b);else{var w=new Error(b);throw w.hash=T,w}},"parseError"),parse:s(function(b){var T=this,w=[0],C=[],k=[null],S=[],A=this.table,M="",N=0,D=0,R=0,E=2,I=1,L=S.slice.call(arguments,1),P=Object.create(this.lexer),B={yy:{}};for(var O in this.yy)Object.prototype.hasOwnProperty.call(this.yy,O)&&(B.yy[O]=this.yy[O]);P.setInput(b,B.yy),B.yy.lexer=P,B.yy.parser=this,typeof P.yylloc>"u"&&(P.yylloc={});var $=P.yylloc;S.push($);var G=P.options&&P.options.ranges;typeof B.yy.parseError=="function"?this.parseError=B.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function V(Ne){w.length=w.length-2*Ne,k.length=k.length-Ne,S.length=S.length-Ne}s(V,"popStack");function z(){var Ne;return Ne=C.pop()||P.lex()||I,typeof Ne!="number"&&(Ne instanceof Array&&(C=Ne,Ne=C.pop()),Ne=T.symbols_[Ne]||Ne),Ne}s(z,"lex");for(var W,H,j,Q,U,ue,J={},he,se,oe,Se;;){if(j=w[w.length-1],this.defaultActions[j]?Q=this.defaultActions[j]:((W===null||typeof W>"u")&&(W=z()),Q=A[j]&&A[j][W]),typeof Q>"u"||!Q.length||!Q[0]){var xe="";Se=[];for(he in A[j])this.terminals_[he]&&he>E&&Se.push("'"+this.terminals_[he]+"'");P.showPosition?xe="Parse error on line "+(N+1)+`: +`+P.showPosition()+` +Expecting `+Se.join(", ")+", got '"+(this.terminals_[W]||W)+"'":xe="Parse error on line "+(N+1)+": Unexpected "+(W==I?"end of input":"'"+(this.terminals_[W]||W)+"'"),this.parseError(xe,{text:P.match,token:this.terminals_[W]||W,line:P.yylineno,loc:$,expected:Se})}if(Q[0]instanceof Array&&Q.length>1)throw new Error("Parse Error: multiple actions possible at state: "+j+", token: "+W);switch(Q[0]){case 1:w.push(W),k.push(P.yytext),S.push(P.yylloc),w.push(Q[1]),W=null,H?(W=H,H=null):(D=P.yyleng,M=P.yytext,N=P.yylineno,$=P.yylloc,R>0&&R--);break;case 2:if(se=this.productions_[Q[1]][1],J.$=k[k.length-se],J._$={first_line:S[S.length-(se||1)].first_line,last_line:S[S.length-1].last_line,first_column:S[S.length-(se||1)].first_column,last_column:S[S.length-1].last_column},G&&(J._$.range=[S[S.length-(se||1)].range[0],S[S.length-1].range[1]]),ue=this.performAction.apply(J,[M,D,N,B.yy,Q[1],k,S].concat(L)),typeof ue<"u")return ue;se&&(w=w.slice(0,-1*se*2),k=k.slice(0,-1*se),S=S.slice(0,-1*se)),w.push(this.productions_[Q[1]][0]),k.push(J.$),S.push(J._$),oe=A[w[w.length-2]][w[w.length-1]],w.push(oe);break;case 3:return!0}}return!0},"parse")},y=(function(){var x={EOF:1,parseError:s(function(T,w){if(this.yy.parser)this.yy.parser.parseError(T,w);else throw new Error(T)},"parseError"),setInput:s(function(b,T){return this.yy=T||this.yy||{},this._input=b,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 b=this._input[0];this.yytext+=b,this.yyleng++,this.offset++,this.match+=b,this.matched+=b;var T=b.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),b},"input"),unput:s(function(b){var T=b.length,w=b.split(/(?:\r\n?|\n)/g);this._input=b+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-T),this.offset-=T;var C=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),w.length-1&&(this.yylineno-=w.length-1);var k=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:w?(w.length===C.length?this.yylloc.first_column:0)+C[C.length-w.length].length-w[0].length:this.yylloc.first_column-T},this.options.ranges&&(this.yylloc.range=[k[0],k[0]+this.yyleng-T]),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(b){this.unput(this.match.slice(b))},"less"),pastInput:s(function(){var b=this.matched.substr(0,this.matched.length-this.match.length);return(b.length>20?"...":"")+b.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:s(function(){var b=this.match;return b.length<20&&(b+=this._input.substr(0,20-b.length)),(b.substr(0,20)+(b.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:s(function(){var b=this.pastInput(),T=new Array(b.length+1).join("-");return b+this.upcomingInput()+` +`+T+"^"},"showPosition"),test_match:s(function(b,T){var w,C,k;if(this.options.backtrack_lexer&&(k={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&&(k.yylloc.range=this.yylloc.range.slice(0))),C=b[0].match(/(?:\r\n?|\n).*/g),C&&(this.yylineno+=C.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:C?C[C.length-1].length-C[C.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+b[0].length},this.yytext+=b[0],this.match+=b[0],this.matches=b,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(b[0].length),this.matched+=b[0],w=this.performAction.call(this,this.yy,this,T,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),w)return w;if(this._backtrack){for(var S in k)this[S]=k[S];return!1}return!1},"test_match"),next:s(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var b,T,w,C;this._more||(this.yytext="",this.match="");for(var k=this._currentRules(),S=0;ST[0].length)){if(T=w,C=S,this.options.backtrack_lexer){if(b=this.test_match(w,k[S]),b!==!1)return b;if(this._backtrack){T=!1;continue}else return!1}else if(!this.options.flex)break}return T?(b=this.test_match(T,k[C]),b!==!1?b:!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 T=this.next();return T||this.lex()},"lex"),begin:s(function(T){this.conditionStack.push(T)},"begin"),popState:s(function(){var T=this.conditionStack.length-1;return T>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(T){return T=this.conditionStack.length-1-Math.abs(T||0),T>=0?this.conditionStack[T]:"INITIAL"},"topState"),pushState:s(function(T){this.begin(T)},"pushState"),stateStackSize:s(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:s(function(T,w,C,k){var S=k;switch(C){case 0:return 6;case 1:return 8;case 2:return 8;case 3:return 6;case 4:return 7;case 5:return 13;case 6:return 14;case 7:return 11}},"anonymous"),rules:[/^(?:\s*%%.*)/i,/^(?:ishikawa-beta\b)/i,/^(?:ishikawa\b)/i,/^(?:[\s]+[\n])/i,/^(?:[\n]+)/i,/^(?:[\s]+)/i,/^(?:[^\n]+)/i,/^(?:$)/i],conditions:{INITIAL:{rules:[0,1,2,3,4,5,6,7],inclusive:!0}}};return x})();g.lexer=y;function v(){this.yy={}}return s(v,"Parser"),v.prototype=g,g.Parser=v,new v})();iY.parser=iY;A8e=iY});var A_,_8e=F(()=>{"use strict";Zt();Gr();An();A_=class{constructor(){this.stack=[];this.clear=this.clear.bind(this),this.addNode=this.addNode.bind(this),this.getRoot=this.getRoot.bind(this)}static{s(this,"IshikawaDB")}clear(){this.root=void 0,this.stack=[],this.baseLevel=void 0,gr()}getRoot(){return this.root}addNode(t,r){let n=xt.sanitizeText(r,Le());if(!this.root){this.root={text:n,children:[]},this.stack=[{level:0,node:this.root}],Mr(n);return}this.baseLevel??=t;let i=t-this.baseLevel+1;for(i<=0&&(i=1);this.stack.length>1&&this.stack[this.stack.length-1].level>=i;)this.stack.pop();let a=this.stack[this.stack.length-1].node,o={text:n,children:[]};a.children.push(o),this.stack.push({level:i,node:o})}getAccTitle(){return Sr()}setAccTitle(t){Cr(t)}getAccDescription(){return Ar()}setAccDescription(t){Er(t)}getDiagramTitle(){return Rr()}setDiagramTitle(t){Mr(t)}}});var uSt,Av,hSt,dSt,fSt,P8e,L8e,D8e,I8e,pSt,M8e,mSt,gSt,ySt,aY,vSt,xSt,O8e,R_,N8e,Rv,B8e,$8e=F(()=>{"use strict";Zt();Ba();Dn();Qt();Jt();uSt=14,Av=250,hSt=30,dSt=60,fSt=5,P8e=82*Math.PI/180,L8e=Math.cos(P8e),D8e=Math.sin(P8e),I8e=s((e,t,r)=>{let n=e.node().getBBox(),i=n.width+t*2,a=n.height+t*2;Br(e,a,i,r),e.attr("viewBox",`${n.x-t} ${n.y-t} ${i} ${a}`)},"applyPaddedViewBox"),pSt=s((e,t,r,n)=>{let a=n.db.getRoot();if(!a)return;let o=Le(),{look:l,handDrawnSeed:u,themeVariables:h}=o,d=fs(o.fontSize)[0]??uSt,f=l==="handDrawn",p=a.children??[],m=o.ishikawa?.diagramPadding??20,g=o.ishikawa?.useMaxWidth??!1,y=pn(t),v=y.append("g").attr("class","ishikawa"),x=f?ht.svg(y.node()):void 0,b=x?{roughSvg:x,seed:u??0,lineColor:h?.lineColor??"#333",fillColor:h?.mainBkg??"#fff"}:void 0,T=`ishikawa-arrow-${t}`;f||v.append("defs").append("marker").attr("id",T).attr("viewBox","0 0 10 10").attr("refX",0).attr("refY",5).attr("markerWidth",6).attr("markerHeight",6).attr("orient","auto").append("path").attr("d","M 10 0 L 0 5 L 10 10 Z").attr("class","ishikawa-arrow");let w=0,C=Av,k=f?void 0:Rv(v,w,C,w,C,"ishikawa-spine");if(mSt(v,w,C,a.text,d,b),!p.length){f&&Rv(v,w,C,w,C,"ishikawa-spine",b),I8e(y,m,g);return}w-=20;let S=p.filter((P,B)=>B%2===0),A=p.filter((P,B)=>B%2===1),M=M8e(S),N=M8e(A),D=M.total+N.total,R=Av,E=Av;if(D>0){let P=Av*2,B=Av*.3;R=Math.max(B,P*(M.total/D)),E=Math.max(B,P*(N.total/D))}let I=d*2;R=Math.max(R,M.max*I),E=Math.max(E,N.max*I),C=Math.max(R,Av),k&&k.attr("y1",C).attr("y2",C),v.select(".ishikawa-head-group").attr("transform",`translate(0,${C})`);let L=Math.ceil(p.length/2);for(let P=0;PMath.min(O,$.getBBox().x),1/0)}if(f)Rv(v,w,C,0,C,"ishikawa-spine",b);else{k.attr("x1",w);let P=`url(#${T})`;v.selectAll("line.ishikawa-branch, line.ishikawa-sub-branch").attr("marker-start",P)}I8e(y,m,g)},"draw"),M8e=s(e=>{let t=s(r=>r.children.reduce((n,i)=>n+1+t(i),0),"countDescendants");return e.reduce((r,n)=>{let i=t(n);return r.total+=i,r.max=Math.max(r.max,i),r},{total:0,max:0})},"sideStats"),mSt=s((e,t,r,n,i,a)=>{let o=Math.max(6,Math.floor(110/(i*.6))),l=e.append("g").attr("class","ishikawa-head-group").attr("transform",`translate(${t},${r})`),u=R_(l,O8e(n,o),0,0,"ishikawa-head-label","start",i),h=u.node().getBBox(),d=Math.max(60,h.width+6),f=Math.max(40,h.height*2+40),p=`M 0 ${-f/2} L 0 ${f/2} Q ${d*2.4} 0 0 ${-f/2} Z`;if(a){let m=a.roughSvg.path(p,{roughness:1.5,seed:a.seed,fill:a.fillColor,fillStyle:"hachure",fillWeight:2.5,hachureGap:5,stroke:a.lineColor,strokeWidth:2});l.insert(()=>m,":first-child").attr("class","ishikawa-head")}else l.insert("path",":first-child").attr("class","ishikawa-head").attr("d",p);u.attr("transform",`translate(${(d-h.width)/2-h.x+3},${-h.y-h.height/2})`)},"drawHead"),gSt=s((e,t)=>{let r=[],n=[],i=s((a,o,l)=>{let u=t===-1?[...a].reverse():a;for(let h of u){let d=r.length,f=h.children??[];r.push({depth:l,text:O8e(h.text,15),parentIndex:o,childCount:f.length}),l%2===0?(n.push(d),f.length&&i(f,d,l+1)):(f.length&&i(f,d,l+1),n.push(d))}},"walk");return i(e,-1,2),{entries:r,yOrder:n}},"flattenTree"),ySt=s((e,t,r,n,i,a,o)=>{let l=e.append("g").attr("class","ishikawa-label-group"),h=R_(l,t,r,n+11*i,"ishikawa-label cause","middle",a).node().getBBox();if(o){let d=o.roughSvg.rectangle(h.x-20,h.y-2,h.width+40,h.height+4,{roughness:1.5,seed:o.seed,fill:o.fillColor,fillStyle:"hachure",fillWeight:2.5,hachureGap:5,stroke:o.lineColor,strokeWidth:2});l.insert(()=>d,":first-child").attr("class","ishikawa-label-box")}else l.insert("rect",":first-child").attr("class","ishikawa-label-box").attr("x",h.x-20).attr("y",h.y-2).attr("width",h.width+40).attr("height",h.height+4)},"drawCauseLabel"),aY=s((e,t,r,n,i,a)=>{let o=Math.sqrt(n*n+i*i);if(o===0)return;let l=n/o,u=i/o,h=6,d=-u*h,f=l*h,p=t,m=r,g=`M ${p} ${m} L ${p-l*h*2+d} ${m-u*h*2+f} L ${p-l*h*2-d} ${m-u*h*2-f} Z`,y=a.roughSvg.path(g,{roughness:1,seed:a.seed,fill:a.lineColor,fillStyle:"solid",stroke:a.lineColor,strokeWidth:1});e.append(()=>y)},"drawArrowMarker"),vSt=s((e,t,r,n,i,a,o,l)=>{let u=t.children??[],h=a*(u.length?1:.2),d=-L8e*h,f=D8e*h*i,p=r+d,m=n+f;if(Rv(e,r,n,p,m,"ishikawa-branch",l),l&&aY(e,r,n,r-p,n-m,l),ySt(e,t.text,p,m,i,o,l),!u.length)return;let{entries:g,yOrder:y}=gSt(u,i),v=g.length,x=new Array(v);for(let[k,S]of y.entries())x[S]=n+f*((k+1)/(v+1));let b=new Map;b.set(-1,{x0:r,y0:n,x1:p,y1:m,childCount:u.length,childrenDrawn:0});let T=-L8e,w=D8e*i,C=i<0?"ishikawa-label up":"ishikawa-label down";for(let[k,S]of g.entries()){let A=x[k],M=b.get(S.parentIndex),N=e.append("g").attr("class","ishikawa-sub-group"),D=0,R=0,E=0;if(S.depth%2===0){let I=M.y1-M.y0;D=N8e(M.x0,M.x1,I?(A-M.y0)/I:.5),R=A,E=D-(S.childCount>0?dSt+S.childCount*fSt:hSt),Rv(N,D,A,E,A,"ishikawa-sub-branch",l),l&&aY(N,D,A,1,0,l),R_(N,S.text,E,A,"ishikawa-label align","end",o)}else{let I=M.childrenDrawn++;D=N8e(M.x0,M.x1,(M.childCount-I)/(M.childCount+1)),R=M.y0,E=D+T*((A-R)/w),Rv(N,D,R,E,A,"ishikawa-sub-branch",l),l&&aY(N,D,R,D-E,R-A,l),R_(N,S.text,E,A,C,"end",o)}S.childCount>0&&b.set(k,{x0:D,y0:R,x1:E,y1:A,childCount:S.childCount,childrenDrawn:0})}},"drawBranch"),xSt=s(e=>e.split(/|\n/),"splitLines"),O8e=s((e,t)=>{if(e.length<=t)return e;let r=[];for(let n of e.split(/\s+/)){let i=r.length-1;i>=0&&r[i].length+1+n.length<=t?r[i]+=" "+n:r.push(n)}return r.join(` +`)},"wrapText"),R_=s((e,t,r,n,i,a,o)=>{let l=xSt(t),u=o*1.05,h=e.append("text").attr("class",i).attr("text-anchor",a).attr("x",r).attr("y",n-(l.length-1)*u/2);for(let[d,f]of l.entries())h.append("tspan").attr("x",r).attr("dy",d===0?0:u).text(f);return h},"drawMultilineText"),N8e=s((e,t,r)=>e+(t-e)*r,"lerp"),Rv=s((e,t,r,n,i,a,o)=>{if(o){let l=o.roughSvg.line(t,r,n,i,{roughness:1.5,seed:o.seed,stroke:o.lineColor,strokeWidth:2});e.append(()=>l).attr("class",a);return}return e.append("line").attr("class",a).attr("x1",t).attr("y1",r).attr("x2",n).attr("y2",i)},"drawLine"),B8e={draw:pSt}});var bSt,F8e,G8e=F(()=>{"use strict";bSt=s(e=>` +.ishikawa .ishikawa-spine, +.ishikawa .ishikawa-branch, +.ishikawa .ishikawa-sub-branch { + stroke: ${e.lineColor}; + stroke-width: 2; + fill: none; +} + +.ishikawa .ishikawa-sub-branch { + stroke-width: 1; +} + +.ishikawa .ishikawa-arrow { + fill: ${e.lineColor}; +} + +.ishikawa .ishikawa-head { + fill: ${e.mainBkg}; + stroke: ${e.lineColor}; + stroke-width: 2; +} + +.ishikawa .ishikawa-label-box { + fill: ${e.mainBkg}; + stroke: ${e.lineColor}; + stroke-width: 2; +} + +.ishikawa text { + font-family: ${e.fontFamily}; + font-size: ${e.fontSize}; + fill: ${e.textColor}; +} + +.ishikawa .ishikawa-head-label { + font-weight: 600; + text-anchor: middle; + dominant-baseline: middle; + font-size: 14px; +} + +.ishikawa .ishikawa-label { + text-anchor: end; +} + +.ishikawa .ishikawa-label.cause { + text-anchor: middle; + dominant-baseline: middle; +} + +.ishikawa .ishikawa-label.align { + text-anchor: end; + dominant-baseline: middle; +} + +.ishikawa .ishikawa-label.up { + dominant-baseline: baseline; +} + +.ishikawa .ishikawa-label.down { + dominant-baseline: hanging; +} +`,"getStyles"),F8e=bSt});var z8e={};ar(z8e,{diagram:()=>TSt});var TSt,V8e=F(()=>{"use strict";R8e();_8e();$8e();G8e();TSt={parser:A8e,get db(){return new A_},renderer:B8e,styles:F8e}});var sY,H8e,U8e=F(()=>{"use strict";sY=(function(){var e=s(function(b,T,w,C){for(w=w||{},C=b.length;C--;w[b[C]]=T);return w},"o"),t=[5,8],r=[7,8,11,12,17,19,22,24],n=[1,17],i=[1,18],a=[7,8,11,12,14,15,16,17,19,20,21,22,24,27],o=[1,31],l=[1,39],u=[7,8,11,12,17,19,22,24,27],h=[1,57],d=[1,56],f=[1,58],p=[1,59],m=[1,60],g=[7,8,11,12,16,17,19,20,22,24,27,31,32,33],y={trace:s(function(){},"trace"),yy:{},symbols_:{error:2,start:3,optNewlines:4,VENN:5,document:6,EOF:7,NEWLINE:8,line:9,statement:10,TITLE:11,SET:12,identifier:13,BRACKET_LABEL:14,COLON:15,NUMERIC:16,UNION:17,identifierList:18,TEXT:19,IDENTIFIER:20,STRING:21,INDENT_TEXT:22,indentedTextTail:23,STYLE:24,stylesOpt:25,styleField:26,COMMA:27,styleValue:28,valueTokens:29,valueToken:30,HEXCOLOR:31,RGBCOLOR:32,RGBACOLOR:33,$accept:0,$end:1},terminals_:{2:"error",5:"VENN",7:"EOF",8:"NEWLINE",11:"TITLE",12:"SET",14:"BRACKET_LABEL",15:"COLON",16:"NUMERIC",17:"UNION",19:"TEXT",20:"IDENTIFIER",21:"STRING",22:"INDENT_TEXT",24:"STYLE",27:"COMMA",31:"HEXCOLOR",32:"RGBCOLOR",33:"RGBACOLOR"},productions_:[0,[3,4],[4,0],[4,2],[6,0],[6,2],[9,1],[9,1],[10,1],[10,2],[10,3],[10,4],[10,5],[10,2],[10,3],[10,4],[10,5],[10,3],[10,3],[10,3],[10,4],[10,4],[10,2],[10,3],[23,1],[23,1],[23,1],[23,2],[23,2],[25,1],[25,3],[26,3],[28,1],[28,1],[29,1],[29,2],[30,1],[30,1],[30,1],[30,1],[30,1],[18,1],[18,3],[13,1],[13,1]],performAction:s(function(T,w,C,k,S,A,M){var N=A.length-1;switch(S){case 1:return A[N-1];case 2:case 3:case 4:this.$=[];break;case 5:A[N-1].push(A[N]),this.$=A[N-1];break;case 6:this.$=[];break;case 7:case 22:case 32:case 36:case 37:case 38:case 39:case 40:this.$=A[N];break;case 8:k.setDiagramTitle(A[N].substr(6)),this.$=A[N].substr(6);break;case 9:k.addSubsetData([A[N]],void 0,void 0),k.setIndentMode&&k.setIndentMode(!0);break;case 10:k.addSubsetData([A[N-1]],A[N],void 0),k.setIndentMode&&k.setIndentMode(!0);break;case 11:k.addSubsetData([A[N-2]],void 0,parseFloat(A[N])),k.setIndentMode&&k.setIndentMode(!0);break;case 12:k.addSubsetData([A[N-3]],A[N-2],parseFloat(A[N])),k.setIndentMode&&k.setIndentMode(!0);break;case 13:if(A[N].length<2)throw new Error("union requires multiple identifiers");k.validateUnionIdentifiers&&k.validateUnionIdentifiers(A[N]),k.addSubsetData(A[N],void 0,void 0),k.setIndentMode&&k.setIndentMode(!0);break;case 14:if(A[N-1].length<2)throw new Error("union requires multiple identifiers");k.validateUnionIdentifiers&&k.validateUnionIdentifiers(A[N-1]),k.addSubsetData(A[N-1],A[N],void 0),k.setIndentMode&&k.setIndentMode(!0);break;case 15:if(A[N-2].length<2)throw new Error("union requires multiple identifiers");k.validateUnionIdentifiers&&k.validateUnionIdentifiers(A[N-2]),k.addSubsetData(A[N-2],void 0,parseFloat(A[N])),k.setIndentMode&&k.setIndentMode(!0);break;case 16:if(A[N-3].length<2)throw new Error("union requires multiple identifiers");k.validateUnionIdentifiers&&k.validateUnionIdentifiers(A[N-3]),k.addSubsetData(A[N-3],A[N-2],parseFloat(A[N])),k.setIndentMode&&k.setIndentMode(!0);break;case 17:case 18:case 19:k.addTextData(A[N-1],A[N],void 0);break;case 20:case 21:k.addTextData(A[N-2],A[N-1],A[N]);break;case 23:k.addStyleData(A[N-1],A[N]);break;case 24:case 25:case 26:var D=k.getCurrentSets();if(!D)throw new Error("text requires set");k.addTextData(D,A[N],void 0);break;case 27:case 28:var D=k.getCurrentSets();if(!D)throw new Error("text requires set");k.addTextData(D,A[N-1],A[N]);break;case 29:case 41:this.$=[A[N]];break;case 30:case 42:this.$=[...A[N-2],A[N]];break;case 31:this.$=[A[N-2],A[N]];break;case 33:this.$=A[N].join(" ");break;case 34:this.$=[A[N]];break;case 35:A[N-1].push(A[N]),this.$=A[N-1];break;case 43:case 44:this.$=A[N];break}},"anonymous"),table:[e(t,[2,2],{3:1,4:2}),{1:[3]},{5:[1,3],8:[1,4]},e(r,[2,4],{6:5}),e(t,[2,3]),{7:[1,6],8:[1,8],9:7,10:9,11:[1,10],12:[1,11],17:[1,12],19:[1,13],22:[1,14],24:[1,15]},{1:[2,1]},e(r,[2,5]),e(r,[2,6]),e(r,[2,7]),e(r,[2,8]),{13:16,20:n,21:i},{13:20,18:19,20:n,21:i},{13:20,18:21,20:n,21:i},{16:[1,25],20:[1,23],21:[1,24],23:22},{13:20,18:26,20:n,21:i},e(r,[2,9],{14:[1,27],15:[1,28]}),e(a,[2,43]),e(a,[2,44]),e(r,[2,13],{14:[1,29],15:[1,30],27:o}),e(a,[2,41]),{16:[1,34],20:[1,32],21:[1,33],27:o},e(r,[2,22]),e(r,[2,24],{14:[1,35]}),e(r,[2,25],{14:[1,36]}),e(r,[2,26]),{20:l,25:37,26:38,27:o},e(r,[2,10],{15:[1,40]}),{16:[1,41]},e(r,[2,14],{15:[1,42]}),{16:[1,43]},{13:44,20:n,21:i},e(r,[2,17],{14:[1,45]}),e(r,[2,18],{14:[1,46]}),e(r,[2,19]),e(r,[2,27]),e(r,[2,28]),e(r,[2,23],{27:[1,47]}),e(u,[2,29]),{15:[1,48]},{16:[1,49]},e(r,[2,11]),{16:[1,50]},e(r,[2,15]),e(a,[2,42]),e(r,[2,20]),e(r,[2,21]),{20:l,26:51},{16:h,20:d,21:[1,53],28:52,29:54,30:55,31:f,32:p,33:m},e(r,[2,12]),e(r,[2,16]),e(u,[2,30]),e(u,[2,31]),e(u,[2,32]),e(u,[2,33],{30:61,16:h,20:d,31:f,32:p,33:m}),e(g,[2,34]),e(g,[2,36]),e(g,[2,37]),e(g,[2,38]),e(g,[2,39]),e(g,[2,40]),e(g,[2,35])],defaultActions:{6:[2,1]},parseError:s(function(T,w){if(w.recoverable)this.trace(T);else{var C=new Error(T);throw C.hash=w,C}},"parseError"),parse:s(function(T){var w=this,C=[0],k=[],S=[null],A=[],M=this.table,N="",D=0,R=0,E=0,I=2,L=1,P=A.slice.call(arguments,1),B=Object.create(this.lexer),O={yy:{}};for(var $ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,$)&&(O.yy[$]=this.yy[$]);B.setInput(T,O.yy),O.yy.lexer=B,O.yy.parser=this,typeof B.yylloc>"u"&&(B.yylloc={});var G=B.yylloc;A.push(G);var V=B.options&&B.options.ranges;typeof O.yy.parseError=="function"?this.parseError=O.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function z(Ye){C.length=C.length-2*Ye,S.length=S.length-Ye,A.length=A.length-Ye}s(z,"popStack");function W(){var Ye;return Ye=k.pop()||B.lex()||L,typeof Ye!="number"&&(Ye instanceof Array&&(k=Ye,Ye=k.pop()),Ye=w.symbols_[Ye]||Ye),Ye}s(W,"lex");for(var H,j,Q,U,ue,J,he={},se,oe,Se,xe;;){if(Q=C[C.length-1],this.defaultActions[Q]?U=this.defaultActions[Q]:((H===null||typeof H>"u")&&(H=W()),U=M[Q]&&M[Q][H]),typeof U>"u"||!U.length||!U[0]){var Ne="";xe=[];for(se in M[Q])this.terminals_[se]&&se>I&&xe.push("'"+this.terminals_[se]+"'");B.showPosition?Ne="Parse error on line "+(D+1)+`: +`+B.showPosition()+` +Expecting `+xe.join(", ")+", got '"+(this.terminals_[H]||H)+"'":Ne="Parse error on line "+(D+1)+": Unexpected "+(H==L?"end of input":"'"+(this.terminals_[H]||H)+"'"),this.parseError(Ne,{text:B.match,token:this.terminals_[H]||H,line:B.yylineno,loc:G,expected:xe})}if(U[0]instanceof Array&&U.length>1)throw new Error("Parse Error: multiple actions possible at state: "+Q+", token: "+H);switch(U[0]){case 1:C.push(H),S.push(B.yytext),A.push(B.yylloc),C.push(U[1]),H=null,j?(H=j,j=null):(R=B.yyleng,N=B.yytext,D=B.yylineno,G=B.yylloc,E>0&&E--);break;case 2:if(oe=this.productions_[U[1]][1],he.$=S[S.length-oe],he._$={first_line:A[A.length-(oe||1)].first_line,last_line:A[A.length-1].last_line,first_column:A[A.length-(oe||1)].first_column,last_column:A[A.length-1].last_column},V&&(he._$.range=[A[A.length-(oe||1)].range[0],A[A.length-1].range[1]]),J=this.performAction.apply(he,[N,R,D,O.yy,U[1],S,A].concat(P)),typeof J<"u")return J;oe&&(C=C.slice(0,-1*oe*2),S=S.slice(0,-1*oe),A=A.slice(0,-1*oe)),C.push(this.productions_[U[1]][0]),S.push(he.$),A.push(he._$),Se=M[C[C.length-2]][C[C.length-1]],C.push(Se);break;case 3:return!0}}return!0},"parse")},v=(function(){var b={EOF:1,parseError:s(function(w,C){if(this.yy.parser)this.yy.parser.parseError(w,C);else throw new Error(w)},"parseError"),setInput:s(function(T,w){return this.yy=w||this.yy||{},this._input=T,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:s(function(){var T=this._input[0];this.yytext+=T,this.yyleng++,this.offset++,this.match+=T,this.matched+=T;var w=T.match(/(?:\r\n?|\n).*/g);return w?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),T},"input"),unput:s(function(T){var w=T.length,C=T.split(/(?:\r\n?|\n)/g);this._input=T+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-w),this.offset-=w;var k=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 S=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===k.length?this.yylloc.first_column:0)+k[k.length-C.length].length-C[0].length:this.yylloc.first_column-w},this.options.ranges&&(this.yylloc.range=[S[0],S[0]+this.yyleng-w]),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(T){this.unput(this.match.slice(T))},"less"),pastInput:s(function(){var T=this.matched.substr(0,this.matched.length-this.match.length);return(T.length>20?"...":"")+T.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:s(function(){var T=this.match;return T.length<20&&(T+=this._input.substr(0,20-T.length)),(T.substr(0,20)+(T.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:s(function(){var T=this.pastInput(),w=new Array(T.length+1).join("-");return T+this.upcomingInput()+` +`+w+"^"},"showPosition"),test_match:s(function(T,w){var C,k,S;if(this.options.backtrack_lexer&&(S={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&&(S.yylloc.range=this.yylloc.range.slice(0))),k=T[0].match(/(?:\r\n?|\n).*/g),k&&(this.yylineno+=k.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:k?k[k.length-1].length-k[k.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+T[0].length},this.yytext+=T[0],this.match+=T[0],this.matches=T,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(T[0].length),this.matched+=T[0],C=this.performAction.call(this,this.yy,this,w,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),C)return C;if(this._backtrack){for(var A in S)this[A]=S[A];return!1}return!1},"test_match"),next:s(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var T,w,C,k;this._more||(this.yytext="",this.match="");for(var S=this._currentRules(),A=0;Aw[0].length)){if(w=C,k=A,this.options.backtrack_lexer){if(T=this.test_match(C,S[A]),T!==!1)return T;if(this._backtrack){w=!1;continue}else return!1}else if(!this.options.flex)break}return w?(T=this.test_match(w,S[k]),T!==!1?T:!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 w=this.next();return w||this.lex()},"lex"),begin:s(function(w){this.conditionStack.push(w)},"begin"),popState:s(function(){var w=this.conditionStack.length-1;return w>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(w){return w=this.conditionStack.length-1-Math.abs(w||0),w>=0?this.conditionStack[w]:"INITIAL"},"topState"),pushState:s(function(w){this.begin(w)},"pushState"),stateStackSize:s(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:s(function(w,C,k,S){var A=S;switch(k){case 0:break;case 1:break;case 2:break;case 3:if(w.getIndentMode&&w.getIndentMode())return w.consumeIndentText=!0,this.begin("INITIAL"),22;break;case 4:break;case 5:w.setIndentMode&&w.setIndentMode(!1),this.begin("INITIAL"),this.unput(C.yytext);break;case 6:return this.begin("bol"),8;break;case 7:break;case 8:break;case 9:return 7;case 10:return 11;case 11:return 5;case 12:return 12;case 13:return 17;case 14:if(w.consumeIndentText)w.consumeIndentText=!1;else return 19;break;case 15:return 24;case 16:return C.yytext=C.yytext.slice(2,-2),14;break;case 17:return C.yytext=C.yytext.slice(1,-1).trim(),14;break;case 18:return 16;case 19:return 31;case 20:return 33;case 21:return 32;case 22:return 20;case 23:return 21;case 24:return 27;case 25:return 15}},"anonymous"),rules:[/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[ \t]+(?=[\n\r]))/i,/^(?:[ \t]+(?=text\b))/i,/^(?:[ \t]+)/i,/^(?:[^ \t\n\r])/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:[ \t]+)/i,/^(?:$)/i,/^(?:title\s[^#\n;]+)/i,/^(?:venn-beta\b)/i,/^(?:set\b)/i,/^(?:union\b)/i,/^(?:text\b)/i,/^(?:style\b)/i,/^(?:\["[^\"]*"\])/i,/^(?:\[[^\]\"]+\])/i,/^(?:[+-]?(\d+(\.\d+)?|\.\d+))/i,/^(?:#[0-9a-fA-F]{3,8})/i,/^(?:rgba\(\s*[0-9.]+\s*[,]\s*[0-9.]+\s*[,]\s*[0-9.]+\s*[,]\s*[0-9.]+\s*\))/i,/^(?:rgb\(\s*[0-9.]+\s*[,]\s*[0-9.]+\s*[,]\s*[0-9.]+\s*\))/i,/^(?:[A-Za-z_][A-Za-z0-9\-_]*)/i,/^(?:"[^\"]*")/i,/^(?:,)/i,/^(?::)/i],conditions:{bol:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25],inclusive:!0},INITIAL:{rules:[0,1,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25],inclusive:!0}}};return b})();y.lexer=v;function x(){this.yy={}}return s(x,"Parser"),x.prototype=y,y.Parser=x,new x})();sY.parser=sY;H8e=sY});function OSt(){return Fr(PSt,Lt().venn)}var oY,lY,cY,uY,hY,dY,wSt,SSt,rk,ESt,ASt,RSt,_St,__,LSt,DSt,ISt,MSt,NSt,PSt,BSt,Y8e,j8e=F(()=>{"use strict";Qt();mr();An();Ni();oY=[],lY=[],cY=[],uY=new Set,dY=!1,wSt=s((e,t,r)=>{let n=__(e).sort(),i=r??10/Math.pow(e.length,2);hY=n,n.length===1&&uY.add(n[0]),oY.push({sets:n,size:i,label:t?rk(t):void 0})},"addSubsetData"),SSt=s(()=>oY,"getSubsetData"),rk=s(e=>{let t=e.trim();return t.length>=2&&t.startsWith('"')&&t.endsWith('"')?t.slice(1,-1):t},"normalizeText"),ESt=s(e=>e&&rk(e),"normalizeStyleValue"),ASt=s((e,t,r)=>{let n=rk(t);lY.push({sets:__(e).sort(),id:n,label:r?rk(r):void 0})},"addTextData"),RSt=s((e,t)=>{let r=__(e).sort(),n={};for(let[i,a]of t)n[i]=ESt(a)??a;cY.push({targets:r,styles:n})},"addStyleData"),_St=s(()=>cY,"getStyleData"),__=s(e=>e.map(t=>rk(t)),"normalizeIdentifierList"),LSt=s(e=>{let r=__(e).filter(n=>!uY.has(n));if(r.length>0)throw new Error(`unknown set identifier: ${r.join(", ")}`)},"validateUnionIdentifiers"),DSt=s(()=>lY,"getTextData"),ISt=s(()=>hY,"getCurrentSets"),MSt=s(()=>dY,"getIndentMode"),NSt=s(e=>{dY=e},"setIndentMode"),PSt=hr.venn;s(OSt,"getConfig");BSt=s(()=>{gr(),oY.length=0,lY.length=0,cY.length=0,uY.clear(),hY=void 0,dY=!1},"customClear"),Y8e={getConfig:OSt,clear:BSt,setAccTitle:Cr,getAccTitle:Sr,setDiagramTitle:Mr,getDiagramTitle:Rr,getAccDescription:Ar,setAccDescription:Er,addSubsetData:wSt,getSubsetData:SSt,addTextData:ASt,addStyleData:RSt,validateUnionIdentifiers:LSt,getTextData:DSt,getStyleData:_St,getCurrentSets:ISt,getIndentMode:MSt,setIndentMode:NSt}});var $St,X8e,K8e=F(()=>{"use strict";$St=s(e=>` + .venn-title { + font-size: 32px; + fill: ${e.vennTitleTextColor}; + font-family: ${e.fontFamily}; + } + + .venn-circle text { + font-size: 48px; + font-family: ${e.fontFamily}; + } + + .venn-intersection text { + font-size: 48px; + fill: ${e.vennSetTextColor}; + font-family: ${e.fontFamily}; + } + + .venn-text-node { + font-family: ${e.fontFamily}; + color: ${e.vennSetTextColor}; + } +`,"getStyles"),X8e=$St});function L_(e,t){let r=GSt(e),n=r.filter(l=>FSt(l,e)),i=0,a=0,o=[];if(n.length>1){let l=eIe(n);for(let h=0;hd.angle-h.angle);let u=n[n.length-1];for(let h=0;hg.radius*2&&(T=g.radius*2),(p==null||p.width>T)&&(p={circle:g,width:T,p1:d,p2:u,large:T>g.radius,sweep:!0})}p!=null&&(o.push(p),i+=mY(p.circle.radius,p.width),u=d)}}else{let l=e[0];for(let h=1;hMath.abs(l.radius-e[h].radius)){u=!0;break}u?i=a=0:(i=l.radius*l.radius*Math.PI,o.push({circle:l,p1:{x:l.x,y:l.y+l.radius},p2:{x:l.x-1e-10,y:l.y+l.radius},width:l.radius*2,large:!0,sweep:!0}))}return a/=2,t&&(t.area=i+a,t.arcArea=i,t.polygonArea=a,t.arcs=o,t.innerPoints=n,t.intersectionPoints=r),i+a}function FSt(e,t){return t.every(r=>oo(e,r)=e+t)return 0;if(r<=Math.abs(e-t))return Math.PI*Math.min(e,t)*Math.min(e,t);let n=e-(r*r-t*t+e*e)/(2*r),i=t-(r*r-e*e+t*t)/(2*r);return mY(e,n)+mY(t,i)}function J8e(e,t){let r=oo(e,t),n=e.radius,i=t.radius;if(r>=n+i||r<=Math.abs(n-i))return[];let a=(n*n-i*i+r*r)/(2*r),o=Math.sqrt(n*n-a*a),l=e.x+a*(t.x-e.x)/r,u=e.y+a*(t.y-e.y)/r,h=-(t.y-e.y)*(o/r),d=-(t.x-e.x)*(o/r);return[{x:l+h,y:u-d},{x:l-h,y:u+d}]}function eIe(e){let t={x:0,y:0};for(let r of e)t.x+=r.x,t.y+=r.y;return t.x/=e.length,t.y/=e.length,t}function zSt(e,t,r,n){n=n||{};let i=n.maxIterations||100,a=n.tolerance||1e-10,o=e(t),l=e(r),u=r-t;if(o*l>0)throw"Initial bisect points must have opposite signs";if(o===0)return t;if(l===0)return r;for(let h=0;h=0&&(t=d),Math.abs(u)gY(t))}function _v(e,t){let r=0;for(let n=0;nC.fx-k.fx,"sortOrder"),x=t.slice(),b=t.slice(),T=t.slice(),w=t.slice();for(let C=0;C{let M=A.slice();return M.fx=A.fx,M.id=A.id,M});S.sort((A,M)=>A.id-M.id),r.history.push({x:g[0].slice(),fx:g[0].fx,simplex:S})}p=0;for(let S=0;S=g[m-1].fx){let S=!1;if(b.fx>k.fx?(Nh(T,1+d,x,-d,k),T.fx=e(T),T.fx=1)break;for(let A=1;Al+a*i*u||h>=v)y=i;else{if(Math.abs(f)<=-o*u)return i;f*(y-g)>=0&&(y=g),g=i,v=h}return 0}s(m,"zoom");for(let g=0;g<10;++g){if(Nh(n.x,1,r.x,i,t),h=n.fx=e(n.x,n.fxprime),f=_v(n.fxprime,t),h>l+a*i*u||g&&h>=d)return m(p,i,d);if(Math.abs(f)<=-o*u)return i;if(f>=0)return m(i,p,h);d=h,p=i,i*=2}return i}function WSt(e,t,r){let n={x:t.slice(),fx:0,fxprime:t.slice()},i={x:t.slice(),fx:0,fxprime:t.slice()},a=t.slice(),o,l,u=1,h;r=r||{},h=r.maxIterations||t.length*20,n.fx=e(n.x,n.fxprime),o=n.fxprime.slice(),vY(o,n.fxprime,-1);for(let d=0;d{let f={};for(let p=0;pTY(e,t,n)-r,0,e+t)}function qSt(e,t={}){let r=t.distinct,n=e.map(l=>Object.assign({},l));function i(l){return l.join(";")}if(s(i,"toKey"),r){let l=new Map;for(let u of n)for(let h=0;hl===u?0:la.sets.length===2).forEach(a=>{let o=r[a.sets[0]],l=r[a.sets[1]],u=Math.sqrt(t[o].size/Math.PI),h=Math.sqrt(t[l].size/Math.PI),d=xY(u,h,a.size);n[o][l]=n[l][o]=d;let f=0;a.size+1e-10>=Math.min(t[o].size,t[l].size)?f=1:a.size<=1e-10&&(f=-1),i[o][l]=i[l][o]=f}),{distances:n,constraints:i}}function USt(e,t,r,n){for(let a=0;a0&&g<=f||p<0&&g>=f||(i+=2*y*y,t[2*a]+=4*y*(o-h),t[2*a+1]+=4*y*(l-d),t[2*u]+=4*y*(h-o),t[2*u+1]+=4*y*(d-l))}}return i}function YSt(e,t={}){let r=XSt(e,t),n=t.lossFunction||Lv;if(e.length>=8){let i=jSt(e,t),a=n(i,e),o=n(r,e);a+1e-8p.map(m=>m/l));let u=s((p,m)=>USt(p,m,a,o),"obj"),h=null;for(let p=0;pf.sets.length===2);for(let f of e){let p=f.weight!=null?f.weight:1,m=f.sets[0],g=f.sets[1];f.size+nIe>=Math.min(n[m].size,n[g].size)&&(p=0),i[m].push({set:g,size:f.size,weight:p}),i[g].push({set:m,size:f.size,weight:p})}let a=[];Object.keys(i).forEach(f=>{let p=0;for(let m=0;me[o]));let a=n.weight!=null?n.weight:1;r+=a*(i-n.size)*(i-n.size)}return r}function iIe(e,t){let r=0;for(let n of t){if(n.sets.length===1)continue;let i;if(n.sets.length===2){let l=e[n.sets[0]],u=e[n.sets[1]];i=TY(l.radius,u.radius,oo(l,u))}else i=L_(n.sets.map(l=>e[l]));let a=n.weight!=null?n.weight:1,o=Math.log((i+1)/(n.size+1));r+=a*o*o}return r}function KSt(e,t,r){if(r==null?e.sort((i,a)=>a.radius-i.radius):e.sort(r),e.length>0){let i=e[0].x,a=e[0].y;for(let o of e)o.x-=i,o.y-=a}if(e.length===2&&oo(e[0],e[1])1){let i=Math.atan2(e[1].x,e[1].y)-t,a=Math.cos(i),o=Math.sin(i);for(let l of e){let u=l.x,h=l.y;l.x=a*u-o*h,l.y=o*u+a*h}}if(e.length>2){let i=Math.atan2(e[2].x,e[2].y)-t;for(;i<0;)i+=2*Math.PI;for(;i>2*Math.PI;)i-=2*Math.PI;if(i>Math.PI){let a=e[1].y/(1e-10+e[1].x);for(let o of e){var n=(o.x+a*o.y)/(1+a*a);o.x=2*n-o.x,o.y=2*n*a-o.y}}}}function ZSt(e){e.forEach(i=>{i.parent=i});function t(i){return i.parent!==i&&(i.parent=t(i.parent)),i.parent}s(t,"find");function r(i,a){let o=t(i),l=t(a);o.parent=l}s(r,"union");for(let i=0;i{delete i.parent}),Array.from(n.values())}function bY(e){let t=s(r=>{let n=e.reduce((a,o)=>Math.max(a,o[r]+o.radius),Number.NEGATIVE_INFINITY),i=e.reduce((a,o)=>Math.min(a,o[r]-o.radius),Number.POSITIVE_INFINITY);return{max:n,min:i}},"minMax");return{xRange:t("x"),yRange:t("y")}}function aIe(e,t,r){t==null&&(t=Math.PI/2);let n=lIe(e).map(h=>Object.assign({},h)),i=ZSt(n);for(let h of i){KSt(h,t,r);let d=bY(h);h.size=(d.xRange.max-d.xRange.min)*(d.yRange.max-d.yRange.min),h.bounds=d}i.sort((h,d)=>d.size-h.size),n=i[0];let a=n.bounds,o=(a.xRange.max-a.xRange.min)/50;function l(h,d,f){if(!h)return;let p=h.bounds,m,g;if(d)m=a.xRange.max-p.xRange.min+o;else{m=a.xRange.max-p.xRange.max;let y=(p.xRange.max-p.xRange.min)/2-(a.xRange.max-a.xRange.min)/2;y<0&&(m+=y)}if(f)g=a.yRange.max-p.yRange.min+o;else{g=a.yRange.max-p.yRange.max;let y=(p.yRange.max-p.yRange.min)/2-(a.yRange.max-a.yRange.min)/2;y<0&&(g+=y)}for(let y of h)y.x+=m,y.y+=g,n.push(y)}s(l,"addCluster");let u=1;for(;u({radius:d*m.radius,x:n+f+(m.x-o.min)*d,y:n+p+(m.y-l.min)*d,setid:m.setid})))}function oIe(e){let t={};for(let r of e)t[r.setid]=r;return t}function lIe(e){return Object.keys(e).map(r=>Object.assign(e[r],{setid:r}))}function cIe(e={}){let t=!1,r=600,n=350,i=15,a=1e3,o=Math.PI/2,l=!0,u=null,h=!0,d=!0,f=null,p=null,m=!1,g=null,y=e&&e.symmetricalTextCentre?e.symmetricalTextCentre:!1,v={},x=e&&e.colourScheme?e.colourScheme:e&&e.colorScheme?e.colorScheme:["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"],b=0,T=s(function(S){if(S in v)return v[S];var A=v[S]=x[b];return b+=1,b>=x.length&&(b=0),A},"colours"),w=rIe,C=Lv;function k(S){let A=S.datum(),M=new Set;A.forEach(U=>{U.size==0&&U.sets.length==1&&M.add(U.sets[0])}),A=A.filter(U=>!U.sets.some(ue=>M.has(ue)));let N={},D={};if(A.length>0){let U=w(A,{lossFunction:C,distinct:m});l&&(U=aIe(U,o,p)),N=sIe(U,r,n,i,u),D=hIe(N,A,y)}let R={};A.forEach(U=>{U.label&&(R[U.sets]=U.label)});function E(U){if(U.sets in R)return R[U.sets];if(U.sets.length==1)return""+U.sets[0]}s(E,"label"),S.selectAll("svg").data([N]).enter().append("svg");let I=S.select("svg");t?I.attr("viewBox",`0 0 ${r} ${n}`):I.attr("width",r).attr("height",n);let L={},P=!1;I.selectAll(".venn-area path").each(function(U){let ue=this.getAttribute("d");U.sets.length==1&&ue&&!m&&(P=!0,L[U.sets[0]]=eEt(ue))});function B(U){return ue=>{let J=U.sets.map(he=>{let se=L[he],oe=N[he];return se||(se={x:r/2,y:n/2,radius:1}),oe||(oe={x:r/2,y:n/2,radius:1}),{x:se.x*(1-ue)+oe.x*ue,y:se.y*(1-ue)+oe.y*ue,radius:se.radius*(1-ue)+oe.radius*ue}});return Q8e(J,g)}}s(B,"pathTween");let O=I.selectAll(".venn-area").data(A,U=>U.sets),$=O.enter().append("g").attr("class",U=>`venn-area venn-${U.sets.length==1?"circle":"intersection"}${U.colour||U.color?" venn-coloured":""}`).attr("data-venn-sets",U=>U.sets.join("_")),G=$.append("path"),V=$.append("text").attr("class","label").text(U=>E(U)).attr("text-anchor","middle").attr("dy",".35em").attr("x",r/2).attr("y",n/2);d&&(G.style("fill-opacity","0").filter(U=>U.sets.length==1).style("fill",U=>U.colour?U.colour:U.color?U.color:T(U.sets)).style("fill-opacity",".25"),V.style("fill",U=>U.colour||U.color?"#FFF":e.textFill?e.textFill:U.sets.length==1?T(U.sets):"#444"));function z(U){return typeof U.transition=="function"?U.transition("venn").duration(a):U}s(z,"asTransition");let W=S;P&&typeof W.transition=="function"?(W=z(S),W.selectAll("path").attrTween("d",B)):W.selectAll("path").attr("d",U=>Q8e(U.sets.map(ue=>N[ue])),g);let H=W.selectAll("text").filter(U=>U.sets in D).text(U=>E(U)).attr("x",U=>Math.floor(D[U.sets].x)).attr("y",U=>Math.floor(D[U.sets].y));h&&(P?"on"in H?H.on("end",fY(N,E)):H.each("end",fY(N,E)):H.each(fY(N,E)));let j=z(O.exit()).remove();typeof O.transition=="function"&&j.selectAll("path").attrTween("d",B);let Q=j.selectAll("text").attr("x",r/2).attr("y",n/2);return f!==null&&(V.style("font-size","0px"),H.style("font-size",f),Q.style("font-size","0px")),{circles:N,textCentres:D,nodes:O,enter:$,update:W,exit:j}}return s(k,"chart"),k.wrap=function(S){return arguments.length?(h=S,k):h},k.useViewBox=function(){return t=!0,k},k.width=function(S){return arguments.length?(r=S,k):r},k.height=function(S){return arguments.length?(n=S,k):n},k.padding=function(S){return arguments.length?(i=S,k):i},k.distinct=function(S){return arguments.length?(m=S,k):m},k.colours=function(S){return arguments.length?(T=S,k):T},k.colors=function(S){return arguments.length?(T=S,k):T},k.fontSize=function(S){return arguments.length?(f=S,k):f},k.round=function(S){return arguments.length?(g=S,k):g},k.duration=function(S){return arguments.length?(a=S,k):a},k.layoutFunction=function(S){return arguments.length?(w=S,k):w},k.normalize=function(S){return arguments.length?(l=S,k):l},k.scaleToFit=function(S){return arguments.length?(u=S,k):u},k.styled=function(S){return arguments.length?(d=S,k):d},k.orientation=function(S){return arguments.length?(o=S,k):o},k.orientationOrder=function(S){return arguments.length?(p=S,k):p},k.lossFunction=function(S){return arguments.length?(C=S==="default"?Lv:S==="logRatio"?iIe:S,k):C},k}function fY(e,t){return function(r){let n=this,i=e[r.sets[0]].radius||50,a=t(r)||"",o=a.split(/\s+/).reverse(),u=(a.length+o.length)/3,h=o.pop(),d=[h],f=0,p=1.1;n.textContent=null;let m=[];function g(T){let w=n.ownerDocument.createElementNS(n.namespaceURI,"tspan");return w.textContent=T,m.push(w),n.append(w),w}s(g,"append");let y=g(h);for(;h=o.pop(),!!h;){d.push(h);let T=d.join(" ");y.textContent=T,T.length>u&&y.getComputedTextLength()>i&&(d.pop(),y.textContent=d.join(" "),d=[h],y=g(h),f++)}let v=.35-f*p/2,x=n.getAttribute("x"),b=n.getAttribute("y");m.forEach((T,w)=>{T.setAttribute("x",x),T.setAttribute("y",b),T.setAttribute("dy",`${v+w*p}em`)})}}function pY(e,t,r){let n=t[0].radius-oo(t[0],e);for(let i=1;i=a&&(i=n[d],a=f)}let o=tIe(d=>-1*pY({x:d[0],y:d[1]},e,t),[i.x,i.y],{maxIterations:500,minErrorDelta:1e-10}).x,l={x:r?0:o[0],y:o[1]},u=!0;for(let d of e)if(oo(l,d)>d.radius){u=!1;break}for(let d of t)if(oo(l,d)d.p1))}function QSt(e){let t={},r=Object.keys(e);for(let n of r)t[n]=[];for(let n=0;n0&&console.log("WARNING: area "+o+" not represented on screen")}return n}function JSt(e,t,r){let n=[];return n.push(` +M`,e,t),n.push(` +m`,-r,0),n.push(` +a`,r,r,0,1,0,r*2,0),n.push(` +a`,r,r,0,1,0,-r*2,0),n.join(" ")}function eEt(e){let t=e.split(" ");return{x:Number.parseFloat(t[1]),y:Number.parseFloat(t[2]),radius:-Number.parseFloat(t[4])}}function dIe(e){if(e.length===0)return[];let t={};return L_(e,t),t.arcs}function fIe(e,t){if(e.length===0)return"M 0 0";let r=Math.pow(10,t||0),n=t!=null?a=>Math.round(a*r)/r:a=>a;if(e.length==1){let a=e[0].circle;return JSt(n(a.x),n(a.y),n(a.radius))}let i=[` +M`,n(e[0].p2.x),n(e[0].p2.y)];for(let a of e){let o=n(a.circle.radius);i.push(` +A`,o,o,0,a.large?1:0,a.sweep?1:0,n(a.p1.x),n(a.p1.y))}return i.join(" ")}function Q8e(e,t){return fIe(dIe(e),t)}function pIe(e,t={}){let{lossFunction:r,layoutFunction:n=rIe,normalize:i=!0,orientation:a=Math.PI/2,orientationOrder:o,width:l=600,height:u=350,padding:h=15,scaleToFit:d=!1,symmetricalTextCentre:f=!1,distinct:p,round:m=2}=t,g=n(e,{lossFunction:r==="default"||!r?Lv:r==="logRatio"?iIe:r,distinct:p});i&&(g=aIe(g,a,o));let y=sIe(g,l,u,h,d),v=hIe(y,e,f),x=new Map(Object.keys(y).map(w=>[w,{set:w,x:y[w].x,y:y[w].y,radius:y[w].radius}])),b=e.map(w=>{let C=w.sets.map(A=>x.get(A)),k=dIe(C),S=fIe(k,m);return{circles:C,arcs:k,path:S,area:w,has:new Set(w.sets)}});function T(w){let C="";for(let k of b)k.has.size>w.length&&w.every(S=>k.has.has(S))&&(C+=" "+k.path);return C}return s(T,"genDistinctPath"),b.map(({circles:w,arcs:C,path:k,area:S})=>({data:S,text:v[S.sets],circles:w,arcs:C,path:k,distinctPath:k+T(S.sets)}))}var nIe,mIe=F(()=>{"use strict";s(L_,"intersectionArea");s(FSt,"containedInCircles");s(GSt,"getIntersectionPoints");s(mY,"circleArea");s(oo,"distance");s(TY,"circleOverlap");s(J8e,"circleCircleIntersection");s(eIe,"getCenter");s(zSt,"bisect");s(gY,"zeros");s(Z8e,"zerosM");s(_v,"dot");s(yY,"norm2");s(vY,"scale");s(Nh,"weightedSum");s(tIe,"nelderMead");s(VSt,"wolfeLineSearch");s(WSt,"conjugateGradient");s(rIe,"venn");nIe=1e-10;s(xY,"distanceFromIntersectArea");s(qSt,"addMissingAreas");s(HSt,"getDistanceMatrices");s(USt,"constrainedMDSGradient");s(YSt,"bestInitialLayout");s(jSt,"constrainedMDSLayout");s(XSt,"greedyLayout");s(Lv,"lossFunction");s(iIe,"logRatioLossFunction");s(KSt,"orientateCircles");s(ZSt,"disjointCluster");s(bY,"getBoundingBox");s(aIe,"normalizeSolution");s(sIe,"scaleSolution");s(oIe,"toObjectNotation");s(lIe,"fromObjectNotation");s(cIe,"VennDiagram");s(fY,"wrapText");s(pY,"circleMargin");s(uIe,"computeTextCentre");s(QSt,"getOverlappingCircles");s(hIe,"computeTextCentres");s(JSt,"circlePath");s(eEt,"circleFromPath");s(dIe,"intersectionAreaArcs");s(fIe,"arcsToPath");s(Q8e,"intersectionAreaPath");s(pIe,"layout")});function rEt(e){let t=new Map;for(let r of e){let n=r.targets.join("|"),i=t.get(n);i?Object.assign(i,r.styles):t.set(n,{...r.styles})}return t}function Vg(e){return e.join("|")}function iEt(e,t,r,n,i,a){let o=e?.useDebugLayout??!1,u=r.select("svg").append("g").attr("class","venn-text-nodes"),h=new Map;for(let d of n){let f=Vg(d.sets),p=h.get(f);p?p.push(d):h.set(f,[d])}for(let[d,f]of h.entries()){let p=t.get(d);if(!p?.text)continue;let m=p.text.x,g=p.text.y,y=Math.min(...p.circles.map(I=>I.radius)),v=Math.min(...p.circles.map(I=>I.radius-Math.hypot(m-I.x,g-I.y))),x=Number.isFinite(v)?Math.max(0,v):0;x===0&&Number.isFinite(y)&&(x=y*.6);let b=u.append("g").attr("class","venn-text-area").attr("font-size",`${40*i}px`);o&&b.append("circle").attr("class","venn-text-debug-circle").attr("cx",m).attr("cy",g).attr("r",x).attr("fill","none").attr("stroke","purple").attr("stroke-width",1.5*i).attr("stroke-dasharray",`${6*i} ${4*i}`);let T=Math.max(80*i,x*2*.95),w=Math.max(60*i,x*2*.95),S=(p.data.label&&p.data.label.length>0?Math.min(32*i,x*.25):0)+(f.length<=2?30*i:0),A=m-T/2,M=g-w/2+S,N=Math.max(1,Math.ceil(Math.sqrt(f.length))),D=Math.max(1,Math.ceil(f.length/N)),R=T/N,E=w/D;for(let[I,L]of f.entries()){let P=I%N,B=Math.floor(I/N),O=A+R*(P+.5),$=M+E*(B+.5);o&&b.append("rect").attr("class","venn-text-debug-cell").attr("x",A+R*P).attr("y",M+E*B).attr("width",R).attr("height",E).attr("fill","none").attr("stroke","teal").attr("stroke-width",1*i).attr("stroke-dasharray",`${4*i} ${3*i}`);let G=R*.9,V=E*.9,z=b.append("foreignObject").attr("class","venn-text-node-fo").attr("width",G).attr("height",V).attr("x",O-G/2).attr("y",$-V/2).attr("overflow","visible"),W=a.get(L.id)?.color,H=z.append("xhtml:span").attr("class","venn-text-node").style("display","flex").style("width","100%").style("height","100%").style("white-space","normal").style("align-items","center").style("justify-content","center").style("text-align","center").style("overflow-wrap","normal").style("word-break","normal").text(L.label??L.id);W&&H.style("color",W)}}}function aEt(e){let t=new Set(e.map(i=>[...i.sets].sort().join("|"))),r=new Map(e.filter(i=>i.sets.length===1&&i.size!==void 0).map(i=>[i.sets[0],i.size])),n=[];for(let i of e){if(i.sets.length<3)continue;let a=[...i.sets].sort();for(let o=0;o0?[...e,...n]:e}var nEt,gIe,yIe=F(()=>{"use strict";$r();Di();mr();Ba();mIe();Dn();Jt();s(rEt,"buildStyleByKey");nEt=s((e,t,r,n)=>{let i=n.db,a=i.getConfig?.(),{themeVariables:o,look:l,handDrawnSeed:u}=Lt(),h=l==="handDrawn",d=[o.venn1,o.venn2,o.venn3,o.venn4,o.venn5,o.venn6,o.venn7,o.venn8].filter(Boolean),f=i.getDiagramTitle?.(),p=i.getSubsetData(),m=i.getTextData(),g=rEt(i.getStyleData()),y=aEt(p),v=a?.width??800,x=a?.height??450,T=v/1600,w=f?48*T:0,C=o.primaryTextColor??o.textColor,k=pn(t);k.attr("viewBox",`0 0 ${v} ${x}`),f&&k.append("text").text(f).attr("class","venn-title").attr("font-size",`${32*T}px`).attr("text-anchor","middle").attr("dominant-baseline","middle").attr("x","50%").attr("y",32*T).style("fill",o.vennTitleTextColor||o.titleColor);let S=lt(document.createElement("div")),A=cIe().width(v).height(x-w);S.datum(y).call(A);let M=h?ht.svg(S.select("svg").node()):void 0,N=pIe(y,{width:v,height:x-w,padding:a?.padding??15}),D=new Map;for(let L of N){let P=Vg([...L.data.sets].sort());D.set(P,L)}m.length>0&&iEt(a,D,S,m,T,g);let R=gn(o.background||"#f4f4f4");S.selectAll(".venn-circle").each(function(L,P){let B=lt(this),$=Vg([...L.sets].sort()),G=g.get($),V=G?.fill||d[P%d.length]||o.primaryColor;B.classed(`venn-set-${P%8}`,!0);let z=G?.["fill-opacity"]??.1,W=G?.stroke||V,H=G?.["stroke-width"]||`${5*T}`;if(h&&M){let Q=D.get($);if(Q&&Q.circles.length>0){let U=Q.circles[0],ue=M.circle(U.x,U.y,U.radius*2,{roughness:.7,seed:u,fill:Tk(V,.7),fillStyle:"hachure",fillWeight:2,hachureGap:8,hachureAngle:-41+P*60,stroke:W,strokeWidth:parseFloat(String(H))});B.select("path").remove(),B.node()?.insertBefore(ue,B.select("text").node())}}else B.select("path").style("fill",V).style("fill-opacity",z).style("stroke",W).style("stroke-width",H).style("stroke-opacity",.95);let j=G?.color||(R?Je(V,30):et(V,30));B.select("text").style("font-size",`${48*T}px`).style("fill",j)}),h&&M?S.selectAll(".venn-intersection").each(function(L){let P=lt(this),O=Vg([...L.sets].sort()),$=g.get(O),G=$?.fill;if(G){let V=P.select("path"),z=V.attr("d");if(z){let W=M.path(z,{roughness:.7,seed:u,fill:Tk(G,.3),fillStyle:"cross-hatch",fillWeight:2,hachureGap:6,hachureAngle:60,stroke:"none"}),H=V.node();H?.parentNode?.insertBefore(W,H),V.remove()}}else P.select("path").style("fill-opacity",0);P.select("text").style("font-size",`${48*T}px`).style("fill",$?.color??o.vennSetTextColor??C)}):(S.selectAll(".venn-intersection text").style("font-size",`${48*T}px`).style("fill",L=>{let B=Vg([...L.sets].sort());return g.get(B)?.color??o.vennSetTextColor??C}),S.selectAll(".venn-intersection path").style("fill-opacity",L=>{let B=Vg([...L.sets].sort());return g.get(B)?.fill?1:0}).style("fill",L=>{let B=Vg([...L.sets].sort());return g.get(B)?.fill??"transparent"}));let E=k.append("g").attr("transform",`translate(0, ${w})`),I=S.select("svg").node();if(I&&"childNodes"in I)for(let L of[...I.childNodes])E.node()?.appendChild(L);Br(k,x,v,a?.useMaxWidth??!0)},"draw");s(Vg,"stableSetsKey");s(iEt,"renderTextNodes");s(aEt,"ensurePairwiseSubsets");gIe={draw:nEt}});var vIe={};ar(vIe,{diagram:()=>sEt});var sEt,xIe=F(()=>{"use strict";U8e();j8e();K8e();yIe();sEt={parser:H8e,db:Y8e,renderer:gIe,styles:X8e}});var Dv,CY=F(()=>{"use strict";Ni();mr();Qt();Kt();An();Dv=class{constructor(){this.nodes=[];this.levels=new Map;this.outerNodes=[];this.classes=new Map;this.setAccTitle=Cr;this.getAccTitle=Sr;this.setDiagramTitle=Mr;this.getDiagramTitle=Rr;this.getAccDescription=Ar;this.setAccDescription=Er}static{s(this,"TreeMapDB")}getNodes(){return this.nodes}getConfig(){let t=hr,r=Lt();return Fr({...t.treemap,...r.treemap??{}})}addNode(t,r){this.nodes.push(t),this.levels.set(t,r),r===0&&(this.outerNodes.push(t),this.root??=t)}getRoot(){return{name:"",children:this.outerNodes}}addClass(t,r){let n=this.classes.get(t)??{id:t,styles:[],textStyles:[]},i=r.replace(/\\,/g,"\xA7\xA7\xA7").replace(/,/g,";").replace(/§§§/g,",").split(";");i&&i.forEach(a=>{Ub(a)&&(n?.textStyles?n.textStyles.push(a):n.textStyles=[a]),n?.styles?n.styles.push(a):n.styles=[a]}),this.classes.set(t,n)}getClasses(){return this.classes}getStylesForClass(t){return this.classes.get(t)?.styles??[]}clear(){gr(),this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.root=void 0}}});function CIe(e){if(!e.length)return[];let t=[],r=[];return e.forEach(n=>{let i={name:n.name,children:n.type==="Leaf"?void 0:[]};for(i.classSelector=n?.classSelector,n?.cssCompiledStyles&&(i.cssCompiledStyles=n.cssCompiledStyles),n.type==="Leaf"&&n.value!==void 0&&(i.value=n.value);r.length>0&&r[r.length-1].level>=n.level;)r.pop();if(r.length===0)t.push(i);else{let a=r[r.length-1].node;a.children?a.children.push(i):a.children=[i]}n.type!=="Leaf"&&r.push({node:i,level:n.level})}),t}var kIe=F(()=>{"use strict";s(CIe,"buildHierarchy")});var uEt,hEt,kY,wIe=F(()=>{"use strict";Oa();Tt();_s();kIe();CY();uEt=s((e,t)=>{Nn(e,t);let r=[];for(let a of e.TreemapRows??[])a.$type==="ClassDefStatement"&&t.addClass(a.className??"",a.styleText??"");for(let a of e.TreemapRows??[]){let o=a.item;if(!o)continue;let l=a.indent?parseInt(a.indent):0,u=hEt(o),h=o.classSelector?t.getStylesForClass(o.classSelector):[],d=h.length>0?h:void 0,f={level:l,name:u,type:o.$type,value:o.value,classSelector:o.classSelector,cssCompiledStyles:d};r.push(f)}let n=CIe(r),i=s((a,o)=>{for(let l of a)t.addNode(l,o),l.children&&l.children.length>0&&i(l.children,o+1)},"addNodesRecursively");i(n,0)},"populate"),hEt=s(e=>e.name?String(e.name):"","getItemName"),kY={parser:{yy:void 0},parse:s(async e=>{try{let r=await pi("treemap",e);te.debug("Treemap AST:",r);let n=kY.parser?.yy;if(!(n instanceof Dv))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.");uEt(r,n)}catch(t){throw te.error("Error parsing treemap:",t),t}},"parse")}});var dEt,Iv,nk,fEt,pEt,SIe,EIe=F(()=>{"use strict";Ba();xf();Dn();$r();Kt();mr();Tt();dEt=10,Iv=10,nk=25,fEt=s((e,t,r,n)=>{let i=n.db,a=i.getConfig(),o=a.padding??dEt,l=i.getDiagramTitle(),u=i.getRoot(),{themeVariables:h}=Lt();if(!u)return;let d=l?30:0,f=pn(t),p=a.nodeWidth?a.nodeWidth*Iv:960,m=a.nodeHeight?a.nodeHeight*Iv:500,g=p,y=m+d;f.attr("viewBox",`0 0 ${g} ${y}`),Br(f,y,g,a.useMaxWidth);let v;try{let z=a.valueFormat||",";if(z==="$0,0")v=s(W=>"$"+pc(",")(W),"valueFormat");else if(z.startsWith("$")&&z.includes(",")){let W=/\.\d+/.exec(z),H=W?W[0]:"";v=s(j=>"$"+pc(","+H)(j),"valueFormat")}else if(z.startsWith("$")){let W=z.substring(1);v=s(H=>"$"+pc(W||"")(H),"valueFormat")}else v=pc(z)}catch(z){te.error("Error creating format function:",z),v=pc(",")}let x=go().range(["transparent",h.cScale0,h.cScale1,h.cScale2,h.cScale3,h.cScale4,h.cScale5,h.cScale6,h.cScale7,h.cScale8,h.cScale9,h.cScale10,h.cScale11]),b=go().range(["transparent",h.cScalePeer0,h.cScalePeer1,h.cScalePeer2,h.cScalePeer3,h.cScalePeer4,h.cScalePeer5,h.cScalePeer6,h.cScalePeer7,h.cScalePeer8,h.cScalePeer9,h.cScalePeer10,h.cScalePeer11]),T=go().range([h.cScaleLabel0,h.cScaleLabel1,h.cScaleLabel2,h.cScaleLabel3,h.cScaleLabel4,h.cScaleLabel5,h.cScaleLabel6,h.cScaleLabel7,h.cScaleLabel8,h.cScaleLabel9,h.cScaleLabel10,h.cScaleLabel11]);l&&f.append("text").attr("x",g/2).attr("y",d/2).attr("class","treemapTitle").attr("text-anchor","middle").attr("dominant-baseline","middle").text(l);let w=f.append("g").attr("transform",`translate(0, ${d})`).attr("class","treemapContainer"),C=A0(u).sum(z=>z.value??0).sort((z,W)=>(W.value??0)-(z.value??0)),S=oS().size([p,m]).paddingTop(z=>z.children&&z.children.length>0?nk+Iv:0).paddingInner(o).paddingLeft(z=>z.children&&z.children.length>0?Iv:0).paddingRight(z=>z.children&&z.children.length>0?Iv:0).paddingBottom(z=>z.children&&z.children.length>0?Iv:0).round(!0)(C),A=S.descendants().filter(z=>z.children&&z.children.length>0),M=w.selectAll(".treemapSection").data(A).enter().append("g").attr("class","treemapSection").attr("transform",z=>`translate(${z.x0},${z.y0})`);M.append("rect").attr("width",z=>z.x1-z.x0).attr("height",nk).attr("class","treemapSectionHeader").attr("fill","none").attr("fill-opacity",.6).attr("stroke-width",.6).attr("style",z=>z.depth===0?"display: none;":""),M.append("clipPath").attr("id",(z,W)=>`clip-section-${t}-${W}`).append("rect").attr("width",z=>Math.max(0,z.x1-z.x0-12)).attr("height",nk),M.append("rect").attr("width",z=>z.x1-z.x0).attr("height",z=>z.y1-z.y0).attr("class",(z,W)=>`treemapSection section${W}`).attr("fill",z=>x(z.data.name)).attr("fill-opacity",.6).attr("stroke",z=>b(z.data.name)).attr("stroke-width",2).attr("stroke-opacity",.4).attr("style",z=>{if(z.depth===0)return"display: none;";let W=ut({cssCompiledStyles:z.data.cssCompiledStyles});return W.nodeStyles+";"+W.borderStyles.join(";")}),M.append("text").attr("class","treemapSectionLabel").attr("x",6).attr("y",nk/2).attr("dominant-baseline","middle").text(z=>z.depth===0?"":z.data.name).attr("font-weight","bold").attr("clip-path",(z,W)=>`url(#clip-section-${t}-${W})`).attr("style",z=>{if(z.depth===0)return"display: none;";let W="dominant-baseline: middle; font-size: 12px; fill:"+T(z.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;",H=ut({cssCompiledStyles:z.data.cssCompiledStyles});return W+H.labelStyles.replace("color:","fill:")}).each(function(z){if(z.depth===0)return;let W=lt(this),H=z.data.name;W.text(H);let j=z.x1-z.x0,Q=6,U;a.showValues!==!1&&z.value?U=j-10-30-10-Q:U=j-Q-6;let J=Math.max(15,U),he=W.node();if(he.getComputedTextLength()>J){let Se=H;for(;Se.length>0;){if(Se=H.substring(0,Se.length-1),Se.length===0){W.text("..."),he.getComputedTextLength()>J&&W.text("");break}if(W.text(Se+"..."),he.getComputedTextLength()<=J)break}}}),a.showValues!==!1&&M.append("text").attr("class","treemapSectionValue").attr("x",z=>z.x1-z.x0-10).attr("y",nk/2).attr("text-anchor","end").attr("dominant-baseline","middle").text(z=>z.value?v(z.value):"").attr("font-style","italic").attr("style",z=>{if(z.depth===0)return"display: none;";let W="text-anchor: end; dominant-baseline: middle; font-size: 10px; fill:"+T(z.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;",H=ut({cssCompiledStyles:z.data.cssCompiledStyles});return W+H.labelStyles.replace("color:","fill:")});let N=S.leaves(),D=N.length>20,R=D?16:38,E=D?14:28,I=D?4:8,L=D?4:6,P=D?2:4,B=D?8:10,O=D?1:2,$=w.selectAll(".treemapLeafGroup").data(N).enter().append("g").attr("class",(z,W)=>`treemapNode treemapLeafGroup leaf${W}${z.data.classSelector?` ${z.data.classSelector}`:""}x`).attr("transform",z=>`translate(${z.x0},${z.y0})`);$.append("rect").attr("width",z=>z.x1-z.x0).attr("height",z=>z.y1-z.y0).attr("class","treemapLeaf").attr("fill",z=>z.parent?x(z.parent.data.name):x(z.data.name)).attr("style",z=>ut({cssCompiledStyles:z.data.cssCompiledStyles}).nodeStyles).attr("fill-opacity",.3).attr("stroke",z=>z.parent?x(z.parent.data.name):x(z.data.name)).attr("stroke-width",3),$.append("clipPath").attr("id",(z,W)=>`clip-${t}-${W}`).append("rect").attr("width",z=>Math.max(0,z.x1-z.x0-4)).attr("height",z=>Math.max(0,z.y1-z.y0-4)),$.append("text").attr("class","treemapLabel").attr("x",z=>(z.x1-z.x0)/2).attr("y",z=>(z.y1-z.y0)/2).attr("style",z=>{let W=`text-anchor: middle; dominant-baseline: middle; font-size: ${R}px;fill:`+T(z.data.name)+";",H=ut({cssCompiledStyles:z.data.cssCompiledStyles});return W+H.labelStyles.replace("color:","fill:")}).attr("clip-path",(z,W)=>`url(#clip-${t}-${W})`).text(z=>z.data.name).each(function(z){let W=lt(this),H=z.x1-z.x0,j=z.y1-z.y0,Q=W.node(),U=H-2*P,ue=j-2*P;if(UU&&J>I;)J--,W.style("font-size",`${J}px`);let se=Math.max(L,Math.min(E,Math.round(J*he))),oe=J+O+se;for(;oe>ue&&J>I&&(J--,se=Math.max(L,Math.min(E,Math.round(J*he))),!(seue;W.style("font-size",`${J}px`),D?(JU||J(W.x1-W.x0)/2).attr("y",function(W){return(W.y1-W.y0)/2}).attr("style",W=>{let H=`text-anchor: middle; dominant-baseline: hanging; font-size: ${E}px;fill:`+T(W.data.name)+";",j=ut({cssCompiledStyles:W.data.cssCompiledStyles});return H+j.labelStyles.replace("color:","fill:")}).attr("clip-path",(W,H)=>`url(#clip-${t}-${H})`).text(W=>W.value?v(W.value):"").each(function(W){let H=lt(this),j=this.parentNode;if(!j){H.style("display","none");return}let Q=lt(j).select(".treemapLabel");if(Q.empty()||Q.style("display")==="none"){H.style("display","none");return}let U=parseFloat(Q.style("font-size")),J=Math.max(L,Math.min(E,Math.round(U*.6)));H.style("font-size",`${J}px`);let se=(W.y1-W.y0)/2+U/2+O;H.attr("y",se);let oe=W.x1-W.x0,Ne=W.y1-W.y0-4,Ye=oe-2*P;H.node().getComputedTextLength()>Ye||se+J>Ne||J{"use strict";Qt();ec();mr();mEt={sectionStrokeColor:"black",sectionStrokeWidth:"1",sectionFillColor:"#efefef",leafStrokeColor:"black",leafStrokeWidth:"1",leafFillColor:"#efefef",labelFontSize:"12px",valueFontSize:"10px",titleFontSize:"14px"},gEt=s(({treemap:e}={})=>{let t=ia(),r=Lt(),n=Fr(t,r.themeVariables),i=Fr(mEt,e),a=i.titleColor??n.titleColor,o=i.labelColor??n.textColor,l=i.valueColor??n.textColor;return` + .treemapNode.section { + stroke: ${i.sectionStrokeColor}; + stroke-width: ${i.sectionStrokeWidth}; + fill: ${i.sectionFillColor}; + } + .treemapNode.leaf { + stroke: ${i.leafStrokeColor}; + stroke-width: ${i.leafStrokeWidth}; + fill: ${i.leafFillColor}; + } + .treemapLabel { + fill: ${o}; + font-size: ${i.labelFontSize}; + } + .treemapValue { + fill: ${l}; + font-size: ${i.valueFontSize}; + } + .treemapTitle { + fill: ${a}; + font-size: ${i.titleFontSize}; + } + `},"getStyles"),AIe=gEt});var _Ie={};ar(_Ie,{diagram:()=>yEt});var yEt,LIe=F(()=>{"use strict";CY();wIe();EIe();RIe();yEt={parser:kY,get db(){return new Dv},renderer:SIe,styles:AIe}});var D_,Wg,MIe,bEt,TEt,wY,NIe=F(()=>{"use strict";Oa();Tt();_s();D_=s((e,t)=>{let r=e<=1?e*100:e;if(r<0||r>100)throw new Error(`${t} must be between 0-1 (decimal) or 0-100 (percentage). Received: ${e}`);return r},"toPercent"),Wg=s((e,t,r)=>({x:D_(t,`${r} evolution`),y:D_(e,`${r} visibility`)}),"toCoordinates"),MIe=s(e=>{if(e){if(e==="+<>")return"bidirectional";if(e==="+<")return"backward";if(e==="+>")return"forward"}},"getFlowFromPort"),bEt=s(e=>{if(!e?.startsWith("+"))return{};let r=/^\+'([^']*)'/.exec(e)?.[1];return e.includes("<>")?{flow:"bidirectional",label:r}:e.includes("<")?{flow:"backward",label:r}:e.includes(">")?{flow:"forward",label:r}:{label:r}},"extractFlowFromArrow"),TEt=s((e,t)=>{if(Nn(e,t),e.size&&t.setSize(e.size.width,e.size.height),e.evolution){let r=e.evolution.stages.map(i=>i.secondName?`${i.name.trim()} / ${i.secondName.trim()}`:i.name.trim()),n=e.evolution.stages.filter(i=>i.boundary!==void 0).map(i=>i.boundary);t.updateAxes({stages:r,stageBoundaries:n})}if(e.anchors.forEach(r=>{let n=Wg(r.visibility,r.evolution,`Anchor "${r.name}"`);t.addNode(r.name,r.name,n.x,n.y,"anchor")}),e.components.forEach(r=>{let n=Wg(r.visibility,r.evolution,`Component "${r.name}"`),i=r.label?(r.label.negX?-1:1)*r.label.offsetX:void 0,a=r.label?(r.label.negY?-1:1)*r.label.offsetY:void 0,o=r.decorator?.strategy;t.addNode(r.name,r.name,n.x,n.y,"component",i,a,r.inertia,o)}),e.notes.forEach(r=>{let n=Wg(r.visibility,r.evolution,`Note "${r.text}"`);t.addNote(r.text,n.x,n.y)}),e.pipelines.forEach(r=>{let n=t.getNode(r.parent);if(!n||typeof n.y!="number")throw new Error(`Pipeline "${r.parent}" must reference an existing component with coordinates.`);let i=n.y;t.startPipeline(r.parent),r.components.forEach(a=>{let o=`${r.parent}_${a.name}`,l=a.label?(a.label.negX?-1:1)*a.label.offsetX:void 0,u=a.label?(a.label.negY?-1:1)*a.label.offsetY:void 0,h=D_(a.evolution,`Pipeline component "${a.name}" evolution`);t.addNode(o,a.name,h,i,"pipeline-component",l,u),t.addPipelineComponent(r.parent,o)})}),e.links.forEach(r=>{let n=!!r.arrow&&(r.arrow.includes("-.->")||r.arrow.includes(".-.")),i=MIe(r.fromPort)??MIe(r.toPort),{flow:a,label:o}=bEt(r.arrow);!i&&a&&(i=a);let l=r.linkLabel,u=o??l;t.addLink(t.resolveNodeId(r.from),t.resolveNodeId(r.to),n,u,i)}),e.evolves.forEach(r=>{let n=t.getNode(r.component);if(n?.y!==void 0){let i=D_(r.target,`Evolve target for "${r.component}"`);t.addTrend(r.component,i,n.y)}}),e.annotations.length>0){let r=e.annotations[0],n=Wg(r.x,r.y,"Annotations box");t.setAnnotationsBox(n.x,n.y)}e.annotation.forEach(r=>{let n=Wg(r.x,r.y,`Annotation ${r.number}`);t.addAnnotation(r.number,[{x:n.x,y:n.y}],r.text)}),e.accelerators.forEach(r=>{let n=Wg(r.x,r.y,`Accelerator "${r.name}"`);t.addAccelerator(r.name,n.x,n.y)}),e.deaccelerators.forEach(r=>{let n=Wg(r.x,r.y,`Deaccelerator "${r.name}"`);t.addDeaccelerator(r.name,n.x,n.y)})},"populateDb"),wY={parser:{yy:void 0},parse:s(async e=>{let t=await pi("wardley",e);te.debug(t);let r=wY.parser?.yy;if(!r||typeof r.addNode!="function")throw new Error("parser.parser?.yy was not a WardleyDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");TEt(t,r)},"parse")}});var I_,PIe=F(()=>{"use strict";I_=class{constructor(){this.nodes=new Map;this.links=[];this.trends=new Map;this.pipelines=new Map;this.annotations=[];this.notes=[];this.accelerators=[];this.deaccelerators=[];this.axes={}}static{s(this,"WardleyBuilder")}addNode(t){let r=this.nodes.get(t.id)??{id:t.id,label:t.label},n={...r,...t,className:t.className??r.className,labelOffsetX:t.labelOffsetX??r.labelOffsetX,labelOffsetY:t.labelOffsetY??r.labelOffsetY};this.nodes.set(t.id,n)}addLink(t){this.links.push(t)}addTrend(t){this.trends.set(t.nodeId,t)}startPipeline(t){this.pipelines.set(t,{nodeId:t,componentIds:[]});let r=this.nodes.get(t);r&&(r.isPipelineParent=!0)}addPipelineComponent(t,r){let n=this.pipelines.get(t);n&&n.componentIds.push(r);let i=this.nodes.get(r);i&&(i.inPipeline=!0)}addAnnotation(t){this.annotations.push(t)}addNote(t){this.notes.push(t)}addAccelerator(t){this.accelerators.push(t)}addDeaccelerator(t){this.deaccelerators.push(t)}setAnnotationsBox(t,r){this.annotationsBox={x:t,y:r}}setAxes(t){this.axes={...this.axes,...t}}setSize(t,r){this.size={width:t,height:r}}getNode(t){return this.nodes.get(t)}resolveNodeId(t){if(this.nodes.has(t))return t;for(let[r,n]of this.nodes)if(n.label===t)return r;return t}build(){let t=[];for(let r of this.nodes.values()){if(typeof r.x!="number"||typeof r.y!="number")throw new Error(`Node "${r.label}" is missing coordinates`);t.push(r)}return{nodes:t,links:[...this.links],trends:[...this.trends.values()],pipelines:[...this.pipelines.values()],annotations:[...this.annotations],notes:[...this.notes],accelerators:[...this.accelerators],deaccelerators:[...this.deaccelerators],annotationsBox:this.annotationsBox,axes:{...this.axes},size:this.size}}clear(){this.nodes.clear(),this.links=[],this.trends.clear(),this.pipelines.clear(),this.annotations=[],this.notes=[],this.accelerators=[],this.deaccelerators=[],this.annotationsBox=void 0,this.axes={},this.size=void 0}}});function CEt(){return Le()["wardley-beta"]}function kEt(e,t,r,n,i,a,o,l,u){rs.addNode({id:e,label:t,x:r,y:n,className:i,labelOffsetX:a,labelOffsetY:o,inertia:l,sourceStrategy:u})}function wEt(e,t,r=!1,n,i){rs.addLink({source:e,target:t,dashed:r,label:n,flow:i})}function SEt(e,t,r){rs.addTrend({nodeId:e,targetX:t,targetY:r})}function EEt(e,t,r){rs.addAnnotation({number:e,coordinates:t,text:r})}function AEt(e,t,r){rs.addNote({text:e,x:t,y:r})}function REt(e,t,r){rs.addAccelerator({name:e,x:t,y:r})}function _Et(e,t,r){rs.addDeaccelerator({name:e,x:t,y:r})}function LEt(e,t){rs.setAnnotationsBox(e,t)}function DEt(e,t){rs.setSize(e,t)}function IEt(e){rs.startPipeline(e)}function MEt(e,t){rs.addPipelineComponent(e,t)}function NEt(e){rs.setAxes(e)}function PEt(e){return rs.getNode(e)}function OEt(e){return rs.resolveNodeId(e)}function BEt(){return rs.build()}function $Et(){rs.clear(),gr()}var rs,OIe,BIe=F(()=>{"use strict";Zt();An();PIe();rs=new I_;s(CEt,"getConfig");s(kEt,"addNode");s(wEt,"addLink");s(SEt,"addTrend");s(EEt,"addAnnotation");s(AEt,"addNote");s(REt,"addAccelerator");s(_Et,"addDeaccelerator");s(LEt,"setAnnotationsBox");s(DEt,"setSize");s(IEt,"startPipeline");s(MEt,"addPipelineComponent");s(NEt,"updateAxes");s(PEt,"getNode");s(OEt,"resolveNodeId");s(BEt,"getWardleyData");s($Et,"clear");OIe={getConfig:CEt,addNode:kEt,addLink:wEt,addTrend:SEt,addAnnotation:EEt,addNote:AEt,addAccelerator:REt,addDeaccelerator:_Et,setAnnotationsBox:LEt,setSize:DEt,startPipeline:IEt,addPipelineComponent:MEt,updateAxes:NEt,getNode:PEt,resolveNodeId:OEt,getWardleyData:BEt,clear:$Et,setAccTitle:Cr,getAccTitle:Sr,setDiagramTitle:Mr,getDiagramTitle:Rr,getAccDescription:Ar,setAccDescription:Er}});var FEt,GEt,zEt,VEt,$Ie,FIe=F(()=>{"use strict";Zt();Tt();Ba();Dn();FEt=["Genesis","Custom Built","Product","Commodity"],GEt=s(()=>{let{themeVariables:e}=Le();return{backgroundColor:e.wardley?.backgroundColor??e.background??"#fff",axisColor:e.wardley?.axisColor??"#000",axisTextColor:e.wardley?.axisTextColor??e.primaryTextColor??"#222",gridColor:e.wardley?.gridColor??"rgba(100, 100, 100, 0.2)",componentFill:e.wardley?.componentFill??"#fff",componentStroke:e.wardley?.componentStroke??"#000",componentLabelColor:e.wardley?.componentLabelColor??e.primaryTextColor??"#222",linkStroke:e.wardley?.linkStroke??"#000",evolutionStroke:e.wardley?.evolutionStroke??"#dc3545",annotationStroke:e.wardley?.annotationStroke??"#000",annotationTextColor:e.wardley?.annotationTextColor??e.primaryTextColor??"#222",annotationFill:e.wardley?.annotationFill??e.background??"#fff"}},"getTheme"),zEt=s(()=>{let e=Le()["wardley-beta"];return{width:e?.width??900,height:e?.height??600,padding:e?.padding??48,nodeRadius:e?.nodeRadius??6,nodeLabelOffset:e?.nodeLabelOffset??8,axisFontSize:e?.axisFontSize??12,labelFontSize:e?.labelFontSize??10,showGrid:e?.showGrid??!1,useMaxWidth:e?.useMaxWidth??!0}},"getConfigValues"),VEt=s((e,t,r,n)=>{te.debug(`Rendering Wardley map +`+e);let i=zEt(),a=GEt(),o=i.nodeRadius*1.6,l=n.db,u=l.getWardleyData(),h=l.getDiagramTitle(),d=u.size?.width??i.width,f=u.size?.height??i.height,p=pn(t);p.selectAll("*").remove(),Br(p,f,d,i.useMaxWidth),p.attr("viewBox",`0 0 ${d} ${f}`);let m=p.append("g").attr("class","wardley-map"),g=p.append("defs");g.append("marker").attr("id",`arrow-${t}`).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerWidth",6).attr("markerHeight",6).attr("orient","auto-start-reverse").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("fill",a.evolutionStroke).attr("stroke","none"),g.append("marker").attr("id",`link-arrow-end-${t}`).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerWidth",5).attr("markerHeight",5).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("fill",a.linkStroke).attr("stroke","none"),g.append("marker").attr("id",`link-arrow-start-${t}`).attr("viewBox","0 0 10 10").attr("refX",1).attr("refY",5).attr("markerWidth",5).attr("markerHeight",5).attr("orient","auto").append("path").attr("d","M 10 0 L 0 5 L 10 10 z").attr("fill",a.linkStroke).attr("stroke","none"),m.append("rect").attr("class","wardley-background").attr("width",d).attr("height",f).attr("fill",a.backgroundColor);let y=d-i.padding*2,v=f-i.padding*2;h&&m.append("text").attr("class","wardley-title").attr("x",d/2).attr("y",i.padding/2).attr("fill",a.axisTextColor).attr("font-size",i.axisFontSize*1.05).attr("font-weight","bold").attr("text-anchor","middle").attr("dominant-baseline","middle").text(h);let x=s(O=>i.padding+O/100*y,"projectX"),b=s(O=>f-i.padding-O/100*v,"projectY"),T=m.append("g").attr("class","wardley-axes");T.append("line").attr("x1",i.padding).attr("x2",d-i.padding).attr("y1",f-i.padding).attr("y2",f-i.padding).attr("stroke",a.axisColor).attr("stroke-width",1),T.append("line").attr("x1",i.padding).attr("x2",i.padding).attr("y1",i.padding).attr("y2",f-i.padding).attr("stroke",a.axisColor).attr("stroke-width",1);let w=u.axes.xLabel??"Evolution",C=u.axes.yLabel??"Visibility";T.append("text").attr("class","wardley-axis-label wardley-axis-label-x").attr("x",i.padding+y/2).attr("y",f-i.padding/4).attr("fill",a.axisTextColor).attr("font-size",i.axisFontSize).attr("font-weight","bold").attr("text-anchor","middle").text(w),T.append("text").attr("class","wardley-axis-label wardley-axis-label-y").attr("x",i.padding/3).attr("y",i.padding+v/2).attr("fill",a.axisTextColor).attr("font-size",i.axisFontSize).attr("font-weight","bold").attr("text-anchor","middle").attr("transform",`rotate(-90 ${i.padding/3} ${i.padding+v/2})`).text(C);let k=u.axes.stages&&u.axes.stages.length>0?u.axes.stages:FEt;if(k.length>0){let O=m.append("g").attr("class","wardley-stages"),$=u.axes.stageBoundaries,G=[];if($&&$.length===k.length){let V=0;$.forEach(z=>{G.push({start:V,end:z}),V=z})}else{let V=1/k.length;k.forEach((z,W)=>{G.push({start:W*V,end:(W+1)*V})})}k.forEach((V,z)=>{let W=G[z],H=i.padding+W.start*y,j=i.padding+W.end*y,Q=(H+j)/2;z>0&&O.append("line").attr("x1",H).attr("x2",H).attr("y1",i.padding).attr("y2",f-i.padding).attr("stroke","#000").attr("stroke-width",1).attr("stroke-dasharray","5 5").attr("opacity",.8),O.append("text").attr("class","wardley-stage-label").attr("x",Q).attr("y",f-i.padding/1.5).attr("fill",a.axisTextColor).attr("font-size",i.axisFontSize-2).attr("text-anchor","middle").text(V)})}if(i.showGrid){let O=m.append("g").attr("class","wardley-grid");for(let $=1;$<4;$++){let G=$/4,V=i.padding+y*G;O.append("line").attr("x1",V).attr("x2",V).attr("y1",i.padding).attr("y2",f-i.padding).attr("stroke",a.gridColor).attr("stroke-dasharray","2 6"),O.append("line").attr("x1",i.padding).attr("x2",d-i.padding).attr("y1",f-i.padding-v*G).attr("y2",f-i.padding-v*G).attr("stroke",a.gridColor).attr("stroke-dasharray","2 6")}}let S=new Map;if(u.nodes.forEach(O=>{S.set(O.id,{x:x(O.x),y:b(O.y),node:O})}),u.pipelines.length>0){let O=m.append("g").attr("class","wardley-pipelines"),$=m.append("g").attr("class","wardley-pipeline-links");u.pipelines.forEach(G=>{if(G.componentIds.length===0)return;let V=G.componentIds.map(j=>({id:j,pos:S.get(j),node:u.nodes.find(Q=>Q.id===j)})).filter(j=>j.pos&&j.node).sort((j,Q)=>j.node.x-Q.node.x);for(let j=0;j{let Q=S.get(j);Q&&(z=Math.min(z,Q.x),W=Math.max(W,Q.x),H=Q.y)}),z!==1/0&&W!==-1/0){let Q=i.nodeRadius*4,U=H-Q/2,ue=S.get(G.nodeId);if(ue){let J=(z+W)/2;ue.x=J,ue.y=U-o/6}O.append("rect").attr("class","wardley-pipeline-box").attr("x",z-15).attr("y",U).attr("width",W-z+30).attr("height",Q).attr("fill","none").attr("stroke",a.axisColor).attr("stroke-width",1.5).attr("rx",4).attr("ry",4)}})}let A=m.append("g").attr("class","wardley-links"),M=new Map;u.pipelines.forEach(O=>{M.set(O.nodeId,new Set(O.componentIds))});let N=u.links.filter(O=>!(!S.has(O.source)||!S.has(O.target)||M.get(O.target)?.has(O.source)));A.selectAll("line").data(N).enter().append("line").attr("class",O=>`wardley-link${O.dashed?" wardley-link--dashed":""}`).attr("x1",O=>{let $=S.get(O.source),G=S.get(O.target),z=u.nodes.find(Q=>Q.id===O.source).isPipelineParent?o/Math.sqrt(2):i.nodeRadius,W=G.x-$.x,H=G.y-$.y,j=Math.sqrt(W*W+H*H);return $.x+W/j*z}).attr("y1",O=>{let $=S.get(O.source),G=S.get(O.target),z=u.nodes.find(Q=>Q.id===O.source).isPipelineParent?o/Math.sqrt(2):i.nodeRadius,W=G.x-$.x,H=G.y-$.y,j=Math.sqrt(W*W+H*H);return $.y+H/j*z}).attr("x2",O=>{let $=S.get(O.source),G=S.get(O.target),z=u.nodes.find(Q=>Q.id===O.target).isPipelineParent?o/Math.sqrt(2):i.nodeRadius,W=$.x-G.x,H=$.y-G.y,j=Math.sqrt(W*W+H*H);return G.x+W/j*z}).attr("y2",O=>{let $=S.get(O.source),G=S.get(O.target),z=u.nodes.find(Q=>Q.id===O.target).isPipelineParent?o/Math.sqrt(2):i.nodeRadius,W=$.x-G.x,H=$.y-G.y,j=Math.sqrt(W*W+H*H);return G.y+H/j*z}).attr("stroke",a.linkStroke).attr("stroke-width",1).attr("stroke-dasharray",O=>O.dashed?"6 6":null).attr("marker-end",O=>O.flow==="forward"||O.flow==="bidirectional"?`url(#link-arrow-end-${t})`:null).attr("marker-start",O=>O.flow==="backward"||O.flow==="bidirectional"?`url(#link-arrow-start-${t})`:null),A.selectAll("text").data(N.filter(O=>O.label)).enter().append("text").attr("class","wardley-link-label").attr("x",O=>{let $=S.get(O.source),G=S.get(O.target),V=($.x+G.x)/2,z=G.y-$.y,W=G.x-$.x,H=Math.sqrt(W*W+z*z),j=8,Q=z/H;return V+Q*j}).attr("y",O=>{let $=S.get(O.source),G=S.get(O.target),V=($.y+G.y)/2,z=G.x-$.x,W=G.y-$.y,H=Math.sqrt(z*z+W*W),j=8,Q=-z/H;return V+Q*j}).attr("fill",a.axisTextColor).attr("font-size",i.labelFontSize).attr("text-anchor","middle").attr("dominant-baseline","middle").attr("transform",O=>{let $=S.get(O.source),G=S.get(O.target),V=($.x+G.x)/2,z=($.y+G.y)/2,W=G.x-$.x,H=G.y-$.y,j=Math.sqrt(W*W+H*H),Q=8,U=H/j,ue=-W/j,J=V+U*Q,he=z+ue*Q,se=Math.atan2(H,W)*180/Math.PI;return(se>90||se<-90)&&(se+=180),`rotate(${se} ${J} ${he})`}).text(O=>O.label);let D=m.append("g").attr("class","wardley-trends"),R=u.trends.map(O=>{let $=S.get(O.nodeId);if(!$)return null;let G=x(O.targetX),V=b(O.targetY),z=G-$.x,W=V-$.y,H=Math.sqrt(z*z+W*W),j=i.nodeRadius+2,Q=H>j?G-z/H*j:G,U=H>j?V-W/H*j:V;return{origin:$,targetX:G,targetY:V,adjustedX2:Q,adjustedY2:U}}).filter(O=>O!==null);D.selectAll("line").data(R).enter().append("line").attr("class","wardley-trend").attr("x1",O=>O.origin.x).attr("y1",O=>O.origin.y).attr("x2",O=>O.adjustedX2).attr("y2",O=>O.adjustedY2).attr("stroke",a.evolutionStroke).attr("stroke-width",1).attr("stroke-dasharray","4 4").attr("marker-end",`url(#arrow-${t})`);let I=m.append("g").attr("class","wardley-nodes").selectAll("g").data(u.nodes).enter().append("g").attr("class",O=>["wardley-node",O.className?`wardley-node--${O.className}`:""].filter(Boolean).join(" "));I.filter(O=>O.sourceStrategy==="outsource").append("circle").attr("class","wardley-outsource-overlay").attr("cx",O=>S.get(O.id).x).attr("cy",O=>S.get(O.id).y).attr("r",i.nodeRadius*2).attr("fill","#666").attr("stroke",a.componentStroke).attr("stroke-width",1),I.filter(O=>O.sourceStrategy==="buy").append("circle").attr("class","wardley-buy-overlay").attr("cx",O=>S.get(O.id).x).attr("cy",O=>S.get(O.id).y).attr("r",i.nodeRadius*2).attr("fill","#ccc").attr("stroke",a.componentStroke).attr("stroke-width",1),I.filter(O=>O.sourceStrategy==="build").append("circle").attr("class","wardley-build-overlay").attr("cx",O=>S.get(O.id).x).attr("cy",O=>S.get(O.id).y).attr("r",i.nodeRadius*2).attr("fill","#eee").attr("stroke","#000").attr("stroke-width",1);let L=I.filter(O=>O.sourceStrategy==="market");L.append("circle").attr("class","wardley-market-overlay").attr("cx",O=>S.get(O.id).x).attr("cy",O=>S.get(O.id).y).attr("r",i.nodeRadius*2).attr("fill","white").attr("stroke",a.componentStroke).attr("stroke-width",1),I.filter(O=>!O.isPipelineParent&&O.sourceStrategy!=="market"&&O.className!=="anchor").append("circle").attr("cx",O=>S.get(O.id).x).attr("cy",O=>S.get(O.id).y).attr("r",i.nodeRadius).attr("fill",a.componentFill).attr("stroke",a.componentStroke).attr("stroke-width",1);let P=i.nodeRadius*.7,B=i.nodeRadius*1.2;if(L.append("line").attr("class","wardley-market-line").attr("x1",O=>S.get(O.id).x).attr("y1",O=>S.get(O.id).y-B).attr("x2",O=>S.get(O.id).x-B*Math.cos(Math.PI/6)).attr("y2",O=>S.get(O.id).y+B*Math.sin(Math.PI/6)).attr("stroke",a.componentStroke).attr("stroke-width",1),L.append("line").attr("class","wardley-market-line").attr("x1",O=>S.get(O.id).x-B*Math.cos(Math.PI/6)).attr("y1",O=>S.get(O.id).y+B*Math.sin(Math.PI/6)).attr("x2",O=>S.get(O.id).x+B*Math.cos(Math.PI/6)).attr("y2",O=>S.get(O.id).y+B*Math.sin(Math.PI/6)).attr("stroke",a.componentStroke).attr("stroke-width",1),L.append("line").attr("class","wardley-market-line").attr("x1",O=>S.get(O.id).x+B*Math.cos(Math.PI/6)).attr("y1",O=>S.get(O.id).y+B*Math.sin(Math.PI/6)).attr("x2",O=>S.get(O.id).x).attr("y2",O=>S.get(O.id).y-B).attr("stroke",a.componentStroke).attr("stroke-width",1),L.append("circle").attr("class","wardley-market-dot").attr("cx",O=>S.get(O.id).x).attr("cy",O=>S.get(O.id).y-B).attr("r",P).attr("fill","white").attr("stroke",a.componentStroke).attr("stroke-width",2),L.append("circle").attr("class","wardley-market-dot").attr("cx",O=>S.get(O.id).x-B*Math.cos(Math.PI/6)).attr("cy",O=>S.get(O.id).y+B*Math.sin(Math.PI/6)).attr("r",P).attr("fill","white").attr("stroke",a.componentStroke).attr("stroke-width",2),L.append("circle").attr("class","wardley-market-dot").attr("cx",O=>S.get(O.id).x+B*Math.cos(Math.PI/6)).attr("cy",O=>S.get(O.id).y+B*Math.sin(Math.PI/6)).attr("r",P).attr("fill","white").attr("stroke",a.componentStroke).attr("stroke-width",2),I.filter(O=>O.isPipelineParent===!0).append("rect").attr("x",O=>S.get(O.id).x-o/2).attr("y",O=>S.get(O.id).y-o/2).attr("width",o).attr("height",o).attr("fill",a.componentFill).attr("stroke",a.componentStroke).attr("stroke-width",1),I.filter(O=>O.inertia===!0).append("line").attr("class","wardley-inertia").attr("x1",O=>{let $=S.get(O.id),G=O.isPipelineParent?o/2+15:i.nodeRadius+15;return O.sourceStrategy&&(G+=i.nodeRadius+10),$.x+G}).attr("y1",O=>{let $=S.get(O.id),G=O.isPipelineParent?o:i.nodeRadius*2;return $.y-G/2}).attr("x2",O=>{let $=S.get(O.id),G=O.isPipelineParent?o/2+15:i.nodeRadius+15;return O.sourceStrategy&&(G+=i.nodeRadius+10),$.x+G}).attr("y2",O=>{let $=S.get(O.id),G=O.isPipelineParent?o:i.nodeRadius*2;return $.y+G/2}).attr("stroke",a.componentStroke).attr("stroke-width",6),I.append("text").attr("x",O=>{let $=S.get(O.id);if(O.className==="anchor")return O.labelOffsetX!==void 0?$.x+O.labelOffsetX:$.x;let G=i.nodeLabelOffset;O.sourceStrategy&&O.labelOffsetX===void 0&&(G+=10);let V=O.labelOffsetX??G;return $.x+V}).attr("y",O=>{let $=S.get(O.id);if(O.className==="anchor")return O.labelOffsetY!==void 0?$.y+O.labelOffsetY:$.y-3;let G=-i.nodeLabelOffset;O.sourceStrategy&&O.labelOffsetY===void 0&&(G-=10);let V=O.labelOffsetY??G;return $.y+V}).attr("class","wardley-node-label").attr("fill",O=>O.className==="evolved"?a.evolutionStroke:O.className==="anchor"?"#000":a.componentLabelColor).attr("font-size",i.labelFontSize).attr("font-weight",O=>O.className==="anchor"?"bold":"normal").attr("text-anchor",O=>O.className==="anchor"?"middle":"start").attr("dominant-baseline",O=>O.className==="anchor"?"middle":"auto").text(O=>O.label),u.annotations.length>0){let O=m.append("g").attr("class","wardley-annotations");if(u.annotations.forEach($=>{let G=$.coordinates.map(V=>({x:x(V.x),y:b(V.y)}));if(G.length>1)for(let V=0;V{let z=O.append("g").attr("class","wardley-annotation");z.append("circle").attr("cx",V.x).attr("cy",V.y).attr("r",10).attr("fill","white").attr("stroke",a.axisColor).attr("stroke-width",1.5),z.append("text").attr("x",V.x).attr("y",V.y).attr("text-anchor","middle").attr("dominant-baseline","central").attr("font-size",10).attr("fill",a.axisTextColor).attr("font-weight","bold").text($.number)})}),u.annotationsBox){let $=x(u.annotationsBox.x),G=b(u.annotationsBox.y),V=10,z=16,W=11,H=O.append("g").attr("class","wardley-annotations-box"),j=[...u.annotations].filter(U=>U.text).sort((U,ue)=>U.number-ue.number),Q=[];if(j.forEach((U,ue)=>{let J=H.append("text").attr("x",$+V).attr("y",G+V+(ue+1)*z).attr("font-size",W).attr("fill",a.axisTextColor).attr("text-anchor","start").attr("dominant-baseline","middle").text(`${U.number}. ${U.text}`);Q.push(J)}),Q.length>0){let U=0,ue=0;Q.forEach(Ne=>{let Ye=Ne.node(),We=Ye.getComputedTextLength();U=Math.max(U,We);let pe=Ye.getBBox();ue=Math.max(ue,pe.height)});let J=U+V*2+105,he=j.length*z+V*2+ue/2,se=i.padding,oe=d-i.padding-J,Se=i.padding,xe=f-i.padding-he;$=Math.max(se,Math.min($,oe)),G=Math.max(Se,Math.min(G,xe)),Q.forEach((Ne,Ye)=>{Ne.attr("x",$+V).attr("y",G+V+(Ye+1)*z)}),H.insert("rect","text").attr("x",$).attr("y",G).attr("width",J).attr("height",he).attr("fill","white").attr("stroke",a.axisColor).attr("stroke-width",1.5).attr("rx",4).attr("ry",4)}}}if(u.notes.length>0){let O=m.append("g").attr("class","wardley-notes");u.notes.forEach($=>{let G=x($.x),V=b($.y);O.append("text").attr("x",G).attr("y",V).attr("text-anchor","start").attr("font-size",11).attr("fill",a.axisTextColor).attr("font-weight","bold").text($.text)})}if(u.accelerators.length>0){let O=m.append("g").attr("class","wardley-accelerators");u.accelerators.forEach($=>{let G=x($.x),V=b($.y),z=60,W=30,H=20,j=` + M ${G} ${V-W/2} + L ${G+z-H} ${V-W/2} + L ${G+z-H} ${V-W/2-8} + L ${G+z} ${V} + L ${G+z-H} ${V+W/2+8} + L ${G+z-H} ${V+W/2} + L ${G} ${V+W/2} + Z + `;O.append("path").attr("d",j).attr("fill","white").attr("stroke",a.componentStroke).attr("stroke-width",1),O.append("text").attr("x",G+z/2).attr("y",V+W/2+15).attr("text-anchor","middle").attr("font-size",10).attr("fill",a.axisTextColor).attr("font-weight","bold").text($.name)})}if(u.deaccelerators.length>0){let O=m.append("g").attr("class","wardley-deaccelerators");u.deaccelerators.forEach($=>{let G=x($.x),V=b($.y),z=60,W=30,H=20,j=` + M ${G+z} ${V-W/2} + L ${G+H} ${V-W/2} + L ${G+H} ${V-W/2-8} + L ${G} ${V} + L ${G+H} ${V+W/2+8} + L ${G+H} ${V+W/2} + L ${G+z} ${V+W/2} + Z + `;O.append("path").attr("d",j).attr("fill","white").attr("stroke",a.componentStroke).attr("stroke-width",1),O.append("text").attr("x",G+z/2).attr("y",V+W/2+15).attr("text-anchor","middle").attr("font-size",10).attr("fill",a.axisTextColor).attr("font-weight","bold").text($.name)})}},"draw"),$Ie={draw:VEt}});var GIe,zIe=F(()=>{"use strict";Qt();ec();mr();GIe=s(({wardley:e}={})=>{let t=ia(),r=Lt(),n=Fr(t,r.themeVariables),i=Fr(n.wardley,e);return` + .wardley-background { + fill: ${i.backgroundColor}; + } + .wardley-axes line, .wardley-axes path { + stroke: ${i.axisColor}; + } + .wardley-axis-label { + fill: ${i.axisTextColor}; + } + .wardley-stage-label { + fill: ${i.axisTextColor}; + } + .wardley-grid line { + stroke: ${i.gridColor}; + } + .wardley-node circle { + fill: ${i.componentFill}; + stroke: ${i.componentStroke}; + } + .wardley-node-label { + fill: ${i.componentLabelColor}; + } + .wardley-link { + stroke: ${i.linkStroke}; + } + .wardley-link--dashed { + stroke-dasharray: 4 4; + } + .wardley-link-label { + fill: ${i.axisTextColor}; + } + .wardley-trend line { + stroke: ${i.evolutionStroke}; + } + .wardley-annotation-line { + stroke: ${i.annotationStroke}; + } + .wardley-annotation circle { + fill: ${i.annotationFill}; + stroke: ${i.annotationStroke}; + } + .wardley-annotation text { + fill: ${i.annotationTextColor}; + } + .wardley-annotations-box rect { + fill: ${i.annotationFill}; + stroke: ${i.annotationStroke}; + } + .wardley-annotations-box text { + fill: ${i.annotationTextColor}; + } + .wardley-pipeline-box { + stroke: ${i.componentStroke}; + } + .wardley-notes text { + fill: ${i.axisTextColor}; + } + `},"styles")});var VIe={};ar(VIe,{diagram:()=>WEt});var WEt,WIe=F(()=>{"use strict";NIe();BIe();FIe();zIe();WEt={parser:wY,db:OIe,renderer:$Ie,styles:GIe}});var UIe,ik,YEt,jEt,XEt,KEt,ZEt,QEt,Mv,SY=F(()=>{"use strict";mr();Ni();Tt();Qt();An();UIe=s(()=>({domains:new Map,transitions:[]}),"createDefaultData"),ik=UIe(),YEt=s(()=>ik.domains,"getDomains"),jEt=s(()=>ik.transitions,"getTransitions"),XEt=s(e=>{if(e)for(let t of e){let r=t.domain,n=(t.items??[]).map(i=>({label:i.label}));ik.domains.set(r,{name:r,items:n})}},"setDomains"),KEt=s(e=>{e&&(ik.transitions=e.filter(t=>t.from===t.to?(te.warn(`Cynefin: self-loop transition on domain "${t.from}" is not meaningful and will be skipped.`),!1):!0).map(t=>({from:t.from,to:t.to,label:t.label||void 0})))},"setTransitions"),ZEt=s(()=>Fr({...hr.cynefin,...Lt().cynefin}),"getConfig"),QEt=s(()=>{gr(),ik=UIe()},"clear"),Mv={getDomains:YEt,getTransitions:jEt,setDomains:XEt,setTransitions:KEt,getConfig:ZEt,clear:QEt,setAccTitle:Cr,getAccTitle:Sr,setDiagramTitle:Mr,getDiagramTitle:Rr,getAccDescription:Ar,setAccDescription:Er}});var JEt,YIe,jIe=F(()=>{"use strict";Oa();Tt();_s();SY();JEt=s(e=>{Nn(e,Mv),Mv.setDomains(e.domains),Mv.setTransitions(e.transitions)},"populate"),YIe={parse:s(async e=>{let t=await pi("cynefin",e);te.debug(t),JEt(t)},"parse")}});function M_(e){let t=e+1831565813|0;return t=Math.imul(t^t>>>15,t|1),t^=t+Math.imul(t^t>>>7,t|61),((t^t>>>14)>>>0)/4294967296}function e4t(e){let t=0;for(let r=0;r{"use strict";s(M_,"seededRandom");s(e4t,"hashString");s(XIe,"resolveSeed");s(KIe,"generateFoldPath");s(ZIe,"generateHorizontalBoundary");s(QIe,"generateCliffPath");s(JIe,"generateConfusionPath")});var tMe,t4t,r4t,EY,n4t,rMe,nMe=F(()=>{"use strict";Ba();Dn();Tt();mr();ec();Qt();eMe();tMe={complex:{model:"Probe \u2192 Sense \u2192 Respond",practice:"Emergent Practices"},complicated:{model:"Sense \u2192 Analyse \u2192 Respond",practice:"Good Practices"},clear:{model:"Sense \u2192 Categorise \u2192 Respond",practice:"Best Practices"},chaotic:{model:"Act \u2192 Sense \u2192 Respond",practice:"Novel Practices"},confusion:{model:"",practice:"Disorder"}},t4t=s((e,t)=>{let r=e/2,n=t/2;return{complex:{cx:r/2,cy:n/2,x:0,y:0,w:r,h:n},complicated:{cx:r+r/2,cy:n/2,x:r,y:0,w:r,h:n},chaotic:{cx:r/2,cy:n+n/2,x:0,y:n,w:r,h:n},clear:{cx:r+r/2,cy:n+n/2,x:r,y:n,w:r,h:n},confusion:{cx:r,cy:n,x:r*.7,y:n*.7,w:r*.6,h:n*.6}}},"getDomainLayouts"),r4t=s(()=>{let e=ia(),t=Lt();return Fr(e,t.themeVariables).cynefin},"getCynefinDomainColors"),EY=3,n4t=s((e,t,r,n)=>{let i=n.db,a=i.getDomains(),o=i.getTransitions(),l=i.getDiagramTitle(),u=i.getAccTitle(),h=i.getAccDescription(),d=i.getConfig(),f=r4t();te.debug("Rendering Cynefin diagram");let p=d.width,m=d.height,g=d.padding,y=d.showDomainDescriptions,v=d.boundaryAmplitude,x=p+g*2,b=m+g*2,T={complex:f.complexBg,complicated:f.complicatedBg,clear:f.clearBg,chaotic:f.chaoticBg,confusion:f.confusionBg},w=pn(t);Br(w,b,x,d.useMaxWidth??!0),w.attr("viewBox",`0 0 ${x} ${b}`),u&&w.append("title").text(u),h&&w.append("desc").text(h);let C=w.append("g").attr("transform",`translate(${g}, ${g})`),k=t4t(p,m),S=XIe(d.seed,t),A=C.append("g").attr("class","cynefin-backgrounds"),M=["complex","complicated","chaotic","clear"];for(let O of M){let $=k[O];A.append("rect").attr("class","cynefinDomain").attr("x",$.x).attr("y",$.y).attr("width",$.w).attr("height",$.h).attr("fill",T[O]).attr("fill-opacity",.4).attr("stroke","none")}let N=C.append("g").attr("class","cynefin-boundaries");N.append("path").attr("class","cynefinBoundary").attr("d",KIe(p,m,S,v)).attr("fill","none"),N.append("path").attr("class","cynefinBoundary").attr("d",ZIe(p,m,S+100,v)).attr("fill","none"),N.append("path").attr("class","cynefinCliff").attr("d",QIe(p,m)).attr("fill","none");let D=p*.15,R=m*.15;C.append("path").attr("class","cynefinConfusion").attr("d",JIe(p/2,m/2,D,R)).attr("fill",T.confusion).attr("fill-opacity",.5);let E=C.append("g").attr("class","cynefin-labels");for(let O of M){let $=k[O];E.append("text").attr("class","cynefinDomainLabel").attr("x",$.cx).attr("y",y?$.cy-30:$.cy).attr("text-anchor","middle").attr("dominant-baseline","middle").text(O.charAt(0).toUpperCase()+O.slice(1))}if(E.append("text").attr("class","cynefinDomainLabel").attr("x",p/2).attr("y",y?m/2-10:m/2).attr("text-anchor","middle").attr("dominant-baseline","middle").text("Confusion"),y){let O=C.append("g").attr("class","cynefin-subtitles");for(let $ of M){let G=k[$],V=tMe[$];O.append("text").attr("class","cynefinSubtitle").attr("x",G.cx).attr("y",G.cy-10).attr("text-anchor","middle").attr("dominant-baseline","middle").text(V.model),O.append("text").attr("class","cynefinSubtitle").attr("x",G.cx).attr("y",G.cy+5).attr("text-anchor","middle").attr("dominant-baseline","middle").text(V.practice)}O.append("text").attr("class","cynefinSubtitle").attr("x",p/2).attr("y",m/2+8).attr("text-anchor","middle").attr("dominant-baseline","middle").text(tMe.confusion.practice)}let I=C.append("g").attr("class","cynefin-items"),L=26,P=10,B=["complex","complicated","chaotic","clear","confusion"];for(let O of B){let $=a.get(O);if(!$||$.items.length===0)continue;let G=k[O],V=O==="confusion",z=$.items,W=0;V&&$.items.length>EY&&(W=$.items.length-EY,z=$.items.slice(0,EY));let H;if(V){let j=y?22:14;H=G.cy+j}else H=G.cy+(y?25:15);if([...z].forEach((j,Q)=>{let U=H+Q*(L+4),ue=I.append("g"),J=ue.append("text").attr("class","cynefinItemText").attr("x",0).attr("y",L/2).attr("text-anchor","middle").attr("dominant-baseline","central").text(j.label),he=j.label.length*7,se=J.node();if(se&&typeof se.getBBox=="function"){let xe=se.getBBox();xe.width>0&&(he=xe.width)}let oe=he+P*2,Se=G.cx-oe/2;ue.attr("transform",`translate(${Se}, ${U})`),ue.insert("rect","text").attr("class","cynefinItem").attr("x",0).attr("y",0).attr("width",oe).attr("height",L).attr("rx",4).attr("ry",4).attr("fill",T[O]).attr("fill-opacity",.95),J.attr("x",oe/2).attr("y",L/2)}),W>0){let j=H+z.length*(L+4),Q=`+${W} more`,U=I.append("g"),ue=U.append("text").attr("class","cynefinItemText").attr("x",0).attr("y",L/2).attr("text-anchor","middle").attr("dominant-baseline","central").text(Q),J=Q.length*7,he=ue.node();if(he&&typeof he.getBBox=="function"){let Se=he.getBBox();Se.width>0&&(J=Se.width)}let se=J+P*2,oe=G.cx-se/2;U.attr("transform",`translate(${oe}, ${j})`),U.insert("rect","text").attr("class","cynefinItemOverflow").attr("x",0).attr("y",0).attr("width",se).attr("height",L).attr("rx",4).attr("ry",4).attr("fill",T[O]).attr("fill-opacity",.6),ue.attr("x",se/2).attr("y",L/2)}}if(o.length>0){let O=w.select("defs").empty()?w.append("defs"):w.select("defs"),$=`cynefin-arrow-${t}`;O.append("marker").attr("id",$).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerWidth",6).attr("markerHeight",6).attr("orient","auto-start-reverse").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","cynefinArrowHead");let G=C.append("g").attr("class","cynefin-arrows");o.forEach(V=>{let z=k[V.from],W=k[V.to];if(!z||!W)return;if(V.from===V.to){te.warn(`Cynefin renderer: skipping self-loop on domain "${V.from}"`);return}let H=z.cx,j=z.cy,Q=W.cx,U=W.cy,ue=(H+Q)/2,J=(j+U)/2,he=Q-H,se=U-j,oe=Math.sqrt(he*he+se*se),Se=oe*.15,xe=-se/oe,Ne=he/oe,Ye=ue+xe*Se,We=J+Ne*Se;G.append("path").attr("class","cynefinArrowLine").attr("d",`M${H},${j} Q${Ye},${We} ${Q},${U}`).attr("fill","none").attr("marker-end",`url(#${$})`),V.label&&G.append("text").attr("class","cynefinArrowLabel").attr("x",Ye).attr("y",We-6).attr("text-anchor","middle").attr("dominant-baseline","auto").text(V.label)})}l&&C.append("text").attr("class","cynefinTitle").attr("x",p/2).attr("y",-g/2).attr("text-anchor","middle").attr("dominant-baseline","middle").text(l)},"draw"),rMe={draw:n4t}});var i4t,a4t,iMe,aMe=F(()=>{"use strict";Qt();ec();mr();i4t=s(()=>{let e=ia(),t=Lt();return Fr(e,t.themeVariables).cynefin},"getCynefinTheme"),a4t=s(()=>{let e=i4t();return` + .cynefinDomain { + stroke: none; + } + .cynefinDomainLabel { + font-size: ${e.domainFontSize}px; + font-weight: bold; + fill: ${e.labelColor}; + } + .cynefinSubtitle { + font-size: ${e.itemFontSize-1}px; + fill: ${e.textColor}; + font-style: italic; + } + .cynefinItem { + fill-opacity: 0.95; + stroke: ${e.boundaryColor}; + stroke-width: 1; + } + .cynefinItemText { + font-size: ${e.itemFontSize}px; + fill: ${e.textColor}; + } + .cynefinItemOverflow { + fill-opacity: 0.6; + stroke: ${e.boundaryColor}; + stroke-width: 1; + stroke-dasharray: 3 2; + } + .cynefinBoundary { + stroke: ${e.boundaryColor}; + stroke-width: ${e.boundaryWidth}; + stroke-dasharray: 6 3; + } + .cynefinCliff { + stroke: ${e.cliffColor}; + stroke-width: ${e.cliffWidth}; + } + .cynefinConfusion { + stroke: ${e.boundaryColor}; + stroke-width: 1.5; + stroke-dasharray: 4 2; + } + .cynefinArrowLine { + stroke: ${e.arrowColor}; + stroke-width: ${e.arrowWidth}; + fill: none; + } + .cynefinArrowHead { + fill: ${e.arrowColor}; + stroke: none; + } + .cynefinArrowLabel { + font-size: ${e.itemFontSize-1}px; + fill: ${e.textColor}; + } + .cynefinTitle { + font-size: ${e.domainFontSize+2}px; + font-weight: bold; + fill: ${e.labelColor}; + } + `},"styles"),iMe=a4t});var sMe={};ar(sMe,{diagram:()=>s4t});var s4t,oMe=F(()=>{"use strict";jIe();SY();nMe();aMe();s4t={parser:YIe,db:Mv,renderer:rMe,styles:iMe}});var AY,RY,_Y,LY,N_,Kf,Nv,c4t,uMe,hMe,u4t,h4t,d4t,f4t,p4t,m4t,g4t,y4t,v4t,tn,fu=F(()=>{"use strict";Zt();Tt();An();Gr();AY="",RY="",_Y="",LY=[],N_=new Map,Kf=s(e=>vr(e,Le()),"sanitizeText"),Nv=s(e=>{switch(e.type){case"terminal":return{...e,value:Kf(e.value)};case"nonterminal":return{...e,name:Kf(e.name)};case"sequence":return{...e,elements:e.elements.map(Nv)};case"choice":return{...e,alternatives:e.alternatives.map(Nv)};case"optional":return{...e,element:Nv(e.element)};case"repetition":return{...e,element:Nv(e.element),separator:e.separator?Nv(e.separator):void 0};case"special":return{...e,text:Kf(e.text)}}},"sanitizeAstNode"),c4t=s(()=>{AY="",RY="",_Y="",LY.length=0,N_.clear(),gr(),te.debug("[Railroad] Database cleared")},"clear"),uMe=s(e=>{AY=Kf(e),te.debug("[Railroad] Title set:",e)},"setTitle"),hMe=s(()=>AY,"getTitle"),u4t=s(e=>{let t={...e,name:Kf(e.name),definition:Nv(e.definition),comment:e.comment?Kf(e.comment):void 0};te.debug("[Railroad] Adding rule:",t.name),N_.has(t.name)&&te.warn(`[Railroad] Rule '${t.name}' is already defined. Overwriting.`),LY.push(t),N_.set(t.name,t)},"addRule"),h4t=s(()=>LY,"getRules"),d4t=s(e=>N_.get(e),"getRule"),f4t=s(e=>{RY=Kf(e).replace(/^\s+/g,""),te.debug("[Railroad] Accessibility title set:",e)},"setAccTitle"),p4t=s(()=>RY,"getAccTitle"),m4t=s(e=>{_Y=Kf(e).replace(/\n\s+/g,` +`),te.debug("[Railroad] Accessibility description set:",e)},"setAccDescription"),g4t=s(()=>_Y,"getAccDescription"),y4t=uMe,v4t=hMe,tn={clear:c4t,setTitle:uMe,getTitle:hMe,addRule:u4t,getRules:h4t,getRule:d4t,setAccTitle:f4t,getAccTitle:p4t,setAccDescription:m4t,getAccDescription:g4t,setDiagramTitle:y4t,getDiagramTitle:v4t}});var x4t,Pv,b4t,T4t,dMe,fMe=F(()=>{"use strict";Oa();Tt();_s();fu();x4t=Q1().Railroad.parser.LangiumParser,Pv=s(e=>{switch(e.$type){case"RailroadTerminalExpr":return{type:"terminal",value:e.value};case"RailroadNonTerminalExpr":return{type:"nonterminal",name:e.name};case"RailroadSpecialExpr":return{type:"special",text:e.text};case"RailroadSequenceExpr":{let t=e.elements.map(Pv);return t.length===1?t[0]:{type:"sequence",elements:t}}case"RailroadChoiceExpr":{let t=e.alternatives.map(Pv);return t.length===1?t[0]:{type:"choice",alternatives:t}}case"RailroadOptionalExpr":return{type:"optional",element:Pv(e.element)};case"RailroadOneOrMoreExpr":return{type:"repetition",element:Pv(e.element),min:1,max:1/0};case"RailroadZeroOrMoreExpr":return{type:"repetition",element:Pv(e.element),min:0,max:1/0};default:throw new Error(`Unsupported railroad expression: ${e.$type}`)}},"transformExpression"),b4t=s(e=>({name:e.name,definition:Pv(e.definition)}),"transformRule"),T4t=s(e=>{Nn(e,tn),e.title&&tn.setTitle(e.title),e.rules.map(t=>tn.addRule(b4t(t)))},"populateDb"),dMe={parse:s(e=>{tn.clear(),te.debug("[Railroad Parser] Starting Langium parse");let t=x4t.parse(e);if(t.lexerErrors.length>0||t.parserErrors.length>0)throw new wh(t);let r=t.value;te.debug("[Railroad Parser] Parsed rules:",r.rules.length),T4t(r),te.debug("[Railroad Parser] Parse complete")},"parse"),parser:{yy:tn}}});var ka,pMe=F(()=>{"use strict";ka={compactMode:!1,padding:10,verticalSeparation:8,horizontalSeparation:10,arcRadius:10,fontSize:14,fontFamily:"monospace",terminalFill:"#FFFFC0",terminalStroke:"#000000",terminalTextColor:"#000000",nonTerminalFill:"#FFFFFF",nonTerminalStroke:"#000000",nonTerminalTextColor:"#000000",lineColor:"#000000",strokeWidth:2,markerFill:"#000000",commentFill:"#E8E8E8",commentStroke:"#888888",commentTextColor:"#666666",specialFill:"#F0E0FF",specialStroke:"#8800CC",ruleNameColor:"#000066",showMarkers:!0,markerRadius:5}});var C4t,k4t,w4t,mMe,S4t,E4t,Pn,gMe,qg,A4t,R4t,P_,Zf,Ov=F(()=>{"use strict";mr();ec();pMe();C4t=/^#(?:[\da-f]{3,4}|[\da-f]{6}|[\da-f]{8})$|^(?:rgb|rgba|hsl|hsla|hwb|lab|lch|oklab|oklch)\([\d\s%+,./-]+\)$|^[a-z]+$/i,k4t=/^[\w "',.-]+$/,w4t=new Set(["compactMode","padding","verticalSeparation","horizontalSeparation","arcRadius","fontSize","fontFamily","terminalFill","terminalStroke","terminalTextColor","nonTerminalFill","nonTerminalStroke","nonTerminalTextColor","lineColor","strokeWidth","markerFill","commentFill","commentStroke","commentTextColor","specialFill","specialStroke","ruleNameColor","showMarkers","markerRadius"]),mMe=s(e=>e?Object.keys(e).every(t=>t==="railroad"||w4t.has(t)):!1,"isRailroadStyleOptions"),S4t=s(e=>e?"railroad"in e&&e.railroad?e.railroad:mMe(e)?e:{}:{},"extractRailroadOverrides"),E4t=s(e=>{if(!e||mMe(e))return{};let{railroad:t,svgId:r,theme:n,look:i,...a}=e;return a},"extractThemeOverrides"),Pn=s((e,t)=>{if(typeof e!="string")return t;let r=e.trim();return C4t.test(r)?r:t},"sanitizeColorValue"),gMe=s((e,t)=>{if(typeof e!="string")return t;let r=e.trim();return k4t.test(r)?r:t},"sanitizeFontFamilyValue"),qg=s((e,t)=>{let r=typeof e=="number"?e:typeof e=="string"?Number.parseFloat(e):Number.NaN;return Number.isFinite(r)&&r>=0?r:t},"sanitizeNumberValue"),A4t=s(e=>{let t=typeof e=="number"?e:typeof e=="string"?Number.parseFloat(e):Number.NaN;return Number.isFinite(t)&&t>0?t:void 0},"parseThemeFontSize"),R4t=s(e=>{let t=gMe(e.fontFamily,ka.fontFamily),r=A4t(e.fontSize)??ka.fontSize;return{...ka,fontFamily:t,fontSize:r,terminalFill:Pn(e.secondBkg??e.secondaryColor,ka.terminalFill),terminalStroke:Pn(e.secondaryBorderColor??e.lineColor,ka.terminalStroke),terminalTextColor:Pn(e.secondaryTextColor??e.textColor,ka.terminalTextColor),nonTerminalFill:Pn(e.mainBkg??e.background,ka.nonTerminalFill),nonTerminalStroke:Pn(e.primaryBorderColor??e.lineColor,ka.nonTerminalStroke),nonTerminalTextColor:Pn(e.primaryTextColor??e.textColor,ka.nonTerminalTextColor),lineColor:Pn(e.lineColor,ka.lineColor),markerFill:Pn(e.lineColor,ka.markerFill),commentFill:Pn(e.labelBackground??e.tertiaryColor,ka.commentFill),commentStroke:Pn(e.tertiaryBorderColor??e.lineColor,ka.commentStroke),commentTextColor:Pn(e.tertiaryTextColor??e.textColor,ka.commentTextColor),specialFill:Pn(e.tertiaryColor??e.secondaryColor,ka.specialFill),specialStroke:Pn(e.tertiaryBorderColor??e.secondaryBorderColor,ka.specialStroke),ruleNameColor:Pn(e.titleColor??e.textColor,ka.ruleNameColor)}},"buildThemeDefaults"),P_=s(e=>{let t=Lt(),r={...ia(),...t.themeVariables??{},...E4t(e)},n=R4t(r),i={...t.railroad??{},...S4t(e)};return{compactMode:i.compactMode??n.compactMode,padding:qg(i.padding,n.padding),verticalSeparation:qg(i.verticalSeparation,n.verticalSeparation),horizontalSeparation:qg(i.horizontalSeparation,n.horizontalSeparation),arcRadius:qg(i.arcRadius,n.arcRadius),fontSize:qg(i.fontSize,n.fontSize),fontFamily:gMe(i.fontFamily,n.fontFamily),terminalFill:Pn(i.terminalFill,n.terminalFill),terminalStroke:Pn(i.terminalStroke,n.terminalStroke),terminalTextColor:Pn(i.terminalTextColor,n.terminalTextColor),nonTerminalFill:Pn(i.nonTerminalFill,n.nonTerminalFill),nonTerminalStroke:Pn(i.nonTerminalStroke,n.nonTerminalStroke),nonTerminalTextColor:Pn(i.nonTerminalTextColor,n.nonTerminalTextColor),lineColor:Pn(i.lineColor,n.lineColor),strokeWidth:qg(i.strokeWidth,n.strokeWidth),markerFill:Pn(i.markerFill,n.markerFill),commentFill:Pn(i.commentFill,n.commentFill),commentStroke:Pn(i.commentStroke,n.commentStroke),commentTextColor:Pn(i.commentTextColor,n.commentTextColor),specialFill:Pn(i.specialFill,n.specialFill),specialStroke:Pn(i.specialStroke,n.specialStroke),ruleNameColor:Pn(i.ruleNameColor,n.ruleNameColor),showMarkers:i.showMarkers??n.showMarkers,markerRadius:qg(i.markerRadius,n.markerRadius)}},"buildRailroadStyleOptions"),Zf=s(e=>{let{fontFamily:t,fontSize:r,terminalFill:n,terminalStroke:i,terminalTextColor:a,nonTerminalFill:o,nonTerminalStroke:l,nonTerminalTextColor:u,lineColor:h,strokeWidth:d,markerFill:f,commentFill:p,commentStroke:m,commentTextColor:g,specialFill:y,specialStroke:v,ruleNameColor:x}=P_(e);return` + .railroad-diagram { + font-family: ${t}; + font-size: ${r}px; + } + + .railroad-terminal rect { + fill: ${n}; + stroke: ${i}; + stroke-width: ${d}px; + } + + .railroad-terminal text { + fill: ${a}; + font-family: ${t}; + font-size: ${r}px; + text-anchor: middle; + dominant-baseline: middle; + } + + .railroad-nonterminal rect { + fill: ${o}; + stroke: ${l}; + stroke-width: ${d}px; + } + + .railroad-nonterminal text { + fill: ${u}; + font-family: ${t}; + font-size: ${r}px; + text-anchor: middle; + dominant-baseline: middle; + } + + .railroad-line { + stroke: ${h}; + stroke-width: ${d}px; + fill: none; + } + + .railroad-start circle, + .railroad-end circle { + fill: ${f}; + } + + .railroad-comment ellipse { + fill: ${p}; + stroke: ${m}; + stroke-width: ${d}px; + } + + .railroad-comment text { + fill: ${g}; + font-style: italic; + font-family: ${t}; + font-size: ${r}px; + text-anchor: middle; + dominant-baseline: middle; + } + + .railroad-special rect { + fill: ${y}; + stroke: ${v}; + stroke-width: ${d}px; + stroke-dasharray: 5,3; + } + + .railroad-special text { + fill: ${u}; + font-family: ${t}; + font-size: ${r}px; + text-anchor: middle; + dominant-baseline: middle; + } + + .railroad-rule-name { + font-weight: bold; + fill: ${x}; + font-family: ${t}; + font-size: ${r}px; + } + + .railroad-group { + /* Grouping container, no specific styles */ + } +`},"getStyles")});var lo,DY,yMe,_4t,Qf,ak=F(()=>{"use strict";Tt();mr();Ba();Dn();fu();Ov();lo=class{constructor(){this.d=""}static{s(this,"PathBuilder")}moveTo(t,r){return this.d+=`M ${t} ${r} `,this}lineTo(t,r){return this.d+=`L ${t} ${r} `,this}horizontalTo(t){return this.d+=`H ${t} `,this}verticalTo(t){return this.d+=`V ${t} `,this}arcTo(t,r,n,i,a,o,l){return this.d+=`A ${t} ${r} ${n} ${i?1:0} ${a?1:0} ${o} ${l} `,this}build(){return this.d.trim()}},DY=class{constructor(t,r=P_()){this.textCache=new Map;this.svg=t,this.config=r}static{s(this,"RailroadRenderer")}measureText(t){if(this.textCache.has(t))return this.textCache.get(t);let r=this.svg.append("text").attr("font-family",this.config.fontFamily).attr("font-size",this.config.fontSize).text(t),n=r.node().getBBox(),i={width:n.width,height:n.height};return r.remove(),this.textCache.set(t,i),i}renderTerminal(t,r){let n=this.measureText(r),i=n.width+this.config.padding*2,a=n.height+this.config.padding*2,o=t.append("g").attr("class","railroad-terminal");return o.append("rect").attr("x",0).attr("y",0).attr("width",i).attr("height",a).attr("rx",10).attr("ry",10),o.append("text").attr("x",i/2).attr("y",a/2).text(r),{element:o.node(),dimensions:{width:i,height:a,up:a/2,down:a/2}}}renderNonTerminal(t,r){let n=this.measureText(r),i=n.width+this.config.padding*2,a=n.height+this.config.padding*2,o=t.append("g").attr("class","railroad-nonterminal");return o.append("rect").attr("x",0).attr("y",0).attr("width",i).attr("height",a),o.append("text").attr("x",i/2).attr("y",a/2).text(r),{element:o.node(),dimensions:{width:i,height:a,up:a/2,down:a/2}}}renderSequence(t,r){let n=r.map(h=>this.renderExpression(t,h)),i=0,a=0,o=0;for(let h of n)i+=h.dimensions.width,a=Math.max(a,h.dimensions.up),o=Math.max(o,h.dimensions.down);i+=(n.length-1)*this.config.horizontalSeparation;let l=t.append("g").attr("class","railroad-sequence"),u=0;for(let h=0;hthis.renderExpression(t,p)),i=0,a=0;for(let p of n)i=Math.max(i,p.dimensions.width),a+=p.dimensions.height;a+=(n.length-1)*this.config.verticalSeparation;let o=this.config.arcRadius,l=o*4,u=i+l,h=t.append("g").attr("class","railroad-choice"),d=0,f=a/2;for(let p of n){let m=d,g=m+p.dimensions.up,y=o*2+(i-p.dimensions.width)/2;h.node().appendChild(p.element).setAttribute("transform",`translate(${y}, ${m})`);let x=new lo,b=g>f;g===f?x.moveTo(0,f).lineTo(y,g):x.moveTo(0,f).arcTo(o,o,0,!1,b,o,f+(b?o:-o)).lineTo(o,g-(b?o:-o)).arcTo(o,o,0,!1,!b,o*2,g).lineTo(y,g),h.append("path").attr("class","railroad-line").attr("d",x.build());let T=new lo,w=y+p.dimensions.width,C=u-o*2;g===f?T.moveTo(w,g).lineTo(u,f):T.moveTo(w,g).lineTo(C,g).arcTo(o,o,0,!1,!b,u-o,g+(b?-o:o)).lineTo(u-o,f+(b?o:-o)).arcTo(o,o,0,!1,b,u,f),h.append("path").attr("class","railroad-line").attr("d",T.build()),d+=p.dimensions.height+this.config.verticalSeparation}return{element:h.node(),dimensions:{width:u,height:a,up:f,down:a-f}}}renderOptional(t,r){let n=this.renderExpression(t,r),i=this.config.arcRadius,a=i*2,o=n.dimensions.width+i*4,l=n.dimensions.height+a,u=t.append("g").attr("class","railroad-optional"),h=i*2,d=a;u.node().appendChild(n.element).setAttribute("transform",`translate(${h}, ${d})`);let p=d+n.dimensions.up,m=new lo().moveTo(0,p).lineTo(i*2,p);u.append("path").attr("class","railroad-line").attr("d",m.build());let g=new lo().moveTo(h+n.dimensions.width,p).lineTo(o,p);u.append("path").attr("class","railroad-line").attr("d",g.build());let y=new lo().moveTo(0,p).arcTo(i,i,0,!1,!1,i,p-i).lineTo(i,i).arcTo(i,i,0,!1,!0,i*2,0).lineTo(o-i*2,0).arcTo(i,i,0,!1,!0,o-i,i).lineTo(o-i,p-i).arcTo(i,i,0,!1,!1,o,p);return u.append("path").attr("class","railroad-line").attr("d",y.build()),{element:u.node(),dimensions:{width:o,height:l,up:p,down:l-p}}}renderRepetition(t,r,n){let i=this.renderExpression(t,r),a=this.config.arcRadius,o=a*2,l=i.dimensions.width+a*4,u=n===0,h=i.dimensions.height+o+(u?o:0),d=t.append("g").attr("class","railroad-repetition"),f=a*2,p=u?o:0;d.node().appendChild(i.element).setAttribute("transform",`translate(${f}, ${p})`);let g=p+i.dimensions.up;d.append("path").attr("class","railroad-line").attr("d",new lo().moveTo(0,g).lineTo(a*2,g).build()),d.append("path").attr("class","railroad-line").attr("d",new lo().moveTo(f+i.dimensions.width,g).lineTo(l,g).build());let y=p+i.dimensions.height+a,v=new lo().moveTo(f+i.dimensions.width,g).arcTo(a,a,0,!1,!0,f+i.dimensions.width+a,g+a).lineTo(f+i.dimensions.width+a,y).arcTo(a,a,0,!1,!0,f+i.dimensions.width,y+a).lineTo(a*2,y+a).arcTo(a,a,0,!1,!0,a,y).lineTo(a,g+a).arcTo(a,a,0,!1,!0,a*2,g);if(d.append("path").attr("class","railroad-line").attr("d",v.build()),u){let x=new lo().moveTo(0,g).arcTo(a,a,0,!1,!1,a,g-a).lineTo(a,a).arcTo(a,a,0,!1,!0,a*2,0).lineTo(l-a*2,0).arcTo(a,a,0,!1,!0,l-a,a).lineTo(l-a,g-a).arcTo(a,a,0,!1,!1,l,g);d.append("path").attr("class","railroad-line").attr("d",x.build())}return{element:d.node(),dimensions:{width:l,height:h,up:g,down:h-g}}}renderSpecial(t,r){let n=this.measureText("? "+r+" ?"),i=n.width+this.config.padding*2,a=n.height+this.config.padding*2,o=t.append("g").attr("class","railroad-special");return o.append("rect").attr("x",0).attr("y",0).attr("width",i).attr("height",a),o.append("text").attr("x",i/2).attr("y",a/2).text("? "+r+" ?"),{element:o.node(),dimensions:{width:i,height:a,up:a/2,down:a/2}}}renderExpression(t,r){switch(r.type){case"terminal":return this.renderTerminal(t,r.value);case"nonterminal":return this.renderNonTerminal(t,r.name);case"sequence":return this.renderSequence(t,r.elements);case"choice":return this.renderChoice(t,r.alternatives);case"optional":return this.renderOptional(t,r.element);case"repetition":return this.renderRepetition(t,r.element,r.min);case"special":return this.renderSpecial(t,r.text);default:throw new Error(`Unknown node type: ${r.type}`)}}renderRule(t,r){let n=this.svg.append("g").attr("class","railroad-rule").attr("transform",`translate(0, ${r})`),i=t.name+" =",a=this.measureText(i).width+20,o=a+20,l=n.append("g"),u=this.renderExpression(l,t.definition),h=Math.max(20,u.dimensions.up),d=h-u.dimensions.up;return l.attr("transform",`translate(${o}, ${d})`),n.append("g").attr("class","railroad-rule-name-group").append("text").attr("class","railroad-rule-name").attr("x",0).attr("y",h).text(i),n.append("g").attr("class","railroad-start").append("circle").attr("cx",a).attr("cy",h).attr("r",this.config.markerRadius),n.append("g").attr("class","railroad-end").append("circle").attr("cx",o+u.dimensions.width+10).attr("cy",h).attr("r",this.config.markerRadius),n.append("path").attr("class","railroad-line").attr("d",new lo().moveTo(a+this.config.markerRadius,h).lineTo(o,h).build()),n.append("path").attr("class","railroad-line").attr("d",new lo().moveTo(o+u.dimensions.width,h).lineTo(o+u.dimensions.width+10-this.config.markerRadius,h).build()),{height:Math.max(40,d+u.dimensions.height+this.config.padding*2),width:o+u.dimensions.width+10+this.config.markerRadius}}renderDiagram(t){let r=this.config.padding,n=0;for(let i of t){let a=this.renderRule(i,r);r+=a.height+this.config.verticalSeparation,n=Math.max(n,a.width)}return{width:n+this.config.padding*2,height:r+this.config.padding}}},yMe=s((e,t,r)=>{Br(e,t.height,t.width,r),e.attr("viewBox",`0 0 ${t.width} ${t.height}`)},"configureRailroadSvgSize"),_4t=s((e,t,r)=>{te.debug(`[Railroad] Rendering diagram +`+e);try{let n=pn(t);n.attr("class","railroad-diagram");let a=Lt().railroad?.useMaxWidth??!0,o=tn.getRules();if(te.debug(`[Railroad] Rendering ${o.length} rules`),o.length===0){te.warn("[Railroad] No rules to render"),yMe(n,{height:100,width:200},a);return}let u=new DY(n,P_()).renderDiagram(o);yMe(n,u,a),te.debug("[Railroad] Render complete")}catch(n){throw te.error("[Railroad] Render error:",n),n}},"draw"),Qf={draw:_4t}});var xMe={};ar(xMe,{default:()=>L4t,diagram:()=>vMe});var vMe,L4t,bMe=F(()=>{"use strict";fMe();fu();ak();Ov();vMe={parser:dMe,db:tn,renderer:Qf,styles:Zf},L4t=vMe});var M4t,O_,N4t,kMe,P4t,O4t,B4t,$4t,wMe,SMe=F(()=>{"use strict";Oa();Tt();_s();fu();M4t=J1().RailroadEbnf.parser.LangiumParser,O_=s(e=>{let t=e.alternatives.map(N4t);return t.length===1?t[0]:{type:"choice",alternatives:t}},"transformChoice"),N4t=s(e=>{let t=e.elements.map(O4t);return t.length===1?t[0]:{type:"sequence",elements:t}},"transformSequence"),kMe=s(e=>{switch(e.$type){case"EbnfTerminal":return{type:"terminal",value:e.value};case"EbnfNonTerminal":return{type:"nonterminal",name:e.name};case"EbnfSpecial":return{type:"special",text:e.text};case"EbnfGroup":return O_(e.element);case"EbnfOptional":return{type:"optional",element:O_(e.element)};case"EbnfRepetition":return{type:"repetition",element:O_(e.element),min:0,max:1/0};default:throw new Error(`Unsupported EBNF primary node: ${e.$type}`)}},"transformPrimary"),P4t=s((e,t)=>{switch(t.$type){case"EbnfOptionalPostfix":return{type:"optional",element:e};case"EbnfZeroOrMorePostfix":return{type:"repetition",element:e,min:0,max:1/0};case"EbnfOneOrMorePostfix":return{type:"repetition",element:e,min:1,max:1/0};case"EbnfExceptionPostfix":return{type:"sequence",elements:[e,{type:"terminal",value:"-"},kMe(t.except)]};default:throw new Error(`Unsupported EBNF postfix node: ${t.$type}`)}},"transformPostfix"),O4t=s(e=>e.postfixes.reduce((t,r)=>P4t(t,r),kMe(e.base)),"transformTerm"),B4t=s(e=>({name:e.name,definition:O_(e.definition)}),"transformRule"),$4t=s(e=>{Nn(e,tn),e.title&&tn.setTitle(e.title),e.rules.map(t=>tn.addRule(B4t(t)))},"populateDb"),wMe={parse:s(e=>{tn.clear(),te.debug("[EBNF Parser] Starting Langium parse");let t=M4t.parse(e);if(t.lexerErrors.length>0||t.parserErrors.length>0)throw new wh(t);let r=t.value;te.debug("[EBNF Parser] Parsed rules:",r.rules.length),$4t(r),te.debug("[EBNF Parser] Parse complete")},"parse"),parser:{yy:tn}}});var EMe={};ar(EMe,{diagram:()=>F4t});var F4t,AMe=F(()=>{"use strict";SMe();fu();ak();Ov();F4t={parser:wMe,db:tn,renderer:Qf,styles:Zf}});var V4t,IY,W4t,q4t,H4t,U4t,Y4t,j4t,LMe,DMe=F(()=>{"use strict";Oa();Tt();_s();fu();V4t=ev().RailroadAbnf.parser.LangiumParser,IY=s(e=>{let t=e.alternatives.map(W4t);return t.length===1?t[0]:{type:"choice",alternatives:t}},"transformAlternation"),W4t=s(e=>{let t=e.elements.map(H4t);return t.length===1?t[0]:{type:"sequence",elements:t}},"transformConcatenation"),q4t=s(e=>{if(e.includes("*")){let[r,n]=e.split("*"),i=r?parseInt(r,10):0,a=n?parseInt(n,10):1/0;return{min:i,max:a}}let t=parseInt(e,10);return{min:t,max:t}},"parseRepeat"),H4t=s(e=>{let t=U4t(e.primary);if(!e.repeat)return t;let{min:r,max:n}=q4t(e.repeat);return r===0&&n===1?{type:"optional",element:t}:{type:"repetition",element:t,min:r,max:n}},"transformElement"),U4t=s(e=>{switch(e.$type){case"AbnfStringLiteral":return{type:"terminal",value:e.value};case"AbnfNumVal":return{type:"terminal",value:e.value};case"AbnfRuleName":return{type:"nonterminal",name:e.name};case"AbnfGroup":return IY(e.element);case"AbnfOptionalGroup":return{type:"optional",element:IY(e.element)};default:throw new Error(`Unsupported ABNF primary node: ${e.$type}`)}},"transformPrimary"),Y4t=s(e=>({name:e.name,definition:IY(e.definition)}),"transformRule"),j4t=s(e=>{Nn(e,tn),e.title&&tn.setTitle(e.title),e.rules.map(t=>tn.addRule(Y4t(t)))},"populateDb"),LMe={parse:s(e=>{tn.clear(),te.debug("[ABNF Parser] Starting Langium parse");let t=V4t.parse(e);if(t.lexerErrors.length>0||t.parserErrors.length>0)throw new wh(t);let r=t.value;te.debug("[ABNF Parser] Parsed rules:",r.rules.length),j4t(r),te.debug("[ABNF Parser] Parse complete")},"parse"),parser:{yy:tn}}});var IMe={};ar(IMe,{diagram:()=>X4t});var X4t,MMe=F(()=>{"use strict";DMe();fu();ak();Ov();X4t={parser:LMe,db:tn,renderer:Qf,styles:Zf}});var Q4t,BMe,J4t,e3t,OMe,t3t,r3t,n3t,i3t,$Me,FMe=F(()=>{"use strict";Oa();Tt();_s();fu();Q4t=tv().RailroadPeg.parser.LangiumParser,BMe=s(e=>{let t=e.alternatives.map(J4t);return t.length===1?t[0]:{type:"choice",alternatives:t}},"transformOrderedChoice"),J4t=s(e=>{let t=e.elements.map(e3t);return t.length===1?t[0]:{type:"sequence",elements:t}},"transformSequence"),e3t=s(e=>{let t=t3t(e.suffix);return e.operator?{type:"special",text:e.operator==="&"?`&${OMe(t)}`:`!${OMe(t)}`}:t},"transformPrefix"),OMe=s(e=>{switch(e.type){case"terminal":return`"${e.value}"`;case"nonterminal":return e.name;case"special":return e.text;default:return"(...)"}},"nodeToLabel"),t3t=s(e=>{let t=r3t(e.primary);if(!e.operator)return t;switch(e.operator){case"?":return{type:"optional",element:t};case"*":return{type:"repetition",element:t,min:0,max:1/0};case"+":return{type:"repetition",element:t,min:1,max:1/0};default:throw new Error(`Unsupported PEG suffix operator: ${e.operator}`)}},"transformSuffix"),r3t=s(e=>{switch(e.$type){case"PegLiteral":return{type:"terminal",value:e.value};case"PegIdentifier":return{type:"nonterminal",name:e.name};case"PegGroup":return BMe(e.element);case"PegAny":return{type:"special",text:e.dot};default:throw new Error(`Unsupported PEG primary node: ${e.$type}`)}},"transformPrimary"),n3t=s(e=>({name:e.name,definition:BMe(e.definition)}),"transformRule"),i3t=s(e=>{Nn(e,tn),e.title&&tn.setTitle(e.title),e.rules.map(t=>tn.addRule(n3t(t)))},"populateDb"),$Me={parse:s(e=>{tn.clear(),te.debug("[PEG Parser] Starting Langium parse");let t=Q4t.parse(e);if(t.lexerErrors.length>0||t.parserErrors.length>0)throw new wh(t);let r=t.value;te.debug("[PEG Parser] Parsed rules:",r.rules.length),i3t(r),te.debug("[PEG Parser] Parse complete")},"parse"),parser:{yy:tn}}});var GMe={};ar(GMe,{diagram:()=>a3t});var a3t,zMe=F(()=>{"use strict";FMe();fu();ak();Ov();a3t={parser:$Me,db:tn,renderer:Qf,styles:Zf}});var Y3t={};ar(Y3t,{clearLayoutRenderState:()=>EO,createCommonLayoutRenderer:()=>Ay,default:()=>U3t,defaultMeasureLayout:()=>AO,paintLayoutData:()=>RO});ml();BD();up();var yVe=s(e=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(e),"detector"),vVe=s(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(Ene(),Sne));return{id:"c4",diagram:e}},"loader"),xVe={id:"c4",detector:yVe,loader:vVe},Ane=xVe;var Vbe="flowchart",nht=s((e,t)=>t?.flowchart?.defaultRenderer==="dagre-wrapper"||t?.flowchart?.defaultRenderer==="elk"?!1:/^\s*graph/.test(e),"detector"),iht=s(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(TT(),x5));return{id:Vbe,diagram:e}},"loader"),aht={id:Vbe,detector:nht,loader:iht},Wbe=aht;var qbe="flowchart-v2",sht=s((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"),oht=s(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(TT(),x5));return{id:qbe,diagram:e}},"loader"),lht={id:qbe,detector:sht,loader:oht},Hbe=lht;var Kbe="swimlane",hht=s(e=>/^\s*swimlane-beta\b/.test(e),"detector"),dht=s(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(Xbe(),jbe));return{id:Kbe,diagram:e}},"loader"),fht={id:Kbe,detector:hht,loader:dht},Zbe=fht;var vht=s(e=>/^\s*erDiagram/.test(e),"detector"),xht=s(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(s2e(),a2e));return{id:"er",diagram:e}},"loader"),bht={id:"er",detector:vht,loader:xht},o2e=bht;var Z5e="gitGraph",w1t=s(e=>/^\s*gitGraph/.test(e),"detector"),S1t=s(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(K5e(),X5e));return{id:Z5e,diagram:e}},"loader"),E1t={id:Z5e,detector:w1t,loader:S1t},Q5e=E1t;var DAe="gantt",pvt=s(e=>/^\s*gantt/.test(e),"detector"),mvt=s(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(LAe(),_Ae));return{id:DAe,diagram:e}},"loader"),gvt={id:DAe,detector:pvt,loader:mvt},IAe=gvt;var zAe="info",Tvt=s(e=>/^\s*info/.test(e),"detector"),Cvt=s(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(GAe(),FAe));return{id:zAe,diagram:e}},"loader"),VAe={id:zAe,detector:Tvt,loader:Cvt};var Pvt=s(e=>/^\s*pie/.test(e),"detector"),Ovt=s(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(ZAe(),KAe));return{id:"pie",diagram:e}},"loader"),QAe={id:"pie",detector:Pvt,loader:Ovt};var hRe="quadrantChart",Jvt=s(e=>/^\s*quadrantChart/.test(e),"detector"),ext=s(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(uRe(),cRe));return{id:hRe,diagram:e}},"loader"),txt={id:hRe,detector:Jvt,loader:ext},dRe=txt;var VRe="xychart",Txt=s(e=>/^\s*xychart(-beta)?/.test(e),"detector"),Cxt=s(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(zRe(),GRe));return{id:VRe,diagram:e}},"loader"),kxt={id:VRe,detector:Txt,loader:Cxt},WRe=kxt;var QRe="requirement",Rxt=s(e=>/^\s*requirement(Diagram)?/.test(e),"detector"),_xt=s(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(ZRe(),KRe));return{id:QRe,diagram:e}},"loader"),Lxt={id:QRe,detector:Rxt,loader:_xt},JRe=Lxt;var y6e="sequence",Ebt=s(e=>/^\s*sequenceDiagram/.test(e),"detector"),Abt=s(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(g6e(),m6e));return{id:y6e,diagram:e}},"loader"),Rbt={id:y6e,detector:Ebt,loader:Abt},v6e=Rbt;var w6e="class",Nbt=s((e,t)=>t?.class?.defaultRenderer==="dagre-wrapper"?!1:/^\s*classDiagram/.test(e),"detector"),Pbt=s(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(k6e(),C6e));return{id:w6e,diagram:e}},"loader"),Obt={id:w6e,detector:Nbt,loader:Pbt},S6e=Obt;var R6e="classDiagram",$bt=s((e,t)=>/^\s*classDiagram/.test(e)&&t?.class?.defaultRenderer==="dagre-wrapper"?!0:/^\s*classDiagram-v2/.test(e),"detector"),Fbt=s(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(A6e(),E6e));return{id:R6e,diagram:e}},"loader"),Gbt={id:R6e,detector:$bt,loader:Fbt},_6e=Gbt;var o_e="state",d2t=s((e,t)=>t?.state?.defaultRenderer==="dagre-wrapper"?!1:/^\s*stateDiagram/.test(e),"detector"),f2t=s(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(s_e(),a_e));return{id:o_e,diagram:e}},"loader"),p2t={id:o_e,detector:d2t,loader:f2t},l_e=p2t;var h_e="stateDiagram",g2t=s((e,t)=>!!(/^\s*stateDiagram-v2/.test(e)||/^\s*stateDiagram/.test(e)&&t?.state?.defaultRenderer==="dagre-wrapper"),"detector"),y2t=s(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(u_e(),c_e));return{id:h_e,diagram:e}},"loader"),v2t={id:h_e,detector:g2t,loader:y2t},d_e=v2t;var A_e="journey",F2t=s(e=>/^\s*journey/.test(e),"detector"),G2t=s(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(E_e(),S_e));return{id:A_e,diagram:e}},"loader"),z2t={id:A_e,detector:F2t,loader:G2t},R_e=z2t;Tt();Ba();Dn();var V2t=s((e,t,r)=>{te.debug(`rendering svg for syntax error +`);let n=pn(t),i=n.append("g");n.attr("viewBox","0 0 2412 512"),Br(n,100,512,!0),i.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"),i.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"),i.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"),i.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"),i.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"),i.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"),i.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"),i.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"),XH={draw:V2t},__e=XH;var W2t={db:{},renderer:XH,parser:{parse:s(()=>{},"parse")}},L_e=W2t;var D_e="flowchart-elk",q2t=s((e,t={})=>/^\s*flowchart-elk/.test(e)||/^\s*(flowchart|graph)/.test(e)&&t?.flowchart?.defaultRenderer==="elk"?(t.layout="elk",!0):!1,"detector"),H2t=s(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(TT(),x5));return{id:D_e,diagram:e}},"loader"),U2t={id:D_e,detector:q2t,loader:H2t},I_e=U2t;var fLe="timeline",yTt=s(e=>/^\s*timeline/.test(e),"detector"),vTt=s(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(dLe(),hLe));return{id:fLe,diagram:e}},"loader"),xTt={id:fLe,detector:yTt,loader:vTt},pLe=xTt;var DLe="mindmap",RTt=s(e=>/^\s*mindmap/.test(e),"detector"),_Tt=s(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(LLe(),_Le));return{id:DLe,diagram:e}},"loader"),LTt={id:DLe,detector:RTt,loader:_Tt},ILe=LTt;var qLe="kanban",UTt=s(e=>/^\s*kanban/.test(e),"detector"),YTt=s(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(WLe(),VLe));return{id:qLe,diagram:e}},"loader"),jTt={id:qLe,detector:UTt,loader:YTt},HLe=jTt;var EDe="sankey",vCt=s(e=>/^\s*sankey(-beta)?/.test(e),"detector"),xCt=s(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(SDe(),wDe));return{id:EDe,diagram:e}},"loader"),bCt={id:EDe,detector:vCt,loader:xCt},ADe=bCt;var PDe="packet",_Ct=s(e=>/^\s*packet(-beta)?/.test(e),"detector"),LCt=s(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(NDe(),MDe));return{id:PDe,diagram:e}},"loader"),ODe={id:PDe,detector:_Ct,loader:LCt};var YDe="radar",QCt=s(e=>/^\s*radar-beta/.test(e),"detector"),JCt=s(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(UDe(),HDe));return{id:YDe,diagram:e}},"loader"),jDe={id:YDe,detector:QCt,loader:JCt};var b7e="block",Ikt=s(e=>/^\s*block(-beta)?/.test(e),"detector"),Mkt=s(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(x7e(),v7e));return{id:b7e,diagram:e}},"loader"),Nkt={id:b7e,detector:Ikt,loader:Mkt},T7e=Nkt;var z7e="treeView",iwt=s(e=>/^\s*treeView-beta/.test(e),"detector"),awt=s(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(G7e(),F7e));return{id:z7e,diagram:e}},"loader"),swt={id:z7e,detector:iwt,loader:awt},V7e=swt;var h8e="architecture",Twt=s(e=>/^\s*architecture/.test(e),"detector"),Cwt=s(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(u8e(),c8e));return{id:h8e,diagram:e}},"loader"),kwt={id:h8e,detector:Twt,loader:Cwt},d8e=kwt;var S8e="eventmodeling",oSt=s(e=>/^\s*eventmodeling/.test(e),"detector"),lSt=s(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(w8e(),k8e));return{id:S8e,diagram:e}},"loader"),cSt={id:S8e,detector:oSt,loader:lSt},E8e=cSt;var W8e="ishikawa",CSt=s(e=>/^\s*ishikawa(-beta)?\b/i.test(e),"detector"),kSt=s(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(V8e(),z8e));return{id:W8e,diagram:e}},"loader"),q8e={id:W8e,detector:CSt,loader:kSt};var bIe="venn",oEt=s(e=>/^\s*venn-beta/.test(e),"detector"),lEt=s(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(xIe(),vIe));return{id:bIe,diagram:e}},"loader"),cEt={id:bIe,detector:oEt,loader:lEt},TIe=cEt;up();Zt();var DIe="treemap",vEt=s(e=>/^\s*treemap/.test(e),"detector"),xEt=s(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(LIe(),_Ie));return{id:DIe,diagram:e}},"loader"),IIe={id:DIe,detector:vEt,loader:xEt};var qIe="wardley",qEt=s(e=>/^\s*wardley-beta/i.test(e),"detector"),HEt=s(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(WIe(),VIe));return{id:qIe,diagram:e}},"loader"),UEt={id:qIe,detector:qEt,loader:HEt},HIe=UEt;var lMe="cynefin",o4t=s(e=>/^\s*cynefin-beta(?:[\s:]|$)/.test(e),"detector"),l4t=s(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(oMe(),sMe));return{id:lMe,diagram:e}},"loader"),cMe={id:lMe,detector:o4t,loader:l4t};var TMe="railroad",D4t=s(e=>/^\s*railroad-beta/i.test(e),"detector"),I4t=s(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(bMe(),xMe));return{id:TMe,diagram:e}},"loader"),CMe={id:TMe,detector:D4t,loader:I4t};var RMe="railroadEbnf",G4t=s(e=>/^\s*railroad-ebnf-beta/i.test(e),"detector"),z4t=s(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(AMe(),EMe));return{id:RMe,diagram:e}},"loader"),_Me={id:RMe,detector:G4t,loader:z4t};var NMe="railroadAbnf",K4t=s(e=>/^\s*railroad-abnf-beta/i.test(e),"detector"),Z4t=s(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(MMe(),IMe));return{id:NMe,diagram:e}},"loader"),PMe={id:NMe,detector:K4t,loader:Z4t};var VMe="railroadPeg",s3t=s(e=>/^\s*railroad-peg-beta/i.test(e),"detector"),o3t=s(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(zMe(),GMe));return{id:VMe,diagram:e}},"loader"),WMe={id:VMe,detector:s3t,loader:o3t};var qMe=!1,Bv=s(()=>{qMe||(qMe=!0,hp("error",L_e,e=>e.toLowerCase().trim()==="error"),hp("---",{db:{clear:s(()=>{},"clear")},styles:{},renderer:{draw:s(()=>{},"draw")},parser:{parse:s(()=>{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:s(()=>null,"init")},e=>e.toLowerCase().trimStart().startsWith("---")),yx(I_e,ILe,d8e),yx(Ane,HLe,_6e,S6e,o2e,IAe,VAe,QAe,JRe,v6e,Zbe,Hbe,Wbe,pLe,Q5e,d_e,l_e,R_e,dRe,ADe,ODe,WRe,T7e,E8e,V7e,jDe,q8e,IIe,CMe,_Me,PMe,WMe,TIe,HIe,cMe))},"addDiagrams");Tt();up();Zt();var HMe=s(async()=>{te.debug("Loading registered diagrams");let t=(await Promise.allSettled(Object.entries(Eu).map(async([r,{detector:n,loader:i}])=>{if(i)try{kx(r)}catch{try{let{diagram:a,id:o}=await i();hp(o,a,n)}catch(a){throw te.error(`Failed to load external diagram with key ${r}. Removing from detectors.`),delete Eu[r],a}}}))).filter(r=>r.status==="rejected");if(t.length>0){te.error(`Failed to load ${t.length} external diagrams`);for(let r of t)te.error(r);throw new Error(`Failed to load ${t.length} external diagrams`)}},"loadRegisteredDiagrams");Tt();$r();var $v="comm",B_="rule",$_="decl";var UMe="@media",YMe="@import";var jMe="@supports";var XMe="@namespace",sk="@keyframes";var F_="@layer",KMe="@scope";var MY=Math.abs,ok=String.fromCharCode;function G_(e){return e.trim()}s(G_,"trim");function Fv(e,t,r){return e.replace(t,r)}s(Fv,"replace");function ZMe(e,t,r){return e.indexOf(t,r)}s(ZMe,"indexof");function Ph(e,t){return e.charCodeAt(t)|0}s(Ph,"charat");function Oh(e,t,r){return e.slice(t,r)}s(Oh,"substr");function co(e){return e.length}s(co,"strlen");function z_(e){return e.length}s(z_,"sizeof");function Gv(e,t){return t.push(e),e}s(Gv,"append");var V_=1,zv=1,QMe=0,ul=0,qi=0,Wv="";function W_(e,t,r,n,i,a,o,l){return{value:e,root:t,parent:r,type:n,props:i,children:a,line:V_,column:zv,length:o,return:"",siblings:l}}s(W_,"node");function JMe(){return qi}s(JMe,"char");function eNe(){return qi=ul>0?Ph(Wv,--ul):0,zv--,qi===10&&(zv=1,V_--),qi}s(eNe,"prev");function hl(){return qi=ul2||Vv(qi)>3?"":" "}s(nNe,"whitespace");function iNe(e,t){for(;--t&&hl()&&!(qi<48||qi>102||qi>57&&qi<65||qi>70&&qi<97););return q_(e,lk()+(t<6&&Bh()==32&&hl()==32))}s(iNe,"escaping");function NY(e){for(;hl();)switch(qi){case e:return ul;case 34:case 39:e!==34&&e!==39&&NY(qi);break;case 40:e===41&&NY(e);break;case 92:hl();break}return ul}s(NY,"delimiter");function aNe(e,t){for(;hl()&&e+qi!==57;)if(e+qi===84&&Bh()===47)break;return"/*"+q_(t,ul-1)+"*"+ok(e===47?e:hl())}s(aNe,"commenter");function sNe(e){for(;!Vv(Bh());)hl();return q_(e,ul)}s(sNe,"identifier");function cNe(e){return rNe(U_("",null,null,null,[""],e=tNe(e),0,[0],e))}s(cNe,"compile");function U_(e,t,r,n,i,a,o,l,u){for(var h=0,d=0,f=o,p=0,m=0,g=0,y=1,v=1,x=1,b=0,T="",w=i,C=a,k=n,S=T;v;)switch(g=b,b=hl()){case 40:if(g!=108&&Ph(S,f-1)==58){ZMe(S+=Fv(H_(b),"&","&\f"),"&\f",MY(h?l[h-1]:0))!=-1&&(x=-1);break}case 34:case 39:case 91:S+=H_(b);break;case 9:case 10:case 13:case 32:S+=nNe(g);break;case 92:S+=iNe(lk()-1,7);continue;case 47:switch(Bh()){case 42:case 47:Gv(c3t(aNe(hl(),lk()),t,r,u),u),(Vv(g||1)==5||Vv(Bh()||1)==5)&&co(S)&&Oh(S,-1,void 0)!==" "&&(S+=" ");break;default:S+="/"}break;case 123*y:l[h++]=co(S)*x;case 125*y:case 59:case 0:switch(b){case 0:case 125:v=0;case 59+d:x==-1&&(S=Fv(S,/\f/g,"")),m>0&&(co(S)-f||y===0&&g===47)&&Gv(m>32?lNe(S+";",n,r,f-1,u):lNe(Fv(S," ","")+";",n,r,f-2,u),u);break;case 59:S+=";";default:if(Gv(k=oNe(S,t,r,h,d,i,l,T,w=[],C=[],f,a),a),b===123)if(d===0)U_(S,t,k,k,w,a,f,l,C);else{switch(p){case 99:if(Ph(S,3)===110)break;case 108:if(Ph(S,2)===97)break;default:d=0;case 100:case 109:case 115:}d?U_(e,k,k,n&&Gv(oNe(e,k,k,0,0,i,l,T,i,w=[],f,C),C),i,C,f,l,n?w:C):U_(S,k,k,k,[""],C,0,l,C)}}h=d=m=0,y=x=1,T=S="",f=o;break;case 58:f=1+co(S),m=g;default:if(y<1){if(b==123)--y;else if(b==125&&y++==0&&eNe()==125)continue}switch(S+=ok(b),b*y){case 38:x=d>0?1:(S+="\f",-1);break;case 44:l[h++]=(co(S)-1)*x,x=1;break;case 64:Bh()===45&&(S+=H_(hl())),p=Bh(),d=f=co(T=S+=sNe(lk())),b++;break;case 45:g===45&&co(S)==2&&(y=0)}}return a}s(U_,"parse");function oNe(e,t,r,n,i,a,o,l,u,h,d,f){for(var p=i-1,m=i===0?a:[""],g=z_(m),y=0,v=0,x=0;y0?m[b]+" "+T:Fv(T,/&\f/g,m[b])))&&(u[x++]=w);return W_(e,t,r,i===0?B_:l,u,h,d,f)}s(oNe,"ruleset");function c3t(e,t,r,n){return W_(e,t,r,$v,ok(JMe()),Oh(e,2,-2),0,n)}s(c3t,"comment");function lNe(e,t,r,n,i){return W_(e,t,r,$_,Oh(e,0,n),Oh(e,n+1,-1),n,i)}s(lNe,"declaration");function Y_(e,t){for(var r="",n=0;n{pNe.forEach(e=>{e()}),pNe=[]},"attachFunctions");Tt();Y0();var gNe=s(e=>e.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments");fw();Gb();function yNe(e){let t=e.match(dw);if(!t)return{text:e,metadata:{}};let r=t[1],n=r?t[2].split(` +`).map(o=>o.startsWith(r)?o.slice(r.length):o).join(` +`):t[2],i=yd(n,{schema:gd})??{};i=typeof i=="object"&&!Array.isArray(i)?i:{};let a={};return i.displayMode&&(a.displayMode=i.displayMode.toString()),i.title&&(a.title=i.title.toString()),i.config&&(a.config=i.config),{text:e.slice(t[0].length),metadata:a}}s(yNe,"extractFrontMatter");Qt();var h3t=s(e=>e.replace(/\r\n?/g,` +`).replace(/<(\w+)([^>]*)>/g,(t,r,n)=>"<"+r+n.replace(/="([^"]*)"/g,"='$1'")+">"),"cleanupText"),d3t=s(e=>{let{text:t,metadata:r}=yNe(e),{displayMode:n,title:i,config:a={}}=r;return n&&(a.gantt||(a.gantt={}),a.gantt.displayMode=n),{title:i,config:a,text:t}},"processFrontmatter"),f3t=s(e=>{let t=sr.detectInit(e)??{},r=sr.detectDirective(e,"wrap");return Array.isArray(r)?t.wrap=r.some(({type:n})=>n==="wrap"):r?.type==="wrap"&&(t.wrap=!0),{text:dne(e),directive:t}},"processDirectives");function PY(e){let t=h3t(e),r=d3t(t),n=f3t(r.text),i=Fr(r.config,n.directive);return e=gNe(n.text),{code:e,title:r.title,config:i}}s(PY,"preprocessDiagram");VD();Ck();Qt();function vNe(e){let t=new TextEncoder().encode(e),r=Array.from(t,n=>String.fromCodePoint(n)).join("");return btoa(r)}s(vNe,"toBase64");kk();var p3t=5e4,m3t="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa",g3t="sandbox",y3t="loose",v3t="http://www.w3.org/2000/svg",x3t="http://www.w3.org/1999/xlink",b3t="http://www.w3.org/1999/xhtml",T3t="100%",C3t="100%",k3t="border:0;margin:0;",w3t="margin:0",S3t="allow-top-navigation-by-user-activation allow-popups",E3t='The "iframe" tag is not supported by your browser.',A3t=["foreignobject"],R3t=["dominant-baseline"];function CNe(e){let t=PY(e);return Jv(),oX(t.config??{}),t}s(CNe,"processAndSetConfigs");async function _3t(e,t){Bv();try{let{code:r,config:n}=CNe(e);return{diagramType:(await kNe(r)).type,config:n}}catch(r){if(t?.suppressErrors)return!1;throw r}}s(_3t,"parse");var xNe=s((e,t,r=[])=>{let n=RL(`{ ${r.join(" !important; ")} !important; }`);return`.${e} ${t} ${n}`},"cssImportantStyles"),L3t=s((e,t=new Map)=>{let r=new CSSStyleSheet;if(e.fontFamily!==void 0&&r.insertRule(`:root { --mermaid-font-family: ${e.fontFamily}}`,r.cssRules.length),e.altFontFamily!==void 0&&r.insertRule(`:root { --mermaid-alt-font-family: ${e.altFontFamily}}`,r.cssRules.length),t instanceof Map){let l=Yn(e)?["> *","span"]:["rect","polygon","ellipse","circle","path"];t.forEach(u=>{rE(u.styles)||l.forEach(h=>{r.insertRule(xNe(u.id,h,u.styles),r.cssRules.length)}),rE(u.textStyles)||r.insertRule(xNe(u.id,"tspan",(u?.textStyles||[]).map(h=>h.replace("color","fill"))),r.cssRules.length)})}let n="";if(e.themeCSS!==void 0)if(typeof r.replaceSync=="function"){let i=new CSSStyleSheet;i.replaceSync(e.themeCSS),n=zD(i)+` +`}else n+=`${e.themeCSS} +`;return n+zD(r)},"createCssStyles"),D3t=s((e,t)=>Y_(cNe(`${e}{${t}}`),hNe([s(function(n,i,a,o){if(n.type==="rule"&&Array.isArray(n.props)){if(n.parent&&n.parent.type===sk)return;n.props=n.props.map(l=>l.startsWith(e)?l:`${e} ${l}`)}else n.type.startsWith("@")&&([...[UMe,jMe,F_,KMe,"@container","@starting-style"],sk].includes(n.type)||(te.warn(`Removing unsupported at-rule ${n.type} from CSS`),n.type=$v))},"addNamespace"),uNe])),"compileCSS"),I3t=s((e,t,r,n)=>{let i=L3t(e,r),a=gZ(t,i,{...e.themeVariables,theme:e.theme,look:e.look},n);return D3t(n,a)},"createUserStyles"),M3t=s((e="",t,r)=>{let n=e;return!r&&!t&&(n=n.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,'marker-end="url(#')),n=Wo(n),n=n.replace(/
    /g,"
    "),n},"cleanUpSvgCode"),N3t=s((e="",t)=>{let r=t?.viewBox?.baseVal?.height?t.viewBox.baseVal.height+"px":C3t,n=vNe(`${e}`);return``},"putIntoIFrame"),bNe=s((e,t,r,n,i)=>{let a=e.append("div");a.attr("id",r),n&&a.attr("style",n);let o=a.append("svg").attr("id",t).attr("width","100%").attr("xmlns",v3t);return i&&o.attr("xmlns:xlink",i),o.append("g"),e},"appendDivSvgG");function TNe(e,t){return e.append("iframe").attr("id",t).attr("style","width: 100%; height: 100%;").attr("sandbox","")}s(TNe,"sandboxedIframe");var P3t=s((e,t,r,n)=>{e.getElementById(t)?.remove(),e.getElementById(r)?.remove(),e.getElementById(n)?.remove()},"removeExistingElements"),O3t=s(async function(e,t,r){Bv();let n=CNe(t);t=n.code;let i=Lt();te.debug(i),t.length>(i?.maxTextSize??p3t)&&(t=m3t);let a=`#${e}`,o="i"+e,l="#"+o,u="d"+e,h="#"+u,d=s(()=>{let I=lt(p?l:h).node();I&&"remove"in I&&I.remove()},"removeTempElements"),f=lt(document.body),p=i.securityLevel===g3t,m=i.securityLevel===y3t,g=i.fontFamily;if(r!==void 0){if(r&&(r.innerHTML=""),p){let E=TNe(lt(r),o);f=lt(E.nodes()[0].contentDocument.body),f.node().style.margin="0"}else f=lt(r);bNe(f,e,u,`font-family: ${g}`,x3t)}else{if(P3t(document,e,u,o),p){let E=TNe(lt(document.body),o);f=lt(E.nodes()[0].contentDocument.body),f.node().style.margin="0"}else f=lt("body");bNe(f,e,u)}let y,v;try{y=await qv.fromText(t,{title:n.title})}catch(E){if(i.suppressErrorRendering)throw d(),E;y=await qv.fromText("error"),v=E}let x=f.select(h).node(),b=y.type,T=x.firstChild,w=T.firstChild,C=y.renderer.getClasses?.(t,y),k=I3t(i,b,C,a),S=document.createElement("style");S.innerHTML=k,T.insertBefore(S,w);try{await y.renderer.draw(t,e,"11.16.0",y)}catch(E){throw i.suppressErrorRendering?d():__e.draw(t,e,"11.16.0"),E}let A=f.select(`${h} svg`),M=y.db.getAccTitle?.(),N=y.db.getAccDescription?.();$3t(b,A,M,N);let R=s(()=>{f.select(`[id="${e}"]`).selectAll("foreignobject > *").attr("xmlns",b3t);let E=f.select(h).node().innerHTML;if(te.debug("config.arrowMarkerAbsolute",i.arrowMarkerAbsolute),E=M3t(E,p,sa(i.arrowMarkerAbsolute)),p){let I=f.select(h+" svg").node();E=N3t(E,I)}else m||(E=Ps.sanitize(E,{ADD_TAGS:A3t,ADD_ATTR:R3t,HTML_INTEGRATION_POINTS:{foreignobject:!0}}));return mNe(),E},"serializeSvg")();if(v)throw v;return d(),{diagramType:b,svg:R,bindFunctions:y.db.bindFunctions}},"render");function B3t(e={}){let t=Gn({},e);t?.fontFamily&&!t.themeVariables?.fontFamily&&(t.themeVariables||(t.themeVariables={}),t.themeVariables.fontFamily=t.fontFamily),iX(t),t?.theme&&t.theme in Oo?t.themeVariables=Oo[t.theme].getThemeVariables(t.themeVariables):t&&(t.themeVariables=Oo.default.getThemeVariables(t.themeVariables));let r=typeof t=="object"?_L(t):LL();Yv(r.logLevel),Bv()}s(B3t,"initialize");var kNe=s((e,t={})=>{let{code:r}=PY(e);return qv.fromText(r,t)},"getDiagramFromText");function $3t(e,t,r,n){dNe(t,e),fNe(t,r,n,t.attr("id"))}s($3t,"addA11yInfo");var Jf=Object.freeze({render:O3t,parse:_3t,getDiagramFromText:kNe,initialize:B3t,getConfig:Lt,setConfig:Ek,getSiteConfig:LL,updateSiteConfig:aX,reset:s(()=>{Jv()},"reset"),globalReset:s(()=>{Jv(zh)},"globalReset"),defaultConfig:zh});Yv(Lt().logLevel);Jv(Lt());vf();Qt();K4();var F3t=s((e,t,r)=>{te.warn(e),GM(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"),wNe=s(async function(e={querySelector:".mermaid"}){try{await G3t(e)}catch(t){if(GM(t)&&te.error(t.str),$h.parseError&&$h.parseError(t),!e.suppressErrors)throw te.error("Use the suppressErrors option to suppress these errors"),t}},"run"),G3t=s(async function({postRenderCallback:e,querySelector:t,nodes:r}={querySelector:".mermaid"}){let n=Jf.getConfig();te.debug(`${e?"":"No "}Callback function found`);let i;if(r)i=r;else if(t)i=document.querySelectorAll(t);else throw new Error("Nodes and querySelector are both undefined");te.debug(`Found ${i.length} diagrams`),n?.startOnLoad!==void 0&&(te.debug("Start On Load: "+n?.startOnLoad),Jf.updateSiteConfig({startOnLoad:n?.startOnLoad}));let a=new sr.InitIDGenerator(n.deterministicIds,n.deterministicIDSeed),o,l=[];for(let u of Array.from(i)){te.info("Rendering diagram: "+u.id);if(u.getAttribute("data-processed"))continue;u.setAttribute("data-processed","true");let h=`mermaid-${a.next()}`;o=u.innerHTML,o=hw(sr.entityDecode(o)).trim().replace(//gi,"
    ");let d=sr.detectInit(o);d&&te.debug("Detected early reinit: ",d);try{let{svg:f,bindFunctions:p}=await RNe(h,o,u);u.innerHTML=f,e&&await e(h),p&&p(u)}catch(f){F3t(f,l,$h.parseError)}}if(l.length>0)throw l[0]},"runThrowsErrors"),SNe=s(function(e){Jf.initialize(e)},"initialize"),z3t=s(async function(e,t,r){te.warn("mermaid.init is deprecated. Please use run instead."),e&&SNe(e);let n={postRenderCallback:r,querySelector:".mermaid"};typeof t=="string"?n.querySelector=t:t&&(t instanceof HTMLElement?n.nodes=[t]:n.nodes=t),await wNe(n)},"init"),V3t=s(async(e,{lazyLoad:t=!0}={})=>{Bv(),yx(...e),t===!1&&await HMe()},"registerExternalDiagrams"),ENe=s(function(){if($h.startOnLoad){let{startOnLoad:e}=Jf.getConfig();e&&$h.run().catch(t=>te.error("Mermaid failed to initialize",t))}},"contentLoaded");if(typeof document<"u"){window.addEventListener("load",ENe,!1)}var W3t=s(function(e){$h.parseError=e},"setParseErrorHandler"),j_=[],OY=!1,ANe=s(async()=>{if(!OY){for(OY=!0;j_.length>0;){let e=j_.shift();if(e)try{await e()}catch(t){te.error("Error executing queue",t)}}OY=!1}},"executeQueue"),q3t=s(async(e,t)=>new Promise((r,n)=>{let i=s(()=>new Promise((a,o)=>{Jf.parse(e,t).then(l=>{a(l),r(l)},l=>{te.error("Error parsing",l),$h.parseError?.(l),o(l),n(l)})}),"performCall");j_.push(i),ANe().catch(n)}),"parse"),RNe=s((e,t,r)=>new Promise((n,i)=>{let a=s(()=>new Promise((o,l)=>{Jf.render(e,t,r).then(u=>{o(u),n(u)},u=>{te.error("Error parsing",u),$h.parseError?.(u),l(u),i(u)})}),"performCall");j_.push(a),ANe().catch(i)}),"render"),H3t=s(()=>Object.keys(Eu).map(e=>({id:e})),"getRegisteredDiagramsMetadata"),$h={startOnLoad:!0,mermaidAPI:Jf,parse:q3t,render:RNe,init:z3t,run:wNe,registerExternalDiagrams:V3t,registerLayoutLoaders:L$,initialize:SNe,parseError:void 0,contentLoaded:ENe,setParseErrorHandler:W3t,detectType:h0,registerIconPacks:c0,getRegisteredDiagramsMetadata:H3t},U3t=$h;return NNe(Y3t);})(); +/*! Check if previously processed */ +/*! + * Wait for document loaded before starting the execution + */ +/*! Bundled license information: + +dompurify/dist/purify.es.mjs: + (*! @license DOMPurify 3.4.0 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.0/LICENSE *) + +js-yaml/dist/js-yaml.mjs: + (*! js-yaml 4.1.1 https://github.com/nodeca/js-yaml @license MIT *) + +lodash-es/lodash.js: + (** + * @license + * Lodash (Custom Build) + * Build: `lodash modularize exports="es" --repo lodash/lodash#4.18.1 -o ./` + * Copyright OpenJS Foundation and other contributors + * Released under MIT license + * Based on Underscore.js 1.8.3 + * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + *) + +cytoscape/dist/cytoscape.esm.mjs: + (*! + 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) + *) + (*! + Event object based on jQuery events, MIT license + + https://jquery.org/license/ + https://tldrlegal.com/license/mit-license + https://github.com/jquery/jquery/blob/master/src/event.js + *) + (*! Bezier curve function generator. Copyright Gaetan Renaudeau. MIT License: http://en.wikipedia.org/wiki/MIT_License *) + (*! Runge-Kutta spring physics function generator. Adapted from Framer.js, copyright Koen Bok. MIT License: http://en.wikipedia.org/wiki/MIT_License *) +*/ +globalThis["mermaid"] = globalThis.__esbuild_esm_mermaid_nm["mermaid"].default; diff --git a/2026/celery2/assets/sequence_1.svg b/2026/celery2/assets/sequence_1.svg new file mode 100644 index 0000000..7642998 --- /dev/null +++ b/2026/celery2/assets/sequence_1.svg @@ -0,0 +1 @@ +RabbitMQDjango-ThreadQueueDjangoRabbitMQDjango-ThreadQueueDjangoloop[RabbitMQ Communication]loop[heartbeat]loop[SSECommunication]par[RabbitMQ ListenThread][Django SSEThread]Web BrowserGET /progressCreate threadCreate queue<<[Queue]>>Subscribe<<current celery tasks>><<event>><<event>><<event>>queue.get()<<event>><<event>>Web Browser diff --git a/2026/celery2/assets/sequence_2.svg b/2026/celery2/assets/sequence_2.svg new file mode 100644 index 0000000..d888e10 --- /dev/null +++ b/2026/celery2/assets/sequence_2.svg @@ -0,0 +1 @@ +RabbitMQDjango-ThreadQueueDjangoRabbitMQDjango-ThreadQueueDjangobreak[When the queue is full]loop[RabbitMQCommunication]break[Timeout while waiting formessages in queues]loop[SSE Communication]par[RabbitMQ Listen Thread][Django SSE Thread]Web BrowserGET /progressCreate threadCreate queue<<[Queue]>>Subscribe<<current celery tasks>><<event>><<event>><<event>>Kill self​queue.get()<<event>><<event>>Close connectiongarbage collectorWeb Browser diff --git a/2026/celery2/slides/00-intro.md b/2026/celery2/slides/00-intro.md new file mode 100644 index 0000000..a6f0868 --- /dev/null +++ b/2026/celery2/slides/00-intro.md @@ -0,0 +1,15 @@ +

    + +
    diff --git a/2026/celery2/slides/01-django-progress.md b/2026/celery2/slides/01-django-progress.md new file mode 100644 index 0000000..4283e9c --- /dev/null +++ b/2026/celery2/slides/01-django-progress.md @@ -0,0 +1,176 @@ + + +
    + +
    + + + + + +
    + +
    + + + + + +
    + +
    + + + + + +
    + +
    + + + + + +
    + +
    + + + + + +
    + +
    + + + + + +
    + +
    + + + + + +
    + +
    + + + + + +
    + +
    diff --git a/2026/celery2/slides/02-sequence.md b/2026/celery2/slides/02-sequence.md new file mode 100644 index 0000000..52fccb2 --- /dev/null +++ b/2026/celery2/slides/02-sequence.md @@ -0,0 +1,83 @@ +
    + +
    + +--- + + +
    + +