From 21f5158d2bb5438188024ba8eb744a7d9e13fb37 Mon Sep 17 00:00:00 2001 From: squidfunk Date: Tue, 21 Jul 2026 20:02:51 +0200 Subject: [PATCH] feature: add Mermaid.js diagram rendering support Signed-off-by: squidfunk --- integrations/code/media/mermaid.LICENSE.txt | 21 + integrations/code/media/mermaid.js | 3607 +++++++++++++++++++ integrations/code/media/preview.html | 48 + integrations/code/package-lock.json | 1365 ++++++- integrations/code/package.json | 1 + integrations/code/src/preview.ts | 6 +- 6 files changed, 4962 insertions(+), 86 deletions(-) create mode 100644 integrations/code/media/mermaid.LICENSE.txt create mode 100644 integrations/code/media/mermaid.js diff --git a/integrations/code/media/mermaid.LICENSE.txt b/integrations/code/media/mermaid.LICENSE.txt new file mode 100644 index 0000000..2e5daeb --- /dev/null +++ b/integrations/code/media/mermaid.LICENSE.txt @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014 - 2022 Knut Sveidqvist + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/integrations/code/media/mermaid.js b/integrations/code/media/mermaid.js new file mode 100644 index 0000000..3dc8098 --- /dev/null +++ b/integrations/code/media/mermaid.js @@ -0,0 +1,3607 @@ +var mermaidBundle=(()=>{var LA=Object.defineProperty;var VLe=Object.getOwnPropertyDescriptor;var YLe=Object.getOwnPropertyNames;var HLe=Object.prototype.hasOwnProperty;var Tt=(e,t,r)=>()=>{if(r)throw r[0];try{return e&&(t=e(e=0)),t}catch(i){throw r=[i],i}};var Kt=(e,t)=>{for(var r in t)LA(e,r,{get:t[r],enumerable:!0})},XLe=(e,t,r,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of YLe(t))!HLe.call(e,n)&&n!==r&&LA(e,n,{get:()=>t[n],enumerable:!(i=VLe(t,n))||i.enumerable});return e};var KLe=e=>XLe(LA({},"__esModule",{value:!0}),e);var ZLe,HT,QLe,JLe,e$e,t$e,o,Xn,yu,r$e,tn,vt=Tt(()=>{ZLe=Object.create,HT=Object.defineProperty,QLe=Object.getOwnPropertyDescriptor,JLe=Object.getOwnPropertyNames,e$e=Object.getPrototypeOf,t$e=Object.prototype.hasOwnProperty,o=(e,t)=>HT(e,"name",{value:t,configurable:!0}),Xn=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),yu=(e,t)=>{for(var r in t)HT(e,r,{get:t[r],enumerable:!0})},r$e=(e,t,r,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of JLe(t))!t$e.call(e,n)&&n!==r&&HT(e,n,{get:()=>t[n],enumerable:!(i=QLe(t,n))||i.enumerable});return e},tn=(e,t,r)=>(r=e!=null?ZLe(e$e(e)):{},r$e(t||!e||!e.__esModule?HT(r,"default",{value:e,enumerable:!0}):r,e))});function v7(e,t){let r;if(t===void 0)for(let i of e)i!=null&&(r=i)&&(r=i);else{let i=-1;for(let n of e)(n=t(n,++i,e))!=null&&(r=n)&&(r=n)}return r}function b7(e,t){let r;if(t===void 0)for(let i of e)i!=null&&(r>i||r===void 0&&i>=i)&&(r=i);else{let i=-1;for(let n of e)(n=t(n,++i,e))!=null&&(r>n||r===void 0&&n>=n)&&(r=n)}return r}function wy(e,t){return e==null||t==null?NaN:et?1:e>=t?0:NaN}function tZ(e,t){return e==null||t==null?NaN:te?1:t>=e?0:NaN}function C4(e){let t,r,i;e.length!==2?(t=wy,r=o((l,h)=>wy(e(l),h),"compare2"),i=o((l,h)=>e(l)-h,"delta")):(t=e===wy||e===tZ?e:rZ,r=e,i=e);function n(l,h,u=0,d=l.length){if(u>>1;r(l[p],h)<0?u=p+1:d=p}while(u>>1;r(l[p],h)<=0?u=p+1:d=p}while(uu&&i(l[p-1],h)>-i(l[p],h)?p-1:p}return o(s,"center"),{left:n,center:s,right:a}}function rZ(){return 0}function iZ(e){return e===null?NaN:+e}function OA({_intern:e,_key:t},r){let i=t(r);return e.has(i)?e.get(i):r}function aZ({_intern:e,_key:t},r){let i=t(r);return e.has(i)?e.get(i):(e.set(i,r),r)}function sZ({_intern:e,_key:t},r){let i=t(r);return e.has(i)&&(r=e.get(i),e.delete(i)),r}function oZ(e){return e!==null&&typeof e=="object"?e.valueOf():e}function Sy(e,t,r){let i=(t-e)/Math.max(0,r),n=Math.floor(Math.log10(i)),a=i/Math.pow(10,n),s=a>=s$e?10:a>=o$e?5:a>=l$e?2:1,l,h,u;return n<0?(u=Math.pow(10,-n)/s,l=Math.round(e*u),h=Math.round(t*u),l/ut&&--h,u=-u):(u=Math.pow(10,n)*s,l=Math.round(e/u),h=Math.round(t/u),l*ut&&--h),h0))return[];if(e===t)return[e];let i=t=n))return[];let l=a-n+1,h=new Array(l);if(i)if(s<0)for(let u=0;u+e(t)}function fZ(e,t){return t=Math.max(0,e.bandwidth()-t*2)/2,e.round()&&(t=Math.round(t)),r=>+e(r)+t}function gZ(){return!this.__axis}function x7(e,t){var r=[],i=null,n=null,a=6,s=6,l=3,h=typeof window<"u"&&window.devicePixelRatio>1?0:.5,u=e===QT||e===XT?-1:1,d=e===XT||e===$A?"x":"y",p=e===QT||e===BA?uZ:dZ;function f(g){var m=i??(t.ticks?t.ticks.apply(t,r):t.domain()),y=n??(t.tickFormat?t.tickFormat.apply(t,r):hZ),b=Math.max(a,0)+l,v=t.range(),T=+v[0]+h,x=+v[v.length-1]+h,k=(t.bandwidth?fZ:pZ)(t.copy(),h),C=g.selection?g.selection():g,E=C.selectAll(".domain").data([null]),w=C.selectAll(".tick").data(m,t).order(),_=w.exit(),L=w.enter().append("g").attr("class","tick"),N=w.select("line"),D=w.select("text");E=E.merge(E.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),w=w.merge(L),N=N.merge(L.append("line").attr("stroke","currentColor").attr(d+"2",u*a)),D=D.merge(L.append("text").attr("fill","currentColor").attr(d,u*b).attr("dy",e===QT?"0em":e===BA?"0.71em":"0.32em")),g!==C&&(E=E.transition(g),w=w.transition(g),N=N.transition(g),D=D.transition(g),_=_.transition(g).attr("opacity",jK).attr("transform",function(M){return isFinite(M=k(M))?p(M+h):this.getAttribute("transform")}),L.attr("opacity",jK).attr("transform",function(M){var B=this.parentNode.__axis;return p((B&&isFinite(B=B(M))?B:k(M))+h)})),_.remove(),E.attr("d",e===XT||e===$A?s?"M"+u*s+","+T+"H"+h+"V"+x+"H"+u*s:"M"+h+","+T+"V"+x:s?"M"+T+","+u*s+"V"+h+"H"+x+"V"+u*s:"M"+T+","+h+"H"+x),w.attr("opacity",1).attr("transform",function(M){return p(k(M)+h)}),N.attr(d+"2",u*a),D.attr(d,u*b).text(y),C.filter(gZ).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",e===$A?"start":e===XT?"end":"middle"),C.each(function(){this.__axis=k})}return o(f,"axis"),f.scale=function(g){return arguments.length?(t=g,f):t},f.ticks=function(){return r=Array.from(arguments),f},f.tickArguments=function(g){return arguments.length?(r=g==null?[]:Array.from(g),f):r.slice()},f.tickValues=function(g){return arguments.length?(i=g==null?null:Array.from(g),f):i&&i.slice()},f.tickFormat=function(g){return arguments.length?(n=g,f):n},f.tickSize=function(g){return arguments.length?(a=s=+g,f):a},f.tickSizeInner=function(g){return arguments.length?(a=+g,f):a},f.tickSizeOuter=function(g){return arguments.length?(s=+g,f):s},f.tickPadding=function(g){return arguments.length?(l=+g,f):l},f.offset=function(g){return arguments.length?(h=+g,f):h},f}function T7(e){return x7(QT,e)}function k7(e){return x7(BA,e)}function mZ(){}function w4(e){return e==null?mZ:function(){return this.querySelector(e)}}function yZ(e){typeof e!="function"&&(e=w4(e));for(var t=this._groups,r=t.length,i=new Array(r),n=0;n=x&&(x=T+1);!(C=b[x])&&++x=0;)(s=i[n])&&(a&&s.compareDocumentPosition(a)^4&&a.parentNode.insertBefore(s,a),a=s);return this}function zZ(e){e||(e=qZ);function t(p,f){return p&&f?e(p.__data__,f.__data__):!p-!f}o(t,"compareNode");for(var r=this._groups,i=r.length,n=new Array(i),a=0;at?1:e>=t?0:NaN}function jZ(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function GZ(){return Array.from(this)}function WZ(){for(var e=this._groups,t=0,r=e.length;t=0&&(t=e.slice(0,r))!=="xmlns"&&(e=e.slice(r+1)),GK.hasOwnProperty(t)?{space:GK[t],local:e}:e}function HZ(e){return function(){this.removeAttribute(e)}}function XZ(e){return function(){this.removeAttributeNS(e.space,e.local)}}function KZ(e,t){return function(){this.setAttribute(e,t)}}function ZZ(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function QZ(e,t){return function(){var r=t.apply(this,arguments);r==null?this.removeAttribute(e):this.setAttribute(e,r)}}function JZ(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 eQ(e,t){var r=jy(e);if(arguments.length<2){var i=this.node();return r.local?i.getAttributeNS(r.space,r.local):i.getAttribute(r)}return this.each((t==null?r.local?XZ:HZ:typeof t=="function"?r.local?JZ:QZ:r.local?ZZ:KZ)(r,t))}function _7(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function tQ(e){return function(){this.style.removeProperty(e)}}function rQ(e,t,r){return function(){this.style.setProperty(e,t,r)}}function iQ(e,t,r){return function(){var i=t.apply(this,arguments);i==null?this.style.removeProperty(e):this.style.setProperty(e,i,r)}}function nQ(e,t,r){return arguments.length>1?this.each((t==null?tQ:typeof t=="function"?iQ:rQ)(e,t,r??"")):vp(this.node(),e)}function vp(e,t){return e.style.getPropertyValue(t)||_7(e).getComputedStyle(e,null).getPropertyValue(t)}function aQ(e){return function(){delete this[e]}}function sQ(e,t){return function(){this[e]=t}}function oQ(e,t){return function(){var r=t.apply(this,arguments);r==null?delete this[e]:this[e]=r}}function lQ(e,t){return arguments.length>1?this.each((t==null?aQ:typeof t=="function"?oQ:sQ)(e,t)):this.node()[e]}function A7(e){return e.trim().split(/^|\s+/)}function E4(e){return e.classList||new R7(e)}function R7(e){this._node=e,this._names=A7(e.getAttribute("class")||"")}function L7(e,t){for(var r=E4(e),i=-1,n=t.length;++i=0&&(r=t.slice(i+1),t=t.slice(0,i)),{type:t,name:r}})}function PQ(e){return function(){var t=this.__on;if(t){for(var r=0,i=-1,n=t.length,a;r>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?by(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?by(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 na(t[1],t[2],t[3],1):(t=p$e.exec(e))?new na(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=f$e.exec(e))?by(t[1],t[2],t[3],t[4]):(t=g$e.exec(e))?by(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=m$e.exec(e))?WA(t[1],t[2]/100,t[3]/100,1):(t=y$e.exec(e))?WA(t[1],t[2]/100,t[3]/100,t[4]):WK.hasOwnProperty(e)?qA(WK[e]):e==="transparent"?new na(NaN,NaN,NaN,0):null}function qA(e){return new na(e>>16&255,e>>8&255,e&255,1)}function by(e,t,r,i){return i<=0&&(e=t=r=NaN),new na(e,t,r,i)}function N7(e){return e instanceof Cu||(e=xu(e)),e?(e=e.rgb(),new na(e.r,e.g,e.b,e.opacity)):new na}function Ly(e,t,r,i){return arguments.length===1?N7(e):new na(e,t,r,i??1)}function na(e,t,r,i){this.r=+e,this.g=+t,this.b=+r,this.opacity=+i}function jA(){return`#${vu(this.r)}${vu(this.g)}${vu(this.b)}`}function XQ(){return`#${vu(this.r)}${vu(this.g)}${vu(this.b)}${vu((isNaN(this.opacity)?1:this.opacity)*255)}`}function GA(){let e=$y(this.opacity);return`${e===1?"rgb(":"rgba("}${bu(this.r)}, ${bu(this.g)}, ${bu(this.b)}${e===1?")":`, ${e})`}`}function $y(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function bu(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function vu(e){return e=bu(e),(e<16?"0":"")+e.toString(16)}function WA(e,t,r,i){return i<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new Ao(e,t,r,i)}function O7(e){if(e instanceof Ao)return new Ao(e.h,e.s,e.l,e.opacity);if(e instanceof Cu||(e=xu(e)),!e)return new Ao;if(e instanceof Ao)return e;e=e.rgb();var t=e.r/255,r=e.g/255,i=e.b/255,n=Math.min(t,r,i),a=Math.max(t,r,i),s=NaN,l=a-n,h=(a+n)/2;return l?(t===a?s=(r-i)/l+(r0&&h<1?0:s,new Ao(s,l,h,e.opacity)}function KQ(e,t,r,i){return arguments.length===1?O7(e):new Ao(e,t,r,i??1)}function Ao(e,t,r,i){this.h=+e,this.s=+t,this.l=+r,this.opacity=+i}function UA(e){return e=(e||0)%360,e<0?e+360:e}function xy(e){return Math.max(0,Math.min(1,e||0))}function JT(e,t,r){return(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)*255}function B7(e){if(e instanceof dl)return new dl(e.l,e.a,e.b,e.opacity);if(e instanceof Xl)return P7(e);e instanceof na||(e=N7(e));var t=i4(e.r),r=i4(e.g),i=i4(e.b),n=e4((.2225045*t+.7168786*r+.0606169*i)/QQ),a,s;return t===r&&r===i?a=s=n:(a=e4((.4360747*t+.3850649*r+.1430804*i)/ZQ),s=e4((.0139322*t+.0971045*r+.7141733*i)/JQ)),new dl(116*n-16,500*(a-n),200*(n-s),e.opacity)}function rJ(e,t,r,i){return arguments.length===1?B7(e):new dl(e,t,r,i??1)}function dl(e,t,r,i){this.l=+e,this.a=+t,this.b=+r,this.opacity=+i}function e4(e){return e>x$e?Math.pow(e,1/3):e/tJ+eJ}function t4(e){return e>Qg?e*e*e:tJ*(e-eJ)}function r4(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function i4(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function iJ(e){if(e instanceof Xl)return new Xl(e.h,e.c,e.l,e.opacity);if(e instanceof dl||(e=B7(e)),e.a===0&&e.b===0)return new Xl(NaN,0180||r<-180?r-360*Math.round(r/360):r):S4(isNaN(e)?t:e)}function sJ(e){return(e=+e)==1?yp:function(t,r){return r-t?nJ(t,r,e):S4(isNaN(t)?r:t)}}function yp(e,t){var r=t-e;return r?F7(e,r):S4(isNaN(e)?t:e)}function z7(e){return function(t,r){var i=e((t=f4(t)).h,(r=f4(r)).h),n=yp(t.c,r.c),a=yp(t.l,r.l),s=yp(t.opacity,r.opacity);return function(l){return t.h=i(l),t.c=n(l),t.l=a(l),t.opacity=s(l),t+""}}}function q7(e,t,r,i,n){var a=e*e,s=a*e;return((1-3*e+3*a-s)*t+(4-6*a+3*s)*r+(1+3*e+3*a-3*s)*i+s*n)/6}function lJ(e){var t=e.length-1;return function(r){var i=r<=0?r=0:r>=1?(r=1,t-1):Math.floor(r*t),n=e[i],a=e[i+1],s=i>0?e[i-1]:2*n-a,l=ir&&(a=t.slice(r,a),l[s]?l[s]+=a:l[++s]=a),(i=i[0])===(n=n[0])?l[s]?l[s]+=n:l[++s]=n:(l[++s]=null,h.push({i:s,x:_o(i,n)})),r=IA.lastIndex;return r180?d+=360:d-u>180&&(u+=360),f.push({i:p.push(n(p)+"rotate(",null,i)-2,x:_o(u,d)})):d&&p.push(n(p)+"rotate("+d+i)}o(s,"rotate");function l(u,d,p,f){u!==d?f.push({i:p.push(n(p)+"skewX(",null,i)-2,x:_o(u,d)}):d&&p.push(n(p)+"skewX("+d+i)}o(l,"skewX");function h(u,d,p,f,g,m){if(u!==p||d!==f){var y=g.push(n(g)+"scale(",null,",",null,")");m.push({i:y-4,x:_o(u,p)},{i:y-2,x:_o(d,f)})}else(p!==1||f!==1)&&g.push(n(g)+"scale("+p+","+f+")")}return o(h,"scale"),function(u,d){var p=[],f=[];return u=e(u),d=e(d),a(u.translateX,u.translateY,d.translateX,d.translateY,p,f),s(u.rotate,d.rotate,p,f),l(u.skewX,d.skewX,p,f),h(u.scaleX,u.scaleY,d.scaleX,d.scaleY,p,f),u=d=null,function(g){for(var m=-1,y=f.length,b;++m=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function Iy(e,t){if((r=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var r,i=e.slice(0,r);return[i.length>1?i[0]+i.slice(2):i,+e.slice(r+1)]}function bp(e){return e=Iy(Math.abs(e)),e?e[1]:NaN}function TJ(e,t){return function(r,i){for(var n=r.length,a=[],s=0,l=e[0],h=0;n>0&&l>0&&(h+l+1>i&&(l=Math.max(1,i-h)),a.push(r.substring(n-=l,n+l)),!((h+=l+1)>i));)l=e[s=(s+1)%e.length];return a.reverse().join(t)}}function kJ(e){return function(t){return t.replace(/[0-9]/g,function(r){return e[+r]})}}function Dy(e){if(!(t=C$e.exec(e)))throw new Error("invalid format: "+e);var t;return new A4({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 A4(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+""}function CJ(e){e:for(var t=e.length,r=1,i=-1,n;r0&&(i=0);break}return i>0?e.slice(0,i)+e.slice(n+1):e}function EJ(e,t){var r=Iy(e,t);if(!r)return e+"";var i=r[0],n=r[1],a=n-(wJ=Math.max(-8,Math.min(8,Math.floor(n/3)))*3)+1,s=i.length;return a===s?i:a>s?i+new Array(a-s+1).join("0"):a>0?i.slice(0,a)+"."+i.slice(a):"0."+new Array(1-a).join("0")+Iy(e,Math.max(0,t+a-1))[0]}function HA(e,t){var r=Iy(e,t);if(!r)return e+"";var i=r[0],n=r[1];return n<0?"0."+new Array(-n).join("0")+i:i.length>n+1?i.slice(0,n+1)+"."+i.slice(n+1):i+new Array(n-i.length+2).join("0")}function XA(e){return e}function SJ(e){var t=e.grouping===void 0||e.thousands===void 0?XA:TJ(YK.call(e.grouping,Number),e.thousands+""),r=e.currency===void 0?"":e.currency[0]+"",i=e.currency===void 0?"":e.currency[1]+"",n=e.decimal===void 0?".":e.decimal+"",a=e.numerals===void 0?XA:kJ(YK.call(e.numerals,String)),s=e.percent===void 0?"%":e.percent+"",l=e.minus===void 0?"\u2212":e.minus+"",h=e.nan===void 0?"NaN":e.nan+"";function u(p){p=Dy(p);var f=p.fill,g=p.align,m=p.sign,y=p.symbol,b=p.zero,v=p.width,T=p.comma,x=p.precision,k=p.trim,C=p.type;C==="n"?(T=!0,C="g"):VK[C]||(x===void 0&&(x=12),k=!0,C="g"),(b||f==="0"&&g==="=")&&(b=!0,f="0",g="=");var E=y==="$"?r:y==="#"&&/[boxX]/.test(C)?"0"+C.toLowerCase():"",w=y==="$"?i:/[%p]/.test(C)?s:"",_=VK[C],L=/[defgprs%]/.test(C);x=x===void 0?6:/[gprs]/.test(C)?Math.max(1,Math.min(21,x)):Math.max(0,Math.min(20,x));function N(D){var M=E,B=w,A,I,O;if(C==="c")B=_(D)+B,D="";else{D=+D;var R=D<0||1/D<0;if(D=isNaN(D)?h:_(Math.abs(D),x),k&&(D=CJ(D)),R&&+D==0&&m!=="+"&&(R=!1),M=(R?m==="("?m:l:m==="-"||m==="("?"":m)+M,B=(C==="s"?HK[8+wJ/3]:"")+B+(R&&m==="("?")":""),L){for(A=-1,I=D.length;++AO||O>57){B=(O===46?n+D.slice(A+1):D.slice(A))+B,D=D.slice(0,A);break}}}T&&!b&&(D=t(D,1/0));var $=M.length+D.length+B.length,F=$>1)+M+D+B+F.slice($);break;default:D=F+M+D+B;break}return a(D)}return o(N,"format"),N.toString=function(){return p+""},N}o(u,"newFormat");function d(p,f){var g=u((p=Dy(p),p.type="f",p)),m=Math.max(-8,Math.min(8,Math.floor(bp(f)/3)))*3,y=Math.pow(10,-m),b=HK[8+m/3];return function(v){return g(y*v)+b}}return o(d,"formatPrefix"),{format:u,formatPrefix:d}}function AJ(e){return ZT=SJ(e),wu=ZT.format,_J=ZT.formatPrefix,ZT}function RJ(e){return Math.max(0,-bp(Math.abs(e)))}function LJ(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(bp(t)/3)))*3-bp(Math.abs(e)))}function $J(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,bp(t)-bp(e))+1}function IJ(e){var t=0,r=e.children,i=r&&r.length;if(!i)t=1;else for(;--i>=0;)t+=r[i].value;e.value=t}function DJ(){return this.eachAfter(IJ)}function MJ(e,t){let r=-1;for(let i of this)e.call(t,i,++r,this);return this}function NJ(e,t){for(var r=this,i=[r],n,a,s=-1;r=i.pop();)if(e.call(t,r,++s,this),n=r.children)for(a=n.length-1;a>=0;--a)i.push(n[a]);return this}function OJ(e,t){for(var r=this,i=[r],n=[],a,s,l,h=-1;r=i.pop();)if(n.push(r),a=r.children)for(s=0,l=a.length;s=0;)r+=i[n].value;t.value=r})}function FJ(e){return this.eachBefore(function(t){t.children&&t.children.sort(e)})}function zJ(e){for(var t=this,r=qJ(t,e),i=[t];t!==r;)t=t.parent,i.push(t);for(var n=i.length;e!==r;)i.splice(n,0,e),e=e.parent;return i}function qJ(e,t){if(e===t)return e;var r=e.ancestors(),i=t.ancestors(),n=null;for(e=r.pop(),t=i.pop();e===t;)n=e,e=r.pop(),t=i.pop();return n}function jJ(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t}function GJ(){return Array.from(this)}function WJ(){var e=[];return this.eachBefore(function(t){t.children||e.push(t)}),e}function UJ(){var e=this,t=[];return e.each(function(r){r!==e&&t.push({source:r.parent,target:r})}),t}function*VJ(){var e=this,t,r=[e],i,n,a;do for(t=r.reverse(),r=[];e=t.pop();)if(yield e,i=e.children)for(n=0,a=i.length;n=0;--l)n.push(a=s[l]=new My(s[l])),a.parent=i,a.depth=i.depth+1;return r.eachBefore(ZJ)}function YJ(){return Uy(this).eachBefore(KJ)}function HJ(e){return e.children}function XJ(e){return Array.isArray(e)?e[1]:null}function KJ(e){e.data.value!==void 0&&(e.value=e.data.value),e.data=e.data.data}function ZJ(e){var t=0;do e.height=t;while((e=e.parent)&&e.height<++t)}function My(e){this.data=e,this.depth=this.height=0,this.parent=null}function QJ(e){e.x0=Math.round(e.x0),e.y0=Math.round(e.y0),e.x1=Math.round(e.x1),e.y1=Math.round(e.y1)}function JJ(e,t,r,i,n){for(var a=e.children,s,l=-1,h=a.length,u=e.value&&(i-t)/e.value;++lT&&(T=u),E=b*b*C,x=Math.max(T/E,E/v),x>k){b-=u;break}k=x}s.push(h={value:b,dice:gt&&(r=e,e=t,t=r),function(i){return Math.max(e,Math.min(t,i))}}function see(e,t,r){var i=e[0],n=e[1],a=t[0],s=t[1];return n2?oee:see,h=u=null,p}o(d,"rescale");function p(f){return f==null||isNaN(f=+f)?a:(h||(h=l(e.map(i),t,r)))(i(s(f)))}return o(p,"scale"),p.invert=function(f){return s(n((u||(u=l(t,e.map(i),_o)))(f)))},p.domain=function(f){return arguments.length?(e=Array.from(f,nee),d()):e.slice()},p.range=function(f){return arguments.length?(t=Array.from(f),d()):t.slice()},p.rangeRound=function(f){return t=Array.from(f),r=yJ,d()},p.clamp=function(f){return arguments.length?(s=f?!0:gp,d()):s!==gp},p.interpolate=function(f){return arguments.length?(r=f,d()):r},p.unknown=function(f){return arguments.length?(a=f,p):a},function(f,g){return i=f,n=g,d()}}function H7(){return lee()(gp,gp)}function cee(e,t,r,i){var n=u4(e,t,r),a;switch(i=Dy(i??",f"),i.type){case"s":{var s=Math.max(Math.abs(e),Math.abs(t));return i.precision==null&&!isNaN(a=LJ(n,s))&&(i.precision=a),_J(i,s)}case"":case"e":case"g":case"p":case"r":{i.precision==null&&!isNaN(a=$J(n,Math.max(Math.abs(e),Math.abs(t))))&&(i.precision=a-(i.type==="e"));break}case"f":case"%":{i.precision==null&&!isNaN(a=RJ(n))&&(i.precision=a-(i.type==="%")*2);break}}return wu(i)}function hee(e){var t=e.domain;return e.ticks=function(r){var i=t();return lZ(i[0],i[i.length-1],r??10)},e.tickFormat=function(r,i){var n=t();return cee(n[0],n[n.length-1],r??10,i)},e.nice=function(r){r==null&&(r=10);var i=t(),n=0,a=i.length-1,s=i[n],l=i[a],h,u,d=10;for(l0;){if(u=h4(s,l,r),u===h)return i[n]=s,i[a]=l,t(i);if(u>0)s=Math.floor(s/u)*u,l=Math.ceil(l/u)*u;else if(u<0)s=Math.ceil(s*u)/u,l=Math.floor(l*u)/u;else break;h=u}return e},e}function Ql(){var e=H7();return e.copy=function(){return Y7(e,Ql())},Vy.apply(e,arguments),hee(e)}function Cn(e,t,r,i){function n(a){return e(a=arguments.length===0?new Date:new Date(+a)),a}return o(n,"interval"),n.floor=a=>(e(a=new Date(+a)),a),n.ceil=a=>(e(a=new Date(a-1)),t(a,1),e(a),a),n.round=a=>{let s=n(a),l=n.ceil(a);return a-s(t(a=new Date(+a),s==null?1:Math.floor(s)),a),n.range=(a,s,l)=>{let h=[];if(a=n.ceil(a),l=l==null?1:Math.floor(l),!(a0))return h;let u;do h.push(u=new Date(+a)),t(a,l),e(a);while(uCn(s=>{if(s>=s)for(;e(s),!a(s);)s.setTime(s-1)},(s,l)=>{if(s>=s)if(l<0)for(;++l<=0;)for(;t(s,-1),!a(s););else for(;--l>=0;)for(;t(s,1),!a(s););}),r&&(n.count=(a,s)=>(DA.setTime(+a),MA.setTime(+s),e(DA),e(MA),Math.floor(r(DA,MA))),n.every=a=>(a=Math.floor(a),!isFinite(a)||!(a>0)?null:a>1?n.filter(i?s=>i(s)%a===0:s=>n.count(0,s)%a===0):n)),n}function Su(e){return Cn(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 _u(e){return Cn(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)}function t8(e,t,r,i,n,a){let s=[[ah,1,1e3],[ah,5,5e3],[ah,15,15e3],[ah,30,3e4],[a,1,6e4],[a,5,3e5],[a,15,9e5],[a,30,18e5],[n,1,36e5],[n,3,108e5],[n,6,216e5],[n,12,432e5],[i,1,864e5],[i,2,1728e5],[r,1,6048e5],[t,1,2592e6],[t,3,7776e6],[e,1,31536e6]];function l(u,d,p){let f=db).right(s,f);if(g===s.length)return e.every(u4(u/31536e6,d/31536e6,p));if(g===0)return xp.every(Math.max(u4(u,d,p),1));let[m,y]=s[f/s[g-1][2]53)return null;"w"in ne||(ne.w=1),"Z"in ne?(ie=a4(Yg(ne.y,0,1)),me=ie.getUTCDay(),ie=me>4||me===0?y4.ceil(ie):y4(ie),ie=X7.offset(ie,(ne.V-1)*7),ne.y=ie.getUTCFullYear(),ne.m=ie.getUTCMonth(),ne.d=ie.getUTCDate()+(ne.w+6)%7):(ie=n4(Yg(ne.y,0,1)),me=ie.getDay(),ie=me>4||me===0?Jg.ceil(ie):Jg(ie),ie=Eu.offset(ie,(ne.V-1)*7),ne.y=ie.getFullYear(),ne.m=ie.getMonth(),ne.d=ie.getDate()+(ne.w+6)%7)}else("W"in ne||"U"in ne)&&("w"in ne||(ne.w="u"in ne?ne.u%7:"W"in ne?1:0),me="Z"in ne?a4(Yg(ne.y,0,1)).getUTCDay():n4(Yg(ne.y,0,1)).getDay(),ne.m=0,ne.d="W"in ne?(ne.w+6)%7+ne.W*7-(me+5)%7:ne.w+ne.U*7-(me+6)%7);return"Z"in ne?(ne.H+=ne.Z/100|0,ne.M+=ne.Z%100,a4(ne)):n4(ne)}}o(w,"newParse");function _(Q,te,re,ne){for(var Ae=0,ie=te.length,me=re.length,oe,we;Ae=me)return-1;if(oe=te.charCodeAt(Ae++),oe===37){if(oe=te.charAt(Ae++),we=C[oe in ZK?te.charAt(Ae++):oe],!we||(ne=we(Q,re,ne))<0)return-1}else if(oe!=re.charCodeAt(ne++))return-1}return ne}o(_,"parseSpecifier");function L(Q,te,re){var ne=u.exec(te.slice(re));return ne?(Q.p=d.get(ne[0].toLowerCase()),re+ne[0].length):-1}o(L,"parsePeriod");function N(Q,te,re){var ne=g.exec(te.slice(re));return ne?(Q.w=m.get(ne[0].toLowerCase()),re+ne[0].length):-1}o(N,"parseShortWeekday");function D(Q,te,re){var ne=p.exec(te.slice(re));return ne?(Q.w=f.get(ne[0].toLowerCase()),re+ne[0].length):-1}o(D,"parseWeekday");function M(Q,te,re){var ne=v.exec(te.slice(re));return ne?(Q.m=T.get(ne[0].toLowerCase()),re+ne[0].length):-1}o(M,"parseShortMonth");function B(Q,te,re){var ne=y.exec(te.slice(re));return ne?(Q.m=b.get(ne[0].toLowerCase()),re+ne[0].length):-1}o(B,"parseMonth");function A(Q,te,re){return _(Q,t,te,re)}o(A,"parseLocaleDateTime");function I(Q,te,re){return _(Q,r,te,re)}o(I,"parseLocaleDate");function O(Q,te,re){return _(Q,i,te,re)}o(O,"parseLocaleTime");function R(Q){return s[Q.getDay()]}o(R,"formatShortWeekday");function $(Q){return a[Q.getDay()]}o($,"formatWeekday");function F(Q){return h[Q.getMonth()]}o(F,"formatShortMonth");function P(Q){return l[Q.getMonth()]}o(P,"formatMonth");function z(Q){return n[+(Q.getHours()>=12)]}o(z,"formatPeriod");function q(Q){return 1+~~(Q.getMonth()/3)}o(q,"formatQuarter");function G(Q){return s[Q.getUTCDay()]}o(G,"formatUTCShortWeekday");function W(Q){return a[Q.getUTCDay()]}o(W,"formatUTCWeekday");function J(Q){return h[Q.getUTCMonth()]}o(J,"formatUTCShortMonth");function H(Q){return l[Q.getUTCMonth()]}o(H,"formatUTCMonth");function Z(Q){return n[+(Q.getUTCHours()>=12)]}o(Z,"formatUTCPeriod");function se(Q){return 1+~~(Q.getUTCMonth()/3)}return o(se,"formatUTCQuarter"),{format:o(function(Q){var te=E(Q+="",x);return te.toString=function(){return Q},te},"format"),parse:o(function(Q){var te=w(Q+="",!1);return te.toString=function(){return Q},te},"parse"),utcFormat:o(function(Q){var te=E(Q+="",k);return te.toString=function(){return Q},te},"utcFormat"),utcParse:o(function(Q){var te=w(Q+="",!0);return te.toString=function(){return Q},te},"utcParse")}}function ti(e,t,r){var i=e<0?"-":"",n=(i?-e:e)+"",a=n.length;return i+(a[t.toLowerCase(),r]))}function yee(e,t,r){var i=Kn.exec(t.slice(r,r+1));return i?(e.w=+i[0],r+i[0].length):-1}function vee(e,t,r){var i=Kn.exec(t.slice(r,r+1));return i?(e.u=+i[0],r+i[0].length):-1}function bee(e,t,r){var i=Kn.exec(t.slice(r,r+2));return i?(e.U=+i[0],r+i[0].length):-1}function xee(e,t,r){var i=Kn.exec(t.slice(r,r+2));return i?(e.V=+i[0],r+i[0].length):-1}function Tee(e,t,r){var i=Kn.exec(t.slice(r,r+2));return i?(e.W=+i[0],r+i[0].length):-1}function KA(e,t,r){var i=Kn.exec(t.slice(r,r+4));return i?(e.y=+i[0],r+i[0].length):-1}function ZA(e,t,r){var i=Kn.exec(t.slice(r,r+2));return i?(e.y=+i[0]+(+i[0]>68?1900:2e3),r+i[0].length):-1}function kee(e,t,r){var i=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(r,r+6));return i?(e.Z=i[1]?0:-(i[2]+(i[3]||"00")),r+i[0].length):-1}function Cee(e,t,r){var i=Kn.exec(t.slice(r,r+1));return i?(e.q=i[0]*3-3,r+i[0].length):-1}function wee(e,t,r){var i=Kn.exec(t.slice(r,r+2));return i?(e.m=i[0]-1,r+i[0].length):-1}function QA(e,t,r){var i=Kn.exec(t.slice(r,r+2));return i?(e.d=+i[0],r+i[0].length):-1}function Eee(e,t,r){var i=Kn.exec(t.slice(r,r+3));return i?(e.m=0,e.d=+i[0],r+i[0].length):-1}function JA(e,t,r){var i=Kn.exec(t.slice(r,r+2));return i?(e.H=+i[0],r+i[0].length):-1}function See(e,t,r){var i=Kn.exec(t.slice(r,r+2));return i?(e.M=+i[0],r+i[0].length):-1}function _ee(e,t,r){var i=Kn.exec(t.slice(r,r+2));return i?(e.S=+i[0],r+i[0].length):-1}function Aee(e,t,r){var i=Kn.exec(t.slice(r,r+3));return i?(e.L=+i[0],r+i[0].length):-1}function Ree(e,t,r){var i=Kn.exec(t.slice(r,r+6));return i?(e.L=Math.floor(i[0]/1e3),r+i[0].length):-1}function Lee(e,t,r){var i=I$e.exec(t.slice(r,r+1));return i?r+i[0].length:-1}function $ee(e,t,r){var i=Kn.exec(t.slice(r));return i?(e.Q=+i[0],r+i[0].length):-1}function Iee(e,t,r){var i=Kn.exec(t.slice(r));return i?(e.s=+i[0],r+i[0].length):-1}function e7(e,t){return ti(e.getDate(),t,2)}function Dee(e,t){return ti(e.getHours(),t,2)}function Mee(e,t){return ti(e.getHours()%12||12,t,2)}function Nee(e,t){return ti(1+Eu.count(sh(e),e),t,3)}function r8(e,t){return ti(e.getMilliseconds(),t,3)}function Oee(e,t){return r8(e,t)+"000"}function Bee(e,t){return ti(e.getMonth()+1,t,2)}function Pee(e,t){return ti(e.getMinutes(),t,2)}function Fee(e,t){return ti(e.getSeconds(),t,2)}function zee(e){var t=e.getDay();return t===0?7:t}function qee(e,t){return ti(a0.count(sh(e)-1,e),t,2)}function i8(e){var t=e.getDay();return t>=4||t===0?Tu(e):Tu.ceil(e)}function jee(e,t){return e=i8(e),ti(Tu.count(sh(e),e)+(sh(e).getDay()===4),t,2)}function Gee(e){return e.getDay()}function Wee(e,t){return ti(Jg.count(sh(e)-1,e),t,2)}function Uee(e,t){return ti(e.getFullYear()%100,t,2)}function Vee(e,t){return e=i8(e),ti(e.getFullYear()%100,t,2)}function Yee(e,t){return ti(e.getFullYear()%1e4,t,4)}function Hee(e,t){var r=e.getDay();return e=r>=4||r===0?Tu(e):Tu.ceil(e),ti(e.getFullYear()%1e4,t,4)}function Xee(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+ti(t/60|0,"0",2)+ti(t%60,"0",2)}function t7(e,t){return ti(e.getUTCDate(),t,2)}function Kee(e,t){return ti(e.getUTCHours(),t,2)}function Zee(e,t){return ti(e.getUTCHours()%12||12,t,2)}function Qee(e,t){return ti(1+X7.count(ku(e),e),t,3)}function n8(e,t){return ti(e.getUTCMilliseconds(),t,3)}function Jee(e,t){return n8(e,t)+"000"}function ete(e,t){return ti(e.getUTCMonth()+1,t,2)}function tte(e,t){return ti(e.getUTCMinutes(),t,2)}function rte(e,t){return ti(e.getUTCSeconds(),t,2)}function ite(e){var t=e.getUTCDay();return t===0?7:t}function nte(e,t){return ti(e8.count(ku(e)-1,e),t,2)}function a8(e){var t=e.getUTCDay();return t>=4||t===0?e0(e):e0.ceil(e)}function ate(e,t){return e=a8(e),ti(e0.count(ku(e),e)+(ku(e).getUTCDay()===4),t,2)}function ste(e){return e.getUTCDay()}function ote(e,t){return ti(y4.count(ku(e)-1,e),t,2)}function lte(e,t){return ti(e.getUTCFullYear()%100,t,2)}function cte(e,t){return e=a8(e),ti(e.getUTCFullYear()%100,t,2)}function hte(e,t){return ti(e.getUTCFullYear()%1e4,t,4)}function ute(e,t){var r=e.getUTCDay();return e=r>=4||r===0?e0(e):e0.ceil(e),ti(e.getUTCFullYear()%1e4,t,4)}function dte(){return"+0000"}function r7(){return"%"}function i7(e){return+e}function n7(e){return Math.floor(+e/1e3)}function pte(e){return Wg=gee(e),Yy=Wg.format,M$e=Wg.parse,N$e=Wg.utcFormat,O$e=Wg.utcParse,Wg}function fte(e,t){e=e.slice();var r=0,i=e.length-1,n=e[r],a=e[i],s;return a1?0:e<-1?Ny:Math.acos(e)}function a7(e){return e>=1?v4:e<=-1?-v4:Math.asin(e)}function l8(e){this._+=e[0];for(let t=1,r=e.length;t=0))throw new Error(`invalid digits: ${e}`);if(t>15)return l8;let r=10**t;return function(i){this._+=i[0];for(let n=1,a=i.length;n=0))throw new RangeError(`invalid digits: ${r}`);t=i}return e},()=>new c8(t)}function kte(e){return e.innerRadius}function Cte(e){return e.outerRadius}function wte(e){return e.startAngle}function Ete(e){return e.endAngle}function Ste(e){return e&&e.padAngle}function _te(e,t,r,i,n,a,s,l){var h=r-e,u=i-t,d=s-n,p=l-a,f=p*h-d*u;if(!(f*fA*A+I*I&&(_=N,L=D),{cx:_,cy:L,x01:-d,y01:-p,x11:_*(n/C-1),y11:L*(n/C-1)}}function Jl(){var e=kte,t=Cte,r=rn(0),i=null,n=wte,a=Ete,s=Ste,l=null,h=h8(u);function u(){var d,p,f=+e.apply(this,arguments),g=+t.apply(this,arguments),m=n.apply(this,arguments)-v4,y=a.apply(this,arguments)-v4,b=QK(y-m),v=y>m;if(l||(l=d=h()),gza))l.moveTo(0,0);else if(b>s4-za)l.moveTo(g*pp(m),g*Hl(m)),l.arc(0,0,g,m,y,!v),f>za&&(l.moveTo(f*pp(y),f*Hl(y)),l.arc(0,0,f,y,m,v));else{var T=m,x=y,k=m,C=y,E=b,w=b,_=s.apply(this,arguments)/2,L=_>za&&(i?+i.apply(this,arguments):Kg(f*f+g*g)),N=NA(QK(g-f)/2,+r.apply(this,arguments)),D=N,M=N,B,A;if(L>za){var I=a7(L/f*Hl(_)),O=a7(L/g*Hl(_));(E-=I*2)>za?(I*=v?1:-1,k+=I,C-=I):(E=0,k=C=(m+y)/2),(w-=O*2)>za?(O*=v?1:-1,T+=O,x-=O):(w=0,T=x=(m+y)/2)}var R=g*pp(T),$=g*Hl(T),F=f*pp(C),P=f*Hl(C);if(N>za){var z=g*pp(x),q=g*Hl(x),G=f*pp(k),W=f*Hl(k),J;if(bza?M>za?(B=Ty(G,W,R,$,g,M,v),A=Ty(z,q,F,P,g,M,v),l.moveTo(B.cx+B.x01,B.cy+B.y01),Mza)||!(E>za)?l.lineTo(F,P):D>za?(B=Ty(F,P,z,q,f,-D,v),A=Ty(R,$,G,W,f,-D,v),l.lineTo(B.cx+B.x01,B.cy+B.y01),De?1:t>=e?0:NaN}function $te(e){return e}function p8(){var e=$te,t=Lte,r=null,i=rn(0),n=rn(s4),a=rn(0);function s(l){var h,u=(l=d8(l)).length,d,p,f=0,g=new Array(u),m=new Array(u),y=+i.apply(this,arguments),b=Math.min(s4,Math.max(-s4,n.apply(this,arguments)-y)),v,T=Math.min(Math.abs(b)/u,a.apply(this,arguments)),x=T*(b<0?-1:1),k;for(h=0;h0&&(f+=k);for(t!=null?g.sort(function(C,E){return t(m[C],m[E])}):r!=null&&g.sort(function(C,E){return r(l[C],l[E])}),h=0,p=f?(b-u*x)/f:0;h0?k*p:0)+x,m[d]={data:l[d],index:h,value:k,startAngle:y,endAngle:v,padAngle:T};return m}return o(s,"pie"),s.value=function(l){return arguments.length?(e=typeof l=="function"?l:rn(+l),s):e},s.sortValues=function(l){return arguments.length?(t=l,r=null,s):t},s.sort=function(l){return arguments.length?(r=l,t=null,s):r},s.startAngle=function(l){return arguments.length?(i=typeof l=="function"?l:rn(+l),s):i},s.endAngle=function(l){return arguments.length?(n=typeof l=="function"?l:rn(+l),s):n},s.padAngle=function(l){return arguments.length?(a=typeof l=="function"?l:rn(+l),s):a},s}function Xy(e){return new Ite(e,!0)}function Ky(e){return new Ite(e,!1)}function Oy(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 Zy(e){this._context=e}function tc(e){return new Zy(e)}function oh(){}function f8(e){this._context=e}function g8(e){return new f8(e)}function m8(e){this._context=e}function y8(e){return new m8(e)}function v8(e,t){this._basis=new Zy(e),this._beta=t}function By(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 R4(e,t){this._context=e,this._k=(1-t)/6}function $4(e,t){this._context=e,this._k=(1-t)/6}function I4(e,t){this._context=e,this._k=(1-t)/6}function D4(e,t,r){var i=e._x1,n=e._y1,a=e._x2,s=e._y2;if(e._l01_a>za){var l=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,h=3*e._l01_a*(e._l01_a+e._l12_a);i=(i*l-e._x0*e._l12_2a+e._x2*e._l01_2a)/h,n=(n*l-e._y0*e._l12_2a+e._y2*e._l01_2a)/h}if(e._l23_a>za){var u=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*u+e._x1*e._l23_2a-t*e._l12_2a)/d,s=(s*u+e._y1*e._l23_2a-r*e._l12_2a)/d}e._context.bezierCurveTo(i,n,a,s,e._x2,e._y2)}function b8(e,t){this._context=e,this._alpha=t}function x8(e,t){this._context=e,this._alpha=t}function T8(e,t){this._context=e,this._alpha=t}function k8(e){this._context=e}function C8(e){return new k8(e)}function l7(e){return e<0?-1:1}function c7(e,t,r){var i=e._x1-e._x0,n=t-e._x1,a=(e._y1-e._y0)/(i||n<0&&-0),s=(r-e._y1)/(n||i<0&&-0),l=(a*n+s*i)/(i+n);return(l7(a)+l7(s))*Math.min(Math.abs(a),Math.abs(s),.5*Math.abs(l))||0}function h7(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function o4(e,t,r){var i=e._x0,n=e._y0,a=e._x1,s=e._y1,l=(a-i)/3;e._context.bezierCurveTo(i+l,n+l*t,a-l,s-l*r,a,s)}function Py(e){this._context=e}function w8(e){this._context=new E8(e)}function E8(e){this._context=e}function Qy(e){return new Py(e)}function Jy(e){return new w8(e)}function S8(e){this._context=e}function u7(e){var t,r=e.length-1,i,n=new Array(r),a=new Array(r),s=new Array(r);for(n[0]=0,a[0]=2,s[0]=e[0]+2*e[1],t=1;t=0;--t)n[t]=(s[t]-n[t+1])/a[t];for(a[r-1]=(e[r]+n[r-1])/2,t=0;t=0&&(i=r.slice(n+1),r=r.slice(0,n)),r&&!t.hasOwnProperty(r))throw new Error("unknown type: "+r);return{type:r,name:i}})}function Fte(e,t){for(var r=0,i=e.length,n;r=0&&e._call.call(void 0,t),e=e._next;--t0}function p7(){Tp=(x4=Fy.now())+N4,t0=ky=0;try{Gte()}finally{t0=0,Ute(),Tp=0}}function Wte(){var e=Fy.now(),t=e-x4;t>zte&&(N4-=t,x4=e)}function Ute(){for(var e,t=b4,r,i=1/0;t;)t._call?(i>t._time&&(i=t._time),e=t,t=t._next):(r=t._next,t._next=null,t=e?e._next=r:b4=r);Cy=e,T4(i)}function T4(e){if(!t0){ky&&(ky=clearTimeout(ky));var t=e-Tp;t>24?(e<1/0&&(ky=setTimeout(p7,e-Fy.now()-N4)),vy&&(vy=clearInterval(vy))):(vy||(x4=Fy.now(),vy=setInterval(Wte,zte)),t0=1,qte(p7))}}function f7(e,t,r){var i=new zy;return t=t==null?0:+t,i.restart(n=>{i.stop(),e(n+t)},t,r),i}function a2(e,t,r,i,n,a){var s=e.__transition;if(!s)e.__transition={};else if(r in s)return;Yte(e,r,{name:t,index:i,group:n,on:q$e,tween:j$e,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:Vte})}function B4(e,t){var r=Ro(e,t);if(r.state>Vte)throw new Error("too late; already scheduled");return r}function fl(e,t){var r=Ro(e,t);if(r.state>l4)throw new Error("too late; already running");return r}function Ro(e,t){var r=e.__transition;if(!r||!(r=r[t]))throw new Error("transition not found");return r}function Yte(e,t,r){var i=e.__transition,n;i[t]=r,r.timer=A8(a,0,r.time);function a(u){r.state=JK,r.timer.restart(s,r.delay,r.time),r.delay<=u&&s(u-r.delay)}o(a,"schedule");function s(u){var d,p,f,g;if(r.state!==JK)return h();for(d in i)if(g=i[d],g.name===r.name){if(g.state===l4)return f7(s);g.state===eZ?(g.state=c4,g.timer.stop(),g.on.call("interrupt",e,e.__data__,g.index,g.group),delete i[d]):+dg7&&i.state=0&&(t=t.slice(0,r)),!t||t==="start"})}function wre(e,t,r){var i,n,a=Cre(t)?B4:fl;return function(){var s=a(this,e),l=s.on;l!==i&&(n=(i=l).copy()).on(t,r),s.on=n}}function Ere(e,t){var r=this._id;return arguments.length<2?Ro(this.node(),r).on.on(e):this.each(wre(r,e,t))}function Sre(e){return function(){var t=this.parentNode;for(var r in this.__transition)if(+r!==e)return;t&&t.removeChild(this)}}function _re(){return this.on("end.remove",Sre(this._id))}function Are(e){var t=this._name,r=this._id;typeof e!="function"&&(e=w4(e));for(var i=this._groups,n=i.length,a=new Array(n),s=0;s{vt();k4=Xn((e,t)=>{"use strict";(function(r,i){typeof e=="object"&&typeof t<"u"?t.exports=i():typeof define=="function"&&define.amd?define(i):(r=typeof globalThis<"u"?globalThis:r||self).dayjs=i()})(e,(function(){"use strict";var r=1e3,i=6e4,n=36e5,a="millisecond",s="second",l="minute",h="hour",u="day",d="week",p="month",f="quarter",g="year",m="date",y="Invalid Date",b=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,v=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,T={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:o(function(A){var I=["th","st","nd","rd"],O=A%100;return"["+A+(I[(O-20)%10]||I[O]||I[0])+"]"},"ordinal")},x=o(function(A,I,O){var R=String(A);return!R||R.length>=I?A:""+Array(I+1-R.length).join(O)+A},"m"),k={s:x,z:o(function(A){var I=-A.utcOffset(),O=Math.abs(I),R=Math.floor(O/60),$=O%60;return(I<=0?"+":"-")+x(R,2,"0")+":"+x($,2,"0")},"z"),m:o(function A(I,O){if(I.date()1)return A(P[0])}else{var z=I.name;E[z]=I,$=z}return!R&&$&&(C=$),$||!R&&C},"t"),N=o(function(A,I){if(_(A))return A.clone();var O=typeof I=="object"?I:{};return O.date=A,O.args=arguments,new M(O)},"O"),D=k;D.l=L,D.i=_,D.w=function(A,I){return N(A,{locale:I.$L,utc:I.$u,x:I.$x,$offset:I.$offset})};var M=(function(){function A(O){this.$L=L(O.locale,null,!0),this.parse(O),this.$x=this.$x||O.x||{},this[w]=!0}o(A,"M");var I=A.prototype;return I.parse=function(O){this.$d=(function(R){var $=R.date,F=R.utc;if($===null)return new Date(NaN);if(D.u($))return new Date;if($ instanceof Date)return new Date($);if(typeof $=="string"&&!/Z$/i.test($)){var P=$.match(b);if(P){var z=P[2]-1||0,q=(P[7]||"0").substring(0,3);return F?new Date(Date.UTC(P[1],z,P[3]||1,P[4]||0,P[5]||0,P[6]||0,q)):new Date(P[1],z,P[3]||1,P[4]||0,P[5]||0,P[6]||0,q)}}return new Date($)})(O),this.init()},I.init=function(){var O=this.$d;this.$y=O.getFullYear(),this.$M=O.getMonth(),this.$D=O.getDate(),this.$W=O.getDay(),this.$H=O.getHours(),this.$m=O.getMinutes(),this.$s=O.getSeconds(),this.$ms=O.getMilliseconds()},I.$utils=function(){return D},I.isValid=function(){return this.$d.toString()!==y},I.isSame=function(O,R){var $=N(O);return this.startOf(R)<=$&&$<=this.endOf(R)},I.isAfter=function(O,R){return N(O){},"trace"),debug:o((...e)=>{},"debug"),info:o((...e)=>{},"info"),warn:o((...e)=>{},"warn"),error:o((...e)=>{},"error"),fatal:o((...e)=>{},"fatal")},qy=o(function(e="fatal"){let t=ih.fatal;typeof e=="string"?e.toLowerCase()in ih&&(t=ih[e]):typeof e=="number"&&(t=e),ee.trace=()=>{},ee.debug=()=>{},ee.info=()=>{},ee.warn=()=>{},ee.error=()=>{},ee.fatal=()=>{},t<=ih.fatal&&(ee.fatal=console.error?console.error.bind(console,So("FATAL"),"color: orange"):console.log.bind(console,"\x1B[35m",So("FATAL"))),t<=ih.error&&(ee.error=console.error?console.error.bind(console,So("ERROR"),"color: orange"):console.log.bind(console,"\x1B[31m",So("ERROR"))),t<=ih.warn&&(ee.warn=console.warn?console.warn.bind(console,So("WARN"),"color: orange"):console.log.bind(console,"\x1B[33m",So("WARN"))),t<=ih.info&&(ee.info=console.info?console.info.bind(console,So("INFO"),"color: lightblue"):console.log.bind(console,"\x1B[34m",So("INFO"))),t<=ih.debug&&(ee.debug=console.debug?console.debug.bind(console,So("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",So("DEBUG"))),t<=ih.trace&&(ee.trace=console.debug?console.debug.bind(console,So("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",So("TRACE")))},"setLogLevel"),So=o(e=>`%c${(0,i$e.default)().format("ss.SSS")} : ${e} : `,"format");o(v7,"max");o(b7,"min");o(wy,"ascending");o(tZ,"descending");o(C4,"bisector");o(rZ,"zero");o(iZ,"number");nZ=C4(wy),n$e=nZ.right,ukt=nZ.left,dkt=C4(iZ).center,a$e=n$e,qK=class extends Map{static{o(this,"InternMap")}constructor(e,t=oZ){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:t}}),e!=null)for(let[r,i]of e)this.set(r,i)}get(e){return super.get(OA(this,e))}has(e){return super.has(OA(this,e))}set(e,t){return super.set(aZ(this,e),t)}delete(e){return super.delete(sZ(this,e))}};o(OA,"intern_get");o(aZ,"intern_set");o(sZ,"intern_delete");o(oZ,"keyof");s$e=Math.sqrt(50),o$e=Math.sqrt(10),l$e=Math.sqrt(2);o(Sy,"tickSpec");o(lZ,"ticks");o(h4,"tickIncrement");o(u4,"tickStep");o(cZ,"range");o(hZ,"default");QT=1,$A=2,BA=3,XT=4,jK=1e-6;o(uZ,"translateX");o(dZ,"translateY");o(pZ,"number");o(fZ,"center");o(gZ,"entering");o(x7,"axis");o(T7,"axisTop");o(k7,"axisBottom");o(mZ,"none");o(w4,"default");o(yZ,"default");o(vZ,"array");o(bZ,"empty");o(C7,"default");o(xZ,"arrayAll");o(TZ,"default");o(w7,"default");o(E7,"childMatcher");c$e=Array.prototype.find;o(kZ,"childFind");o(CZ,"childFirst");o(wZ,"default");h$e=Array.prototype.filter;o(EZ,"children");o(SZ,"childrenFilter");o(_Z,"default");o(AZ,"default");o(S7,"default");o(RZ,"default");o(_y,"EnterNode");_y.prototype={constructor:_y,appendChild:o(function(e){return this._parent.insertBefore(e,this._next)},"appendChild"),insertBefore:o(function(e,t){return this._parent.insertBefore(e,t)},"insertBefore"),querySelector:o(function(e){return this._parent.querySelector(e)},"querySelector"),querySelectorAll:o(function(e){return this._parent.querySelectorAll(e)},"querySelectorAll")};o(LZ,"default");o($Z,"bindIndex");o(IZ,"bindKey");o(DZ,"datum");o(MZ,"default");o(NZ,"arraylike");o(OZ,"default");o(BZ,"default");o(PZ,"default");o(FZ,"default");o(zZ,"default");o(qZ,"ascending");o(jZ,"default");o(GZ,"default");o(WZ,"default");o(UZ,"default");o(VZ,"default");o(YZ,"default");PA="http://www.w3.org/1999/xhtml",GK={svg:"http://www.w3.org/2000/svg",xhtml:PA,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};o(jy,"default");o(HZ,"attrRemove");o(XZ,"attrRemoveNS");o(KZ,"attrConstant");o(ZZ,"attrConstantNS");o(QZ,"attrFunction");o(JZ,"attrFunctionNS");o(eQ,"default");o(_7,"default");o(tQ,"styleRemove");o(rQ,"styleConstant");o(iQ,"styleFunction");o(nQ,"default");o(vp,"styleValue");o(aQ,"propertyRemove");o(sQ,"propertyConstant");o(oQ,"propertyFunction");o(lQ,"default");o(A7,"classArray");o(E4,"classList");o(R7,"ClassList");R7.prototype={add:o(function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},"add"),remove:o(function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},"remove"),contains:o(function(e){return this._names.indexOf(e)>=0},"contains")};o(L7,"classedAdd");o($7,"classedRemove");o(cQ,"classedTrue");o(hQ,"classedFalse");o(uQ,"classedFunction");o(dQ,"default");o(pQ,"textRemove");o(fQ,"textConstant");o(gQ,"textFunction");o(mQ,"default");o(yQ,"htmlRemove");o(vQ,"htmlConstant");o(bQ,"htmlFunction");o(xQ,"default");o(TQ,"raise");o(kQ,"default");o(CQ,"lower");o(wQ,"default");o(EQ,"creatorInherit");o(SQ,"creatorFixed");o(I7,"default");o(_Q,"default");o(AQ,"constantNull");o(RQ,"default");o(LQ,"remove");o($Q,"default");o(IQ,"selection_cloneShallow");o(DQ,"selection_cloneDeep");o(MQ,"default");o(NQ,"default");o(OQ,"contextListener");o(BQ,"parseTypenames");o(PQ,"onRemove");o(FQ,"onAdd");o(zQ,"default");o(D7,"dispatchEvent");o(qQ,"dispatchConstant");o(jQ,"dispatchFunction");o(GQ,"default");o(WQ,"default");UQ=[null];o($s,"Selection");o(M7,"selection");o(VQ,"selection_selection");$s.prototype=M7.prototype={constructor:$s,select:yZ,selectAll:TZ,selectChild:wZ,selectChildren:_Z,filter:AZ,data:MZ,enter:RZ,exit:OZ,join:BZ,merge:PZ,selection:VQ,order:FZ,sort:zZ,call:jZ,nodes:GZ,node:WZ,size:UZ,empty:VZ,each:YZ,attr:eQ,style:nQ,property:lQ,classed:dQ,text:mQ,html:xQ,raise:kQ,lower:wQ,append:_Q,insert:RQ,remove:$Q,clone:MQ,datum:NQ,on:zQ,dispatch:GQ,[Symbol.iterator]:WQ};Gy=M7;o(tt,"default");o(r0,"default");o(Wy,"extend");o(Cu,"Color");Ay=.7,d4=1/Ay,Zg="\\s*([+-]?\\d+)\\s*",Ry="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Kl="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",u$e=/^#([0-9a-f]{3,8})$/,d$e=new RegExp(`^rgb\\(${Zg},${Zg},${Zg}\\)$`),p$e=new RegExp(`^rgb\\(${Kl},${Kl},${Kl}\\)$`),f$e=new RegExp(`^rgba\\(${Zg},${Zg},${Zg},${Ry}\\)$`),g$e=new RegExp(`^rgba\\(${Kl},${Kl},${Kl},${Ry}\\)$`),m$e=new RegExp(`^hsl\\(${Ry},${Kl},${Kl}\\)$`),y$e=new RegExp(`^hsla\\(${Ry},${Kl},${Kl},${Ry}\\)$`),WK={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};r0(Cu,xu,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:FA,formatHex:FA,formatHex8:YQ,formatHsl:HQ,formatRgb:zA,toString:zA});o(FA,"color_formatHex");o(YQ,"color_formatHex8");o(HQ,"color_formatHsl");o(zA,"color_formatRgb");o(xu,"color");o(qA,"rgbn");o(by,"rgba");o(N7,"rgbConvert");o(Ly,"rgb");o(na,"Rgb");r0(na,Ly,Wy(Cu,{brighter(e){return e=e==null?d4:Math.pow(d4,e),new na(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Ay:Math.pow(Ay,e),new na(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new na(bu(this.r),bu(this.g),bu(this.b),$y(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:jA,formatHex:jA,formatHex8:XQ,formatRgb:GA,toString:GA}));o(jA,"rgb_formatHex");o(XQ,"rgb_formatHex8");o(GA,"rgb_formatRgb");o($y,"clampa");o(bu,"clampi");o(vu,"hex");o(WA,"hsla");o(O7,"hslConvert");o(KQ,"hsl");o(Ao,"Hsl");r0(Ao,KQ,Wy(Cu,{brighter(e){return e=e==null?d4:Math.pow(d4,e),new Ao(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Ay:Math.pow(Ay,e),new Ao(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,i=r+(r<.5?r:1-r)*t,n=2*r-i;return new na(JT(e>=240?e-240:e+120,n,i),JT(e,n,i),JT(e<120?e+240:e-120,n,i),this.opacity)},clamp(){return new Ao(UA(this.h),xy(this.s),xy(this.l),$y(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=$y(this.opacity);return`${e===1?"hsl(":"hsla("}${UA(this.h)}, ${xy(this.s)*100}%, ${xy(this.l)*100}%${e===1?")":`, ${e})`}`}}));o(UA,"clamph");o(xy,"clampt");o(JT,"hsl2rgb");v$e=Math.PI/180,b$e=180/Math.PI,p4=18,ZQ=.96422,QQ=1,JQ=.82521,eJ=4/29,Qg=6/29,tJ=3*Qg*Qg,x$e=Qg*Qg*Qg;o(B7,"labConvert");o(rJ,"lab");o(dl,"Lab");r0(dl,rJ,Wy(Cu,{brighter(e){return new dl(this.l+p4*(e??1),this.a,this.b,this.opacity)},darker(e){return new dl(this.l-p4*(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=ZQ*t4(t),e=QQ*t4(e),r=JQ*t4(r),new na(r4(3.1338561*t-1.6168667*e-.4906146*r),r4(-.9787684*t+1.9161415*e+.033454*r),r4(.0719453*t-.2289914*e+1.4052427*r),this.opacity)}}));o(e4,"xyz2lab");o(t4,"lab2xyz");o(r4,"lrgb2rgb");o(i4,"rgb2lrgb");o(iJ,"hclConvert");o(f4,"hcl");o(Xl,"Hcl");o(P7,"hcl2lab");r0(Xl,f4,Wy(Cu,{brighter(e){return new Xl(this.h,this.c,this.l+p4*(e??1),this.opacity)},darker(e){return new Xl(this.h,this.c,this.l-p4*(e??1),this.opacity)},rgb(){return P7(this).rgb()}}));S4=o(e=>()=>e,"default");o(F7,"linear");o(nJ,"exponential");o(aJ,"hue");o(sJ,"gamma");o(yp,"nogamma");o(z7,"hcl");oJ=z7(aJ),pkt=z7(yp);o(q7,"basis");o(lJ,"default");o(cJ,"default");g4=o((function e(t){var r=sJ(t);function i(n,a){var s=r((n=Ly(n)).r,(a=Ly(a)).r),l=r(n.g,a.g),h=r(n.b,a.b),u=yp(n.opacity,a.opacity);return function(d){return n.r=s(d),n.g=l(d),n.b=h(d),n.opacity=u(d),n+""}}return o(i,"rgb"),i.gamma=e,i}),"rgbGamma")(1);o(j7,"rgbSpline");fkt=j7(lJ),gkt=j7(cJ);o(hJ,"default");o(uJ,"isNumberArray");o(dJ,"genericArray");o(pJ,"default");o(_o,"default");o(fJ,"default");VA=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,IA=new RegExp(VA.source,"g");o(gJ,"zero");o(mJ,"one");o(G7,"default");o(_4,"default");o(yJ,"default");UK=180/Math.PI,YA={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};o(W7,"default");o(vJ,"parseCss");o(bJ,"parseSvg");o(U7,"interpolateTransform");T$e=U7(vJ,"px, ","px)","deg)"),k$e=U7(bJ,", ",")",")");o(xJ,"default");o(Iy,"formatDecimalParts");o(bp,"default");o(TJ,"default");o(kJ,"default");C$e=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;o(Dy,"formatSpecifier");Dy.prototype=A4.prototype;o(A4,"FormatSpecifier");A4.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};o(CJ,"default");o(EJ,"default");o(HA,"default");VK={"%":o((e,t)=>(e*100).toFixed(t),"%"),b:o(e=>Math.round(e).toString(2),"b"),c:o(e=>e+"","c"),d:xJ,e:o((e,t)=>e.toExponential(t),"e"),f:o((e,t)=>e.toFixed(t),"f"),g:o((e,t)=>e.toPrecision(t),"g"),o:o(e=>Math.round(e).toString(8),"o"),p:o((e,t)=>HA(e*100,t),"p"),r:HA,s:EJ,X:o(e=>Math.round(e).toString(16).toUpperCase(),"X"),x:o(e=>Math.round(e).toString(16),"x")};o(XA,"default");YK=Array.prototype.map,HK=["y","z","a","f","p","n","\xB5","m","","k","M","G","T","P","E","Z","Y"];o(SJ,"default");AJ({thousands:",",grouping:[3],currency:["$",""]});o(AJ,"defaultLocale");o(RJ,"default");o(LJ,"default");o($J,"default");o(IJ,"count");o(DJ,"default");o(MJ,"default");o(NJ,"default");o(OJ,"default");o(BJ,"default");o(PJ,"default");o(FJ,"default");o(zJ,"default");o(qJ,"leastCommonAncestor");o(jJ,"default");o(GJ,"default");o(WJ,"default");o(UJ,"default");o(VJ,"default");o(Uy,"hierarchy");o(YJ,"node_copy");o(HJ,"objectChildren");o(XJ,"mapChildren");o(KJ,"copyData");o(ZJ,"computeHeight");o(My,"Node");My.prototype=Uy.prototype={constructor:My,count:DJ,each:MJ,eachAfter:OJ,eachBefore:NJ,find:BJ,sum:PJ,sort:FJ,path:zJ,ancestors:jJ,descendants:GJ,leaves:WJ,links:UJ,copy:YJ,[Symbol.iterator]:VJ};o(QJ,"default");o(JJ,"default");o(eee,"default");w$e=(1+Math.sqrt(5))/2;o(tee,"squarifyRatio");E$e=o((function e(t){function r(i,n,a,s,l){tee(t,i,n,a,s,l)}return o(r,"squarify"),r.ratio=function(i){return e((i=+i)>1?i:1)},r}),"custom")(w$e);o(ree,"required");o(Ug,"constantZero");o(Vg,"default");o(V7,"default");o(Vy,"initRange");XK=Symbol("implicit");o(pl,"ordinal");o(iee,"constants");o(nee,"number");KK=[0,1];o(gp,"identity");o(m4,"normalize");o(aee,"clamper");o(see,"bimap");o(oee,"polymap");o(Y7,"copy");o(lee,"transformer");o(H7,"continuous");o(cee,"tickFormat");o(hee,"linearish");o(Ql,"linear");DA=new Date,MA=new Date;o(Cn,"timeInterval");xp=Cn(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);xp.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?Cn(t=>{t.setTime(Math.floor(t/e)*e)},(t,r)=>{t.setTime(+t+r*e)},(t,r)=>(r-t)/e):xp);mkt=xp.range,ah=Cn(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*1e3)},(e,t)=>(t-e)/1e3,e=>e.getUTCSeconds()),ykt=ah.range,i0=Cn(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*1e3)},(e,t)=>{e.setTime(+e+t*6e4)},(e,t)=>(t-e)/6e4,e=>e.getMinutes()),vkt=i0.range,uee=Cn(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*6e4)},(e,t)=>(t-e)/6e4,e=>e.getUTCMinutes()),bkt=uee.range,n0=Cn(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()),xkt=n0.range,dee=Cn(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*36e5)},(e,t)=>(t-e)/36e5,e=>e.getUTCHours()),Tkt=dee.range,Eu=Cn(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),kkt=Eu.range,X7=Cn(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/864e5,e=>e.getUTCDate()-1),Ckt=X7.range,pee=Cn(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/864e5,e=>Math.floor(e/864e5)),wkt=pee.range;o(Su,"timeWeekday");a0=Su(0),Jg=Su(1),K7=Su(2),Z7=Su(3),Tu=Su(4),Q7=Su(5),J7=Su(6),Ekt=a0.range,Skt=Jg.range,_kt=K7.range,Akt=Z7.range,Rkt=Tu.range,Lkt=Q7.range,$kt=J7.range;o(_u,"utcWeekday");e8=_u(0),y4=_u(1),S$e=_u(2),_$e=_u(3),e0=_u(4),A$e=_u(5),R$e=_u(6),Ikt=e8.range,Dkt=y4.range,Mkt=S$e.range,Nkt=_$e.range,Okt=e0.range,Bkt=A$e.range,Pkt=R$e.range,s0=Cn(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()),Fkt=s0.range,fee=Cn(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()),zkt=fee.range,sh=Cn(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());sh.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Cn(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)});qkt=sh.range,ku=Cn(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());ku.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Cn(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)});jkt=ku.range;o(t8,"ticker");[Gkt,Wkt]=t8(ku,fee,e8,pee,dee,uee),[L$e,$$e]=t8(sh,s0,a0,Eu,n0,i0);o(n4,"localDate");o(a4,"utcDate");o(Yg,"newDate");o(gee,"formatLocale");ZK={"-":"",_:" ",0:"0"},Kn=/^\s*\d+/,I$e=/^%/,D$e=/[\\^$*+?|[\]().{}]/g;o(ti,"pad");o(mee,"requote");o(Hg,"formatRe");o(Xg,"formatLookup");o(yee,"parseWeekdayNumberSunday");o(vee,"parseWeekdayNumberMonday");o(bee,"parseWeekNumberSunday");o(xee,"parseWeekNumberISO");o(Tee,"parseWeekNumberMonday");o(KA,"parseFullYear");o(ZA,"parseYear");o(kee,"parseZone");o(Cee,"parseQuarter");o(wee,"parseMonthNumber");o(QA,"parseDayOfMonth");o(Eee,"parseDayOfYear");o(JA,"parseHour24");o(See,"parseMinutes");o(_ee,"parseSeconds");o(Aee,"parseMilliseconds");o(Ree,"parseMicroseconds");o(Lee,"parseLiteralPercent");o($ee,"parseUnixTimestamp");o(Iee,"parseUnixTimestampSeconds");o(e7,"formatDayOfMonth");o(Dee,"formatHour24");o(Mee,"formatHour12");o(Nee,"formatDayOfYear");o(r8,"formatMilliseconds");o(Oee,"formatMicroseconds");o(Bee,"formatMonthNumber");o(Pee,"formatMinutes");o(Fee,"formatSeconds");o(zee,"formatWeekdayNumberMonday");o(qee,"formatWeekNumberSunday");o(i8,"dISO");o(jee,"formatWeekNumberISO");o(Gee,"formatWeekdayNumberSunday");o(Wee,"formatWeekNumberMonday");o(Uee,"formatYear");o(Vee,"formatYearISO");o(Yee,"formatFullYear");o(Hee,"formatFullYearISO");o(Xee,"formatZone");o(t7,"formatUTCDayOfMonth");o(Kee,"formatUTCHour24");o(Zee,"formatUTCHour12");o(Qee,"formatUTCDayOfYear");o(n8,"formatUTCMilliseconds");o(Jee,"formatUTCMicroseconds");o(ete,"formatUTCMonthNumber");o(tte,"formatUTCMinutes");o(rte,"formatUTCSeconds");o(ite,"formatUTCWeekdayNumberMonday");o(nte,"formatUTCWeekNumberSunday");o(a8,"UTCdISO");o(ate,"formatUTCWeekNumberISO");o(ste,"formatUTCWeekdayNumberSunday");o(ote,"formatUTCWeekNumberMonday");o(lte,"formatUTCYear");o(cte,"formatUTCYearISO");o(hte,"formatUTCFullYear");o(ute,"formatUTCFullYearISO");o(dte,"formatUTCZone");o(r7,"formatLiteralPercent");o(i7,"formatUnixTimestamp");o(n7,"formatUnixTimestampSeconds");pte({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"]});o(pte,"defaultLocale");o(fte,"nice");o(gte,"date");o(mte,"number");o(s8,"calendar");o(o8,"time");o(Hy,"band");o(yte,"default");vte=yte("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab");o(rn,"default");QK=Math.abs,Fa=Math.atan2,pp=Math.cos,B$e=Math.max,NA=Math.min,Hl=Math.sin,Kg=Math.sqrt,za=1e-12,Ny=Math.PI,v4=Ny/2,s4=2*Ny;o(bte,"acos");o(a7,"asin");s7=Math.PI,o7=2*s7,fp=1e-6,P$e=o7-fp;o(l8,"append");o(xte,"appendRound");c8=class{static{o(this,"Path")}constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=e==null?l8:xte(e)}moveTo(e,t){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(e,t){this._append`L${this._x1=+e},${this._y1=+t}`}quadraticCurveTo(e,t,r,i){this._append`Q${+e},${+t},${this._x1=+r},${this._y1=+i}`}bezierCurveTo(e,t,r,i,n,a){this._append`C${+e},${+t},${+r},${+i},${this._x1=+n},${this._y1=+a}`}arcTo(e,t,r,i,n){if(e=+e,t=+t,r=+r,i=+i,n=+n,n<0)throw new Error(`negative radius: ${n}`);let a=this._x1,s=this._y1,l=r-e,h=i-t,u=a-e,d=s-t,p=u*u+d*d;if(this._x1===null)this._append`M${this._x1=e},${this._y1=t}`;else if(p>fp)if(!(Math.abs(d*l-h*u)>fp)||!n)this._append`L${this._x1=e},${this._y1=t}`;else{let f=r-a,g=i-s,m=l*l+h*h,y=f*f+g*g,b=Math.sqrt(m),v=Math.sqrt(p),T=n*Math.tan((s7-Math.acos((m+p-y)/(2*b*v)))/2),x=T/v,k=T/b;Math.abs(x-1)>fp&&this._append`L${e+x*u},${t+x*d}`,this._append`A${n},${n},0,0,${+(d*f>u*g)},${this._x1=e+k*l},${this._y1=t+k*h}`}}arc(e,t,r,i,n,a){if(e=+e,t=+t,r=+r,a=!!a,r<0)throw new Error(`negative radius: ${r}`);let s=r*Math.cos(i),l=r*Math.sin(i),h=e+s,u=t+l,d=1^a,p=a?i-n:n-i;this._x1===null?this._append`M${h},${u}`:(Math.abs(this._x1-h)>fp||Math.abs(this._y1-u)>fp)&&this._append`L${h},${u}`,r&&(p<0&&(p=p%o7+o7),p>P$e?this._append`A${r},${r},0,1,${d},${e-s},${t-l}A${r},${r},0,1,${d},${this._x1=h},${this._y1=u}`:p>fp&&this._append`A${r},${r},0,${+(p>=s7)},${d},${this._x1=e+r*Math.cos(n)},${this._y1=t+r*Math.sin(n)}`)}rect(e,t,r,i){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}h${r=+r}v${+i}h${-r}Z`}toString(){return this._}};o(Tte,"path");Tte.prototype=c8.prototype;o(h8,"withPath");o(kte,"arcInnerRadius");o(Cte,"arcOuterRadius");o(wte,"arcStartAngle");o(Ete,"arcEndAngle");o(Ste,"arcPadAngle");o(_te,"intersect");o(Ty,"cornerTangents");o(Jl,"default");o(u8,"Linear");u8.prototype={areaStart:o(function(){this._line=0},"areaStart"),areaEnd:o(function(){this._line=NaN},"areaEnd"),lineStart:o(function(){this._point=0},"lineStart"),lineEnd:o(function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},"lineEnd"),point:o(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")};o(Au,"default");Ukt=Array.prototype.slice;o(d8,"default");o(Ate,"x");o(Rte,"y");o(ec,"default");o(Lte,"default");o($te,"default");o(p8,"default");Ite=class{static{o(this,"Bump")}constructor(e,t){this._context=e,this._x=t}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(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._x?this._context.bezierCurveTo(this._x0=(this._x0+e)/2,this._y0,this._x0,t,e,t):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+t)/2,e,this._y0,e,t);break}}this._x0=e,this._y0=t}};o(Xy,"bumpX");o(Ky,"bumpY");o(Oy,"point");o(Zy,"Basis");Zy.prototype={areaStart:o(function(){this._line=0},"areaStart"),areaEnd:o(function(){this._line=NaN},"areaEnd"),lineStart:o(function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},"lineStart"),lineEnd:o(function(){switch(this._point){case 3:Oy(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:o(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:Oy(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t},"point")};o(tc,"default");o(oh,"default");o(f8,"BasisClosed");f8.prototype={areaStart:oh,areaEnd:oh,lineStart:o(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:o(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:o(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:Oy(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t},"point")};o(g8,"default");o(m8,"BasisOpen");m8.prototype={areaStart:o(function(){this._line=0},"areaStart"),areaEnd:o(function(){this._line=NaN},"areaEnd"),lineStart:o(function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},"lineStart"),lineEnd:o(function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},"lineEnd"),point:o(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,i=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(r,i):this._context.moveTo(r,i);break;case 3:this._point=4;default:Oy(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t},"point")};o(y8,"default");o(v8,"Bundle");v8.prototype={lineStart:o(function(){this._x=[],this._y=[],this._basis.lineStart()},"lineStart"),lineEnd:o(function(){var e=this._x,t=this._y,r=e.length-1;if(r>0)for(var i=e[0],n=t[0],a=e[r]-i,s=t[r]-n,l=-1,h;++l<=r;)h=l/r,this._basis.point(this._beta*e[l]+(1-this._beta)*(i+h*a),this._beta*t[l]+(1-this._beta)*(n+h*s));this._x=this._y=null,this._basis.lineEnd()},"lineEnd"),point:o(function(e,t){this._x.push(+e),this._y.push(+t)},"point")};Dte=o((function e(t){function r(i){return t===1?new Zy(i):new v8(i,t)}return o(r,"bundle"),r.beta=function(i){return e(+i)},r}),"custom")(.85);o(By,"point");o(R4,"Cardinal");R4.prototype={areaStart:o(function(){this._line=0},"areaStart"),areaEnd:o(function(){this._line=NaN},"areaEnd"),lineStart:o(function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},"lineStart"),lineEnd:o(function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:By(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},"lineEnd"),point:o(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:By(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")};L4=o((function e(t){function r(i){return new R4(i,t)}return o(r,"cardinal"),r.tension=function(i){return e(+i)},r}),"custom")(0);o($4,"CardinalClosed");$4.prototype={areaStart:oh,areaEnd:oh,lineStart:o(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:o(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:o(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:By(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")};Mte=o((function e(t){function r(i){return new $4(i,t)}return o(r,"cardinal"),r.tension=function(i){return e(+i)},r}),"custom")(0);o(I4,"CardinalOpen");I4.prototype={areaStart:o(function(){this._line=0},"areaStart"),areaEnd:o(function(){this._line=NaN},"areaEnd"),lineStart:o(function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},"lineStart"),lineEnd:o(function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},"lineEnd"),point:o(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:By(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")};Nte=o((function e(t){function r(i){return new I4(i,t)}return o(r,"cardinal"),r.tension=function(i){return e(+i)},r}),"custom")(0);o(D4,"point");o(b8,"CatmullRom");b8.prototype={areaStart:o(function(){this._line=0},"areaStart"),areaEnd:o(function(){this._line=NaN},"areaEnd"),lineStart:o(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:o(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:o(function(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,i=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3;default:D4(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")};M4=o((function e(t){function r(i){return t?new b8(i,t):new R4(i,0)}return o(r,"catmullRom"),r.alpha=function(i){return e(+i)},r}),"custom")(.5);o(x8,"CatmullRomClosed");x8.prototype={areaStart:oh,areaEnd:oh,lineStart:o(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:o(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:o(function(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,i=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:D4(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")};Ote=o((function e(t){function r(i){return t?new x8(i,t):new $4(i,0)}return o(r,"catmullRom"),r.alpha=function(i){return e(+i)},r}),"custom")(.5);o(T8,"CatmullRomOpen");T8.prototype={areaStart:o(function(){this._line=0},"areaStart"),areaEnd:o(function(){this._line=NaN},"areaEnd"),lineStart:o(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:o(function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},"lineEnd"),point:o(function(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,i=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:D4(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")};Bte=o((function e(t){function r(i){return t?new T8(i,t):new I4(i,0)}return o(r,"catmullRom"),r.alpha=function(i){return e(+i)},r}),"custom")(.5);o(k8,"LinearClosed");k8.prototype={areaStart:oh,areaEnd:oh,lineStart:o(function(){this._point=0},"lineStart"),lineEnd:o(function(){this._point&&this._context.closePath()},"lineEnd"),point:o(function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))},"point")};o(C8,"default");o(l7,"sign");o(c7,"slope3");o(h7,"slope2");o(o4,"point");o(Py,"MonotoneX");Py.prototype={areaStart:o(function(){this._line=0},"areaStart"),areaEnd:o(function(){this._line=NaN},"areaEnd"),lineStart:o(function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},"lineStart"),lineEnd:o(function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:o4(this,this._t0,h7(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},"lineEnd"),point:o(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,o4(this,h7(this,r=c7(this,e,t)),r);break;default:o4(this,this._t0,r=c7(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}},"point")};o(w8,"MonotoneY");(w8.prototype=Object.create(Py.prototype)).point=function(e,t){Py.prototype.point.call(this,t,e)};o(E8,"ReflectContext");E8.prototype={moveTo:o(function(e,t){this._context.moveTo(t,e)},"moveTo"),closePath:o(function(){this._context.closePath()},"closePath"),lineTo:o(function(e,t){this._context.lineTo(t,e)},"lineTo"),bezierCurveTo:o(function(e,t,r,i,n,a){this._context.bezierCurveTo(t,e,i,r,a,n)},"bezierCurveTo")};o(Qy,"monotoneX");o(Jy,"monotoneY");o(S8,"Natural");S8.prototype={areaStart:o(function(){this._line=0},"areaStart"),areaEnd:o(function(){this._line=NaN},"areaEnd"),lineStart:o(function(){this._x=[],this._y=[]},"lineStart"),lineEnd:o(function(){var e=this._x,t=this._y,r=e.length;if(r)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),r===2)this._context.lineTo(e[1],t[1]);else for(var i=u7(e),n=u7(t),a=0,s=1;s=0&&(this._t=1-this._t,this._line=1-this._line)},"lineEnd"),point:o(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")};o(r2,"default");o(i2,"stepBefore");o(n2,"stepAfter");F$e={value:o(()=>{},"value")};o(_8,"dispatch");o(Ey,"Dispatch");o(Pte,"parseTypenames");Ey.prototype=_8.prototype={constructor:Ey,on:o(function(e,t){var r=this._,i=Pte(e+"",r),n,a=-1,s=i.length;if(arguments.length<2){for(;++a0)for(var r=new Array(n),i=0,n,a;iSt,SETTINGS_SCHEMA:()=>Q4,__defineFunction:()=>Nt,__defineMacro:()=>Te,__defineSymbol:()=>V,__domTree:()=>Dne,__parse:()=>Rne,__renderToDomTree:()=>yk,__renderToHTMLTree:()=>$ne,__setFontMetrics:()=>uR,default:()=>k9e,render:()=>ER,renderToString:()=>Ane,version:()=>Ine});function _ie(e){if("default"in e)return e.default;var t=e.type,r=Array.isArray(t)?t[0]:t;if(typeof r!="string")return r.enum[0];switch(r){case"boolean":return!1;case"string":return"";case"number":return 0;case"object":return{}}}function Aie(e){for(var t=0;t=n[0]&&e<=n[1])return r.name}return null}function hR(e){for(var t=0;t=K4[t]&&e<=K4[t+1])return!0;return!1}function Die(e){if(e instanceof to)return e;throw new Error("Expected symbolNode but got "+String(e)+".")}function Mie(e){if(e instanceof p0)return e;throw new Error("Expected span but got "+String(e)+".")}function uR(e,t){ic[e]=t}function sk(e,t,r){if(!ic[t])throw new Error("Font metrics not found for font: "+t+".");var i=e.charCodeAt(0),n=ic[t][i];if(!n&&e[0]in eie&&(i=eie[e[0]].charCodeAt(0),n=ic[t][i]),!n&&r==="text"&&hR(i)&&(n=ic[t][77]),n)return{depth:n[0],height:n[1],italic:n[2],skew:n[3],width:n[4]}}function Nie(e){var t;if(e>=5?t=0:e>=3?t=1:t=2,!I8[t]){var r=I8[t]={cssEmPerMu:z4.quad[t]/18};for(var i in z4)z4.hasOwnProperty(i)&&(r[i]=z4[i][t])}return I8[t]}function V(e,t,r,i,n,a){qi[e][n]={font:t,group:r,replace:i},a&&i&&(qi[e][i]=qi[e][n])}function Nt(e){for(var{type:t,names:r,props:i,handler:n,htmlBuilder:a,mathmlBuilder:s}=e,l={type:t,numArgs:i.numArgs,argTypes:i.argTypes,allowedInArgument:!!i.allowedInArgument,allowedInText:!!i.allowedInText,allowedInMath:i.allowedInMath===void 0?!0:i.allowedInMath,numOptionalArgs:i.numOptionalArgs||0,infix:!!i.infix,primitive:!!i.primitive,handler:n},h=0;h0&&(a.push(l2(s,t)),s=[]),a.push(i[l]));s.length>0&&a.push(l2(s,t));var u;r?(u=l2(On(r,t,!0),t),u.classes=["tag"],a.push(u)):n&&a.push(n);var d=wt(["katex-html"],a);if(d.setAttribute("aria-hidden","true"),u){var p=u.children[0];p.style.height=Lt(d.height+d.depth),d.depth&&(p.style.verticalAlign=Lt(-d.depth))}return d}function fR(e){return new d0(e)}function Z4(e){if(!e)return!1;if(e.type==="mi"&&e.children.length===1){var t=e.children[0];return t instanceof En&&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 En&&r.text===","}else return!1}function eR(e,t,r,i,n){var a=io(e,r),s;a.length===1&&a[0]instanceof Et&&DIe.has(a[0].type)?s=a[0]:s=new Et("mrow",a);var l=new Et("annotation",[new En(t)]);l.setAttribute("encoding","application/x-tex");var h=new Et("semantics",[s,l]),u=new Et("math",[h]);u.setAttribute("xmlns","http://www.w3.org/1998/Math/MathML"),i&&u.setAttribute("display","block");var d=n?"katex":"katex-mathml";return wt([d],[u])}function Dr(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 f2(e){var t=g2(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 g2(e){return e&&(e.type==="atom"||xIe.hasOwnProperty(e.type))?e:null}function vR(e,t){var r=On(e.body,t,!0);return wt([e.mclass],r,t)}function bR(e,t){var r,i=io(e.body,t);return e.mclass==="minner"?r=new Et("mpadded",i):e.mclass==="mord"?e.isCharacterBox?(r=i[0],r.type="mi"):r=new Et("mi",i):(e.isCharacterBox?(r=i[0],r.type="mo"):r=new Et("mo",i),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 Xie(e,t,r){var i=jIe[e];switch(i){case"\\\\cdrightarrow":case"\\\\cdleftarrow":return r.callFunction(i,[t[0]],[t[1]]);case"\\uparrow":case"\\downarrow":{var n=r.callFunction("\\\\cdleft",[t[0]],[]),a={type:"atom",text:i,mode:"math",family:"rel"},s=r.callFunction("\\Big",[a],[]),l=r.callFunction("\\\\cdright",[t[1]],[]),h={type:"ordgroup",mode:"math",body:[n,s,l]};return r.callFunction("\\\\cdparent",[h],[])}case"\\\\cdlongequal":return r.callFunction("\\\\cdlongequal",[],[]);case"\\Vert":{var u={type:"textord",text:"\\Vert",mode:"math"};return r.callFunction("\\Big",[u],[])}default:return{type:"textord",text:" ",mode:"math"}}}function Kie(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 St("Expected \\\\ or \\cr or \\end",e.nextToken)}for(var i=[],n=[i],a=0;aAV".includes(u))for(var p=0;p<2;p++){for(var f=!0,g=h+1;gAV=|." after @',s[h]);var m=Xie(u,d,e),y={type:"styling",body:[m],mode:"math",style:"display"};i.push(y),l=sie()}a%2===0?i.push(l):i.shift(),i=[],n.push(i)}e.gullet.endGroup(),e.gullet.endGroup();var b=new Array(n[0].length).fill({type:"align",align:"c",pregap:.25,postgap:.25});return{type:"array",mode:"math",body:n,arraystretch:1,addJot:!0,rowGaps:[null],cols:b,colSeparationType:"CD",hLinesBeforeRow:new Array(n.length+1).fill([])}}function m2(e,t){var r=g2(e);if(r&&e9e.has(r.text))return r;throw r?new St("Invalid delimiter '"+r.text+"' after '"+t.funcName+"'",e):new St("Invalid delimiter type '"+e.type+"'",e)}function nR(e){if(!e.body)throw new Error("Bug: The leftright ParseNode wasn't fully parsed.")}function ml(e){for(var{type:t,names:r,props:i,handler:n,htmlBuilder:a,mathmlBuilder:s}=e,l={type:t,numArgs:i.numArgs||0,allowedInText:!1,numOptionalArgs:0,handler:n},h=0;h1||!d)&&y.pop(),v.length{vt();St=class Sie extends Error{static{o(this,"ParseError")}constructor(t,r){var i="KaTeX parse error: "+t,n,a,s=r&&r.loc;if(s&&s.start<=s.end){var l=s.lexer.input;n=s.start,a=s.end,n===l.length?i+=" at end of input: ":i+=" at position "+(n+1)+": ";var h=l.slice(n,a).replace(/[^]/g,"$&\u0332"),u;n>15?u="\u2026"+l.slice(n-15,n):u=l.slice(0,n);var d;a+15e.replace(Y$e,"-$1").toLowerCase(),"hyphenate"),H$e={"&":"&",">":">","<":"<",'"':""","'":"'"},X$e=/[&><"']/g,ja=o(e=>String(e).replace(X$e,t=>H$e[t]),"escape"),U8=o(e=>e.type==="ordgroup"||e.type==="color"?e.body.length===1?U8(e.body[0]):e:e.type==="font"?U8(e.body):e,"getBaseElem"),K$e=new Set(["mathord","textord","atom"]),dh=o(e=>K$e.has(U8(e).type),"isCharacterBox"),Z$e=o(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"),Q4={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:o(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:o((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:o(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:o(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:o(e=>Math.max(0,e),"processor"),cli:"-e, --max-expand ",cliProcessor:o(e=>e==="Infinity"?1/0:parseInt(e),"cliProcessor")},globalGroup:{type:"boolean",cli:!1}};o(_ie,"getDefaultValue");lR=class{static{o(this,"Settings")}constructor(e){e===void 0&&(e={}),e=e||{};for(var t of Object.keys(Q4)){var r=Q4[t],i=e[t];this[t]=i!==void 0?r.processor?r.processor(i):i:_ie(r)}}reportNonstrict(e,t,r){var i=this.strict;if(typeof i=="function"&&(i=i(e,t,r)),!(!i||i==="ignore")){if(i===!0||i==="error")throw new St("LaTeX-incompatible input and strict mode is set to 'error': "+(t+" ["+e+"]"),r);i==="warn"?typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(t+" ["+e+"]")):typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+i+"': "+t+" ["+e+"]"))}}useStrictBehavior(e,t,r){var i=this.strict;if(typeof i=="function")try{i=i(e,t,r)}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': "+(t+" ["+e+"]")),!1):(typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+i+"': "+t+" ["+e+"]")),!1)}isTrusted(e){if("url"in e&&e.url&&!e.protocol){var t=Z$e(e.url);if(t==null)return!1;e.protocol=t}var r=typeof this.trust=="function"?this.trust(e):this.trust;return!!r}},Ru=class{static{o(this,"Style")}constructor(e,t,r){this.id=e,this.size=t,this.cramped=r}sup(){return rc[Q$e[this.id]]}sub(){return rc[J$e[this.id]]}fracNum(){return rc[eIe[this.id]]}fracDen(){return rc[tIe[this.id]]}cramp(){return rc[rIe[this.id]]}text(){return rc[iIe[this.id]]}isTight(){return this.size>=2}},cR=0,J4=1,l0=2,hh=3,u2=4,$o=5,c0=6,ss=7,rc=[new Ru(cR,0,!1),new Ru(J4,0,!0),new Ru(l0,1,!1),new Ru(hh,1,!0),new Ru(u2,2,!1),new Ru($o,2,!0),new Ru(c0,3,!1),new Ru(ss,3,!0)],Q$e=[u2,$o,u2,$o,c0,ss,c0,ss],J$e=[$o,$o,$o,$o,ss,ss,ss,ss],eIe=[l0,hh,u2,$o,c0,ss,c0,ss],tIe=[hh,hh,$o,$o,ss,ss,ss,ss],rIe=[J4,J4,hh,hh,$o,$o,ss,ss],iIe=[cR,J4,l0,hh,l0,hh,l0,hh],Lr={DISPLAY:rc[cR],TEXT:rc[l0],SCRIPT:rc[u2],SCRIPTSCRIPT:rc[c0]},V8=[{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]]}];o(Aie,"scriptFromCodepoint");K4=[];V8.forEach(e=>e.blocks.forEach(t=>K4.push(...t)));o(hR,"supportedCodepoint");Nn=o(e=>e+" "+e,"doubleBrushStroke"),o0=80,nIe=o(function(e,t){return"M95,"+(622+e+t)+` +c-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,-10,-9.5,-14 +c0,-2,0.3,-3.3,1,-4c1.3,-2.7,23.83,-20.7,67.5,-54 +c44.2,-33.3,65.8,-50.3,66.5,-51c1.3,-1.3,3,-2,5,-2c4.7,0,8.7,3.3,12,10 +s173,378,173,378c0.7,0,35.3,-71,104,-213c68.7,-142,137.5,-285,206.5,-429 +c69,-144,104.5,-217.7,106.5,-221 +l`+e/2.075+" -"+e+` +c5.3,-9.3,12,-14,20,-14 +H400000v`+(40+e)+`H845.2724 +s-225.272,467,-225.272,467s-235,486,-235,486c-2.7,4.7,-9,7,-19,7 +c-6,0,-10,-1,-12,-3s-194,-422,-194,-422s-65,47,-65,47z +M`+(834+e)+" "+t+"h400000v"+(40+e)+"h-400000z"},"sqrtMain"),aIe=o(function(e,t){return"M263,"+(601+e+t)+`c0.7,0,18,39.7,52,119 +c34,79.3,68.167,158.7,102.5,238c34.3,79.3,51.8,119.3,52.5,120 +c340,-704.7,510.7,-1060.3,512,-1067 +l`+e/2.084+" -"+e+` +c4.7,-7.3,11,-11,19,-11 +H40000v`+(40+e)+`H1012.3 +s-271.3,567,-271.3,567c-38.7,80.7,-84,175,-136,283c-52,108,-89.167,185.3,-111.5,232 +c-22.3,46.7,-33.8,70.3,-34.5,71c-4.7,4.7,-12.3,7,-23,7s-12,-1,-12,-1 +s-109,-253,-109,-253c-72.7,-168,-109.3,-252,-110,-252c-10.7,8,-22,16.7,-34,26 +c-22,17.3,-33.3,26,-34,26s-26,-26,-26,-26s76,-59,76,-59s76,-60,76,-60z +M`+(1001+e)+" "+t+"h400000v"+(40+e)+"h-400000z"},"sqrtSize1"),sIe=o(function(e,t){return"M983 "+(10+e+t)+` +l`+e/3.13+" -"+e+` +c4,-6.7,10,-10,18,-10 H400000v`+(40+e)+` +H1013.1s-83.4,268,-264.1,840c-180.7,572,-277,876.3,-289,913c-4.7,4.7,-12.7,7,-24,7 +s-12,0,-12,0c-1.3,-3.3,-3.7,-11.7,-7,-25c-35.3,-125.3,-106.7,-373.3,-214,-744 +c-10,12,-21,25,-33,39s-32,39,-32,39c-6,-5.3,-15,-14,-27,-26s25,-30,25,-30 +c26.7,-32.7,52,-63,76,-91s52,-60,52,-60s208,722,208,722 +c56,-175.3,126.3,-397.3,211,-666c84.7,-268.7,153.8,-488.2,207.5,-658.5 +c53.7,-170.3,84.5,-266.8,92.5,-289.5z +M`+(1001+e)+" "+t+"h400000v"+(40+e)+"h-400000z"},"sqrtSize2"),oIe=o(function(e,t){return"M424,"+(2398+e+t)+` +c-1.3,-0.7,-38.5,-172,-111.5,-514c-73,-342,-109.8,-513.3,-110.5,-514 +c0,-2,-10.7,14.3,-32,49c-4.7,7.3,-9.8,15.7,-15.5,25c-5.7,9.3,-9.8,16,-12.5,20 +s-5,7,-5,7c-4,-3.3,-8.3,-7.7,-13,-13s-13,-13,-13,-13s76,-122,76,-122s77,-121,77,-121 +s209,968,209,968c0,-2,84.7,-361.7,254,-1079c169.3,-717.3,254.7,-1077.7,256,-1081 +l`+e/4.223+" -"+e+`c4,-6.7,10,-10,18,-10 H400000 +v`+(40+e)+`H1014.6 +s-87.3,378.7,-272.6,1166c-185.3,787.3,-279.3,1182.3,-282,1185 +c-2,6,-10,9,-24,9 +c-8,0,-12,-0.7,-12,-2z M`+(1001+e)+" "+t+` +h400000v`+(40+e)+"h-400000z"},"sqrtSize3"),lIe=o(function(e,t){return"M473,"+(2713+e+t)+` +c339.3,-1799.3,509.3,-2700,510,-2702 l`+e/5.298+" -"+e+` +c3.3,-7.3,9.3,-11,18,-11 H400000v`+(40+e)+`H1017.7 +s-90.5,478,-276.2,1466c-185.7,988,-279.5,1483,-281.5,1485c-2,6,-10,9,-24,9 +c-8,0,-12,-0.7,-12,-2c0,-1.3,-5.3,-32,-16,-92c-50.7,-293.3,-119.7,-693.3,-207,-1200 +c0,-1.3,-5.3,8.7,-16,30c-10.7,21.3,-21.3,42.7,-32,64s-16,33,-16,33s-26,-26,-26,-26 +s76,-153,76,-153s77,-151,77,-151c0.7,0.7,35.7,202,105,604c67.3,400.7,102,602.7,104, +606zM`+(1001+e)+" "+t+"h400000v"+(40+e)+"H1017.7z"},"sqrtSize4"),cIe=o(function(e){var t=e/2;return"M400000 "+e+" H0 L"+t+" 0 l65 45 L145 "+(e-80)+" H400000z"},"phasePath"),hIe=o(function(e,t,r){var i=r-54-t-e;return"M702 "+(e+t)+"H400000"+(40+e)+` +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 `+t+"H400000v"+(40+e)+"H742z"},"sqrtTall"),uIe=o(function(e,t,r){t=1e3*t;var i="";switch(e){case"sqrtMain":i=nIe(t,o0);break;case"sqrtSize1":i=aIe(t,o0);break;case"sqrtSize2":i=sIe(t,o0);break;case"sqrtSize3":i=oIe(t,o0);break;case"sqrtSize4":i=lIe(t,o0);break;case"sqrtTall":i=hIe(t,o0,r)}return i},"sqrtPath"),dIe=o(function(e,t){switch(e){case"\u239C":return Nn("M291 0 H417 V"+t+" H291z");case"\u2223":return Nn("M145 0 H188 V"+t+" H145z");case"\u2225":return Nn("M145 0 H188 V"+t+" H145z")+Nn("M367 0 H410 V"+t+" H367z");case"\u239F":return Nn("M457 0 H583 V"+t+" H457z");case"\u23A2":return Nn("M319 0 H403 V"+t+" H319z");case"\u23A5":return Nn("M263 0 H347 V"+t+" H263z");case"\u23AA":return Nn("M384 0 H504 V"+t+" H384z");case"\u23D0":return Nn("M312 0 H355 V"+t+" H312z");case"\u2016":return Nn("M257 0 H300 V"+t+" H257z")+Nn("M478 0 H521 V"+t+" H478z");default:return""}},"innerPath"),Jre={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:Nn("M40 281 V428 H0 V94 H40 V241 H400000 v40z"),leftbracketunder:Nn("M0 0 h120 V290 H399995 v120 H0z"),leftbracketover:Nn("M0 440 h120 V150 H399995 v-120 H0z"),leftmapsto:Nn("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:Nn("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:Nn("M399960 241 V94 h40 V428 h-40 V281 H0 v-40z"),rightbracketunder:Nn("M399995 0 h-120 V290 H0 v120 H400000z"),rightbracketover:Nn("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`},pIe=o(function(e,t){switch(e){case"lbrack":return"M403 1759 V84 H666 V0 H319 V1759 v"+t+` v1759 h347 v-84 +H403z M403 1759 V0 H319 V1759 v`+t+" v1759 h84z";case"rbrack":return"M347 1759 V0 H0 V84 H263 V1759 v"+t+` v1759 H0 v84 H347z +M347 1759 V0 H263 V1759 v`+t+" v1759 h84z";case"vert":return"M145 15 v585 v"+t+` v585 c2.667,10,9.667,15,21,15 +c10,0,16.667,-5,20,-15 v-585 v`+-t+` v-585 c-2.667,-10,-9.667,-15,-21,-15 +c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v`+t+" v585 h43z";case"doublevert":return"M145 15 v585 v"+t+` v585 c2.667,10,9.667,15,21,15 +c10,0,16.667,-5,20,-15 v-585 v`+-t+` v-585 c-2.667,-10,-9.667,-15,-21,-15 +c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v`+t+` v585 h43z +M367 15 v585 v`+t+` v585 c2.667,10,9.667,15,21,15 +c10,0,16.667,-5,20,-15 v-585 v`+-t+` v-585 c-2.667,-10,-9.667,-15,-21,-15 +c-10,0,-16.667,5,-20,15z M410 15 H367 v585 v`+t+" v585 h43z";case"lfloor":return"M319 602 V0 H403 V602 v"+t+` v1715 h263 v84 H319z +MM319 602 V0 H403 V602 v`+t+" v1715 H319z";case"rfloor":return"M319 602 V0 H403 V602 v"+t+` v1799 H0 v-84 H319z +MM319 602 V0 H403 V602 v`+t+" v1715 H319z";case"lceil":return"M403 1759 V84 H666 V0 H319 V1759 v"+t+` v602 h84z +M403 1759 V0 H319 V1759 v`+t+" v602 h84z";case"rceil":return"M347 1759 V0 H0 V84 H263 V1759 v"+t+` v602 h84z +M347 1759 V0 h-84 V1759 v`+t+" v602 h84z";case"lparen":return`M863,9c0,-2,-2,-5,-6,-9c0,0,-17,0,-17,0c-12.7,0,-19.3,0.3,-20,1 +c-5.3,5.3,-10.3,11,-15,17c-242.7,294.7,-395.3,682,-458,1162c-21.3,163.3,-33.3,349, +-36,557 l0,`+(t+84)+`c0.2,6,0,26,0,60c2,159.3,10,310.7,24,454c53.3,528,210, +949.7,470,1265c4.7,6,9.7,11.7,15,17c0.7,0.7,7,1,19,1c0,0,18,0,18,0c4,-4,6,-7,6,-9 +c0,-2.7,-3.3,-8.7,-10,-18c-135.3,-192.7,-235.5,-414.3,-300.5,-665c-65,-250.7,-102.5, +-544.7,-112.5,-882c-2,-104,-3,-167,-3,-189 +l0,-`+(t+92)+`c0,-162.7,5.7,-314,17,-454c20.7,-272,63.7,-513,129,-723c65.3, +-210,155.3,-396.3,270,-559c6.7,-9.3,10,-15.3,10,-18z`;case"rparen":return`M76,0c-16.7,0,-25,3,-25,9c0,2,2,6.3,6,13c21.3,28.7,42.3,60.3, +63,95c96.7,156.7,172.8,332.5,228.5,527.5c55.7,195,92.8,416.5,111.5,664.5 +c11.3,139.3,17,290.7,17,454c0,28,1.7,43,3.3,45l0,`+(t+9)+` +c-3,4,-3.3,16.7,-3.3,38c0,162,-5.7,313.7,-17,455c-18.7,248,-55.8,469.3,-111.5,664 +c-55.7,194.7,-131.8,370.3,-228.5,527c-20.7,34.7,-41.7,66.3,-63,95c-2,3.3,-4,7,-6,11 +c0,7.3,5.7,11,17,11c0,0,11,0,11,0c9.3,0,14.3,-0.3,15,-1c5.3,-5.3,10.3,-11,15,-17 +c242.7,-294.7,395.3,-681.7,458,-1161c21.3,-164.7,33.3,-350.7,36,-558 +l0,-`+(t+144)+`c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949.7, +-470,-1265c-4.7,-6,-9.7,-11.7,-15,-17c-0.7,-0.7,-6.7,-1,-18,-1z`;default:throw new Error("Unknown stretchy delimiter.")}},"tallDelim"),d0=class{static{o(this,"DocumentFragment")}constructor(e){this.children=e,this.classes=[],this.height=0,this.depth=0,this.maxFontSize=0,this.style={}}hasClass(e){return this.classes.includes(e)}toNode(){for(var e=document.createDocumentFragment(),t=0;tt.toText(),"toText");return this.children.map(e).join("")}},Y8={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},fIe={ex:!0,em:!0,mu:!0},Rie=o(function(e){return typeof e!="string"&&(e=e.unit),e in Y8||e in fIe||e==="ex"},"validUnit"),Ki=o(function(e,t){var r;if(e.unit in Y8)r=Y8[e.unit]/t.fontMetrics().ptPerEm/t.sizeMultiplier;else if(e.unit==="mu")r=t.fontMetrics().cssEmPerMu;else{var i;if(t.style.isTight()?i=t.havingStyle(t.style.text()):i=t,e.unit==="ex")r=i.fontMetrics().xHeight;else if(e.unit==="em")r=i.fontMetrics().quad;else throw new St("Invalid unit: '"+e.unit+"'");i!==t&&(r*=i.sizeMultiplier/t.sizeMultiplier)}return Math.min(e.number*r,t.maxSize)},"calculateSize"),Lt=o(function(e){return+e.toFixed(4)+"em"},"makeEm"),Iu=o(function(e){return e.filter(t=>t).join(" ")},"createClass"),Lie=o(function(e,t,r){if(this.classes=e||[],this.attributes={},this.height=0,this.depth=0,this.maxFontSize=0,this.style=r||{},t){t.style.isTight()&&this.classes.push("mtight");var i=t.getColor();i&&(this.style.color=i)}},"initNode"),$ie=o(function(e){var t=document.createElement(e);t.className=Iu(this.classes);for(var r of Object.keys(this.style))t.style[r]=this.style[r];for(var i of Object.keys(this.attributes))t.setAttribute(i,this.attributes[i]);for(var n=0;n/=\x00-\x1f]/,Iie=o(function(e){var t="<"+e;this.classes.length&&(t+=' class="'+ja(Iu(this.classes))+'"');var r="";for(var i of Object.keys(this.style))r+=oR(i)+":"+this.style[i]+";";r&&(t+=' style="'+ja(r)+'"');for(var n of Object.keys(this.attributes)){if(gIe.test(n))throw new St("Invalid attribute name '"+n+"'");t+=" "+n+'="'+ja(this.attributes[n])+'"'}t+=">";for(var a=0;a",t},"toMarkup"),p0=class{static{o(this,"Span")}constructor(e,t,r,i){Lie.call(this,e,r,i),this.children=t||[]}setAttribute(e,t){this.attributes[e]=t}hasClass(e){return this.classes.includes(e)}toNode(){return $ie.call(this,"span")}toMarkup(){return Iie.call(this,"span")}},ak=class{static{o(this,"Anchor")}constructor(e,t,r,i){Lie.call(this,t,i),this.children=r||[],this.setAttribute("href",e)}setAttribute(e,t){this.attributes[e]=t}hasClass(e){return this.classes.includes(e)}toNode(){return $ie.call(this,"a")}toMarkup(){return Iie.call(this,"a")}},mIe=class{static{o(this,"Img")}constructor(e,t,r){this.alt=t,this.src=e,this.classes=["mord"],this.height=0,this.depth=0,this.maxFontSize=0,this.style=r}hasClass(e){return this.classes.includes(e)}toNode(){var e=document.createElement("img");e.src=this.src,e.alt=this.alt,e.className="mord";for(var t of Object.keys(this.style))e.style[t]=this.style[t];return e}toMarkup(){var e=''+ja(this.alt)+'0&&(t=document.createElement("span"),t.style.marginRight=Lt(this.italic)),this.classes.length>0&&(t=t||document.createElement("span"),t.className=Iu(this.classes));for(var r of Object.keys(this.style))t=t||document.createElement("span"),t.style[r]=this.style[r];return t?(t.appendChild(e),t):e}toMarkup(){var e=!1,t="0&&(r+="margin-right:"+Lt(this.italic)+";");for(var i of Object.keys(this.style))r+=oR(i)+":"+this.style[i]+";";r&&(e=!0,t+=' style="'+ja(r)+'"');var n=ja(this.text);return e?(t+=">",t+=n,t+="",t):n}},uh=class{static{o(this,"SvgNode")}constructor(e,t){this.children=e||[],this.attributes=t||{}}toNode(){var e="http://www.w3.org/2000/svg",t=document.createElementNS(e,"svg");for(var r of Object.keys(this.attributes))t.setAttribute(r,this.attributes[r]);for(var i=0;i':''}},H8=class{static{o(this,"LineNode")}constructor(e){this.attributes=e||{}}toNode(){var e="http://www.w3.org/2000/svg",t=document.createElementNS(e,"line");for(var r of Object.keys(this.attributes))t.setAttribute(r,this.attributes[r]);return t}toMarkup(){var e="e instanceof p0||e instanceof ak||e instanceof d0,"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]}},z4={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]},eie={\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"};o(uR,"setFontMetrics");o(sk,"getCharacterMetrics");I8={};o(Nie,"getGlobalMetrics");bIe={bin:1,close:1,inner:1,open:1,punct:1,rel:1},xIe={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1},qi={math:{},text:{}};o(V,"defineSymbol");K="math",bt="text",he="main",Fe="ams",ji="accent-token",zt="bin",os="close",f0="inner",sr="mathord",Sn="op-token",ro="open",p2="punct",qe="rel",ph="spacing",We="textord";V(K,he,qe,"\u2261","\\equiv",!0);V(K,he,qe,"\u227A","\\prec",!0);V(K,he,qe,"\u227B","\\succ",!0);V(K,he,qe,"\u223C","\\sim",!0);V(K,he,qe,"\u22A5","\\perp");V(K,he,qe,"\u2AAF","\\preceq",!0);V(K,he,qe,"\u2AB0","\\succeq",!0);V(K,he,qe,"\u2243","\\simeq",!0);V(K,he,qe,"\u2223","\\mid",!0);V(K,he,qe,"\u226A","\\ll",!0);V(K,he,qe,"\u226B","\\gg",!0);V(K,he,qe,"\u224D","\\asymp",!0);V(K,he,qe,"\u2225","\\parallel");V(K,he,qe,"\u22C8","\\bowtie",!0);V(K,he,qe,"\u2323","\\smile",!0);V(K,he,qe,"\u2291","\\sqsubseteq",!0);V(K,he,qe,"\u2292","\\sqsupseteq",!0);V(K,he,qe,"\u2250","\\doteq",!0);V(K,he,qe,"\u2322","\\frown",!0);V(K,he,qe,"\u220B","\\ni",!0);V(K,he,qe,"\u221D","\\propto",!0);V(K,he,qe,"\u22A2","\\vdash",!0);V(K,he,qe,"\u22A3","\\dashv",!0);V(K,he,qe,"\u220B","\\owns");V(K,he,p2,".","\\ldotp");V(K,he,p2,"\u22C5","\\cdotp");V(K,he,p2,"\u22C5","\xB7");V(bt,he,We,"\u22C5","\xB7");V(K,he,We,"#","\\#");V(bt,he,We,"#","\\#");V(K,he,We,"&","\\&");V(bt,he,We,"&","\\&");V(K,he,We,"\u2135","\\aleph",!0);V(K,he,We,"\u2200","\\forall",!0);V(K,he,We,"\u210F","\\hbar",!0);V(K,he,We,"\u2203","\\exists",!0);V(K,he,We,"\u2207","\\nabla",!0);V(K,he,We,"\u266D","\\flat",!0);V(K,he,We,"\u2113","\\ell",!0);V(K,he,We,"\u266E","\\natural",!0);V(K,he,We,"\u2663","\\clubsuit",!0);V(K,he,We,"\u2118","\\wp",!0);V(K,he,We,"\u266F","\\sharp",!0);V(K,he,We,"\u2662","\\diamondsuit",!0);V(K,he,We,"\u211C","\\Re",!0);V(K,he,We,"\u2661","\\heartsuit",!0);V(K,he,We,"\u2111","\\Im",!0);V(K,he,We,"\u2660","\\spadesuit",!0);V(K,he,We,"\xA7","\\S",!0);V(bt,he,We,"\xA7","\\S");V(K,he,We,"\xB6","\\P",!0);V(bt,he,We,"\xB6","\\P");V(K,he,We,"\u2020","\\dag");V(bt,he,We,"\u2020","\\dag");V(bt,he,We,"\u2020","\\textdagger");V(K,he,We,"\u2021","\\ddag");V(bt,he,We,"\u2021","\\ddag");V(bt,he,We,"\u2021","\\textdaggerdbl");V(K,he,os,"\u23B1","\\rmoustache",!0);V(K,he,ro,"\u23B0","\\lmoustache",!0);V(K,he,os,"\u27EF","\\rgroup",!0);V(K,he,ro,"\u27EE","\\lgroup",!0);V(K,he,zt,"\u2213","\\mp",!0);V(K,he,zt,"\u2296","\\ominus",!0);V(K,he,zt,"\u228E","\\uplus",!0);V(K,he,zt,"\u2293","\\sqcap",!0);V(K,he,zt,"\u2217","\\ast");V(K,he,zt,"\u2294","\\sqcup",!0);V(K,he,zt,"\u25EF","\\bigcirc",!0);V(K,he,zt,"\u2219","\\bullet",!0);V(K,he,zt,"\u2021","\\ddagger");V(K,he,zt,"\u2240","\\wr",!0);V(K,he,zt,"\u2A3F","\\amalg");V(K,he,zt,"&","\\And");V(K,he,qe,"\u27F5","\\longleftarrow",!0);V(K,he,qe,"\u21D0","\\Leftarrow",!0);V(K,he,qe,"\u27F8","\\Longleftarrow",!0);V(K,he,qe,"\u27F6","\\longrightarrow",!0);V(K,he,qe,"\u21D2","\\Rightarrow",!0);V(K,he,qe,"\u27F9","\\Longrightarrow",!0);V(K,he,qe,"\u2194","\\leftrightarrow",!0);V(K,he,qe,"\u27F7","\\longleftrightarrow",!0);V(K,he,qe,"\u21D4","\\Leftrightarrow",!0);V(K,he,qe,"\u27FA","\\Longleftrightarrow",!0);V(K,he,qe,"\u21A6","\\mapsto",!0);V(K,he,qe,"\u27FC","\\longmapsto",!0);V(K,he,qe,"\u2197","\\nearrow",!0);V(K,he,qe,"\u21A9","\\hookleftarrow",!0);V(K,he,qe,"\u21AA","\\hookrightarrow",!0);V(K,he,qe,"\u2198","\\searrow",!0);V(K,he,qe,"\u21BC","\\leftharpoonup",!0);V(K,he,qe,"\u21C0","\\rightharpoonup",!0);V(K,he,qe,"\u2199","\\swarrow",!0);V(K,he,qe,"\u21BD","\\leftharpoondown",!0);V(K,he,qe,"\u21C1","\\rightharpoondown",!0);V(K,he,qe,"\u2196","\\nwarrow",!0);V(K,he,qe,"\u21CC","\\rightleftharpoons",!0);V(K,Fe,qe,"\u226E","\\nless",!0);V(K,Fe,qe,"\uE010","\\@nleqslant");V(K,Fe,qe,"\uE011","\\@nleqq");V(K,Fe,qe,"\u2A87","\\lneq",!0);V(K,Fe,qe,"\u2268","\\lneqq",!0);V(K,Fe,qe,"\uE00C","\\@lvertneqq");V(K,Fe,qe,"\u22E6","\\lnsim",!0);V(K,Fe,qe,"\u2A89","\\lnapprox",!0);V(K,Fe,qe,"\u2280","\\nprec",!0);V(K,Fe,qe,"\u22E0","\\npreceq",!0);V(K,Fe,qe,"\u22E8","\\precnsim",!0);V(K,Fe,qe,"\u2AB9","\\precnapprox",!0);V(K,Fe,qe,"\u2241","\\nsim",!0);V(K,Fe,qe,"\uE006","\\@nshortmid");V(K,Fe,qe,"\u2224","\\nmid",!0);V(K,Fe,qe,"\u22AC","\\nvdash",!0);V(K,Fe,qe,"\u22AD","\\nvDash",!0);V(K,Fe,qe,"\u22EA","\\ntriangleleft");V(K,Fe,qe,"\u22EC","\\ntrianglelefteq",!0);V(K,Fe,qe,"\u228A","\\subsetneq",!0);V(K,Fe,qe,"\uE01A","\\@varsubsetneq");V(K,Fe,qe,"\u2ACB","\\subsetneqq",!0);V(K,Fe,qe,"\uE017","\\@varsubsetneqq");V(K,Fe,qe,"\u226F","\\ngtr",!0);V(K,Fe,qe,"\uE00F","\\@ngeqslant");V(K,Fe,qe,"\uE00E","\\@ngeqq");V(K,Fe,qe,"\u2A88","\\gneq",!0);V(K,Fe,qe,"\u2269","\\gneqq",!0);V(K,Fe,qe,"\uE00D","\\@gvertneqq");V(K,Fe,qe,"\u22E7","\\gnsim",!0);V(K,Fe,qe,"\u2A8A","\\gnapprox",!0);V(K,Fe,qe,"\u2281","\\nsucc",!0);V(K,Fe,qe,"\u22E1","\\nsucceq",!0);V(K,Fe,qe,"\u22E9","\\succnsim",!0);V(K,Fe,qe,"\u2ABA","\\succnapprox",!0);V(K,Fe,qe,"\u2246","\\ncong",!0);V(K,Fe,qe,"\uE007","\\@nshortparallel");V(K,Fe,qe,"\u2226","\\nparallel",!0);V(K,Fe,qe,"\u22AF","\\nVDash",!0);V(K,Fe,qe,"\u22EB","\\ntriangleright");V(K,Fe,qe,"\u22ED","\\ntrianglerighteq",!0);V(K,Fe,qe,"\uE018","\\@nsupseteqq");V(K,Fe,qe,"\u228B","\\supsetneq",!0);V(K,Fe,qe,"\uE01B","\\@varsupsetneq");V(K,Fe,qe,"\u2ACC","\\supsetneqq",!0);V(K,Fe,qe,"\uE019","\\@varsupsetneqq");V(K,Fe,qe,"\u22AE","\\nVdash",!0);V(K,Fe,qe,"\u2AB5","\\precneqq",!0);V(K,Fe,qe,"\u2AB6","\\succneqq",!0);V(K,Fe,qe,"\uE016","\\@nsubseteqq");V(K,Fe,zt,"\u22B4","\\unlhd");V(K,Fe,zt,"\u22B5","\\unrhd");V(K,Fe,qe,"\u219A","\\nleftarrow",!0);V(K,Fe,qe,"\u219B","\\nrightarrow",!0);V(K,Fe,qe,"\u21CD","\\nLeftarrow",!0);V(K,Fe,qe,"\u21CF","\\nRightarrow",!0);V(K,Fe,qe,"\u21AE","\\nleftrightarrow",!0);V(K,Fe,qe,"\u21CE","\\nLeftrightarrow",!0);V(K,Fe,qe,"\u25B3","\\vartriangle");V(K,Fe,We,"\u210F","\\hslash");V(K,Fe,We,"\u25BD","\\triangledown");V(K,Fe,We,"\u25CA","\\lozenge");V(K,Fe,We,"\u24C8","\\circledS");V(K,Fe,We,"\xAE","\\circledR");V(bt,Fe,We,"\xAE","\\circledR");V(K,Fe,We,"\u2221","\\measuredangle",!0);V(K,Fe,We,"\u2204","\\nexists");V(K,Fe,We,"\u2127","\\mho");V(K,Fe,We,"\u2132","\\Finv",!0);V(K,Fe,We,"\u2141","\\Game",!0);V(K,Fe,We,"\u2035","\\backprime");V(K,Fe,We,"\u25B2","\\blacktriangle");V(K,Fe,We,"\u25BC","\\blacktriangledown");V(K,Fe,We,"\u25A0","\\blacksquare");V(K,Fe,We,"\u29EB","\\blacklozenge");V(K,Fe,We,"\u2605","\\bigstar");V(K,Fe,We,"\u2222","\\sphericalangle",!0);V(K,Fe,We,"\u2201","\\complement",!0);V(K,Fe,We,"\xF0","\\eth",!0);V(bt,he,We,"\xF0","\xF0");V(K,Fe,We,"\u2571","\\diagup");V(K,Fe,We,"\u2572","\\diagdown");V(K,Fe,We,"\u25A1","\\square");V(K,Fe,We,"\u25A1","\\Box");V(K,Fe,We,"\u25CA","\\Diamond");V(K,Fe,We,"\xA5","\\yen",!0);V(bt,Fe,We,"\xA5","\\yen",!0);V(K,Fe,We,"\u2713","\\checkmark",!0);V(bt,Fe,We,"\u2713","\\checkmark");V(K,Fe,We,"\u2136","\\beth",!0);V(K,Fe,We,"\u2138","\\daleth",!0);V(K,Fe,We,"\u2137","\\gimel",!0);V(K,Fe,We,"\u03DD","\\digamma",!0);V(K,Fe,We,"\u03F0","\\varkappa");V(K,Fe,ro,"\u250C","\\@ulcorner",!0);V(K,Fe,os,"\u2510","\\@urcorner",!0);V(K,Fe,ro,"\u2514","\\@llcorner",!0);V(K,Fe,os,"\u2518","\\@lrcorner",!0);V(K,Fe,qe,"\u2266","\\leqq",!0);V(K,Fe,qe,"\u2A7D","\\leqslant",!0);V(K,Fe,qe,"\u2A95","\\eqslantless",!0);V(K,Fe,qe,"\u2272","\\lesssim",!0);V(K,Fe,qe,"\u2A85","\\lessapprox",!0);V(K,Fe,qe,"\u224A","\\approxeq",!0);V(K,Fe,zt,"\u22D6","\\lessdot");V(K,Fe,qe,"\u22D8","\\lll",!0);V(K,Fe,qe,"\u2276","\\lessgtr",!0);V(K,Fe,qe,"\u22DA","\\lesseqgtr",!0);V(K,Fe,qe,"\u2A8B","\\lesseqqgtr",!0);V(K,Fe,qe,"\u2251","\\doteqdot");V(K,Fe,qe,"\u2253","\\risingdotseq",!0);V(K,Fe,qe,"\u2252","\\fallingdotseq",!0);V(K,Fe,qe,"\u223D","\\backsim",!0);V(K,Fe,qe,"\u22CD","\\backsimeq",!0);V(K,Fe,qe,"\u2AC5","\\subseteqq",!0);V(K,Fe,qe,"\u22D0","\\Subset",!0);V(K,Fe,qe,"\u228F","\\sqsubset",!0);V(K,Fe,qe,"\u227C","\\preccurlyeq",!0);V(K,Fe,qe,"\u22DE","\\curlyeqprec",!0);V(K,Fe,qe,"\u227E","\\precsim",!0);V(K,Fe,qe,"\u2AB7","\\precapprox",!0);V(K,Fe,qe,"\u22B2","\\vartriangleleft");V(K,Fe,qe,"\u22B4","\\trianglelefteq");V(K,Fe,qe,"\u22A8","\\vDash",!0);V(K,Fe,qe,"\u22AA","\\Vvdash",!0);V(K,Fe,qe,"\u2323","\\smallsmile");V(K,Fe,qe,"\u2322","\\smallfrown");V(K,Fe,qe,"\u224F","\\bumpeq",!0);V(K,Fe,qe,"\u224E","\\Bumpeq",!0);V(K,Fe,qe,"\u2267","\\geqq",!0);V(K,Fe,qe,"\u2A7E","\\geqslant",!0);V(K,Fe,qe,"\u2A96","\\eqslantgtr",!0);V(K,Fe,qe,"\u2273","\\gtrsim",!0);V(K,Fe,qe,"\u2A86","\\gtrapprox",!0);V(K,Fe,zt,"\u22D7","\\gtrdot");V(K,Fe,qe,"\u22D9","\\ggg",!0);V(K,Fe,qe,"\u2277","\\gtrless",!0);V(K,Fe,qe,"\u22DB","\\gtreqless",!0);V(K,Fe,qe,"\u2A8C","\\gtreqqless",!0);V(K,Fe,qe,"\u2256","\\eqcirc",!0);V(K,Fe,qe,"\u2257","\\circeq",!0);V(K,Fe,qe,"\u225C","\\triangleq",!0);V(K,Fe,qe,"\u223C","\\thicksim");V(K,Fe,qe,"\u2248","\\thickapprox");V(K,Fe,qe,"\u2AC6","\\supseteqq",!0);V(K,Fe,qe,"\u22D1","\\Supset",!0);V(K,Fe,qe,"\u2290","\\sqsupset",!0);V(K,Fe,qe,"\u227D","\\succcurlyeq",!0);V(K,Fe,qe,"\u22DF","\\curlyeqsucc",!0);V(K,Fe,qe,"\u227F","\\succsim",!0);V(K,Fe,qe,"\u2AB8","\\succapprox",!0);V(K,Fe,qe,"\u22B3","\\vartriangleright");V(K,Fe,qe,"\u22B5","\\trianglerighteq");V(K,Fe,qe,"\u22A9","\\Vdash",!0);V(K,Fe,qe,"\u2223","\\shortmid");V(K,Fe,qe,"\u2225","\\shortparallel");V(K,Fe,qe,"\u226C","\\between",!0);V(K,Fe,qe,"\u22D4","\\pitchfork",!0);V(K,Fe,qe,"\u221D","\\varpropto");V(K,Fe,qe,"\u25C0","\\blacktriangleleft");V(K,Fe,qe,"\u2234","\\therefore",!0);V(K,Fe,qe,"\u220D","\\backepsilon");V(K,Fe,qe,"\u25B6","\\blacktriangleright");V(K,Fe,qe,"\u2235","\\because",!0);V(K,Fe,qe,"\u22D8","\\llless");V(K,Fe,qe,"\u22D9","\\gggtr");V(K,Fe,zt,"\u22B2","\\lhd");V(K,Fe,zt,"\u22B3","\\rhd");V(K,Fe,qe,"\u2242","\\eqsim",!0);V(K,he,qe,"\u22C8","\\Join");V(K,Fe,qe,"\u2251","\\Doteq",!0);V(K,Fe,zt,"\u2214","\\dotplus",!0);V(K,Fe,zt,"\u2216","\\smallsetminus");V(K,Fe,zt,"\u22D2","\\Cap",!0);V(K,Fe,zt,"\u22D3","\\Cup",!0);V(K,Fe,zt,"\u2A5E","\\doublebarwedge",!0);V(K,Fe,zt,"\u229F","\\boxminus",!0);V(K,Fe,zt,"\u229E","\\boxplus",!0);V(K,Fe,zt,"\u22C7","\\divideontimes",!0);V(K,Fe,zt,"\u22C9","\\ltimes",!0);V(K,Fe,zt,"\u22CA","\\rtimes",!0);V(K,Fe,zt,"\u22CB","\\leftthreetimes",!0);V(K,Fe,zt,"\u22CC","\\rightthreetimes",!0);V(K,Fe,zt,"\u22CF","\\curlywedge",!0);V(K,Fe,zt,"\u22CE","\\curlyvee",!0);V(K,Fe,zt,"\u229D","\\circleddash",!0);V(K,Fe,zt,"\u229B","\\circledast",!0);V(K,Fe,zt,"\u22C5","\\centerdot");V(K,Fe,zt,"\u22BA","\\intercal",!0);V(K,Fe,zt,"\u22D2","\\doublecap");V(K,Fe,zt,"\u22D3","\\doublecup");V(K,Fe,zt,"\u22A0","\\boxtimes",!0);V(K,Fe,qe,"\u21E2","\\dashrightarrow",!0);V(K,Fe,qe,"\u21E0","\\dashleftarrow",!0);V(K,Fe,qe,"\u21C7","\\leftleftarrows",!0);V(K,Fe,qe,"\u21C6","\\leftrightarrows",!0);V(K,Fe,qe,"\u21DA","\\Lleftarrow",!0);V(K,Fe,qe,"\u219E","\\twoheadleftarrow",!0);V(K,Fe,qe,"\u21A2","\\leftarrowtail",!0);V(K,Fe,qe,"\u21AB","\\looparrowleft",!0);V(K,Fe,qe,"\u21CB","\\leftrightharpoons",!0);V(K,Fe,qe,"\u21B6","\\curvearrowleft",!0);V(K,Fe,qe,"\u21BA","\\circlearrowleft",!0);V(K,Fe,qe,"\u21B0","\\Lsh",!0);V(K,Fe,qe,"\u21C8","\\upuparrows",!0);V(K,Fe,qe,"\u21BF","\\upharpoonleft",!0);V(K,Fe,qe,"\u21C3","\\downharpoonleft",!0);V(K,he,qe,"\u22B6","\\origof",!0);V(K,he,qe,"\u22B7","\\imageof",!0);V(K,Fe,qe,"\u22B8","\\multimap",!0);V(K,Fe,qe,"\u21AD","\\leftrightsquigarrow",!0);V(K,Fe,qe,"\u21C9","\\rightrightarrows",!0);V(K,Fe,qe,"\u21C4","\\rightleftarrows",!0);V(K,Fe,qe,"\u21A0","\\twoheadrightarrow",!0);V(K,Fe,qe,"\u21A3","\\rightarrowtail",!0);V(K,Fe,qe,"\u21AC","\\looparrowright",!0);V(K,Fe,qe,"\u21B7","\\curvearrowright",!0);V(K,Fe,qe,"\u21BB","\\circlearrowright",!0);V(K,Fe,qe,"\u21B1","\\Rsh",!0);V(K,Fe,qe,"\u21CA","\\downdownarrows",!0);V(K,Fe,qe,"\u21BE","\\upharpoonright",!0);V(K,Fe,qe,"\u21C2","\\downharpoonright",!0);V(K,Fe,qe,"\u21DD","\\rightsquigarrow",!0);V(K,Fe,qe,"\u21DD","\\leadsto");V(K,Fe,qe,"\u21DB","\\Rrightarrow",!0);V(K,Fe,qe,"\u21BE","\\restriction");V(K,he,We,"\u2018","`");V(K,he,We,"$","\\$");V(bt,he,We,"$","\\$");V(bt,he,We,"$","\\textdollar");V(K,he,We,"%","\\%");V(bt,he,We,"%","\\%");V(K,he,We,"_","\\_");V(bt,he,We,"_","\\_");V(bt,he,We,"_","\\textunderscore");V(K,he,We,"\u2220","\\angle",!0);V(K,he,We,"\u221E","\\infty",!0);V(K,he,We,"\u2032","\\prime");V(K,he,We,"\u25B3","\\triangle");V(K,he,We,"\u0393","\\Gamma",!0);V(K,he,We,"\u0394","\\Delta",!0);V(K,he,We,"\u0398","\\Theta",!0);V(K,he,We,"\u039B","\\Lambda",!0);V(K,he,We,"\u039E","\\Xi",!0);V(K,he,We,"\u03A0","\\Pi",!0);V(K,he,We,"\u03A3","\\Sigma",!0);V(K,he,We,"\u03A5","\\Upsilon",!0);V(K,he,We,"\u03A6","\\Phi",!0);V(K,he,We,"\u03A8","\\Psi",!0);V(K,he,We,"\u03A9","\\Omega",!0);V(K,he,We,"A","\u0391");V(K,he,We,"B","\u0392");V(K,he,We,"E","\u0395");V(K,he,We,"Z","\u0396");V(K,he,We,"H","\u0397");V(K,he,We,"I","\u0399");V(K,he,We,"K","\u039A");V(K,he,We,"M","\u039C");V(K,he,We,"N","\u039D");V(K,he,We,"O","\u039F");V(K,he,We,"P","\u03A1");V(K,he,We,"T","\u03A4");V(K,he,We,"X","\u03A7");V(K,he,We,"\xAC","\\neg",!0);V(K,he,We,"\xAC","\\lnot");V(K,he,We,"\u22A4","\\top");V(K,he,We,"\u22A5","\\bot");V(K,he,We,"\u2205","\\emptyset");V(K,Fe,We,"\u2205","\\varnothing");V(K,he,sr,"\u03B1","\\alpha",!0);V(K,he,sr,"\u03B2","\\beta",!0);V(K,he,sr,"\u03B3","\\gamma",!0);V(K,he,sr,"\u03B4","\\delta",!0);V(K,he,sr,"\u03F5","\\epsilon",!0);V(K,he,sr,"\u03B6","\\zeta",!0);V(K,he,sr,"\u03B7","\\eta",!0);V(K,he,sr,"\u03B8","\\theta",!0);V(K,he,sr,"\u03B9","\\iota",!0);V(K,he,sr,"\u03BA","\\kappa",!0);V(K,he,sr,"\u03BB","\\lambda",!0);V(K,he,sr,"\u03BC","\\mu",!0);V(K,he,sr,"\u03BD","\\nu",!0);V(K,he,sr,"\u03BE","\\xi",!0);V(K,he,sr,"\u03BF","\\omicron",!0);V(K,he,sr,"\u03C0","\\pi",!0);V(K,he,sr,"\u03C1","\\rho",!0);V(K,he,sr,"\u03C3","\\sigma",!0);V(K,he,sr,"\u03C4","\\tau",!0);V(K,he,sr,"\u03C5","\\upsilon",!0);V(K,he,sr,"\u03D5","\\phi",!0);V(K,he,sr,"\u03C7","\\chi",!0);V(K,he,sr,"\u03C8","\\psi",!0);V(K,he,sr,"\u03C9","\\omega",!0);V(K,he,sr,"\u03B5","\\varepsilon",!0);V(K,he,sr,"\u03D1","\\vartheta",!0);V(K,he,sr,"\u03D6","\\varpi",!0);V(K,he,sr,"\u03F1","\\varrho",!0);V(K,he,sr,"\u03C2","\\varsigma",!0);V(K,he,sr,"\u03C6","\\varphi",!0);V(K,he,zt,"\u2217","*",!0);V(K,he,zt,"+","+");V(K,he,zt,"\u2212","-",!0);V(K,he,zt,"\u22C5","\\cdot",!0);V(K,he,zt,"\u2218","\\circ",!0);V(K,he,zt,"\xF7","\\div",!0);V(K,he,zt,"\xB1","\\pm",!0);V(K,he,zt,"\xD7","\\times",!0);V(K,he,zt,"\u2229","\\cap",!0);V(K,he,zt,"\u222A","\\cup",!0);V(K,he,zt,"\u2216","\\setminus",!0);V(K,he,zt,"\u2227","\\land");V(K,he,zt,"\u2228","\\lor");V(K,he,zt,"\u2227","\\wedge",!0);V(K,he,zt,"\u2228","\\vee",!0);V(K,he,We,"\u221A","\\surd");V(K,he,ro,"\u27E8","\\langle",!0);V(K,he,ro,"\u2223","\\lvert");V(K,he,ro,"\u2225","\\lVert");V(K,he,os,"?","?");V(K,he,os,"!","!");V(K,he,os,"\u27E9","\\rangle",!0);V(K,he,os,"\u2223","\\rvert");V(K,he,os,"\u2225","\\rVert");V(K,he,qe,"=","=");V(K,he,qe,":",":");V(K,he,qe,"\u2248","\\approx",!0);V(K,he,qe,"\u2245","\\cong",!0);V(K,he,qe,"\u2265","\\ge");V(K,he,qe,"\u2265","\\geq",!0);V(K,he,qe,"\u2190","\\gets");V(K,he,qe,">","\\gt",!0);V(K,he,qe,"\u2208","\\in",!0);V(K,he,qe,"\uE020","\\@not");V(K,he,qe,"\u2282","\\subset",!0);V(K,he,qe,"\u2283","\\supset",!0);V(K,he,qe,"\u2286","\\subseteq",!0);V(K,he,qe,"\u2287","\\supseteq",!0);V(K,Fe,qe,"\u2288","\\nsubseteq",!0);V(K,Fe,qe,"\u2289","\\nsupseteq",!0);V(K,he,qe,"\u22A8","\\models");V(K,he,qe,"\u2190","\\leftarrow",!0);V(K,he,qe,"\u2264","\\le");V(K,he,qe,"\u2264","\\leq",!0);V(K,he,qe,"<","\\lt",!0);V(K,he,qe,"\u2192","\\rightarrow",!0);V(K,he,qe,"\u2192","\\to");V(K,Fe,qe,"\u2271","\\ngeq",!0);V(K,Fe,qe,"\u2270","\\nleq",!0);V(K,he,ph,"\xA0","\\ ");V(K,he,ph,"\xA0","\\space");V(K,he,ph,"\xA0","\\nobreakspace");V(bt,he,ph,"\xA0","\\ ");V(bt,he,ph,"\xA0"," ");V(bt,he,ph,"\xA0","\\space");V(bt,he,ph,"\xA0","\\nobreakspace");V(K,he,ph,null,"\\nobreak");V(K,he,ph,null,"\\allowbreak");V(K,he,p2,",",",");V(K,he,p2,";",";");V(K,Fe,zt,"\u22BC","\\barwedge",!0);V(K,Fe,zt,"\u22BB","\\veebar",!0);V(K,he,zt,"\u2299","\\odot",!0);V(K,he,zt,"\u2295","\\oplus",!0);V(K,he,zt,"\u2297","\\otimes",!0);V(K,he,We,"\u2202","\\partial",!0);V(K,he,zt,"\u2298","\\oslash",!0);V(K,Fe,zt,"\u229A","\\circledcirc",!0);V(K,Fe,zt,"\u22A1","\\boxdot",!0);V(K,he,zt,"\u25B3","\\bigtriangleup");V(K,he,zt,"\u25BD","\\bigtriangledown");V(K,he,zt,"\u2020","\\dagger");V(K,he,zt,"\u22C4","\\diamond");V(K,he,zt,"\u22C6","\\star");V(K,he,zt,"\u25C3","\\triangleleft");V(K,he,zt,"\u25B9","\\triangleright");V(K,he,ro,"{","\\{");V(bt,he,We,"{","\\{");V(bt,he,We,"{","\\textbraceleft");V(K,he,os,"}","\\}");V(bt,he,We,"}","\\}");V(bt,he,We,"}","\\textbraceright");V(K,he,ro,"{","\\lbrace");V(K,he,os,"}","\\rbrace");V(K,he,ro,"[","\\lbrack",!0);V(bt,he,We,"[","\\lbrack",!0);V(K,he,os,"]","\\rbrack",!0);V(bt,he,We,"]","\\rbrack",!0);V(K,he,ro,"(","\\lparen",!0);V(K,he,os,")","\\rparen",!0);V(bt,he,We,"<","\\textless",!0);V(bt,he,We,">","\\textgreater",!0);V(K,he,ro,"\u230A","\\lfloor",!0);V(K,he,os,"\u230B","\\rfloor",!0);V(K,he,ro,"\u2308","\\lceil",!0);V(K,he,os,"\u2309","\\rceil",!0);V(K,he,We,"\\","\\backslash");V(K,he,We,"\u2223","|");V(K,he,We,"\u2223","\\vert");V(bt,he,We,"|","\\textbar",!0);V(K,he,We,"\u2225","\\|");V(K,he,We,"\u2225","\\Vert");V(bt,he,We,"\u2225","\\textbardbl");V(bt,he,We,"~","\\textasciitilde");V(bt,he,We,"\\","\\textbackslash");V(bt,he,We,"^","\\textasciicircum");V(K,he,qe,"\u2191","\\uparrow",!0);V(K,he,qe,"\u21D1","\\Uparrow",!0);V(K,he,qe,"\u2193","\\downarrow",!0);V(K,he,qe,"\u21D3","\\Downarrow",!0);V(K,he,qe,"\u2195","\\updownarrow",!0);V(K,he,qe,"\u21D5","\\Updownarrow",!0);V(K,he,Sn,"\u2210","\\coprod");V(K,he,Sn,"\u22C1","\\bigvee");V(K,he,Sn,"\u22C0","\\bigwedge");V(K,he,Sn,"\u2A04","\\biguplus");V(K,he,Sn,"\u22C2","\\bigcap");V(K,he,Sn,"\u22C3","\\bigcup");V(K,he,Sn,"\u222B","\\int");V(K,he,Sn,"\u222B","\\intop");V(K,he,Sn,"\u222C","\\iint");V(K,he,Sn,"\u222D","\\iiint");V(K,he,Sn,"\u220F","\\prod");V(K,he,Sn,"\u2211","\\sum");V(K,he,Sn,"\u2A02","\\bigotimes");V(K,he,Sn,"\u2A01","\\bigoplus");V(K,he,Sn,"\u2A00","\\bigodot");V(K,he,Sn,"\u222E","\\oint");V(K,he,Sn,"\u222F","\\oiint");V(K,he,Sn,"\u2230","\\oiiint");V(K,he,Sn,"\u2A06","\\bigsqcup");V(K,he,Sn,"\u222B","\\smallint");V(bt,he,f0,"\u2026","\\textellipsis");V(K,he,f0,"\u2026","\\mathellipsis");V(bt,he,f0,"\u2026","\\ldots",!0);V(K,he,f0,"\u2026","\\ldots",!0);V(K,he,f0,"\u22EF","\\@cdots",!0);V(K,he,f0,"\u22F1","\\ddots",!0);V(K,he,We,"\u22EE","\\varvdots");V(bt,he,We,"\u22EE","\\varvdots");V(K,he,ji,"\u02CA","\\acute");V(K,he,ji,"\u02CB","\\grave");V(K,he,ji,"\xA8","\\ddot");V(K,he,ji,"~","\\tilde");V(K,he,ji,"\u02C9","\\bar");V(K,he,ji,"\u02D8","\\breve");V(K,he,ji,"\u02C7","\\check");V(K,he,ji,"^","\\hat");V(K,he,ji,"\u20D7","\\vec");V(K,he,ji,"\u02D9","\\dot");V(K,he,ji,"\u02DA","\\mathring");V(K,he,sr,"\uE131","\\@imath");V(K,he,sr,"\uE237","\\@jmath");V(K,he,We,"\u0131","\u0131");V(K,he,We,"\u0237","\u0237");V(bt,he,We,"\u0131","\\i",!0);V(bt,he,We,"\u0237","\\j",!0);V(bt,he,We,"\xDF","\\ss",!0);V(bt,he,We,"\xE6","\\ae",!0);V(bt,he,We,"\u0153","\\oe",!0);V(bt,he,We,"\xF8","\\o",!0);V(bt,he,We,"\xC6","\\AE",!0);V(bt,he,We,"\u0152","\\OE",!0);V(bt,he,We,"\xD8","\\O",!0);V(bt,he,ji,"\u02CA","\\'");V(bt,he,ji,"\u02CB","\\`");V(bt,he,ji,"\u02C6","\\^");V(bt,he,ji,"\u02DC","\\~");V(bt,he,ji,"\u02C9","\\=");V(bt,he,ji,"\u02D8","\\u");V(bt,he,ji,"\u02D9","\\.");V(bt,he,ji,"\xB8","\\c");V(bt,he,ji,"\u02DA","\\r");V(bt,he,ji,"\u02C7","\\v");V(bt,he,ji,"\xA8",'\\"');V(bt,he,ji,"\u02DD","\\H");V(bt,he,ji,"\u25EF","\\textcircled");Oie={"--":!0,"---":!0,"``":!0,"''":!0};V(bt,he,We,"\u2013","--",!0);V(bt,he,We,"\u2013","\\textendash");V(bt,he,We,"\u2014","---",!0);V(bt,he,We,"\u2014","\\textemdash");V(bt,he,We,"\u2018","`",!0);V(bt,he,We,"\u2018","\\textquoteleft");V(bt,he,We,"\u2019","'",!0);V(bt,he,We,"\u2019","\\textquoteright");V(bt,he,We,"\u201C","``",!0);V(bt,he,We,"\u201C","\\textquotedblleft");V(bt,he,We,"\u201D","''",!0);V(bt,he,We,"\u201D","\\textquotedblright");V(K,he,We,"\xB0","\\degree",!0);V(bt,he,We,"\xB0","\\degree");V(bt,he,We,"\xB0","\\textdegree",!0);V(K,he,We,"\xA3","\\pounds");V(K,he,We,"\xA3","\\mathsterling",!0);V(bt,he,We,"\xA3","\\pounds");V(bt,he,We,"\xA3","\\textsterling",!0);V(K,Fe,We,"\u2720","\\maltese");V(bt,Fe,We,"\u2720","\\maltese");tie='0123456789/@."';for(q4=0;q4{var r=e.charCodeAt(0),i=e.charCodeAt(1),n=(r-55296)*1024+(i-56320)+65536,a=t==="math"?0:1;if(119808<=n&&n<120484){var s=Math.floor((n-119808)/26);return[U4[s][2],U4[s][a]]}else if(120782<=n&&n<=120831){var l=Math.floor((n-120782)/10);return[iie[l][2],iie[l][a]]}else{if(n===120485||n===120486)return[U4[0][2],U4[0][a]];if(1204860)return as(n,h,i,t,a.concat(u));if(l){var d,p;if(l==="boldsymbol"){var f=kIe(n,i,t,a,r);d=f.fontName,p=[f.fontClass]}else s?(d=K8[l].fontName,p=[l]):(d=V4(l,t.fontWeight,t.fontShape),p=[l,t.fontWeight,t.fontShape]);if(ok(n,d,i).metrics)return as(n,d,i,t,a.concat(p));if(Oie.hasOwnProperty(n)&&d.slice(0,10)==="Typewriter"){for(var g=[],m=0;m{if(Iu(e.classes)!==Iu(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 i of Object.keys(e.style))if(e.style[i]!==t.style[i])return!1;for(var n of Object.keys(t.style))if(e.style[n]!==t.style[n])return!1;return!0},"canCombine"),Bie=o(e=>{for(var t=0;tt&&(t=a.height),a.depth>r&&(r=a.depth),a.maxFontSize>i&&(i=a.maxFontSize)}e.height=t,e.depth=r,e.maxFontSize=i},"sizeElementFromChildren"),wt=o(function(e,t,r,i){var n=new p0(e,t,r,i);return pR(n),n},"makeSpan"),Mu=o((e,t,r,i)=>new p0(e,t,r,i),"makeSvgSpan"),h0=o(function(e,t,r){var i=wt([e],[],t);return i.height=Math.max(r||t.fontMetrics().defaultRuleThickness,t.minRuleThickness),i.style.borderBottomWidth=Lt(i.height),i.maxFontSize=1,i},"makeLineSpan"),wIe=o(function(e,t,r,i){var n=new ak(e,t,r,i);return pR(n),n},"makeAnchor"),fh=o(function(e){var t=new d0(e);return pR(t),t},"makeFragment"),u0=o(function(e,t){return e instanceof d0?wt([],[e],t):e},"wrapFragment"),EIe=o(function(e){if(e.positionType==="individualShift"){for(var t=e.children,r=[t[0]],i=-t[0].shift-t[0].elem.depth,n=i,a=1;a{var r=wt(["mspace"],[],t),i=Ki(e,t);return r.style.marginRight=Lt(i),r},"makeGlue"),V4=o(function(e,t,r){var i="";switch(e){case"amsrm":i="AMS";break;case"textrm":i="Main";break;case"textsf":i="SansSerif";break;case"texttt":i="Typewriter";break;default:i=e}var n;return t==="textbf"&&r==="textit"?n="BoldItalic":t==="textbf"?n="Bold":t==="textit"?n="Italic":n="Regular",i+"-"+n},"retrieveTextFontName"),K8={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"}},Fie={vec:["vec",.471,.714],oiintSize1:["oiintSize1",.957,.499],oiintSize2:["oiintSize2",1.472,.659],oiiintSize1:["oiiintSize1",1.304,.499],oiiintSize2:["oiiintSize2",1.98,.659]},zie=o(function(e,t){var[r,i,n]=Fie[e],a=new Du(r),s=new uh([a],{width:Lt(i),height:Lt(n),style:"width:"+Lt(i),viewBox:"0 0 "+1e3*i+" "+1e3*n,preserveAspectRatio:"xMinYMin"}),l=Mu(["overlay"],[s],t);return l.height=n,l.style.height=Lt(n),l.style.width=Lt(i),l},"staticSvg"),Xi={number:3,unit:"mu"},kp={number:4,unit:"mu"},ch={number:5,unit:"mu"},SIe={mord:{mop:Xi,mbin:kp,mrel:ch,minner:Xi},mop:{mord:Xi,mop:Xi,mrel:ch,minner:Xi},mbin:{mord:kp,mop:kp,mopen:kp,minner:kp},mrel:{mord:ch,mop:ch,mopen:ch,minner:ch},mopen:{},mclose:{mop:Xi,mbin:kp,mrel:ch,minner:Xi},mpunct:{mord:Xi,mop:Xi,mrel:ch,mopen:Xi,mclose:Xi,mpunct:Xi,minner:Xi},minner:{mord:Xi,mop:Xi,mbin:kp,mrel:ch,mopen:Xi,mpunct:Xi,minner:Xi}},_Ie={mord:{mop:Xi},mop:{mord:Xi,mop:Xi},mbin:{},mrel:{},mopen:{},mclose:{mop:Xi},mpunct:{},minner:{mop:Xi}},qie={},tk={},rk={};o(Nt,"defineFunction");o(Ou,"defineFunctionBuilders");ik=o(function(e){return e.type==="ordgroup"&&e.body.length===1?e.body[0]:e},"normalizeArgument"),wn=o(function(e){return e.type==="ordgroup"?e.body:[e]},"ordargument"),AIe=new Set(["leftmost","mbin","mopen","mrel","mop","mpunct"]),RIe=new Set(["rightmost","mrel","mclose","mpunct"]),LIe={display:Lr.DISPLAY,text:Lr.TEXT,script:Lr.SCRIPT,scriptscript:Lr.SCRIPTSCRIPT},$Ie={mord:"mord",mop:"mop",mbin:"mbin",mrel:"mrel",mopen:"mopen",mclose:"mclose",mpunct:"mpunct",minner:"minner"},On=o(function(e,t,r,i){i===void 0&&(i=[null,null]);for(var n=[],a=0;a{var y=m.classes[0],b=g.classes[0];y==="mbin"&&RIe.has(b)?m.classes[0]="mord":b==="mbin"&&AIe.has(y)&&(g.classes[0]="mord")},{node:d},p,f),Z8(n,(g,m)=>{var y,b,v=J8(m),T=J8(g),x=v&&T?g.hasClass("mtight")?(y=_Ie[v])==null?void 0:y[T]:(b=SIe[v])==null?void 0:b[T]:null;if(x)return Pie(x,h)},{node:d},p,f),n},"buildExpression"),Z8=o(function(e,t,r,i,n){i&&e.push(i);for(var a=0;ap=>{e.splice(d+1,0,p),a++})(a)}i&&e.pop()},"traverseNonSpaceNodes"),jie=o(function(e){return e instanceof d0||e instanceof ak||e instanceof p0&&e.hasClass("enclosing")?e:null},"checkPartialGroup"),Q8=o(function(e,t){var r=jie(e);if(r){var i=r.children;if(i.length){if(t==="right")return Q8(i[i.length-1],"right");if(t==="left")return Q8(i[0],"left")}}return e},"getOutermostNode"),J8=o(function(e,t){if(!e)return null;t&&(e=Q8(e,t));var r=e.classes[0];return $Ie[r]||null},"getTypeOfDomTree"),d2=o(function(e,t){var r=["nulldelimiter"].concat(e.baseSizingClasses());return wt(t.concat(r))},"makeNullDelimiter"),di=o(function(e,t,r){if(!e)return wt();if(tk[e.type]){var i=tk[e.type](e,t);if(r&&t.size!==r.size){i=wt(t.sizingClasses(r),[i],t);var n=t.sizeMultiplier/r.sizeMultiplier;i.height*=n,i.depth*=n}return i}else throw new St("Got group of unknown type: '"+e.type+"'")},"buildGroup");o(l2,"buildHTMLUnbreakable");o(nk,"buildHTML");o(fR,"newDocumentFragment");Et=class{static{o(this,"MathNode")}constructor(e,t,r){this.type=e,this.attributes={},this.children=t||[],this.classes=r||[]}setAttribute(e,t){this.attributes[e]=t}getAttribute(e){return this.attributes[e]}toNode(){var e=document.createElementNS("http://www.w3.org/1998/Math/MathML",this.type);for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&e.setAttribute(t,this.attributes[t]);this.classes.length>0&&(e.className=Iu(this.classes));for(var r=0;r0&&(e+=' class ="'+ja(Iu(this.classes))+'"'),e+=">";for(var r=0;r",e}toText(){return this.children.map(e=>e.toText()).join("")}},En=class{static{o(this,"TextNode")}constructor(e){this.text=e}toNode(){return document.createTextNode(this.text)}toMarkup(){return ja(this.toText())}toText(){return this.text}},Gie=class{static{o(this,"SpaceNode")}constructor(e){this.width=e,e>=.05555&&e<=.05556?this.character="\u200A":e>=.1666&&e<=.1667?this.character="\u2009":e>=.2222&&e<=.2223?this.character="\u2005":e>=.2777&&e<=.2778?this.character="\u2005\u200A":e>=-.05556&&e<=-.05555?this.character="\u200A\u2063":e>=-.1667&&e<=-.1666?this.character="\u2009\u2063":e>=-.2223&&e<=-.2222?this.character="\u205F\u2063":e>=-.2778&&e<=-.2777?this.character="\u2005\u2063":this.character=null}toNode(){if(this.character)return document.createTextNode(this.character);var e=document.createElementNS("http://www.w3.org/1998/Math/MathML","mspace");return e.setAttribute("width",Lt(this.width)),e}toMarkup(){return this.character?""+this.character+"":''}toText(){return this.character?this.character:" "}},IIe=new Set(["\\imath","\\jmath"]),DIe=new Set(["mrow","mtable"]),Io=o(function(e,t,r){return qi[t][e]&&qi[t][e].replace&&e.charCodeAt(0)!==55349&&!(Oie.hasOwnProperty(e)&&r&&(r.fontFamily&&r.fontFamily.slice(4,6)==="tt"||r.font&&r.font.slice(4,6)==="tt"))&&(e=qi[t][e].replace),new En(e)},"makeText"),gR=o(function(e){return e.length===1?e[0]:new Et("mrow",e)},"makeRow"),mR=o(function(e,t){if(t.fontFamily==="texttt")return"monospace";if(t.fontFamily==="textsf")return t.fontShape==="textit"&&t.fontWeight==="textbf"?"sans-serif-bold-italic":t.fontShape==="textit"?"sans-serif-italic":t.fontWeight==="textbf"?"bold-sans-serif":"sans-serif";if(t.fontShape==="textit"&&t.fontWeight==="textbf")return"bold-italic";if(t.fontShape==="textit")return"italic";if(t.fontWeight==="textbf")return"bold";var r=t.font;if(!r||r==="mathnormal")return null;var i=e.mode;if(r==="mathit")return"italic";if(r==="boldsymbol")return e.type==="textord"?"bold":"bold-italic";if(r==="mathbf")return"bold";if(r==="mathbb")return"double-struck";if(r==="mathsfit")return"sans-serif-italic";if(r==="mathfrak")return"fraktur";if(r==="mathscr"||r==="mathcal")return"script";if(r==="mathsf")return"sans-serif";if(r==="mathtt")return"monospace";var n=e.text;if(IIe.has(n))return null;if(qi[i][n]){var a=qi[i][n].replace;a&&(n=a)}var s=K8[r].fontName;return sk(n,s,i)?K8[r].variant:null},"getVariant");o(Z4,"isNumberPunctuation");io=o(function(e,t,r){if(e.length===1){var i=Si(e[0],t);return r&&i instanceof Et&&i.type==="mo"&&(i.setAttribute("lspace","0em"),i.setAttribute("rspace","0em")),[i]}for(var n=[],a,s=0;s=1&&(a.type==="mn"||Z4(a))){var h=l.children[0];h instanceof Et&&h.type==="mn"&&(h.children=[...a.children,...h.children],n.pop())}else if(a.type==="mi"&&a.children.length===1){var u=a.children[0];if(u instanceof En&&u.text==="\u0338"&&(l.type==="mo"||l.type==="mi"||l.type==="mn")){var d=l.children[0];d instanceof En&&d.text.length>0&&(d.text=d.text.slice(0,1)+"\u0338"+d.text.slice(1),n.pop())}}}n.push(l),a=l}return n},"buildExpression"),Nu=o(function(e,t,r){return gR(io(e,t,r))},"buildExpressionRow"),Si=o(function(e,t){if(!e)return new Et("mrow");if(rk[e.type]){var r=rk[e.type](e,t);return r}else throw new St("Got group of unknown type: '"+e.type+"'")},"buildGroup");o(eR,"buildMathML");MIe=[[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]],nie=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],aie=o(function(e,t){return t.size<2?e:MIe[e-1][t.size-1]},"sizeAtStyle"),Wie=class Cp{static{o(this,"Options")}constructor(t){this.style=t.style,this.color=t.color,this.size=t.size||Cp.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=nie[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 Cp(r)}havingStyle(t){return this.style===t?this:this.extend({style:t,size:aie(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:nie[t-1]})}havingBaseStyle(t){t=t||this.style.text();var r=aie(Cp.BASESIZE,t);return this.size===r&&this.textSize===Cp.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!==Cp.BASESIZE?["sizing","reset-size"+this.size,"size"+Cp.BASESIZE]:[]}fontMetrics(){return this._fontMetrics||(this._fontMetrics=Nie(this.size)),this._fontMetrics}getColor(){return this.phantom?"transparent":this.color}};Wie.BASESIZE=6;Uie=o(function(e){return new Wie({style:e.displayMode?Lr.DISPLAY:Lr.TEXT,maxSize:e.maxSize,minRuleThickness:e.minRuleThickness})},"optionsFromSettings"),Vie=o(function(e,t){if(t.displayMode){var r=["katex-display"];t.leqno&&r.push("leqno"),t.fleqn&&r.push("fleqn"),e=wt(r,[e])}return e},"displayWrap"),NIe=o(function(e,t,r){var i=Uie(r),n;if(r.output==="mathml")return eR(e,t,i,r.displayMode,!0);if(r.output==="html"){var a=nk(e,i);n=wt(["katex"],[a])}else{var s=eR(e,t,i,r.displayMode,!1),l=nk(e,i);n=wt(["katex"],[s,l])}return Vie(n,r)},"buildTree"),OIe=o(function(e,t,r){var i=Uie(r),n=nk(e,i),a=wt(["katex"],[n]);return Vie(a,r)},"buildHTMLTree"),BIe={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":"="},ck=o(function(e){var t=new Et("mo",[new En(BIe[e.replace(/^\\/,"")])]);return t.setAttribute("stretchy","true"),t},"stretchyMathML"),PIe={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]},FIe=new Set(["widehat","widecheck","widetilde","utilde"]),hk=o(function(e,t){function r(){var s=4e5,l=e.label.slice(1);if(FIe.has(l)){var h=e,u=h.base.type==="ordgroup"?h.base.body.length:1,d,p,f;if(u>5)l==="widehat"||l==="widecheck"?(d=420,s=2364,f=.42,p=l+"4"):(d=312,s=2340,f=.34,p="tilde4");else{var g=[1,1,2,2,3,3][u];l==="widehat"||l==="widecheck"?(s=[0,1062,2364,2364,2364][g],d=[0,239,300,360,420][g],f=[0,.24,.3,.3,.36,.42][g],p=l+g):(s=[0,600,1033,2339,2340][g],d=[0,260,286,306,312][g],f=[0,.26,.286,.3,.306,.34][g],p="tilde"+g)}var m=new Du(p),y=new uh([m],{width:"100%",height:Lt(f),viewBox:"0 0 "+s+" "+d,preserveAspectRatio:"none"});return{span:Mu([],[y],t),minWidth:0,height:f}}else{var b=[],v=PIe[l],[T,x,k]=v,C=k/1e3,E=T.length,w,_;if(E===1){var L=v[3];w=["hide-tail"],_=[L]}else if(E===2)w=["halfarrow-left","halfarrow-right"],_=["xMinYMin","xMaxYMin"];else if(E===3)w=["brace-left","brace-center","brace-right"],_=["xMinYMin","xMidYMin","xMaxYMin"];else throw new Error(`Correct katexImagesData or update code here to support + `+E+" children.");for(var N=0;N0&&(i.style.minWidth=Lt(n)),i},"stretchySvg"),zIe=o(function(e,t,r,i,n){var a,s=e.height+e.depth+r+i;if(/fbox|color|angl/.test(t)){if(a=wt(["stretchy",t],[],n),t==="fbox"){var l=n.color&&n.getColor();l&&(a.style.borderColor=l)}}else{var h=[];/^[bx]cancel$/.test(t)&&h.push(new H8({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(t)&&h.push(new H8({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"}));var u=new uh(h,{width:"100%",height:Lt(s)});a=Mu([],[u],n)}return a.height=s,a.style.height=Lt(s),a},"stretchyEnclose");o(Dr,"assertNodeType");o(f2,"assertSymbolNodeType");o(g2,"checkSymbolNodeType");Yie=o(e=>{if(e instanceof to)return e;if(vIe(e)&&e.children.length===1)return Yie(e.children[0])},"getBaseSymbol"),yR=o((e,t)=>{var r,i,n;e&&e.type==="supsub"?(i=Dr(e.base,"accent"),r=i.base,e.base=r,n=Mie(di(e,t)),e.base=i):(i=Dr(e,"accent"),r=i.base);var a=di(r,t.havingCrampedStyle()),s=i.isShifty&&dh(r),l=0;if(s){var h,u;l=(h=(u=Yie(a))==null?void 0:u.skew)!=null?h:0}var d=i.label==="\\c",p=d?a.height+a.depth:Math.min(a.height,t.fontMetrics().xHeight),f;if(i.isStretchy)f=hk(i,t),f=ui({positionType:"firstBaseline",children:[{type:"elem",elem:a},{type:"elem",elem:f,wrapperClasses:["svg-align"],wrapperStyle:l>0?{width:"calc(100% - "+Lt(2*l)+")",marginLeft:Lt(2*l)}:void 0}]});else{var g,m;i.label==="\\vec"?(g=zie("vec",t),m=Fie.vec[1]):(g=lk({type:"textord",mode:i.mode,text:i.label},t,"textord"),g=Die(g),g.italic=0,m=g.width,d&&(p+=g.depth)),f=wt(["accent-body"],[g]);var y=i.label==="\\textcircled";y&&(f.classes.push("accent-full"),p=a.height);var b=l;y||(b-=m/2),f.style.left=Lt(b),i.label==="\\textcircled"&&(f.style.top=".2em"),f=ui({positionType:"firstBaseline",children:[{type:"elem",elem:a},{type:"kern",size:-p},{type:"elem",elem:f}]})}var v=wt(["mord","accent"],[f],t);return n?(n.children[0]=v,n.height=Math.max(v.height,n.height),n.classes[0]="mord",n):v},"htmlBuilder$a"),Hie=o((e,t)=>{var r=e.isStretchy?ck(e.label):new Et("mo",[Io(e.label,e.mode)]),i=new Et("mover",[Si(e.base,t),r]);return i.setAttribute("accent","true"),i},"mathmlBuilder$9"),qIe=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map(e=>"\\"+e).join("|"));Nt({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:o((e,t)=>{var r=ik(t[0]),i=!qIe.test(e.funcName),n=!i||e.funcName==="\\widehat"||e.funcName==="\\widetilde"||e.funcName==="\\widecheck";return{type:"accent",mode:e.parser.mode,label:e.funcName,isStretchy:i,isShifty:n,base:r}},"handler"),htmlBuilder:yR,mathmlBuilder:Hie});Nt({type:"accent",names:["\\'","\\`","\\^","\\~","\\=","\\u","\\.",'\\"',"\\c","\\r","\\H","\\v","\\textcircled"],props:{numArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["primitive"]},handler:o((e,t)=>{var r=t[0],i=e.parser.mode;return i==="math"&&(e.parser.settings.reportNonstrict("mathVsTextAccents","LaTeX's accent "+e.funcName+" works only in text mode"),i="text"),{type:"accent",mode:i,label:e.funcName,isStretchy:!1,isShifty:!0,base:r}},"handler"),htmlBuilder:yR,mathmlBuilder:Hie});Nt({type:"accentUnder",names:["\\underleftarrow","\\underrightarrow","\\underleftrightarrow","\\undergroup","\\underlinesegment","\\utilde"],props:{numArgs:1},handler:o((e,t)=>{var{parser:r,funcName:i}=e,n=t[0];return{type:"accentUnder",mode:r.mode,label:i,base:n}},"handler"),htmlBuilder:o((e,t)=>{var r=di(e.base,t),i=hk(e,t),n=e.label==="\\utilde"?.12:0,a=ui({positionType:"top",positionData:r.height,children:[{type:"elem",elem:i,wrapperClasses:["svg-align"]},{type:"kern",size:n},{type:"elem",elem:r}]});return wt(["mord","accentunder"],[a],t)},"htmlBuilder"),mathmlBuilder:o((e,t)=>{var r=ck(e.label),i=new Et("munder",[Si(e.base,t),r]);return i.setAttribute("accentunder","true"),i},"mathmlBuilder")});Y4=o(e=>{var t=new Et("mpadded",e?[e]:[]);return t.setAttribute("width","+0.6em"),t.setAttribute("lspace","0.3em"),t},"paddedNode");Nt({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:i,funcName:n}=e;return{type:"xArrow",mode:i.mode,label:n,body:t[0],below:r[0]}},htmlBuilder(e,t){var r=t.style,i=t.havingStyle(r.sup()),n=u0(di(e.body,i,t),t),a=e.label.slice(0,2)==="\\x"?"x":"cd";n.classes.push(a+"-arrow-pad");var s;e.below&&(i=t.havingStyle(r.sub()),s=u0(di(e.below,i,t),t),s.classes.push(a+"-arrow-pad"));var l=hk(e,t),h=-t.fontMetrics().axisHeight+.5*l.height,u=-t.fontMetrics().axisHeight-.5*l.height-.111;(n.depth>.25||e.label==="\\xleftequilibrium")&&(u-=n.depth);var d;if(s){var p=-t.fontMetrics().axisHeight+s.height+.5*l.height+.111;d=ui({positionType:"individualShift",children:[{type:"elem",elem:n,shift:u},{type:"elem",elem:l,shift:h},{type:"elem",elem:s,shift:p}]})}else d=ui({positionType:"individualShift",children:[{type:"elem",elem:n,shift:u},{type:"elem",elem:l,shift:h}]});return d.children[0].children[0].children[1].classes.push("svg-align"),wt(["mrel","x-arrow"],[d],t)},mathmlBuilder(e,t){var r=ck(e.label);r.setAttribute("minsize",e.label.charAt(0)==="x"?"1.75em":"3.0em");var i;if(e.body){var n=Y4(Si(e.body,t));if(e.below){var a=Y4(Si(e.below,t));i=new Et("munderover",[r,a,n])}else i=new Et("mover",[r,n])}else if(e.below){var s=Y4(Si(e.below,t));i=new Et("munder",[r,s])}else i=Y4(),i=new Et("mover",[r,i]);return i}});o(vR,"htmlBuilder$9");o(bR,"mathmlBuilder$8");Nt({type:"mclass",names:["\\mathord","\\mathbin","\\mathrel","\\mathopen","\\mathclose","\\mathpunct","\\mathinner"],props:{numArgs:1,primitive:!0},handler(e,t){var{parser:r,funcName:i}=e,n=t[0];return{type:"mclass",mode:r.mode,mclass:"m"+i.slice(5),body:wn(n),isCharacterBox:dh(n)}},htmlBuilder:vR,mathmlBuilder:bR});uk=o(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");Nt({type:"mclass",names:["\\@binrel"],props:{numArgs:2},handler(e,t){var{parser:r}=e;return{type:"mclass",mode:r.mode,mclass:uk(t[0]),body:wn(t[1]),isCharacterBox:dh(t[1])}}});Nt({type:"mclass",names:["\\stackrel","\\overset","\\underset"],props:{numArgs:2},handler(e,t){var{parser:r,funcName:i}=e,n=t[1],a=t[0],s;i!=="\\stackrel"?s=uk(n):s="mrel";var l={type:"op",mode:n.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:i!=="\\stackrel",body:wn(n)},h={type:"supsub",mode:a.mode,base:l,sup:i==="\\underset"?null:a,sub:i==="\\underset"?a:null};return{type:"mclass",mode:r.mode,mclass:s,body:[h],isCharacterBox:dh(h)}},htmlBuilder:vR,mathmlBuilder:bR});Nt({type:"pmb",names:["\\pmb"],props:{numArgs:1,allowedInText:!0},handler(e,t){var{parser:r}=e;return{type:"pmb",mode:r.mode,mclass:uk(t[0]),body:wn(t[0])}},htmlBuilder(e,t){var r=On(e.body,t,!0),i=wt([e.mclass],r,t);return i.style.textShadow="0.02em 0.01em 0.04px",i},mathmlBuilder(e,t){var r=io(e.body,t),i=new Et("mstyle",r);return i.setAttribute("style","text-shadow: 0.02em 0.01em 0.04px"),i}});jIe={">":"\\\\cdrightarrow","<":"\\\\cdleftarrow","=":"\\\\cdlongequal",A:"\\uparrow",V:"\\downarrow","|":"\\Vert",".":"no arrow"},sie=o(()=>({type:"styling",body:[],mode:"math",style:"display"}),"newCell"),oie=o(e=>e.type==="textord"&&e.text==="@","isStartOfArrow"),GIe=o((e,t)=>(e.type==="mathord"||e.type==="atom")&&e.text===t,"isLabelEnd");o(Xie,"cdArrow");o(Kie,"parseCD");Nt({type:"cdlabel",names:["\\\\cdleft","\\\\cdright"],props:{numArgs:1},handler(e,t){var{parser:r,funcName:i}=e;return{type:"cdlabel",mode:r.mode,side:i.slice(4),label:t[0]}},htmlBuilder(e,t){var r=t.havingStyle(t.style.sup()),i=u0(di(e.label,r,t),t);return i.classes.push("cd-label-"+e.side),i.style.bottom=Lt(.8-i.depth),i.height=0,i.depth=0,i},mathmlBuilder(e,t){var r=new Et("mrow",[Si(e.label,t)]);return r=new Et("mpadded",[r]),r.setAttribute("width","0"),e.side==="left"&&r.setAttribute("lspace","-1width"),r.setAttribute("voffset","0.7em"),r=new Et("mstyle",[r]),r.setAttribute("displaystyle","false"),r.setAttribute("scriptlevel","1"),r}});Nt({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=u0(di(e.fragment,t),t);return r.classes.push("cd-vert-arrow"),r},mathmlBuilder(e,t){return new Et("mrow",[Si(e.fragment,t)])}});Nt({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler(e,t){for(var{parser:r}=e,i=Dr(t[0],"ordgroup"),n=i.body,a="",s=0;s=1114111)throw new St("\\@char with invalid code point "+a);return h<=65535?u=String.fromCharCode(h):(h-=65536,u=String.fromCharCode((h>>10)+55296,(h&1023)+56320)),{type:"textord",mode:r.mode,text:u}}});Zie=o((e,t)=>{var r=On(e.body,t.withColor(e.color),!1);return fh(r)},"htmlBuilder$8"),Qie=o((e,t)=>{var r=io(e.body,t.withColor(e.color)),i=new Et("mstyle",r);return i.setAttribute("mathcolor",e.color),i},"mathmlBuilder$7");Nt({type:"color",names:["\\textcolor"],props:{numArgs:2,allowedInText:!0,argTypes:["color","original"]},handler(e,t){var{parser:r}=e,i=Dr(t[0],"color-token").color,n=t[1];return{type:"color",mode:r.mode,color:i,body:wn(n)}},htmlBuilder:Zie,mathmlBuilder:Qie});Nt({type:"color",names:["\\color"],props:{numArgs:1,allowedInText:!0,argTypes:["color"]},handler(e,t){var{parser:r,breakOnTokenText:i}=e,n=Dr(t[0],"color-token").color;r.gullet.macros.set("\\current@color",n);var a=r.parseExpression(!0,i);return{type:"color",mode:r.mode,color:n,body:a}},htmlBuilder:Zie,mathmlBuilder:Qie});Nt({type:"cr",names:["\\\\"],props:{numArgs:0,numOptionalArgs:0,allowedInText:!0},handler(e,t,r){var{parser:i}=e,n=i.gullet.future().text==="["?i.parseSizeGroup(!0):null,a=!i.settings.displayMode||!i.settings.useStrictBehavior("newLineInDisplayMode","In LaTeX, \\\\ or \\newline does nothing in display mode");return{type:"cr",mode:i.mode,newLine:a,size:n&&Dr(n,"size").value}},htmlBuilder(e,t){var r=wt(["mspace"],[],t);return e.newLine&&(r.classes.push("newline"),e.size&&(r.style.marginTop=Lt(Ki(e.size,t)))),r},mathmlBuilder(e,t){var r=new Et("mspace");return e.newLine&&(r.setAttribute("linebreak","newline"),e.size&&r.setAttribute("height",Lt(Ki(e.size,t)))),r}});tR={"\\global":"\\global","\\long":"\\\\globallong","\\\\globallong":"\\\\globallong","\\def":"\\gdef","\\gdef":"\\gdef","\\edef":"\\xdef","\\xdef":"\\xdef","\\let":"\\\\globallet","\\futurelet":"\\\\globalfuture"},Jie=o(e=>{var t=e.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(t))throw new St("Expected a control sequence",e);return t},"checkControlSequence"),WIe=o(e=>{var t=e.gullet.popToken();return t.text==="="&&(t=e.gullet.popToken(),t.text===" "&&(t=e.gullet.popToken())),t},"getRHS"),ene=o((e,t,r,i)=>{var n=e.gullet.macros.get(r.text);n==null&&(r.noexpand=!0,n={tokens:[r],numArgs:0,unexpandable:!e.gullet.isExpandable(r.text)}),e.gullet.macros.set(t,n,i)},"letCommand");Nt({type:"internal",names:["\\global","\\long","\\\\globallong"],props:{numArgs:0,allowedInText:!0},handler(e){var{parser:t,funcName:r}=e;t.consumeSpaces();var i=t.fetch();if(tR[i.text])return(r==="\\global"||r==="\\\\globallong")&&(i.text=tR[i.text]),Dr(t.parseFunction(),"internal");throw new St("Invalid token after macro prefix",i)}});Nt({type:"internal",names:["\\def","\\gdef","\\edef","\\xdef"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:r}=e,i=t.gullet.popToken(),n=i.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(n))throw new St("Expected a control sequence",i);for(var a=0,s,l=[[]];t.gullet.future().text!=="{";)if(i=t.gullet.popToken(),i.text==="#"){if(t.gullet.future().text==="{"){s=t.gullet.future(),l[a].push("{");break}if(i=t.gullet.popToken(),!/^[1-9]$/.test(i.text))throw new St('Invalid argument number "'+i.text+'"');if(parseInt(i.text)!==a+1)throw new St('Argument number "'+i.text+'" out of order');a++,l.push([])}else{if(i.text==="EOF")throw new St("Expected a macro definition");l[a].push(i.text)}var{tokens:h}=t.gullet.consumeArg();return s&&h.unshift(s),(r==="\\edef"||r==="\\xdef")&&(h=t.gullet.expandTokens(h),h.reverse()),t.gullet.macros.set(n,{tokens:h,numArgs:a,delimiters:l},r===tR[r]),{type:"internal",mode:t.mode}}});Nt({type:"internal",names:["\\let","\\\\globallet"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:r}=e,i=Jie(t.gullet.popToken());t.gullet.consumeSpaces();var n=WIe(t);return ene(t,i,n,r==="\\\\globallet"),{type:"internal",mode:t.mode}}});Nt({type:"internal",names:["\\futurelet","\\\\globalfuture"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:r}=e,i=Jie(t.gullet.popToken()),n=t.gullet.popToken(),a=t.gullet.popToken();return ene(t,i,a,r==="\\\\globalfuture"),t.gullet.pushToken(a),t.gullet.pushToken(n),{type:"internal",mode:t.mode}}});c2=o(function(e,t,r){var i=qi.math[e]&&qi.math[e].replace,n=sk(i||e,t,r);if(!n)throw new Error("Unsupported symbol "+e+" and font size "+t+".");return n},"getMetrics"),xR=o(function(e,t,r,i){var n=r.havingBaseStyle(t),a=wt(i.concat(n.sizingClasses(r)),[e],r),s=n.sizeMultiplier/r.sizeMultiplier;return a.height*=s,a.depth*=s,a.maxFontSize=n.sizeMultiplier,a},"styleWrap"),tne=o(function(e,t,r){var i=t.havingBaseStyle(r),n=(1-t.sizeMultiplier/i.sizeMultiplier)*t.fontMetrics().axisHeight;e.classes.push("delimcenter"),e.style.top=Lt(n),e.height-=n,e.depth+=n},"centerSpan"),UIe=o(function(e,t,r,i,n,a){var s=as(e,"Main-Regular",n,i),l=xR(s,t,i,a);return r&&tne(l,i,t),l},"makeSmallDelim"),VIe=o(function(e,t,r,i){return as(e,"Size"+t+"-Regular",r,i)},"mathrmSize"),rne=o(function(e,t,r,i,n,a){var s=VIe(e,t,n,i),l=xR(wt(["delimsizing","size"+t],[s],i),Lr.TEXT,i,a);return r&&tne(l,i,Lr.TEXT),l},"makeLargeDelim"),N8=o(function(e,t,r){var i;t==="Size1-Regular"?i="delim-size1":i="delim-size4";var n=wt(["delimsizinginner",i],[wt([],[as(e,t,r)])]);return{type:"elem",elem:n}},"makeGlyphSpan"),O8=o(function(e,t,r){var i=ic["Size4-Regular"][e.charCodeAt(0)]?ic["Size4-Regular"][e.charCodeAt(0)][4]:ic["Size1-Regular"][e.charCodeAt(0)][4],n=new Du("inner",dIe(e,Math.round(1e3*t))),a=new uh([n],{width:Lt(i),height:Lt(t),style:"width:"+Lt(i),viewBox:"0 0 "+1e3*i+" "+Math.round(1e3*t),preserveAspectRatio:"xMinYMin"}),s=Mu([],[a],r);return s.height=t,s.style.height=Lt(t),s.style.width=Lt(i),{type:"elem",elem:s}},"makeInner"),rR=.008,H4={type:"kern",size:-1*rR},YIe=new Set(["|","\\lvert","\\rvert","\\vert"]),HIe=new Set(["\\|","\\lVert","\\rVert","\\Vert"]),ine=o(function(e,t,r,i,n,a){var s,l,h,u,d="",p=0;s=h=u=e,l=null;var f="Size1-Regular";e==="\\uparrow"?h=u="\u23D0":e==="\\Uparrow"?h=u="\u2016":e==="\\downarrow"?s=h="\u23D0":e==="\\Downarrow"?s=h="\u2016":e==="\\updownarrow"?(s="\\uparrow",h="\u23D0",u="\\downarrow"):e==="\\Updownarrow"?(s="\\Uparrow",h="\u2016",u="\\Downarrow"):YIe.has(e)?(h="\u2223",d="vert",p=333):HIe.has(e)?(h="\u2225",d="doublevert",p=556):e==="["||e==="\\lbrack"?(s="\u23A1",h="\u23A2",u="\u23A3",f="Size4-Regular",d="lbrack",p=667):e==="]"||e==="\\rbrack"?(s="\u23A4",h="\u23A5",u="\u23A6",f="Size4-Regular",d="rbrack",p=667):e==="\\lfloor"||e==="\u230A"?(h=s="\u23A2",u="\u23A3",f="Size4-Regular",d="lfloor",p=667):e==="\\lceil"||e==="\u2308"?(s="\u23A1",h=u="\u23A2",f="Size4-Regular",d="lceil",p=667):e==="\\rfloor"||e==="\u230B"?(h=s="\u23A5",u="\u23A6",f="Size4-Regular",d="rfloor",p=667):e==="\\rceil"||e==="\u2309"?(s="\u23A4",h=u="\u23A5",f="Size4-Regular",d="rceil",p=667):e==="("||e==="\\lparen"?(s="\u239B",h="\u239C",u="\u239D",f="Size4-Regular",d="lparen",p=875):e===")"||e==="\\rparen"?(s="\u239E",h="\u239F",u="\u23A0",f="Size4-Regular",d="rparen",p=875):e==="\\{"||e==="\\lbrace"?(s="\u23A7",l="\u23A8",u="\u23A9",h="\u23AA",f="Size4-Regular"):e==="\\}"||e==="\\rbrace"?(s="\u23AB",l="\u23AC",u="\u23AD",h="\u23AA",f="Size4-Regular"):e==="\\lgroup"||e==="\u27EE"?(s="\u23A7",u="\u23A9",h="\u23AA",f="Size4-Regular"):e==="\\rgroup"||e==="\u27EF"?(s="\u23AB",u="\u23AD",h="\u23AA",f="Size4-Regular"):e==="\\lmoustache"||e==="\u23B0"?(s="\u23A7",u="\u23AD",h="\u23AA",f="Size4-Regular"):(e==="\\rmoustache"||e==="\u23B1")&&(s="\u23AB",u="\u23A9",h="\u23AA",f="Size4-Regular");var g=c2(s,f,n),m=g.height+g.depth,y=c2(h,f,n),b=y.height+y.depth,v=c2(u,f,n),T=v.height+v.depth,x=0,k=1;if(l!==null){var C=c2(l,f,n);x=C.height+C.depth,k=2}var E=m+T+x,w=Math.max(0,Math.ceil((t-E)/(k*b))),_=E+w*k*b,L=i.fontMetrics().axisHeight;r&&(L*=i.sizeMultiplier);var N=_/2-L,D=[];if(d.length>0){var M=_-m-T,B=Math.round(_*1e3),A=pIe(d,Math.round(M*1e3)),I=new Du(d,A),O=Lt(p/1e3),R=Lt(B/1e3),$=new uh([I],{width:O,height:R,viewBox:"0 0 "+p+" "+B}),F=Mu([],[$],i);F.height=B/1e3,F.style.width=O,F.style.height=R,D.push({type:"elem",elem:F})}else{if(D.push(N8(u,f,n)),D.push(H4),l===null){var P=_-m-T+2*rR;D.push(O8(h,P,i))}else{var z=(_-m-T-x)/2+2*rR;D.push(O8(h,z,i)),D.push(H4),D.push(N8(l,f,n)),D.push(H4),D.push(O8(h,z,i))}D.push(H4),D.push(N8(s,f,n))}var q=i.havingBaseStyle(Lr.TEXT),G=ui({positionType:"bottom",positionData:N,children:D});return xR(wt(["delimsizing","mult"],[G],q),Lr.TEXT,i,a)},"makeStackedDelim"),B8=80,P8=.08,F8=o(function(e,t,r,i,n){var a=uIe(e,i,r),s=new Du(e,a),l=new uh([s],{width:"400em",height:Lt(t),viewBox:"0 0 400000 "+r,preserveAspectRatio:"xMinYMin slice"});return Mu(["hide-tail"],[l],n)},"sqrtSvg"),XIe=o(function(e,t){var r=t.havingBaseSizing(),i=lne("\\surd",e*r.sizeMultiplier,one,r),n=r.sizeMultiplier,a=Math.max(0,t.minRuleThickness-t.fontMetrics().sqrtRuleThickness),s,l=0,h=0,u=0,d;return i.type==="small"?(u=1e3+1e3*a+B8,e<1?n=1:e<1.4&&(n=.7),l=(1+a+P8)/n,h=(1+a)/n,s=F8("sqrtMain",l,u,a,t),s.style.minWidth="0.853em",d=.833/n):i.type==="large"?(u=(1e3+B8)*h2[i.size],h=(h2[i.size]+a)/n,l=(h2[i.size]+a+P8)/n,s=F8("sqrtSize"+i.size,l,u,a,t),s.style.minWidth="1.02em",d=1/n):(l=e+a+P8,h=e+a,u=Math.floor(1e3*e+a)+B8,s=F8("sqrtTall",l,u,a,t),s.style.minWidth="0.742em",d=1.056),s.height=h,s.style.height=Lt(l),{span:s,advanceWidth:d,ruleWidth:(t.fontMetrics().sqrtRuleThickness+a)*n}},"makeSqrtImage"),nne=new Set(["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","\u230A","\u230B","\\lceil","\\rceil","\u2308","\u2309","\\surd"]),KIe=new Set(["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","\u27EE","\u27EF","\\lmoustache","\\rmoustache","\u23B0","\u23B1"]),ane=new Set(["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"]),h2=[0,1.2,1.8,2.4,3],sne=o(function(e,t,r,i,n){if(e==="<"||e==="\\lt"||e==="\u27E8"?e="\\langle":(e===">"||e==="\\gt"||e==="\u27E9")&&(e="\\rangle"),nne.has(e)||ane.has(e))return rne(e,t,!1,r,i,n);if(KIe.has(e))return ine(e,h2[t],!1,r,i,n);throw new St("Illegal delimiter: '"+e+"'")},"makeSizedDelim"),ZIe=[{type:"small",style:Lr.SCRIPTSCRIPT},{type:"small",style:Lr.SCRIPT},{type:"small",style:Lr.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],QIe=[{type:"small",style:Lr.SCRIPTSCRIPT},{type:"small",style:Lr.SCRIPT},{type:"small",style:Lr.TEXT},{type:"stack"}],one=[{type:"small",style:Lr.SCRIPTSCRIPT},{type:"small",style:Lr.SCRIPT},{type:"small",style:Lr.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}],JIe=o(function(e){if(e.type==="small")return"Main-Regular";if(e.type==="large")return"Size"+e.size+"-Regular";if(e.type==="stack")return"Size4-Regular";var t=e.type;throw new Error("Add support for delim type '"+t+"' here.")},"delimTypeToFont"),lne=o(function(e,t,r,i){for(var n=Math.min(2,3-i.style.size),a=n;at)return s}return r[r.length-1]},"traverseSequence"),iR=o(function(e,t,r,i,n,a){e==="<"||e==="\\lt"||e==="\u27E8"?e="\\langle":(e===">"||e==="\\gt"||e==="\u27E9")&&(e="\\rangle");var s;ane.has(e)?s=ZIe:nne.has(e)?s=one:s=QIe;var l=lne(e,t,s,i);return l.type==="small"?UIe(e,l.style,r,i,n,a):l.type==="large"?rne(e,l.size,r,i,n,a):ine(e,t,r,i,n,a)},"makeCustomSizedDelim"),z8=o(function(e,t,r,i,n,a){var s=i.fontMetrics().axisHeight*i.sizeMultiplier,l=901,h=5/i.fontMetrics().ptPerEm,u=Math.max(t-s,r+s),d=Math.max(u/500*l,2*u-h);return iR(e,d,!0,i,n,a)},"makeLeftRightDelim"),lie={"\\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","."]);o(m2,"checkDelimiter");Nt({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:o((e,t)=>{var r=m2(t[0],e);return{type:"delimsizing",mode:e.parser.mode,size:lie[e.funcName].size,mclass:lie[e.funcName].mclass,delim:r.text}},"handler"),htmlBuilder:o((e,t)=>e.delim==="."?wt([e.mclass]):sne(e.delim,e.size,t,e.mode,[e.mclass]),"htmlBuilder"),mathmlBuilder:o(e=>{var t=[];e.delim!=="."&&t.push(Io(e.delim,e.mode));var r=new Et("mo",t);e.mclass==="mopen"||e.mclass==="mclose"?r.setAttribute("fence","true"):r.setAttribute("fence","false"),r.setAttribute("stretchy","true");var i=Lt(h2[e.size]);return r.setAttribute("minsize",i),r.setAttribute("maxsize",i),r},"mathmlBuilder")});o(nR,"assertParsed");Nt({type:"leftright-right",names:["\\right"],props:{numArgs:1,primitive:!0},handler:o((e,t)=>{var r=e.parser.gullet.macros.get("\\current@color");if(r&&typeof r!="string")throw new St("\\current@color set to non-string in \\right");return{type:"leftright-right",mode:e.parser.mode,delim:m2(t[0],e).text,color:r}},"handler")});Nt({type:"leftright",names:["\\left"],props:{numArgs:1,primitive:!0},handler:o((e,t)=>{var r=m2(t[0],e),i=e.parser;++i.leftrightDepth;var n=i.parseExpression(!1);--i.leftrightDepth,i.expect("\\right",!1);var a=Dr(i.parseFunction(),"leftright-right");return{type:"leftright",mode:i.mode,body:n,left:r.text,right:a.delim,rightColor:a.color}},"handler"),htmlBuilder:o((e,t)=>{nR(e);for(var r=On(e.body,t,!0,["mopen","mclose"]),i=0,n=0,a=!1,s=0;s{nR(e);var r=io(e.body,t);if(e.left!=="."){var i=new Et("mo",[Io(e.left,e.mode)]);i.setAttribute("fence","true"),r.unshift(i)}if(e.right!=="."){var n=new Et("mo",[Io(e.right,e.mode)]);n.setAttribute("fence","true"),e.rightColor&&n.setAttribute("mathcolor",e.rightColor),r.push(n)}return gR(r)},"mathmlBuilder")});Nt({type:"middle",names:["\\middle"],props:{numArgs:1,primitive:!0},handler:o((e,t)=>{var r=m2(t[0],e);if(!e.parser.leftrightDepth)throw new St("\\middle without preceding \\left",r);return{type:"middle",mode:e.parser.mode,delim:r.text}},"handler"),htmlBuilder:o((e,t)=>{var r;if(e.delim===".")r=d2(t,[]);else{r=sne(e.delim,1,t,e.mode,[]);var i={delim:e.delim,options:t};r.isMiddle=i}return r},"htmlBuilder"),mathmlBuilder:o((e,t)=>{var r=e.delim==="\\vert"||e.delim==="|"?Io("|","text"):Io(e.delim,e.mode),i=new Et("mo",[r]);return i.setAttribute("fence","true"),i.setAttribute("lspace","0.05em"),i.setAttribute("rspace","0.05em"),i},"mathmlBuilder")});dk=o((e,t)=>{var r=u0(di(e.body,t),t),i=e.label.slice(1),n=t.sizeMultiplier,a,s=0,l=dh(e.body);if(i==="sout")a=wt(["stretchy","sout"]),a.height=t.fontMetrics().defaultRuleThickness/n,s=-.5*t.fontMetrics().xHeight;else if(i==="phase"){var h=Ki({number:.6,unit:"pt"},t),u=Ki({number:.35,unit:"ex"},t),d=t.havingBaseSizing();n=n/d.sizeMultiplier;var p=r.height+r.depth+h+u;r.style.paddingLeft=Lt(p/2+h);var f=Math.floor(1e3*p*n),g=cIe(f),m=new uh([new Du("phase",g)],{width:"400em",height:Lt(f/1e3),viewBox:"0 0 400000 "+f,preserveAspectRatio:"xMinYMin slice"});a=Mu(["hide-tail"],[m],t),a.style.height=Lt(p),s=r.depth+h+u}else{/cancel/.test(i)?l||r.classes.push("cancel-pad"):i==="angl"?r.classes.push("anglpad"):r.classes.push("boxpad");var y=0,b=0,v=0;/box/.test(i)?(v=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness),y=t.fontMetrics().fboxsep+(i==="colorbox"?0:v),b=y):i==="angl"?(v=Math.max(t.fontMetrics().defaultRuleThickness,t.minRuleThickness),y=4*v,b=Math.max(0,.25-r.depth)):(y=l?.2:0,b=y),a=zIe(r,i,y,b,t),/fbox|boxed|fcolorbox/.test(i)?(a.style.borderStyle="solid",a.style.borderWidth=Lt(v)):i==="angl"&&v!==.049&&(a.style.borderTopWidth=Lt(v),a.style.borderRightWidth=Lt(v)),s=r.depth+b,e.backgroundColor&&(a.style.backgroundColor=e.backgroundColor,e.borderColor&&(a.style.borderColor=e.borderColor))}var T;if(e.backgroundColor)T=ui({positionType:"individualShift",children:[{type:"elem",elem:a,shift:s},{type:"elem",elem:r,shift:0}]});else{var x=/cancel|phase/.test(i)?["svg-align"]:[];T=ui({positionType:"individualShift",children:[{type:"elem",elem:r,shift:0},{type:"elem",elem:a,shift:s,wrapperClasses:x}]})}return/cancel/.test(i)&&(T.height=r.height,T.depth=r.depth),/cancel/.test(i)&&!l?wt(["mord","cancel-lap"],[T],t):wt(["mord"],[T],t)},"htmlBuilder$7"),pk=o((e,t)=>{var r=0,i=new Et(e.label.includes("colorbox")?"mpadded":"menclose",[Si(e.body,t)]);switch(e.label){case"\\cancel":i.setAttribute("notation","updiagonalstrike");break;case"\\bcancel":i.setAttribute("notation","downdiagonalstrike");break;case"\\phase":i.setAttribute("notation","phasorangle");break;case"\\sout":i.setAttribute("notation","horizontalstrike");break;case"\\fbox":i.setAttribute("notation","box");break;case"\\angl":i.setAttribute("notation","actuarial");break;case"\\fcolorbox":case"\\colorbox":if(r=t.fontMetrics().fboxsep*t.fontMetrics().ptPerEm,i.setAttribute("width","+"+2*r+"pt"),i.setAttribute("height","+"+2*r+"pt"),i.setAttribute("lspace",r+"pt"),i.setAttribute("voffset",r+"pt"),e.label==="\\fcolorbox"){var n=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness);i.setAttribute("style","border: "+Lt(n)+" solid "+e.borderColor)}break;case"\\xcancel":i.setAttribute("notation","updiagonalstrike downdiagonalstrike");break}return e.backgroundColor&&i.setAttribute("mathbackground",e.backgroundColor),i},"mathmlBuilder$6");Nt({type:"enclose",names:["\\colorbox"],props:{numArgs:2,allowedInText:!0,argTypes:["color","text"]},handler(e,t,r){var{parser:i,funcName:n}=e,a=Dr(t[0],"color-token").color,s=t[1];return{type:"enclose",mode:i.mode,label:n,backgroundColor:a,body:s}},htmlBuilder:dk,mathmlBuilder:pk});Nt({type:"enclose",names:["\\fcolorbox"],props:{numArgs:3,allowedInText:!0,argTypes:["color","color","text"]},handler(e,t,r){var{parser:i,funcName:n}=e,a=Dr(t[0],"color-token").color,s=Dr(t[1],"color-token").color,l=t[2];return{type:"enclose",mode:i.mode,label:n,backgroundColor:s,borderColor:a,body:l}},htmlBuilder:dk,mathmlBuilder:pk});Nt({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]}}});Nt({type:"enclose",names:["\\cancel","\\bcancel","\\xcancel","\\phase"],props:{numArgs:1},handler(e,t){var{parser:r,funcName:i}=e,n=t[0];return{type:"enclose",mode:r.mode,label:i,body:n}},htmlBuilder:dk,mathmlBuilder:pk});Nt({type:"enclose",names:["\\sout"],props:{numArgs:1,allowedInText:!0},handler(e,t){var{parser:r,funcName:i}=e;r.mode==="math"&&r.settings.reportNonstrict("mathVsSout","LaTeX's \\sout works only in text mode");var n=t[0];return{type:"enclose",mode:r.mode,label:i,body:n}},htmlBuilder:dk,mathmlBuilder:pk});Nt({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]}}});cne={};o(ml,"defineEnvironment");hne={};o(Te,"defineMacro");Lo=class une{static{o(this,"SourceLocation")}constructor(t,r,i){this.lexer=t,this.start=r,this.end=i}static range(t,r){return r?!t||!t.loc||!r.loc||t.loc.lexer!==r.loc.lexer?null:new une(t.loc.lexer,t.loc.start,r.loc.end):t&&t.loc}},gl=class dne{static{o(this,"Token")}constructor(t,r){this.text=t,this.loc=r}range(t,r){return new dne(r,Lo.range(this,t))}};o(aR,"getHLines");fk=o(e=>{var t=e.parser.settings;if(!t.displayMode)throw new St("{"+e.envName+"} can be used only in display mode.")},"validateAmsEnvironmentContext"),t9e=new Set(["gather","gather*"]);o(gk,"getAutoTag");o(gh,"parseArray");o(mk,"dCellStyle");nc=o(function(e,t){var r,i,n=e.body.length,a=e.hLinesBeforeRow,s=0,l=new Array(n),h=[],u=Math.max(t.fontMetrics().arrayRuleWidth,t.minRuleThickness),d=1/t.fontMetrics().ptPerEm,p=5*d;if(e.colSeparationType&&e.colSeparationType==="small"){var f=t.havingStyle(Lr.SCRIPT).sizeMultiplier;p=.2778*(f/t.sizeMultiplier)}var g=e.colSeparationType==="CD"?Ki({number:3,unit:"ex"},t):12*d,m=3*d,y=e.arraystretch*g,b=.7*y,v=.3*y,T=0;function x(Me){for(var pe=0;pe0&&(T+=.25),h.push({pos:T,isDashed:Me[pe]})}for(o(x,"setHLinePos"),x(a[0]),r=0;r0&&(N+=v,EMe))for(r=0;r=s)){var se=void 0;if(i>0||e.hskipBeforeAndAfter){var Q,te;se=(Q=(te=q)==null?void 0:te.pregap)!=null?Q:p,se!==0&&(A=wt(["arraycolsep"],[]),A.style.width=Lt(se),B.push(A))}var re=[];for(r=0;r0){for(var ae=h0("hline",t,u),Pe=h0("hdashline",t,u),X=[{type:"elem",elem:ve,shift:0}];h.length>0;){var ce=h.pop(),ge=ce.pos-D;ce.isDashed?X.push({type:"elem",elem:Pe,shift:ge}):X.push({type:"elem",elem:ae,shift:ge})}ve=ui({positionType:"individualShift",children:X})}if(O.length===0)return wt(["mord"],[ve],t);var be=ui({positionType:"individualShift",children:O}),ke=wt(["tag"],[be],t);return fh([ve,ke])},"htmlBuilder"),r9e={c:"center ",l:"left ",r:"right "},ac=o(function(e,t){for(var r=[],i=new Et("mtd",[],["mtr-glue"]),n=new Et("mtd",[],["mml-eqn-num"]),a=0;a0){var g=e.cols,m="",y=!1,b=0,v=g.length;g[0].type==="separator"&&(p+="top ",b=1),g[g.length-1].type==="separator"&&(p+="bottom ",v-=1);for(var T=b;T0?"left ":"",p+=_[_.length-1].length>0?"right ":"";for(var L=1;L<_.length-1;L++)w+=_[L].length===0?"none ":_[L][0]?"dashed ":"solid ";return/[sd]/.test(w)&&u.setAttribute("rowlines",w.trim()),p!==""&&(u=new Et("menclose",[u]),u.setAttribute("notation",p.trim())),e.arraystretch&&e.arraystretch<1&&(u=new Et("mstyle",[u]),u.setAttribute("scriptlevel","1")),u},"mathmlBuilder"),pne=o(function(e,t){e.envName.includes("ed")||fk(e);var r=[],i=e.envName.includes("at")?"alignat":"align",n=e.envName==="split",a=gh(e.parser,{cols:r,addJot:!0,autoTag:n?void 0:gk(e.envName),emptySingleRow:!0,colSeparationType:i,maxNumCols:n?2:void 0,leqno:e.parser.settings.leqno},"display"),s=0,l=0,h={type:"ordgroup",mode:e.mode,body:[]};if(t[0]&&t[0].type==="ordgroup"){for(var u="",d=0;d0&&f&&(y=1),r[g]={type:"align",align:m,pregap:y,postgap:0}}return a.colSeparationType=f?"align":"alignat",a},"alignedHandler");ml({type:"array",names:["array","darray"],props:{numArgs:1},handler(e,t){var r=g2(t[0]),i=r?[t[0]]:Dr(t[0],"ordgroup").body,n=i.map(function(s){var l=f2(s),h=l.text;if("lcr".includes(h))return{type:"align",align:h};if(h==="|")return{type:"separator",separator:"|"};if(h===":")return{type:"separator",separator:":"};throw new St("Unknown column alignment: "+h,s)}),a={cols:n,hskipBeforeAndAfter:!0,maxNumCols:n.length};return gh(e.parser,a,mk(e.envName))},htmlBuilder:nc,mathmlBuilder:ac});ml({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",i={hskipBeforeAndAfter:!1,cols:[{type:"align",align:r}]};if(e.envName.charAt(e.envName.length-1)==="*"){var n=e.parser;if(n.consumeSpaces(),n.fetch().text==="["){if(n.consume(),n.consumeSpaces(),r=n.fetch().text,!"lcr".includes(r))throw new St("Expected l or c or r",n.nextToken);n.consume(),n.consumeSpaces(),n.expect("]"),n.consume(),i.cols=[{type:"align",align:r}]}}var a=gh(e.parser,i,mk(e.envName)),s=Math.max(0,...a.body.map(l=>l.length));return a.cols=new Array(s).fill({type:"align",align:r}),t?{type:"leftright",mode:e.mode,body:[a],left:t[0],right:t[1],rightColor:void 0}:a},htmlBuilder:nc,mathmlBuilder:ac});ml({type:"array",names:["smallmatrix"],props:{numArgs:0},handler(e){var t={arraystretch:.5},r=gh(e.parser,t,"script");return r.colSeparationType="small",r},htmlBuilder:nc,mathmlBuilder:ac});ml({type:"array",names:["subarray"],props:{numArgs:1},handler(e,t){var r=g2(t[0]),i=r?[t[0]]:Dr(t[0],"ordgroup").body,n=i.map(function(l){var h=f2(l),u=h.text;if("lc".includes(u))return{type:"align",align:u};throw new St("Unknown column alignment: "+u,l)});if(n.length>1)throw new St("{subarray} can contain only one column");var a={cols:n,hskipBeforeAndAfter:!1,arraystretch:.5},s=gh(e.parser,a,"script");if(s.body.length>0&&s.body[0].length>1)throw new St("{subarray} can contain only one column");return s},htmlBuilder:nc,mathmlBuilder:ac});ml({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=gh(e.parser,t,mk(e.envName));return{type:"leftright",mode:e.mode,body:[r],left:e.envName.includes("r")?".":"\\{",right:e.envName.includes("r")?"\\}":".",rightColor:void 0}},htmlBuilder:nc,mathmlBuilder:ac});ml({type:"array",names:["align","align*","aligned","split"],props:{numArgs:0},handler:pne,htmlBuilder:nc,mathmlBuilder:ac});ml({type:"array",names:["gathered","gather","gather*"],props:{numArgs:0},handler(e){t9e.has(e.envName)&&fk(e);var t={cols:[{type:"align",align:"c"}],addJot:!0,colSeparationType:"gather",autoTag:gk(e.envName),emptySingleRow:!0,leqno:e.parser.settings.leqno};return gh(e.parser,t,"display")},htmlBuilder:nc,mathmlBuilder:ac});ml({type:"array",names:["alignat","alignat*","alignedat"],props:{numArgs:1},handler:pne,htmlBuilder:nc,mathmlBuilder:ac});ml({type:"array",names:["equation","equation*"],props:{numArgs:0},handler(e){fk(e);var t={autoTag:gk(e.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,leqno:e.parser.settings.leqno};return gh(e.parser,t,"display")},htmlBuilder:nc,mathmlBuilder:ac});ml({type:"array",names:["CD"],props:{numArgs:0},handler(e){return fk(e),Kie(e.parser)},htmlBuilder:nc,mathmlBuilder:ac});Te("\\nonumber","\\gdef\\@eqnsw{0}");Te("\\notag","\\nonumber");Nt({type:"text",names:["\\hline","\\hdashline"],props:{numArgs:0,allowedInText:!0,allowedInMath:!0},handler(e,t){throw new St(e.funcName+" valid only within array environment")}});cie=cne;Nt({type:"environment",names:["\\begin","\\end"],props:{numArgs:1,argTypes:["text"]},handler(e,t){var{parser:r,funcName:i}=e,n=t[0];if(n.type!=="ordgroup")throw new St("Invalid environment name",n);for(var a="",s=0;s{var r=e.font,i=t.withFont(r);return di(e.body,i)},"htmlBuilder$5"),gne=o((e,t)=>{var r=e.font,i=t.withFont(r);return Si(e.body,i)},"mathmlBuilder$4"),hie={"\\Bbb":"\\mathbb","\\bold":"\\mathbf","\\frak":"\\mathfrak","\\bm":"\\boldsymbol"};Nt({type:"font",names:["\\mathrm","\\mathit","\\mathbf","\\mathnormal","\\mathsfit","\\mathbb","\\mathcal","\\mathfrak","\\mathscr","\\mathsf","\\mathtt","\\Bbb","\\bold","\\frak"],props:{numArgs:1,allowedInArgument:!0},handler:o((e,t)=>{var{parser:r,funcName:i}=e,n=ik(t[0]),a=i;return a in hie&&(a=hie[a]),{type:"font",mode:r.mode,font:a.slice(1),body:n}},"handler"),htmlBuilder:fne,mathmlBuilder:gne});Nt({type:"mclass",names:["\\boldsymbol","\\bm"],props:{numArgs:1},handler:o((e,t)=>{var{parser:r}=e,i=t[0];return{type:"mclass",mode:r.mode,mclass:uk(i),body:[{type:"font",mode:r.mode,font:"boldsymbol",body:i}],isCharacterBox:dh(i)}},"handler")});Nt({type:"font",names:["\\rm","\\sf","\\tt","\\bf","\\it","\\cal"],props:{numArgs:0,allowedInText:!0},handler:o((e,t)=>{var{parser:r,funcName:i,breakOnTokenText:n}=e,{mode:a}=r,s=r.parseExpression(!0,n),l="math"+i.slice(1);return{type:"font",mode:a,font:l,body:{type:"ordgroup",mode:r.mode,body:s}}},"handler"),htmlBuilder:fne,mathmlBuilder:gne});i9e=o((e,t)=>{var r=t.style,i=r.fracNum(),n=r.fracDen(),a;a=t.havingStyle(i);var s=di(e.numer,a,t);if(e.continued){var l=8.5/t.fontMetrics().ptPerEm,h=3.5/t.fontMetrics().ptPerEm;s.height=s.height0?m=3*f:m=7*f,y=t.fontMetrics().denom1):(p>0?(g=t.fontMetrics().num2,m=f):(g=t.fontMetrics().num3,m=3*f),y=t.fontMetrics().denom2);var b;if(d){var v=t.fontMetrics().axisHeight;g-s.depth-(v+.5*p){var r=new Et("mfrac",[Si(e.numer,t),Si(e.denom,t)]);if(!e.hasBarLine)r.setAttribute("linethickness","0px");else if(e.barSize){var i=Ki(e.barSize,t);r.setAttribute("linethickness",Lt(i))}if(e.leftDelim!=null||e.rightDelim!=null){var n=[];if(e.leftDelim!=null){var a=new Et("mo",[new En(e.leftDelim.replace("\\",""))]);a.setAttribute("fence","true"),n.push(a)}if(n.push(r),e.rightDelim!=null){var s=new Et("mo",[new En(e.rightDelim.replace("\\",""))]);s.setAttribute("fence","true"),n.push(s)}return gR(n)}return r},"mathmlBuilder$3"),mne=o((e,t)=>{if(!t)return e;var r={type:"styling",mode:e.mode,style:t,body:[e]};return r},"wrapWithStyle");Nt({type:"genfrac",names:["\\cfrac","\\dfrac","\\frac","\\tfrac","\\dbinom","\\binom","\\tbinom","\\\\atopfrac","\\\\bracefrac","\\\\brackfrac"],props:{numArgs:2,allowedInArgument:!0},handler:o((e,t)=>{var{parser:r,funcName:i}=e,n=t[0],a=t[1],s,l=null,h=null;switch(i){case"\\cfrac":case"\\dfrac":case"\\frac":case"\\tfrac":s=!0;break;case"\\\\atopfrac":s=!1;break;case"\\dbinom":case"\\binom":case"\\tbinom":s=!1,l="(",h=")";break;case"\\\\bracefrac":s=!1,l="\\{",h="\\}";break;case"\\\\brackfrac":s=!1,l="[",h="]";break;default:throw new Error("Unrecognized genfrac command")}var u=i==="\\cfrac",d=null;return u||i.startsWith("\\d")?d="display":i.startsWith("\\t")&&(d="text"),mne({type:"genfrac",mode:r.mode,numer:n,denom:a,continued:u,hasBarLine:s,leftDelim:l,rightDelim:h,barSize:null},d)},"handler"),htmlBuilder:i9e,mathmlBuilder:n9e});Nt({type:"infix",names:["\\over","\\choose","\\atop","\\brace","\\brack"],props:{numArgs:0,infix:!0},handler(e){var{parser:t,funcName:r,token:i}=e,n;switch(r){case"\\over":n="\\frac";break;case"\\choose":n="\\binom";break;case"\\atop":n="\\\\atopfrac";break;case"\\brace":n="\\\\bracefrac";break;case"\\brack":n="\\\\brackfrac";break;default:throw new Error("Unrecognized infix genfrac command")}return{type:"infix",mode:t.mode,replaceWith:n,token:i}}});uie=["display","text","script","scriptscript"],die=o(function(e){var t=null;return e.length>0&&(t=e,t=t==="."?null:t),t},"delimFromValue");Nt({type:"genfrac",names:["\\genfrac"],props:{numArgs:6,allowedInArgument:!0,argTypes:["math","math","size","text","math","math"]},handler(e,t){var{parser:r}=e,i=t[4],n=t[5],a=ik(t[0]),s=a.type==="atom"&&a.family==="open"?die(a.text):null,l=ik(t[1]),h=l.type==="atom"&&l.family==="close"?die(l.text):null,u=Dr(t[2],"size"),d,p=null;u.isBlank?d=!0:(p=u.value,d=p.number>0);var f=null,g=t[3];if(g.type==="ordgroup"){if(g.body.length>0){var m=Dr(g.body[0],"textord");f=uie[Number(m.text)]}}else g=Dr(g,"textord"),f=uie[Number(g.text)];return mne({type:"genfrac",mode:r.mode,numer:i,denom:n,continued:!1,hasBarLine:d,barSize:p,leftDelim:s,rightDelim:h},f)}});Nt({type:"infix",names:["\\above"],props:{numArgs:1,argTypes:["size"],infix:!0},handler(e,t){var{parser:r,funcName:i,token:n}=e;return{type:"infix",mode:r.mode,replaceWith:"\\\\abovefrac",size:Dr(t[0],"size").value,token:n}}});Nt({type:"genfrac",names:["\\\\abovefrac"],props:{numArgs:3,argTypes:["math","size","math"]},handler:o((e,t)=>{var{parser:r,funcName:i}=e,n=t[0],a=Dr(t[1],"infix").size;if(!a)throw new Error("\\\\abovefrac expected size, but got "+String(a));var s=t[2],l=a.number>0;return{type:"genfrac",mode:r.mode,numer:n,denom:s,continued:!1,hasBarLine:l,barSize:a,leftDelim:null,rightDelim:null}},"handler")});yne=o((e,t)=>{var r=t.style,i,n;e.type==="supsub"?(i=e.sup?di(e.sup,t.havingStyle(r.sup()),t):di(e.sub,t.havingStyle(r.sub()),t),n=Dr(e.base,"horizBrace")):n=Dr(e,"horizBrace");var a=di(n.base,t.havingBaseStyle(Lr.DISPLAY)),s=hk(n,t),l;if(n.isOver?(l=ui({positionType:"firstBaseline",children:[{type:"elem",elem:a},{type:"kern",size:.1},{type:"elem",elem:s}]}),l.children[0].children[0].children[1].classes.push("svg-align")):(l=ui({positionType:"bottom",positionData:a.depth+.1+s.height,children:[{type:"elem",elem:s},{type:"kern",size:.1},{type:"elem",elem:a}]}),l.children[0].children[0].children[0].classes.push("svg-align")),i){var h=wt(["minner",n.isOver?"mover":"munder"],[l],t);n.isOver?l=ui({positionType:"firstBaseline",children:[{type:"elem",elem:h},{type:"kern",size:.2},{type:"elem",elem:i}]}):l=ui({positionType:"bottom",positionData:h.depth+.2+i.height+i.depth,children:[{type:"elem",elem:i},{type:"kern",size:.2},{type:"elem",elem:h}]})}return wt(["minner",n.isOver?"mover":"munder"],[l],t)},"htmlBuilder$3"),a9e=o((e,t)=>{var r=ck(e.label);return new Et(e.isOver?"mover":"munder",[Si(e.base,t),r])},"mathmlBuilder$2");Nt({type:"horizBrace",names:["\\overbrace","\\underbrace","\\overbracket","\\underbracket"],props:{numArgs:1},handler(e,t){var{parser:r,funcName:i}=e;return{type:"horizBrace",mode:r.mode,label:i,isOver:i.includes("\\over"),base:t[0]}},htmlBuilder:yne,mathmlBuilder:a9e});Nt({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:o((e,t)=>{var{parser:r}=e,i=t[1],n=Dr(t[0],"url").url;return r.settings.isTrusted({command:"\\href",url:n})?{type:"href",mode:r.mode,href:n,body:wn(i)}:r.formatUnsupportedCmd("\\href")},"handler"),htmlBuilder:o((e,t)=>{var r=On(e.body,t,!1);return wIe(e.href,[],r,t)},"htmlBuilder"),mathmlBuilder:o((e,t)=>{var r=Nu(e.body,t);return r instanceof Et||(r=new Et("mrow",[r])),r.setAttribute("href",e.href),r},"mathmlBuilder")});Nt({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:o((e,t)=>{var{parser:r}=e,i=Dr(t[0],"url").url;if(!r.settings.isTrusted({command:"\\url",url:i}))return r.formatUnsupportedCmd("\\url");for(var n=[],a=0;a{var{parser:r,funcName:i,token:n}=e,a=Dr(t[0],"raw").string,s=t[1];r.settings.strict&&r.settings.reportNonstrict("htmlExtension","HTML extension is disabled on strict mode");var l,h={};switch(i){case"\\htmlClass":h.class=a,l={command:"\\htmlClass",class:a};break;case"\\htmlId":h.id=a,l={command:"\\htmlId",id:a};break;case"\\htmlStyle":h.style=a,l={command:"\\htmlStyle",style:a};break;case"\\htmlData":{for(var u=a.split(","),d=0;d{var r=On(e.body,t,!1),i=["enclosing"];e.attributes.class&&i.push(...e.attributes.class.trim().split(/\s+/));var n=wt(i,r,t);for(var a in e.attributes)a!=="class"&&e.attributes.hasOwnProperty(a)&&n.setAttribute(a,e.attributes[a]);return n},"htmlBuilder"),mathmlBuilder:o((e,t)=>Nu(e.body,t),"mathmlBuilder")});Nt({type:"htmlmathml",names:["\\html@mathml"],props:{numArgs:2,allowedInArgument:!0,allowedInText:!0},handler:o((e,t)=>{var{parser:r}=e;return{type:"htmlmathml",mode:r.mode,html:wn(t[0]),mathml:wn(t[1])}},"handler"),htmlBuilder:o((e,t)=>{var r=On(e.html,t,!1);return fh(r)},"htmlBuilder"),mathmlBuilder:o((e,t)=>Nu(e.mathml,t),"mathmlBuilder")});q8=o(function(e){if(/^[-+]? *(\d+(\.\d*)?|\.\d+)$/.test(e))return{number:+e,unit:"bp"};var t=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(e);if(!t)throw new St("Invalid size: '"+e+"' in \\includegraphics");var r={number:+(t[1]+t[2]),unit:t[3]};if(!Rie(r))throw new St("Invalid unit: '"+r.unit+"' in \\includegraphics.");return r},"sizeData");Nt({type:"includegraphics",names:["\\includegraphics"],props:{numArgs:1,numOptionalArgs:1,argTypes:["raw","url"],allowedInText:!1},handler:o((e,t,r)=>{var{parser:i}=e,n={number:0,unit:"em"},a={number:.9,unit:"em"},s={number:0,unit:"em"},l="";if(r[0])for(var h=Dr(r[0],"raw").string,u=h.split(","),d=0;d{var r=Ki(e.height,t),i=0;e.totalheight.number>0&&(i=Ki(e.totalheight,t)-r);var n=0;e.width.number>0&&(n=Ki(e.width,t));var a={height:Lt(r+i)};n>0&&(a.width=Lt(n)),i>0&&(a.verticalAlign=Lt(-i));var s=new mIe(e.src,e.alt,a);return s.height=r,s.depth=i,s},"htmlBuilder"),mathmlBuilder:o((e,t)=>{var r=new Et("mglyph",[]);r.setAttribute("alt",e.alt);var i=Ki(e.height,t),n=0;if(e.totalheight.number>0&&(n=Ki(e.totalheight,t)-i,r.setAttribute("valign",Lt(-n))),r.setAttribute("height",Lt(i+n)),e.width.number>0){var a=Ki(e.width,t);r.setAttribute("width",Lt(a))}return r.setAttribute("src",e.src),r},"mathmlBuilder")});Nt({type:"kern",names:["\\kern","\\mkern","\\hskip","\\mskip"],props:{numArgs:1,argTypes:["size"],primitive:!0,allowedInText:!0},handler(e,t){var{parser:r,funcName:i}=e,n=Dr(t[0],"size");if(r.settings.strict){var a=i[1]==="m",s=n.value.unit==="mu";a?(s||r.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+i+" supports only mu units, "+("not "+n.value.unit+" units")),r.mode!=="math"&&r.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+i+" works only in math mode")):s&&r.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+i+" doesn't support mu units")}return{type:"kern",mode:r.mode,dimension:n.value}},htmlBuilder(e,t){return Pie(e.dimension,t)},mathmlBuilder(e,t){var r=Ki(e.dimension,t);return new Gie(r)}});Nt({type:"lap",names:["\\mathllap","\\mathrlap","\\mathclap"],props:{numArgs:1,allowedInText:!0},handler:o((e,t)=>{var{parser:r,funcName:i}=e,n=t[0];return{type:"lap",mode:r.mode,alignment:i.slice(5),body:n}},"handler"),htmlBuilder:o((e,t)=>{var r;e.alignment==="clap"?(r=wt([],[di(e.body,t)]),r=wt(["inner"],[r],t)):r=wt(["inner"],[di(e.body,t)]);var i=wt(["fix"],[]),n=wt([e.alignment],[r,i],t),a=wt(["strut"]);return a.style.height=Lt(n.height+n.depth),n.depth&&(a.style.verticalAlign=Lt(-n.depth)),n.children.unshift(a),n=wt(["thinbox"],[n],t),wt(["mord","vbox"],[n],t)},"htmlBuilder"),mathmlBuilder:o((e,t)=>{var r=new Et("mpadded",[Si(e.body,t)]);if(e.alignment!=="rlap"){var i=e.alignment==="llap"?"-1":"-0.5";r.setAttribute("lspace",i+"width")}return r.setAttribute("width","0px"),r},"mathmlBuilder")});Nt({type:"styling",names:["\\(","$"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,t){var{funcName:r,parser:i}=e,n=i.mode;i.switchMode("math");var a=r==="\\("?"\\)":"$",s=i.parseExpression(!1,a);return i.expect(a),i.switchMode(n),{type:"styling",mode:i.mode,style:"text",body:s}}});Nt({type:"text",names:["\\)","\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,t){throw new St("Mismatched "+e.funcName)}});pie=o((e,t)=>{switch(t.style.size){case Lr.DISPLAY.size:return e.display;case Lr.TEXT.size:return e.text;case Lr.SCRIPT.size:return e.script;case Lr.SCRIPTSCRIPT.size:return e.scriptscript;default:return e.text}},"chooseMathStyle");Nt({type:"mathchoice",names:["\\mathchoice"],props:{numArgs:4,primitive:!0},handler:o((e,t)=>{var{parser:r}=e;return{type:"mathchoice",mode:r.mode,display:wn(t[0]),text:wn(t[1]),script:wn(t[2]),scriptscript:wn(t[3])}},"handler"),htmlBuilder:o((e,t)=>{var r=pie(e,t),i=On(r,t,!1);return fh(i)},"htmlBuilder"),mathmlBuilder:o((e,t)=>{var r=pie(e,t);return Nu(r,t)},"mathmlBuilder")});vne=o((e,t,r,i,n,a,s)=>{e=wt([],[e]);var l=r&&dh(r),h,u;if(t){var d=di(t,i.havingStyle(n.sup()),i);u={elem:d,kern:Math.max(i.fontMetrics().bigOpSpacing1,i.fontMetrics().bigOpSpacing3-d.depth)}}if(r){var p=di(r,i.havingStyle(n.sub()),i);h={elem:p,kern:Math.max(i.fontMetrics().bigOpSpacing2,i.fontMetrics().bigOpSpacing4-p.height)}}var f;if(u&&h){var g=i.fontMetrics().bigOpSpacing5+h.elem.height+h.elem.depth+h.kern+e.depth+s;f=ui({positionType:"bottom",positionData:g,children:[{type:"kern",size:i.fontMetrics().bigOpSpacing5},{type:"elem",elem:h.elem,marginLeft:Lt(-a)},{type:"kern",size:h.kern},{type:"elem",elem:e},{type:"kern",size:u.kern},{type:"elem",elem:u.elem,marginLeft:Lt(a)},{type:"kern",size:i.fontMetrics().bigOpSpacing5}]})}else if(h){var m=e.height-s;f=ui({positionType:"top",positionData:m,children:[{type:"kern",size:i.fontMetrics().bigOpSpacing5},{type:"elem",elem:h.elem,marginLeft:Lt(-a)},{type:"kern",size:h.kern},{type:"elem",elem:e}]})}else if(u){var y=e.depth+s;f=ui({positionType:"bottom",positionData:y,children:[{type:"elem",elem:e},{type:"kern",size:u.kern},{type:"elem",elem:u.elem,marginLeft:Lt(a)},{type:"kern",size:i.fontMetrics().bigOpSpacing5}]})}else return e;var b=[f];if(h&&a!==0&&!l){var v=wt(["mspace"],[],i);v.style.marginRight=Lt(a),b.unshift(v)}return wt(["mop","op-limits"],b,i)},"assembleSupSub"),bne=new Set(["\\smallint"]),g0=o((e,t)=>{var r,i,n=!1,a;e.type==="supsub"?(r=e.sup,i=e.sub,a=Dr(e.base,"op"),n=!0):a=Dr(e,"op");var s=t.style,l=!1;s.size===Lr.DISPLAY.size&&a.symbol&&!bne.has(a.name)&&(l=!0);var h;if(a.symbol){var u=l?"Size2-Regular":"Size1-Regular",d="";if((a.name==="\\oiint"||a.name==="\\oiiint")&&(d=a.name.slice(1),a.name=d==="oiint"?"\\iint":"\\iiint"),h=as(a.name,u,"math",t,["mop","op-symbol",l?"large-op":"small-op"]),d.length>0){var p=h.italic,f=zie(d+"Size"+(l?"2":"1"),t);h=ui({positionType:"individualShift",children:[{type:"elem",elem:h,shift:0},{type:"elem",elem:f,shift:l?.08:0}]}),a.name="\\"+d,h.classes.unshift("mop"),h.italic=p}}else if(a.body){var g=On(a.body,t,!0);g.length===1&&g[0]instanceof to?(h=g[0],h.classes[0]="mop"):h=wt(["mop"],g,t)}else{for(var m=[],y=1;y{var r;if(e.symbol)r=new Et("mo",[Io(e.name,e.mode)]),bne.has(e.name)&&r.setAttribute("largeop","false");else if(e.body)r=new Et("mo",io(e.body,t));else{r=new Et("mi",[new En(e.name.slice(1))]);var i=new Et("mo",[Io("\u2061","text")]);e.parentIsSupSub?r=new Et("mrow",[r,i]):r=fR([r,i])}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"};Nt({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:o((e,t)=>{var{parser:r,funcName:i}=e,n=i;return n.length===1&&(n=s9e[n]),{type:"op",mode:r.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:n}},"handler"),htmlBuilder:g0,mathmlBuilder:y2});Nt({type:"op",names:["\\mathop"],props:{numArgs:1,primitive:!0},handler:o((e,t)=>{var{parser:r}=e,i=t[0];return{type:"op",mode:r.mode,limits:!1,parentIsSupSub:!1,symbol:!1,body:wn(i)}},"handler"),htmlBuilder:g0,mathmlBuilder:y2});o9e={"\u222B":"\\int","\u222C":"\\iint","\u222D":"\\iiint","\u222E":"\\oint","\u222F":"\\oiint","\u2230":"\\oiiint"};Nt({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:g0,mathmlBuilder:y2});Nt({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:g0,mathmlBuilder:y2});Nt({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,i=r;return i.length===1&&(i=o9e[i]),{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:i}},htmlBuilder:g0,mathmlBuilder:y2});xne=o((e,t)=>{var r,i,n=!1,a;e.type==="supsub"?(r=e.sup,i=e.sub,a=Dr(e.base,"operatorname"),n=!0):a=Dr(e,"operatorname");var s;if(a.body.length>0){for(var l=a.body.map(p=>{var f="text"in p?p.text:void 0;return typeof f=="string"?{type:"textord",mode:p.mode,text:f}:p}),h=On(l,t.withFont("mathrm"),!0),u=0;u{for(var r=io(e.body,t.withFont("mathrm")),i=!0,n=0;nd.toText()).join("");r=[new En(l)]}var h=new Et("mi",r);h.setAttribute("mathvariant","normal");var u=new Et("mo",[Io("\u2061","text")]);return e.parentIsSupSub?new Et("mrow",[h,u]):fR([h,u])},"mathmlBuilder");Nt({type:"operatorname",names:["\\operatorname@","\\operatornamewithlimits"],props:{numArgs:1},handler:o((e,t)=>{var{parser:r,funcName:i}=e,n=t[0];return{type:"operatorname",mode:r.mode,body:wn(n),alwaysHandleSupSub:i==="\\operatornamewithlimits",limits:!1,parentIsSupSub:!1}},"handler"),htmlBuilder:xne,mathmlBuilder:l9e});Te("\\operatorname","\\@ifstar\\operatornamewithlimits\\operatorname@");Ou({type:"ordgroup",htmlBuilder(e,t){return e.semisimple?fh(On(e.body,t,!1)):wt(["mord"],On(e.body,t,!0),t)},mathmlBuilder(e,t){return Nu(e.body,t,!0)}});Nt({type:"overline",names:["\\overline"],props:{numArgs:1},handler(e,t){var{parser:r}=e,i=t[0];return{type:"overline",mode:r.mode,body:i}},htmlBuilder(e,t){var r=di(e.body,t.havingCrampedStyle()),i=h0("overline-line",t),n=t.fontMetrics().defaultRuleThickness,a=ui({positionType:"firstBaseline",children:[{type:"elem",elem:r},{type:"kern",size:3*n},{type:"elem",elem:i},{type:"kern",size:n}]});return wt(["mord","overline"],[a],t)},mathmlBuilder(e,t){var r=new Et("mo",[new En("\u203E")]);r.setAttribute("stretchy","true");var i=new Et("mover",[Si(e.body,t),r]);return i.setAttribute("accent","true"),i}});Nt({type:"phantom",names:["\\phantom"],props:{numArgs:1,allowedInText:!0},handler:o((e,t)=>{var{parser:r}=e,i=t[0];return{type:"phantom",mode:r.mode,body:wn(i)}},"handler"),htmlBuilder:o((e,t)=>{var r=On(e.body,t.withPhantom(),!1);return fh(r)},"htmlBuilder"),mathmlBuilder:o((e,t)=>{var r=io(e.body,t);return new Et("mphantom",r)},"mathmlBuilder")});Te("\\hphantom","\\smash{\\phantom{#1}}");Nt({type:"vphantom",names:["\\vphantom"],props:{numArgs:1,allowedInText:!0},handler:o((e,t)=>{var{parser:r}=e,i=t[0];return{type:"vphantom",mode:r.mode,body:i}},"handler"),htmlBuilder:o((e,t)=>{var r=wt(["inner"],[di(e.body,t.withPhantom())]),i=wt(["fix"],[]);return wt(["mord","rlap"],[r,i],t)},"htmlBuilder"),mathmlBuilder:o((e,t)=>{var r=io(wn(e.body),t),i=new Et("mphantom",r),n=new Et("mpadded",[i]);return n.setAttribute("width","0px"),n},"mathmlBuilder")});Nt({type:"raisebox",names:["\\raisebox"],props:{numArgs:2,argTypes:["size","hbox"],allowedInText:!0},handler(e,t){var{parser:r}=e,i=Dr(t[0],"size").value,n=t[1];return{type:"raisebox",mode:r.mode,dy:i,body:n}},htmlBuilder(e,t){var r=di(e.body,t),i=Ki(e.dy,t);return ui({positionType:"shift",positionData:-i,children:[{type:"elem",elem:r}]})},mathmlBuilder(e,t){var r=new Et("mpadded",[Si(e.body,t)]),i=e.dy.number+e.dy.unit;return r.setAttribute("voffset",i),r}});Nt({type:"internal",names:["\\relax"],props:{numArgs:0,allowedInText:!0,allowedInArgument:!0},handler(e){var{parser:t}=e;return{type:"internal",mode:t.mode}}});Nt({type:"rule",names:["\\rule"],props:{numArgs:2,numOptionalArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["size","size","size"]},handler(e,t,r){var{parser:i}=e,n=r[0],a=Dr(t[0],"size"),s=Dr(t[1],"size");return{type:"rule",mode:i.mode,shift:n&&Dr(n,"size").value,width:a.value,height:s.value}},htmlBuilder(e,t){var r=wt(["mord","rule"],[],t),i=Ki(e.width,t),n=Ki(e.height,t),a=e.shift?Ki(e.shift,t):0;return r.style.borderRightWidth=Lt(i),r.style.borderTopWidth=Lt(n),r.style.bottom=Lt(a),r.width=i,r.height=n+a,r.depth=-a,r.maxFontSize=n*1.125*t.sizeMultiplier,r},mathmlBuilder(e,t){var r=Ki(e.width,t),i=Ki(e.height,t),n=e.shift?Ki(e.shift,t):0,a=t.color&&t.getColor()||"black",s=new Et("mspace");s.setAttribute("mathbackground",a),s.setAttribute("width",Lt(r)),s.setAttribute("height",Lt(i));var l=new Et("mpadded",[s]);return n>=0?l.setAttribute("height",Lt(n)):(l.setAttribute("height",Lt(n)),l.setAttribute("depth",Lt(-n))),l.setAttribute("voffset",Lt(n)),l}});o(TR,"sizingGroup");fie=["\\tiny","\\sixptsize","\\scriptsize","\\footnotesize","\\small","\\normalsize","\\large","\\Large","\\LARGE","\\huge","\\Huge"],c9e=o((e,t)=>{var r=t.havingSize(e.size);return TR(e.body,r,t)},"htmlBuilder");Nt({type:"sizing",names:fie,props:{numArgs:0,allowedInText:!0},handler:o((e,t)=>{var{breakOnTokenText:r,funcName:i,parser:n}=e,a=n.parseExpression(!1,r);return{type:"sizing",mode:n.mode,size:fie.indexOf(i)+1,body:a}},"handler"),htmlBuilder:c9e,mathmlBuilder:o((e,t)=>{var r=t.havingSize(e.size),i=io(e.body,r),n=new Et("mstyle",i);return n.setAttribute("mathsize",Lt(r.sizeMultiplier)),n},"mathmlBuilder")});Nt({type:"smash",names:["\\smash"],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:o((e,t,r)=>{var{parser:i}=e,n=!1,a=!1,s=r[0]&&Dr(r[0],"ordgroup");if(s)for(var l="",h=0;h{var r=wt([],[di(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 wt(["mord","smash"],[r],t);if(r.children)for(var i=0;i{var r=new Et("mpadded",[Si(e.body,t)]);return e.smashHeight&&r.setAttribute("height","0px"),e.smashDepth&&r.setAttribute("depth","0px"),r},"mathmlBuilder")});Nt({type:"sqrt",names:["\\sqrt"],props:{numArgs:1,numOptionalArgs:1},handler(e,t,r){var{parser:i}=e,n=r[0],a=t[0];return{type:"sqrt",mode:i.mode,body:a,index:n}},htmlBuilder(e,t){var r=di(e.body,t.havingCrampedStyle());r.height===0&&(r.height=t.fontMetrics().xHeight),r=u0(r,t);var i=t.fontMetrics(),n=i.defaultRuleThickness,a=n;t.style.idr.height+r.depth+s&&(s=(s+p-r.height-r.depth)/2);var f=h.height-r.height-s-u;r.style.paddingLeft=Lt(d);var g=ui({positionType:"firstBaseline",children:[{type:"elem",elem:r,wrapperClasses:["svg-align"]},{type:"kern",size:-(r.height+f)},{type:"elem",elem:h},{type:"kern",size:u}]});if(e.index){var m=t.havingStyle(Lr.SCRIPTSCRIPT),y=di(e.index,m,t),b=.6*(g.height-g.depth),v=ui({positionType:"shift",positionData:-b,children:[{type:"elem",elem:y}]}),T=wt(["root"],[v]);return wt(["mord","sqrt"],[T,g],t)}else return wt(["mord","sqrt"],[g],t)},mathmlBuilder(e,t){var{body:r,index:i}=e;return i?new Et("mroot",[Si(r,t),Si(i,t)]):new Et("msqrt",[Si(r,t)])}});gie={display:Lr.DISPLAY,text:Lr.TEXT,script:Lr.SCRIPT,scriptscript:Lr.SCRIPTSCRIPT};Nt({type:"styling",names:["\\displaystyle","\\textstyle","\\scriptstyle","\\scriptscriptstyle"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e,t){var{breakOnTokenText:r,funcName:i,parser:n}=e,a=n.parseExpression(!0,r),s=i.slice(1,i.length-5);return{type:"styling",mode:n.mode,style:s,body:a}},htmlBuilder(e,t){var r=gie[e.style],i=t.havingStyle(r).withFont("");return TR(e.body,i,t)},mathmlBuilder(e,t){var r=gie[e.style],i=t.havingStyle(r),n=io(e.body,i),a=new Et("mstyle",n),s={display:["0","true"],text:["0","false"],script:["1","false"],scriptscript:["2","false"]},l=s[e.style];return a.setAttribute("scriptlevel",l[0]),a.setAttribute("displaystyle",l[1]),a}});h9e=o(function(e,t){var r=e.base;if(r)if(r.type==="op"){var i=r.limits&&(t.style.size===Lr.DISPLAY.size||r.alwaysHandleSupSub);return i?g0:null}else if(r.type==="operatorname"){var n=r.alwaysHandleSupSub&&(t.style.size===Lr.DISPLAY.size||r.limits);return n?xne:null}else{if(r.type==="accent")return dh(r.base)?yR:null;if(r.type==="horizBrace"){var a=!e.sub;return a===r.isOver?yne:null}else return null}else return null},"htmlBuilderDelegate");Ou({type:"supsub",htmlBuilder(e,t){var r=h9e(e,t);if(r)return r(e,t);var{base:i,sup:n,sub:a}=e,s=di(i,t),l,h,u=t.fontMetrics(),d=0,p=0,f=i&&dh(i);if(n){var g=t.havingStyle(t.style.sup());l=di(n,g,t),f||(d=s.height-g.fontMetrics().supDrop*g.sizeMultiplier/t.sizeMultiplier)}if(a){var m=t.havingStyle(t.style.sub());h=di(a,m,t),f||(p=s.depth+m.fontMetrics().subDrop*m.sizeMultiplier/t.sizeMultiplier)}var y;t.style===Lr.DISPLAY?y=u.sup1:t.style.cramped?y=u.sup3:y=u.sup2;var b=t.sizeMultiplier,v=Lt(.5/u.ptPerEm/b),T=null;if(h){var x=e.base&&e.base.type==="op"&&e.base.name&&(e.base.name==="\\oiint"||e.base.name==="\\oiiint");(s instanceof to||x)&&(T=Lt(-s.italic))}var k;if(l&&h){d=Math.max(d,y,l.depth+.25*u.xHeight),p=Math.max(p,u.sub2);var C=u.defaultRuleThickness,E=4*C;if(d-l.depth-(h.height-p)0&&(d+=w,p-=w)}var _=[{type:"elem",elem:h,shift:p,marginRight:v,marginLeft:T},{type:"elem",elem:l,shift:-d,marginRight:v}];k=ui({positionType:"individualShift",children:_})}else if(h){p=Math.max(p,u.sub1,h.height-.8*u.xHeight);var L=[{type:"elem",elem:h,marginLeft:T,marginRight:v}];k=ui({positionType:"shift",positionData:p,children:L})}else if(l)d=Math.max(d,y,l.depth+.25*u.xHeight),k=ui({positionType:"shift",positionData:-d,children:[{type:"elem",elem:l,marginRight:v}]});else throw new Error("supsub must have either sup or sub.");var N=J8(s,"right")||"mord";return wt([N],[s,wt(["msupsub"],[k])],t)},mathmlBuilder(e,t){var r=!1,i,n;e.base&&e.base.type==="horizBrace"&&(n=!!e.sup,n===e.base.isOver&&(r=!0,i=e.base.isOver)),e.base&&(e.base.type==="op"||e.base.type==="operatorname")&&(e.base.parentIsSupSub=!0);var a=[Si(e.base,t)];e.sub&&a.push(Si(e.sub,t)),e.sup&&a.push(Si(e.sup,t));var s;if(r)s=i?"mover":"munder";else if(e.sub)if(e.sup){var l=e.base;l&&l.type==="op"&&l.limits&&t.style===Lr.DISPLAY||l&&l.type==="operatorname"&&l.alwaysHandleSupSub&&(t.style===Lr.DISPLAY||l.limits)?s="munderover":s="msubsup"}else{var h=e.base;h&&h.type==="op"&&h.limits&&(t.style===Lr.DISPLAY||h.alwaysHandleSupSub)||h&&h.type==="operatorname"&&h.alwaysHandleSupSub&&(h.limits||t.style===Lr.DISPLAY)?s="munder":s="msub"}else{var u=e.base;u&&u.type==="op"&&u.limits&&(t.style===Lr.DISPLAY||u.alwaysHandleSupSub)||u&&u.type==="operatorname"&&u.alwaysHandleSupSub&&(u.limits||t.style===Lr.DISPLAY)?s="mover":s="msup"}return new Et(s,a)}});Ou({type:"atom",htmlBuilder(e,t){return dR(e.text,e.mode,t,["m"+e.family])},mathmlBuilder(e,t){var r=new Et("mo",[Io(e.text,e.mode)]);if(e.family==="bin"){var i=mR(e,t);i==="bold-italic"&&r.setAttribute("mathvariant",i)}else e.family==="punct"?r.setAttribute("separator","true"):(e.family==="open"||e.family==="close")&&r.setAttribute("stretchy","false");return r}});Tne={mi:"italic",mn:"normal",mtext:"normal"};Ou({type:"mathord",htmlBuilder(e,t){return lk(e,t,"mathord")},mathmlBuilder(e,t){var r=new Et("mi",[Io(e.text,e.mode,t)]),i=mR(e,t)||"italic";return i!==Tne[r.type]&&r.setAttribute("mathvariant",i),r}});Ou({type:"textord",htmlBuilder(e,t){return lk(e,t,"textord")},mathmlBuilder(e,t){var r=Io(e.text,e.mode,t),i=mR(e,t)||"normal",n;return e.mode==="text"?n=new Et("mtext",[r]):/[0-9]/.test(e.text)?n=new Et("mn",[r]):e.text==="\\prime"?n=new Et("mo",[r]):n=new Et("mi",[r]),i!==Tne[n.type]&&n.setAttribute("mathvariant",i),n}});j8={"\\nobreak":"nobreak","\\allowbreak":"allowbreak"},G8={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}};Ou({type:"spacing",htmlBuilder(e,t){if(G8.hasOwnProperty(e.text)){var r=G8[e.text].className||"";if(e.mode==="text"){var i=lk(e,t,"textord");return i.classes.push(r),i}else return wt(["mspace",r],[dR(e.text,e.mode,t)],t)}else{if(j8.hasOwnProperty(e.text))return wt(["mspace",j8[e.text]],[],t);throw new St('Unknown type of space "'+e.text+'"')}},mathmlBuilder(e,t){var r;if(G8.hasOwnProperty(e.text))r=new Et("mtext",[new En("\xA0")]);else{if(j8.hasOwnProperty(e.text))return new Et("mspace");throw new St('Unknown type of space "'+e.text+'"')}return r}});mie=o(()=>{var e=new Et("mtd",[]);return e.setAttribute("width","50%"),e},"pad");Ou({type:"tag",mathmlBuilder(e,t){var r=new Et("mtable",[new Et("mtr",[mie(),new Et("mtd",[Nu(e.body,t)]),mie(),new Et("mtd",[Nu(e.tag,t)])])]);return r.setAttribute("width","100%"),r}});yie={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},vie={"\\textbf":"textbf","\\textmd":"textmd"},u9e={"\\textit":"textit","\\textup":"textup"},bie=o((e,t)=>{var r=e.font;if(r){if(yie[r])return t.withTextFontFamily(yie[r]);if(vie[r])return t.withTextFontWeight(vie[r]);if(r==="\\emph")return t.fontShape==="textit"?t.withTextFontShape("textup"):t.withTextFontShape("textit")}else return t;return t.withTextFontShape(u9e[r])},"optionsWithFont");Nt({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:i}=e,n=t[0];return{type:"text",mode:r.mode,body:wn(n),font:i}},htmlBuilder(e,t){var r=bie(e,t),i=On(e.body,r,!0);return wt(["mord","text"],i,r)},mathmlBuilder(e,t){var r=bie(e,t);return Nu(e.body,r)}});Nt({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=di(e.body,t),i=h0("underline-line",t),n=t.fontMetrics().defaultRuleThickness,a=ui({positionType:"top",positionData:r.height,children:[{type:"kern",size:n},{type:"elem",elem:i},{type:"kern",size:3*n},{type:"elem",elem:r}]});return wt(["mord","underline"],[a],t)},mathmlBuilder(e,t){var r=new Et("mo",[new En("\u203E")]);r.setAttribute("stretchy","true");var i=new Et("munder",[Si(e.body,t),r]);return i.setAttribute("accentunder","true"),i}});Nt({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=di(e.body,t),i=t.fontMetrics().axisHeight,n=.5*(r.height-i-(r.depth+i));return ui({positionType:"shift",positionData:n,children:[{type:"elem",elem:r}]})},mathmlBuilder(e,t){var r=new Et("mpadded",[Si(e.body,t)],["vcenter"]);return new Et("mrow",[r])}});Nt({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler(e,t,r){throw new St("\\verb ended by end of line instead of matching delimiter")},htmlBuilder(e,t){for(var r=xie(e),i=[],n=t.havingStyle(t.style.text()),a=0;ae.body.replace(/ /g,e.star?"\u2423":"\xA0"),"makeVerb"),$u=qie,kne=`[ \r + ]`,d9e="\\\\[a-zA-Z@]+",p9e="\\\\[^\uD800-\uDFFF]",f9e="("+d9e+")"+kne+"*",g9e=`\\\\( +|[ \r ]+ +?)[ \r ]*`,sR="[\u0300-\u036F]",m9e=new RegExp(sR+"+$"),y9e="("+kne+"+)|"+(g9e+"|")+"([!-\\[\\]-\u2027\u202A-\uD7FF\uF900-\uFFFF]"+(sR+"*")+"|[\uD800-\uDBFF][\uDC00-\uDFFF]"+(sR+"*")+"|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5"+("|"+f9e)+("|"+p9e+")"),Tie=class{static{o(this,"Lexer")}constructor(e,t){this.input=e,this.settings=t,this.tokenRegex=new RegExp(y9e,"g"),this.catcodes={"%":14,"~":13}}setCatcode(e,t){this.catcodes[e]=t}lex(){var e=this.input,t=this.tokenRegex.lastIndex;if(t===e.length)return new gl("EOF",new Lo(this,t,t));var r=this.tokenRegex.exec(e);if(r===null||r.index!==t)throw new St("Unexpected character: '"+e[t]+"'",new gl(e[t],new Lo(this,t,t+1)));var i=r[6]||r[3]||(r[2]?"\\ ":" ");if(this.catcodes[i]===14){var n=e.indexOf(` +`,this.tokenRegex.lastIndex);return n===-1?(this.tokenRegex.lastIndex=e.length,this.settings.reportNonstrict("commentAtEnd","% comment has no terminating newline; LaTeX would fail because of commenting the end of math mode (e.g. $)")):this.tokenRegex.lastIndex=n+1,this.lex()}return new gl(i,new Lo(this,t,this.tokenRegex.lastIndex))}},v9e=class{static{o(this,"Namespace")}constructor(e,t){e===void 0&&(e={}),t===void 0&&(t={}),this.current=t,this.builtins=e,this.undefStack=[]}beginGroup(){this.undefStack.push({})}endGroup(){if(this.undefStack.length===0)throw new St("Unbalanced namespace destruction: attempt to pop global namespace; please report this as a bug");var e=this.undefStack.pop();for(var t in e)e.hasOwnProperty(t)&&(e[t]==null?delete this.current[t]:this.current[t]=e[t])}endGroups(){for(;this.undefStack.length>0;)this.endGroup()}has(e){return this.current.hasOwnProperty(e)||this.builtins.hasOwnProperty(e)}get(e){return this.current.hasOwnProperty(e)?this.current[e]:this.builtins[e]}set(e,t,r){if(r===void 0&&(r=!1),r){for(var i=0;i0&&(this.undefStack[this.undefStack.length-1][e]=t)}else{var n=this.undefStack[this.undefStack.length-1];n&&!n.hasOwnProperty(e)&&(n[e]=this.current[e])}t==null?delete this.current[e]:this.current[e]=t}},b9e=hne;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}});kie={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,i=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]==="\\")i=t.text.charCodeAt(1);else{if(t.text==="EOF")throw new St("\\char` missing argument");i=t.text.charCodeAt(0)}else r=10;if(r){if(i=kie[t.text],i==null||i>=r)throw new St("Invalid base-"+r+" digit "+t.text);for(var n;(n=kie[e.future().text])!=null&&n{var n=e.consumeArg().tokens;if(n.length!==1)throw new St("\\newcommand's first argument must be a macro name");var a=n[0].text,s=e.isDefined(a);if(s&&!t)throw new St("\\newcommand{"+a+"} attempting to redefine "+(a+"; use \\renewcommand"));if(!s&&!r)throw new St("\\renewcommand{"+a+"} when command "+a+" does not yet exist; use \\newcommand");var l=0;if(n=e.consumeArg().tokens,n.length===1&&n[0].text==="["){for(var h="",u=e.expandNextToken();u.text!=="]"&&u.text!=="EOF";)h+=u.text,u=e.expandNextToken();if(!h.match(/^\s*[0-9]+\s*$/))throw new St("Invalid number of arguments: "+h);l=parseInt(h),n=e.consumeArg().tokens}return s&&i||e.macros.set(a,{tokens:n,numArgs:l}),""},"newcommand");Te("\\newcommand",e=>kR(e,!1,!0,!1));Te("\\renewcommand",e=>kR(e,!0,!1,!1));Te("\\providecommand",e=>kR(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),$u[r],qi.math[r],qi.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}}");Cie={",":"\\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"},x9e=new Set(["bin","rel"]);Te("\\dots",function(e){var t="\\dotso",r=e.expandAfterFuture().text;return r in Cie?t=Cie[r]:(r.slice(0,4)==="\\not"||r in qi.math&&x9e.has(qi.math[r].group))&&(t="\\dotsb"),t});CR={")":!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 CR?"\\ldots\\,":"\\ldots"});Te("\\dotsc",function(e){var t=e.future().text;return t in CR&&t!==","?"\\ldots\\,":"\\ldots"});Te("\\cdots",function(e){var t=e.future().text;return t in CR?"\\@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 St("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}}");Cne=Lt(ic["Main-Regular"][84][1]-.7*ic["Main-Regular"][65][1]);Te("\\LaTeX","\\textrm{\\html@mathml{"+("L\\kern-.36em\\raisebox{"+Cne+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{LaTeX}}");Te("\\KaTeX","\\textrm{\\html@mathml{"+("K\\kern-.17em\\raisebox{"+Cne+"}{\\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");wne=o(e=>t=>{var r=t.consumeArg().tokens,i=t.consumeArg().tokens,n=t.consumeArg().tokens,a=t.consumeArg().tokens,s=t.macros.get("|"),l=t.macros.get("\\|");t.macros.beginGroup();var h=o(p=>f=>{e&&(f.macros.set("|",s),n.length&&f.macros.set("\\|",l));var g=p;if(!p&&n.length){var m=f.future();m.text==="|"&&(f.popToken(),g=!0)}return{tokens:g?n:i,numArgs:0}},"midMacro");t.macros.set("|",h(!1)),n.length&&t.macros.set("\\|",h(!0));var u=t.consumeArg().tokens,d=t.expandTokens([...a,...u,...r]);return t.macros.endGroup(),{tokens:d.reverse(),numArgs:0}},"braketHelper");Te("\\bra@ket",wne(!1));Te("\\bra@set",wne(!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}");Ene={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0},T9e=class{static{o(this,"MacroExpander")}constructor(e,t,r){this.settings=t,this.expansionCount=0,this.feed(e),this.macros=new v9e(b9e,t.macros),this.mode=r,this.stack=[]}feed(e){this.lexer=new Tie(e,this.settings)}switchMode(e){this.mode=e}beginGroup(){this.macros.beginGroup()}endGroup(){this.macros.endGroup()}endGroups(){this.macros.endGroups()}future(){return this.stack.length===0&&this.pushToken(this.lexer.lex()),this.stack[this.stack.length-1]}popToken(){return this.future(),this.stack.pop()}pushToken(e){this.stack.push(e)}pushTokens(e){this.stack.push(...e)}scanArgument(e){var t,r,i;if(e){if(this.consumeSpaces(),this.future().text!=="[")return null;t=this.popToken(),{tokens:i,end:r}=this.consumeArg(["]"])}else({tokens:i,start:t,end:r}=this.consumeArg());return this.pushToken(new gl("EOF",r.loc)),this.pushTokens(i),new gl("",Lo.range(t,r))}consumeSpaces(){for(;;){var e=this.future();if(e.text===" ")this.stack.pop();else break}}consumeArg(e){var t=[],r=e&&e.length>0;r||this.consumeSpaces();var i=this.future(),n,a=0,s=0;do{if(n=this.popToken(),t.push(n),n.text==="{")++a;else if(n.text==="}"){if(--a,a===-1)throw new St("Extra }",n)}else if(n.text==="EOF")throw new St("Unexpected end of input in a macro argument, expected '"+(e&&r?e[s]:"}")+"'",n);if(e&&r)if((a===0||a===1&&e[s]==="{")&&n.text===e[s]){if(++s,s===e.length){t.splice(-s,s);break}}else s=0}while(a!==0||r);return i.text==="{"&&t[t.length-1].text==="}"&&(t.pop(),t.shift()),t.reverse(),{tokens:t,start:i,end:n}}consumeArgs(e,t){if(t){if(t.length!==e+1)throw new St("The length of delimiters doesn't match the number of args!");for(var r=t[0],i=0;ithis.settings.maxExpand)throw new St("Too many expansions: infinite loop or need to increase maxExpand setting")}expandOnce(e){var t=this.popToken(),r=t.text,i=t.noexpand?null:this._getExpansion(r);if(i==null||e&&i.unexpandable){if(e&&i==null&&r[0]==="\\"&&!this.isDefined(r))throw new St("Undefined control sequence: "+r);return this.pushToken(t),!1}this.countExpansion(1);var n=i.tokens,a=this.consumeArgs(i.numArgs,i.delimiters);if(i.numArgs){n=n.slice();for(var s=n.length-1;s>=0;--s){var l=n[s];if(l.text==="#"){if(s===0)throw new St("Incomplete placeholder at end of macro body",l);if(l=n[--s],l.text==="#")n.splice(s+1,1);else if(/^[1-9]$/.test(l.text))n.splice(s,2,...a[+l.text-1]);else throw new St("Not a valid argument number",l)}}}return this.pushTokens(n),n.length}expandAfterFuture(){return this.expandOnce(),this.future()}expandNextToken(){for(;;)if(this.expandOnce()===!1){var e=this.stack.pop();return e.treatAsRelax&&(e.text="\\relax"),e}}expandMacro(e){return this.macros.has(e)?this.expandTokens([new gl(e)]):void 0}expandTokens(e){var t=[],r=this.stack.length;for(this.pushTokens(e);this.stack.length>r;)if(this.expandOnce(!0)===!1){var i=this.stack.pop();i.treatAsRelax&&(i.noexpand=!1,i.treatAsRelax=!1),t.push(i)}return this.countExpansion(t.length),t}expandMacroAsText(e){var t=this.expandMacro(e);return t&&t.map(r=>r.text).join("")}_getExpansion(e){var t=this.macros.get(e);if(t==null)return t;if(e.length===1){var r=this.lexer.catcodes[e];if(r!=null&&r!==13)return}var i=typeof t=="function"?t(this):t;if(typeof i=="string"){var n=0;if(i.includes("#"))for(var a=i.replace(/##/g,"");a.includes("#"+(n+1));)++n;for(var s=new Tie(i,this.settings),l=[],h=s.lex();h.text!=="EOF";)l.push(h),h=s.lex();l.reverse();var u={tokens:l,numArgs:n};return u}return i}isDefined(e){return this.macros.has(e)||$u.hasOwnProperty(e)||qi.math.hasOwnProperty(e)||qi.text.hasOwnProperty(e)||Ene.hasOwnProperty(e)}isExpandable(e){var t=this.macros.get(e);return t!=null?typeof t=="string"||typeof t=="function"||!t.unexpandable:$u.hasOwnProperty(e)&&!$u[e].primitive}},wie=/^[₊₋₌₍₎₀₁₂₃₄₅₆₇₈₉ₐₑₕᵢⱼₖₗₘₙₒₚᵣₛₜᵤᵥₓᵦᵧᵨᵩᵪ]/,X4=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"}),W8={"\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"}},Eie={\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"},Sne=class _ne{static{o(this,"Parser")}constructor(t,r){this.mode="math",this.gullet=new T9e(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 St("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 gl("}")),this.gullet.pushTokens(t);var i=this.parseExpression(!1);return this.expect("}"),this.nextToken=r,i}parseExpression(t,r){for(var i=[];;){this.mode==="math"&&this.consumeSpaces();var n=this.fetch();if(_ne.endOfExpression.has(n.text)||r&&n.text===r||t&&$u[n.text]&&$u[n.text].infix)break;var a=this.parseAtom(r);if(a){if(a.type==="internal")continue}else break;i.push(a)}return this.mode==="text"&&this.formLigatures(i),this.handleInfixNodes(i)}handleInfixNodes(t){for(var r=-1,i,n=0;n=128)this.settings.strict&&(hR(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)),s={type:"textord",mode:"text",loc:Lo.range(t),text:r};else return null;if(this.consume(),a)for(var p=0;p1?r-1:0),n=1;n2&&arguments[2]!==void 0?arguments[2]:wk;Pne&&Pne(e,null);let i=t.length;for(;i--;){let n=t[i];if(typeof n=="string"){let a=r(n);a!==n&&(CDe(t)||(t[i]=a),n=a)}e[n]=!0}return e}function uae(e){for(let t=0;t0&&arguments[0]!==void 0?arguments[0]:zDe(),t=o(Ee=>GR(Ee),"DOMPurify");if(t.version="3.4.0",t.removed=[],!e||!e.document||e.document.nodeType!==T2.document||!e.Element)return t.isSupported=!1,t;let{document:r}=e,i=r,n=i.currentScript,{DocumentFragment:a,HTMLTemplateElement:s,Node:l,Element:h,NodeFilter:u,NamedNodeMap:d=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:p,DOMParser:f,trustedTypes:g}=e,m=h.prototype,y=y0(m,"cloneNode"),b=y0(m,"remove"),v=y0(m,"nextSibling"),T=y0(m,"childNodes"),x=y0(m,"parentNode");if(typeof s=="function"){let Ee=r.createElement("template");Ee.content&&Ee.content.ownerDocument&&(r=Ee.content.ownerDocument)}let k,C="",{implementation:E,createNodeIterator:w,createDocumentFragment:_,getElementsByTagName:L}=r,{importNode:N}=i,D=Une();t.isSupported=typeof cae=="function"&&typeof x=="function"&&E&&E.createHTMLDocument!==void 0;let{MUSTACHE_EXPR:M,ERB_EXPR:B,TMPLIT_EXPR:A,DATA_ATTR:I,ARIA_ATTR:O,IS_SCRIPT_OR_DATA:R,ATTR_WHITESPACE:$,CUSTOM_ELEMENT:F}=Wne,{IS_ALLOWED_URI:P}=Wne,z=null,q=Br({},[...zne,...AR,...RR,...LR,...qne]),G=null,W=Br({},[...jne,...$R,...Gne,...xk]),J=Object.seal(k2(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}})),H=null,Z=null,se=Object.seal(k2(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}})),Q=!0,te=!0,re=!1,ne=!0,Ae=!1,ie=!0,me=!1,oe=!1,we=!1,ye=!1,ve=!1,ae=!1,Pe=!0,X=!1,ce="user-content-",ge=!0,be=!1,ke={},Me=null,pe=Br({},["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"]),Oe=null,j=Br({},["audio","video","img","source","image","track"]),le=null,U=Br({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),fe="http://www.w3.org/1998/Math/MathML",Y="http://www.w3.org/2000/svg",Le="http://www.w3.org/1999/xhtml",xe=Le,je=!1,Ie=null,Ve=Br({},[fe,Y,Le],SR),Ne=Br({},["mi","mo","mn","ms","mtext"]),Ge=Br({},["annotation-xml"]),ze=Br({},["title","style","font","a","script"]),Ue=null,Ce=["application/xhtml+xml","text/html"],ct="text/html",Se=null,at=null,dt=r.createElement("form"),gt=o(function(Ee){return Ee instanceof RegExp||Ee instanceof Function},"isRegexOrFunction"),Ct=o(function(){let Ee=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(at&&at===Ee)){if((!Ee||typeof Ee!="object")&&(Ee={}),Ee=vl(Ee),Ue=Ce.indexOf(Ee.PARSER_MEDIA_TYPE)===-1?ct:Ee.PARSER_MEDIA_TYPE,Se=Ue==="application/xhtml+xml"?SR:wk,z=yl(Ee,"ALLOWED_TAGS")?Br({},Ee.ALLOWED_TAGS,Se):q,G=yl(Ee,"ALLOWED_ATTR")?Br({},Ee.ALLOWED_ATTR,Se):W,Ie=yl(Ee,"ALLOWED_NAMESPACES")?Br({},Ee.ALLOWED_NAMESPACES,SR):Ve,le=yl(Ee,"ADD_URI_SAFE_ATTR")?Br(vl(U),Ee.ADD_URI_SAFE_ATTR,Se):U,Oe=yl(Ee,"ADD_DATA_URI_TAGS")?Br(vl(j),Ee.ADD_DATA_URI_TAGS,Se):j,Me=yl(Ee,"FORBID_CONTENTS")?Br({},Ee.FORBID_CONTENTS,Se):pe,H=yl(Ee,"FORBID_TAGS")?Br({},Ee.FORBID_TAGS,Se):vl({}),Z=yl(Ee,"FORBID_ATTR")?Br({},Ee.FORBID_ATTR,Se):vl({}),ke=yl(Ee,"USE_PROFILES")?Ee.USE_PROFILES:!1,Q=Ee.ALLOW_ARIA_ATTR!==!1,te=Ee.ALLOW_DATA_ATTR!==!1,re=Ee.ALLOW_UNKNOWN_PROTOCOLS||!1,ne=Ee.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Ae=Ee.SAFE_FOR_TEMPLATES||!1,ie=Ee.SAFE_FOR_XML!==!1,me=Ee.WHOLE_DOCUMENT||!1,ye=Ee.RETURN_DOM||!1,ve=Ee.RETURN_DOM_FRAGMENT||!1,ae=Ee.RETURN_TRUSTED_TYPE||!1,we=Ee.FORCE_BODY||!1,Pe=Ee.SANITIZE_DOM!==!1,X=Ee.SANITIZE_NAMED_PROPS||!1,ge=Ee.KEEP_CONTENT!==!1,be=Ee.IN_PLACE||!1,P=Ee.ALLOWED_URI_REGEXP||dae,xe=Ee.NAMESPACE||Le,Ne=Ee.MATHML_TEXT_INTEGRATION_POINTS||Ne,Ge=Ee.HTML_INTEGRATION_POINTS||Ge,J=Ee.CUSTOM_ELEMENT_HANDLING||k2(null),Ee.CUSTOM_ELEMENT_HANDLING&>(Ee.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(J.tagNameCheck=Ee.CUSTOM_ELEMENT_HANDLING.tagNameCheck),Ee.CUSTOM_ELEMENT_HANDLING&>(Ee.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(J.attributeNameCheck=Ee.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),Ee.CUSTOM_ELEMENT_HANDLING&&typeof Ee.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(J.allowCustomizedBuiltInElements=Ee.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Ae&&(te=!1),ve&&(ye=!0),ke&&(z=Br({},qne),G=k2(null),ke.html===!0&&(Br(z,zne),Br(G,jne)),ke.svg===!0&&(Br(z,AR),Br(G,$R),Br(G,xk)),ke.svgFilters===!0&&(Br(z,RR),Br(G,$R),Br(G,xk)),ke.mathMl===!0&&(Br(z,LR),Br(G,Gne),Br(G,xk))),se.tagCheck=null,se.attributeCheck=null,Ee.ADD_TAGS&&(typeof Ee.ADD_TAGS=="function"?se.tagCheck=Ee.ADD_TAGS:(z===q&&(z=vl(z)),Br(z,Ee.ADD_TAGS,Se))),Ee.ADD_ATTR&&(typeof Ee.ADD_ATTR=="function"?se.attributeCheck=Ee.ADD_ATTR:(G===W&&(G=vl(G)),Br(G,Ee.ADD_ATTR,Se))),Ee.ADD_URI_SAFE_ATTR&&Br(le,Ee.ADD_URI_SAFE_ATTR,Se),Ee.FORBID_CONTENTS&&(Me===pe&&(Me=vl(Me)),Br(Me,Ee.FORBID_CONTENTS,Se)),Ee.ADD_FORBID_CONTENTS&&(Me===pe&&(Me=vl(Me)),Br(Me,Ee.ADD_FORBID_CONTENTS,Se)),ge&&(z["#text"]=!0),me&&Br(z,["html","head","body"]),z.table&&(Br(z,["tbody"]),delete H.tbody),Ee.TRUSTED_TYPES_POLICY){if(typeof Ee.TRUSTED_TYPES_POLICY.createHTML!="function")throw x2('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof Ee.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw x2('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');k=Ee.TRUSTED_TYPES_POLICY,C=k.createHTML("")}else k===void 0&&(k=qDe(g,n)),k!==null&&typeof C=="string"&&(C=k.createHTML(""));cs&&cs(Ee),at=Ee}},"_parseConfig"),kt=Br({},[...AR,...RR,...LDe]),$t=Br({},[...LR,...$De]),ut=o(function(Ee){let ot=x(Ee);(!ot||!ot.tagName)&&(ot={namespaceURI:xe,tagName:"template"});let Be=wk(Ee.tagName),Ke=wk(ot.tagName);return Ie[Ee.namespaceURI]?Ee.namespaceURI===Y?ot.namespaceURI===Le?Be==="svg":ot.namespaceURI===fe?Be==="svg"&&(Ke==="annotation-xml"||Ne[Ke]):!!kt[Be]:Ee.namespaceURI===fe?ot.namespaceURI===Le?Be==="math":ot.namespaceURI===Y?Be==="math"&&Ge[Ke]:!!$t[Be]:Ee.namespaceURI===Le?ot.namespaceURI===Y&&!Ge[Ke]||ot.namespaceURI===fe&&!Ne[Ke]?!1:!$t[Be]&&(ze[Be]||!kt[Be]):!!(Ue==="application/xhtml+xml"&&Ie[Ee.namespaceURI]):!1},"_checkValidNamespace"),de=o(function(Ee){b2(t.removed,{element:Ee});try{x(Ee).removeChild(Ee)}catch{b(Ee)}},"_forceRemove"),st=o(function(Ee,ot){try{b2(t.removed,{attribute:ot.getAttributeNode(Ee),from:ot})}catch{b2(t.removed,{attribute:null,from:ot})}if(ot.removeAttribute(Ee),Ee==="is")if(ye||ve)try{de(ot)}catch{}else try{ot.setAttribute(Ee,"")}catch{}},"_removeAttribute"),nt=o(function(Ee){let ot=null,Be=null;if(we)Ee=""+Ee;else{let At=_R(Ee,/^[\r\n\t ]+/);Be=At&&At[0]}Ue==="application/xhtml+xml"&&xe===Le&&(Ee=''+Ee+"");let Ke=k?k.createHTML(Ee):Ee;if(xe===Le)try{ot=new f().parseFromString(Ke,Ue)}catch{}if(!ot||!ot.documentElement){ot=E.createDocument(xe,"template",null);try{ot.documentElement.innerHTML=je?C:Ke}catch{}}let ht=ot.body||ot.documentElement;return Ee&&Be&&ht.insertBefore(r.createTextNode(Be),ht.childNodes[0]||null),xe===Le?L.call(ot,me?"html":"body")[0]:me?ot.documentElement:ht},"_initDocument"),rt=o(function(Ee){return w.call(Ee.ownerDocument||Ee,Ee,u.SHOW_ELEMENT|u.SHOW_COMMENT|u.SHOW_TEXT|u.SHOW_PROCESSING_INSTRUCTION|u.SHOW_CDATA_SECTION,null)},"_createNodeIterator"),_e=o(function(Ee){return Ee instanceof p&&(typeof Ee.nodeName!="string"||typeof Ee.textContent!="string"||typeof Ee.removeChild!="function"||!(Ee.attributes instanceof d)||typeof Ee.removeAttribute!="function"||typeof Ee.setAttribute!="function"||typeof Ee.namespaceURI!="string"||typeof Ee.insertBefore!="function"||typeof Ee.hasChildNodes!="function")},"_isClobbered"),Ze=o(function(Ee){return typeof l=="function"&&Ee instanceof l},"_isNode");function He(Ee,ot,Be){v2(Ee,Ke=>{Ke.call(t,ot,Be,at)})}o(He,"_executeHooks");let yt=o(function(Ee){let ot=null;if(He(D.beforeSanitizeElements,Ee,null),_e(Ee))return de(Ee),!0;let Be=Se(Ee.nodeName);if(He(D.uponSanitizeElement,Ee,{tagName:Be,allowedTags:z}),ie&&Ee.hasChildNodes()&&!Ze(Ee.firstElementChild)&&ls(/<[/\w!]/g,Ee.innerHTML)&&ls(/<[/\w!]/g,Ee.textContent)||ie&&Ee.namespaceURI===Le&&Be==="style"&&Ze(Ee.firstElementChild)||Ee.nodeType===T2.progressingInstruction||ie&&Ee.nodeType===T2.comment&&ls(/<[/\w]/g,Ee.data))return de(Ee),!0;if(H[Be]||!(se.tagCheck instanceof Function&&se.tagCheck(Be))&&!z[Be]){if(!H[Be]&&Ot(Be)&&(J.tagNameCheck instanceof RegExp&&ls(J.tagNameCheck,Be)||J.tagNameCheck instanceof Function&&J.tagNameCheck(Be)))return!1;if(ge&&!Me[Be]){let Ke=x(Ee)||Ee.parentNode,ht=T(Ee)||Ee.childNodes;if(ht&&Ke){let At=ht.length;for(let Yt=At-1;Yt>=0;--Yt){let Xt=y(ht[Yt],!0);Xt.__removalCount=(Ee.__removalCount||0)+1,Ke.insertBefore(Xt,v(Ee))}}}return de(Ee),!0}return Ee instanceof h&&!ut(Ee)||(Be==="noscript"||Be==="noembed"||Be==="noframes")&&ls(/<\/no(script|embed|frames)/i,Ee.innerHTML)?(de(Ee),!0):(Ae&&Ee.nodeType===T2.text&&(ot=Ee.textContent,v2([M,B,A],Ke=>{ot=m0(ot,Ke," ")}),Ee.textContent!==ot&&(b2(t.removed,{element:Ee.cloneNode()}),Ee.textContent=ot)),He(D.afterSanitizeElements,Ee,null),!1)},"_sanitizeElements"),_t=o(function(Ee,ot,Be){if(Z[ot]||Pe&&(ot==="id"||ot==="name")&&(Be in r||Be in dt))return!1;if(!(te&&!Z[ot]&&ls(I,ot))&&!(Q&&ls(O,ot))&&!(se.attributeCheck instanceof Function&&se.attributeCheck(ot,Ee))){if(!G[ot]||Z[ot]){if(!(Ot(Ee)&&(J.tagNameCheck instanceof RegExp&&ls(J.tagNameCheck,Ee)||J.tagNameCheck instanceof Function&&J.tagNameCheck(Ee))&&(J.attributeNameCheck instanceof RegExp&&ls(J.attributeNameCheck,ot)||J.attributeNameCheck instanceof Function&&J.attributeNameCheck(ot,Ee))||ot==="is"&&J.allowCustomizedBuiltInElements&&(J.tagNameCheck instanceof RegExp&&ls(J.tagNameCheck,Be)||J.tagNameCheck instanceof Function&&J.tagNameCheck(Be))))return!1}else if(!le[ot]&&!ls(P,m0(Be,$,""))&&!((ot==="src"||ot==="xlink:href"||ot==="href")&&Ee!=="script"&&ADe(Be,"data:")===0&&Oe[Ee])&&!(re&&!ls(R,m0(Be,$,"")))&&Be)return!1}return!0},"_isValidAttribute"),Ot=o(function(Ee){return Ee!=="annotation-xml"&&_R(Ee,F)},"_isBasicCustomElement"),ir=o(function(Ee){He(D.beforeSanitizeAttributes,Ee,null);let{attributes:ot}=Ee;if(!ot||_e(Ee))return;let Be={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:G,forceKeepAttr:void 0},Ke=ot.length;for(;Ke--;){let ht=ot[Ke],{name:At,namespaceURI:Yt,value:Xt}=ht,fr=Se(At),Zr=Xt,Gt=At==="value"?Zr:RDe(Zr);if(Be.attrName=fr,Be.attrValue=Gt,Be.keepAttr=!0,Be.forceKeepAttr=void 0,He(D.uponSanitizeAttribute,Ee,Be),Gt=Be.attrValue,X&&(fr==="id"||fr==="name")&&(st(At,Ee),Gt=ce+Gt),ie&&ls(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,Gt)){st(At,Ee);continue}if(fr==="attributename"&&_R(Gt,"href")){st(At,Ee);continue}if(Be.forceKeepAttr)continue;if(!Be.keepAttr){st(At,Ee);continue}if(!ne&&ls(/\/>/i,Gt)){st(At,Ee);continue}Ae&&v2([M,B,A],it=>{Gt=m0(Gt,it," ")});let Ur=Se(Ee.nodeName);if(!_t(Ur,fr,Gt)){st(At,Ee);continue}if(k&&typeof g=="object"&&typeof g.getAttributeType=="function"&&!Yt)switch(g.getAttributeType(Ur,fr)){case"TrustedHTML":{Gt=k.createHTML(Gt);break}case"TrustedScriptURL":{Gt=k.createScriptURL(Gt);break}}if(Gt!==Zr)try{Yt?Ee.setAttributeNS(Yt,At,Gt):Ee.setAttribute(At,Gt),_e(Ee)?de(Ee):Fne(t.removed)}catch{st(At,Ee)}}He(D.afterSanitizeAttributes,Ee,null)},"_sanitizeAttributes"),ur=o(function(Ee){let ot=null,Be=rt(Ee);for(He(D.beforeSanitizeShadowDOM,Ee,null);ot=Be.nextNode();)He(D.uponSanitizeShadowNode,ot,null),yt(ot),ir(ot),ot.content instanceof a&&ur(ot.content);He(D.afterSanitizeShadowDOM,Ee,null)},"_sanitizeShadowDOM");return t.sanitize=function(Ee){let ot=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Be=null,Ke=null,ht=null,At=null;if(je=!Ee,je&&(Ee=""),typeof Ee!="string"&&!Ze(Ee))if(typeof Ee.toString=="function"){if(Ee=Ee.toString(),typeof Ee!="string")throw x2("dirty is not a string, aborting")}else throw x2("toString is not a function");if(!t.isSupported)return Ee;if(oe||Ct(ot),t.removed=[],typeof Ee=="string"&&(be=!1),be){if(Ee.nodeName){let fr=Se(Ee.nodeName);if(!z[fr]||H[fr])throw x2("root node is forbidden and cannot be sanitized in-place")}}else if(Ee instanceof l)Be=nt(""),Ke=Be.ownerDocument.importNode(Ee,!0),Ke.nodeType===T2.element&&Ke.nodeName==="BODY"||Ke.nodeName==="HTML"?Be=Ke:Be.appendChild(Ke);else{if(!ye&&!Ae&&!me&&Ee.indexOf("<")===-1)return k&&ae?k.createHTML(Ee):Ee;if(Be=nt(Ee),!Be)return ye?null:ae?C:""}Be&&we&&de(Be.firstChild);let Yt=rt(be?Ee:Be);for(;ht=Yt.nextNode();)yt(ht),ir(ht),ht.content instanceof a&&ur(ht.content);if(be)return Ee;if(ye){if(Ae){Be.normalize();let fr=Be.innerHTML;v2([M,B,A],Zr=>{fr=m0(fr,Zr," ")}),Be.innerHTML=fr}if(ve)for(At=_.call(Be.ownerDocument);Be.firstChild;)At.appendChild(Be.firstChild);else At=Be;return(G.shadowroot||G.shadowrootmode)&&(At=N.call(i,At,!0)),At}let Xt=me?Be.outerHTML:Be.innerHTML;return me&&z["!doctype"]&&Be.ownerDocument&&Be.ownerDocument.doctype&&Be.ownerDocument.doctype.name&&ls(pae,Be.ownerDocument.doctype.name)&&(Xt=" +`+Xt),Ae&&v2([M,B,A],fr=>{Xt=m0(Xt,fr," ")}),k&&ae?k.createHTML(Xt):Xt},t.setConfig=function(){let Ee=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Ct(Ee),oe=!0},t.clearConfig=function(){at=null,oe=!1},t.isValidAttribute=function(Ee,ot,Be){at||Ct({});let Ke=Se(Ee),ht=Se(ot);return _t(Ke,ht,Be)},t.addHook=function(Ee,ot){typeof ot=="function"&&b2(D[Ee],ot)},t.removeHook=function(Ee,ot){if(ot!==void 0){let Be=SDe(D[Ee],ot);return Be===-1?void 0:_De(D[Ee],Be,1)[0]}return Fne(D[Ee])},t.removeHooks=function(Ee){D[Ee]=[]},t.removeAllHooks=function(){D=Une()},t}function fae(){let e="data-temp-href-target";no.addHook("beforeSanitizeAttributes",t=>{t.tagName==="A"&&t.hasAttribute("target")&&t.setAttribute(e,t.getAttribute("target")??"")}),no.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"))})}function Dk(e){return[...e.cssRules].map(t=>t.cssText).join(` +`)}var IR,Ni,Tk,C9e,w9e,E9e,S9e,_9e,A9e,Sr,Bu,Ga,R9e,L9e,$9e,I9e,D9e,Rk,Xne,C2,kk,vk,Ck,One,Kne,bk,M9e,bl,N9e,Zne,O9e,Ds,B9e,v0,P9e,F9e,z9e,q9e,j9e,Bn,G9e,OR,W9e,Je,U9e,et,V9e,BR,Y9e,ue,H9e,X9e,K9e,Xe,oc,lc,br,Z9e,Q9e,J9e,eDe,tDe,Ua,rDe,iDe,nDe,aDe,sDe,oDe,lDe,cDe,hDe,uDe,dDe,pDe,fDe,gDe,mDe,yDe,sc,aa,Qne,Jne,vDe,rr,bDe,xDe,E2,PR,Ep,Mo,Is,_k,wp,w2,Lk,eae,tae,rae,FR,zR,Rt,iae,nae,S2,TDe,Bne,aae,sae,$k,Qr,qR,b0,kDe,jR,Pu,_2,Ik,oae,lae,cae,Pne,CDe,wDe,EDe,cs,Do,k2,DR,MR,v2,SDe,Fne,b2,_De,wk,SR,_R,m0,ADe,RDe,yl,ls,x2,zne,AR,RR,LDe,LR,$De,qne,jne,$R,Gne,xk,IDe,DDe,MDe,NDe,ODe,dae,BDe,PDe,pae,FDe,Wne,T2,zDe,qDe,Une,no,Sp,jDe,GDe,gae,Vne,nr,WDe,UDe,VDe,YDe,mae,_p,HDe,XDe,cc,NR,KDe,ZDe,Yne,Ek,Gi,x0,QDe,T0,ft,JDe,eMe,Ir,hc,Sk,tMe,rMe,yae,Mk,WR,UR,VR,YR,ar,gr,xr,Tr,kr,_r,Cr,Hne,iMe,De,A2,Nk,Ok,R2,nMe,Ak,L2,Bk,aMe,tr=Tt(()=>{Zt();vt();IR=o((e,t,{depth:r=2,clobber:i=!1}={})=>{let n={depth:r,clobber:i};return Array.isArray(t)&&!Array.isArray(e)?(t.forEach(a=>IR(e,a,n)),e):Array.isArray(t)&&Array.isArray(e)?(t.forEach(a=>{e.includes(a)||e.push(a)}),e):e===void 0||r<=0?e!=null&&typeof e=="object"&&typeof t=="object"?Object.assign(e,t):t:(t!==void 0&&typeof e=="object"&&typeof t=="object"&&Object.keys(t).forEach(a=>{typeof t[a]=="object"&&t[a]!==null&&(e[a]===void 0||typeof e[a]=="object")?(e[a]===void 0&&(e[a]=Array.isArray(t[a])?[]:{}),e[a]=IR(e[a],t[a],{depth:r-1,clobber:i})):(i||typeof e[a]!="object"&&typeof t[a]!="object")&&(e[a]=t[a])}),e)},"assignWithDepth"),Ni=IR,Tk={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:o(e=>e>=255?255:e<0?0:e,"r"),g:o(e=>e>=255?255:e<0?0:e,"g"),b:o(e=>e>=255?255:e<0?0:e,"b"),h:o(e=>e%360,"h"),s:o(e=>e>=100?100:e<0?0:e,"s"),l:o(e=>e>=100?100:e<0?0:e,"l"),a:o(e=>e>=1?1:e<0?0:e,"a")},toLinear:o(e=>{let t=e/255;return e>.03928?Math.pow((t+.055)/1.055,2.4):t/12.92},"toLinear"),hue2rgb:o((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:o(({h:e,s:t,l:r},i)=>{if(!t)return r*2.55;e/=360,t/=100,r/=100;let n=r<.5?r*(1+t):r+t-r*t,a=2*r-n;switch(i){case"r":return Tk.hue2rgb(a,n,e+.3333333333333333)*255;case"g":return Tk.hue2rgb(a,n,e)*255;case"b":return Tk.hue2rgb(a,n,e-.3333333333333333)*255}},"hsl2rgb"),rgb2hsl:o(({r:e,g:t,b:r},i)=>{e/=255,t/=255,r/=255;let n=Math.max(e,t,r),a=Math.min(e,t,r),s=(n+a)/2;if(i==="l")return s*100;if(n===a)return 0;let l=n-a,h=s>.5?l/(2-n-a):l/(n+a);if(i==="s")return h*100;switch(n){case e:return((t-r)/l+(tt>r?Math.min(t,Math.max(r,e)):Math.min(r,Math.max(t,e)),"clamp"),round:o(e=>Math.round(e*1e10)/1e10,"round")},E9e=w9e,S9e={dec2hex:o(e=>{let t=Math.round(e).toString(16);return t.length>1?t:`0${t}`},"dec2hex")},_9e=S9e,A9e={channel:C9e,lang:E9e,unit:_9e},Sr=A9e,Bu={};for(let e=0;e<=255;e++)Bu[e]=Sr.unit.dec2hex(e);Ga={ALL:0,RGB:1,HSL:2},R9e=class{static{o(this,"Type")}constructor(){this.type=Ga.ALL}get(){return this.type}set(e){if(this.type&&this.type!==e)throw new Error("Cannot change both RGB and HSL channels at the same time");this.type=e}reset(){this.type=Ga.ALL}is(e){return this.type===e}},L9e=R9e,$9e=class{static{o(this,"Channels")}constructor(e,t){this.color=t,this.changed=!1,this.data=e,this.type=new L9e}set(e,t){return this.color=t,this.changed=!1,this.data=e,this.type.type=Ga.ALL,this}_ensureHSL(){let e=this.data,{h:t,s:r,l:i}=e;t===void 0&&(e.h=Sr.channel.rgb2hsl(e,"h")),r===void 0&&(e.s=Sr.channel.rgb2hsl(e,"s")),i===void 0&&(e.l=Sr.channel.rgb2hsl(e,"l"))}_ensureRGB(){let e=this.data,{r:t,g:r,b:i}=e;t===void 0&&(e.r=Sr.channel.hsl2rgb(e,"r")),r===void 0&&(e.g=Sr.channel.hsl2rgb(e,"g")),i===void 0&&(e.b=Sr.channel.hsl2rgb(e,"b"))}get r(){let e=this.data,t=e.r;return!this.type.is(Ga.HSL)&&t!==void 0?t:(this._ensureHSL(),Sr.channel.hsl2rgb(e,"r"))}get g(){let e=this.data,t=e.g;return!this.type.is(Ga.HSL)&&t!==void 0?t:(this._ensureHSL(),Sr.channel.hsl2rgb(e,"g"))}get b(){let e=this.data,t=e.b;return!this.type.is(Ga.HSL)&&t!==void 0?t:(this._ensureHSL(),Sr.channel.hsl2rgb(e,"b"))}get h(){let e=this.data,t=e.h;return!this.type.is(Ga.RGB)&&t!==void 0?t:(this._ensureRGB(),Sr.channel.rgb2hsl(e,"h"))}get s(){let e=this.data,t=e.s;return!this.type.is(Ga.RGB)&&t!==void 0?t:(this._ensureRGB(),Sr.channel.rgb2hsl(e,"s"))}get l(){let e=this.data,t=e.l;return!this.type.is(Ga.RGB)&&t!==void 0?t:(this._ensureRGB(),Sr.channel.rgb2hsl(e,"l"))}get a(){return this.data.a}set r(e){this.type.set(Ga.RGB),this.changed=!0,this.data.r=e}set g(e){this.type.set(Ga.RGB),this.changed=!0,this.data.g=e}set b(e){this.type.set(Ga.RGB),this.changed=!0,this.data.b=e}set h(e){this.type.set(Ga.HSL),this.changed=!0,this.data.h=e}set s(e){this.type.set(Ga.HSL),this.changed=!0,this.data.s=e}set l(e){this.type.set(Ga.HSL),this.changed=!0,this.data.l=e}set a(e){this.changed=!0,this.data.a=e}},I9e=$9e,D9e=new I9e({r:0,g:0,b:0,a:0},"transparent"),Rk=D9e,Xne={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:o(e=>{if(e.charCodeAt(0)!==35)return;let t=e.match(Xne.re);if(!t)return;let r=t[1],i=parseInt(r,16),n=r.length,a=n%4===0,s=n>4,l=s?1:17,h=s?8:4,u=a?0:-1,d=s?255:15;return Rk.set({r:(i>>h*(u+3)&d)*l,g:(i>>h*(u+2)&d)*l,b:(i>>h*(u+1)&d)*l,a:a?(i&d)*l/255:1},e)},"parse"),stringify:o(e=>{let{r:t,g:r,b:i,a:n}=e;return n<1?`#${Bu[Math.round(t)]}${Bu[Math.round(r)]}${Bu[Math.round(i)]}${Bu[Math.round(n*255)]}`:`#${Bu[Math.round(t)]}${Bu[Math.round(r)]}${Bu[Math.round(i)]}`},"stringify")},C2=Xne,kk={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:o(e=>{let t=e.match(kk.hueRe);if(t){let[,r,i]=t;switch(i){case"grad":return Sr.channel.clamp.h(parseFloat(r)*.9);case"rad":return Sr.channel.clamp.h(parseFloat(r)*180/Math.PI);case"turn":return Sr.channel.clamp.h(parseFloat(r)*360)}}return Sr.channel.clamp.h(parseFloat(e))},"_hue2deg"),parse:o(e=>{let t=e.charCodeAt(0);if(t!==104&&t!==72)return;let r=e.match(kk.re);if(!r)return;let[,i,n,a,s,l]=r;return Rk.set({h:kk._hue2deg(i),s:Sr.channel.clamp.s(parseFloat(n)),l:Sr.channel.clamp.l(parseFloat(a)),a:s?Sr.channel.clamp.a(l?parseFloat(s)/100:parseFloat(s)):1},e)},"parse"),stringify:o(e=>{let{h:t,s:r,l:i,a:n}=e;return n<1?`hsla(${Sr.lang.round(t)}, ${Sr.lang.round(r)}%, ${Sr.lang.round(i)}%, ${n})`:`hsl(${Sr.lang.round(t)}, ${Sr.lang.round(r)}%, ${Sr.lang.round(i)}%)`},"stringify")},vk=kk,Ck={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:o(e=>{e=e.toLowerCase();let t=Ck.colors[e];if(t)return C2.parse(t)},"parse"),stringify:o(e=>{let t=C2.stringify(e);for(let r in Ck.colors)if(Ck.colors[r]===t)return r},"stringify")},One=Ck,Kne={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:o(e=>{let t=e.charCodeAt(0);if(t!==114&&t!==82)return;let r=e.match(Kne.re);if(!r)return;let[,i,n,a,s,l,h,u,d]=r;return Rk.set({r:Sr.channel.clamp.r(n?parseFloat(i)*2.55:parseFloat(i)),g:Sr.channel.clamp.g(s?parseFloat(a)*2.55:parseFloat(a)),b:Sr.channel.clamp.b(h?parseFloat(l)*2.55:parseFloat(l)),a:u?Sr.channel.clamp.a(d?parseFloat(u)/100:parseFloat(u)):1},e)},"parse"),stringify:o(e=>{let{r:t,g:r,b:i,a:n}=e;return n<1?`rgba(${Sr.lang.round(t)}, ${Sr.lang.round(r)}, ${Sr.lang.round(i)}, ${Sr.lang.round(n)})`:`rgb(${Sr.lang.round(t)}, ${Sr.lang.round(r)}, ${Sr.lang.round(i)})`},"stringify")},bk=Kne,M9e={format:{keyword:One,hex:C2,rgb:bk,rgba:bk,hsl:vk,hsla:vk},parse:o(e=>{if(typeof e!="string")return e;let t=C2.parse(e)||bk.parse(e)||vk.parse(e)||One.parse(e);if(t)return t;throw new Error(`Unsupported color format: "${e}"`)},"parse"),stringify:o(e=>!e.changed&&e.color?e.color:e.type.is(Ga.HSL)||e.data.r===void 0?vk.stringify(e):e.a<1||!Number.isInteger(e.r)||!Number.isInteger(e.g)||!Number.isInteger(e.b)?bk.stringify(e):C2.stringify(e),"stringify")},bl=M9e,N9e=o((e,t)=>{let r=bl.parse(e);for(let i in t)r[i]=Sr.channel.clamp[i](t[i]);return bl.stringify(r)},"change"),Zne=N9e,O9e=o((e,t,r=0,i=1)=>{if(typeof e!="number")return Zne(e,{a:t});let n=Rk.set({r:Sr.channel.clamp.r(e),g:Sr.channel.clamp.g(t),b:Sr.channel.clamp.b(r),a:Sr.channel.clamp.a(i)});return bl.stringify(n)},"rgba"),Ds=O9e,B9e=o((e,t)=>Sr.lang.round(bl.parse(e)[t]),"channel"),v0=B9e,P9e=o(e=>{let{r:t,g:r,b:i}=bl.parse(e),n=.2126*Sr.channel.toLinear(t)+.7152*Sr.channel.toLinear(r)+.0722*Sr.channel.toLinear(i);return Sr.lang.round(n)},"luminance"),F9e=P9e,z9e=o(e=>F9e(e)>=.5,"isLight"),q9e=z9e,j9e=o(e=>!q9e(e),"isDark"),Bn=j9e,G9e=o((e,t,r)=>{let i=bl.parse(e),n=i[t],a=Sr.channel.clamp[t](n+r);return n!==a&&(i[t]=a),bl.stringify(i)},"adjustChannel"),OR=G9e,W9e=o((e,t)=>OR(e,"l",t),"lighten"),Je=W9e,U9e=o((e,t)=>OR(e,"l",-t),"darken"),et=U9e,V9e=o((e,t)=>OR(e,"a",-t),"transparentize"),BR=V9e,Y9e=o((e,t)=>{let r=bl.parse(e),i={};for(let n in t)t[n]&&(i[n]=r[n]+t[n]);return Zne(e,i)},"adjust"),ue=Y9e,H9e=o((e,t,r=50)=>{let{r:i,g:n,b:a,a:s}=bl.parse(e),{r:l,g:h,b:u,a:d}=bl.parse(t),p=r/100,f=p*2-1,g=s-d,m=((f*g===-1?f:(f+g)/(1+f*g))+1)/2,y=1-m,b=i*m+l*y,v=n*m+h*y,T=a*m+u*y,x=s*p+d*(1-p);return Ds(b,v,T,x)},"mix"),X9e=H9e,K9e=o((e,t=100)=>{let r=bl.parse(e);return r.r=255-r.r,r.g=255-r.g,r.b=255-r.b,X9e(r,e,t)},"invert"),Xe=K9e,oc="#ffffff",lc="#f2f2f2",br=o((e,t)=>t?ue(e,{s:-40,l:10}):ue(e,{s:-40,l:-10}),"mkBorder"),Z9e=class{static{o(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||ue(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||ue(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||br(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||br(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||br(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||br(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||Xe(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||Xe(this.tertiaryColor),this.lineColor=this.lineColor||Xe(this.background),this.arrowheadColor=this.arrowheadColor||Xe(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||Xe(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||ue(this.primaryColor,{h:30}),this.cScale4=this.cScale4||ue(this.primaryColor,{h:60}),this.cScale5=this.cScale5||ue(this.primaryColor,{h:90}),this.cScale6=this.cScale6||ue(this.primaryColor,{h:120}),this.cScale7=this.cScale7||ue(this.primaryColor,{h:150}),this.cScale8=this.cScale8||ue(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||ue(this.primaryColor,{h:270}),this.cScale10=this.cScale10||ue(this.primaryColor,{h:300}),this.cScale11=this.cScale11||ue(this.primaryColor,{h:330}),this.darkMode)for(let t=0;t{this[r]=e[r]}),this.updateColors(),t.forEach(r=>{this[r]=e[r]})}},Q9e=o(e=>{let t=new Z9e;return t.calculate(e),t},"getThemeVariables"),J9e=class{static{o(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=Je(this.primaryColor,16),this.tertiaryColor=ue(this.primaryColor,{h:-160}),this.primaryBorderColor=Xe(this.background),this.secondaryBorderColor=br(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=br(this.tertiaryColor,this.darkMode),this.primaryTextColor=Xe(this.primaryColor),this.secondaryTextColor=Xe(this.secondaryColor),this.tertiaryTextColor=Xe(this.tertiaryColor),this.lineColor=Xe(this.background),this.textColor=Xe(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=Je(Xe("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=Ds(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=Ds(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=Ds(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=Xe(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=ue(this.primaryColor,{h:64}),this.fillType3=ue(this.secondaryColor,{h:64}),this.fillType4=ue(this.primaryColor,{h:-64}),this.fillType5=ue(this.secondaryColor,{h:-64}),this.fillType6=ue(this.primaryColor,{h:128}),this.fillType7=ue(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||ue(this.primaryColor,{h:30}),this.cScale4=this.cScale4||ue(this.primaryColor,{h:60}),this.cScale5=this.cScale5||ue(this.primaryColor,{h:90}),this.cScale6=this.cScale6||ue(this.primaryColor,{h:120}),this.cScale7=this.cScale7||ue(this.primaryColor,{h:150}),this.cScale8=this.cScale8||ue(this.primaryColor,{h:210}),this.cScale9=this.cScale9||ue(this.primaryColor,{h:270}),this.cScale10=this.cScale10||ue(this.primaryColor,{h:300}),this.cScale11=this.cScale11||ue(this.primaryColor,{h:330});for(let e=0;e{this[r]=e[r]}),this.updateColors(),t.forEach(r=>{this[r]=e[r]})}},eDe=o(e=>{let t=new J9e;return t.calculate(e),t},"getThemeVariables"),tDe=class{static{o(this,"Theme")}constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=ue(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=ue(this.primaryColor,{h:-160}),this.primaryBorderColor=br(this.primaryColor,this.darkMode),this.secondaryBorderColor=br(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=br(this.tertiaryColor,this.darkMode),this.primaryTextColor=Xe(this.primaryColor),this.secondaryTextColor=Xe(this.secondaryColor),this.tertiaryTextColor=Xe(this.tertiaryColor),this.lineColor=Xe(this.background),this.textColor=Xe(this.background),this.background="white",this.mainBkg="#ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",this.primaryBorderColor=br(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=Ds(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||ue(this.primaryColor,{h:30}),this.cScale4=this.cScale4||ue(this.primaryColor,{h:60}),this.cScale5=this.cScale5||ue(this.primaryColor,{h:90}),this.cScale6=this.cScale6||ue(this.primaryColor,{h:120}),this.cScale7=this.cScale7||ue(this.primaryColor,{h:150}),this.cScale8=this.cScale8||ue(this.primaryColor,{h:210}),this.cScale9=this.cScale9||ue(this.primaryColor,{h:270}),this.cScale10=this.cScale10||ue(this.primaryColor,{h:300}),this.cScale11=this.cScale11||ue(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||et(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||et(this.tertiaryColor,40);for(let e=0;e{this[r]==="calculated"&&(this[r]=void 0)}),typeof e!="object"){this.updateColors();return}let t=Object.keys(e);t.forEach(r=>{this[r]=e[r]}),this.updateColors(),t.forEach(r=>{this[r]=e[r]})}},Ua=o(e=>{let t=new tDe;return t.calculate(e),t},"getThemeVariables"),rDe=class{static{o(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=br(this.primaryColor,this.darkMode),this.secondaryBorderColor=br(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=br(this.tertiaryColor,this.darkMode),this.primaryTextColor=Xe(this.primaryColor),this.secondaryTextColor=Xe(this.secondaryColor),this.tertiaryTextColor=Xe(this.primaryColor),this.lineColor=Xe(this.background),this.textColor=Xe(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||ue(this.primaryColor,{h:30}),this.cScale4=this.cScale4||ue(this.primaryColor,{h:60}),this.cScale5=this.cScale5||ue(this.primaryColor,{h:90}),this.cScale6=this.cScale6||ue(this.primaryColor,{h:120}),this.cScale7=this.cScale7||ue(this.primaryColor,{h:150}),this.cScale8=this.cScale8||ue(this.primaryColor,{h:210}),this.cScale9=this.cScale9||ue(this.primaryColor,{h:270}),this.cScale10=this.cScale10||ue(this.primaryColor,{h:300}),this.cScale11=this.cScale11||ue(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||et(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||et(this.tertiaryColor,40);for(let e=0;e{this[r]=e[r]}),this.updateColors(),t.forEach(r=>{this[r]=e[r]})}},iDe=o(e=>{let t=new rDe;return t.calculate(e),t},"getThemeVariables"),nDe=class{static{o(this,"Theme")}constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=Je(this.contrast,55),this.background="#ffffff",this.tertiaryColor=ue(this.primaryColor,{h:-160}),this.primaryBorderColor=br(this.primaryColor,this.darkMode),this.secondaryBorderColor=br(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=br(this.tertiaryColor,this.darkMode),this.primaryTextColor=Xe(this.primaryColor),this.secondaryTextColor=Xe(this.secondaryColor),this.tertiaryTextColor=Xe(this.tertiaryColor),this.lineColor=Xe(this.background),this.textColor=Xe(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 e=0;e{this[r]=e[r]}),this.updateColors(),t.forEach(r=>{this[r]=e[r]})}},aDe=o(e=>{let t=new nDe;return t.calculate(e),t},"getThemeVariables"),sDe=class{static{o(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=br(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||ue(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||ue(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||br(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||br(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||br(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||br(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||Xe(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||Xe(this.tertiaryColor),this.lineColor=this.lineColor||Xe(this.background),this.arrowheadColor=this.arrowheadColor||Xe(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||Xe(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor;let e="#ECECFE",t="#E9E9F1",r=ue(e,{h:180,l:5});if(this.sectionBkgColor=this.sectionBkgColor||r,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||t,this.sectionBkgColor2=this.sectionBkgColor2||e,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||e,this.activeTaskBorderColor=this.activeTaskBorderColor||e,this.activeTaskBkgColor=this.activeTaskBkgColor||Je(e,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||e,this.cScale1=this.cScale1||t,this.cScale2=this.cScale2||r,this.cScale3=this.cScale3||ue(e,{h:30}),this.cScale4=this.cScale4||ue(e,{h:60}),this.cScale5=this.cScale5||ue(e,{h:90}),this.cScale6=this.cScale6||ue(e,{h:120}),this.cScale7=this.cScale7||ue(e,{h:150}),this.cScale8=this.cScale8||ue(e,{h:210,l:150}),this.cScale9=this.cScale9||ue(e,{h:270}),this.cScale10=this.cScale10||ue(e,{h:300}),this.cScale11=this.cScale11||ue(e,{h:330}),this.darkMode)for(let n=0;n{this[r]=e[r]}),this.updateColors(),t.forEach(r=>{this[r]=e[r]})}},oDe=o(e=>{let t=new sDe;return t.calculate(e),t},"getThemeVariables"),lDe=class{static{o(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=Je(this.primaryColor,16),this.tertiaryColor=ue(this.primaryColor,{h:-160}),this.primaryBorderColor=Xe(this.background),this.secondaryBorderColor=br(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=br(this.tertiaryColor,this.darkMode),this.primaryTextColor=Xe(this.primaryColor),this.secondaryTextColor=Xe(this.secondaryColor),this.tertiaryTextColor=Xe(this.tertiaryColor),this.mainBkg="#2a2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=Je(Xe("#323D47"),10),this.border1="#ccc",this.border2=Ds(255,255,255,.25),this.arrowheadColor=Xe(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||ue(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||ue(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||br(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||br(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||br(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||br(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||Xe(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||Xe(this.tertiaryColor),this.lineColor=this.lineColor||Xe(this.background),this.arrowheadColor=this.arrowheadColor||Xe(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||Xe(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||ue(this.primaryColor,{h:30}),this.cScale4=this.cScale4||ue(this.primaryColor,{h:60}),this.cScale5=this.cScale5||ue(this.primaryColor,{h:90}),this.cScale6=this.cScale6||ue(this.primaryColor,{h:120}),this.cScale7=this.cScale7||ue(this.primaryColor,{h:150}),this.cScale8=this.cScale8||ue(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||ue(this.primaryColor,{h:270}),this.cScale10=this.cScale10||ue(this.primaryColor,{h:300}),this.cScale11=this.cScale11||ue(this.primaryColor,{h:330}),this.darkMode)for(let t=0;t{this[r]=e[r]}),this.updateColors(),t.forEach(r=>{this[r]=e[r]})}},cDe=o(e=>{let t=new lDe;return t.calculate(e),t},"getThemeVariables"),hDe=class{static{o(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=br("#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||ue(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||ue(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||br(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||br(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||br(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||br(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#FEF9C3",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||Xe(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||Xe(this.tertiaryColor),this.lineColor=this.lineColor||Xe(this.background),this.arrowheadColor=this.arrowheadColor||Xe(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||Xe(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor;let e="#ECECFE",t="#E9E9F1",r=ue(e,{h:180,l:5});this.sectionBkgColor=this.sectionBkgColor||r,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||t,this.sectionBkgColor2=this.sectionBkgColor2||e,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||e,this.activeTaskBorderColor=this.activeTaskBorderColor||e,this.activeTaskBkgColor=this.activeTaskBkgColor||Je(e,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 n=0;n{this[r]=e[r]}),this.updateColors(),t.forEach(r=>{this[r]=e[r]})}},uDe=o(e=>{let t=new hDe;return t.calculate(e),t},"getThemeVariables"),dDe=class{static{o(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=Je(this.primaryColor,16),this.tertiaryColor=ue(this.primaryColor,{h:-160}),this.primaryBorderColor=Xe(this.background),this.secondaryBorderColor=br(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=br(this.tertiaryColor,this.darkMode),this.primaryTextColor=Xe(this.primaryColor),this.secondaryTextColor=Xe(this.secondaryColor),this.tertiaryTextColor=Xe(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=Je(Xe("#323D47"),10),this.border1="#ccc",this.border2=Ds(255,255,255,.25),this.arrowheadColor=Xe(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||ue(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||ue(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||br(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||br(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||br(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||br(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||Xe(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||Xe(this.tertiaryColor),this.lineColor=this.lineColor||Xe(this.background),this.arrowheadColor=this.arrowheadColor||Xe(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||Xe(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||ue(this.primaryColor,{h:30}),this.cScale4=this.cScale4||ue(this.primaryColor,{h:60}),this.cScale5=this.cScale5||ue(this.primaryColor,{h:90}),this.cScale6=this.cScale6||ue(this.primaryColor,{h:120}),this.cScale7=this.cScale7||ue(this.primaryColor,{h:150}),this.cScale8=this.cScale8||ue(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||ue(this.primaryColor,{h:270}),this.cScale10=this.cScale10||ue(this.primaryColor,{h:300}),this.cScale11=this.cScale11||ue(this.primaryColor,{h:330}),this.darkMode)for(let t=0;t{this[r]=e[r]}),this.updateColors(),t.forEach(r=>{this[r]=e[r]})}},pDe=o(e=>{let t=new dDe;return t.calculate(e),t},"getThemeVariables"),fDe=class{static{o(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=br(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||ue(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||ue(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||br(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||br(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||br(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||br(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||Xe(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||Xe(this.tertiaryColor),this.lineColor=this.lineColor||Xe(this.background),this.arrowheadColor=this.arrowheadColor||Xe(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||Xe(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor;let e="#ECECFE",t="#E9E9F1",r=ue(e,{h:180,l:5});this.sectionBkgColor=this.sectionBkgColor||r,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||t,this.sectionBkgColor2=this.sectionBkgColor2||e,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||e,this.activeTaskBorderColor=this.activeTaskBorderColor||e,this.activeTaskBkgColor=this.activeTaskBkgColor||Je(e,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 n=0;n{this[r]=e[r]}),this.updateColors(),t.forEach(r=>{this[r]=e[r]})}},gDe=o(e=>{let t=new fDe;return t.calculate(e),t},"getThemeVariables"),mDe=class{static{o(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=Je(this.primaryColor,16),this.tertiaryColor=ue(this.primaryColor,{h:-160}),this.primaryBorderColor=Xe(this.background),this.secondaryBorderColor=br(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=br(this.tertiaryColor,this.darkMode),this.primaryTextColor=Xe(this.primaryColor),this.secondaryTextColor=Xe(this.secondaryColor),this.tertiaryTextColor=Xe(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=Je(Xe("#323D47"),10),this.border1="#ccc",this.border2=Ds(255,255,255,.25),this.arrowheadColor=Xe(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||ue(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||ue(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||br(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||br(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||br(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||br(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||Xe(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||Xe(this.tertiaryColor),this.lineColor=this.lineColor||Xe(this.background),this.arrowheadColor=this.arrowheadColor||Xe(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||Xe(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 t=0;t{this[r]=e[r]}),this.updateColors(),t.forEach(r=>{this[r]=e[r]})}},yDe=o(e=>{let t=new mDe;return t.calculate(e),t},"getThemeVariables"),sc={base:{getThemeVariables:Q9e},dark:{getThemeVariables:eDe},default:{getThemeVariables:Ua},forest:{getThemeVariables:iDe},neutral:{getThemeVariables:aDe},neo:{getThemeVariables:oDe},"neo-dark":{getThemeVariables:cDe},redux:{getThemeVariables:uDe},"redux-dark":{getThemeVariables:pDe},"redux-color":{getThemeVariables:gDe},"redux-dark-color":{getThemeVariables:yDe}},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,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},Qne={...aa,deterministicIDSeed:void 0,elk:{mergeEdges:!1,nodePlacementStrategy:"BRANDES_KOEPF",forceNodeModelOrder:!1,considerModelOrder:"NODES_AND_EDGES"},themeCSS:void 0,themeVariables:sc.default.getThemeVariables(),sequence:{...aa.sequence,messageFont:o(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont"),noteFont:o(function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},"noteFont"),actorFont:o(function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}},"actorFont")},class:{hideEmptyMembersBox:!1,hierarchicalNamespaces:!0},gantt:{...aa.gantt,tickInterval:void 0,useWidth:void 0},c4:{...aa.c4,useWidth:void 0,personFont:o(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},"personFont"),flowchart:{...aa.flowchart,inheritDir:!1},external_personFont:o(function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},"external_personFont"),systemFont:o(function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},"systemFont"),external_systemFont:o(function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},"external_systemFont"),system_dbFont:o(function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},"system_dbFont"),external_system_dbFont:o(function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},"external_system_dbFont"),system_queueFont:o(function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},"system_queueFont"),external_system_queueFont:o(function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},"external_system_queueFont"),containerFont:o(function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},"containerFont"),external_containerFont:o(function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},"external_containerFont"),container_dbFont:o(function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},"container_dbFont"),external_container_dbFont:o(function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},"external_container_dbFont"),container_queueFont:o(function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},"container_queueFont"),external_container_queueFont:o(function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},"external_container_queueFont"),componentFont:o(function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},"componentFont"),external_componentFont:o(function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},"external_componentFont"),component_dbFont:o(function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},"component_dbFont"),external_component_dbFont:o(function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},"external_component_dbFont"),component_queueFont:o(function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},"component_queueFont"),external_component_queueFont:o(function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},"external_component_queueFont"),boundaryFont:o(function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},"boundaryFont"),messageFont:o(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}},Jne=o((e,t="")=>Object.keys(e).reduce((r,i)=>Array.isArray(e[i])?r:typeof e[i]=="object"&&e[i]!==null?[...r,t+i,...Jne(e[i],"")]:[...r,t+i],[]),"keyify"),vDe=new Set(Jne(Qne,"")),rr=Qne,bDe={nodeColors:/^#[\da-f]{3,8}$|^rgb\([\d\s%,.]+\)$|^hsl\([\d\s%,.]+\)$|^[a-z]+$/i,filenameIcons:/^[\w-]+(?::[\w-]+)?$/,extensionIcons:/^[\w-]+(?::[\w-]+)?$/},xDe=o((e,t)=>{for(let r of Object.keys(e)){let i=e[r];(r.startsWith("__")||r.includes("proto")||r.includes("constr")||typeof i!="string"||!t.test(i))&&(ee.debug("sanitize deleting dictionary entry:",r,i),delete e[r])}},"sanitizeDictionaryConfig"),E2=o(e=>{if(ee.debug("sanitizeDirective called with",e),!(typeof e!="object"||e==null)){if(Array.isArray(e)){e.forEach(t=>E2(t));return}for(let t of Object.keys(e)){if(ee.debug("Checking key",t),t.startsWith("__")||t.includes("proto")||t.includes("constr")||!vDe.has(t)||e[t]==null){ee.debug("sanitize deleting key: ",t),delete e[t];continue}if(typeof e[t]=="object"){let i=bDe[t];i?xDe(e[t],i):(ee.debug("sanitizing object",t),E2(e[t]));continue}let r=["themeCSS","fontFamily","altFontFamily"];for(let i of r)t.includes(i)&&(ee.debug("sanitizing css option",t),e[t]=PR(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]="")}ee.debug("After sanitization",e)}},"sanitizeDirective"),PR=o(e=>{let t=0,r=0;for(let i of e){if(t!(e===!1||["false","null","0"].includes(String(e).trim().toLowerCase())),"evaluate"),Is=Ni({},Ep),wp=[],w2=Ni({},Ep),Lk=o((e,t)=>{let r=Ni({},e),i={};for(let n of t)iae(n),i=Ni(i,n);if(r=Ni(r,i),i.theme&&i.theme in sc){let n=Ni({},_k),a=Ni(n.themeVariables||{},i.themeVariables);r.theme&&r.theme in sc&&(r.themeVariables=sc[r.theme].getThemeVariables(a))}return w2=r,sae(w2),w2},"updateCurrentConfig"),eae=o(e=>(Is=Ni({},Ep),Is=Ni(Is,e),e.theme&&sc[e.theme]&&(Is.themeVariables=sc[e.theme].getThemeVariables(e.themeVariables)),Lk(Is,wp),Is),"setSiteConfig"),tae=o(e=>{_k=Ni({},e)},"saveConfigFromInitialize"),rae=o(e=>(Is=Ni(Is,e),Lk(Is,wp),Is),"updateSiteConfig"),FR=o(()=>Ni({},Is),"getSiteConfig"),zR=o(e=>(sae(e),Ni(w2,e),Rt()),"setConfig"),Rt=o(()=>Ni({},w2),"getConfig"),iae=o(e=>{e&&(["secure",...Is.secure??[]].forEach(t=>{Object.hasOwn(e,t)&&(ee.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"&&iae(e[t])}))},"sanitize"),nae=o(e=>{E2(e),e.fontFamily&&!e.themeVariables?.fontFamily&&(e.themeVariables={...e.themeVariables,fontFamily:e.fontFamily}),wp.push(e),Lk(Is,wp)},"addDirective"),S2=o((e=Is)=>{wp=[],Lk(e,wp)},"reset"),TDe={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."},Bne={},aae=o(e=>{Bne[e]||(ee.warn(TDe[e]),Bne[e]=!0)},"issueWarning"),sae=o(e=>{e&&(e.lazyLoadedDiagrams||e.loadExternalDiagramsAtStartup)&&aae("LAZY_LOAD_DEPRECATED")},"checkConfig"),$k=o(()=>{let e={};_k&&(e=Ni(e,_k));for(let t of wp)e=Ni(e,t);return e},"getUserDefinedConfig"),Qr=o(e=>(e.flowchart?.htmlLabels!=null&&aae("FLOWCHART_HTML_LABELS_DEPRECATED"),Mo(e.htmlLabels??e.flowchart?.htmlLabels??!0)),"getEffectiveHtmlLabels"),qR=/^([^\S\n\r]*)-{3}\s*[\n\r](.*?)[\n\r]\1-{3}\s*[\n\r]+/s,b0=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,kDe=/\s*%%.*\n/gm,jR=class extends Error{static{o(this,"UnknownDiagramError")}constructor(e){super(e),this.name="UnknownDiagramError"}},Pu={},_2=o(function(e,t){e=e.replace(qR,"").replace(b0,"").replace(kDe,` +`);for(let[r,{detector:i}]of Object.entries(Pu))if(i(e,t))return r;throw new jR(`No diagram type detected matching given configuration for text: ${e}`)},"detectType"),Ik=o((...e)=>{for(let{id:t,detector:r,loader:i}of e)oae(t,r,i)},"registerLazyLoadedDiagrams"),oae=o((e,t,r)=>{Pu[e]&&ee.warn(`Detector with key ${e} already exists. Overwriting.`),Pu[e]={detector:t,loader:r},ee.debug(`Detector with key ${e} added${r?" with loader":""}`)},"addDetector"),lae=o(e=>Pu[e].loader,"getDiagramLoader"),{entries:cae,setPrototypeOf:Pne,isFrozen:CDe,getPrototypeOf:wDe,getOwnPropertyDescriptor:EDe}=Object,{freeze:cs,seal:Do,create:k2}=Object,{apply:DR,construct:MR}=typeof Reflect<"u"&&Reflect;cs||(cs=o(function(e){return e},"freeze"));Do||(Do=o(function(e){return e},"seal"));DR||(DR=o(function(e,t){for(var r=arguments.length,i=new Array(r>2?r-2:0),n=2;n1?t-1:0),i=1;i/gm),MDe=Do(/\$\{[\w\W]*/gm),NDe=Do(/^data-[\-\w.\u00B7-\uFFFF]+$/),ODe=Do(/^aria-[\-\w]+$/),dae=Do(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),BDe=Do(/^(?:\w+script|data):/i),PDe=Do(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),pae=Do(/^html$/i),FDe=Do(/^[a-z][.\w]*(-[.\w]+)+$/i),Wne=Object.freeze({__proto__:null,ARIA_ATTR:ODe,ATTR_WHITESPACE:PDe,CUSTOM_ELEMENT:FDe,DATA_ATTR:NDe,DOCTYPE_NAME:pae,ERB_EXPR:DDe,IS_ALLOWED_URI:dae,IS_SCRIPT_OR_DATA:BDe,MUSTACHE_EXPR:IDe,TMPLIT_EXPR:MDe}),T2={element:1,text:3,progressingInstruction:7,comment:8,document:9},zDe=o(function(){return typeof window>"u"?null:window},"getGlobal"),qDe=o(function(e,t){if(typeof e!="object"||typeof e.createPolicy!="function")return null;let r=null,i="data-tt-policy-suffix";t&&t.hasAttribute(i)&&(r=t.getAttribute(i));let n="dompurify"+(r?"#"+r:"");try{return e.createPolicy(n,{createHTML(a){return a},createScriptURL(a){return a}})}catch{return console.warn("TrustedTypes policy "+n+" could not be created."),null}},"_createTrustedTypesPolicy"),Une=o(function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},"_createHooksMap");o(GR,"createDOMPurify");no=GR(),Sp=//gi,jDe=o(e=>e?mae(e).replace(/\\n/g,"#br#").split("#br#"):[""],"getRows"),GDe=(()=>{let e=!1;return()=>{e||(fae(),e=!0)}})();o(fae,"setupDompurifyHooks");gae=o(e=>(GDe(),no.sanitize(e)),"removeScript"),Vne=o((e,t)=>{if(Qr(t)){let r=t.securityLevel;r==="antiscript"||r==="strict"||r==="sandbox"?e=gae(e):r!=="loose"&&(e=mae(e),e=e.replace(//g,">"),e=e.replace(/=/g,"="),e=YDe(e))}return e},"sanitizeMore"),nr=o((e,t)=>e&&(t.dompurifyConfig?e=no.sanitize(Vne(e,t),t.dompurifyConfig).toString():e=no.sanitize(Vne(e,t),{FORBID_TAGS:["style"]}).toString(),e),"sanitizeText"),WDe=o((e,t)=>typeof e=="string"?nr(e,t):e.flat().map(r=>nr(r,t)),"sanitizeTextOrArray"),UDe=o(e=>Sp.test(e),"hasBreaks"),VDe=o(e=>e.split(Sp),"splitBreaks"),YDe=o(e=>e.replace(/#br#/g,"
"),"placeholderToBreak"),mae=o(e=>e.replace(Sp,"#br#"),"breakToPlaceholder"),_p=o(e=>{let t="";return e&&(t=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,t=CSS.escape(t)),t},"getUrl"),HDe=o(function(...e){let t=e.filter(r=>!isNaN(r));return Math.max(...t)},"getMax"),XDe=o(function(...e){let t=e.filter(r=>!isNaN(r));return Math.min(...t)},"getMin"),cc=o(function(e){let t=e.split(/(,)/),r=[];for(let i=0;i0&&i+1Math.max(0,e.split(t).length-1),"countOccurrence"),KDe=o((e,t)=>{let r=NR(e,"~"),i=NR(t,"~");return r===1&&i===1},"shouldCombineSets"),ZDe=o(e=>{let t=NR(e,"~"),r=!1;if(t<=1)return e;t%2!==0&&e.startsWith("~")&&(e=e.substring(1),r=!0);let i=[...e],n=i.indexOf("~"),a=i.lastIndexOf("~");for(;n!==-1&&a!==-1&&n!==a;)i[n]="<",i[a]=">",n=i.indexOf("~"),a=i.lastIndexOf("~");return r&&i.unshift("~"),i.join("")},"processSet"),Yne=o(()=>window.MathMLElement!==void 0,"isMathMLSupported"),Ek=/\$\$(.*?)\$\$/g,Gi=o(e=>(e.match(Ek)?.length??0)>0,"hasKatex"),x0=o(async(e,t)=>{let r=document.createElement("div");r.innerHTML=await T0(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"),QDe=o(async(e,t)=>{if(!Gi(e))return e;if(!(Yne()||t.legacyMathML||t.forceLegacyMathML))return e.replace(Ek,"MathML is unsupported in this environment.");{let{default:r}=await Promise.resolve().then(()=>(Nne(),Mne)),i=t.forceLegacyMathML||!Yne()&&t.legacyMathML?"htmlAndMathml":"mathml";return e.split(Sp).map(n=>Gi(n)?`
${n}
`:`
${n}
`).join("").replace(Ek,(n,a)=>r.renderToString(a,{throwOnError:!0,displayMode:!0,output:i}).replace(/\n/g," ").replace(//g,""))}return e.replace(Ek,"Katex is not supported in @mermaid-js/tiny. Please use the full mermaid library.")},"renderKatexUnsanitized"),T0=o(async(e,t)=>nr(await QDe(e,t),t),"renderKatexSanitized"),ft={getRows:jDe,sanitizeText:nr,sanitizeTextOrArray:WDe,hasBreaks:UDe,splitBreaks:VDe,lineBreakRegex:Sp,removeScript:gae,getUrl:_p,evaluate:Mo,getMax:HDe,getMin:XDe},JDe=o(function(e,t){for(let r of t)e.attr(r[0],r[1])},"d3Attrs"),eMe=o(function(e,t,r){let i=new Map;return r?(i.set("width","100%"),i.set("style",`max-width: ${t}px;`)):(i.set("height",e),i.set("width",t)),i},"calculateSvgSizeAttrs"),Ir=o(function(e,t,r,i){let n=eMe(t,r,i);JDe(e,n)},"configureSvgSize"),hc=o(function(e,t,r,i){let n=t.node().getBBox(),a=n.width,s=n.height;ee.info(`SVG bounds: ${a}x${s}`,n);let l=0,h=0;ee.info(`Graph bounds: ${l}x${h}`,e),l=a+r*2,h=s+r*2,ee.info(`Calculated bounds: ${l}x${h}`),Ir(t,h,l,i);let u=`${n.x-r} ${n.y-r} ${n.width+2*r} ${n.height+2*r}`;t.attr("viewBox",u)},"setupGraphViewbox"),Sk={};o(Dk,"cssStyleSheetToString");tMe=o((e,t,r,i)=>{let n="";return e in Sk&&Sk[e]?n=Sk[e]({...r,svgId:i}):ee.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 + } + + ${n} + .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("+i+"-gradient)":r.nodeBorder}; + filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"}; + } + [data-look="neo"].swimlane.cluster rect { + filter: none; + } + + + [data-look="neo"].node path { + stroke: ${r.useGradient?"url("+i+"-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(${i}-drop-shadow)`):"none"}; + } + + [data-look="neo"].node .neo-line path { + stroke: ${r.nodeBorder}; + filter: none; + } + + [data-look="neo"].node circle{ + stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder}; + filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"}; + } + + [data-look="neo"].node circle .state-start{ + fill: #000000; + } + + [data-look="neo"].icon-shape .icon { + fill: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder}; + filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"}; + } + + [data-look="neo"].icon-shape .icon-neo path { + stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder}; + filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"}; + } + + ${t} +`},"getStyles"),rMe=o((e,t)=>{t!==void 0&&(Sk[e]=t)},"addStylesForDiagram"),yae=tMe,Mk={};yu(Mk,{clear:()=>ar,getAccDescription:()=>kr,getAccTitle:()=>xr,getDiagramTitle:()=>Cr,setAccDescription:()=>Tr,setAccTitle:()=>gr,setDiagramTitle:()=>_r});WR="",UR="",VR="",YR=o(e=>nr(e,Rt()),"sanitizeText"),ar=o(()=>{WR="",VR="",UR=""},"clear"),gr=o(e=>{WR=YR(e).replace(/^\s+/g,"")},"setAccTitle"),xr=o(()=>WR,"getAccTitle"),Tr=o(e=>{VR=YR(e).replace(/\n\s+/g,` +`)},"setAccDescription"),kr=o(()=>VR,"getAccDescription"),_r=o(e=>{UR=YR(e)},"setDiagramTitle"),Cr=o(()=>UR,"getDiagramTitle"),Hne=ee,iMe=qy,De=Rt,A2=zR,Nk=Ep,Ok=o(e=>nr(e,De()),"sanitizeText"),R2=hc,nMe=o(()=>Mk,"getCommonDb"),Ak={},L2=o((e,t,r)=>{Ak[e]&&Hne.warn(`Diagram with id ${e} already registered. Overwriting.`),Ak[e]=t,r&&oae(e,r),rMe(e,t.styles),t.injectUtils?.(Hne,iMe,De,Ok,R2,nMe(),()=>{})},"registerDiagram"),Bk=o(e=>{if(e in Ak)return Ak[e];throw new aMe(e)},"getDiagram"),aMe=class extends Error{static{o(this,"DiagramNotFoundError")}constructor(e){super(`Diagram ${e} not found.`)}};});var oi,yn=Tt(()=>{tr();Zt();vt();oi=o(e=>{let{securityLevel:t}=De(),r=tt("body");if(t==="sandbox"){let i=tt(`#i${e}`).node()?.contentDocument??document;r=tt(i.body)}return r.select(`#${e}`)},"selectSvgElement")});function hL(e){return typeof e>"u"||e===null}function xae(e){return typeof e=="object"&&e!==null}function Tae(e){return Array.isArray(e)?e:hL(e)?[]:[e]}function kae(e,t){var r,i,n,a;if(t)for(a=Object.keys(t),r=0,i=a.length;rl&&(a=" ... ",t=i-l+a.length),r-i>l&&(s=" ...",r=i+l-s.length),{str:a+e.slice(t,r).replace(/\t/g,"\u2192")+s,pos:i-t+a.length}}function Fk(e,t){return Pn.repeat(" ",t-e.length)+e}function Eae(e,t){if(t=Object.create(t||null),!e.buffer)return null;t.maxLength||(t.maxLength=79),typeof t.indent!="number"&&(t.indent=1),typeof t.linesBefore!="number"&&(t.linesBefore=3),typeof t.linesAfter!="number"&&(t.linesAfter=2);for(var r=/\r?\n|\r|\0/g,i=[0],n=[],a,s=-1;a=r.exec(e.buffer);)n.push(a.index),i.push(a.index+a[0].length),e.position<=a.index&&s<0&&(s=i.length-2);s<0&&(s=i.length-1);var l="",h,u,d=Math.min(e.line+t.linesAfter,n.length).toString().length,p=t.maxLength-(t.indent+d+3);for(h=1;h<=t.linesBefore&&!(s-h<0);h++)u=Pk(e.buffer,i[s-h],n[s-h],e.position-(i[s]-i[s-h]),p),l=Pn.repeat(" ",t.indent)+Fk((e.line-h+1).toString(),d)+" | "+u.str+` +`+l;for(u=Pk(e.buffer,i[s],n[s],e.position,p),l+=Pn.repeat(" ",t.indent)+Fk((e.line+1).toString(),d)+" | "+u.str+` +`,l+=Pn.repeat("-",t.indent+d+3+u.pos)+`^ +`,h=1;h<=t.linesAfter&&!(s+h>=n.length);h++)u=Pk(e.buffer,i[s+h],n[s+h],e.position-(i[s]-i[s+h]),p),l+=Pn.repeat(" ",t.indent)+Fk((e.line+h+1).toString(),d)+" | "+u.str+` +`;return l.replace(/\n$/,"")}function Sae(e){var t={};return e!==null&&Object.keys(e).forEach(function(r){e[r].forEach(function(i){t[String(i)]=r})}),t}function _ae(e,t){if(t=t||{},Object.keys(t).forEach(function(r){if(pMe.indexOf(r)===-1)throw new Ms('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=Sae(t.styleAliases||null),fMe.indexOf(this.kind)===-1)throw new Ms('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}function XR(e,t){var r=[];return e[t].forEach(function(i){var n=r.length;r.forEach(function(a,s){a.tag===i.tag&&a.kind===i.kind&&a.multi===i.multi&&(n=s)}),r[n]=i}),r}function Aae(){var e={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},t,r;function i(n){n.multi?(e.multi[n.kind].push(n),e.multi.fallback.push(n)):e[n.kind][n.tag]=e.fallback[n.tag]=n}for(o(i,"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 Gae(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(Pn.isNegativeZero(e))return"-0.0";return r=e.toString(10),wMe.test(r)?r.replace("e",".e"):r}function Wae(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1!==0||Pn.isNegativeZero(e))}function Hae(e){return e===null?!1:Vae.exec(e)!==null||Yae.exec(e)!==null}function Xae(e){var t,r,i,n,a,s,l,h=0,u=null,d,p,f;if(t=Vae.exec(e),t===null&&(t=Yae.exec(e)),t===null)throw new Error("Date resolve error");if(r=+t[1],i=+t[2]-1,n=+t[3],!t[4])return new Date(Date.UTC(r,i,n));if(a=+t[4],s=+t[5],l=+t[6],t[7]){for(h=t[7].slice(0,3);h.length<3;)h+="0";h=+h}return t[9]&&(d=+t[10],p=+(t[11]||0),u=(d*60+p)*6e4,t[9]==="-"&&(u=-u)),f=new Date(Date.UTC(r,i,n,a,s,l,h)),u&&f.setTime(f.getTime()-u),f}function Kae(e){return e.toISOString()}function Zae(e){return e==="<<"||e===null}function Qae(e){if(e===null)return!1;var t,r,i=0,n=e.length,a=dL;for(r=0;r64)){if(t<0)return!1;i+=6}return i%8===0}function Jae(e){var t,r,i=e.replace(/[\r\n=]/g,""),n=i.length,a=dL,s=0,l=[];for(t=0;t>16&255),l.push(s>>8&255),l.push(s&255)),s=s<<6|a.indexOf(i.charAt(t));return r=n%4*6,r===0?(l.push(s>>16&255),l.push(s>>8&255),l.push(s&255)):r===18?(l.push(s>>10&255),l.push(s>>2&255)):r===12&&l.push(s>>4&255),new Uint8Array(l)}function ese(e){var t="",r=0,i,n,a=e.length,s=dL;for(i=0;i>18&63],t+=s[r>>12&63],t+=s[r>>6&63],t+=s[r&63]),r=(r<<8)+e[i];return n=a%3,n===0?(t+=s[r>>18&63],t+=s[r>>12&63],t+=s[r>>6&63],t+=s[r&63]):n===2?(t+=s[r>>10&63],t+=s[r>>4&63],t+=s[r<<2&63],t+=s[64]):n===1&&(t+=s[r>>2&63],t+=s[r<<4&63],t+=s[64],t+=s[64]),t}function tse(e){return Object.prototype.toString.call(e)==="[object Uint8Array]"}function rse(e){if(e===null)return!0;var t=[],r,i,n,a,s,l=e;for(r=0,i=l.length;r>10)+55296,(e-65536&1023)+56320)}function pL(e,t,r){t==="__proto__"?Object.defineProperty(e,t,{configurable:!0,enumerable:!0,writable:!0,value:r}):e[t]=r}function bse(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||lse,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 fL(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=dMe(r),new Ms(t,r)}function Qt(e,t){throw fL(e,t)}function $2(e,t){e.onWarning&&e.onWarning.call(null,fL(e,t))}function mh(e,t,r,i){var n,a,s,l;if(t1&&(e.result+=Pn.repeat(` +`,t-1))}function xse(e,t,r){var i,n,a,s,l,h,u,d,p=e.kind,f=e.result,g;if(g=e.input.charCodeAt(e.position),hs(g)||Rp(g)||g===35||g===38||g===42||g===33||g===124||g===62||g===39||g===34||g===37||g===64||g===96||(g===63||g===45)&&(n=e.input.charCodeAt(e.position+1),hs(n)||r&&Rp(n)))return!1;for(e.kind="scalar",e.result="",a=s=e.position,l=!1;g!==0;){if(g===58){if(n=e.input.charCodeAt(e.position+1),hs(n)||r&&Rp(n))break}else if(g===35){if(i=e.input.charCodeAt(e.position-1),hs(i))break}else{if(e.position===e.lineStart&&N2(e)||r&&Rp(g))break;if(xl(g))if(h=e.line,u=e.lineStart,d=e.lineIndent,vn(e,!1,-1),e.lineIndent>=t){l=!0,g=e.input.charCodeAt(e.position);continue}else{e.position=s,e.line=h,e.lineStart=u,e.lineIndent=d;break}}l&&(mh(e,a,s,!1),Yk(e,e.line-h),a=s=e.position,l=!1),Fu(g)||(s=e.position+1),g=e.input.charCodeAt(++e.position)}return mh(e,a,s,!1),e.result?!0:(e.kind=p,e.result=f,!1)}function Tse(e,t){var r,i,n;if(r=e.input.charCodeAt(e.position),r!==39)return!1;for(e.kind="scalar",e.result="",e.position++,i=n=e.position;(r=e.input.charCodeAt(e.position))!==0;)if(r===39)if(mh(e,i,e.position,!0),r=e.input.charCodeAt(++e.position),r===39)i=e.position,e.position++,n=e.position;else return!0;else xl(r)?(mh(e,i,n,!0),Yk(e,vn(e,!1,t)),i=n=e.position):e.position===e.lineStart&&N2(e)?Qt(e,"unexpected end of the document within a single quoted scalar"):(e.position++,n=e.position);Qt(e,"unexpected end of the stream within a single quoted scalar")}function kse(e,t){var r,i,n,a,s,l;if(l=e.input.charCodeAt(e.position),l!==34)return!1;for(e.kind="scalar",e.result="",e.position++,r=i=e.position;(l=e.input.charCodeAt(e.position))!==0;){if(l===34)return mh(e,r,e.position,!0),e.position++,!0;if(l===92){if(mh(e,r,e.position,!0),l=e.input.charCodeAt(++e.position),xl(l))vn(e,!1,t);else if(l<256&&yse[l])e.result+=vse[l],e.position++;else if((s=fse(l))>0){for(n=s,a=0;n>0;n--)l=e.input.charCodeAt(++e.position),(s=pse(l))>=0?a=(a<<4)+s:Qt(e,"expected hexadecimal character");e.result+=mse(a),e.position++}else Qt(e,"unknown escape sequence");r=i=e.position}else xl(l)?(mh(e,r,i,!0),Yk(e,vn(e,!1,t)),r=i=e.position):e.position===e.lineStart&&N2(e)?Qt(e,"unexpected end of the document within a double quoted scalar"):(e.position++,i=e.position)}Qt(e,"unexpected end of the stream within a double quoted scalar")}function Cse(e,t){var r=!0,i,n,a,s=e.tag,l,h=e.anchor,u,d,p,f,g,m=Object.create(null),y,b,v,T;if(T=e.input.charCodeAt(e.position),T===91)d=93,g=!1,l=[];else if(T===123)d=125,g=!0,l={};else return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=l),T=e.input.charCodeAt(++e.position);T!==0;){if(vn(e,!0,t),T=e.input.charCodeAt(e.position),T===d)return e.position++,e.tag=s,e.anchor=h,e.kind=g?"mapping":"sequence",e.result=l,!0;r?T===44&&Qt(e,"expected the node content, but found ','"):Qt(e,"missed comma between flow collection entries"),b=y=v=null,p=f=!1,T===63&&(u=e.input.charCodeAt(e.position+1),hs(u)&&(p=f=!0,e.position++,vn(e,!0,t))),i=e.line,n=e.lineStart,a=e.position,$p(e,t,qk,!1,!0),b=e.tag,y=e.result,vn(e,!0,t),T=e.input.charCodeAt(e.position),(f||e.line===i)&&T===58&&(p=!0,T=e.input.charCodeAt(++e.position),vn(e,!0,t),$p(e,t,qk,!1,!0),v=e.result),g?Lp(e,l,m,b,y,v,i,n,a):p?l.push(Lp(e,null,m,b,y,v,i,n,a)):l.push(y),vn(e,!0,t),T=e.input.charCodeAt(e.position),T===44?(r=!0,T=e.input.charCodeAt(++e.position)):r=!1}Qt(e,"unexpected end of the stream within a flow collection")}function wse(e,t){var r,i,n=HR,a=!1,s=!1,l=t,h=0,u=!1,d,p;if(p=e.input.charCodeAt(e.position),p===124)i=!1;else if(p===62)i=!0;else return!1;for(e.kind="scalar",e.result="";p!==0;)if(p=e.input.charCodeAt(++e.position),p===43||p===45)HR===n?n=p===43?vae:BMe:Qt(e,"repeat of a chomping mode identifier");else if((d=gse(p))>=0)d===0?Qt(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):s?Qt(e,"repeat of an indentation width identifier"):(l=t+d-1,s=!0);else break;if(Fu(p)){do p=e.input.charCodeAt(++e.position);while(Fu(p));if(p===35)do p=e.input.charCodeAt(++e.position);while(!xl(p)&&p!==0)}for(;p!==0;){for(Vk(e),e.lineIndent=0,p=e.input.charCodeAt(e.position);(!s||e.lineIndentl&&(l=e.lineIndent),xl(p)){h++;continue}if(e.lineIndentt)&&h!==0)Qt(e,"bad indentation of a sequence entry");else if(e.lineIndentt)&&(b&&(s=e.line,l=e.lineStart,h=e.position),$p(e,t,jk,!0,n)&&(b?m=e.result:y=e.result),b||(Lp(e,p,f,g,m,y,s,l,h),g=m=y=null),vn(e,!0,-1),T=e.input.charCodeAt(e.position)),(e.line===a||e.lineIndent>t)&&T!==0)Qt(e,"bad indentation of a mapping entry");else if(e.lineIndentt?h=1:e.lineIndent===t?h=0:e.lineIndentt?h=1:e.lineIndent===t?h=0:e.lineIndent tag; it should be "scalar", not "'+e.kind+'"'),p=0,f=e.implicitTypes.length;p"),e.result!==null&&m.kind!==e.kind&&Qt(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+m.kind+'", not "'+e.kind+'"'),m.resolve(e.result,e.tag)?(e.result=m.construct(e.result,e.tag),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):Qt(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 Rse(e){var t=e.position,r,i,n,a=!1,s;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap=Object.create(null),e.anchorMap=Object.create(null);(s=e.input.charCodeAt(e.position))!==0&&(vn(e,!0,-1),s=e.input.charCodeAt(e.position),!(e.lineIndent>0||s!==37));){for(a=!0,s=e.input.charCodeAt(++e.position),r=e.position;s!==0&&!hs(s);)s=e.input.charCodeAt(++e.position);for(i=e.input.slice(r,e.position),n=[],i.length<1&&Qt(e,"directive name must not be less than one character in length");s!==0;){for(;Fu(s);)s=e.input.charCodeAt(++e.position);if(s===35){do s=e.input.charCodeAt(++e.position);while(s!==0&&!xl(s));break}if(xl(s))break;for(r=e.position;s!==0&&!hs(s);)s=e.input.charCodeAt(++e.position);n.push(e.input.slice(r,e.position))}s!==0&&Vk(e),zu.call(bae,i)?bae[i](e,i,n):$2(e,'unknown document directive "'+i+'"')}if(vn(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,vn(e,!0,-1)):a&&Qt(e,"directives end mark is expected"),$p(e,e.lineIndent-1,jk,!1,!0),vn(e,!0,-1),e.checkLineBreaks&&FMe.test(e.input.slice(t,e.position))&&$2(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&N2(e)){e.input.charCodeAt(e.position)===46&&(e.position+=3,vn(e,!0,-1));return}if(e.position"u"&&(r=t,t=null);var i=gL(e,r);if(typeof t!="function")return i;for(var n=0,a=i.length;n=55296&&r<=56319&&t+1=56320&&i<=57343)?(r-55296)*1024+i-56320+65536:r}function yL(e){var t=/^\n* /;return t.test(e)}function Xse(e,t,r,i,n,a,s,l){var h,u=0,d=null,p=!1,f=!1,g=i!==-1,m=-1,y=Wse(C0(e,0))&&Use(C0(e,e.length-1));if(t||s)for(h=0;h=65536?h+=2:h++){if(u=C0(e,h),!E0(u))return k0;y=y&&iL(u,d,l),d=u}else{for(h=0;h=65536?h+=2:h++){if(u=C0(e,h),u===I2)p=!0,g&&(f=f||h-m-1>i&&e[m+1]!==" ",m=h);else if(!E0(u))return k0;y=y&&iL(u,d,l),d=u}f=f||g&&h-m-1>i&&e[m+1]!==" "}return!p&&!f?y&&!s&&!n(e)?Vse:a===D2?k0:nL:r>9&&yL(e)?k0:s?a===D2?k0:nL:f?Hse:Yse}function Kse(e,t,r,i,n){e.dump=(function(){if(t.length===0)return e.quotingType===D2?'""':"''";if(!e.noCompatMode&&(aNe.indexOf(t)!==-1||sNe.test(t)))return e.quotingType===D2?'"'+t+'"':"'"+t+"'";var a=e.indent*Math.max(1,r),s=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-a),l=i||e.flowLevel>-1&&r>=e.flowLevel;function h(u){return Gse(e,u)}switch(o(h,"testAmbiguity"),Xse(t,l,e.indent,s,h,e.quotingType,e.forceQuotes&&!i,n)){case Vse:return t;case nL:return"'"+t.replace(/'/g,"''")+"'";case Yse:return"|"+aL(t,e.indent)+sL(tL(t,a));case Hse:return">"+aL(t,e.indent)+sL(tL(Zse(t,s),a));case k0:return'"'+Qse(t)+'"';default:throw new Ms("impossible error: invalid scalar style")}})()}function aL(e,t){var r=yL(e)?String(t):"",i=e[e.length-1]===` +`,n=i&&(e[e.length-2]===` +`||e===` +`),a=n?"+":i?"":"-";return r+a+` +`}function sL(e){return e[e.length-1]===` +`?e.slice(0,-1):e}function Zse(e,t){for(var r=/(\n+)([^\n]*)/g,i=(function(){var u=e.indexOf(` +`);return u=u!==-1?u:e.length,r.lastIndex=u,oL(e.slice(0,u),t)})(),n=e[0]===` +`||e[0]===" ",a,s;s=r.exec(e);){var l=s[1],h=s[2];a=h[0]===" ",i+=l+(!n&&!a&&h!==""?` +`:"")+oL(h,t),n=a}return i}function oL(e,t){if(e===""||e[0]===" ")return e;for(var r=/ [^ ]/g,i,n=0,a,s=0,l=0,h="";i=r.exec(e);)l=i.index,l-n>t&&(a=s>n?s:l,h+=` +`+e.slice(n,a),n=a+1),s=l;return h+=` +`,e.length-n>t&&s>n?h+=e.slice(n,s)+` +`+e.slice(s+1):h+=e.slice(n),h.slice(1)}function Qse(e){for(var t="",r=0,i,n=0;n=65536?n+=2:n++)r=C0(e,n),i=Ya[r],!i&&E0(r)?(t+=e[n],r>=65536&&(t+=e[n+1])):t+=i||qse(r);return t}function Jse(e,t,r){var i="",n=e.tag,a,s,l;for(a=0,s=r.length;a"u"&&uc(e,t,null,!1,!1))&&(i!==""&&(i+=","+(e.condenseFlow?"":" ")),i+=e.dump);e.tag=n,e.dump="["+i+"]"}function lL(e,t,r,i){var n="",a=e.tag,s,l,h;for(s=0,l=r.length;s"u"&&uc(e,t+1,null,!0,!0,!1,!0))&&((!i||n!=="")&&(n+=Wk(e,t)),e.dump&&I2===e.dump.charCodeAt(0)?n+="-":n+="- ",n+=e.dump);e.tag=a,e.dump=n||"[]"}function eoe(e,t,r){var i="",n=e.tag,a=Object.keys(r),s,l,h,u,d;for(s=0,l=a.length;s1024&&(d+="? "),d+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),uc(e,t,u,!1,!1)&&(d+=e.dump,i+=d));e.tag=n,e.dump="{"+i+"}"}function toe(e,t,r,i){var n="",a=e.tag,s=Object.keys(r),l,h,u,d,p,f;if(e.sortKeys===!0)s.sort();else if(typeof e.sortKeys=="function")s.sort(e.sortKeys);else if(e.sortKeys)throw new Ms("sortKeys must be a boolean or a function");for(l=0,h=s.length;l1024,p&&(e.dump&&I2===e.dump.charCodeAt(0)?f+="?":f+="? "),f+=e.dump,p&&(f+=Wk(e,t)),uc(e,t+1,d,!0,p)&&(e.dump&&I2===e.dump.charCodeAt(0)?f+=":":f+=": ",f+=e.dump,n+=f));e.tag=a,e.dump=n||"{}"}function cL(e,t,r){var i,n,a,s,l,h;for(n=r?e.explicitTypes:e.implicitTypes,a=0,s=n.length;a tag resolver accepts not "'+h+'" style');e.dump=i}return!0}return!1}function uc(e,t,r,i,n,a,s){e.tag=null,e.dump=r,cL(e,r,!1)||cL(e,r,!0);var l=Dse.call(e.dump),h=i,u;i&&(i=e.flowLevel<0||e.flowLevel>t);var d=l==="[object Object]"||l==="[object Array]",p,f;if(d&&(p=e.duplicates.indexOf(r),f=p!==-1),(e.tag!==null&&e.tag!=="?"||f||e.indent!==2&&t>0)&&(n=!1),f&&e.usedDuplicates[p])e.dump="*ref_"+p;else{if(d&&f&&!e.usedDuplicates[p]&&(e.usedDuplicates[p]=!0),l==="[object Object]")i&&Object.keys(e.dump).length!==0?(toe(e,t,e.dump,n),f&&(e.dump="&ref_"+p+e.dump)):(eoe(e,t,e.dump),f&&(e.dump="&ref_"+p+" "+e.dump));else if(l==="[object Array]")i&&e.dump.length!==0?(e.noArrayIndent&&!s&&t>0?lL(e,t-1,e.dump,n):lL(e,t,e.dump,n),f&&(e.dump="&ref_"+p+e.dump)):(Jse(e,t,e.dump),f&&(e.dump="&ref_"+p+" "+e.dump));else if(l==="[object String]")e.tag!=="?"&&Kse(e,e.dump,t,a,h);else{if(l==="[object Undefined]"||e.skipInvalid)return!1;throw new Ms("unacceptable kind of an object to dump "+l)}e.tag!==null&&e.tag!=="?"&&(u=encodeURI(e.tag[0]==="!"?e.tag.slice(1):e.tag).replace(/!/g,"%21"),e.tag[0]==="!"?u="!"+u:u.slice(0,18)==="tag:yaml.org,2002:"?u="!!"+u.slice(18):u="!<"+u+">",e.dump=u+" "+e.dump)}return!0}function roe(e,t){var r=[],i=[],n,a;for(Uk(e,r,i),n=0,a=i.length;n{vt();o(hL,"isNothing");o(xae,"isObject");o(Tae,"toArray");o(kae,"extend");o(Cae,"repeat");o(wae,"isNegativeZero");sMe=hL,oMe=xae,lMe=Tae,cMe=Cae,hMe=wae,uMe=kae,Pn={isNothing:sMe,isObject:oMe,toArray:lMe,repeat:cMe,isNegativeZero:hMe,extend:uMe};o(uL,"formatError");o(w0,"YAMLException$1");w0.prototype=Object.create(Error.prototype);w0.prototype.constructor=w0;w0.prototype.toString=o(function(e){return this.name+": "+uL(this,e)},"toString");Ms=w0;o(Pk,"getLine");o(Fk,"padStart");o(Eae,"makeSnippet");dMe=Eae,pMe=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],fMe=["scalar","sequence","mapping"];o(Sae,"compileStyleAliases");o(_ae,"Type$1");Va=_ae;o(XR,"compileList");o(Aae,"compileMap");o(zk,"Schema$1");zk.prototype.extend=o(function(e){var t=[],r=[];if(e instanceof Va)r.push(e);else if(Array.isArray(e))r=r.concat(e);else if(e&&(Array.isArray(e.implicit)||Array.isArray(e.explicit)))e.implicit&&(t=t.concat(e.implicit)),e.explicit&&(r=r.concat(e.explicit));else throw new Ms("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");t.forEach(function(n){if(!(n instanceof Va))throw new Ms("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(n.loadKind&&n.loadKind!=="scalar")throw new Ms("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(n.multi)throw new Ms("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),r.forEach(function(n){if(!(n instanceof Va))throw new Ms("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var i=Object.create(zk.prototype);return i.implicit=(this.implicit||[]).concat(t),i.explicit=(this.explicit||[]).concat(r),i.compiledImplicit=XR(i,"implicit"),i.compiledExplicit=XR(i,"explicit"),i.compiledTypeMap=Aae(i.compiledImplicit,i.compiledExplicit),i},"extend");gMe=zk,mMe=new Va("tag:yaml.org,2002:str",{kind:"scalar",construct:o(function(e){return e!==null?e:""},"construct")}),yMe=new Va("tag:yaml.org,2002:seq",{kind:"sequence",construct:o(function(e){return e!==null?e:[]},"construct")}),vMe=new Va("tag:yaml.org,2002:map",{kind:"mapping",construct:o(function(e){return e!==null?e:{}},"construct")}),bMe=new gMe({explicit:[mMe,yMe,vMe]});o(Rae,"resolveYamlNull");o(Lae,"constructYamlNull");o($ae,"isNull");xMe=new Va("tag:yaml.org,2002:null",{kind:"scalar",resolve:Rae,construct:Lae,predicate:$ae,represent:{canonical:o(function(){return"~"},"canonical"),lowercase:o(function(){return"null"},"lowercase"),uppercase:o(function(){return"NULL"},"uppercase"),camelcase:o(function(){return"Null"},"camelcase"),empty:o(function(){return""},"empty")},defaultStyle:"lowercase"});o(Iae,"resolveYamlBoolean");o(Dae,"constructYamlBoolean");o(Mae,"isBoolean");TMe=new Va("tag:yaml.org,2002:bool",{kind:"scalar",resolve:Iae,construct:Dae,predicate:Mae,represent:{lowercase:o(function(e){return e?"true":"false"},"lowercase"),uppercase:o(function(e){return e?"TRUE":"FALSE"},"uppercase"),camelcase:o(function(e){return e?"True":"False"},"camelcase")},defaultStyle:"lowercase"});o(Nae,"isHexCode");o(Oae,"isOctCode");o(Bae,"isDecCode");o(Pae,"resolveYamlInteger");o(Fae,"constructYamlInteger");o(zae,"isInteger");kMe=new Va("tag:yaml.org,2002:int",{kind:"scalar",resolve:Pae,construct:Fae,predicate:zae,represent:{binary:o(function(e){return e>=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},"binary"),octal:o(function(e){return e>=0?"0o"+e.toString(8):"-0o"+e.toString(8).slice(1)},"octal"),decimal:o(function(e){return e.toString(10)},"decimal"),hexadecimal:o(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"]}}),CMe=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");o(qae,"resolveYamlFloat");o(jae,"constructYamlFloat");wMe=/^[-+]?[0-9]+e/;o(Gae,"representYamlFloat");o(Wae,"isFloat");EMe=new Va("tag:yaml.org,2002:float",{kind:"scalar",resolve:qae,construct:jae,predicate:Wae,represent:Gae,defaultStyle:"lowercase"}),Uae=bMe.extend({implicit:[xMe,TMe,kMe,EMe]}),SMe=Uae,Vae=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),Yae=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]))?))?$");o(Hae,"resolveYamlTimestamp");o(Xae,"constructYamlTimestamp");o(Kae,"representYamlTimestamp");_Me=new Va("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:Hae,construct:Xae,instanceOf:Date,represent:Kae});o(Zae,"resolveYamlMerge");AMe=new Va("tag:yaml.org,2002:merge",{kind:"scalar",resolve:Zae}),dL=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/= +\r`;o(Qae,"resolveYamlBinary");o(Jae,"constructYamlBinary");o(ese,"representYamlBinary");o(tse,"isBinary");RMe=new Va("tag:yaml.org,2002:binary",{kind:"scalar",resolve:Qae,construct:Jae,predicate:tse,represent:ese}),LMe=Object.prototype.hasOwnProperty,$Me=Object.prototype.toString;o(rse,"resolveYamlOmap");o(ise,"constructYamlOmap");IMe=new Va("tag:yaml.org,2002:omap",{kind:"sequence",resolve:rse,construct:ise}),DMe=Object.prototype.toString;o(nse,"resolveYamlPairs");o(ase,"constructYamlPairs");MMe=new Va("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:nse,construct:ase}),NMe=Object.prototype.hasOwnProperty;o(sse,"resolveYamlSet");o(ose,"constructYamlSet");OMe=new Va("tag:yaml.org,2002:set",{kind:"mapping",resolve:sse,construct:ose}),lse=SMe.extend({implicit:[_Me,AMe],explicit:[RMe,IMe,MMe,OMe]}),zu=Object.prototype.hasOwnProperty,qk=1,cse=2,hse=3,jk=4,HR=1,BMe=2,vae=3,PMe=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,FMe=/[\x85\u2028\u2029]/,zMe=/[,\[\]\{\}]/,use=/^(?:!|!!|![a-z\-]+!)$/i,dse=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;o(KR,"_class");o(xl,"is_EOL");o(Fu,"is_WHITE_SPACE");o(hs,"is_WS_OR_EOL");o(Rp,"is_FLOW_INDICATOR");o(pse,"fromHexCode");o(fse,"escapedHexLen");o(gse,"fromDecimalCode");o(ZR,"simpleEscapeSequence");o(mse,"charFromCodepoint");o(pL,"setProperty");yse=new Array(256),vse=new Array(256);for(Ap=0;Ap<256;Ap++)yse[Ap]=ZR(Ap)?1:0,vse[Ap]=ZR(Ap);o(bse,"State$1");o(fL,"generateError");o(Qt,"throwError");o($2,"throwWarning");bae={YAML:o(function(e,t,r){var i,n,a;e.version!==null&&Qt(e,"duplication of %YAML directive"),r.length!==1&&Qt(e,"YAML directive accepts exactly one argument"),i=/^([0-9]+)\.([0-9]+)$/.exec(r[0]),i===null&&Qt(e,"ill-formed argument of the YAML directive"),n=parseInt(i[1],10),a=parseInt(i[2],10),n!==1&&Qt(e,"unacceptable YAML version of the document"),e.version=r[0],e.checkLineBreaks=a<2,a!==1&&a!==2&&$2(e,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:o(function(e,t,r){var i,n;r.length!==2&&Qt(e,"TAG directive accepts exactly two arguments"),i=r[0],n=r[1],use.test(i)||Qt(e,"ill-formed tag handle (first argument) of the TAG directive"),zu.call(e.tagMap,i)&&Qt(e,'there is a previously declared suffix for "'+i+'" tag handle'),dse.test(n)||Qt(e,"ill-formed tag prefix (second argument) of the TAG directive");try{n=decodeURIComponent(n)}catch{Qt(e,"tag prefix is malformed: "+n)}e.tagMap[i]=n},"handleTagDirective")};o(mh,"captureSegment");o(QR,"mergeMappings");o(Lp,"storeMappingPair");o(Vk,"readLineBreak");o(vn,"skipSeparationSpace");o(N2,"testDocumentSeparator");o(Yk,"writeFoldedLines");o(xse,"readPlainScalar");o(Tse,"readSingleQuotedScalar");o(kse,"readDoubleQuotedScalar");o(Cse,"readFlowCollection");o(wse,"readBlockScalar");o(JR,"readBlockSequence");o(Ese,"readBlockMapping");o(Sse,"readTagProperty");o(_se,"readAnchorProperty");o(Ase,"readAlias");o($p,"composeNode");o(Rse,"readDocument");o(gL,"loadDocuments");o(Lse,"loadAll$1");o($se,"load$1");qMe=Lse,jMe=$se,Ise={loadAll:qMe,load:jMe},Dse=Object.prototype.toString,Mse=Object.prototype.hasOwnProperty,mL=65279,GMe=9,I2=10,WMe=13,UMe=32,VMe=33,YMe=34,eL=35,HMe=37,XMe=38,KMe=39,ZMe=42,Nse=44,QMe=45,Gk=58,JMe=61,eNe=62,tNe=63,rNe=64,Ose=91,Bse=93,iNe=96,Pse=123,nNe=124,Fse=125,Ya={};Ya[0]="\\0";Ya[7]="\\a";Ya[8]="\\b";Ya[9]="\\t";Ya[10]="\\n";Ya[11]="\\v";Ya[12]="\\f";Ya[13]="\\r";Ya[27]="\\e";Ya[34]='\\"';Ya[92]="\\\\";Ya[133]="\\N";Ya[160]="\\_";Ya[8232]="\\L";Ya[8233]="\\P";aNe=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],sNe=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;o(zse,"compileStyleMap");o(qse,"encodeHex");oNe=1,D2=2;o(jse,"State");o(tL,"indentString");o(Wk,"generateNextLine");o(Gse,"testImplicitResolving");o(M2,"isWhitespace");o(E0,"isPrintable");o(rL,"isNsCharOrWhitespace");o(iL,"isPlainSafe");o(Wse,"isPlainSafeFirst");o(Use,"isPlainSafeLast");o(C0,"codePointAt");o(yL,"needIndentIndicator");Vse=1,nL=2,Yse=3,Hse=4,k0=5;o(Xse,"chooseScalarStyle");o(Kse,"writeScalar");o(aL,"blockHeader");o(sL,"dropEndingNewline");o(Zse,"foldString");o(oL,"foldLine");o(Qse,"escapeString");o(Jse,"writeFlowSequence");o(lL,"writeBlockSequence");o(eoe,"writeFlowMapping");o(toe,"writeBlockMapping");o(cL,"detectType");o(uc,"writeNode");o(roe,"getDuplicateReferences");o(Uk,"inspectNode");o(ioe,"dump$1");lNe=ioe,cNe={dump:lNe};o(Hk,"renamed");qu=Uae,ju=Ise.load,j3t=Ise.loadAll,G3t=cNe.dump,W3t=Hk("safeLoad","load"),U3t=Hk("safeLoadAll","loadAll"),V3t=Hk("safeDump","dump");});function Zk(e,t,r){if(e&&e.length){let[i,n]=t,a=Math.PI/180*r,s=Math.cos(a),l=Math.sin(a);for(let h of e){let[u,d]=h;h[0]=(u-i)*s-(d-n)*l+i,h[1]=(u-i)*l+(d-n)*s+n}}}function aoe(e,t){return e[0]===t[0]&&e[1]===t[1]}function soe(e,t,r,i=1){let n=r,a=Math.max(t,.1),s=e[0]&&e[0][0]&&typeof e[0][0]=="number"?[e]:e,l=[0,0];if(n)for(let u of s)Zk(u,l,n);let h=(function(u,d,p){let f=[];for(let T of u){let x=[...T];aoe(x[0],x[x.length-1])||x.push([x[0][0],x[0][1]]),x.length>2&&f.push(x)}let g=[];d=Math.max(d,.1);let m=[];for(let T of f)for(let x=0;xT.yminx.ymin?1:T.xx.x?1:T.ymax===x.ymax?0:(T.ymax-x.ymax)/Math.abs(T.ymax-x.ymax))),!m.length)return g;let y=[],b=m[0].ymin,v=0;for(;y.length||m.length;){if(m.length){let T=-1;for(let x=0;xb);x++)T=x;m.splice(0,T+1).forEach((x=>{y.push({s:b,edge:x})}))}if(y=y.filter((T=>!(T.edge.ymax<=b))),y.sort(((T,x)=>T.edge.x===x.edge.x?0:(T.edge.x-x.edge.x)/Math.abs(T.edge.x-x.edge.x))),(p!==1||v%d==0)&&y.length>1)for(let T=0;T=y.length)break;let k=y[T].edge,C=y[x].edge;g.push([[Math.round(k.x),b],[Math.round(C.x),b]])}b+=p,y.forEach((T=>{T.edge.x=T.edge.x+p*T.edge.islope})),v++}return g})(s,a,i);if(n){for(let u of s)Zk(u,l,-n);(function(u,d,p){let f=[];u.forEach((g=>f.push(...g))),Zk(f,d,p)})(h,l,-n)}return h}function A0(e,t){var r;let i=t.hachureAngle+90,n=t.hachureGap;n<0&&(n=4*t.strokeWidth),n=Math.round(Math.max(n,.1));let a=1;return t.roughness>=1&&(((r=t.randomizer)===null||r===void 0?void 0:r.next())||Math.random())>.7&&(a=n),soe(e,n,i,a||1)}function j2(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 Qk(e,t){return e.type===t}function a3(e){let t=[],r=(function(s){let l=new Array;for(;s!=="";)if(s.match(/^([ \t\r\n,]+)/))s=s.substr(RegExp.$1.length);else if(s.match(/^([aAcChHlLmMqQsStTvVzZ])/))l[l.length]={type:mNe,text:RegExp.$1},s=s.substr(RegExp.$1.length);else{if(!s.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))return[];l[l.length]={type:vL,text:`${parseFloat(RegExp.$1)}`},s=s.substr(RegExp.$1.length)}return l[l.length]={type:noe,text:""},l})(e),i="BOD",n=0,a=r[n];for(;!Qk(a,noe);){let s=0,l=[];if(i==="BOD"){if(a.text!=="M"&&a.text!=="m")return a3("M0,0"+e);n++,s=Xk[a.text],i=a.text}else Qk(a,vL)?s=Xk[i]:(n++,s=Xk[a.text],i=a.text);if(!(n+sd%2?u+r:u+t));a.push({key:"C",data:h}),t=h[4],r=h[5];break}case"Q":a.push({key:"Q",data:[...l]}),t=l[2],r=l[3];break;case"q":{let h=l.map(((u,d)=>d%2?u+r:u+t));a.push({key:"Q",data:h}),t=h[2],r=h[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 h=l.map(((u,d)=>d%2?u+r:u+t));a.push({key:"S",data:h}),t=h[2],r=h[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=i,r=n}return a}function AL(e){let t=[],r="",i=0,n=0,a=0,s=0,l=0,h=0;for(let{key:u,data:d}of e){switch(u){case"M":t.push({key:"M",data:[...d]}),[i,n]=d,[a,s]=d;break;case"C":t.push({key:"C",data:[...d]}),i=d[4],n=d[5],l=d[2],h=d[3];break;case"L":t.push({key:"L",data:[...d]}),[i,n]=d;break;case"H":i=d[0],t.push({key:"L",data:[i,n]});break;case"V":n=d[0],t.push({key:"L",data:[i,n]});break;case"S":{let p=0,f=0;r==="C"||r==="S"?(p=i+(i-l),f=n+(n-h)):(p=i,f=n),t.push({key:"C",data:[p,f,...d]}),l=d[0],h=d[1],i=d[2],n=d[3];break}case"T":{let[p,f]=d,g=0,m=0;r==="Q"||r==="T"?(g=i+(i-l),m=n+(n-h)):(g=i,m=n);let y=i+2*(g-i)/3,b=n+2*(m-n)/3,v=p+2*(g-p)/3,T=f+2*(m-f)/3;t.push({key:"C",data:[y,b,v,T,p,f]}),l=g,h=m,i=p,n=f;break}case"Q":{let[p,f,g,m]=d,y=i+2*(p-i)/3,b=n+2*(f-n)/3,v=g+2*(p-g)/3,T=m+2*(f-m)/3;t.push({key:"C",data:[y,b,v,T,g,m]}),l=p,h=f,i=g,n=m;break}case"A":{let p=Math.abs(d[0]),f=Math.abs(d[1]),g=d[2],m=d[3],y=d[4],b=d[5],v=d[6];p===0||f===0?(t.push({key:"C",data:[i,n,b,v,b,v]}),i=b,n=v):(i!==b||n!==v)&&(RL(i,n,b,v,p,f,g,m,y).forEach((function(T){t.push({key:"C",data:T})})),i=b,n=v);break}case"Z":t.push({key:"Z",data:[]}),i=a,n=s}r=u}return t}function S0(e,t,r){return[e*Math.cos(r)-t*Math.sin(r),e*Math.sin(r)+t*Math.cos(r)]}function RL(e,t,r,i,n,a,s,l,h,u){let d=(p=s,Math.PI*p/180);var p;let f=[],g=0,m=0,y=0,b=0;if(u)[g,m,y,b]=u;else{[e,t]=S0(e,t,-d),[r,i]=S0(r,i,-d);let B=(e-r)/2,A=(t-i)/2,I=B*B/(n*n)+A*A/(a*a);I>1&&(I=Math.sqrt(I),n*=I,a*=I);let O=n*n,R=a*a,$=O*R-O*A*A-R*B*B,F=O*A*A+R*B*B,P=(l===h?-1:1)*Math.sqrt(Math.abs($/F));y=P*n*A/a+(e+r)/2,b=P*-a*B/n+(t+i)/2,g=Math.asin(parseFloat(((t-b)/a).toFixed(9))),m=Math.asin(parseFloat(((i-b)/a).toFixed(9))),em&&(g-=2*Math.PI),!h&&m>g&&(m-=2*Math.PI)}let v=m-g;if(Math.abs(v)>120*Math.PI/180){let B=m,A=r,I=i;m=h&&m>g?g+120*Math.PI/180*1:g+120*Math.PI/180*-1,f=RL(r=y+n*Math.cos(m),i=b+a*Math.sin(m),A,I,n,a,s,0,h,[m,B,y,b])}v=m-g;let T=Math.cos(g),x=Math.sin(g),k=Math.cos(m),C=Math.sin(m),E=Math.tan(v/4),w=4/3*n*E,_=4/3*a*E,L=[e,t],N=[e+w*x,t-_*T],D=[r+w*C,i-_*k],M=[r,i];if(N[0]=2*L[0]-N[0],N[1]=2*L[1]-N[1],u)return[N,D,M].concat(f);{f=[N,D,M].concat(f);let B=[];for(let A=0;A2){let n=[];for(let a=0;a2*Math.PI&&(g=0,m=2*Math.PI);let y=2*Math.PI/h.curveStepCount,b=Math.min(y/2,(m-g)/2),v=wL(b,u,d,p,f,g,m,1,h);if(!h.disableMultiStroke){let T=wL(b,u,d,p,f,g,m,1.5,h);v.push(...T)}return s&&(l?v.push(...yh(u,d,u+p*Math.cos(g),d+f*Math.sin(g),h),...yh(u,d,u+p*Math.cos(m),d+f*Math.sin(m),h)):v.push({op:"lineTo",data:[u,d]},{op:"lineTo",data:[u+p*Math.cos(g),d+f*Math.sin(g)]})),{type:"path",ops:v}}function TL(e,t){let r=AL(_L(a3(e))),i=[],n=[0,0],a=[0,0];for(let{key:s,data:l}of r)switch(s){case"M":a=[l[0],l[1]],n=[l[0],l[1]];break;case"L":i.push(...yh(a[0],a[1],l[0],l[1],t)),a=[l[0],l[1]];break;case"C":{let[h,u,d,p,f,g]=l;i.push(...loe(h,u,d,p,f,g,a,t)),a=[f,g];break}case"Z":i.push(...yh(a[0],a[1],n[0],n[1],t)),a=[n[0],n[1]]}return{type:"path",ops:i}}function Jk(e,t){let r=[];for(let i of e)if(i.length){let n=t.maxRandomnessOffset||0,a=i.length;if(a>2){r.push({op:"move",data:[i[0][0]+or(n,t),i[0][1]+or(n,t)]});for(let s=1;s500?.4:-.0016668*h+1.233334;let d=n.maxRandomnessOffset||0;d*d*100>l&&(d=h/10);let p=d/2,f=.2+.2*IL(n),g=n.bowing*n.maxRandomnessOffset*(i-t)/200,m=n.bowing*n.maxRandomnessOffset*(e-r)/200;g=or(g,n,u),m=or(m,n,u);let y=[],b=o(()=>or(p,n,u),"M"),v=o(()=>or(d,n,u),"k"),T=n.preserveVertices;return a&&(s?y.push({op:"move",data:[e+(T?0:b()),t+(T?0:b())]}):y.push({op:"move",data:[e+(T?0:or(d,n,u)),t+(T?0:or(d,n,u))]})),s?y.push({op:"bcurveTo",data:[g+e+(r-e)*f+b(),m+t+(i-t)*f+b(),g+e+2*(r-e)*f+b(),m+t+2*(i-t)*f+b(),r+(T?0:b()),i+(T?0:b())]}):y.push({op:"bcurveTo",data:[g+e+(r-e)*f+v(),m+t+(i-t)*f+v(),g+e+2*(r-e)*f+v(),m+t+2*(i-t)*f+v(),r+(T?0:v()),i+(T?0:v())]}),y}function O2(e,t,r){if(!e.length)return[];let i=[];i.push([e[0][0]+or(t,r),e[0][1]+or(t,r)]),i.push([e[0][0]+or(t,r),e[0][1]+or(t,r)]);for(let n=1;n3){let a=[],s=1-r.curveTightness;n.push({op:"move",data:[e[1][0],e[1][1]]});for(let l=1;l+21&&n.push(l)):n.push(l),n.push(e[t+3])}else{let l=e[t+0],h=e[t+1],u=e[t+2],d=e[t+3],p=Gu(l,h,.5),f=Gu(h,u,.5),g=Gu(u,d,.5),m=Gu(p,f,.5),y=Gu(f,g,.5),b=Gu(m,y,.5);i3([l,p,m,b],0,r,n),i3([b,y,g,d],0,r,n)}var a,s;return n}function hoe(e,t){return q2(e,0,e.length,t)}function q2(e,t,r,i,n){let a=n||[],s=e[t],l=e[r-1],h=0,u=1;for(let d=t+1;dh&&(h=p,u=d)}return Math.sqrt(h)>i?(q2(e,t,u+1,i,a),q2(e,u,r,i,a)):(a.length||a.push(s),a.push(l)),a}function e3(e,t=.15,r){let i=[],n=(e.length-1)/3;for(let a=0;a0?q2(i,0,i.length,r):i}var SL,hNe,uNe,dNe,pNe,fNe,Ns,gNe,mNe,vL,noe,Xk,yNe,ao,n3,vNe,Kk,bNe,Bt,Zn=Tt(()=>{vt();o(Zk,"t");o(aoe,"e");o(soe,"s");o(A0,"n");SL=class{static{o(this,"o")}constructor(e){this.helper=e}fillPolygons(e,t){return this._fillPolygons(e,t)}_fillPolygons(e,t){let r=A0(e,t);return{type:"fillSketch",ops:this.renderLines(r,t)}}renderLines(e,t){let r=[];for(let i of e)r.push(...this.helper.doubleLineOps(i[0][0],i[0][1],i[1][0],i[1][1],t));return r}};o(j2,"a");hNe=class extends SL{static{o(this,"h")}fillPolygons(e,t){let r=t.hachureGap;r<0&&(r=4*t.strokeWidth),r=Math.max(r,.1);let i=A0(e,Object.assign({},t,{hachureGap:r})),n=Math.PI/180*t.hachureAngle,a=[],s=.5*r*Math.cos(n),l=.5*r*Math.sin(n);for(let[h,u]of i)j2([h,u])&&a.push([[h[0]-s,h[1]+l],[...u]],[[h[0]+s,h[1]-l],[...u]]);return{type:"fillSketch",ops:this.renderLines(a,t)}}},uNe=class extends SL{static{o(this,"r")}fillPolygons(e,t){let r=this._fillPolygons(e,t),i=Object.assign({},t,{hachureAngle:t.hachureAngle+90}),n=this._fillPolygons(e,i);return r.ops=r.ops.concat(n.ops),r}},dNe=class{static{o(this,"i")}constructor(e){this.helper=e}fillPolygons(e,t){let r=A0(e,t=Object.assign({},t,{hachureAngle:0}));return this.dotsOnLines(r,t)}dotsOnLines(e,t){let r=[],i=t.hachureGap;i<0&&(i=4*t.strokeWidth),i=Math.max(i,.1);let n=t.fillWeight;n<0&&(n=t.strokeWidth/2);let a=i/4;for(let s of e){let l=j2(s),h=l/i,u=Math.ceil(h)-1,d=l-u*i,p=(s[0][0]+s[1][0])/2-i/4,f=Math.min(s[0][1],s[1][1]);for(let g=0;g{let s=j2(a),l=Math.floor(s/(r+i)),h=(s+i-l*(r+i))/2,u=a[0],d=a[1];u[0]>d[0]&&(u=a[1],d=a[0]);let p=Math.atan((d[1]-u[1])/(d[0]-u[0]));for(let f=0;f{let a=j2(n),s=Math.round(a/(2*t)),l=n[0],h=n[1];l[0]>h[0]&&(l=n[1],h=n[0]);let u=Math.atan((h[1]-l[1])/(h[0]-l[0]));for(let d=0;d2*Math.PI&&(E=0,w=2*Math.PI);let _=(w-E)/v.curveStepCount,L=[];for(let N=E;N<=w;N+=_)L.push([T+k*Math.cos(N),x+C*Math.sin(N)]);return L.push([T+k*Math.cos(w),x+C*Math.sin(w)]),L.push([T,x]),Dp([L],v)})(e,t,r,i,n,a,h));return h.stroke!==ao&&u.push(d),this._d("arc",u,h)}curve(e,t){let r=this._o(t),i=[],n=bL(e,r);if(r.fill&&r.fill!==ao)if(r.fillStyle==="solid"){let a=bL(e,Object.assign(Object.assign({},r),{disableMultiStroke:!0,roughness:r.roughness?r.roughness+r.fillShapeRoughnessGain:0}));i.push({type:"fillPath",ops:this._mergedShape(a.ops)})}else{let a=[],s=e;if(s.length){let l=typeof s[0][0]=="number"?[s]:s;for(let h of l)h.length<3?a.push(...h):h.length===3?a.push(...e3(EL([h[0],h[0],h[1],h[2]]),10,(1+r.roughness)/2)):a.push(...e3(EL(h),10,(1+r.roughness)/2))}a.length&&i.push(Dp([a],r))}return r.stroke!==ao&&i.push(n),this._d("curve",i,r)}polygon(e,t){let r=this._o(t),i=[],n=B2(e,!0,r);return r.fill&&(r.fillStyle==="solid"?i.push(Jk([e],r)):i.push(Dp([e],r))),r.stroke!==ao&&i.push(n),this._d("polygon",i,r)}path(e,t){let r=this._o(t),i=[];if(!e)return this._d("path",i,r);e=(e||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");let n=r.fill&&r.fill!=="transparent"&&r.fill!==ao,a=r.stroke!==ao,s=!!(r.simplification&&r.simplification<1),l=(function(u,d,p){let f=AL(_L(a3(u))),g=[],m=[],y=[0,0],b=[],v=o(()=>{b.length>=4&&m.push(...e3(b,d)),b=[]},"i"),T=o(()=>{v(),m.length&&(g.push(m),m=[])},"c");for(let{key:k,data:C}of f)switch(k){case"M":T(),y=[C[0],C[1]],m.push(y);break;case"L":v(),m.push([C[0],C[1]]);break;case"C":if(!b.length){let E=m.length?m[m.length-1]:y;b.push([E[0],E[1]])}b.push([C[0],C[1]]),b.push([C[2],C[3]]),b.push([C[4],C[5]]);break;case"Z":v(),m.push([y[0],y[1]])}if(T(),!p)return g;let x=[];for(let k of g){let C=hoe(k,p);C.length&&x.push(C)}return x})(e,1,s?4-4*(r.simplification||1):(1+r.roughness)/2),h=TL(e,r);if(n)if(r.fillStyle==="solid")if(l.length===1){let u=TL(e,Object.assign(Object.assign({},r),{disableMultiStroke:!0,roughness:r.roughness?r.roughness+r.fillShapeRoughnessGain:0}));i.push({type:"fillPath",ops:this._mergedShape(u.ops)})}else i.push(Jk(l,r));else i.push(Dp(l,r));return a&&(s?l.forEach((u=>{i.push(B2(u,!1,r))})):i.push(h)),this._d("path",i,r)}opsToPath(e,t){let r="";for(let i of e.ops){let n=typeof t=="number"&&t>=0?i.data.map((a=>+a.toFixed(t))):i.data;switch(i.op){case"move":r+=`M${n[0]} ${n[1]} `;break;case"bcurveTo":r+=`C${n[0]} ${n[1]}, ${n[2]} ${n[3]}, ${n[4]} ${n[5]} `;break;case"lineTo":r+=`L${n[0]} ${n[1]} `}}return r.trim()}toPaths(e){let t=e.sets||[],r=e.options||this.defaultOptions,i=[];for(let n of t){let a=null;switch(n.type){case"path":a={d:this.opsToPath(n),stroke:r.stroke,strokeWidth:r.strokeWidth,fill:ao};break;case"fillPath":a={d:this.opsToPath(n),stroke:ao,strokeWidth:0,fill:r.fill||ao};break;case"fillSketch":a=this.fillSketch(n,r)}a&&i.push(a)}return i}fillSketch(e,t){let r=t.fillWeight;return r<0&&(r=t.strokeWidth/2),{d:this.opsToPath(e),stroke:t.fill||ao,strokeWidth:r,fill:ao}}_mergedShape(e){return e.filter(((t,r)=>r===0||t.op!=="move"))}},vNe=class{static{o(this,"st")}constructor(e,t){this.canvas=e,this.ctx=this.canvas.getContext("2d"),this.gen=new n3(t)}draw(e){let t=e.sets||[],r=e.options||this.getDefaultOptions(),i=this.ctx,n=e.options.fixedDecimalPlaceDigits;for(let a of t)switch(a.type){case"path":i.save(),i.strokeStyle=r.stroke==="none"?"transparent":r.stroke,i.lineWidth=r.strokeWidth,r.strokeLineDash&&i.setLineDash(r.strokeLineDash),r.strokeLineDashOffset&&(i.lineDashOffset=r.strokeLineDashOffset),this._drawToContext(i,a,n),i.restore();break;case"fillPath":{i.save(),i.fillStyle=r.fill||"";let s=e.shape==="curve"||e.shape==="polygon"||e.shape==="path"?"evenodd":"nonzero";this._drawToContext(i,a,n,s),i.restore();break}case"fillSketch":this.fillSketch(i,a,r)}}fillSketch(e,t,r){let i=r.fillWeight;i<0&&(i=r.strokeWidth/2),e.save(),r.fillLineDash&&e.setLineDash(r.fillLineDash),r.fillLineDashOffset&&(e.lineDashOffset=r.fillLineDashOffset),e.strokeStyle=r.fill||"",e.lineWidth=i,this._drawToContext(e,t,r.fixedDecimalPlaceDigits),e.restore()}_drawToContext(e,t,r,i="nonzero"){e.beginPath();for(let n of t.ops){let a=typeof r=="number"&&r>=0?n.data.map((s=>+s.toFixed(r))):n.data;switch(n.op){case"move":e.moveTo(a[0],a[1]);break;case"bcurveTo":e.bezierCurveTo(a[0],a[1],a[2],a[3],a[4],a[5]);break;case"lineTo":e.lineTo(a[0],a[1])}}t.type==="fillPath"?e.fill(i):e.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(e,t,r,i,n){let a=this.gen.line(e,t,r,i,n);return this.draw(a),a}rectangle(e,t,r,i,n){let a=this.gen.rectangle(e,t,r,i,n);return this.draw(a),a}ellipse(e,t,r,i,n){let a=this.gen.ellipse(e,t,r,i,n);return this.draw(a),a}circle(e,t,r,i){let n=this.gen.circle(e,t,r,i);return this.draw(n),n}linearPath(e,t){let r=this.gen.linearPath(e,t);return this.draw(r),r}polygon(e,t){let r=this.gen.polygon(e,t);return this.draw(r),r}arc(e,t,r,i,n,a,s=!1,l){let h=this.gen.arc(e,t,r,i,n,a,s,l);return this.draw(h),h}curve(e,t){let r=this.gen.curve(e,t);return this.draw(r),r}path(e,t){let r=this.gen.path(e,t);return this.draw(r),r}},Kk="http://www.w3.org/2000/svg",bNe=class{static{o(this,"ot")}constructor(e,t){this.svg=e,this.gen=new n3(t)}draw(e){let t=e.sets||[],r=e.options||this.getDefaultOptions(),i=this.svg.ownerDocument||window.document,n=i.createElementNS(Kk,"g"),a=e.options.fixedDecimalPlaceDigits;for(let s of t){let l=null;switch(s.type){case"path":l=i.createElementNS(Kk,"path"),l.setAttribute("d",this.opsToPath(s,a)),l.setAttribute("stroke",r.stroke),l.setAttribute("stroke-width",r.strokeWidth+""),l.setAttribute("fill","none"),r.strokeLineDash&&l.setAttribute("stroke-dasharray",r.strokeLineDash.join(" ").trim()),r.strokeLineDashOffset&&l.setAttribute("stroke-dashoffset",`${r.strokeLineDashOffset}`);break;case"fillPath":l=i.createElementNS(Kk,"path"),l.setAttribute("d",this.opsToPath(s,a)),l.setAttribute("stroke","none"),l.setAttribute("stroke-width","0"),l.setAttribute("fill",r.fill||""),e.shape!=="curve"&&e.shape!=="polygon"||l.setAttribute("fill-rule","evenodd");break;case"fillSketch":l=this.fillSketch(i,s,r)}l&&n.appendChild(l)}return n}fillSketch(e,t,r){let i=r.fillWeight;i<0&&(i=r.strokeWidth/2);let n=e.createElementNS(Kk,"path");return n.setAttribute("d",this.opsToPath(t,r.fixedDecimalPlaceDigits)),n.setAttribute("stroke",r.fill||""),n.setAttribute("stroke-width",i+""),n.setAttribute("fill","none"),r.fillLineDash&&n.setAttribute("stroke-dasharray",r.fillLineDash.join(" ").trim()),r.fillLineDashOffset&&n.setAttribute("stroke-dashoffset",`${r.fillLineDashOffset}`),n}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(e,t){return this.gen.opsToPath(e,t)}line(e,t,r,i,n){let a=this.gen.line(e,t,r,i,n);return this.draw(a)}rectangle(e,t,r,i,n){let a=this.gen.rectangle(e,t,r,i,n);return this.draw(a)}ellipse(e,t,r,i,n){let a=this.gen.ellipse(e,t,r,i,n);return this.draw(a)}circle(e,t,r,i){let n=this.gen.circle(e,t,r,i);return this.draw(n)}linearPath(e,t){let r=this.gen.linearPath(e,t);return this.draw(r)}polygon(e,t){let r=this.gen.polygon(e,t);return this.draw(r)}arc(e,t,r,i,n,a,s=!1,l){let h=this.gen.arc(e,t,r,i,n,a,s,l);return this.draw(h)}curve(e,t){let r=this.gen.curve(e,t);return this.draw(r)}path(e,t){let r=this.gen.path(e,t);return this.draw(r)}},Bt={canvas:o((e,t)=>new vNe(e,t),"canvas"),svg:o((e,t)=>new bNe(e,t),"svg"),generator:o(e=>new n3(e),"generator"),newSeed:o(()=>n3.newSeed(),"newSeed")}});var uoe,Mp,xNe,G2,Pt,qt,TNe,sa=Tt(()=>{tr();vt();uoe=o(e=>{let{handDrawnSeed:t}=De();return{fill:e,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:e,seed:t}},"solidStateFill"),Mp=o(e=>{let t=xNe([...e.cssCompiledStyles||[],...e.cssStyles||[],...e.labelStyle||[]]);return{stylesMap:t,stylesArray:[...t]}},"compileStyles"),xNe=o(e=>{let t=new Map;return e.forEach(r=>{let[i,n]=r.split(":");t.set(i.trim(),n?.trim())}),t},"styles2Map"),G2=o(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"),Pt=o(e=>{let{stylesArray:t}=Mp(e),r=[],i=[],n=[],a=[];return t.forEach(s=>{let l=s[0];G2(l)?r.push(s.join(":")+" !important"):(i.push(s.join(":")+" !important"),l.includes("stroke")&&n.push(s.join(":")+" !important"),l==="fill"&&a.push(s.join(":")+" !important"))}),{labelStyles:r.join(";"),nodeStyles:i.join(";"),stylesArray:t,borderStyles:n,backgroundStyles:a}},"styles2String"),qt=o((e,t)=>{let{themeVariables:r,handDrawnSeed:i}=De(),{nodeBorder:n,mainBkg:a}=r,{stylesMap:s}=Mp(e);return Object.assign({roughness:.7,fill:s.get("fill")||a,fillStyle:"hachure",fillWeight:4,hachureGap:5.2,stroke:s.get("stroke")||n,seed:i,strokeWidth:s.get("stroke-width")?.replace("px","")||1.3,fillLineDash:[0,0],strokeLineDash:TNe(s.get("stroke-dasharray"))},t)},"userNodeOverrides"),TNe=o(e=>{if(!e)return[0,0];let t=e.trim().split(/\s+/).map(Number);if(t.length===1){let n=isNaN(t[0])?0:t[0];return[n,n]}let r=isNaN(t[0])?0:t[0],i=isNaN(t[1])?0:t[1];return[r,i]},"getStrokeDashArray")});var kNe,dc,Yr=Tt(()=>{vt();kNe=Xn(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BLANK_URL=e.relativeFirstCharacters=e.whitespaceEscapeCharsRegex=e.urlSchemeRegex=e.ctrlCharactersRegex=e.htmlCtrlEntityRegex=e.htmlEntitiesRegex=e.invalidProtocolRegex=void 0,e.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im,e.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g,e.htmlCtrlEntityRegex=/&(newline|tab);/gi,e.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,e.urlSchemeRegex=/^.+(:|:)/gim,e.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g,e.relativeFirstCharacters=[".","/"],e.BLANK_URL="about:blank"}),dc=Xn(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.sanitizeUrl=s;var t=kNe();function r(l){return t.relativeFirstCharacters.indexOf(l[0])>-1}o(r,"isRelativeUrlWithoutProtocol");function i(l){var h=l.replace(t.ctrlCharactersRegex,"");return h.replace(t.htmlEntitiesRegex,function(u,d){return String.fromCharCode(d)})}o(i,"decodeHtmlCharacters");function n(l){return URL.canParse(l)}o(n,"isValidUrl");function a(l){try{return decodeURIComponent(l)}catch{return l}}o(a,"decodeURI");function s(l){if(!l)return t.BLANK_URL;var h,u=a(l.trim());do u=i(u).replace(t.htmlCtrlEntityRegex,"").replace(t.ctrlCharactersRegex,"").replace(t.whitespaceEscapeCharsRegex,"").trim(),u=a(u),h=u.match(t.ctrlCharactersRegex)||u.match(t.htmlEntitiesRegex)||u.match(t.htmlCtrlEntityRegex)||u.match(t.whitespaceEscapeCharsRegex);while(h&&h.length>0);var d=u;if(!d)return t.BLANK_URL;if(r(d))return d;var p=d.trimStart(),f=p.match(t.urlSchemeRegex);if(!f)return d;var g=f[0].toLowerCase().trim();if(t.invalidProtocolRegex.test(g))return t.BLANK_URL;var m=p.replace(/\\/g,"/");if(g==="mailto:"||g.includes("://"))return m;if(g==="http:"||g==="https:"){if(!n(m))return t.BLANK_URL;var y=new URL(m);return y.protocol=y.protocol.toLowerCase(),y.hostname=y.hostname.toLowerCase(),y.toString()}return m}o(s,"sanitizeUrl")})});function foe(e){return Number.isSafeInteger(e)&&e>=0}function ML(e){return e!=null&&typeof e!="function"&&foe(e.length)}function goe(e){return e==="__proto__"}function U2(e){return e==null||typeof e!="object"&&typeof e!="function"}function NL(e){return Object.getOwnPropertySymbols(e).filter(t=>Object.prototype.propertyIsEnumerable.call(e,t))}function L0(e){return e==null?e===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}function g3(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function Soe(e,t){return Np(e,void 0,e,new Map,t)}function Np(e,t,r,i=new Map,n=void 0){let a=n?.(e,t,r,i);if(a!==void 0)return a;if(U2(e))return e;if(i.has(e))return i.get(e);if(Array.isArray(e)){let s=new Array(e.length);i.set(e,s);for(let l=0;l{let s=t?.(r,i,n,a);if(s!==void 0)return s;if(typeof e=="object"){if(L0(e)===jL&&typeof e.constructor!="function"){let l={};return a.set(e,l),No(l,e,n,a),l}switch(Object.prototype.toString.call(e)){case d3:case W2:case p3:{let l=new e.constructor(e?.valueOf());return No(l,e),l}case f3:{let l={};return No(l,e),l.length=e.length,l[Symbol.iterator]=e[Symbol.iterator],l}default:return}}})}function DL(e){return Aoe(e)}function c3(e){return e!==null&&typeof e=="object"&&L0(e)==="[object Arguments]"}function h3(e){return typeof e=="object"&&e!==null}function Roe(e){return h3(e)&&ML(e)}function Loe(e){return Array.isArray(e)}function $0(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError("Expected a function");let r=o(function(...n){let a=t?t.apply(this,n):n[0],s=r.cache;if(s.has(a))return s.get(a);let l=e.apply(this,n);return r.cache=s.set(a,l)||s,l},"memoized"),i=$0.Cache||Map;return r.cache=new i,r}function $oe(){}function Ioe(e){let t=e?.constructor,r=typeof t=="function"?t.prototype:Object.prototype;return e===r}function R0(e){return g3(e)}function WL(e){if(U2(e))return e;let t=L0(e);if(!Doe(e))return{};if(Loe(e)){let i=Array.from(e);return e.length>0&&typeof e[0]=="string"&&Object.hasOwn(e,"index")&&(i.index=e.index,i.input=e.input),i}if(R0(e)){let i=e,n=i.constructor;return new n(i.buffer,i.byteOffset,i.length)}if(t===qL)return new ArrayBuffer(e.byteLength);if(t===GL){let i=e,n=i.buffer,a=i.byteOffset,s=i.byteLength,l=new ArrayBuffer(s),h=new Uint8Array(n,a,s);return new Uint8Array(l).set(h),new DataView(l)}if(t===p3||t===d3||t===W2){let i=e.constructor,n=new i(e.valueOf());return t===W2?Noe(n,e):o3(n,e),n}if(t===PL)return new Date(Number(e));if(t===OL){let i=e,n=new RegExp(i.source,i.flags);return n.lastIndex=i.lastIndex,n}if(t===BL)return Object(Symbol.prototype.valueOf.call(e));if(t===FL){let i=e,n=new Map;return i.forEach((a,s)=>{n.set(s,a)}),n}if(t===zL){let i=e,n=new Set;return i.forEach(a=>{n.add(a)}),n}if(t===f3){let i=e,n={};return o3(n,i),n.length=i.length,n[Symbol.iterator]=i[Symbol.iterator],n}let r={};return Ooe(r,e),o3(r,e),Moe(r,e),r}function Doe(e){switch(L0(e)){case f3:case moe:case qL:case GL:case p3:case PL:case woe:case Eoe:case Toe:case koe:case Coe:case FL:case d3:case jL:case OL:case zL:case W2:case BL:case yoe:case voe:case boe:case xoe:return!0;default:return!1}}function o3(e,t){for(let r in t)Object.hasOwn(t,r)&&(e[r]=t[r])}function Moe(e,t){let r=Object.getOwnPropertySymbols(t);for(let i=0;i=r)&&(e[i]=t[i])}function Ooe(e,t){let r=Object.getPrototypeOf(t);r!==null&&typeof t.constructor=="function"&&Object.setPrototypeOf(e,r)}function l3(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}function Boe(e){if(U2(e))return e;if(Array.isArray(e)||g3(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 i=new r(e);return i.lastIndex=e.lastIndex,i}if(e instanceof DataView)return new r(e.buffer.slice(0));if(e instanceof Error){let i;return e instanceof AggregateError?i=new r(e.errors,e.message,{cause:e.cause}):i=new r(e.message,{cause:e.cause}),i.stack=e.stack,Object.assign(i,e),i}if(typeof File<"u"&&e instanceof File)return new r([e],e.name,{type:e.type,lastModified:e.lastModified});if(typeof e=="object"){let i=Object.create(t);return Object.assign(i,e)}return e}function Poe(e,...t){let r=t.slice(0,-1),i=t[t.length-1],n=e;for(let a=0;a"u"||!Buffer.isBuffer(e))&&!R0(e)&&!c3(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 Ioe(e)?t.filter(r=>r!=="constructor").length===0:t.length===0}return!0}function y3(e,t){if(!e)return t;let r=`curve${e.charAt(0).toUpperCase()+e.slice(1)}`;return wNe[r]??t}function joe(e,t){let r=e.trim();if(r)return t.securityLevel!=="loose"?(0,CNe.sanitizeUrl)(r):r}function VL(e,t){return!e||!t?0:Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}function Goe(e){let t,r=0;e.forEach(n=>{r+=VL(n,t),t=n});let i=r/2;return YL(e,i)}function Woe(e){return e.length===1?e[0]:Goe(e)}function Uoe(e,t,r){let i=structuredClone(r);ee.info("our points",i),t!=="start_left"&&t!=="start_right"&&i.reverse();let n=25+e,a=YL(i,n),s=10+e*.5,l=Math.atan2(i[0].y-a.y,i[0].x-a.x),h={x:0,y:0};return t==="start_left"?(h.x=Math.sin(l+Math.PI)*s+(i[0].x+a.x)/2,h.y=-Math.cos(l+Math.PI)*s+(i[0].y+a.y)/2):t==="end_right"?(h.x=Math.sin(l-Math.PI)*s+(i[0].x+a.x)/2-5,h.y=-Math.cos(l-Math.PI)*s+(i[0].y+a.y)/2-5):t==="end_left"?(h.x=Math.sin(l)*s+(i[0].x+a.x)/2-5,h.y=-Math.cos(l)*s+(i[0].y+a.y)/2-5):(h.x=Math.sin(l)*s+(i[0].x+a.x)/2,h.y=-Math.cos(l)*s+(i[0].y+a.y)/2),h}function v3(e){let t="",r="";for(let i of e)i!==void 0&&(i.startsWith("color:")||i.startsWith("text-align:")?r=r+i+";":t=t+i+";");return{style:t,labelStyle:r}}function Voe(e){let t="",r="0123456789abcdef",i=r.length;for(let n=0;nMath.round(parseFloat(a)).toString());return n.includes(r.toString())||n.includes(i.toString())}var CNe,OL,W2,d3,p3,f3,BL,PL,FL,zL,moe,qL,jL,GL,yoe,voe,boe,xoe,Toe,koe,Coe,woe,Eoe,UL,wNe,ENe,SNe,zoe,qoe,_Ne,ANe,doe,YL,RNe,poe,HL,XL,LNe,$Ne,Op,INe,Y2,DNe,s3,MNe,NNe,Os,Wt,Yoe,so,pc,Or=Tt(()=>{Yr();tr();Zt();vt();CNe=tn(dc(),1);o(foe,"isLength");o(ML,"isArrayLike");o(goe,"isUnsafeProperty");o(U2,"isPrimitive");o(NL,"getSymbols");o(L0,"getTag");OL="[object RegExp]",W2="[object String]",d3="[object Number]",p3="[object Boolean]",f3="[object Arguments]",BL="[object Symbol]",PL="[object Date]",FL="[object Map]",zL="[object Set]",moe="[object Array]",qL="[object ArrayBuffer]",jL="[object Object]",GL="[object DataView]",yoe="[object Uint8Array]",voe="[object Uint8ClampedArray]",boe="[object Uint16Array]",xoe="[object Uint32Array]",Toe="[object Int8Array]",koe="[object Int16Array]",Coe="[object Int32Array]",woe="[object Float32Array]",Eoe="[object Float64Array]";o(g3,"isTypedArray");o(Soe,"cloneDeepWith");o(Np,"cloneDeepWithImpl");o(No,"copyProperties");o(_oe,"isCloneableObject");o(Aoe,"cloneDeepWith");o(DL,"cloneDeep");o(c3,"isArguments");o(h3,"isObjectLike");o(Roe,"isArrayLikeObject");o(Loe,"isArray");o($0,"memoize");$0.Cache=Map;o($oe,"noop");o(Ioe,"isPrototype");o(R0,"isTypedArray");o(WL,"clone");o(Doe,"isCloneableObject");o(o3,"copyOwnProperties");o(Moe,"copySymbolProperties");o(Noe,"cloneStringObjectProperties");o(Ooe,"copyPrototype");o(l3,"isPlainObject");o(Boe,"clone");o(Poe,"mergeWith");o(u3,"mergeWithDeep");o(Foe,"merge");o(m3,"isEmpty");UL="\u200B",wNe={curveBasis:tc,curveBasisClosed:g8,curveBasisOpen:y8,curveBumpX:Xy,curveBumpY:Ky,curveBundle:Dte,curveCardinalClosed:Mte,curveCardinalOpen:Nte,curveCardinal:L4,curveCatmullRomClosed:Ote,curveCatmullRomOpen:Bte,curveCatmullRom:M4,curveLinear:Au,curveLinearClosed:C8,curveMonotoneX:Qy,curveMonotoneY:Jy,curveNatural:e2,curveStep:r2,curveStepAfter:n2,curveStepBefore:i2},ENe=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,SNe=o(function(e,t){let r=zoe(e,/(?:init\b)|(?:initialize\b)/),i={};if(Array.isArray(r)){let s=r.map(l=>l.args);E2(s),i=Ni(i,[...s])}else i=r.args;if(!i)return;let n=_2(e,t),a="config";return i[a]!==void 0&&(n==="flowchart-v2"&&(n="flowchart"),i[n]=i[a],delete i[a]),i},"detectInit"),zoe=o(function(e,t=null){try{let r=new RegExp(`[%]{2}(?![{]${ENe.source})(?=[}][%]{2}).* +`,"ig");e=e.trim().replace(r,"").replace(/'/gm,'"'),ee.debug(`Detecting diagram directive${t!==null?" type:"+t:""} based on the text:${e}`);let i,n=[];for(;(i=b0.exec(e))!==null;)if(i.index===b0.lastIndex&&b0.lastIndex++,i&&!t||t&&i[1]?.match(t)||t&&i[2]?.match(t)){let a=i[1]?i[1]:i[2],s=i[3]?i[3].trim():i[4]?JSON.parse(i[4].trim()):null;n.push({type:a,args:s})}return n.length===0?{type:e,args:null}:n.length===1?n[0]:n}catch(r){return ee.error(`ERROR: ${r.message} - Unable to parse directive type: '${t}' based on the text: '${e}'`),{type:void 0,args:null}}},"detectDirective"),qoe=o(function(e){return e.replace(b0,"")},"removeDirectives"),_Ne=o(function(e,t){for(let[r,i]of t.entries())if(i.match(e))return r;return-1},"isSubstringInArray");o(y3,"interpolateToCurve");o(joe,"formatUrl");ANe=o((e,...t)=>{let r=e.split("."),i=r.length-1,n=r[i],a=window;for(let s=0;s{let r=Math.pow(10,t);return Math.round(e*r)/r},"roundNumber"),YL=o((e,t)=>{let r,i=t;for(let n of e){if(r){let a=VL(n,r);if(a===0)return r;if(a=1)return{x:n.x,y:n.y};if(s>0&&s<1)return{x:doe((1-s)*r.x+s*n.x,5),y:doe((1-s)*r.y+s*n.y,5)}}}r=n}throw new Error("Could not find a suitable point for the given distance")},"calculatePoint"),RNe=o((e,t,r)=>{ee.info(`our points ${JSON.stringify(t)}`),t[0]!==r&&(t=t.reverse());let i=YL(t,25),n=e?10:5,a=Math.atan2(t[0].y-i.y,t[0].x-i.x),s={x:0,y:0};return s.x=Math.sin(a)*n+(t[0].x+i.x)/2,s.y=-Math.cos(a)*n+(t[0].y+i.y)/2,s},"calcCardinalityPosition");o(Uoe,"calcTerminalLabelPosition");o(v3,"getStylesFromArray");poe=0,HL=o(()=>(poe++,"id-"+Math.random().toString(36).substr(2,12)+"-"+poe),"generateId");o(Voe,"makeRandomHex");XL=o(e=>Voe(e.length),"random"),LNe=o(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"),$Ne=o(function(e,t){let r=t.text.replace(ft.lineBreakRegex," "),[,i]=Os(t.fontSize),n=e.append("text");n.attr("x",t.x),n.attr("y",t.y),n.style("text-anchor",t.anchor),n.style("font-family",t.fontFamily),n.style("font-size",i),n.style("font-weight",t.fontWeight),n.attr("fill",t.fill),t.class!==void 0&&n.attr("class",t.class);let a=n.append("tspan");return a.attr("x",t.x+t.textMargin*2),a.attr("fill",t.fill),a.text(r),n},"drawSimpleText"),Op=$0((e,t,r)=>{if(!e||(r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"
"},r),ft.lineBreakRegex.test(e)))return e;let i=e.split(" ").filter(Boolean),n=[],a="";return i.forEach((s,l)=>{let h=oa(`${s} `,r),u=oa(a,r);if(h>t){let{hyphenatedStrings:d,remainingWord:p}=INe(s,t,"-",r);n.push(a,...d),a=p}else u+h>=t?(n.push(a),a=s):a=[a,s].filter(Boolean).join(" ");l+1===i.length&&n.push(a)}),n.filter(s=>s!=="").join(r.joinWith)},(e,t,r)=>`${e}${t}${r.fontSize}${r.fontWeight}${r.fontFamily}${r.joinWith}`),INe=$0((e,t,r="-",i)=>{i=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},i);let n=[...e],a=[],s="";return n.forEach((l,h)=>{let u=`${s}${l}`;if(oa(u,i)>=t){let d=h+1,p=n.length===d,f=`${u}${r}`;a.push(p?u:f),s=""}else s=u}),{hyphenatedStrings:a,remainingWord:s}},(e,t,r="-",i)=>`${e}${t}${r}${i.fontSize}${i.fontWeight}${i.fontFamily}`);o(V2,"calculateTextHeight");o(oa,"calculateTextWidth");Y2=$0((e,t)=>{let{fontSize:r=12,fontFamily:i="Arial",fontWeight:n=400}=t;if(!e)return{width:0,height:0};let[,a]=Os(r),s=["sans-serif",i],l=e.split(ft.lineBreakRegex),h=[],u=tt("body");if(!u.remove)return{width:0,height:0,lineHeight:0};let d=u.append("svg");for(let f of s){let g=0,m={width:0,height:0,lineHeight:0};for(let y of l){let b=LNe();b.text=y||UL;let v=$Ne(d,b).style("font-size",a).style("font-weight",n).style("font-family",f),T=(v._groups||v)[0][0].getBBox();if(T.width===0&&T.height===0)throw new Error("svg element not in render tree");m.width=Math.round(Math.max(m.width,T.width)),g=Math.round(T.height),m.height+=g,m.lineHeight=Math.round(Math.max(m.lineHeight,g))}h.push(m)}d.remove();let p=isNaN(h[1].height)||isNaN(h[1].width)||isNaN(h[1].lineHeight)||h[0].height>h[1].height&&h[0].width>h[1].width&&h[0].lineHeight>h[1].lineHeight?0:1;return h[p]},(e,t)=>`${e}${t.fontSize}${t.fontWeight}${t.fontFamily}`),DNe=class{constructor(e=!1,t){this.count=0,this.count=t?t.length:0,this.next=e?()=>this.count++:()=>Date.now()}static{o(this,"InitIDGenerator")}},MNe=o(function(e){return s3=s3||document.createElement("div"),e=escape(e).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),s3.innerHTML=e,unescape(s3.textContent)},"entityDecode");o(b3,"isDetailedError");NNe=o((e,t,r,i)=>{if(!i)return;let n=e.node()?.getBBox();n&&e.append("text").text(i).attr("text-anchor","middle").attr("x",n.x+n.width/2).attr("y",-r).attr("class",t)},"insertTitle"),Os=o(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");o(zr,"cleanAndMerge");Wt={assignWithDepth:Ni,wrapLabel:Op,calculateTextHeight:V2,calculateTextWidth:oa,calculateTextDimensions:Y2,cleanAndMerge:zr,detectInit:SNe,detectDirective:zoe,isSubstringInArray:_Ne,interpolateToCurve:y3,calcLabelPosition:Woe,calcCardinalityPosition:RNe,calcTerminalLabelPosition:Uoe,formatUrl:joe,getStylesFromArray:v3,generateId:HL,random:XL,runFunc:ANe,entityDecode:MNe,insertTitle:NNe,isLabelCoordinateInPath:Hoe,parseFontSize:Os,InitIDGenerator:DNe},Yoe=o(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 i=r.substring(1,r.length-1);return/^\+?\d+$/.test(i)?"\uFB02\xB0\xB0"+i+"\xB6\xDF":"\uFB02\xB0"+i+"\xB6\xDF"}),t},"encodeEntities"),so=o(function(e){return e.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")},"decodeEntities"),pc=o((e,t,{counter:r=0,prefix:i,suffix:n},a)=>a||`${i?`${i}_`:""}${e}_${t}_${r}${n?`_${n}`:""}`,"getEdgeId");o(_n,"handleUndefinedAttr");o(Hoe,"isLabelCoordinateInPath")});async function H2(e,t){let r=e.getElementsByTagName("img");if(!r||r.length===0)return;let i=t.replace(/]*>/g,"").trim()==="";await Promise.all([...r].map(n=>new Promise(a=>{function s(){if(n.style.display="flex",n.style.flexDirection="column",i){let l=De().fontSize?De().fontSize:window.getComputedStyle(document.body).fontSize,h=5,[u=rr.fontSize]=Os(l),d=u*h+"px";n.style.minWidth=d,n.style.maxWidth=d}else n.style.width="100%";a(n)}o(s,"setupImage"),setTimeout(()=>{n.complete&&s()}),n.addEventListener("error",s),n.addEventListener("load",s)})))}var Tl,la=Tt(()=>{Or();tr();vt();Tl=o(({flowchart:e})=>{let t=e?.subGraphTitleMargin?.top??0,r=e?.subGraphTitleMargin?.bottom??0,i=t+r;return{subGraphTitleTopMargin:t,subGraphTitleBottomMargin:r,subGraphTitleTotalMargin:i}},"getSubGraphTitleMargins");o(H2,"configureLabelImages")});function Koe(e,t){let r={};!e.hFlip!=!t.hFlip&&(r.hFlip=!0),!e.vFlip!=!t.vFlip&&(r.vFlip=!0);let i=((e.rotate||0)+(t.rotate||0))%4;return i&&(r.rotate=i),r}function ZL(e,t){let r=Koe(e,t);for(let i in BNe)i in x3?i in e&&!(i in r)&&(r[i]=x3[i]):i in t?r[i]=t[i]:i in e&&(r[i]=e[i]);return r}function Zoe(e,t){let r=e.icons,i=e.aliases||Object.create(null),n=Object.create(null);function a(s){if(r[s])return n[s]=[];if(!(s in n)){n[s]=null;let l=i[s]&&i[s].parent,h=l&&a(l);h&&(n[s]=[l].concat(h))}return n[s]}return o(a,"resolve"),(t||Object.keys(r).concat(Object.keys(i))).forEach(a),n}function QL(e,t,r){let i=e.icons,n=e.aliases||Object.create(null),a={};function s(l){a=ZL(i[l]||n[l],a)}return o(s,"parse"),s(t),r.forEach(s),ZL(e,a)}function Qoe(e,t){if(e.icons[t])return QL(e,t,[]);let r=Zoe(e,[t])[t];return r?QL(e,t,r):null}function JL(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 i=e.split(qNe);if(i===null||!i.length)return e;let n=[],a=i.shift(),s=jNe.test(a);for(;;){if(s){let l=parseFloat(a);isNaN(l)?n.push(a):n.push(Math.ceil(l*t*r)/r)}else n.push(a);if(a=i.shift(),a===void 0)return n.join("");s=!s}}function Joe(e,t="defs"){let r="",i=e.indexOf("<"+t);for(;i>=0;){let n=e.indexOf(">",i),a=e.indexOf("",a);if(s===-1)break;r+=e.slice(n+1,a).trim(),e=e.slice(0,i).trim()+e.slice(s+1)}return{defs:r,content:e}}function ele(e,t){return e?""+e+""+t:t}function tle(e,t,r){let i=Joe(e);return ele(i.defs,t+i.content+r)}function rle(e,t){let r={...Xoe,...e},i={...FNe,...t},n={left:r.left,top:r.top,width:r.width,height:r.height},a=r.body;[r,i].forEach(y=>{let b=[],v=y.hFlip,T=y.vFlip,x=y.rotate;v?T?x+=2:(b.push("translate("+(n.width+n.left).toString()+" "+(0-n.top).toString()+")"),b.push("scale(-1 1)"),n.top=n.left=0):T&&(b.push("translate("+(0-n.left).toString()+" "+(n.height+n.top).toString()+")"),b.push("scale(1 -1)"),n.top=n.left=0);let k;switch(x<0&&(x-=Math.floor(x/4)*4),x=x%4,x){case 1:k=n.height/2+n.top,b.unshift("rotate(90 "+k.toString()+" "+k.toString()+")");break;case 2:b.unshift("rotate(180 "+(n.width/2+n.left).toString()+" "+(n.height/2+n.top).toString()+")");break;case 3:k=n.width/2+n.left,b.unshift("rotate(-90 "+k.toString()+" "+k.toString()+")");break}x%2===1&&(n.left!==n.top&&(k=n.left,n.left=n.top,n.top=k),n.width!==n.height&&(k=n.width,n.width=n.height,n.height=k)),b.length&&(a=tle(a,'',""))});let s=i.width,l=i.height,h=n.width,u=n.height,d,p;s===null?(p=l===null?"1em":l==="auto"?u:l,d=JL(p,h/u)):(d=s==="auto"?h:s,p=l===null?JL(d,u/h):l==="auto"?u:l);let f={},g=o((y,b)=>{GNe(b)||(f[y]=b.toString())},"setAttr");g("width",d),g("height",p);let m=[n.left,n.top,h,u];return f.viewBox=m.join(" "),{attributes:f,viewBox:m,body:a}}function ile(e,t=UNe){let r=[],i;for(;i=WNe.exec(e);)r.push(i[1]);if(!r.length)return e;let n="suffix"+(Math.random()*16777216|Date.now()).toString(16);return r.forEach(a=>{let s=typeof t=="function"?t(a):t+(VNe++).toString(),l=a.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+l+')([")]|\\.[a-z])',"g"),"$1"+s+n+"$3")}),e=e.replace(new RegExp(n,"g"),""),e}function nle(e,t){let r=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(let i in t)r+=" "+i+'="'+t[i]+'"';return'"+e+""}var ONe,x3,Xoe,BNe,PNe,FNe,zNe,KL,qNe,jNe,GNe,WNe,UNe,VNe,t$,e$,ale,I0,sle,ole,oo,An=Tt(()=>{tr();Zt();vt();ONe=Object.freeze({left:0,top:0,width:16,height:16}),x3=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),Xoe=Object.freeze({...ONe,...x3}),BNe=Object.freeze({...Xoe,body:"",hidden:!1}),PNe=Object.freeze({width:null,height:null}),FNe=Object.freeze({...PNe,...x3}),zNe=o((e,t,r,i="")=>{let n=e.split(":");if(e.slice(0,1)==="@"){if(n.length<2||n.length>3)return null;i=n.shift().slice(1)}if(n.length>3||!n.length)return null;if(n.length>1){let l=n.pop(),h=n.pop(),u={provider:n.length>0?n[0]:i,prefix:h,name:l};return t&&!KL(u)?null:u}let a=n[0],s=a.split("-");if(s.length>1){let l={provider:i,prefix:s.shift(),name:s.join("-")};return t&&!KL(l)?null:l}if(r&&i===""){let l={provider:i,prefix:"",name:a};return t&&!KL(l,r)?null:l}return null},"stringToIcon"),KL=o((e,t)=>e?!!((t&&e.prefix===""||e.prefix)&&e.name):!1,"validateIconName");o(Koe,"mergeIconTransformations");o(ZL,"mergeIconData");o(Zoe,"getIconsTree");o(QL,"internalGetIconData");o(Qoe,"getIconData");qNe=/(-?[0-9.]*[0-9]+[0-9.]*)/g,jNe=/^-?[0-9.]*[0-9]+[0-9.]*$/g;o(JL,"calculateSize");o(Joe,"splitSVGDefs");o(ele,"mergeDefsAndContent");o(tle,"wrapSVGContent");GNe=o(e=>e==="unset"||e==="undefined"||e==="none","isUnsetKeyword");o(rle,"iconToSVG");WNe=/\sid="(\S+)"/g,UNe="IconifyId"+Date.now().toString(16)+(Math.random()*16777216|0).toString(16),VNe=0;o(ile,"replaceIDs");o(nle,"iconToHTML");t$={body:'?',height:80,width:80},e$=new Map,ale=new Map,I0=o(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(ee.debug("Registering icon pack:",t.name),"loader"in t)ale.set(t.name,t.loader);else if("icons"in t)e$.set(t.name,t.icons);else throw ee.error("Invalid icon loader:",t),new Error('Invalid icon loader. Must have either "icons" or "loader" property.')}},"registerIconPacks"),sle=o(async(e,t)=>{let r=zNe(e,!0,t!==void 0);if(!r)throw new Error(`Invalid icon name: ${e}`);let i=r.prefix||t;if(!i)throw new Error(`Icon name must contain a prefix: ${e}`);let n=e$.get(i);if(!n){let s=ale.get(i);if(!s)throw new Error(`Icon set not found: ${r.prefix}`);try{n={...await s(),prefix:i},e$.set(i,n)}catch(l){throw ee.error(l),new Error(`Failed to load icon set: ${r.prefix}`)}}let a=Qoe(n,r.name);if(!a)throw new Error(`Icon not found: ${e}`);return a},"getRegisteredIconData"),ole=o(async e=>{try{return await sle(e),!0}catch{return!1}},"isIconAvailable"),oo=o(async(e,t,r)=>{let i;try{i=await sle(e,t?.fallbackPrefix)}catch(s){ee.error(s),i=t$}let n=rle(i,t),a=nle(ile(n.body),{...n.attributes,...r});return nr(a,Rt())},"getIconSVG")});function S3(e){for(var t=[],r=1;r{let s=typeof a=="string"?a:a.source;return s=s.replace(us.caret,"$1"),r=r.replace(n,s),i},"replace"),getRegex:o(()=>new RegExp(r,t),"getRegex")};return i}function kl(e,t){if(t){if(us.escapeTest.test(e))return e.replace(us.escapeReplace,cle)}else if(us.escapeTestNoEncode.test(e))return e.replace(us.escapeReplaceNoEncode,cle);return e}function i$(e){try{e=encodeURI(e).replace(us.percentDecode,"%")}catch{return null}return e}function n$(e,t){let r=e.replace(us.findPipe,(a,s,l)=>{let h=!1,u=s;for(;--u>=0&&l[u]==="\\";)h=!h;return h?"|":" |"}),i=r.split(us.splitPipe),n=0;if(i[0].trim()||i.shift(),i.length>0&&!i.at(-1)?.trim()&&i.pop(),t)if(i.length>t)i.splice(t);else for(;i.length0?-2:-1}function a$(e,t,r,i,n){let a=t.href,s=t.title||null,l=e[1].replace(n.other.outputLinkReplace,"$1");i.state.inLink=!0;let h={type:e[0].charAt(0)==="!"?"image":"link",raw:r,href:a,title:s,text:l,tokens:i.inlineTokens(l)};return i.state.inLink=!1,h}function kle(e,t,r){let i=e.match(r.other.indentCodeCompensation);if(i===null)return t;let n=i[1];return t.split(` +`).map(a=>{let s=a.match(r.other.beginningSpace);if(s===null)return a;let[l]=s;return l.length>=n.length?a.slice(n.length):a}).join(` +`)}function pi(e,t){return Bp.parse(e,t)}function Cle(e,{markdownAutoWrap:t}){let r=e.replace(//g,` +`).replace(/\n{2,}/g,` +`);return S3(r)}function wle(e){return e.split(/\\n|\n|/gi).map(t=>t.trim().match(/<[^>]+>|[^\s<>]+/g)?.map(r=>({content:r,type:"normal"}))??[])}function Ele(e,t={}){let r=Cle(e,t),i=pi.lexer(r),n=[[]],a=0;function s(l,h="normal"){l.type==="text"?l.text.split(` +`).forEach((u,d)=>{d!==0&&(a++,n.push([])),u.split(" ").forEach(p=>{p=p.replace(/'/g,"'"),p&&n[a].push({content:p,type:h})})}):l.type==="strong"||l.type==="em"?l.tokens.forEach(u=>{s(u,l.type)}):l.type==="html"&&n[a].push({content:l.text,type:"normal"})}return o(s,"processNode"),i.forEach(l=>{l.type==="paragraph"?l.tokens?.forEach(h=>{s(h)}):l.type==="html"?n[a].push({content:l.text,type:"normal"}):n[a].push({content:l.raw,type:"normal"})}),n}function Sle(e){return e?`

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

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

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

`:n.type==="space"?"":n.type==="html"?`${n.text}`:n.type==="escape"?n.text:(ee.warn(`Unsupported markdown: ${n.type}`),n.raw)}return o(i,"output"),r.map(i).join("")}function Ale(e){return Intl.Segmenter?[...new Intl.Segmenter().segment(e)].map(t=>t.segment):[...e]}function Rle(e,t){let r=Ale(t.content);return b$(e,[],r,t.type)}function b$(e,t,r,i){if(r.length===0)return[{content:t.join(""),type:i},{content:"",type:i}];let[n,...a]=r,s=[...t,n];return e([{content:s.join(""),type:i}])?b$(e,s,a,i):(t.length===0&&n&&(t.push(n),r.shift()),[{content:t.join(""),type:i},{content:r.join(""),type:i}])}function Lle(e,t){if(e.some(({content:r})=>r.includes(` +`)))throw new Error("splitLineToFitWidth does not support newlines in the line");return E3(e,t)}function E3(e,t,r=[],i=[]){if(e.length===0)return i.length>0&&r.push(i),r.length>0?r:[];let n="";e[0].content===" "&&(n=" ",e.shift());let a=e.shift()??{content:" ",type:"normal"},s=[...i];if(n!==""&&s.push({content:n,type:"normal"}),s.push(a),t(s))return E3(e,t,r,s);if(i.length>0)r.push(i),e.unshift(a);else if(a.content){let[l,h]=Rle(t,a);r.push([l]),h.content&&e.unshift(h)}return E3(e,t,r)}function l$(e,t){t&&e.attr("style",t)}async function $le(e,t,r,i,n=!1,a=Rt()){let s=e.append("foreignObject");s.attr("width",`${Math.min(10*r,hle)}px`),s.attr("height",`${Math.min(10*r,hle)}px`);let l=s.append("xhtml:div"),h=Gi(t.label)?await T0(t.label.replace(ft.lineBreakRegex,` +`),a):nr(t.label,a),u=t.isNode?"nodeLabel":"edgeLabel",d=l.append("span");d.html(h),l$(d,t.labelStyle),d.attr("class",`${u} ${i}`),l$(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"),n&&l.attr("class","labelBkg");let p=l.node().getBoundingClientRect();return p.width===r&&(l.style("display","table"),l.style("white-space","break-spaces"),l.style("width",r+"px"),p=l.node().getBoundingClientRect()),s.node()}function L3(e,t,r,i=!1){let n=e.append("tspan").attr("class","text-outer-tspan").attr("x",0).attr("y",t*r-.1+"em").attr("dy",r+"em");return i&&n.attr("text-anchor","middle"),n}function Ile(e,t,r){let i=e.append("text"),n=L3(i,1,t);$3(n,r);let a=n.node().getComputedTextLength();return i.remove(),a}function x$(e,t,r){let i=e.append("text"),n=L3(i,1,t);$3(n,[{content:r,type:"normal"}]);let a=n.node()?.getBoundingClientRect();return a&&i.remove(),a}function Dle(e,t,r,i=!1,n=!1){let a=t.append("g"),s=a.insert("rect").attr("class","background").attr("style","stroke: none"),l=a.append("text").attr("y","-10.1");n&&l.attr("text-anchor","middle");let h=0;for(let u of r){let d=o(f=>Ile(a,1.1,f)<=e,"checkWidth"),p=d(u)?[u]:Lle(u,d);for(let f of p){let g=L3(l,h,1.1,n);$3(g,f),h++}}if(i){let u=l.node().getBBox(),d=2;return s.attr("x",u.x-d).attr("y",u.y-d).attr("width",u.width+2*d).attr("height",u.height+2*d),a.node()}else return l.node()}function c$(e){let t=/&(amp|lt|gt);/g;return e.replace(t,(r,i)=>{switch(i){case"amp":return"&";case"lt":return"<";case"gt":return">";default:return r}})}function $3(e,t){e.text(""),t.forEach((r,i)=>{let n=e.append("tspan").attr("font-style",r.type==="em"?"italic":"normal").attr("class","text-inner-tspan").attr("font-weight",r.type==="strong"?"bold":"normal");i===0?n.text(c$(r.content)):n.text(" "+c$(r.content))})}async function Mle(e,t={}){let r=[];e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,(n,a,s)=>(r.push((async()=>{let l=`${a}:${s}`;return await ole(l)?await oo(l,void 0,{class:"label-icon"}):``})()),n));let i=await Promise.all(r);return e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,()=>i.shift()??"")}var Pp,Z2,us,YNe,HNe,XNe,Q2,KNe,u$,ule,dle,ZNe,d$,QNe,p$,JNe,eOe,A3,f$,tOe,ple,rOe,g$,lle,iOe,nOe,aOe,sOe,fle,oOe,R3,m$,gle,lOe,mle,cOe,hOe,uOe,yle,dOe,pOe,vle,fOe,gOe,mOe,yOe,vOe,bOe,xOe,k3,TOe,ble,xle,kOe,y$,COe,r$,wOe,T3,X2,EOe,cle,C3,vh,w3,v$,bh,K2,SOe,Bp,LCt,$Ct,ICt,DCt,MCt,NCt,OCt,hle,Rn,Fn=Tt(()=>{An();Or();tr();Zt();vt();o(S3,"dedent");o(_3,"L");Pp=_3();o(h$,"G");Z2={exec:o(()=>null,"exec")};o(fi,"h");us={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:o(e=>new RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),"listItemRegex"),nextBulletRegex:o(e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),"nextBulletRegex"),hrRegex:o(e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),"hrRegex"),fencesBeginRegex:o(e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),"fencesBeginRegex"),headingBeginRegex:o(e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),"headingBeginRegex"),htmlBeginRegex:o(e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i"),"htmlBeginRegex")},YNe=/^(?:[ \t]*(?:\n|$))+/,HNe=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,XNe=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Q2=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,KNe=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,u$=/(?:[*+-]|\d{1,9}[.)])/,ule=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,dle=fi(ule).replace(/bull/g,u$).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(),ZNe=fi(ule).replace(/bull/g,u$).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(),d$=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,QNe=/^[^\n]+/,p$=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,JNe=fi(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",p$).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),eOe=fi(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,u$).getRegex(),A3="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",f$=/|$))/,tOe=fi("^ {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",f$).replace("tag",A3).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),ple=fi(d$).replace("hr",Q2).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",A3).getRegex(),rOe=fi(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",ple).getRegex(),g$={blockquote:rOe,code:HNe,def:JNe,fences:XNe,heading:KNe,hr:Q2,html:tOe,lheading:dle,list:eOe,newline:YNe,paragraph:ple,table:Z2,text:QNe},lle=fi("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Q2).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",A3).getRegex(),iOe={...g$,lheading:ZNe,table:lle,paragraph:fi(d$).replace("hr",Q2).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",lle).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",A3).getRegex()},nOe={...g$,html:fi(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",f$).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:Z2,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:fi(d$).replace("hr",Q2).replace("heading",` *#{1,6} *[^ +]`).replace("lheading",dle).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},aOe=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,sOe=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,fle=/^( {2,}|\\)\n(?!\s*$)/,oOe=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\]*?>/g,yle=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,dOe=fi(yle,"u").replace(/punct/g,R3).getRegex(),pOe=fi(yle,"u").replace(/punct/g,mle).getRegex(),vle="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",fOe=fi(vle,"gu").replace(/notPunctSpace/g,gle).replace(/punctSpace/g,m$).replace(/punct/g,R3).getRegex(),gOe=fi(vle,"gu").replace(/notPunctSpace/g,hOe).replace(/punctSpace/g,cOe).replace(/punct/g,mle).getRegex(),mOe=fi("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,gle).replace(/punctSpace/g,m$).replace(/punct/g,R3).getRegex(),yOe=fi(/\\(punct)/,"gu").replace(/punct/g,R3).getRegex(),vOe=fi(/^<(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(),bOe=fi(f$).replace("(?:-->|$)","-->").getRegex(),xOe=fi("^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^").replace("comment",bOe).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),k3=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`[^`]*`|[^\[\]\\`])*?/,TOe=fi(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",k3).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),ble=fi(/^!?\[(label)\]\[(ref)\]/).replace("label",k3).replace("ref",p$).getRegex(),xle=fi(/^!?\[(ref)\](?:\[\])?/).replace("ref",p$).getRegex(),kOe=fi("reflink|nolink(?!\\()","g").replace("reflink",ble).replace("nolink",xle).getRegex(),y$={_backpedal:Z2,anyPunctuation:yOe,autolink:vOe,blockSkip:uOe,br:fle,code:sOe,del:Z2,emStrongLDelim:dOe,emStrongRDelimAst:fOe,emStrongRDelimUnd:mOe,escape:aOe,link:TOe,nolink:xle,punctuation:lOe,reflink:ble,reflinkSearch:kOe,tag:xOe,text:oOe,url:Z2},COe={...y$,link:fi(/^!?\[(label)\]\((.*?)\)/).replace("label",k3).getRegex(),reflink:fi(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",k3).getRegex()},r$={...y$,emStrongRDelimAst:gOe,emStrongLDelim:pOe,url:fi(/^((?: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]*?(?:(?=[\\":">",'"':""","'":"'"},cle=o(e=>EOe[e],"ke");o(kl,"w");o(i$,"J");o(n$,"V");o(D0,"z");o(Tle,"ge");o(a$,"fe");o(kle,"Je");C3=class{static{o(this,"y")}options;rules;lexer;constructor(e){this.options=e||Pp}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:D0(r,` +`)}}}fences(e){let t=this.rules.block.fences.exec(e);if(t){let r=t[0],i=kle(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:i}}}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 i=D0(r,"#");(this.options.pedantic||!i||this.rules.other.endingSpaceChar.test(i))&&(r=i.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:D0(t[0],` +`)}}blockquote(e){let t=this.rules.block.blockquote.exec(e);if(t){let r=D0(t[0],` +`).split(` +`),i="",n="",a=[];for(;r.length>0;){let s=!1,l=[],h;for(h=0;h1,n={type:"list",raw:"",ordered:i,start:i?+r.slice(0,-1):"",loose:!1,items:[]};r=i?`\\d{1,9}\\${r.slice(-1)}`:`\\${r}`,this.options.pedantic&&(r=i?r:"[*+-]");let a=this.rules.other.listItemRegex(r),s=!1;for(;e;){let h=!1,u="",d="";if(!(t=a.exec(e))||this.rules.block.hr.test(e))break;u=t[0],e=e.substring(u.length);let p=t[2].split(` +`,1)[0].replace(this.rules.other.listReplaceTabs,v=>" ".repeat(3*v.length)),f=e.split(` +`,1)[0],g=!p.trim(),m=0;if(this.options.pedantic?(m=2,d=p.trimStart()):g?m=t[1].length+1:(m=t[2].search(this.rules.other.nonSpaceChar),m=m>4?1:m,d=p.slice(m),m+=t[1].length),g&&this.rules.other.blankLine.test(f)&&(u+=f+` +`,e=e.substring(f.length+1),h=!0),!h){let v=this.rules.other.nextBulletRegex(m),T=this.rules.other.hrRegex(m),x=this.rules.other.fencesBeginRegex(m),k=this.rules.other.headingBeginRegex(m),C=this.rules.other.htmlBeginRegex(m);for(;e;){let E=e.split(` +`,1)[0],w;if(f=E,this.options.pedantic?(f=f.replace(this.rules.other.listReplaceNesting," "),w=f):w=f.replace(this.rules.other.tabCharGlobal," "),x.test(f)||k.test(f)||C.test(f)||v.test(f)||T.test(f))break;if(w.search(this.rules.other.nonSpaceChar)>=m||!f.trim())d+=` +`+w.slice(m);else{if(g||p.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||x.test(p)||k.test(p)||T.test(p))break;d+=` +`+f}!g&&!f.trim()&&(g=!0),u+=E+` +`,e=e.substring(E.length+1),p=w.slice(m)}}n.loose||(s?n.loose=!0:this.rules.other.doubleBlankLine.test(u)&&(s=!0));let y=null,b;this.options.gfm&&(y=this.rules.other.listIsTask.exec(d),y&&(b=y[0]!=="[ ] ",d=d.replace(this.rules.other.listReplaceTask,""))),n.items.push({type:"list_item",raw:u,task:!!y,checked:b,loose:!1,text:d,tokens:[]}),n.raw+=u}let l=n.items.at(-1);if(l)l.raw=l.raw.trimEnd(),l.text=l.text.trimEnd();else return;n.raw=n.raw.trimEnd();for(let h=0;hp.type==="space"),d=u.length>0&&u.some(p=>this.rules.other.anyLine.test(p.raw));n.loose=d}if(n.loose)for(let h=0;h({text:l,tokens:this.lexer.inline(l),header:!1,align:a.align[h]})));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=D0(r.slice(0,-1),"\\");if((r.length-a.length)%2===0)return}else{let a=Tle(t[2],"()");if(a===-2)return;if(a>-1){let s=(t[0].indexOf("!")===0?5:4)+t[1].length+a;t[2]=t[2].substring(0,a),t[0]=t[0].substring(0,s).trim(),t[3]=""}}let i=t[2],n="";if(this.options.pedantic){let a=this.rules.other.pedanticHrefTitle.exec(i);a&&(i=a[1],n=a[3])}else n=t[3]?t[3].slice(1,-1):"";return i=i.trim(),this.rules.other.startAngleBracket.test(i)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(r)?i=i.slice(1):i=i.slice(1,-1)),a$(t,{href:i&&i.replace(this.rules.inline.anyPunctuation,"$1"),title:n&&n.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 i=(r[2]||r[1]).replace(this.rules.other.multipleSpaceGlobal," "),n=t[i.toLowerCase()];if(!n){let a=r[0].charAt(0);return{type:"text",raw:a,text:a}}return a$(r,n,r[0],this.lexer,this.rules)}}emStrong(e,t,r=""){let i=this.rules.inline.emStrongLDelim.exec(e);if(!(!i||i[3]&&r.match(this.rules.other.unicodeAlphaNumeric))&&(!(i[1]||i[2])||!r||this.rules.inline.punctuation.exec(r))){let n=[...i[0]].length-1,a,s,l=n,h=0,u=i[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(u.lastIndex=0,t=t.slice(-1*e.length+n);(i=u.exec(t))!=null;){if(a=i[1]||i[2]||i[3]||i[4]||i[5]||i[6],!a)continue;if(s=[...a].length,i[3]||i[4]){l+=s;continue}else if((i[5]||i[6])&&n%3&&!((n+s)%3)){h+=s;continue}if(l-=s,l>0)continue;s=Math.min(s,s+l+h);let d=[...i[0]][0].length,p=e.slice(0,n+i.index+d+s);if(Math.min(n,s)%2){let g=p.slice(1,-1);return{type:"em",raw:p,text:g,tokens:this.lexer.inlineTokens(g)}}let f=p.slice(2,-2);return{type:"strong",raw:p,text:f,tokens:this.lexer.inlineTokens(f)}}}}codespan(e){let t=this.rules.inline.code.exec(e);if(t){let r=t[2].replace(this.rules.other.newLineCharGlobal," "),i=this.rules.other.nonSpaceChar.test(r),n=this.rules.other.startingSpaceChar.test(r)&&this.rules.other.endingSpaceChar.test(r);return i&&n&&(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,i;return t[2]==="@"?(r=t[1],i="mailto:"+r):(r=t[1],i=r),{type:"link",raw:t[0],text:r,href:i,tokens:[{type:"text",raw:r,text:r}]}}}url(e){let t;if(t=this.rules.inline.url.exec(e)){let r,i;if(t[2]==="@")r=t[0],i="mailto:"+r;else{let n;do n=t[0],t[0]=this.rules.inline._backpedal.exec(t[0])?.[0]??"";while(n!==t[0]);r=t[0],t[1]==="www."?i="http://"+t[0]:i=t[0]}return{type:"link",raw:t[0],text:r,href:i,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}}}},vh=class s${static{o(this,"l")}tokens;options;state;tokenizer;inlineQueue;constructor(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||Pp,this.options.tokenizer=this.options.tokenizer||new C3,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:us,block:T3.normal,inline:X2.normal};this.options.pedantic?(r.block=T3.pedantic,r.inline=X2.pedantic):this.options.gfm&&(r.block=T3.gfm,this.options.breaks?r.inline=X2.breaks:r.inline=X2.gfm),this.tokenizer.rules=r}static get rules(){return{block:T3,inline:X2}}static lex(t,r){return new s$(r).lex(t)}static lexInline(t,r){return new s$(r).inlineTokens(t)}lex(t){t=t.replace(us.carriageReturn,` +`),this.blockTokens(t,this.tokens);for(let r=0;r(n=s.call({lexer:this},t,r))?(t=t.substring(n.raw.length),r.push(n),!0):!1))continue;if(n=this.tokenizer.space(t)){t=t.substring(n.raw.length);let s=r.at(-1);n.raw.length===1&&s!==void 0?s.raw+=` +`:r.push(n);continue}if(n=this.tokenizer.code(t)){t=t.substring(n.raw.length);let s=r.at(-1);s?.type==="paragraph"||s?.type==="text"?(s.raw+=(s.raw.endsWith(` +`)?"":` +`)+n.raw,s.text+=` +`+n.text,this.inlineQueue.at(-1).src=s.text):r.push(n);continue}if(n=this.tokenizer.fences(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.heading(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.hr(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.blockquote(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.list(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.html(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.def(t)){t=t.substring(n.raw.length);let s=r.at(-1);s?.type==="paragraph"||s?.type==="text"?(s.raw+=(s.raw.endsWith(` +`)?"":` +`)+n.raw,s.text+=` +`+n.raw,this.inlineQueue.at(-1).src=s.text):this.tokens.links[n.tag]||(this.tokens.links[n.tag]={href:n.href,title:n.title},r.push(n));continue}if(n=this.tokenizer.table(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.lheading(t)){t=t.substring(n.raw.length),r.push(n);continue}let a=t;if(this.options.extensions?.startBlock){let s=1/0,l=t.slice(1),h;this.options.extensions.startBlock.forEach(u=>{h=u.call({lexer:this},l),typeof h=="number"&&h>=0&&(s=Math.min(s,h))}),s<1/0&&s>=0&&(a=t.substring(0,s+1))}if(this.state.top&&(n=this.tokenizer.paragraph(a))){let s=r.at(-1);i&&s?.type==="paragraph"?(s.raw+=(s.raw.endsWith(` +`)?"":` +`)+n.raw,s.text+=` +`+n.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=s.text):r.push(n),i=a.length!==t.length,t=t.substring(n.raw.length);continue}if(n=this.tokenizer.text(t)){t=t.substring(n.raw.length);let s=r.at(-1);s?.type==="text"?(s.raw+=(s.raw.endsWith(` +`)?"":` +`)+n.raw,s.text+=` +`+n.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=s.text):r.push(n);continue}if(t){let s="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(s);break}else throw new Error(s)}}return this.state.top=!0,r}inline(t,r=[]){return this.inlineQueue.push({src:t,tokens:r}),r}inlineTokens(t,r=[]){let i=t,n=null;if(this.tokens.links){let l=Object.keys(this.tokens.links);if(l.length>0)for(;(n=this.tokenizer.rules.inline.reflinkSearch.exec(i))!=null;)l.includes(n[0].slice(n[0].lastIndexOf("[")+1,-1))&&(i=i.slice(0,n.index)+"["+"a".repeat(n[0].length-2)+"]"+i.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(n=this.tokenizer.rules.inline.anyPunctuation.exec(i))!=null;)i=i.slice(0,n.index)+"++"+i.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;(n=this.tokenizer.rules.inline.blockSkip.exec(i))!=null;)i=i.slice(0,n.index)+"["+"a".repeat(n[0].length-2)+"]"+i.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);i=this.options.hooks?.emStrongMask?.call({lexer:this},i)??i;let a=!1,s="";for(;t;){a||(s=""),a=!1;let l;if(this.options.extensions?.inline?.some(u=>(l=u.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 u=r.at(-1);l.type==="text"&&u?.type==="text"?(u.raw+=l.raw,u.text+=l.text):r.push(l);continue}if(l=this.tokenizer.emStrong(t,i,s)){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 h=t;if(this.options.extensions?.startInline){let u=1/0,d=t.slice(1),p;this.options.extensions.startInline.forEach(f=>{p=f.call({lexer:this},d),typeof p=="number"&&p>=0&&(u=Math.min(u,p))}),u<1/0&&u>=0&&(h=t.substring(0,u+1))}if(l=this.tokenizer.inlineText(h)){t=t.substring(l.raw.length),l.raw.slice(-1)!=="_"&&(s=l.raw.slice(-1)),a=!0;let u=r.at(-1);u?.type==="text"?(u.raw+=l.raw,u.text+=l.text):r.push(l);continue}if(t){let u="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(u);break}else throw new Error(u)}}return r}},w3=class{static{o(this,"P")}options;parser;constructor(e){this.options=e||Pp}space(e){return""}code({text:e,lang:t,escaped:r}){let i=(t||"").match(us.notSpaceStart)?.[0],n=e.replace(us.endingNewline,"")+` +`;return i?'
'+(r?n:kl(n,!0))+`
+`:"
"+(r?n:kl(n,!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,i="";for(let s=0;s +`+i+" +`}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+" "+kl(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 n=0;n${i}`),` + +`+t+` +`+i+`
    +`}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`${kl(e,!0)}`}br(e){return"
    "}del({tokens:e}){return`${this.parser.parseInline(e)}`}link({href:e,title:t,tokens:r}){let i=this.parser.parseInline(r),n=i$(e);if(n===null)return i;e=n;let a='
    ",a}image({href:e,title:t,text:r,tokens:i}){i&&(r=this.parser.parseInline(i,this.parser.textRenderer));let n=i$(e);if(n===null)return kl(r);e=n;let a=`${r}{let s=n[a].flat(1/0);r=r.concat(this.walkTokens(s,t))}):n.tokens&&(r=r.concat(this.walkTokens(n.tokens,t)))}}return r}use(...e){let t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(r=>{let i={...r};if(i.async=this.defaults.async||i.async||!1,r.extensions&&(r.extensions.forEach(n=>{if(!n.name)throw new Error("extension name required");if("renderer"in n){let a=t.renderers[n.name];a?t.renderers[n.name]=function(...s){let l=n.renderer.apply(this,s);return l===!1&&(l=a.apply(this,s)),l}:t.renderers[n.name]=n.renderer}if("tokenizer"in n){if(!n.level||n.level!=="block"&&n.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let a=t[n.level];a?a.unshift(n.tokenizer):t[n.level]=[n.tokenizer],n.start&&(n.level==="block"?t.startBlock?t.startBlock.push(n.start):t.startBlock=[n.start]:n.level==="inline"&&(t.startInline?t.startInline.push(n.start):t.startInline=[n.start]))}"childTokens"in n&&n.childTokens&&(t.childTokens[n.name]=n.childTokens)}),i.extensions=t),r.renderer){let n=this.defaults.renderer||new w3(this.defaults);for(let a in r.renderer){if(!(a in n))throw new Error(`renderer '${a}' does not exist`);if(["options","parser"].includes(a))continue;let s=a,l=r.renderer[s],h=n[s];n[s]=(...u)=>{let d=l.apply(n,u);return d===!1&&(d=h.apply(n,u)),d||""}}i.renderer=n}if(r.tokenizer){let n=this.defaults.tokenizer||new C3(this.defaults);for(let a in r.tokenizer){if(!(a in n))throw new Error(`tokenizer '${a}' does not exist`);if(["options","rules","lexer"].includes(a))continue;let s=a,l=r.tokenizer[s],h=n[s];n[s]=(...u)=>{let d=l.apply(n,u);return d===!1&&(d=h.apply(n,u)),d}}i.tokenizer=n}if(r.hooks){let n=this.defaults.hooks||new K2;for(let a in r.hooks){if(!(a in n))throw new Error(`hook '${a}' does not exist`);if(["options","block"].includes(a))continue;let s=a,l=r.hooks[s],h=n[s];K2.passThroughHooks.has(a)?n[s]=u=>{if(this.defaults.async&&K2.passThroughHooksRespectAsync.has(a))return Promise.resolve(l.call(n,u)).then(p=>h.call(n,p));let d=l.call(n,u);return h.call(n,d)}:n[s]=(...u)=>{let d=l.apply(n,u);return d===!1&&(d=h.apply(n,u)),d}}i.hooks=n}if(r.walkTokens){let n=this.defaults.walkTokens,a=r.walkTokens;i.walkTokens=function(s){let l=[];return l.push(a.call(this,s)),n&&(l=l.concat(n.call(this,s))),l}}this.defaults={...this.defaults,...i}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return vh.lex(e,t??this.defaults)}parser(e,t){return bh.parse(e,t??this.defaults)}parseMarkdown(e){return(t,r)=>{let i={...r},n={...this.defaults,...i},a=this.onError(!!n.silent,!!n.async);if(this.defaults.async===!0&&i.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"));n.hooks&&(n.hooks.options=n,n.hooks.block=e);let s=n.hooks?n.hooks.provideLexer():e?vh.lex:vh.lexInline,l=n.hooks?n.hooks.provideParser():e?bh.parse:bh.parseInline;if(n.async)return Promise.resolve(n.hooks?n.hooks.preprocess(t):t).then(h=>s(h,n)).then(h=>n.hooks?n.hooks.processAllTokens(h):h).then(h=>n.walkTokens?Promise.all(this.walkTokens(h,n.walkTokens)).then(()=>h):h).then(h=>l(h,n)).then(h=>n.hooks?n.hooks.postprocess(h):h).catch(a);try{n.hooks&&(t=n.hooks.preprocess(t));let h=s(t,n);n.hooks&&(h=n.hooks.processAllTokens(h)),n.walkTokens&&this.walkTokens(h,n.walkTokens);let u=l(h,n);return n.hooks&&(u=n.hooks.postprocess(u)),u}catch(h){return a(h)}}}onError(e,t){return r=>{if(r.message+=` +Please report this to https://github.com/markedjs/marked.`,e){let i="

    An error occurred:

    "+kl(r.message+"",!0)+"
    ";return t?Promise.resolve(i):i}if(t)return Promise.reject(r);throw r}}},Bp=new SOe;o(pi,"d");pi.options=pi.setOptions=function(e){return Bp.setOptions(e),pi.defaults=Bp.defaults,h$(pi.defaults),pi};pi.getDefaults=_3;pi.defaults=Pp;pi.use=function(...e){return Bp.use(...e),pi.defaults=Bp.defaults,h$(pi.defaults),pi};pi.walkTokens=function(e,t){return Bp.walkTokens(e,t)};pi.parseInline=Bp.parseInline;pi.Parser=bh;pi.parser=bh.parse;pi.Renderer=w3;pi.TextRenderer=v$;pi.Lexer=vh;pi.lexer=vh.lex;pi.Tokenizer=C3;pi.Hooks=K2;pi.parse=pi;LCt=pi.options,$Ct=pi.setOptions,ICt=pi.use,DCt=pi.walkTokens,MCt=pi.parseInline,NCt=bh.parse,OCt=vh.lex;o(Cle,"preprocessMarkdown");o(wle,"nonMarkdownToLines");o(Ele,"markdownToLines");o(Sle,"nonMarkdownToHTML");o(_le,"markdownToHTML");o(Ale,"splitTextToChars");o(Rle,"splitWordToFitWidth");o(b$,"splitWordToFitWidthRecursion");o(Lle,"splitLineToFitWidth");o(E3,"splitLineToFitWidthRecursion");o(l$,"applyStyle");hle=16384;o($le,"addHtmlSpan");o(L3,"createTspan");o(Ile,"computeWidthOfText");o(x$,"computeDimensionOfText");o(Dle,"createFormattedText");o(c$,"decodeHTMLEntities");o($3,"updateTextContentAndStyles");o(Mle,"replaceIconSubstring");Rn=o(async(e,t="",{style:r="",isTitle:i=!1,classes:n="",useHtmlLabels:a=!0,markdown:s=!0,isNode:l=!0,width:h=200,addSvgBackground:u=!1}={},d)=>{if(ee.debug("XYZ createText",t,r,i,n,a,l,"addSvgBackground: ",u),a){let p=s?_le(t,d):Sle(t),f=await Mle(so(p),d),g=t.replace(/\\\\/g,"\\"),m={isNode:l,label:Gi(t)?g:f,labelStyle:r.replace("fill:","color:")};return await $le(e,m,h,n,u,d)}else{let p=so(t.replace(//g,"
    ")),f=s?Ele(p.replace("
    ","
    "),d):wle(p),g=Dle(h,e,f,t?u:!1,!l);if(l){/stroke:/.exec(r)&&(r=r.replace("stroke:","lineColor:"));let m=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");tt(g).attr("style",m)}else{let m=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:");tt(g).select("rect").attr("style",m.replace(/background:/g,"fill:"));let y=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");tt(g).select("text").attr("style",y)}return i?tt(g).selectAll("tspan.text-outer-tspan").classed("title-row",!0):tt(g).selectAll("tspan.text-outer-tspan").classed("row",!0),g}},"createText")});function Hr(e){let t=e.map((r,i)=>`${i===0?"M":"L"}${r.x},${r.y}`);return t.push("Z"),t.join(" ")}function Wu(e,t,r,i,n,a){let s=[],l=r-e,h=i-t,u=l/a,d=2*Math.PI/u,p=t+h/2;for(let f=0;f<=50;f++){let g=f/50,m=e+g*l,y=p+n*Math.sin(d*(m-e));s.push({x:m,y})}return s}function ev(e,t,r,i,n,a){let s=[],l=n*Math.PI/180,h=(a*Math.PI/180-l)/(i-1);for(let u=0;uh.tagName==="path"),r=document.createElementNS("http://www.w3.org/2000/svg","path"),i=t.map(h=>h.getAttribute("d")).filter(h=>h!==null).join(" ");r.setAttribute("d",i);let n=t.find(h=>h.getAttribute("fill")!=="none"),a=t.find(h=>h.getAttribute("stroke")!=="none"),s=o((h,u)=>h?.getAttribute(u)??void 0,"getAttr");if(n){let h={fill:s(n,"fill"),"fill-opacity":s(n,"fill-opacity")??"1"};Object.entries(h).forEach(([u,d])=>{d&&r.setAttribute(u,d)})}if(a){let h={stroke:s(a,"stroke"),"stroke-width":s(a,"stroke-width")??"1","stroke-opacity":s(a,"stroke-opacity")??"1"};Object.entries(h).forEach(([u,d])=>{d&&r.setAttribute(u,d)})}let l=document.createElementNS("http://www.w3.org/2000/svg","g");return l.appendChild(r),l}function Hle(e,t){return e.intersect(t)}function Xle(e,t,r,i){var n=e.x,a=e.y,s=n-i.x,l=a-i.y,h=Math.sqrt(t*t*l*l+r*r*s*s),u=Math.abs(t*r*s/h);i.x0}function Jle(e,t,r){let i=e.x,n=e.y,a=[],s=Number.POSITIVE_INFINITY,l=Number.POSITIVE_INFINITY;typeof t.forEach=="function"?t.forEach(function(d){s=Math.min(s,d.x),l=Math.min(l,d.y)}):(s=Math.min(s,t.x),l=Math.min(l,t.y));let h=i-e.width/2-s,u=n-e.height/2-l;for(let d=0;d1&&a.sort(function(d,p){let f=d.x-r.x,g=d.y-r.y,m=Math.sqrt(f*f+g*g),y=p.x-r.x,b=p.y-r.y,v=Math.sqrt(y*y+b*b);return md,":first-child");return p.attr("class","anchor").attr("style",_n(l)),Vt(t,p),t.intersect=function(f){return ee.info("Circle intersect",t,s,f),Ft.circle(t,s,f)},a}function E$(e,t,r,i,n,a,s){let l=(e+r)/2,h=(t+i)/2,u=Math.atan2(i-t,r-e),d=(r-e)/2,p=(i-t)/2,f=d/n,g=p/a,m=Math.sqrt(f**2+g**2);if(m>1)throw new Error("The given radii are too small to create an arc between the points.");let y=Math.sqrt(1-m**2),b=l+y*a*Math.sin(u)*(s?-1:1),v=h-y*n*Math.cos(u)*(s?-1:1),T=Math.atan2((t-v)/a,(e-b)/n),x=Math.atan2((i-v)/a,(r-b)/n)-T;s&&x<0&&(x+=2*Math.PI),!s&&x>0&&(x-=2*Math.PI);let k=[];for(let C=0;C<20;C++){let E=C/19,w=T+E*x,_=b+n*Math.cos(w),L=v+a*Math.sin(w);k.push({x:_,y:L})}return k}function tce(e,t,r){let[i,n]=[t,r].sort((a,s)=>s-a);return n*(1-Math.sqrt(1-(e/i/2)**2))}async function rce(e,t){let{labelStyles:r,nodeStyles:i}=Pt(t);t.labelStyle=r;let n=t.padding??0,a=t.look==="neo"?16:n,s=t.look==="neo"?12:n,l=o(_=>_+s,"calcTotalHeight"),h=o(_=>{let L=_/2;return[L/(2.5+_/50),L]},"calcEllipseRadius"),{shapeSvg:u,bbox:d}=await dr(e,t,lr(t)),p=l(t?.height?t?.height:d.height),[f,g]=h(p),m=tce(p,f,g),y=(t?.width?t?.width:d.width)+a*2+m-m,b=p,{cssStyles:v}=t,T=[{x:y/2,y:-b/2},{x:-y/2,y:-b/2},...E$(-y/2,-b/2,-y/2,b/2,f,g,!1),{x:y/2,y:b/2},...E$(y/2,b/2,y/2,-b/2,f,g,!0)],x=Bt.svg(u),k=qt(t,{});t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");let C=Hr(T),E=x.path(C,k),w=u.insert(()=>E,":first-child");return w.attr("class","basic label-container outer-path"),v&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",v),i&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",i),w.attr("transform",`translate(${f/2}, 0)`),Vt(t,w),t.intersect=function(_){return Ft.polygon(t,T,_)},u}function Ch(e,t,r,i){return e.insert("polygon",":first-child").attr("points",i.map(function(n){return n.x+","+n.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-t/2+","+r/2+")")}async function ice(e,t){let{labelStyles:r,nodeStyles:i}=Pt(t);t.labelStyle=r;let n=t.padding??0,a=t.look==="neo"?28:n,s=t.look==="neo"?24:n,{shapeSvg:l,bbox:h}=await dr(e,t,lr(t)),u=(t?.width??h.width)+(t.look==="neo"?a*2:a+I3),d=(t?.height??h.height)+(t.look==="neo"?s*2:s),p=0,f=u,g=-d,m=0,y=[{x:p+I3,y:g},{x:f,y:g},{x:f,y:m},{x:p,y:m},{x:p,y:g+I3},{x:p+I3,y:g}],b,{cssStyles:v}=t;if(t.look==="handDrawn"){let T=Bt.svg(l),x=qt(t,{}),k=Hr(y),C=T.path(k,x);b=l.insert(()=>C,":first-child").attr("transform",`translate(${-u/2}, ${d/2})`),v&&b.attr("style",v)}else b=Ch(l,u,d,y);return i&&b.attr("style",i),Vt(t,b),t.intersect=function(T){return Ft.polygon(t,y,T)},l}function nce(e,t){let{nodeStyles:r}=Pt(t);t.label="";let i=e.insert("g").attr("class",lr(t)).attr("id",t.domId??t.id),{cssStyles:n}=t,a=Math.max(28,t.width??0),s=[{x:0,y:a/2},{x:a/2,y:0},{x:0,y:-a/2},{x:-a/2,y:0}],l=Bt.svg(i),h=qt(t,{});t.look!=="handDrawn"&&(h.roughness=0,h.fillStyle="solid");let u=Hr(s),d=l.path(u,h),p=i.insert(()=>d,":first-child");return n&&t.look!=="handDrawn"&&p.selectAll("path").attr("style",n),r&&t.look!=="handDrawn"&&p.selectAll("path").attr("style",r),t.width=28,t.height=28,t.intersect=function(f){return Ft.polygon(t,s,f)},i}async function S$(e,t,r){let{labelStyles:i,nodeStyles:n}=Pt(t);t.labelStyle=i;let{shapeSvg:a,bbox:s,halfPadding:l}=await dr(e,t,lr(t)),h=16,u=r?.padding??l,d=t.look==="neo"?s.width/2+h*2:s.width/2+u,p,{cssStyles:f}=t;if(t.look==="handDrawn"){let g=Bt.svg(a),m=qt(t,{}),y=g.circle(0,0,d*2,m);p=a.insert(()=>y,":first-child"),p.attr("class","basic label-container").attr("style",_n(f))}else p=a.insert("circle",":first-child").attr("class","basic label-container").attr("style",n).attr("r",d).attr("cx",0).attr("cy",0);return Vt(t,p),t.calcIntersect=function(g,m){let y=g.width/2;return Ft.circle(g,y,m)},t.intersect=function(g){return ee.info("Circle intersect",t,d,g),Ft.circle(t,d,g)},a}function ace(e){let t=Math.cos(Math.PI/4),r=Math.sin(Math.PI/4),i=e*2,n={x:i/2*t,y:i/2*r},a={x:-(i/2)*t,y:i/2*r},s={x:-(i/2)*t,y:-(i/2)*r},l={x:i/2*t,y:-(i/2)*r};return`M ${a.x},${a.y} L ${l.x},${l.y} + M ${n.x},${n.y} L ${s.x},${s.y}`}function sce(e,t){let{labelStyles:r,nodeStyles:i}=Pt(t);t.labelStyle=r,t.label="";let n=e.insert("g").attr("class",lr(t)).attr("id",t.domId??t.id),a=Math.max(30,t?.width??0),{cssStyles:s}=t,l=Bt.svg(n),h=qt(t,{});t.look!=="handDrawn"&&(h.roughness=0,h.fillStyle="solid");let u=l.circle(0,0,a*2,h),d=ace(a),p=l.path(d,h),f=n.insert(()=>u,":first-child");return f.insert(()=>p),f.attr("class","outer-path"),s&&t.look!=="handDrawn"&&f.selectAll("path").attr("style",s),i&&t.look!=="handDrawn"&&f.selectAll("path").attr("style",i),Vt(t,f),t.intersect=function(g){return ee.info("crossedCircle intersect",t,{radius:a,point:g}),Ft.circle(t,a,g)},n}function xh(e,t,r,i=100,n=0,a=180){let s=[],l=n*Math.PI/180,h=(a*Math.PI/180-l)/(i-1);for(let u=0;uk,":first-child").attr("stroke-opacity",0),C.insert(()=>T,":first-child"),C.attr("class","text"),f&&t.look!=="handDrawn"&&C.selectAll("path").attr("style",f),i&&t.look!=="handDrawn"&&C.selectAll("path").attr("style",i),C.attr("transform",`translate(${p}, 0)`),s.attr("transform",`translate(${-u/2+p-(a.x-(a.left??0))},${-d/2+(t.padding??0)/2-(a.y-(a.top??0))})`),Vt(t,C),t.intersect=function(E){return Ft.polygon(t,m,E)},n}function Th(e,t,r,i=100,n=0,a=180){let s=[],l=n*Math.PI/180,h=(a*Math.PI/180-l)/(i-1);for(let u=0;uk,":first-child").attr("stroke-opacity",0),C.insert(()=>T,":first-child"),C.attr("class","text"),f&&t.look!=="handDrawn"&&C.selectAll("path").attr("style",f),i&&t.look!=="handDrawn"&&C.selectAll("path").attr("style",i),C.attr("transform",`translate(${-p}, 0)`),s.attr("transform",`translate(${-u/2+(t.padding??0)/2-(a.x-(a.left??0))},${-d/2+(t.padding??0)/2-(a.y-(a.top??0))})`),Vt(t,C),t.intersect=function(E){return Ft.polygon(t,m,E)},n}function ca(e,t,r,i=100,n=0,a=180){let s=[],l=n*Math.PI/180,h=(a*Math.PI/180-l)/(i-1);for(let u=0;uw,":first-child").attr("stroke-opacity",0),_.insert(()=>x,":first-child"),_.insert(()=>C,":first-child"),_.attr("class","text"),f&&t.look!=="handDrawn"&&_.selectAll("path").attr("style",f),i&&t.look!=="handDrawn"&&_.selectAll("path").attr("style",i),_.attr("transform",`translate(${p-p/4}, 0)`),s.attr("transform",`translate(${-u/2+(t.padding??0)/2-(a.x-(a.left??0))},${-d/2+(t.padding??0)/2-(a.y-(a.top??0))})`),Vt(t,_),t.intersect=function(L){return Ft.polygon(t,y,L)},n}async function hce(e,t){let{labelStyles:r,nodeStyles:i}=Pt(t);t.labelStyle=r;let n=t.padding??0,a=t.look==="neo"?16:n,s=t.look==="neo"?12:n,l=20,h=5,{shapeSvg:u,bbox:d}=await dr(e,t,lr(t)),p=Math.max(l,(d.width+a*2)*1.25,t?.width??0),f=Math.max(h,d.height+s*2,t?.height??0),g=f/2,{cssStyles:m}=t,y=Bt.svg(u),b=qt(t,{});t.look!=="handDrawn"&&(b.roughness=0,b.fillStyle="solid");let v=p,T=f,x=v-g,k=T/4,C=[{x,y:0},{x:k,y:0},{x:0,y:T/2},{x:k,y:T},{x,y:T},...ev(-x,-T/2,g,50,270,90)],E=Hr(C),w=y.path(E,b),_=u.insert(()=>w,":first-child");return _.attr("class","basic label-container outer-path"),m&&t.look!=="handDrawn"&&_.selectChildren("path").attr("style",m),i&&t.look!=="handDrawn"&&_.selectChildren("path").attr("style",i),_.attr("transform",`translate(${-p/2}, ${-f/2})`),Vt(t,_),t.intersect=function(L){return Ft.polygon(t,C,L)},u}async function uce(e,t){let{labelStyles:r,nodeStyles:i}=Pt(t);t.labelStyle=r;let n=t.padding??0,a=t.look==="neo"?24:n,s=t.look==="neo"?24:n;if(t.width||t.height){let b=t.width??0;t.width=(t.width??0)-s,t.widthC,":first-child"),m=l.insert(()=>k,":first-child"),m.attr("class","basic label-container"),y&&m.attr("style",y)}else{let b=zOe(0,0,d,g,p,f);m=l.insert("path",":first-child").attr("d",b).attr("class","basic label-container outer-path").attr("style",_n(y)).attr("style",i)}return m.attr("label-offset-y",f),m.attr("transform",`translate(${-d/2}, ${-(g/2+f)})`),Vt(t,m),u.attr("transform",`translate(${-(h.width/2)-(h.x-(h.left??0))}, ${-(h.height/2)+(t.padding??0)/1.5-(h.y-(h.top??0))})`),t.intersect=function(b){let v=Ft.rect(t,b),T=v.x-(t.x??0);if(p!=0&&(Math.abs(T)<(t.width??0)/2||Math.abs(T)==(t.width??0)/2&&Math.abs(v.y-(t.y??0))>(t.height??0)/2-f)){let x=f*f*(1-T*T/(p*p));x>0&&(x=Math.sqrt(x)),x=f-x,b.y-(t.y??0)>0&&(x=-x),v.y+=x}return v},l}async function B0(e,t,r){let{labelStyles:i,nodeStyles:n}=Pt(t);t.labelStyle=i;let{shapeSvg:a,bbox:s}=await dr(e,t,lr(t)),l=Math.max(s.width+r.labelPaddingX*2,t?.width||0),h=Math.max(s.height+r.labelPaddingY*2,t?.height||0),u=-l/2,d=-h/2,p,{rx:f,ry:g}=t,{cssStyles:m}=t;if(r?.rx&&r.ry&&(f=r.rx,g=r.ry),t.look==="handDrawn"){let y=Bt.svg(a),b=qt(t,{}),v=f||g?y.path(Uu(u,d,l,h,f||0),b):y.rectangle(u,d,l,h,b);p=a.insert(()=>v,":first-child"),p.attr("class","basic label-container").attr("style",_n(m))}else p=a.insert("rect",":first-child"),p.attr("class","basic label-container").attr("style",n).attr("rx",_n(f)).attr("ry",_n(g)).attr("x",u).attr("y",d).attr("width",l).attr("height",h);return Vt(t,p),t.calcIntersect=function(y,b){return Ft.rect(y,b)},t.intersect=function(y){return Ft.rect(t,y)},a}async function dce(e,t){let{cssClasses:r,labelPaddingX:i,labelPaddingY:n,padding:a,width:s,height:l}=t,h={rx:0,ry:0,classes:r??"",labelPaddingX:i??(a??0)*2,labelPaddingY:n??a??0},u=await B0(e,t,h);if(t.look==="handDrawn"){let g=Bt.svg(u),m=qt(t,{}),y=u.select(".basic.label-container > path:nth-child(2)"),b=y.node();if(!b)return u;let v=null;if(b instanceof SVGGraphicsElement)v=b.getBBox();else return u;return u.insert(()=>g.line(v.x,v.y,v.x+v.width,v.y,m),".basic.label-container g.label"),u.insert(()=>g.line(v.x,v.y+v.height,v.x+v.width,v.y+v.height,m),".basic.label-container g.label"),y.remove(),u}let d=u.select(".basic.label-container"),p=(Number(d.attr("width"))||s)??0,f=(Number(d.attr("height"))||l)??0;return p>0&&f>0&&d.attr("stroke-dasharray",`${p} ${f}`),u}async function pce(e,t){let{labelStyles:r,nodeStyles:i}=Pt(t);t.labelStyle=r;let n=t.look==="neo"?16:t.padding??0,a=t.look==="neo"?16:t.padding??0,{shapeSvg:s,bbox:l,label:h}=await dr(e,t,lr(t)),u=l.width+n,d=l.height+a,p=d*.2,f=-u/2,g=-d/2-p/2,{cssStyles:m}=t,y=Bt.svg(s),b=qt(t,{});t.look!=="handDrawn"&&(b.roughness=0,b.fillStyle="solid");let v=[{x:f,y:g+p},{x:-f,y:g+p},{x:-f,y:-g},{x:f,y:-g},{x:f,y:g},{x:-f,y:g},{x:-f,y:g+p}],T=y.polygon(v.map(k=>[k.x,k.y]),b),x=s.insert(()=>T,":first-child");return x.attr("class","basic label-container outer-path"),m&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",m),i&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",i),h.attr("transform",`translate(${f+(t.padding??0)/2-(l.x-(l.left??0))}, ${g+p+(t.padding??0)/2-(l.y-(l.top??0))})`),Vt(t,x),t.intersect=function(k){return Ft.rect(t,k)},s}async function fce(e,t){let{labelStyles:r,nodeStyles:i}=Pt(t),n=t.look==="neo"?12:5;t.labelStyle=r;let a=t.padding??0,s=t.look==="neo"?16:a,{shapeSvg:l,bbox:h}=await dr(e,t,lr(t)),u=(t?.width?t?.width/2:h.width/2)+(s??0),d=u-n,p,{cssStyles:f}=t;if(t.look==="handDrawn"){let g=Bt.svg(l),m=qt(t,{roughness:.2,strokeWidth:2.5}),y=qt(t,{roughness:.2,strokeWidth:1.5}),b=g.circle(0,0,u*2,m),v=g.circle(0,0,d*2,y);p=l.insert("g",":first-child"),p.attr("class",_n(t.cssClasses)).attr("style",_n(f)),p.node()?.appendChild(b),p.node()?.appendChild(v)}else{p=l.insert("g",":first-child");let g=p.insert("circle",":first-child"),m=p.insert("circle");p.attr("class","basic label-container").attr("style",i),g.attr("class","outer-circle").attr("style",i).attr("r",u).attr("cx",0).attr("cy",0),m.attr("class","inner-circle").attr("style",i).attr("r",d).attr("cx",0).attr("cy",0)}return Vt(t,p),t.intersect=function(g){return ee.info("DoubleCircle intersect",t,u,g),Ft.circle(t,u,g)},l}function gce(e,t,{config:{themeVariables:r}}){let{labelStyles:i,nodeStyles:n}=Pt(t);t.label="",t.labelStyle=i;let a=e.insert("g").attr("class",lr(t)).attr("id",t.domId??t.id),s=7,{cssStyles:l}=t,h=Bt.svg(a),{nodeBorder:u}=r,d=qt(t,{fillStyle:"solid"});t.look!=="handDrawn"&&(d.roughness=0);let p=h.circle(0,0,s*2,d),f=a.insert(()=>p,":first-child");return f.selectAll("path").attr("style",`fill: ${u} !important;`),l&&l.length>0&&t.look!=="handDrawn"&&f.selectAll("path").attr("style",l),n&&t.look!=="handDrawn"&&f.selectAll("path").attr("style",n),Vt(t,f),t.intersect=function(g){return ee.info("filledCircle intersect",t,{radius:s,point:g}),Ft.circle(t,s,g)},a}async function mce(e,t){let{labelStyles:r,nodeStyles:i}=Pt(t);t.labelStyle=r;let n=t.padding??0,a=t.look==="neo"?n*2:n;(t.width||t.height)&&(t.height=t?.height??0,t.heightv,":first-child").attr("transform",`translate(${-d/2}, ${d/2})`).attr("class","outer-path");return g&&t.look!=="handDrawn"&&T.selectChildren("path").attr("style",g),i&&t.look!=="handDrawn"&&T.selectChildren("path").attr("style",i),t.width=u,t.height=d,Vt(t,T),h.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(x){return ee.info("Triangle intersect",t,f,x),Ft.polygon(t,f,x)},s}function yce(e,t,{dir:r,config:{state:i,themeVariables:n}}){let{nodeStyles:a}=Pt(t);t.label="";let s=e.insert("g").attr("class",lr(t)).attr("id",t.domId??t.id),{cssStyles:l}=t,h=Math.max(70,t?.width??0),u=Math.max(10,t?.height??0);r==="LR"&&(h=Math.max(10,t?.width??0),u=Math.max(70,t?.height??0));let d=-1*h/2,p=-1*u/2,f=Bt.svg(s),g=qt(t,{stroke:n.lineColor,fill:n.lineColor});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");let m=f.rectangle(d,p,h,u,g),y=s.insert(()=>m,":first-child");l&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",l),a&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",a),Vt(t,y);let b=i?.padding??0;return t.width&&t.height&&(t.width+=b/2||0,t.height+=b/2||0),t.intersect=function(v){return Ft.rect(t,v)},s}async function vce(e,t){let{labelStyles:r,nodeStyles:i}=Pt(t);t.labelStyle=r;let n=15,a=10,s=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.heightT,":first-child");return x.attr("class","basic label-container outer-path"),g&&t.look!=="handDrawn"&&x.selectChildren("path").attr("style",g),i&&t.look!=="handDrawn"&&x.selectChildren("path").attr("style",i),Vt(t,x),t.intersect=function(k){return ee.info("Pill intersect",t,{radius:f,point:k}),Ft.polygon(t,b,k)},h}async function bce(e,t){let{labelStyles:r,nodeStyles:i}=Pt(t),n=t.look==="neo"?3.5:4;t.labelStyle=r;let a=t.padding??0,s=70,l=32,h=t.look==="neo"?s:a,u=t.look==="neo"?l:a;if(t.width||t.height){let T=(t.height??0)/n;t.width=(t?.width??0)-2*T-u,t.height=(t.height??0)-h}let{shapeSvg:d,bbox:p}=await dr(e,t,lr(t)),f=(t?.height?t?.height:p.height)+h,g=f/n,m=(t?.width?t?.width:p.width)+2*g+u,y=[{x:g,y:0},{x:m-g,y:0},{x:m,y:-f/2},{x:m-g,y:-f},{x:g,y:-f},{x:0,y:-f/2}],b,{cssStyles:v}=t;if(t.look==="handDrawn"){let T=Bt.svg(d),x=qt(t,{}),k=GOe(0,0,m,f,g),C=T.path(k,x);b=d.insert(()=>C,":first-child").attr("transform",`translate(${-m/2}, ${f/2})`),v&&b.attr("style",v)}else b=Ch(d,m,f,y);return i&&b.attr("style",i),t.width=m,t.height=f,Vt(t,b),t.intersect=function(T){return Ft.polygon(t,y,T)},d}async function xce(e,t){let{labelStyles:r,nodeStyles:i}=Pt(t);t.label="",t.labelStyle=r;let{shapeSvg:n}=await dr(e,t,lr(t)),a=Math.max(30,t?.width??0),s=Math.max(30,t?.height??0),{cssStyles:l}=t,h=Bt.svg(n),u=qt(t,{});t.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");let d=[{x:0,y:0},{x:a,y:0},{x:0,y:s},{x:a,y:s}],p=Hr(d),f=h.path(p,u),g=n.insert(()=>f,":first-child");return g.attr("class","basic label-container outer-path"),l&&t.look!=="handDrawn"&&g.selectChildren("path").attr("style",l),i&&t.look!=="handDrawn"&&g.selectChildren("path").attr("style",i),g.attr("transform",`translate(${-a/2}, ${-s/2})`),Vt(t,g),t.intersect=function(m){return ee.info("Pill intersect",t,{points:d}),Ft.polygon(t,d,m)},n}async function Tce(e,t,{config:{themeVariables:r,flowchart:i}}){let{labelStyles:n}=Pt(t);t.labelStyle=n;let a=t.assetHeight??48,s=t.assetWidth??48,l=Math.max(a,s),h=i?.wrappingWidth;t.width=Math.max(l,h??0);let{shapeSvg:u,bbox:d,label:p}=await dr(e,t,"icon-shape default"),f=t.pos==="t",g=l,m=l,{nodeBorder:y}=r,{stylesMap:b}=Mp(t),v=-m/2,T=-g/2,x=t.label?8:0,k=Bt.svg(u),C=qt(t,{stroke:"none",fill:"none"});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");let E=k.rectangle(v,T,m,g,C),w=Math.max(m,d.width),_=g+d.height+x,L=k.rectangle(-w/2,-_/2,w,_,{...C,fill:"transparent",stroke:"none"}),N=u.insert(()=>E,":first-child"),D=u.insert(()=>L);if(t.icon){let M=u.append("g");M.html(`${await oo(t.icon,{height:l,width:l,fallbackPrefix:""})}`);let B=M.node().getBBox(),A=B.width,I=B.height,O=B.x,R=B.y;M.attr("transform",`translate(${-A/2-O},${f?d.height/2+x/2-I/2-R:-d.height/2-x/2-I/2-R})`),M.attr("style",`color: ${b.get("stroke")??y};`)}return p.attr("transform",`translate(${-d.width/2-(d.x-(d.left??0))},${f?-_/2:_/2-d.height})`),N.attr("transform",`translate(0,${f?d.height/2+x/2:-d.height/2-x/2})`),Vt(t,D),t.intersect=function(M){if(ee.info("iconSquare intersect",t,M),!t.label)return Ft.rect(t,M);let B=t.x??0,A=t.y??0,I=t.height??0,O=[];return f?O=[{x:B-d.width/2,y:A-I/2},{x:B+d.width/2,y:A-I/2},{x:B+d.width/2,y:A-I/2+d.height+x},{x:B+m/2,y:A-I/2+d.height+x},{x:B+m/2,y:A+I/2},{x:B-m/2,y:A+I/2},{x:B-m/2,y:A-I/2+d.height+x},{x:B-d.width/2,y:A-I/2+d.height+x}]:O=[{x:B-m/2,y:A-I/2},{x:B+m/2,y:A-I/2},{x:B+m/2,y:A-I/2+g},{x:B+d.width/2,y:A-I/2+g},{x:B+d.width/2/2,y:A+I/2},{x:B-d.width/2,y:A+I/2},{x:B-d.width/2,y:A-I/2+g},{x:B-m/2,y:A-I/2+g}],Ft.polygon(t,O,M)},u}async function kce(e,t,{config:{themeVariables:r,flowchart:i}}){let{labelStyles:n}=Pt(t);t.labelStyle=n;let a=t.assetHeight??48,s=t.assetWidth??48,l=Math.max(a,s),h=i?.wrappingWidth;t.width=Math.max(l,h??0);let{shapeSvg:u,bbox:d,label:p}=await dr(e,t,"icon-shape default"),f=20,g=t.label?8:0,m=t.pos==="t",{nodeBorder:y,mainBkg:b}=r,{stylesMap:v}=Mp(t),T=Bt.svg(u),x=qt(t,{});t.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");let k=v.get("fill");x.stroke=k??b;let C=u.append("g");t.icon&&C.html(`${await oo(t.icon,{height:l,width:l,fallbackPrefix:""})}`);let E=C.node().getBBox(),w=E.width,_=E.height,L=E.x,N=E.y,D=Math.max(w,_)*Math.SQRT2+f*2,M=T.circle(0,0,D,x),B=Math.max(D,d.width),A=D+d.height+g,I=T.rectangle(-B/2,-A/2,B,A,{...x,fill:"transparent",stroke:"none"}),O=u.insert(()=>M,":first-child"),R=u.insert(()=>I);return C.attr("transform",`translate(${-w/2-L},${m?d.height/2+g/2-_/2-N:-d.height/2-g/2-_/2-N})`),C.attr("style",`color: ${v.get("stroke")??y};`),p.attr("transform",`translate(${-d.width/2-(d.x-(d.left??0))},${m?-A/2:A/2-d.height})`),O.attr("transform",`translate(0,${m?d.height/2+g/2:-d.height/2-g/2})`),Vt(t,R),t.intersect=function($){return ee.info("iconSquare intersect",t,$),Ft.rect(t,$)},u}async function Cce(e,t,{config:{themeVariables:r,flowchart:i}}){let{labelStyles:n}=Pt(t);t.labelStyle=n;let a=t.assetHeight??48,s=t.assetWidth??48,l=Math.max(a,s),h=i?.wrappingWidth;t.width=Math.max(l,h??0);let{shapeSvg:u,bbox:d,halfPadding:p,label:f}=await dr(e,t,"icon-shape default"),g=t.pos==="t",m=l+p*2,y=l+p*2,{nodeBorder:b,mainBkg:v}=r,{stylesMap:T}=Mp(t),x=-y/2,k=-m/2,C=t.label?8:0,E=Bt.svg(u),w=qt(t,{});t.look!=="handDrawn"&&(w.roughness=0,w.fillStyle="solid");let _=T.get("fill");w.stroke=_??v;let L=E.path(Uu(x,k,y,m,5),w),N=Math.max(y,d.width),D=m+d.height+C,M=E.rectangle(-N/2,-D/2,N,D,{...w,fill:"transparent",stroke:"none"}),B=u.insert(()=>L,":first-child").attr("class","icon-shape2"),A=u.insert(()=>M);if(t.icon){let I=u.append("g");I.html(`${await oo(t.icon,{height:l,width:l,fallbackPrefix:""})}`);let O=I.node().getBBox(),R=O.width,$=O.height,F=O.x,P=O.y;I.attr("transform",`translate(${-R/2-F},${g?d.height/2+C/2-$/2-P:-d.height/2-C/2-$/2-P})`),I.attr("style",`color: ${T.get("stroke")??b};`)}return f.attr("transform",`translate(${-d.width/2-(d.x-(d.left??0))},${g?-D/2:D/2-d.height})`),B.attr("transform",`translate(0,${g?d.height/2+C/2:-d.height/2-C/2})`),Vt(t,A),t.intersect=function(I){if(ee.info("iconSquare intersect",t,I),!t.label)return Ft.rect(t,I);let O=t.x??0,R=t.y??0,$=t.height??0,F=[];return g?F=[{x:O-d.width/2,y:R-$/2},{x:O+d.width/2,y:R-$/2},{x:O+d.width/2,y:R-$/2+d.height+C},{x:O+y/2,y:R-$/2+d.height+C},{x:O+y/2,y:R+$/2},{x:O-y/2,y:R+$/2},{x:O-y/2,y:R-$/2+d.height+C},{x:O-d.width/2,y:R-$/2+d.height+C}]:F=[{x:O-y/2,y:R-$/2},{x:O+y/2,y:R-$/2},{x:O+y/2,y:R-$/2+m},{x:O+d.width/2,y:R-$/2+m},{x:O+d.width/2/2,y:R+$/2},{x:O-d.width/2,y:R+$/2},{x:O-d.width/2,y:R-$/2+m},{x:O-y/2,y:R-$/2+m}],Ft.polygon(t,F,I)},u}async function wce(e,t,{config:{themeVariables:r,flowchart:i}}){let{labelStyles:n}=Pt(t);t.labelStyle=n;let a=t.assetHeight??48,s=t.assetWidth??48,l=Math.max(a,s),h=i?.wrappingWidth;t.width=Math.max(l,h??0);let{shapeSvg:u,bbox:d,halfPadding:p,label:f}=await dr(e,t,"icon-shape default"),g=t.pos==="t",m=l+p*2,y=l+p*2,{nodeBorder:b,mainBkg:v}=r,{stylesMap:T}=Mp(t),x=-y/2,k=-m/2,C=t.label?8:0,E=Bt.svg(u),w=qt(t,{});t.look!=="handDrawn"&&(w.roughness=0,w.fillStyle="solid");let _=T.get("fill");w.stroke=_??v;let L=E.path(Uu(x,k,y,m,.1),w),N=Math.max(y,d.width),D=m+d.height+C,M=E.rectangle(-N/2,-D/2,N,D,{...w,fill:"transparent",stroke:"none"}),B=u.insert(()=>L,":first-child"),A=u.insert(()=>M);if(t.icon){let I=u.append("g");I.html(`${await oo(t.icon,{height:l,width:l,fallbackPrefix:""})}`);let O=I.node().getBBox(),R=O.width,$=O.height,F=O.x,P=O.y;I.attr("transform",`translate(${-R/2-F},${g?d.height/2+C/2-$/2-P:-d.height/2-C/2-$/2-P})`),I.attr("style",`color: ${T.get("stroke")??b};`)}return f.attr("transform",`translate(${-d.width/2-(d.x-(d.left??0))},${g?-D/2:D/2-d.height})`),B.attr("transform",`translate(0,${g?d.height/2+C/2:-d.height/2-C/2})`),Vt(t,A),t.intersect=function(I){if(ee.info("iconSquare intersect",t,I),!t.label)return Ft.rect(t,I);let O=t.x??0,R=t.y??0,$=t.height??0,F=[];return g?F=[{x:O-d.width/2,y:R-$/2},{x:O+d.width/2,y:R-$/2},{x:O+d.width/2,y:R-$/2+d.height+C},{x:O+y/2,y:R-$/2+d.height+C},{x:O+y/2,y:R+$/2},{x:O-y/2,y:R+$/2},{x:O-y/2,y:R-$/2+d.height+C},{x:O-d.width/2,y:R-$/2+d.height+C}]:F=[{x:O-y/2,y:R-$/2},{x:O+y/2,y:R-$/2},{x:O+y/2,y:R-$/2+m},{x:O+d.width/2,y:R-$/2+m},{x:O+d.width/2/2,y:R+$/2},{x:O-d.width/2,y:R+$/2},{x:O-d.width/2,y:R-$/2+m},{x:O-y/2,y:R-$/2+m}],Ft.polygon(t,F,I)},u}async function Ece(e,t,{config:{flowchart:r}}){let i=new Image;i.src=t?.img??"",await i.decode();let n=Number(i.naturalWidth.toString().replace("px","")),a=Number(i.naturalHeight.toString().replace("px",""));t.imageAspectRatio=n/a;let{labelStyles:s}=Pt(t);t.labelStyle=s;let l=r?.wrappingWidth;t.defaultWidth=r?.wrappingWidth;let h=Math.max(t.label?l??0:0,t?.assetWidth??n),u=t.constraint==="on"&&t?.assetHeight?t.assetHeight*t.imageAspectRatio:h,d=t.constraint==="on"?u/t.imageAspectRatio:t?.assetHeight??a;t.width=Math.max(u,l??0);let{shapeSvg:p,bbox:f,label:g}=await dr(e,t,"image-shape default"),m=t.pos==="t",y=-u/2,b=-d/2,v=t.label?8:0,T=Bt.svg(p),x=qt(t,{});t.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");let k=T.rectangle(y,b,u,d,x),C=Math.max(u,f.width),E=d+f.height+v,w=T.rectangle(-C/2,-E/2,C,E,{...x,fill:"none",stroke:"none"}),_=p.insert(()=>k,":first-child"),L=p.insert(()=>w);if(t.img){let N=p.append("image");N.attr("href",t.img),N.attr("width",u),N.attr("height",d),N.attr("preserveAspectRatio","none"),N.attr("transform",`translate(${-u/2},${m?E/2-d:-E/2})`)}return g.attr("transform",`translate(${-f.width/2-(f.x-(f.left??0))},${m?-d/2-f.height/2-v/2:d/2-f.height/2+v/2})`),_.attr("transform",`translate(0,${m?f.height/2+v/2:-f.height/2-v/2})`),Vt(t,L),t.intersect=function(N){if(ee.info("iconSquare intersect",t,N),!t.label)return Ft.rect(t,N);let D=t.x??0,M=t.y??0,B=t.height??0,A=[];return m?A=[{x:D-f.width/2,y:M-B/2},{x:D+f.width/2,y:M-B/2},{x:D+f.width/2,y:M-B/2+f.height+v},{x:D+u/2,y:M-B/2+f.height+v},{x:D+u/2,y:M+B/2},{x:D-u/2,y:M+B/2},{x:D-u/2,y:M-B/2+f.height+v},{x:D-f.width/2,y:M-B/2+f.height+v}]:A=[{x:D-u/2,y:M-B/2},{x:D+u/2,y:M-B/2},{x:D+u/2,y:M-B/2+d},{x:D+f.width/2,y:M-B/2+d},{x:D+f.width/2/2,y:M+B/2},{x:D-f.width/2,y:M+B/2},{x:D-f.width/2,y:M-B/2+d},{x:D-u/2,y:M-B/2+d}],Ft.polygon(t,A,N)},p}async function Sce(e,t){let{labelStyles:r,nodeStyles:i}=Pt(t);t.labelStyle=r;let n=t.padding??0,a=n,s=t.look==="neo"?n*2:n,{shapeSvg:l,bbox:h}=await dr(e,t,lr(t)),u=Math.max(h.width+(s??0)*2,t?.width??0),d=Math.max(h.height+(a??0)*2,t?.height??0),p=[{x:0,y:0},{x:u,y:0},{x:u+3*d/6,y:-d},{x:-3*d/6,y:-d}],f,{cssStyles:g}=t;if(t.look==="handDrawn"){let m=Bt.svg(l),y=qt(t,{}),b=Hr(p),v=m.path(b,y);f=l.insert(()=>v,":first-child").attr("transform",`translate(${-u/2}, ${d/2})`),g&&f.attr("style",g)}else f=Ch(l,u,d,p);return i&&f.attr("style",i),t.width=u,t.height=d,Vt(t,f),t.intersect=function(m){return Ft.polygon(t,p,m)},l}async function _ce(e,t){let{shapeSvg:r,bbox:i,label:n}=await dr(e,t,"label"),a=r.insert("rect",":first-child");return a.attr("width",.1).attr("height",.1),r.attr("class","label edgeLabel"),n.attr("transform",`translate(${-(i.width/2)-(i.x-(i.left??0))}, ${-(i.height/2)-(i.y-(i.top??0))})`),Vt(t,a),t.intersect=function(s){return Ft.rect(t,s)},r}async function Ace(e,t){let{labelStyles:r,nodeStyles:i}=Pt(t);t.labelStyle=r;let n=t.padding??0,a=n,s=t.look==="neo"?n*2:n,{shapeSvg:l,bbox:h}=await dr(e,t,lr(t)),u=(t?.height??h.height)+a,d=(t?.width??h.width)+s,p=[{x:0,y:0},{x:d+3*u/6,y:0},{x:d,y:-u},{x:-(3*u)/6,y:-u}],f,{cssStyles:g}=t;if(t.look==="handDrawn"){let m=Bt.svg(l),y=qt(t,{}),b=Hr(p),v=m.path(b,y);f=l.insert(()=>v,":first-child").attr("transform",`translate(${-d/2}, ${u/2})`),g&&f.attr("style",g)}else f=Ch(l,d,u,p);return i&&f.attr("style",i),t.width=d,t.height=u,Vt(t,f),t.intersect=function(m){return Ft.polygon(t,p,m)},l}async function Rce(e,t){let{labelStyles:r,nodeStyles:i}=Pt(t);t.labelStyle=r;let n=t.padding??0,a=n,s=t.look==="neo"?n*2:n,{shapeSvg:l,bbox:h}=await dr(e,t,lr(t)),u=(t?.height??h.height)+a,d=(t?.width??h.width)+s,p=[{x:-3*u/6,y:0},{x:d,y:0},{x:d+3*u/6,y:-u},{x:0,y:-u}],f,{cssStyles:g}=t;if(t.look==="handDrawn"){let m=Bt.svg(l),y=qt(t,{}),b=Hr(p),v=m.path(b,y);f=l.insert(()=>v,":first-child").attr("transform",`translate(${-d/2}, ${u/2})`),g&&f.attr("style",g)}else f=Ch(l,d,u,p);return i&&f.attr("style",i),t.width=d,t.height=u,Vt(t,f),t.intersect=function(m){return Ft.polygon(t,p,m)},l}function Lce(e,t){let{labelStyles:r,nodeStyles:i}=Pt(t);t.label="",t.labelStyle=r;let n=e.insert("g").attr("class",lr(t)).attr("id",t.domId??t.id),{cssStyles:a}=t,s=Math.max(35,t?.width??0),l=Math.max(35,t?.height??0),h=7,u=[{x:s,y:0},{x:0,y:l+h/2},{x:s-2*h,y:l+h/2},{x:0,y:2*l},{x:s,y:l-h/2},{x:2*h,y:l-h/2}],d=Bt.svg(n),p=qt(t,{});t.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");let f=Hr(u),g=d.path(f,p),m=n.insert(()=>g,":first-child");return m.attr("class","outer-path"),a&&t.look!=="handDrawn"&&m.selectAll("path").attr("style",a),i&&t.look!=="handDrawn"&&m.selectAll("path").attr("style",i),m.attr("transform",`translate(-${s/2},${-l})`),Vt(t,m),t.intersect=function(y){return ee.info("lightningBolt intersect",t,y),Ft.polygon(t,u,y)},n}async function $ce(e,t){let{labelStyles:r,nodeStyles:i}=Pt(t);t.labelStyle=r;let n=t.padding??0,a=t.look==="neo"?16:n,s=t.look==="neo"?24:n;if(t.width||t.height){let v=t.width??0;t.width=(t.width??0)-a,t.widthE,":first-child").attr("class","line"),y=l.insert(()=>C,":first-child"),y.attr("class","basic label-container"),b&&y.attr("style",b)}else{let v=WOe(0,0,d,g,p,f,m);y=l.insert("path",":first-child").attr("d",v).attr("class","basic label-container outer-path").attr("style",_n(b)).attr("style",i)}return y.attr("label-offset-y",f),y.attr("transform",`translate(${-d/2}, ${-(g/2+f)})`),Vt(t,y),u.attr("transform",`translate(${-(h.width/2)-(h.x-(h.left??0))}, ${-(h.height/2)+f-(h.y-(h.top??0))})`),t.intersect=function(v){let T=Ft.rect(t,v),x=T.x-(t.x??0);if(p!=0&&(Math.abs(x)<(t.width??0)/2||Math.abs(x)==(t.width??0)/2&&Math.abs(T.y-(t.y??0))>(t.height??0)/2-f)){let k=f*f*(1-x*x/(p*p));k>0&&(k=Math.sqrt(k)),k=f-k,v.y-(t.y??0)>0&&(k=-k),T.y+=k}return T},l}async function Ice(e,t){let{labelStyles:r,nodeStyles:i}=Pt(t);t.labelStyle=r;let n=t.padding??0,a=t.look==="neo"?16:n,s=t.look==="neo"?12:n;if(t.width||t.height){let k=t.width;t.width=(k??0)*10/11-a*2,t.width<10&&(t.width=10),t.height=(t?.height??0)-s*2,t.height<10&&(t.height=10)}let{shapeSvg:l,bbox:h,label:u}=await dr(e,t,lr(t)),d=(t?.width?t?.width:h.width)+(a??0)*2,p=(t?.height?t?.height:h.height)+(s??0)*2,f=t.look==="neo"?p/4:p/8,g=p+f,{cssStyles:m}=t,y=Bt.svg(l),b=qt(t,{});t.look!=="handDrawn"&&(b.roughness=0,b.fillStyle="solid");let v=[{x:-d/2-d/2*.1,y:-g/2},{x:-d/2-d/2*.1,y:g/2},...Wu(-d/2-d/2*.1,g/2,d/2+d/2*.1,g/2,f,.8),{x:d/2+d/2*.1,y:-g/2},{x:-d/2-d/2*.1,y:-g/2},{x:-d/2,y:-g/2},{x:-d/2,y:g/2*1.1},{x:-d/2,y:-g/2}],T=y.polygon(v.map(k=>[k.x,k.y]),b),x=l.insert(()=>T,":first-child");return x.attr("class","basic label-container outer-path"),m&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",m),i&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",i),x.attr("transform",`translate(0,${-f/2})`),u.attr("transform",`translate(${-d/2+(t.padding??0)+d/2*.1/2-(h.x-(h.left??0))},${-p/2+(t.padding??0)-f/2-(h.y-(h.top??0))})`),Vt(t,x),t.intersect=function(k){return Ft.polygon(t,v,k)},l}async function Dce(e,t){let{labelStyles:r,nodeStyles:i}=Pt(t);t.labelStyle=r;let n=t.padding??0,a=t.look==="neo"?16:n,s=t.look==="neo"?12:n,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)-s*2-2*l,10));let{shapeSvg:h,bbox:u,label:d}=await dr(e,t,lr(t)),p=(t?.width?t?.width:u.width)+a*2+2*l,f=(t?.height?t?.height:u.height)+s*2+2*l,g=p-2*l,m=f-2*l,y=-g/2,b=-m/2,{cssStyles:v}=t,T=Bt.svg(h),x=qt(t,{}),k=[{x:y-l,y:b+l},{x:y-l,y:b+m+l},{x:y+g-l,y:b+m+l},{x:y+g-l,y:b+m},{x:y+g,y:b+m},{x:y+g,y:b+m-l},{x:y+g+l,y:b+m-l},{x:y+g+l,y:b-l},{x:y+l,y:b-l},{x:y+l,y:b},{x:y,y:b},{x:y,y:b+l}],C=[{x:y,y:b+l},{x:y+g-l,y:b+l},{x:y+g-l,y:b+m},{x:y+g,y:b+m},{x:y+g,y:b},{x:y,y:b}];t.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");let E=Hr(k),w=T.path(E,x),_=Hr(C),L=T.path(_,x);t.look!=="handDrawn"&&(w=C$(w),L=C$(L));let N=h.insert("g",":first-child");return N.insert(()=>w),N.insert(()=>L),N.attr("class","basic label-container outer-path"),v&&t.look!=="handDrawn"&&N.selectAll("path").attr("style",v),i&&t.look!=="handDrawn"&&N.selectAll("path").attr("style",i),d.attr("transform",`translate(${-(u.width/2)-l-(u.x-(u.left??0))}, ${-(u.height/2)+l-(u.y-(u.top??0))})`),Vt(t,N),t.intersect=function(D){return Ft.polygon(t,k,D)},h}async function Mce(e,t){let{labelStyles:r,nodeStyles:i}=Pt(t);t.labelStyle=r;let{shapeSvg:n,bbox:a,label:s}=await dr(e,t,lr(t)),l=t.padding??0,h=t.look==="neo"?16:l,u=t.look==="neo"?12:l,d=!0;(t.width||t.height)&&(d=!1,t.width=(t?.width??0)-h*2,t.height=(t?.height??0)-u*3);let p=Math.max(a.width,t?.width??0)+h*2,f=Math.max(a.height,t?.height??0)+u*3,g=t.look==="neo"?f/4:f/8,m=f+(d?g/2:-g/2),y=-p/2,b=-m/2,v=10,{cssStyles:T}=t,x=Wu(y-v,b+m+v,y+p-v,b+m+v,g,.8),k=x?.[x.length-1],C=[{x:y-v,y:b+v},{x:y-v,y:b+m+v},...x,{x:y+p-v,y:k.y-v},{x:y+p,y:k.y-v},{x:y+p,y:k.y-2*v},{x:y+p+v,y:k.y-2*v},{x:y+p+v,y:b-v},{x:y+v,y:b-v},{x:y+v,y:b},{x:y,y:b},{x:y,y:b+v}],E=[{x:y,y:b+v},{x:y+p-v,y:b+v},{x:y+p-v,y:k.y-v},{x:y+p,y:k.y-v},{x:y+p,y:b},{x:y,y:b}],w=Bt.svg(n),_=qt(t,{});t.look!=="handDrawn"&&(_.roughness=0,_.fillStyle="solid");let L=Hr(C),N=w.path(L,_),D=Hr(E),M=w.path(D,_),B=n.insert(()=>N,":first-child");return B.insert(()=>M),B.attr("class","basic label-container outer-path"),T&&t.look!=="handDrawn"&&B.selectAll("path").attr("style",T),i&&t.look!=="handDrawn"&&B.selectAll("path").attr("style",i),B.attr("transform",`translate(0,${-g/2})`),s.attr("transform",`translate(${-(a.width/2)-v-(a.x-(a.left??0))}, ${-(a.height/2)+v-g/2-(a.y-(a.top??0))})`),Vt(t,B),t.intersect=function(A){return Ft.polygon(t,C,A)},n}async function Nce(e,t,{config:{themeVariables:r}}){let{labelStyles:i,nodeStyles:n}=Pt(t);t.labelStyle=i,t.useHtmlLabels||Qr(Rt())||(t.centerLabel=!0);let{shapeSvg:a,bbox:s,label:l}=await dr(e,t,lr(t)),h=Math.max(s.width+(t.padding??0)*2,t?.width??0),u=Math.max(s.height+(t.padding??0)*2,t?.height??0),d=-h/2,p=-u/2,{cssStyles:f}=t,g=Bt.svg(a),m=qt(t,{fill:r.noteBkgColor,stroke:r.noteBorderColor});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");let y=g.rectangle(d,p,h,u,m),b=a.insert(()=>y,":first-child");return b.attr("class","basic label-container outer-path"),l.attr("class","label noteLabel"),f&&t.look!=="handDrawn"&&b.selectAll("path").attr("style",f),n&&t.look!=="handDrawn"&&b.selectAll("path").attr("style",n),l.attr("transform",`translate(${-s.width/2-(s.x-(s.left??0))}, ${-(s.height/2)-(s.y-(s.top??0))})`),Vt(t,b),t.intersect=function(v){return Ft.rect(t,v)},a}async function Oce(e,t){let{labelStyles:r,nodeStyles:i}=Pt(t);t.labelStyle=r;let{shapeSvg:n,bbox:a}=await dr(e,t,lr(t)),s=a.width+(t.padding??0),l=a.height+(t.padding??0),h=s+l,u=.5,d=[{x:h/2,y:0},{x:h,y:-h/2},{x:h/2,y:-h},{x:0,y:-h/2}],p,{cssStyles:f}=t;if(t.look==="handDrawn"){let g=Bt.svg(n),m=qt(t,{}),y=YOe(0,0,h),b=g.path(y,m);p=n.insert(()=>b,":first-child").attr("transform",`translate(${-h/2+u}, ${h/2})`),f&&p.attr("style",f)}else p=Ch(n,h,h,d),p.attr("transform",`translate(${-h/2+u}, ${h/2})`);return i&&p.attr("style",i),Vt(t,p),t.calcIntersect=function(g,m){let y=g.width,b=[{x:y/2,y:0},{x:y,y:-y/2},{x:y/2,y:-y},{x:0,y:-y/2}],v=Ft.polygon(g,b,m);return{x:v.x-.5,y:v.y-.5}},t.intersect=function(g){return this.calcIntersect(t,g)},n}async function Bce(e,t){let{labelStyles:r,nodeStyles:i}=Pt(t);t.labelStyle=r;let n=t.padding??0,a=t.look==="neo"?21:n??0,s=t.look==="neo"?12:n??0,{shapeSvg:l,bbox:h,label:u}=await dr(e,t,lr(t)),d=(t?.width??h.width)+(t.look==="neo"?a*2:a),p=(t?.height??h.height)+(t.look==="neo"?s*2:s),f=-d/2,g=-p/2,m=g/2,y=[{x:f+m,y:g},{x:f,y:0},{x:f+m,y:-g},{x:-f,y:-g},{x:-f,y:g}],{cssStyles:b}=t,v=Bt.svg(l),T=qt(t,{});t.look!=="handDrawn"&&(T.roughness=0,T.fillStyle="solid");let x=Hr(y),k=v.path(x,T),C=l.insert(()=>k,":first-child");return C.attr("class","basic label-container outer-path"),b&&t.look!=="handDrawn"&&C.selectAll("path").attr("style",b),i&&t.look!=="handDrawn"&&C.selectAll("path").attr("style",i),C.attr("transform",`translate(${-m/2},0)`),u.attr("transform",`translate(${-m/2-h.width/2-(h.x-(h.left??0))}, ${-(h.height/2)-(h.y-(h.top??0))})`),Vt(t,C),t.intersect=function(E){return Ft.polygon(t,y,E)},l}async function Pce(e,t){let{labelStyles:r,nodeStyles:i}=Pt(t);t.labelStyle=r;let n;t.cssClasses?n="node "+t.cssClasses:n="node default";let a=e.insert("g").attr("class",n).attr("id",t.domId||t.id),s=a.insert("g"),l=a.insert("g").attr("class","label").attr("style",i),h=t.description,u=t.label,d=await kh(l,u,t.labelStyle,!0,!0),p={width:0,height:0};if(Qr(De())){let _=d.children[0],L=tt(d);p=_.getBoundingClientRect(),L.attr("width",p.width),L.attr("height",p.height)}ee.info("Text 2",h);let f=h||[],g=d.getBBox(),m=await kh(l,Array.isArray(f)?f.join("
    "):f,t.labelStyle,!0,!0),y=m.children[0],b=tt(m);p=y.getBoundingClientRect(),b.attr("width",p.width),b.attr("height",p.height);let v=(t.padding||0)/2;tt(m).attr("transform","translate( "+(p.width>g.width?0:(g.width-p.width)/2)+", "+(g.height+v+5)+")"),tt(d).attr("transform","translate( "+(p.width(ee.debug("Rough node insert CXC",N),D),":first-child"),E=a.insert(()=>(ee.debug("Rough node insert CXC",N),N),":first-child")}else E=s.insert("rect",":first-child"),w=s.insert("line"),E.attr("class","outer title-state").attr("style",i).attr("x",-p.width/2-v).attr("y",-p.height/2-v).attr("width",p.width+(t.padding||0)).attr("height",p.height+(t.padding||0)),w.attr("class","divider").attr("x1",-p.width/2-v).attr("x2",p.width/2+v).attr("y1",-p.height/2-v+g.height+v).attr("y2",-p.height/2-v+g.height+v);return Vt(t,E),t.intersect=function(_){return Ft.rect(t,_)},a}async function Fce(e,t,{config:{themeVariables:r}}){let i=r?.radius??5,n={rx:i,ry:i,classes:"",labelPaddingX:(t?.padding??0)*1,labelPaddingY:(t?.padding??0)*1};return B0(e,t,n)}async function zce(e,t){let{labelStyles:r,nodeStyles:i}=Pt(t);t.labelStyle=r;let n=t.look==="neo"?16:t.padding??0,a=t.look==="neo"?12:t.padding??0,{shapeSvg:s,bbox:l,label:h}=await dr(e,t,lr(t)),u=(t?.width??l.width)+n*2+(t.look==="neo"?Fp:Fp*2),d=(t?.height??l.height)+a*2,p=u-Fp,f=d,g=Fp-u/2,m=-d/2,{cssStyles:y}=t,b=Bt.svg(s),v=qt(t,{});t.look!=="handDrawn"&&(v.roughness=0,v.fillStyle="solid");let T=[{x:g,y:m},{x:g+p,y:m},{x:g+p,y:m+f},{x:g-Fp,y:m+f},{x:g-Fp,y:m},{x:g,y:m},{x:g,y:m+f}],x=b.polygon(T.map(C=>[C.x,C.y]),v),k=s.insert(()=>x,":first-child");return k.attr("class","basic label-container outer-path").attr("style",_n(y)),i&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",i),y&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",i),h.attr("transform",`translate(${Fp/2-l.width/2-(l.x-(l.left??0))}, ${-(l.height/2)-(l.y-(l.top??0))})`),Vt(t,k),t.intersect=function(C){return Ft.rect(t,C)},s}async function qce(e,t){let{labelStyles:r,nodeStyles:i}=Pt(t);t.labelStyle=r;let n=t.padding??0,a=t.look==="neo"?16:n,s=t.look==="neo"?12:n;(t.width||t.height)&&(t.width=Math.max((t?.width??0)-a*2,10),t.height=Math.max((t?.height??0)/1.5-s*2,10));let{shapeSvg:l,bbox:h,label:u}=await dr(e,t,lr(t)),d=(t?.width?t?.width:h.width)+a*2,p=((t?.height?t?.height:h.height)+s*2)*1.5,f=d,g=p/1.5,m=-f/2,y=-g/2,{cssStyles:b}=t,v=Bt.svg(l),T=qt(t,{});t.look!=="handDrawn"&&(T.roughness=0,T.fillStyle="solid");let x=[{x:m,y},{x:m,y:y+g},{x:m+f,y:y+g},{x:m+f,y:y-g/2}],k=Hr(x),C=v.path(k,T),E=l.insert(()=>C,":first-child");return E.attr("class","basic label-container outer-path"),b&&t.look!=="handDrawn"&&E.selectChildren("path").attr("style",b),i&&t.look!=="handDrawn"&&E.selectChildren("path").attr("style",i),E.attr("transform",`translate(0, ${g/4})`),u.attr("transform",`translate(${-f/2+(t.padding??0)-(h.x-(h.left??0))}, ${-g/4+(t.padding??0)-(h.y-(h.top??0))})`),Vt(t,E),t.intersect=function(w){return Ft.polygon(t,x,w)},l}async function jce(e,t){let r=t.padding??0,i=t.look==="neo"?16:r*2,n=t.look==="neo"?12:r,a={rx:0,ry:0,classes:"",labelPaddingX:t.labelPaddingX??i,labelPaddingY:n};return B0(e,t,a)}async function Gce(e,t){let{labelStyles:r,nodeStyles:i}=Pt(t);t.labelStyle=r;let n=t.padding??0,a=t.look==="neo"?20:n,s=t.look==="neo"?12:n,{shapeSvg:l,bbox:h}=await dr(e,t,lr(t)),u=h.height+(t.look==="neo"?s*2:s),d=h.width+u/4+(t.look==="neo"?a*2:a),p=u/2,{cssStyles:f}=t,g=Bt.svg(l),m=qt(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");let y=[{x:-d/2+p,y:-u/2},{x:d/2-p,y:-u/2},...ev(-d/2+p,0,p,50,90,270),{x:d/2-p,y:u/2},...ev(d/2-p,0,p,50,270,450)],b=Hr(y),v=g.path(b,m),T=l.insert(()=>v,":first-child");return T.attr("class","basic label-container outer-path"),f&&t.look!=="handDrawn"&&T.selectChildren("path").attr("style",f),i&&t.look!=="handDrawn"&&T.selectChildren("path").attr("style",i),Vt(t,T),t.intersect=function(x){return Ft.polygon(t,y,x)},l}async function Wce(e,t){let r={rx:t.look==="neo"?3:5,ry:t.look==="neo"?3:5,classes:"flowchart-node"};return B0(e,t,r)}function Uce(e,t,{config:{themeVariables:r}}){let{labelStyles:i,nodeStyles:n}=Pt(t);t.labelStyle=i;let{cssStyles:a}=t,{lineColor:s,stateBorder:l,nodeBorder:h,nodeShadow:u}=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),p=Bt.svg(d),f=qt(t,{});t.look!=="handDrawn"&&(f.roughness=0,f.fillStyle="solid");let g=p.circle(0,0,t.width,{...f,stroke:s,strokeWidth:2}),m=l??h,y=(t.width??0)*5/14,b=p.circle(0,0,y,{...f,fill:m,stroke:m,strokeWidth:2,fillStyle:"solid"}),v=d.insert(()=>g,":first-child");if(v.insert(()=>b),t.look!=="handDrawn"&&v.attr("class","outer-path"),a&&v.selectAll("path").attr("style",a),n&&v.selectAll("path").attr("style",n),t.width<25&&u&&t.look!=="handDrawn"){let T=e.node()?.ownerSVGElement?.id??"",x=T?`${T}-drop-shadow-small`:"drop-shadow-small";v.attr("style",`filter:url(#${x})`)}return Vt(t,v),t.intersect=function(T){return Ft.circle(t,(t.width??0)/2,T)},d}function Vce(e,t,{config:{themeVariables:r}}){let{lineColor:i,nodeShadow:n}=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),s;if(t.look==="handDrawn"){let l=Bt.svg(a).circle(0,0,t.width,uoe(i));s=a.insert(()=>l),s.attr("class","state-start").attr("r",(t.width??7)/2).attr("width",t.width??14).attr("height",t.height??14)}else s=a.insert("circle",":first-child"),s.attr("class","state-start").attr("r",(t.width??7)/2).attr("width",t.width??14).attr("height",t.height??14);if(t.width<25&&n&&t.look!=="handDrawn"){let l=e.node()?.ownerSVGElement?.id??"",h=l?`${l}-drop-shadow-small`:"drop-shadow-small";s.attr("style",`filter:url(#${h})`)}return Vt(t,s),t.intersect=function(l){return Ft.circle(t,(t.width??7)/2,l)},a}async function Yce(e,t){let{labelStyles:r,nodeStyles:i}=Pt(t);t.labelStyle=r;let n=t?.padding??8,a=t.look==="neo"?28:n,s=t.look==="neo"?12:n,{shapeSvg:l,bbox:h}=await dr(e,t,lr(t)),u=(t?.width??h.width)+2*M0+a,d=(t?.height??h.height)+s,p=u-2*M0,f=d,g=-u/2,m=-d/2,y=[{x:0,y:0},{x:p,y:0},{x:p,y:-f},{x:0,y:-f},{x:0,y:0},{x:-8,y:0},{x:p+8,y:0},{x:p+8,y:-f},{x:-8,y:-f},{x:-8,y:0}];if(t.look==="handDrawn"){let b=Bt.svg(l),v=qt(t,{}),T=b.rectangle(g,m,p+16,f,v),x=b.line(g+M0,m,g+M0,m+f,v),k=b.line(g+M0+p,m,g+M0+p,m+f,v);l.insert(()=>x,":first-child"),l.insert(()=>k,":first-child");let C=l.insert(()=>T,":first-child"),{cssStyles:E}=t;C.attr("class","basic label-container").attr("style",_n(E)),Vt(t,C)}else{let b=Ch(l,p,f,y);i&&b.attr("style",i),Vt(t,b)}return t.intersect=function(b){return Ft.polygon(t,y,b)},l}async function Hce(e,t){let{labelStyles:r,nodeStyles:i}=Pt(t);t.labelStyle=r;let n=t.padding??0,a=t.look==="neo"?16:n,s=t.look==="neo"?12:n;(t.width||t.height)&&(t.height=Math.max((t?.height??0)-s*2,10),t.width=Math.max((t?.width??0)-a*2-k$*(t.height+s*2),10));let{shapeSvg:l,bbox:h}=await dr(e,t,lr(t)),u=(t?.height?t?.height:h.height)+s*2,d=k$*u,p=k$*u,f=(t?.width?t?.width:h.width)+a*2+d-d,g=u,m=-f/2,y=-g/2,{cssStyles:b}=t,v=Bt.svg(l),T=qt(t,{}),x=[{x:m-d/2,y},{x:m+f+d/2,y},{x:m+f+d/2,y:y+g},{x:m-d/2,y:y+g}],k=[{x:m+f-d/2,y:y+g},{x:m+f+d/2,y:y+g},{x:m+f+d/2,y:y+g-p}];t.look!=="handDrawn"&&(T.roughness=0,T.fillStyle="solid");let C=Hr(x),E=v.path(C,T),w=Hr(k),_=v.path(w,{...T,fillStyle:"solid"}),L=l.insert(()=>_,":first-child");return L.insert(()=>E,":first-child"),L.attr("class","basic label-container outer-path"),b&&t.look!=="handDrawn"&&L.selectAll("path").attr("style",b),i&&t.look!=="handDrawn"&&L.selectAll("path").attr("style",i),Vt(t,L),t.intersect=function(N){return Ft.polygon(t,x,N)},l}async function Xce(e,t){let{labelStyles:r,nodeStyles:i}=Pt(t);t.labelStyle=r;let{shapeSvg:n,bbox:a,label:s}=await dr(e,t,lr(t)),l=Math.max(a.width+(t.padding??0)*2,t?.width??0),h=Math.max(a.height+(t.padding??0)*2,t?.height??0),u=h/8,d=.2*l,p=.2*h,f=h+u,{cssStyles:g}=t,m=Bt.svg(n),y=qt(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");let b=[{x:-l/2-l/2*.1,y:f/2},...Wu(-l/2-l/2*.1,f/2,l/2+l/2*.1,f/2,u,.8),{x:l/2+l/2*.1,y:-f/2},{x:-l/2-l/2*.1,y:-f/2}],v=-l/2+l/2*.1,T=-f/2-p*.4,x=[{x:v+l-d,y:(T+h)*1.3},{x:v+l,y:T+h-p},{x:v+l,y:(T+h)*.9},...Wu(v+l,(T+h)*1.25,v+l-d,(T+h)*1.3,-h*.02,.5)],k=Hr(b),C=m.path(k,y),E=Hr(x),w=m.path(E,{...y,fillStyle:"solid"}),_=n.insert(()=>w,":first-child");return _.insert(()=>C,":first-child"),_.attr("class","basic label-container outer-path"),g&&t.look!=="handDrawn"&&_.selectAll("path").attr("style",g),i&&t.look!=="handDrawn"&&_.selectAll("path").attr("style",i),_.attr("transform",`translate(0,${-u/2})`),s.attr("transform",`translate(${-l/2+(t.padding??0)-(a.x-(a.left??0))},${-h/2+(t.padding??0)-u/2-(a.y-(a.top??0))})`),Vt(t,_),t.intersect=function(L){return Ft.polygon(t,b,L)},n}async function Kce(e,t){let{labelStyles:r,nodeStyles:i}=Pt(t);t.labelStyle=r;let{shapeSvg:n,bbox:a}=await dr(e,t,lr(t)),s=Math.max(a.width+(t.padding??0),t?.width||0),l=Math.max(a.height+(t.padding??0),t?.height||0),h=-s/2,u=-l/2,d=n.insert("rect",":first-child");return d.attr("class","text").attr("style",i).attr("rx",0).attr("ry",0).attr("x",h).attr("y",u).attr("width",s).attr("height",l),Vt(t,d),t.intersect=function(p){return Ft.rect(t,p)},n}async function Zce(e,t){let{labelStyles:r,nodeStyles:i}=Pt(t);t.labelStyle=r;let n=t.padding??0,a=t.look==="neo"?12:n/2;if(t.width||t.height){let y=t.height??0;t.height=(t.height??0)-a,t.heightx,":first-child"),m=s.insert(()=>T,":first-child"),m.attr("class","basic label-container"),g&&m.attr("style",g)}else{let y=HOe(0,0,f,u,p,d);m=s.insert("path",":first-child").attr("d",y).attr("class","basic label-container").attr("style",_n(g)).attr("style",i),m.attr("class","basic label-container outer-path"),g&&m.selectAll("path").attr("style",g),i&&m.selectAll("path").attr("style",i)}return m.attr("label-offset-x",p),m.attr("transform",`translate(${-f/2}, ${u/2} )`),h.attr("transform",`translate(${-(l.width/2)-p-(l.x-(l.left??0))}, ${-(l.height/2)-(l.y-(l.top??0))})`),Vt(t,m),t.intersect=function(y){let b=Ft.rect(t,y),v=b.y-(t.y??0);if(d!=0&&(Math.abs(v)<(t.height??0)/2||Math.abs(v)==(t.height??0)/2&&Math.abs(b.x-(t.x??0))>(t.width??0)/2-p)){let T=p*p*(1-v*v/(d*d));T!=0&&(T=Math.sqrt(Math.abs(T))),T=p-T,y.x-(t.x??0)>0&&(T=-T),b.x+=T}return b},s}async function Qce(e,t){let{labelStyles:r,nodeStyles:i}=Pt(t);t.labelStyle=r;let n=t.padding??0,a=(t.look,n),s=t.look==="neo"?n*2:n,{shapeSvg:l,bbox:h}=await dr(e,t,lr(t)),u=(t?.height??h.height)+a,d=(t?.width??h.width)+s,p=[{x:-3*u/6,y:0},{x:d+3*u/6,y:0},{x:d,y:-u},{x:0,y:-u}],f,{cssStyles:g}=t;if(t.look==="handDrawn"){let m=Bt.svg(l),y=qt(t,{}),b=Hr(p),v=m.path(b,y);f=l.insert(()=>v,":first-child").attr("transform",`translate(${-d/2}, ${u/2})`),g&&f.attr("style",g)}else f=Ch(l,d,u,p);return i&&f.attr("style",i),t.width=d,t.height=u,Vt(t,f),t.intersect=function(m){return Ft.polygon(t,p,m)},l}async function Jce(e,t){let{labelStyles:r,nodeStyles:i}=Pt(t);t.labelStyle=r;let n=t.padding??0,a=t.look==="neo"?16:n,s=t.look==="neo"?12:n,l=15,h=5;(t.width||t.height)&&(t.height=(t.height??0)-s*2,t.heightT,":first-child");return x.attr("class","basic label-container outer-path"),g&&t.look!=="handDrawn"&&x.selectChildren("path").attr("style",g),i&&t.look!=="handDrawn"&&x.selectChildren("path").attr("style",i),Vt(t,x),t.intersect=function(k){return Ft.polygon(t,b,k)},u}async function ehe(e,t){let{labelStyles:r,nodeStyles:i}=Pt(t);t.labelStyle=r;let n=t.padding??0,a=t.look==="neo"?n*2:n;(t.width||t.height)&&(t.width=((t?.width??0)-a)/2,t.widthT,":first-child").attr("transform",`translate(${-p/2}, ${p/2})`).attr("class","outer-path");return m&&t.look!=="handDrawn"&&x.selectChildren("path").attr("style",m),i&&t.look!=="handDrawn"&&x.selectChildren("path").attr("style",i),t.width=d,t.height=p,Vt(t,x),h.attr("transform",`translate(${-l.width/2-(l.x-(l.left??0))}, ${p/2-(l.height+(t.padding??0)/(u?2:1)-(l.y-(l.top??0)))})`),t.intersect=function(k){return ee.info("Triangle intersect",t,g,k),Ft.polygon(t,g,k)},s}async function the(e,t){let{labelStyles:r,nodeStyles:i}=Pt(t);t.labelStyle=r;let n=t.padding??0,a=t.look==="neo"?16:n,s=t.look==="neo"?12:n,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)-s*2,t.height<10&&(t.height=10));let{shapeSvg:h,bbox:u,label:d}=await dr(e,t,lr(t)),p=(t?.width?t?.width:u.width)+(a??0)*2,f=(t?.height?t?.height:u.height)+(s??0)*2,g=t.look==="neo"?f/4:f/8,m=f+(l?g:-g),{cssStyles:y}=t,b=14-p,v=b>0?b/2:0,T=Bt.svg(h),x=qt(t,{});t.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");let k=[{x:-p/2-v,y:m/2},...Wu(-p/2-v,m/2,p/2+v,m/2,g,.8),{x:p/2+v,y:-m/2},{x:-p/2-v,y:-m/2}],C=Hr(k),E=T.path(C,x),w=h.insert(()=>E,":first-child");return w.attr("class","basic label-container outer-path"),y&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",y),i&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",i),w.attr("transform",`translate(0,${-g/2})`),d.attr("transform",`translate(${-p/2+(t.padding??0)-(u.x-(u.left??0))},${-f/2+(t.padding??0)-g-(u.y-(u.top??0))})`),Vt(t,w),t.intersect=function(_){return Ft.polygon(t,k,_)},h}async function rhe(e,t){let{labelStyles:r,nodeStyles:i}=Pt(t);t.labelStyle=r;let n=t.padding??0,a=t.look==="neo"?16:n,s=t.look==="neo"?20:n;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 k=Math.min(t.height*.2,t.height/4);t.height=Math.ceil(t.height-s-k*(20/9)),t.width=t.width-a*2}let{shapeSvg:l,bbox:h}=await dr(e,t,lr(t)),u=(t?.width?t?.width:h.width)+a*2,d=(t?.height?t?.height:h.height)+s,p=d/8,f=d+p*2,{cssStyles:g}=t,m=Bt.svg(l),y=qt(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");let b=[{x:-u/2,y:f/2},...Wu(-u/2,f/2,u/2,f/2,p,1),{x:u/2,y:-f/2},...Wu(u/2,-f/2,-u/2,-f/2,p,-1)],v=Hr(b),T=m.path(v,y),x=l.insert(()=>T,":first-child");return x.attr("class","basic label-container"),g&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",g),i&&t.look!=="handDrawn"&&x.selectAll("path").attr("style",i),Vt(t,x),t.intersect=function(k){return Ft.polygon(t,b,k)},l}async function ihe(e,t){let{labelStyles:r,nodeStyles:i}=Pt(t);t.labelStyle=r;let n=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)-n*2-nn,10),t.height=Math.max((t?.height??0)-a*2-nn,10));let{shapeSvg:s,bbox:l,label:h}=await dr(e,t,lr(t)),u=(t?.width?t?.width:l.width)+n*2+nn,d=(t?.height?t?.height:l.height)+a*2+nn,p=u-nn,f=d-nn,g=-p/2,m=-f/2,{cssStyles:y}=t,b=Bt.svg(s),v=qt(t,{}),T=[{x:g-nn,y:m-nn},{x:g-nn,y:m+f},{x:g+p,y:m+f},{x:g+p,y:m-nn}],x=`M${g-nn},${m-nn} L${g+p},${m-nn} L${g+p},${m+f} L${g-nn},${m+f} L${g-nn},${m-nn} + M${g-nn},${m} L${g+p},${m} + M${g},${m-nn} L${g},${m+f}`;t.look!=="handDrawn"&&(v.roughness=0,v.fillStyle="solid");let k=b.path(x,v),C=s.insert(()=>k,":first-child");return C.attr("transform",`translate(${nn/2}, ${nn/2})`),C.attr("class","basic label-container outer-path"),y&&t.look!=="handDrawn"&&C.selectAll("path").attr("style",y),i&&t.look!=="handDrawn"&&C.selectAll("path").attr("style",i),h.attr("transform",`translate(${-(l.width/2)+nn/2-(l.x-(l.left??0))}, ${-(l.height/2)+nn/2-(l.y-(l.top??0))})`),Vt(t,C),t.intersect=function(E){return Ft.polygon(t,T,E)},s}async function _$(e,t){let r=t;r.alias&&(t.label=r.alias);let{theme:i,themeVariables:n}=Rt(),{rowEven:a,rowOdd:s,nodeBorder:l,borderColorArray:h}=n;if(t.look==="handDrawn"){let{themeVariables:H}=Rt(),{background:Z}=H,se={...t,id:t.id+"-background",domId:(t.domId||t.id)+"-background",look:"default",cssStyles:["stroke: none",`fill: ${Z}`]};await _$(e,se)}let u=Rt();t.useHtmlLabels=u.htmlLabels;let d=u.er?.diagramPadding??10,p=u.er?.entityPadding??6,{cssStyles:f}=t,{labelStyles:g,nodeStyles:m}=Pt(t);if(r.attributes.length===0&&t.label){let H={rx:0,ry:0,labelPaddingX:d,labelPaddingY:d*1.5,classes:""};oa(t.label,u)+H.labelPaddingX*20){let H=v.width+d*2-(C+E+w+_);C+=H/D,E+=H/D,w>0&&(w+=H/D),_>0&&(_+=H/D)}let B=C+E+w+_,A=Bt.svg(b),I=qt(t,{});t.look!=="handDrawn"&&(I.roughness=0,I.fillStyle="solid");let O=0;k.length>0&&(O=k.reduce((H,Z)=>H+(Z?.rowHeight??0),0));let R=Math.max(M.width+d*2,t?.width||0,B),$=Math.max((O??0)+v.height,t?.height||0),F=-R/2,P=-$/2;if(b.selectAll("g:not(:first-child)").each((H,Z,se)=>{let Q=tt(se[Z]),te=Q.attr("transform"),re=0,ne=0;if(te){let Ae=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(te);Ae&&(re=parseFloat(Ae[1]),ne=parseFloat(Ae[2]),Q.attr("class").includes("attribute-name")?re+=C:Q.attr("class").includes("attribute-keys")?re+=C+E:Q.attr("class").includes("attribute-comment")&&(re+=C+E+w))}Q.attr("transform",`translate(${F+d/2+re}, ${ne+P+v.height+p/2})`)}),b.select(".name").attr("transform","translate("+-v.width/2+", "+(P+p/2)+")"),i!=null&&Ule.has(i)){let H=r.colorIndex??0;b.attr("data-color-id",`color-${H%h.length}`)}let z=A.rectangle(F,P,R,$,I),q=b.insert(()=>z,":first-child").attr("class","outer-path").attr("style",f.join(""));x.push(0);for(let[H,Z]of k.entries()){let se=(H+1)%2===0&&Z.yOffset!==0,Q=A.rectangle(F,v.height+P+Z?.yOffset,R,Z?.rowHeight,{...I,fill:se?a:s,stroke:l});b.insert(()=>Q,"g.label").attr("style",f.join("")).attr("class",`row-rect-${se?"even":"odd"}`)}let G=1e-4,W=O0(F,v.height+P,R+F,v.height+P,G),J=A.polygon(W.map(H=>[H.x,H.y]),I);if(b.insert(()=>J).attr("class","divider"),W=O0(C+F,v.height+P,C+F,$+P,G),J=A.polygon(W.map(H=>[H.x,H.y]),I),b.insert(()=>J).attr("class","divider"),L){let H=C+E+F;W=O0(H,v.height+P,H,$+P,G),J=A.polygon(W.map(Z=>[Z.x,Z.y]),I),b.insert(()=>J).attr("class","divider")}if(N){let H=C+E+w+F;W=O0(H,v.height+P,H,$+P,G),J=A.polygon(W.map(Z=>[Z.x,Z.y]),I),b.insert(()=>J).attr("class","divider")}for(let H of x){let Z=v.height+P+H;W=O0(F,Z,R+F,Z,G),J=A.polygon(W.map(se=>[se.x,se.y]),I),b.insert(()=>J).attr("class","divider")}if(Vt(t,q),m&&t.look!=="handDrawn")if(i!=null&&ZOe.has(i))b.selectAll("path").attr("style",m);else{let H=m.split(";")?.filter(Z=>Z.includes("stroke"))?.map(Z=>`${Z}`).join("; ");b.selectAll("path").attr("style",H??""),b.selectAll(".row-rect-even path").attr("style",m)}return t.intersect=function(H){return Ft.rect(t,H)},b}async function N0(e,t,r,i=0,n=0,a=[],s=""){let l=e.insert("g").attr("class",`label ${a.join(" ")}`).attr("transform",`translate(${i}, ${n})`).attr("style",s);t!==cc(t)&&(t=cc(t),t=t.replaceAll("<","<").replaceAll(">",">"));let h=l.node().appendChild(await Rn(l,t,{width:oa(t,r)+100,style:s,useHtmlLabels:r.htmlLabels},r));if(t.includes("<")||t.includes(">")){let d=h.children[0];for(d.textContent=d.textContent.replaceAll("<","<").replaceAll(">",">");d.childNodes[0];)d=d.childNodes[0],d.textContent=d.textContent.replaceAll("<","<").replaceAll(">",">")}let u=h.getBBox();if(Mo(r.htmlLabels)){let d=h.children[0];d.style.textAlign="start";let p=tt(h);u=d.getBoundingClientRect(),p.attr("width",u.width),p.attr("height",u.height)}return u}function O0(e,t,r,i,n){return e===r?[{x:e-n/2,y:t},{x:e+n/2,y:t},{x:r+n/2,y:i},{x:r-n/2,y:i}]:[{x:e,y:t-n/2},{x:e,y:t+n/2},{x:r,y:i+n/2},{x:r,y:i-n/2}]}async function nhe(e,t,r,i,n=r.class.padding??12){let a=i?0:3,s=e.insert("g").attr("class",lr(t)).attr("id",t.domId||t.id),l=null,h=null,u=null,d=null,p=0,f=0,g=0;if(l=s.insert("g").attr("class","annotation-group text"),t.annotations.length>0){let T=t.annotations[0];await J2(l,{text:`\xAB${T}\xBB`},0),p=l.node().getBBox().height}h=s.insert("g").attr("class","label-group text"),await J2(h,t,0,["font-weight: bolder"]);let m=h.node().getBBox();f=m.height,u=s.insert("g").attr("class","members-group text");let y=0;for(let T of t.members){let x=await J2(u,T,y,[T.parseClassifier()]);y+=x+a}g=u.node().getBBox().height,g<=0&&(g=n/2),d=s.insert("g").attr("class","methods-group text");let b=0;for(let T of t.methods){let x=await J2(d,T,b,[T.parseClassifier()]);b+=x+a}let v=s.node().getBBox();if(l!==null){let T=l.node().getBBox();l.attr("transform",`translate(${-T.width/2})`)}return h.attr("transform",`translate(${-m.width/2}, ${p})`),v=s.node().getBBox(),u.attr("transform",`translate(0, ${p+f+n*2})`),v=s.node().getBBox(),d.attr("transform",`translate(0, ${p+f+(g?g+n*4:n*2)})`),v=s.node().getBBox(),{shapeSvg:s,bbox:v}}async function J2(e,t,r,i=[]){let n=e.insert("g").attr("class","label").attr("style",i.join("; ")),a=Rt(),s="useHtmlLabels"in t?t.useHtmlLabels:Mo(a.htmlLabels)??!0,l="";"text"in t?l=t.text:l=t.label,!s&&l.startsWith("\\")&&(l=l.substring(1)),Gi(l)&&(s=!0);let h=await Rn(n,Ok(so(l)),{width:oa(l,a)+50,classes:"markdown-node-label",useHtmlLabels:s},a),u,d=1;if(s){let p=h.children[0],f=tt(h);d=p.innerHTML.split("
    ").length,p.innerHTML.includes("")&&(d+=p.innerHTML.split("").length-1);let g=p.getElementsByTagName("img");if(g){let m=l.replace(/]*>/g,"").trim()==="";await Promise.all([...g].map(y=>new Promise(b=>{function v(){if(y.style.display="flex",y.style.flexDirection="column",m){let T=a.fontSize?.toString()??window.getComputedStyle(document.body).fontSize,x=parseInt(T,10)*5+"px";y.style.minWidth=x,y.style.maxWidth=x}else y.style.width="100%";b(y)}o(v,"setupImage"),setTimeout(()=>{y.complete&&v()}),y.addEventListener("error",v),y.addEventListener("load",v)})))}u=p.getBoundingClientRect(),f.attr("width",u.width),f.attr("height",u.height)}else{i.includes("font-weight: bolder")&&tt(h).selectAll("tspan").attr("font-weight",""),d=h.children.length;let p=h.children[0];(h.textContent===""||h.textContent.includes(">"))&&(p.textContent=l[0]+l.substring(1).replaceAll(">",">").replaceAll("<","<").trim(),l[1]===" "&&(p.textContent=p.textContent[0]+" "+p.textContent.substring(1))),p.textContent==="undefined"&&(p.textContent=""),u=h.getBBox()}return n.attr("transform","translate(0,"+(-u.height/(2*d)+r)+")"),u.height}async function ahe(e,t){let r=De(),{themeVariables:i}=r,{useGradient:n}=i,a=r.class.padding??12,s=a,l=t.useHtmlLabels??Mo(r.htmlLabels)??!0,h=t;h.annotations=h.annotations??[],h.members=h.members??[],h.methods=h.methods??[];let{shapeSvg:u,bbox:d}=await nhe(e,t,r,l,s),{labelStyles:p,nodeStyles:f}=Pt(t);t.labelStyle=p,t.cssStyles=h.styles||"";let g=h.styles?.join(";")||f||"";t.cssStyles||(t.cssStyles=g.replaceAll("!important","").split(";"));let m=h.members.length===0&&h.methods.length===0&&!r.class?.hideEmptyMembersBox,y=Bt.svg(u),b=qt(t,{});t.look!=="handDrawn"&&(b.roughness=0,b.fillStyle="solid");let v=Math.max(t.width??0,d.width),T=Math.max(t.height??0,d.height),x=(t.height??0)>d.height;h.members.length===0&&h.methods.length===0?T+=s:h.members.length>0&&h.methods.length===0&&(T+=s*2);let k=-v/2,C=-T/2,E=m?a*2:h.members.length===0&&h.methods.length===0?-a:0;x&&(E=a*2);let w=y.rectangle(k-a,C-a-(m?a:h.members.length===0&&h.methods.length===0?-a/2:0),v+2*a,T+2*a+E,b),_=u.insert(()=>w,":first-child");_.attr("class","basic label-container outer-path");let L=_.node().getBBox(),N=u.select(".annotation-group").node().getBBox().height-(m?a/2:0)||0,D=u.select(".label-group").node().getBBox().height-(m?a/2:0)||0,M=u.select(".members-group").node().getBBox().height-(m?a/2:0)||0,B=(N+D+C+a-(C-a-(m?a:h.members.length===0&&h.methods.length===0?-a/2:0)))/2;if(u.selectAll(".text").each((A,I,O)=>{let R=tt(O[I]),$=R.attr("transform"),F=0;if($){let q=RegExp(/translate\(([^,]+),([^)]+)\)/).exec($);q&&(F=parseFloat(q[2]))}let P=F+C+a-(m?a:h.members.length===0&&h.methods.length===0?-a/2:0);if(R.attr("class").includes("methods-group")){let q=Math.max(M,s/2);x?P=Math.max(B,N+D+q+C+s*2+a)+s*2:P=N+D+q+C+s*4+a}h.members.length===0&&h.methods.length===0&&r.class?.hideEmptyMembersBox&&(h.annotations.length>0?P=F-s:P=F),l||(P-=4);let z=k;(R.attr("class").includes("label-group")||R.attr("class").includes("annotation-group"))&&(z=-R.node()?.getBBox().width/2||0,u.selectAll("text").each(function(q,G,W){window.getComputedStyle(W[G]).textAnchor==="middle"&&(z=0)})),R.attr("transform",`translate(${z}, ${P})`)}),h.members.length>0||h.methods.length>0||m){let A=N+D+C+a,I=y.line(L.x,A,L.x+L.width,A+.001,b);u.insert(()=>I).attr("class",`divider${t.look==="neo"&&!n?" neo-line":""}`).attr("style",g)}if(m||h.members.length>0||h.methods.length>0){let A=N+D+M+C+s*2+a,I=y.line(L.x,x?Math.max(B,A):A,L.x+L.width,(x?Math.max(B,A):A)+.001,b);u.insert(()=>I).attr("class",`divider${t.look==="neo"&&!n?" neo-line":""}`).attr("style",g)}if(h.look!=="handDrawn"&&u.selectAll("path").attr("style",g),_.select(":nth-child(2)").attr("style",g),u.selectAll(".divider").select("path").attr("style",g),t.labelStyle?u.selectAll("span").attr("style",t.labelStyle):u.selectAll("span").attr("style",g),!l){let A=RegExp(/color\s*:\s*([^;]*)/),I=A.exec(g);if(I){let O=I[0].replace("color","fill");u.selectAll("tspan").attr("style",O)}else if(p){let O=A.exec(p);if(O){let R=O[0].replace("color","fill");u.selectAll("tspan").attr("style",R)}}}return Vt(t,_),t.intersect=function(A){return Ft.rect(t,A)},u}async function she(e,t){let{labelStyles:r,nodeStyles:i}=Pt(t);t.labelStyle=r;let n=t,a=t,s=20,l=20,h="verifyMethod"in t,u=lr(t),{themeVariables:d}=De(),{borderColorArray:p,requirementEdgeLabelBackground:f}=d,g=e.insert("g").attr("class",u).attr("id",t.domId??t.id),m;h?m=await fc(g,`<<${n.type}>>`,0,t.labelStyle):m=await fc(g,"<<Element>>",0,t.labelStyle);let y=m,b=await fc(g,n.name,y,t.labelStyle+"; font-weight: bold;");if(y+=b+l,h){let L=await fc(g,`${n.requirementId?`ID: ${n.requirementId}`:""}`,y,t.labelStyle);y+=L;let N=await fc(g,`${n.text?`Text: ${n.text}`:""}`,y,t.labelStyle);y+=N;let D=await fc(g,`${n.risk?`Risk: ${n.risk}`:""}`,y,t.labelStyle);y+=D,await fc(g,`${n.verifyMethod?`Verification: ${n.verifyMethod}`:""}`,y,t.labelStyle)}else{let L=await fc(g,`${a.type?`Type: ${a.type}`:""}`,y,t.labelStyle);y+=L,await fc(g,`${a.docRef?`Doc Ref: ${a.docRef}`:""}`,y,t.labelStyle)}let v=(g.node()?.getBBox().width??200)+s,T=(g.node()?.getBBox().height??200)+s,x=-v/2,k=-T/2,C=Bt.svg(g),E=qt(t,{});t.look!=="handDrawn"&&(E.roughness=0,E.fillStyle="solid");let w=C.rectangle(x,k,v,T,E),_=g.insert(()=>w,":first-child");if(_.attr("class","basic label-container outer-path").attr("style",i),p?.length){let L=t.colorIndex??0;g.attr("data-color-id",`color-${L%p.length}`)}if(g.selectAll(".label").each((L,N,D)=>{let M=tt(D[N]),B=M.attr("transform"),A=0,I=0;if(B){let $=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(B);$&&(A=parseFloat($[1]),I=parseFloat($[2]))}let O=I-T/2,R=x+s/2;(N===0||N===1)&&(R=A),M.attr("transform",`translate(${R}, ${O+s})`)}),y>m+b+l){let L=k+m+b+l,N;if(t.look==="neo"){let D=[[x,L],[x+v,L],[x+v,L+.001],[x,L+.001]];N=C.polygon(D,E)}else N=C.line(x,L,x+v,L,E);g.insert(()=>N).attr("class","divider")}return Vt(t,_),t.intersect=function(L){return Ft.rect(t,L)},i&&t.look!=="handDrawn"&&(f||p?.length)&&g.selectAll("path").attr("style",i),g}async function fc(e,t,r,i=""){if(t==="")return 0;let n=e.insert("g").attr("class","label").attr("style",i),a=De(),s=a.htmlLabels??!0,l=await Rn(n,Ok(so(t)),{width:oa(t,a)+50,classes:"markdown-node-label",useHtmlLabels:s,style:i},a),h;if(s){let u=l.children[0],d=tt(l);h=u.getBoundingClientRect(),d.attr("width",h.width),d.attr("height",h.height)}else{let u=l.children[0];for(let d of u.children)i&&d.setAttribute("style",i);h=l.getBBox(),h.height+=6}return n.attr("transform",`translate(${-h.width/2},${-h.height/2+r})`),h.height}async function ohe(e,t,{config:r}){let{labelStyles:i,nodeStyles:n}=Pt(t);t.labelStyle=i||"";let a=10,s=t.width;t.width=(t.width??200)-10;let{shapeSvg:l,bbox:h,label:u}=await dr(e,t,lr(t)),d=t.padding||10,p="",f;"ticket"in t&&t.ticket&&r?.kanban?.ticketBaseUrl&&(p=r?.kanban?.ticketBaseUrl.replace("#TICKET#",t.ticket),f=l.insert("svg:a",":first-child").attr("class","kanban-ticket-link").attr("xlink:href",p).attr("target","_blank"));let g={useHtmlLabels:t.useHtmlLabels,labelStyle:t.labelStyle||"",width:t.width,img:t.img,padding:t.padding||8,centerLabel:!1},m,y;f?{label:m,bbox:y}=await T$(f,"ticket"in t&&t.ticket||"",g):{label:m,bbox:y}=await T$(l,"ticket"in t&&t.ticket||"",g);let{label:b,bbox:v}=await T$(l,"assigned"in t&&t.assigned||"",g);t.width=s;let T=10,x=t?.width||0,k=Math.max(y.height,v.height)/2,C=Math.max(h.height+T*2,t?.height||0)+k,E=-x/2,w=-C/2;u.attr("transform","translate("+(d-x/2)+", "+(-k-h.height/2)+")"),m.attr("transform","translate("+(d-x/2)+", "+(-k+h.height/2)+")"),b.attr("transform","translate("+(d+x/2-v.width-2*a)+", "+(-k+h.height/2)+")");let _,{rx:L,ry:N}=t,{cssStyles:D}=t;if(t.look==="handDrawn"){let M=Bt.svg(l),B=qt(t,{}),A=L||N?M.path(Uu(E,w,x,C,L||0),B):M.rectangle(E,w,x,C,B);_=l.insert(()=>A,":first-child"),_.attr("class","basic label-container").attr("style",D||null)}else{_=l.insert("rect",":first-child"),_.attr("class","basic label-container __APA__").attr("style",n).attr("rx",L??5).attr("ry",N??5).attr("x",E).attr("y",w).attr("width",x).attr("height",C);let M="priority"in t&&t.priority;if(M){let B=l.append("line"),A=E+2,I=w+Math.floor((L??0)/2),O=w+C-Math.floor((L??0)/2);B.attr("x1",A).attr("y1",I).attr("x2",A).attr("y2",O).attr("stroke-width","4").attr("stroke",QOe(M))}}return Vt(t,_),t.height=C,t.intersect=function(M){return Ft.rect(t,M)},l}async function lhe(e,t){let{labelStyles:r,nodeStyles:i}=Pt(t);t.labelStyle=r;let{shapeSvg:n,bbox:a,halfPadding:s,label:l}=await dr(e,t,lr(t)),h=a.width+10*s,u=a.height+8*s,d=.15*h,{cssStyles:p}=t,f=a.width+20,g=a.height+20,m=Math.max(h,f),y=Math.max(u,g);l.attr("transform",`translate(${-a.width/2}, ${-a.height/2})`);let b,v=`M0 0 + a${d},${d} 1 0,0 ${m*.25},${-1*y*.1} + a${d},${d} 1 0,0 ${m*.25},0 + a${d},${d} 1 0,0 ${m*.25},0 + a${d},${d} 1 0,0 ${m*.25},${y*.1} + + a${d},${d} 1 0,0 ${m*.15},${y*.33} + a${d*.8},${d*.8} 1 0,0 0,${y*.34} + a${d},${d} 1 0,0 ${-1*m*.15},${y*.33} + + a${d},${d} 1 0,0 ${-1*m*.25},${y*.15} + a${d},${d} 1 0,0 ${-1*m*.25},0 + a${d},${d} 1 0,0 ${-1*m*.25},0 + a${d},${d} 1 0,0 ${-1*m*.25},${-1*y*.15} + + a${d},${d} 1 0,0 ${-1*m*.1},${-1*y*.33} + a${d*.8},${d*.8} 1 0,0 0,${-1*y*.34} + a${d},${d} 1 0,0 ${m*.1},${-1*y*.33} + H0 V0 Z`;if(t.look==="handDrawn"){let T=Bt.svg(n),x=qt(t,{}),k=T.path(v,x);b=n.insert(()=>k,":first-child"),b.attr("class","basic label-container").attr("style",_n(p))}else b=n.insert("path",":first-child").attr("class","basic label-container").attr("style",i).attr("d",v);return b.attr("transform",`translate(${-m/2}, ${-y/2})`),Vt(t,b),t.calcIntersect=function(T,x){return Ft.rect(T,x)},t.intersect=function(T){return ee.info("Bang intersect",t,T),Ft.rect(t,T)},n}async function che(e,t){let{labelStyles:r,nodeStyles:i}=Pt(t);t.labelStyle=r;let{shapeSvg:n,bbox:a,halfPadding:s,label:l}=await dr(e,t,lr(t)),h=a.width+2*s,u=a.height+2*s,d=.15*h,p=.25*h,f=.35*h,g=.2*h,{cssStyles:m}=t,y,b=`M0 0 + a${d},${d} 0 0,1 ${h*.25},${-1*h*.1} + a${f},${f} 1 0,1 ${h*.4},${-1*h*.1} + a${p},${p} 1 0,1 ${h*.35},${h*.2} + + a${d},${d} 1 0,1 ${h*.15},${u*.35} + a${g},${g} 1 0,1 ${-1*h*.15},${u*.65} + + a${p},${d} 1 0,1 ${-1*h*.25},${h*.15} + a${f},${f} 1 0,1 ${-1*h*.5},0 + a${d},${d} 1 0,1 ${-1*h*.25},${-1*h*.15} + + a${d},${d} 1 0,1 ${-1*h*.1},${-1*u*.35} + a${g},${g} 1 0,1 ${h*.1},${-1*u*.65} + H0 V0 Z`;if(t.look==="handDrawn"){let v=Bt.svg(n),T=qt(t,{}),x=v.path(b,T);y=n.insert(()=>x,":first-child"),y.attr("class","basic label-container").attr("style",_n(m))}else y=n.insert("path",":first-child").attr("class","basic label-container").attr("style",i).attr("d",b);return l.attr("transform",`translate(${-a.width/2}, ${-a.height/2})`),y.attr("transform",`translate(${-h/2}, ${-u/2})`),Vt(t,y),t.calcIntersect=function(v,T){return Ft.rect(v,T)},t.intersect=function(v){return ee.info("Cloud intersect",t,v),Ft.rect(t,v)},n}async function hhe(e,t){let{labelStyles:r,nodeStyles:i}=Pt(t);t.labelStyle=r;let{shapeSvg:n,bbox:a,halfPadding:s,label:l}=await dr(e,t,lr(t)),h=a.width+8*s,u=a.height+2*s,d=5,p=t.look==="neo"?` + M${-h/2} ${u/2-d} + v${-u+2*d} + q0,-${d} ${d},-${d} + h${h-2*d} + q${d},0 ${d},${d} + v${u-d} + H${-h/2} + Z + `:` + M${-h/2} ${u/2-d} + v${-u+2*d} + q0,-${d} ${d},-${d} + h${h-2*d} + q${d},0 ${d},${d} + v${u-2*d} + q0,${d} ${-d},${d} + h${-(h-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 f=n.append("path").attr("id",t.domId).attr("class","node-bkg node-"+t.type).attr("style",i).attr("d",p);return n.append("line").attr("class","node-line-").attr("x1",-h/2).attr("y1",u/2).attr("x2",h/2).attr("y2",u/2),l.attr("transform",`translate(${-a.width/2}, ${-a.height/2})`),n.append(()=>l.node()),Vt(t,f),t.calcIntersect=function(g,m){return Ft.rect(g,m)},t.intersect=function(g){return Ft.rect(t,g)},n}async function uhe(e,t){let r={padding:t.padding??0};return S$(e,t,r)}function A$(e){return e in dhe}async function wh(e,t,r){let i,n;t.shape==="rect"&&(t.rx&&t.ry?t.shape="roundedRect":t.shape="squareRect");let a=t.shape?dhe[t.shape]:void 0;if(!a)throw new Error(`No such shape: ${t.shape}. Please check your syntax.`);if(t.link){let s;r.config.securityLevel==="sandbox"?s="_top":t.linkTarget&&(s=t.linkTarget||"_blank"),i=e.insert("svg:a").attr("xlink:href",t.link).attr("target",s??null),n=await a(i,t,r)}else n=await a(e,t,r),i=n;return i.attr("data-look",_n(t.look)),t.tooltip&&n.attr("title",t.tooltip),M3.set(t.id,i),t.haveCallback&&i.attr("class",i.attr("class")+" clickable"),i}var dr,T$,Vt,lr,_Oe,zp,AOe,kh,Uu,ROe,Vle,LOe,$Oe,IOe,DOe,MOe,NOe,Yle,Vu,D3,OOe,Kle,BOe,POe,FOe,Ft,I3,zOe,qOe,jOe,Nle,Ole,Ble,Ple,GOe,WOe,UOe,VOe,Fle,zle,YOe,Fp,M0,k$,HOe,XOe,KOe,qle,jle,Gle,Wle,nn,Ule,ZOe,QOe,JOe,eBe,dhe,M3,phe,N3,qp,ha=Tt(()=>{Zn();sa();la();Fn();An();Or();tr();Zt();vt();dr=o(async(e,t,r)=>{let i,n=t.useHtmlLabels||Mo(De()?.htmlLabels);r?i=r:i="node default";let a=e.insert("g").attr("class",i).attr("id",t.domId||t.id),s=a.insert("g").attr("class","label").attr("style",_n(t.labelStyle)),l;t.label===void 0?l="":l=typeof t.label=="string"?t.label:t.label[0];let h=!!t.icon||!!t.img,u=t.labelType==="markdown",d=await Rn(s,nr(so(l),De()),{useHtmlLabels:n,width:t.width||De().flowchart?.wrappingWidth,classes:u?"markdown-node-label":"",style:t.labelStyle,addSvgBackground:h,markdown:u},De()),p=d.getBBox(),f=(t?.padding??0)/2;if(n){let g=d.children[0],m=tt(d);await H2(g,l),p=g.getBoundingClientRect(),m.attr("width",p.width),m.attr("height",p.height)}return n?s.attr("transform","translate("+-p.width/2+", "+-p.height/2+")"):s.attr("transform","translate(0, "+-p.height/2+")"),t.centerLabel&&s.attr("transform","translate("+-p.width/2+", "+-p.height/2+")"),s.insert("rect",":first-child"),{shapeSvg:a,bbox:p,halfPadding:f,label:s}},"labelHelper"),T$=o(async(e,t,r)=>{let i=r.useHtmlLabels??Qr(De()),n=e.insert("g").attr("class","label").attr("style",r.labelStyle||""),a=await Rn(n,nr(so(t),De()),{useHtmlLabels:i,width:r.width||De()?.flowchart?.wrappingWidth,style:r.labelStyle,addSvgBackground:!!r.icon||!!r.img}),s=a.getBBox(),l=r.padding/2;if(Qr(De())){let h=a.children[0],u=tt(a);s=h.getBoundingClientRect(),u.attr("width",s.width),u.attr("height",s.height)}return i?n.attr("transform","translate("+-s.width/2+", "+-s.height/2+")"):n.attr("transform","translate(0, "+-s.height/2+")"),r.centerLabel&&n.attr("transform","translate("+-s.width/2+", "+-s.height/2+")"),n.insert("rect",":first-child"),{shapeSvg:e,bbox:s,halfPadding:l,label:n}},"insertLabel"),Vt=o((e,t)=>{let r=t.node().getBBox();e.width=r.width,e.height=r.height},"updateNodeBounds"),lr=o((e,t)=>(e.look==="handDrawn"?"rough-node":"node")+" "+e.cssClasses+" "+(t||""),"getNodeClasses");o(Hr,"createPathFromPoints");o(Wu,"generateFullSineWavePoints");o(ev,"generateCirclePoints");o(C$,"mergePaths");_Oe=o((e,t)=>{var r=e.x,i=e.y,n=t.x-r,a=t.y-i,s=e.width/2,l=e.height/2,h,u;return Math.abs(a)*s>Math.abs(n)*l?(a<0&&(l=-l),h=a===0?0:l*n/a,u=l):(n<0&&(s=-s),h=s,u=n===0?0:s*a/n),{x:r+h,y:i+u}},"intersectRect"),zp=_Oe,AOe=o(async(e,t,r,i=!1,n=!1)=>{let a=t||"";typeof a=="object"&&(a=a[0]);let s=De(),l=Qr(s);return await Rn(e,a,{style:r,isTitle:i,useHtmlLabels:l,markdown:!1,isNode:n,width:Number.POSITIVE_INFINITY},s)},"createLabel"),kh=AOe,Uu=o((e,t,r,i,n)=>["M",e+n,t,"H",e+r-n,"A",n,n,0,0,1,e+r,t+n,"V",t+i-n,"A",n,n,0,0,1,e+r-n,t+i,"H",e+n,"A",n,n,0,0,1,e,t+i-n,"V",t+n,"A",n,n,0,0,1,e+n,t,"Z"].join(" "),"createRoundedRectPathD"),ROe=o(async(e,t)=>{let r=De(),{themeVariables:i,handDrawnSeed:n}=r,{clusterBkg:a,clusterBorder:s}=i,l=s,{labelStyles:h,nodeStyles:u,borderStyles:d,backgroundStyles:p}=Pt(t),f=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),g=Mo(r.flowchart.htmlLabels),m=t.direction==="LR",y=f.insert("g").attr("class","cluster-label swimlane-label"),b=await Rn(y,t.label,{style:t.labelStyle,useHtmlLabels:g,isNode:!0,width:t.width}),v=b.getBBox();if(g){let B=b.children[0],A=tt(b);v=B.getBoundingClientRect(),A.attr("width",v.width),A.attr("height",v.height)}let T=t.padding??0,x=t.width<=v.width+T?v.width+T:t.width;t.width<=v.width+T?t.diff=(x-t.width)/2-T:t.diff=-T;let k=t.height,C=t.y-k/2,E=t.y+k/2,w=t.x-x/2,_=t.swimlaneContentTop!==void 0?t.swimlaneContentTop:C+k/3,L=m?4:0,N=v.height+2*L,D,M;if(m){let B=Math.max(N,v.height+2*L),A=w+B,I=Math.max(0,x-B);if(t.look==="handDrawn"){let $=Bt.svg(f),F=qt(t,{roughness:.7,fill:a,stroke:l,fillWeight:3,seed:n}),P=qt(t,{roughness:.7,fill:"none",stroke:l,seed:n}),z=$.rectangle(w,C,B,k,F);D=f.insert(()=>z,":first-child");let q=$.rectangle(A,C,I,k,P);M=f.insert(()=>q,":first-child"),D.select("path:nth-child(2)").attr("style",d.join(";")),D.select("path").attr("style",p.join(";").replace("fill","stroke"))}else D=f.insert("rect",":first-child"),M=f.insert("rect",":first-child"),D.attr("class","swimlane-title").attr("style",u).attr("x",w).attr("y",C).attr("width",B).attr("height",k).attr("fill",a).attr("stroke",l),M.attr("class","swimlane-body").attr("style",u).attr("x",A).attr("y",C).attr("width",I).attr("height",k).attr("fill","none").attr("stroke",l);let O=w+B/2,R=t.y;y.attr("transform",`translate(${O}, ${R}) rotate(-90) translate(${-v.width/2}, ${-v.height/2})`)}else{let B=Math.max(0,_-C),A=Math.min(N,B),I=C+A,O=Math.max(0,E-I),R=t.x-x/2;if(t.look==="handDrawn"){let P=Bt.svg(f),z=qt(t,{roughness:.7,fill:a,stroke:l,fillWeight:3,seed:n}),q=qt(t,{roughness:.7,fill:"none",stroke:l,seed:n}),G=P.rectangle(R,C,x,A,z);D=f.insert(()=>G,":first-child");let W=P.rectangle(R,I,x,O,q);M=f.insert(()=>W,":first-child"),D.select("path:nth-child(2)").attr("style",d.join(";")),D.select("path").attr("style",p.join(";").replace("fill","stroke"))}else D=f.insert("rect",":first-child"),M=f.insert("rect",":first-child"),D.attr("class","swimlane-title").attr("style",u).attr("x",R).attr("y",C).attr("width",x).attr("height",A).attr("fill",a).attr("stroke",l),M.attr("class","swimlane-body").attr("style",u).attr("x",R).attr("y",I).attr("width",x).attr("height",O).attr("fill","none").attr("stroke",l);let $=t.x-v.width/2,F=C+(A-v.height)/2;y.attr("transform",`translate(${$}, ${F})`)}if(ee.trace("Swimlane data ",t,JSON.stringify(t)),h){let B=y.select("span");B&&B.attr("style",h)}return t.offsetX=0,t.width=x,t.height=k,t.offsetY=v.height-T/2,t.intersect=function(B){return zp(t,B)},{cluster:f,labelBBox:v}},"swimlane"),Vle=o(async(e,t)=>{ee.info("Creating subgraph rect for ",t.id,t);let r=De(),{themeVariables:i,handDrawnSeed:n}=r,{clusterBkg:a,clusterBorder:s}=i,{labelStyles:l,nodeStyles:h,borderStyles:u,backgroundStyles:d}=Pt(t),p=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.domId).attr("data-look",t.look),f=Qr(r),g=p.insert("g").attr("class","cluster-label "),m;t.labelType==="markdown"?m=await Rn(g,t.label,{style:t.labelStyle,useHtmlLabels:f,isNode:!0,width:t.width}):m=await kh(g,t.label,t.labelStyle||"",!1,!0);let y=m.getBBox();if(Qr(r)){let w=m.children[0],_=tt(m);y=w.getBoundingClientRect(),_.attr("width",y.width),_.attr("height",y.height)}let b=t.width<=y.width+t.padding?y.width+t.padding:t.width;t.width<=y.width+t.padding?t.diff=(b-t.width)/2-t.padding:t.diff=-t.padding;let v=t.height,T=t.x-b/2,x=t.y-v/2;ee.trace("Data ",t,JSON.stringify(t));let k;if(t.look==="handDrawn"){let w=Bt.svg(p),_=qt(t,{roughness:.7,fill:a,stroke:s,fillWeight:3,seed:n}),L=w.path(Uu(T,x,b,v,0),_);k=p.insert(()=>(ee.debug("Rough node insert CXC",L),L),":first-child"),k.select("path:nth-child(2)").attr("style",u.join(";")),k.select("path").attr("style",d.join(";").replace("fill","stroke"))}else k=p.insert("rect",":first-child"),k.attr("style",h).attr("rx",t.rx).attr("ry",t.ry).attr("x",T).attr("y",x).attr("width",b).attr("height",v);let{subGraphTitleTopMargin:C}=Tl(r);if(g.attr("transform",`translate(${t.x-y.width/2}, ${t.y-t.height/2+C})`),l){let w=g.select("span");w&&w.attr("style",l)}let E=k.node().getBBox();return t.offsetX=0,t.width=E.width,t.height=E.height,t.offsetY=y.height-t.padding/2,t.intersect=function(w){return zp(t,w)},{cluster:p,labelBBox:y}},"rect"),LOe=o((e,t)=>{let r=e.insert("g").attr("class","note-cluster").attr("id",t.domId),i=r.insert("rect",":first-child"),n=0*t.padding,a=n/2;i.attr("rx",t.rx).attr("ry",t.ry).attr("x",t.x-t.width/2-a).attr("y",t.y-t.height/2-a).attr("width",t.width+n).attr("height",t.height+n).attr("fill","none");let s=i.node().getBBox();return t.width=s.width,t.height=s.height,t.intersect=function(l){return zp(t,l)},{cluster:r,labelBBox:{width:0,height:0}}},"noteGroup"),$Oe=o(async(e,t)=>{let r=De(),{themeVariables:i,handDrawnSeed:n}=r,{altBackground:a,compositeBackground:s,compositeTitleBackground:l,nodeBorder:h}=i,u=e.insert("g").attr("class",t.cssClasses).attr("id",t.domId).attr("data-id",t.id).attr("data-look",t.look),d=u.insert("g",":first-child"),p=u.insert("g").attr("class","cluster-label"),f=u.append("rect"),g=await kh(p,t.label,t.labelStyle,void 0,!0),m=g.getBBox();if(Qr(r)){let L=g.children[0],N=tt(g);m=L.getBoundingClientRect(),N.attr("width",m.width),N.attr("height",m.height)}let y=0*t.padding,b=y/2,v=(t.width<=m.width+t.padding?m.width+t.padding:t.width)+y;t.width<=m.width+t.padding?t.diff=(v-t.width)/2-t.padding:t.diff=-t.padding;let T=t.height+y,x=t.height+y-m.height-6,k=t.x-v/2,C=t.y-T/2;t.width=v;let E=t.y-t.height/2-b+m.height+2,w;if(t.look==="handDrawn"){let L=t.cssClasses.includes("statediagram-cluster-alt"),N=Bt.svg(u),D=t.rx||t.ry?N.path(Uu(k,C,v,T,10),{roughness:.7,fill:l,fillStyle:"solid",stroke:h,seed:n}):N.rectangle(k,C,v,T,{seed:n});w=u.insert(()=>D,":first-child");let M=N.rectangle(k,E,v,x,{fill:L?a:s,fillStyle:L?"hachure":"solid",stroke:h,seed:n});w=u.insert(()=>D,":first-child"),f=u.insert(()=>M)}else w=d.insert("rect",":first-child"),w.attr("class","outer").attr("x",k).attr("y",C).attr("width",v).attr("height",T).attr("data-look",t.look),f.attr("class","inner").attr("x",k).attr("y",E).attr("width",v).attr("height",x);p.attr("transform",`translate(${t.x-m.width/2}, ${C+1-(Qr(r)?0:3)})`);let _=w.node().getBBox();return t.height=_.height,t.offsetX=0,t.offsetY=m.height-t.padding/2,t.labelBBox=m,t.intersect=function(L){return zp(t,L)},{cluster:u,labelBBox:m}},"roundedWithTitle"),IOe=o(async(e,t)=>{ee.info("Creating subgraph rect for ",t.id,t);let r=De(),{themeVariables:i,handDrawnSeed:n}=r,{clusterBkg:a,clusterBorder:s}=i,{labelStyles:l,nodeStyles:h,borderStyles:u,backgroundStyles:d}=Pt(t),p=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.domId).attr("data-look",t.look),f=Qr(r),g=p.insert("g").attr("class","cluster-label "),m=await Rn(g,t.label,{style:t.labelStyle,useHtmlLabels:f,isNode:!0,width:t.width}),y=m.getBBox();if(Qr(r)){let w=m.children[0],_=tt(m);y=w.getBoundingClientRect(),_.attr("width",y.width),_.attr("height",y.height)}let b=t.width<=y.width+t.padding?y.width+t.padding:t.width;t.width<=y.width+t.padding?t.diff=(b-t.width)/2-t.padding:t.diff=-t.padding;let v=t.height,T=t.x-b/2,x=t.y-v/2;ee.trace("Data ",t,JSON.stringify(t));let k;if(t.look==="handDrawn"){let w=Bt.svg(p),_=qt(t,{roughness:.7,fill:a,stroke:s,fillWeight:4,seed:n}),L=w.path(Uu(T,x,b,v,t.rx),_);k=p.insert(()=>(ee.debug("Rough node insert CXC",L),L),":first-child"),k.select("path:nth-child(2)").attr("style",u.join(";")),k.select("path").attr("style",d.join(";").replace("fill","stroke"))}else k=p.insert("rect",":first-child"),k.attr("style",h).attr("rx",t.rx).attr("ry",t.ry).attr("x",T).attr("y",x).attr("width",b).attr("height",v);let{subGraphTitleTopMargin:C}=Tl(r);if(g.attr("transform",`translate(${t.x-y.width/2}, ${t.y-t.height/2+C})`),l){let w=g.select("span");w&&w.attr("style",l)}let E=k.node().getBBox();return t.offsetX=0,t.width=E.width,t.height=E.height,t.offsetY=y.height-t.padding/2,t.intersect=function(w){return zp(t,w)},{cluster:p,labelBBox:y}},"kanbanSection"),DOe=o((e,t)=>{let r=De(),{themeVariables:i,handDrawnSeed:n}=r,{nodeBorder:a}=i,s=e.insert("g").attr("class",t.cssClasses).attr("id",t.domId).attr("data-look",t.look),l=s.insert("g",":first-child"),h=0*t.padding,u=t.width+h;t.diff=-t.padding;let d=t.height+h,p=t.x-u/2,f=t.y-d/2;t.width=u;let g;if(t.look==="handDrawn"){let y=Bt.svg(s).rectangle(p,f,u,d,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:a,seed:n});g=s.insert(()=>y,":first-child")}else{g=l.insert("rect",":first-child");let y="outer";t.look,y="divider",g.attr("class",y).attr("x",p).attr("y",f).attr("width",u).attr("height",d).attr("data-look",t.look)}let m=g.node().getBBox();return t.height=m.height,t.offsetX=0,t.offsetY=0,t.intersect=function(y){return zp(t,y)},{cluster:s,labelBBox:{}}},"divider"),MOe=Vle,NOe={rect:Vle,squareRect:MOe,roundedWithTitle:$Oe,noteGroup:LOe,divider:DOe,kanbanSection:IOe,swimlane:ROe},Yle=new Map,Vu=o(async(e,t)=>{let r=t.shape||"rect",i=await NOe[r](e,t);return Yle.set(t.id,i),i},"insertCluster"),D3=o(()=>{Yle=new Map},"clear");o(Hle,"intersectNode");OOe=Hle;o(Xle,"intersectEllipse");Kle=Xle;o(Zle,"intersectCircle");BOe=Zle;o(Qle,"intersectLine");o(w$,"sameSign");POe=Qle;o(Jle,"intersectPolygon");FOe=Jle,Ft={node:OOe,circle:BOe,ellipse:Kle,polygon:FOe,rect:zp};o(ece,"anchor");o(E$,"generateArcPoints");o(tce,"calculateArcSagitta");o(rce,"bowTieRect");o(Ch,"insertPolygonShape");I3=12;o(ice,"card");o(nce,"choice");o(S$,"circle");o(ace,"createLine");o(sce,"crossedCircle");o(xh,"generateCirclePoints");o(oce,"curlyBraceLeft");o(Th,"generateCirclePoints");o(lce,"curlyBraceRight");o(ca,"generateCirclePoints");o(cce,"curlyBraces");o(hce,"curvedTrapezoid");zOe=o((e,t,r,i,n,a)=>[`M${e},${t+a}`,`a${n},${a} 0,0,0 ${r},0`,`a${n},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${n},${a} 0,0,0 ${r},0`,`l0,${-i}`].join(" "),"createCylinderPathD"),qOe=o((e,t,r,i,n,a)=>[`M${e},${t+a}`,`M${e+r},${t+a}`,`a${n},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${n},${a} 0,0,0 ${r},0`,`l0,${-i}`].join(" "),"createOuterCylinderPathD"),jOe=o((e,t,r,i,n,a)=>[`M${e-r/2},${-i/2}`,`a${n},${a} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD"),Nle=8,Ole=8;o(uce,"cylinder");o(B0,"drawRect");o(dce,"datastore");o(pce,"dividedRectangle");o(fce,"doublecircle");o(gce,"filledCircle");Ble=10,Ple=10;o(mce,"flippedTriangle");o(yce,"forkJoin");o(vce,"halfRoundedRectangle");GOe=o((e,t,r,i,n)=>[`M${e+n},${t}`,`L${e+r-n},${t}`,`L${e+r},${t-i/2}`,`L${e+r-n},${t-i}`,`L${e+n},${t-i}`,`L${e},${t-i/2}`,"Z"].join(" "),"createHexagonPathD");o(bce,"hexagon");o(xce,"hourglass");o(Tce,"icon");o(kce,"iconCircle");o(Cce,"iconRounded");o(wce,"iconSquare");o(Ece,"imageSquare");o(Sce,"inv_trapezoid");o(_ce,"labelRect");o(Ace,"lean_left");o(Rce,"lean_right");o(Lce,"lightningBolt");WOe=o((e,t,r,i,n,a,s)=>[`M${e},${t+a}`,`a${n},${a} 0,0,0 ${r},0`,`a${n},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${n},${a} 0,0,0 ${r},0`,`l0,${-i}`,`M${e},${t+a+s}`,`a${n},${a} 0,0,0 ${r},0`].join(" "),"createCylinderPathD"),UOe=o((e,t,r,i,n,a,s)=>[`M${e},${t+a}`,`M${e+r},${t+a}`,`a${n},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${n},${a} 0,0,0 ${r},0`,`l0,${-i}`,`M${e},${t+a+s}`,`a${n},${a} 0,0,0 ${r},0`].join(" "),"createOuterCylinderPathD"),VOe=o((e,t,r,i,n,a)=>[`M${e-r/2},${-i/2}`,`a${n},${a} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD"),Fle=10,zle=10;o($ce,"linedCylinder");o(Ice,"linedWaveEdgedRect");o(Dce,"multiRect");o(Mce,"multiWaveEdgedRectangle");o(Nce,"note");YOe=o((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");o(Oce,"question");o(Bce,"rect_left_inv_arrow");o(Pce,"rectWithTitle");o(Fce,"roundedRect");Fp=8;o(zce,"shadedProcess");o(qce,"slopedRect");o(jce,"squareRect");o(Gce,"stadium");o(Wce,"state");o(Uce,"stateEnd");o(Vce,"stateStart");M0=8;o(Yce,"subroutine");k$=.2;o(Hce,"taggedRect");o(Xce,"taggedWaveEdgedRectangle");o(Kce,"text");HOe=o((e,t,r,i,n,a)=>`M${e},${t} + a${n},${a} 0,0,1 0,${-i} + l${r},0 + a${n},${a} 0,0,1 0,${i} + M${r},${-i} + a${n},${a} 0,0,0 0,${i} + l${-r},0`,"createCylinderPathD"),XOe=o((e,t,r,i,n,a)=>[`M${e},${t}`,`M${e+r},${t}`,`a${n},${a} 0,0,0 0,${-i}`,`l${-r},0`,`a${n},${a} 0,0,0 0,${i}`,`l${r},0`].join(" "),"createOuterCylinderPathD"),KOe=o((e,t,r,i,n,a)=>[`M${e+r/2},${-i/2}`,`a${n},${a} 0,0,0 0,${i}`].join(" "),"createInnerCylinderPathD"),qle=5,jle=10;o(Zce,"tiltedCylinder");o(Qce,"trapezoid");o(Jce,"trapezoidalPentagon");Gle=10,Wle=10;o(ehe,"triangle");o(the,"waveEdgedRectangle");o(rhe,"waveRectangle");nn=10;o(ihe,"windowPane");Ule=new Set(["redux-color","redux-dark-color"]),ZOe=new Set(["redux","redux-dark","redux-color","redux-dark-color"]);o(_$,"erBox");o(N0,"addText");o(O0,"lineToPolygon");o(nhe,"textHelper");o(J2,"addText");o(ahe,"classBox");o(she,"requirementBox");o(fc,"addText");QOe=o(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");o(ohe,"kanbanItem");o(lhe,"bang");o(che,"cloud");o(hhe,"defaultMindmapNode");o(uhe,"mindmapCircle");JOe=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:jce},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:Fce},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:Gce},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:Yce},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:uce},{semanticName:"Data Store",name:"Data Store",shortName:"datastore",description:"Data flow diagram data store",aliases:["data-store"],handler:dce},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:S$},{semanticName:"Bang",name:"Bang",shortName:"bang",description:"Bang",aliases:["bang"],handler:lhe},{semanticName:"Cloud",name:"Cloud",shortName:"cloud",description:"cloud",aliases:["cloud"],handler:che},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:Oce},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:bce},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:Rce},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:Ace},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:Qce},{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:Sce},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:fce},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:Kce},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:ice},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:zce},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:Vce},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:Uce},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:yce},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:xce},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:oce},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:lce},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:cce},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:Lce},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:the},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:vce},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:Zce},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:$ce},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:hce},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:pce},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:ehe},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:ihe},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:gce},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:Jce},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:mce},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:qce},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:Mce},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:Dce},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:rce},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:sce},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:Xce},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:Hce},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:rhe},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:Bce},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:Ice}],eBe=o(()=>{let e=[...Object.entries({state:Wce,choice:nce,note:Nce,rectWithTitle:Pce,labelRect:_ce,iconSquare:wce,iconCircle:kce,icon:Tce,iconRounded:Cce,imageSquare:Ece,anchor:ece,kanbanItem:ohe,mindmapCircle:uhe,defaultMindmapNode:hhe,classBox:ahe,erBox:_$,requirementBox:she}),...JOe.flatMap(t=>[t.shortName,..."aliases"in t?t.aliases:[],..."internalAliases"in t?t.internalAliases:[]].map(r=>[r,t.handler]))];return Object.fromEntries(e)},"generateShapeMap"),dhe=eBe();o(A$,"isValidShape");M3=new Map;o(wh,"insertNode");phe=o((e,t)=>{M3.set(t.id,e)},"setNodeElem"),N3=o(()=>{M3.clear()},"clear"),qp=o(e=>{let t=M3.get(e.id);ee.trace("Transforming node",e.diff,e,"translate("+(e.x-e.width/2-5)+", "+e.width/2+")");let r=8,i=e.diff||0;return e.clusterNode?t.attr("transform","translate("+(e.x+i-e.width/2)+", "+(e.y-e.height/2-r)+")"):t.attr("transform","translate("+e.x+", "+e.y+")"),i},"positionNode")});function tv(e,t){if(e===void 0||t===void 0)return{angle:0,deltaX:0,deltaY:0};e=Wi(e),t=Wi(t);let[r,i]=[e.x,e.y],[n,a]=[t.x,t.y],s=n-r,l=a-i;return{angle:Math.atan(l/s),deltaX:s,deltaY:l}}var Oo,Ln,R$,Wi,O3,ds=Tt(()=>{vt();Oo=o((e,t)=>{if(t)return"translate("+-e.width/2+", "+-e.height/2+")";let r=e.x??0,i=e.y??0;return"translate("+-(r+e.width/2)+", "+-(i+e.height/2)+")"},"computeLabelTransform"),Ln={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},R$={arrow_point:4,arrow_cross:12.5,arrow_circle:12.5};o(tv,"calculateDeltaAndAngle");Wi=o(e=>Array.isArray(e)?{x:e[0],y:e[1]}:e,"pointTransformer"),O3=o(e=>({x:o(function(t,r,i){let n=0,a=Wi(i[0]).x=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(Ln,e.arrowTypeEnd)){let{angle:g,deltaX:m}=tv(i[i.length-1],i[i.length-2]);n=Ln[e.arrowTypeEnd]*Math.cos(g)*(m>=0?1:-1)}let s=Math.abs(Wi(t).x-Wi(i[i.length-1]).x),l=Math.abs(Wi(t).y-Wi(i[i.length-1]).y),h=Math.abs(Wi(t).x-Wi(i[0]).x),u=Math.abs(Wi(t).y-Wi(i[0]).y),d=Ln[e.arrowTypeStart],p=Ln[e.arrowTypeEnd],f=1;if(s0&&l0&&u=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(Ln,e.arrowTypeEnd)){let{angle:g,deltaY:m}=tv(i[i.length-1],i[i.length-2]);n=Ln[e.arrowTypeEnd]*Math.abs(Math.sin(g))*(m>=0?1:-1)}let s=Math.abs(Wi(t).y-Wi(i[i.length-1]).y),l=Math.abs(Wi(t).x-Wi(i[i.length-1]).x),h=Math.abs(Wi(t).y-Wi(i[0]).y),u=Math.abs(Wi(t).x-Wi(i[0]).x),d=Ln[e.arrowTypeStart],p=Ln[e.arrowTypeEnd],f=1;if(s0&&l0&&u5&&Math.abs(a.y-n.y)>5||n.y===a.y&&a.x===s.x&&Math.abs(a.x-n.x)>5&&Math.abs(a.y-s.y)>5)&&(t.push(a),r.push(i))}return{cornerPoints:t,cornerPointPositions:r}}function vhe(e,t){if(e.length<2)return"";let r="",i=e.length,n=1e-5;for(let a=0;a({...n}));if(e.length>=2&&Ln[t.arrowTypeStart]){let n=Ln[t.arrowTypeStart],a=e[0],s=e[1],{angle:l}=L$(a,s),h=n*Math.cos(l),u=n*Math.sin(l);r[0].x=a.x+h,r[0].y=a.y+u}let i=e.length;if(i>=2&&Ln[t.arrowTypeEnd]){let n=Ln[t.arrowTypeEnd],a=e[i-1],s=e[i-2],{angle:l}=L$(s,a),h=n*Math.cos(l),u=n*Math.sin(l);r[i-1].x=a.x-h,r[i-1].y=a.y-u}return r}var tBe,rBe,iBe,fhe,nBe,P0,an,B3,rv,jp,P3,aBe,sBe,oBe,ghe,mhe,lBe,cBe,F0,hBe,uBe,dBe,pBe,fBe,gBe,mBe,yBe,vBe,bBe,xBe,TBe,kBe,CBe,wBe,EBe,SBe,_Be,ABe,RBe,LBe,$Be,IBe,DBe,z0,Bs=Tt(()=>{ha();Zn();sa();ds();la();Fn();Or();tr();Zt();vt();tBe=o((e,t,r,i,n,a=!1,s)=>{t.arrowTypeStart&&fhe(e,"start",t.arrowTypeStart,r,i,n,a,s),t.arrowTypeEnd&&fhe(e,"end",t.arrowTypeEnd,r,i,n,a,s)},"addEdgeMarkers"),rBe={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}},iBe=["cross","point","circle","lollipop","aggregation","extension","composition","dependency","barb"],fhe=o((e,t,r,i,n,a,s=!1,l)=>{let h=rBe[r],u=h&&iBe.includes(h.type);if(!h){ee.warn(`Unknown arrow type: ${r}`);return}let d=h.type,p=`${n}_${a}-${d}${t==="start"?"Start":"End"}${s&&u?"-margin":""}`;if(l&&l.trim()!==""){let f=l.replace(/[^\dA-Za-z]/g,"_"),g=`${p}_${f}`;if(!document.getElementById(g)){let m=document.getElementById(p);if(m){let y=m.cloneNode(!0);y.id=g,y.querySelectorAll("path, circle, line").forEach(b=>{b.setAttribute("stroke",l),h.fill&&b.setAttribute("fill",l)}),m.parentNode?.appendChild(y)}}e.attr(`marker-${t}`,`url(${i}#${g})`)}else e.attr(`marker-${t}`,`url(${i}#${p})`)},"addEdgeMarker"),nBe=o(e=>typeof e=="string"?e:De()?.flowchart?.curve,"resolveEdgeCurveType"),P0=new Map,an=new Map,B3=o(()=>{P0.clear(),an.clear()},"clear"),rv=o(e=>e?typeof e=="string"?e:e.reduce((t,r)=>t+";"+r,""):"","getLabelStyles"),jp=o(async(e,t)=>{let r=De(),i=Qr(r),{labelStyles:n}=Pt(t);t.labelStyle=n;let a=e.insert("g").attr("class","edgeLabel"),s=a.insert("g").attr("class","label").attr("data-id",t.id),l=t.labelType==="markdown",h=await Rn(e,t.label,{style:rv(t.labelStyle),useHtmlLabels:i,addSvgBackground:!0,isNode:!1,markdown:l,width:void 0},r);s.node().appendChild(h),ee.info("abc82",t,t.labelType);let u=h.getBBox(),d=u;if(i){let f=h.children[0],g=tt(h);u=f.getBoundingClientRect(),d=u,g.attr("width",u.width),g.attr("height",u.height)}else{let f=tt(h).select("text").node();f&&typeof f.getBBox=="function"&&(d=f.getBBox())}s.attr("transform",Oo(d,i)),P0.set(t.id,a),t.width=u.width,t.height=u.height;let p;if(t.startLabelLeft){let f=e.insert("g").attr("class","edgeTerminals"),g=f.insert("g").attr("class","inner"),m=await kh(g,t.startLabelLeft,rv(t.labelStyle)||"",!1,!1);p=m;let y=m.getBBox();if(i){let b=m.children[0],v=tt(m);y=b.getBoundingClientRect(),v.attr("width",y.width),v.attr("height",y.height)}g.attr("transform",Oo(y,i)),an.get(t.id)||an.set(t.id,{}),an.get(t.id).startLeft=f,iv(p,t.startLabelLeft)}if(t.startLabelRight){let f=e.insert("g").attr("class","edgeTerminals"),g=f.insert("g").attr("class","inner"),m=await kh(g,t.startLabelRight,rv(t.labelStyle)||"",!1,!1);p=m;let y=m.getBBox();if(i){let b=m.children[0],v=tt(m);y=b.getBoundingClientRect(),v.attr("width",y.width),v.attr("height",y.height)}g.attr("transform",Oo(y,i)),an.get(t.id)||an.set(t.id,{}),an.get(t.id).startRight=f,iv(p,t.startLabelRight)}if(t.endLabelLeft){let f=e.insert("g").attr("class","edgeTerminals"),g=f.insert("g").attr("class","inner"),m=await kh(f,t.endLabelLeft,rv(t.labelStyle)||"",!1,!1);p=m;let y=m.getBBox();if(i){let b=m.children[0],v=tt(m);y=b.getBoundingClientRect(),v.attr("width",y.width),v.attr("height",y.height)}g.attr("transform",Oo(y,i)),an.get(t.id)||an.set(t.id,{}),an.get(t.id).endLeft=f,iv(p,t.endLabelLeft)}if(t.endLabelRight){let f=e.insert("g").attr("class","edgeTerminals"),g=f.insert("g").attr("class","inner"),m=await kh(f,t.endLabelRight,rv(t.labelStyle)||"",!1,!1);p=m;let y=m.getBBox();if(i){let b=m.children[0],v=tt(m);y=b.getBoundingClientRect(),v.attr("width",y.width),v.attr("height",y.height)}g.attr("transform",Oo(y,i)),an.get(t.id)||an.set(t.id,{}),an.get(t.id).endRight=f,iv(p,t.endLabelRight)}return h},"insertEdgeLabel");o(iv,"setTerminalWidth");P3=o((e,t)=>{ee.debug("Moving label abc88 ",e.id,e.label,P0.get(e.id),t);let r=t.updatedPath?t.updatedPath:t.originalPath,i=De(),{subGraphTitleTotalMargin:n}=Tl(i);if(e.label){let a=P0.get(e.id),s=e.x,l=e.y;if(r){let h=Wt.calcLabelPosition(r);ee.debug("Moving label "+e.label+" from (",s,",",l,") to (",h.x,",",h.y,") abc88"),t.updatedPath&&(s=h.x,l=h.y)}a.attr("transform",`translate(${s}, ${l+n/2})`)}if(e.startLabelLeft){let a=an.get(e.id).startLeft,s=e.x,l=e.y;if(r){let h=Wt.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_left",r);s=h.x,l=h.y}a.attr("transform",`translate(${s}, ${l})`)}if(e.startLabelRight){let a=an.get(e.id).startRight,s=e.x,l=e.y;if(r){let h=Wt.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_right",r);s=h.x,l=h.y}a.attr("transform",`translate(${s}, ${l})`)}if(e.endLabelLeft){let a=an.get(e.id).endLeft,s=e.x,l=e.y;if(r){let h=Wt.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_left",r);s=h.x,l=h.y}a.attr("transform",`translate(${s}, ${l})`)}if(e.endLabelRight){let a=an.get(e.id).endRight,s=e.x,l=e.y;if(r){let h=Wt.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_right",r);s=h.x,l=h.y}a.attr("transform",`translate(${s}, ${l})`)}},"positionEdgeLabel"),aBe=o((e,t)=>{if(!e?.isLabelEdge||!e?.id?.endsWith("-to-label")||!Array.isArray(t)||t.length!==2)return t;let[r,i]=t,n=Math.abs(i.x-r.x),a=Math.abs(i.y-r.y);return n<.001||a<.001?t:a>=n?[r,{x:r.x,y:i.y},i]:[r,{x:i.x,y:r.y},i]},"orthogonalizeToLabelClippedPoints"),sBe=o((e,t)=>{let r=e.x,i=e.y,n=Math.abs(t.x-r),a=Math.abs(t.y-i),s=e.width/2,l=e.height/2;return n>=s||a>=l},"outsideNode"),oBe=o((e,t,r)=>{ee.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 i=e.x,n=e.y,a=Math.abs(i-r.x),s=e.width/2,l=r.xMath.abs(i-t.x)*h){let p=r.y{ee.warn("abc88 cutPathAtIntersect",e,t);let r=[],i=e[0],n=!1;return e.forEach(a=>{if(ee.info("abc88 checking point",a,t),!sBe(t,a)&&!n){let s=oBe(t,i,a);ee.debug("abc88 inside",a,i,s),ee.debug("abc88 intersection",s,t);let l=!1;r.forEach(h=>{l=l||h.x===s.x&&h.y===s.y}),r.some(h=>h.x===s.x&&h.y===s.y)?ee.warn("abc88 no intersect",s,r):r.push(s),n=!0}else ee.warn("abc88 outside",a,i),i=a,n||r.push(a)}),ee.debug("returning points",r),r},"cutPathAtIntersect");o(yhe,"extractCornerPoints");mhe=o(function(e,t,r){let i=t.x-e.x,n=t.y-e.y,a=Math.sqrt(i*i+n*n),s=r/a;return{x:t.x-s*i,y:t.y-s*n}},"findAdjacentPoint"),lBe=o(function(e){let{cornerPointPositions:t}=yhe(e),r=[];for(let i=0;i10&&Math.abs(a.y-n.y)>=10){ee.debug("Corner point fixing",Math.abs(a.x-n.x),Math.abs(a.y-n.y));let g=5;s.x===l.x?f={x:u<0?l.x-g+p:l.x+g-p,y:d<0?l.y-p:l.y+p}:f={x:u<0?l.x-p:l.x+p,y:d<0?l.y-g+p:l.y+g-p}}else ee.debug("Corner point skipping fixing",Math.abs(a.x-n.x),Math.abs(a.y-n.y));r.push(f,h)}else r.push(e[i]);return r},"fixCorners"),cBe=o((e,t,r)=>{let i=e-t-r,n=2,a=2,s=n+a,l=Math.floor(i/s),h=Array(l).fill(`${n} ${a}`).join(" ");return`0 ${t} ${h} ${r}`},"generateDashArray"),F0=o(function(e,t,r,i,n,a,s,l=!1){if(!s)throw new Error(`insertEdge: missing diagramId for edge "${t.id}" \u2014 edge IDs require a diagram prefix for uniqueness`);let{handDrawnSeed:h,layout:u}=De(),d=t.points,p=!1,f=n;var g=a;let m=[];for(let $ in t.cssCompiledStyles)G2($)||m.push(t.cssCompiledStyles[$]);if(u==="swimlane"){if(g.intersect&&f.intersect&&Array.isArray(d)&&d.length>=2)if(d.length===2)d=[f.intersect(d[0]),g.intersect(d[1])];else{let $=d.slice(1,-1),F=$[0],P=$[$.length-1],z=.5,q=Math.abs(d[d.length-1].x-P.x)!Number.isNaN($.y)),v=nBe(t.curve);v!=="rounded"&&(b=lBe(b));let T=Au;switch(v){case"linear":T=Au;break;case"basis":T=tc;break;case"cardinal":T=L4;break;case"bumpX":T=Xy;break;case"bumpY":T=Ky;break;case"catmullRom":T=M4;break;case"monotoneX":T=Qy;break;case"monotoneY":T=Jy;break;case"natural":T=e2;break;case"step":T=r2;break;case"stepAfter":T=n2;break;case"stepBefore":T=i2;break;case"rounded":T=Au;break;default:T=tc}let{x,y:k}=O3(t),C=ec().x(x).y(k).curve(T),E;switch(t.thickness){case"normal":E="edge-thickness-normal";break;case"thick":E="edge-thickness-thick";break;case"invisible":E="edge-thickness-invisible";break;default:E="edge-thickness-normal"}switch(t.pattern){case"solid":E+=" edge-pattern-solid";break;case"dotted":E+=" edge-pattern-dotted";break;case"dashed":E+=" edge-pattern-dashed";break;default:E+=" edge-pattern-solid"}let w,_=v==="rounded"?vhe(bhe(b,t),5):C(b),L=Array.isArray(t.style)?t.style:[t.style],N=L.find($=>$?.startsWith("stroke:")),D="";t.animate&&(D="edge-animation-fast"),t.animation&&(D="edge-animation-"+t.animation);let M=!1;if(t.look==="handDrawn"){let $=Bt.svg(e);Object.assign([],b);let F=$.path(_,{roughness:.3,seed:h});E+=" transition",w=tt(F).select("path").attr("id",`${s}-${t.id}`).attr("class"," "+E+(t.classes?" "+t.classes:"")+(D?" "+D:"")).attr("style",L?L.reduce((z,q)=>z+";"+q,""):"");let P=w.attr("d");w.attr("d",P),e.node().appendChild(w.node())}else{let $=m.join(";"),F=L?L.reduce((J,H)=>J+H+";",""):"",P=($?$+";"+F+";":F)+";"+(L?L.reduce((J,H)=>J+";"+H,""):"");w=e.append("path").attr("d",_).attr("id",`${s}-${t.id}`).attr("class"," "+E+(t.classes?" "+t.classes:"")+(D?" "+D:"")).attr("style",P),N=P.match(/stroke:([^;]+)/)?.[1],M=t.animate===!0||!!t.animation||$.includes("animation");let z=w.node(),q=typeof z.getTotalLength=="function"?z.getTotalLength():0,G=R$[t.arrowTypeStart]||0,W=R$[t.arrowTypeEnd]||0;if(t.look==="neo"&&!M){let J=`stroke-dasharray: ${t.pattern==="dotted"||t.pattern==="dashed"?cBe(q,G,W):`0 ${G} ${q-G-W} ${W}`}; stroke-dashoffset: 0;`;w.attr("style",J+w.attr("style"))}}w.attr("data-edge",!0),w.attr("data-et","edge"),w.attr("data-id",t.id),w.attr("data-points",y),w.attr("data-look",_n(t.look)),t.showPoints&&b.forEach($=>{e.append("circle").style("stroke","red").style("fill","red").attr("r",1).attr("cx",$.x).attr("cy",$.y)});let B="";(De().flowchart.arrowMarkerAbsolute||De().state.arrowMarkerAbsolute)&&(B=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,B=B.replace(/\(/g,"\\(").replace(/\)/g,"\\)")),ee.info("arrowTypeStart",t.arrowTypeStart),ee.info("arrowTypeEnd",t.arrowTypeEnd);let A=!M&&t?.look==="neo";tBe(w,t,B,s,i,A,N);let I=Math.floor(d.length/2),O=d[I];Wt.isLabelCoordinateInPath(O,w.attr("d"))||(p=!0);let R={};return p&&(R.updatedPath=d),R.originalPath=t.points,R},"insertEdge");o(vhe,"generateRoundedPath");o(L$,"calculateDeltaAndAngle");o(bhe,"applyMarkerOffsetsToPoints");hBe=o((e,t,r,i)=>{t.forEach(n=>{DBe[n](e,r,i)})},"insertMarkers"),uBe=o((e,t,r)=>{ee.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"),dBe=o((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"),pBe=o((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"),fBe=o((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"),gBe=o((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"),mBe=o((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"),yBe=o((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"),vBe=o((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"),bBe=o((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"),xBe=o((e,t,r)=>{let i=Rt(),{themeVariables:n}=i,{transitionColor:a}=n;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"),TBe=o((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"),kBe=o((e,t,r)=>{let i=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneStart").attr("class","marker zeroOrOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");i.append("circle").attr("fill","white").attr("cx",21).attr("cy",9).attr("r",6),i.append("path").attr("d","M9,0 L9,18");let n=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+t).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");n.append("circle").attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),n.append("path").attr("d","M21,0 L21,18")},"zero_or_one"),CBe=o((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"),wBe=o((e,t,r)=>{let i=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");i.append("circle").attr("fill","white").attr("cx",48).attr("cy",18).attr("r",6),i.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18");let n=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+t).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");n.append("circle").attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),n.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")},"zero_or_more"),EBe=o((e,t,r)=>{let i=Rt(),{themeVariables:n}=i,{strokeWidth:a}=n;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"),SBe=o((e,t,r)=>{let i=Rt(),{themeVariables:n}=i,{strokeWidth:a,mainBkg:s}=n,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",s??"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 h=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");h.append("circle").attr("fill",s??"white").attr("cx",9).attr("cy",9).attr("stroke-width",`${a}`).attr("r",6),h.append("path").attr("d","M21,0 L21,18").attr("stroke-width",`${a}`)},"zero_or_one_neo"),_Be=o((e,t,r)=>{let i=Rt(),{themeVariables:n}=i,{strokeWidth:a}=n;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"),ABe=o((e,t,r)=>{let i=Rt(),{themeVariables:n}=i,{strokeWidth:a,mainBkg:s}=n,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",s??"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 h=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");h.append("circle").attr("fill",s??"white").attr("cx",11).attr("cy",18).attr("r",6).attr("stroke-width",`${a}`),h.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18").attr("stroke-width",`${a}`)},"zero_or_more_neo"),RBe=o((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"),LBe=o((e,t,r)=>{let i=Rt(),{themeVariables:n}=i,{strokeWidth:a}=n;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"),$Be=o((e,t,r)=>{let i=e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("g");i.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),i.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),i.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10)},"requirement_contains"),IBe=o((e,t,r)=>{let i=Rt(),{themeVariables:n}=i,{strokeWidth:a}=n,s=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");s.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),s.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),s.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10),s.selectAll("*").attr("stroke-width",`${a}`)},"requirement_contains_neo"),DBe={extension:uBe,composition:dBe,aggregation:pBe,dependency:fBe,lollipop:gBe,point:mBe,circle:yBe,cross:vBe,barb:bBe,barbNeo:xBe,only_one:TBe,zero_or_one:kBe,one_or_more:CBe,zero_or_more:wBe,only_one_neo:EBe,zero_or_one_neo:SBe,one_or_more_neo:_Be,zero_or_more_neo:ABe,requirement_arrow:RBe,requirement_contains:$Be,requirement_arrow_neo:LBe,requirement_contains_neo:IBe},z0=hBe});function rue(e){var t=PBe.call(e,nv),r=e[nv];try{e[nv]=void 0;var i=!0}catch{}var n=FBe.call(e);return i&&(t?e[nv]=r:delete e[nv]),n}function iue(e){return jBe.call(e)}function nue(e){return e==null?e===void 0?UBe:WBe:xhe&&xhe in Object(e)?zBe(e):GBe(e)}function aue(e){return e!=null&&typeof e=="object"}function sue(e){return typeof e=="symbol"||Cl(e)&&Yu(e)==VBe}function oue(e,t){for(var r=-1,i=e==null?0:e.length,n=Array(i);++r0){if(++t>=RPe)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function Sue(e){return function(){return e}}function Aue(e,t){for(var r=-1,i=e==null?0:e.length;++r-1}function Oue(e,t){var r=typeof e;return t=t??qPe,!!t&&(r=="number"||r!="symbol"&&jPe.test(e))&&e>-1&&e%1==0&&e-1&&e%1==0&&e<=UPe}function Uue(e){return e!=null&&U$(e.length)&&!ov(e)}function Vue(e,t,r){if(!co(r))return!1;var i=typeof t;return(i=="number"?Sh(r)&&W3(t,r.length):i=="string"&&t in r)?H0(r[t],e):!1}function Yue(e){return Y3(function(t,r){var i=-1,n=r.length,a=n>1?r[n-1]:void 0,s=n>2?r[2]:void 0;for(a=e.length>3&&typeof a=="function"?(n--,a):void 0,s&&lv(r[0],r[1],s)&&(a=n<3?void 0:a,n=1),t=Object(t);++i-1}function Cde(e,t){var r=this.__data__,i=Z3(r,e);return i<0?(++this.size,r.push([e,t])):r[i][1]=t,this}function Qp(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t0&&r(l)?t>1?X$(l,t-1,r,i,n):H$(n,l):i||(n[n.length]=l)}return n}function zde(e){var t=e==null?0:e.length;return t?K$(e,1):[]}function qde(e){return _ue(jue(e,void 0,ef),e+"")}function Gde(e){if(!Cl(e)||Yu(e)!=Aze)return!1;var t=Z$(e);if(t===null)return!0;var r=$ze.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&jde.call(r)==Ize}function Wde(e){return qze.test(e)}function Ude(e,t,r,i){var n=-1,a=e==null?0:e.length;for(i&&a&&(r=e[++n]);++nl))return!1;var u=a.get(e),d=a.get(t);if(u&&d)return u==t&&d==e;var p=-1,f=!0,g=r&Ije?new Npe:void 0;for(a.set(e,t),a.set(t,e);++p-1?n[a?t[s]:s]:void 0}}function Rfe(e,t,r){var i=e==null?0:e.length;if(!i)return-1;var n=r==null?0:sPe(r);return n<0&&(n=EGe(i+n,0)),$ue(e,Hu(t,3),n)}function Lfe(e,t){var r=-1,i=Sh(e)?Array(e.length):[];return nC(e,function(n,a,s){i[++r]=t(n,a,s)}),i}function Ife(e,t){var r=sn(e)?j0:$fe;return r(e,Hu(t,3))}function Dfe(e,t){return e==null?e:rI(e,sI(t),Kp)}function Nfe(e,t){return e&&iI(e,sI(t))}function Bfe(e,t){return e>t}function Pfe(e,t){return e!=null&&LGe.call(e,t)}function Ffe(e,t){return e!=null&&rfe(e,t,$Ge)}function zfe(e){return typeof e=="string"||!sn(e)&&Cl(e)&&Yu(e)==IGe}function qfe(e,t){return j0(t,function(r){return e[r]})}function jfe(e){return e==null?[]:MGe(e,lo(e))}function Gfe(e){if(e==null)return!0;if(Sh(e)&&(sn(e)||typeof e=="string"||typeof e.splice=="function"||V0(e)||K3(e)||U0(e)))return!e.length;var t=Vp(e);if(t==NGe||t==OGe)return!e.size;if(H3(e))return!V$(e).length;for(var r in e)if(PGe.call(e,r))return!1;return!0}function Wfe(e){return e===void 0}function Ufe(e,t){return et||a&&s&&h&&!l&&!u||i&&s&&h||!r&&h||!n)return 1;if(!i&&!a&&!u&&e=l)return h;var u=r[i];return h*(u=="desc"?-1:1)}}return e.index-t.index}function ige(e,t,r){t.length?t=j0(t,function(a){return sn(a)?function(s){return iC(s,a.length===1?a[0]:a)}:a}):t=[Yp];var i=-1;t=j0(t,X3(Hu));var n=$fe(e,function(a,s,l){var h=j0(t,function(u){return u(a)});return{criteria:h,index:++i,value:a}});return jGe(n,function(a,s){return WGe(a,s,r)})}function hge(e){for(var t=Qhe.lastIndex=0;Qhe.test(e);)++t;return t}function uge(e){return jze(e)?aWe(e):YGe(e)}function dge(e,t){return qGe(e,t,function(r,i){return nfe(e,i)})}function pge(e,t,r,i){for(var n=-1,a=hWe(cWe((t-e)/(r||1)),0),s=Array(a);a--;)s[i?a:++n]=e,e+=r;return s}function fge(e){return function(t,r,i){return i&&typeof i!="number"&&lv(t,r,i)&&(r=i=void 0),t=z3(t),r===void 0?(r=t,t=0):r=z3(r),i=i===void 0?t=TWe){var u=t?null:xWe(e);if(u)return eI(u);s=!1,n=Ppe,h=new Npe}else h=t?[]:l;e:for(;++ia){var s=n;n=a,a=s}return n+Jhe+a+Jhe+(Zi(i)?_We:i)}function wge(e,t,r,i){var n=""+t,a=""+r;if(!e&&n>a){var s=n;n=a,a=s}var l={v:n,w:a};return i&&(l.name=i),l}function q3(e,t){return q0(e,t.v,t.w,t.name)}var MBe,eue,NBe,OBe,wl,BBe,Bo,tue,PBe,FBe,nv,zBe,qBe,jBe,GBe,WBe,UBe,xhe,Yu,Cl,VBe,Up,j0,YBe,sn,HBe,The,khe,XBe,KBe,ZBe,QBe,JBe,co,Che,ePe,tPe,rPe,iPe,nPe,whe,aPe,z3,sPe,Yp,oPe,lPe,cPe,hPe,ov,uPe,$$,Ehe,dPe,pPe,fPe,Hp,gPe,mPe,yPe,vPe,bPe,xPe,TPe,kPe,CPe,Xp,wPe,M$,She,EPe,SPe,_Pe,APe,wue,RPe,LPe,$Pe,IPe,Eh,DPe,j3,MPe,NPe,OPe,_ue,Rue,$ue,BPe,PPe,FPe,zPe,qPe,jPe,W3,U3,H0,GPe,WPe,V3,dv,_he,jue,Y3,UPe,U$,Sh,lv,VPe,YPe,H3,HPe,XPe,Ahe,Zue,KPe,ZPe,QPe,U0,JPe,Jue,Rhe,eFe,Lhe,tFe,rFe,V0,iFe,nFe,aFe,sFe,oFe,lFe,cFe,hFe,uFe,dFe,pFe,fFe,gFe,mFe,yFe,vFe,bFe,xFe,TFe,kFe,CFe,wFe,EFe,SFe,Oi,_Fe,X3,rde,av,AFe,I$,RFe,Y0,$he,LFe,K3,$Fe,IFe,nde,sde,DFe,MFe,NFe,OFe,V$,lo,BFe,PFe,FFe,zFe,Kp,qFe,jFe,Y$,GFe,cv,WFe,UFe,VFe,YFe,HFe,XFe,KFe,ZFe,QFe,JFe,eze,Ihe,tze,Z3,rze,ize,nze,aze,sze,oze,Q3,lze,hv,cze,hze,J3,uze,dze,pze,fze,eC,gze,mze,yze,vze,bze,xze,Tze,kze,Dde,rC,Cze,pv,iC,wze,H$,Dhe,Eze,K$,ef,Sze,_ze,Z$,Aze,Rze,Lze,jde,$ze,Ize,Dze,Mze,Nze,Oze,Bze,Pze,Fze,zze,qze,jze,Gze,Wze,Uze,Vze,Yze,Hze,Xze,G0,Kze,Zze,Jde,Mhe,Qze,Nhe,Ohe,tpe,ipe,ape,Jze,eqe,Bhe,tqe,Q$,rqe,iqe,nqe,ope,aqe,hpe,N$,sqe,oqe,O$,lqe,B$,cqe,W0,Phe,hqe,Fhe,zhe,qhe,jhe,uqe,dqe,pqe,fqe,gqe,Wp,Vp,mqe,yqe,vqe,bqe,G3,J$,xqe,Tqe,kqe,Ghe,Whe,Cqe,bpe,wqe,Eqe,Sqe,_qe,Aqe,Rqe,Lqe,$qe,Iqe,Dqe,Mqe,Nqe,Oqe,Bqe,Pqe,Fqe,zqe,qqe,jqe,Gqe,kpe,Wqe,Uqe,Uhe,Vqe,Yqe,Hqe,Xqe,Vhe,Kqe,Zqe,Qqe,Jqe,eje,Epe,tje,rje,ije,nje,Spe,aje,sje,oje,_pe,lje,cje,hje,uje,dje,pje,fje,gje,mje,yje,vje,bje,xje,Tje,kje,Cje,Ai,Ape,wje,Lpe,Eje,Sje,Ipe,_je,Aje,Rje,Npe,Lje,Ppe,$je,Ije,zpe,Dje,eI,Mje,Nje,Oje,Bje,Pje,Fje,zje,qje,jje,Gje,Wje,Uje,Vje,Yhe,D$,Yje,Hje,Xje,Kje,Zje,Qje,Hhe,Xhe,F3,Jje,Khe,eGe,Vpe,tGe,rGe,iGe,Xpe,nGe,Qpe,aGe,sGe,rfe,nfe,oGe,lGe,cGe,ofe,hGe,uGe,Hu,dGe,pGe,rI,iI,fGe,gGe,nC,mGe,nI,ffe,yGe,vGe,gfe,P$,vfe,F$,bGe,xGe,TGe,kGe,fv,sI,pt,CGe,gc,wGe,EGe,SGe,_Ge,aC,$fe,on,Mfe,Ofe,AGe,RGe,LGe,$Ge,oI,IGe,DGe,MGe,mc,NGe,OGe,BGe,PGe,Zhe,Zi,Vfe,gv,lI,Xu,FGe,sC,X0,oC,zGe,qGe,jGe,GGe,WGe,UGe,VGe,YGe,nge,HGe,XGe,KGe,ZGe,QGe,JGe,z$,q$,eWe,age,sge,oge,tWe,lge,cge,rWe,iWe,nWe,Qhe,aWe,sWe,oWe,lWe,mv,cWe,hWe,uWe,dWe,pWe,rf,fWe,K0,gWe,mWe,vge,yWe,Z0,vWe,bWe,xWe,TWe,kWe,CWe,wWe,EWe,lC,SWe,Cge,_We,Gp,Jhe,ln,nf=Tt(()=>{vt();MBe=typeof global=="object"&&global&&global.Object===Object&&global,eue=MBe,NBe=typeof self=="object"&&self&&self.Object===Object&&self,OBe=eue||NBe||Function("return this")(),wl=OBe,BBe=wl.Symbol,Bo=BBe,tue=Object.prototype,PBe=tue.hasOwnProperty,FBe=tue.toString,nv=Bo?Bo.toStringTag:void 0;o(rue,"getRawTag");zBe=rue,qBe=Object.prototype,jBe=qBe.toString;o(iue,"objectToString");GBe=iue,WBe="[object Null]",UBe="[object Undefined]",xhe=Bo?Bo.toStringTag:void 0;o(nue,"baseGetTag");Yu=nue;o(aue,"isObjectLike");Cl=aue,VBe="[object Symbol]";o(sue,"isSymbol");Up=sue;o(oue,"arrayMap");j0=oue,YBe=Array.isArray,sn=YBe,HBe=1/0,The=Bo?Bo.prototype:void 0,khe=The?The.toString:void 0;o(W$,"baseToString");XBe=W$,KBe=/\s/;o(lue,"trimmedEndIndex");ZBe=lue,QBe=/^\s+/;o(cue,"baseTrim");JBe=cue;o(hue,"isObject");co=hue,Che=NaN,ePe=/^[-+]0x[0-9a-f]+$/i,tPe=/^0b[01]+$/i,rPe=/^0o[0-7]+$/i,iPe=parseInt;o(uue,"toNumber");nPe=uue,whe=1/0,aPe=17976931348623157e292;o(due,"toFinite");z3=due;o(pue,"toInteger");sPe=pue;o(fue,"identity");Yp=fue,oPe="[object AsyncFunction]",lPe="[object Function]",cPe="[object GeneratorFunction]",hPe="[object Proxy]";o(gue,"isFunction");ov=gue,uPe=wl["__core-js_shared__"],$$=uPe,Ehe=(function(){var e=/[^.]+$/.exec($$&&$$.keys&&$$.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""})();o(mue,"isMasked");dPe=mue,pPe=Function.prototype,fPe=pPe.toString;o(yue,"toSource");Hp=yue,gPe=/[\\^$.*+?()[\]{}|]/g,mPe=/^\[object .+?Constructor\]$/,yPe=Function.prototype,vPe=Object.prototype,bPe=yPe.toString,xPe=vPe.hasOwnProperty,TPe=RegExp("^"+bPe.call(xPe).replace(gPe,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");o(vue,"baseIsNative");kPe=vue;o(bue,"getValue");CPe=bue;o(xue,"getNative");Xp=xue,wPe=Xp(wl,"WeakMap"),M$=wPe,She=Object.create,EPe=(function(){function e(){}return o(e,"object"),function(t){if(!co(t))return{};if(She)return She(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}})(),SPe=EPe;o(Tue,"apply");_Pe=Tue;o(kue,"noop");APe=kue;o(Cue,"copyArray");wue=Cue,RPe=800,LPe=16,$Pe=Date.now;o(Eue,"shortOut");IPe=Eue;o(Sue,"constant");Eh=Sue,DPe=(function(){try{var e=Xp(Object,"defineProperty");return e({},"",{}),e}catch{}})(),j3=DPe,MPe=j3?function(e,t){return j3(e,"toString",{configurable:!0,enumerable:!1,value:Eh(t),writable:!0})}:Yp,NPe=MPe,OPe=IPe(NPe),_ue=OPe;o(Aue,"arrayEach");Rue=Aue;o(Lue,"baseFindIndex");$ue=Lue;o(Iue,"baseIsNaN");BPe=Iue;o(Due,"strictIndexOf");PPe=Due;o(Mue,"baseIndexOf");FPe=Mue;o(Nue,"arrayIncludes");zPe=Nue,qPe=9007199254740991,jPe=/^(?:0|[1-9]\d*)$/;o(Oue,"isIndex");W3=Oue;o(Bue,"baseAssignValue");U3=Bue;o(Pue,"eq");H0=Pue,GPe=Object.prototype,WPe=GPe.hasOwnProperty;o(Fue,"assignValue");V3=Fue;o(zue,"copyObject");dv=zue,_he=Math.max;o(que,"overRest");jue=que;o(Gue,"baseRest");Y3=Gue,UPe=9007199254740991;o(Wue,"isLength");U$=Wue;o(Uue,"isArrayLike");Sh=Uue;o(Vue,"isIterateeCall");lv=Vue;o(Yue,"createAssigner");VPe=Yue,YPe=Object.prototype;o(Hue,"isPrototype");H3=Hue;o(Xue,"baseTimes");HPe=Xue,XPe="[object Arguments]";o(Kue,"baseIsArguments");Ahe=Kue,Zue=Object.prototype,KPe=Zue.hasOwnProperty,ZPe=Zue.propertyIsEnumerable,QPe=Ahe((function(){return arguments})())?Ahe:function(e){return Cl(e)&&KPe.call(e,"callee")&&!ZPe.call(e,"callee")},U0=QPe;o(Que,"stubFalse");JPe=Que,Jue=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Rhe=Jue&&typeof module=="object"&&module&&!module.nodeType&&module,eFe=Rhe&&Rhe.exports===Jue,Lhe=eFe?wl.Buffer:void 0,tFe=Lhe?Lhe.isBuffer:void 0,rFe=tFe||JPe,V0=rFe,iFe="[object Arguments]",nFe="[object Array]",aFe="[object Boolean]",sFe="[object Date]",oFe="[object Error]",lFe="[object Function]",cFe="[object Map]",hFe="[object Number]",uFe="[object Object]",dFe="[object RegExp]",pFe="[object Set]",fFe="[object String]",gFe="[object WeakMap]",mFe="[object ArrayBuffer]",yFe="[object DataView]",vFe="[object Float32Array]",bFe="[object Float64Array]",xFe="[object Int8Array]",TFe="[object Int16Array]",kFe="[object Int32Array]",CFe="[object Uint8Array]",wFe="[object Uint8ClampedArray]",EFe="[object Uint16Array]",SFe="[object Uint32Array]",Oi={};Oi[vFe]=Oi[bFe]=Oi[xFe]=Oi[TFe]=Oi[kFe]=Oi[CFe]=Oi[wFe]=Oi[EFe]=Oi[SFe]=!0;Oi[iFe]=Oi[nFe]=Oi[mFe]=Oi[aFe]=Oi[yFe]=Oi[sFe]=Oi[oFe]=Oi[lFe]=Oi[cFe]=Oi[hFe]=Oi[uFe]=Oi[dFe]=Oi[pFe]=Oi[fFe]=Oi[gFe]=!1;o(ede,"baseIsTypedArray");_Fe=ede;o(tde,"baseUnary");X3=tde,rde=typeof exports=="object"&&exports&&!exports.nodeType&&exports,av=rde&&typeof module=="object"&&module&&!module.nodeType&&module,AFe=av&&av.exports===rde,I$=AFe&&eue.process,RFe=(function(){try{var e=av&&av.require&&av.require("util").types;return e||I$&&I$.binding&&I$.binding("util")}catch{}})(),Y0=RFe,$he=Y0&&Y0.isTypedArray,LFe=$he?X3($he):_Fe,K3=LFe,$Fe=Object.prototype,IFe=$Fe.hasOwnProperty;o(ide,"arrayLikeKeys");nde=ide;o(ade,"overArg");sde=ade,DFe=sde(Object.keys,Object),MFe=DFe,NFe=Object.prototype,OFe=NFe.hasOwnProperty;o(ode,"baseKeys");V$=ode;o(lde,"keys");lo=lde;o(cde,"nativeKeysIn");BFe=cde,PFe=Object.prototype,FFe=PFe.hasOwnProperty;o(hde,"baseKeysIn");zFe=hde;o(ude,"keysIn");Kp=ude,qFe=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,jFe=/^\w*$/;o(dde,"isKey");Y$=dde,GFe=Xp(Object,"create"),cv=GFe;o(pde,"hashClear");WFe=pde;o(fde,"hashDelete");UFe=fde,VFe="__lodash_hash_undefined__",YFe=Object.prototype,HFe=YFe.hasOwnProperty;o(gde,"hashGet");XFe=gde,KFe=Object.prototype,ZFe=KFe.hasOwnProperty;o(mde,"hashHas");QFe=mde,JFe="__lodash_hash_undefined__";o(yde,"hashSet");eze=yde;o(Zp,"Hash");Zp.prototype.clear=WFe;Zp.prototype.delete=UFe;Zp.prototype.get=XFe;Zp.prototype.has=QFe;Zp.prototype.set=eze;Ihe=Zp;o(vde,"listCacheClear");tze=vde;o(bde,"assocIndexOf");Z3=bde,rze=Array.prototype,ize=rze.splice;o(xde,"listCacheDelete");nze=xde;o(Tde,"listCacheGet");aze=Tde;o(kde,"listCacheHas");sze=kde;o(Cde,"listCacheSet");oze=Cde;o(Qp,"ListCache");Qp.prototype.clear=tze;Qp.prototype.delete=nze;Qp.prototype.get=aze;Qp.prototype.has=sze;Qp.prototype.set=oze;Q3=Qp,lze=Xp(wl,"Map"),hv=lze;o(wde,"mapCacheClear");cze=wde;o(Ede,"isKeyable");hze=Ede;o(Sde,"getMapData");J3=Sde;o(_de,"mapCacheDelete");uze=_de;o(Ade,"mapCacheGet");dze=Ade;o(Rde,"mapCacheHas");pze=Rde;o(Lde,"mapCacheSet");fze=Lde;o(Jp,"MapCache");Jp.prototype.clear=cze;Jp.prototype.delete=uze;Jp.prototype.get=dze;Jp.prototype.has=pze;Jp.prototype.set=fze;eC=Jp,gze="Expected a function";o(tC,"memoize");tC.Cache=eC;mze=tC,yze=500;o($de,"memoizeCapped");vze=$de,bze=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,xze=/\\(\\)?/g,Tze=vze(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(bze,function(r,i,n,a){t.push(n?a.replace(xze,"$1"):i||r)}),t}),kze=Tze;o(Ide,"toString");Dde=Ide;o(Mde,"castPath");rC=Mde,Cze=1/0;o(Nde,"toKey");pv=Nde;o(Ode,"baseGet");iC=Ode;o(Bde,"get");wze=Bde;o(Pde,"arrayPush");H$=Pde,Dhe=Bo?Bo.isConcatSpreadable:void 0;o(Fde,"isFlattenable");Eze=Fde;o(X$,"baseFlatten");K$=X$;o(zde,"flatten");ef=zde;o(qde,"flatRest");Sze=qde,_ze=sde(Object.getPrototypeOf,Object),Z$=_ze,Aze="[object Object]",Rze=Function.prototype,Lze=Object.prototype,jde=Rze.toString,$ze=Lze.hasOwnProperty,Ize=jde.call(Object);o(Gde,"isPlainObject");Dze=Gde,Mze="\\ud800-\\udfff",Nze="\\u0300-\\u036f",Oze="\\ufe20-\\ufe2f",Bze="\\u20d0-\\u20ff",Pze=Nze+Oze+Bze,Fze="\\ufe0e\\ufe0f",zze="\\u200d",qze=RegExp("["+zze+Mze+Pze+Fze+"]");o(Wde,"hasUnicode");jze=Wde;o(Ude,"arrayReduce");Gze=Ude;o(Vde,"stackClear");Wze=Vde;o(Yde,"stackDelete");Uze=Yde;o(Hde,"stackGet");Vze=Hde;o(Xde,"stackHas");Yze=Xde,Hze=200;o(Kde,"stackSet");Xze=Kde;o(tf,"Stack");tf.prototype.clear=Wze;tf.prototype.delete=Uze;tf.prototype.get=Vze;tf.prototype.has=Yze;tf.prototype.set=Xze;G0=tf;o(Zde,"baseAssign");Kze=Zde;o(Qde,"baseAssignIn");Zze=Qde,Jde=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Mhe=Jde&&typeof module=="object"&&module&&!module.nodeType&&module,Qze=Mhe&&Mhe.exports===Jde,Nhe=Qze?wl.Buffer:void 0,Ohe=Nhe?Nhe.allocUnsafe:void 0;o(epe,"cloneBuffer");tpe=epe;o(rpe,"arrayFilter");ipe=rpe;o(npe,"stubArray");ape=npe,Jze=Object.prototype,eqe=Jze.propertyIsEnumerable,Bhe=Object.getOwnPropertySymbols,tqe=Bhe?function(e){return e==null?[]:(e=Object(e),ipe(Bhe(e),function(t){return eqe.call(e,t)}))}:ape,Q$=tqe;o(spe,"copySymbols");rqe=spe,iqe=Object.getOwnPropertySymbols,nqe=iqe?function(e){for(var t=[];e;)H$(t,Q$(e)),e=Z$(e);return t}:ape,ope=nqe;o(lpe,"copySymbolsIn");aqe=lpe;o(cpe,"baseGetAllKeys");hpe=cpe;o(upe,"getAllKeys");N$=upe;o(dpe,"getAllKeysIn");sqe=dpe,oqe=Xp(wl,"DataView"),O$=oqe,lqe=Xp(wl,"Promise"),B$=lqe,cqe=Xp(wl,"Set"),W0=cqe,Phe="[object Map]",hqe="[object Object]",Fhe="[object Promise]",zhe="[object Set]",qhe="[object WeakMap]",jhe="[object DataView]",uqe=Hp(O$),dqe=Hp(hv),pqe=Hp(B$),fqe=Hp(W0),gqe=Hp(M$),Wp=Yu;(O$&&Wp(new O$(new ArrayBuffer(1)))!=jhe||hv&&Wp(new hv)!=Phe||B$&&Wp(B$.resolve())!=Fhe||W0&&Wp(new W0)!=zhe||M$&&Wp(new M$)!=qhe)&&(Wp=o(function(e){var t=Yu(e),r=t==hqe?e.constructor:void 0,i=r?Hp(r):"";if(i)switch(i){case uqe:return jhe;case dqe:return Phe;case pqe:return Fhe;case fqe:return zhe;case gqe:return qhe}return t},"getTag"));Vp=Wp,mqe=Object.prototype,yqe=mqe.hasOwnProperty;o(ppe,"initCloneArray");vqe=ppe,bqe=wl.Uint8Array,G3=bqe;o(fpe,"cloneArrayBuffer");J$=fpe;o(gpe,"cloneDataView");xqe=gpe,Tqe=/\w*$/;o(mpe,"cloneRegExp");kqe=mpe,Ghe=Bo?Bo.prototype:void 0,Whe=Ghe?Ghe.valueOf:void 0;o(ype,"cloneSymbol");Cqe=ype;o(vpe,"cloneTypedArray");bpe=vpe,wqe="[object Boolean]",Eqe="[object Date]",Sqe="[object Map]",_qe="[object Number]",Aqe="[object RegExp]",Rqe="[object Set]",Lqe="[object String]",$qe="[object Symbol]",Iqe="[object ArrayBuffer]",Dqe="[object DataView]",Mqe="[object Float32Array]",Nqe="[object Float64Array]",Oqe="[object Int8Array]",Bqe="[object Int16Array]",Pqe="[object Int32Array]",Fqe="[object Uint8Array]",zqe="[object Uint8ClampedArray]",qqe="[object Uint16Array]",jqe="[object Uint32Array]";o(xpe,"initCloneByTag");Gqe=xpe;o(Tpe,"initCloneObject");kpe=Tpe,Wqe="[object Map]";o(Cpe,"baseIsMap");Uqe=Cpe,Uhe=Y0&&Y0.isMap,Vqe=Uhe?X3(Uhe):Uqe,Yqe=Vqe,Hqe="[object Set]";o(wpe,"baseIsSet");Xqe=wpe,Vhe=Y0&&Y0.isSet,Kqe=Vhe?X3(Vhe):Xqe,Zqe=Kqe,Qqe=1,Jqe=2,eje=4,Epe="[object Arguments]",tje="[object Array]",rje="[object Boolean]",ije="[object Date]",nje="[object Error]",Spe="[object Function]",aje="[object GeneratorFunction]",sje="[object Map]",oje="[object Number]",_pe="[object Object]",lje="[object RegExp]",cje="[object Set]",hje="[object String]",uje="[object Symbol]",dje="[object WeakMap]",pje="[object ArrayBuffer]",fje="[object DataView]",gje="[object Float32Array]",mje="[object Float64Array]",yje="[object Int8Array]",vje="[object Int16Array]",bje="[object Int32Array]",xje="[object Uint8Array]",Tje="[object Uint8ClampedArray]",kje="[object Uint16Array]",Cje="[object Uint32Array]",Ai={};Ai[Epe]=Ai[tje]=Ai[pje]=Ai[fje]=Ai[rje]=Ai[ije]=Ai[gje]=Ai[mje]=Ai[yje]=Ai[vje]=Ai[bje]=Ai[sje]=Ai[oje]=Ai[_pe]=Ai[lje]=Ai[cje]=Ai[hje]=Ai[uje]=Ai[xje]=Ai[Tje]=Ai[kje]=Ai[Cje]=!0;Ai[nje]=Ai[Spe]=Ai[dje]=!1;o(sv,"baseClone");Ape=sv,wje=4;o(Rpe,"clone");Lpe=Rpe,Eje=1,Sje=4;o($pe,"cloneDeep");Ipe=$pe,_je="__lodash_hash_undefined__";o(Dpe,"setCacheAdd");Aje=Dpe;o(Mpe,"setCacheHas");Rje=Mpe;o(uv,"SetCache");uv.prototype.add=uv.prototype.push=Aje;uv.prototype.has=Rje;Npe=uv;o(Ope,"arraySome");Lje=Ope;o(Bpe,"cacheHas");Ppe=Bpe,$je=1,Ije=2;o(Fpe,"equalArrays");zpe=Fpe;o(qpe,"mapToArray");Dje=qpe;o(jpe,"setToArray");eI=jpe,Mje=1,Nje=2,Oje="[object Boolean]",Bje="[object Date]",Pje="[object Error]",Fje="[object Map]",zje="[object Number]",qje="[object RegExp]",jje="[object Set]",Gje="[object String]",Wje="[object Symbol]",Uje="[object ArrayBuffer]",Vje="[object DataView]",Yhe=Bo?Bo.prototype:void 0,D$=Yhe?Yhe.valueOf:void 0;o(Gpe,"equalByTag");Yje=Gpe,Hje=1,Xje=Object.prototype,Kje=Xje.hasOwnProperty;o(Wpe,"equalObjects");Zje=Wpe,Qje=1,Hhe="[object Arguments]",Xhe="[object Array]",F3="[object Object]",Jje=Object.prototype,Khe=Jje.hasOwnProperty;o(Upe,"baseIsEqualDeep");eGe=Upe;o(tI,"baseIsEqual");Vpe=tI,tGe=1,rGe=2;o(Ype,"baseIsMatch");iGe=Ype;o(Hpe,"isStrictComparable");Xpe=Hpe;o(Kpe,"getMatchData");nGe=Kpe;o(Zpe,"matchesStrictComparable");Qpe=Zpe;o(Jpe,"baseMatches");aGe=Jpe;o(efe,"baseHasIn");sGe=efe;o(tfe,"hasPath");rfe=tfe;o(ife,"hasIn");nfe=ife,oGe=1,lGe=2;o(afe,"baseMatchesProperty");cGe=afe;o(sfe,"baseProperty");ofe=sfe;o(lfe,"basePropertyDeep");hGe=lfe;o(cfe,"property");uGe=cfe;o(hfe,"baseIteratee");Hu=hfe;o(ufe,"createBaseFor");dGe=ufe,pGe=dGe(),rI=pGe;o(dfe,"baseForOwn");iI=dfe;o(pfe,"createBaseEach");fGe=pfe,gGe=fGe(iI),nC=gGe,mGe=o(function(){return wl.Date.now()},"now"),nI=mGe,ffe=Object.prototype,yGe=ffe.hasOwnProperty,vGe=Y3(function(e,t){e=Object(e);var r=-1,i=t.length,n=i>2?t[2]:void 0;for(n&&lv(t[0],t[1],n)&&(i=1);++r1&&lv(e,t[0],t[1])?t=[]:r>2&&lv(t[0],t[1],t[2])&&(t=[t[0]]),UGe(e,K$(t,1),[])}),Z0=yWe,vWe=1/0,bWe=W0&&1/eI(new W0([,-0]))[1]==vWe?function(e){return new W0(e)}:APe,xWe=bWe,TWe=200;o(bge,"baseUniq");kWe=bge,CWe=Y3(function(e){return kWe(K$(e,1,vfe,!0))}),wWe=CWe,EWe=0;o(xge,"uniqueId");lC=xge;o(Tge,"baseZipObject");SWe=Tge;o(kge,"zipObject");Cge=kge,_We="\0",Gp="\0",Jhe="",ln=class{static{o(this,"Graph")}constructor(e={}){this._isDirected=Object.prototype.hasOwnProperty.call(e,"directed")?e.directed:!0,this._isMultigraph=Object.prototype.hasOwnProperty.call(e,"multigraph")?e.multigraph:!1,this._isCompound=Object.prototype.hasOwnProperty.call(e,"compound")?e.compound:!1,this._label=void 0,this._defaultNodeLabelFn=Eh(void 0),this._defaultEdgeLabelFn=Eh(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[Gp]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}isDirected(){return this._isDirected}isMultigraph(){return this._isMultigraph}isCompound(){return this._isCompound}setGraph(e){return this._label=e,this}graph(){return this._label}setDefaultNodeLabel(e){return ov(e)||(e=Eh(e)),this._defaultNodeLabelFn=e,this}nodeCount(){return this._nodeCount}nodes(){return lo(this._nodes)}sources(){var e=this;return gc(this.nodes(),function(t){return Zhe(e._in[t])})}sinks(){var e=this;return gc(this.nodes(),function(t){return Zhe(e._out[t])})}setNodes(e,t){var r=arguments,i=this;return pt(e,function(n){r.length>1?i.setNode(n,t):i.setNode(n)}),this}setNode(e,t){return Object.prototype.hasOwnProperty.call(this._nodes,e)?(arguments.length>1&&(this._nodes[e]=t),this):(this._nodes[e]=arguments.length>1?t:this._defaultNodeLabelFn(e),this._isCompound&&(this._parent[e]=Gp,this._children[e]={},this._children[Gp][e]=!0),this._in[e]={},this._preds[e]={},this._out[e]={},this._sucs[e]={},++this._nodeCount,this)}node(e){return this._nodes[e]}hasNode(e){return Object.prototype.hasOwnProperty.call(this._nodes,e)}removeNode(e){if(Object.prototype.hasOwnProperty.call(this._nodes,e)){var t=o(r=>this.removeEdge(this._edgeObjs[r]),"removeEdge");delete this._nodes[e],this._isCompound&&(this._removeFromParentsChildList(e),delete this._parent[e],pt(this.children(e),r=>{this.setParent(r)}),delete this._children[e]),pt(lo(this._in[e]),t),delete this._in[e],delete this._preds[e],pt(lo(this._out[e]),t),delete this._out[e],delete this._sucs[e],--this._nodeCount}return this}setParent(e,t){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(Zi(t))t=Gp;else{t+="";for(var r=t;!Zi(r);r=this.parent(r))if(r===e)throw new Error("Setting "+t+" as parent of "+e+" would create a cycle");this.setNode(t)}return this.setNode(e),this._removeFromParentsChildList(e),this._parent[e]=t,this._children[t][e]=!0,this}_removeFromParentsChildList(e){delete this._children[this._parent[e]][e]}parent(e){if(this._isCompound){var t=this._parent[e];if(t!==Gp)return t}}children(e){if(Zi(e)&&(e=Gp),this._isCompound){var t=this._children[e];if(t)return lo(t)}else{if(e===Gp)return this.nodes();if(this.hasNode(e))return[]}}predecessors(e){var t=this._preds[e];if(t)return lo(t)}successors(e){var t=this._sucs[e];if(t)return lo(t)}neighbors(e){var t=this.predecessors(e);if(t)return wWe(t,this.successors(e))}isLeaf(e){var t;return this.isDirected()?t=this.successors(e):t=this.neighbors(e),t.length===0}filterNodes(e){var t=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});t.setGraph(this.graph());var r=this;pt(this._nodes,function(a,s){e(s)&&t.setNode(s,a)}),pt(this._edgeObjs,function(a){t.hasNode(a.v)&&t.hasNode(a.w)&&t.setEdge(a,r.edge(a))});var i={};function n(a){var s=r.parent(a);return s===void 0||t.hasNode(s)?(i[a]=s,s):s in i?i[s]:n(s)}return o(n,"findParent"),this._isCompound&&pt(t.nodes(),function(a){t.setParent(a,n(a))}),t}setDefaultEdgeLabel(e){return ov(e)||(e=Eh(e)),this._defaultEdgeLabelFn=e,this}edgeCount(){return this._edgeCount}edges(){return mc(this._edgeObjs)}setPath(e,t){var r=this,i=arguments;return K0(e,function(n,a){return i.length>1?r.setEdge(n,a,t):r.setEdge(n,a),a}),this}setEdge(){var e,t,r,i,n=!1,a=arguments[0];typeof a=="object"&&a!==null&&"v"in a?(e=a.v,t=a.w,r=a.name,arguments.length===2&&(i=arguments[1],n=!0)):(e=a,t=arguments[1],r=arguments[3],arguments.length>2&&(i=arguments[2],n=!0)),e=""+e,t=""+t,Zi(r)||(r=""+r);var s=q0(this._isDirected,e,t,r);if(Object.prototype.hasOwnProperty.call(this._edgeLabels,s))return n&&(this._edgeLabels[s]=i),this;if(!Zi(r)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(e),this.setNode(t),this._edgeLabels[s]=n?i:this._defaultEdgeLabelFn(e,t,r);var l=wge(this._isDirected,e,t,r);return e=l.v,t=l.w,Object.freeze(l),this._edgeObjs[s]=l,j$(this._preds[t],e),j$(this._sucs[e],t),this._in[t][s]=l,this._out[e][s]=l,this._edgeCount++,this}edge(e,t,r){var i=arguments.length===1?q3(this._isDirected,arguments[0]):q0(this._isDirected,e,t,r);return this._edgeLabels[i]}hasEdge(e,t,r){var i=arguments.length===1?q3(this._isDirected,arguments[0]):q0(this._isDirected,e,t,r);return Object.prototype.hasOwnProperty.call(this._edgeLabels,i)}removeEdge(e,t,r){var i=arguments.length===1?q3(this._isDirected,arguments[0]):q0(this._isDirected,e,t,r),n=this._edgeObjs[i];return n&&(e=n.v,t=n.w,delete this._edgeLabels[i],delete this._edgeObjs[i],G$(this._preds[t],e),G$(this._sucs[e],t),delete this._in[t][i],delete this._out[e][i],this._edgeCount--),this}inEdges(e,t){var r=this._in[e];if(r){var i=mc(r);return t?gc(i,function(n){return n.v===t}):i}}outEdges(e,t){var r=this._out[e];if(r){var i=mc(r);return t?gc(i,function(n){return n.w===t}):i}}nodeEdges(e,t){var r=this.inEdges(e,t);if(r)return r.concat(this.outEdges(e,t))}};ln.prototype._nodeCount=0;ln.prototype._edgeCount=0;o(j$,"incrementOrInitEntry");o(G$,"decrementOrRemoveEntry");o(q0,"edgeArgsToId");o(wge,"edgeArgsToObj");o(q3,"edgeObjToId");});function af(e,t,r,i){var n;do n=lC(i);while(e.hasNode(n));return r.dummy=t,e.setNode(n,r),n}function Ege(e){var t=new ln().setGraph(e.graph());return pt(e.nodes(),function(r){t.setNode(r,e.node(r))}),pt(e.edges(),function(r){var i=t.edge(r.v,r.w)||{weight:0,minlen:1},n=e.edge(r);t.setEdge(r.v,r.w,{weight:i.weight+n.weight,minlen:Math.max(i.minlen,n.minlen)})}),t}function bI(e){var t=new ln({multigraph:e.isMultigraph()}).setGraph(e.graph());return pt(e.nodes(),function(r){e.children(r).length||t.setNode(r,e.node(r))}),pt(e.edges(),function(r){t.setEdge(r,e.edge(r))}),t}function cI(e,t){var r=e.x,i=e.y,n=t.x-r,a=t.y-i,s=e.width/2,l=e.height/2;if(!n&&!a)throw new Error("Not possible to find intersection inside of the rectangle");var h,u;return Math.abs(a)*s>Math.abs(n)*l?(a<0&&(l=-l),h=l*n/a,u=l):(n<0&&(s=-s),h=s,u=s*a/n),{x:r+h,y:i+u}}function vv(e){var t=on(rf(xI(e)+1),function(){return[]});return pt(e.nodes(),function(r){var i=e.node(r),n=i.rank;Zi(n)||(t[n][i.order]=r)}),t}function Sge(e){var t=X0(on(e.nodes(),function(r){return e.node(r).rank}));pt(e.nodes(),function(r){var i=e.node(r);oI(i,"rank")&&(i.rank-=t)})}function _ge(e){var t=X0(on(e.nodes(),function(a){return e.node(a).rank})),r=[];pt(e.nodes(),function(a){var s=e.node(a).rank-t;r[s]||(r[s]=[]),r[s].push(a)});var i=0,n=e.graph().nodeRankFactor;pt(r,function(a,s){Zi(a)&&s%n!==0?--i:i&&pt(a,function(l){e.node(l).rank+=i})})}function hI(e,t,r,i){var n={width:0,height:0};return arguments.length>=4&&(n.rank=r,n.order=i),af(e,"border",n,t)}function xI(e){return Xu(on(e.nodes(),function(t){var r=e.node(t).rank;if(!Zi(r))return r}))}function Age(e,t){var r={lhs:[],rhs:[]};return pt(e,function(i){t(i)?r.lhs.push(i):r.rhs.push(i)}),r}function Rge(e,t){var r=nI();try{return t()}finally{console.log(e+" time: "+(nI()-r)+"ms")}}function Lge(e,t){return t()}function $ge(e){function t(r){var i=e.children(r),n=e.node(r);if(i.length&&pt(i,t),Object.prototype.hasOwnProperty.call(n,"minRank")){n.borderLeft=[],n.borderRight=[];for(var a=n.minRank,s=n.maxRank+1;a0;--l)if(s=t[l].dequeue(),s){i=i.concat(uC(e,t,r,s,!0));break}}}return i}function uC(e,t,r,i,n){var a=n?[]:void 0;return pt(e.inEdges(i.v),function(s){var l=e.edge(s),h=e.node(s.v);n&&a.push({v:s.v,w:s.w}),h.out-=l,fC(t,r,h)}),pt(e.outEdges(i.v),function(s){var l=e.edge(s),h=s.w,u=e.node(h);u.in-=l,fC(t,r,u)}),e.removeNode(i.v),a}function Fge(e,t){var r=new ln,i=0,n=0;pt(e.nodes(),function(l){r.setNode(l,{v:l,in:0,out:0})}),pt(e.edges(),function(l){var h=r.edge(l.v,l.w)||0,u=t(l),d=h+u;r.setEdge(l.v,l.w,d),n=Math.max(n,r.node(l.v).out+=u),i=Math.max(i,r.node(l.w).in+=u)});var a=rf(n+i+3).map(function(){return new AWe}),s=i+1;return pt(r.nodes(),function(l){fC(a,s,r.node(l))}),{graph:r,buckets:a,zeroIdx:s}}function fC(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)}function zge(e){var t=e.graph().acyclicer==="greedy"?Bge(e,r(e)):qge(e);pt(t,function(i){var n=e.edge(i);e.removeEdge(i),n.forwardName=i.name,n.reversed=!0,e.setEdge(i.w,i.v,n,lC("rev"))});function r(i){return function(n){return i.edge(n).weight}}o(r,"weightFn")}function qge(e){var t=[],r={},i={};function n(a){Object.prototype.hasOwnProperty.call(i,a)||(i[a]=!0,r[a]=!0,pt(e.outEdges(a),function(s){Object.prototype.hasOwnProperty.call(r,s.w)?t.push(s):n(s.w)}),delete r[a])}return o(n,"dfs"),pt(e.nodes(),n),t}function jge(e){pt(e.edges(),function(t){var r=e.edge(t);if(r.reversed){e.removeEdge(t);var i=r.forwardName;delete r.reversed,delete r.forwardName,e.setEdge(t.w,t.v,r,i)}})}function Gge(e){e.graph().dummyChains=[],pt(e.edges(),function(t){Wge(e,t)})}function Wge(e,t){var r=t.v,i=e.node(r).rank,n=t.w,a=e.node(n).rank,s=t.name,l=e.edge(t),h=l.labelRank;if(a!==i+1){e.removeEdge(t);var u=void 0,d,p;for(p=0,++i;is.lim&&(l=s,h=!0);var u=gc(t.edges(),function(d){return h===fI(e,e.node(d.v),l)&&h!==fI(e,e.node(d.w),l)});return oC(u,function(d){return Q0(t,d)})}function RI(e,t,r,i){var n=r.v,a=r.w;e.removeEdge(n,a),e.setEdge(i.v,i.w,{}),yC(e),mC(e,t),Jge(e,t)}function Jge(e,t){var r=aC(e.nodes(),function(n){return!t.node(n).parent}),i=Zge(e,r);i=i.slice(1),pt(i,function(n){var a=e.node(n).parent,s=t.edge(n,a),l=!1;s||(s=t.edge(a,n),l=!0),t.node(n).rank=t.node(a).rank+(l?s.minlen:-s.minlen)})}function e0e(e,t,r){return e.hasEdge(t,r)}function fI(e,t,r){return r.low<=t.lim&&t.lim<=r.lim}function t0e(e){switch(e.graph().ranker){case"network-simplex":gI(e);break;case"tight-tree":r0e(e);break;case"longest-path":LWe(e);break;default:gI(e)}}function r0e(e){gC(e),kI(e)}function gI(e){Ku(e)}function i0e(e){var t=af(e,"root",{},"_root"),r=n0e(e),i=Xu(mc(r))-1,n=2*i+1;e.graph().nestingRoot=t,pt(e.edges(),function(s){e.edge(s).minlen*=n});var a=a0e(e)+1;pt(e.children(),function(s){LI(e,t,n,a,i,r,s)}),e.graph().nodeRankFactor=n}function LI(e,t,r,i,n,a,s){var l=e.children(s);if(!l.length){s!==t&&e.setEdge(t,s,{weight:0,minlen:r});return}var h=hI(e,"_bt"),u=hI(e,"_bb"),d=e.node(s);e.setParent(h,s),d.borderTop=h,e.setParent(u,s),d.borderBottom=u,pt(l,function(p){LI(e,t,r,i,n,a,p);var f=e.node(p),g=f.borderTop?f.borderTop:p,m=f.borderBottom?f.borderBottom:p,y=f.borderTop?i:2*i,b=g!==m?1:n-a[s]+1;e.setEdge(h,g,{weight:y,minlen:b,nestingEdge:!0}),e.setEdge(m,u,{weight:y,minlen:b,nestingEdge:!0})}),e.parent(s)||e.setEdge(t,h,{weight:0,minlen:n+a[s]})}function n0e(e){var t={};function r(i,n){var a=e.children(i);a&&a.length&&pt(a,function(s){r(s,n+1)}),t[i]=n}return o(r,"dfs"),pt(e.children(),function(i){r(i,1)}),t}function a0e(e){return K0(e.edges(),function(t,r){return t+e.edge(r).weight},0)}function s0e(e){var t=e.graph();e.removeNode(t.nestingRoot),delete t.nestingRoot,pt(e.edges(),function(r){var i=e.edge(r);i.nestingEdge&&e.removeEdge(r)})}function o0e(e,t,r){var i={},n;pt(r,function(a){for(var s=e.parent(a),l,h;s;){if(l=e.parent(s),l?(h=i[l],i[l]=s):(h=n,n=s),h&&h!==s){t.setEdge(h,s);return}s=l}})}function l0e(e,t,r){var i=c0e(e),n=new ln({compound:!0}).setGraph({root:i}).setDefaultNodeLabel(function(a){return e.node(a)});return pt(e.nodes(),function(a){var s=e.node(a),l=e.parent(a);(s.rank===t||s.minRank<=t&&t<=s.maxRank)&&(n.setNode(a),n.setParent(a,l||i),pt(e[r](a),function(h){var u=h.v===a?h.w:h.v,d=n.edge(u,a),p=Zi(d)?0:d.weight;n.setEdge(u,a,{weight:e.edge(h).weight+p})}),Object.prototype.hasOwnProperty.call(s,"minRank")&&n.setNode(a,{borderLeft:s.borderLeft[t],borderRight:s.borderRight[t]}))}),n}function c0e(e){for(var t;e.hasNode(t=lC("_root")););return t}function h0e(e,t){for(var r=0,i=1;i0;)d%2&&(p+=l[d+1]),d=d-1>>1,l[d]+=u.weight;h+=u.weight*p})),h}function d0e(e){var t={},r=gc(e.nodes(),function(l){return!e.children(l).length}),i=Xu(on(r,function(l){return e.node(l).rank})),n=on(rf(i+1),function(){return[]});function a(l){if(!oI(t,l)){t[l]=!0;var h=e.node(l);n[h.rank].push(l),pt(e.successors(l),a)}}o(a,"dfs");var s=Z0(r,function(l){return e.node(l).rank});return pt(s,a),n}function p0e(e,t){return on(t,function(r){var i=e.inEdges(r);if(i.length){var n=K0(i,function(a,s){var l=e.edge(s),h=e.node(s.v);return{sum:a.sum+l.weight*h.order,weight:a.weight+l.weight}},{sum:0,weight:0});return{v:r,barycenter:n.sum/n.weight,weight:n.weight}}else return{v:r}})}function f0e(e,t){var r={};pt(e,function(n,a){var s=r[n.v]={indegree:0,in:[],out:[],vs:[n.v],i:a};Zi(n.barycenter)||(s.barycenter=n.barycenter,s.weight=n.weight)}),pt(t.edges(),function(n){var a=r[n.v],s=r[n.w];!Zi(a)&&!Zi(s)&&(s.indegree++,a.out.push(r[n.w]))});var i=gc(r,function(n){return!n.indegree});return g0e(i)}function g0e(e){var t=[];function r(a){return function(s){s.merged||(Zi(s.barycenter)||Zi(a.barycenter)||s.barycenter>=a.barycenter)&&m0e(a,s)}}o(r,"handleIn");function i(a){return function(s){s.in.push(a),--s.indegree===0&&e.push(s)}}for(o(i,"handleOut");e.length;){var n=e.pop();t.push(n),pt(n.in.reverse(),r(n)),pt(n.out,i(n))}return on(gc(t,function(a){return!a.merged}),function(a){return mv(a,["vs","i","barycenter","weight"])})}function m0e(e,t){var r=0,i=0;e.weight&&(r+=e.barycenter*e.weight,i+=e.weight),t.weight&&(r+=t.barycenter*t.weight,i+=t.weight),e.vs=t.vs.concat(e.vs),e.barycenter=r/i,e.weight=i,e.i=Math.min(t.i,e.i),t.merged=!0}function y0e(e,t){var r=Age(e,function(d){return Object.prototype.hasOwnProperty.call(d,"barycenter")}),i=r.lhs,n=Z0(r.rhs,function(d){return-d.i}),a=[],s=0,l=0,h=0;i.sort(v0e(!!t)),h=mI(a,n,h),pt(i,function(d){h+=d.vs.length,a.push(d.vs),s+=d.barycenter*d.weight,l+=d.weight,h=mI(a,n,h)});var u={vs:ef(a)};return l&&(u.barycenter=s/l,u.weight=l),u}function mI(e,t,r){for(var i;t.length&&(i=fv(t)).i<=r;)t.pop(),e.push(i.vs),r++;return r}function v0e(e){return function(t,r){return t.barycenterr.barycenter?1:e?r.i-t.i:t.i-r.i}}function $I(e,t,r,i){var n=e.children(t),a=e.node(t),s=a?a.borderLeft:void 0,l=a?a.borderRight:void 0,h={};s&&(n=gc(n,function(m){return m!==s&&m!==l}));var u=p0e(e,n);pt(u,function(m){if(e.children(m.v).length){var y=$I(e,m.v,r,i);h[m.v]=y,Object.prototype.hasOwnProperty.call(y,"barycenter")&&x0e(m,y)}});var d=f0e(u,r);b0e(d,h);var p=y0e(d,i);if(s&&(p.vs=ef([s,p.vs,l]),e.predecessors(s).length)){var f=e.node(e.predecessors(s)[0]),g=e.node(e.predecessors(l)[0]);Object.prototype.hasOwnProperty.call(p,"barycenter")||(p.barycenter=0,p.weight=0),p.barycenter=(p.barycenter*p.weight+f.order+g.order)/(p.weight+2),p.weight+=2}return p}function b0e(e,t){pt(e,function(r){r.vs=ef(r.vs.map(function(i){return t[i]?t[i].vs:i}))})}function x0e(e,t){Zi(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)}function T0e(e){var t=xI(e),r=yI(e,rf(1,t+1),"inEdges"),i=yI(e,rf(t-1,-1,-1),"outEdges"),n=d0e(e);vI(e,n);for(var a=Number.POSITIVE_INFINITY,s,l=0,h=0;h<4;++l,++h){k0e(l%2?r:i,l%4>=2),n=vv(e);var u=h0e(e,n);us||l>t[h].lim));for(u=h,h=i;(h=e.parent(h))!==u;)a.push(h);return{path:n.concat(a.reverse()),lca:u}}function E0e(e){var t={},r=0;function i(n){var a=r;pt(e.children(n),i),t[n]={low:a,lim:r++}}return o(i,"dfs"),pt(e.children(),i),t}function S0e(e,t){var r={};function i(n,a){var s=0,l=0,h=n.length,u=fv(a);return pt(a,function(d,p){var f=A0e(e,d),g=f?e.node(f).order:h;(f||d===u)&&(pt(a.slice(l,p+1),function(m){pt(e.predecessors(m),function(y){var b=e.node(y),v=b.order;(vu)&&II(r,f,d)})})}o(i,"scan");function n(a,s){var l=-1,h,u=0;return pt(s,function(d,p){if(e.node(d).dummy==="border"){var f=e.predecessors(d);f.length&&(h=e.node(f[0]).order,i(s,u,p,l,h),u=p,l=h)}i(s,u,s.length,h,a.length)}),s}return o(n,"visitLayer"),K0(t,n),r}function A0e(e,t){if(e.node(t).dummy)return aC(e.predecessors(t),function(r){return e.node(r).dummy})}function II(e,t,r){if(t>r){var i=t;t=r,r=i}Object.prototype.hasOwnProperty.call(e,t)||Object.defineProperty(e,t,{enumerable:!0,configurable:!0,value:{},writable:!0});var n=e[t];Object.defineProperty(n,r,{enumerable:!0,configurable:!0,value:!0,writable:!0})}function R0e(e,t,r){if(t>r){var i=t;t=r,r=i}return!!e[t]&&Object.prototype.hasOwnProperty.call(e[t],r)}function L0e(e,t,r,i){var n={},a={},s={};return pt(t,function(l){pt(l,function(h,u){n[h]=h,a[h]=h,s[h]=u})}),pt(t,function(l){var h=-1;pt(l,function(u){var d=i(u);if(d.length){d=Z0(d,function(y){return s[y]});for(var p=(d.length-1)/2,f=Math.floor(p),g=Math.ceil(p);f<=g;++f){var m=d[f];a[u]===u&&h{var i=r(" buildLayoutGraph",()=>G0e(e));r(" runLayout",()=>q0e(i,r)),r(" updateInputGraph",()=>j0e(e,i))})}function q0e(e,t){t(" makeSpaceForEdgeLabels",()=>W0e(e)),t(" removeSelfEdges",()=>J0e(e)),t(" acyclic",()=>zge(e)),t(" nestingGraph.run",()=>i0e(e)),t(" rank",()=>t0e(bI(e))),t(" injectEdgeLabelProxies",()=>U0e(e)),t(" removeEmptyRanks",()=>_ge(e)),t(" nestingGraph.cleanup",()=>s0e(e)),t(" normalizeRanks",()=>Sge(e)),t(" assignRankMinMax",()=>V0e(e)),t(" removeEdgeLabelProxies",()=>Y0e(e)),t(" normalize.run",()=>Gge(e)),t(" parentDummyChains",()=>C0e(e)),t(" addBorderSegments",()=>$ge(e)),t(" order",()=>T0e(e)),t(" insertSelfEdges",()=>eme(e)),t(" adjustCoordinateSystem",()=>Ige(e)),t(" position",()=>F0e(e)),t(" positionSelfEdges",()=>tme(e)),t(" removeBorderNodes",()=>Q0e(e)),t(" normalize.undo",()=>Uge(e)),t(" fixupEdgeLabelCoords",()=>K0e(e)),t(" undoCoordinateSystem",()=>Dge(e)),t(" translateGraph",()=>H0e(e)),t(" assignNodeIntersects",()=>X0e(e)),t(" reversePoints",()=>Z0e(e)),t(" acyclic.undo",()=>jge(e))}function j0e(e,t){pt(e.nodes(),function(r){var i=e.node(r),n=t.node(r);i&&(i.x=n.x,i.y=n.y,t.children(r).length&&(i.width=n.width,i.height=n.height))}),pt(e.edges(),function(r){var i=e.edge(r),n=t.edge(r);i.points=n.points,Object.prototype.hasOwnProperty.call(n,"x")&&(i.x=n.x,i.y=n.y)}),e.graph().width=t.graph().width,e.graph().height=t.graph().height}function G0e(e){var t=new ln({multigraph:!0,compound:!0}),r=pC(e.graph());return t.setGraph(sC({},IWe,dC(r,$We),mv(r,DWe))),pt(e.nodes(),function(i){var n=pC(e.node(i));t.setNode(i,gfe(dC(n,MWe),NWe)),t.setParent(i,e.parent(i))}),pt(e.edges(),function(i){var n=pC(e.edge(i));t.setEdge(i,sC({},BWe,dC(n,OWe),mv(n,PWe)))}),t}function W0e(e){var t=e.graph();t.ranksep/=2,pt(e.edges(),function(r){var i=e.edge(r);i.minlen*=2,i.labelpos.toLowerCase()!=="c"&&(t.rankdir==="TB"||t.rankdir==="BT"?i.width+=i.labeloffset:i.height+=i.labeloffset)})}function U0e(e){pt(e.edges(),function(t){var r=e.edge(t);if(r.width&&r.height){var i=e.node(t.v),n=e.node(t.w),a={rank:(n.rank-i.rank)/2+i.rank,e:t};af(e,"edge-proxy",a,"_ep")}})}function V0e(e){var t=0;pt(e.nodes(),function(r){var i=e.node(r);i.borderTop&&(i.minRank=e.node(i.borderTop).rank,i.maxRank=e.node(i.borderBottom).rank,t=Xu(t,i.maxRank))}),e.graph().maxRank=t}function Y0e(e){pt(e.nodes(),function(t){var r=e.node(t);r.dummy==="edge-proxy"&&(e.edge(r.e).labelRank=r.rank,e.removeNode(t))})}function H0e(e){var t=Number.POSITIVE_INFINITY,r=0,i=Number.POSITIVE_INFINITY,n=0,a=e.graph(),s=a.marginx||0,l=a.marginy||0;function h(u){var d=u.x,p=u.y,f=u.width,g=u.height;t=Math.min(t,d-f/2),r=Math.max(r,d+f/2),i=Math.min(i,p-g/2),n=Math.max(n,p+g/2)}o(h,"getExtremes"),pt(e.nodes(),function(u){h(e.node(u))}),pt(e.edges(),function(u){var d=e.edge(u);Object.prototype.hasOwnProperty.call(d,"x")&&h(d)}),t-=s,i-=l,pt(e.nodes(),function(u){var d=e.node(u);d.x-=t,d.y-=i}),pt(e.edges(),function(u){var d=e.edge(u);pt(d.points,function(p){p.x-=t,p.y-=i}),Object.prototype.hasOwnProperty.call(d,"x")&&(d.x-=t),Object.prototype.hasOwnProperty.call(d,"y")&&(d.y-=i)}),a.width=r-t+s,a.height=n-i+l}function X0e(e){pt(e.edges(),function(t){var r=e.edge(t),i=e.node(t.v),n=e.node(t.w),a,s;r.points?(a=r.points[0],s=r.points[r.points.length-1]):(r.points=[],a=n,s=i),r.points.unshift(cI(i,a)),r.points.push(cI(n,s))})}function K0e(e){pt(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 Z0e(e){pt(e.edges(),function(t){var r=e.edge(t);r.reversed&&r.points.reverse()})}function Q0e(e){pt(e.nodes(),function(t){if(e.children(t).length){var r=e.node(t),i=e.node(r.borderTop),n=e.node(r.borderBottom),a=e.node(fv(r.borderLeft)),s=e.node(fv(r.borderRight));r.width=Math.abs(s.x-a.x),r.height=Math.abs(n.y-i.y),r.x=a.x+r.width/2,r.y=i.y+r.height/2}}),pt(e.nodes(),function(t){e.node(t).dummy==="border"&&e.removeNode(t)})}function J0e(e){pt(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 eme(e){var t=vv(e);pt(t,function(r){var i=0;pt(r,function(n,a){var s=e.node(n);s.order=a+i,pt(s.selfEdges,function(l){af(e,"selfedge",{width:l.label.width,height:l.label.height,rank:s.rank,order:a+ ++i,e:l.e,label:l.label},"_se")}),delete s.selfEdges})})}function tme(e){pt(e.nodes(),function(t){var r=e.node(t);if(r.dummy==="selfedge"){var i=e.node(r.e.v),n=i.x+i.width/2,a=i.y,s=r.x-n,l=i.height/2;e.setEdge(r.e,r.label),e.removeNode(t),r.label.points=[{x:n+2*s/3,y:a-l},{x:n+5*s/6,y:a-l},{x:n+s,y:a},{x:n+5*s/6,y:a+l},{x:n+2*s/3,y:a+l}],r.label.x=r.x,r.label.y=r.y}})}function dC(e,t){return gv(mv(e,t),Number)}function pC(e){var t={};return pt(e,function(r,i){t[i.toLowerCase()]=r}),t}var AWe,RWe,ywt,vwt,LWe,$We,IWe,DWe,MWe,NWe,OWe,BWe,PWe,DI=Tt(()=>{nf();vt();o(af,"addDummyNode");o(Ege,"simplify");o(bI,"asNonCompoundGraph");o(cI,"intersectRect");o(vv,"buildLayerMatrix");o(Sge,"normalizeRanks");o(_ge,"removeEmptyRanks");o(hI,"addBorderNode");o(xI,"maxRank");o(Age,"partition");o(Rge,"time");o(Lge,"notime");o($ge,"addBorderSegments");o(uI,"addBorderNode");o(Ige,"adjust");o(Dge,"undo");o(TI,"swapWidthHeight");o(dI,"swapWidthHeightOne");o(Mge,"reverseY");o(cC,"reverseYOne");o(Nge,"swapXY");o(hC,"swapXYOne");AWe=class{static{o(this,"List")}constructor(){var e={};e._next=e._prev=e,this._sentinel=e}dequeue(){var e=this._sentinel,t=e._prev;if(t!==e)return pI(t),t}enqueue(e){var t=this._sentinel;e._prev&&e._next&&pI(e),e._next=t._next,t._next._prev=e,t._next=e,e._prev=t}toString(){for(var e=[],t=this._sentinel,r=t._prev;r!==t;)e.push(JSON.stringify(r,Oge)),r=r._prev;return"["+e.join(", ")+"]"}};o(pI,"unlink");o(Oge,"filterOutLinks");RWe=Eh(1);o(Bge,"greedyFAS");o(Pge,"doGreedyFAS");o(uC,"removeNode");o(Fge,"buildState");o(fC,"assignBucket");o(zge,"run");o(qge,"dfsFAS");o(jge,"undo");o(Gge,"run");o(Wge,"normalizeEdge");o(Uge,"undo");o(gC,"longestPath");o(Q0,"slack");o(kI,"feasibleTree");o(Vge,"tightTree");o(Yge,"findMinSlackEdge");o(Hge,"shiftRanks");ywt=Eh(1),vwt=Eh(1);Xge.CycleException=yv;o(Xge,"topsort");o(yv,"CycleException");yv.prototype=new Error;o(CI,"dfs");o(wI,"doDfs");o(Kge,"postorder");o(Zge,"preorder");Ku.initLowLimValues=yC;Ku.initCutValues=mC;Ku.calcCutValue=EI;Ku.leaveEdge=_I;Ku.enterEdge=AI;Ku.exchangeEdges=RI;o(Ku,"networkSimplex");o(mC,"initCutValues");o(Qge,"assignCutValue");o(EI,"calcCutValue");o(yC,"initLowLimValues");o(SI,"dfsAssignLowLim");o(_I,"leaveEdge");o(AI,"enterEdge");o(RI,"exchangeEdges");o(Jge,"updateRanks");o(e0e,"isTreeEdge");o(fI,"isDescendant");o(t0e,"rank");LWe=gC;o(r0e,"tightTreeRanker");o(gI,"networkSimplexRanker");o(i0e,"run");o(LI,"dfs");o(n0e,"treeDepths");o(a0e,"sumWeights");o(s0e,"cleanup");o(o0e,"addSubgraphConstraints");o(l0e,"buildLayerGraph");o(c0e,"createRootNode");o(h0e,"crossCount");o(u0e,"twoLayerCrossCount");o(d0e,"initOrder");o(p0e,"barycenter");o(f0e,"resolveConflicts");o(g0e,"doResolveConflicts");o(m0e,"mergeEntries");o(y0e,"sort");o(mI,"consumeUnsortable");o(v0e,"compareWithBias");o($I,"sortSubgraph");o(b0e,"expandSubgraphs");o(x0e,"mergeBarycenters");o(T0e,"order");o(yI,"buildLayerGraphs");o(k0e,"sweepLayerGraphs");o(vI,"assignOrder");o(C0e,"parentDummyChains");o(w0e,"findPath");o(E0e,"postorder");o(S0e,"findType1Conflicts");o(_0e,"findType2Conflicts");o(A0e,"findOtherInnerSegmentNode");o(II,"addConflict");o(R0e,"hasConflict");o(L0e,"verticalAlignment");o($0e,"horizontalCompaction");o(I0e,"buildBlockGraph");o(D0e,"findSmallestWidthAlignment");o(M0e,"alignCoordinates");o(N0e,"balance");o(O0e,"positionX");o(B0e,"sep");o(P0e,"width");o(F0e,"position");o(z0e,"positionY");o(bv,"layout");o(q0e,"runLayout");o(j0e,"updateInputGraph");$We=["nodesep","edgesep","ranksep","marginx","marginy"],IWe={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},DWe=["acyclicer","ranker","rankdir","align"],MWe=["width","height"],NWe={width:0,height:0},OWe=["minlen","weight","width","height","labeloffset"],BWe={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},PWe=["labelpos"];o(G0e,"buildLayoutGraph");o(W0e,"makeSpaceForEdgeLabels");o(U0e,"injectEdgeLabelProxies");o(V0e,"assignRankMinMax");o(Y0e,"removeEdgeLabelProxies");o(H0e,"translateGraph");o(X0e,"assignNodeIntersects");o(K0e,"fixupEdgeLabelCoords");o(Z0e,"reversePointsForReversedEdges");o(Q0e,"removeBorderNodes");o(J0e,"removeSelfEdges");o(eme,"insertSelfEdges");o(tme,"positionSelfEdges");o(dC,"selectNumberAttrs");o(pC,"canonicalize")});function El(e){var t={options:{directed:e.isDirected(),multigraph:e.isMultigraph(),compound:e.isCompound()},nodes:ime(e),edges:nme(e)};return Zi(e.graph())||(t.value=Lpe(e.graph())),t}function ime(e){return on(e.nodes(),function(t){var r=e.node(t),i=e.parent(t),n={v:t};return Zi(r)||(n.value=r),Zi(i)||(n.parent=i),n})}function nme(e){return on(e.edges(),function(t){var r=e.edge(t),i={v:t.v,w:t.w};return Zi(t.name)||(i.name=t.name),Zi(r)||(i.value=r),i})}var Ar,Zu,ame,vC,sf,FWe,MI,sme,zWe,of,rme,ome,lme,cme,hme,ume,qWe,NI=Tt(()=>{nf();Zt();vt();o(El,"write");o(ime,"writeNodes");o(nme,"writeEdges");Ar=new Map,Zu=new Map,ame=new Map,vC=o(()=>{Zu.clear(),ame.clear(),Ar.clear()},"clear"),sf=o((e,t)=>{let r=Zu.get(t)||[];return ee.trace("In isDescendant",t," ",e," = ",r.includes(e)),r.includes(e)},"isDescendant"),FWe=o((e,t)=>{let r=Zu.get(t)||[];return ee.info("Descendants of ",t," is ",r),ee.info("Edge is ",e),e.v===t||e.w===t?!1:r?r.includes(e.v)||sf(e.v,t)||sf(e.w,t)||r.includes(e.w):(ee.debug("Tilt, ",t,",not in descendants"),!1)},"edgeInCluster"),MI=o((e,t,r,i)=>{ee.warn("Copying children of ",e,"root",i,"data",t.node(e),i);let n=t.children(e)||[];e!==i&&n.push(e),ee.warn("Copying (nodes) clusterId",e,"nodes",n),n.forEach(a=>{if(t.children(a).length>0)MI(a,t,r,i);else{let s=t.node(a);ee.info("cp ",a," to ",i," with parent ",e),r.setNode(a,s),i!==t.parent(a)&&(ee.warn("Setting parent",a,t.parent(a)),r.setParent(a,t.parent(a))),e!==i&&a!==e?(ee.debug("Setting parent",a,e),r.setParent(a,e)):(ee.info("In copy ",e,"root",i,"data",t.node(e),i),ee.debug("Not Setting parent for node=",a,"cluster!==rootId",e!==i,"node!==clusterId",a!==e));let l=t.edges(a);ee.debug("Copying Edges",l),l.forEach(h=>{ee.info("Edge",h);let u=t.edge(h.v,h.w,h.name);ee.info("Edge data",u,i);try{if(FWe(h,i)){let d=Zu.get(i)||[],p=d.includes(h.v)||sf(h.v,i)||h.v===i,f=d.includes(h.w)||sf(h.w,i)||h.w===i;if(p&&f)ee.info("Copying as ",h.v,h.w,u,h.name),r.setEdge(h.v,h.w,u,h.name),ee.info("newGraph edges ",r.edges(),r.edge(r.edges()[0]));else{let g=p?i:h.v,m=f?i:h.w;ee.info("Rebinding cross-boundary edge as ",g,m,u,h.name),t.setEdge(g,m,u,h.name)}}else ee.info("Skipping copy of edge ",h.v,"-->",h.w," rootId: ",i," clusterId:",e)}catch(d){ee.error(d)}})}ee.debug("Removing node",a),t.removeNode(a)})},"copy"),sme=o((e,t)=>{let r=t.children(e),i=[...r];for(let n of r)ame.set(n,e),i=[...i,...sme(n,t)];return i},"extractDescendants"),zWe=o((e,t,r)=>{let i=e.edges().filter(l=>l.v===t||l.w===t),n=e.edges().filter(l=>l.v===r||l.w===r),a=i.map(l=>({v:l.v===t?r:l.v,w:l.w===t?t:l.w})),s=n.map(l=>({v:l.v,w:l.w}));return a.filter(l=>s.some(h=>l.v===h.v&&l.w===h.w))},"findCommonEdges"),of=o((e,t,r)=>{let i=t.children(e);if(ee.trace("Searching children of id ",e,i),i.length<1)return e;let n;for(let a of i){let s=of(a,t,r),l=zWe(t,r,s);if(s)if(l.length>0)n=s;else return s}return n},"findNonClusterChild"),rme=o(e=>!Ar.has(e)||!Ar.get(e).externalConnections?e:Ar.has(e)?Ar.get(e).id:e,"getAnchorId"),ome=o((e,t)=>{if(!e||t>10){ee.debug("Opting out, no graph ");return}else ee.debug("Opting in, graph ");e.nodes().forEach(function(r){e.children(r).length>0&&(ee.warn("Cluster identified",r," Replacement id in edges: ",of(r,e,r)),Zu.set(r,sme(r,e)),Ar.set(r,{id:of(r,e,r),clusterData:e.node(r)}))}),e.nodes().forEach(function(r){let i=e.children(r),n=e.edges();i.length>0?(ee.debug("Cluster identified",r,Zu),n.forEach(a=>{let s=sf(a.v,r),l=sf(a.w,r);s^l&&(ee.warn("Edge: ",a," leaves cluster ",r),ee.warn("Descendants of XXX ",r,": ",Zu.get(r)),Ar.get(r).externalConnections=!0)})):ee.debug("Not a cluster ",r,Zu)});for(let r of Ar.keys()){let i=Ar.get(r).id,n=e.parent(i);n!==r&&Ar.has(n)&&!Ar.get(n).externalConnections&&(Ar.get(r).id=n);let a=e.edges().some(s=>s.v===r);if(i&&Ar.get(r)?.externalConnections&&a&&ume(e,i,r)){let s=qWe(e,r,e.parent(i));s&&(Ar.get(r).id=s)}}e.edges().forEach(function(r){let i=e.edge(r);ee.warn("Edge "+r.v+" -> "+r.w+": "+JSON.stringify(r)),ee.warn("Edge "+r.v+" -> "+r.w+": "+JSON.stringify(e.edge(r)));let n=r.v,a=r.w;if(ee.warn("Fix XXX",Ar,"ids:",r.v,r.w,"Translating: ",Ar.get(r.v)," --- ",Ar.get(r.w)),Ar.get(r.v)||Ar.get(r.w)){if(ee.warn("Fixing and trying - removing XXX",r.v,r.w,r.name),n=rme(r.v),a=rme(r.w),e.removeEdge(r.v,r.w,r.name),n!==r.v){let s=e.parent(n);Ar.get(s).externalConnections=!0,i.fromCluster=r.v}if(a!==r.w){let s=e.parent(a);Ar.get(s).externalConnections=!0,i.toCluster=r.w}ee.warn("Fix Replacing with XXX",n,a,r.name),e.setEdge(n,a,i,r.name)}}),ee.warn("Adjusted Graph",El(e)),lme(e,0),ee.trace(Ar)},"adjustClustersAndEdges"),lme=o((e,t)=>{if(ee.warn("extractor - ",t,El(e),e.children("D")),t>10){ee.error("Bailing out");return}let r=e.nodes(),i=!1;for(let n of r){let a=e.children(n);i=i||a.length>0}if(!i){ee.debug("Done, no node has children",e.nodes());return}ee.debug("Nodes = ",r,t);for(let n of r)if(ee.debug("Extracting node",n,Ar,Ar.has(n)&&!Ar.get(n).externalConnections,!e.parent(n),e.node(n),e.children("D")," Depth ",t),!Ar.has(n))ee.debug("Not a cluster",n,t);else if(Ar.get(n)?.clusterData?.explicitDir&&e.children(n)&&e.children(n).length>0){ee.warn("Cluster with explicit dir, creating subgraph for children",n,t);let a=Ar.get(n).clusterData.dir,s=new ln({multigraph:!0,compound:!0}).setGraph({rankdir:a,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});MI(n,e,s,n);let l=e.node(n)||{};e.setNode(n,{...l,clusterNode:!0,id:n,clusterData:Ar.get(n).clusterData,label:Ar.get(n).label,graph:s}),ee.warn("Subgraph for cluster with explicit dir created:",n,El(s))}else if(!Ar.get(n).externalConnections&&e.children(n)&&e.children(n).length>0){ee.warn("Cluster without external connections, without a parent and with children",n,t);let a=e.graph().rankdir==="TB"?"LR":"TB";Ar.get(n)?.clusterData?.dir&&(a=Ar.get(n).clusterData.dir,ee.warn("Fixing dir",Ar.get(n).clusterData.dir,a));let s=new ln({multigraph:!0,compound:!0}).setGraph({rankdir:a,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});MI(n,e,s,n);let l=e.node(n)||{};e.setNode(n,{...l,clusterNode:!0,id:n,clusterData:Ar.get(n).clusterData,label:Ar.get(n).label,graph:s}),ee.debug("Old graph after copy",El(e))}else ee.warn("Cluster ** ",n," **not meeting the criteria !externalConnections:",!Ar.get(n).externalConnections," no parent: ",!e.parent(n)," children ",e.children(n)&&e.children(n).length>0,e.children("D"),t),ee.debug(Ar);r=e.nodes(),ee.warn("New list of nodes",r);for(let n of r){let a=e.node(n);ee.warn(" Now next level",n,a),a?.clusterNode&&lme(a.graph,t+1)}},"extractor"),cme=o((e,t)=>{if(t.length===0)return[];let r=Object.assign([],t);return t.forEach(i=>{let n=e.children(i),a=cme(e,n);r=[...r,...a]}),r},"sorter"),hme=o(e=>cme(e,e.children()),"sortNodesByHierarchy"),ume=o((e,t,r)=>{let i=e.parent(t);for(;i&&i!==r;){let n=Ar.get(i);if(n&&!n.externalConnections)return!0;i=e.parent(i)}return!1},"isNodeInExtractableCluster"),qWe=o((e,t,r)=>{let i=e.children(t)??[];for(let n of i){if(n===r||sf(n,r))continue;let a=of(n,e,t);if(a&&!ume(e,a,t))return a}return null},"findSafeAnchorNode")});var mme={};Kt(mme,{getEdgesToRender:()=>fme,render:()=>VWe});var dme,pme,jWe,GWe,WWe,UWe,fme,gme,VWe,yme=Tt(()=>{DI();NI();nf();Bs();ha();Zn();sa();ds();la();Fn();An();Or();Yr();tr();Zt();vt();dme=o((e,t,r)=>Math.max(t,Math.min(r,e)),"clamp"),pme=o((e="TB")=>{switch(e){case"BT":return"bottom";case"LR":return"right";case"RL":return"left";default:return"top"}},"getDefaultSelfLoopSide"),jWe=o(e=>e==="flowchart"||e==="flowchart-v2"||e==="stateDiagram","shouldMergeSelfLoopSegments"),GWe=o((e,t,r,i,n)=>{let a=[],s=new Set;if(r.forEach(({start:d,end:p})=>{d!==i&&s.add(d),p!==i&&s.add(p)}),s.forEach(d=>{let p=e.node(d);typeof p?.x=="number"&&typeof p?.y=="number"&&a.push(p)}),a.length===0&&r.forEach(({edge:d})=>{(d.points??[]).forEach(p=>{typeof p?.x=="number"&&typeof p?.y=="number"&&a.push(p)})}),a.length===0)return pme(n);let l=a.reduce((d,p)=>({x:d.x+p.x/a.length,y:d.y+p.y/a.length}),{x:0,y:0}),h=l.x-t.x,u=l.y-t.y;return Math.abs(h)>Math.abs(u)?h>0?"right":"left":Math.abs(u)>0?u>0?"bottom":"top":pme(n)},"getSelfLoopSide"),WWe=o((e,t="top",r=0,i=0)=>{let n=e.x,a=e.y-r,s=e.width/2,l=e.height/2,h=Math.max(36,Math.min(100,e.width*.8)),u=dme(Math.max(i,e.width*.35),36,h),d=dme(Math.min(e.width,e.height)*.45,24,48);switch(t){case"bottom":{let p=a+l;return[{x:n-u/2,y:p},{x:n-u/2,y:p+d},{x:n+u/2,y:p+d},{x:n+u/2,y:p}]}case"right":{let p=n+s;return[{x:p,y:a-u/2},{x:p+d,y:a-u/2},{x:p+d,y:a+u/2},{x:p,y:a+u/2}]}case"left":{let p=n-s;return[{x:p,y:a-u/2},{x:p-d,y:a-u/2},{x:p-d,y:a+u/2},{x:p,y:a+u/2}]}default:{let p=a-l;return[{x:n-u/2,y:p},{x:n-u/2,y:p-d},{x:n+u/2,y:p-d},{x:n+u/2,y:p}]}}},"getSelfLoopPoints"),UWe=o((e,t,r="top",i=0,n={})=>{let a=e.x,s=e.y-i,l=n.width??0,h=n.height??0;switch(r){case"bottom":return{x:a,y:Math.max(...t.map(u=>u.y))+h/2+4};case"right":return{x:Math.max(...t.map(u=>u.x))+l/2+4,y:s};case"left":return{x:Math.min(...t.map(u=>u.x))-l/2-4,y:s};default:return{x:a,y:Math.min(...t.map(u=>u.y))-h/2-4}}},"getSelfLoopLabelPosition"),fme=o((e,t=0,{mergeSelfLoops:r=!0}={})=>{let i=new Map,n=[],a=e.graph()?.rankdir;return e.edges().forEach(s=>{let l=e.edge(s);if(r&&l.selfLoop){let h=l.selfLoop.id;i.has(h)||i.set(h,[]),i.get(h).push({edge:l,start:s.v,end:s.w})}else n.push({edge:l,start:s.v,end:s.w})}),i.forEach(s=>{if(s.length!==3){s.forEach(v=>n.push(v));return}s.sort((v,T)=>v.edge.selfLoop.order-T.edge.selfLoop.order);let[l,h,u]=s,d=l.edge.originalEdge??h.edge.originalEdge??u.edge.originalEdge??h.edge,p=e.node(d.start);if(!p){s.forEach(v=>n.push(v));return}let f={width:h.edge.width,height:h.edge.height},g=GWe(e,p,s,d.start,a),m=WWe(p,g,t,f.width??0),y=UWe(p,m,g,t,f),b={...h.edge,...d,id:d.id,points:m,start:d.start,end:d.end,x:y.x,y:y.y,width:f.width,height:f.height,labelStyle:h.edge.labelStyle,fromCluster:l.edge.fromCluster??h.edge.fromCluster??u.edge.fromCluster,toCluster:l.edge.toCluster??h.edge.toCluster??u.edge.toCluster};delete b.selfLoop,delete b.originalEdge,n.push({edge:b,start:b.start,end:b.end})}),n},"getEdgesToRender"),gme=o(async(e,t,r,i,n,a)=>{ee.warn("Graph in recursive render:XAX",El(t),n);let s=t.graph().rankdir;ee.trace("Dir in recursive render - dir:",s);let l=e.insert("g").attr("class","root");t.nodes()?ee.info("Recursive render XXX",t.nodes()):ee.info("No nodes found for",t),t.edges().length>0&&ee.info("Recursive edges",t.edge(t.edges()[0]));let h=l.insert("g").attr("class","clusters"),u=l.insert("g").attr("class","edgePaths"),d=l.insert("g").attr("class","edgeLabels"),p=l.insert("g").attr("class","nodes"),f=jWe(r);await Promise.all(t.nodes().map(async function(b){let v=t.node(b);if(n!==void 0){let T=JSON.parse(JSON.stringify(n.clusterData));ee.trace(`Setting data for parent cluster XXX + Node.id = `,b,` + data=`,T.height,` +Parent cluster`,n.height),t.setNode(n.id,T),t.parent(b)||(ee.trace("Setting parent",b,n.id),t.setParent(b,n.id,T))}if(ee.info("(Insert) Node XXX"+b+": "+JSON.stringify(t.node(b))),v?.clusterNode){ee.info("Cluster identified XBX",b,v.width,t.node(b));let{ranksep:T,nodesep:x}=t.graph();v.graph.setGraph({...v.graph.graph(),ranksep:T+25,nodesep:x});let k=await gme(p,v.graph,r,i,t.node(b),a),C=k.elem;Vt(v,C),v.diff=k.diff||0,ee.info("New compound node after recursive render XAX",b,"width",v.width,"height",v.height),phe(C,v)}else t.children(b).length>0?(ee.trace("Cluster - the non recursive path XBX",b,v.id,v,v.width,"Graph:",t),ee.trace(of(v.id,t)),Ar.set(v.id,{id:of(v.id,t),node:v})):(ee.trace("Node - the non recursive path XAX",b,p,t.node(b),s),await wh(p,t.node(b),{config:a,dir:s}))})),await o(async()=>{let b=t.edges().map(async function(v){let T=t.edge(v.v,v.w,v.name);if(ee.info("Edge "+v.v+" -> "+v.w+": "+JSON.stringify(v)),ee.info("Edge "+v.v+" -> "+v.w+": ",v," ",JSON.stringify(t.edge(v))),ee.info("Fix",Ar,"ids:",v.v,v.w,"Translating: ",Ar.get(v.v),Ar.get(v.w)),f&&T.selfLoop){if(T.selfLoop.order!==1)return;let x=T.id;T.id=T.selfLoop.id,await jp(d,T),T.id=x;return}await jp(d,T)});await Promise.all(b)},"processEdges")(),ee.info("Graph before layout:",JSON.stringify(El(t))),ee.info("############################################# XXX"),ee.info("### Layout ### XXX"),ee.info("############################################# XXX"),bv(t),ee.info("Graph after layout:",JSON.stringify(El(t)));let g=0,{subGraphTitleTotalMargin:m}=Tl(a);await Promise.all(hme(t).map(async function(b){let v=t.node(b);if(ee.info("Position XBX => "+b+": ("+v.x,","+v.y,") width: ",v.width," height: ",v.height),v?.clusterNode)v.y+=m,ee.info("A tainted cluster node XBX1",b,v.id,v.width,v.height,v.x,v.y,t.parent(b)),Ar.get(v.id).node=v,qp(v);else if(t.children(b).length>0){ee.info("A pure cluster node XBX1",b,v.id,v.x,v.y,v.width,v.height,t.parent(b)),v.height+=m,t.node(v.parentId);let T=v?.padding/2||0,x=v?.labelBBox?.height||0,k=x-T||0;ee.debug("OffsetY",k,"labelHeight",x,"halfPadding",T),await Vu(h,v),Ar.get(v.id).node=v}else{let T=t.node(v.parentId);v.y+=m/2,ee.info("A regular node XBX1 - using the padding",v.id,"parent",v.parentId,v.width,v.height,v.x,v.y,"offsetY",v.offsetY,"parent",T,T?.offsetY,v),qp(v)}}));let y=m/2;return fme(t,y,{mergeSelfLoops:f}).forEach(function({edge:b,start:v,end:T}){ee.info("Edge "+v+" -> "+T+": "+JSON.stringify(b),b),b.points.forEach(E=>E.y+=y);let x=t.node(v),k=t.node(T),C=F0(u,b,Ar,r,x,k,i);P3(b,C)}),t.nodes().forEach(function(b){let v=t.node(b);ee.info(b,v.type,v.diff),v.isGroup&&(g=v.diff)}),ee.warn("Returning from recursive render XAX",l,g),{elem:l,diff:g}},"recursiveRender"),VWe=o(async(e,t)=>{let r=new ln({multigraph:!0,compound:!0}).setGraph({rankdir:e.direction,nodesep:e.config?.nodeSpacing||e.config?.flowchart?.nodeSpacing||e.nodeSpacing,ranksep:e.config?.rankSpacing||e.config?.flowchart?.rankSpacing||e.rankSpacing,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}}),i=t.select("g");z0(i,e.markers,e.type,e.diagramId),N3(),B3(),D3(),vC(),e.nodes.forEach(a=>{r.setNode(a.id,{...a}),a.parentId&&r.setParent(a.id,a.parentId)}),ee.debug("Edges:",e.edges),e.edges.forEach(a=>{if(a.start===a.end){let s=a.start,l=s+"---"+s+"---1",h=s+"---"+s+"---2",u=r.node(s);r.setNode(l,{domId:l,id:l,parentId:u.parentId,labelStyle:"",label:"",padding:0,shape:"labelRect",style:"",width:10,height:10}),r.setParent(l,u.parentId),r.setNode(h,{domId:h,id:h,parentId:u.parentId,labelStyle:"",padding:0,shape:"labelRect",label:"",style:"",width:10,height:10}),r.setParent(h,u.parentId);let d=structuredClone(a),p=structuredClone(a),f=structuredClone(a),g=structuredClone(a);p.originalEdge=d,p.selfLoop={id:d.id,order:0},f.originalEdge=d,f.selfLoop={id:d.id,order:1},g.originalEdge=d,g.selfLoop={id:d.id,order:2},p.label="",p.arrowTypeEnd="none",p.endLabelLeft="",p.endLabelRight="",p.startLabelLeft="",p.id=s+"-cyclic-special-1",f.startLabelRight="",f.startLabelLeft="",f.endLabelLeft="",f.endLabelRight="",f.arrowTypeStart="none",f.arrowTypeEnd="none",f.id=s+"-cyclic-special-mid",g.label="",g.startLabelRight="",g.startLabelLeft="",g.arrowTypeStart="none",u.isGroup&&(p.fromCluster=s,g.toCluster=s),g.id=s+"-cyclic-special-2",g.arrowTypeStart="none",r.setEdge(s,l,p,s+"-cyclic-special-0"),r.setEdge(l,h,f,s+"-cyclic-special-1"),r.setEdge(h,s,g,s+"-cyclic-special-2")}else r.setEdge(a.start,a.end,{...a},a.id)}),ee.warn("Graph at first:",JSON.stringify(El(r))),ome(r),ee.warn("Graph after XAX:",JSON.stringify(El(r)));let n=De();await gme(i,r,e.type,e.diagramId,void 0,n)},"render")});var kme={};Kt(kme,{captureNodeSizes:()=>Tme,shouldCaptureSizes:()=>vme});function OI(){if(!(typeof globalThis>"u"))return globalThis}function vme(){return!!OI()?.mermaidCaptureSizes}function bme(){return typeof location>"u"?"browser-dev":`${location.pathname}${location.search}`}function xme(e,t){let r=OI();if(!r)return;let i=t.node(),n=((i&&"ownerSVGElement"in i?i.ownerSVGElement:null)??i)?.id??"(unknown)";r.mermaidCapturedSizes??=[];let a={svgId:n,sizes:e};r.mermaidCapturedSizes.push(a),r.mermaidLastCapturedSizes=a}function Tme(e,t){let r=[];for(let i of t.nodes)i.isGroup||r.push({id:i.id,width:i.width??0,height:i.height??0});r.length!==0&&xme({metadata:{captureVersion:1,capturedAt:new Date().toISOString(),capturedFrom:bme()},nodes:r},e)}var Cme=Tt(()=>{vt();o(OI,"getCaptureGlobal");o(vme,"shouldCaptureSizes");o(bme,"capturedFromLocation");o(xme,"emitCapturedSizes");o(Tme,"captureNodeSizes")});var hye={};Kt(hye,{render:()=>cye});async function Rme(e,t){let r=new ln({multigraph:!0,compound:!0}),i=[...t.edges],n=De(),a=e.insert("g").attr("class","root"),s=a.insert("g").attr("class","clusters"),l=a.insert("g").attr("class","edges edgePath"),h=a.insert("g").attr("class","edgeLabels"),u=a.insert("g").attr("class","nodes"),d=new Map,p=e.node()!=null;await Promise.all(t.nodes.map(async f=>{if(f.isGroup)r.setNode(f.id,{...f});else{if(p){let g=await wh(u,f,{config:n,dir:f.dir}),m=g.node()?.getBBox()??{width:0,height:0};d.set(f.id,g),f.width=m.width,f.height=m.height}r.setNode(f.id,{...f})}}));for(let f of i)r.setEdge(f.start,f.end,{...f},f.id),t.edges.some(g=>g.id===f.id)||t.edges.push(f);if(globalThis.mermaidCaptureSizes){let{captureNodeSizes:f}=await Promise.resolve().then(()=>(Cme(),kme));f(e,t)}return{graph:r,groups:{clusters:s,edgePaths:l,edgeLabels:h,nodes:u,rootGroups:a},nodeElements:d}}function SC(e){let t=[];for(let r=0;r=1-xC||f<=xC||f>=1-xC?null:{point:{x:e.x+p*n,y:e.y+p*a},tA:p,tB:f}}function qI(e){return Math.abs(e.b.x-e.a.x)>=Math.abs(e.b.y-e.a.y)}function $me(e){let t=[];for(let r=0;r=Math.abs(r)?t>=0?1:0:r>=0?1:0}function Dme(e,t){if(e.length<2)return e.map(a=>({...a}));let r=e.map(a=>({...a})),i=t.arrowTypeStart&&Ln[t.arrowTypeStart];if(i){let a=e[0],s=e[1],l=Math.atan2(s.y-a.y,s.x-a.x);r[0].x=a.x+i*Math.cos(l),r[0].y=a.y+i*Math.sin(l)}let n=t.arrowTypeEnd&&Ln[t.arrowTypeEnd];if(n){let a=e.length,s=e[a-2],l=e[a-1],h=Math.atan2(l.y-s.y,l.x-s.x);r[a-1].x=l.x-n*Math.cos(h),r[a-1].y=l.y-n*Math.sin(h)}return r}function Mme(e,t,r,i,n){let a=e.point.x,s=e.point.y,l={x:a-t*e.r,y:s-r*e.r},h={x:a+t*e.r,y:s+r*e.r},u=[`L${em(l)}`];return n==="arc"?u.push(`A${_l(e.r)},${_l(e.r)} 0 0 ${i} ${em(h)}`):u.push(`M${em(h)}`),u}function jI(e,t,r,i){let n=t.x-e.x,a=t.y-e.y,s=r.x-t.x,l=r.y-t.y,h=Math.hypot(n,a),u=Math.hypot(s,l);if(h0){let x=jI(n[u-1],n[u],n[u+1]??n[u],wme);x&&(y=x.cutLen)}let b=p,v=null;a&&ux.t-k.t);for(let x of T)x.r=Math.min(x.r,x.d-y,b-x.d);for(let x=0;xk){let C=k/2;T[x].r=Math.min(T[x].r,C),T[x+1].r=Math.min(T[x+1].r,C)}}for(let x of T)x.r=2?i:null}catch{return null}}function Fme(e,t,r){if(!r.enabled)return;let i=e.node();if(!i)return;let n=new Map;for(let u of t)n.set(u.id,u);let a=[],s=new Map;for(let u of t){let d=typeof CSS<"u"&&CSS.escape?CSS.escape(u.id):u.id,p=i.querySelector(`path[data-id="${d}"]`);if(!p)continue;s.set(u.id,p);let f=Pme(p.getAttribute("data-points"))??u.points;a.push({...u,points:f})}let l=$me(a);if(l.length===0)return;let h=new Map;for(let u of l){let d=h.get(u.jumpEdgeId)??[];d.push(u),h.set(u.jumpEdgeId,d)}for(let u of a){let d=h.get(u.id);if(!d||d.length===0)continue;let p=n.get(u.id)?.curve;if(p!==void 0&&!Bme(p))continue;let f=s.get(u.id);if(!f)continue;if(p===void 0){let T=f.getAttribute("d")??"";if(!Ome(T))continue}let g=f.getAttribute("style")??"",m=/stroke-dasharray\s*:\s*0\s+([\d.]+)\s+[\d.]+\s+([\d.]+)/.exec(g),y=m?Number.parseFloat(m[1]):null,b=m?Number.parseFloat(m[2]):null,v=Nme(u,d,r);if(f.setAttribute("d",v),y!==null&&b!==null&&typeof f.getTotalLength=="function"){let T=f.getTotalLength(),x=Math.max(0,T-y-b),k=`0 ${y} ${x} ${b}`,C=g.replace(/stroke-dasharray\s*:[^;]*;?/g,`stroke-dasharray: ${k};`).replace(/;\s*;+/g,";");f.setAttribute("style",C)}}}async function zme(e,t){for(let n of e.nodes)n.isGroup?await Vu(t.clusters,n):qp(n);let r=new Map;for(let n of e.nodes)n?.id&&r.set(n.id,n);for(let n of e.edges){let a=n.start?r.get(n.start)??{}:{},s=n.end?r.get(n.end)??{}:{},l=F0(t.edgePaths,{...n},{},e.type,a,s,e.diagramId);n.label&&await jp(t.rootGroups,n),n.label&&qme(n,l)}let i=e.config?.swimlane?.lineHops;if(i!==!1){let n=i==="gap"?"gap":"arc",a=e.edges.filter(s=>Array.isArray(s.points)&&s.points.length>=2).map(s=>({id:s.id,points:s.points,curve:s.curve,arrowTypeStart:s.arrowTypeStart,arrowTypeEnd:s.arrowTypeEnd}));Fme(t.edgePaths,a,{enabled:!0,jumpRadius:6,jumpStyle:n})}}function qme(e,t){let r=t?.updatedPath??t?.originalPath,i=Rt(),{subGraphTitleTotalMargin:n}=Tl({flowchart:i.flowchart??{}});if(e.label){let a=P0.get(e.id),s=e.x,l=e.y;if(r){let h=Wt.calcLabelPosition(r);ee.debug("Moving label "+e.label+" from (",s,",",l,") to (",h.x,",",h.y,") abc88"),t&&(s=h.x,l=h.y)}a.attr("transform",`translate(${s}, ${l+n/2})`)}if(e?.startLabelLeft){let a=an.get(e.id).startLeft,s=e?.x,l=e?.y;if(r){let h=Wt.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_left",r);s=h.x,l=h.y}a.attr("transform",`translate(${s}, ${l})`)}if(e.startLabelRight){let a=an.get(e.id).startRight,s=e.x,l=e.y;if(r){let h=Wt.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_right",r);s=h.x,l=h.y}a.attr("transform",`translate(${s}, ${l})`)}if(e.endLabelLeft){let a=an.get(e.id).endLeft,s=e.x,l=e.y;if(r){let h=Wt.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_left",r);s=h.x,l=h.y}a.attr("transform",`translate(${s}, ${l})`)}if(e.endLabelRight){let a=an.get(e.id).endRight,s=e.x,l=e.y;if(r){let h=Wt.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_right",r);s=h.x,l=h.y}a.attr("transform",`translate(${s}, ${l})`)}}function GI(e){return Math.max(e.padding??20,20)}function jme(e){let{x:t,y:r,width:i,height:n}=e,a=e.swimlaneContentTop;if(typeof t!="number"||typeof r!="number"||typeof i!="number"||typeof n!="number"||typeof a!="number"||!Number.isFinite(t)||!Number.isFinite(r)||!Number.isFinite(i)||!Number.isFinite(n)||!Number.isFinite(a)||i<=0||n<=0){delete e.groupTitleRect;return}let s=r-n/2,l=Math.min(a,r+n/2),h=Math.min(21,Math.max(0,l-s)),u=s+h;if(u<=s){delete e.groupTitleRect;return}e.groupTitleRect={left:t-i/2,right:t+i/2,top:s,bottom:u}}function Gme(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 i=r.filter(a=>!a.isGroup&&!a.parentId);if(i.length===0)return;let n=r.find(a=>a.id===BI);n?n.isGroup&&(n.shape="swimlane",t&&(n.direction=t)):(n={id:BI,label:"",isGroup:!0,shape:"swimlane",padding:20,...t?{direction:t}:{}},r.push(n));for(let a of i)a.parentId=BI}function Wme(e){let t=new Map;for(let s of e.nodes??[])t.set(s.id,s);let r=[];for(let s of e.edges??[]){let l=typeof s.start=="string"?s.start:void 0,h=typeof s.end=="string"?s.end:void 0;!l||!h||s.labelNodeId||r.push({id:s.id,src:l,dst:h,ref:s})}let i=e.nodes??[],n=i.filter(s=>s.isGroup),a=i.filter(s=>!s.isGroup);return{nodes:[...[...n].reverse(),...a].map(s=>s.id),edges:r,layout:e,nodeById:t}}function Ume(e,t,r,i){let{layout:n}=e,a=e.nodeById,s=i?.layerGap??100,l=i?.nodeGap??40,h=0;for(let f of t.layers){let g=0;for(let m of f){let y=a.get(m);if(!y){g++;continue}y.layer=h,y.order=g;let b=r.x[m]??g*l,v=r.y[m]??h*s;y.x=b,y.y=v,g++}h++}let u=n.nodes??[],d=new Map,p=[];for(let f of u){if(!f?.isGroup)continue;f.parentId||p.push(f);let g=u.filter(T=>T.parentId===f.id),m=1/0,y=-1/0,b=1/0,v=-1/0;for(let T of g){let x=T.x??r.x[T.id],k=T.y??r.y[T.id],C=T.width??0,E=T.height??0;x!=null&&k!=null&&(m=Math.min(m,x-C/2),y=Math.max(y,x+C/2),b=Math.min(b,k-E/2),v=Math.max(v,k+E/2))}if(m===1/0||b===1/0)f.x=f.x??0,f.y=f.y??0,f.width=f.width??0,f.height=f.height??0;else{let T=f.padding??20,x=f.parentId?T:2*GI(f),k=T,C=Math.max(0,y-m)+x,E=Math.max(0,v-b)+k,w=(m+y)/2,_=(b+v)/2;f.x=w,f.y=_,f.width=C,f.height=E,d.set(f.id,{minX:m,maxX:y,minY:b,maxY:v})}}if(p.length>0&&d.size>0){let f=1/0,g=-1/0,m=0;for(let y of p){let b=y.padding??20;b>m&&(m=b);let v=d.get(y.id);v&&(f=Math.min(f,v.minY),g=Math.max(g,v.maxY))}if(f!==1/0&&g!==-1/0){let y=Math.max(0,g-f),b=Math.max(m,36),v=y+2*b,T=(f+g)/2;for(let _ of p)_.y=T,_.height=v,_.swimlaneContentTop=f;let x=[...p].sort((_,L)=>{let N=_.x??0,D=L.x??0;return N-D}),k=[],C=[],E=[];for(let _ of x){let L=d.get(_.id);if(!L)continue;let N=Math.max(0,L.maxX-L.minX)+2*GI(_),D=(L.minX+L.maxX)/2;k.push(_.id),C.push(D),E.push(N)}let w=k.length;if(w>0){let _=new Map;if(w===1)_.set(k[0],E[0]);else{let L=[];for(let A=0;A0&&n>0?{cx:t,cy:r,rect:tm(t,r,i,n)}:void 0}function T9(e){if(e.isGroup)return;let t=x9(e);return t?{id:String(e.id??""),cx:t.cx,cy:t.cy,rect:t.rect}:void 0}function Fo(e,t,r=.001){return Math.abs(e.x-t.x)r}function hn(e,t,r=.001){return Gr(e,t,r)&&Math.abs(e.y-t.y)>r}function ps(e,t,r,i){return Math.max(0,Math.min(Math.max(e,t),Math.max(r,i))-Math.max(Math.min(e,t),Math.min(r,i)))}function yc(e,t,r=.001){return e.horizontal&&t.horizontal&&Xr(e.a,t.a,r)?ps(e.a.x,e.b.x,t.a.x,t.b.x):e.vertical&&t.vertical&&Gr(e.a,t.a,r)?ps(e.a.y,e.b.y,t.a.y,t.b.y):0}function rm(e,t=.001){let r=[];for(let i=0;i0?r[r.length-1]:void 0;(!n||!Fo(n,i,t))&&r.push({x:i.x,y:i.y})}return r}function k9(e,t=.001){if(!e||e.length!==4)return;let[r,i,n,a]=e;return cn(r,i,t)&&hn(i,n,t)&&cn(n,a,t)?{kind:"HVH",p0:r,p1:i,p2:n,p3:a}:hn(r,i,t)&&cn(i,n,t)&&hn(n,a,t)?{kind:"VHV",p0:r,p1:i,p2:n,p3:a}:void 0}function OC(e,t,r,i=0){let n=Math.min(e.x,t.x),a=Math.max(e.x,t.x),s=Math.min(e.y,t.y),l=Math.max(e.y,t.y);return a>r.left-i&&nr.top-i&&st.left+r&&e.xt.top+r&&e.y=t.right&&e.top<=t.top&&e.bottom>=t.bottom}function _C(e,t){return e.leftt.left&&e.topt.top}function WI(e,t){return{left:e.left-t,right:e.right+t,top:e.top-t,bottom:e.bottom+t}}function tm(e,t,r,i){return{left:e-r/2,right:e+r/2,top:t-i/2,bottom:t+i/2}}function Fs(e){return x9(e)?.rect}function hf(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 w9(e,t,r,i,n,a=.001){let s=t==="left"||t==="right",l=i==="left"||i==="right";if(s&&l){if(t==="right"&&i==="left"&&e.xr.x){if(Xr(e,r,a))return[e,r];let d=(e.x+r.x)/2;return[e,{x:d,y:e.y},{x:d,y:r.y},r]}if(t===i){if(Xr(e,r,a))return;let d=t==="left"?Math.min(e.x,r.x)-n:Math.max(e.x,r.x)+n;return[e,{x:d,y:e.y},{x:d,y:r.y},r]}return}if(!s&&!l){if(t===i){if(Gr(e,r,a))return;let p=t==="top"?Math.min(e.y,r.y)-n:Math.max(e.y,r.y)+n;return[e,{x:e.x,y:p},{x:r.x,y:p},r]}if(!(t==="bottom"&&i==="top"&&e.yr.y))return;if(Gr(e,r,a))return[e,r];let d=(e.y+r.y)/2;return[e,{x:e.x,y:d},{x:r.x,y:d},r]}if(s&&!l){let d=t==="right"&&r.x>e.x||t==="left"&&r.xr.y;return d&&p?[e,{x:r.x,y:e.y},r]:void 0}let h=t==="bottom"&&r.y>e.y||t==="top"&&r.yr.x;return h&&u?[e,{x:e.x,y:r.y},r]:void 0}function E9(e,t,r,i){return t==="left"||t==="right"?[e,{x:i,y:e.y},{x:i,y:r.y},r]:[e,{x:e.x,y:i},{x:r.x,y:i},r]}function BC(e){let t=new Map,r=[];for(let i of e){if(i.isEdgeLabel)continue;let n=T9(i);n&&(t.set(n.id,n),r.push({id:n.id,rect:n.rect}))}return{nodeInfoById:t,realNodeRects:r}}function Ju(e){let t=[],r=[];for(let i of e){let n=T9(i);if(!n)continue;let a={id:n.id,rect:n.rect};i.isEdgeLabel?r.push(a):t.push(a)}return{realNodeRects:t,labelNodeRects:r}}function Hme(e,{includeEdgeLabels:t=!0}={}){let r=[];for(let i of e){if(i.isGroup||!t&&i.isEdgeLabel)continue;let n=i.x??0,a=i.y??0,s=i.width??0,l=i.height??0;r.push({nodeId:i.id,...tm(n,a,s,l)})}return r}function S9(e,t,r=.001){let i=e.start,n=e.end;if(!i||!n)return;let a=t.get(i),s=t.get(n);if(!(!a||!s))return{srcId:i,dstId:n,srcInfo:a,dstInfo:s,collinearX:Math.abs(a.cx-s.cx)m||fv)return!1;let T=Math.abs(y-d.a.x)n:a&&l&&Xr(e,r,n)?ps(e.x,t.x,r.x,i.x)>n:!1}function AC(e,t,r,i,{epsilon:n=.001,skipDegenerateOther:a=!1}={}){for(let s of r){if(s===i||s.isLayoutOnly)continue;let l=s.points;if(!(!l||l.length<2))for(let h=0;hf+n&&my+n&&pi+.001&&e=2?t[t.length-2]:void 0,l=s&&Gr(s,n)?{x:n.x,y:a.y}:{x:a.x,y:n.y};t.push(l)}t.push(a)}let r=[];for(let i of t){let n=r[r.length-1];(!n||!Fo(n,i))&&r.push(i)}return r}function vc(e){if(e.length<3)return e;let t=[...e];for(let r=0;r<32;r++){let i=Zme(t);if(t=i.points,!i.changed)break}return t}function A9(e,t,r){let i=e;if(i.isLayoutOnly||!i.points||i.points.length=0&&n=e.length)return e;let a=n-i;if(a<0||a>=e.length)return e;let s=Qme(e[n],e[a],t);return r?[s,...e.slice(n)]:[...e.slice(0,n+1),s]}function Jme(e,t){for(let r of e){let i=A9(r,t,2);if(!i)continue;let n=[...i.points];i.srcRect&&(n=VI(n,i.srcRect,!0)),i.dstRect&&(n=VI(n,i.dstRect,!1)),n=vc(RC(n)),n=R9(n,i.srcRect,i.dstRect),i.edge.points=vc(RC(n))}}function YI(e,t,r,i=!1){if(Xr(e,t,mr)){if(t.yr.bottom+mr)return t;if(i){if(e.xr.right+mr)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(Gr(e,t,mr)){if(t.xr.right+mr)return t;if(i){if(e.yr.bottom+mr)return{x:e.x,y:r.bottom}}let n=Math.abs(t.y-r.top)<=Math.abs(t.y-r.bottom);return{x:e.x,y:n?r.top:r.bottom}}return t}function LC(e,t,r){let i=e[t];for(let n=t+r;n>=0&&ni.lo)),r=Math.min(...e.map(i=>i.hi));if(!(t>r))return{lo:t,hi:r}}function XI(e,t){return t==="left"||t==="right"?$C(e.top,e.bottom):$C(e.left,e.right)}function IC(e,t,r){let i=e.y>=r.top-mr&&e.y<=r.bottom+mr,n=e.x>=r.left-mr&&e.x<=r.right+mr;if(Xr(e,t,mr)&&i){if(Math.abs(e.x-r.left)0?e1e(a):void 0}function KI(e,t,r,i,n){let a=t1e(e,t,r,i,n);if(!a)return;let s=n?e.y:e.x,l=Math.min(a.hi,Math.max(a.lo,s));if(!(Math.abs(l-s)({...l}));for(let l=t;l>=0&&l=r.left-mr&&Math.max(e.x,t.x)<=r.right+mr,n=Math.min(e.y,t.y)>=r.top-mr&&Math.max(e.y,t.y)<=r.bottom+mr;if(Math.abs(e.y-r.top)i.bottom+mr;case"left":return Xr(t,r,mr)&&r.xi.right+mr}}function e9(e,t,r){if(e.length<3)return e;if(r){let a=QI(e[0],e[1],t);return a&&JI(a,e[1],e[2],t)?e.slice(1):e}let i=e.length-1,n=QI(e[i-1],e[i],t);return n&&JI(n,e[i-1],e[i-2],t)?e.slice(0,i):e}function n1e(e,t,r){let i=e;if(t){let a=LC(i,0,1);if(a){let s=YI(a,i[0],t);s!==i[0]&&(i=[s,...i.slice(1)])}i=e9(i,t,!0)}if(r){let a=i.length-1,s=LC(i,a,-1);if(s){let l=YI(s,i[a],r,!0);l!==i[a]&&(i=[...i.slice(0,a),l])}i=e9(i,r,!1)}let n=R9(i,t,r);return n!==i||i.length===2?n:(t&&(i=ZI(i,t,!0)),r&&(i=ZI(i,r,!1)),i)}function t9(e,t){for(let r of e){let i=A9(r,t,2);if(!i)continue;let n=ri(i.points,mr),a=n1e(n,i.srcRect,i.dstRect);if(a.length<3){i.edge.points=a;continue}let s=[a[0],{...a[0]},...a.slice(1,-1),a[a.length-1],{...a[a.length-1]}];i.edge.points=s}}function L9(e){return new Map(e.map(t=>[t.id,t]))}function a1e(e,t){let r=e.parentId,i=null;for(;r;){let n=t.get(r);if(!n?.isGroup)break;i=n.id,r=n.parentId}return i}function r9(e,t){let r=0,i=e.parentId;for(;i;){let n=t.get(i);if(!n?.isGroup)break;r++,i=n.parentId}return r}function $9(e){let t=1/0,r=-1/0,i=1/0,n=-1/0;for(let a of e){let s=a.x,l=a.y;if(typeof s!="number"||typeof l!="number")continue;let h=a.width??0,u=a.height??0;t=Math.min(t,s-h/2),r=Math.max(r,s+h/2),i=Math.min(i,l-u/2),n=Math.max(n,l+u/2)}return t===1/0||i===1/0?null:{minX:t,maxX:r,minY:i,maxY:n}}function s1e(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 o1e(e){let t=L9(e),r=e.filter(i=>i.isGroup&&i.parentId).sort((i,n)=>r9(n,t)-r9(i,t));for(let i of r){let n=e.filter(s=>s.parentId===i.id),a=$9(n);a&&s1e(i,a)}}function DC(e,t){let r=e.nodes??[],i=e.edges??[],n=r.filter(h=>!h.isGroup),a=1/0,s=-1/0;for(let h of n){let u=h[t];typeof u=="number"&&(a=Math.min(a,u),s=Math.max(s,u))}if(!Number.isFinite(a)||!Number.isFinite(s))return!1;let l=o(h=>a+s-h,"mirror");for(let h of r){let u=h[t];typeof u=="number"&&(h[t]=l(u));let d=h.groupTitleRect;d&&(h.groupTitleRect=t==="x"?{...d,left:l(d.right),right:l(d.left)}:{...d,top:l(d.bottom),bottom:l(d.top)})}for(let h of i)for(let u of h.points??[])u[t]=l(u[t]);return!0}function l1e(e){return(e.nodes??[]).some(t=>!t.isGroup)?DC(e,"y"):!0}function c1e(e,t="LR"){let r=e.nodes??[],i=e.edges??[],n=r.filter(D=>!D.isGroup),a=1/0,s=1/0;for(let D of n){let M=D.x??0,B=D.y??0;M0?Math.max(1,d/p):1;for(let D of n){let M=D.x??0,B=((D.y??0)-s)*f+l,A=M-a;D.x=B,D.y=A}for(let D of i)if(D.points)for(let M of D.points){let B=M.x,A=(M.y-s)*f+l,I=B-a;M.x=A,M.y=I}o1e(r);let g=r.filter(D=>D.isGroup&&!D.parentId);if(g.length===0)return t==="RL"&&DC(e,"x"),!0;let m=L9(r),y=new Map;for(let D of r){if(D.isGroup)continue;let M=a1e(D,m);if(!M)continue;let B=y.get(M)??[];B.push(D),y.set(M,B)}let b=0;for(let D of g){let M=D.padding??0;M>b&&(b=M)}let v=[],T=1/0,x=-1/0;for(let D of g){let M=y.get(D.id)??[],B=$9(M);B&&(T=Math.min(T,B.minX),x=Math.max(x,B.maxX),v.push({lane:D,contentTop:B.minY,contentBottom:B.maxY,centerY:(B.minY+B.maxY)/2}))}if(T===1/0||x===-1/0)return!0;let k=Math.max(0,x-T),C=Math.max(b,10),E=k+2*C,w=l+E,_=(T+x)/2-E/2-l,L=_+w/2,N=Math.max(b,l);v.sort((D,M)=>D.centerY-M.centerY);for(let D=0;Df.cy?v.bottom:v.top,D=f.cx+T;if(D<=v.left+Sl||D>=v.right-Sl)continue;x={x:D,y:N},k={x:D,y:l.y},C={x:l.x,y:l.y}}else{let N=g.cx>f.cx?v.right:v.left,D=f.cy+T;if(D<=v.top+Sl||D>=v.bottom-Sl)continue;x={x:N,y:D},k={x:l.x,y:D},C={x:l.x,y:l.y}}let E=Fo(x,k,Sl),w=Fo(k,C,Sl);if(E&&w||!E&&bn(x,k,i,[d],1)||!w&&bn(k,C,i,[p],1))continue;let _=!E&&AC(x,k,e,n,{epsilon:Sl,skipDegenerateOther:!0}),L=!w&&AC(k,C,e,n,{epsilon:Sl,skipDegenerateOther:!0});if(!(_||L)){E?b=[k,C]:w?b=[x,k]:b=[x,k,C];break}}b&&(n.points=b)}}function u1e(e,t){let{realNodeRects:r,labelNodeRects:i}=Ju(t.values());for(let n of e){if(n.isLayoutOnly)continue;let a=n.points;if(!a||a.length<4)continue;let s=ri(a,.001);if(s.length<4)continue;let l=s.length-1,h=s[l],u=s[l-1],d=s[l-2],p=h.x-u.x,f=h.y-u.y,g=Math.hypot(p,f);if(g>=10||g<.001)continue;let m=u.x-d.x,y=u.y-d.y;if(Math.hypot(m,y)<.001)continue;let b=cn(u,h,.001),v=hn(u,h,.001),T=cn(d,u,.001),x=hn(d,u,.001);if(!(b&&x||v&&T))continue;let k=n.end,C=n.start,E=k?t.get(k):void 0;if(!E)continue;let w=E.x??0,_=E.y??0,L=Fs(E);if(!L)continue;let N,D;if(x){let R=y<0;N={x:w,y:d.y},D={x:w,y:R?L.bottom:L.top}}else{let R=m>0;N={x:d.x,y:_},D={x:R?L.right:L.left,y:_}}if(bn(N,D,r,k?[k]:[],-2)||bn(N,D,i,[],-2))continue;if(C){let R=t.get(C),$=R?Fs(R):void 0;if($&&C9(N,$,2))continue}let M=o((R,$)=>`${R.x.toFixed(3)},${R.y.toFixed(3)}|${$.x.toFixed(3)},${$.y.toFixed(3)}`,"ownSegmentKey"),B=new Set;for(let R=0;R{for(let F of e){if(F===n||F.isLayoutOnly)continue;let P=F.points;if(!(!P||P.length<2))for(let z=0;z=0){let R=s[l-3],$=[C,k].filter(F=>!!F);if(bn(R,N,r,$,-2)||A(R,N))continue}let I=[...s.slice(0,l-2),N,D];n.points=I;let O=n.labelNodeId;if(O){let R=t.get(O);if(R){let $=R.width??0,F=R.height??0;if($>0&&F>0){let P,z,q=-1;for(let G=0;G=$+2||se&&H>=F+2)&&H>q&&(q=H,P=(W.x+J.x)/2,z=(W.y+J.y)/2)}P!==void 0&&z!==void 0&&(R.x=P,R.y=z)}}}}}function d1e(e,t){let r=o((p,f)=>{let g=p.x??0,m=p.y??0,y=f.x-g,b=f.y-m,v=(p.width??0)/2,T=(p.height??0)/2;return Math.abs(b)*v>Math.abs(y)*T?(b<0&&(T=-T),{x:g+(b===0?0:T*y/b),y:m+T}):(y<0&&(v=-v),{x:g+v,y:m+(y===0?0:v*b/y)})},"rectIntersect"),i=o((p,f)=>{let g=ri(p.points??[]);if(g.length<2)return;let m=f?p.start:p.end,y=m?t.get(m):void 0,b=y?Fs(y):void 0;if(!y||!m||!b)return;let v=f?g[0]:g[g.length-1],T=f?g[1]:g[g.length-2],x=r(y,v),k=v;if(PI(T,x)&&(k=T),Gr(x,k,Ut))return{edge:p,edgeId:String(p.id??""),nodeId:m,atStart:f,orientation:"V",coord:x.x,min:Math.min(x.y,k.y),max:Math.max(x.y,k.y),boundary:x,railEnd:k,rect:b};if(Xr(x,k,Ut))return{edge:p,edgeId:String(p.id??""),nodeId:m,atStart:f,orientation:"H",coord:x.y,min:Math.min(x.x,k.x),max:Math.max(x.x,k.x),boundary:x,railEnd:k,rect:b}},"terminalLaneFor"),n=o((p,f)=>Math.max(0,Math.min(p.max,f.max)-Math.max(p.min,f.min)),"projectedOverlapLength"),a=o((p,f)=>p.nodeId!==f.nodeId||p.orientation!==f.orientation?!1:p.orientation==="H"?(Math.abs(p.boundary.x-p.rect.left)<1||Math.abs(p.boundary.x-p.rect.right)<1)&&Gr(p.boundary,f.boundary,1):(Math.abs(p.boundary.y-p.rect.top)<1||Math.abs(p.boundary.y-p.rect.bottom)<1)&&Xr(p.boundary,f.boundary,1),"sameTerminalFace"),s=o((p,f)=>p.nodeId!==f.nodeId||p.orientation!==f.orientation?!1:n(p,f)>=Qn&&Math.abs(p.coord-f.coord)<.5,"exactTerminalLaneConflict"),l=o((p,f)=>{if(p.nodeId!==f.nodeId||p.orientation!==f.orientation||p.orientation!=="H"||p.atStart===f.atStart)return!1;let g=n(p,f);if(g2*m?!1:a(p,f)&&Math.abs(p.coord-f.coord)<16},"nearTerminalLaneConflict"),h=o((p,f)=>{let g=ri(p.edge.points??[]);if(g.length<2)return;let m=p.orientation==="V"?{x:p.boundary.x+f,y:p.boundary.y}:{x:p.boundary.x,y:p.boundary.y+f},y=p.orientation==="V"?{x:p.railEnd.x+f,y:p.railEnd.y}:{x:p.railEnd.x,y:p.railEnd.y+f};if(!o(()=>Math.abs(p.boundary.y-p.rect.top)<1||Math.abs(p.boundary.y-p.rect.bottom)<1?Xr(m,p.boundary,Ut)&&m.x>=p.rect.left+1&&m.x<=p.rect.right-1:Math.abs(p.boundary.x-p.rect.left)<1||Math.abs(p.boundary.x-p.rect.right)<1?Gr(m,p.boundary,Ut)&&m.y>=p.rect.top+1&&m.y<=p.rect.bottom-1:!1,"boundaryStaysOnSameFace")())return;if(p.atStart){let x=g.length>1&&Fo(g[1],p.railEnd,Ut),k=g.slice(x?2:1),C=k[0];return C&&!PI(C,y)?void 0:[m,y,...k]}let b=g.length>1&&Fo(g[g.length-2],p.railEnd,Ut),v=g.slice(0,b?-2:-1),T=v[v.length-1];if(!(T&&!PI(T,y)))return[...v,y,m]},"shiftedCandidate"),u=o(p=>{let f=p.edge,g=ri(f.points??[]);if(g.length!==2)return!1;let m=f.start,y=f.end,b=m?t.get(m):void 0,v=y?t.get(y):void 0;if(!b||!v)return!1;let T=b.x??0,x=b.y??0,k=v.x??0,C=v.y??0,[E,w]=g;return Xr(E,w,Ut)&&Math.abs(x-C)<1&&Math.abs(T-k)>1||Gr(E,w,Ut)&&Math.abs(T-k)<1&&Math.abs(x-C)>1},"laneIsStraightCollinearConnector"),d=[-7,7,-14,14,-21,21];for(let p=0;p<8;p++){let f=e.filter(m=>!m.isLayoutOnly).flatMap(m=>[i(m,!0),i(m,!1)]).filter(m=>!!m),g=!1;for(let m=0;m{let E=u(k),w=u(C);return E!==w?Number(E)-Number(w):+!C.atStart-+!k.atStart});for(let k of x){for(let C of d){let E=h(k,C);if(!E)continue;let w=i({...k.edge,points:E},k.atStart);if(!(!w||f.some(_=>_.edge!==k.edge&&(s(w,_)||T&&l(w,_))))){k.edge.points=E,g=!0;break}}if(g)break}}if(!g)return}}function p1e(e,t){let{realNodeRects:r,labelNodeRects:i}=Ju(t.values()),n=o((s,l)=>{let h=s.start,u=s.end,d=Mr(l);if(d.length!==l.length-1)return!1;let p=[h,u].filter(f=>!!f);for(let f of d)if(bn(f.a,f.b,r,p,-2)||bn(f.a,f.b,i,[],-2))return!1;for(let f of e){if(f===s||f.isLayoutOnly)continue;let g=f.points;if(!(!g||g.length<2)){for(let m of d)for(let y of Mr(ri(g)))if(yc(m,y,.5)>=Qn||_h(m.a,m.b,y.a,y.b,Ut))return!1}}return!0},"candidateIsSafe"),a=o((s,l)=>{if(l+4>=s.length)return;let h=s[l],u=s[l+1],d=s[l+2],p=s[l+3],f=s[l+4],g=cn(h,u)&&hn(u,d)&&cn(d,p)&&hn(p,f)&&Gr(h,p,Ut)&&Gr(h,f,Ut)&&Gr(u,d,Ut)&&(u.x-h.x)*(p.x-d.x)<0,m=hn(h,u)&&cn(u,d)&&hn(d,p)&&cn(p,f)&&Xr(h,p,Ut)&&Xr(h,f,Ut)&&Xr(u,d,Ut)&&(u.y-h.y)*(p.y-d.y)<0;if(g||m)return ri([...s.slice(0,l+1),f,...s.slice(l+5)]);if(l+5>=s.length)return;let y=s[l+5],b=hn(h,u)&&cn(u,d)&&hn(d,p)&&cn(p,f)&&hn(f,y)&&Gr(h,f,Ut)&&Gr(h,y,Ut)&&Gr(d,p,Ut)&&(d.x-u.x)*(f.x-p.x)<0,v=cn(h,u)&&hn(u,d)&&cn(d,p)&&hn(p,f)&&cn(f,y)&&Xr(h,f,Ut)&&Xr(h,y,Ut)&&Xr(d,p,Ut)&&(d.y-u.y)*(f.y-p.y)<0;if(!(!b&&!v))return ri([...s.slice(0,l+1),y,...s.slice(l+6)])},"withoutDogleg");for(let s=0;s<8;s++){let l=!1;for(let h of e){if(h.isLayoutOnly)continue;let u=ri(h.points??[]);for(let d=0;d<=u.length-5;d++){let p=a(u,d);if(!(!p||!n(h,p))){h.points=p,l=!0;break}}if(l)break}if(!l)return}}function i9(e,t){let{realNodeRects:r,labelNodeRects:i}=Ju(t.values()),n=e.filter(p=>!p.isLayoutOnly),a=o((p,f,g)=>ri(p===f?g??[]:p.points??[]),"pointsFor"),s=o((p,f)=>{let g=0;for(let m=0;m{let f=Mr(p);if(f.length!==3)return;let g=f[1];if(!(f[0].horizontal===g.horizontal||f[2].horizontal===g.horizontal))return{index:g.index,horizontal:g.horizontal,vertical:g.vertical,segment:g}},"middleRail"),h=o((p,f)=>{let g=[p.start,p.end].filter(m=>!!m);return r.filter(m=>{if(g.includes(m.id))return!1;let y=m.rect;return f.horizontal?ps(f.a.x,f.b.x,y.left,y.right)>=Qn&&f.a.y>=y.top-2&&f.a.y<=y.bottom+2:ps(f.a.y,f.b.y,y.top,y.bottom)>=Qn&&f.a.x>=y.left-2&&f.a.x<=y.right+2})},"blockingRectsFor"),u=o((p,f,g)=>{let m=p.map(b=>({...b}));if(f.horizontal)m[f.index].y=g,m[f.index+1].y=g;else if(f.vertical)m[f.index].x=g,m[f.index+1].x=g;else return;let y=vc(ri(m));return Mr(y).length===y.length-1?y:void 0},"candidateByMovingRail"),d=o((p,f,g)=>{let m=[p.start,p.end].filter(b=>!!b),y=Mr(f);if(y.length!==f.length-1)return!1;for(let b of y)if(bn(b.a,b.b,r,m,-2)||bn(b.a,b.b,i,[],-2))return!1;for(let b of n)if(b!==p){for(let v of y)for(let T of Mr(a(b)))if(yc(v,T,.5)>=Qn)return!1}return s(p,f)<=g},"candidateIsSafe");for(let p=0;p<8;p++){let f=s(),g=!1;for(let m of n){let y=a(m),b=l(y);if(!b)continue;let v=h(m,b.segment);if(v.length===0)continue;let T=b.horizontal?[Math.min(...v.map(x=>x.rect.top))-20,Math.max(...v.map(x=>x.rect.bottom))+20]:[Math.min(...v.map(x=>x.rect.left))-20,Math.max(...v.map(x=>x.rect.right))+20];for(let x of T){let k=u(y,b.segment,x);if(!(!k||!d(m,k,f))){m.points=k,g=!0;break}}if(g)break}if(!g)return}}function n9(e,t){let r=o(l=>{let h=l.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=o(l=>{if(!l.isGroup||l.parentId)return;let h=l.direction,u=typeof h=="string"?h.toUpperCase():"";if(u==="LR"||u==="RL"||u==="BT")return;let d=r(l),p=l.y,f=l.height;if(!d||typeof p!="number"||typeof f!="number"||!Number.isFinite(p)||!Number.isFinite(f)||f<=0)return;let g=d.right-d.left,m=d.bottom-d.top;if(!(m<=0||g{if(!l.horizontal)return!1;let u=l.a.y;return u<=h.top+Ut||u>=h.bottom-Ut?!1:ps(l.a.x,l.b.x,h.left,h.right)>=Qn},"horizontalSegmentIntersectsTitle"),a=[...t.values()].map(i).filter(l=>!!l);if(a.length===0)return;let s=0;for(let l of e){if(l.isLayoutOnly)continue;let h=ri(l.points??[]);for(let u of Mr(h))for(let d of a)n(u,d.rect)&&(s=Math.max(s,d.rect.bottom-u.a.y+4))}if(!(s<=Ut))for(let l of a){let h=l.node.y,u=l.node.height;typeof h!="number"||typeof u!="number"||!Number.isFinite(h)||!Number.isFinite(u)||u<=0||(l.node.y=h-s/2,l.node.height=u+s,l.node.groupTitleRect={...l.rect,top:l.rect.top-s,bottom:l.rect.bottom-s})}}function a9(e,t){let r=o(h=>{let u=h.groupTitleRect;if(!(!u||typeof u.left!="number"||typeof u.right!="number"||typeof u.top!="number"||typeof u.bottom!="number"||!Number.isFinite(u.left)||!Number.isFinite(u.right)||!Number.isFinite(u.top)||!Number.isFinite(u.bottom)||u.right<=u.left||u.bottom<=u.top))return{left:u.left,right:u.right,top:u.top,bottom:u.bottom}},"validTitleRect"),i=o(h=>{if(!h.isGroup||h.parentId||h.direction!=="LR")return;let u=r(h),d=h.x,p=h.width;if(!u||typeof d!="number"||typeof p!="number"||!Number.isFinite(d)||!Number.isFinite(p)||p<=0)return;let f=u.right-u.left,g=u.bottom-u.top;if(!(f<=0||g{if(!h.vertical)return!1;let d=h.a.x;return d<=u.left+Ut||d>=u.right-Ut?!1:ps(h.a.y,h.b.y,u.top,u.bottom)>=Qn},"verticalSegmentIntersectsTitle"),a=o((h,u)=>{if(!h.horizontal)return!1;let d=h.a.y;return d<=u.top+Ut||d>=u.bottom-Ut?!1:ps(h.a.x,h.b.x,u.left,u.right)>=Qn},"horizontalSegmentIntersectsTitle"),s=[...t.values()].map(i).filter(h=>!!h);if(s.length===0)return;let l=0;for(let h of e){if(h.isLayoutOnly)continue;let u=ri(h.points??[]);for(let d of Mr(u))for(let p of s)if(n(d,p.rect))l=Math.max(l,p.rect.right-d.a.x+4);else if(a(d,p.rect)){let f=Math.min(d.a.x,d.b.x);l=Math.max(l,p.rect.right-f+4)}}if(!(l<=Ut))for(let h of s){let u=h.node.x,d=h.node.width;typeof u!="number"||typeof d!="number"||!Number.isFinite(u)||!Number.isFinite(d)||d<=0||(h.node.x=u-l/2,h.node.width=d+l,h.node.groupTitleRect={...h.rect,left:h.rect.left-l,right:h.rect.right-l})}}function f1e(e,t){let{realNodeRects:r}=Ju(t.values()),i=e.filter(g=>!g.isLayoutOnly),n=o((g,m=new Map)=>ri(m.get(g)??g.points??[]),"replacementPointsFor"),a=o((g=new Map)=>{let m=0;for(let y=0;yi.reduce((m,y)=>m+ho(n(y,g)),0),"totalBends"),l=o(g=>{let m=n(g);if(m.length<4)return;let y=m[m.length-2],b=m[m.length-1];if(!(!cn(y,b,Ut)&&!hn(y,b,Ut)))return{tailStart:y,terminal:b}},"terminalTailFor"),h=o((g,m)=>{let y=n(g);if(y.length<3)return;let b=y[0],v=y[1],T;if(cn(b,v,Ut))T={x:v.x,y:m.tailStart.y};else if(hn(b,v,Ut))T={x:m.tailStart.x,y:v.y};else return;let x=vc(ri([b,v,T,m.tailStart,m.terminal]));return Mr(x).length===x.length-1?x:void 0},"candidateWithDestinationTail"),u=o((g,m)=>{let y=[g.start,g.end].filter(b=>!!b);for(let b of Mr(m))if(bn(b.a,b.b,r,y,-2))return!0;return!1},"pathHasNodeHit"),d=o((g,m,y)=>{for(let b of i)if(b!==g){for(let v of Mr(m))for(let T of Mr(n(b,y)))if(yc(v,T,.5)>=Qn)return!0}return!1},"pathHasSharedTrack"),p=o((g,m,y)=>!u(g,m)&&!d(g,m,y),"candidateIsSafe"),f=o(()=>{let g=new Map;for(let m of i){let y=m.end;if(!y||!t.has(y)||n(m).length<4)continue;let b=g.get(y)??[];b.push(m),g.set(y,b)}return g},"edgesByDestination");for(let g=0;g<4;g++){let m=a();if(m===0)return;let y=s(),b,v=m,T=y;for(let x of f().values())for(let k=0;k=m||B>v||B===v&&A>=T||(b=M,v=B,T=A)}if(!b)return;for(let[x,k]of b)x.points=k}}function g1e(e,t){let{realNodeRects:r,labelNodeRects:i}=Ju(t.values()),n=e.filter(v=>!v.isLayoutOnly),a=o((v,T=new Map)=>ri(T.get(v)??v.points??[]),"replacementPointsFor"),s=o((v=new Map)=>{let T=0;for(let x=0;xn.reduce((T,x)=>T+ho(a(x,v)),0),"totalBends"),h=o(v=>{let T=v.start,x=v.end,k=T?t.get(T):void 0,C=x?t.get(x):void 0,E=k?Fs(k):void 0,w=C?Fs(C):void 0;return E&&w?{src:E,dst:w}:void 0},"endpointRectsFor"),u=o((v,T,x)=>{if(x.index<=0||x.index+1>=T.length-1)return;let k=h(v);if(k){if(x.vertical){let C=x.a.x,E=Math.min(k.src.left,k.dst.left),w=Math.max(k.src.right,k.dst.right),_=Cw+Ut?"right":void 0;return _?{edge:v,points:T,segmentIndex:x.index,axis:"vertical",side:_,coord:C,min:Math.min(x.a.y,x.b.y),max:Math.max(x.a.y,x.b.y)}:void 0}if(x.horizontal){let C=x.a.y,E=Math.min(k.src.top,k.dst.top),w=Math.max(k.src.bottom,k.dst.bottom),_=Cw+Ut?"bottom":void 0;return _?{edge:v,points:T,segmentIndex:x.index,axis:"horizontal",side:_,coord:C,min:Math.min(x.a.x,x.b.x),max:Math.max(x.a.x,x.b.x)}:void 0}}},"externalRailForSegment"),d=o(()=>{let v=[];for(let T of n){let x=a(T);for(let k of Mr(x)){let C=u(T,x,k);C&&v.push(C)}}return v},"collectExternalRails"),p=o((v,T)=>v.edge!==T.edge&&v.axis===T.axis&&v.side===T.side&&ps(v.min,v.max,T.min,T.max)>=Qn,"railsInteract"),f=o(v=>{let T=[],x=new Set;for(let k of v){if(x.has(k))continue;let C=[k],E=[];for(x.add(k);C.length>0;){let w=C.pop();E.push(w);for(let _ of v)!x.has(_)&&p(w,_)&&(x.add(_),C.push(_))}E.length>1&&T.push(E)}return T},"connectedComponents"),g=o(v=>{let T=[];for(let x of v)T.some(k=>Math.abs(k-x.coord){let T=v.map(C=>C.coord),x=g(v),k=[];if(v.length<=6){let C=new Array(x.length).fill(!1),E=[],w=o(()=>{if(E.length===v.length){E.some((_,L)=>Math.abs(_-T[L])>=Ut)&&k.push([...E]);return}for(let[_,L]of x.entries())C[_]||(C[_]=!0,E.push(L),w(),E.pop(),C[_]=!1)},"visit");return w(),k}for(let C=0;C{let x=new Map;for(let[C,E]of v.entries()){let w=T[C],_=x.get(E.edge)??E.points.map(L=>({x:L.x,y:L.y}));E.axis==="vertical"?(_[E.segmentIndex].x=w,_[E.segmentIndex+1].x=w):(_[E.segmentIndex].y=w,_[E.segmentIndex+1].y=w),x.set(E.edge,_)}let k=new Map;for(let[C,E]of x){let w=vc(ri(E));if(Mr(w).length!==w.length-1)return;k.set(C,w)}return k},"replacementsForAssignment"),b=o(v=>{for(let[T,x]of v){let k=[T.start,T.end].filter(C=>!!C);for(let C of Mr(x))if(bn(C.a,C.b,r,k,-2)||bn(C.a,C.b,i,[],-2))return!1}for(let T=0;T=Qn)return!1}}return!0},"candidateIsSafe");for(let v=0;v<4;v++){let T=s();if(T===0)return;let x,k=T,C=l(),E=Number.POSITIVE_INFINITY;for(let w of f(d()))for(let _ of m(w)){let L=y(w,_);if(!L||!b(L))continue;let N=s(L);if(N>=T)continue;let D=l(L),M=w.reduce((B,A,I)=>B+Math.abs(_[I]-A.coord),0);N>k||N===k&&(D>C||D===C&&M>=E)||(x=L,k=N,C=D,E=M)}if(!x)return;for(let[w,_]of x)w.points=_}}function m1e(e,t){let{realNodeRects:r,labelNodeRects:i}=Ju(t.values()),n=e.filter(f=>!f.isLayoutOnly),a=o((f,g,m)=>ri(f===g?m??[]:f.points??[]),"pointsFor"),s=o(f=>Mr(f).reduce((g,m)=>{let y=m.a.x-m.b.x,b=m.a.y-m.b.y;return g+Math.hypot(y,b)},0),"pathLength"),l=o((f,g)=>{let m=0;for(let y=0;y{if(f.horizontal){let m=f.a.y;return(Math.abs(m-g.top)<1||Math.abs(m-g.bottom)<1)&&ps(f.a.x,f.b.x,g.left,g.right)>=Qn}if(f.vertical){let m=f.a.x;return(Math.abs(m-g.left)<1||Math.abs(m-g.right)<1)&&ps(f.a.y,f.b.y,g.top,g.bottom)>=Qn}return!1},"segmentRunsAlongRectBorder"),u=o(f=>{let g=[f.start,f.end].filter(y=>!!y),m=[];for(let y of g){let b=t.get(y),v=b?Fs(b):void 0;v&&m.push(v)}return m},"endpointRectsFor"),d=o((f,g)=>{if(g+3>=f.length)return[];let m=f[g],y=f[g+1],b=f[g+2],v=f[g+3],T=cn(m,y,Ut)&&hn(y,b,Ut)&&cn(b,v,Ut),x=hn(m,y,Ut)&&cn(y,b,Ut)&&hn(b,v,Ut);if(!T&&!x)return[];if(!(T?Math.sign(y.x-m.x)!==Math.sign(v.x-b.x):Math.sign(y.y-m.y)!==Math.sign(v.y-b.y)))return[];let k=Gr(m,v,Ut)||Xr(m,v,Ut)?[]:[{x:m.x,y:v.y},{x:v.x,y:m.y}],C=k.length===0?[[...f.slice(0,g+1),...f.slice(g+3)]]:k.map(w=>[...f.slice(0,g+1),w,...f.slice(g+3)]),E=new Set;return C.map(w=>vc(ri(w))).filter(w=>{if(Mr(w).length!==w.length-1||!w.some(L=>Fo(L,v,Ut)))return!1;let _=w.map(L=>`${L.x.toFixed(3)},${L.y.toFixed(3)}`).join("|");return E.has(_)?!1:(E.add(_),!0)})},"shortcutCandidatesAt"),p=o((f,g,m)=>{let y=[f.start,f.end].filter(v=>!!v),b=u(f);for(let v of Mr(g))if(bn(v.a,v.b,r,y,-2)||bn(v.a,v.b,i,[],-2)||b.some(T=>h(v,T)))return!1;for(let v of n)if(v!==f){for(let T of Mr(g))for(let x of Mr(a(v)))if(yc(T,x,.5)>=Qn)return!1}return l(f,g)<=m},"candidateIsSafe");for(let f=0;f<8;f++){let g=l(),m,y,b=g,v=Number.POSITIVE_INFINITY,T=Number.POSITIVE_INFINITY;for(let x of n){let k=a(x),C=ho(k,Ut),E=s(k);for(let w=0;w<=k.length-4;w++)for(let _ of d(k,w)){let L=ho(_,Ut),N=s(_);if(!(Lb||D===b&&(L>v||L===v&&N>=T)||(m=x,y=_,b=D,v=L,T=N)}}if(!m||!y)return;m.points=y}}function y1e(e,t){let r=[];for(let ie of t.values()){if(ie.isGroup||ie.isEdgeLabel)continue;let me=ie.x??0,oe=ie.y??0,we=Fs(ie);we&&r.push({id:String(ie.id??""),cx:me,cy:oe,rect:we})}if(r.length===0)return;let i=new Map(r.map(ie=>[ie.id,ie])),n=r.map(ie=>({id:ie.id,rect:ie.rect})),a=["top","bottom","left","right"],s={top:Math.min(...r.map(ie=>ie.rect.top))-20,bottom:Math.max(...r.map(ie=>ie.rect.bottom))+20,left:Math.min(...r.map(ie=>ie.rect.left))-20,right:Math.max(...r.map(ie=>ie.rect.right))+20},l=e.filter(ie=>!ie.isLayoutOnly),h=new Map(l.map((ie,me)=>[ie,me])),u=o(ie=>{let me=ie==="left"||ie==="top"?-1:1,oe=[];for(let we=0;we<=2;we++)oe.push(s[ie]+me*20*we);return oe},"outwardTracksForSide"),d=o((ie,me=new Map)=>ri(me.get(ie)??ie.points??[]),"replacementPointsFor"),p=o((ie,me)=>{let oe=0;for(let we of ie)for(let ye of me)_h(we.a,we.b,ye.a,ye.b,Ut)&&oe++;return oe},"crossingCountBetweenSegments"),f=o((ie,me)=>p(Mr(ie),Mr(me)),"crossingCountBetweenPaths"),g=o((ie=new Map)=>{let me=0,oe=[],we=new Set,ye=[],ve=o(ae=>{we.has(ae)||(we.add(ae),ye.push(ae))},"addEdge");for(let ae=0;ae0&&(me+=be,oe.push({first:Pe,second:ge,count:be}),ve(Pe),ve(ge))}}return ye.sort((ae,Pe)=>(h.get(ae)??0)-(h.get(Pe)??0)),{count:me,pairs:oe,edgeSet:we,edges:ye}},"crossingSnapshot"),m=o((ie,me)=>{let oe=new Set(me.keys());if(oe.size===0)return ie.count;let we=0;for(let ve of ie.pairs)(oe.has(ve.first)||oe.has(ve.second))&&(we+=ve.count);let ye=0;for(let ve=0;ve{let me=new Map;for(let ye of ie.pairs){let ve=me.get(ye.first)??new Set;ve.add(ye.second),me.set(ye.first,ve);let ae=me.get(ye.second)??new Set;ae.add(ye.first),me.set(ye.second,ae)}let oe=[],we=new Set;for(let ye of ie.edges){if(we.has(ye))continue;let ve=[ye],ae=[];for(we.add(ye);ve.length>0;){let Pe=ve.pop();ae.push(Pe);for(let X of me.get(Pe)??[])we.has(X)||(we.add(X),ve.push(X))}ae.sort((Pe,X)=>(h.get(Pe)??0)-(h.get(X)??0)),ae.length>1&&oe.push(ae)}return oe},"crossingComponents"),b=o(ie=>[ie.start,ie.end].filter(me=>!!me),"endpointIdsFor"),v=o(ie=>{let me=[];for(let oe of y(ie)){let we=new Set(oe),ye=new Set(oe.flatMap(ae=>b(ae))),ve=[...oe];for(let ae of l)we.has(ae)||b(ae).some(Pe=>ye.has(Pe))&&ve.push(ae);ve.sort((ae,Pe)=>(h.get(ae)??0)-(h.get(Pe)??0)),me.push(ve)}return me},"pairSearchGroups"),T=o((ie,me,oe)=>m(ie,new Map([[me,oe]])),"crossingCountWithSingleReplacement"),x=o(ie=>{let me=new Map;for(let oe of ie.pairs)me.set(oe.first,(me.get(oe.first)??0)+oe.count),me.set(oe.second,(me.get(oe.second)??0)+oe.count);return me},"currentCrossingsByEdge"),k=o(ie=>ie.slice(1).reduce((me,oe,we)=>{let ye=ie[we];return me+Math.abs(oe.x-ye.x)+Math.abs(oe.y-ye.y)},0),"pathLength"),C=o((ie=new Map)=>l.reduce((me,oe)=>me+ho(d(oe,ie)),0),"totalBends"),E=o((ie=new Map)=>l.reduce((me,oe)=>me+k(d(oe,ie)),0),"totalLength"),w=o((ie,me,oe=new Map)=>{let we=Mr(me);for(let ye of l)if(ye!==ie){for(let ve of we)for(let ae of Mr(d(ye,oe)))if(yc(ve,ae,.5)>=Qn)return!0}return!1},"pathHasSegmentConflict"),_=o((ie,me)=>{let oe=[ie.start,ie.end].filter(we=>!!we);for(let we of Mr(me))if(bn(we.a,we.b,n,oe,-2))return!0;return!1},"pathHitsNode"),L=o((ie,me)=>{let oe=vc(ri(me));Mr(oe).length===oe.length-1&&ie.push(oe)},"pushOrthogonalCandidate"),N=o(ie=>ie==="left"||ie==="right","sideIsHorizontal"),D=o((ie,me,oe)=>{switch(me){case"left":return Math.min(ie.x,oe.x)-20;case"right":return Math.max(ie.x,oe.x)+20;case"top":return Math.min(ie.y,oe.y)-20;case"bottom":return Math.max(ie.y,oe.y)+20}},"localTrackForSameSide"),M=o((ie,me,oe,we)=>{let ye=oe==="left"||oe==="top"?-1:1,ve=[D(me,oe,we),s[oe]];for(let ae of ve)for(let Pe=0;Pe<=2;Pe++)L(ie,E9(me,oe,we,ae+ye*20*Pe))},"addSameSideCandidates"),B=o((ie,me,oe,we,ye)=>{for(let ve of u(oe))for(let ae of u(ye))L(ie,[me,{x:ve,y:me.y},{x:ve,y:ae},{x:we.x,y:ae},we])},"addHorizontalToVerticalCandidates"),A=o((ie,me,oe,we,ye)=>{for(let ve of u(oe))for(let ae of u(ye))L(ie,[me,{x:me.x,y:ve},{x:ae,y:ve},{x:ae,y:we.y},we])},"addVerticalToHorizontalCandidates"),I=o((ie,me,oe,we,ye)=>{let ve=[...u("top"),...u("bottom")];for(let ae of u(oe))for(let Pe of u(ye))for(let X of ve)L(ie,[me,{x:ae,y:me.y},{x:ae,y:X},{x:Pe,y:X},{x:Pe,y:we.y},we])},"addHorizontalPairCandidates"),O=o((ie,me,oe,we,ye)=>{let ve=[...u("left"),...u("right")];for(let ae of u(oe))for(let Pe of u(ye))for(let X of ve)L(ie,[me,{x:me.x,y:ae},{x:X,y:ae},{x:X,y:Pe},{x:we.x,y:Pe},we])},"addVerticalPairCandidates"),R=o(ie=>{let me=new Set;return ie.map(oe=>ri(oe)).filter(oe=>{let we=oe.map(ye=>`${ye.x.toFixed(3)},${ye.y.toFixed(3)}`).join("|");return me.has(we)||oe.length<2?!1:(me.add(we),!0)})},"dedupeCandidatePaths"),$=o((ie,me,oe,we)=>{let ye=[],ve=w9(ie,me,oe,we,20,Ut);ve&&L(ye,ve),me===we&&M(ye,ie,me,oe);let ae=N(me),Pe=N(we);return ae&&!Pe?B(ye,ie,me,oe,we):!ae&&Pe?A(ye,ie,me,oe,we):ae?I(ye,ie,me,oe,we):O(ye,ie,me,oe,we),R(ye)},"buildCandidatesForSides"),F=o((ie,me,oe,we)=>{let ye=[...u("left"),...u("right")],ve=[...u("top"),...u("bottom")];for(let ae of a){let Pe=hf(we,ae),X=ae==="top"||ae==="bottom"?u(ae):ve;for(let ce of ye){L(ie,[me,oe,{x:ce,y:oe.y},{x:ce,y:Pe.y},Pe]);for(let ge of X)L(ie,[me,oe,{x:ce,y:oe.y},{x:ce,y:ge},{x:Pe.x,y:ge},Pe])}}},"addVerticalDepartureOuterTrackCandidates"),P=o((ie,me,oe,we)=>{let ye=[...u("left"),...u("right")],ve=[...u("top"),...u("bottom")];for(let ae of a){let Pe=hf(we,ae),X=ae==="left"||ae==="right"?u(ae):ye;for(let ce of ve){L(ie,[me,oe,{x:oe.x,y:ce},{x:Pe.x,y:ce},Pe]);for(let ge of X)L(ie,[me,oe,{x:oe.x,y:ce},{x:ge,y:ce},{x:ge,y:Pe.y},Pe])}}},"addHorizontalDepartureOuterTrackCandidates"),z=o(ie=>{let me=ie.start,oe=ie.end,we=oe?i.get(oe):void 0;if(!me||!we)return[];let ye=ri(ie.points??[]);if(ye.length<4)return[];let ve=ye[0],ae=ye[1],Pe=[];return hn(ve,ae,Ut)?F(Pe,ve,ae,we):cn(ve,ae,Ut)&&P(Pe,ve,ae,we),Pe},"terminalPreservingOuterTrackCandidates"),q=o(ie=>{let me=ie.start,oe=ie.end,we=me?i.get(me):void 0,ye=oe?i.get(oe):void 0;if(!we||!ye)return[];let ve=[];for(let ae of a){let Pe=hf(we,ae);for(let X of a)ve.push(...$(Pe,ae,hf(ye,X),X))}return ve.push(...z(ie)),ve},"candidatePathsFor"),G=o(()=>new Map(l.map(ie=>[ie,Mr(d(ie))])),"currentSegmentsByEdge"),W=o((ie,me,oe)=>{let we=new Set;for(let ye of l){if(ye===ie)continue;let ve=oe.get(ye)??Mr(d(ye));me.some(ae=>ve.some(Pe=>yc(ae,Pe,.5)>=Qn))&&we.add(ye)}return we},"sharedTrackConflictsFor"),J=o((ie,me,oe,we)=>{let ye=new Set;return q(ie).map(ve=>vc(ri(ve))).filter(ve=>{if(_(ie,ve))return!1;let ae=ve.map(Pe=>`${Pe.x.toFixed(3)},${Pe.y.toFixed(3)}`).join("|");return ye.has(ae)||ve.length<2?!1:(ye.add(ae),!0)}).map(ve=>{let ae=Mr(ve),Pe=0;for(let X of l)X!==ie&&(Pe+=p(ae,oe.get(X)??Mr(d(X))));return{candidate:ve,candidateSegments:ae,crossings:me.count-(we.get(ie)??0)+Pe,bends:ho(ve,Ut),totalBends:ho(ve),length:k(ve)}}).filter(({crossings:ve})=>ve<=me.count).sort((ve,ae)=>ve.crossings-ae.crossings||ve.bends-ae.bends||ve.length-ae.length).slice(0,48).map(ve=>({path:ve.candidate,segments:ve.candidateSegments,sharedTrackConflicts:W(ie,ve.candidateSegments,oe),totalBends:ve.totalBends,length:ve.length}))},"pairCandidatesFor"),H=o((ie,me,oe,we,ye,ve)=>{let ae=0;for(let X of ie.pairs)(X.first===me||X.second===me||X.first===we||X.second===we)&&(ae+=X.count);let Pe=p(oe.segments,ye.segments);for(let X of l){if(X===me||X===we)continue;let ce=ve.get(X)??Mr(d(X));Pe+=p(oe.segments,ce)+p(ye.segments,ce)}return ie.count-ae+Pe},"pairCrossingCount"),Z=o((ie,me)=>{for(let oe of ie.sharedTrackConflicts)if(oe!==me)return!1;return!0},"conflictsOnlyWith"),se=o((ie,me)=>ie.segments.some(oe=>me.segments.some(we=>yc(oe,we,.5)>=Qn)),"candidatesShareTrack"),Q=o((ie,me,oe,we)=>Z(me,oe.edge)&&Z(we,ie.edge)&&!se(me,we),"pairCandidatesAreCompatible"),te=o((ie,me,oe,we,ye)=>{let ve=H(ie.current,me.edge,oe,we.edge,ye,ie.baseSegments);if(!(ve>=ie.current.count))return{replacements:new Map([[me.edge,oe.path],[we.edge,ye.path]]),crossings:ve,bends:ie.currentBends-(ie.baseBendsByEdge.get(me.edge)??0)-(ie.baseBendsByEdge.get(we.edge)??0)+oe.totalBends+ye.totalBends,length:ie.currentLength-(ie.baseLengthByEdge.get(me.edge)??0)-(ie.baseLengthByEdge.get(we.edge)??0)+oe.length+ye.length}},"scorePairReplacement"),re=o((ie,me)=>ie.crossings{let ye=we;for(let ve of me.candidates)for(let ae of oe.candidates){if(!Q(me,ve,oe,ae))continue;let Pe=te(ie,me,ve,oe,ae);Pe&&re(Pe,ye)&&(ye=Pe)}return ye},"bestScoreForOptionPair"),Ae=o(ie=>{let me=C(),oe=E(),we=G(),ye=x(ie),ve=new Map(l.map(be=>[be,ho(d(be))])),ae=new Map(l.map(be=>[be,k(d(be))])),Pe=new Map,X=v(ie);for(let be of X)for(let ke of be){if(Pe.has(ke))continue;let Me=J(ke,ie,we,ye);Me.length>0&&Pe.set(ke,{edge:ke,candidates:Me})}let ce={replacements:new Map,crossings:ie.count,bends:me,length:oe},ge={current:ie,currentBends:me,currentLength:oe,baseBendsByEdge:ve,baseLengthByEdge:ae,baseSegments:we};for(let be of X){let ke=new Set(be.filter(pe=>ie.edgeSet.has(pe))),Me=be.map(pe=>Pe.get(pe)).filter(pe=>!!pe);for(let pe=0;pe0?ce.replacements:void 0},"bestPairedReplacement");for(let ie=0;ie<4;ie++){let me=g(),oe=me.count;if(oe===0)return;let we,ye,ve=oe,ae=Number.POSITIVE_INFINITY;for(let X of me.edges){let ce=ho(d(X),Ut);for(let ge of q(X)){let be=_(X,ge),ke=!be&&w(X,ge),Me=T(me,X,ge),pe=ho(ge,Ut);be||ke||!(Meve||Me===ve&&pe>=ae||(we=X,ye=ge,ve=Me,ae=pe)}}if(we&&ye){we.points=ye;continue}let Pe=Ae(me);if(!Pe)return;for(let[X,ce]of Pe)X.points=ce}}function v1e(e,t){let{nodeInfoById:r,realNodeRects:i}=BC(t),n=["top","bottom","left","right"],a=20,s={top:Math.min(...i.map(y=>y.rect.top))-a,bottom:Math.max(...i.map(y=>y.rect.bottom))+a,left:Math.min(...i.map(y=>y.rect.left))-a,right:Math.max(...i.map(y=>y.rect.right))+a},l=o((y,b,v,T)=>{let x=[],k=w9(y,b,v,T,a,Qu);return k&&x.push(k),b===T&&x.push(E9(y,b,v,s[b])),x},"buildOrthogonalPathCandidates"),h=o((y,b)=>{for(let v=0;v{let T=0,x=rm(y,Qu),k=b.start,C=b.end;for(let E of e){if(E===b||E.isLayoutOnly)continue;let w=E.start,_=E.end;if(!v&&k&&C&&(w===k||w===C||_===k||_===C))continue;let L=E.points;if(!(!L||L.length<2))for(let N of x)for(let D of rm(L,Qu)){if(_9(N.a,N.b,D.a,D.b,Qu,Qu)){T++;continue}yc(N,D,Qu)>=QWe&&T++}}return T},"pathConflictCount"),d=4,p=o((y,b)=>{let v=Math.abs(y.y-b.rect.top),T=Math.abs(y.y-b.rect.bottom),x=Math.abs(y.x-b.rect.left),k=Math.abs(y.x-b.rect.right),C="top",E=v;return T{let T=f.get(y)??[];T.push({side:b,edgeId:v}),f.set(y,T)},"addFaceClaim");for(let y of e){if(y.isLayoutOnly)continue;let b=y.points??[];if(b.length<1)continue;let v=y.id??"",T=y.start,x=y.end;if(T){let k=r.get(T);k&&g(T,p(b[0],k),v)}if(x){let k=r.get(x);k&&g(x,p(b[b.length-1],k),v)}}let m=o((y,b,v)=>f.get(y)?.some(T=>T.edgeId!==v&&T.side===b)??!1,"faceIsClaimed");for(let y of e){if(y.isLayoutOnly)continue;let b=y.points;if(!b||b.length<2)continue;let v=ho(b,Qu);if(v0){let $=u(O,y,!0);if($>N||$===N&&R>=D)continue;N=$,D=R,L=O;continue}u(O,y)>_||RA.edgeId!==E));let B=f.get(x);B&&f.set(x,B.filter(A=>A.edgeId!==E)),g(T,p(L[0],k),E),g(x,p(L[L.length-1],C),E)}}}function s9(e,t){let r=t?0:e.length-1,i=t?1:-1,n=e[r],a=e[r+i];if(!n||!a)return;let s=a.x-n.x,l=a.y-n.y;if(!(Math.abs(s)+Math.abs(l)a&&_C(e,b1e(a)))}function wC(e,t){let r=[];for(let m of e){if(m.isLayoutOnly)continue;let y=m.points;if(!(!y||y.length<2))for(let b=0;b{let b=WI(y,a);for(let{nodeId:v,rect:T}of i)if(v!==m&&_C(b,T))return!0;return!1},"labelOverlapsForeignNode"),u=o((m,y)=>{let b=WI(y,a);for(let v of r)if(v.edgeId!==m&&OC(v.p1,v.p2,b))return!0;return!1},"labelOverlapsForeignEdge"),d=o((m,y,b)=>h(m,b)||u(y,b),"labelOverlapsAnything"),p=[],f=o(m=>{for(let{id:y,rect:b}of n)if(Yme(b,m))return y},"findContainingLane"),g=o((m,y)=>p.some(b=>b.labelId!==m&&_C(y,b.rect)),"overlapsPlacedLabel");for(let m of e){if(m.isLayoutOnly)continue;let y=m.labelNodeId;if(!y)continue;let b=t.get(y);if(!b)continue;let v=m.points;if(!v||v.length<2)continue;let T=b.width??0,x=b.height??0;if(T<=0||x<=0)continue;let k=[];for(let z=0;z=Ps&&J>=Ps||k.push({idx:z,length:W+J,orientation:W>=Ps?"horizontal":"vertical",midX:(q.x+G.x)/2,midY:(q.y+G.y)/2})}if(k.length===0)continue;let C=k.length>=3?k.filter(z=>z.idx>0&&z.idx0?C:k,w=T>=x?"horizontal":"vertical",_=o(z=>[...z].sort((q,G)=>{let W=q.orientation===w,J=G.orientation===w;if(W!==J)return W?-1:1;let H=q.length>=(q.orientation==="horizontal"?T:x)+2,Z=G.length>=(G.orientation==="horizontal"?T:x)+2;return H!==Z?H?-1:1:G.length-q.length}),"rankSegments"),L=k[0],N=k[k.length-1],D=[.5,.25,.75,.05,.95,.15,.85,.1,.9],M=o((z,q)=>{let G=v[z.idx],W=v[z.idx+1];return{midX:G.x+(W.x-G.x)*q,midY:G.y+(W.y-G.y)*q}},"anchorAtT"),B=o((z,q,G)=>Math.min(G,Math.max(q,z)),"clamp"),A=o((z,q)=>z.midX>=q.left-Ps&&z.midX<=q.right+Ps&&z.midY>=q.top-Ps&&z.midY<=q.bottom+Ps,"pointInsideRectInclusive"),I=o(z=>{let q=tm(z.midX,z.midY,T,x),G=f(q);if(G)return{laneId:G,anchor:z,rect:q};let W=n.find(({rect:re})=>A(z,re));if(!W)return;let J=W.rect.left+T/2+s,H=W.rect.right-T/2-s,Z=W.rect.top+x/2+s,se=W.rect.bottom-x/2-s;if(J>H||Z>se)return;let Q={midX:B(z.midX,J,H),midY:B(z.midY,Z,se)},te=tm(Q.midX,Q.midY,T,x);return A(z,te)?{laneId:W.id,anchor:Q,rect:te}:void 0},"placementForAnchor"),O=o((z,q,G)=>z.orientation==="horizontal"?Math.abs(q.midX-G.x):Math.abs(q.midY-G.y),"distanceAlongSegment"),R=o((z,q)=>{let G=(z.orientation==="horizontal"?T/2:x/2)+l;if(z===L){let W=v[z.idx];if(O(z,q,W)+Ps{let q=_(z);for(let G of q)for(let W of D){let J=M(G,W);if(!R(G,J))continue;let H=I(J);if(H&&!o9(H.rect,v)&&!g(y,H.rect)&&!d(y,m.id,H.rect))return{laneId:H.laneId,anchor:H.anchor}}},"tryPool"),F=o((z,q,G=!1)=>{let W=_(z);for(let J of W){let H={midX:J.midX,midY:J.midY};if(q&&!R(J,H))continue;let Z=I(H);if(Z&&!o9(Z.rect,v)&&!g(y,Z.rect)&&!h(y,Z.rect)&&(G||!u(m.id,Z.rect)))return{laneId:Z.laneId,anchor:Z.anchor}}},"findLaneContainingFallback"),P=$(E)??(E.lengthG.labelId===y);q>=0?p[q]={labelId:y,rect:z}:p.push({labelId:y,rect:z})}}}function l9(e,t){return e{let d=l9(l,h),p=0,f=o(g=>{if(!g)return;let m=n.get(g);if(!m)return;let y=u==="x"?m.w/2:m.h/2;y>p&&(p=y)},"consider");f(s.labelNodeId);for(let g of e){if(g===s||g.isLayoutOnly)continue;let m=g.start,y=g.end;!m||!y||l9(m,y)===d&&f(g.labelNodeId)}return p>0?p+eUe:0},"labelClearanceFor");for(let s of e){if(s.isLayoutOnly)continue;let l=s.points;if(!k9(l,FI))continue;let h=S9(s,r,FI);if(!h)continue;let{srcId:u,dstId:d,srcInfo:p,dstInfo:f,collinearX:g,collinearY:m}=h;if(g===m)continue;let y,b;if(g){let k=f.cy>p.cy;y={x:p.cx,y:k?p.rect.bottom:p.rect.top},b={x:f.cx,y:k?f.rect.top:f.rect.bottom}}else{let k=f.cx>p.cx;y={x:k?p.rect.right:p.rect.left,y:p.cy},b={x:k?f.rect.left:f.rect.right,y:f.cy}}if(bn(y,b,i,[u,d],1))continue;let v=a(s,u,d,g?"x":"y"),T=v>_me?v:_me,x=[0,T,-T];for(let k of x){let C={...y},E={...b};if(g){if(C.x+=k,E.x+=k,C.x<=p.rect.left||C.x>=p.rect.right||E.x<=f.rect.left||E.x>=f.rect.right)continue}else if(C.y+=k,E.y+=k,C.y<=p.rect.top||C.y>=p.rect.bottom||E.y<=f.rect.top||E.y>=f.rect.bottom)continue;if(!bn(C,E,i,[u,d],1)&&!AC(C,E,e,s,{epsilon:FI})){s.points=[C,E];break}}}}function c9(e,t){let{realNodeRects:r,labelNodeRects:i}=Ju(t.values()),n=o((y,b)=>rm(b,.001).map(v=>({...v,edge:y,interior:v.index>=1&&v.index<=b.length-3})),"segmentsFor"),a=o(()=>{let y=[];for(let b of e){if(b.isLayoutOnly)continue;let v=b.points;!v||v.length<2||y.push(...n(b,ri(v)))}return y},"allSegments"),s=o((y,b)=>y.horizontal&&b.horizontal?ps(y.a.x,y.b.x,b.a.x,b.b.x)>=8&&Math.abs(y.a.y-b.a.y)<7:y.vertical&&b.vertical?ps(y.a.y,y.b.y,b.a.y,b.b.y)>=8&&Math.abs(y.a.x-b.a.x)<7:!1,"hasCrowdedParallelTrack"),l=o((y,b)=>{let v=y.start,T=y.end,x=n(y,b);if(x.length!==b.length-1)return!1;let k=[v,T].filter(E=>!!E),C=y.labelNodeId?[y.labelNodeId]:[];for(let E of x)if(bn(E.a,E.b,r,k,-2)||bn(E.a,E.b,i,C,-2))return!1;for(let E of e){if(E===y||E.isLayoutOnly)continue;let w=E.points;if(!(!w||w.length<2)){for(let _ of x)for(let L of n(E,ri(w)))if(s(_,L)||_h(_.a,_.b,L.a,L.b,.001))return!1}}return!0},"candidateIsSafe"),h=o((y,b)=>{let v=ri(y.edge.points??[]);if(v.length<4||y.index>=v.length-1)return;let T=v.map(x=>({...x}));if(y.horizontal)T[y.index].y+=b,T[y.index+1].y+=b;else if(y.vertical)T[y.index].x+=b,T[y.index+1].x+=b;else return;return n(y.edge,T).length===T.length-1?T:void 0},"shiftedCandidate"),u=o((y,b)=>({x:y.x??(b.left+b.right)/2,y:y.y??(b.top+b.bottom)/2}),"nodeCenter"),d=o(y=>{let b=y.edge,v=ri(b.points??[]);if(v.length!==4||y.index!==1)return;let T=b.start?t.get(b.start):void 0,x=b.end?t.get(b.end):void 0,k=T?Fs(T):void 0,C=x?Fs(x):void 0,E=v.slice(y.index+2);if(!(!T||!x||!k||!C||E.length===0))return{sourceCenter:u(T,k),targetCenter:u(x,C),sourceRect:k,tail:E}},"sourceDetourContextFor"),p=o((y,b,v,T,x,k)=>{let C=T.y>=v.y,E=C?x.bottom:x.top,w=E+(C?20:-20);if(C&&y.b.y<=w+.001||!C&&y.b.y>=w-.001)return;let _=y.a.x+b;return ri([{x:v.x,y:E},{x:v.x,y:w},{x:_,y:w},{x:_,y:y.b.y},...k],.001)},"verticalSourceDetour"),f=o((y,b,v,T,x,k)=>{let C=T.x>=v.x,E=C?x.right:x.left,w=E+(C?20:-20);if(C&&y.b.x<=w+.001||!C&&y.b.x>=w-.001)return;let _=y.a.y+b;return ri([{x:E,y:v.y},{x:w,y:v.y},{x:w,y:_},{x:y.b.x,y:_},...k],.001)},"horizontalSourceDetour"),g=o((y,b)=>{let v=d(y);if(v){if(y.vertical)return p(y,b,v.sourceCenter,v.targetCenter,v.sourceRect,v.tail);if(y.horizontal)return f(y,b,v.sourceCenter,v.targetCenter,v.sourceRect,v.tail)}},"sourceDetourCandidate"),m=[-7,7,-14,14,-21,21];for(let y=0;y<12;y++){let b=a(),v=!1;for(let T=0;Tw.interior);for(let w of E){for(let _ of m){let L=h(w,_);if(L&&l(w.edge,L)){w.edge.points=L,v=!0;break}let N=g(w,_);if(N&&l(w.edge,N)){w.edge.points=N,v=!0;break}}if(v)break}}if(!v)return}}function T1e(e,t,r,i){let n=t.x-e.x,a=t.y-e.y,s=i.x-r.x,l=i.y-r.y,h=n*l-a*s;if(Math.abs(h)<1e-10)return!1;let u=r.x-e.x,d=r.y-e.y,p=(u*l-d*s)/h,f=(u*a-d*n)/h,g=.01;return p>g&&p<1-g&&f>g&&f<1-g}function k1e(e){let t=e.nodes??[],r=e.edges??[],i=[];if(!r.length||!t.length)return i;let n=Hme(t),a=1,s=[];for(let h of r){if(h.isLayoutOnly)continue;let u=h.points;if(!u||u.length<2)continue;let d=h.start,p=h.end,f=h.labelNodeId,g=h.id??`${d}->${p}`;for(let m of n)if(!(m.nodeId===d||m.nodeId===p)&&!(f&&m.nodeId===f)){for(let y=0;y0){let h=i.filter(d=>d.type==="edge-node-overlap").length,u=i.filter(d=>d.type==="edge-edge-crossing").length;ee.warn(`[SWIMLANE_VALIDATE] ${i.length} issue(s) detected: ${h} edge-node overlap(s), ${u} edge crossing(s)`);for(let d of i)ee.warn(`[SWIMLANE_VALIDATE] ${d.type}: ${d.detail}`)}return i}function C1e(e,t){let r=e.nodes??[],i=e.edges??[],n=r.filter(l=>!l.isGroup);if((t==="LR"||t==="RL")&&n.length>0&&!c1e(e,t)||t==="BT"&&n.length>0&&!l1e(e))return;for(let l of i){if(l.isLayoutOnly)continue;let h=l.points;!h||h.length<2||(l.points=vc(RC(h)))}v1e(i,r),x1e(i,r),h1e(i,r);let a=new Map;for(let l of r)a.set(String(l.id),l);wC(i,a),Jme(i,a),u1e(i,a),c9(i,a),d1e(i,a),p1e(i,a),i9(i,a),f1e(i,a);let s=o(()=>{y1e(i,a),g1e(i,a),m1e(i,a),wC(i,a),t9(i,a),i9(i,a),wC(i,a),t9(i,a)},"finalizeRenderedEdges");s(),c9(i,a),s(),n9(i,a),a9(i,a),n9(i,a),a9(i,a)}function ed(e){let t=new Map(e.nodeById),r=new Set,i=[];for(let n of e.edges){if(!t.has(n.src)||!t.has(n.dst))continue;let a=`${n.id}:${n.src}->${n.dst}`;r.has(a)||(r.add(a),i.push(n))}return{nodes:[...t.keys()],edges:i,layout:e.layout,nodeById:t}}function I9(e,t){return e.edges.filter(r=>r.dst===t)}function w1e(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 D9(e){let t=w1e(e);for(let r of t.values())r.sort((i,n)=>i.localeCompare(n));return t}function M9(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 N9(e){return[...e.entries()].filter(([,t])=>t===0).map(([t])=>t).sort((t,r)=>t.localeCompare(r))}function PC(e,t=()=>!0){let r=new Map,i=new Map;for(let n of e.nodes)r.set(n,[]),i.set(n,[]);for(let n of e.edges)t(n)&&(i.get(n.src).push(n.dst),r.get(n.dst).push(n.src));return{preds:r,succs:i}}function O9(e,t,r,i){let n=0;for(let s of e.nodes)i?.skipGroups&&e.nodeById.get(s)?.isGroup||(n=Math.max(n,r[s]??0));let a=Array.from({length:n+1},()=>[]);for(let s of t)i?.skipGroups&&e.nodeById.get(s)?.isGroup||a[Math.max(0,r[s]??0)].push(s);return a}function Tv(e){let t=M9(e),r=N9(t),i=[],n=D9(e);for(;r.length;){let a=r.shift();i.push(a);for(let s of n.get(a)??[])if(t.set(s,(t.get(s)??0)-1),(t.get(s)??0)===0){let l=0;for(;l{if(n-i<=1)return 0;let a=i+n>>1,s=r(i,a)+r(a,n),l=i,h=a,u=i;for(;l=n||ld.dst===p.dst?d.id.localeCompare(p.id):d.dst.localeCompare(p.dst));let i=Object.create(null);for(let u of t.nodes)i[u]=0;let n=[],a=o(u=>{i[u]=1;for(let d of r.get(u)??[]){let p=d.dst;i[p]===0?a(p):i[p]===1&&n.push(d)}i[u]=2},"dfs"),s=[...t.nodes].sort((u,d)=>u.localeCompare(d));for(let u of s)i[u]===0&&a(u);let l=new Set(n.map(u=>`${u.id}:${u.src}->${u.dst}`)),h=t.edges.map(u=>l.has(`${u.id}:${u.src}->${u.dst}`)?{id:u.id,src:u.dst,dst:u.src,weight:u.weight,ref:u.ref}:u);return{acyclic:{nodes:[...t.nodes],edges:h,layout:t.layout,nodeById:new Map(t.nodeById)},reversed:n}}function S1e(e){let t=new Map,r=o(i=>{if(t.has(i))return t.get(i);let n=e.nodeById.get(i);if(!n)return t.set(i,null),null;let a=n.parentId;if(!a)return t.set(i,null),null;let s=r(a)??a;return t.set(i,s),s},"resolve");for(let i of e.nodes)r(i);return t}function Ah(e){let t=S1e(e);return r=>t.get(r)??null}function FC(e){let t=[];for(let r of e.layout.nodes??[])r.isGroup&&!r.parentId&&t.push(r.id);return[...new Set(t)].reverse()}function P9(e,t){let r=FC(e);if(!t||t.length===0)return r;let i=new Set(r),n=new Set,a=[];for(let s of t)!i.has(s)||n.has(s)||(n.add(s),a.push(s));for(let s of r)n.has(s)||a.push(s);return a}function _1e(e,t){let r=ed(e),i=t?.laneOf??(()=>null),n=t?.rankHint,{preds:a}=PC(r);for(let C of a.values())C.sort((E,w)=>E.localeCompare(w));let s=Tv(r)??[...r.nodes].sort((C,E)=>C.localeCompare(E)),l=new Map;for(let[C,E]of s.entries())l.set(E,C);let h=new Map,u=new Map;for(let C of r.nodes)u.set(C,[]);for(let C of s){let E=(a.get(C)??[]).filter(w=>h.has(w));if(E.length>0){let w=A1e(C,E,{laneOf:i,rankHint:n,topoIndex:l});h.set(C,w),u.get(w).push(C)}else h.has(C)||h.set(C,null)}for(let C of r.nodes)h.has(C)||h.set(C,null);let d=new Set;for(let C of r.nodes)(h.get(C)??null)===null&&d.add(C);let p=[...d].sort((C,E)=>{let w=l.get(C)??0,_=l.get(E)??0;return w===_?C.localeCompare(E):w-_}),f=R1e(r),g=new Map;for(let[C,E]of f.entries())g.set(C,[...E].sort((w,_)=>w.localeCompare(_)));let m=L1e(g),y=$1e(g),b=new Map;for(let C of r.nodes)b.set(C,[]);for(let C of y)for(let E of C.nodes){let w=b.get(E);w?w.push(C.id):b.set(E,[C.id])}let v=[],T=[],x=new Set,k=o(C=>{if(!x.has(C)){x.add(C),v.push(C);for(let E of u.get(C)??[])k(E);T.push(C)}},"walk");for(let C of p)k(C);for(let C of s)k(C);return{parent:h,children:u,roots:p,componentOf:m,blocks:y,nodeBlocks:b,adjacency:g,preorder:v,postorder:T,topologicalOrder:s}}function A1e(e,t,r){let i=r.laneOf(e);return[...t].sort((n,a)=>{let s=r.laneOf(n),l=r.laneOf(a),h=s!=null&&s===i,u=l!=null&&l===i;if(h!==u)return h?-1:1;let d=r.rankHint?.[n],p=r.rankHint?.[a];if(d!=null&&p!=null&&d!==p)return p-d;let f=r.topoIndex.get(n)??0,g=r.topoIndex.get(a)??0;return f!==g?f-g:n.localeCompare(a)})[0]}function R1e(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 L1e(e){let t=new Map,r=0;for(let i of e.keys()){if(t.has(i))continue;let n=[i];for(;n.length>0;){let a=n.pop();if(!t.has(a)){t.set(a,r);for(let s of e.get(a)??[])t.has(s)||n.push(s)}}r++}return t}function $1e(e){let t=new Map,r=new Map,i=[],n=[],a=0,s=o((l,h)=>{t.set(l,++a),r.set(l,a);for(let u of e.get(l)??[])u!==h&&(t.has(u)?(t.get(u)??0)<(t.get(l)??0)&&(i.push([l,u]),r.set(l,Math.min(r.get(l)??a,t.get(u)??a))):(i.push([l,u]),s(u,l),r.set(l,Math.min(r.get(l)??a,r.get(u)??a)),(r.get(u)??0)>=(t.get(l)??0)&&n.push(I1e(l,u,i,n.length))))},"visit");for(let l of e.keys())t.has(l)||s(l,null);return n}function I1e(e,t,r,i){let n=[],a=new Set;for(;r.length>0;){let s=r.pop();if(n.push(s),a.add(s[0]),a.add(s[1]),s[0]===e&&s[1]===t||s[0]===t&&s[1]===e)break}return{id:i,edges:n,nodes:[...a]}}function D1e(e,t,r){let i=[...e.nodes],n=new Map;for(let[T,x]of i.entries())n.set(x,T);let a=i.length,s=new Array(a).fill(-1),l=new Array(a).fill(0),h=[],u=new Set;for(let T of i){let x=r.parent.get(T)??null,k=n.get(T);k!=null&&x==null&&(s[k]=-1,l[k]=0,u.has(T)||(u.add(T),h.push(T)))}for(;h.length>0;){let T=h.shift(),x=n.get(T);if(x==null)continue;let k=r.children.get(T)??[];for(let C of k){if(u.has(C))continue;let E=n.get(C);E!=null&&(s[E]=x,l[E]=l[x]+1,u.add(C),h.push(C))}}for(let T of i){if(u.has(T))continue;let x=n.get(T);x!=null&&(s[x]=-1,l[x]=0,u.add(T))}let d=Math.max(1,Math.ceil(Math.log2(Math.max(1,a)))+1),p=Array.from({length:d},()=>new Array(a).fill(-1));for(let T=0;T{if(T===-1||x===-1)return-1;l[T]>C&1&&(T=p[C][T],T===-1))return-1;if(T===x)return T;for(let C=d-1;C>=0;C--){let E=p[C][T],w=p[C][x];E===-1||w===-1||E!==w&&(T=E,x=w)}return p[0][T]},"lcaIndex"),g=Array.from({length:a},()=>new Map);for(let T of e.edges){let x=T.src,k=T.dst,C=t[x],E=t[k];if(C==null||E==null||(C>E&&([x,k]=[k,x],[C,E]=[E,C]),C==null||E==null||C===E))continue;let w=n.get(x),_=n.get(k);if(w==null||_==null)continue;let L=f(w,_);if(L===-1)continue;let N=g[L];for(let D=C;D{if(x.size!==0)for(let[k,C]of x)T.set(k,(T.get(k)??0)+C)},"mergeInto"),b=new Set,v=o(T=>{let x=n.get(T);b.add(T);let k=x==null?void 0:g[x],C=k?new Map(k):new Map,E=r.children.get(T)??[];for(let w of E){let _=v(w),L=t[T];if(L!=null){let N=m.get(T);N||(N=new Map,m.set(T,N));let D=_.get(L)??0,M=t[w];M!=null&&M>L&&(D+=1),N.set(w,D)}y(C,_)}return C},"dfs");for(let T of r.roots)b.has(T)||v(T);for(let T of i)b.has(T)||v(T);return m}function M1e(e,t,r){let i=new Map,n=o(a=>{let s=r[a]??0,l=[...t.get(a)??[]];l.sort(F9(r));for(let h of l){n(h);let u=i.get(h);u!=null&&(s=Math.min(s,u))}i.set(a,s)},"annotate");for(let a of e)n(a);return i}function F9(e){return(t,r)=>{let i=e[t]??0,n=e[r]??0;return i===n?t.localeCompare(r):i-n}}function N1e(e,t,r,i){let n=0;for(let h of t){let u=r[h]??0;u>n&&(n=u)}let a=Array.from({length:n+1},()=>[]),s=new Set,l=o(h=>{if(s.has(h))return;s.add(h);let u=r[h]??0;a[u]||(a[u]=[]),a[u].push(h);for(let d of i(h))l(d)},"emit");for(let h of e)l(h);for(let h of t)if(!s.has(h)){let u=r[h]??0;a[u]||(a[u]=[]),a[u].push(h),s.add(h)}return a}function O1e(e){let t=[];for(let r of e){let i=new Set,n=[];for(let a of r)i.has(a)||(i.add(a),n.push(a));t.push(n)}return t}function B1e(e,t,r,i){return n=>{let a=e.get(n)??[];if(a.length===0)return[];let s=t[n]??0,l=[],h=[],u=r.get(n);for(let d of a){let p=i.get(d)??s;p>s?l.push({child:d,min:p}):h.push(d)}return l.sort((d,p)=>d.min===p.min?d.child.localeCompare(p.child):d.min-p.min),h.sort((d,p)=>{let f=u?.get(d)??0,g=u?.get(p)??0;if(f!==g)return f-g;let m=i.get(d)??s,y=i.get(p)??s;return m!==y?m-y:d.localeCompare(p)}),[...l.map(d=>d.child),...h]}}function NC(e,t,r){let i=_1e(e,{rankHint:t,laneOf:r}),{children:n,roots:a}=i;for(let p of e.nodes)n.has(p)||n.set(p,[]);let s=D1e(e,t,i),l=[...a].sort(F9(t)),h=M1e(l,n,t),u=B1e(n,t,s,h),d=N1e(l,e.nodes,t,u);return d=O1e(d),d}function P1e(e,t,r){let i=new Set(e),n=new Set(t),a=im(t),s=[];for(let l of r)i.has(l.src)&&n.has(l.dst)&&s.push(a.get(l.dst));return B9(s)}function h9(e,t,r){let i=[];for(let a of t){let s=r[a.src],l=r[a.dst];if(s==null||l==null||s===l)continue;let h=a.src,u=a.dst,d=s,p=l;s>l&&(h=a.dst,u=a.src,d=l,p=s);for(let f=d;f(r[f]??0)-(r[p]??0));for(let p of d){let f=r[p]??0;if(f===0)continue;let g=0;for(let v of i.get(p)??[])g=Math.max(g,(r[v]??0)+1);if(g>=f)continue;let m=f;r[p]=g;let y=NC(e,r,n),b=h9(y,e.edges,r);b(t[n]??0)-(t[a]??0)||n.localeCompare(a));for(let n of i){let a=r(n);if(!a)continue;let s=e.edges.filter(y=>y.src===n);if(s.length===0)continue;let l=!1,h=0;for(let y of s){let b=r(y.dst);b==null||b===a?l=!0:h++}if(h===0||l)continue;let u=0,d=!1;for(let y of e.edges){if(y.dst!==n)continue;let b=r(y.src);b&&(b===a?d=!0:u++)}if(u>0||!d)continue;let p=t[n]??0,f=p+h,g=0;for(let y of e.edges)y.dst===n&&(g=Math.max(g,(t[y.src]??0)+1));let m=Math.max(p,g,f);m!==p&&(t[n]=m)}}function q1e(e,t){let r=ed(e),i=Tv(r)??[...r.nodes].sort(),n=t?.compactSingleInput??!1,a=Ah(r),s=Object.create(null);for(let l of i){let h=I9(r,l),u=t?.ignoreCrossLaneEdges?h.filter(d=>{let p=a(d.src),f=a(l);return!p||!f?!0:p===f}):h;if(u.length===0)s[l]=0;else if(n&&u.length===1){let d=u[0].src,p=a(d),f=a(l);p!==f?s[l]=s[d]??0:s[l]=(s[d]??0)+1}else{let d=-1/0;for(let p of u)d=Math.max(d,(s[p.src]??0)+1);s[l]=d===-1/0?0:d}}return(t?.optimizeRanksByCrossings??!1)&&(s=F1e(r,s)),t?.ignoreCrossLaneEdges&&z1e(r,s),{layers:NC(r,s,a),rankOf:s,dummy:new Set}}function j1e(e,t){let r=ed(e),i={...q1e(r,{compactSingleInput:t?.compactSingleInput,ignoreCrossLaneEdges:t?.ignoreCrossLaneEdges,optimizeRanksByCrossings:t?.optimizeRanksByCrossings}).rankOf},n=Ah(r),{preds:a,succs:s}=PC(r,f=>{if(t?.ignoreCrossLaneEdges){let g=n(f.src),m=n(f.dst);if(g&&m&&g!==m)return!1}return!0}),l=Tv(r)??[...r.nodes],h=[...l].reverse(),u=o((f,g)=>{let m=0;for(let v of a.get(f)??[])m=Math.max(m,(i[v]??0)+1);let y=Number.POSITIVE_INFINITY,b=s.get(f)??[];return b.length>0&&(y=Math.min(...b.map(v=>(i[v]??0)-1))),Number.isFinite(y)||(y=Math.max(m,g)),Math.min(Math.max(g,m),y)},"clampFeasible"),d=MC.GRAVITY_ITERATIONS,p=o(f=>{let g=!1;for(let m of f){let y=a.get(m)??[],b=s.get(m)??[];if(y.length===0&&b.length===0)continue;let v=y.length>0?y.reduce((C,E)=>C+(i[E]??0)+1,0)/y.length:i[m]??0,T=b.length>0?b.reduce((C,E)=>C+(i[E]??0)-1,0)/b.length:i[m]??0,x=Math.round((v+T)/2),k=u(m,x);k!==i[m]&&(i[m]=k,g=!0)}return g},"relaxOrder");for(let f=0;f0){let m=Math.min(...g.map(y=>(i[y]??0)-1));(i[f]??0)>m&&(i[f]=m)}}return{layers:O9(r,l,i),rankOf:i,dummy:new Set}}function G1e(e){let t=M9(e),r=D9(e),i=N9(t),n=[];for(;i.length>0;){let a=[];for(let s of i){n.push(s);for(let l of r.get(s)??[])t.set(l,(t.get(l)??0)-1),(t.get(l)??0)===0&&a.push(l)}i=a.sort((s,l)=>s.localeCompare(l))}return n.length===e.nodes.length?n:null}function W1e(e,t){let r=ed(e),i=t?.direction==="LR"?G1e(r)??[...r.nodes].sort():Tv(r)??[...r.nodes].sort(),n=Ah(r),a=o(u=>n(u)??u,"laneOf"),s=Object.create(null),l=new Map,h=o((u,d)=>t?.ignoreCrossLaneEdges??!0?a(u)===a(d)?1:0:1,"edgeWeight");for(let u of i){if(r.nodeById.get(u)?.isGroup)continue;let d=I9(r,u),p=0;if(d.length>0)for(let y of d){let b=y.src,v=s[b]??0;p=Math.max(p,v+h(b,u))}let f=a(u),g=l.get(f)??0,m=Math.max(p,g);s[u]=m,l.set(f,m+1)}return{layers:O9(r,i,s,{skipGroups:!0}),rankOf:s,dummy:new Set}}function U1e(e,t){let r=ed(t),{rankOf:i}=e,n=e.layers.map(f=>[...f]),a=new Set(e.dummy?[...e.dummy]:[]),s=0,l=new Map(r.nodeById),h=o(f=>{let g=`placeholder-${s++}`,m={id:g,isGroup:!1,isDummy:!0,width:0,height:0};for(l.set(g,m),a.add(g);n.length<=f;)n.push([]);return n[f].push(g),i[g]=f,g},"addDummyAt"),u=[...r.edges].sort((f,g)=>f.id===g.id?f.src===g.src?f.dst.localeCompare(g.dst):f.src.localeCompare(g.src):f.id.localeCompare(g.id)),d=[];for(let f of u){let g=i[f.src]??0,m=i[f.dst]??0;if(m-g<=1){d.push(f);continue}let y=f.src;for(let v=g+1,T=0;v!r.nodes.includes(f))],edges:d,layout:r.layout,nodeById:l};return{layering:{layers:n,rankOf:i,dummy:a},graphWithDummies:p}}function u9(e){let t=e.length;if(t===0)return Number.POSITIVE_INFINITY;let r=[...e].sort((i,n)=>i-n);return t%2===1?r[(t-1)/2]:.5*(r[t/2-1]+r[t/2])}function d9(e){return e.length===0?Number.POSITIVE_INFINITY:e.reduce((t,r)=>t+r,0)/e.length}function V1e(e,t,r,i){let n=new Map;for(let a of e)n.set(a,[]);for(let a of r)i==="down"?t.has(a.src)&&n.has(a.dst)&&n.get(a.dst).push(t.get(a.src)):t.has(a.dst)&&n.has(a.src)&&n.get(a.src).push(t.get(a.dst));return n}function Y1e(e,t,r){let i=r.get(e)??0,n=r.get(t)??0;return i!==n?i-n:e.localeCompare(t)}function p9(e,t,r){let i=new Set(e),n=new Set(t),a=im(e),s=im(t),l=[];for(let u of r)i.has(u.src)&&n.has(u.dst)&&l.push({u:a.get(u.src),v:s.get(u.dst)});l.sort((u,d)=>u.u===d.u?u.v-d.v:u.u-d.u);let h=l.map(u=>u.v);return B9(h)}function EC(e,t,r){return[...e].sort((i,n)=>{let a=u9(t.get(i)??[]),s=u9(t.get(n)??[]);return a===s?Y1e(i,n,r):isFinite(a)?isFinite(s)?a-s:-1:1})}function f9(e,t,r,i,n,a){let s=im(e),l=im(t),h=V1e(t,s,r,i);if(!n||!a||a.length===0)return EC(t,h,l);let u=new Map;for(let f of t){let g=n(f),m=u.get(g)??[];m.push(f),u.set(g,m)}let d=[];for(let f of a){let g=u.get(f);if(!g||g.length===0)continue;let m=EC(g,h,l);d.push(...m)}let p=u.get(null);if(p&&p.length>0){let f=EC(p,h,l);for(let g of f){let m=d9(h.get(g)??[]),y=d.length;if(isFinite(m))for(let[b,v]of d.entries()){let T=d9(h.get(v)??[]);if(ms.has(y.src)&&l.has(y.dst)),d=h?r.filter(y=>l.has(y.src)&&h.has(y.dst)):void 0,p=o(y=>{let b=p9(e,y,u);return d&&i&&(b+=p9(y,i,d)),b},"crossingScore"),f=n?new Map:null;if(n&&f)for(let y of t)f.set(y,n(y));let g=!0,m=p(a);for(;g;){g=!1;for(let y=0;y+1[...l]),n=t.edges,a=Ah(t),s=P9(t,r?.laneOrder);for(let l=0;l<3;l++){for(let h=1;h=0;h--)i[h]=f9(i[h+1],i[h],n,"up",a,s),i[h]=g9(i[h+1],i[h],n,i[h-1],a)}return{layers:i}}function X1e(e,t,r){let i=r?.layerGap??Ame.DEFAULT_LAYER_GAP,n=r?.nodeGap??Ame.DEFAULT_NODE_GAP,a=r?.laneGap??n*2,s=r?.direction??"TB",l=s==="LR"||s==="RL",h=e.layers,u=Object.create(null),d=Object.create(null),p=o(N=>t.nodeById.get(N),"getNode"),f=o(N=>p(N)?.width??0,"getWidth"),g=o(N=>p(N)?.height??0,"getHeight"),m=Ah(t),y=P9(t,r?.laneOrder),b=h.map(N=>N.reduce((D,M)=>Math.max(D,g(M)),0)),v=[];if(l)for(let N=0;N+1Math.max($,f(F)),0),M=h[N+1].reduce(($,F)=>Math.max($,f(F)),0),B=b[N],A=b[N+1],I=B/2+A/2,O=(D+M)/2,R=Math.max(0,O-I-i);v.push(R)}let T=new Set;for(let N of h)for(let D of N)T.add(m(D));let x=T.has(null),k=y.filter(N=>T.has(N)),C=[...x?[null]:[],...k],E=Object.create(null);for(let N of k)E[N]=0;x&&(E.null=0);for(let N of h){let D=Object.create(null),M=[];for(let B of N){let A=m(B);A===null?M.push(B):(D[A]||=[]).push(B)}for(let[B,A]of Object.entries(D)){let I=A.reduce((O,R)=>O+f(R),0)+n*Math.max(0,A.length-1);E[B]=Math.max(E[B]??0,I)}if(x&&M.length){let B=M.reduce((A,I)=>A+f(I),0)+n*Math.max(0,M.length-1);E.null=Math.max(E.null??0,B)}}let w=new Map;{let N=C.map(M=>(M===null?E.null:E[M])??0),D=-(N.reduce((M,B)=>M+B,0)+a*Math.max(0,C.length-1))/2;for(let M=0;Mf(z)),F=$.reduce((z,q)=>z+q,0)+n*(O.length-1),P=R-F/2;for(let[z,q]of O.entries()){let G=$[z];u[q]=P+G/2,d[q]=_+M/2,P+=G+n}}}let A=v[N]??0;_+=M+i+A}let L=new Map;for(let N of t.edges){let D=N.ref.id;L.has(D)||L.set(D,[]),L.get(D).push(N)}for(let[,N]of L){if(N.length===0)continue;let D=N[0].ref,M=D.start,B=D.end;if(M==null||B==null)continue;let A=Math.round(((u[M]??0)+(u[B]??0))/2),I=new Set;for(let O of N)I.add(O.src),I.add(O.dst);for(let O of I)O===M||O===B||t.nodeById.get(O)?.isDummy&&(u[O]=A)}return{x:u,y:d}}function Z1e(e){let t=2166136261;for(let r=0;r>>0}function Q1e(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 J1e(e,t){let r=[...e],i=Q1e(t);for(let n=r.length-1;n>0;n--){let a=Math.floor(i()*(n+1));[r[n],r[a]]=[r[a],r[n]]}return r}function eye(e,t){let r=0;for(let[i,n]of e.entries())r+=Math.abs(i-(t.get(n)??i));return r}function m9(e,t){let r=new Map;for(let[n,a]of e.entries())r.set(a,n);let i=0;for(let{a:n,b:a,weight:s}of t){let l=r.get(n),h=r.get(a);l==null||h==null||(i+=s*Math.abs(l-h))}return i}function tye(e){let t=FC(e);if(t.length<2)return[];let r=new Map(t.map((a,s)=>[a,s])),i=Ah(e),n=new Map;for(let a of e.layout.edges??[]){if(a.isLayoutOnly)continue;let s=typeof a.start=="string"?a.start:void 0,l=typeof a.end=="string"?a.end:void 0;if(!s||!l||!e.nodeById.has(s)||!e.nodeById.has(l))continue;let h=i(s),u=i(l);if(!h||!u||h===u)continue;let d=r.get(h),p=r.get(u);if(d==null||p==null)continue;let[f,g]=d<=p?[h,u]:[u,h],m=`${f}\0${g}`,y=n.get(m);y?y.weight++:n.set(m,{a:f,b:g,weight:1})}return[...n.values()]}function y9(e,t,r){let i=[...e],n=m9(i,t),a=!0,s=0,l=Math.max(1,i.length);for(;a&&sn.a===a.a?n.b.localeCompare(a.b):n.a.localeCompare(a.a)).map(({a:n,b:a,weight:s})=>`${n}:${a}:${s}`).join("|");return Z1e(`${e.join("|")}#${i}#${r}`)}function nye(e,t={}){let r=FC(e);if(r.length<2)return r;let i=tye(e);if(i.length===0)return r;let n=new Map(r.map((l,h)=>[l,h])),a=y9(r,i,n),s=Math.max(0,t.restarts??K1e);for(let l=0;lPr&&h*3>=l?s>0?"bottom":"top":l>Pr?a>0?"right":"left":r}function b9(e,t){return Math.abs(e.to-t.from)X.isGroup&&!X.parentId);for(let X of u){let ce={id:X.id},ge=o(be=>{s.set(be.id,ce),r.filter(ke=>ke.parentId===be.id).forEach(ge)},"assignLane");ge(X)}let d=r.filter(X=>!X.isGroup&&!X.isEdgeLabel).map(X=>{let ce=X.width??10,ge=X.height??10,be=X.x??0,ke=X.y??0,Me=rUe;return{nodeId:X.id,minX:be-ce/2-Me,maxX:be+ce/2+Me,minY:ke-ge/2-Me,maxY:ke+ge/2+Me,visualXHalfExtent:h?ge/2+Me:ce/2+Me}}),p=o((X,ce,ge,be)=>{let ke=l.find(Me=>Me.orientation===X&&Math.abs(Me.coord-ce)<1);return ke||(ke={id:`pipe-${X}-${ce.toFixed(0)}`,orientation:X,coord:ce,spanMin:ge,spanMax:be,tracks:[]},l.push(ke)),ke.spanMin=Math.min(ke.spanMin,ge),ke.spanMax=Math.max(ke.spanMax,be),ke},"getOrAddPipe"),f=o((X,ce)=>{let ge=X.width??10,be=X.height??10,ke=X.x??0,Me=X.y??0;switch(ce){case"top":return{x:ke,y:Me-be/2};case"bottom":return{x:ke,y:Me+be/2};case"left":return{x:ke-ge/2,y:Me};case"right":return{x:ke+ge/2,y:Me}}},"portForSide"),g=o((X,ce,ge)=>f(X,v9(X,ce,ge?"bottom":"top")),"getOrthogonalPort"),m=[],y=[],b=new Set,v=1e3,T=o((X,ce,ge)=>{if(m.length===0)return 0;let be=Math.abs(ce.y-ge.y)j||le.from-Pr<=pe&&le.to+Pr>=pe&&(Me+=v)}else if(ke){let pe=ce.x,Oe=Math.min(ce.y,ge.y)-Pr,j=Math.max(ce.y,ge.y)+Pr;if(j<=Oe)return 0;for(let le of m)le.edgeIndex===X||le.orientation!=="horizontal"||le.pipe.coordj||le.from-Pr<=pe&&le.to+Pr>=pe&&(Me+=v)}return Me},"crossingPenalty"),x=n.map((X,ce)=>{if(!X.start||!X.end)return{idx:ce,crossLane:0,dx:0,dy:0};let ge=a.get(X.start),be=a.get(X.end),ke=s.get(X.start),Me=s.get(X.end),pe=ke&&Me&&ke.id!==Me.id?1:0,Oe=ge&&be?Math.abs((be.x??0)-(ge.x??0)):0,j=ge&&be?Math.abs((be.y??0)-(ge.y??0)):0;return{idx:ce,crossLane:pe,dx:Oe,dy:j}}).sort((X,ce)=>{if(X.crossLane!==ce.crossLane)return ce.crossLane-X.crossLane;let ge=X.dx+X.dy,be=ce.dx+ce.dy;return Math.abs(ge-be)>1?ge-be:X.idx-ce.idx}).map(X=>X.idx),k=o((X,ce,ge,be)=>{let ke=Math.min(X.x,ce.x),Me=Math.max(X.x,ce.x),pe=Math.min(X.y,ce.y),Oe=Math.max(X.y,ce.y);return!!d.find(j=>ge&&j.nodeId===ge||be&&j.nodeId===be?!1:Math.abs(X.x-ce.x)>Pr?j.minYX.y&&j.maxX>ke&&j.minXX.x&&j.maxY>pe&&j.minYv9(X,ce,"bottom"),"determineSide"),_=new Map;for(let[X,ce]of n.entries()){if(!ce.start||!ce.end||ce.start===ce.end||ce.points&&ce.points.length>0)continue;let ge=a.get(ce.start),be=a.get(ce.end);if(!ge||!be)continue;let ke=(be.x??0)-(ge.x??0),Me=(be.y??0)-(ge.y??0);_.set(X,{edgeIdx:X,srcId:ce.start,dstId:ce.end,srcSide:w(ge,{x:be.x??0,y:be.y??0}),dstSide:w(be,{x:ge.x??0,y:ge.y??0}),absDx:Math.abs(ke),absDy:Math.abs(Me),dxSign:Math.sign(ke),dySign:Math.sign(Me)})}let L=o(X=>X.srcSide==="top"||X.srcSide==="bottom"?X.absDx===0?1/0:X.absDy/X.absDx:X.absDy===0?1/0:X.absDx/X.absDy,"preferenceStrength"),N=o(X=>X.srcSide==="top"||X.srcSide==="bottom"?X.dxSign>=0?"right":"left":X.dySign>=0?"bottom":"top","secondarySide"),D=new Map;for(let X of _.values()){let ce=`${X.srcId}:${X.srcSide}`;D.has(ce)||D.set(ce,[]),D.get(ce).push(X)}let M=new Map,B=o((X,ce)=>`${X}:${ce}`,"loadKey");for(let X of _.values())M.set(B(X.srcId,X.srcSide),(M.get(B(X.srcId,X.srcSide))??0)+1),M.set(B(X.dstId,X.dstSide),(M.get(B(X.dstId,X.dstSide))??0)+1);for(let X of D.values())if(!(X.length<2)){X.sort((ce,ge)=>{let be=L(ce),ke=L(ge);return Math.abs(be-ke)>1e-9?ke-be:ce.edgeIdx-ge.edgeIdx});for(let ce=1;ce=ke||(M.set(B(ge.srcId,ge.srcSide),ke-1),M.set(B(ge.srcId,be),Me+1),ge.srcSide=be)}}let A=o(X=>{let ce=X?.shape;return ce==="question"||ce==="diamond"},"isDiamondNode"),I=new Map;for(let X of _.values())I.has(X.dstId)||I.set(X.dstId,new Set),I.get(X.dstId).add(X.dstSide);for(let X of _.values()){if(!A(a.get(X.srcId)))continue;let ce=I.get(X.srcId);if(!ce?.has(X.srcSide))continue;let ge=N(X);if(ce.has(ge)||(M.get(B(X.srcId,ge))??0)>0)continue;let be=M.get(B(X.srcId,X.srcSide))??0;M.set(B(X.srcId,X.srcSide),Math.max(0,be-1)),M.set(B(X.srcId,ge),1),X.srcSide=ge}for(let X of _.values()){let{edgeIdx:ce,srcId:ge,dstId:be,srcSide:ke,dstSide:Me}=X,pe=a.get(ge),Oe=a.get(be),j=`${ge}:${ke}:src`,le=ke==="top"||ke==="bottom"?Oe.x??0:Oe.y??0;C.has(j)||C.set(j,[]),C.get(j).push({edgeIdx:ce,oppositeCoord:le});let U=`${be}:${Me}:dst`,fe=Me==="top"||Me==="bottom"?pe.x??0:pe.y??0;C.has(U)||C.set(U,[]),C.get(U).push({edgeIdx:ce,oppositeCoord:fe})}let O=new Map,R=8;for(let[X,ce]of C){if(ce.length<2)continue;ce.sort((Y,Le)=>Y.oppositeCoord-Le.oppositeCoord);let ge=X.split(":"),be=ge.slice(0,-2).join(":"),ke=ge[ge.length-2],Me=ge[ge.length-1],pe=a.get(be);if(!pe)continue;let Oe=ke==="left"||ke==="right"?pe.height??10:pe.width??10,j=pe.shape,le=j==="question"||j==="diamond"?Oe*.3:Oe,U=Math.min(20,Math.max(R,le/(ce.length+1))),fe=-(U*(ce.length-1))/2;for(let[Y,Le]of ce.entries()){let xe=fe+Y*U,je=`${Le.edgeIdx}:${Me}`;O.set(je,xe)}}let $=o(X=>!!n[X]?.labelNodeId,"edgeHasLabelNode"),F=o((X,ce)=>X?(C.get(`${X}:${ce}:src`)??[]).some(({edgeIdx:ge})=>$(ge))||(C.get(`${X}:${ce}:dst`)??[]).some(({edgeIdx:ge})=>$(ge)):!1,"faceHasLabelNode"),P=o((X,ce,ge)=>ce==="top"||ce==="bottom"?{x:X.x+ge,y:X.y}:{x:X.x,y:X.y+ge},"applyPortOffset"),z=o((X,ce,ge)=>{let be=_.get(X),ke={x:ge.x??0,y:ge.y??0},Me={x:ce.x??0,y:ce.y??0},pe=be?.srcSide??w(ce,ke),Oe=be?.dstSide??w(ge,Me),j=be?f(ce,be.srcSide):g(ce,ke,!0),le=be?f(ge,be.dstSide):g(ge,Me,!1),U=O.get(`${X}:src`),fe=O.get(`${X}:dst`);return U!==void 0&&(j=P(j,pe,U)),fe!==void 0&&(le=P(le,Oe,fe)),{pSrcPort:j,pDstPort:le,srcSide:pe,dstSide:Oe}},"portsForEdge");for(let X of x){let ce=n[X];if(y[X]=[],!ce.start||!ce.end||ce.points&&ce.points.length>0||ce.start===ce.end)continue;let ge=a.get(ce.start),be=a.get(ce.end);if(!ge||!be)continue;let{pSrcPort:ke,pDstPort:Me,srcSide:pe,dstSide:Oe}=z(X,ge,be),j={...ke},le={...Me},U=pe==="top"||pe==="bottom",fe=Oe==="top"||Oe==="bottom";if(U){let Be=ke.y>(ge.y??0);j.y=Be?ke.y+Po:ke.y-Po}else{let Be=ke.x>(ge.x??0);j.x=Be?ke.x+Po:ke.x-Po}if(fe){let Be=Me.y>(be.y??0);le.y=Be?Me.y+Po:Me.y-Po}else{let Be=Me.x>(be.x??0);le.x=Be?Me.x+Po:Me.x-Po}let Y=o((Be,Ke)=>{for(let ht of d)if(!Ke.includes(ht.nodeId)&&Be.x>ht.minX&&Be.xht.minY&&Be.y{if(Yt){let Zr=Be.y>(Ke.y??0);return{x:(ht.x??0)>=Be.x?At.maxX+lf:At.minX-lf,y:Zr?At.maxY+J0:At.minY-J0,leavesPositiveSide:Zr}}let Xt=Be.x>(Ke.x??0),fr=(ht.y??0)>=Be.y;return{x:Xt?At.maxX+lf:At.minX-lf,y:fr?At.maxY+J0:At.minY-J0,leavesPositiveSide:Xt}},"obstacleDetour"),xe=[],je=[ce.start,ce.end],Ie=Y(j,je);if(Ie.inside&&Ie.obstacle){let Be=Ie.obstacle;if(U){let Ke=Le(ke,ge,be,Be,!0);j.x=Ke.x,j.y=Ke.y;let ht=Ke.leavesPositiveSide?Math.min(Be.minY-2,ke.y+Po):Math.max(Be.maxY+2,ke.y-Po);xe=[{x:ke.x,y:ht},{x:Ke.x,y:ht},{x:Ke.x,y:Ke.y}]}else{let Ke=Le(ke,ge,be,Be,!1),ht=Ke.leavesPositiveSide?Math.min(Be.minX-2,ke.x+Po):Math.max(Be.maxX+2,ke.x-Po);j.x=Ke.x,j.y=Ke.y,xe=[{x:ht,y:ke.y},{x:ht,y:Ke.y},{x:Ke.x,y:Ke.y}]}}let Ve=[],Ne=Y(le,je);if(Ne.inside&&Ne.obstacle){let Be=Ne.obstacle;if(fe){let Ke=Le(Me,be,ge,Be,!0);le.x=Ke.x,le.y=Ke.y,Ve=[{x:Ke.x,y:Ke.y},{x:Me.x,y:Ke.y}]}else{let Ke=Le(Me,be,ge,Be,!1);le.x=Ke.x,le.y=Ke.y,Ve=[{x:Ke.x,y:Ke.y},{x:Ke.x,y:Me.y}]}}if(xe.length===0&&Ve.length===0){let Be=lf,Ke=Math.abs(j.x-le.x)1||Xt>1,Zr=E.get(ce.start??"")??0,Gt=E.get(ce.end??"")??0,Ur=Yt>1&&F(ce.start,pe)||Xt>1&&F(ce.end,Oe),it=Yt<=1||Zr<=2,xt=Xt<=1||Gt<=2;if((Ke||ht)&&!At&&(!fr||fr&&!Ur&&it&&xt)&&!k(ke,Me,ce.start,ce.end)){ce.points=[{...ke},{...j},{...le},{...Me}],b.add(X);let lt=ht?"horizontal":"vertical",Dt=ht?ke.y:ke.x,Re=ht?Math.min(ke.x,Me.x):Math.min(ke.y,Me.y),Vr=ht?Math.max(ke.x,Me.x):Math.max(ke.y,Me.y),$e={id:`fast-path-${lt}-${Dt.toFixed(0)}-${X}`,orientation:lt,coord:Dt,spanMin:Re,spanMax:Vr,tracks:[]};m.push({edgeIndex:X,segmentIndex:0,orientation:lt,pipe:$e,trackIndex:0,from:Re,to:Vr});continue}}let Ge=p("vertical",j.x,j.y,j.y);j.x=Ge.coord;let ze=p("vertical",le.x,le.y,le.y);le.x=ze.coord;let Ue=Math.min(j.x,le.x)-50,Ce=Math.max(j.x,le.x)+50,ct=Math.min(j.y,le.y)-50,Se=Math.max(j.y,le.y)+50;for(let Be of d){let Ke=Math.min(j.x,le.x),ht=Math.max(j.x,le.x),At=Math.min(j.y,le.y),Yt=Math.max(j.y,le.y);Be.minXKe&&Be.minYAt&&(Ue=Math.min(Ue,Be.minX-CC),Ce=Math.max(Ce,Be.maxX+CC),ct=Math.min(ct,Be.minY-CC),Se=Math.max(Se,Be.maxY+CC))}for(let Be of d){if(Be.maxXCe||Be.maxYSe)continue;let Ke=lf;p("horizontal",Be.minY-Ke,Ue,Ce),p("horizontal",Be.maxY+Ke,Ue,Ce);let ht=J0;p("vertical",Be.minX-ht,ct,Se),p("vertical",Be.maxX+ht,ct,Se)}p("horizontal",j.y,Ue,Ce),p("horizontal",le.y,Ue,Ce);let at=l.filter(Be=>Be.orientation==="horizontal"&&Be.coord>=ct&&Be.coord<=Se),dt=l.filter(Be=>Be.orientation==="vertical"&&Be.coord>=Ue&&Be.coord<=Ce),gt=o((Be,Ke)=>`${Be.toFixed(1)},${Ke.toFixed(1)}`,"getKey"),Ct=gt(j.x,j.y),kt=gt(le.x,le.y),$t=new Map,ut=new Map,de=new Map,st=new Set,nt=[];$t.set(Ct,0),de.set(Ct,"n"),nt.push({key:Ct,f:Math.hypot(le.x-j.x,le.y-j.y),pt:j}),st.add(Ct);let rt=[],_e=o((Be,Ke)=>k(Be,Ke,ce.start,ce.end),"checkSegmentBlocked"),Ze={x:le.x,y:j.y},He=_e(j,Ze),yt=_e(Ze,le),_t=He||yt,Ot={x:j.x,y:le.y},ir=_e(j,Ot),ur=_e(Ot,le);if(_t?ir||ur||(Math.abs(j.x-le.x)0;){nt.sort((Gt,Ur)=>Gt.f-Ur.f);let Be=nt.shift();if(st.delete(Be.key),Be.key===kt){let Gt=kt,Ur=le;for(rt=[Ur];ut.has(Gt);){let it=ut.get(Gt);rt.unshift(it),Ur=it,Gt=gt(it.x,it.y)}break}let Ke=Be.pt.x,ht=Be.pt.y,At=dt.sort((Gt,Ur)=>Gt.coord-Ur.coord),Yt=At.findIndex(Gt=>Math.abs(Gt.coord-Ke)<1),Xt=at.sort((Gt,Ur)=>Gt.coord-Ur.coord),fr=Xt.findIndex(Gt=>Math.abs(Gt.coord-ht)<1),Zr=[];Yt>0&&Zr.push({x:At[Yt-1].coord,y:ht}),Yt>=0&&Yt0&&Zr.push({x:Ke,y:Xt[fr-1].coord}),fr>=0&&fris.nodeId===ce.start||is.nodeId===ce.end?!1:Ur!==it?is.minYht&&is.maxX>Ur&&is.minXKe&&is.maxY>xt&&is.minY10&&my<-5||hl<-10&&my>5)&&($e=Math.abs(my)*100),(Nr>10&&ul<-5||Nr<-10&&ul>5)&&($e+=Math.abs(ul)*50);let yy=0,UT=de.get(Be.key)??"n",mn=Math.abs(ul)>Pr?"h":"v";UT!=="n"&&UT!==mn&&(yy=50);let th=Re+Vr+$e+yy,mu=($t.get(Be.key)??1/0)+th,jg=Math.abs(le.x-Gt.x)+Math.abs(le.y-Gt.y);if(mu<($t.get(Dt)??1/0))if(ut.set(Dt,Be.pt),$t.set(Dt,mu),de.set(Dt,mn),!st.has(Dt))nt.push({key:Dt,f:mu+jg,pt:Gt}),st.add(Dt);else{let is=nt.findIndex(SA=>SA.key===Dt);is!==-1&&(nt[is].f=mu+jg)}}}if(rt.length===0&&(rt=[j,{x:j.x,y:le.y},le]),rt.length>4){let Be=rt[0],Ke=rt[rt.length-1],ht=Math.min(Be.x,Ke.x),At=Math.max(Be.x,Ke.x),Yt=Math.min(Be.y,Ke.y),Xt=Math.max(Be.y,Ke.y);for(let xt of rt)ht=Math.min(ht,xt.x),At=Math.max(At,xt.x),Yt=Math.min(Yt,xt.y),Xt=Math.max(Xt,xt.y);let fr=At>Math.max(Be.x,Ke.x),Zr=ht$e.minXlt&&$e.minYDt);if(Vr.length>0){let $e=Math.max(Be.x,Ke.x);for(let Nr of Vr){let hl=(Nr.minX+Nr.maxX)/2;if(Nr.visualXHalfExtent===void 0||isNaN(Nr.visualXHalfExtent))continue;let ul=hl+Nr.visualXHalfExtent+xt;$e=Math.max($e,ul)}isNaN($e)||(At=$e)}}if(Zr){let lt=d.filter(Dt=>Dt.minXMath.min(Be.y,Ke.y));if(lt.length>0){let Dt=Math.min(Be.x,Ke.x);for(let Re of lt){let Vr=(Re.minX+Re.maxX)/2-Re.visualXHalfExtent-xt;Dt=Math.min(Dt,Vr)}ht=Dt}}}let Gt=o(xt=>{let lt=Ke.y>Be.y,Dt=d.filter($e=>{let Nr=Math.min(Be.x,Ke.x)<$e.maxX&&Math.max(Be.x,Ke.x)>$e.minX,hl=Math.min(Be.y,Ke.y)<$e.maxY&&Math.max(Be.y,Ke.y)>$e.minY;return Nr&&hl}),Re=Dt;if(h&&Dt.length>0){let $e=Dt.filter(Nr=>Nr.minXxt);$e.length>0&&(Re=$e)}if(Re.length===0)return Ke.y;let Vr=lf;if(lt){let $e=Math.max(...Re.map(Nr=>Nr.maxY))+Vr;if($eNr.minY))-Vr;if($e>Ke.y+Pr)return $e}return Ke.y},"findBestReturnY"),Ur=o(xt=>{let lt=Gt(xt),Dt={x:xt,y:Be.y},Re={x:xt,y:lt},Vr={x:Ke.x,y:lt},$e=_e(Be,Dt),Nr=_e(Dt,Re),hl=_e(Re,Vr),ul=lt!==Ke.y?_e(Vr,Ke):!1;return!$e&&!Nr&&!hl&&!ul?Math.abs(lt-Ke.y)=3){let Be=Ee[Ee.length-1],Ke=Ee[Ee.length-2],ht=Ee[Ee.length-3],At=Math.abs(ht.y-Ke.y)Math.abs(Be.x-ht.x)&&Ee.splice(-2,1)}else if(Yt){let Xt=Math.sign(Ke.y-ht.y),fr=Math.sign(Be.y-ht.y);Xt!==0&&Xt===fr&&Math.abs(Ke.y-ht.y)>Math.abs(Be.y-ht.y)&&Ee.splice(-2,1)}}let ot=[Ee[0]];for(let Be=1;BeKe.x,Xt=At.x>ht.x;if(Yt!==Xt){ot.push(ht);continue}continue}if(Math.abs(Ke.x-ht.x)Ke.y,Xt=At.y>ht.y;if(Yt!==Xt){ot.push(ht);continue}continue}ot.push(ht)}ot.push(Ee[Ee.length-1]);for(let Be=0;BeX.from{let ke=!be.segments.some(pe=>(pe.edgeIndex!==ce.edgeIndex||pe.segmentIndex!==ce.segmentIndex)&&q(pe,X)),Me=!ge.segments.some(pe=>(pe.edgeIndex!==X.edgeIndex||pe.segmentIndex!==X.segmentIndex)&&q(pe,ce));return ke&&Me?(X.trackIndex=be.index,ce.trackIndex=ge.index,ge.segments=[...ge.segments.filter(pe=>pe.edgeIndex!==X.edgeIndex||pe.segmentIndex!==X.segmentIndex),{edgeIndex:ce.edgeIndex,segmentIndex:ce.segmentIndex,from:ce.from,to:ce.to}],be.segments=[...be.segments.filter(pe=>pe.edgeIndex!==ce.edgeIndex||pe.segmentIndex!==ce.segmentIndex),{edgeIndex:X.edgeIndex,segmentIndex:X.segmentIndex,from:X.from,to:X.to}],!0):!1},"trySwapSegmentsAcrossTracks"),W=o(X=>{let ce=X.tracks.length;return X.tracks[ce]={index:ce,coord:X.coord,segments:[]},ce},"createNewTrack"),J=o((X,ce)=>{let ge=X.pipe.tracks[X.trackIndex];ge.segments=ge.segments.filter(be=>be.edgeIndex!==X.edgeIndex||be.segmentIndex!==X.segmentIndex),X.trackIndex=ce,X.pipe.tracks[ce].segments.push({edgeIndex:X.edgeIndex,segmentIndex:X.segmentIndex,from:X.from,to:X.to})},"moveSegmentToTrack"),H=o((X,ce)=>{let ge=y[X.edgeIndex];for(let be of ge){let ke=m[be];ke.pipe===X.pipe&&J(ke,ce)}},"moveSegmentChainToTrack"),Z=o(X=>{let ce=y[X.edgeIndex],ge=ce.indexOf(m.indexOf(X)),be=[];return ge>0&&be.push(m[ce[ge-1]]),ge{if(X.orientation===ce.orientation)return!1;let ge=X.orientation==="horizontal"?X:ce,be=X.orientation==="horizontal"?ce:X;return be.pipe.coord>ge.from&&be.pipe.coordbe.from&&ge.pipe.coord{for(let ge of X.tracks)if(!ge.segments.some(be=>(be.edgeIndex!==ce.edgeIndex||be.segmentIndex!==ce.segmentIndex)&&q(be,ce)))return ge.index;return-1},"findAvailableTrack"),te=o((X,ce)=>{if(X.trackIndex===ce.trackIndex)return q(X,ce);let ge=Z(X),be=Z(ce);return ge.some(ke=>be.some(Me=>se(ke,Me)))},"segmentsConflict"),re=o((X,ce,ge)=>{if(G(X,ce,X.pipe.tracks[X.trackIndex],ce.pipe.tracks[ce.trackIndex]))return;let be=Q(X.pipe,ce);ge(ce,be!==-1?be:W(X.pipe))},"resolveTrackConflict"),ne=o(X=>{let ce=0;for(let ge=0;ge{if(Ae.has(X))return Ae.get(X);let ce=y[X];if(ce.length===0){let pe={dest:0,deviation:0,base:0,delta:0};return Ae.set(X,pe),pe}let ge=m[ce[0]].pipe.coord,be=ge;for(let pe=1;peMath.abs(le-ge)?j:le;break}}let ke=Math.abs(be-ge),Me={dest:be,deviation:ke,base:ge,delta:be-ge};return Ae.set(X,Me),Me},"getDestInfo"),me=o(()=>{let X=0,ce=new Map;for(let[be,ke]of n.entries())y[be].length!==0&&ke.start&&(ce.has(ke.start)||ce.set(ke.start,[]),ce.get(ke.start).push(be));let ge=o(be=>{let ke=n[be];if(!ke.start||!ke.end)return 0;let Me=a.get(ke.start),pe=a.get(ke.end);if(!Me||!pe)return 0;let Oe=(pe.x??0)-(Me.x??0),j=(pe.y??0)-(Me.y??0);return Math.abs(Oe)+Math.abs(j)},"getEdgeDistance");for(let be of ce.values()){be.sort((Me,pe)=>{let Oe=ie(Me),j=ie(pe);if(Math.abs(Oe.deviation-j.deviation)>1)return Oe.deviation-j.deviation;if(Math.abs(Oe.dest-j.dest)>1)return Oe.dest-j.dest;let le=ge(Me),U=ge(pe);if(Math.abs(le-U)>1)return U-le;let fe=y[Me].length,Y=y[pe].length;if(fe!==Y)return fe-Y;if(fe===1){let Le=y[Me][0],xe=y[pe][0];if(m[Le]&&m[xe]){let je=m[Le],Ie=m[xe],Ve=Math.abs(je.to-je.from),Ne=Math.abs(Ie.to-Ie.from);if(Math.abs(Ve-Ne)>1)return Ve-Ne}}return 0});let ke=be.map(Me=>m[y[Me][0]]);X+=ne(ke)}return X},"fixSourceHandleCrossings"),oe=o(()=>{let X=0,ce=new Map;for(let[ge,be]of n.entries())y[ge].length!==0&&be.end&&(ce.has(be.end)||ce.set(be.end,[]),ce.get(be.end).push(ge));for(let ge of ce.values()){ge.sort((ke,Me)=>{let pe=o(le=>{let U=y[le];if(U.length<2)return 0;let fe=m[U[U.length-2]];return Math.abs(fe.to-fe.from)},"getDist"),Oe=pe(ke),j=pe(Me);return Math.abs(Oe-j)>.1?Oe-j:ke-Me});let be=ge.map(ke=>m[y[ke][y[ke].length-1]]);X+=ne(be)}return X},"fixTargetHandleCrossings"),we=o(()=>{let X=0;for(let ce of l){let ge=[];for(let be of ce.tracks)for(let ke of be.segments){let Me=y[ke.edgeIndex].find(pe=>m[pe].segmentIndex===ke.segmentIndex);Me!==void 0&&ge.push(m[Me])}ge.sort((be,ke)=>be.edgeIndex-ke.edgeIndex||be.segmentIndex-ke.segmentIndex);for(let be=0;be{be.segments.forEach(ke=>{ce.push({edgeIndex:ke.edgeIndex,segmentIndex:ke.segmentIndex,trackIndex:be.index,from:ke.from,to:ke.to})})}),ce.sort((be,ke)=>be.from-ke.from);let ge=[];if(ce.length>0){let be=[ce[0]],ke=ce[0].to;for(let Me=1;Meke.add(Le.trackIndex));let Me=new Map;be.forEach(Le=>{let xe=ie(Le.edgeIndex);Me.set(Le.trackIndex,(Me.get(Le.trackIndex)??0)+xe.delta)});let pe=[...ke].filter(Le=>(Me.get(Le)??0)<-1),Oe=[...ke].filter(Le=>(Me.get(Le)??0)>1),j=[...ke].filter(Le=>Math.abs(Me.get(Le)??0)<=1);pe.sort((Le,xe)=>(Me.get(xe)??0)-(Me.get(Le)??0)),Oe.sort((Le,xe)=>(Me.get(Le)??0)-(Me.get(xe)??0));let le=o((Le,xe)=>{be.filter(je=>je.trackIndex===Le).forEach(je=>{let Ie=b.has(je.edgeIndex)?X.coord:xe;ae.set(`${je.edgeIndex}-${je.segmentIndex}`,Ie)})},"assignCoord"),U=0;for(let Le of pe)U++,le(Le,X.coord-U*zI);if(j.length===0&&ke.size>0){let Le=[...ke].sort((Ie,Ve)=>Math.abs(Me.get(Ie)??0)-Math.abs(Me.get(Ve)??0))[0],xe=pe.indexOf(Le);xe!==-1&&pe.splice(xe,1);let je=Oe.indexOf(Le);je!==-1&&Oe.splice(je,1),j.push(Le)}let fe=0;for(let Le of j){if(fe===0)le(Le,X.coord);else{let xe=fe%2===1?1:-1,je=Math.ceil(fe/2);le(Le,X.coord+xe*je*zI*.5)}fe++}let Y=0;for(let Le of Oe)Y++,le(Le,X.coord+Y*zI)}}for(let[X,ce]of n.entries()){let ge=y[X]??[];if(ge.length===0)continue;let be=[],ke=a.get(ce.start),Me=a.get(ce.end),{pSrcPort:pe,pDstPort:Oe}=z(X,ke,Me),j=ge.map(fe=>{let Y=m[fe],Le=ae.get(`${Y.edgeIndex}-${Y.segmentIndex}`)??Y.pipe.coord;return{orient:Y.orientation,coord:Le,from:Y.from,to:Y.to}});be.push(pe);for(let fe=0;fePr&&be.push(cf(Y,xe)),Ve&&Ie.orient===Y.orient)if(Math.abs(Y.coord-Ie.coord)>Pr){let Ne=Y.orient==="vertical"?(xe+Ie.from)/2:b9(Y,Ie);be.push(cf(Y,Ne),cf(Ie,Ne))}else(fe===0||fe===j.length-2)&&be.push(cf(Y,b9(Y,Ie)));else if(Ve)be.push(cf(Y,Ie.coord));else{let Ne=Math.abs(Y.from-xe)Pr||Math.abs(le.y-Oe.y)>Pr)&&be.push(Oe);let U=[];be.length>0&&U.push(be[0]);for(let fe=1;fePr||Math.abs(Y.y-Le.y)>Pr)&&U.push(Y)}ce.points=U}for(let X of n){let ce=X.__originalEdge;ce&&X.points&&(ce.points=X.points)}e.edges=(e.edges??[]).filter(X=>!X.isLayoutOnly);let Pe=o((X,ce)=>{let ge=ce.x??0,be=ce.y??0,ke=ce.width??0,Me=ce.height??0;if(ke<=0||Me<=0)return X;let pe=ge-ke/2,Oe=ge+ke/2,j=be-Me/2,le=be+Me/2;if(X.xOe||X.yle)return X;let U=X.x-pe,fe=Oe-X.x,Y=X.y-j,Le=le-X.y,xe=Math.min(U,fe,Y,Le);return xe===U?{x:pe,y:X.y}:xe===fe?{x:Oe,y:X.y}:xe===Y?{x:X.x,y:j}:{x:X.x,y:le}},"nodeBoundaryClamp");for(let X of e.edges){let ce=X.points;if(!ce||ce.length<2)continue;let ge=X.start,be=X.end,ke=ge?a.get(ge):void 0,Me=be?a.get(be):void 0;ke&&(ce[0]=Pe(ce[0],ke)),Me&&(ce[ce.length-1]=Pe(ce[ce.length-1],Me))}return e}function oye(e){return e.direction??"TB"}function lye(e){let t=Wme(e),r=e.config.flowchart?.nodeSpacing??40,i=e.config.flowchart?.rankSpacing??100,n=e.config.swimlane?.ignoreCrossLaneEdges??!0,a=e.config.swimlane?.optimizeRanksByCrossings??!0,s=e.config.swimlane?.automaticLaneOrdering??!1,l=oye(e),{ordered:h,coordinates:u}=aye(t,{nodeGap:r,layerGap:i,ignoreCrossLaneEdges:n,optimizeRanksByCrossings:a,automaticLaneOrdering:s,direction:l});Ume(t,h,u,{nodeGap:r,layerGap:i});for(let d of e.edges??[])delete d.points;sye(e,l);for(let d of e.edges??[])(!d.curve||d.curve==="basis")&&(d.curve="rounded");return C1e(e,l),k1e(e),l}async function cye(e,t){let r=t.select("g");z0(r,e.markers,e.type,e.diagramId),N3(),B3(),D3(),vC(),Gme(e);let i=Vme(e);e.nodes=i.nodes,e.edges=i.edges;let{groups:n}=await Rme(r,e);lye(e),await zme(e,n)}var wme,bC,xC,YWe,BI,HWe,mr,XWe,Eme,Sl,KWe,TC,ZWe,Ut,Qn,Mr,PI,Qu,QWe,Ps,Sme,kC,FI,JWe,_me,eUe,tUe,MC,Ame,K1e,Pr,rUe,lf,J0,CC,Po,zI,uye=Tt(()=>{NI();nf();Bs();ha();Zn();sa();ds();la();Fn();An();Or();Yr();tr();Zt();vt();o(Rme,"createGraphWithElements");wme=5,bC=1e-5,xC=1e-6;o(SC,"buildSegmentList");o(Lme,"segmentIntersection");o(qI,"isHorizontalSeg");o($me,"findEdgeIntersections");o(_l,"fmt");o(em,"pointToString");o(Ime,"getArcSweepFlag");YWe=.001;o(Dme,"applyMarkerOffsets");o(Mme,"emitJump");o(jI,"computeRoundedCorner");o(Nme,"rewriteEdgePath");o(Ome,"isStraightPath");o(Bme,"curveSupportsLineHops");o(Pme,"decodeDataPoints");o(Fme,"applyLineJumpsToSvg");o(zme,"adjustLayout");o(qme,"positionEdgeLabel");BI="__swimlane_default__";o(GI,"topLaneHorizontalPadding");o(jme,"assignTopLaneTitleRect");o(Gme,"prepareLayoutForSwimlanes");o(Wme,"toGraphView");o(Ume,"writeBackToLayoutData");HWe="[EdgeLabelNodes]";o(Vme,"createEdgeLabelNodes");o(x9,"measuredNodeRect");o(T9,"nodeBoundsInfoFor");o(Fo,"samePoint");o(Gr,"sameX");o(Xr,"sameY");o(cn,"isHorizontalSegment");o(hn,"isVerticalSegment");o(ps,"overlapLength");o(yc,"sameAxisSegmentOverlapLength");o(rm,"orthogonalSegmentsForPoints");o(ho,"countOrthogonalBends");o(ri,"dedupeConsecutivePoints");o(k9,"classifyThreeSegmentRoute");o(OC,"segmentBoundsOverlapRect");o(C9,"pointInsideRect");o(Yme,"rectContainsRect");o(_C,"rectsOverlap");o(WI,"inflateRect");o(tm,"rectFromCenterSize");o(Fs,"rectOfNodeBounds");o(hf,"portForRectSide");o(w9,"buildOrthogonalPortPath");o(E9,"buildSameSideTrackPath");o(BC,"collectRealNodeBounds");o(Ju,"collectNodeRectEntries");o(Hme,"collectLayoutNodeRects");o(S9,"getNodePairGeometry");o(bn,"segmentHitsAnyRect");o(_9,"orthogonalSegmentsCross");o(Xme,"sameAxisSegmentsOverlap");o(AC,"segmentConflictsWithAnyEdge");o(_h,"orthogonalSegmentsStrictlyCross");o(UI,"strictlyBetween");o(Kme,"isCollinearIntermediate");o(Zme,"simplifyPolylineOnce");o(RC,"orthogonalizePolyline");o(vc,"simplifyPolyline");mr=.001,XWe=.5,Eme=4;o(A9,"endpointContextFor");o(Qme,"segmentEnterPoint");o(VI,"clipEndpoint");o(Jme,"clipEdgeEndpointsToNodeBoundaries");o(YI,"snapEndpointToBoundary");o(LC,"firstDistinctAdjacent");o($C,"cornerClearanceRange");o(HI,"clampToCornerClearance");o(e1e,"intersectRanges");o(XI,"clearanceRangeForSide");o(IC,"terminalSideForSegment");o(xv,"isHorizontalSide");o(t1e,"straightClearanceRange");o(KI,"clearStraightEndpointCornerAxis");o(R9,"clearStraightEndpointCornerConnections");o(r1e,"cornerClearedEndpoint");o(i1e,"moveCollinearEndpointRun");o(ZI,"clearEndpointCornerConnection");o(QI,"borderSideForSegment");o(JI,"leavesOutward");o(e9,"collapseOwnBorderStub");o(n1e,"snapAndCollapseEndpoints");o(t9,"prepareEdgeEndpointsForRenderer");o(L9,"buildNodeMap");o(a1e,"resolveTopLevelGroupId");o(r9,"groupDepth");o($9,"boundsForChildren");o(s1e,"applyGroupBounds");o(o1e,"recomputeNestedGroupBounds");o(DC,"mirrorAxis");o(l1e,"applyBtDirectionTransform");o(c1e,"applyLrDirectionTransform");Sl=1e-6,KWe=8,TC=KWe,ZWe=[0,TC,-TC,2*TC,-2*TC];o(h1e,"portSwapToLShape");o(u1e,"collapseShortTerminalStub");Ut=.001,Qn=8,Mr=rm,PI=o((e,t)=>Gr(e,t,Ut)||Xr(e,t,Ut),"orthogonallyAligned");o(d1e,"separateSharedRenderedTerminalLanes");o(p1e,"collapseRedundantRectangularDoglegs");o(i9,"liftObstacleHuggingSameSideRails");o(n9,"liftTopLaneTitleBandsAboveRails");o(a9,"shiftLeftLaneTitleBandsLeftOfRails");o(f1e,"swapDestinationTerminalTailsToReduceCrossings");o(g1e,"reassignCrossingExternalRailChannels");o(m1e,"shortcutRedundantOrthogonalJogs");o(y1e,"resolveRenderedOrthogonalCrossings");Qu=.001,QWe=8;o(v1e,"simplifyDetouredEdges");Ps=.001,Sme=10,kC=7;o(s9,"markerClearanceRectFor");o(b1e,"normalizeRect");o(o9,"labelOverlapsOwnMarker");o(wC,"anchorLabelsToPolyline");FI=1e-6,JWe=8,_me=JWe/2,eUe=3;o(l9,"pairKey");o(x1e,"straightenCollinearSiblingDetours");o(c9,"nudgeSharedInteriorSubpaths");o(T1e,"segmentsIntersect");o(k1e,"validateSwimlanesLayout");o(C1e,"postProcessSwimlaneLayout");o(ed,"normalizeGraph");o(I9,"incoming");o(w1e,"buildSuccessorMap");o(D9,"buildSortedSuccessorMap");o(M9,"buildInDegreeMap");o(N9,"sortedZeroInDegreeNodes");o(PC,"buildPredecessorSuccessorMaps");o(O9,"buildLayersFromRanks");o(Tv,"topoSortIfAcyclic");o(im,"buildLayerIndex");o(B9,"countInversions");o(E1e,"removeCycles_DFS");o(S1e,"buildTopLaneMap");o(Ah,"createTopLaneResolver");o(FC,"buildTopLaneOrder");o(P9,"resolveTopLaneOrder");tUe={EPSILON:1e-6},MC={GRAVITY_ITERATIONS:8,MAX_CROSSING_OPTIMIZATION_PASSES:4,DEFAULT_COMPACT_SINGLE_INPUT:!0},Ame={DEFAULT_LAYER_GAP:100,DEFAULT_NODE_GAP:40};o(_1e,"buildDrivingTree");o(A1e,"chooseParent");o(R1e,"buildAdjacency");o(L1e,"assignComponents");o($1e,"computeBlocks");o(I1e,"popBlock");o(D1e,"computeSubtreeCrossCounts");o(M1e,"annotateMinimumLayers");o(F9,"compareByRankThenId");o(N1e,"emitNodesInTreeOrder");o(O1e,"deduplicateLayers");o(B1e,"createChildOrderer");o(NC,"buildMultitreeLayerOrder");o(P1e,"countCrossingsBetweenAdjacent");o(h9,"totalCrossings");o(F1e,"optimizeRanksByCrossings");o(z1e,"adjustCrossLaneSources");o(q1e,"assignLayers_LongestPath");o(j1e,"assignLayers_Gravity");o(G1e,"topoSortByGenerationIfAcyclic");o(W1e,"assignLayers_LaneAwareCompact");o(U1e,"makeProperLayering");o(u9,"median");o(d9,"barycenter");o(V1e,"neighborPositionsFor");o(Y1e,"currentOrderTieBreak");o(p9,"countCrossingsBetweenAdjacent");o(EC,"sortByHeuristic");o(f9,"reorderLayer");o(g9,"transposeImprove");o(H1e,"orderLayers");o(X1e,"assignCoordinates");K1e=8;o(Z1e,"hashString");o(Q1e,"mulberry32");o(J1e,"deterministicShuffle");o(eye,"sourceDistance");o(m9,"laneArrangementCost");o(tye,"buildWeightedLaneEdges");o(y9,"greedySwitch");o(rye,"isBetterCandidate");o(iye,"seedForRestart");o(nye,"optimizeTopLaneOrder");o(aye,"sugiyamaLayout");Pr=tUe.EPSILON,rUe=8,lf=15,J0=15,CC=25,Po=20,zI=10;o(v9,"chooseOrthogonalSide");o(b9,"sharedLineEndpointCoord");o(cf,"pointOnLine");o(sye,"routeEdgesOrthogonal");o(oye,"getSwimlaneDirection");o(lye,"runSwimlaneLayoutCore");o(cye,"render")});function dw(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,i=Array(t);r=e.length?{done:!0}:{done:!1,value:e[i++]}},"n"),e:o(function(h){throw h},"e"),f:n}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a,s=!0,l=!1;return{s:o(function(){r=r.call(e)},"s"),n:o(function(){var h=r.next();return s=h.done,h},"n"),e:o(function(h){l=!0,a=h},"e"),f:o(function(){try{s||r.return==null||r.return()}finally{if(l)throw a}},"f")}}function jM(e,t,r){return(t=GM(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function $ve(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Ive(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var i,n,a,s,l=[],h=!0,u=!1;try{if(a=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;h=!1}else for(;!(h=(i=a.call(r)).done)&&(l.push(i.value),l.length!==t);h=!0);}catch(d){u=!0,n=d}finally{try{if(!h&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(u)throw n}}return l}}function Dve(){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 Mve(){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 xn(e,t){return Ave(e)||Ive(e,t)||_w(e,t)||Dve()}function Nv(e){return Rve(e)||$ve(e)||_w(e)||Mve()}function Nve(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,t);if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function GM(e){var t=Nve(e,"string");return typeof t=="symbol"?t:t+""}function In(e){"@babel/helpers - typeof";return In=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},In(e)}function _w(e,t){if(e){if(typeof e=="string")return dw(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)?dw(e,t):void 0}}function Tm(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function km(){if(fye)return z9;fye=1;function e(t){var r=typeof t;return t!=null&&(r=="object"||r=="function")}return o(e,"isObject"),z9=e,z9}function Wve(){if(gye)return q9;gye=1;var e=typeof zC=="object"&&zC&&zC.Object===Object&&zC;return q9=e,q9}function Hv(){if(mye)return j9;mye=1;var e=Wve(),t=typeof self=="object"&&self&&self.Object===Object&&self,r=e||t||Function("return this")();return j9=r,j9}function Uve(){if(yye)return G9;yye=1;var e=Hv(),t=o(function(){return e.Date.now()},"now");return G9=t,G9}function Vve(){if(vye)return W9;vye=1;var e=/\s/;function t(r){for(var i=r.length;i--&&e.test(r.charAt(i)););return i}return o(t,"trimmedEndIndex"),W9=t,W9}function Yve(){if(bye)return U9;bye=1;var e=Vve(),t=/^\s+/;function r(i){return i&&i.slice(0,e(i)+1).replace(t,"")}return o(r,"baseTrim"),U9=r,U9}function Rw(){if(xye)return V9;xye=1;var e=Hv(),t=e.Symbol;return V9=t,V9}function Hve(){if(Tye)return Y9;Tye=1;var e=Rw(),t=Object.prototype,r=t.hasOwnProperty,i=t.toString,n=e?e.toStringTag:void 0;function a(s){var l=r.call(s,n),h=s[n];try{s[n]=void 0;var u=!0}catch{}var d=i.call(s);return u&&(l?s[n]=h:delete s[n]),d}return o(a,"getRawTag"),Y9=a,Y9}function Xve(){if(kye)return H9;kye=1;var e=Object.prototype,t=e.toString;function r(i){return t.call(i)}return o(r,"objectToString"),H9=r,H9}function VM(){if(Cye)return X9;Cye=1;var e=Rw(),t=Hve(),r=Xve(),i="[object Null]",n="[object Undefined]",a=e?e.toStringTag:void 0;function s(l){return l==null?l===void 0?n:i:a&&a in Object(l)?t(l):r(l)}return o(s,"baseGetTag"),X9=s,X9}function Kve(){if(wye)return K9;wye=1;function e(t){return t!=null&&typeof t=="object"}return o(e,"isObjectLike"),K9=e,K9}function Cm(){if(Eye)return Z9;Eye=1;var e=VM(),t=Kve(),r="[object Symbol]";function i(n){return typeof n=="symbol"||t(n)&&e(n)==r}return o(i,"isSymbol"),Z9=i,Z9}function Zve(){if(Sye)return Q9;Sye=1;var e=Yve(),t=km(),r=Cm(),i=NaN,n=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,s=/^0o[0-7]+$/i,l=parseInt;function h(u){if(typeof u=="number")return u;if(r(u))return i;if(t(u)){var d=typeof u.valueOf=="function"?u.valueOf():u;u=t(d)?d+"":d}if(typeof u!="string")return u===0?u:+u;u=e(u);var p=a.test(u);return p||s.test(u)?l(u.slice(2),p?2:8):n.test(u)?i:+u}return o(h,"toNumber"),Q9=h,Q9}function Qve(){if(_ye)return J9;_ye=1;var e=km(),t=Uve(),r=Zve(),i="Expected a function",n=Math.max,a=Math.min;function s(l,h,u){var d,p,f,g,m,y,b=0,v=!1,T=!1,x=!0;if(typeof l!="function")throw new TypeError(i);h=r(h)||0,e(u)&&(v=!!u.leading,T="maxWait"in u,f=T?n(r(u.maxWait)||0,h):f,x="trailing"in u?!!u.trailing:x);function k(B){var A=d,I=p;return d=p=void 0,b=B,g=l.apply(I,A),g}o(k,"invokeFunc");function C(B){return b=B,m=setTimeout(_,h),v?k(B):g}o(C,"leadingEdge");function E(B){var A=B-y,I=B-b,O=h-A;return T?a(O,f-I):O}o(E,"remainingWait");function w(B){var A=B-y,I=B-b;return y===void 0||A>=h||A<0||T&&I>=f}o(w,"shouldInvoke");function _(){var B=t();if(w(B))return L(B);m=setTimeout(_,E(B))}o(_,"timerExpired");function L(B){return m=void 0,x&&d?k(B):(d=p=void 0,g)}o(L,"trailingEdge");function N(){m!==void 0&&clearTimeout(m),b=0,d=y=p=m=void 0}o(N,"cancel");function D(){return m===void 0?g:L(t())}o(D,"flush");function M(){var B=t(),A=w(B);if(d=arguments,p=this,y=B,A){if(m===void 0)return C(y);if(T)return clearTimeout(m),m=setTimeout(_,h),k(y)}return m===void 0&&(m=setTimeout(_,h)),g}return o(M,"debounced"),M.cancel=N,M.flush=D,M}return o(s,"debounce"),J9=s,J9}function ibe(e,t,r,i,n){var a=n*Math.PI/180,s=Math.cos(a)*(e-r)-Math.sin(a)*(t-i)+r,l=Math.sin(a)*(e-r)+Math.cos(a)*(t-i)+i;return{x:s,y:l}}function nbe(e,t,r){if(r===0)return e;var i=(t.x1+t.x2)/2,n=(t.y1+t.y2)/2,a=t.w/t.h,s=1/a,l=ibe(e.x,e.y,i,n,r),h=RUe(l.x,l.y,i,n,a,s);return{x:h.x,y:h.y}}function cbe(){return Iye||(Iye=1,(function(e,t){(function(){var r,i,n,a,s,l,h,u,d,p,f,g,m,y,b;n=Math.floor,p=Math.min,i=o(function(v,T){return vT?1:0},"defaultCmp"),d=o(function(v,T,x,k,C){var E;if(x==null&&(x=0),C==null&&(C=i),x<0)throw new Error("lo must be non-negative");for(k==null&&(k=v.length);xN;0<=N?L++:L--)_.push(L);return _}).apply(this).reverse(),w=[],k=0,C=E.length;kD;0<=D?++_:--_)M.push(s(v,x));return M},"nsmallest"),y=o(function(v,T,x,k){var C,E,w;for(k==null&&(k=i),C=v[x];x>T;){if(w=x-1>>1,E=v[w],k(C,E)<0){v[x]=E,x=w;continue}break}return v[x]=C},"_siftdown"),b=o(function(v,T,x){var k,C,E,w,_;for(x==null&&(x=i),C=v.length,_=T,E=v[T],k=2*T+1;k-1}return o(t,"listCacheHas"),SD=t,SD}function Vbe(){if(x2e)return _D;x2e=1;var e=eb();function t(r,i){var n=this.__data__,a=e(n,r);return a<0?(++this.size,n.push([r,i])):n[a][1]=i,this}return o(t,"listCacheSet"),_D=t,_D}function Ybe(){if(T2e)return AD;T2e=1;var e=jbe(),t=Gbe(),r=Wbe(),i=Ube(),n=Vbe();function a(s){var l=-1,h=s==null?0:s.length;for(this.clear();++l-1&&i%1==0&&i0;){var d=n.shift();t(d),a.add(d.id()),l&&i(n,a,d)}return e}function oN(e,t,r){if(r.isParent())for(var i=r._private.children,n=0;n0&&arguments[0]!==void 0?arguments[0]:JYe,t=arguments.length>1?arguments[1]:void 0,r=0;r0?M=A:D=A;while(Math.abs(B)>s&&++I=a?T(N,I):O===0?I:k(N,D,D+u)}o(C,"getTForX");var E=!1;function w(){E=!0,(e!==t||r!==i)&&x()}o(w,"precompute");var _=o(function(N){return E||w(),e===t&&r===i?N:N===0?0:N===1?1:b(C(N),t,i)},"f");_.getControlPoints=function(){return[{x:e,y:t},{x:r,y:i}]};var L="generateBezier("+[e,t,r,i]+")";return _.toString=function(){return L},_}function CM(e,t,r,i,n){if(i===1||t===r)return r;var a=n(t,r,i);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 wM(e,t){return e.pfValue!=null||e.value!=null?e.pfValue!=null&&(t==null||t.type.units!=="%")?e.pfValue:e.value:e}function gf(e,t,r,i,n){var a=n!=null?n.type:null;r<0?r=0:r>1&&(r=1);var s=wM(e,n),l=wM(t,n);if(It(s)&&It(l))return CM(a,s,l,r,i);if(_i(s)&&_i(l)){for(var h=[],u=0;u0?(g==="spring"&&m.push(s.duration),s.easingImpl=aw[g].apply(null,m)):s.easingImpl=aw[g]}var y=s.easingImpl,b;if(s.duration===0?b=1:b=(r-h)/s.duration,s.applying&&(b=s.progress),b<0?b=0:b>1&&(b=1),s.delay==null){var v=s.startPosition,T=s.position;if(T&&n&&!e.locked()){var x={};hm(v.x,T.x)&&(x.x=gf(v.x,T.x,b,y)),hm(v.y,T.y)&&(x.y=gf(v.y,T.y,b,y)),e.position(x)}var k=s.startPan,C=s.pan,E=a.pan,w=C!=null&&i;w&&(hm(k.x,C.x)&&(E.x=gf(k.x,C.x,b,y)),hm(k.y,C.y)&&(E.y=gf(k.y,C.y,b,y)),e.emit("pan"));var _=s.startZoom,L=s.zoom,N=L!=null&&i;N&&(hm(_,L)&&(a.zoom=Fv(a.minZoom,gf(_,L,b,y),a.maxZoom)),e.emit("zoom")),(w||N)&&e.emit("viewport");var D=s.style;if(D&&D.length>0&&n){for(var M=0;M=0;E--){var w=C[E];w()}C.splice(0,C.length)},"callbacks"),T=g.length-1;T>=0;T--){var x=g[T],k=x._private;if(k.stopped){g.splice(T,1),k.hooked=!1,k.playing=!1,k.started=!1,v(k.frames);continue}!k.playing&&!k.applying||(k.playing&&k.applying&&(k.applying=!1),k.started||Dxe(d,x,e),Ixe(d,x,e,p),k.applying&&(k.applying=!1),v(k.frames),k.step!=null&&k.step(e),x.completed()&&(g.splice(T,1),k.hooked=!1,k.playing=!1,k.started=!1,v(k.completes)),y=!0)}return!p&&g.length===0&&m.length===0&&i.push(d),y}o(n,"stepOne");for(var a=!1,s=0;s0?t.notify("draw",r):t.notify("draw")),r.unmerge(i),t.emit("step")}function dN(e){this.options=cr({},vHe,bHe,e)}function pN(e){this.options=cr({},xHe,e)}function fN(e){this.options=cr({},THe,e)}function ob(e){this.options=cr({},kHe,e),this.options.layout=this;var t=this.options.eles.nodes(),r=this.options.eles.edges(),i=r.filter(function(n){var a=n.source().data("id"),s=n.target().data("id"),l=t.some(function(u){return u.data("id")===a}),h=t.some(function(u){return u.data("id")===s});return!l||!h});this.options.eles=this.options.eles.not(i)}function gN(e){this.options=cr({},BHe,e)}function Fw(e){this.options=cr({},PHe,e)}function mN(e){this.options=cr({},FHe,e)}function yN(e){this.options=cr({},zHe,e)}function vN(e){this.options=e,this.notifications=0}function xN(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 zw(e,t,r,i){var n=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0;return i===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}:(GHe(e,t,r,i,n),{cx:AM,cy:RM,radius:mf,startX:Pxe,startY:Fxe,stopX:LM,stopY:$M,startAngle:xc.ang+Math.PI/2*bf,endAngle:zo.ang-Math.PI/2*bf,counterClockwise:lw})}function TN(e){var t=[];if(e!=null){for(var r=0;r5&&arguments[5]!==void 0?arguments[5]:5,s=Math.min(a,i/2,n/2);e.beginPath(),e.moveTo(t+s,r),e.lineTo(t+i-s,r),e.quadraticCurveTo(t+i,r,t+i,r+s),e.lineTo(t+i,r+n-s),e.quadraticCurveTo(t+i,r+n,t+i-s,r+n),e.lineTo(t+s,r+n),e.quadraticCurveTo(t,r+n,t,r+n-s),e.lineTo(t,r+s),e.quadraticCurveTo(t,r,t+s,r),e.closePath()}function NM(e,t,r){var i=e.createShader(t);if(e.shaderSource(i,r),e.compileShader(i),!e.getShaderParameter(i,e.COMPILE_STATUS))throw new Error(e.getShaderInfoLog(i));return i}function aTe(e,t,r){var i=NM(e,e.VERTEX_SHADER,t),n=NM(e,e.FRAGMENT_SHADER,r),a=e.createProgram();if(e.attachShader(a,i),e.attachShader(a,n),e.linkProgram(a),!e.getProgramParameter(a,e.LINK_STATUS))throw new Error("Could not initialize shaders");return a}function sTe(e,t,r){r===void 0&&(r=t);var i=e.makeOffscreenCanvas(t,r),n=i.context=i.getContext("2d");return i.clear=function(){return n.clearRect(0,0,i.width,i.height)},i.clear(),i}function Gw(e){var t=e.pixelRatio,r=e.cy.zoom(),i=e.cy.pan();return{zoom:r*t,pan:{x:i.x*t,y:i.y*t}}}function oTe(e){var t=e.pixelRatio,r=e.cy.zoom();return r*t}function lTe(e,t,r,i,n){var a=i*r+t.x,s=n*r+t.y;return s=Math.round(e.canvasHeight-s),[a,s]}function cTe(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 hTe(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 uTe(e){return e[0]+(e[1]<<8)+(e[2]<<16)+(e[3]<<24)}function dTe(e,t){var r=e.createTexture();return r.buffer=function(i){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,i),e.generateMipmap(e.TEXTURE_2D),e.bindTexture(e.TEXTURE_2D,null)},r.deleteTexture=function(){e.deleteTexture(r)},r}function wN(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 EN(e,t,r){switch(t){case e.FLOAT:return new Float32Array(r);case e.INT:return new Int32Array(r)}}function pTe(e,t,r,i,n,a){switch(t){case e.FLOAT:return new Float32Array(r.buffer,a*i,n);case e.INT:return new Int32Array(r.buffer,a*i,n)}}function fTe(e,t,r,i){var n=wN(e,t),a=xn(n,2),s=a[0],l=a[1],h=EN(e,l,i),u=e.createBuffer();return e.bindBuffer(e.ARRAY_BUFFER,u),e.bufferData(e.ARRAY_BUFFER,h,e.STATIC_DRAW),l===e.FLOAT?e.vertexAttribPointer(r,s,l,!1,0,0):l===e.INT&&e.vertexAttribIPointer(r,s,l,0,0),e.enableVertexAttribArray(r),e.bindBuffer(e.ARRAY_BUFFER,null),u}function Al(e,t,r,i){var n=wN(e,r),a=xn(n,3),s=a[0],l=a[1],h=a[2],u=EN(e,l,t*s),d=s*h,p=e.createBuffer();e.bindBuffer(e.ARRAY_BUFFER,p),e.bufferData(e.ARRAY_BUFFER,t*d,e.DYNAMIC_DRAW),e.enableVertexAttribArray(i),l===e.FLOAT?e.vertexAttribPointer(i,s,l,!1,d,0):l===e.INT&&e.vertexAttribIPointer(i,s,l,d,0),e.vertexAttribDivisor(i,1),e.bindBuffer(e.ARRAY_BUFFER,null);for(var f=new Array(t),g=0;gXxe?(CTe(e),t.call(e,a)):(wTe(e),AN(e,a,Mv.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,s,l,h){return LTe(e,a,s)};{var i=e.invalidateCachedZSortedEles;e.invalidateCachedZSortedEles=function(){i.call(e),e.pickingFrameBuffer.needsDraw=!0}}{var n=e.notify;e.notify=function(a,s){n.call(e,a,s),a==="viewport"||a==="bounds"?e.pickingFrameBuffer.needsDraw=!0:a==="background"&&e.drawing.invalidate(s,{type:"node-body"})}}}function CTe(e){var t=e.data.contexts[e.WEBGL];t.clear(t.COLOR_BUFFER_BIT|t.DEPTH_BUFFER_BIT)}function wTe(e){var t=o(function(r){r.save(),r.setTransform(1,0,0,1,0,0),r.clearRect(0,0,e.canvasWidth,e.canvasHeight),r.restore()},"clear");t(e.data.contexts[e.NODE]),t(e.data.contexts[e.DRAG])}function ETe(e){var t=e.canvasWidth,r=e.canvasHeight,i=Gw(e),n=i.pan,a=i.zoom,s=hw();Dv(s,s,[n.x,n.y]),ww(s,s,[a,a]);var l=hw();vTe(l,t,r);var h=hw();return yTe(h,l,s),h}function _N(e,t){var r=e.canvasWidth,i=e.canvasHeight,n=Gw(e),a=n.pan,s=n.zoom;t.setTransform(1,0,0,1,0,0),t.clearRect(0,0,r,i),t.translate(a.x,a.y),t.scale(s,s)}function STe(e,t){e.drawSelectionRectangle(t,function(r){return _N(e,r)})}function _Te(e){var t=e.data.contexts[e.NODE];t.save(),_N(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 ATe(e){var t=o(function(i,n,a){for(var s=i.atlasManager.getAtlasCollection(n),l=e.data.contexts[e.NODE],h=s.atlases,u=0;u=0&&k.add(w)}return k}function LTe(e,t,r){var i=RTe(e,t,r),n=e.getCachedZSortedEles(),a,s,l=gs(i),h;try{for(l.s();!(h=l.n()).done;){var u=h.value,d=n[u];if(!a&&d.isNode()&&(a=d),!s&&d.isEdge()&&(s=d),a&&s)break}}catch(p){l.e(p)}finally{l.f()}return[a,s].filter(Boolean)}function uw(e,t,r){var i=e.drawing;t+=1,r.isNode()?(i.drawNode(r,t,"node-underlay"),i.drawNode(r,t,"node-body"),i.drawTexture(r,t,"label"),i.drawNode(r,t,"node-overlay")):(i.drawEdgeLine(r,t),i.drawEdgeArrow(r,t,"source"),i.drawEdgeArrow(r,t,"target"),i.drawTexture(r,t,"label"),i.drawTexture(r,t,"edge-source-label"),i.drawTexture(r,t,"edge-target-label"))}function AN(e,t,r){var i;e.webglDebug&&(i=performance.now());var n=e.drawing,a=0;if(r.screen&&e.data.canvasNeedsRedraw[e.SELECT_BOX]&&STe(e,t),e.data.canvasNeedsRedraw[e.NODE]||r.picking){var s=e.data.contexts[e.WEBGL];r.screen?(s.clearColor(0,0,0,0),s.enable(s.BLEND),s.blendFunc(s.ONE,s.ONE_MINUS_SRC_ALPHA)):s.disable(s.BLEND),s.clear(s.COLOR_BUFFER_BIT|s.DEPTH_BUFFER_BIT),s.viewport(0,0,s.canvas.width,s.canvas.height);var l=ETe(e),h=e.getCachedZSortedEles();if(a=h.length,n.startFrame(l,r),r.screen){for(var u=0;u{vt();o(dw,"_arrayLikeToArray");o(Ave,"_arrayWithHoles");o(Rve,"_arrayWithoutHoles");o(Mh,"_classCallCheck");o(Lve,"_defineProperties");o(Nh,"_createClass");o(gs,"_createForOfIteratorHelper");o(jM,"_defineProperty$1");o($ve,"_iterableToArray");o(Ive,"_iterableToArrayLimit");o(Dve,"_nonIterableRest");o(Mve,"_nonIterableSpread");o(xn,"_slicedToArray");o(Nv,"_toConsumableArray");o(Nve,"_toPrimitive");o(GM,"_toPropertyKey");o(In,"_typeof");o(_w,"_unsupportedIterableToArray");zn=typeof window>"u"?null:window,dye=zn?zn.navigator:null;zn&&zn.document;iUe=In(""),Ove=In({}),nUe=In(function(){}),aUe=typeof HTMLElement>"u"?"undefined":In(HTMLElement),Vv=o(function(e){return e&&e.instanceString&&Qi(e.instanceString)?e.instanceString():null},"instanceStr"),er=o(function(e){return e!=null&&In(e)==iUe},"string"),Qi=o(function(e){return e!=null&&In(e)===nUe},"fn"),_i=o(function(e){return!uo(e)&&(Array.isArray?Array.isArray(e):e!=null&&e instanceof Array)},"array"),ni=o(function(e){return e!=null&&In(e)===Ove&&!_i(e)&&e.constructor===Object},"plainObject"),sUe=o(function(e){return e!=null&&In(e)===Ove},"object"),It=o(function(e){return e!=null&&In(e)===In(1)&&!isNaN(e)},"number"),oUe=o(function(e){return It(e)&&Math.floor(e)===e},"integer"),pw=o(function(e){if(aUe!=="undefined")return e!=null&&e instanceof HTMLElement},"htmlElement"),uo=o(function(e){return Yv(e)||Bve(e)},"elementOrCollection"),Yv=o(function(e){return Vv(e)==="collection"&&e._private.single},"element"),Bve=o(function(e){return Vv(e)==="collection"&&!e._private.single},"collection"),WM=o(function(e){return Vv(e)==="core"},"core"),Pve=o(function(e){return Vv(e)==="stylesheet"},"stylesheet"),lUe=o(function(e){return Vv(e)==="event"},"event"),hd=o(function(e){return e==null?!0:!!(e===""||e.match(/^\s+$/))},"emptyString"),cUe=o(function(e){return typeof HTMLElement>"u"?!1:e instanceof HTMLElement},"domElement"),hUe=o(function(e){return ni(e)&&It(e.x1)&&It(e.x2)&&It(e.y1)&&It(e.y2)},"boundingBox"),uUe=o(function(e){return sUe(e)&&Qi(e.then)},"promise"),dUe=o(function(){return dye&&dye.userAgent.match(/msie|trident|edge/i)},"ms"),vm=o(function(e,t){t||(t=o(function(){if(arguments.length===1)return arguments[0];if(arguments.length===0)return"undefined";for(var i=[],n=0;nt?1:0},"ascending"),bUe=o(function(e,t){return-1*zve(e,t)},"descending"),cr=Object.assign!=null?Object.assign.bind(Object):function(e){for(var t=arguments,r=1;r1&&(y-=1),y<1/6?g+(m-g)*6*y:y<1/2?m:y<2/3?g+(m-g)*(2/3-y)*6:g}o(u,"hue2rgb");var d=new RegExp("^"+gUe+"$").exec(e);if(d){if(r=parseInt(d[1]),r<0?r=(360- -1*r%360)%360:r>360&&(r=r%360),r/=360,i=parseFloat(d[2]),i<0||i>100||(i=i/100,n=parseFloat(d[3]),n<0||n>100)||(n=n/100,a=d[4],a!==void 0&&(a=parseFloat(a),a<0||a>1)))return;if(i===0)s=l=h=Math.round(n*255);else{var p=n<.5?n*(1+i):n+i-n*i,f=2*n-p;s=Math.round(255*u(f,p,r+1/3)),l=Math.round(255*u(f,p,r)),h=Math.round(255*u(f,p,r-1/3))}t=[s,l,h,a]}return t},"hsl2tuple"),kUe=o(function(e){var t,r=new RegExp("^"+pUe+"$").exec(e);if(r){t=[];for(var i=[],n=1;n<=3;n++){var a=r[n];if(a[a.length-1]==="%"&&(i[n]=!0),a=parseFloat(a),i[n]&&(a=a/100*255),a<0||a>255)return;t.push(Math.floor(a))}var s=i[1]||i[2]||i[3],l=i[1]&&i[2]&&i[3];if(s&&!l)return;var h=r[4];if(h!==void 0){if(h=parseFloat(h),h<0||h>1)return;t.push(h)}}return t},"rgb2tuple"),CUe=o(function(e){return wUe[e.toLowerCase()]},"colorname2tuple"),qve=o(function(e){return(_i(e)?e:null)||CUe(e)||xUe(e)||kUe(e)||TUe(e)},"color2tuple"),wUe={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]},jve=o(function(e){for(var t=e.map,r=e.keys,i=r.length,n=0;n1&&arguments[1]!==void 0?arguments[1]:vf,r=t,i;i=e.next(),!i.done;)r=r*ebe+i.value|0;return r},"hashIterableInts"),Ov=o(function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:vf;return t*ebe+e|0},"hashInt"),Bv=o(function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:lm;return(t<<5)+t+e|0},"hashIntAlt"),_Ue=o(function(e,t){return e*2097152+t},"combineHashes"),td=o(function(e){return e[0]*2097152+e[1]},"combineHashesArray"),qC=o(function(e,t){return[Ov(e[0],t[0]),Bv(e[1],t[1])]},"hashArrays"),Aye=o(function(e,t){var r={value:0,done:!1},i=0,n=e.length,a={next:o(function(){return i=0;i--)e[i]===t&&e.splice(i,1)},"removeFromArray"),XM=o(function(e){e.splice(0,e.length)},"clearArray"),NUe=o(function(e,t){for(var r=0;r"u"?"undefined":In(Set))!==BUe?Set:PUe,Lw=o(function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(e===void 0||t===void 0||!WM(e)){Ui("An element must have a core reference and parameters set");return}var i=t.group;if(i==null&&(t.data&&t.data.source!=null&&t.data.target!=null?i="edges":i="nodes"),i!=="nodes"&&i!=="edges"){Ui("An element must be of type `nodes` or `edges`; you specified `"+i+"`");return}this.length=1,this[0]=this;var n=this._private={cy:e,single:!0,data:t.data||{},position:t.position||{x:0,y:0},autoWidth:void 0,autoHeight:void 0,autoPadding:void 0,compoundBoundsClean:!1,listeners:[],group:i,style:{},rstyle:{},styleCxts:[],styleKeys:{},removed:!0,selected:!!t.selected,selectable:t.selectable===void 0?!0:!!t.selectable,locked:!!t.locked,grabbed:!1,grabbable:t.grabbable===void 0?!0:!!t.grabbable,pannable:t.pannable===void 0?i==="edges":!!t.pannable,active:!1,classes:new wm,animation:{current:[],queue:[]},rscratch:{},scratch:t.scratch||{},edges:[],children:[],parent:t.parent&&t.parent.isNode()?t.parent:null,traversalCache:{},backgrounding:!1,bbCache:null,bbCacheShift:{x:0,y:0},bodyBounds:null,overlayBounds:null,labelBounds:{all:null,source:null,target:null,main:null},arrowBounds:{source:null,target:null,"mid-source":null,"mid-target":null}};if(n.position.x==null&&(n.position.x=0),n.position.y==null&&(n.position.y=0),t.renderedPosition){var a=t.renderedPosition,s=e.pan(),l=e.zoom();n.position={x:(a.x-s.x)/l,y:(a.y-s.y)/l}}var h=[];_i(t.classes)?h=t.classes:er(t.classes)&&(h=t.classes.split(/\s+/));for(var u=0,d=h.length;u0;){var C=v.pop(),E=y(C),w=C.id();if(p[w]=E,E!==1/0)for(var _=C.neighborhood().intersect(g),L=0;L<_.length;L++){var N=_[L],D=N.id(),M=k(C,N),B=E+M.dist;B0)for(O.unshift(I);d[$];){var F=d[$];O.unshift(F.edge),O.unshift(F.node),R=F.node,$=R.id()}return s.spawn(O)},"pathTo")}},"dijkstra")},GUe={kruskal:o(function(e){e=e||function(T){return 1};for(var t=this.byGroup(),r=t.nodes,i=t.edges,n=r.length,a=new Array(n),s=r,l=o(function(T){for(var x=0;x0;){if(k(),E++,x===u){for(var w=[],_=n,L=u,N=b[L];w.unshift(_),N!=null&&w.unshift(N),_=y[L],_!=null;)L=_.id(),N=b[L];return{found:!0,distance:d[x],path:this.spawn(w),steps:E}}f[x]=!0;for(var D=T._private.edges,M=0;MN&&(g[L]=N,v[L]=_,T[L]=k),!n){var D=_*u+w;!n&&g[D]>N&&(g[D]=N,v[D]=w,T[D]=k)}}}for(var M=0;M1&&arguments[1]!==void 0?arguments[1]:a,ye=T(oe),ve=[],ae=ye;;){if(ae==null)return t.spawn();var Pe=v(ae),X=Pe.edge,ce=Pe.pred;if(ve.unshift(ae[0]),ae.same(we)&&ve.length>0)break;X!=null&&ve.unshift(X),ae=ce}return l.spawn(ve)},"pathTo"),C=0;C=0;u--){var d=h[u],p=d[1],f=d[2];(t[p]===s&&t[f]===l||t[p]===l&&t[f]===s)&&h.splice(u,1)}for(var g=0;gi;){var n=Math.floor(Math.random()*t.length);t=ZUe(n,e,t),r--}return t},"contractUntil"),QUe={kargerStein:o(function(){var e=this,t=this.byGroup(),r=t.nodes,i=t.edges;i.unmergeBy(function(R){return R.isLoop()});var n=r.length,a=i.length,s=Math.ceil(Math.pow(Math.log(n)/Math.LN2,2)),l=Math.floor(n/KUe);if(n<2){Ui("At least 2 nodes are required for Karger-Stein algorithm");return}for(var h=[],u=0;u1&&arguments[1]!==void 0?arguments[1]:0,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:e.length,i=1/0,n=t;n1&&arguments[1]!==void 0?arguments[1]:0,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:e.length,i=-1/0,n=t;n1&&arguments[1]!==void 0?arguments[1]:0,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:e.length,i=0,n=0,a=t;a1&&arguments[1]!==void 0?arguments[1]:0,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:e.length,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,n=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!0;i?e=e.slice(t,r):(r0&&e.splice(0,t));for(var s=0,l=e.length-1;l>=0;l--){var h=e[l];a?isFinite(h)||(e[l]=-1/0,s++):e.splice(l,1)}n&&e.sort(function(p,f){return p-f});var u=e.length,d=Math.floor(u/2);return u%2!==0?e[d+1+s]:(e[d-1+s]+e[d+s])/2},"median"),nVe=o(function(e){return Math.PI*e/180},"deg2rad"),jC=o(function(e,t){return Math.atan2(t,e)-Math.PI/2},"getAngleFromDisp"),KM=Math.log2||function(e){return Math.log(e)/Math.log(2)},ZM=o(function(e){return e>0?1:e<0?-1:0},"signum"),kf=o(function(e,t){return Math.sqrt(pf(e,t))},"dist"),pf=o(function(e,t){var r=t.x-e.x,i=t.y-e.y;return r*r+i*i},"sqdist"),aVe=o(function(e){for(var t=e.length,r=0,i=0;i=e.x1&&e.y2>=e.y1)return{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2,w:e.x2-e.x1,h:e.y2-e.y1};if(e.w!=null&&e.h!=null&&e.w>=0&&e.h>=0)return{x1:e.x1,y1:e.y1,x2:e.x1+e.w,y2:e.y1+e.h,w:e.w,h:e.h}}},"makeBoundingBox"),oVe=o(function(e){return{x1:e.x1,x2:e.x2,w:e.w,y1:e.y1,y2:e.y2,h:e.h}},"copyBoundingBox"),lVe=o(function(e){e.x1=1/0,e.y1=1/0,e.x2=-1/0,e.y2=-1/0,e.w=0,e.h=0},"clearBoundingBox"),cVe=o(function(e,t){e.x1=Math.min(e.x1,t.x1),e.x2=Math.max(e.x2,t.x2),e.w=e.x2-e.x1,e.y1=Math.min(e.y1,t.y1),e.y2=Math.max(e.y2,t.y2),e.h=e.y2-e.y1},"updateBoundingBox"),dbe=o(function(e,t,r){e.x1=Math.min(e.x1,t),e.x2=Math.max(e.x2,t),e.w=e.x2-e.x1,e.y1=Math.min(e.y1,r),e.y2=Math.max(e.y2,r),e.h=e.y2-e.y1},"expandBoundingBoxByPoint"),QC=o(function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return e.x1-=t,e.x2+=t,e.y1-=t,e.y2+=t,e.w=e.x2-e.x1,e.h=e.y2-e.y1,e},"expandBoundingBox"),JC=o(function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[0],r,i,n,a;if(t.length===1)r=i=n=a=t[0];else if(t.length===2)r=n=t[0],a=i=t[1];else if(t.length===4){var s=xn(t,4);r=s[0],i=s[1],n=s[2],a=s[3]}return e.x1-=a,e.x2+=i,e.y1-=r,e.y2+=n,e.w=e.x2-e.x1,e.h=e.y2-e.y1,e},"expandBoundingBoxSides"),Nye=o(function(e,t){e.x1=t.x1,e.y1=t.y1,e.x2=t.x2,e.y2=t.y2,e.w=e.x2-e.x1,e.h=e.y2-e.y1},"assignBoundingBox"),QM=o(function(e,t){return!(e.x1>t.x2||t.x1>e.x2||e.x2t.y2||t.y1>e.y2)},"boundingBoxesIntersect"),sd=o(function(e,t,r){return e.x1<=t&&t<=e.x2&&e.y1<=r&&r<=e.y2},"inBoundingBox"),Oye=o(function(e,t){return sd(e,t.x,t.y)},"pointInBoundingBox"),pbe=o(function(e,t){return sd(e,t.x1,t.y1)&&sd(e,t.x2,t.y2)},"boundingBoxInBoundingBox"),hVe=(rD=Math.hypot)!==null&&rD!==void 0?rD:function(e,t){return Math.sqrt(e*e+t*t)};o(fbe,"inflatePolygon");o(gbe,"miterBox");mbe=o(function(e,t,r,i,n,a,s){var l=arguments.length>7&&arguments[7]!==void 0?arguments[7]:"auto",h=l==="auto"?dd(n,a):l,u=n/2,d=a/2;h=Math.min(h,u,d);var p=h!==u,f=h!==d,g;if(p){var m=r-u+h-s,y=i-d-s,b=r+u-h+s,v=y;if(g=od(e,t,r,i,m,y,b,v,!1),g.length>0)return g}if(f){var T=r+u+s,x=i-d+h-s,k=T,C=i+d-h+s;if(g=od(e,t,r,i,T,x,k,C,!1),g.length>0)return g}if(p){var E=r-u+h-s,w=i+d+s,_=r+u-h+s,L=w;if(g=od(e,t,r,i,E,w,_,L,!1),g.length>0)return g}if(f){var N=r-u-s,D=i-d+h-s,M=N,B=i+d-h+s;if(g=od(e,t,r,i,N,D,M,B,!1),g.length>0)return g}var A;{var I=r-u+h,O=i-d+h;if(A=_v(e,t,r,i,I,O,h+s),A.length>0&&A[0]<=I&&A[1]<=O)return[A[0],A[1]]}{var R=r+u-h,$=i-d+h;if(A=_v(e,t,r,i,R,$,h+s),A.length>0&&A[0]>=R&&A[1]<=$)return[A[0],A[1]]}{var F=r+u-h,P=i+d-h;if(A=_v(e,t,r,i,F,P,h+s),A.length>0&&A[0]>=F&&A[1]>=P)return[A[0],A[1]]}{var z=r-u+h,q=i+d-h;if(A=_v(e,t,r,i,z,q,h+s),A.length>0&&A[0]<=z&&A[1]>=q)return[A[0],A[1]]}return[]},"roundRectangleIntersectLine"),uVe=o(function(e,t,r,i,n,a,s){var l=s,h=Math.min(r,n),u=Math.max(r,n),d=Math.min(i,a),p=Math.max(i,a);return h-l<=e&&e<=u+l&&d-l<=t&&t<=p+l},"inLineVicinity"),dVe=o(function(e,t,r,i,n,a,s,l,h){var u={x1:Math.min(r,s,n)-h,x2:Math.max(r,s,n)+h,y1:Math.min(i,l,a)-h,y2:Math.max(i,l,a)+h};return!(eu.x2||tu.y2)},"inBezierVicinity"),pVe=o(function(e,t,r,i){r-=i;var n=t*t-4*e*r;if(n<0)return[];var a=Math.sqrt(n),s=2*e,l=(-t+a)/s,h=(-t-a)/s;return[l,h]},"solveQuadratic"),fVe=o(function(e,t,r,i,n){var a=1e-5;e===0&&(e=a),t/=e,r/=e,i/=e;var s,l,h,u,d,p,f,g;if(l=(3*r-t*t)/9,h=-(27*i)+t*(9*r-2*(t*t)),h/=54,s=l*l*l+h*h,n[1]=0,f=t/3,s>0){d=h+Math.sqrt(s),d=d<0?-Math.pow(-d,1/3):Math.pow(d,1/3),p=h-Math.sqrt(s),p=p<0?-Math.pow(-p,1/3):Math.pow(p,1/3),n[0]=-f+d+p,f+=(d+p)/2,n[4]=n[2]=-f,f=Math.sqrt(3)*(-p+d)/2,n[3]=f,n[5]=-f;return}if(n[5]=n[3]=0,s===0){g=h<0?-Math.pow(-h,1/3):Math.pow(h,1/3),n[0]=-f+2*g,n[4]=n[2]=-(g+f);return}l=-l,u=l*l*l,u=Math.acos(h/Math.sqrt(u)),g=2*Math.sqrt(l),n[0]=-f+g*Math.cos(u/3),n[2]=-f+g*Math.cos((u+2*Math.PI)/3),n[4]=-f+g*Math.cos((u+4*Math.PI)/3)},"solveCubic"),gVe=o(function(e,t,r,i,n,a,s,l){var h=1*r*r-4*r*n+2*r*s+4*n*n-4*n*s+s*s+i*i-4*i*a+2*i*l+4*a*a-4*a*l+l*l,u=9*r*n-3*r*r-3*r*s-6*n*n+3*n*s+9*i*a-3*i*i-3*i*l-6*a*a+3*a*l,d=3*r*r-6*r*n+r*s-r*e+2*n*n+2*n*e-s*e+3*i*i-6*i*a+i*l-i*t+2*a*a+2*a*t-l*t,p=1*r*n-r*r+r*e-n*e+i*a-i*i+i*t-a*t,f=[];fVe(h,u,d,p,f);for(var g=1e-7,m=[],y=0;y<6;y+=2)Math.abs(f[y+1])=0&&f[y]<=1&&m.push(f[y]);m.push(1),m.push(0);for(var b=-1,v,T,x,k=0;k=0?xh?(e-n)*(e-n)+(t-a)*(t-a):u-p},"sqdistToFiniteLine"),qs=o(function(e,t,r){for(var i,n,a,s,l,h=0,u=0;u=e&&e>=a||i<=e&&e<=a)l=(e-i)/(a-i)*(s-n)+n,l>t&&h++;else continue;return h%2!==0},"pointInsidePolygonPoints"),Dh=o(function(e,t,r,i,n,a,s,l,h){var u=new Array(r.length),d;l[0]!=null?(d=Math.atan(l[1]/l[0]),l[0]<0?d=d+Math.PI/2:d=-d-Math.PI/2):d=l;for(var p=Math.cos(-d),f=Math.sin(-d),g=0;g0){var y=yw(u,-h);m=mw(y)}else m=u;return qs(e,t,m)},"pointInsidePolygon"),yVe=o(function(e,t,r,i,n,a,s,l){for(var h=new Array(r.length*2),u=0;u=0&&y<=1&&v.push(y),b>=0&&b<=1&&v.push(b),v.length===0)return[];var T=v[0]*l[0]+e,x=v[0]*l[1]+t;if(v.length>1){if(v[0]==v[1])return[T,x];var k=v[1]*l[0]+e,C=v[1]*l[1]+t;return[T,x,k,C]}else return[T,x]},"intersectLineCircle"),iD=o(function(e,t,r){return t<=e&&e<=r||r<=e&&e<=t?e:e<=t&&t<=r||r<=t&&t<=e?t:r},"midOfThree"),od=o(function(e,t,r,i,n,a,s,l,h){var u=e-n,d=r-e,p=s-n,f=t-a,g=i-t,m=l-a,y=p*f-m*u,b=d*f-g*u,v=m*d-p*g;if(v!==0){var T=y/v,x=b/v,k=.001,C=0-k,E=1+k;return C<=T&&T<=E&&C<=x&&x<=E?[e+T*d,t+T*g]:h?[e+T*d,t+T*g]:[]}else return y===0||b===0?iD(e,r,s)===s?[s,l]:iD(e,r,n)===n?[n,a]:iD(n,s,r)===r?[r,i]:[]:[]},"finiteLinesIntersect"),bVe=o(function(e,t,r,i,n){var a=[],s=i/2,l=n/2,h=t,u=r;a.push({x:h+s*e[0],y:u+l*e[1]});for(var d=1;d0){var m=yw(d,-l);f=mw(m)}else f=d}else f=r;for(var y,b,v,T,x=0;x2){for(var g=[u[0],u[1]],m=Math.pow(g[0]-e,2)+Math.pow(g[1]-t,2),y=1;yu&&(u=T)},"set"),get:o(function(v){return h[v]},"get")},p=0;p0?B=M.edgesTo(D)[0]:B=D.edgesTo(M)[0];var A=i(B);D=D.id(),C[D]>C[L]+A&&(C[D]=C[L]+A,E.nodes.indexOf(D)<0?E.push(D):E.updateItem(D),k[D]=0,x[D]=[]),C[D]==C[L]+A&&(k[D]=k[D]+k[L],x[D].push(L))}else for(var I=0;I0;){for(var F=T.pop(),P=0;P0&&s.push(r[l]);s.length!==0&&n.push(i.collection(s))}return n},"assign"),MVe=o(function(e,t){for(var r=0;r5&&arguments[5]!==void 0?arguments[5]:BVe,s=i,l,h,u=0;u=2?kv(e,t,r,0,qye,PVe):kv(e,t,r,0,zye)},"euclidean"),squaredEuclidean:o(function(e,t,r){return kv(e,t,r,0,qye)},"squaredEuclidean"),manhattan:o(function(e,t,r){return kv(e,t,r,0,zye)},"manhattan"),max:o(function(e,t,r){return kv(e,t,r,-1/0,FVe)},"max")};bm["squared-euclidean"]=bm.squaredEuclidean;bm.squaredeuclidean=bm.squaredEuclidean;o(Zv,"clusteringDistance");zVe=pa({k:2,m:2,sensitivityThreshold:1e-4,distance:"euclidean",maxIterations:10,attributes:[],testMode:!1,testCentroids:null}),eN=o(function(e){return zVe(e)},"setOptions"),vw=o(function(e,t,r,i,n){var a=n!=="kMedoids",s=a?function(d){return r[d]}:function(d){return i[d](r)},l=o(function(d){return i[d](t)},"getQ"),h=r,u=t;return Zv(e,i.length,s,l,h,u)},"getDist"),nD=o(function(e,t,r){for(var i=r.length,n=new Array(i),a=new Array(i),s=new Array(t),l=null,h=0;hr)return!1}return!0},"haveMatricesConverged"),GVe=o(function(e,t,r){for(var i=0;is&&(s=t[h][u],l=u);n[l].push(e[h])}for(var d=0;d=n.threshold||n.mode==="dendrogram"&&e.length===1)return!1;var g=t[a],m=t[i[a]],y;n.mode==="dendrogram"?y={left:g,right:m,key:g.key}:y={value:g.value.concat(m.value),key:g.key},e[g.index]=y,e.splice(m.index,1),t[g.key]=y;for(var b=0;br[m.key][v.key]&&(l=r[m.key][v.key])):n.linkage==="max"?(l=r[g.key][v.key],r[g.key][v.key]0&&i.push(n);return i},"findExemplars"),Yye=o(function(e,t,r){for(var i=[],n=0;ns&&(a=h,s=t[n*e+h])}a>0&&i.push(a)}for(var u=0;uh&&(l=u,h=d)}r[n]=a[l]}return i=Yye(e,t,r),i},"assign"),Hye=o(function(e){for(var t=this.cy(),r=this.nodes(),i=tYe(e),n={},a=0;a=N?(D=N,N=B,M=A):B>D&&(D=B);for(var I=0;I0?1:0;E[_%i.minIterations*s+z]=q,P+=q}if(P>0&&(_>=i.minIterations-1||_==i.maxIterations-1)){for(var G=0,W=0;W1||C>1)&&(s=!0),d[T]=[],v.outgoers().forEach(function(w){w.isEdge()&&d[T].push(w.id())})}else p[T]=[void 0,v.target().id()]}):a.forEach(function(v){var T=v.id();if(v.isNode()){var x=v.degree(!0);x%2&&(l?h?s=!0:h=T:l=T),d[T]=[],v.connectedEdges().forEach(function(k){return d[T].push(k.id())})}else p[T]=[v.source().id(),v.target().id()]});var f={found:!1,trail:void 0};if(s)return f;if(h&&l)if(n){if(u&&h!=u)return f;u=h}else{if(u&&h!=u&&l!=u)return f;u||(u=h)}else u||(u=a[0].id());var g=o(function(v){for(var T=v,x=[v],k,C,E;d[T].length;)k=d[T].shift(),C=p[k][0],E=p[k][1],T!=E?(d[E]=d[E].filter(function(w){return w!=k}),T=E):!n&&T!=C&&(d[C]=d[C].filter(function(w){return w!=k}),T=C),x.unshift(k),x.unshift(T);return x},"walk"),m=[],y=[];for(y=g(u);y.length!=1;)d[y[0]].length==0?(m.unshift(a.getElementById(y.shift())),m.unshift(a.getElementById(y.shift()))):y=g(y.shift()).concat(y);m.unshift(a.getElementById(y.shift()));for(var b in d)if(d[b].length)return f;return f.found=!0,f.trail=this.spawn(m,!0),f},"hierholzer")},WC=o(function(){var e=this,t={},r=0,i=0,n=[],a=[],s={},l=o(function(d,p){for(var f=a.length-1,g=[],m=e.spawn();a[f].x!=d||a[f].y!=p;)g.push(a.pop().edge),f--;g.push(a.pop().edge),g.forEach(function(y){var b=y.connectedNodes().intersection(e);m.merge(y),b.forEach(function(v){var T=v.id(),x=v.connectedEdges().intersection(e);m.merge(v),t[T].cutVertex?m.merge(x.filter(function(k){return k.isLoop()})):m.merge(x)})}),n.push(m)},"buildComponent"),h=o(function(d,p,f){d===f&&(i+=1),t[p]={id:r,low:r++,cutVertex:!1};var g=e.getElementById(p).connectedEdges().intersection(e);if(g.size()===0)n.push(e.spawn(e.getElementById(p)));else{var m,y,b,v;g.forEach(function(T){m=T.source().id(),y=T.target().id(),b=m===p?y:m,b!==f&&(v=T.id(),s[v]||(s[v]=!0,a.push({x:p,y:b,edge:T})),b in t?t[p].low=Math.min(t[p].low,t[b].id):(h(d,b,p),t[p].low=Math.min(t[p].low,t[b].low),t[p].id<=t[b].low&&(t[p].cutVertex=!0,l(p,b))))})}},"biconnectedSearch");e.forEach(function(d){if(d.isNode()){var p=d.id();p in t||(i=0,h(p,p),t[p].cutVertex=i>1)}});var u=Object.keys(t).filter(function(d){return t[d].cutVertex}).map(function(d){return e.getElementById(d)});return{cut:e.spawn(u),components:n}},"hopcroftTarjanBiconnected"),cYe={hopcroftTarjanBiconnected:WC,htbc:WC,htb:WC,hopcroftTarjanBiconnectedComponents:WC},UC=o(function(){var e=this,t={},r=0,i=[],n=[],a=e.spawn(e),s=o(function(l){n.push(l),t[l]={index:r,low:r++,explored:!1};var h=e.getElementById(l).connectedEdges().intersection(e);if(h.forEach(function(g){var m=g.target().id();m!==l&&(m in t||s(m),t[m].explored||(t[l].low=Math.min(t[l].low,t[m].low)))}),t[l].index===t[l].low){for(var u=e.spawn();;){var d=n.pop();if(u.merge(e.getElementById(d)),t[d].low=t[l].index,t[d].explored=!0,d===l)break}var p=u.edgesWith(u),f=u.merge(p);i.push(f),a=a.difference(f)}},"stronglyConnectedSearch");return e.forEach(function(l){if(l.isNode()){var h=l.id();h in t||s(h)}}),{cut:a,components:i}},"tarjanStronglyConnected"),hYe={tarjanStronglyConnected:UC,tsc:UC,tscc:UC,tarjanStronglyConnectedComponents:UC},Cbe={};[Pv,jUe,GUe,UUe,YUe,XUe,QUe,CVe,gm,mm,pM,OVe,XVe,JVe,sYe,lYe,cYe,hYe].forEach(function(e){cr(Cbe,e)});wbe=0,Ebe=1,Sbe=2,$l=o(function(e){if(!(this instanceof $l))return new $l(e);this.id="Thenable/1.0.7",this.state=wbe,this.fulfillValue=void 0,this.rejectReason=void 0,this.onFulfilled=[],this.onRejected=[],this.proxy={then:this.then.bind(this)},typeof e=="function"&&e.call(this,this.fulfill.bind(this),this.reject.bind(this))},"api");$l.prototype={fulfill:o(function(e){return Xye(this,Ebe,"fulfillValue",e)},"fulfill"),reject:o(function(e){return Xye(this,Sbe,"rejectReason",e)},"reject"),then:o(function(e,t){var r=this,i=new $l;return r.onFulfilled.push(Zye(e,i,"fulfill")),r.onRejected.push(Zye(t,i,"reject")),_be(r),i.proxy},"then")};Xye=o(function(e,t,r,i){return e.state===wbe&&(e.state=t,e[r]=i,_be(e)),e},"deliver"),_be=o(function(e){e.state===Ebe?Kye(e,"onFulfilled",e.fulfillValue):e.state===Sbe&&Kye(e,"onRejected",e.rejectReason)},"execute"),Kye=o(function(e,t,r){if(e[t].length!==0){var i=e[t];e[t]=[];var n=o(function(){for(var a=0;a0},"animatedImpl")},"animated"),clearQueue:o(function(){return o(function(){var e=this,t=e.length!==void 0,r=t?e:[e],i=this._private.cy||this;if(!i.styleEnabled())return this;for(var n=0;n0&&this.spawn(i).updateStyle().emit("class"),t},"classes"),addClass:o(function(e){return this.toggleClass(e,!0)},"addClass"),hasClass:o(function(e){var t=this[0];return t!=null&&t._private.classes.has(e)},"hasClass"),toggleClass:o(function(e,t){_i(e)||(e=e.match(/\S+/g)||[]);for(var r=this,i=t===void 0,n=[],a=0,s=r.length;a0&&this.spawn(n).updateStyle().emit("class"),r},"toggleClass"),removeClass:o(function(e){return this.toggleClass(e,!1)},"removeClass"),flashClass:o(function(e,t){var r=this;if(t==null)t=250;else if(t===0)return r;return r.addClass(e),setTimeout(function(){r.removeClass(e)},t),r},"flashClass")};tw.className=tw.classNames=tw.classes;ii={metaChar:"[\\!\\\"\\#\\$\\%\\&\\'\\(\\)\\*\\+\\,\\.\\/\\:\\;\\<\\=\\>\\?\\@\\[\\]\\^\\`\\{\\|\\}\\~]",comparatorOp:"=|\\!=|>|>=|<|<=|\\$=|\\^=|\\*=",boolOp:"\\?|\\!|\\^",string:`"(?:\\\\"|[^"])*"|'(?:\\\\'|[^'])*'`,number:qn,meta:"degree|indegree|outdegree",separator:"\\s*,\\s*",descendant:"\\s+",child:"\\s+>\\s+",subject:"\\$",group:"node|edge|\\*",directedEdge:"\\s+->\\s+",undirectedEdge:"\\s+<->\\s+"};ii.variable="(?:[\\w-.]|(?:\\\\"+ii.metaChar+"))+";ii.className="(?:[\\w-]|(?:\\\\"+ii.metaChar+"))+";ii.value=ii.string+"|"+ii.number;ii.id=ii.variable;(function(){var e,t,r;for(e=ii.comparatorOp.split("|"),r=0;r=0)&&t!=="="&&(ii.comparatorOp+="|\\!"+t)})();Ci=o(function(){return{checks:[]}},"newQuery"),jt={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},yM=[{selector:":selected",matches:o(function(e){return e.selected()},"matches")},{selector:":unselected",matches:o(function(e){return!e.selected()},"matches")},{selector:":selectable",matches:o(function(e){return e.selectable()},"matches")},{selector:":unselectable",matches:o(function(e){return!e.selectable()},"matches")},{selector:":locked",matches:o(function(e){return e.locked()},"matches")},{selector:":unlocked",matches:o(function(e){return!e.locked()},"matches")},{selector:":visible",matches:o(function(e){return e.visible()},"matches")},{selector:":hidden",matches:o(function(e){return!e.visible()},"matches")},{selector:":transparent",matches:o(function(e){return e.transparent()},"matches")},{selector:":grabbed",matches:o(function(e){return e.grabbed()},"matches")},{selector:":free",matches:o(function(e){return!e.grabbed()},"matches")},{selector:":removed",matches:o(function(e){return e.removed()},"matches")},{selector:":inside",matches:o(function(e){return!e.removed()},"matches")},{selector:":grabbable",matches:o(function(e){return e.grabbable()},"matches")},{selector:":ungrabbable",matches:o(function(e){return!e.grabbable()},"matches")},{selector:":animated",matches:o(function(e){return e.animated()},"matches")},{selector:":unanimated",matches:o(function(e){return!e.animated()},"matches")},{selector:":parent",matches:o(function(e){return e.isParent()},"matches")},{selector:":childless",matches:o(function(e){return e.isChildless()},"matches")},{selector:":child",matches:o(function(e){return e.isChild()},"matches")},{selector:":orphan",matches:o(function(e){return e.isOrphan()},"matches")},{selector:":nonorphan",matches:o(function(e){return e.isChild()},"matches")},{selector:":compound",matches:o(function(e){return e.isNode()?e.isParent():e.source().isParent()||e.target().isParent()},"matches")},{selector:":loop",matches:o(function(e){return e.isLoop()},"matches")},{selector:":simple",matches:o(function(e){return e.isSimple()},"matches")},{selector:":active",matches:o(function(e){return e.active()},"matches")},{selector:":inactive",matches:o(function(e){return!e.active()},"matches")},{selector:":backgrounding",matches:o(function(e){return e.backgrounding()},"matches")},{selector:":nonbackgrounding",matches:o(function(e){return!e.backgrounding()},"matches")}].sort(function(e,t){return bUe(e.selector,t.selector)}),TYe=(function(){for(var e={},t,r=0;r0&&u.edgeCount>0)return yi("The selector `"+e+"` is invalid because it uses both a compound selector and an edge selector"),!1;if(u.edgeCount>1)return yi("The selector `"+e+"` is invalid because it uses multiple edge selectors"),!1;u.edgeCount===1&&yi("The selector `"+e+"` is deprecated. Edge selectors do not take effect on changes to source and target nodes after an edge is added, for performance reasons. Use a class or data selector on edges instead, updating the class or data of an edge when your app detects a change in source or target nodes.")}return!0},"parse"),_Ye=o(function(){if(this.toStringCache!=null)return this.toStringCache;for(var e=o(function(h){return h??""},"clean"),t=o(function(h){return er(h)?'"'+h+'"':e(h)},"cleanVal"),r=o(function(h){return" "+h+" "},"space"),i=o(function(h,u){var d=h.type,p=h.value;switch(d){case jt.GROUP:{var f=e(p);return f.substring(0,f.length-1)}case jt.DATA_COMPARE:{var g=h.field,m=h.operator;return"["+g+r(e(m))+t(p)+"]"}case jt.DATA_BOOL:{var y=h.operator,b=h.field;return"["+e(y)+b+"]"}case jt.DATA_EXIST:{var v=h.field;return"["+v+"]"}case jt.META_COMPARE:{var T=h.operator,x=h.field;return"[["+x+r(e(T))+t(p)+"]]"}case jt.STATE:return p;case jt.ID:return"#"+p;case jt.CLASS:return"."+p;case jt.PARENT:case jt.CHILD:return n(h.parent,u)+r(">")+n(h.child,u);case jt.ANCESTOR:case jt.DESCENDANT:return n(h.ancestor,u)+" "+n(h.descendant,u);case jt.COMPOUND_SPLIT:{var k=n(h.left,u),C=n(h.subject,u),E=n(h.right,u);return k+(k.length>0?" ":"")+C+E}case jt.TRUE:return""}},"checkToString"),n=o(function(h,u){return h.checks.reduce(function(d,p,f){return d+(u===h&&f===0?"$":"")+i(p,u)},"")},"queryToString"),a="",s=0;s1&&s=0&&(t=t.replace("!",""),d=!0),t.indexOf("@")>=0&&(t=t.replace("@",""),u=!0),(n||s||u)&&(l=!n&&!a?"":""+e,h=""+r),u&&(e=l=l.toLowerCase(),r=h=h.toLowerCase()),t){case"*=":i=l.indexOf(h)>=0;break;case"$=":i=l.indexOf(h,l.length-h.length)>=0;break;case"^=":i=l.indexOf(h)===0;break;case"=":i=e===r;break;case">":p=!0,i=e>r;break;case">=":p=!0,i=e>=r;break;case"<":p=!0,i=e1&&arguments[1]!==void 0?arguments[1]:!0;return Mw(this,e,t,oN)};o(lN,"addParent");xm.forEachUp=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return Mw(this,e,t,lN)};o(mxe,"addParentAndChildren");xm.forEachUpAndDown=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return Mw(this,e,t,mxe)};xm.ancestors=xm.parents;qv=yxe={data:mi.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:mi.removeData({field:"data",event:"data",triggerFnName:"trigger",triggerEvent:!0,immutableKeys:{id:!0,source:!0,target:!0,parent:!0},updateStyle:!0}),scratch:mi.data({field:"scratch",bindingEvent:"scratch",allowBinding:!0,allowSetting:!0,settingEvent:"scratch",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeScratch:mi.removeData({field:"scratch",event:"scratch",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0}),rscratch:mi.data({field:"rscratch",allowBinding:!1,allowSetting:!0,settingTriggersEvent:!1,allowGetting:!0}),removeRscratch:mi.removeData({field:"rscratch",triggerEvent:!1}),id:o(function(){var e=this[0];if(e)return e._private.data.id},"id")};qv.attr=qv.data;qv.removeAttr=qv.removeData;NYe=yxe,Nw={};o(rw,"defineDegreeFunction");cr(Nw,{degree:rw(function(e,t){return t.source().same(t.target())?2:1}),indegree:rw(function(e,t){return t.target().same(e)?1:0}),outdegree:rw(function(e,t){return t.source().same(e)?1:0})});o(ff,"defineDegreeBoundsFunction");cr(Nw,{minDegree:ff("degree",function(e,t){return et}),minIndegree:ff("indegree",function(e,t){return et}),minOutdegree:ff("outdegree",function(e,t){return et})});cr(Nw,{totalDegree:o(function(e){for(var t=0,r=this.nodes(),i=0;i0,p=d;d&&(u=u[0]);var f=p?u.position():{x:0,y:0};t!==void 0?h.position(e,t+f[e]):n!==void 0&&h.position({x:n.x+f.x,y:n.y+f.y})}else{var g=r.position(),m=s?r.parent():null,y=m&&m.length>0,b=y;y&&(m=m[0]);var v=b?m.position():{x:0,y:0};return n={x:g.x-v.x,y:g.y-v.y},e===void 0?n:n[e]}else if(!a)return;return this},"relativePosition")};Ll.modelPosition=Ll.point=Ll.position;Ll.modelPositions=Ll.points=Ll.positions;Ll.renderedPoint=Ll.renderedPosition;Ll.relativePoint=Ll.relativePosition;OYe=vxe;ym=md={};md.renderedBoundingBox=function(e){var t=this.boundingBox(e),r=this.cy(),i=r.zoom(),n=r.pan(),a=t.x1*i+n.x,s=t.x2*i+n.x,l=t.y1*i+n.y,h=t.y2*i+n.y;return{x1:a,x2:s,y1:l,y2:h,w:s-a,h:h-l}};md.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 i=r._private;i.compoundBoundsClean=!1,i.bbCache=null,e||r.emitAndNotify("bounds")}}),this)};md.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(s){if(!s.isParent())return;var l=s._private,h=s.children(),u=s.pstyle("compound-sizing-wrt-labels").value==="include",d={width:{val:s.pstyle("min-width").pfValue,left:s.pstyle("min-width-bias-left"),right:s.pstyle("min-width-bias-right")},height:{val:s.pstyle("min-height").pfValue,top:s.pstyle("min-height-bias-top"),bottom:s.pstyle("min-height-bias-bottom")}},p=h.boundingBox({includeLabels:u,includeOverlays:!1,useCache:!1}),f=l.position;(p.w===0||p.h===0)&&(p={w:s.pstyle("width").pfValue,h:s.pstyle("height").pfValue},p.x1=f.x-p.w/2,p.x2=f.x+p.w/2,p.y1=f.y-p.h/2,p.y2=f.y+p.h/2);function g(L,N,D){var M=0,B=0,A=N+D;return L>0&&A>0&&(M=N/A*L,B=D/A*L),{biasDiff:M,biasComplementDiff:B}}o(g,"computeBiasValues");function m(L,N,D,M){if(D.units==="%")switch(M){case"width":return L>0?D.pfValue*L:0;case"height":return N>0?D.pfValue*N:0;case"average":return L>0&&N>0?D.pfValue*(L+N)/2:0;case"min":return L>0&&N>0?L>N?D.pfValue*N:D.pfValue*L:0;case"max":return L>0&&N>0?L>N?D.pfValue*L:D.pfValue*N:0;default:return 0}else return D.units==="px"?D.pfValue:0}o(m,"computePaddingValues");var y=d.width.left.value;d.width.left.units==="px"&&d.width.val>0&&(y=y*100/d.width.val);var b=d.width.right.value;d.width.right.units==="px"&&d.width.val>0&&(b=b*100/d.width.val);var v=d.height.top.value;d.height.top.units==="px"&&d.height.val>0&&(v=v*100/d.height.val);var T=d.height.bottom.value;d.height.bottom.units==="px"&&d.height.val>0&&(T=T*100/d.height.val);var x=g(d.width.val-p.w,y,b),k=x.biasDiff,C=x.biasComplementDiff,E=g(d.height.val-p.h,v,T),w=E.biasDiff,_=E.biasComplementDiff;l.autoPadding=m(p.w,p.h,s.pstyle("padding"),s.pstyle("padding-relative-to").value),l.autoWidth=Math.max(p.w,d.width.val),f.x=(-k+p.x1+p.x2+C)/2,l.autoHeight=Math.max(p.h,d.height.val),f.y=(-w+p.y1+p.y2+_)/2}o(r,"update");for(var i=0;ie.x2?i:e.x2,e.y1=re.y2?n:e.y2,e.w=e.x2-e.x1,e.h=e.y2-e.y1)},"updateBounds"),nd=o(function(e,t){return t==null?e:Rl(e,t.x1,t.y1,t.x2,t.y2)},"updateBoundsFromBox"),Cv=o(function(e,t,r){return zs(e,t,r)},"prefixedProperty"),VC=o(function(e,t,r){if(!t.cy().headless()){var i=t._private,n=i.rstyle,a=n.arrowWidth/2,s=t.pstyle(r+"-arrow-shape").value,l,h;if(s!=="none"){r==="source"?(l=n.srcX,h=n.srcY):r==="target"?(l=n.tgtX,h=n.tgtY):(l=n.midX,h=n.midY);var u=i.arrowBounds=i.arrowBounds||{},d=u[r]=u[r]||{};d.x1=l-a,d.y1=h-a,d.x2=l+a,d.y2=h+a,d.w=d.x2-d.x1,d.h=d.y2-d.y1,QC(d,1),Rl(e,d.x1,d.y1,d.x2,d.y2)}}},"updateBoundsFromArrow"),rM=o(function(e,t,r){if(!t.cy().headless()){var i;r?i=r+"-":i="";var n=t._private,a=n.rstyle,s=t.pstyle(i+"label").strValue;if(s){var l=t.pstyle("text-halign"),h=t.pstyle("text-valign"),u=Cv(a,"labelWidth",r),d=Cv(a,"labelHeight",r),p=Cv(a,"labelX",r),f=Cv(a,"labelY",r),g=t.pstyle(i+"text-margin-x").pfValue,m=t.pstyle(i+"text-margin-y").pfValue,y=t.isEdge(),b=t.pstyle(i+"text-rotation"),v=t.pstyle("text-outline-width").pfValue,T=t.pstyle("text-border-width").pfValue,x=T/2,k=t.pstyle("text-background-padding").pfValue,C=2,E=d,w=u,_=w/2,L=E/2,N,D,M,B;if(y)N=p-_,D=p+_,M=f-L,B=f+L;else{switch(l.value){case"left":N=p-w,D=p;break;case"center":N=p-_,D=p+_;break;case"right":N=p,D=p+w;break}switch(h.value){case"top":M=f-E,B=f;break;case"center":M=f-L,B=f+L;break;case"bottom":M=f,B=f+E;break}}var A=g-Math.max(v,x)-k-C,I=g+Math.max(v,x)+k+C,O=m-Math.max(v,x)-k-C,R=m+Math.max(v,x)+k+C;N+=A,D+=I,M+=O,B+=R;var $=r||"main",F=n.labelBounds,P=F[$]=F[$]||{};P.x1=N,P.y1=M,P.x2=D,P.y2=B,P.w=D-N,P.h=B-M,P.leftPad=A,P.rightPad=I,P.topPad=O,P.botPad=R;var z=y&&b.strValue==="autorotate",q=b.pfValue!=null&&b.pfValue!==0;if(z||q){var G=z?Cv(n.rstyle,"labelAngle",r):b.pfValue,W=Math.cos(G),J=Math.sin(G),H=(N+D)/2,Z=(M+B)/2;if(!y){switch(l.value){case"left":H=D;break;case"right":H=N;break}switch(h.value){case"top":Z=B;break;case"bottom":Z=M;break}}var se=o(function(me,oe){return me=me-H,oe=oe-Z,{x:me*W-oe*J+H,y:me*J+oe*W+Z}},"rotate"),Q=se(N,M),te=se(N,B),re=se(D,M),ne=se(D,B);N=Math.min(Q.x,te.x,re.x,ne.x),D=Math.max(Q.x,te.x,re.x,ne.x),M=Math.min(Q.y,te.y,re.y,ne.y),B=Math.max(Q.y,te.y,re.y,ne.y)}var Ae=$+"Rot",ie=F[Ae]=F[Ae]||{};ie.x1=N,ie.y1=M,ie.x2=D,ie.y2=B,ie.w=D-N,ie.h=B-M,Rl(e,N,M,D,B),Rl(n.labelBounds.all,N,M,D,B)}return e}},"updateBoundsFromLabel"),K2e=o(function(e,t){if(!t.cy().headless()){var r=t.pstyle("outline-opacity").value,i=t.pstyle("outline-width").value,n=t.pstyle("outline-offset").value,a=i+n;xxe(e,t,r,a,"outside",a/2)}},"updateBoundsFromOutline"),xxe=o(function(e,t,r,i,n,a){if(!(r===0||i<=0||n==="inside")){var s=t.cy(),l=s.renderer(),h=l.nodeShapes[l.getNodeShape(t)];if(h){var u=t.position(),d=u.x,p=u.y,f=t.width(),g=t.height();if(h.hasMiterBounds){n==="center"&&(i/=2);var m=h.miterBounds(d,p,f,g,i);nd(e,m)}else a!=null&&a>0&&JC(e,[a,a,a,a])}}},"updateBoundsFromMiter"),BYe=o(function(e,t){if(!t.cy().headless()){var r=t.pstyle("border-opacity").value,i=t.pstyle("border-width").pfValue,n=t.pstyle("border-position").value;xxe(e,t,r,i,n)}},"updateBoundsFromMiterBorder"),PYe=o(function(e,t){var r=e._private.cy,i=r.styleEnabled(),n=r.headless(),a=ms(),s=e._private,l=e.isNode(),h=e.isEdge(),u,d,p,f,g,m,y=s.rstyle,b=l&&i?e.pstyle("bounds-expansion").pfValue:[0],v=o(function(ie){return ie.pstyle("display").value!=="none"},"isDisplayed"),T=!i||v(e)&&(!h||v(e.source())&&v(e.target()));if(T){var x=0,k=0;i&&t.includeOverlays&&(x=e.pstyle("overlay-opacity").value,x!==0&&(k=e.pstyle("overlay-padding").value));var C=0,E=0;i&&t.includeUnderlays&&(C=e.pstyle("underlay-opacity").value,C!==0&&(E=e.pstyle("underlay-padding").value));var w=Math.max(k,E),_=0,L=0;if(i&&(_=e.pstyle("width").pfValue,L=_/2),l&&t.includeNodes){var N=e.position();g=N.x,m=N.y;var D=e.outerWidth(),M=D/2,B=e.outerHeight(),A=B/2;u=g-M,d=g+M,p=m-A,f=m+A,Rl(a,u,p,d,f),i&&K2e(a,e),i&&t.includeOutlines&&!n&&K2e(a,e),i&&BYe(a,e)}else if(h&&t.includeEdges)if(i&&!n){var I=e.pstyle("curve-style").strValue;if(u=Math.min(y.srcX,y.midX,y.tgtX),d=Math.max(y.srcX,y.midX,y.tgtX),p=Math.min(y.srcY,y.midY,y.tgtY),f=Math.max(y.srcY,y.midY,y.tgtY),u-=L,d+=L,p-=L,f+=L,Rl(a,u,p,d,f),I==="haystack"){var O=y.haystackPts;if(O&&O.length===2){if(u=O[0].x,p=O[0].y,d=O[1].x,f=O[1].y,u>d){var R=u;u=d,d=R}if(p>f){var $=p;p=f,f=$}Rl(a,u-L,p-L,d+L,f+L)}}else if(I==="bezier"||I==="unbundled-bezier"||ad(I,"segments")||ad(I,"taxi")){var F;switch(I){case"bezier":case"unbundled-bezier":F=y.bezierPts;break;case"segments":case"taxi":case"round-segments":case"round-taxi":F=y.linePts;break}if(F!=null)for(var P=0;Pd){var H=u;u=d,d=H}if(p>f){var Z=p;p=f,f=Z}u-=L,d+=L,p-=L,f+=L,Rl(a,u,p,d,f)}if(i&&t.includeEdges&&h&&(VC(a,e,"mid-source"),VC(a,e,"mid-target"),VC(a,e,"source"),VC(a,e,"target")),i){var se=e.pstyle("ghost").value==="yes";if(se){var Q=e.pstyle("ghost-offset-x").pfValue,te=e.pstyle("ghost-offset-y").pfValue;Rl(a,a.x1+Q,a.y1+te,a.x2+Q,a.y2+te)}}var re=s.bodyBounds=s.bodyBounds||{};Nye(re,a),JC(re,b),QC(re,1),i&&(u=a.x1,d=a.x2,p=a.y1,f=a.y2,Rl(a,u-w,p-w,d+w,f+w));var ne=s.overlayBounds=s.overlayBounds||{};Nye(ne,a),JC(ne,b),QC(ne,1);var Ae=s.labelBounds=s.labelBounds||{};Ae.all!=null?lVe(Ae.all):Ae.all=ms(),i&&t.includeLabels&&(t.includeMainLabels&&rM(a,e,null),h&&(t.includeSourceLabels&&rM(a,e,"source"),t.includeTargetLabels&&rM(a,e,"target")))}return a.x1=qo(a.x1),a.y1=qo(a.y1),a.x2=qo(a.x2),a.y2=qo(a.y2),a.w=qo(a.x2-a.x1),a.h=qo(a.y2-a.y1),a.w>0&&a.h>0&&T&&(JC(a,b),QC(a,1)),a},"boundingBoxImpl"),Txe=o(function(e){var t=0,r=o(function(n){return(n?1:0)<=0;l--)s(l);return this};gd.removeAllListeners=function(){return this.removeListener("*")};gd.emit=gd.trigger=function(e,t,r){var i=this.listeners,n=i.length;return this.emitting++,_i(t)||(t=[t]),eHe(this,function(a,s){r!=null&&(i=[{event:s.event,type:s.type,namespace:s.namespace,callback:r}],n=i.length);for(var l=o(function(){var u=i[h];if(u.type===s.type&&(!u.namespace||u.namespace===s.namespace||u.namespace===QYe)&&a.eventMatches(a.context,u,s)){var d=[s];t!=null&&NUe(d,t),a.beforeEmit(a.context,u,s),u.conf&&u.conf.one&&(a.listeners=a.listeners.filter(function(g){return g!==u}));var p=a.callbackContext(a.context,u,s),f=u.callback.apply(p,d);a.afterEmit(a.context,u,s),f===!1&&(s.stopPropagation(),s.preventDefault())}},"_loop2"),h=0;h1&&!a){var s=this.length-1,l=this[s],h=l._private.data.id;this[s]=void 0,this[e]=l,n.set(h,{ele:l,index:e})}return this.length--,this},"unmergeAt"),unmergeOne:o(function(e){e=e[0];var t=this._private,r=e._private.data.id,i=t.map,n=i.get(r);if(!n)return this;var a=n.index;return this.unmergeAt(a),this},"unmergeOne"),unmerge:o(function(e){var t=this._private.cy;if(!e)return this;if(e&&er(e)){var r=e;e=t.mutableElements().filter(r)}for(var i=0;i=0;t--){var r=this[t];e(r)&&this.unmergeAt(t)}return this},"unmergeBy"),map:o(function(e,t){for(var r=[],i=this,n=0;nr&&(r=l,i=s)}return{value:r,ele:i}},"max"),min:o(function(e,t){for(var r=1/0,i,n=this,a=0;a=0&&n"u"?"undefined":In(Symbol))!=e&&In(Symbol.iterator)!=e;t&&(bw[Symbol.iterator]=function(){var r=this,i={value:void 0,done:!1},n=0,a=this.length;return jM({next:o(function(){return n1&&arguments[1]!==void 0?arguments[1]:!0,r=this[0],i=r.cy();if(i.styleEnabled()&&r){r._private.styleDirty&&(r._private.styleDirty=!1,i.style().apply(r));var n=r._private.style[e];return n??(t?i.style().getDefaultProperty(e):null)}},"parsedStyle"),numericStyle:o(function(e){var t=this[0];if(t.cy().styleEnabled()&&t){var r=t.pstyle(e);return r.pfValue!==void 0?r.pfValue:r.value}},"numericStyle"),numericStyleUnits:o(function(e){var t=this[0];if(t.cy().styleEnabled()&&t)return t.pstyle(e).units},"numericStyleUnits"),renderedStyle:o(function(e){var t=this.cy();if(!t.styleEnabled())return this;var r=this[0];if(r)return t.style().getRenderedStyle(r,e)},"renderedStyle"),style:o(function(e,t){var r=this.cy();if(!r.styleEnabled())return this;var i=!1,n=r.style();if(ni(e)){var a=e;n.applyBypass(this,a,i),this.emitAndNotify("style")}else if(er(e))if(t===void 0){var s=this[0];return s?n.getStylePropertyValue(s,e):void 0}else n.applyBypass(this,e,t,i),this.emitAndNotify("style");else if(e===void 0){var l=this[0];return l?n.getRawStyle(l):void 0}return this},"style"),removeStyle:o(function(e){var t=this.cy();if(!t.styleEnabled())return this;var r=!1,i=t.style(),n=this;if(e===void 0)for(var a=0;a0&&t.push(d[0]),t.push(l[0])}return this.spawn(t,!0).filter(e)},"neighborhood"),closedNeighborhood:o(function(e){return this.neighborhood().add(this).filter(e)},"closedNeighborhood"),openNeighborhood:o(function(e){return this.neighborhood(e)},"openNeighborhood")});Ha.neighbourhood=Ha.neighborhood;Ha.closedNeighbourhood=Ha.closedNeighborhood;Ha.openNeighbourhood=Ha.openNeighborhood;cr(Ha,{source:jo(o(function(e){var t=this[0],r;return t&&(r=t._private.source||t.cy().collection()),r&&e?r.filter(e):r},"sourceImpl"),"source"),target:jo(o(function(e){var t=this[0],r;return t&&(r=t._private.target||t.cy().collection()),r&&e?r.filter(e):r},"targetImpl"),"target"),sources:xM({attr:"source"}),targets:xM({attr:"target"})});o(xM,"defineSourceFunction");cr(Ha,{edgesWith:jo(TM(),"edgesWith"),edgesTo:jo(TM({thisIsSrc:!0}),"edgesTo")});o(TM,"defineEdgesWithFunction");cr(Ha,{connectedEdges:jo(function(e){for(var t=[],r=this,i=0;i0);return a},"components"),component:o(function(){var e=this[0];return e.cy().mutableElements().components(e)[0]},"component")});Ha.componentsOf=Ha.components;da=o(function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(e===void 0){Ui("A collection must have a reference to the core");return}var n=new $h,a=!1;if(!t)t=[];else if(t.length>0&&ni(t[0])&&!Yv(t[0])){a=!0;for(var s=[],l=new wm,h=0,u=t.length;h0&&arguments[0]!==void 0?arguments[0]:!0,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,r=this,i=r.cy(),n=i._private,a=[],s=[],l,h=0,u=r.length;h0){for(var F=l.length===r.length?r:new da(i,l),P=0;P0&&arguments[0]!==void 0?arguments[0]:!0,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,r=this,i=[],n={},a=r._private.cy;function s(A){for(var I=A._private.edges,O=0;O0&&(e?D.emitAndNotify("remove"):t&&D.emit("remove"));for(var M=0;Md&&Math.abs(m.v)>d;);return f?function(y){return h[y*(h.length-1)|0]}:u},"springRK4Factory")})(),Ri=o(function(e,t,r,i){var n=$xe(e,t,r,i);return function(a,s,l){return a+(s-a)*n(l)}},"cubicBezier"),aw={linear:o(function(e,t,r){return e+(t-e)*r},"linear"),ease:Ri(.25,.1,.25,1),"ease-in":Ri(.42,0,1,1),"ease-out":Ri(0,0,.58,1),"ease-in-out":Ri(.42,0,.58,1),"ease-in-sine":Ri(.47,0,.745,.715),"ease-out-sine":Ri(.39,.575,.565,1),"ease-in-out-sine":Ri(.445,.05,.55,.95),"ease-in-quad":Ri(.55,.085,.68,.53),"ease-out-quad":Ri(.25,.46,.45,.94),"ease-in-out-quad":Ri(.455,.03,.515,.955),"ease-in-cubic":Ri(.55,.055,.675,.19),"ease-out-cubic":Ri(.215,.61,.355,1),"ease-in-out-cubic":Ri(.645,.045,.355,1),"ease-in-quart":Ri(.895,.03,.685,.22),"ease-out-quart":Ri(.165,.84,.44,1),"ease-in-out-quart":Ri(.77,0,.175,1),"ease-in-quint":Ri(.755,.05,.855,.06),"ease-out-quint":Ri(.23,1,.32,1),"ease-in-out-quint":Ri(.86,0,.07,1),"ease-in-expo":Ri(.95,.05,.795,.035),"ease-out-expo":Ri(.19,1,.22,1),"ease-in-out-expo":Ri(1,0,0,1),"ease-in-circ":Ri(.6,.04,.98,.335),"ease-out-circ":Ri(.075,.82,.165,1),"ease-in-out-circ":Ri(.785,.135,.15,.86),spring:o(function(e,t,r){if(r===0)return aw.linear;var i=hHe(e,t,r);return function(n,a,s){return n+(a-n)*i(s)}},"spring"),"cubic-bezier":Ri};o(CM,"getEasedValue");o(wM,"getValue");o(gf,"ease");o(Ixe,"step$1");o(hm,"valid");o(Dxe,"startAnimation");o(EM,"stepAll");uHe={animate:mi.animate(),animation:mi.animation(),animated:mi.animated(),clearQueue:mi.clearQueue(),delay:mi.delay(),delayAnimation:mi.delayAnimation(),stop:mi.stop(),addToAnimationPool:o(function(e){var t=this;t.styleEnabled()&&t._private.aniEles.merge(e)},"addToAnimationPool"),stopAnimationLoop:o(function(){this._private.animationsRunning=!1},"stopAnimationLoop"),startAnimationLoop:o(function(){var e=this;if(e._private.animationsRunning=!0,!e.styleEnabled())return;function t(){e._private.animationsRunning&&fw(o(function(i){EM(i,e),t()},"animationStep"))}o(t,"headlessStep");var r=e.renderer();r&&r.beforeRender?r.beforeRender(o(function(i,n){EM(n,e)},"rendererAnimationStep"),r.beforeRenderPriorities.animations):t()},"startAnimationLoop")},dHe={qualifierCompare:o(function(e,t){return e==null||t==null?e==null&&t==null:e.sameText(t)},"qualifierCompare"),eventMatches:o(function(e,t,r){var i=t.qualifier;return i!=null?e!==r.target&&Yv(r.target)&&i.matches(r.target):!0},"eventMatches"),addEventFields:o(function(e,t){t.cy=e,t.target=e},"addEventFields"),callbackContext:o(function(e,t,r){return t.qualifier!=null?r.target:e},"callbackContext")},HC=o(function(e){return er(e)?new pd(e):e},"argSelector"),Mxe={createEmitter:o(function(){var e=this._private;return e.emitter||(e.emitter=new ib(dHe,this)),this},"createEmitter"),emitter:o(function(){return this._private.emitter},"emitter"),on:o(function(e,t,r){return this.emitter().on(e,HC(t),r),this},"on"),removeListener:o(function(e,t,r){return this.emitter().removeListener(e,HC(t),r),this},"removeListener"),removeAllListeners:o(function(){return this.emitter().removeAllListeners(),this},"removeAllListeners"),one:o(function(e,t,r){return this.emitter().one(e,HC(t),r),this},"one"),once:o(function(e,t,r){return this.emitter().one(e,HC(t),r),this},"once"),emit:o(function(e,t){return this.emitter().emit(e,t),this},"emit"),emitAndNotify:o(function(e,t){return this.emit(e),this.notify(e,t),this},"emitAndNotify")};mi.eventAliasesOn(Mxe);SM={png:o(function(e){var t=this._private.renderer;return e=e||{},t.png(e)},"png"),jpg:o(function(e){var t=this._private.renderer;return e=e||{},e.bg=e.bg||"#fff",t.jpg(e)},"jpg")};SM.jpeg=SM.jpg;sw={layout:o(function(e){var t=this;if(e==null){Ui("Layout options must be specified to make a layout");return}if(e.name==null){Ui("A `name` must be specified to make a layout");return}var r=e.name,i=t.extension("layout",r);if(i==null){Ui("No such layout `"+r+"` found. Did you forget to import it and `cytoscape.use()` it?");return}var n;er(e.eles)?n=t.$(e.eles):n=e.eles!=null?e.eles:t.$();var a=new i(cr({},e,{cy:t,eles:n}));return a},"layout")};sw.createLayout=sw.makeLayout=sw.layout;pHe={notify:o(function(e,t){var r=this._private;if(this.batching()){r.batchNotifications=r.batchNotifications||{};var i=r.batchNotifications[e]=r.batchNotifications[e]||this.collection();t!=null&&i.merge(t);return}if(r.notificationsEnabled){var n=this.renderer();this.destroyed()||!n||n.notify(e,t)}},"notify"),notifications:o(function(e){var t=this._private;return e===void 0?t.notificationsEnabled:(t.notificationsEnabled=!!e,this)},"notifications"),noNotifications:o(function(e){this.notifications(!1),e(),this.notifications(!0)},"noNotifications"),batching:o(function(){return this._private.batchCount>0},"batching"),startBatch:o(function(){var e=this._private;return e.batchCount==null&&(e.batchCount=0),e.batchCount===0&&(e.batchStyleEles=this.collection(),e.batchNotifications={}),e.batchCount++,this},"startBatch"),endBatch:o(function(){var e=this._private;if(e.batchCount===0)return this;if(e.batchCount--,e.batchCount===0){e.batchStyleEles.updateStyle();var t=this.renderer();Object.keys(e.batchNotifications).forEach(function(r){var i=e.batchNotifications[r];i.empty()?t.notify(r):t.notify(r,i)})}return this},"endBatch"),batch:o(function(e){return this.startBatch(),e(),this.endBatch(),this},"batch"),batchData:o(function(e){var t=this;return this.batch(function(){for(var r=Object.keys(e),i=0;i0;)t.removeChild(t.childNodes[0]);e._private.renderer=null,e.mutableElements().forEach(function(r){var i=r._private;i.rscratch={},i.rstyle={},i.animation.current=[],i.animation.queue=[]})},"destroyRenderer"),onRender:o(function(e){return this.on("render",e)},"onRender"),offRender:o(function(e){return this.off("render",e)},"offRender")};_M.invalidateDimensions=_M.resize;ow={collection:o(function(e,t){return er(e)?this.$(e):uo(e)?e.collection():_i(e)?(t||(t={}),new da(this,e,t.unique,t.removed)):new da(this)},"collection"),nodes:o(function(e){var t=this.$(function(r){return r.isNode()});return e?t.filter(e):t},"nodes"),edges:o(function(e){var t=this.$(function(r){return r.isEdge()});return e?t.filter(e):t},"edges"),$:o(function(e){var t=this._private.elements;return e?t.filter(e):t.spawnSelf()},"$"),mutableElements:o(function(){return this._private.elements},"mutableElements")};ow.elements=ow.filter=ow.$;ta={},$v="t",gHe="f";ta.apply=function(e){for(var t=this,r=t._private,i=r.cy,n=i.collection(),a=0;a0;if(f||p&&g){var m=void 0;f&&g||f?m=u.properties:g&&(m=u.mappedProperties);for(var y=0;y1&&(k=1),l.color){var E=i.valueMin[0],w=i.valueMax[0],_=i.valueMin[1],L=i.valueMax[1],N=i.valueMin[2],D=i.valueMax[2],M=i.valueMin[3]==null?1:i.valueMin[3],B=i.valueMax[3]==null?1:i.valueMax[3],A=[Math.round(E+(w-E)*k),Math.round(_+(L-_)*k),Math.round(N+(D-N)*k),Math.round(M+(B-M)*k)];a={bypass:i.bypass,name:i.name,value:A,strValue:"rgb("+A[0]+", "+A[1]+", "+A[2]+")"}}else if(l.number){var I=i.valueMin+(i.valueMax-i.valueMin)*k;a=this.parse(i.name,I,i.bypass,f)}else return!1;if(!a)return y(),!1;a.mapping=i,i=a;break}case s.data:{for(var O=i.field.split("."),R=p.data,$=0;$0&&a>0){for(var l={},h=!1,u=0;u0?e.delayAnimation(s).play().promise().then(x):x()}).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,n),e.emitAndNotify("style"),i.transitioning=!1})}else i.transitioning&&(this.removeBypasses(e,n),e.emitAndNotify("style"),i.transitioning=!1)};ta.checkTrigger=function(e,t,r,i,n,a){var s=this.properties[t],l=n(s);e.removed()||l!=null&&l(r,i,e)&&a(s)};ta.checkZOrderTrigger=function(e,t,r,i){var n=this;this.checkTrigger(e,t,r,i,function(a){return a.triggersZOrder},function(){n._private.cy.notify("zorder",e)})};ta.checkBoundsTrigger=function(e,t,r,i){this.checkTrigger(e,t,r,i,function(n){return n.triggersBounds},function(n){e.dirtyCompoundBoundsCache(),e.dirtyBoundingBoxCache()})};ta.checkConnectedEdgesBoundsTrigger=function(e,t,r,i){this.checkTrigger(e,t,r,i,function(n){return n.triggersBoundsOfConnectedEdges},function(n){e.connectedEdges().forEach(function(a){a.dirtyBoundingBoxCache()})})};ta.checkParallelEdgesBoundsTrigger=function(e,t,r,i){this.checkTrigger(e,t,r,i,function(n){return n.triggersBoundsOfParallelEdges},function(n){e.parallelEdges().forEach(function(a){a.dirtyBoundingBoxCache()})})};ta.checkTriggers=function(e,t,r,i){e.dirtyStyleCache(),this.checkZOrderTrigger(e,t,r,i),this.checkBoundsTrigger(e,t,r,i),this.checkConnectedEdgesBoundsTrigger(e,t,r,i),this.checkParallelEdgesBoundsTrigger(e,t,r,i)};sb={};sb.applyBypass=function(e,t,r,i){var n=this,a=[],s=!0;if(t==="*"||t==="**"){if(r!==void 0)for(var l=0;ln.length?i=i.substr(n.length):i=""}o(l,"removeSelAndBlockFromRemaining");function h(){a.length>s.length?a=a.substr(s.length):a=""}for(o(h,"removePropAndValFromRem");;){var u=i.match(/^\s*$/);if(u)break;var d=i.match(/^\s*((?:.|\s)+?)\s*\{((?:.|\s)+?)\}/);if(!d){yi("Halting stylesheet parsing: String stylesheet contains more to parse but no selector and block found in: "+i);break}n=d[0];var p=d[1];if(p!=="core"){var f=new pd(p);if(f.invalid){yi("Skipping parsing of block: Invalid selector found in string stylesheet: "+p),l();continue}}var g=d[2],m=!1;a=g;for(var y=[];;){var b=a.match(/^\s*$/);if(b)break;var v=a.match(/^\s*(.+?)\s*:\s*(.+?)(?:\s*;|\s*$)/);if(!v){yi("Skipping parsing of block: Invalid formatting of style property and value definitions found in:"+g),m=!0;break}s=v[0];var T=v[1],x=v[2],k=t.properties[T];if(!k){yi("Skipping property: Invalid property name in: "+s),h();continue}var C=r.parse(T,x);if(!C){yi("Skipping property: Invalid property definition in: "+s),h();continue}y.push({name:T,val:x}),h()}if(m){l();break}r.selector(p);for(var E=0;E=7&&t[0]==="d"&&(d=new RegExp(l.data.regex).exec(t))){if(r)return!1;var f=l.data;return{name:e,value:d,strValue:""+t,mapped:f,field:d[1],bypass:r}}else if(t.length>=10&&t[0]==="m"&&(p=new RegExp(l.mapData.regex).exec(t))){if(r||u.multiple)return!1;var g=l.mapData;if(!(u.color||u.number))return!1;var m=this.parse(e,p[4]);if(!m||m.mapped)return!1;var y=this.parse(e,p[5]);if(!y||y.mapped)return!1;if(m.pfValue===y.pfValue||m.strValue===y.strValue)return yi("`"+e+": "+t+"` is not a valid mapper because the output range is zero; converting to `"+e+": "+m.strValue+"`"),this.parse(e,m.strValue);if(u.color){var b=m.value,v=y.value,T=b[0]===v[0]&&b[1]===v[1]&&b[2]===v[2]&&(b[3]===v[3]||(b[3]==null||b[3]===1)&&(v[3]==null||v[3]===1));if(T)return!1}return{name:e,value:p,strValue:""+t,mapped:g,field:p[1],fieldMin:parseFloat(p[2]),fieldMax:parseFloat(p[3]),valueMin:m.value,valueMax:y.value,bypass:r}}}if(u.multiple&&i!=="multiple"){var x;if(h?x=t.split(/\s+/):_i(t)?x=t:x=[t],u.evenMultiple&&x.length%2!==0)return null;for(var k=[],C=[],E=[],w="",_=!1,L=0;L0?" ":"")+N.strValue}return u.validate&&!u.validate(k,C)?null:u.singleEnum&&_?k.length===1&&er(k[0])?{name:e,value:k[0],strValue:k[0],bypass:r}:null:{name:e,value:k,pfValue:E,strValue:w,bypass:r,units:C}}var D=o(function(){for(var se=0;seu.max||u.strictMax&&t===u.max))return null;var O={name:e,value:t,strValue:""+t+(M||""),units:M,bypass:r};return u.unitless||M!=="px"&&M!=="em"?O.pfValue=t:O.pfValue=M==="px"||!M?t:this.getEmSizeInPixels()*t,(M==="ms"||M==="s")&&(O.pfValue=M==="ms"?t:1e3*t),(M==="deg"||M==="rad")&&(O.pfValue=M==="rad"?t:nVe(t)),M==="%"&&(O.pfValue=t/100),O}else if(u.propList){var R=[],$=""+t;if($!=="none"){for(var F=$.split(/\s*,\s*|\s+/),P=0;P0&&s>0&&!isNaN(r.w)&&!isNaN(r.h)&&r.w>0&&r.h>0){l=Math.min((a-2*t)/r.w,(s-2*t)/r.h),l=l>this._private.maxZoom?this._private.maxZoom:l,l=l=r.minZoom&&(r.maxZoom=t),this},"zoomRange"),minZoom:o(function(e){return e===void 0?this._private.minZoom:this.zoomRange({min:e})},"minZoom"),maxZoom:o(function(e){return e===void 0?this._private.maxZoom:this.zoomRange({max:e})},"maxZoom"),getZoomedViewport:o(function(e){var t=this._private,r=t.pan,i=t.zoom,n,a,s=!1;if(t.zoomingEnabled||(s=!0),It(e)?a=e:ni(e)&&(a=e.level,e.position!=null?n=$w(e.position,i,r):e.renderedPosition!=null&&(n=e.renderedPosition),n!=null&&!t.panningEnabled&&(s=!0)),a=a>t.maxZoom?t.maxZoom:a,a=at.maxZoom||!t.zoomingEnabled?a=!0:(t.zoom=l,n.push("zoom"))}if(i&&(!a||!e.cancelOnFailedZoom)&&t.panningEnabled){var h=e.pan;It(h.x)&&(t.pan.x=h.x,s=!1),It(h.y)&&(t.pan.y=h.y,s=!1),s||n.push("pan")}return n.length>0&&(n.push("viewport"),this.emit(n.join(" ")),this.notify("viewport")),this},"viewport"),center:o(function(e){var t=this.getCenterPan(e);return t&&(this._private.pan=t,this.emit("pan viewport"),this.notify("viewport")),this},"center"),getCenterPan:o(function(e,t){if(this._private.panningEnabled){if(er(e)){var r=e;e=this.mutableElements().filter(r)}else uo(e)||(e=this.mutableElements());if(e.length!==0){var i=e.boundingBox(),n=this.width(),a=this.height();t=t===void 0?this._private.zoom:t;var s={x:(n-t*(i.x1+i.x2))/2,y:(a-t*(i.y1+i.y2))/2};return s}}},"getCenterPan"),reset:o(function(){return!this._private.panningEnabled||!this._private.zoomingEnabled?this:(this.viewport({pan:{x:0,y:0},zoom:1}),this)},"reset"),invalidateSize:o(function(){this._private.sizeCache=null},"invalidateSize"),size:o(function(){var e=this._private,t=e.container,r=this;return e.sizeCache=e.sizeCache||(t?(function(){var i=r.window().getComputedStyle(t),n=o(function(a){return parseFloat(i.getPropertyValue(a))},"val");return{width:t.clientWidth-n("padding-left")-n("padding-right"),height:t.clientHeight-n("padding-top")-n("padding-bottom")}})():{width:1,height:1})},"size"),width:o(function(){return this.size().width},"width"),height:o(function(){return this.size().height},"height"),extent:o(function(){var e=this._private.pan,t=this._private.zoom,r=this.renderedExtent(),i={x1:(r.x1-e.x)/t,x2:(r.x2-e.x)/t,y1:(r.y1-e.y)/t,y2:(r.y2-e.y)/t};return i.w=i.x2-i.x1,i.h=i.y2-i.y1,i},"extent"),renderedExtent:o(function(){var e=this.width(),t=this.height();return{x1:0,y1:0,x2:e,y2:t,w:e,h:t}},"renderedExtent"),multiClickDebounceTime:o(function(e){if(e)this._private.multiClickDebounceTime=e;else return this._private.multiClickDebounceTime;return this},"multiClickDebounceTime")};wf.centre=wf.center;wf.autolockNodes=wf.autolock;wf.autoungrabifyNodes=wf.autoungrabify;Gv={data:mi.data({field:"data",bindingEvent:"data",allowBinding:!0,allowSetting:!0,settingEvent:"data",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeData:mi.removeData({field:"data",event:"data",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0}),scratch:mi.data({field:"scratch",bindingEvent:"scratch",allowBinding:!0,allowSetting:!0,settingEvent:"scratch",settingTriggersEvent:!0,triggerFnName:"trigger",allowGetting:!0,updateStyle:!0}),removeScratch:mi.removeData({field:"scratch",event:"scratch",triggerFnName:"trigger",triggerEvent:!0,updateStyle:!0})};Gv.attr=Gv.data;Gv.removeAttr=Gv.removeData;Wv=o(function(e){var t=this;e=cr({},e);var r=e.container;r&&!pw(r)&&pw(r[0])&&(r=r[0]);var i=r?r._cyreg:null;i=i||{},i&&i.cy&&(i.cy.destroy(),i={});var n=i.readies=i.readies||[];r&&(r._cyreg=i),i.cy=t;var a=zn!==void 0&&r!==void 0&&!e.headless,s=e;s.layout=cr({name:a?"grid":"null"},s.layout),s.renderer=cr({name:a?"canvas":"null"},s.renderer);var l=o(function(f,g,m){return g!==void 0?g:m!==void 0?m:f},"defVal"),h=this._private={container:r,ready:!1,options:s,elements:new da(this),listeners:[],aniEles:new da(this),data:s.data||{},scratch:{},layout:null,renderer:null,destroyed:!1,notificationsEnabled:!0,minZoom:1e-50,maxZoom:1e50,zoomingEnabled:l(!0,s.zoomingEnabled),userZoomingEnabled:l(!0,s.userZoomingEnabled),panningEnabled:l(!0,s.panningEnabled),userPanningEnabled:l(!0,s.userPanningEnabled),boxSelectionEnabled:l(!0,s.boxSelectionEnabled),autolock:l(!1,s.autolock,s.autolockNodes),autoungrabify:l(!1,s.autoungrabify,s.autoungrabifyNodes),autounselectify:l(!1,s.autounselectify),styleEnabled:s.styleEnabled===void 0?a:s.styleEnabled,zoom:It(s.zoom)?s.zoom:1,pan:{x:ni(s.pan)&&It(s.pan.x)?s.pan.x:0,y:ni(s.pan)&&It(s.pan.y)?s.pan.y:0},animation:{current:[],queue:[]},hasCompoundNodes:!1,multiClickDebounceTime:l(250,s.multiClickDebounceTime)};this.createEmitter(),this.selectionType(s.selectionType),this.zoomRange({min:s.minZoom,max:s.maxZoom});var u=o(function(f,g){var m=f.some(uUe);if(m)return Em.all(f).then(g);g(f)},"loadExtData");h.styleEnabled&&t.setStyle([]);var d=cr({},s,s.renderer);t.initRenderer(d);var p=o(function(f,g,m){t.notifications(!1);var y=t.mutableElements();y.length>0&&y.remove(),f!=null&&(ni(f)||_i(f))&&t.add(f),t.one("layoutready",function(v){t.notifications(!0),t.emit(v),t.one("load",g),t.emitAndNotify("load")}).one("layoutstop",function(){t.one("done",m),t.emit("done")});var b=cr({},t._private.options.layout);b.eles=t.elements(),t.layout(b).run()},"setElesAndLayout");u([s.style,s.elements],function(f){var g=f[0],m=f[1];h.styleEnabled&&t.style().append(g),p(m,function(){t.startAnimationLoop(),h.ready=!0,Qi(s.ready)&&t.on("ready",s.ready);for(var y=0;y0,l=!!e.boundingBox,h=ms(l?e.boundingBox:structuredClone(t.extent())),u;if(uo(e.roots))u=e.roots;else if(_i(e.roots)){for(var d=[],p=0;p0;){var A=B(),I=L(A,D);if(I)A.outgoers().filter(function(ve){return ve.isNode()&&r.has(ve)}).forEach(M);else if(I===null){yi("Detected double maximal shift for node `"+A.id()+"`. Bailing maximal adjustment due to cycle. Use `options.maximal: true` only on DAGs.");break}}}var O=0;if(e.avoidOverlap)for(var R=0;R0&&v[0].length<=3?ce/2:0),be=2*Math.PI/v[Pe].length*X;return Pe===0&&v[0].length===1&&(ge=1),{x:ne.x+ge*Math.cos(be),y:ne.y+ge*Math.sin(be)}}else{var ke=v[Pe].length,Me=Math.max(ke===1?0:l?(h.w-e.padding*2-Ae.w)/((e.grid?me:ke)-1):(h.w-e.padding*2-Ae.w)/((e.grid?me:ke)+1),O),pe={x:ne.x+(X+1-(ke+1)/2)*Me,y:ne.y+(Pe+1-(J+1)/2)*ie};return pe}},"getPositionTopBottom"),we={downward:0,leftward:90,upward:180,rightward:-90};Object.keys(we).indexOf(e.direction)===-1&&Ui("Invalid direction '".concat(e.direction,"' specified for breadthfirst layout. Valid values are: ").concat(Object.keys(we).join(", ")));var ye=o(function(ve){return nbe(oe(ve),h,we[e.direction])},"getPosition");return r.nodes().layoutPositions(this,e,ye),this};xHe={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:o(function(e,t){return!0},"animateFilter"),ready:void 0,stop:void 0,transform:o(function(e,t){return t},"transform")};o(pN,"CircleLayout");pN.prototype.run=function(){var e=this.options,t=e,r=e.cy,i=t.eles,n=t.counterclockwise!==void 0?!t.counterclockwise:t.clockwise,a=i.nodes().not(":parent");t.sort&&(a=a.sort(t.sort));for(var s=ms(t.boundingBox?t.boundingBox:{x1:0,y1:0,w:r.width(),h:r.height()}),l={x:s.x1+s.w/2,y:s.y1+s.h/2},h=t.sweep===void 0?2*Math.PI-2*Math.PI/a.length:t.sweep,u=h/Math.max(1,a.length-1),d,p=0,f=0;f1&&t.avoidOverlap){p*=1.75;var v=Math.cos(u)-Math.cos(0),T=Math.sin(u)-Math.sin(0),x=Math.sqrt(p*p/(v*v+T*T));d=Math.max(x,d)}var k=o(function(C,E){var w=t.startAngle+E*u*(n?1:-1),_=d*Math.cos(w),L=d*Math.sin(w),N={x:l.x+_,y:l.y+L};return N},"getPos");return i.nodes().layoutPositions(this,t,k),this};THe={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:o(function(e){return e.degree()},"concentric"),levelWidth:o(function(e){return e.maxDegree()/4},"levelWidth"),animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:o(function(e,t){return!0},"animateFilter"),ready:void 0,stop:void 0,transform:o(function(e,t){return t},"transform")};o(fN,"ConcentricLayout");fN.prototype.run=function(){for(var e=this.options,t=e,r=t.counterclockwise!==void 0?!t.counterclockwise:t.clockwise,i=e.cy,n=t.eles,a=n.nodes().not(":parent"),s=ms(t.boundingBox?t.boundingBox:{x1:0,y1:0,w:i.width(),h:i.height()}),l={x:s.x1+s.w/2,y:s.y1+s.h/2},h=[],u=0,d=0;d0){var C=Math.abs(T[0].value-k.value);C>=b&&(T=[],v.push(T))}T.push(k)}var E=u+t.minNodeSpacing;if(!t.avoidOverlap){var w=v.length>0&&v[0].length>1,_=Math.min(s.w,s.h)/2-E,L=_/(v.length+w?1:0);E=Math.min(E,L)}for(var N=0,D=0;D1&&t.avoidOverlap){var I=Math.cos(A)-Math.cos(0),O=Math.sin(A)-Math.sin(0),R=Math.sqrt(E*E/(I*I+O*O));N=Math.max(R,N)}M.r=N,N+=E}if(t.equidistant){for(var $=0,F=0,P=0;P=e.numIter||(AHe(i,e),i.temperature=i.temperature*e.coolingFactor,i.temperature=e.animationThreshold&&a(),fw(d)}},"frame");d()}else{for(;u;)u=s(h),h++;lve(i,e),l()}return this};ob.prototype.stop=function(){return this.stopped=!0,this.thread&&this.thread.stop(),this.emit("layoutstop"),this};ob.prototype.destroy=function(){return this.thread&&this.thread.stop(),this};CHe=o(function(e,t,r){for(var i=r.eles.edges(),n=r.eles.nodes(),a=ms(r.boundingBox?r.boundingBox:{x1:0,y1:0,w:e.width(),h:e.height()}),s={isCompound:e.hasCompoundNodes(),layoutNodes:[],idToIndex:{},nodeSize:n.size(),graphSet:[],indexToGraph:[],layoutEdges:[],edgeSize:i.size(),temperature:r.initialTemp,clientWidth:a.w,clientHeight:a.h,boundingBox:a},l=r.eles.components(),h={},u=0;u0){s.graphSet.push(w);for(var u=0;ui.count?0:i.graph},"findLCA"),Nxe=o(function(e,t,r,i){var n=i.graphSet[r];if(-10)var b=i.nodeOverlap*u,y=Math.sqrt(s*s+l*l),v=b*s/y,T=b*l/y;else var d=Tw(e,s,l),p=Tw(t,-1*s,-1*l),f=p.x-d.x,g=p.y-d.y,m=f*f+g*g,y=Math.sqrt(m),b=(e.nodeRepulsion+t.nodeRepulsion)/m,v=b*f/y,T=b*g/y;e.isLocked||(e.offsetX-=v,e.offsetY-=T),t.isLocked||(t.offsetX+=v,t.offsetY+=T)}},"nodeRepulsion"),$He=o(function(e,t,r,i){if(r>0)var n=e.maxX-t.minX;else var n=t.maxX-e.minX;if(i>0)var a=e.maxY-t.minY;else var a=t.maxY-e.minY;return n>=0&&a>=0?Math.sqrt(n*n+a*a):0},"nodesOverlap"),Tw=o(function(e,t,r){var i=e.positionX,n=e.positionY,a=e.height||1,s=e.width||1,l=r/t,h=a/s,u={};return t===0&&0r?(u.x=i,u.y=n+a/2,u):0t&&-1*h<=l&&l<=h?(u.x=i-s/2,u.y=n-s*r/2/t,u):0=h)?(u.x=i+a*t/2/r,u.y=n+a/2,u):(0>r&&(l<=-1*h||l>=h)&&(u.x=i-a*t/2/r,u.y=n-a/2),u)},"findClippingPoint"),IHe=o(function(e,t){for(var r=0;rr){var y=t.gravity*f/m,b=t.gravity*g/m;p.offsetX+=y,p.offsetY+=b}}}}},"calculateGravityForces"),MHe=o(function(e,t){var r=[],i=0,n=-1;for(r.push.apply(r,e.graphSet[0]),n+=e.graphSet[0].length;i<=n;){var a=r[i++],s=e.idToIndex[a],l=e.layoutNodes[s],h=l.children;if(0r)var n={x:r*e/i,y:r*t/i};else var n={x:e,y:t};return n},"limitForce"),Bxe=o(function(e,t){var r=e.parentId;if(r!=null){var i=t.layoutNodes[t.idToIndex[r]],n=!1;if((i.maxX==null||e.maxX+i.padRight>i.maxX)&&(i.maxX=e.maxX+i.padRight,n=!0),(i.minX==null||e.minX-i.padLefti.maxY)&&(i.maxY=e.maxY+i.padBottom,n=!0),(i.minY==null||e.minY-i.padTopb&&(g+=y+t.componentSpacing,f=0,m=0,y=0)}}},"separateComponents"),BHe={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:o(function(e){},"position"),sort:void 0,animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:o(function(e,t){return!0},"animateFilter"),ready:void 0,stop:void 0,transform:o(function(e,t){return t},"transform")};o(gN,"GridLayout");gN.prototype.run=function(){var e=this.options,t=e,r=e.cy,i=t.eles,n=i.nodes().not(":parent");t.sort&&(n=n.sort(t.sort));var a=ms(t.boundingBox?t.boundingBox:{x1:0,y1:0,w:r.width(),h:r.height()});if(a.h===0||a.w===0)i.nodes().layoutPositions(this,t,function(G){return{x:a.x1,y:a.y1}});else{var s=n.size(),l=Math.sqrt(s*a.h/a.w),h=Math.round(l),u=Math.round(a.w/a.h*l),d=o(function(G){if(G==null)return Math.min(h,u);var W=Math.min(h,u);W==h?h=G:u=G},"small"),p=o(function(G){if(G==null)return Math.max(h,u);var W=Math.max(h,u);W==h?h=G:u=G},"large"),f=t.rows,g=t.cols!=null?t.cols:t.columns;if(f!=null&&g!=null)h=f,u=g;else if(f!=null&&g==null)h=f,u=Math.ceil(s/h);else if(f==null&&g!=null)u=g,h=Math.ceil(s/u);else if(u*h>s){var m=d(),y=p();(m-1)*y>=s?d(m-1):(y-1)*m>=s&&p(y-1)}else for(;u*h=s?p(v+1):d(b+1)}var T=a.w/u,x=a.h/h;if(t.condense&&(T=0,x=0),t.avoidOverlap)for(var k=0;k=u&&(I=0,A++)},"moveToNextCell"),R={},$=0;$(R=mVe(e,t,$[F],$[F+1],$[F+2],$[F+3])))return b(w,R),!0}else if(L.edgeType==="bezier"||L.edgeType==="multibezier"||L.edgeType==="self"||L.edgeType==="compound"){for(var $=L.allpts,F=0;F+5(R=gVe(e,t,$[F],$[F+1],$[F+2],$[F+3],$[F+4],$[F+5])))return b(w,R),!0}for(var I=I||_.source,O=O||_.target,P=n.getArrowWidth(N,D),z=[{name:"source",x:L.arrowStartX,y:L.arrowStartY,angle:L.srcArrowAngle},{name:"target",x:L.arrowEndX,y:L.arrowEndY,angle:L.tgtArrowAngle},{name:"mid-source",x:L.midX,y:L.midY,angle:L.midsrcArrowAngle},{name:"mid-target",x:L.midX,y:L.midY,angle:L.midtgtArrowAngle}],F=0;F0&&(v(I),v(O))}o(T,"checkEdge");function x(w,_,L){return zs(w,_,L)}o(x,"preprop");function k(w,_){var L=w._private,N=f,D;_?D=_+"-":D="",w.boundingBox();var M=L.labelBounds[_||"main"],B=w.pstyle(D+"label").value,A=w.pstyle("text-events").strValue==="yes";if(!(!A||!B)){var I=x(L.rscratch,"labelX",_),O=x(L.rscratch,"labelY",_),R=x(L.rscratch,"labelAngle",_),$=w.pstyle(D+"text-margin-x").pfValue,F=w.pstyle(D+"text-margin-y").pfValue,P=M.x1-N-$,z=M.x2+N-$,q=M.y1-N-F,G=M.y2+N-F;if(R){var W=Math.cos(R),J=Math.sin(R),H=o(function(ne,Ae){return ne=ne-I,Ae=Ae-O,{x:ne*W-Ae*J+I,y:ne*J+Ae*W+O}},"rotate"),Z=H(P,q),se=H(P,G),Q=H(z,q),te=H(z,G),re=[Z.x+$,Z.y+F,Q.x+$,Q.y+F,te.x+$,te.y+F,se.x+$,se.y+F];if(qs(e,t,re))return b(w),!0}else if(sd(M,e,t))return b(w),!0}}o(k,"checkLabel");for(var C=s.length-1;C>=0;C--){var E=s[C];E.isNode()?v(E)||k(E):T(E)||k(E)||k(E,"source")||k(E,"target")}return l};_f.getAllInBox=function(e,t,r,i){var n=this.getCachedZSortedEles().interactive,a=this.cy.zoom(),s=2/a,l=[],h=Math.min(e,r),u=Math.max(e,r),d=Math.min(t,i),p=Math.max(t,i);e=h,r=u,t=d,i=p;var f=ms({x1:e,y1:t,x2:r,y2:i}),g=[{x:f.x1,y:f.y1},{x:f.x2,y:f.y1},{x:f.x2,y:f.y2},{x:f.x1,y:f.y2}],m=[[g[0],g[1]],[g[1],g[2]],[g[2],g[3]],[g[3],g[0]]];function y(Ae,ie,me){return zs(Ae,ie,me)}o(y,"preprop");function b(Ae,ie){var me=Ae._private,oe=s,we="";Ae.boundingBox();var ye=me.labelBounds.main;if(!ye)return null;var ve=y(me.rscratch,"labelX",ie),ae=y(me.rscratch,"labelY",ie),Pe=y(me.rscratch,"labelAngle",ie),X=Ae.pstyle(we+"text-margin-x").pfValue,ce=Ae.pstyle(we+"text-margin-y").pfValue,ge=ye.x1-oe-X,be=ye.x2+oe-X,ke=ye.y1-oe-ce,Me=ye.y2+oe-ce;if(Pe){var pe=Math.cos(Pe),Oe=Math.sin(Pe),j=o(function(le,U){return le=le-ve,U=U-ae,{x:le*pe-U*Oe+ve,y:le*Oe+U*pe+ae}},"rotate");return[j(ge,ke),j(be,ke),j(be,Me),j(ge,Me)]}else return[{x:ge,y:ke},{x:be,y:ke},{x:be,y:Me},{x:ge,y:Me}]}o(b,"getRotatedLabelBox");function v(Ae,ie,me,oe){function we(ye,ve,ae){return(ae.y-ye.y)*(ve.x-ye.x)>(ve.y-ye.y)*(ae.x-ye.x)}return o(we,"ccw"),we(Ae,me,oe)!==we(ie,me,oe)&&we(Ae,ie,me)!==we(Ae,ie,oe)}o(v,"doLinesIntersect");for(var T=0;T0?-(Math.PI-e.ang):Math.PI+e.ang},"invertVec"),GHe=o(function(e,t,r,i,n){if(e!==pve?fve(t,e,xc):jHe(zo,xc),fve(t,r,zo),uve=xc.nx*zo.ny-xc.ny*zo.nx,dve=xc.nx*zo.nx-xc.ny*-zo.ny,Rh=Math.asin(Math.max(-1,Math.min(1,uve))),Math.abs(Rh)<1e-6){AM=t.x,RM=t.y,mf=sm=0;return}bf=1,lw=!1,dve<0?Rh<0?Rh=Math.PI+Rh:(Rh=Math.PI-Rh,bf=-1,lw=!0):Rh>0&&(bf=-1,lw=!0),t.radius!==void 0?sm=t.radius:sm=i,uf=Rh/2,XC=Math.min(xc.len/2,zo.len/2),n?(bc=Math.abs(Math.cos(uf)*sm/Math.sin(uf)),bc>XC?(bc=XC,mf=Math.abs(bc*Math.sin(uf)/Math.cos(uf))):mf=sm):(bc=Math.min(XC,sm),mf=Math.abs(bc*Math.sin(uf)/Math.cos(uf))),LM=t.x+zo.nx*bc,$M=t.y+zo.ny*bc,AM=LM-zo.ny*mf*bf,RM=$M+zo.nx*mf*bf,Pxe=t.x+xc.nx*bc,Fxe=t.y+xc.ny*bc,pve=t},"calcCornerArc");o(xN,"drawPreparedRoundCorner");o(zw,"getRoundCorner");Uv=.01,WHe=Math.sqrt(2*Uv),Ka={};Ka.findMidptPtsEtc=function(e,t){var r=t.posPts,i=t.intersectionPts,n=t.vectorNormInverse,a,s=e.pstyle("source-endpoint"),l=e.pstyle("target-endpoint"),h=s.units!=null&&l.units!=null,u=o(function(k,C,E,w){var _=w-C,L=E-k,N=Math.sqrt(L*L+_*_);return{x:-_/N,y:L/N}},"recalcVectorNormInverse"),d=e.pstyle("edge-distances").value;switch(d){case"node-position":a=r;break;case"intersection":a=i;break;case"endpoints":{if(h){var p=this.manualEndptToPx(e.source()[0],s),f=xn(p,2),g=f[0],m=f[1],y=this.manualEndptToPx(e.target()[0],l),b=xn(y,2),v=b[0],T=b[1],x={x1:g,y1:m,x2:v,y2:T};n=u(g,m,v,T),a=x}else yi("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=i;break}}return{midptPts:a,vectorNormInverse:n}};Ka.findHaystackPoints=function(e){for(var t=0;t0?Math.max(U-fe,0):Math.min(U+fe,0)},"subDWH"),B=M(N,_),A=M(D,L),I=!1;T===u?v=Math.abs(B)>Math.abs(A)?n:i:T===h||T===l?(v=i,I=!0):(T===a||T===s)&&(v=n,I=!0);var O=v===i,R=O?A:B,$=O?D:N,F=ZM($),P=!1;!(I&&(k||E))&&(T===l&&$<0||T===h&&$>0||T===a&&$>0||T===s&&$<0)&&(F*=-1,R=F*Math.abs(R),P=!0);var z;if(k){var q=C<0?1+C:C;z=q*R}else{var G=C<0?R:0;z=G+C*F}var W=o(function(U){return Math.abs(U)=Math.abs(R)},"getIsTooClose"),J=W(z),H=W(Math.abs(R)-Math.abs(z)),Z=J||H;if(Z&&!P)if(O){var se=Math.abs($)<=f/2,Q=Math.abs(N)<=g/2;if(se){var te=(d.x1+d.x2)/2,re=d.y1,ne=d.y2;r.segpts=[te,re,te,ne]}else if(Q){var Ae=(d.y1+d.y2)/2,ie=d.x1,me=d.x2;r.segpts=[ie,Ae,me,Ae]}else r.segpts=[d.x1,d.y2]}else{var oe=Math.abs($)<=p/2,we=Math.abs(D)<=m/2;if(oe){var ye=(d.y1+d.y2)/2,ve=d.x1,ae=d.x2;r.segpts=[ve,ye,ae,ye]}else if(we){var Pe=(d.x1+d.x2)/2,X=d.y1,ce=d.y2;r.segpts=[Pe,X,Pe,ce]}else r.segpts=[d.x2,d.y1]}else if(O){var ge=d.y1+z+(b?f/2*F:0),be=d.x1,ke=d.x2;r.segpts=[be,ge,ke,ge]}else{var Me=d.x1+z+(b?p/2*F:0),pe=d.y1,Oe=d.y2;r.segpts=[Me,pe,Me,Oe]}if(r.isRound){var j=e.pstyle("taxi-radius").value,le=e.pstyle("radius-type").value[0]==="arc-radius";r.radii=new Array(r.segpts.length/2).fill(j),r.isArcRadius=new Array(r.segpts.length/2).fill(le)}};Ka.tryToCorrectInvalidPoints=function(e,t){var r=e._private.rscratch;if(r.edgeType==="bezier"){var i=t.srcPos,n=t.tgtPos,a=t.srcW,s=t.srcH,l=t.tgtW,h=t.tgtH,u=t.srcShape,d=t.tgtShape,p=t.srcCornerRadius,f=t.tgtCornerRadius,g=t.srcRs,m=t.tgtRs,y=!It(r.startX)||!It(r.startY),b=!It(r.arrowStartX)||!It(r.arrowStartY),v=!It(r.endX)||!It(r.endY),T=!It(r.arrowEndX)||!It(r.arrowEndY),x=3,k=this.getArrowWidth(e.pstyle("width").pfValue,e.pstyle("arrow-scale").value)*this.arrowShapeWidth,C=x*k,E=kf({x:r.ctrlpts[0],y:r.ctrlpts[1]},{x:r.startX,y:r.startY}),w=ER.poolIndex()){var $=O;O=R,R=$}var F=M.srcPos=O.position(),P=M.tgtPos=R.position(),z=M.srcW=O.outerWidth(),q=M.srcH=O.outerHeight(),G=M.tgtW=R.outerWidth(),W=M.tgtH=R.outerHeight(),J=M.srcShape=r.nodeShapes[t.getNodeShape(O)],H=M.tgtShape=r.nodeShapes[t.getNodeShape(R)],Z=M.srcCornerRadius=O.pstyle("corner-radius").value==="auto"?"auto":O.pstyle("corner-radius").pfValue,se=M.tgtCornerRadius=R.pstyle("corner-radius").value==="auto"?"auto":R.pstyle("corner-radius").pfValue,Q=M.tgtRs=R._private.rscratch,te=M.srcRs=O._private.rscratch;M.dirCounts={north:0,west:0,south:0,east:0,northwest:0,southwest:0,northeast:0,southeast:0};for(var re=0;re=WHe||(be=Math.sqrt(Math.max(ge*ge,Uv)+Math.max(ce*ce,Uv)));var ke=M.vector={x:ge,y:ce},Me=M.vectorNorm={x:ke.x/be,y:ke.y/be},pe={x:-Me.y,y:Me.x};M.nodesOverlap=!It(be)||H.checkPoint(we[0],we[1],0,G,W,P.x,P.y,se,Q)||J.checkPoint(ve[0],ve[1],0,z,q,F.x,F.y,Z,te),M.vectorNormInverse=pe,B={nodesOverlap:M.nodesOverlap,dirCounts:M.dirCounts,calculatedIntersection:!0,hasBezier:M.hasBezier,hasUnbundled:M.hasUnbundled,eles:M.eles,srcPos:P,srcRs:Q,tgtPos:F,tgtRs:te,srcW:G,srcH:W,tgtW:z,tgtH:q,srcIntn:ae,tgtIntn:ye,srcShape:H,tgtShape:J,posPts:{x1:X.x2,y1:X.y2,x2:X.x1,y2:X.y1},intersectionPts:{x1:Pe.x2,y1:Pe.y2,x2:Pe.x1,y2:Pe.y1},vector:{x:-ke.x,y:-ke.y},vectorNorm:{x:-Me.x,y:-Me.y},vectorNormInverse:{x:-pe.x,y:-pe.y}}}var Oe=oe?B:M;Ae.nodesOverlap=Oe.nodesOverlap,Ae.srcIntn=Oe.srcIntn,Ae.tgtIntn=Oe.tgtIntn,Ae.isRound=ie.startsWith("round"),n&&(O.isParent()||O.isChild()||R.isParent()||R.isChild())&&(O.parents().anySame(R)||R.parents().anySame(O)||O.same(R)&&O.isParent())?t.findCompoundLoopPoints(ne,Oe,re,me):O===R?t.findLoopPoints(ne,Oe,re,me):ie.endsWith("segments")?t.findSegmentsPoints(ne,Oe):ie.endsWith("taxi")?t.findTaxiPoints(ne,Oe):ie==="straight"||!me&&M.eles.length%2===1&&re===Math.floor(M.eles.length/2)?t.findStraightEdgePoints(ne):t.findBezierPoints(ne,Oe,re,me,oe),t.findEndpoints(ne),t.tryToCorrectInvalidPoints(ne,Oe),t.checkForInvalidEdgeWarning(ne),t.storeAllpts(ne),t.storeEdgeProjections(ne),t.calculateArrowAngles(ne),t.recalculateEdgeLabelProjections(ne),t.calculateLabelAngles(ne)}},"_loop"),w=0;w0){var ye=u,ve=pf(ye,um(s)),ae=pf(ye,um(we)),Pe=ve;if(ae2){var X=pf(ye,{x:we[2],y:we[3]});X0){var Le=d,xe=pf(Le,um(s)),je=pf(Le,um(Y)),Ie=xe;if(je2){var Ve=pf(Le,{x:Y[2],y:Y[3]});Ve=g||E){y={cp:x,segment:C};break}}if(y)break}var w=y.cp,_=y.segment,L=(g-b)/_.length,N=_.t1-_.t0,D=f?_.t0+N*L:_.t1-N*L;D=Fv(0,D,1),t=fm(w.p0,w.p1,w.p2,D),p=UHe(w.p0,w.p1,w.p2,D);break}case"straight":case"segments":case"haystack":{for(var M=0,B,A,I,O,R=i.allpts.length,$=0;$+3=g));$+=2);var F=g-A,P=F/B;P=Fv(0,P,1),t=sVe(I,O,P),p=jxe(I,O);break}}s("labelX",d,t.x),s("labelY",d,t.y),s("labelAutoAngle",d,p)}},"calculateEndProjection");u("source"),u("target"),this.applyLabelDimensions(e)}};Cc.applyLabelDimensions=function(e){this.applyPrefixedLabelDimensions(e),e.isEdge()&&(this.applyPrefixedLabelDimensions(e,"source"),this.applyPrefixedLabelDimensions(e,"target"))};Cc.applyPrefixedLabelDimensions=function(e,t){var r=e._private,i=this.getLabelText(e,t),n=Tf(i,e._private.labelDimsKey);if(zs(r.rscratch,"prefixedLabelDimsKey",t)!==n){Lh(r.rscratch,"prefixedLabelDimsKey",t,n);var a=this.calculateLabelDimensions(e,i),s=e.pstyle("line-height").pfValue,l=e.pstyle("text-wrap").strValue,h=zs(r.rscratch,"labelWrapCachedLines",t)||[],u=l!=="wrap"?1:Math.max(h.length,1),d=a.height/u,p=d*s,f=a.width,g=a.height+(u-1)*(s-1)*d;Lh(r.rstyle,"labelWidth",t,f),Lh(r.rscratch,"labelWidth",t,f),Lh(r.rstyle,"labelHeight",t,g),Lh(r.rscratch,"labelHeight",t,g),Lh(r.rscratch,"labelLineHeight",t,p)}};Cc.getLabelText=function(e,t){var r=e._private,i=t?t+"-":"",n=e.pstyle(i+"label").strValue,a=e.pstyle("text-transform").value,s=o(function(q,G){return G?(Lh(r.rscratch,q,t,G),G):zs(r.rscratch,q,t)},"rscratch");if(!n)return"";a=="none"||(a=="uppercase"?n=n.toUpperCase():a=="lowercase"&&(n=n.toLowerCase()));var l=e.pstyle("text-wrap").value;if(l==="wrap"){var h=s("labelKey");if(h!=null&&s("labelWrapKey")===h)return s("labelWrapCachedText");for(var u="\u200B",d=n.split(` +`),p=e.pstyle("text-max-width").pfValue,f=e.pstyle("text-overflow-wrap").value,g=f==="anywhere",m=[],y=/[\s\u200b]+|$/g,b=0;bp){var C=v.matchAll(y),E="",w=0,_=gs(C),L;try{for(_.s();!(L=_.n()).done;){var N=L.value,D=N[0],M=v.substring(w,N.index);w=N.index+D.length;var B=E.length===0?M:E+M+D,A=this.calculateLabelDimensions(e,B),I=A.width;I<=p?E+=M+D:(E&&m.push(E),E=M+D)}}catch(q){_.e(q)}finally{_.f()}E.match(/^[\s\u200b]+$/)||m.push(E)}else m.push(v)}s("labelWrapCachedLines",m),n=s("labelWrapCachedText",m.join(` +`)),s("labelWrapKey",h)}else if(l==="ellipsis"){var O=e.pstyle("text-max-width").pfValue,R="",$="\u2026",F=!1;if(this.calculateLabelDimensions(e,n).widthO)break;R+=n[P],P===n.length-1&&(F=!0)}return F||(R+=$),R}return n};Cc.getLabelJustification=function(e){var t=e.pstyle("text-justification").strValue,r=e.pstyle("text-halign").strValue;if(t==="auto")if(e.isNode())switch(r){case"left":return"right";case"right":return"left";default:return"center"}else return"center";else return t};Cc.calculateLabelDimensions=function(e,t){var r=this,i=r.cy.window(),n=i.document,a=0,s=e.pstyle("font-style").strValue,l=e.pstyle("font-size").pfValue,h=e.pstyle("font-family").strValue,u=e.pstyle("font-weight").strValue,d=this.labelCalcCanvas,p=this.labelCalcCanvasContext;if(!d){d=this.labelCalcCanvas=n.createElement("canvas"),p=this.labelCalcCanvasContext=d.getContext("2d");var f=d.style;f.position="absolute",f.left="-9999px",f.top="-9999px",f.zIndex="-1",f.visibility="hidden",f.pointerEvents="none"}p.font="".concat(s," ").concat(u," ").concat(l,"px ").concat(h);for(var g=0,m=0,y=t.split(` +`),b=0;b1&&arguments[1]!==void 0?arguments[1]:!0;if(t.merge(a),s)for(var l=0;l=e.desktopTapThreshold2}var kt=a(j);ct&&(e.hoverData.tapholdCancelled=!0);var $t=o(function(){var _t=e.hoverData.dragDelta=e.hoverData.dragDelta||[];_t.length===0?(_t.push(Ue[0]),_t.push(Ue[1])):(_t[0]+=Ue[0],_t[1]+=Ue[1])},"updateDragDelta");U=!0,n(Ne,["mousemove","vmousemove","tapdrag"],j,{x:xe[0],y:xe[1]});var ut=o(function(_t){return{originalEvent:j,type:_t,position:{x:xe[0],y:xe[1]}}},"makeEvent"),de=o(function(){e.data.bgActivePosistion=void 0,e.hoverData.selecting||fe.emit(ut("boxstart")),Ve[4]=1,e.hoverData.selecting=!0,e.redrawHint("select",!0),e.redraw()},"goIntoBoxMode");if(e.hoverData.which===3){if(ct){var st=ut("cxtdrag");ze?ze.emit(st):fe.emit(st),e.hoverData.cxtDragged=!0,(!e.hoverData.cxtOver||Ne!==e.hoverData.cxtOver)&&(e.hoverData.cxtOver&&e.hoverData.cxtOver.emit(ut("cxtdragout")),e.hoverData.cxtOver=Ne,Ne&&Ne.emit(ut("cxtdragover")))}}else if(e.hoverData.dragging){if(U=!0,fe.panningEnabled()&&fe.userPanningEnabled()){var nt;if(e.hoverData.justStartedPan){var rt=e.hoverData.mdownPos;nt={x:(xe[0]-rt[0])*Y,y:(xe[1]-rt[1])*Y},e.hoverData.justStartedPan=!1}else nt={x:Ue[0]*Y,y:Ue[1]*Y};fe.panBy(nt),fe.emit(ut("dragpan")),e.hoverData.dragged=!0}xe=e.projectIntoViewport(j.clientX,j.clientY)}else if(Ve[4]==1&&(ze==null||ze.pannable())){if(ct){if(!e.hoverData.dragging&&fe.boxSelectionEnabled()&&(kt||!fe.panningEnabled()||!fe.userPanningEnabled()))de();else if(!e.hoverData.selecting&&fe.panningEnabled()&&fe.userPanningEnabled()){var _e=s(ze,e.hoverData.downs);_e&&(e.hoverData.dragging=!0,e.hoverData.justStartedPan=!0,Ve[4]=0,e.data.bgActivePosistion=um(je),e.redrawHint("select",!0),e.redraw())}ze&&ze.pannable()&&ze.active()&&ze.unactivate()}}else{if(ze&&ze.pannable()&&ze.active()&&ze.unactivate(),(!ze||!ze.grabbed())&&Ne!=Ge&&(Ge&&n(Ge,["mouseout","tapdragout"],j,{x:xe[0],y:xe[1]}),Ne&&n(Ne,["mouseover","tapdragover"],j,{x:xe[0],y:xe[1]}),e.hoverData.last=Ne),ze)if(ct){if(fe.boxSelectionEnabled()&&kt)ze&&ze.grabbed()&&(y(Ce),ze.emit(ut("freeon")),Ce.emit(ut("free")),e.dragData.didDrag&&(ze.emit(ut("dragfreeon")),Ce.emit(ut("dragfree")))),de();else if(ze&&ze.grabbed()&&e.nodeIsDraggable(ze)){var Ze=!e.dragData.didDrag;Ze&&e.redrawHint("eles",!0),e.dragData.didDrag=!0,e.hoverData.draggingEles||g(Ce,{inDragLayer:!0});var He={x:0,y:0};if(It(Ue[0])&&It(Ue[1])&&(He.x+=Ue[0],He.y+=Ue[1],Ze)){var yt=e.hoverData.dragDelta;yt&&It(yt[0])&&It(yt[1])&&(He.x+=yt[0],He.y+=yt[1])}e.hoverData.draggingEles=!0,Ce.silentShift(He).emit(ut("position")).emit(ut("drag")),e.redrawHint("drag",!0),e.redraw()}}else $t();U=!0}if(Ve[2]=xe[0],Ve[3]=xe[1],U)return j.stopPropagation&&j.stopPropagation(),j.preventDefault&&j.preventDefault(),!1}},"mousemoveHandler"),!1);var N,D,M;e.registerBinding(t,"mouseup",o(function(j){if(!(e.hoverData.which===1&&j.which!==1&&e.hoverData.capture)){var le=e.hoverData.capture;if(le){e.hoverData.capture=!1;var U=e.cy,fe=e.projectIntoViewport(j.clientX,j.clientY),Y=e.selection,Le=e.findNearestElement(fe[0],fe[1],!0,!1),xe=e.dragData.possibleDragElements,je=e.hoverData.down,Ie=a(j);e.data.bgActivePosistion&&(e.redrawHint("select",!0),e.redraw()),e.hoverData.tapholdCancelled=!0,e.data.bgActivePosistion=void 0,je&&je.unactivate();var Ve=o(function(ct){return{originalEvent:j,type:ct,position:{x:fe[0],y:fe[1]}}},"makeEvent");if(e.hoverData.which===3){var Ne=Ve("cxttapend");if(je?je.emit(Ne):U.emit(Ne),!e.hoverData.cxtDragged){var Ge=Ve("cxttap");je?je.emit(Ge):U.emit(Ge)}e.hoverData.cxtDragged=!1,e.hoverData.which=null}else if(e.hoverData.which===1){if(n(Le,["mouseup","tapend","vmouseup"],j,{x:fe[0],y:fe[1]}),!e.dragData.didDrag&&!e.hoverData.dragged&&!e.hoverData.selecting&&!e.hoverData.isOverThresholdDrag&&(n(je,["click","tap","vclick"],j,{x:fe[0],y:fe[1]}),D=!1,j.timeStamp-M<=U.multiClickDebounceTime()?(N&&clearTimeout(N),D=!0,M=null,n(je,["dblclick","dbltap","vdblclick"],j,{x:fe[0],y:fe[1]})):(N=setTimeout(function(){D||n(je,["oneclick","onetap","voneclick"],j,{x:fe[0],y:fe[1]})},U.multiClickDebounceTime()),M=j.timeStamp)),je==null&&!e.dragData.didDrag&&!e.hoverData.selecting&&!e.hoverData.dragged&&!a(j)&&(U.$(r).unselect(["tapunselect"]),xe.length>0&&e.redrawHint("eles",!0),e.dragData.possibleDragElements=xe=U.collection()),Le==je&&!e.dragData.didDrag&&!e.hoverData.selecting&&Le!=null&&Le._private.selectable&&(e.hoverData.dragging||(U.selectionType()==="additive"||Ie?Le.selected()?Le.unselect(["tapunselect"]):Le.select(["tapselect"]):Ie||(U.$(r).unmerge(Le).unselect(["tapunselect"]),Le.select(["tapselect"]))),e.redrawHint("eles",!0)),e.hoverData.selecting){var ze=U.collection(e.getAllInBox(Y[0],Y[1],Y[2],Y[3]));e.redrawHint("select",!0),ze.length>0&&e.redrawHint("eles",!0),U.emit(Ve("boxend"));var Ue=o(function(ct){return ct.selectable()&&!ct.selected()},"eleWouldBeSelected");U.selectionType()==="additive"||Ie||U.$(r).unmerge(ze).unselect(),ze.emit(Ve("box")).stdFilter(Ue).select().emit(Ve("boxselect")),e.redraw()}if(e.hoverData.dragging&&(e.hoverData.dragging=!1,e.redrawHint("select",!0),e.redrawHint("eles",!0),e.redraw()),!Y[4]){e.redrawHint("drag",!0),e.redrawHint("eles",!0);var Ce=je&&je.grabbed();y(xe),Ce&&(je.emit(Ve("freeon")),xe.emit(Ve("free")),e.dragData.didDrag&&(je.emit(Ve("dragfreeon")),xe.emit(Ve("dragfree"))))}}Y[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 B=[],A=4,I,O=1e5,R=o(function(j,le){for(var U=0;U=A){var fe=B;if(I=R(fe,5),!I){var Y=Math.abs(fe[0]);I=$(fe)&&Y>5}if(I)for(var Le=0;Le5&&(U=ZM(U)*5),Ge=U/-250,I&&(Ge/=O,Ge*=3),Ge=Ge*e.wheelSensitivity;var ze=j.deltaMode===1;ze&&(Ge*=33);var Ue=xe.zoom()*Math.pow(10,Ge);j.type==="gesturechange"&&(Ue=e.gestureStartZoom*j.scale),xe.zoom({level:Ue,renderedPosition:{x:Ne[0],y:Ne[1]}}),xe.emit({type:j.type==="gesturechange"?"pinchzoom":"scrollzoom",originalEvent:j,position:{x:Ve[0],y:Ve[1]}})}}}},"wheelHandler");e.registerBinding(e.container,"wheel",F,!0),e.registerBinding(t,"scroll",o(function(j){e.scrollingPage=!0,clearTimeout(e.scrollingPageTimeout),e.scrollingPageTimeout=setTimeout(function(){e.scrollingPage=!1},250)},"scrollHandler"),!0),e.registerBinding(e.container,"gesturestart",o(function(j){e.gestureStartZoom=e.cy.zoom(),e.hasTouchStarted||j.preventDefault()},"gestureStartHandler"),!0),e.registerBinding(e.container,"gesturechange",function(j){e.hasTouchStarted||F(j)},!0),e.registerBinding(e.container,"mouseout",o(function(j){var le=e.projectIntoViewport(j.clientX,j.clientY);e.cy.emit({originalEvent:j,type:"mouseout",position:{x:le[0],y:le[1]}})},"mouseOutHandler"),!1),e.registerBinding(e.container,"mouseover",o(function(j){var le=e.projectIntoViewport(j.clientX,j.clientY);e.cy.emit({originalEvent:j,type:"mouseover",position:{x:le[0],y:le[1]}})},"mouseOverHandler"),!1);var P,z,q,G,W,J,H,Z,se,Q,te,re,ne,Ae=o(function(j,le,U,fe){return Math.sqrt((U-j)*(U-j)+(fe-le)*(fe-le))},"distance"),ie=o(function(j,le,U,fe){return(U-j)*(U-j)+(fe-le)*(fe-le)},"distanceSq"),me;e.registerBinding(e.container,"touchstart",me=o(function(j){if(e.hasTouchStarted=!0,!!_(j)){v(),e.touchData.capture=!0,e.data.bgActivePosistion=void 0;var le=e.cy,U=e.touchData.now,fe=e.touchData.earlier;if(j.touches[0]){var Y=e.projectIntoViewport(j.touches[0].clientX,j.touches[0].clientY);U[0]=Y[0],U[1]=Y[1]}if(j.touches[1]){var Y=e.projectIntoViewport(j.touches[1].clientX,j.touches[1].clientY);U[2]=Y[0],U[3]=Y[1]}if(j.touches[2]){var Y=e.projectIntoViewport(j.touches[2].clientX,j.touches[2].clientY);U[4]=Y[0],U[5]=Y[1]}var Le=o(function(Ct){return{originalEvent:j,type:Ct,position:{x:U[0],y:U[1]}}},"makeEvent");if(j.touches[1]){e.touchData.singleTouchMoved=!0,y(e.dragData.touchDragEles);var xe=e.findContainerClientCoords();se=xe[0],Q=xe[1],te=xe[2],re=xe[3],P=j.touches[0].clientX-se,z=j.touches[0].clientY-Q,q=j.touches[1].clientX-se,G=j.touches[1].clientY-Q,ne=0<=P&&P<=te&&0<=q&&q<=te&&0<=z&&z<=re&&0<=G&&G<=re;var je=le.pan(),Ie=le.zoom();W=Ae(P,z,q,G),J=ie(P,z,q,G),H=[(P+q)/2,(z+G)/2],Z=[(H[0]-je.x)/Ie,(H[1]-je.y)/Ie];var Ve=200,Ne=Ve*Ve;if(J=1){for(var at=e.touchData.startPosition=[null,null,null,null,null,null],dt=0;dt=e.touchTapThreshold2}if(le&&e.touchData.cxt){j.preventDefault();var dt=j.touches[0].clientX-se,gt=j.touches[0].clientY-Q,Ct=j.touches[1].clientX-se,kt=j.touches[1].clientY-Q,$t=ie(dt,gt,Ct,kt),ut=$t/J,de=150,st=de*de,nt=1.5,rt=nt*nt;if(ut>=rt||$t>=st){e.touchData.cxt=!1,e.data.bgActivePosistion=void 0,e.redrawHint("select",!0);var _e=Ie("cxttapend");e.touchData.start?(e.touchData.start.unactivate().emit(_e),e.touchData.start=null):fe.emit(_e)}}if(le&&e.touchData.cxt){var _e=Ie("cxtdrag");e.data.bgActivePosistion=void 0,e.redrawHint("select",!0),e.touchData.start?e.touchData.start.emit(_e):fe.emit(_e),e.touchData.start&&(e.touchData.start._private.grabbed=!1),e.touchData.cxtDragged=!0;var Ze=e.findNearestElement(Y[0],Y[1],!0,!0);(!e.touchData.cxtOver||Ze!==e.touchData.cxtOver)&&(e.touchData.cxtOver&&e.touchData.cxtOver.emit(Ie("cxtdragout")),e.touchData.cxtOver=Ze,Ze&&Ze.emit(Ie("cxtdragover")))}else if(le&&j.touches[2]&&fe.boxSelectionEnabled())j.preventDefault(),e.data.bgActivePosistion=void 0,this.lastThreeTouch=+new Date,e.touchData.selecting||fe.emit(Ie("boxstart")),e.touchData.selecting=!0,e.touchData.didSelect=!0,U[4]=1,!U||U.length===0||U[0]===void 0?(U[0]=(Y[0]+Y[2]+Y[4])/3,U[1]=(Y[1]+Y[3]+Y[5])/3,U[2]=(Y[0]+Y[2]+Y[4])/3+1,U[3]=(Y[1]+Y[3]+Y[5])/3+1):(U[2]=(Y[0]+Y[2]+Y[4])/3,U[3]=(Y[1]+Y[3]+Y[5])/3),e.redrawHint("select",!0),e.redraw();else if(le&&j.touches[1]&&!e.touchData.didSelect&&fe.zoomingEnabled()&&fe.panningEnabled()&&fe.userZoomingEnabled()&&fe.userPanningEnabled()){j.preventDefault(),e.data.bgActivePosistion=void 0,e.redrawHint("select",!0);var He=e.dragData.touchDragEles;if(He){e.redrawHint("drag",!0);for(var yt=0;yt0&&!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=o(function(j){var le=e.touchData.start;e.touchData.capture=!1,le&&le.unactivate()},"touchcancelHandler"));var ye,ve,ae,Pe;if(e.registerBinding(t,"touchend",ye=o(function(j){var le=e.touchData.start,U=e.touchData.capture;if(U)j.touches.length===0&&(e.touchData.capture=!1),j.preventDefault();else return;var fe=e.selection;e.swipePanning=!1,e.hoverData.draggingEles=!1;var Y=e.cy,Le=Y.zoom(),xe=e.touchData.now,je=e.touchData.earlier;if(j.touches[0]){var Ie=e.projectIntoViewport(j.touches[0].clientX,j.touches[0].clientY);xe[0]=Ie[0],xe[1]=Ie[1]}if(j.touches[1]){var Ie=e.projectIntoViewport(j.touches[1].clientX,j.touches[1].clientY);xe[2]=Ie[0],xe[3]=Ie[1]}if(j.touches[2]){var Ie=e.projectIntoViewport(j.touches[2].clientX,j.touches[2].clientY);xe[4]=Ie[0],xe[5]=Ie[1]}var Ve=o(function(de){return{originalEvent:j,type:de,position:{x:xe[0],y:xe[1]}}},"makeEvent");le&&le.unactivate();var Ne;if(e.touchData.cxt){if(Ne=Ve("cxttapend"),le?le.emit(Ne):Y.emit(Ne),!e.touchData.cxtDragged){var Ge=Ve("cxttap");le?le.emit(Ge):Y.emit(Ge)}e.touchData.start&&(e.touchData.start._private.grabbed=!1),e.touchData.cxt=!1,e.touchData.start=null,e.redraw();return}if(!j.touches[2]&&Y.boxSelectionEnabled()&&e.touchData.selecting){e.touchData.selecting=!1;var ze=Y.collection(e.getAllInBox(fe[0],fe[1],fe[2],fe[3]));fe[0]=void 0,fe[1]=void 0,fe[2]=void 0,fe[3]=void 0,fe[4]=0,e.redrawHint("select",!0),Y.emit(Ve("boxend"));var Ue=o(function(de){return de.selectable()&&!de.selected()},"eleWouldBeSelected");ze.emit(Ve("box")).stdFilter(Ue).select().emit(Ve("boxselect")),ze.nonempty()&&e.redrawHint("eles",!0),e.redraw()}if(le?.unactivate(),j.touches[2])e.data.bgActivePosistion=void 0,e.redrawHint("select",!0);else if(!j.touches[1]&&!j.touches[0]&&!j.touches[0]){e.data.bgActivePosistion=void 0,e.redrawHint("select",!0);var Ce=e.dragData.touchDragEles;if(le!=null){var ct=le._private.grabbed;y(Ce),e.redrawHint("drag",!0),e.redrawHint("eles",!0),ct&&(le.emit(Ve("freeon")),Ce.emit(Ve("free")),e.dragData.didDrag&&(le.emit(Ve("dragfreeon")),Ce.emit(Ve("dragfree")))),n(le,["touchend","tapend","vmouseup","tapdragout"],j,{x:xe[0],y:xe[1]}),le.unactivate(),e.touchData.start=null}else{var Se=e.findNearestElement(xe[0],xe[1],!0,!0);n(Se,["touchend","tapend","vmouseup","tapdragout"],j,{x:xe[0],y:xe[1]})}var at=e.touchData.startPosition[0]-xe[0],dt=at*at,gt=e.touchData.startPosition[1]-xe[1],Ct=gt*gt,kt=dt+Ct,$t=kt*Le*Le;e.touchData.singleTouchMoved||(le||Y.$(":selected").unselect(["tapunselect"]),n(le,["tap","vclick"],j,{x:xe[0],y:xe[1]}),ve=!1,j.timeStamp-Pe<=Y.multiClickDebounceTime()?(ae&&clearTimeout(ae),ve=!0,Pe=null,n(le,["dbltap","vdblclick"],j,{x:xe[0],y:xe[1]})):(ae=setTimeout(function(){ve||n(le,["onetap","voneclick"],j,{x:xe[0],y:xe[1]})},Y.multiClickDebounceTime()),Pe=j.timeStamp)),le!=null&&!e.dragData.didDrag&&le._private.selectable&&$t"u"){var X=[],ce=o(function(j){return{clientX:j.clientX,clientY:j.clientY,force:1,identifier:j.pointerId,pageX:j.pageX,pageY:j.pageY,radiusX:j.width/2,radiusY:j.height/2,screenX:j.screenX,screenY:j.screenY,target:j.target}},"makeTouch"),ge=o(function(j){return{event:j,touch:ce(j)}},"makePointer"),be=o(function(j){X.push(ge(j))},"addPointer"),ke=o(function(j){for(var le=0;le0)return P[0]}return null},"getCurveT"),g=Object.keys(p),m=0;m0?f:mbe(n,a,e,t,r,i,s,l)},"intersectLine"),checkPoint:o(function(e,t,r,i,n,a,s,l){l=l==="auto"?dd(i,n):l;var h=2*l;if(Dh(e,t,this.points,a,s,i,n-h,[0,-1],r)||Dh(e,t,this.points,a,s,i-h,n,[0,-1],r))return!0;var u=i/2+2*r,d=n/2+2*r,p=[a-u,s-d,a-u,s,a+u,s,a+u,s-d];return!!(qs(e,t,p)||xf(e,t,h,h,a+i/2-l,s+n/2-l,r)||xf(e,t,h,h,a-i/2+l,s+n/2-l,r))},"checkPoint")}};Oh.registerNodeShapes=function(){var e=this.nodeShapes={},t=this;this.generateEllipse(),this.generatePolygon("triangle",fs(3,0)),this.generateRoundPolygon("round-triangle",fs(3,0)),this.generatePolygon("rectangle",fs(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",fs(5,0)),this.generateRoundPolygon("round-pentagon",fs(5,0)),this.generatePolygon("hexagon",fs(6,0)),this.generateRoundPolygon("round-hexagon",fs(6,0)),this.generatePolygon("heptagon",fs(7,0)),this.generateRoundPolygon("round-heptagon",fs(7,0)),this.generatePolygon("octagon",fs(8,0)),this.generateRoundPolygon("round-octagon",fs(8,0));var i=new Array(20);{var n=uM(5,0),a=uM(5,Math.PI/5),s=.5*(3-Math.sqrt(5));s*=1.57;for(var l=0;l=e.deqFastCost*v)break}else if(s){if(y>=e.deqCost*d||y>=e.deqAvgCost*u)break}else if(b>=e.deqNoDrawCost*nM)break;var T=e.deq(t,g,f);if(T.length>0)for(var x=0;x0&&(e.onDeqd(t,p),!s&&e.shouldRedraw(t,p,g,f)&&i())},"dequeue"),a=e.priority||HM;r.beforeRender(n,a(t))}},"setupDequeueingImpl")},"setupDequeueing")},XHe=(function(){function e(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:gw;Mh(this,e),this.idsByKey=new $h,this.keyForId=new $h,this.cachesByLvl=new $h,this.lvls=[],this.getKey=t,this.doesEleInvalidateKey=r}return o(e,"ElementTextureCacheLookup"),Nh(e,[{key:"getIdsFor",value:o(function(t){t==null&&Ui("Can not get id list for null key");var r=this.idsByKey,i=this.idsByKey.get(t);return i||(i=new wm,r.set(t,i)),i},"getIdsFor")},{key:"addIdForKey",value:o(function(t,r){t!=null&&this.getIdsFor(t).add(r)},"addIdForKey")},{key:"deleteIdForKey",value:o(function(t,r){t!=null&&this.getIdsFor(t).delete(r)},"deleteIdForKey")},{key:"getNumberOfIdsForKey",value:o(function(t){return t==null?0:this.getIdsFor(t).size},"getNumberOfIdsForKey")},{key:"updateKeyMappingFor",value:o(function(t){var r=t.id(),i=this.keyForId.get(r),n=this.getKey(t);this.deleteIdForKey(i,r),this.addIdForKey(n,r),this.keyForId.set(r,n)},"updateKeyMappingFor")},{key:"deleteKeyMappingFor",value:o(function(t){var r=t.id(),i=this.keyForId.get(r);this.deleteIdForKey(i,r),this.keyForId.delete(r)},"deleteKeyMappingFor")},{key:"keyHasChangedFor",value:o(function(t){var r=t.id(),i=this.keyForId.get(r),n=this.getKey(t);return i!==n},"keyHasChangedFor")},{key:"isInvalid",value:o(function(t){return this.keyHasChangedFor(t)||this.doesEleInvalidateKey(t)},"isInvalid")},{key:"getCachesAt",value:o(function(t){var r=this.cachesByLvl,i=this.lvls,n=r.get(t);return n||(n=new $h,r.set(t,n),i.push(t)),n},"getCachesAt")},{key:"getCache",value:o(function(t,r){return this.getCachesAt(r).get(t)},"getCache")},{key:"get",value:o(function(t,r){var i=this.getKey(t),n=this.getCache(i,r);return n!=null&&this.updateKeyMappingFor(t),n},"get")},{key:"getForCachedKey",value:o(function(t,r){var i=this.keyForId.get(t.id()),n=this.getCache(i,r);return n},"getForCachedKey")},{key:"hasCache",value:o(function(t,r){return this.getCachesAt(r).has(t)},"hasCache")},{key:"has",value:o(function(t,r){var i=this.getKey(t);return this.hasCache(i,r)},"has")},{key:"setCache",value:o(function(t,r,i){i.key=t,this.getCachesAt(r).set(t,i)},"setCache")},{key:"set",value:o(function(t,r,i){var n=this.getKey(t);this.setCache(n,r,i),this.updateKeyMappingFor(t)},"set")},{key:"deleteCache",value:o(function(t,r){this.getCachesAt(r).delete(t)},"deleteCache")},{key:"delete",value:o(function(t,r){var i=this.getKey(t);this.deleteCache(i,r)},"_delete")},{key:"invalidateKey",value:o(function(t){var r=this;this.lvls.forEach(function(i){return r.deleteCache(t,i)})},"invalidateKey")},{key:"invalidate",value:o(function(t){var r=t.id(),i=this.keyForId.get(r);this.deleteKeyMappingFor(t);var n=this.doesEleInvalidateKey(t);return n&&this.invalidateKey(i),n||this.getNumberOfIdsForKey(i)===0},"invalidate")}])})(),vve=25,KC=50,cw=-4,IM=3,Xxe=7.99,KHe=8,ZHe=1024,QHe=1024,JHe=1024,eXe=.2,tXe=.8,rXe=10,iXe=.15,nXe=.1,aXe=.9,sXe=.9,oXe=100,lXe=1,pm={dequeue:"dequeue",downscale:"downscale",highQuality:"highQuality"},cXe=pa({getKey:null,doesEleInvalidateKey:gw,drawElement:null,getBoundingBox:null,getRotationPoint:null,getRotationOffset:null,isVisible:abe,allowEdgeTxrCaching:!0,allowParentTxrCaching:!0}),Lv=o(function(e,t){var r=this;r.renderer=e,r.onDequeues=[];var i=cXe(t);cr(r,i),r.lookup=new XHe(i.getKey,i.doesEleInvalidateKey),r.setupDequeueing()},"ElementTextureCache"),jn=Lv.prototype;jn.reasons=pm;jn.getTextureQueue=function(e){var t=this;return t.eleImgCaches=t.eleImgCaches||{},t.eleImgCaches[e]=t.eleImgCaches[e]||[]};jn.getRetiredTextureQueue=function(e){var t=this,r=t.eleImgCaches.retired=t.eleImgCaches.retired||{},i=r[e]=r[e]||[];return i};jn.getElementQueue=function(){var e=this,t=e.eleCacheQueue=e.eleCacheQueue||new Kv(function(r,i){return i.reqs-r.reqs});return t};jn.getElementKeyToQueue=function(){var e=this,t=e.eleKeyToCacheQueue=e.eleKeyToCacheQueue||{};return t};jn.getElement=function(e,t,r,i,n){var a=this,s=this.renderer,l=s.cy.zoom(),h=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(i==null&&(i=Math.ceil(KM(l*r))),i=Xxe||i>IM)return null;var u=Math.pow(2,i),d=t.h*u,p=t.w*u,f=s.eleTextBiggerThanMin(e,u);if(!this.isVisible(e,f))return null;var g=h.get(e,i);if(g&&g.invalidated&&(g.invalidated=!1,g.texture.invalidatedWidth-=g.width),g)return g;var m;if(d<=vve?m=vve:d<=KC?m=KC:m=Math.ceil(d/KC)*KC,d>JHe||p>QHe)return null;var y=a.getTextureQueue(m),b=y[y.length-2],v=o(function(){return a.recycleTexture(m,p)||a.addTexture(m,p)},"addNewTxr");b||(b=y[y.length-1]),b||(b=v()),b.width-b.usedWidthi;D--)L=a.getElement(e,t,r,D,pm.downscale);N()}else return a.queueElement(e,E.level-1),E;else{var M;if(!x&&!k&&!C)for(var B=i-1;B>=cw;B--){var A=h.get(e,B);if(A){M=A;break}}if(T(M))return a.queueElement(e,i),M;b.context.translate(b.usedWidth,0),b.context.scale(u,u),this.drawElement(b.context,e,t,f,!1),b.context.scale(1/u,1/u),b.context.translate(-b.usedWidth,0)}return g={x:b.usedWidth,texture:b,level:i,scale:u,width:p,height:d,scaledLabelShown:f},b.usedWidth+=Math.ceil(p+KHe),b.eleCaches.push(g),h.set(e,i,g),a.checkTextureFullness(b),g};jn.invalidateElements=function(e){for(var t=0;t=eXe*e.width&&this.retireTexture(e)};jn.checkTextureFullness=function(e){var t=this,r=t.getTextureQueue(e.height);e.usedWidth/e.width>tXe&&e.fullnessChecks>=rXe?ud(r,e):e.fullnessChecks++};jn.retireTexture=function(e){var t=this,r=e.height,i=t.getTextureQueue(r),n=this.lookup;ud(i,e),e.retired=!0;for(var a=e.eleCaches,s=0;s=t)return s.retired=!1,s.usedWidth=0,s.invalidatedWidth=0,s.fullnessChecks=0,XM(s.eleCaches),s.context.setTransform(1,0,0,1,0,0),s.context.clearRect(0,0,s.width,s.height),ud(n,s),i.push(s),s}};jn.queueElement=function(e,t){var r=this,i=r.getElementQueue(),n=r.getElementKeyToQueue(),a=this.getKey(e),s=n[a];if(s)s.level=Math.max(s.level,t),s.eles.merge(e),s.reqs++,i.updateItem(s);else{var l={eles:e.spawn().merge(e),level:t,reqs:1,key:a};i.push(l),n[a]=l}};jn.dequeue=function(e){for(var t=this,r=t.getElementQueue(),i=t.getElementKeyToQueue(),n=[],a=t.lookup,s=0;s0;s++){var l=r.pop(),h=l.key,u=l.eles[0],d=a.hasCache(u,l.level);if(i[h]=null,!d){n.push(l);var p=t.getBoundingBox(u);t.getElement(u,p,e,l.level,pm.dequeue)}}return n};jn.removeFromQueue=function(e){var t=this,r=t.getElementQueue(),i=t.getElementKeyToQueue(),n=this.getKey(e),a=i[n];a!=null&&(a.eles.length===1?(a.reqs=YM,r.updateItem(a),r.pop(),i[n]=null):a.eles.unmerge(e))};jn.onDequeue=function(e){this.onDequeues.push(e)};jn.offDequeue=function(e){ud(this.onDequeues,e)};jn.setupDequeueing=Hxe.setupDequeueing({deqRedrawThreshold:oXe,deqCost:iXe,deqAvgCost:nXe,deqNoDrawCost:aXe,deqFastCost:sXe,deq:o(function(e,t,r){return e.dequeue(t,r)},"deq"),onDeqd:o(function(e,t){for(var r=0;r=uXe||r>Cw)return null}i.validateLayersElesOrdering(r,e);var h=i.layersByLevel,u=Math.pow(2,r),d=h[r]=h[r]||[],p,f=i.levelIsComplete(r,e),g,m=o(function(){var L=o(function(B){if(i.validateLayersElesOrdering(B,e),i.levelIsComplete(B,e))return g=h[B],!0},"canUseAsTmpLvl"),N=o(function(B){if(!g)for(var A=r+B;Iv<=A&&A<=Cw&&!L(A);A+=B);},"checkLvls");N(1),N(-1);for(var D=d.length-1;D>=0;D--){var M=d[D];M.invalid&&ud(d,M)}},"checkTempLevels");if(!f)m();else return d;var y=o(function(){if(!p){p=ms();for(var L=0;Lxve||M>xve)return null;var B=D*M;if(B>bXe)return null;var A=i.makeLayer(p,r);if(N!=null){var I=d.indexOf(N)+1;d.splice(I,0,A)}else(L.insert===void 0||L.insert)&&d.unshift(A);return A},"makeLayer");if(i.skipping&&!l)return null;for(var v=null,T=e.length/hXe,x=!l,k=0;k=T||!pbe(v.bb,C.boundingBox()))&&(v=b({insert:!0,after:v}),!v))return null;g||x?i.queueLayer(v,C):i.drawEleInLayer(v,C,r,t),v.eles.push(C),w[r]=v}return g||(x?null:d)};fa.getEleLevelForLayerLevel=function(e,t){return e};fa.drawEleInLayer=function(e,t,r,i){var n=this,a=this.renderer,s=e.context,l=t.boundingBox();l.w===0||l.h===0||!t.visible()||(r=n.getEleLevelForLayerLevel(r,i),a.setImgSmoothing(s,!1),a.drawCachedElement(s,t,null,null,r,xXe),a.setImgSmoothing(s,!0))};fa.levelIsComplete=function(e,t){var r=this,i=r.layersByLevel[e];if(!i||i.length===0)return!1;for(var n=0,a=0;a0||s.invalid)return!1;n+=s.eles.length}return n===t.length};fa.validateLayersElesOrdering=function(e,t){var r=this.layersByLevel[e];if(r)for(var i=0;i0){t=!0;break}}return t};fa.invalidateElements=function(e){var t=this;e.length!==0&&(t.lastInvalidationTime=Ih(),!(e.length===0||!t.haveLayers())&&t.updateElementsInLayers(e,o(function(r,i,n){t.invalidateLayer(r)},"invalAssocLayers")))};fa.invalidateLayer=function(e){if(this.lastInvalidationTime=Ih(),!e.invalid){var t=e.level,r=e.eles,i=this.layersByLevel[t];ud(i,e),e.elesQueue=[],e.invalid=!0,e.replacement&&(e.replacement.invalid=!0);for(var n=0;n3&&arguments[3]!==void 0?arguments[3]:!0,n=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!0,s=this,l=t._private.rscratch;if(!(a&&!t.visible())&&!(l.badLine||l.allpts==null||isNaN(l.allpts[0]))){var h;r&&(h=r,e.translate(-h.x1,-h.y1));var u=a?t.pstyle("opacity").value:1,d=a?t.pstyle("line-opacity").value:1,p=t.pstyle("curve-style").value,f=t.pstyle("line-style").value,g=t.pstyle("width").pfValue,m=t.pstyle("line-cap").value,y=t.pstyle("line-outline-width").value,b=t.pstyle("line-outline-color").value,v=u*d,T=u*d,x=o(function(){var A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:v;p==="straight-triangle"?(s.eleStrokeStyle(e,t,A),s.drawEdgeTrianglePath(t,e,l.allpts)):(e.lineWidth=g,e.lineCap=m,s.eleStrokeStyle(e,t,A),s.drawEdgePath(t,e,l.allpts,f),e.lineCap="butt")},"drawLine"),k=o(function(){var A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:v;if(e.lineWidth=g+y,e.lineCap=m,y>0)s.colorStrokeStyle(e,b[0],b[1],b[2],A);else{e.lineCap="butt";return}p==="straight-triangle"?s.drawEdgeTrianglePath(t,e,l.allpts):(s.drawEdgePath(t,e,l.allpts,f),e.lineCap="butt")},"drawLineOutline"),C=o(function(){n&&s.drawEdgeOverlay(e,t)},"drawOverlay"),E=o(function(){n&&s.drawEdgeUnderlay(e,t)},"drawUnderlay"),w=o(function(){var A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:T;s.drawArrowheads(e,t,A)},"drawArrows"),_=o(function(){s.drawElementText(e,t,null,i)},"drawText");e.lineJoin="round";var L=t.pstyle("ghost").value==="yes";if(L){var N=t.pstyle("ghost-offset-x").pfValue,D=t.pstyle("ghost-offset-y").pfValue,M=t.pstyle("ghost-opacity").value,B=v*M;e.translate(N,D),x(B),w(B),e.translate(-N,-D)}else k();E(),x(),w(),C(),_(),r&&e.translate(h.x1,h.y1)}};rTe=o(function(e){if(!["overlay","underlay"].includes(e))throw new Error("Invalid state");return function(t,r){if(r.visible()){var i=r.pstyle("".concat(e,"-opacity")).value;if(i!==0){var n=this,a=n.usePaths(),s=r._private.rscratch,l=r.pstyle("".concat(e,"-padding")).pfValue,h=2*l,u=r.pstyle("".concat(e,"-color")).value;t.lineWidth=h,s.edgeType==="self"&&!a?t.lineCap="butt":t.lineCap="round",n.colorStrokeStyle(t,u[0],u[1],u[2],i),n.drawEdgePath(r,t,s.allpts,"solid")}}}},"drawEdgeOverlayUnderlay");Bh.drawEdgeOverlay=rTe("overlay");Bh.drawEdgeUnderlay=rTe("underlay");Bh.drawEdgePath=function(e,t,r,i){var n=e._private.rscratch,a=t,s,l=!1,h=this.usePaths(),u=e.pstyle("line-dash-pattern").pfValue,d=e.pstyle("line-dash-offset").pfValue;if(h){var p=r.join("$"),f=n.pathCacheKey&&n.pathCacheKey===p;f?(s=t=n.pathCache,l=!0):(s=t=new Path2D,n.pathCacheKey=p,n.pathCache=s)}if(a.setLineDash)switch(i){case"dotted":a.setLineDash([1,1]);break;case"dashed":a.setLineDash(u),a.lineDashOffset=d;break;case"solid":a.setLineDash([]);break}if(!l&&!n.badLine)switch(t.beginPath&&t.beginPath(),t.moveTo(r[0],r[1]),n.edgeType){case"bezier":case"self":case"compound":case"multibezier":for(var g=2;g+35&&arguments[5]!==void 0?arguments[5]:!0,s=this;if(i==null){if(a&&!s.eleTextBiggerThanMin(t))return}else if(i===!1)return;if(t.isNode()){var l=t.pstyle("label");if(!l||!l.value)return;var h=s.getLabelJustification(t);e.textAlign=h,e.textBaseline="bottom"}else{var u=t.element()._private.rscratch.badLine,d=t.pstyle("label"),p=t.pstyle("source-label"),f=t.pstyle("target-label");if(u||(!d||!d.value)&&(!p||!p.value)&&(!f||!f.value))return;e.textAlign="center",e.textBaseline="bottom"}var g=!r,m;r&&(m=r,e.translate(-m.x1,-m.y1)),n==null?(s.drawText(e,t,null,g,a),t.isEdge()&&(s.drawText(e,t,"source",g,a),s.drawText(e,t,"target",g,a))):s.drawText(e,t,n,g,a),r&&e.translate(m.x1,m.y1)};Af.getFontCache=function(e){var t;this.fontCaches=this.fontCaches||[];for(var r=0;r2&&arguments[2]!==void 0?arguments[2]:!0,i=t.pstyle("font-style").strValue,n=t.pstyle("font-size").pfValue+"px",a=t.pstyle("font-family").strValue,s=t.pstyle("font-weight").strValue,l=r?t.effectiveOpacity()*t.pstyle("text-opacity").value:1,h=t.pstyle("text-outline-opacity").value*l,u=t.pstyle("color").value,d=t.pstyle("text-outline-color").value;e.font=i+" "+s+" "+n+" "+a,e.lineJoin="round",this.colorFillStyle(e,u[0],u[1],u[2],l),this.colorStrokeStyle(e,d[0],d[1],d[2],h)};o(iTe,"circle");o(MM,"roundRect");Af.getTextAngle=function(e,t){var r,i=e._private,n=i.rscratch,a=t?t+"-":"",s=e.pstyle(a+"text-rotation");if(s.strValue==="autorotate"){var l=zs(n,"labelAngle",t);r=e.isEdge()?l:0}else s.strValue==="none"?r=0:r=s.pfValue;return r};Af.drawText=function(e,t,r){var i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,n=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,a=t._private,s=a.rscratch,l=n?t.effectiveOpacity():1;if(!(n&&(l===0||t.pstyle("text-opacity").value===0))){r==="main"&&(r=null);var h=zs(s,"labelX",r),u=zs(s,"labelY",r),d,p,f=this.getLabelText(t,r);if(f!=null&&f!==""&&!isNaN(h)&&!isNaN(u)){this.setupTextStyle(e,t,n);var g=r?r+"-":"",m=zs(s,"labelWidth",r),y=zs(s,"labelHeight",r),b=t.pstyle(g+"text-margin-x").pfValue,v=t.pstyle(g+"text-margin-y").pfValue,T=t.isEdge(),x=t.pstyle("text-halign").value,k=t.pstyle("text-valign").value;T&&(x="center",k="center"),h+=b,u+=v;var C;switch(i?C=this.getTextAngle(t,r):C=0,C!==0&&(d=h,p=u,e.translate(d,p),e.rotate(C),h=0,u=0),k){case"top":break;case"center":u+=y/2;break;case"bottom":u+=y;break}var E=t.pstyle("text-background-opacity").value,w=t.pstyle("text-border-opacity").value,_=t.pstyle("text-border-width").pfValue,L=t.pstyle("text-background-padding").pfValue,N=t.pstyle("text-background-shape").strValue,D=N==="round-rectangle"||N==="roundrectangle",M=N==="circle",B=2;if(E>0||_>0&&w>0){var A=e.fillStyle,I=e.strokeStyle,O=e.lineWidth,R=t.pstyle("text-background-color").value,$=t.pstyle("text-border-color").value,F=t.pstyle("text-border-style").value,P=E>0,z=_>0&&w>0,q=h-L;switch(x){case"left":q-=m;break;case"center":q-=m/2;break}var G=u-y-L,W=m+2*L,J=y+2*L;if(P&&(e.fillStyle="rgba(".concat(R[0],",").concat(R[1],",").concat(R[2],",").concat(E*l,")")),z&&(e.strokeStyle="rgba(".concat($[0],",").concat($[1],",").concat($[2],",").concat(w*l,")"),e.lineWidth=_,e.setLineDash))switch(F){case"dotted":e.setLineDash([1,1]);break;case"dashed":e.setLineDash([4,2]);break;case"double":e.lineWidth=_/4,e.setLineDash([]);break;default:e.setLineDash([]);break}if(D?(e.beginPath(),MM(e,q,G,W,J,B)):M?(e.beginPath(),iTe(e,q,G,W,J)):(e.beginPath(),e.rect(q,G,W,J)),P&&e.fill(),z&&e.stroke(),z&&F==="double"){var H=_/2;e.beginPath(),D?MM(e,q+H,G+H,W-2*H,J-2*H,B):e.rect(q+H,G+H,W-2*H,J-2*H),e.stroke()}e.fillStyle=A,e.strokeStyle=I,e.lineWidth=O,e.setLineDash&&e.setLineDash([])}var Z=2*t.pstyle("text-outline-width").pfValue;if(Z>0&&(e.lineWidth=Z),t.pstyle("text-wrap").value==="wrap"){var se=zs(s,"labelWrapCachedLines",r),Q=zs(s,"labelLineHeight",r),te=m/2,re=this.getLabelJustification(t);switch(re==="auto"||(x==="left"?re==="left"?h+=-m:re==="center"&&(h+=-te):x==="center"?re==="left"?h+=-te:re==="right"&&(h+=te):x==="right"&&(re==="center"?h+=te:re==="right"&&(h+=m))),k){case"top":u-=(se.length-1)*Q;break;case"center":case"bottom":u-=(se.length-1)*Q;break}for(var ne=0;ne0&&e.strokeText(se[ne],h,u),e.fillText(se[ne],h,u),u+=Q}else Z>0&&e.strokeText(f,h,u),e.fillText(f,h,u);C!==0&&(e.rotate(-C),e.translate(-d,-p))}}};yd={};yd.drawNode=function(e,t,r){var i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,n=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!0,s=this,l,h,u=t._private,d=u.rscratch,p=t.position();if(!(!It(p.x)||!It(p.y))&&!(a&&!t.visible())){var f=a?t.effectiveOpacity():1,g=s.usePaths(),m,y=!1,b=t.padding();l=t.width()+2*b,h=t.height()+2*b;var v;r&&(v=r,e.translate(-v.x1,-v.y1));for(var T=t.pstyle("background-image"),x=T.value,k=new Array(x.length),C=new Array(x.length),E=0,w=0;w0&&arguments[0]!==void 0?arguments[0]:B;s.eleFillStyle(e,t,j)},"setupShapeColor"),Q=o(function(){var j=arguments.length>0&&arguments[0]!==void 0?arguments[0]:z;s.colorStrokeStyle(e,A[0],A[1],A[2],j)},"setupBorderColor"),te=o(function(){var j=arguments.length>0&&arguments[0]!==void 0?arguments[0]:J;s.colorStrokeStyle(e,G[0],G[1],G[2],j)},"setupOutlineColor"),re=o(function(j,le,U,fe){var Y=s.nodePathCache=s.nodePathCache||[],Le=rbe(U==="polygon"?U+","+fe.join(","):U,""+le,""+j,""+Z),xe=Y[Le],je,Ie=!1;return xe!=null?(je=xe,Ie=!0,d.pathCache=je):(je=new Path2D,Y[Le]=d.pathCache=je),{path:je,cacheHit:Ie}},"getPath"),ne=t.pstyle("shape").strValue,Ae=t.pstyle("shape-polygon-points").pfValue;if(g){e.translate(p.x,p.y);var ie=re(l,h,ne,Ae);m=ie.path,y=ie.cacheHit}var me=o(function(){if(!y){var j=p;g&&(j={x:0,y:0}),s.nodeShapes[s.getNodeShape(t)].draw(m||e,j.x,j.y,l,h,Z,d)}g?e.fill(m):e.fill()},"drawShape"),oe=o(function(){for(var j=arguments.length>0&&arguments[0]!==void 0?arguments[0]:f,le=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,U=u.backgrounding,fe=0,Y=0;Y0&&arguments[0]!==void 0?arguments[0]:!1,le=arguments.length>1&&arguments[1]!==void 0?arguments[1]:f;s.hasPie(t)&&(s.drawPie(e,t,le),j&&(g||s.nodeShapes[s.getNodeShape(t)].draw(e,p.x,p.y,l,h,Z,d)))},"drawPie"),ye=o(function(){var j=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,le=arguments.length>1&&arguments[1]!==void 0?arguments[1]:f;s.hasStripe(t)&&(e.save(),g?e.clip(d.pathCache):(s.nodeShapes[s.getNodeShape(t)].draw(e,p.x,p.y,l,h,Z,d),e.clip()),s.drawStripe(e,t,le),e.restore(),j&&(g||s.nodeShapes[s.getNodeShape(t)].draw(e,p.x,p.y,l,h,Z,d)))},"drawStripe"),ve=o(function(){var j=arguments.length>0&&arguments[0]!==void 0?arguments[0]:f,le=(D>0?D:-D)*j,U=D>0?0:255;D!==0&&(s.colorFillStyle(e,U,U,U,le),g?e.fill(m):e.fill())},"darken"),ae=o(function(){if(M>0){if(e.lineWidth=M,e.lineCap=R,e.lineJoin=O,e.setLineDash)switch(I){case"dotted":e.setLineDash([1,1]);break;case"dashed":e.setLineDash(F),e.lineDashOffset=P;break;case"solid":case"double":e.setLineDash([]);break}if($!=="center"){if(e.save(),e.lineWidth*=2,$==="inside")g?e.clip(m):e.clip();else{var j=new Path2D;j.rect(-l/2-M,-h/2-M,l+2*M,h+2*M),j.addPath(m),e.clip(j,"evenodd")}g?e.stroke(m):e.stroke(),e.restore()}else g?e.stroke(m):e.stroke();if(I==="double"){e.lineWidth=M/3;var le=e.globalCompositeOperation;e.globalCompositeOperation="destination-out",g?e.stroke(m):e.stroke(),e.globalCompositeOperation=le}e.setLineDash&&e.setLineDash([])}},"drawBorder"),Pe=o(function(){if(q>0){if(e.lineWidth=q,e.lineCap="butt",e.setLineDash)switch(W){case"dotted":e.setLineDash([1,1]);break;case"dashed":e.setLineDash([4,2]);break;case"solid":case"double":e.setLineDash([]);break}var j=p;g&&(j={x:0,y:0});var le=s.getNodeShape(t),U=M;$==="inside"&&(U=0),$==="outside"&&(U*=2);var fe=(l+U+(q+H))/l,Y=(h+U+(q+H))/h,Le=l*fe,xe=h*Y,je=s.nodeShapes[le].points,Ie;if(g){var Ve=re(Le,xe,le,je);Ie=Ve.path}if(le==="ellipse")s.drawEllipsePath(Ie||e,j.x,j.y,Le,xe);else if(["round-diamond","round-heptagon","round-hexagon","round-octagon","round-pentagon","round-polygon","round-triangle","round-tag"].includes(le)){var Ne=0,Ge=0,ze=0;le==="round-diamond"?Ne=(U+H+q)*1.4:le==="round-heptagon"?(Ne=(U+H+q)*1.075,ze=-(U/2+H+q)/35):le==="round-hexagon"?Ne=(U+H+q)*1.12:le==="round-pentagon"?(Ne=(U+H+q)*1.13,ze=-(U/2+H+q)/15):le==="round-tag"?(Ne=(U+H+q)*1.12,Ge=(U/2+q+H)*.07):le==="round-triangle"&&(Ne=(U+H+q)*(Math.PI/2),ze=-(U+H/2+q)/Math.PI),Ne!==0&&(fe=(l+Ne)/l,Le=l*fe,["round-hexagon","round-tag"].includes(le)||(Y=(h+Ne)/h,xe=h*Y)),Z=Z==="auto"?vbe(Le,xe):Z;for(var Ue=Le/2,Ce=xe/2,ct=Z+(U+q+H)/2,Se=new Array(je.length/2),at=new Array(je.length/2),dt=0;dt0){if(i=i||r.position(),n==null||a==null){var f=r.padding();n=r.width()+2*f,a=r.height()+2*f}s.colorFillStyle(t,u[0],u[1],u[2],h),s.nodeShapes[d].draw(t,i.x,i.y,n+l*2,a+l*2,p),t.fill()}}}},"drawNodeOverlayUnderlay");yd.drawNodeOverlay=nTe("overlay");yd.drawNodeUnderlay=nTe("underlay");yd.hasPie=function(e){return e=e[0],e._private.hasPie};yd.hasStripe=function(e){return e=e[0],e._private.hasStripe};yd.drawPie=function(e,t,r,i){t=t[0],i=i||t.position();var n=t.cy().style(),a=t.pstyle("pie-size"),s=t.pstyle("pie-hole"),l=t.pstyle("pie-start-angle").pfValue,h=i.x,u=i.y,d=t.width(),p=t.height(),f=Math.min(d,p)/2,g,m=0,y=this.usePaths();if(y&&(h=0,u=0),a.units==="%"?f=f*a.pfValue:a.pfValue!==void 0&&(f=a.pfValue/2),s.units==="%"?g=f*s.pfValue:s.pfValue!==void 0&&(g=s.pfValue/2),!(g>=f))for(var b=1;b<=n.pieBackgroundN;b++){var v=t.pstyle("pie-"+b+"-background-size").value,T=t.pstyle("pie-"+b+"-background-color").value,x=t.pstyle("pie-"+b+"-background-opacity").value*r,k=v/100;k+m>1&&(k=1-m);var C=1.5*Math.PI+2*Math.PI*m;C+=l;var E=2*Math.PI*k,w=C+E;v===0||m>=1||m+k>1||(g===0?(e.beginPath(),e.moveTo(h,u),e.arc(h,u,f,C,w),e.closePath()):(e.beginPath(),e.arc(h,u,f,C,w),e.arc(h,u,g,w,C,!0),e.closePath()),this.colorFillStyle(e,T[0],T[1],T[2],x),e.fill(),m+=k)}};yd.drawStripe=function(e,t,r,i){t=t[0],i=i||t.position();var n=t.cy().style(),a=i.x,s=i.y,l=t.width(),h=t.height(),u=0,d=this.usePaths();e.save();var p=t.pstyle("stripe-direction").value,f=t.pstyle("stripe-size");switch(p){case"vertical":break;case"righward":e.rotate(-Math.PI/2);break}var g=l,m=h;f.units==="%"?(g=g*f.pfValue,m=m*f.pfValue):f.pfValue!==void 0&&(g=f.pfValue,m=f.pfValue),d&&(a=0,s=0),s-=g/2,a-=m/2;for(var y=1;y<=n.stripeBackgroundN;y++){var b=t.pstyle("stripe-"+y+"-background-size").value,v=t.pstyle("stripe-"+y+"-background-color").value,T=t.pstyle("stripe-"+y+"-background-opacity").value*r,x=b/100;x+u>1&&(x=1-u),!(b===0||u>=1||u+x>1)&&(e.beginPath(),e.rect(a,s+m*u,g,m*x),e.closePath(),this.colorFillStyle(e,v[0],v[1],v[2],T),e.fill(),u+=x)}e.restore()};ys={},_Xe=100;ys.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};ys.paintCache=function(e){for(var t=this.paintCaches=this.paintCaches||[],r=!0,i,n=0;nt.minMbLowQualFrames&&(t.motionBlurPxRatio=t.mbPxRBlurry)),t.clearingMotionBlur&&(t.motionBlurPxRatio=1),t.textureDrawLastFrame&&!p&&(d[t.NODE]=!0,d[t.SELECT_BOX]=!0);var T=r.style(),x=r.zoom(),k=s!==void 0?s:x,C=r.pan(),E={x:C.x,y:C.y},w={zoom:x,pan:{x:C.x,y:C.y}},_=t.prevViewport,L=_===void 0||w.zoom!==_.zoom||w.pan.x!==_.pan.x||w.pan.y!==_.pan.y;!L&&!(y&&!m)&&(t.motionBlurPxRatio=1),l&&(E=l),k*=h,E.x*=h,E.y*=h;var N=t.getCachedZSortedEles();function D(Q,te,re,ne,Ae){var ie=Q.globalCompositeOperation;Q.globalCompositeOperation="destination-out",t.colorFillStyle(Q,255,255,255,t.motionBlurTransparency),Q.fillRect(te,re,ne,Ae),Q.globalCompositeOperation=ie}o(D,"mbclear");function M(Q,te){var re,ne,Ae,ie;!t.clearingMotionBlur&&(Q===u.bufferContexts[t.MOTIONBLUR_BUFFER_NODE]||Q===u.bufferContexts[t.MOTIONBLUR_BUFFER_DRAG])?(re={x:C.x*g,y:C.y*g},ne=x*g,Ae=t.canvasWidth*g,ie=t.canvasHeight*g):(re=E,ne=k,Ae=t.canvasWidth,ie=t.canvasHeight),Q.setTransform(1,0,0,1,0,0),te==="motionBlur"?D(Q,0,0,Ae,ie):!i&&(te===void 0||te)&&Q.clearRect(0,0,Ae,ie),n||(Q.translate(re.x,re.y),Q.scale(ne,ne)),l&&Q.translate(l.x,l.y),s&&Q.scale(s,s)}if(o(M,"setContextTransform"),p||(t.textureDrawLastFrame=!1),p){if(t.textureDrawLastFrame=!0,!t.textureCache){t.textureCache={},t.textureCache.bb=r.mutableElements().boundingBox(),t.textureCache.texture=t.data.bufferCanvases[t.TEXTURE_BUFFER];var B=t.data.bufferContexts[t.TEXTURE_BUFFER];B.setTransform(1,0,0,1,0,0),B.clearRect(0,0,t.canvasWidth*t.textureMult,t.canvasHeight*t.textureMult),t.render({forcedContext:B,drawOnlyNodeLayer:!0,forcedPxRatio:h*t.textureMult});var w=t.textureCache.viewport={zoom:r.zoom(),pan:r.pan(),width:t.canvasWidth,height:t.canvasHeight};w.mpan={x:(0-w.pan.x)/w.zoom,y:(0-w.pan.y)/w.zoom}}d[t.DRAG]=!1,d[t.NODE]=!1;var A=u.contexts[t.NODE],I=t.textureCache.texture,w=t.textureCache.viewport;A.setTransform(1,0,0,1,0,0),f?D(A,0,0,w.width,w.height):A.clearRect(0,0,w.width,w.height);var O=T.core("outside-texture-bg-color").value,R=T.core("outside-texture-bg-opacity").value;t.colorFillStyle(A,O[0],O[1],O[2],R),A.fillRect(0,0,w.width,w.height);var x=r.zoom();M(A,!1),A.clearRect(w.mpan.x,w.mpan.y,w.width/w.zoom/h,w.height/w.zoom/h),A.drawImage(I,w.mpan.x,w.mpan.y,w.width/w.zoom/h,w.height/w.zoom/h)}else t.textureOnViewport&&!i&&(t.textureCache=null);var $=r.extent(),F=t.pinching||t.hoverData.dragging||t.swipePanning||t.data.wheelZooming||t.hoverData.draggingEles||t.cy.animated(),P=t.hideEdgesOnViewport&&F,z=[];if(z[t.NODE]=!d[t.NODE]&&f&&!t.clearedForMotionBlur[t.NODE]||t.clearingMotionBlur,z[t.NODE]&&(t.clearedForMotionBlur[t.NODE]=!0),z[t.DRAG]=!d[t.DRAG]&&f&&!t.clearedForMotionBlur[t.DRAG]||t.clearingMotionBlur,z[t.DRAG]&&(t.clearedForMotionBlur[t.DRAG]=!0),d[t.NODE]||n||a||z[t.NODE]){var q=f&&!z[t.NODE]&&g!==1,A=i||(q?t.data.bufferContexts[t.MOTIONBLUR_BUFFER_NODE]:u.contexts[t.NODE]),G=f&&!q?"motionBlur":void 0;M(A,G),P?t.drawCachedNodes(A,N.nondrag,h,$):t.drawLayeredElements(A,N.nondrag,h,$),t.debug&&t.drawDebugPoints(A,N.nondrag),!n&&!f&&(d[t.NODE]=!1)}if(!a&&(d[t.DRAG]||n||z[t.DRAG])){var q=f&&!z[t.DRAG]&&g!==1,A=i||(q?t.data.bufferContexts[t.MOTIONBLUR_BUFFER_DRAG]:u.contexts[t.DRAG]);M(A,f&&!q?"motionBlur":void 0),P?t.drawCachedNodes(A,N.drag,h,$):t.drawCachedElements(A,N.drag,h,$),t.debug&&t.drawDebugPoints(A,N.drag),!n&&!f&&(d[t.DRAG]=!1)}if(this.drawSelectionRectangle(e,M),f&&g!==1){var W=u.contexts[t.NODE],J=t.data.bufferCanvases[t.MOTIONBLUR_BUFFER_NODE],H=u.contexts[t.DRAG],Z=t.data.bufferCanvases[t.MOTIONBLUR_BUFFER_DRAG],se=o(function(Q,te,re){Q.setTransform(1,0,0,1,0,0),re||!v?Q.clearRect(0,0,t.canvasWidth,t.canvasHeight):D(Q,0,0,t.canvasWidth,t.canvasHeight);var ne=g;Q.drawImage(te,0,0,t.canvasWidth*ne,t.canvasHeight*ne,0,0,t.canvasWidth,t.canvasHeight)},"drawMotionBlur");(d[t.NODE]||z[t.NODE])&&(se(W,J,z[t.NODE]),d[t.NODE]=!1),(d[t.DRAG]||z[t.DRAG])&&(se(H,Z,z[t.DRAG]),d[t.DRAG]=!1)}t.prevViewport=w,t.clearingMotionBlur&&(t.clearingMotionBlur=!1,t.motionBlurCleared=!0,t.motionBlur=!0),f&&(t.motionBlurTimeout=setTimeout(function(){t.motionBlurTimeout=null,t.clearedForMotionBlur[t.NODE]=!1,t.clearedForMotionBlur[t.DRAG]=!1,t.motionBlur=!1,t.clearingMotionBlur=!p,t.mbFrames=0,d[t.NODE]=!0,d[t.DRAG]=!0,t.redraw()},_Xe)),i||r.emit("render")};ys.drawSelectionRectangle=function(e,t){var r=this,i=r.cy,n=r.data,a=i.style(),s=e.drawOnlyNodeLayer,l=e.drawAllLayers,h=n.canvasNeedsRedraw,u=e.forcedContext;if(r.showFps||!s&&h[r.SELECT_BOX]&&!l){var d=u||n.contexts[r.SELECT_BOX];if(t(d),r.selection[4]==1&&(r.hoverData.selecting||r.touchData.selecting)){var p=r.cy.zoom(),f=a.core("selection-box-border-width").value/p;d.lineWidth=f,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]),f>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(n.bgActivePosistion&&!r.hoverData.selecting){var p=r.cy.zoom(),g=n.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(g.x,g.y,a.core("active-bg-size").pfValue/p,0,2*Math.PI),d.fill()}var m=r.lastRedrawTime;if(r.showFps&&m){m=Math.round(m);var y=Math.round(1e3/m),b="1 frame = "+m+" 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",!wv){var v=d.measureText(b);wv=v.actualBoundingBoxAscent}d.fillText(b,0,wv);var T=60;d.strokeRect(0,wv+10,250,20),d.fillRect(0,wv+10,250*Math.min(y/T,1),20)}l||(h[r.SELECT_BOX]=!1)}};o(NM,"compileShader");o(aTe,"createProgram");o(sTe,"createTextureCanvas");o(Gw,"getEffectivePanZoom");o(oTe,"getEffectiveZoom");o(lTe,"modelToRenderedPosition");o(cTe,"isSimpleShape");o(hTe,"arrayEqual");o(id,"toWebGLColor");o(yf,"indexToVec4");o(uTe,"vec4ToIndex");o(dTe,"createTexture");o(wN,"getTypeInfo");o(EN,"createTypedArray");o(pTe,"createTypedArrayView");o(fTe,"createBufferStaticDraw");o(Al,"createBufferDynamicDraw");o(gTe,"create3x3MatrixBufferDynamicDraw");o(mTe,"createPickingFrameBuffer");Cve=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)});o(hw,"create");o(OM,"identity");o(yTe,"multiply");o(Dv,"translate");o(BM,"rotate");o(ww,"scale");o(vTe,"projection");AXe=(function(){function e(t,r,i,n){Mh(this,e),this.debugID=Math.floor(Math.random()*1e4),this.r=t,this.texSize=r,this.texRows=i,this.texHeight=Math.floor(r/i),this.enableWrapping=!0,this.locked=!1,this.texture=null,this.needsBuffer=!0,this.freePointer={x:0,row:0},this.keyToLocation=new Map,this.canvas=n(t,r,r),this.scratch=n(t,r,this.texHeight,"scratch")}return o(e,"Atlas"),Nh(e,[{key:"lock",value:o(function(){this.locked=!0},"lock")},{key:"getKeys",value:o(function(){return new Set(this.keyToLocation.keys())},"getKeys")},{key:"getScale",value:o(function(t){var r=t.w,i=t.h,n=this.texHeight,a=this.texSize,s=n/i,l=r*s,h=i*s;return l>a&&(s=a/r,l=r*s,h=i*s),{scale:s,texW:l,texH:h}},"getScale")},{key:"draw",value:o(function(t,r,i){var n=this;if(this.locked)throw new Error("can't draw, atlas is locked");var a=this.texSize,s=this.texRows,l=this.texHeight,h=this.getScale(r),u=h.scale,d=h.texW,p=h.texH,f=o(function(v,T){if(i&&T){var x=T.context,k=v.x,C=v.row,E=k,w=l*C;x.save(),x.translate(E,w),x.scale(u,u),i(x,r),x.restore()}},"drawAt"),g=[null,null],m=o(function(){f(n.freePointer,n.canvas),g[0]={x:n.freePointer.x,y:n.freePointer.row*l,w:d,h:p},g[1]={x:n.freePointer.x+d,y:n.freePointer.row*l,w:0,h:p},n.freePointer.x+=d,n.freePointer.x==a&&(n.freePointer.x=0,n.freePointer.row++)},"drawNormal"),y=o(function(){var v=n.scratch,T=n.canvas;v.clear(),f({x:0,row:0},v);var x=a-n.freePointer.x,k=d-x,C=l;{var E=n.freePointer.x,w=n.freePointer.row*l,_=x;T.context.drawImage(v,0,0,_,C,E,w,_,C),g[0]={x:E,y:w,w:_,h:p}}{var L=x,N=(n.freePointer.row+1)*l,D=k;T&&T.context.drawImage(v,L,0,D,C,0,N,D,C),g[1]={x:0,y:N,w:D,h:p}}n.freePointer.x=k,n.freePointer.row++},"drawWrapped"),b=o(function(){n.freePointer.x=0,n.freePointer.row++},"moveToStartOfNextRow");if(this.freePointer.x+d<=a)m();else{if(this.freePointer.row>=s-1)return!1;this.freePointer.x===a?(b(),m()):this.enableWrapping?y():(b(),m())}return this.keyToLocation.set(t,g),this.needsBuffer=!0,g},"draw")},{key:"getOffsets",value:o(function(t){return this.keyToLocation.get(t)},"getOffsets")},{key:"isEmpty",value:o(function(){return this.freePointer.x===0&&this.freePointer.row===0},"isEmpty")},{key:"canFit",value:o(function(t){if(this.locked)return!1;var r=this.texSize,i=this.texRows,n=this.getScale(t),a=n.texW;return this.freePointer.x+a>r?this.freePointer.row1&&arguments[1]!==void 0?arguments[1]:{},n=i.forceRedraw,a=n===void 0?!1:n,s=i.filterEle,l=s===void 0?function(){return!0}:s,h=i.filterType,u=h===void 0?function(){return!0}:h,d=!1,p=!1,f=gs(t),g;try{for(f.s();!(g=f.n()).done;){var m=g.value;if(l(m)){var y=gs(this.renderTypes.values()),b;try{var v=o(function(){var T=b.value,x=T.type;if(u(x)){var k=r.collections.get(T.collection),C=T.getKey(m),E=Array.isArray(C)?C:[C];if(a)E.forEach(function(N){return k.markKeyForGC(N)}),p=!0;else{var w=T.getID?T.getID(m):m.id(),_=r._key(x,w),L=r.typeAndIdToKey.get(_);L!==void 0&&!hTe(E,L)&&(d=!0,r.typeAndIdToKey.delete(_),L.forEach(function(N){return k.markKeyForGC(N)}))}}},"_loop2");for(y.s();!(b=y.n()).done;)v()}catch(T){y.e(T)}finally{y.f()}}}}catch(T){f.e(T)}finally{f.f()}return p&&(this.gc(),d=!1),d},"invalidate")},{key:"gc",value:o(function(){var t=gs(this.collections.values()),r;try{for(t.s();!(r=t.n()).done;){var i=r.value;i.gc()}}catch(n){t.e(n)}finally{t.f()}},"gc")},{key:"getOrCreateAtlas",value:o(function(t,r,i,n){var a=this.renderTypes.get(r),s=this.collections.get(a.collection),l=!1,h=s.draw(n,i,function(p){a.drawClipped?(p.save(),p.beginPath(),p.rect(0,0,i.w,i.h),p.clip(),a.drawElement(p,t,i,!0,!0),p.restore()):a.drawElement(p,t,i,!0,!0),l=!0});if(l){var u=a.getID?a.getID(t):t.id(),d=this._key(r,u);this.typeAndIdToKey.has(d)?this.typeAndIdToKey.get(d).push(n):this.typeAndIdToKey.set(d,[n])}return h},"getOrCreateAtlas")},{key:"getAtlasInfo",value:o(function(t,r){var i=this,n=this.renderTypes.get(r),a=n.getKey(t),s=Array.isArray(a)?a:[a];return s.map(function(l){var h=n.getBoundingBox(t,l),u=i.getOrCreateAtlas(t,r,h,l),d=u.getOffsets(l),p=xn(d,2),f=p[0],g=p[1];return{atlas:u,tex:f,tex1:f,tex2:g,bb:h}})},"getAtlasInfo")},{key:"getDebugInfo",value:o(function(){var t=[],r=gs(this.collections),i;try{for(r.s();!(i=r.n()).done;){var n=xn(i.value,2),a=n[0],s=n[1],l=s.getCounts(),h=l.keyCount,u=l.atlasCount;t.push({type:a,keyCount:h,atlasCount:u})}}catch(d){r.e(d)}finally{r.f()}return t},"getDebugInfo")}])})(),$Xe=(function(){function e(t){Mh(this,e),this.globalOptions=t,this.atlasSize=t.webglTexSize,this.maxAtlasesPerBatch=t.webglTexPerBatch,this.batchAtlases=[]}return o(e,"AtlasBatchManager"),Nh(e,[{key:"getMaxAtlasesPerBatch",value:o(function(){return this.maxAtlasesPerBatch},"getMaxAtlasesPerBatch")},{key:"getAtlasSize",value:o(function(){return this.atlasSize},"getAtlasSize")},{key:"getIndexArray",value:o(function(){return Array.from({length:this.maxAtlasesPerBatch},function(t,r){return r})},"getIndexArray")},{key:"startBatch",value:o(function(){this.batchAtlases=[]},"startBatch")},{key:"getAtlasCount",value:o(function(){return this.batchAtlases.length},"getAtlasCount")},{key:"getAtlases",value:o(function(){return this.batchAtlases},"getAtlases")},{key:"canAddToCurrentBatch",value:o(function(t){return this.batchAtlases.length===this.maxAtlasesPerBatch?this.batchAtlases.includes(t):!0},"canAddToCurrentBatch")},{key:"getAtlasIndexForBatch",value:o(function(t){var r=this.batchAtlases.indexOf(t);if(r<0){if(this.batchAtlases.length===this.maxAtlasesPerBatch)throw new Error("cannot add more atlases to batch");this.batchAtlases.push(t),r=this.batchAtlases.length-1}return r},"getAtlasIndexForBatch")}])})(),IXe=` + float circleSD(vec2 p, float r) { + return distance(vec2(0), p) - r; // signed distance + } +`,DXe=` + 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); + } +`,MXe=` + 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; + } +`,NXe=` + 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; + } +`,Mv={SCREEN:{name:"screen",screen:!0},PICKING:{name:"picking",picking:!0}},Ew={IGNORE:1,USE_BB:2},sM=0,wve=1,Eve=2,oM=3,om=4,ZC=5,Ev=6,Sv=7,OXe=(function(){function e(t,r,i){Mh(this,e),this.r=t,this.gl=r,this.maxInstances=i.webglBatchSize,this.atlasSize=i.webglTexSize,this.bgColor=i.bgColor,this.debug=i.webglDebug,this.batchDebugInfo=[],i.enableWrapping=!0,i.createTextureCanvas=sTe,this.atlasManager=new LXe(t,i),this.batchManager=new $Xe(i),this.simpleShapeOptions=new Map,this.program=this._createShaderProgram(Mv.SCREEN),this.pickingProgram=this._createShaderProgram(Mv.PICKING),this.vao=this._createVAO()}return o(e,"ElementDrawingWebGL"),Nh(e,[{key:"addAtlasCollection",value:o(function(t,r){this.atlasManager.addAtlasCollection(t,r)},"addAtlasCollection")},{key:"addTextureAtlasRenderType",value:o(function(t,r){this.atlasManager.addRenderType(t,r)},"addTextureAtlasRenderType")},{key:"addSimpleShapeRenderType",value:o(function(t,r){this.simpleShapeOptions.set(t,r)},"addSimpleShapeRenderType")},{key:"invalidate",value:o(function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=r.type,n=this.atlasManager;return i?n.invalidate(t,{filterType:o(function(a){return a===i},"filterType"),forceRedraw:!0}):n.invalidate(t)},"invalidate")},{key:"gc",value:o(function(){this.atlasManager.gc()},"gc")},{key:"_createShaderProgram",value:o(function(t){var r=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(sM,`) { + 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(om," || aVertType == ").concat(Sv,` + || aVertType == `).concat(ZC," || aVertType == ").concat(Ev,`) { // 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(wve,`) { + 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(Eve,`) { + 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(oM,` && 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; + } + `),n=this.batchManager.getIndexArray(),a=`#version 300 es + precision highp float; + + // declare texture unit for each texture atlas in the batch + `.concat(n.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(IXe,` + `).concat(DXe,` + `).concat(MXe,` + `).concat(NXe,` + + 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(sM,`) { + // look up the texel from the texture unit + `).concat(n.map(function(h){return"if(vAtlasId == ".concat(h,") outColor = texture(uTexture").concat(h,", vTexCoord);")}).join(` + else `),` + } + else if(vVertType == `).concat(oM,`) { + // 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(om,` && 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(om," || vVertType == ").concat(Sv,` + || vVertType == `).concat(ZC," || vVertType == ").concat(Ev,`) { // 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(om,`) { + d = rectangleSD(p, b); + } else if(vVertType == `).concat(Sv,` && w == h) { + d = circleSD(p, b.x); // faster than ellipse + } else if(vVertType == `).concat(Sv,`) { + d = ellipseSD(p, b); + } else { + d = roundRectangleSD(p, b, vCornerRadius.wzyx); + } + + // use the distance to interpolate a color to smooth the edges of the shape, doesn't need multisampling + // we must smooth colors inwards, because we can't change pixels outside the shape's bounding box + if(d > 0.0) { + if(d > outerBorder) { + discard; + } else { + outColor = distInterp(vBorderColor, vec4(0), d - outerBorder); + } + } else { + if(d > innerBorder) { + vec4 outerColor = outerBorder == 0.0 ? vec4(0) : vBorderColor; + vec4 innerBorderColor = blend(vBorderColor, vColor); + outColor = distInterp(innerBorderColor, outerColor, d); + } + else { + vec4 outerColor; + if(innerBorder == 0.0 && outerBorder == 0.0) { + outerColor = vec4(0); + } else if(innerBorder == 0.0) { + outerColor = vBorderColor; + } else { + outerColor = blend(vBorderColor, vColor); + } + outColor = distInterp(vColor, outerColor, d - innerBorder); + } + } + } + else { + outColor = vColor; + } + + `).concat(t.picking?`if(outColor.a == 0.0) discard; + else outColor = vIndex;`:"",` + } + `),s=aTe(r,i,a);s.aPosition=r.getAttribLocation(s,"aPosition"),s.aIndex=r.getAttribLocation(s,"aIndex"),s.aVertType=r.getAttribLocation(s,"aVertType"),s.aTransform=r.getAttribLocation(s,"aTransform"),s.aAtlasId=r.getAttribLocation(s,"aAtlasId"),s.aTex=r.getAttribLocation(s,"aTex"),s.aPointAPointB=r.getAttribLocation(s,"aPointAPointB"),s.aPointCPointD=r.getAttribLocation(s,"aPointCPointD"),s.aLineWidth=r.getAttribLocation(s,"aLineWidth"),s.aColor=r.getAttribLocation(s,"aColor"),s.aCornerRadius=r.getAttribLocation(s,"aCornerRadius"),s.aBorderColor=r.getAttribLocation(s,"aBorderColor"),s.uPanZoomMatrix=r.getUniformLocation(s,"uPanZoomMatrix"),s.uAtlasSize=r.getUniformLocation(s,"uAtlasSize"),s.uBGColor=r.getUniformLocation(s,"uBGColor"),s.uZoom=r.getUniformLocation(s,"uZoom"),s.uTextures=[];for(var l=0;l1&&arguments[1]!==void 0?arguments[1]:Mv.SCREEN;this.panZoomMatrix=t,this.renderTarget=r,this.batchDebugInfo=[],this.wrappedCount=0,this.simpleCount=0,this.startBatch()},"startFrame")},{key:"startBatch",value:o(function(){this.instanceCount=0,this.batchManager.startBatch()},"startBatch")},{key:"endFrame",value:o(function(){this.endBatch()},"endFrame")},{key:"_isVisible",value:o(function(t,r){return t.visible()?r&&r.isVisible?r.isVisible(t):!0:!1},"_isVisible")},{key:"drawTexture",value:o(function(t,r,i){var n=this.atlasManager,a=this.batchManager,s=n.getRenderTypeOpts(i);if(this._isVisible(t,s)&&!(t.isEdge()&&!this._isValidEdge(t))){if(this.renderTarget.picking&&s.getTexPickingMode){var l=s.getTexPickingMode(t);if(l===Ew.IGNORE)return;if(l==Ew.USE_BB){this.drawPickingRectangle(t,r,i);return}}var h=n.getAtlasInfo(t,i),u=gs(h),d;try{for(u.s();!(d=u.n()).done;){var p=d.value,f=p.atlas,g=p.tex1,m=p.tex2;a.canAddToCurrentBatch(f)||this.endBatch();for(var y=a.getAtlasIndexForBatch(f),b=0,v=[[g,!0],[m,!1]];b=this.maxInstances&&this.endBatch()}}}}catch(N){u.e(N)}finally{u.f()}}},"drawTexture")},{key:"setTransformMatrix",value:o(function(t,r,i,n){var a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,s=0;if(i.shapeProps&&i.shapeProps.padding&&(s=t.pstyle(i.shapeProps.padding).pfValue),n){var l=n.bb,h=n.tex1,u=n.tex2,d=h.w/(h.w+u.w);a||(d=1-d);var p=this._getAdjustedBB(l,s,a,d);this._applyTransformMatrix(r,p,i,t)}else{var f=i.getBoundingBox(t),g=this._getAdjustedBB(f,s,!0,1);this._applyTransformMatrix(r,g,i,t)}},"setTransformMatrix")},{key:"_applyTransformMatrix",value:o(function(t,r,i,n){var a,s;OM(t);var l=i.getRotation?i.getRotation(n):0;if(l!==0){var h=i.getRotationPoint(n),u=h.x,d=h.y;Dv(t,t,[u,d]),BM(t,t,l);var p=i.getRotationOffset(n);a=p.x+(r.xOffset||0),s=p.y+(r.yOffset||0)}else a=r.x1,s=r.y1;Dv(t,t,[a,s]),ww(t,t,[r.w,r.h])},"_applyTransformMatrix")},{key:"_getAdjustedBB",value:o(function(t,r,i,n){var a=t.x1,s=t.y1,l=t.w,h=t.h,u=t.yOffset;r&&(a-=r,s-=r,l+=2*r,h+=2*r);var d=0,p=l*n;return i&&n<1?l=p:!i&&n<1&&(d=l-p,a+=d,l=p),{x1:a,y1:s,w:l,h,xOffset:d,yOffset:u}},"_getAdjustedBB")},{key:"drawPickingRectangle",value:o(function(t,r,i){var n=this.atlasManager.getRenderTypeOpts(i),a=this.instanceCount;this.vertTypeBuffer.getView(a)[0]=om;var s=this.indexBuffer.getView(a);yf(r,s);var l=this.colorBuffer.getView(a);id([0,0,0],1,l);var h=this.transformBuffer.getMatrixView(a);this.setTransformMatrix(t,h,n),this.simpleCount++,this.instanceCount++,this.instanceCount>=this.maxInstances&&this.endBatch()},"drawPickingRectangle")},{key:"drawNode",value:o(function(t,r,i){var n=this.simpleShapeOptions.get(i);if(this._isVisible(t,n)){var a=n.shapeProps,s=this._getVertTypeForShape(t,a.shape);if(s===void 0||n.isSimple&&!n.isSimple(t,this.renderTarget)){this.drawTexture(t,r,i);return}var l=this.instanceCount;if(this.vertTypeBuffer.getView(l)[0]=s,s===ZC||s===Ev){var h=n.getBoundingBox(t),u=this._getCornerRadius(t,a.radius,h),d=this.cornerRadiusBuffer.getView(l);d[0]=u,d[1]=u,d[2]=u,d[3]=u,s===Ev&&(d[0]=0,d[2]=0)}var p=this.indexBuffer.getView(l);yf(r,p);var f=this.renderTarget.picking?1:i==="node-body"?t.effectiveOpacity():1,g=this.renderTarget.picking?1:t.pstyle(a.opacity).value*f,m=t.pstyle(a.color).value,y=this.colorBuffer.getView(l);id(m,g,y);var b=this.lineWidthBuffer.getView(l);if(b[0]=0,b[1]=0,a.border){var v=t.pstyle("border-width").value;if(v>0){var T=t.pstyle("border-color").value,x=f*t.pstyle("border-opacity").value,k=this.borderColorBuffer.getView(l);id(T,x,k);var C=t.pstyle("border-position").value;if(C==="inside")b[0]=0,b[1]=-v;else if(C==="outside")b[0]=v,b[1]=0;else{var E=v/2;b[0]=E,b[1]=-E}}}var w=this.transformBuffer.getMatrixView(l);this.setTransformMatrix(t,w,n),this.simpleCount++,this.instanceCount++,this.instanceCount>=this.maxInstances&&this.endBatch()}},"drawNode")},{key:"_getVertTypeForShape",value:o(function(t,r){var i=t.pstyle(r).value;switch(i){case"rectangle":return om;case"ellipse":return Sv;case"roundrectangle":case"round-rectangle":return ZC;case"bottom-round-rectangle":return Ev;default:return}},"_getVertTypeForShape")},{key:"_getCornerRadius",value:o(function(t,r,i){var n=i.w,a=i.h;if(t.pstyle(r).value==="auto")return dd(n,a);var s=t.pstyle(r).pfValue,l=n/2,h=a/2;return Math.min(s,h,l)},"_getCornerRadius")},{key:"drawEdgeArrow",value:o(function(t,r,i){if(t.visible()){var n=t._private.rscratch,a,s,l;if(i==="source"?(a=n.arrowStartX,s=n.arrowStartY,l=n.srcArrowAngle):(a=n.arrowEndX,s=n.arrowEndY,l=n.tgtArrowAngle),!(isNaN(a)||a==null||isNaN(s)||s==null||isNaN(l)||l==null)){var h=t.pstyle(i+"-arrow-shape").value;if(h!=="none"){var u=t.pstyle(i+"-arrow-color").value,d=t.pstyle("opacity").value,p=t.pstyle("line-opacity").value,f=d*p,g=t.pstyle("width").pfValue,m=t.pstyle("arrow-scale").value,y=this.r.getArrowWidth(g,m),b=this.instanceCount,v=this.transformBuffer.getMatrixView(b);OM(v),Dv(v,v,[a,s]),ww(v,v,[y,y]),BM(v,v,l),this.vertTypeBuffer.getView(b)[0]=oM;var T=this.indexBuffer.getView(b);yf(r,T);var x=this.colorBuffer.getView(b);id(u,f,x),this.instanceCount++,this.instanceCount>=this.maxInstances&&this.endBatch()}}}},"drawEdgeArrow")},{key:"drawEdgeLine",value:o(function(t,r){if(t.visible()){var i=this._getEdgePoints(t);if(i){var n=t.pstyle("opacity").value,a=t.pstyle("line-opacity").value,s=t.pstyle("width").pfValue,l=t.pstyle("line-color").value,h=n*a;if(i.length/2+this.instanceCount>this.maxInstances&&this.endBatch(),i.length==4){var u=this.instanceCount;this.vertTypeBuffer.getView(u)[0]=wve;var d=this.indexBuffer.getView(u);yf(r,d);var p=this.colorBuffer.getView(u);id(l,h,p);var f=this.lineWidthBuffer.getView(u);f[0]=s;var g=this.pointAPointBBuffer.getView(u);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 m=0;m=this.maxInstances&&this.endBatch()}}}},"drawEdgeLine")},{key:"_isValidEdge",value:o(function(t){var r=t._private.rscratch;return!(r.badLine||r.allpts==null||isNaN(r.allpts[0]))},"_isValidEdge")},{key:"_getEdgePoints",value:o(function(t){var r=t._private.rscratch;if(this._isValidEdge(t)){var i=r.allpts;if(i.length==4)return i;var n=this._getNumSegments(t);return this._getCurveSegmentPoints(i,n)}},"_getEdgePoints")},{key:"_getNumSegments",value:o(function(t){var r=15;return Math.min(Math.max(r,5),this.maxInstances)},"_getNumSegments")},{key:"_getCurveSegmentPoints",value:o(function(t,r){if(t.length==4)return t;for(var i=Array((r+1)*2),n=0;n<=r;n++)if(n==0)i[0]=t[0],i[1]=t[1];else if(n==r)i[n*2]=t[t.length-2],i[n*2+1]=t[t.length-1];else{var a=n/r;this._setCurvePoint(t,a,i,n*2)}return i},"_getCurveSegmentPoints")},{key:"_setCurvePoint",value:o(function(t,r,i,n){if(t.length<=2)i[n]=t[0],i[n+1]=t[1];else{for(var a=Array(t.length-2),s=0;s0}},"isLayerVisible"),l=o(function(d){var p=d.pstyle("text-events").strValue==="yes";return p?Ew.USE_BB:Ew.IGNORE},"getTexPickingMode"),h=o(function(d){var p=d.position(),f=p.x,g=p.y,m=d.outerWidth(),y=d.outerHeight();return{w:m,h:y,x1:f-m/2,y1:g-y/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:h,isSimple:cTe,shapeProps:{shape:"shape",color:"background-color",opacity:"background-opacity",radius:"corner-radius",border:!0}}),r.drawing.addSimpleShapeRenderType("node-overlay",{getBoundingBox:h,isVisible:s("overlay"),shapeProps:{shape:"overlay-shape",color:"overlay-color",opacity:"overlay-opacity",padding:"overlay-padding",radius:"overlay-corner-radius"}}),r.drawing.addSimpleShapeRenderType("node-underlay",{getBoundingBox:h,isVisible:s("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:lM(t.getLabelKey,null),getBoundingBox:cM(t.getLabelBox,null),drawClipped:!0,drawElement:t.drawLabel,getRotation:n(null),getRotationPoint:t.getLabelRotationPoint,getRotationOffset:t.getLabelRotationOffset,isVisible:a("label")}),r.drawing.addTextureAtlasRenderType("edge-source-label",{collection:"label",getTexPickingMode:l,getKey:lM(t.getSourceLabelKey,"source"),getBoundingBox:cM(t.getSourceLabelBox,"source"),drawClipped:!0,drawElement:t.drawSourceLabel,getRotation:n("source"),getRotationPoint:t.getSourceLabelRotationPoint,getRotationOffset:t.getSourceLabelRotationOffset,isVisible:a("source-label")}),r.drawing.addTextureAtlasRenderType("edge-target-label",{collection:"label",getTexPickingMode:l,getKey:lM(t.getTargetLabelKey,"target"),getBoundingBox:cM(t.getTargetLabelBox,"target"),drawClipped:!0,drawElement:t.drawTargetLabel,getRotation:n("target"),getRotationPoint:t.getTargetLabelRotationPoint,getRotationOffset:t.getTargetLabelRotationOffset,isVisible:a("target-label")});var u=Xv(function(){console.log("garbage collect flag set"),r.data.gc=!0},1e4);r.onUpdateEleCalcs(function(d,p){var f=!1;p&&p.length>0&&(f|=r.drawing.invalidate(p)),f&&u()}),kTe(r)};o(TTe,"getBGColor");o(SN,"getLabelLines");lM=o(function(e,t){return function(r){var i=e(r),n=SN(r,t);return n.length>1?n.map(function(a,s){return"".concat(i,"_").concat(s)}):i}},"getStyleKeysForLabel"),cM=o(function(e,t){return function(r,i){var n=e(r);if(typeof i=="string"){var a=i.indexOf("_");if(a>0){var s=Number(i.substring(a+1)),l=SN(r,t),h=n.h/l.length,u=h*s,d=n.y1+u;return{x1:n.x1,w:n.w,y1:d,h,yOffset:u}}}return n}},"getBoundingBoxForLabel");o(kTe,"overrideCanvasRendererFunctions");o(CTe,"clearWebgl");o(wTe,"clearCanvas");o(ETe,"createPanZoomMatrix");o(_N,"setContextTransform");o(STe,"drawSelectionRectangle");o(_Te,"drawAxes");o(ATe,"drawAtlases");o(RTe,"getPickingIndexes");o(LTe,"findNearestElementsWebgl");o(uw,"drawEle");o(AN,"renderWebgl");vd={};vd.drawPolygonPath=function(e,t,r,i,n,a){var s=i/2,l=n/2;e.beginPath&&e.beginPath(),e.moveTo(t+s*a[0],r+l*a[1]);for(var h=1;h0&&s>0){g.clearRect(0,0,a,s),g.globalCompositeOperation="source-over";var m=this.getCachedZSortedEles();if(e.full)g.translate(-i.x1*u,-i.y1*u),g.scale(u,u),this.drawElements(g,m),g.scale(1/u,1/u),g.translate(i.x1*u,i.y1*u);else{var y=t.pan(),b={x:y.x*u,y:y.y*u};u*=t.zoom(),g.translate(b.x,b.y),g.scale(u,u),this.drawElements(g,m),g.scale(1/u,1/u),g.translate(-b.x,-b.y)}e.bg&&(g.globalCompositeOperation="destination-over",g.fillStyle=e.bg,g.rect(0,0,a,s),g.fill())}return f};o(ITe,"b64ToBlob");o(zM,"b64UriToB64");o(RN,"output");hb.png=function(e){return RN(e,this.bufferCanvasImage(e),"image/png")};hb.jpg=function(e){return RN(e,this.bufferCanvasImage(e),"image/jpeg")};DTe={};DTe.nodeShapeImpl=function(e,t,r,i,n,a,s,l){switch(e){case"ellipse":return this.drawEllipsePath(t,r,i,n,a);case"polygon":return this.drawPolygonPath(t,r,i,n,a,s);case"round-polygon":return this.drawRoundPolygonPath(t,r,i,n,a,s,l);case"roundrectangle":case"round-rectangle":return this.drawRoundRectanglePath(t,r,i,n,a,l);case"cutrectangle":case"cut-rectangle":return this.drawCutRectanglePath(t,r,i,n,a,s,l);case"bottomroundrectangle":case"bottom-round-rectangle":return this.drawBottomRoundRectanglePath(t,r,i,n,a,l);case"barrel":return this.drawBarrelPath(t,r,i,n,a)}};BXe=LN,Fr=LN.prototype;Fr.CANVAS_LAYERS=3;Fr.SELECT_BOX=0;Fr.DRAG=1;Fr.NODE=2;Fr.WEBGL=3;Fr.CANVAS_TYPES=["2d","2d","2d","webgl2"];Fr.BUFFER_COUNT=3;Fr.TEXTURE_BUFFER=0;Fr.MOTIONBLUR_BUFFER_NODE=1;Fr.MOTIONBLUR_BUFFER_DRAG=2;o(LN,"CanvasRenderer");Fr.redrawHint=function(e,t){var r=this;switch(e){case"eles":r.data.canvasNeedsRedraw[Fr.NODE]=t;break;case"drag":r.data.canvasNeedsRedraw[Fr.DRAG]=t;break;case"select":r.data.canvasNeedsRedraw[Fr.SELECT_BOX]=t;break;case"gc":r.data.gc=!0;break}};PXe=typeof Path2D<"u";Fr.path2dEnabled=function(e){if(e===void 0)return this.pathsEnabled;this.pathsEnabled=!!e};Fr.usePaths=function(){return PXe&&this.pathsEnabled};Fr.setImgSmoothing=function(e,t){e.imageSmoothingEnabled!=null?e.imageSmoothingEnabled=t:(e.webkitImageSmoothingEnabled=t,e.mozImageSmoothingEnabled=t,e.msImageSmoothingEnabled=t)};Fr.getImgSmoothing=function(e){return e.imageSmoothingEnabled!=null?e.imageSmoothingEnabled:e.webkitImageSmoothingEnabled||e.mozImageSmoothingEnabled||e.msImageSmoothingEnabled};Fr.makeOffscreenCanvas=function(e,t){var r;if((typeof OffscreenCanvas>"u"?"undefined":In(OffscreenCanvas))!=="undefined")r=new OffscreenCanvas(e,t);else{var i=this.cy.window(),n=i.document;r=n.createElement("canvas"),r.width=e,r.height=t}return r};[Zxe,wc,Bh,CN,Af,yd,ys,xTe,vd,hb,DTe].forEach(function(e){cr(Fr,e)});FXe=[{name:"null",impl:vN},{name:"base",impl:Yxe},{name:"canvas",impl:BXe}],zXe=[{type:"layout",extensions:qHe},{type:"renderer",extensions:FXe}],MTe={},NTe={};o($N,"setExtension");o(IN,"getExtension");o(OTe,"setModule");o(BTe,"getModule");qM=o(function(){if(arguments.length===2)return IN.apply(null,arguments);if(arguments.length===3)return $N.apply(null,arguments);if(arguments.length===4)return BTe.apply(null,arguments);if(arguments.length===5)return OTe.apply(null,arguments);Ui("Invalid extension access syntax")},"extension");Wv.prototype.extension=qM;zXe.forEach(function(e){e.extensions.forEach(function(t){$N(e.type,t.name,t.impl)})});Sw=o(function(){if(!(this instanceof Sw))return new Sw;this.length=0},"Stylesheet"),Ef=Sw.prototype;Ef.instanceString=function(){return"stylesheet"};Ef.selector=function(e){var t=this.length++;return this[t]={selector:e,properties:[]},this};Ef.css=function(e,t){var r=this.length-1;if(er(e))this[r].properties.push({name:e,value:t});else if(ni(e))for(var i=e,n=Object.keys(i),a=0;aUXe});function zTe(e,t){e.forEach(r=>{let i={id:r.id,labelText:r.label,height:r.height,width:r.width,padding:r.padding??0};Object.keys(r).forEach(n=>{["id","label","height","width","padding","x","y"].includes(n)||(i[n]=r[n])}),t.add({group:"nodes",data:i,position:{x:r.x??0,y:r.y??0}})})}function qTe(e,t){e.forEach(r=>{let i={id:r.id,source:r.start,target:r.end};Object.keys(r).forEach(n=>{["id","start","end"].includes(n)||(i[n]=r[n])}),t.add({group:"edges",data:i})})}function jTe(e){return new Promise(t=>{let r=tt("body").append("div").attr("id","cy").attr("style","display:none"),i=Go({container:document.getElementById("cy"),style:[{selector:"edge",style:{"curve-style":"bezier"}}]});r.remove(),zTe(e.nodes,i),qTe(e.edges,i),i.nodes().forEach(function(a){a.layoutDimensions=()=>{let s=a.data();return{w:s.width,h:s.height}}});let n={name:"cose-bilkent",quality:"proof",styleEnabled:!1,animate:!1};i.layout(n).run(),i.ready(a=>{ee.info("Cytoscape ready",a),t(i)})})}function GTe(e){return e.nodes().map(t=>{let r=t.data(),i=t.position(),n={id:r.id,x:i.x,y:i.y};return Object.keys(r).forEach(a=>{a!=="id"&&(n[a]=r[a])}),n})}function WTe(e){return e.edges().map(t=>{let r=t.data(),i=t._private.rscratch,n={id:r.id,source:r.source,target:r.target,startX:i.startX,startY:i.startY,midX:i.midX,midY:i.midY,endX:i.endX,endY:i.endY};return Object.keys(r).forEach(a=>{["id","source","target"].includes(a)||(n[a]=r[a])}),n})}async function UTe(e,t){ee.debug("Starting cose-bilkent layout algorithm");try{VTe(e);let r=await jTe(e),i=GTe(r),n=WTe(r);return ee.debug(`Layout completed: ${i.length} nodes, ${n.length} edges`),{nodes:i,edges:n}}catch(r){throw ee.error("Error in cose-bilkent layout algorithm:",r),r}}function VTe(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 PTe,FTe,jXe,GXe,WXe,UXe,HTe=Tt(()=>{DN();Zt();vt();PTe=Xn((e,t)=>{"use strict";o((function(r,i){typeof e=="object"&&typeof t=="object"?t.exports=i():typeof define=="function"&&define.amd?define([],i):typeof e=="object"?e.layoutBase=i():r.layoutBase=i()}),"webpackUniversalModuleDefinition")(e,function(){return(function(r){var i={};function n(a){if(i[a])return i[a].exports;var s=i[a]={i:a,l:!1,exports:{}};return r[a].call(s.exports,s,s.exports,n),s.l=!0,s.exports}return o(n,"__webpack_require__"),n.m=r,n.c=i,n.i=function(a){return a},n.d=function(a,s,l){n.o(a,s)||Object.defineProperty(a,s,{configurable:!1,enumerable:!0,get:l})},n.n=function(a){var s=a&&a.__esModule?o(function(){return a.default},"getDefault"):o(function(){return a},"getModuleExports");return n.d(s,"a",s),s},n.o=function(a,s){return Object.prototype.hasOwnProperty.call(a,s)},n.p="",n(n.s=26)})([(function(r,i,n){"use strict";function a(){}o(a,"LayoutConstants"),a.QUALITY=1,a.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,a.DEFAULT_INCREMENTAL=!1,a.DEFAULT_ANIMATION_ON_LAYOUT=!0,a.DEFAULT_ANIMATION_DURING_LAYOUT=!1,a.DEFAULT_ANIMATION_PERIOD=50,a.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,a.DEFAULT_GRAPH_MARGIN=15,a.NODE_DIMENSIONS_INCLUDE_LABELS=!1,a.SIMPLE_NODE_SIZE=40,a.SIMPLE_NODE_HALF_SIZE=a.SIMPLE_NODE_SIZE/2,a.EMPTY_COMPOUND_NODE_SIZE=40,a.MIN_EDGE_LENGTH=1,a.WORLD_BOUNDARY=1e6,a.INITIAL_WORLD_BOUNDARY=a.WORLD_BOUNDARY/1e3,a.WORLD_CENTER_X=1200,a.WORLD_CENTER_Y=900,r.exports=a}),(function(r,i,n){"use strict";var a=n(2),s=n(8),l=n(9);function h(d,p,f){a.call(this,f),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=f,this.bendpoints=[],this.source=d,this.target=p}o(h,"LEdge"),h.prototype=Object.create(a.prototype);for(var u in a)h[u]=a[u];h.prototype.getSource=function(){return this.source},h.prototype.getTarget=function(){return this.target},h.prototype.isInterGraph=function(){return this.isInterGraph},h.prototype.getLength=function(){return this.length},h.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},h.prototype.getBendpoints=function(){return this.bendpoints},h.prototype.getLca=function(){return this.lca},h.prototype.getSourceInLca=function(){return this.sourceInLca},h.prototype.getTargetInLca=function(){return this.targetInLca},h.prototype.getOtherEnd=function(d){if(this.source===d)return this.target;if(this.target===d)return this.source;throw"Node is not incident with this edge"},h.prototype.getOtherEndInGraph=function(d,p){for(var f=this.getOtherEnd(d),g=p.getGraphManager().getRoot();;){if(f.getOwner()==p)return f;if(f.getOwner()==g)break;f=f.getOwner().getParent()}return null},h.prototype.updateLength=function(){var d=new Array(4);this.isOverlapingSourceAndTarget=s.getIntersection(this.target.getRect(),this.source.getRect(),d),this.isOverlapingSourceAndTarget||(this.lengthX=d[0]-d[2],this.lengthY=d[1]-d[3],Math.abs(this.lengthX)<1&&(this.lengthX=l.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=l.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},h.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=l.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=l.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},r.exports=h}),(function(r,i,n){"use strict";function a(s){this.vGraphObject=s}o(a,"LGraphObject"),r.exports=a}),(function(r,i,n){"use strict";var a=n(2),s=n(10),l=n(13),h=n(0),u=n(16),d=n(4);function p(g,m,y,b){y==null&&b==null&&(b=m),a.call(this,b),g.graphManager!=null&&(g=g.graphManager),this.estimatedSize=s.MIN_VALUE,this.inclusionTreeDepth=s.MAX_VALUE,this.vGraphObject=b,this.edges=[],this.graphManager=g,y!=null&&m!=null?this.rect=new l(m.x,m.y,y.width,y.height):this.rect=new l}o(p,"LNode"),p.prototype=Object.create(a.prototype);for(var f in a)p[f]=a[f];p.prototype.getEdges=function(){return this.edges},p.prototype.getChild=function(){return this.child},p.prototype.getOwner=function(){return this.owner},p.prototype.getWidth=function(){return this.rect.width},p.prototype.setWidth=function(g){this.rect.width=g},p.prototype.getHeight=function(){return this.rect.height},p.prototype.setHeight=function(g){this.rect.height=g},p.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},p.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},p.prototype.getCenter=function(){return new d(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},p.prototype.getLocation=function(){return new d(this.rect.x,this.rect.y)},p.prototype.getRect=function(){return this.rect},p.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},p.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},p.prototype.setRect=function(g,m){this.rect.x=g.x,this.rect.y=g.y,this.rect.width=m.width,this.rect.height=m.height},p.prototype.setCenter=function(g,m){this.rect.x=g-this.rect.width/2,this.rect.y=m-this.rect.height/2},p.prototype.setLocation=function(g,m){this.rect.x=g,this.rect.y=m},p.prototype.moveBy=function(g,m){this.rect.x+=g,this.rect.y+=m},p.prototype.getEdgeListToNode=function(g){var m=[],y,b=this;return b.edges.forEach(function(v){if(v.target==g){if(v.source!=b)throw"Incorrect edge source!";m.push(v)}}),m},p.prototype.getEdgesBetween=function(g){var m=[],y,b=this;return b.edges.forEach(function(v){if(!(v.source==b||v.target==b))throw"Incorrect edge source and/or target";(v.target==g||v.source==g)&&m.push(v)}),m},p.prototype.getNeighborsList=function(){var g=new Set,m=this;return m.edges.forEach(function(y){if(y.source==m)g.add(y.target);else{if(y.target!=m)throw"Incorrect incidency!";g.add(y.source)}}),g},p.prototype.withChildren=function(){var g=new Set,m,y;if(g.add(this),this.child!=null)for(var b=this.child.getNodes(),v=0;vm&&(this.rect.x-=(this.labelWidth-m)/2,this.setWidth(this.labelWidth)),this.labelHeight>y&&(this.labelPos=="center"?this.rect.y-=(this.labelHeight-y)/2:this.labelPos=="top"&&(this.rect.y-=this.labelHeight-y),this.setHeight(this.labelHeight))}}},p.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==s.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},p.prototype.transform=function(g){var m=this.rect.x;m>h.WORLD_BOUNDARY?m=h.WORLD_BOUNDARY:m<-h.WORLD_BOUNDARY&&(m=-h.WORLD_BOUNDARY);var y=this.rect.y;y>h.WORLD_BOUNDARY?y=h.WORLD_BOUNDARY:y<-h.WORLD_BOUNDARY&&(y=-h.WORLD_BOUNDARY);var b=new d(m,y),v=g.inverseTransformPoint(b);this.setLocation(v.x,v.y)},p.prototype.getLeft=function(){return this.rect.x},p.prototype.getRight=function(){return this.rect.x+this.rect.width},p.prototype.getTop=function(){return this.rect.y},p.prototype.getBottom=function(){return this.rect.y+this.rect.height},p.prototype.getParent=function(){return this.owner==null?null:this.owner.getParent()},r.exports=p}),(function(r,i,n){"use strict";function a(s,l){s==null&&l==null?(this.x=0,this.y=0):(this.x=s,this.y=l)}o(a,"PointD"),a.prototype.getX=function(){return this.x},a.prototype.getY=function(){return this.y},a.prototype.setX=function(s){this.x=s},a.prototype.setY=function(s){this.y=s},a.prototype.getDifference=function(s){return new DimensionD(this.x-s.x,this.y-s.y)},a.prototype.getCopy=function(){return new a(this.x,this.y)},a.prototype.translate=function(s){return this.x+=s.width,this.y+=s.height,this},r.exports=a}),(function(r,i,n){"use strict";var a=n(2),s=n(10),l=n(0),h=n(6),u=n(3),d=n(1),p=n(13),f=n(12),g=n(11);function m(b,v,T){a.call(this,T),this.estimatedSize=s.MIN_VALUE,this.margin=l.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=b,v!=null&&v instanceof h?this.graphManager=v:v!=null&&v instanceof Layout&&(this.graphManager=v.graphManager)}o(m,"LGraph"),m.prototype=Object.create(a.prototype);for(var y in a)m[y]=a[y];m.prototype.getNodes=function(){return this.nodes},m.prototype.getEdges=function(){return this.edges},m.prototype.getGraphManager=function(){return this.graphManager},m.prototype.getParent=function(){return this.parent},m.prototype.getLeft=function(){return this.left},m.prototype.getRight=function(){return this.right},m.prototype.getTop=function(){return this.top},m.prototype.getBottom=function(){return this.bottom},m.prototype.isConnected=function(){return this.isConnected},m.prototype.add=function(b,v,T){if(v==null&&T==null){var x=b;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 k=b;if(!(this.getNodes().indexOf(v)>-1&&this.getNodes().indexOf(T)>-1))throw"Source or target not in graph!";if(!(v.owner==T.owner&&v.owner==this))throw"Both owners must be this graph!";return v.owner!=T.owner?null:(k.source=v,k.target=T,k.isInterGraph=!1,this.getEdges().push(k),v.edges.push(k),T!=v&&T.edges.push(k),k)}},m.prototype.remove=function(b){var v=b;if(b instanceof u){if(v==null)throw"Node is null!";if(!(v.owner!=null&&v.owner==this))throw"Owner graph is invalid!";if(this.graphManager==null)throw"Owner graph manager is invalid!";for(var T=v.edges.slice(),x,k=T.length,C=0;C-1&&_>-1))throw"Source and/or target doesn't know this edge!";x.source.edges.splice(w,1),x.target!=x.source&&x.target.edges.splice(_,1);var E=x.source.owner.getEdges().indexOf(x);if(E==-1)throw"Not in owner's edge list!";x.source.owner.getEdges().splice(E,1)}},m.prototype.updateLeftTop=function(){for(var b=s.MAX_VALUE,v=s.MAX_VALUE,T,x,k,C=this.getNodes(),E=C.length,w=0;wT&&(b=T),v>x&&(v=x)}return b==s.MAX_VALUE?null:(C[0].getParent().paddingLeft!=null?k=C[0].getParent().paddingLeft:k=this.margin,this.left=v-k,this.top=b-k,new f(this.left,this.top))},m.prototype.updateBounds=function(b){for(var v=s.MAX_VALUE,T=-s.MAX_VALUE,x=s.MAX_VALUE,k=-s.MAX_VALUE,C,E,w,_,L,N=this.nodes,D=N.length,M=0;MC&&(v=C),Tw&&(x=w),k<_&&(k=_)}var A=new p(v,x,T-v,k-x);v==s.MAX_VALUE&&(this.left=this.parent.getLeft(),this.right=this.parent.getRight(),this.top=this.parent.getTop(),this.bottom=this.parent.getBottom()),N[0].getParent().paddingLeft!=null?L=N[0].getParent().paddingLeft:L=this.margin,this.left=A.x-L,this.right=A.x+A.width+L,this.top=A.y-L,this.bottom=A.y+A.height+L},m.calculateBounds=function(b){for(var v=s.MAX_VALUE,T=-s.MAX_VALUE,x=s.MAX_VALUE,k=-s.MAX_VALUE,C,E,w,_,L=b.length,N=0;NC&&(v=C),Tw&&(x=w),k<_&&(k=_)}var M=new p(v,x,T-v,k-x);return M},m.prototype.getInclusionTreeDepth=function(){return this==this.graphManager.getRoot()?1:this.parent.getInclusionTreeDepth()},m.prototype.getEstimatedSize=function(){if(this.estimatedSize==s.MIN_VALUE)throw"assert failed";return this.estimatedSize},m.prototype.calcEstimatedSize=function(){for(var b=0,v=this.nodes,T=v.length,x=0;x=this.nodes.length){var D=0;T.forEach(function(M){M.owner==b&&D++}),D==this.nodes.length&&(this.isConnected=!0)}},r.exports=m}),(function(r,i,n){"use strict";var a,s=n(1);function l(h){a=n(5),this.layout=h,this.graphs=[],this.edges=[]}o(l,"LGraphManager"),l.prototype.addRoot=function(){var h=this.layout.newGraph(),u=this.layout.newNode(null),d=this.add(h,u);return this.setRootGraph(d),this.rootGraph},l.prototype.add=function(h,u,d,p,f){if(d==null&&p==null&&f==null){if(h==null)throw"Graph is null!";if(u==null)throw"Parent node is null!";if(this.graphs.indexOf(h)>-1)throw"Graph already in this graph mgr!";if(this.graphs.push(h),h.parent!=null)throw"Already has a parent!";if(u.child!=null)throw"Already has a child!";return h.parent=u,u.child=h,h}else{f=d,p=u,d=h;var g=p.getOwner(),m=f.getOwner();if(!(g!=null&&g.getGraphManager()==this))throw"Source not in this graph mgr!";if(!(m!=null&&m.getGraphManager()==this))throw"Target not in this graph mgr!";if(g==m)return d.isInterGraph=!1,g.add(d,p,f);if(d.isInterGraph=!0,d.source=p,d.target=f,this.edges.indexOf(d)>-1)throw"Edge already in inter-graph edge list!";if(this.edges.push(d),!(d.source!=null&&d.target!=null))throw"Edge source and/or target is null!";if(!(d.source.edges.indexOf(d)==-1&&d.target.edges.indexOf(d)==-1))throw"Edge already in source and/or target incidency list!";return d.source.edges.push(d),d.target.edges.push(d),d}},l.prototype.remove=function(h){if(h instanceof a){var u=h;if(u.getGraphManager()!=this)throw"Graph not in this graph mgr";if(!(u==this.rootGraph||u.parent!=null&&u.parent.graphManager==this))throw"Invalid parent node!";var d=[];d=d.concat(u.getEdges());for(var p,f=d.length,g=0;g=h.getRight()?u[0]+=Math.min(h.getX()-l.getX(),l.getRight()-h.getRight()):h.getX()<=l.getX()&&h.getRight()>=l.getRight()&&(u[0]+=Math.min(l.getX()-h.getX(),h.getRight()-l.getRight())),l.getY()<=h.getY()&&l.getBottom()>=h.getBottom()?u[1]+=Math.min(h.getY()-l.getY(),l.getBottom()-h.getBottom()):h.getY()<=l.getY()&&h.getBottom()>=l.getBottom()&&(u[1]+=Math.min(l.getY()-h.getY(),h.getBottom()-l.getBottom()));var f=Math.abs((h.getCenterY()-l.getCenterY())/(h.getCenterX()-l.getCenterX()));h.getCenterY()===l.getCenterY()&&h.getCenterX()===l.getCenterX()&&(f=1);var g=f*u[0],m=u[1]/f;u[0]g)return u[0]=d,u[1]=y,u[2]=f,u[3]=N,!1;if(pf)return u[0]=m,u[1]=p,u[2]=_,u[3]=g,!1;if(df?(u[0]=v,u[1]=T,A=!0):(u[0]=b,u[1]=y,A=!0):O===$&&(d>f?(u[0]=m,u[1]=y,A=!0):(u[0]=x,u[1]=T,A=!0)),-R===$?f>d?(u[2]=L,u[3]=N,I=!0):(u[2]=_,u[3]=w,I=!0):R===$&&(f>d?(u[2]=E,u[3]=w,I=!0):(u[2]=D,u[3]=N,I=!0)),A&&I)return!1;if(d>f?p>g?(F=this.getCardinalDirection(O,$,4),P=this.getCardinalDirection(R,$,2)):(F=this.getCardinalDirection(-O,$,3),P=this.getCardinalDirection(-R,$,1)):p>g?(F=this.getCardinalDirection(-O,$,1),P=this.getCardinalDirection(-R,$,3)):(F=this.getCardinalDirection(O,$,2),P=this.getCardinalDirection(R,$,4)),!A)switch(F){case 1:q=y,z=d+-C/$,u[0]=z,u[1]=q;break;case 2:z=x,q=p+k*$,u[0]=z,u[1]=q;break;case 3:q=T,z=d+C/$,u[0]=z,u[1]=q;break;case 4:z=v,q=p+-k*$,u[0]=z,u[1]=q;break}if(!I)switch(P){case 1:W=w,G=f+-B/$,u[2]=G,u[3]=W;break;case 2:G=D,W=g+M*$,u[2]=G,u[3]=W;break;case 3:W=N,G=f+B/$,u[2]=G,u[3]=W;break;case 4:G=L,W=g+-M*$,u[2]=G,u[3]=W;break}}return!1},s.getCardinalDirection=function(l,h,u){return l>h?u:1+u%4},s.getIntersection=function(l,h,u,d){if(d==null)return this.getIntersection2(l,h,u);var p=l.x,f=l.y,g=h.x,m=h.y,y=u.x,b=u.y,v=d.x,T=d.y,x=void 0,k=void 0,C=void 0,E=void 0,w=void 0,_=void 0,L=void 0,N=void 0,D=void 0;return C=m-f,w=p-g,L=g*f-p*m,E=T-b,_=y-v,N=v*b-y*T,D=C*_-E*w,D===0?null:(x=(w*N-_*L)/D,k=(E*L-C*N)/D,new a(x,k))},s.angleOfVector=function(l,h,u,d){var p=void 0;return l!==u?(p=Math.atan((d-h)/(u-l)),u0?1:s<0?-1:0},a.floor=function(s){return s<0?Math.ceil(s):Math.floor(s)},a.ceil=function(s){return s<0?Math.floor(s):Math.ceil(s)},r.exports=a}),(function(r,i,n){"use strict";function a(){}o(a,"Integer"),a.MAX_VALUE=2147483647,a.MIN_VALUE=-2147483648,r.exports=a}),(function(r,i,n){"use strict";var a=(function(){function p(f,g){for(var m=0;m"u"?"undefined":a(l);return l==null||h!="object"&&h!="function"},r.exports=s}),(function(r,i,n){"use strict";function a(y){if(Array.isArray(y)){for(var b=0,v=Array(y.length);b0&&b;){for(C.push(w[0]);C.length>0&&b;){var _=C[0];C.splice(0,1),k.add(_);for(var L=_.getEdges(),x=0;x-1&&w.splice(B,1)}k=new Set,E=new Map}}return y},m.prototype.createDummyNodesForBendpoints=function(y){for(var b=[],v=y.source,T=this.graphManager.calcLowestCommonAncestor(y.source,y.target),x=0;x0){for(var T=this.edgeToDummyNodes.get(v),x=0;x=0&&b.splice(N,1);var D=E.getNeighborsList();D.forEach(function(A){if(v.indexOf(A)<0){var I=T.get(A),O=I-1;O==1&&_.push(A),T.set(A,O)}})}v=v.concat(_),(b.length==1||b.length==2)&&(x=!0,k=b[0])}return k},m.prototype.setGraphManager=function(y){this.graphManager=y},r.exports=m}),(function(r,i,n){"use strict";function a(){}o(a,"RandomSeed"),a.seed=1,a.x=0,a.nextDouble=function(){return a.x=Math.sin(a.seed++)*1e4,a.x-Math.floor(a.x)},r.exports=a}),(function(r,i,n){"use strict";var a=n(4);function s(l,h){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}o(s,"Transform"),s.prototype.getWorldOrgX=function(){return this.lworldOrgX},s.prototype.setWorldOrgX=function(l){this.lworldOrgX=l},s.prototype.getWorldOrgY=function(){return this.lworldOrgY},s.prototype.setWorldOrgY=function(l){this.lworldOrgY=l},s.prototype.getWorldExtX=function(){return this.lworldExtX},s.prototype.setWorldExtX=function(l){this.lworldExtX=l},s.prototype.getWorldExtY=function(){return this.lworldExtY},s.prototype.setWorldExtY=function(l){this.lworldExtY=l},s.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},s.prototype.setDeviceOrgX=function(l){this.ldeviceOrgX=l},s.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},s.prototype.setDeviceOrgY=function(l){this.ldeviceOrgY=l},s.prototype.getDeviceExtX=function(){return this.ldeviceExtX},s.prototype.setDeviceExtX=function(l){this.ldeviceExtX=l},s.prototype.getDeviceExtY=function(){return this.ldeviceExtY},s.prototype.setDeviceExtY=function(l){this.ldeviceExtY=l},s.prototype.transformX=function(l){var h=0,u=this.lworldExtX;return u!=0&&(h=this.ldeviceOrgX+(l-this.lworldOrgX)*this.ldeviceExtX/u),h},s.prototype.transformY=function(l){var h=0,u=this.lworldExtY;return u!=0&&(h=this.ldeviceOrgY+(l-this.lworldOrgY)*this.ldeviceExtY/u),h},s.prototype.inverseTransformX=function(l){var h=0,u=this.ldeviceExtX;return u!=0&&(h=this.lworldOrgX+(l-this.ldeviceOrgX)*this.lworldExtX/u),h},s.prototype.inverseTransformY=function(l){var h=0,u=this.ldeviceExtY;return u!=0&&(h=this.lworldOrgY+(l-this.ldeviceOrgY)*this.lworldExtY/u),h},s.prototype.inverseTransformPoint=function(l){var h=new a(this.inverseTransformX(l.x),this.inverseTransformY(l.y));return h},r.exports=s}),(function(r,i,n){"use strict";function a(g){if(Array.isArray(g)){for(var m=0,y=Array(g.length);ml.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*l.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(g-l.ADAPTATION_LOWER_NODE_LIMIT)/(l.ADAPTATION_UPPER_NODE_LIMIT-l.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-l.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=l.MAX_NODE_DISPLACEMENT_INCREMENTAL):(g>l.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(l.COOLING_ADAPTATION_FACTOR,1-(g-l.ADAPTATION_LOWER_NODE_LIMIT)/(l.ADAPTATION_UPPER_NODE_LIMIT-l.ADAPTATION_LOWER_NODE_LIMIT)*(1-l.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=l.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(this.getAllNodes().length*5,this.maxIterations),this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},p.prototype.calcSpringForces=function(){for(var g=this.getAllEdges(),m,y=0;y0&&arguments[0]!==void 0?arguments[0]:!0,m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,y,b,v,T,x=this.getAllNodes(),k;if(this.useFRGridVariant)for(this.totalIterations%l.GRID_CALCULATION_CHECK_PERIOD==1&&g&&this.updateGrid(),k=new Set,y=0;yC||k>C)&&(g.gravitationForceX=-this.gravityConstant*v,g.gravitationForceY=-this.gravityConstant*T)):(C=m.getEstimatedSize()*this.compoundGravityRangeFactor,(x>C||k>C)&&(g.gravitationForceX=-this.gravityConstant*v*this.compoundGravityConstant,g.gravitationForceY=-this.gravityConstant*T*this.compoundGravityConstant))},p.prototype.isConverged=function(){var g,m=!1;return this.totalIterations>this.maxIterations/3&&(m=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),g=this.totalDisplacement=x.length||C>=x[0].length)){for(var E=0;Ed},"_defaultCompareFunction")}]),u})();r.exports=h}),(function(r,i,n){"use strict";var a=(function(){function h(u,d){for(var p=0;p2&&arguments[2]!==void 0?arguments[2]:1,f=arguments.length>3&&arguments[3]!==void 0?arguments[3]:-1,g=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1;s(this,h),this.sequence1=u,this.sequence2=d,this.match_score=p,this.mismatch_penalty=f,this.gap_penalty=g,this.iMax=u.length+1,this.jMax=d.length+1,this.grid=new Array(this.iMax);for(var m=0;m=0;u--){var d=this.listeners[u];d.event===l&&d.callback===h&&this.listeners.splice(u,1)}},s.emit=function(l,h){for(var u=0;u{"use strict";o((function(r,i){typeof e=="object"&&typeof t=="object"?t.exports=i(PTe()):typeof define=="function"&&define.amd?define(["layout-base"],i):typeof e=="object"?e.coseBase=i(PTe()):r.coseBase=i(r.layoutBase)}),"webpackUniversalModuleDefinition")(e,function(r){return(function(i){var n={};function a(s){if(n[s])return n[s].exports;var l=n[s]={i:s,l:!1,exports:{}};return i[s].call(l.exports,l,l.exports,a),l.l=!0,l.exports}return o(a,"__webpack_require__"),a.m=i,a.c=n,a.i=function(s){return s},a.d=function(s,l,h){a.o(s,l)||Object.defineProperty(s,l,{configurable:!1,enumerable:!0,get:h})},a.n=function(s){var l=s&&s.__esModule?o(function(){return s.default},"getDefault"):o(function(){return s},"getModuleExports");return a.d(l,"a",l),l},a.o=function(s,l){return Object.prototype.hasOwnProperty.call(s,l)},a.p="",a(a.s=7)})([(function(i,n){i.exports=r}),(function(i,n,a){"use strict";var s=a(0).FDLayoutConstants;function l(){}o(l,"CoSEConstants");for(var h in s)l[h]=s[h];l.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,l.DEFAULT_RADIAL_SEPARATION=s.DEFAULT_EDGE_LENGTH,l.DEFAULT_COMPONENT_SEPERATION=60,l.TILE=!0,l.TILING_PADDING_VERTICAL=10,l.TILING_PADDING_HORIZONTAL=10,l.TREE_REDUCTION_ON_INCREMENTAL=!1,i.exports=l}),(function(i,n,a){"use strict";var s=a(0).FDLayoutEdge;function l(u,d,p){s.call(this,u,d,p)}o(l,"CoSEEdge"),l.prototype=Object.create(s.prototype);for(var h in s)l[h]=s[h];i.exports=l}),(function(i,n,a){"use strict";var s=a(0).LGraph;function l(u,d,p){s.call(this,u,d,p)}o(l,"CoSEGraph"),l.prototype=Object.create(s.prototype);for(var h in s)l[h]=s[h];i.exports=l}),(function(i,n,a){"use strict";var s=a(0).LGraphManager;function l(u){s.call(this,u)}o(l,"CoSEGraphManager"),l.prototype=Object.create(s.prototype);for(var h in s)l[h]=s[h];i.exports=l}),(function(i,n,a){"use strict";var s=a(0).FDLayoutNode,l=a(0).IMath;function h(d,p,f,g){s.call(this,d,p,f,g)}o(h,"CoSENode"),h.prototype=Object.create(s.prototype);for(var u in s)h[u]=s[u];h.prototype.move=function(){var d=this.graphManager.getLayout();this.displacementX=d.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY=d.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren,Math.abs(this.displacementX)>d.coolingFactor*d.maxNodeDisplacement&&(this.displacementX=d.coolingFactor*d.maxNodeDisplacement*l.sign(this.displacementX)),Math.abs(this.displacementY)>d.coolingFactor*d.maxNodeDisplacement&&(this.displacementY=d.coolingFactor*d.maxNodeDisplacement*l.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),d.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},h.prototype.propogateDisplacementToChildren=function(d,p){for(var f=this.getChild().getNodes(),g,m=0;m0)this.positionNodesRadially(L);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var w=new Set(this.getAllNodes()),_=this.nodesWithGravity.filter(function(M){return w.has(M)});this.graphManager.setAllNodesToApplyGravitation(_),this.positionNodesRandomly()}}return this.initSpringEmbedder(),this.runSpringEmbedder(),!0},C.prototype.tick=function(){if(this.totalIterations++,this.totalIterations===this.maxIterations&&!this.isTreeGrowing&&!this.isGrowthFinished)if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;if(this.totalIterations%f.CONVERGENCE_CHECK_PERIOD==0&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.isConverged())if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;this.coolingCycle++,this.layoutQuality==0?this.coolingAdjuster=this.coolingCycle:this.layoutQuality==1&&(this.coolingAdjuster=this.coolingCycle/3),this.coolingFactor=Math.max(this.initialCoolingFactor-Math.pow(this.coolingCycle,Math.log(100*(this.initialCoolingFactor-this.finalTemperature))/Math.log(this.maxCoolingCycle))/100*this.coolingAdjuster,this.finalTemperature),this.animationPeriod=Math.ceil(this.initialAnimationPeriod*Math.sqrt(this.coolingFactor))}if(this.isTreeGrowing){if(this.growTreeIterations%10==0)if(this.prunedNodesAll.length>0){this.graphManager.updateBounds(),this.updateGrid(),this.growTree(this.prunedNodesAll),this.graphManager.resetAllNodesToApplyGravitation();var w=new Set(this.getAllNodes()),_=this.nodesWithGravity.filter(function(D){return w.has(D)});this.graphManager.setAllNodesToApplyGravitation(_),this.graphManager.updateBounds(),this.updateGrid(),this.coolingFactor=f.DEFAULT_COOLING_FACTOR_INCREMENTAL}else this.isTreeGrowing=!1,this.isGrowthFinished=!0;this.growTreeIterations++}if(this.isGrowthFinished){if(this.isConverged())return!0;this.afterGrowthIterations%10==0&&(this.graphManager.updateBounds(),this.updateGrid()),this.coolingFactor=f.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var L=!this.isTreeGrowing&&!this.isGrowthFinished,N=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(L,N),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},C.prototype.getPositionsData=function(){for(var w=this.graphManager.getAllNodes(),_={},L=0;L1){var A;for(A=0;AN&&(N=Math.floor(B.y)),M=Math.floor(B.x+p.DEFAULT_COMPONENT_SEPERATION)}this.transform(new y(g.WORLD_CENTER_X-B.x/2,g.WORLD_CENTER_Y-B.y/2))},C.radialLayout=function(w,_,L){var N=Math.max(this.maxDiagonalInTree(w),p.DEFAULT_RADIAL_SEPARATION);C.branchRadialLayout(_,null,0,359,0,N);var D=x.calculateBounds(w),M=new k;M.setDeviceOrgX(D.getMinX()),M.setDeviceOrgY(D.getMinY()),M.setWorldOrgX(L.x),M.setWorldOrgY(L.y);for(var B=0;B1;){var J=W[0];W.splice(0,1);var H=F.indexOf(J);H>=0&&F.splice(H,1),q--,P--}_!=null?G=(F.indexOf(W[0])+1)%q:G=0;for(var Z=Math.abs(N-L)/P,se=G;z!=P;se=++se%q){var Q=F[se].getOtherEnd(w);if(Q!=_){var te=(L+z*Z)%360,re=(te+Z)%360;C.branchRadialLayout(Q,w,te,re,D+M,M),z++}}},C.maxDiagonalInTree=function(w){for(var _=v.MIN_VALUE,L=0;L_&&(_=D)}return _},C.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},C.prototype.groupZeroDegreeMembers=function(){var w=this,_={};this.memberGroups={},this.idToDummyNode={};for(var L=[],N=this.graphManager.getAllNodes(),D=0;D"u"&&(_[A]=[]),_[A]=_[A].concat(M)}Object.keys(_).forEach(function(I){if(_[I].length>1){var O="DummyCompound_"+I;w.memberGroups[O]=_[I];var R=_[I][0].getParent(),$=new u(w.graphManager);$.id=O,$.paddingLeft=R.paddingLeft||0,$.paddingRight=R.paddingRight||0,$.paddingBottom=R.paddingBottom||0,$.paddingTop=R.paddingTop||0,w.idToDummyNode[O]=$;var F=w.getGraphManager().add(w.newGraph(),$),P=R.getChild();P.add($);for(var z=0;z<_[I].length;z++){var q=_[I][z];P.remove(q),F.add(q)}}})},C.prototype.clearCompounds=function(){var w={},_={};this.performDFSOnCompounds();for(var L=0;L=0;w--){var _=this.compoundOrder[w],L=_.id,N=_.paddingLeft,D=_.paddingTop;this.adjustLocations(this.tiledMemberPack[L],_.rect.x,_.rect.y,N,D)}},C.prototype.repopulateZeroDegreeMembers=function(){var w=this,_=this.tiledZeroDegreePack;Object.keys(_).forEach(function(L){var N=w.idToDummyNode[L],D=N.paddingLeft,M=N.paddingTop;w.adjustLocations(_[L],N.rect.x,N.rect.y,D,M)})},C.prototype.getToBeTiled=function(w){var _=w.id;if(this.toBeTiled[_]!=null)return this.toBeTiled[_];var L=w.getChild();if(L==null)return this.toBeTiled[_]=!1,!1;for(var N=L.getNodes(),D=0;D0)return this.toBeTiled[_]=!1,!1;if(M.getChild()==null){this.toBeTiled[M.id]=!1;continue}if(!this.getToBeTiled(M))return this.toBeTiled[_]=!1,!1}return this.toBeTiled[_]=!0,!0},C.prototype.getNodeDegree=function(w){for(var _=w.id,L=w.getEdges(),N=0,D=0;DI&&(I=R.rect.height)}L+=I+w.verticalPadding}},C.prototype.tileCompoundMembers=function(w,_){var L=this;this.tiledMemberPack=[],Object.keys(w).forEach(function(N){var D=_[N];L.tiledMemberPack[N]=L.tileNodes(w[N],D.paddingLeft+D.paddingRight),D.rect.width=L.tiledMemberPack[N].width,D.rect.height=L.tiledMemberPack[N].height})},C.prototype.tileNodes=function(w,_){var L=p.TILING_PADDING_VERTICAL,N=p.TILING_PADDING_HORIZONTAL,D={rows:[],rowWidth:[],rowHeight:[],width:0,height:_,verticalPadding:L,horizontalPadding:N};w.sort(function(A,I){return A.rect.width*A.rect.height>I.rect.width*I.rect.height?-1:A.rect.width*A.rect.height0&&(B+=w.horizontalPadding),w.rowWidth[L]=B,w.width0&&(A+=w.verticalPadding);var I=0;A>w.rowHeight[L]&&(I=w.rowHeight[L],w.rowHeight[L]=A,I=w.rowHeight[L]-I),w.height+=I,w.rows[L].push(_)},C.prototype.getShortestRowIndex=function(w){for(var _=-1,L=Number.MAX_VALUE,N=0;NL&&(_=N,L=w.rowWidth[N]);return _},C.prototype.canAddHorizontal=function(w,_,L){var N=this.getShortestRowIndex(w);if(N<0)return!0;var D=w.rowWidth[N];if(D+w.horizontalPadding+_<=w.width)return!0;var M=0;w.rowHeight[N]0&&(M=L+w.verticalPadding-w.rowHeight[N]);var B;w.width-D>=_+w.horizontalPadding?B=(w.height+M)/(D+_+w.horizontalPadding):B=(w.height+M)/w.width,M=L+w.verticalPadding;var A;return w.width<_?A=(w.height+M)/_:A=(w.height+M)/w.width,A<1&&(A=1/A),B<1&&(B=1/B),BM&&_!=L){N.splice(-1,1),w.rows[L].push(D),w.rowWidth[_]=w.rowWidth[_]-M,w.rowWidth[L]=w.rowWidth[L]+M,w.width=w.rowWidth[instance.getLongestRowIndex(w)];for(var B=Number.MIN_VALUE,A=0;AB&&(B=N[A].height);_>0&&(B+=w.verticalPadding);var I=w.rowHeight[_]+w.rowHeight[L];w.rowHeight[_]=B,w.rowHeight[L]0)for(var P=D;P<=M;P++)F[0]+=this.grid[P][B-1].length+this.grid[P][B].length-1;if(M0)for(var P=B;P<=A;P++)F[3]+=this.grid[D-1][P].length+this.grid[D][P].length-1;for(var z=v.MAX_VALUE,q,G,W=0;W{"use strict";o((function(r,i){typeof e=="object"&&typeof t=="object"?t.exports=i(FTe()):typeof define=="function"&&define.amd?define(["cose-base"],i):typeof e=="object"?e.cytoscapeCoseBilkent=i(FTe()):r.cytoscapeCoseBilkent=i(r.coseBase)}),"webpackUniversalModuleDefinition")(e,function(r){return(function(i){var n={};function a(s){if(n[s])return n[s].exports;var l=n[s]={i:s,l:!1,exports:{}};return i[s].call(l.exports,l,l.exports,a),l.l=!0,l.exports}return o(a,"__webpack_require__"),a.m=i,a.c=n,a.i=function(s){return s},a.d=function(s,l,h){a.o(s,l)||Object.defineProperty(s,l,{configurable:!1,enumerable:!0,get:h})},a.n=function(s){var l=s&&s.__esModule?o(function(){return s.default},"getDefault"):o(function(){return s},"getModuleExports");return a.d(l,"a",l),l},a.o=function(s,l){return Object.prototype.hasOwnProperty.call(s,l)},a.p="",a(a.s=1)})([(function(i,n){i.exports=r}),(function(i,n,a){"use strict";var s=a(0).layoutBase.LayoutConstants,l=a(0).layoutBase.FDLayoutConstants,h=a(0).CoSEConstants,u=a(0).CoSELayout,d=a(0).CoSENode,p=a(0).layoutBase.PointD,f=a(0).layoutBase.DimensionD,g={ready:o(function(){},"ready"),stop:o(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 m(T,x){var k={};for(var C in T)k[C]=T[C];for(var C in x)k[C]=x[C];return k}o(m,"extend");function y(T){this.options=m(g,T),b(this.options)}o(y,"_CoSELayout");var b=o(function(T){T.nodeRepulsion!=null&&(h.DEFAULT_REPULSION_STRENGTH=l.DEFAULT_REPULSION_STRENGTH=T.nodeRepulsion),T.idealEdgeLength!=null&&(h.DEFAULT_EDGE_LENGTH=l.DEFAULT_EDGE_LENGTH=T.idealEdgeLength),T.edgeElasticity!=null&&(h.DEFAULT_SPRING_STRENGTH=l.DEFAULT_SPRING_STRENGTH=T.edgeElasticity),T.nestingFactor!=null&&(h.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=l.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=T.nestingFactor),T.gravity!=null&&(h.DEFAULT_GRAVITY_STRENGTH=l.DEFAULT_GRAVITY_STRENGTH=T.gravity),T.numIter!=null&&(h.MAX_ITERATIONS=l.MAX_ITERATIONS=T.numIter),T.gravityRange!=null&&(h.DEFAULT_GRAVITY_RANGE_FACTOR=l.DEFAULT_GRAVITY_RANGE_FACTOR=T.gravityRange),T.gravityCompound!=null&&(h.DEFAULT_COMPOUND_GRAVITY_STRENGTH=l.DEFAULT_COMPOUND_GRAVITY_STRENGTH=T.gravityCompound),T.gravityRangeCompound!=null&&(h.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=l.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=T.gravityRangeCompound),T.initialEnergyOnIncremental!=null&&(h.DEFAULT_COOLING_FACTOR_INCREMENTAL=l.DEFAULT_COOLING_FACTOR_INCREMENTAL=T.initialEnergyOnIncremental),T.quality=="draft"?s.QUALITY=0:T.quality=="proof"?s.QUALITY=2:s.QUALITY=1,h.NODE_DIMENSIONS_INCLUDE_LABELS=l.NODE_DIMENSIONS_INCLUDE_LABELS=s.NODE_DIMENSIONS_INCLUDE_LABELS=T.nodeDimensionsIncludeLabels,h.DEFAULT_INCREMENTAL=l.DEFAULT_INCREMENTAL=s.DEFAULT_INCREMENTAL=!T.randomize,h.ANIMATE=l.ANIMATE=s.ANIMATE=T.animate,h.TILE=T.tile,h.TILING_PADDING_VERTICAL=typeof T.tilingPaddingVertical=="function"?T.tilingPaddingVertical.call():T.tilingPaddingVertical,h.TILING_PADDING_HORIZONTAL=typeof T.tilingPaddingHorizontal=="function"?T.tilingPaddingHorizontal.call():T.tilingPaddingHorizontal},"getUserOptions");y.prototype.run=function(){var T,x,k=this.options,C=this.idToLNode={},E=this.layout=new u,w=this;w.stopped=!1,this.cy=this.options.cy,this.cy.trigger({type:"layoutstart",layout:this});var _=E.newGraphManager();this.gm=_;var L=this.options.eles.nodes(),N=this.options.eles.edges();this.root=_.addRoot(),this.processChildrenList(this.root,this.getTopMostNodes(L),E);for(var D=0;D0){var A;A=k.getGraphManager().add(k.newGraph(),L),this.processChildrenList(A,_,k)}}},y.prototype.stop=function(){return this.stopped=!0,this};var v=o(function(T){T("layout","cose-bilkent",y)},"register");typeof cytoscape<"u"&&v(cytoscape),i.exports=v})])})}),GXe=tn(jXe(),1);Go.use(GXe.default);o(zTe,"addNodes");o(qTe,"addEdges");o(jTe,"createCytoscapeInstance");o(GTe,"extractPositionedNodes");o(WTe,"extractPositionedEdges");o(UTe,"executeCoseBilkentLayout");o(VTe,"validateLayoutData");WXe=o(async(e,t,{insertCluster:r,insertEdge:i,insertEdgeLabel:n,insertMarkers:a,insertNode:s,log:l,positionEdgeLabel:h},{algorithm:u})=>{let d={},p={},f=t.select("g");a(f,e.markers,e.type,e.diagramId);let g=f.insert("g").attr("class","subgraphs"),m=f.insert("g").attr("class","edgePaths"),y=f.insert("g").attr("class","edgeLabels"),b=f.insert("g").attr("class","nodes");l.debug("Inserting nodes into DOM for dimension calculation"),await Promise.all(e.nodes.map(async x=>{if(x.isGroup){let k={...x};p[x.id]=k,d[x.id]=k,await r(g,x)}else{let k={...x};d[x.id]=k;let C=await s(b,x,{config:e.config,dir:e.direction||"TB"}),E=C.node().getBBox();k.width=E.width,k.height=E.height,k.domId=C,l.debug(`Node ${x.id} dimensions: ${E.width}x${E.height}`)}})),l.debug("Running cose-bilkent layout algorithm");let v={...e,nodes:e.nodes.map(x=>{let k=d[x.id];return{...x,width:k.width,height:k.height}})},T=await UTe(v,e.config);l.debug("Positioning nodes based on layout results"),T.nodes.forEach(x=>{let k=d[x.id];k?.domId&&(k.domId.attr("transform",`translate(${x.x}, ${x.y})`),k.x=x.x,k.y=x.y,l.debug(`Positioned node ${k.id} at center (${x.x}, ${x.y})`))}),T.edges.forEach(x=>{let k=e.edges.find(C=>C.id===x.id);k&&(k.points=[{x:x.startX,y:x.startY},{x:x.midX,y:x.midY},{x:x.endX,y:x.endY}])}),l.debug("Inserting and positioning edges"),await Promise.all(e.edges.map(async x=>{let k=await n(y,x),C=d[x.start??""],E=d[x.end??""];if(C&&E){let w=T.edges.find(_=>_.id===x.id);if(w){l.debug("APA01 positionedEdge",w);let _={...x},L=i(m,_,p,e.type,C,E,e.diagramId);h(_,L)}else{let _={...x,points:[{x:C.x||0,y:C.y||0},{x:E.x||0,y:E.y||0}]},L=i(m,_,p,e.type,C,E,e.diagramId);h(_,L)}}})),l.debug("Cose-bilkent rendering completed")},"render"),UXe=WXe});var VXe,ub,MN,YXe,Wo,Ec,js=Tt(()=>{Bs();ha();Or();tr();Zt();vt();VXe={common:ft,getConfig:Rt,insertCluster:Vu,insertEdge:F0,insertEdgeLabel:jp,insertMarkers:z0,insertNode:wh,interpolateToCurve:y3,labelHelper:dr,log:ee,positionEdgeLabel:P3},ub={},MN=o(e=>{for(let t of e)ub[t.name]=t},"registerLayoutLoaders"),YXe=o(()=>{MN([{name:"dagre",loader:o(async()=>await Promise.resolve().then(()=>(yme(),mme)),"loader")},{name:"swimlane",loader:o(async()=>await Promise.resolve().then(()=>(uye(),hye)),"loader")},{name:"cose-bilkent",loader:o(async()=>await Promise.resolve().then(()=>(HTe(),YTe)),"loader")}])},"registerDefaultLayoutLoaders");YXe();Wo=o(async(e,t,r)=>{if(!(e.layoutAlgorithm in ub))throw new Error(`Unknown layout algorithm: ${e.layoutAlgorithm}`);if(e.diagramId)for(let p of e.nodes){let f=p.domId||p.id;p.domId=`${e.diagramId}-${f}`}let i=ub[e.layoutAlgorithm],n=await i.loader(),{theme:a,themeVariables:s}=e.config,{useGradient:l,gradientStart:h,gradientStop:u}=s,d=t.attr("id");if(t.append("defs").append("filter").attr("id",`${d}-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",`${a?.includes("dark")?"#FFFFFF":"#000000"}`),t.append("defs").append("filter").attr("id",`${d}-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",`${a?.includes("dark")?"#FFFFFF":"#000000"}`),l){let p=t.append("linearGradient").attr("id",t.attr("id")+"-gradient").attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");p.append("svg:stop").attr("offset","0%").attr("stop-color",h).attr("stop-opacity",1),p.append("svg:stop").attr("offset","100%").attr("stop-color",u).attr("stop-opacity",1)}return n.render(e,t,VXe,{algorithm:i.algorithm},r)},"render"),Ec=o((e="",{fallback:t="dagre"}={})=>{if(e in ub)return e;if(t in ub)return ee.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 XTe,Rf,Ww,KTe,Uw,Vw,Za,Yw,Rm,po=Tt(()=>{Yr();tr();Zt();vt();XTe=tn(dc(),1),Rf=o((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 i in t.attrs)r.attr(i,t.attrs[i]);return t.class&&r.attr("class",t.class),r},"drawRect"),Ww=o((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"};Rf(e,r).lower()},"drawBackgroundRect"),KTe=o((e,t)=>{let r=t.text.replace(Sp," "),i=e.append("text");i.attr("x",t.x),i.attr("y",t.y),i.attr("class","legend"),i.style("text-anchor",t.anchor),t.class&&i.attr("class",t.class);let n=i.append("tspan");return n.attr("x",t.x+t.textMargin*2),n.text(r),i},"drawText"),Uw=o((e,t,r,i)=>{let n=e.append("image");n.attr("x",t),n.attr("y",r);let a=(0,XTe.sanitizeUrl)(i);n.attr("xlink:href",a)},"drawImage"),Vw=o((e,t,r,i)=>{let n=e.append("use");n.attr("x",t),n.attr("y",r);let a=(0,XTe.sanitizeUrl)(i);n.attr("xlink:href",`#${a}`)},"drawEmbeddedImage"),Za=o(()=>({x:0,y:0,width:100,height:100,fill:"#EDF2AE",stroke:"#666",anchor:"start",rx:0,ry:0}),"getNoteRect"),Yw=o(()=>({x:0,y:0,width:100,height:100,"text-anchor":"start",style:"#666",textMargin:0,rx:0,ry:0,tspan:!0}),"getTextObj"),Rm=o(()=>{let e=tt(".mermaidTooltip");return e.empty()&&(e=tt("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 o4e={};Kt(o4e,{diagram:()=>qKe});function Vo(e,t,r,i,n){if(!t[e].width)if(r)t[e].text=Op(t[e].text,n,i),t[e].textLines=t[e].text.split(ft.lineBreakRegex).length,t[e].width=n,t[e].height=V2(t[e].text,i);else{let a=t[e].text.split(ft.lineBreakRegex);t[e].textLines=a.length;let s=0;t[e].height=0,t[e].width=0;for(let l of a)t[e].width=Math.max(oa(l,i),t[e].width),s=V2(l,i),t[e].height=t[e].height+s}}function qN(e,t,r,i,n){let a=new n4e(n);a.data.widthLimit=r.data.widthLimit/Math.min(ON,i.length);for(let[s,l]of i.entries()){let h=0;l.image={width:0,height:0,Y:0},l.sprite&&(l.image.width=48,l.image.height=48,l.image.Y=h,h=l.image.Y+l.image.height);let u=l.wrap&&Ht.wrap,d=Hw(Ht);if(d.fontSize=d.fontSize+2,d.fontWeight="bold",Vo("label",l,u,d,a.data.widthLimit),l.label.Y=h+8,h=l.label.Y+l.label.height,l.type&&l.type.text!==""){l.type.text="["+l.type.text+"]";let m=Hw(Ht);Vo("type",l,u,m,a.data.widthLimit),l.type.Y=h+5,h=l.type.Y+l.type.height}if(l.descr&&l.descr.text!==""){let m=Hw(Ht);m.fontSize=m.fontSize-2,Vo("descr",l,u,m,a.data.widthLimit),l.descr.Y=h+20,h=l.descr.Y+l.descr.height}if(s==0||s%ON===0){let m=r.data.startx+Ht.diagramMarginX,y=r.data.stopy+Ht.diagramMarginY+h;a.setData(m,m,y,y)}else{let m=a.data.stopx!==a.data.startx?a.data.stopx+Ht.diagramMarginX:a.data.startx,y=a.data.starty;a.setData(m,m,y,y)}a.name=l.alias;let p=n.db.getC4ShapeArray(l.alias),f=n.db.getC4ShapeKeys(l.alias);f.length>0&&s4e(a,e,p,f),t=l.alias;let g=n.db.getBoundaries(t);g.length>0&&qN(e,t,a,g,n),l.alias!=="global"&&a4e(e,l,a),r.data.stopy=Math.max(a.data.stopy+Ht.c4ShapeMargin,r.data.stopy),r.data.stopx=Math.max(a.data.stopx+Ht.c4ShapeMargin,r.data.stopx),Qw=Math.max(Qw,r.data.stopx),Jw=Math.max(Jw,r.data.stopy)}}var Xw,HXe,Dl,bd,vs,Il,_c,pb,PN,FN,Kw,Zw,JTe,XXe,KXe,ZXe,QXe,JXe,eKe,tKe,rKe,iKe,nKe,aKe,sKe,oKe,lKe,cKe,hKe,uKe,e4e,dKe,pKe,t4e,fKe,gKe,mKe,yKe,xd,vKe,bKe,xKe,TKe,kKe,NN,CKe,zN,r4e,wKe,EKe,SKe,_Ke,AKe,RKe,LKe,$Ke,IKe,DKe,MKe,Ph,Sc,Qw,Jw,i4e,ON,Ht,n4e,BN,db,Hw,NKe,a4e,s4e,Uo,ZTe,OKe,BKe,PKe,QTe,FKe,zKe,qKe,l4e=Tt(()=>{po();Or();Yr();tr();Zt();vt();Xw=(function(){var e=o(function(ce,ge,be,ke){for(be=be||{},ke=ce.length;ke--;be[ce[ke]]=ge);return be},"o"),t=[1,24],r=[1,25],i=[1,26],n=[1,27],a=[1,28],s=[1,63],l=[1,64],h=[1,65],u=[1,66],d=[1,67],p=[1,68],f=[1,69],g=[1,29],m=[1,30],y=[1,31],b=[1,32],v=[1,33],T=[1,34],x=[1,35],k=[1,36],C=[1,37],E=[1,38],w=[1,39],_=[1,40],L=[1,41],N=[1,42],D=[1,43],M=[1,44],B=[1,45],A=[1,46],I=[1,47],O=[1,48],R=[1,50],$=[1,51],F=[1,52],P=[1,53],z=[1,54],q=[1,55],G=[1,56],W=[1,57],J=[1,58],H=[1,59],Z=[1,60],se=[14,42],Q=[14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],te=[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],re=[1,82],ne=[1,83],Ae=[1,84],ie=[1,85],me=[12,14,42],oe=[12,14,33,42],we=[12,14,33,42,76,77,79,80],ye=[12,33],ve=[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],ae={trace:o(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:o(function(ce,ge,be,ke,Me,pe,Oe){var j=pe.length-1;switch(Me){case 3:ke.setDirection("TB");break;case 4:ke.setDirection("BT");break;case 5:ke.setDirection("RL");break;case 6:ke.setDirection("LR");break;case 8:case 9:case 10:case 11:case 12:ke.setC4Type(pe[j-3]);break;case 19:ke.setTitle(pe[j].substring(6)),this.$=pe[j].substring(6);break;case 20:ke.setAccDescription(pe[j].substring(15)),this.$=pe[j].substring(15);break;case 21:this.$=pe[j].trim(),ke.setTitle(this.$);break;case 22:case 23:this.$=pe[j].trim(),ke.setAccDescription(this.$);break;case 28:pe[j].splice(2,0,"ENTERPRISE"),ke.addPersonOrSystemBoundary(...pe[j]),this.$=pe[j];break;case 29:pe[j].splice(2,0,"SYSTEM"),ke.addPersonOrSystemBoundary(...pe[j]),this.$=pe[j];break;case 30:ke.addPersonOrSystemBoundary(...pe[j]),this.$=pe[j];break;case 31:pe[j].splice(2,0,"CONTAINER"),ke.addContainerBoundary(...pe[j]),this.$=pe[j];break;case 32:ke.addDeploymentNode("node",...pe[j]),this.$=pe[j];break;case 33:ke.addDeploymentNode("nodeL",...pe[j]),this.$=pe[j];break;case 34:ke.addDeploymentNode("nodeR",...pe[j]),this.$=pe[j];break;case 35:ke.popBoundaryParseStack();break;case 39:ke.addPersonOrSystem("person",...pe[j]),this.$=pe[j];break;case 40:ke.addPersonOrSystem("external_person",...pe[j]),this.$=pe[j];break;case 41:ke.addPersonOrSystem("system",...pe[j]),this.$=pe[j];break;case 42:ke.addPersonOrSystem("system_db",...pe[j]),this.$=pe[j];break;case 43:ke.addPersonOrSystem("system_queue",...pe[j]),this.$=pe[j];break;case 44:ke.addPersonOrSystem("external_system",...pe[j]),this.$=pe[j];break;case 45:ke.addPersonOrSystem("external_system_db",...pe[j]),this.$=pe[j];break;case 46:ke.addPersonOrSystem("external_system_queue",...pe[j]),this.$=pe[j];break;case 47:ke.addContainer("container",...pe[j]),this.$=pe[j];break;case 48:ke.addContainer("container_db",...pe[j]),this.$=pe[j];break;case 49:ke.addContainer("container_queue",...pe[j]),this.$=pe[j];break;case 50:ke.addContainer("external_container",...pe[j]),this.$=pe[j];break;case 51:ke.addContainer("external_container_db",...pe[j]),this.$=pe[j];break;case 52:ke.addContainer("external_container_queue",...pe[j]),this.$=pe[j];break;case 53:ke.addComponent("component",...pe[j]),this.$=pe[j];break;case 54:ke.addComponent("component_db",...pe[j]),this.$=pe[j];break;case 55:ke.addComponent("component_queue",...pe[j]),this.$=pe[j];break;case 56:ke.addComponent("external_component",...pe[j]),this.$=pe[j];break;case 57:ke.addComponent("external_component_db",...pe[j]),this.$=pe[j];break;case 58:ke.addComponent("external_component_queue",...pe[j]),this.$=pe[j];break;case 60:ke.addRel("rel",...pe[j]),this.$=pe[j];break;case 61:ke.addRel("birel",...pe[j]),this.$=pe[j];break;case 62:ke.addRel("rel_u",...pe[j]),this.$=pe[j];break;case 63:ke.addRel("rel_d",...pe[j]),this.$=pe[j];break;case 64:ke.addRel("rel_l",...pe[j]),this.$=pe[j];break;case 65:ke.addRel("rel_r",...pe[j]),this.$=pe[j];break;case 66:ke.addRel("rel_b",...pe[j]),this.$=pe[j];break;case 67:pe[j].splice(0,1),ke.addRel("rel",...pe[j]),this.$=pe[j];break;case 68:ke.updateElStyle("update_el_style",...pe[j]),this.$=pe[j];break;case 69:ke.updateRelStyle("update_rel_style",...pe[j]),this.$=pe[j];break;case 70:ke.updateLayoutConfig("update_layout_config",...pe[j]),this.$=pe[j];break;case 71:this.$=[pe[j]];break;case 72:pe[j].unshift(pe[j-1]),this.$=pe[j];break;case 73:case 75:this.$=pe[j].trim();break;case 74:let le={};le[pe[j-1].trim()]=pe[j].trim(),this.$=le;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:i,26:n,28:a,29:49,30:61,32:62,34:s,36:l,37:h,38:u,39:d,40:p,41:f,43:23,44:g,45:m,46:y,47:b,48:v,49:T,50:x,51:k,52:C,53:E,54:w,55:_,56:L,57:N,58:D,59:M,60:B,61:A,62:I,63:O,64:R,65:$,66:F,67:P,68:z,69:q,70:G,71:W,72:J,73:H,74:Z},{13:70,19:20,20:21,21:22,22:t,23:r,24:i,26:n,28:a,29:49,30:61,32:62,34:s,36:l,37:h,38:u,39:d,40:p,41:f,43:23,44:g,45:m,46:y,47:b,48:v,49:T,50:x,51:k,52:C,53:E,54:w,55:_,56:L,57:N,58:D,59:M,60:B,61:A,62:I,63:O,64:R,65:$,66:F,67:P,68:z,69:q,70:G,71:W,72:J,73:H,74:Z},{13:71,19:20,20:21,21:22,22:t,23:r,24:i,26:n,28:a,29:49,30:61,32:62,34:s,36:l,37:h,38:u,39:d,40:p,41:f,43:23,44:g,45:m,46:y,47:b,48:v,49:T,50:x,51:k,52:C,53:E,54:w,55:_,56:L,57:N,58:D,59:M,60:B,61:A,62:I,63:O,64:R,65:$,66:F,67:P,68:z,69:q,70:G,71:W,72:J,73:H,74:Z},{13:72,19:20,20:21,21:22,22:t,23:r,24:i,26:n,28:a,29:49,30:61,32:62,34:s,36:l,37:h,38:u,39:d,40:p,41:f,43:23,44:g,45:m,46:y,47:b,48:v,49:T,50:x,51:k,52:C,53:E,54:w,55:_,56:L,57:N,58:D,59:M,60:B,61:A,62:I,63:O,64:R,65:$,66:F,67:P,68:z,69:q,70:G,71:W,72:J,73:H,74:Z},{13:73,19:20,20:21,21:22,22:t,23:r,24:i,26:n,28:a,29:49,30:61,32:62,34:s,36:l,37:h,38:u,39:d,40:p,41:f,43:23,44:g,45:m,46:y,47:b,48:v,49:T,50:x,51:k,52:C,53:E,54:w,55:_,56:L,57:N,58:D,59:M,60:B,61:A,62:I,63:O,64:R,65:$,66:F,67:P,68:z,69:q,70:G,71:W,72:J,73:H,74:Z},{14:[1,74]},e(se,[2,13],{43:23,29:49,30:61,32:62,20:75,34:s,36:l,37:h,38:u,39:d,40:p,41:f,44:g,45:m,46:y,47:b,48:v,49:T,50:x,51:k,52:C,53:E,54:w,55:_,56:L,57:N,58:D,59:M,60:B,61:A,62:I,63:O,64:R,65:$,66:F,67:P,68:z,69:q,70:G,71:W,72:J,73:H,74:Z}),e(se,[2,14]),e(Q,[2,16],{12:[1,76]}),e(se,[2,36],{12:[1,77]}),e(te,[2,19]),e(te,[2,20]),{25:[1,78]},{27:[1,79]},e(te,[2,23]),{35:80,75:81,76:re,77:ne,79:Ae,80:ie},{35:86,75:81,76:re,77:ne,79:Ae,80:ie},{35:87,75:81,76:re,77:ne,79:Ae,80:ie},{35:88,75:81,76:re,77:ne,79:Ae,80:ie},{35:89,75:81,76:re,77:ne,79:Ae,80:ie},{35:90,75:81,76:re,77:ne,79:Ae,80:ie},{35:91,75:81,76:re,77:ne,79:Ae,80:ie},{35:92,75:81,76:re,77:ne,79:Ae,80:ie},{35:93,75:81,76:re,77:ne,79:Ae,80:ie},{35:94,75:81,76:re,77:ne,79:Ae,80:ie},{35:95,75:81,76:re,77:ne,79:Ae,80:ie},{35:96,75:81,76:re,77:ne,79:Ae,80:ie},{35:97,75:81,76:re,77:ne,79:Ae,80:ie},{35:98,75:81,76:re,77:ne,79:Ae,80:ie},{35:99,75:81,76:re,77:ne,79:Ae,80:ie},{35:100,75:81,76:re,77:ne,79:Ae,80:ie},{35:101,75:81,76:re,77:ne,79:Ae,80:ie},{35:102,75:81,76:re,77:ne,79:Ae,80:ie},{35:103,75:81,76:re,77:ne,79:Ae,80:ie},{35:104,75:81,76:re,77:ne,79:Ae,80:ie},e(me,[2,59]),{35:105,75:81,76:re,77:ne,79:Ae,80:ie},{35:106,75:81,76:re,77:ne,79:Ae,80:ie},{35:107,75:81,76:re,77:ne,79:Ae,80:ie},{35:108,75:81,76:re,77:ne,79:Ae,80:ie},{35:109,75:81,76:re,77:ne,79:Ae,80:ie},{35:110,75:81,76:re,77:ne,79:Ae,80:ie},{35:111,75:81,76:re,77:ne,79:Ae,80:ie},{35:112,75:81,76:re,77:ne,79:Ae,80:ie},{35:113,75:81,76:re,77:ne,79:Ae,80:ie},{35:114,75:81,76:re,77:ne,79:Ae,80:ie},{35:115,75:81,76:re,77:ne,79:Ae,80:ie},{20:116,29:49,30:61,32:62,34:s,36:l,37:h,38:u,39:d,40:p,41:f,43:23,44:g,45:m,46:y,47:b,48:v,49:T,50:x,51:k,52:C,53:E,54:w,55:_,56:L,57:N,58:D,59:M,60:B,61:A,62:I,63:O,64:R,65:$,66:F,67:P,68:z,69:q,70:G,71:W,72:J,73:H,74:Z},{12:[1,118],33:[1,117]},{35:119,75:81,76:re,77:ne,79:Ae,80:ie},{35:120,75:81,76:re,77:ne,79:Ae,80:ie},{35:121,75:81,76:re,77:ne,79:Ae,80:ie},{35:122,75:81,76:re,77:ne,79:Ae,80:ie},{35:123,75:81,76:re,77:ne,79:Ae,80:ie},{35:124,75:81,76:re,77:ne,79:Ae,80:ie},{35:125,75:81,76:re,77:ne,79:Ae,80:ie},{14:[1,126]},{14:[1,127]},{14:[1,128]},{14:[1,129]},{1:[2,8]},e(se,[2,15]),e(Q,[2,17],{21:22,19:130,22:t,23:r,24:i,26:n,28:a}),e(se,[2,37],{19:20,20:21,21:22,43:23,29:49,30:61,32:62,13:131,22:t,23:r,24:i,26:n,28:a,34:s,36:l,37:h,38:u,39:d,40:p,41:f,44:g,45:m,46:y,47:b,48:v,49:T,50:x,51:k,52:C,53:E,54:w,55:_,56:L,57:N,58:D,59:M,60:B,61:A,62:I,63:O,64:R,65:$,66:F,67:P,68:z,69:q,70:G,71:W,72:J,73:H,74:Z}),e(te,[2,21]),e(te,[2,22]),e(me,[2,39]),e(oe,[2,71],{75:81,35:132,76:re,77:ne,79:Ae,80:ie}),e(we,[2,73]),{78:[1,133]},e(we,[2,75]),e(we,[2,76]),e(me,[2,40]),e(me,[2,41]),e(me,[2,42]),e(me,[2,43]),e(me,[2,44]),e(me,[2,45]),e(me,[2,46]),e(me,[2,47]),e(me,[2,48]),e(me,[2,49]),e(me,[2,50]),e(me,[2,51]),e(me,[2,52]),e(me,[2,53]),e(me,[2,54]),e(me,[2,55]),e(me,[2,56]),e(me,[2,57]),e(me,[2,58]),e(me,[2,60]),e(me,[2,61]),e(me,[2,62]),e(me,[2,63]),e(me,[2,64]),e(me,[2,65]),e(me,[2,66]),e(me,[2,67]),e(me,[2,68]),e(me,[2,69]),e(me,[2,70]),{31:134,42:[1,135]},{12:[1,136]},{33:[1,137]},e(ye,[2,28]),e(ye,[2,29]),e(ye,[2,30]),e(ye,[2,31]),e(ye,[2,32]),e(ye,[2,33]),e(ye,[2,34]),{1:[2,9]},{1:[2,10]},{1:[2,11]},{1:[2,12]},e(Q,[2,18]),e(se,[2,38]),e(oe,[2,72]),e(we,[2,74]),e(me,[2,24]),e(me,[2,35]),e(ve,[2,25]),e(ve,[2,26],{12:[1,138]}),e(ve,[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:o(function(ce,ge){if(ge.recoverable)this.trace(ce);else{var be=new Error(ce);throw be.hash=ge,be}},"parseError"),parse:o(function(ce){var ge=this,be=[0],ke=[],Me=[null],pe=[],Oe=this.table,j="",le=0,U=0,fe=0,Y=2,Le=1,xe=pe.slice.call(arguments,1),je=Object.create(this.lexer),Ie={yy:{}};for(var Ve in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Ve)&&(Ie.yy[Ve]=this.yy[Ve]);je.setInput(ce,Ie.yy),Ie.yy.lexer=je,Ie.yy.parser=this,typeof je.yylloc>"u"&&(je.yylloc={});var Ne=je.yylloc;pe.push(Ne);var Ge=je.options&&je.options.ranges;typeof Ie.yy.parseError=="function"?this.parseError=Ie.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ze(nt){be.length=be.length-2*nt,Me.length=Me.length-nt,pe.length=pe.length-nt}o(ze,"popStack");function Ue(){var nt;return nt=ke.pop()||je.lex()||Le,typeof nt!="number"&&(nt instanceof Array&&(ke=nt,nt=ke.pop()),nt=ge.symbols_[nt]||nt),nt}o(Ue,"lex");for(var Ce,ct,Se,at,dt,gt,Ct={},kt,$t,ut,de;;){if(Se=be[be.length-1],this.defaultActions[Se]?at=this.defaultActions[Se]:((Ce===null||typeof Ce>"u")&&(Ce=Ue()),at=Oe[Se]&&Oe[Se][Ce]),typeof at>"u"||!at.length||!at[0]){var st="";de=[];for(kt in Oe[Se])this.terminals_[kt]&&kt>Y&&de.push("'"+this.terminals_[kt]+"'");je.showPosition?st="Parse error on line "+(le+1)+`: +`+je.showPosition()+` +Expecting `+de.join(", ")+", got '"+(this.terminals_[Ce]||Ce)+"'":st="Parse error on line "+(le+1)+": Unexpected "+(Ce==Le?"end of input":"'"+(this.terminals_[Ce]||Ce)+"'"),this.parseError(st,{text:je.match,token:this.terminals_[Ce]||Ce,line:je.yylineno,loc:Ne,expected:de})}if(at[0]instanceof Array&&at.length>1)throw new Error("Parse Error: multiple actions possible at state: "+Se+", token: "+Ce);switch(at[0]){case 1:be.push(Ce),Me.push(je.yytext),pe.push(je.yylloc),be.push(at[1]),Ce=null,ct?(Ce=ct,ct=null):(U=je.yyleng,j=je.yytext,le=je.yylineno,Ne=je.yylloc,fe>0&&fe--);break;case 2:if($t=this.productions_[at[1]][1],Ct.$=Me[Me.length-$t],Ct._$={first_line:pe[pe.length-($t||1)].first_line,last_line:pe[pe.length-1].last_line,first_column:pe[pe.length-($t||1)].first_column,last_column:pe[pe.length-1].last_column},Ge&&(Ct._$.range=[pe[pe.length-($t||1)].range[0],pe[pe.length-1].range[1]]),gt=this.performAction.apply(Ct,[j,U,le,Ie.yy,at[1],Me,pe].concat(xe)),typeof gt<"u")return gt;$t&&(be=be.slice(0,-1*$t*2),Me=Me.slice(0,-1*$t),pe=pe.slice(0,-1*$t)),be.push(this.productions_[at[1]][0]),Me.push(Ct.$),pe.push(Ct._$),ut=Oe[be[be.length-2]][be[be.length-1]],be.push(ut);break;case 3:return!0}}return!0},"parse")},Pe=(function(){var ce={EOF:1,parseError:o(function(ge,be){if(this.yy.parser)this.yy.parser.parseError(ge,be);else throw new Error(ge)},"parseError"),setInput:o(function(ge,be){return this.yy=be||this.yy||{},this._input=ge,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:o(function(){var ge=this._input[0];this.yytext+=ge,this.yyleng++,this.offset++,this.match+=ge,this.matched+=ge;var be=ge.match(/(?:\r\n?|\n).*/g);return be?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),ge},"input"),unput:o(function(ge){var be=ge.length,ke=ge.split(/(?:\r\n?|\n)/g);this._input=ge+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-be),this.offset-=be;var Me=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),ke.length-1&&(this.yylineno-=ke.length-1);var pe=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:ke?(ke.length===Me.length?this.yylloc.first_column:0)+Me[Me.length-ke.length].length-ke[0].length:this.yylloc.first_column-be},this.options.ranges&&(this.yylloc.range=[pe[0],pe[0]+this.yyleng-be]),this.yyleng=this.yytext.length,this},"unput"),more:o(function(){return this._more=!0,this},"more"),reject:o(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:o(function(ge){this.unput(this.match.slice(ge))},"less"),pastInput:o(function(){var ge=this.matched.substr(0,this.matched.length-this.match.length);return(ge.length>20?"...":"")+ge.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:o(function(){var ge=this.match;return ge.length<20&&(ge+=this._input.substr(0,20-ge.length)),(ge.substr(0,20)+(ge.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:o(function(){var ge=this.pastInput(),be=new Array(ge.length+1).join("-");return ge+this.upcomingInput()+` +`+be+"^"},"showPosition"),test_match:o(function(ge,be){var ke,Me,pe;if(this.options.backtrack_lexer&&(pe={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&&(pe.yylloc.range=this.yylloc.range.slice(0))),Me=ge[0].match(/(?:\r\n?|\n).*/g),Me&&(this.yylineno+=Me.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:Me?Me[Me.length-1].length-Me[Me.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+ge[0].length},this.yytext+=ge[0],this.match+=ge[0],this.matches=ge,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(ge[0].length),this.matched+=ge[0],ke=this.performAction.call(this,this.yy,this,be,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),ke)return ke;if(this._backtrack){for(var Oe in pe)this[Oe]=pe[Oe];return!1}return!1},"test_match"),next:o(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var ge,be,ke,Me;this._more||(this.yytext="",this.match="");for(var pe=this._currentRules(),Oe=0;Oebe[0].length)){if(be=ke,Me=Oe,this.options.backtrack_lexer){if(ge=this.test_match(ke,pe[Oe]),ge!==!1)return ge;if(this._backtrack){be=!1;continue}else return!1}else if(!this.options.flex)break}return be?(ge=this.test_match(be,pe[Me]),ge!==!1?ge:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:o(function(){var ge=this.next();return ge||this.lex()},"lex"),begin:o(function(ge){this.conditionStack.push(ge)},"begin"),popState:o(function(){var ge=this.conditionStack.length-1;return ge>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:o(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:o(function(ge){return ge=this.conditionStack.length-1-Math.abs(ge||0),ge>=0?this.conditionStack[ge]:"INITIAL"},"topState"),pushState:o(function(ge){this.begin(ge)},"pushState"),stateStackSize:o(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:o(function(ge,be,ke,Me){var pe=Me;switch(ke){case 0:return 6;case 1:return 7;case 2:return 8;case 3:return 9;case 4:return 22;case 5:return 23;case 6:return this.begin("acc_title"),24;case 7:return this.popState(),"acc_title_value";case 8:return this.begin("acc_descr"),26;case 9:return this.popState(),"acc_descr_value";case 10:this.begin("acc_descr_multiline");break;case 11:this.popState();break;case 12:return"acc_descr_multiline_value";case 13:break;case 14:c;break;case 15:return 12;case 16:break;case 17:return 11;case 18:return 15;case 19:return 16;case 20:return 17;case 21:return 18;case 22:return this.begin("person_ext"),45;case 23:return this.begin("person"),44;case 24:return this.begin("system_ext_queue"),51;case 25:return this.begin("system_ext_db"),50;case 26:return this.begin("system_ext"),49;case 27:return this.begin("system_queue"),48;case 28:return this.begin("system_db"),47;case 29:return this.begin("system"),46;case 30:return this.begin("boundary"),37;case 31:return this.begin("enterprise_boundary"),34;case 32:return this.begin("system_boundary"),36;case 33:return this.begin("container_ext_queue"),57;case 34:return this.begin("container_ext_db"),56;case 35:return this.begin("container_ext"),55;case 36:return this.begin("container_queue"),54;case 37:return this.begin("container_db"),53;case 38:return this.begin("container"),52;case 39:return this.begin("container_boundary"),38;case 40:return this.begin("component_ext_queue"),63;case 41:return this.begin("component_ext_db"),62;case 42:return this.begin("component_ext"),61;case 43:return this.begin("component_queue"),60;case 44:return this.begin("component_db"),59;case 45:return this.begin("component"),58;case 46:return this.begin("node"),39;case 47:return this.begin("node"),39;case 48:return this.begin("node_l"),40;case 49:return this.begin("node_r"),41;case 50:return this.begin("rel"),64;case 51:return this.begin("birel"),65;case 52:return this.begin("rel_u"),66;case 53:return this.begin("rel_u"),66;case 54:return this.begin("rel_d"),67;case 55:return this.begin("rel_d"),67;case 56:return this.begin("rel_l"),68;case 57:return this.begin("rel_l"),68;case 58:return this.begin("rel_r"),69;case 59:return this.begin("rel_r"),69;case 60:return this.begin("rel_b"),70;case 61:return this.begin("rel_index"),71;case 62:return this.begin("update_el_style"),72;case 63:return this.begin("update_rel_style"),73;case 64:return this.begin("update_layout_config"),74;case 65:return"EOF_IN_STRUCT";case 66:return this.begin("attribute"),"ATTRIBUTE_EMPTY";case 67:this.begin("attribute");break;case 68:this.popState(),this.popState();break;case 69:return 80;case 70:break;case 71:return 80;case 72:this.begin("string");break;case 73:this.popState();break;case 74:return"STR";case 75:this.begin("string_kv");break;case 76:return this.begin("string_kv_key"),"STR_KEY";case 77:this.popState(),this.begin("string_kv_value");break;case 78:return"STR_VALUE";case 79:this.popState(),this.popState();break;case 80:return"STR";case 81:return"LBRACE";case 82:return"RBRACE";case 83:return"SPACE";case 84:return"EOL";case 85:return 14}},"anonymous"),rules:[/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:title\s[^#\n;]+)/,/^(?:accDescription\s[^#\n;]+)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:%%(?!\{)*[^\n]*(\r?\n?)+)/,/^(?:%%[^\n]*(\r?\n)*)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:C4Context\b)/,/^(?:C4Container\b)/,/^(?:C4Component\b)/,/^(?:C4Dynamic\b)/,/^(?:C4Deployment\b)/,/^(?:Person_Ext\b)/,/^(?:Person\b)/,/^(?:SystemQueue_Ext\b)/,/^(?:SystemDb_Ext\b)/,/^(?:System_Ext\b)/,/^(?:SystemQueue\b)/,/^(?:SystemDb\b)/,/^(?:System\b)/,/^(?:Boundary\b)/,/^(?:Enterprise_Boundary\b)/,/^(?:System_Boundary\b)/,/^(?:ContainerQueue_Ext\b)/,/^(?:ContainerDb_Ext\b)/,/^(?:Container_Ext\b)/,/^(?:ContainerQueue\b)/,/^(?:ContainerDb\b)/,/^(?:Container\b)/,/^(?:Container_Boundary\b)/,/^(?:ComponentQueue_Ext\b)/,/^(?:ComponentDb_Ext\b)/,/^(?:Component_Ext\b)/,/^(?:ComponentQueue\b)/,/^(?:ComponentDb\b)/,/^(?:Component\b)/,/^(?:Deployment_Node\b)/,/^(?:Node\b)/,/^(?:Node_L\b)/,/^(?:Node_R\b)/,/^(?:Rel\b)/,/^(?:BiRel\b)/,/^(?:Rel_Up\b)/,/^(?:Rel_U\b)/,/^(?:Rel_Down\b)/,/^(?:Rel_D\b)/,/^(?:Rel_Left\b)/,/^(?:Rel_L\b)/,/^(?:Rel_Right\b)/,/^(?:Rel_R\b)/,/^(?:Rel_Back\b)/,/^(?:RelIndex\b)/,/^(?:UpdateElementStyle\b)/,/^(?:UpdateRelStyle\b)/,/^(?:UpdateLayoutConfig\b)/,/^(?:$)/,/^(?:[(][ ]*[,])/,/^(?:[(])/,/^(?:[)])/,/^(?:,,)/,/^(?:,)/,/^(?:[ ]*["]["])/,/^(?:[ ]*["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:[ ]*[\$])/,/^(?:[^=]*)/,/^(?:[=][ ]*["])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:[^,]+)/,/^(?:\{)/,/^(?:\})/,/^(?:[\s]+)/,/^(?:[\n\r]+)/,/^(?:$)/],conditions:{acc_descr_multiline:{rules:[11,12],inclusive:!1},acc_descr:{rules:[9],inclusive:!1},acc_title:{rules:[7],inclusive:!1},string_kv_value:{rules:[78,79],inclusive:!1},string_kv_key:{rules:[77],inclusive:!1},string_kv:{rules:[76],inclusive:!1},string:{rules:[73,74],inclusive:!1},attribute:{rules:[68,69,70,71,72,75,80],inclusive:!1},update_layout_config:{rules:[65,66,67,68],inclusive:!1},update_rel_style:{rules:[65,66,67,68],inclusive:!1},update_el_style:{rules:[65,66,67,68],inclusive:!1},rel_b:{rules:[65,66,67,68],inclusive:!1},rel_r:{rules:[65,66,67,68],inclusive:!1},rel_l:{rules:[65,66,67,68],inclusive:!1},rel_d:{rules:[65,66,67,68],inclusive:!1},rel_u:{rules:[65,66,67,68],inclusive:!1},rel_bi:{rules:[],inclusive:!1},rel:{rules:[65,66,67,68],inclusive:!1},node_r:{rules:[65,66,67,68],inclusive:!1},node_l:{rules:[65,66,67,68],inclusive:!1},node:{rules:[65,66,67,68],inclusive:!1},index:{rules:[],inclusive:!1},rel_index:{rules:[65,66,67,68],inclusive:!1},component_ext_queue:{rules:[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 ce})();ae.lexer=Pe;function X(){this.yy={}}return o(X,"Parser"),X.prototype=ae,ae.Parser=X,new X})();Xw.parser=Xw;HXe=Xw,Dl=[],bd=[""],vs="global",Il="",_c=[{alias:"global",label:{text:"global"},type:{text:"global"},tags:null,link:null,parentBoundary:""}],pb=[],PN="",FN=!1,Kw=4,Zw=2,XXe=o(function(){return JTe},"getC4Type"),KXe=o(function(e){JTe=nr(e,De())},"setC4Type"),ZXe=o(function(e,t,r,i,n,a,s,l,h){if(e==null||t===void 0||t===null||r===void 0||r===null||i===void 0||i===null)return;let u={},d=pb.find(p=>p.from===t&&p.to===r);if(d?u=d:pb.push(u),u.type=e,u.from=t,u.to=r,u.label={text:i},n==null)u.techn={text:""};else if(typeof n=="object"){let[p,f]=Object.entries(n)[0];u[p]={text:f}}else u.techn={text:n};if(a==null)u.descr={text:""};else if(typeof a=="object"){let[p,f]=Object.entries(a)[0];u[p]={text:f}}else u.descr={text:a};if(typeof s=="object"){let[p,f]=Object.entries(s)[0];u[p]=f}else u.sprite=s;if(typeof l=="object"){let[p,f]=Object.entries(l)[0];u[p]=f}else u.tags=l;if(typeof h=="object"){let[p,f]=Object.entries(h)[0];u[p]=f}else u.link=h;u.wrap=xd()},"addRel"),QXe=o(function(e,t,r,i,n,a,s){if(t===null||r===null)return;let l={},h=Dl.find(u=>u.alias===t);if(h&&t===h.alias?l=h:(l.alias=t,Dl.push(l)),r==null?l.label={text:""}:l.label={text:r},i==null)l.descr={text:""};else if(typeof i=="object"){let[u,d]=Object.entries(i)[0];l[u]={text:d}}else l.descr={text:i};if(typeof n=="object"){let[u,d]=Object.entries(n)[0];l[u]=d}else l.sprite=n;if(typeof a=="object"){let[u,d]=Object.entries(a)[0];l[u]=d}else l.tags=a;if(typeof s=="object"){let[u,d]=Object.entries(s)[0];l[u]=d}else l.link=s;l.typeC4Shape={text:e},l.parentBoundary=vs,l.wrap=xd()},"addPersonOrSystem"),JXe=o(function(e,t,r,i,n,a,s,l){if(t===null||r===null)return;let h={},u=Dl.find(d=>d.alias===t);if(u&&t===u.alias?h=u:(h.alias=t,Dl.push(h)),r==null?h.label={text:""}:h.label={text:r},i==null)h.techn={text:""};else if(typeof i=="object"){let[d,p]=Object.entries(i)[0];h[d]={text:p}}else h.techn={text:i};if(n==null)h.descr={text:""};else if(typeof n=="object"){let[d,p]=Object.entries(n)[0];h[d]={text:p}}else h.descr={text:n};if(typeof a=="object"){let[d,p]=Object.entries(a)[0];h[d]=p}else h.sprite=a;if(typeof s=="object"){let[d,p]=Object.entries(s)[0];h[d]=p}else h.tags=s;if(typeof l=="object"){let[d,p]=Object.entries(l)[0];h[d]=p}else h.link=l;h.wrap=xd(),h.typeC4Shape={text:e},h.parentBoundary=vs},"addContainer"),eKe=o(function(e,t,r,i,n,a,s,l){if(t===null||r===null)return;let h={},u=Dl.find(d=>d.alias===t);if(u&&t===u.alias?h=u:(h.alias=t,Dl.push(h)),r==null?h.label={text:""}:h.label={text:r},i==null)h.techn={text:""};else if(typeof i=="object"){let[d,p]=Object.entries(i)[0];h[d]={text:p}}else h.techn={text:i};if(n==null)h.descr={text:""};else if(typeof n=="object"){let[d,p]=Object.entries(n)[0];h[d]={text:p}}else h.descr={text:n};if(typeof a=="object"){let[d,p]=Object.entries(a)[0];h[d]=p}else h.sprite=a;if(typeof s=="object"){let[d,p]=Object.entries(s)[0];h[d]=p}else h.tags=s;if(typeof l=="object"){let[d,p]=Object.entries(l)[0];h[d]=p}else h.link=l;h.wrap=xd(),h.typeC4Shape={text:e},h.parentBoundary=vs},"addComponent"),tKe=o(function(e,t,r,i,n){if(e===null||t===null)return;let a={},s=_c.find(l=>l.alias===e);if(s&&e===s.alias?a=s:(a.alias=e,_c.push(a)),t==null?a.label={text:""}:a.label={text:t},r==null)a.type={text:"system"};else if(typeof r=="object"){let[l,h]=Object.entries(r)[0];a[l]={text:h}}else a.type={text:r};if(typeof i=="object"){let[l,h]=Object.entries(i)[0];a[l]=h}else a.tags=i;if(typeof n=="object"){let[l,h]=Object.entries(n)[0];a[l]=h}else a.link=n;a.parentBoundary=vs,a.wrap=xd(),Il=vs,vs=e,bd.push(Il)},"addPersonOrSystemBoundary"),rKe=o(function(e,t,r,i,n){if(e===null||t===null)return;let a={},s=_c.find(l=>l.alias===e);if(s&&e===s.alias?a=s:(a.alias=e,_c.push(a)),t==null?a.label={text:""}:a.label={text:t},r==null)a.type={text:"container"};else if(typeof r=="object"){let[l,h]=Object.entries(r)[0];a[l]={text:h}}else a.type={text:r};if(typeof i=="object"){let[l,h]=Object.entries(i)[0];a[l]=h}else a.tags=i;if(typeof n=="object"){let[l,h]=Object.entries(n)[0];a[l]=h}else a.link=n;a.parentBoundary=vs,a.wrap=xd(),Il=vs,vs=e,bd.push(Il)},"addContainerBoundary"),iKe=o(function(e,t,r,i,n,a,s,l){if(t===null||r===null)return;let h={},u=_c.find(d=>d.alias===t);if(u&&t===u.alias?h=u:(h.alias=t,_c.push(h)),r==null?h.label={text:""}:h.label={text:r},i==null)h.type={text:"node"};else if(typeof i=="object"){let[d,p]=Object.entries(i)[0];h[d]={text:p}}else h.type={text:i};if(n==null)h.descr={text:""};else if(typeof n=="object"){let[d,p]=Object.entries(n)[0];h[d]={text:p}}else h.descr={text:n};if(typeof s=="object"){let[d,p]=Object.entries(s)[0];h[d]=p}else h.tags=s;if(typeof l=="object"){let[d,p]=Object.entries(l)[0];h[d]=p}else h.link=l;h.nodeType=e,h.parentBoundary=vs,h.wrap=xd(),Il=vs,vs=t,bd.push(Il)},"addDeploymentNode"),nKe=o(function(){vs=Il,bd.pop(),Il=bd.pop(),bd.push(Il)},"popBoundaryParseStack"),aKe=o(function(e,t,r,i,n,a,s,l,h,u,d){let p=Dl.find(f=>f.alias===t);if(!(p===void 0&&(p=_c.find(f=>f.alias===t),p===void 0))){if(r!=null)if(typeof r=="object"){let[f,g]=Object.entries(r)[0];p[f]=g}else p.bgColor=r;if(i!=null)if(typeof i=="object"){let[f,g]=Object.entries(i)[0];p[f]=g}else p.fontColor=i;if(n!=null)if(typeof n=="object"){let[f,g]=Object.entries(n)[0];p[f]=g}else p.borderColor=n;if(a!=null)if(typeof a=="object"){let[f,g]=Object.entries(a)[0];p[f]=g}else p.shadowing=a;if(s!=null)if(typeof s=="object"){let[f,g]=Object.entries(s)[0];p[f]=g}else p.shape=s;if(l!=null)if(typeof l=="object"){let[f,g]=Object.entries(l)[0];p[f]=g}else p.sprite=l;if(h!=null)if(typeof h=="object"){let[f,g]=Object.entries(h)[0];p[f]=g}else p.techn=h;if(u!=null)if(typeof u=="object"){let[f,g]=Object.entries(u)[0];p[f]=g}else p.legendText=u;if(d!=null)if(typeof d=="object"){let[f,g]=Object.entries(d)[0];p[f]=g}else p.legendSprite=d}},"updateElStyle"),sKe=o(function(e,t,r,i,n,a,s){let l=pb.find(h=>h.from===t&&h.to===r);if(l!==void 0){if(i!=null)if(typeof i=="object"){let[h,u]=Object.entries(i)[0];l[h]=u}else l.textColor=i;if(n!=null)if(typeof n=="object"){let[h,u]=Object.entries(n)[0];l[h]=u}else l.lineColor=n;if(a!=null)if(typeof a=="object"){let[h,u]=Object.entries(a)[0];l[h]=parseInt(u)}else l.offsetX=parseInt(a);if(s!=null)if(typeof s=="object"){let[h,u]=Object.entries(s)[0];l[h]=parseInt(u)}else l.offsetY=parseInt(s)}},"updateRelStyle"),oKe=o(function(e,t,r){let i=Kw,n=Zw;if(typeof t=="object"){let a=Object.values(t)[0];i=parseInt(a)}else i=parseInt(t);if(typeof r=="object"){let a=Object.values(r)[0];n=parseInt(a)}else n=parseInt(r);i>=1&&(Kw=i),n>=1&&(Zw=n)},"updateLayoutConfig"),lKe=o(function(){return Kw},"getC4ShapeInRow"),cKe=o(function(){return Zw},"getC4BoundaryInRow"),hKe=o(function(){return vs},"getCurrentBoundaryParse"),uKe=o(function(){return Il},"getParentBoundaryParse"),e4e=o(function(e){return e==null?Dl:Dl.filter(t=>t.parentBoundary===e)},"getC4ShapeArray"),dKe=o(function(e){return Dl.find(t=>t.alias===e)},"getC4Shape"),pKe=o(function(e){return Object.keys(e4e(e))},"getC4ShapeKeys"),t4e=o(function(e){return e==null?_c:_c.filter(t=>t.parentBoundary===e)},"getBoundaries"),fKe=t4e,gKe=o(function(){return pb},"getRels"),mKe=o(function(){return PN},"getTitle"),yKe=o(function(e){FN=e},"setWrap"),xd=o(function(){return FN},"autoWrap"),vKe=o(function(){Dl=[],_c=[{alias:"global",label:{text:"global"},type:{text:"global"},tags:null,link:null,parentBoundary:""}],Il="",vs="global",bd=[""],pb=[],bd=[""],PN="",FN=!1,Kw=4,Zw=2},"clear"),bKe={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},xKe={FILLED:0,OPEN:1},TKe={LEFTOF:0,RIGHTOF:1,OVER:2},kKe=o(function(e){PN=nr(e,De())},"setTitle"),NN={addPersonOrSystem:QXe,addPersonOrSystemBoundary:tKe,addContainer:JXe,addContainerBoundary:rKe,addComponent:eKe,addDeploymentNode:iKe,popBoundaryParseStack:nKe,addRel:ZXe,updateElStyle:aKe,updateRelStyle:sKe,updateLayoutConfig:oKe,autoWrap:xd,setWrap:yKe,getC4ShapeArray:e4e,getC4Shape:dKe,getC4ShapeKeys:pKe,getBoundaries:t4e,getBoundarys:fKe,getCurrentBoundaryParse:hKe,getParentBoundaryParse:uKe,getRels:gKe,getTitle:mKe,getC4Type:XXe,getC4ShapeInRow:lKe,getC4BoundaryInRow:cKe,setAccTitle:gr,getAccTitle:xr,getAccDescription:kr,setAccDescription:Tr,getConfig:o(()=>De().c4,"getConfig"),clear:vKe,LINETYPE:bKe,ARROWTYPE:xKe,PLACEMENT:TKe,setTitle:kKe,setC4Type:KXe},CKe=tn(dc(),1),zN=o(function(e,t){return Rf(e,t)},"drawRect"),r4e=o(function(e,t,r,i,n,a){let s=e.append("image");s.attr("width",t),s.attr("height",r),s.attr("x",i),s.attr("y",n);let l=a.startsWith("data:image/png;base64")?a:(0,CKe.sanitizeUrl)(a);s.attr("xlink:href",l)},"drawImage"),wKe=o((e,t,r,i)=>{let n=e.append("g"),a=0;for(let s of t){let l=s.textColor?s.textColor:"#444444",h=s.lineColor?s.lineColor:"#444444",u=s.offsetX?parseInt(s.offsetX):0,d=s.offsetY?parseInt(s.offsetY):0,p="";if(a===0){let g=n.append("line");g.attr("x1",s.startPoint.x),g.attr("y1",s.startPoint.y),g.attr("x2",s.endPoint.x),g.attr("y2",s.endPoint.y),g.attr("stroke-width","1"),g.attr("stroke",h),g.style("fill","none"),s.type!=="rel_b"&&g.attr("marker-end","url("+p+"#"+i+"-arrowhead)"),(s.type==="birel"||s.type==="rel_b")&&g.attr("marker-start","url("+p+"#"+i+"-arrowend)"),a=-1}else{let g=n.append("path");g.attr("fill","none").attr("stroke-width","1").attr("stroke",h).attr("d","Mstartx,starty Qcontrolx,controly stopx,stopy ".replaceAll("startx",s.startPoint.x).replaceAll("starty",s.startPoint.y).replaceAll("controlx",s.startPoint.x+(s.endPoint.x-s.startPoint.x)/2-(s.endPoint.x-s.startPoint.x)/4).replaceAll("controly",s.startPoint.y+(s.endPoint.y-s.startPoint.y)/2).replaceAll("stopx",s.endPoint.x).replaceAll("stopy",s.endPoint.y)),s.type!=="rel_b"&&g.attr("marker-end","url("+p+"#"+i+"-arrowhead)"),(s.type==="birel"||s.type==="rel_b")&&g.attr("marker-start","url("+p+"#"+i+"-arrowend)")}let f=r.messageFont();Ph(r)(s.label.text,n,Math.min(s.startPoint.x,s.endPoint.x)+Math.abs(s.endPoint.x-s.startPoint.x)/2+u,Math.min(s.startPoint.y,s.endPoint.y)+Math.abs(s.endPoint.y-s.startPoint.y)/2+d,s.label.width,s.label.height,{fill:l},f),s.techn&&s.techn.text!==""&&(f=r.messageFont(),Ph(r)("["+s.techn.text+"]",n,Math.min(s.startPoint.x,s.endPoint.x)+Math.abs(s.endPoint.x-s.startPoint.x)/2+u,Math.min(s.startPoint.y,s.endPoint.y)+Math.abs(s.endPoint.y-s.startPoint.y)/2+r.messageFontSize+5+d,Math.max(s.label.width,s.techn.width),s.techn.height,{fill:l,"font-style":"italic"},f))}},"drawRels"),EKe=o(function(e,t,r){let i=e.append("g"),n=t.bgColor?t.bgColor:"none",a=t.borderColor?t.borderColor:"#444444",s=t.fontColor?t.fontColor:"black",l={"stroke-width":1,"stroke-dasharray":"7.0,7.0"};t.nodeType&&(l={"stroke-width":1});let h={x:t.x,y:t.y,fill:n,stroke:a,width:t.width,height:t.height,rx:2.5,ry:2.5,attrs:l};zN(i,h);let u=r.boundaryFont();u.fontWeight="bold",u.fontSize=u.fontSize+2,u.fontColor=s,Ph(r)(t.label.text,i,t.x,t.y+t.label.Y,t.width,t.height,{fill:"#444444"},u),t.type&&t.type.text!==""&&(u=r.boundaryFont(),u.fontColor=s,Ph(r)(t.type.text,i,t.x,t.y+t.type.Y,t.width,t.height,{fill:"#444444"},u)),t.descr&&t.descr.text!==""&&(u=r.boundaryFont(),u.fontSize=u.fontSize-2,u.fontColor=s,Ph(r)(t.descr.text,i,t.x,t.y+t.descr.Y,t.width,t.height,{fill:"#444444"},u))},"drawBoundary"),SKe=o(function(e,t,r){let i=t.bgColor?t.bgColor:r[t.typeC4Shape.text+"_bg_color"],n=t.borderColor?t.borderColor:r[t.typeC4Shape.text+"_border_color"],a=t.fontColor?t.fontColor:"#FFFFFF",s="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":s="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":s="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 h=Za();switch(t.typeC4Shape.text){case"person":case"external_person":case"system":case"external_system":case"container":case"external_container":case"component":case"external_component":h.x=t.x,h.y=t.y,h.fill=i,h.width=t.width,h.height=t.height,h.stroke=n,h.rx=2.5,h.ry=2.5,h.attrs={"stroke-width":.5},zN(l,h);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",i).attr("stroke-width","0.5").attr("stroke",n).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",n).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",i).attr("stroke-width","0.5").attr("stroke",n).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",n).attr("d","Mstartx,startyc-5,0 -5,half -5,halfc0,half 5,half 5,half".replaceAll("startx",t.x+t.width).replaceAll("starty",t.y).replaceAll("half",t.height/2));break}let u=MKe(r,t.typeC4Shape.text);switch(l.append("text").attr("fill",a).attr("font-family",u.fontFamily).attr("font-size",u.fontSize-2).attr("font-style","italic").attr("lengthAdjust","spacing").attr("textLength",t.typeC4Shape.width).attr("x",t.x+t.width/2-t.typeC4Shape.width/2).attr("y",t.y+t.typeC4Shape.Y).text("<<"+t.typeC4Shape.text+">>"),t.typeC4Shape.text){case"person":case"external_person":r4e(l,48,48,t.x+t.width/2-24,t.y+t.image.Y,s);break}let d=r[t.typeC4Shape.text+"Font"]();return d.fontWeight="bold",d.fontSize=d.fontSize+2,d.fontColor=a,Ph(r)(t.label.text,l,t.x,t.y+t.label.Y,t.width,t.height,{fill:a},d),d=r[t.typeC4Shape.text+"Font"](),d.fontColor=a,t.techn&&t.techn?.text!==""?Ph(r)(t.techn.text,l,t.x,t.y+t.techn.Y,t.width,t.height,{fill:a,"font-style":"italic"},d):t.type&&t.type.text!==""&&Ph(r)(t.type.text,l,t.x,t.y+t.type.Y,t.width,t.height,{fill:a,"font-style":"italic"},d),t.descr&&t.descr.text!==""&&(d=r.personFont(),d.fontColor=a,Ph(r)(t.descr.text,l,t.x,t.y+t.descr.Y,t.width,t.height,{fill:a},d)),t.height},"drawC4Shape"),_Ke=o(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"),AKe=o(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"),RKe=o(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"),LKe=o(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"),$Ke=o(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"),IKe=o(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"),DKe=o(function(e,t){let r=e.append("defs").append("marker").attr("id",t+"-crosshead").attr("markerWidth",15).attr("markerHeight",8).attr("orient","auto").attr("refX",16).attr("refY",4);r.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"),r.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"),MKe=o((e,t)=>({fontFamily:e[t+"FontFamily"],fontSize:e[t+"FontSize"],fontWeight:e[t+"FontWeight"]}),"getC4ShapeFont"),Ph=(function(){function e(n,a,s,l,h,u,d){let p=a.append("text").attr("x",s+h/2).attr("y",l+u/2+5).style("text-anchor","middle").text(n);i(p,d)}o(e,"byText");function t(n,a,s,l,h,u,d,p){let{fontSize:f,fontFamily:g,fontWeight:m}=p,y=n.split(ft.lineBreakRegex);for(let b=0;b=this.data.widthLimit||r>=this.data.widthLimit||this.nextData.cnt>i4e)&&(t=this.nextData.startx+e.margin+Ht.nextLinePaddingX,i=this.nextData.stopy+e.margin*2,this.nextData.stopx=r=t+e.width,this.nextData.starty=this.nextData.stopy,this.nextData.stopy=n=i+e.height,this.nextData.cnt=1),e.x=t,e.y=i,this.updateVal(this.data,"startx",t,Math.min),this.updateVal(this.data,"starty",i,Math.min),this.updateVal(this.data,"stopx",r,Math.max),this.updateVal(this.data,"stopy",n,Math.max),this.updateVal(this.nextData,"startx",t,Math.min),this.updateVal(this.nextData,"starty",i,Math.min),this.updateVal(this.nextData,"stopx",r,Math.max),this.updateVal(this.nextData,"stopy",n,Math.max)}init(e){this.name="",this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0,widthLimit:void 0},this.nextData={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0,cnt:0},BN(e.db.getConfig())}bumpLastMargin(e){this.data.stopx+=e,this.data.stopy+=e}},BN=o(function(e){Ni(Ht,e),e.fontFamily&&(Ht.personFontFamily=Ht.systemFontFamily=Ht.messageFontFamily=e.fontFamily),e.fontSize&&(Ht.personFontSize=Ht.systemFontSize=Ht.messageFontSize=e.fontSize),e.fontWeight&&(Ht.personFontWeight=Ht.systemFontWeight=Ht.messageFontWeight=e.fontWeight)},"setConf"),db=o((e,t)=>({fontFamily:e[t+"FontFamily"],fontSize:e[t+"FontSize"],fontWeight:e[t+"FontWeight"]}),"c4ShapeFont"),Hw=o(e=>({fontFamily:e.boundaryFontFamily,fontSize:e.boundaryFontSize,fontWeight:e.boundaryFontWeight}),"boundaryFont"),NKe=o(e=>({fontFamily:e.messageFontFamily,fontSize:e.messageFontSize,fontWeight:e.messageFontWeight}),"messageFont");o(Vo,"calcC4ShapeTextWH");a4e=o(function(e,t,r){t.x=r.data.startx,t.y=r.data.starty,t.width=r.data.stopx-r.data.startx,t.height=r.data.stopy-r.data.starty,t.label.y=Ht.c4ShapeMargin-35;let i=t.wrap&&Ht.wrap,n=Hw(Ht);n.fontSize=n.fontSize+2,n.fontWeight="bold";let a=oa(t.label.text,n);Vo("label",t,i,n,a),Sc.drawBoundary(e,t,Ht)},"drawBoundary"),s4e=o(function(e,t,r,i){let n=0;for(let a of i){n=0;let s=r[a],l=db(Ht,s.typeC4Shape.text);switch(l.fontSize=l.fontSize-2,s.typeC4Shape.width=oa("\xAB"+s.typeC4Shape.text+"\xBB",l),s.typeC4Shape.height=l.fontSize+2,s.typeC4Shape.Y=Ht.c4ShapePadding,n=s.typeC4Shape.Y+s.typeC4Shape.height-4,s.image={width:0,height:0,Y:0},s.typeC4Shape.text){case"person":case"external_person":s.image.width=48,s.image.height=48,s.image.Y=n,n=s.image.Y+s.image.height;break}s.sprite&&(s.image.width=48,s.image.height=48,s.image.Y=n,n=s.image.Y+s.image.height);let h=s.wrap&&Ht.wrap,u=Ht.width-Ht.c4ShapePadding*2,d=db(Ht,s.typeC4Shape.text);if(d.fontSize=d.fontSize+2,d.fontWeight="bold",Vo("label",s,h,d,u),s.label.Y=n+8,n=s.label.Y+s.label.height,s.type&&s.type.text!==""){s.type.text="["+s.type.text+"]";let g=db(Ht,s.typeC4Shape.text);Vo("type",s,h,g,u),s.type.Y=n+5,n=s.type.Y+s.type.height}else if(s.techn&&s.techn.text!==""){s.techn.text="["+s.techn.text+"]";let g=db(Ht,s.techn.text);Vo("techn",s,h,g,u),s.techn.Y=n+5,n=s.techn.Y+s.techn.height}let p=n,f=s.label.width;if(s.descr&&s.descr.text!==""){let g=db(Ht,s.typeC4Shape.text);Vo("descr",s,h,g,u),s.descr.Y=n+20,n=s.descr.Y+s.descr.height,f=Math.max(s.label.width,s.descr.width),p=n-s.descr.textLines*5}f=f+Ht.c4ShapePadding,s.width=Math.max(s.width||Ht.width,f,Ht.width),s.height=Math.max(s.height||Ht.height,p,Ht.height),s.margin=s.margin||Ht.c4ShapeMargin,e.insert(s),Sc.drawC4Shape(t,s,Ht)}e.bumpLastMargin(Ht.c4ShapeMargin)},"drawC4ShapeArray"),Uo=class{static{o(this,"Point")}constructor(e,t){this.x=e,this.y=t}},ZTe=o(function(e,t){let r=e.x,i=e.y,n=t.x,a=t.y,s=r+e.width/2,l=i+e.height/2,h=Math.abs(r-n),u=Math.abs(i-a),d=u/h,p=e.height/e.width,f=null;return i==a&&rn?f=new Uo(r,l):r==n&&ia&&(f=new Uo(s,i)),r>n&&i=d?f=new Uo(r,l+d*e.width/2):f=new Uo(s-h/u*e.height/2,i+e.height):r=d?f=new Uo(r+e.width,l+d*e.width/2):f=new Uo(s+h/u*e.height/2,i+e.height):ra?p>=d?f=new Uo(r+e.width,l-d*e.width/2):f=new Uo(s+e.height/2*h/u,i):r>n&&i>a&&(p>=d?f=new Uo(r,l-e.width/2*d):f=new Uo(s-e.height/2*h/u,i)),f},"getIntersectPoint"),OKe=o(function(e,t){let r={x:0,y:0};r.x=t.x+t.width/2,r.y=t.y+t.height/2;let i=ZTe(e,r);r.x=e.x+e.width/2,r.y=e.y+e.height/2;let n=ZTe(t,r);return{startPoint:i,endPoint:n}},"getIntersectPoints"),BKe=o(function(e,t,r,i,n){let a=0;for(let s of t){a=a+1;let l=s.wrap&&Ht.wrap,h=NKe(Ht);i.db.getC4Type()==="C4Dynamic"&&(s.label.text=a+": "+s.label.text);let u=oa(s.label.text,h);Vo("label",s,l,h,u),s.techn&&s.techn.text!==""&&(u=oa(s.techn.text,h),Vo("techn",s,l,h,u)),s.descr&&s.descr.text!==""&&(u=oa(s.descr.text,h),Vo("descr",s,l,h,u));let d=r(s.from),p=r(s.to),f=OKe(d,p);s.startPoint=f.startPoint,s.endPoint=f.endPoint}Sc.drawRels(e,t,Ht,n)},"drawRels");o(qN,"drawInsideBoundary");PKe=o(function(e,t,r,i){Ht=De().c4;let n=De().securityLevel,a;n==="sandbox"&&(a=tt("#i"+t));let s=n==="sandbox"?tt(a.nodes()[0].contentDocument.body):tt("body"),l=i.db;i.db.setWrap(Ht.wrap),i4e=l.getC4ShapeInRow(),ON=l.getC4BoundaryInRow(),ee.debug(`C:${JSON.stringify(Ht,null,2)}`);let h=n==="sandbox"?s.select(`[id="${t}"]`):tt(`[id="${t}"]`);Sc.insertComputerIcon(h,t),Sc.insertDatabaseIcon(h,t),Sc.insertClockIcon(h,t);let u=new n4e(i);u.setData(Ht.diagramMarginX,Ht.diagramMarginX,Ht.diagramMarginY,Ht.diagramMarginY),u.data.widthLimit=screen.availWidth,Qw=Ht.diagramMarginX,Jw=Ht.diagramMarginY;let d=i.db.getTitle(),p=i.db.getBoundaries("");qN(h,"",u,p,i),Sc.insertArrowHead(h,t),Sc.insertArrowEnd(h,t),Sc.insertArrowCrossHead(h,t),Sc.insertArrowFilledHead(h,t),BKe(h,i.db.getRels(),i.db.getC4Shape,i,t),u.data.stopx=Qw,u.data.stopy=Jw;let f=u.data,g=f.stopy-f.starty+2*Ht.diagramMarginY,m=f.stopx-f.startx+2*Ht.diagramMarginX;d&&h.append("text").text(d).attr("x",(f.stopx-f.startx)/2-4*Ht.diagramMarginX).attr("y",f.starty+Ht.diagramMarginY),Ir(h,g,m,Ht.useMaxWidth);let y=d?60:0;h.attr("viewBox",f.startx-Ht.diagramMarginX+" -"+(Ht.diagramMarginY+y)+" "+m+" "+(g+y)),ee.debug("models:",f)},"draw"),QTe={drawPersonOrSystemArray:s4e,drawBoundary:a4e,setConf:BN,draw:PKe},FKe=o(e=>`.person { + stroke: ${e.personBorder}; + fill: ${e.personBkg}; + } +`,"getStyles"),zKe=FKe,qKe={parser:HXe,db:NN,renderer:QTe,styles:zKe,init:o(({c4:e,wrap:t})=>{QTe.setConf(e),NN.setWrap(t)},"init")}});var Ac,Rc=Tt(()=>{vt();Ac=o(()=>` + /* 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 Yo,fo=Tt(()=>{Zt();vt();Yo=o((e,t)=>{let r;return t==="sandbox"&&(r=tt("#i"+e)),(t==="sandbox"?tt(r.nodes()[0].contentDocument.body):tt("body")).select(`[id="${e}"]`)},"getDiagramElement")});var Gs,jKe,GKe,Ws=Tt(()=>{tr();Zt();vt();Gs=o((e,t,r,i)=>{e.attr("class",r);let{width:n,height:a,x:s,y:l}=jKe(e,t);Ir(e,a,n,i);let h=GKe(s,l,n,a,t);e.attr("viewBox",h),ee.debug(`viewBox configured: ${h} with padding: ${t}`)},"setupViewPortForSVG"),jKe=o((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"),GKe=o((e,t,r,i,n)=>`${e-n} ${t-n} ${r} ${i}`,"createViewBox")});var WKe,UKe,VKe,YKe,HKe,jN,c4e,h4e,XKe,KKe,ZKe,GN,fb,u4e,WN=Tt(()=>{Rc();fo();Ws();Ip();js();po();ha();Or();tr();Zt();vt();WKe="flowchart-",UKe=class{constructor(){this.vertexCounter=0,this.config=De(),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=gr,this.setAccDescription=Tr,this.setDiagramTitle=_r,this.getAccTitle=xr,this.getAccDescription=kr,this.getDiagramTitle=Cr,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{o(this,"FlowDB")}sanitizeText(e){return ft.sanitizeText(e,this.config)}sanitizeNodeLabelType(e){switch(e){case"markdown":case"string":case"text":return e;default:return"markdown"}}setDiagramId(e){this.diagramId=e}lookUpDomId(e){for(let t of this.vertices.values())if(t.id===e)return this.diagramId?`${this.diagramId}-${t.domId}`:t.domId;return this.diagramId?`${this.diagramId}-${e}`:e}addVertex(e,t,r,i,n,a,s={},l){if(!e||e.trim().length===0)return;let h;if(l!==void 0){let f;l.includes(` +`)?f=l+` +`:f=`{ +`+l+` +}`,h=ju(f,{schema:qu})}let u=this.edges.find(f=>f.id===e);if(u){let f=h;f?.animate!==void 0&&(u.animate=f.animate),f?.animation!==void 0&&(u.animation=f.animation),f?.curve!==void 0&&(u.interpolate=f.curve);return}let d,p=this.vertices.get(e);if(p===void 0&&(t===void 0&&r===void 0&&i!==void 0&&i!==null&&ee.warn(`Style applied to unknown node "${e}". This may indicate a typo. The node will be created automatically.`),p={id:e,labelType:"text",domId:WKe+e+"-"+this.vertexCounter,styles:[],classes:[]},this.vertices.set(e,p)),this.vertexCounter++,t!==void 0?(this.config=De(),d=this.sanitizeText(t.text.trim()),p.labelType=t.type,d.startsWith('"')&&d.endsWith('"')&&(d=d.substring(1,d.length-1)),p.text=d):p.text===void 0&&(p.text=e),r!==void 0&&(p.type=r),i?.forEach(f=>{p.styles.push(f)}),n?.forEach(f=>{p.classes.push(f)}),a!==void 0&&(p.dir=a),p.props===void 0?p.props=s:s!==void 0&&Object.assign(p.props,s),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(!A$(h.shape))throw new Error(`No such shape: ${h.shape}.`);p.type=h?.shape}h?.label&&(p.text=h?.label,p.labelType=this.sanitizeNodeLabelType(h?.labelType)),h?.icon&&(p.icon=h?.icon,!h.label?.trim()&&p.text===e&&(p.text="")),h?.form&&(p.form=h?.form),h?.pos&&(p.pos=h?.pos),h?.img&&(p.img=h?.img,!h.label?.trim()&&p.text===e&&(p.text="")),h?.constraint&&(p.constraint=h.constraint),h.w&&(p.assetWidth=Number(h.w)),h.h&&(p.assetHeight=Number(h.h))}}addSingleLink(e,t,r,i){let n={start:e,end:t,type:void 0,text:"",labelType:"text",classes:[],isUserDefinedId:!1,interpolate:this.edges.defaultInterpolate};ee.info("abc78 Got edge...",n);let a=r.text;if(a!==void 0&&(n.text=this.sanitizeText(a.text.trim()),n.text.startsWith('"')&&n.text.endsWith('"')&&(n.text=n.text.substring(1,n.text.length-1)),n.labelType=this.sanitizeNodeLabelType(a.type)),r!==void 0&&(n.type=r.type,n.stroke=r.stroke,n.length=r.length>10?10:r.length),i&&!this.edges.some(s=>s.id===i))n.id=i,n.isUserDefinedId=!0;else{let s=this.edges.filter(l=>l.start===n.start&&l.end===n.end);s.length===0?n.id=pc(n.start,n.end,{counter:0,prefix:"L"}):n.id=pc(n.start,n.end,{counter:s.length+1,prefix:"L"})}if(this.edges.length<(this.config.maxEdges??500))ee.info("Pushing edge..."),this.edges.push(n);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(e){return e!==null&&typeof e=="object"&&"id"in e&&typeof e.id=="string"}addLink(e,t,r){let i=this.isLinkData(r)?r.id.replace("@",""):void 0;ee.info("addLink",e,t,i);for(let n of e)for(let a of t){let s=n===e[e.length-1],l=a===t[0];s&&l?this.addSingleLink(n,a,r,i):this.addSingleLink(n,a,r,void 0)}}updateLinkInterpolate(e,t){e.forEach(r=>{r==="default"?this.edges.defaultInterpolate=t:this.edges[r].interpolate=t})}updateLink(e,t){e.forEach(r=>{if(typeof r=="number"&&r>=this.edges.length)throw new Error(`The index ${r} for linkStyle is out of bounds. Valid indices for linkStyle are between 0 and ${this.edges.length-1}. (Help: Ensure that the index is within the range of existing edges.)`);r==="default"?this.edges.defaultStyle=t:(this.edges[r].style=t,(this.edges[r]?.style?.length??0)>0&&!this.edges[r]?.style?.some(i=>i?.startsWith("fill"))&&this.edges[r]?.style?.push("fill:none"))})}addClass(e,t){let r=t.join().replace(/\\,/g,"\xA7\xA7\xA7").replace(/,/g,";").replace(/§§§/g,",").split(";");e.split(",").forEach(i=>{let n=this.classes.get(i);n===void 0&&(n={id:i,styles:[],textStyles:[]},this.classes.set(i,n)),r?.forEach(a=>{if(/color/.exec(a)){let s=a.replace("fill","bgFill");n.textStyles.push(s)}n.styles.push(a)})})}setDirection(e){this.direction=e.trim(),/.*/.exec(this.direction)&&(this.direction="LR"),/.*v/.exec(this.direction)&&(this.direction="TB"),this.direction==="TD"&&(this.direction="TB")}setClass(e,t){for(let r of e.split(",")){let i=this.vertices.get(r);i&&i.classes.push(t);let n=this.edges.find(s=>s.id===r);n&&n.classes.push(t);let a=this.subGraphLookup.get(r);a&&a.classes.push(t)}}setTooltip(e,t){if(t!==void 0){t=this.sanitizeText(t);for(let r of e.split(","))this.tooltips.set(this.version==="gen-1"?this.lookUpDomId(r):r,t)}}setClickFun(e,t,r){if(De().securityLevel!=="loose"||t===void 0)return;let i=[];if(typeof r=="string"){i=r.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let a=0;a{let a=this.lookUpDomId(e),s=document.querySelector(`[id="${a}"]`);s!==null&&s.addEventListener("click",()=>{Wt.runFunc(t,...i)},!1)}))}setLink(e,t,r){e.split(",").forEach(i=>{let n=this.vertices.get(i);n!==void 0&&(n.link=Wt.formatUrl(t,this.config),n.linkTarget=r)}),this.setClass(e,"clickable")}getTooltip(e){return this.tooltips.get(e)}setClickEvent(e,t,r){e.split(",").forEach(i=>{this.setClickFun(i,t,r)}),this.setClass(e,"clickable")}bindFunctions(e){this.funs.forEach(t=>{t(e)})}getDirection(){return this.direction?.trim()}getVertices(){return this.vertices}getEdges(){return this.edges}getClasses(){return this.classes}setupToolTips(e){let t=Rm();tt(e).select("svg").selectAll("g.node").on("mouseover",r=>{let i=tt(r.currentTarget),n=i.attr("title");if(n===null)return;let a=r.currentTarget?.getBoundingClientRect();t.transition().duration(200).style("opacity",".9"),t.text(i.attr("title")).style("left",window.scrollX+a.left+(a.right-a.left)/2+"px").style("top",window.scrollY+a.bottom+"px"),t.html(no.sanitize(n)),i.classed("hover",!0)}).on("mouseout",r=>{t.transition().duration(500).style("opacity",0),tt(r.currentTarget).classed("hover",!1)})}clear(e="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=e,this.config=De(),ar()}setGen(e){this.version=e||"gen-2"}defaultStyle(){return"fill:#ffa;stroke: #f66; stroke-width: 3px; stroke-dasharray: 5, 5;fill:#ffa;stroke: #666;"}addSubGraph(e,t,r){let i=e.text.trim(),n=r.text;e===r&&/\s/.exec(r.text)&&(i=void 0);let a=o(f=>{let g={boolean:{},number:{},string:{}},m=[],y;return{nodeList:f.filter(function(b){let v=typeof b;return b.stmt&&b.stmt==="dir"?(y=b.value,!1):b.trim()===""?!1:v in g?g[v].hasOwnProperty(b)?!1:g[v][b]=!0:m.includes(b)?!1:m.push(b)}),dir:y}},"uniq")(t.flat()),s=a.nodeList,l=a.dir,h=l!==void 0,u=De().flowchart??{},d=l??(u.inheritDir?this.getDirection()??De().direction??void 0:void 0);if(this.version==="gen-1")for(let f=0;f2e3)return{result:!1,count:0};if(this.posCrossRef[this.secCount]=t,this.subGraphs[t].id===e)return{result:!0,count:0};let i=0,n=1;for(;i=0){let s=this.indexNodes2(e,a);if(s.result)return{result:!0,count:n+s.count};n=n+s.count}i=i+1}return{result:!1,count:n}}getDepthFirstPos(e){return this.posCrossRef[e]}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(e){let t=e.trim(),r="arrow_open";switch(t[0]){case"<":r="arrow_point",t=t.slice(1);break;case"x":r="arrow_cross",t=t.slice(1);break;case"o":r="arrow_circle",t=t.slice(1);break}let i="normal";return t.includes("=")&&(i="thick"),t.includes(".")&&(i="dotted"),{type:r,stroke:i}}countChar(e,t){let r=t.length,i=0;for(let n=0;n":i="arrow_point",t.startsWith("<")&&(i="double_"+i,r=r.slice(1));break;case"o":i="arrow_circle",t.startsWith("o")&&(i="double_"+i,r=r.slice(1));break}let n="normal",a=r.length-1;r.startsWith("=")&&(n="thick"),r.startsWith("~")&&(n="invisible");let s=this.countChar(".",r);return s&&(n="dotted",a=s),{type:i,stroke:n,length:a}}destructLink(e,t){let r=this.destructEndLink(e),i;if(t){if(i=this.destructStartLink(t),i.stroke!==r.stroke)return{type:"INVALID",stroke:"INVALID"};if(i.type==="arrow_open")i.type=r.type;else{if(i.type!==r.type)return{type:"INVALID",stroke:"INVALID"};i.type="double_"+i.type}return i.type==="double_arrow"&&(i.type="double_arrow_point"),i.length=r.length,i}return r}exists(e,t){for(let r of e)if(r.nodes.includes(t))return!0;return!1}makeUniq(e,t){let r=[];return e.nodes.forEach((i,n)=>{this.exists(t,i)||r.push(e.nodes[n])}),{nodes:r}}getTypeFromVertex(e){if(e.img)return"imageSquare";if(e.icon)return e.form==="circle"?"iconCircle":e.form==="square"?"iconSquare":e.form==="rounded"?"iconRounded":"icon";switch(e.type){case"square":case void 0:return"squareRect";case"round":return"roundedRect";case"ellipse":return"ellipse";default:return e.type}}findNode(e,t){return e.find(r=>r.id===t)}destructEdgeType(e){let t="none",r="arrow_point";switch(e){case"arrow_point":case"arrow_circle":case"arrow_cross":r=e;break;case"double_arrow_point":case"double_arrow_circle":case"double_arrow_cross":t=e.replace("double_",""),r=t;break}return{arrowTypeStart:t,arrowTypeEnd:r}}addNodeFromVertex(e,t,r,i,n,a){let s=r.get(e.id),l=i.get(e.id)??!1,h=this.findNode(t,e.id);if(h)h.cssStyles=e.styles,h.cssCompiledStyles=this.getCompiledStyles(e.classes),h.cssClasses=e.classes.join(" ");else{let u={id:e.id,label:e.text,labelType:e.labelType,labelStyle:"",parentId:s,padding:n.flowchart?.padding||8,cssStyles:e.styles,cssCompiledStyles:this.getCompiledStyles(["default","node",...e.classes]),cssClasses:"default "+e.classes.join(" "),dir:e.dir,domId:e.domId,look:a,link:e.link,linkTarget:e.linkTarget,tooltip:this.getTooltip(e.id),icon:e.icon,pos:e.pos,img:e.img,assetWidth:e.assetWidth,assetHeight:e.assetHeight,constraint:e.constraint};l?t.push({...u,isGroup:!0,shape:"rect"}):t.push({...u,isGroup:!1,shape:this.getTypeFromVertex(e)})}}getCompiledStyles(e){let t=[];for(let r of e){let i=this.classes.get(r);i?.styles&&(t=[...t,...i.styles??[]].map(n=>n.trim())),i?.textStyles&&(t=[...t,...i.textStyles??[]].map(n=>n.trim()))}return t}getData(){let e=De(),t=[],r=[],i=this.getSubGraphs(),n=new Map,a=new Map;for(let l=i.length-1;l>=0;l--){let h=i[l];h.nodes.length>0&&a.set(h.id,!0);for(let u of h.nodes)n.set(u,h.id)}for(let l=i.length-1;l>=0;l--){let h=i[l];t.push({id:h.id,label:h.title,labelStyle:"",labelType:h.labelType,parentId:n.get(h.id),padding:8,cssCompiledStyles:this.getCompiledStyles(h.classes),cssClasses:h.classes.join(" "),shape:"rect",dir:h.dir==="TD"?"TB":h.dir,explicitDir:h.hasExplicitDir,isGroup:!0,look:e.look})}this.getVertices().forEach(l=>{this.addNodeFromVertex(l,t,n,a,e,e.look||"classic")});let s=this.getEdges();return s.forEach((l,h)=>{let{arrowTypeStart:u,arrowTypeEnd:d}=this.destructEdgeType(l.type),p=[...s.defaultStyle??[]];l.style&&p.push(...l.style);let f={id:pc(l.start,l.end,{counter:h,prefix:"L"},l.id),isUserDefinedId:l.isUserDefinedId,start:l.start,end:l.end,type:l.type??"normal",label:l.text,labelType:l.labelType,labelpos:"c",thickness:l.stroke,minlen:l.length,classes:l?.stroke==="invisible"?"":"edge-thickness-normal edge-pattern-solid flowchart-link",arrowTypeStart:l?.stroke==="invisible"||l?.type==="arrow_open"?"none":u,arrowTypeEnd:l?.stroke==="invisible"||l?.type==="arrow_open"?"none":d,arrowheadStyle:"fill: #333",cssCompiledStyles:this.getCompiledStyles(l.classes),labelStyle:p,style:p,pattern:l.stroke,look:e.look,animate:l.animate,animation:l.animation,curve:l.interpolate||this.edges.defaultInterpolate||e.flowchart?.curve};r.push(f)}),{nodes:t,edges:r,other:{},config:e}}defaultConfig(){return Nk.flowchart}},VKe=o(function(e,t){return t.db.getClasses()},"getClasses"),YKe=o(async function(e,t,r,i,n){ee.info("REF0:"),ee.info("Drawing state diagram (v2)",t);let{securityLevel:a,flowchart:s,layout:l}=De();i.db.setDiagramId(t),ee.debug("Before getData: ");let h=i.db.getData();ee.debug("Data: ",h);let u=Yo(t,a),d=i.db.getDirection();h.type=i.type,h.layoutAlgorithm=Ec(l),h.layoutAlgorithm==="dagre"&&l==="elk"&&ee.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."),h.direction=d,h.nodeSpacing=s?.nodeSpacing||50,h.rankSpacing=s?.rankSpacing||50,h.markers=["point","circle","cross"],h.diagramId=t,ee.debug("REF1:",h),await Wo(h,u,n);let p=h.config.flowchart?.diagramPadding??8;Wt.insertTitle(u,"flowchartTitleText",s?.titleTopMargin||0,i.db.getDiagramTitle()),Gs(u,p,"flowchart",s?.useMaxWidth||!1)},"draw"),HKe={getClasses:VKe,draw:YKe},jN=(function(){var e=o(function(Ur,it,xt,lt){for(xt=xt||{},lt=Ur.length;lt--;xt[Ur[lt]]=it);return xt},"o"),t=[1,4],r=[1,3],i=[1,5],n=[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],s=[1,13],l=[1,14],h=[1,15],u=[1,16],d=[1,23],p=[1,25],f=[1,26],g=[1,27],m=[1,50],y=[1,49],b=[1,29],v=[1,30],T=[1,31],x=[1,32],k=[1,33],C=[1,45],E=[1,47],w=[1,43],_=[1,48],L=[1,44],N=[1,51],D=[1,46],M=[1,52],B=[1,53],A=[1,34],I=[1,35],O=[1,36],R=[1,37],$=[1,38],F=[1,58],P=[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],z=[1,62],q=[1,61],G=[1,63],W=[8,9,11,75,77,78],J=[1,79],H=[1,92],Z=[1,97],se=[1,96],Q=[1,93],te=[1,89],re=[1,95],ne=[1,91],Ae=[1,98],ie=[1,94],me=[1,99],oe=[1,90],we=[8,9,10,11,40,75,77,78],ye=[8,9,10,11,40,46,75,77,78],ve=[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],ae=[8,9,11,44,60,75,77,78,89,102,105,106,109,111,114,115,116],Pe=[44,60,89,102,105,106,109,111,114,115,116],X=[1,122],ce=[1,123],ge=[1,125],be=[1,124],ke=[44,60,62,74,89,102,105,106,109,111,114,115,116],Me=[1,134],pe=[1,148],Oe=[1,149],j=[1,150],le=[1,151],U=[1,136],fe=[1,138],Y=[1,142],Le=[1,143],xe=[1,144],je=[1,145],Ie=[1,146],Ve=[1,147],Ne=[1,152],Ge=[1,153],ze=[1,132],Ue=[1,133],Ce=[1,140],ct=[1,135],Se=[1,139],at=[1,137],dt=[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],gt=[1,155],Ct=[1,157],kt=[8,9,11],$t=[8,9,10,11,14,44,60,89,105,106,109,111,114,115,116],ut=[1,177],de=[1,173],st=[1,174],nt=[1,178],rt=[1,175],_e=[1,176],Ze=[77,116,119],He=[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],yt=[10,106],_t=[31,49,51,53,55,57,62,64,66,67,69,71,116,117,118],Ot=[1,248],ir=[1,246],ur=[1,250],Ee=[1,244],ot=[1,245],Be=[1,247],Ke=[1,249],ht=[1,251],At=[1,269],Yt=[8,9,11,106],Xt=[8,9,10,11,60,84,105,106,109,110,111,112],fr={trace:o(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:o(function(Ur,it,xt,lt,Dt,Re,Vr){var $e=Re.length-1;switch(Dt){case 2:this.$=[];break;case 3:(!Array.isArray(Re[$e])||Re[$e].length>0)&&Re[$e-1].push(Re[$e]),this.$=Re[$e-1];break;case 4:case 183:this.$=Re[$e];break;case 11:lt.setDirection("TB"),this.$="TB";break;case 12:lt.setDirection(Re[$e-1]),this.$=Re[$e-1];break;case 27:this.$=Re[$e-1].nodes;break;case 28:case 29:case 30:case 31:case 32:this.$=[];break;case 33:this.$=lt.addSubGraph(Re[$e-6],Re[$e-1],Re[$e-4]);break;case 34:this.$=lt.addSubGraph(Re[$e-3],Re[$e-1],Re[$e-3]);break;case 35:this.$=lt.addSubGraph(void 0,Re[$e-1],void 0);break;case 37:this.$=Re[$e].trim(),lt.setAccTitle(this.$);break;case 38:case 39:this.$=Re[$e].trim(),lt.setAccDescription(this.$);break;case 43:this.$=Re[$e-1]+Re[$e];break;case 44:this.$=Re[$e];break;case 45:lt.addVertex(Re[$e-1][Re[$e-1].length-1],void 0,void 0,void 0,void 0,void 0,void 0,Re[$e]),lt.addLink(Re[$e-3].stmt,Re[$e-1],Re[$e-2]),this.$={stmt:Re[$e-1],nodes:Re[$e-1].concat(Re[$e-3].nodes)};break;case 46:lt.addLink(Re[$e-2].stmt,Re[$e],Re[$e-1]),this.$={stmt:Re[$e],nodes:Re[$e].concat(Re[$e-2].nodes)};break;case 47:lt.addLink(Re[$e-3].stmt,Re[$e-1],Re[$e-2]),this.$={stmt:Re[$e-1],nodes:Re[$e-1].concat(Re[$e-3].nodes)};break;case 48:this.$={stmt:Re[$e-1],nodes:Re[$e-1]};break;case 49:lt.addVertex(Re[$e-1][Re[$e-1].length-1],void 0,void 0,void 0,void 0,void 0,void 0,Re[$e]),this.$={stmt:Re[$e-1],nodes:Re[$e-1],shapeData:Re[$e]};break;case 50:this.$={stmt:Re[$e],nodes:Re[$e]};break;case 51:this.$=[Re[$e]];break;case 52:lt.addVertex(Re[$e-5][Re[$e-5].length-1],void 0,void 0,void 0,void 0,void 0,void 0,Re[$e-4]),this.$=Re[$e-5].concat(Re[$e]);break;case 53:this.$=Re[$e-4].concat(Re[$e]);break;case 54:this.$=Re[$e];break;case 55:this.$=Re[$e-2],lt.setClass(Re[$e-2],Re[$e]);break;case 56:this.$=Re[$e-3],lt.addVertex(Re[$e-3],Re[$e-1],"square");break;case 57:this.$=Re[$e-3],lt.addVertex(Re[$e-3],Re[$e-1],"doublecircle");break;case 58:this.$=Re[$e-5],lt.addVertex(Re[$e-5],Re[$e-2],"circle");break;case 59:this.$=Re[$e-3],lt.addVertex(Re[$e-3],Re[$e-1],"ellipse");break;case 60:this.$=Re[$e-3],lt.addVertex(Re[$e-3],Re[$e-1],"stadium");break;case 61:this.$=Re[$e-3],lt.addVertex(Re[$e-3],Re[$e-1],"subroutine");break;case 62:this.$=Re[$e-7],lt.addVertex(Re[$e-7],Re[$e-1],"rect",void 0,void 0,void 0,Object.fromEntries([[Re[$e-5],Re[$e-3]]]));break;case 63:this.$=Re[$e-3],lt.addVertex(Re[$e-3],Re[$e-1],"cylinder");break;case 64:this.$=Re[$e-3],lt.addVertex(Re[$e-3],Re[$e-1],"round");break;case 65:this.$=Re[$e-3],lt.addVertex(Re[$e-3],Re[$e-1],"diamond");break;case 66:this.$=Re[$e-5],lt.addVertex(Re[$e-5],Re[$e-2],"hexagon");break;case 67:this.$=Re[$e-3],lt.addVertex(Re[$e-3],Re[$e-1],"odd");break;case 68:this.$=Re[$e-3],lt.addVertex(Re[$e-3],Re[$e-1],"trapezoid");break;case 69:this.$=Re[$e-3],lt.addVertex(Re[$e-3],Re[$e-1],"inv_trapezoid");break;case 70:this.$=Re[$e-3],lt.addVertex(Re[$e-3],Re[$e-1],"lean_right");break;case 71:this.$=Re[$e-3],lt.addVertex(Re[$e-3],Re[$e-1],"lean_left");break;case 72:this.$=Re[$e],lt.addVertex(Re[$e]);break;case 73:Re[$e-1].text=Re[$e],this.$=Re[$e-1];break;case 74:case 75:Re[$e-2].text=Re[$e-1],this.$=Re[$e-2];break;case 76:this.$=Re[$e];break;case 77:var Nr=lt.destructLink(Re[$e],Re[$e-2]);this.$={type:Nr.type,stroke:Nr.stroke,length:Nr.length,text:Re[$e-1]};break;case 78:var Nr=lt.destructLink(Re[$e],Re[$e-2]);this.$={type:Nr.type,stroke:Nr.stroke,length:Nr.length,text:Re[$e-1],id:Re[$e-3]};break;case 79:this.$={text:Re[$e],type:"text"};break;case 80:this.$={text:Re[$e-1].text+""+Re[$e],type:Re[$e-1].type};break;case 81:this.$={text:Re[$e],type:"string"};break;case 82:this.$={text:Re[$e],type:"markdown"};break;case 83:var Nr=lt.destructLink(Re[$e]);this.$={type:Nr.type,stroke:Nr.stroke,length:Nr.length};break;case 84:var Nr=lt.destructLink(Re[$e]);this.$={type:Nr.type,stroke:Nr.stroke,length:Nr.length,id:Re[$e-1]};break;case 85:this.$=Re[$e-1];break;case 86:this.$={text:Re[$e],type:"text"};break;case 87:this.$={text:Re[$e-1].text+""+Re[$e],type:Re[$e-1].type};break;case 88:this.$={text:Re[$e],type:"string"};break;case 89:case 104:this.$={text:Re[$e],type:"markdown"};break;case 101:this.$={text:Re[$e],type:"text"};break;case 102:this.$={text:Re[$e-1].text+""+Re[$e],type:Re[$e-1].type};break;case 103:this.$={text:Re[$e],type:"text"};break;case 105:this.$=Re[$e-4],lt.addClass(Re[$e-2],Re[$e]);break;case 106:this.$=Re[$e-4],lt.setClass(Re[$e-2],Re[$e]);break;case 107:case 115:this.$=Re[$e-1],lt.setClickEvent(Re[$e-1],Re[$e]);break;case 108:case 116:this.$=Re[$e-3],lt.setClickEvent(Re[$e-3],Re[$e-2]),lt.setTooltip(Re[$e-3],Re[$e]);break;case 109:this.$=Re[$e-2],lt.setClickEvent(Re[$e-2],Re[$e-1],Re[$e]);break;case 110:this.$=Re[$e-4],lt.setClickEvent(Re[$e-4],Re[$e-3],Re[$e-2]),lt.setTooltip(Re[$e-4],Re[$e]);break;case 111:this.$=Re[$e-2],lt.setLink(Re[$e-2],Re[$e]);break;case 112:this.$=Re[$e-4],lt.setLink(Re[$e-4],Re[$e-2]),lt.setTooltip(Re[$e-4],Re[$e]);break;case 113:this.$=Re[$e-4],lt.setLink(Re[$e-4],Re[$e-2],Re[$e]);break;case 114:this.$=Re[$e-6],lt.setLink(Re[$e-6],Re[$e-4],Re[$e]),lt.setTooltip(Re[$e-6],Re[$e-2]);break;case 117:this.$=Re[$e-1],lt.setLink(Re[$e-1],Re[$e]);break;case 118:this.$=Re[$e-3],lt.setLink(Re[$e-3],Re[$e-2]),lt.setTooltip(Re[$e-3],Re[$e]);break;case 119:this.$=Re[$e-3],lt.setLink(Re[$e-3],Re[$e-2],Re[$e]);break;case 120:this.$=Re[$e-5],lt.setLink(Re[$e-5],Re[$e-4],Re[$e]),lt.setTooltip(Re[$e-5],Re[$e-2]);break;case 121:this.$=Re[$e-4],lt.addVertex(Re[$e-2],void 0,void 0,Re[$e]);break;case 122:this.$=Re[$e-4],lt.updateLink([Re[$e-2]],Re[$e]);break;case 123:this.$=Re[$e-4],lt.updateLink(Re[$e-2],Re[$e]);break;case 124:this.$=Re[$e-8],lt.updateLinkInterpolate([Re[$e-6]],Re[$e-2]),lt.updateLink([Re[$e-6]],Re[$e]);break;case 125:this.$=Re[$e-8],lt.updateLinkInterpolate(Re[$e-6],Re[$e-2]),lt.updateLink(Re[$e-6],Re[$e]);break;case 126:this.$=Re[$e-6],lt.updateLinkInterpolate([Re[$e-4]],Re[$e]);break;case 127:this.$=Re[$e-6],lt.updateLinkInterpolate(Re[$e-4],Re[$e]);break;case 128:case 130:this.$=[Re[$e]];break;case 129:case 131:Re[$e-2].push(Re[$e]),this.$=Re[$e-2];break;case 133:this.$=Re[$e-1]+Re[$e];break;case 181:this.$=Re[$e];break;case 182:this.$=Re[$e-1]+""+Re[$e];break;case 184:this.$=Re[$e-1]+""+Re[$e];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:i},{1:[3]},e(n,a,{5:6}),{4:7,9:t,10:r,12:i},{4:8,9:t,10:r,12:i},{13:[1,9],14:[1,10]},{1:[2,1],6:11,7:12,8:s,9:l,10:h,11:u,20:17,22:18,23:19,24:20,25:21,26:22,27:d,33:24,34:p,36:f,38:g,42:28,43:39,44:m,45:40,47:41,60:y,84:b,85:v,86:T,87:x,88:k,89:C,102:E,105:w,106:_,109:L,111:N,113:42,114:D,115:M,116:B,121:A,122:I,123:O,124:R,125:$},e(n,[2,9]),e(n,[2,10]),e(n,[2,11]),{8:[1,55],9:[1,56],10:F,15:54,18:57},e(P,[2,3]),e(P,[2,4]),e(P,[2,5]),e(P,[2,6]),e(P,[2,7]),e(P,[2,8]),{8:z,9:q,11:G,21:59,41:60,72:64,75:[1,65],77:[1,67],78:[1,66]},{8:z,9:q,11:G,21:68},{8:z,9:q,11:G,21:69},{8:z,9:q,11:G,21:70},{8:z,9:q,11:G,21:71},{8:z,9:q,11:G,21:72},{8:z,9:q,10:[1,73],11:G,21:74},e(P,[2,36]),{35:[1,75]},{37:[1,76]},e(P,[2,39]),e(W,[2,50],{18:77,39:78,10:F,40:J}),{10:[1,80]},{10:[1,81]},{10:[1,82]},{10:[1,83]},{14:H,44:Z,60:se,80:[1,87],89:Q,95:[1,84],97:[1,85],101:86,105:te,106:re,109:ne,111:Ae,114:ie,115:me,116:oe,120:88},e(P,[2,185]),e(P,[2,186]),e(P,[2,187]),e(P,[2,188]),e(P,[2,189]),e(we,[2,51]),e(we,[2,54],{46:[1,100]}),e(ye,[2,72],{113:113,29:[1,101],44:m,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:E,105:w,106:_,109:L,111:N,114:D,115:M,116:B}),e(ve,[2,181]),e(ve,[2,142]),e(ve,[2,143]),e(ve,[2,144]),e(ve,[2,145]),e(ve,[2,146]),e(ve,[2,147]),e(ve,[2,148]),e(ve,[2,149]),e(ve,[2,150]),e(ve,[2,151]),e(ve,[2,152]),e(n,[2,12]),e(n,[2,18]),e(n,[2,19]),{9:[1,114]},e(ae,[2,26],{18:115,10:F}),e(P,[2,27]),{42:116,43:39,44:m,45:40,47:41,60:y,89:C,102:E,105:w,106:_,109:L,111:N,113:42,114:D,115:M,116:B},e(P,[2,40]),e(P,[2,41]),e(P,[2,42]),e(Pe,[2,76],{73:117,62:[1,119],74:[1,118]}),{76:120,79:121,80:X,81:ce,116:ge,119:be},{75:[1,126],77:[1,127]},e(ke,[2,83]),e(P,[2,28]),e(P,[2,29]),e(P,[2,30]),e(P,[2,31]),e(P,[2,32]),{10:Me,12:pe,14:Oe,27:j,28:128,32:le,44:U,60:fe,75:Y,80:[1,130],81:[1,131],83:141,84:Le,85:xe,86:je,87:Ie,88:Ve,89:Ne,90:Ge,91:129,105:ze,109:Ue,111:Ce,114:ct,115:Se,116:at},e(dt,a,{5:154}),e(P,[2,37]),e(P,[2,38]),e(W,[2,48],{44:gt}),e(W,[2,49],{18:156,10:F,40:Ct}),e(we,[2,44]),{44:m,47:158,60:y,89:C,102:E,105:w,106:_,109:L,111:N,113:42,114:D,115:M,116:B},{102:[1,159],103:160,105:[1,161]},{44:m,47:162,60:y,89:C,102:E,105:w,106:_,109:L,111:N,113:42,114:D,115:M,116:B},{44:m,47:163,60:y,89:C,102:E,105:w,106:_,109:L,111:N,113:42,114:D,115:M,116:B},e(kt,[2,107],{10:[1,164],96:[1,165]}),{80:[1,166]},e(kt,[2,115],{120:168,10:[1,167],14:H,44:Z,60:se,89:Q,105:te,106:re,109:ne,111:Ae,114:ie,115:me,116:oe}),e(kt,[2,117],{10:[1,169]}),e($t,[2,183]),e($t,[2,170]),e($t,[2,171]),e($t,[2,172]),e($t,[2,173]),e($t,[2,174]),e($t,[2,175]),e($t,[2,176]),e($t,[2,177]),e($t,[2,178]),e($t,[2,179]),e($t,[2,180]),{44:m,47:170,60:y,89:C,102:E,105:w,106:_,109:L,111:N,113:42,114:D,115:M,116:B},{30:171,67:ut,80:de,81:st,82:172,116:nt,117:rt,118:_e},{30:179,67:ut,80:de,81:st,82:172,116:nt,117:rt,118:_e},{30:181,50:[1,180],67:ut,80:de,81:st,82:172,116:nt,117:rt,118:_e},{30:182,67:ut,80:de,81:st,82:172,116:nt,117:rt,118:_e},{30:183,67:ut,80:de,81:st,82:172,116:nt,117:rt,118:_e},{30:184,67:ut,80:de,81:st,82:172,116:nt,117:rt,118:_e},{109:[1,185]},{30:186,67:ut,80:de,81:st,82:172,116:nt,117:rt,118:_e},{30:187,65:[1,188],67:ut,80:de,81:st,82:172,116:nt,117:rt,118:_e},{30:189,67:ut,80:de,81:st,82:172,116:nt,117:rt,118:_e},{30:190,67:ut,80:de,81:st,82:172,116:nt,117:rt,118:_e},{30:191,67:ut,80:de,81:st,82:172,116:nt,117:rt,118:_e},e(ve,[2,182]),e(n,[2,20]),e(ae,[2,25]),e(W,[2,46],{39:192,18:193,10:F,40:J}),e(Pe,[2,73],{10:[1,194]}),{10:[1,195]},{30:196,67:ut,80:de,81:st,82:172,116:nt,117:rt,118:_e},{77:[1,197],79:198,116:ge,119:be},e(Ze,[2,79]),e(Ze,[2,81]),e(Ze,[2,82]),e(Ze,[2,168]),e(Ze,[2,169]),{76:199,79:121,80:X,81:ce,116:ge,119:be},e(ke,[2,84]),{8:z,9:q,10:Me,11:G,12:pe,14:Oe,21:201,27:j,29:[1,200],32:le,44:U,60:fe,75:Y,83:141,84:Le,85:xe,86:je,87:Ie,88:Ve,89:Ne,90:Ge,91:202,105:ze,109:Ue,111:Ce,114:ct,115:Se,116:at},e(He,[2,101]),e(He,[2,103]),e(He,[2,104]),e(He,[2,157]),e(He,[2,158]),e(He,[2,159]),e(He,[2,160]),e(He,[2,161]),e(He,[2,162]),e(He,[2,163]),e(He,[2,164]),e(He,[2,165]),e(He,[2,166]),e(He,[2,167]),e(He,[2,90]),e(He,[2,91]),e(He,[2,92]),e(He,[2,93]),e(He,[2,94]),e(He,[2,95]),e(He,[2,96]),e(He,[2,97]),e(He,[2,98]),e(He,[2,99]),e(He,[2,100]),{6:11,7:12,8:s,9:l,10:h,11:u,20:17,22:18,23:19,24:20,25:21,26:22,27:d,32:[1,203],33:24,34:p,36:f,38:g,42:28,43:39,44:m,45:40,47:41,60:y,84:b,85:v,86:T,87:x,88:k,89:C,102:E,105:w,106:_,109:L,111:N,113:42,114:D,115:M,116:B,121:A,122:I,123:O,124:R,125:$},{10:F,18:204},{44:[1,205]},e(we,[2,43]),{10:[1,206],44:m,60:y,89:C,102:E,105:w,106:_,109:L,111:N,113:113,114:D,115:M,116:B},{10:[1,207]},{10:[1,208],106:[1,209]},e(yt,[2,128]),{10:[1,210],44:m,60:y,89:C,102:E,105:w,106:_,109:L,111:N,113:113,114:D,115:M,116:B},{10:[1,211],44:m,60:y,89:C,102:E,105:w,106:_,109:L,111:N,113:113,114:D,115:M,116:B},{80:[1,212]},e(kt,[2,109],{10:[1,213]}),e(kt,[2,111],{10:[1,214]}),{80:[1,215]},e($t,[2,184]),{80:[1,216],98:[1,217]},e(we,[2,55],{113:113,44:m,60:y,89:C,102:E,105:w,106:_,109:L,111:N,114:D,115:M,116:B}),{31:[1,218],67:ut,82:219,116:nt,117:rt,118:_e},e(_t,[2,86]),e(_t,[2,88]),e(_t,[2,89]),e(_t,[2,153]),e(_t,[2,154]),e(_t,[2,155]),e(_t,[2,156]),{49:[1,220],67:ut,82:219,116:nt,117:rt,118:_e},{30:221,67:ut,80:de,81:st,82:172,116:nt,117:rt,118:_e},{51:[1,222],67:ut,82:219,116:nt,117:rt,118:_e},{53:[1,223],67:ut,82:219,116:nt,117:rt,118:_e},{55:[1,224],67:ut,82:219,116:nt,117:rt,118:_e},{57:[1,225],67:ut,82:219,116:nt,117:rt,118:_e},{60:[1,226]},{64:[1,227],67:ut,82:219,116:nt,117:rt,118:_e},{66:[1,228],67:ut,82:219,116:nt,117:rt,118:_e},{30:229,67:ut,80:de,81:st,82:172,116:nt,117:rt,118:_e},{31:[1,230],67:ut,82:219,116:nt,117:rt,118:_e},{67:ut,69:[1,231],71:[1,232],82:219,116:nt,117:rt,118:_e},{67:ut,69:[1,234],71:[1,233],82:219,116:nt,117:rt,118:_e},e(W,[2,45],{18:156,10:F,40:Ct}),e(W,[2,47],{44:gt}),e(Pe,[2,75]),e(Pe,[2,74]),{62:[1,235],67:ut,82:219,116:nt,117:rt,118:_e},e(Pe,[2,77]),e(Ze,[2,80]),{77:[1,236],79:198,116:ge,119:be},{30:237,67:ut,80:de,81:st,82:172,116:nt,117:rt,118:_e},e(dt,a,{5:238}),e(He,[2,102]),e(P,[2,35]),{43:239,44:m,45:40,47:41,60:y,89:C,102:E,105:w,106:_,109:L,111:N,113:42,114:D,115:M,116:B},{10:F,18:240},{10:Ot,60:ir,84:ur,92:241,105:Ee,107:242,108:243,109:ot,110:Be,111:Ke,112:ht},{10:Ot,60:ir,84:ur,92:252,104:[1,253],105:Ee,107:242,108:243,109:ot,110:Be,111:Ke,112:ht},{10:Ot,60:ir,84:ur,92:254,104:[1,255],105:Ee,107:242,108:243,109:ot,110:Be,111:Ke,112:ht},{105:[1,256]},{10:Ot,60:ir,84:ur,92:257,105:Ee,107:242,108:243,109:ot,110:Be,111:Ke,112:ht},{44:m,47:258,60:y,89:C,102:E,105:w,106:_,109:L,111:N,113:42,114:D,115:M,116:B},e(kt,[2,108]),{80:[1,259]},{80:[1,260],98:[1,261]},e(kt,[2,116]),e(kt,[2,118],{10:[1,262]}),e(kt,[2,119]),e(ye,[2,56]),e(_t,[2,87]),e(ye,[2,57]),{51:[1,263],67:ut,82:219,116:nt,117:rt,118:_e},e(ye,[2,64]),e(ye,[2,59]),e(ye,[2,60]),e(ye,[2,61]),{109:[1,264]},e(ye,[2,63]),e(ye,[2,65]),{66:[1,265],67:ut,82:219,116:nt,117:rt,118:_e},e(ye,[2,67]),e(ye,[2,68]),e(ye,[2,70]),e(ye,[2,69]),e(ye,[2,71]),e([10,44,60,89,102,105,106,109,111,114,115,116],[2,85]),e(Pe,[2,78]),{31:[1,266],67:ut,82:219,116:nt,117:rt,118:_e},{6:11,7:12,8:s,9:l,10:h,11:u,20:17,22:18,23:19,24:20,25:21,26:22,27:d,32:[1,267],33:24,34:p,36:f,38:g,42:28,43:39,44:m,45:40,47:41,60:y,84:b,85:v,86:T,87:x,88:k,89:C,102:E,105:w,106:_,109:L,111:N,113:42,114:D,115:M,116:B,121:A,122:I,123:O,124:R,125:$},e(we,[2,53]),{43:268,44:m,45:40,47:41,60:y,89:C,102:E,105:w,106:_,109:L,111:N,113:42,114:D,115:M,116:B},e(kt,[2,121],{106:At}),e(Yt,[2,130],{108:270,10:Ot,60:ir,84:ur,105:Ee,109:ot,110:Be,111:Ke,112:ht}),e(Xt,[2,132]),e(Xt,[2,134]),e(Xt,[2,135]),e(Xt,[2,136]),e(Xt,[2,137]),e(Xt,[2,138]),e(Xt,[2,139]),e(Xt,[2,140]),e(Xt,[2,141]),e(kt,[2,122],{106:At}),{10:[1,271]},e(kt,[2,123],{106:At}),{10:[1,272]},e(yt,[2,129]),e(kt,[2,105],{106:At}),e(kt,[2,106],{113:113,44:m,60:y,89:C,102:E,105:w,106:_,109:L,111:N,114:D,115:M,116:B}),e(kt,[2,110]),e(kt,[2,112],{10:[1,273]}),e(kt,[2,113]),{98:[1,274]},{51:[1,275]},{62:[1,276]},{66:[1,277]},{8:z,9:q,11:G,21:278},e(P,[2,34]),e(we,[2,52]),{10:Ot,60:ir,84:ur,105:Ee,107:279,108:243,109:ot,110:Be,111:Ke,112:ht},e(Xt,[2,133]),{14:H,44:Z,60:se,89:Q,101:280,105:te,106:re,109:ne,111:Ae,114:ie,115:me,116:oe,120:88},{14:H,44:Z,60:se,89:Q,101:281,105:te,106:re,109:ne,111:Ae,114:ie,115:me,116:oe,120:88},{98:[1,282]},e(kt,[2,120]),e(ye,[2,58]),{30:283,67:ut,80:de,81:st,82:172,116:nt,117:rt,118:_e},e(ye,[2,66]),e(dt,a,{5:284}),e(Yt,[2,131],{108:270,10:Ot,60:ir,84:ur,105:Ee,109:ot,110:Be,111:Ke,112:ht}),e(kt,[2,126],{120:168,10:[1,285],14:H,44:Z,60:se,89:Q,105:te,106:re,109:ne,111:Ae,114:ie,115:me,116:oe}),e(kt,[2,127],{120:168,10:[1,286],14:H,44:Z,60:se,89:Q,105:te,106:re,109:ne,111:Ae,114:ie,115:me,116:oe}),e(kt,[2,114]),{31:[1,287],67:ut,82:219,116:nt,117:rt,118:_e},{6:11,7:12,8:s,9:l,10:h,11:u,20:17,22:18,23:19,24:20,25:21,26:22,27:d,32:[1,288],33:24,34:p,36:f,38:g,42:28,43:39,44:m,45:40,47:41,60:y,84:b,85:v,86:T,87:x,88:k,89:C,102:E,105:w,106:_,109:L,111:N,113:42,114:D,115:M,116:B,121:A,122:I,123:O,124:R,125:$},{10:Ot,60:ir,84:ur,92:289,105:Ee,107:242,108:243,109:ot,110:Be,111:Ke,112:ht},{10:Ot,60:ir,84:ur,92:290,105:Ee,107:242,108:243,109:ot,110:Be,111:Ke,112:ht},e(ye,[2,62]),e(P,[2,33]),e(kt,[2,124],{106:At}),e(kt,[2,125],{106:At})],defaultActions:{},parseError:o(function(Ur,it){if(it.recoverable)this.trace(Ur);else{var xt=new Error(Ur);throw xt.hash=it,xt}},"parseError"),parse:o(function(Ur){var it=this,xt=[0],lt=[],Dt=[null],Re=[],Vr=this.table,$e="",Nr=0,hl=0,ul=0,my=2,yy=1,UT=Re.slice.call(arguments,1),mn=Object.create(this.lexer),th={yy:{}};for(var mu in this.yy)Object.prototype.hasOwnProperty.call(this.yy,mu)&&(th.yy[mu]=this.yy[mu]);mn.setInput(Ur,th.yy),th.yy.lexer=mn,th.yy.parser=this,typeof mn.yylloc>"u"&&(mn.yylloc={});var jg=mn.yylloc;Re.push(jg);var is=mn.options&&mn.options.ranges;typeof th.yy.parseError=="function"?this.parseError=th.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function SA(eo){xt.length=xt.length-2*eo,Dt.length=Dt.length-eo,Re.length=Re.length-eo}o(SA,"popStack");function FK(){var eo;return eo=lt.pop()||mn.lex()||yy,typeof eo!="number"&&(eo instanceof Array&&(lt=eo,eo=lt.pop()),eo=it.symbols_[eo]||eo),eo}o(FK,"lex");for(var ns,_A,dp,Eo,okt,AA,Gg={},VT,rh,zK,YT;;){if(dp=xt[xt.length-1],this.defaultActions[dp]?Eo=this.defaultActions[dp]:((ns===null||typeof ns>"u")&&(ns=FK()),Eo=Vr[dp]&&Vr[dp][ns]),typeof Eo>"u"||!Eo.length||!Eo[0]){var RA="";YT=[];for(VT in Vr[dp])this.terminals_[VT]&&VT>my&&YT.push("'"+this.terminals_[VT]+"'");mn.showPosition?RA="Parse error on line "+(Nr+1)+`: +`+mn.showPosition()+` +Expecting `+YT.join(", ")+", got '"+(this.terminals_[ns]||ns)+"'":RA="Parse error on line "+(Nr+1)+": Unexpected "+(ns==yy?"end of input":"'"+(this.terminals_[ns]||ns)+"'"),this.parseError(RA,{text:mn.match,token:this.terminals_[ns]||ns,line:mn.yylineno,loc:jg,expected:YT})}if(Eo[0]instanceof Array&&Eo.length>1)throw new Error("Parse Error: multiple actions possible at state: "+dp+", token: "+ns);switch(Eo[0]){case 1:xt.push(ns),Dt.push(mn.yytext),Re.push(mn.yylloc),xt.push(Eo[1]),ns=null,_A?(ns=_A,_A=null):(hl=mn.yyleng,$e=mn.yytext,Nr=mn.yylineno,jg=mn.yylloc,ul>0&&ul--);break;case 2:if(rh=this.productions_[Eo[1]][1],Gg.$=Dt[Dt.length-rh],Gg._$={first_line:Re[Re.length-(rh||1)].first_line,last_line:Re[Re.length-1].last_line,first_column:Re[Re.length-(rh||1)].first_column,last_column:Re[Re.length-1].last_column},is&&(Gg._$.range=[Re[Re.length-(rh||1)].range[0],Re[Re.length-1].range[1]]),AA=this.performAction.apply(Gg,[$e,hl,Nr,th.yy,Eo[1],Dt,Re].concat(UT)),typeof AA<"u")return AA;rh&&(xt=xt.slice(0,-1*rh*2),Dt=Dt.slice(0,-1*rh),Re=Re.slice(0,-1*rh)),xt.push(this.productions_[Eo[1]][0]),Dt.push(Gg.$),Re.push(Gg._$),zK=Vr[xt[xt.length-2]][xt[xt.length-1]],xt.push(zK);break;case 3:return!0}}return!0},"parse")},Zr=(function(){var Ur={EOF:1,parseError:o(function(it,xt){if(this.yy.parser)this.yy.parser.parseError(it,xt);else throw new Error(it)},"parseError"),setInput:o(function(it,xt){return this.yy=xt||this.yy||{},this._input=it,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:o(function(){var it=this._input[0];this.yytext+=it,this.yyleng++,this.offset++,this.match+=it,this.matched+=it;var xt=it.match(/(?:\r\n?|\n).*/g);return xt?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),it},"input"),unput:o(function(it){var xt=it.length,lt=it.split(/(?:\r\n?|\n)/g);this._input=it+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-xt),this.offset-=xt;var Dt=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),lt.length-1&&(this.yylineno-=lt.length-1);var Re=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:lt?(lt.length===Dt.length?this.yylloc.first_column:0)+Dt[Dt.length-lt.length].length-lt[0].length:this.yylloc.first_column-xt},this.options.ranges&&(this.yylloc.range=[Re[0],Re[0]+this.yyleng-xt]),this.yyleng=this.yytext.length,this},"unput"),more:o(function(){return this._more=!0,this},"more"),reject:o(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:o(function(it){this.unput(this.match.slice(it))},"less"),pastInput:o(function(){var it=this.matched.substr(0,this.matched.length-this.match.length);return(it.length>20?"...":"")+it.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:o(function(){var it=this.match;return it.length<20&&(it+=this._input.substr(0,20-it.length)),(it.substr(0,20)+(it.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:o(function(){var it=this.pastInput(),xt=new Array(it.length+1).join("-");return it+this.upcomingInput()+` +`+xt+"^"},"showPosition"),test_match:o(function(it,xt){var lt,Dt,Re;if(this.options.backtrack_lexer&&(Re={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&&(Re.yylloc.range=this.yylloc.range.slice(0))),Dt=it[0].match(/(?:\r\n?|\n).*/g),Dt&&(this.yylineno+=Dt.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:Dt?Dt[Dt.length-1].length-Dt[Dt.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+it[0].length},this.yytext+=it[0],this.match+=it[0],this.matches=it,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(it[0].length),this.matched+=it[0],lt=this.performAction.call(this,this.yy,this,xt,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),lt)return lt;if(this._backtrack){for(var Vr in Re)this[Vr]=Re[Vr];return!1}return!1},"test_match"),next:o(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var it,xt,lt,Dt;this._more||(this.yytext="",this.match="");for(var Re=this._currentRules(),Vr=0;Vrxt[0].length)){if(xt=lt,Dt=Vr,this.options.backtrack_lexer){if(it=this.test_match(lt,Re[Vr]),it!==!1)return it;if(this._backtrack){xt=!1;continue}else return!1}else if(!this.options.flex)break}return xt?(it=this.test_match(xt,Re[Dt]),it!==!1?it:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:o(function(){var it=this.next();return it||this.lex()},"lex"),begin:o(function(it){this.conditionStack.push(it)},"begin"),popState:o(function(){var it=this.conditionStack.length-1;return it>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:o(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:o(function(it){return it=this.conditionStack.length-1-Math.abs(it||0),it>=0?this.conditionStack[it]:"INITIAL"},"topState"),pushState:o(function(it){this.begin(it)},"pushState"),stateStackSize:o(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:o(function(it,xt,lt,Dt){var Re=Dt;switch(lt){case 0:return this.begin("acc_title"),34;case 1:return this.popState(),"acc_title_value";case 2:return this.begin("acc_descr"),36;case 3:return this.popState(),"acc_descr_value";case 4:this.begin("acc_descr_multiline");break;case 5:this.popState();break;case 6:return"acc_descr_multiline_value";case 7:return this.pushState("shapeData"),xt.yytext="",40;case 8:return this.pushState("shapeDataStr"),40;case 9:return this.popState(),40;case 10:let Vr=/\n\s*/g;return xt.yytext=xt.yytext.replace(Vr,"
    "),40;case 11:return 40;case 12:this.popState();break;case 13:this.begin("callbackname");break;case 14:this.popState();break;case 15:this.popState(),this.begin("callbackargs");break;case 16:return 95;case 17:this.popState();break;case 18:return 96;case 19:return"MD_STR";case 20:this.popState();break;case 21:this.begin("md_string");break;case 22:return"STR";case 23:this.popState();break;case 24:this.pushState("string");break;case 25:return 84;case 26:return 102;case 27:return 85;case 28:return 104;case 29:return 86;case 30:return 87;case 31:return 97;case 32:this.begin("click");break;case 33:this.popState();break;case 34:return 88;case 35:return it.lex.firstGraph()&&this.begin("dir"),12;case 36:return it.lex.firstGraph()&&this.begin("dir"),12;case 37:return it.lex.firstGraph()&&this.begin("dir"),12;case 38:return it.lex.firstGraph()&&this.begin("dir"),12;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;case 46:return this.popState(),14;case 47:return this.popState(),14;case 48:return this.popState(),14;case 49:return this.popState(),14;case 50:return this.popState(),14;case 51:return this.popState(),14;case 52:return this.popState(),14;case 53:return this.popState(),14;case 54:return this.popState(),14;case 55:return this.popState(),14;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;case 71:return this.pushState("edgeText"),75;case 72:return 119;case 73:return this.popState(),77;case 74:return this.pushState("thickEdgeText"),75;case 75:return 119;case 76:return this.popState(),77;case 77:return this.pushState("dottedEdgeText"),75;case 78:return 119;case 79:return 77;case 80:return this.popState(),53;case 81:return"TEXT";case 82:return this.pushState("ellipseText"),52;case 83:return this.popState(),55;case 84:return this.pushState("text"),54;case 85:return this.popState(),57;case 86:return this.pushState("text"),56;case 87:return 58;case 88:return this.pushState("text"),67;case 89:return this.popState(),64;case 90:return this.pushState("text"),63;case 91:return this.popState(),49;case 92:return this.pushState("text"),48;case 93:return this.popState(),69;case 94:return this.popState(),71;case 95:return 117;case 96:return this.pushState("trapText"),68;case 97:return this.pushState("trapText"),70;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;case 110:return this.pushState("text"),62;case 111:return this.popState(),51;case 112:return this.pushState("text"),50;case 113:return this.popState(),31;case 114:return this.pushState("text"),29;case 115:return this.popState(),66;case 116:return this.pushState("text"),65;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 Ur})();fr.lexer=Zr;function Gt(){this.yy={}}return o(Gt,"Parser"),Gt.prototype=fr,fr.Parser=Gt,new Gt})();jN.parser=jN;c4e=jN,h4e=Object.assign({},c4e);h4e.parse=e=>{let t=e.replace(/}\s*\n/g,`} +`);return c4e.parse(t)};XKe=h4e,KKe=o((e,t)=>{let r=v0,i=r(e,"r"),n=r(e,"g"),a=r(e,"b");return Ds(i,n,a,t)},"fade"),ZKe=o(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: ${KKe(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}; + } */ + + 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; + } + ${Ac()} +`,"getStyles"),GN=ZKe,fb=o(({defaultLayout:e,styles:t=GN}={})=>({parser:XKe,get db(){return new UKe},renderer:HKe,styles:t,init:o(r=>{r.flowchart||(r.flowchart={});let i=$k().layout??e??r.layout;i&&A2({layout:i}),r.flowchart.arrowMarkerAbsolute=r.arrowMarkerAbsolute,A2({flowchart:{arrowMarkerAbsolute:r.arrowMarkerAbsolute}})},"init")}),"createFlowDiagram"),u4e=fb()});var e5={};Kt(e5,{createFlowDiagram:()=>fb,diagram:()=>u4e});var t5=Tt(()=>{WN();Rc();fo();Ws();Ip();js();po();Bs();ha();Zn();sa();ds();la();Fn();An();Or();Yr();tr();Zt();vt()});var d4e={};Kt(d4e,{diagram:()=>eZe});var QKe,JKe,eZe,p4e=Tt(()=>{WN();Rc();fo();Ws();Ip();js();po();Bs();ha();Zn();sa();ds();la();Fn();An();Or();Yr();tr();Zt();vt();QKe=o(e=>`${GN(e)} + .swimlane.cluster rect { + stroke: ${e.clusterBorder} !important; + } + [data-look="neo"].cluster rect { + filter: none; + } +`,"getStyles"),JKe=QKe,eZe=fb({defaultLayout:"swimlane",styles:JKe})});var m4e={};Kt(m4e,{diagram:()=>oZe});var UN,tZe,rZe,g4e,iZe,f4e,r5,nZe,aZe,sZe,oZe,y4e=Tt(()=>{fo();Ws();js();Bs();ha();Zn();sa();ds();la();Fn();An();Or();Yr();tr();Zt();vt();UN=(function(){var e=o(function(me,oe,we,ye){for(we=we||{},ye=me.length;ye--;we[me[ye]]=oe);return we},"o"),t=[6,8,10,22,24,26,28,33,34,35,36,37,40,43,44,48,50,51,52],r=[1,10],i=[1,11],n=[1,12],a=[1,13],s=[1,23],l=[1,24],h=[1,25],u=[1,26],d=[1,27],p=[1,19],f=[1,28],g=[1,29],m=[1,20],y=[1,18],b=[1,21],v=[1,22],T=[1,36],x=[1,37],k=[1,38],C=[1,39],E=[1,40],w=[6,8,10,13,15,17,20,21,22,24,26,28,33,34,35,36,37,40,43,44,48,50,51,52,66,67,68,69,70],_=[1,45],L=[1,46],N=[1,55],D=[40,48,50,51,52,71,72],M=[1,66],B=[1,64],A=[1,61],I=[1,65],O=[1,67],R=[6,8,10,13,17,22,24,26,28,33,34,35,36,37,40,41,42,43,44,48,49,50,51,52,66,67,68,69,70],$=[66,67,68,69,70],F=[1,85],P=[1,84],z=[1,82],q=[1,83],G=[6,10,42,47],W=[6,10,13,41,42,47,48,49],J=[1,93],H=[1,92],Z=[1,91],se=[19,58],Q=[1,102],te=[1,101],re=[19,58,61,63],ne={trace:o(function(){},"trace"),yy:{},symbols_:{error:2,start:3,ER_DIAGRAM:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,entityName:11,relSpec:12,COLON:13,role:14,STYLE_SEPARATOR:15,idList:16,BLOCK_START:17,attributes:18,BLOCK_STOP:19,SQS:20,SQE:21,title:22,title_value:23,acc_title:24,acc_title_value:25,acc_descr:26,acc_descr_value:27,acc_descr_multiline_value:28,direction:29,classDefStatement:30,classStatement:31,styleStatement:32,direction_tb:33,direction_bt:34,direction_rl:35,direction_lr:36,CLASSDEF:37,stylesOpt:38,separator:39,UNICODE_TEXT:40,STYLE_TEXT:41,COMMA:42,CLASS:43,STYLE:44,style:45,styleComponent:46,SEMI:47,NUM:48,BRKT:49,ENTITY_NAME:50,DECIMAL_NUM:51,ENTITY_ONE:52,attribute:53,attributeType:54,attributeName:55,attributeKeyTypeList:56,attributeComment:57,ATTRIBUTE_WORD:58,"?":59,attributeKeyType:60,",":61,ATTRIBUTE_KEY:62,COMMENT:63,cardinality:64,relType:65,ZERO_OR_ONE:66,ZERO_OR_MORE:67,ONE_OR_MORE:68,ONLY_ONE:69,MD_PARENT:70,NON_IDENTIFYING:71,IDENTIFYING:72,WORD:73,$accept:0,$end:1},terminals_:{2:"error",4:"ER_DIAGRAM",6:"EOF",8:"SPACE",10:"NEWLINE",13:"COLON",15:"STYLE_SEPARATOR",17:"BLOCK_START",19:"BLOCK_STOP",20:"SQS",21:"SQE",22:"title",23:"title_value",24:"acc_title",25:"acc_title_value",26:"acc_descr",27:"acc_descr_value",28:"acc_descr_multiline_value",33:"direction_tb",34:"direction_bt",35:"direction_rl",36:"direction_lr",37:"CLASSDEF",40:"UNICODE_TEXT",41:"STYLE_TEXT",42:"COMMA",43:"CLASS",44:"STYLE",47:"SEMI",48:"NUM",49:"BRKT",50:"ENTITY_NAME",51:"DECIMAL_NUM",52:"ENTITY_ONE",58:"ATTRIBUTE_WORD",59:"?",61:",",62:"ATTRIBUTE_KEY",63:"COMMENT",66:"ZERO_OR_ONE",67:"ZERO_OR_MORE",68:"ONE_OR_MORE",69:"ONLY_ONE",70:"MD_PARENT",71:"NON_IDENTIFYING",72:"IDENTIFYING",73:"WORD"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,5],[9,9],[9,7],[9,7],[9,4],[9,6],[9,3],[9,5],[9,1],[9,3],[9,7],[9,9],[9,6],[9,8],[9,4],[9,6],[9,2],[9,2],[9,2],[9,1],[9,1],[9,1],[9,1],[9,1],[29,1],[29,1],[29,1],[29,1],[30,4],[16,1],[16,1],[16,3],[16,3],[31,3],[32,4],[38,1],[38,3],[45,1],[45,2],[39,1],[39,1],[39,1],[46,1],[46,1],[46,1],[46,1],[11,1],[11,1],[11,1],[11,1],[11,1],[18,1],[18,2],[53,2],[53,3],[53,3],[53,4],[54,1],[54,2],[55,1],[56,1],[56,3],[60,1],[57,1],[12,3],[64,1],[64,1],[64,1],[64,1],[64,1],[65,1],[65,1],[14,1],[14,1],[14,1]],performAction:o(function(me,oe,we,ye,ve,ae,Pe){var X=ae.length-1;switch(ve){case 1:break;case 2:this.$=[];break;case 3:ae[X-1].push(ae[X]),this.$=ae[X-1];break;case 4:case 5:this.$=ae[X];break;case 6:case 7:this.$=[];break;case 8:ye.addEntity(ae[X-4]),ye.addEntity(ae[X-2]),ye.addRelationship(ae[X-4],ae[X],ae[X-2],ae[X-3]);break;case 9:ye.addEntity(ae[X-8]),ye.addEntity(ae[X-4]),ye.addRelationship(ae[X-8],ae[X],ae[X-4],ae[X-5]),ye.setClass([ae[X-8]],ae[X-6]),ye.setClass([ae[X-4]],ae[X-2]);break;case 10:ye.addEntity(ae[X-6]),ye.addEntity(ae[X-2]),ye.addRelationship(ae[X-6],ae[X],ae[X-2],ae[X-3]),ye.setClass([ae[X-6]],ae[X-4]);break;case 11:ye.addEntity(ae[X-6]),ye.addEntity(ae[X-4]),ye.addRelationship(ae[X-6],ae[X],ae[X-4],ae[X-5]),ye.setClass([ae[X-4]],ae[X-2]);break;case 12:ye.addEntity(ae[X-3]),ye.addAttributes(ae[X-3],ae[X-1]);break;case 13:ye.addEntity(ae[X-5]),ye.addAttributes(ae[X-5],ae[X-1]),ye.setClass([ae[X-5]],ae[X-3]);break;case 14:ye.addEntity(ae[X-2]);break;case 15:ye.addEntity(ae[X-4]),ye.setClass([ae[X-4]],ae[X-2]);break;case 16:ye.addEntity(ae[X]);break;case 17:ye.addEntity(ae[X-2]),ye.setClass([ae[X-2]],ae[X]);break;case 18:ye.addEntity(ae[X-6],ae[X-4]),ye.addAttributes(ae[X-6],ae[X-1]);break;case 19:ye.addEntity(ae[X-8],ae[X-6]),ye.addAttributes(ae[X-8],ae[X-1]),ye.setClass([ae[X-8]],ae[X-3]);break;case 20:ye.addEntity(ae[X-5],ae[X-3]);break;case 21:ye.addEntity(ae[X-7],ae[X-5]),ye.setClass([ae[X-7]],ae[X-2]);break;case 22:ye.addEntity(ae[X-3],ae[X-1]);break;case 23:ye.addEntity(ae[X-5],ae[X-3]),ye.setClass([ae[X-5]],ae[X]);break;case 24:case 25:this.$=ae[X].trim(),ye.setAccTitle(this.$);break;case 26:case 27:this.$=ae[X].trim(),ye.setAccDescription(this.$);break;case 32:ye.setDirection("TB");break;case 33:ye.setDirection("BT");break;case 34:ye.setDirection("RL");break;case 35:ye.setDirection("LR");break;case 36:this.$=ae[X-3],ye.addClass(ae[X-2],ae[X-1]);break;case 37:case 38:case 59:case 68:this.$=[ae[X]];break;case 39:case 40:this.$=ae[X-2].concat([ae[X]]);break;case 41:this.$=ae[X-2],ye.setClass(ae[X-1],ae[X]);break;case 42:this.$=ae[X-3],ye.addCssStyles(ae[X-2],ae[X-1]);break;case 43:this.$=[ae[X]];break;case 44:ae[X-2].push(ae[X]),this.$=ae[X-2];break;case 46:this.$=ae[X-1]+ae[X];break;case 54:case 80:case 81:this.$=ae[X].replace(/"/g,"");break;case 55:case 56:case 57:case 58:case 82:this.$=ae[X];break;case 60:ae[X].push(ae[X-1]),this.$=ae[X];break;case 61:this.$={type:ae[X-1],name:ae[X]};break;case 62:this.$={type:ae[X-2],name:ae[X-1],keys:ae[X]};break;case 63:this.$={type:ae[X-2],name:ae[X-1],comment:ae[X]};break;case 64:this.$={type:ae[X-3],name:ae[X-2],keys:ae[X-1],comment:ae[X]};break;case 65:case 67:case 70:this.$=ae[X];break;case 66:this.$=ae[X-1]+ae[X];break;case 69:ae[X-2].push(ae[X]),this.$=ae[X-2];break;case 71:this.$=ae[X].replace(/"/g,"");break;case 72:this.$={cardA:ae[X],relType:ae[X-1],cardB:ae[X-2]};break;case 73:this.$=ye.Cardinality.ZERO_OR_ONE;break;case 74:this.$=ye.Cardinality.ZERO_OR_MORE;break;case 75:this.$=ye.Cardinality.ONE_OR_MORE;break;case 76:this.$=ye.Cardinality.ONLY_ONE;break;case 77:this.$=ye.Cardinality.MD_PARENT;break;case 78:this.$=ye.Identification.NON_IDENTIFYING;break;case 79:this.$=ye.Identification.IDENTIFYING;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:9,22:r,24:i,26:n,28:a,29:14,30:15,31:16,32:17,33:s,34:l,35:h,36:u,37:d,40:p,43:f,44:g,48:m,50:y,51:b,52:v},e(t,[2,7],{1:[2,1]}),e(t,[2,3]),{9:30,11:9,22:r,24:i,26:n,28:a,29:14,30:15,31:16,32:17,33:s,34:l,35:h,36:u,37:d,40:p,43:f,44:g,48:m,50:y,51:b,52:v},e(t,[2,5]),e(t,[2,6]),e(t,[2,16],{12:31,64:35,15:[1,32],17:[1,33],20:[1,34],66:T,67:x,68:k,69:C,70:E}),{23:[1,41]},{25:[1,42]},{27:[1,43]},e(t,[2,27]),e(t,[2,28]),e(t,[2,29]),e(t,[2,30]),e(t,[2,31]),e(w,[2,54]),e(w,[2,55]),e(w,[2,56]),e(w,[2,57]),e(w,[2,58]),e(t,[2,32]),e(t,[2,33]),e(t,[2,34]),e(t,[2,35]),{16:44,40:_,41:L},{16:47,40:_,41:L},{16:48,40:_,41:L},e(t,[2,4]),{11:49,40:p,48:m,50:y,51:b,52:v},{16:50,40:_,41:L},{18:51,19:[1,52],53:53,54:54,58:N},{11:56,40:p,48:m,50:y,51:b,52:v},{65:57,71:[1,58],72:[1,59]},e(D,[2,73]),e(D,[2,74]),e(D,[2,75]),e(D,[2,76]),e(D,[2,77]),e(t,[2,24]),e(t,[2,25]),e(t,[2,26]),{13:M,38:60,41:B,42:A,45:62,46:63,48:I,49:O},e(R,[2,37]),e(R,[2,38]),{16:68,40:_,41:L,42:A},{13:M,38:69,41:B,42:A,45:62,46:63,48:I,49:O},{13:[1,70],15:[1,71]},e(t,[2,17],{64:35,12:72,17:[1,73],42:A,66:T,67:x,68:k,69:C,70:E}),{19:[1,74]},e(t,[2,14]),{18:75,19:[2,59],53:53,54:54,58:N},{55:76,58:[1,77]},{58:[2,65],59:[1,78]},{21:[1,79]},{64:80,66:T,67:x,68:k,69:C,70:E},e($,[2,78]),e($,[2,79]),{6:F,10:P,39:81,42:z,47:q},{40:[1,86],41:[1,87]},e(G,[2,43],{46:88,13:M,41:B,48:I,49:O}),e(W,[2,45]),e(W,[2,50]),e(W,[2,51]),e(W,[2,52]),e(W,[2,53]),e(t,[2,41],{42:A}),{6:F,10:P,39:89,42:z,47:q},{14:90,40:J,50:H,73:Z},{16:94,40:_,41:L},{11:95,40:p,48:m,50:y,51:b,52:v},{18:96,19:[1,97],53:53,54:54,58:N},e(t,[2,12]),{19:[2,60]},e(se,[2,61],{56:98,57:99,60:100,62:Q,63:te}),e([19,58,62,63],[2,67]),{58:[2,66]},e(t,[2,22],{15:[1,104],17:[1,103]}),e([40,48,50,51,52],[2,72]),e(t,[2,36]),{13:M,41:B,45:105,46:63,48:I,49:O},e(t,[2,47]),e(t,[2,48]),e(t,[2,49]),e(R,[2,39]),e(R,[2,40]),e(W,[2,46]),e(t,[2,42]),e(t,[2,8]),e(t,[2,80]),e(t,[2,81]),e(t,[2,82]),{13:[1,106],42:A},{13:[1,108],15:[1,107]},{19:[1,109]},e(t,[2,15]),e(se,[2,62],{57:110,61:[1,111],63:te}),e(se,[2,63]),e(re,[2,68]),e(se,[2,71]),e(re,[2,70]),{18:112,19:[1,113],53:53,54:54,58:N},{16:114,40:_,41:L},e(G,[2,44],{46:88,13:M,41:B,48:I,49:O}),{14:115,40:J,50:H,73:Z},{16:116,40:_,41:L},{14:117,40:J,50:H,73:Z},e(t,[2,13]),e(se,[2,64]),{60:118,62:Q},{19:[1,119]},e(t,[2,20]),e(t,[2,23],{17:[1,120],42:A}),e(t,[2,11]),{13:[1,121],42:A},e(t,[2,10]),e(re,[2,69]),e(t,[2,18]),{18:122,19:[1,123],53:53,54:54,58:N},{14:124,40:J,50:H,73:Z},{19:[1,125]},e(t,[2,21]),e(t,[2,9]),e(t,[2,19])],defaultActions:{75:[2,60],78:[2,66]},parseError:o(function(me,oe){if(oe.recoverable)this.trace(me);else{var we=new Error(me);throw we.hash=oe,we}},"parseError"),parse:o(function(me){var oe=this,we=[0],ye=[],ve=[null],ae=[],Pe=this.table,X="",ce=0,ge=0,be=0,ke=2,Me=1,pe=ae.slice.call(arguments,1),Oe=Object.create(this.lexer),j={yy:{}};for(var le in this.yy)Object.prototype.hasOwnProperty.call(this.yy,le)&&(j.yy[le]=this.yy[le]);Oe.setInput(me,j.yy),j.yy.lexer=Oe,j.yy.parser=this,typeof Oe.yylloc>"u"&&(Oe.yylloc={});var U=Oe.yylloc;ae.push(U);var fe=Oe.options&&Oe.options.ranges;typeof j.yy.parseError=="function"?this.parseError=j.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Y(dt){we.length=we.length-2*dt,ve.length=ve.length-dt,ae.length=ae.length-dt}o(Y,"popStack");function Le(){var dt;return dt=ye.pop()||Oe.lex()||Me,typeof dt!="number"&&(dt instanceof Array&&(ye=dt,dt=ye.pop()),dt=oe.symbols_[dt]||dt),dt}o(Le,"lex");for(var xe,je,Ie,Ve,Ne,Ge,ze={},Ue,Ce,ct,Se;;){if(Ie=we[we.length-1],this.defaultActions[Ie]?Ve=this.defaultActions[Ie]:((xe===null||typeof xe>"u")&&(xe=Le()),Ve=Pe[Ie]&&Pe[Ie][xe]),typeof Ve>"u"||!Ve.length||!Ve[0]){var at="";Se=[];for(Ue in Pe[Ie])this.terminals_[Ue]&&Ue>ke&&Se.push("'"+this.terminals_[Ue]+"'");Oe.showPosition?at="Parse error on line "+(ce+1)+`: +`+Oe.showPosition()+` +Expecting `+Se.join(", ")+", got '"+(this.terminals_[xe]||xe)+"'":at="Parse error on line "+(ce+1)+": Unexpected "+(xe==Me?"end of input":"'"+(this.terminals_[xe]||xe)+"'"),this.parseError(at,{text:Oe.match,token:this.terminals_[xe]||xe,line:Oe.yylineno,loc:U,expected:Se})}if(Ve[0]instanceof Array&&Ve.length>1)throw new Error("Parse Error: multiple actions possible at state: "+Ie+", token: "+xe);switch(Ve[0]){case 1:we.push(xe),ve.push(Oe.yytext),ae.push(Oe.yylloc),we.push(Ve[1]),xe=null,je?(xe=je,je=null):(ge=Oe.yyleng,X=Oe.yytext,ce=Oe.yylineno,U=Oe.yylloc,be>0&&be--);break;case 2:if(Ce=this.productions_[Ve[1]][1],ze.$=ve[ve.length-Ce],ze._$={first_line:ae[ae.length-(Ce||1)].first_line,last_line:ae[ae.length-1].last_line,first_column:ae[ae.length-(Ce||1)].first_column,last_column:ae[ae.length-1].last_column},fe&&(ze._$.range=[ae[ae.length-(Ce||1)].range[0],ae[ae.length-1].range[1]]),Ge=this.performAction.apply(ze,[X,ge,ce,j.yy,Ve[1],ve,ae].concat(pe)),typeof Ge<"u")return Ge;Ce&&(we=we.slice(0,-1*Ce*2),ve=ve.slice(0,-1*Ce),ae=ae.slice(0,-1*Ce)),we.push(this.productions_[Ve[1]][0]),ve.push(ze.$),ae.push(ze._$),ct=Pe[we[we.length-2]][we[we.length-1]],we.push(ct);break;case 3:return!0}}return!0},"parse")},Ae=(function(){var me={EOF:1,parseError:o(function(oe,we){if(this.yy.parser)this.yy.parser.parseError(oe,we);else throw new Error(oe)},"parseError"),setInput:o(function(oe,we){return this.yy=we||this.yy||{},this._input=oe,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:o(function(){var oe=this._input[0];this.yytext+=oe,this.yyleng++,this.offset++,this.match+=oe,this.matched+=oe;var we=oe.match(/(?:\r\n?|\n).*/g);return we?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),oe},"input"),unput:o(function(oe){var we=oe.length,ye=oe.split(/(?:\r\n?|\n)/g);this._input=oe+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-we),this.offset-=we;var ve=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),ye.length-1&&(this.yylineno-=ye.length-1);var ae=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:ye?(ye.length===ve.length?this.yylloc.first_column:0)+ve[ve.length-ye.length].length-ye[0].length:this.yylloc.first_column-we},this.options.ranges&&(this.yylloc.range=[ae[0],ae[0]+this.yyleng-we]),this.yyleng=this.yytext.length,this},"unput"),more:o(function(){return this._more=!0,this},"more"),reject:o(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:o(function(oe){this.unput(this.match.slice(oe))},"less"),pastInput:o(function(){var oe=this.matched.substr(0,this.matched.length-this.match.length);return(oe.length>20?"...":"")+oe.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:o(function(){var oe=this.match;return oe.length<20&&(oe+=this._input.substr(0,20-oe.length)),(oe.substr(0,20)+(oe.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:o(function(){var oe=this.pastInput(),we=new Array(oe.length+1).join("-");return oe+this.upcomingInput()+` +`+we+"^"},"showPosition"),test_match:o(function(oe,we){var ye,ve,ae;if(this.options.backtrack_lexer&&(ae={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&&(ae.yylloc.range=this.yylloc.range.slice(0))),ve=oe[0].match(/(?:\r\n?|\n).*/g),ve&&(this.yylineno+=ve.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:ve?ve[ve.length-1].length-ve[ve.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+oe[0].length},this.yytext+=oe[0],this.match+=oe[0],this.matches=oe,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(oe[0].length),this.matched+=oe[0],ye=this.performAction.call(this,this.yy,this,we,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),ye)return ye;if(this._backtrack){for(var Pe in ae)this[Pe]=ae[Pe];return!1}return!1},"test_match"),next:o(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var oe,we,ye,ve;this._more||(this.yytext="",this.match="");for(var ae=this._currentRules(),Pe=0;Pewe[0].length)){if(we=ye,ve=Pe,this.options.backtrack_lexer){if(oe=this.test_match(ye,ae[Pe]),oe!==!1)return oe;if(this._backtrack){we=!1;continue}else return!1}else if(!this.options.flex)break}return we?(oe=this.test_match(we,ae[ve]),oe!==!1?oe:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:o(function(){var oe=this.next();return oe||this.lex()},"lex"),begin:o(function(oe){this.conditionStack.push(oe)},"begin"),popState:o(function(){var oe=this.conditionStack.length-1;return oe>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:o(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:o(function(oe){return oe=this.conditionStack.length-1-Math.abs(oe||0),oe>=0?this.conditionStack[oe]:"INITIAL"},"topState"),pushState:o(function(oe){this.begin(oe)},"pushState"),stateStackSize:o(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:o(function(oe,we,ye,ve){var ae=ve;switch(ye){case 0:return this.begin("acc_title"),24;case 1:return this.popState(),"acc_title_value";case 2:return this.begin("acc_descr"),26;case 3:return this.popState(),"acc_descr_value";case 4:this.begin("acc_descr_multiline");break;case 5:this.popState();break;case 6:return"acc_descr_multiline_value";case 7:return 33;case 8:return 34;case 9:return 35;case 10:return 36;case 11:return 10;case 12:break;case 13:return 8;case 14:return 50;case 15:return 73;case 16:return 4;case 17:return this.begin("block"),17;case 18:return 49;case 19:return 49;case 20:return 42;case 21:return 15;case 22:return 13;case 23:break;case 24:return 62;case 25:return 58;case 26:return 58;case 27:this.begin("block_bq");break;case 28:return 58;case 29:this.popState();break;case 30:return 63;case 31:break;case 32:return this.popState(),19;case 33:return we.yytext[0];case 34:return 20;case 35:return 21;case 36:return this.begin("style"),44;case 37:return this.popState(),10;case 38:break;case 39:return 13;case 40:return 42;case 41:return 49;case 42:return this.begin("style"),37;case 43:return 43;case 44:return 66;case 45:return 68;case 46:return 68;case 47:return 68;case 48:return 66;case 49:return 66;case 50:return 67;case 51:return 67;case 52:return 67;case 53:return 67;case 54:return 67;case 55:return 68;case 56:return 67;case 57:return 68;case 58:return 69;case 59:return 69;case 60:return 51;case 61:return 69;case 62:return 69;case 63:return 69;case 64:return 52;case 65:return 48;case 66:return 69;case 67:return 66;case 68:return 67;case 69:return 68;case 70:return 70;case 71:return 71;case 72:return 72;case 73:return 72;case 74:return 71;case 75:return 71;case 76:return 71;case 77:return 41;case 78:return 47;case 79:return 40;case 80:return we.yytext[0];case 81:return 6}},"anonymous"),rules:[/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:[\s]+)/i,/^(?:"[^"%\r\n\v\b\\]+")/i,/^(?:"[^"]*")/i,/^(?:erDiagram\b)/i,/^(?:\{)/i,/^(?:#)/i,/^(?:#)/i,/^(?:,)/i,/^(?::::)/i,/^(?::)/i,/^(?:\s+)/i,/^(?:\b((?:PK)|(?:FK)|(?:UK))\b)/i,/^(?:([^\s]*)[~].*[~]([^\s]*))/i,/^(?:([\*A-Za-z_\u00C0-\uFFFF][A-Za-z0-9\-\_\[\]\(\)\.,\u00C0-\uFFFF\*]*))/i,/^(?:[`])/i,/^(?:[^`]+)/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,/^(?: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:[37,38,39,40,41,77,78],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:[28,29],inclusive:!1},block:{rules:[23,24,25,26,27,30,31,32,33],inclusive:!1},INITIAL:{rules:[0,2,4,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,34,35,36,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,79,80,81],inclusive:!0}}};return me})();ne.lexer=Ae;function ie(){this.yy={}}return o(ie,"Parser"),ie.prototype=ne,ne.Parser=ie,new ie})();UN.parser=UN;tZe=UN,rZe=class{constructor(){this.entities=new Map,this.relationships=[],this.classes=new Map,this.direction="TB",this.Cardinality={ZERO_OR_ONE:"ZERO_OR_ONE",ZERO_OR_MORE:"ZERO_OR_MORE",ONE_OR_MORE:"ONE_OR_MORE",ONLY_ONE:"ONLY_ONE",MD_PARENT:"MD_PARENT"},this.Identification={NON_IDENTIFYING:"NON_IDENTIFYING",IDENTIFYING:"IDENTIFYING"},this.setAccTitle=gr,this.getAccTitle=xr,this.setAccDescription=Tr,this.getAccDescription=kr,this.setDiagramTitle=_r,this.getDiagramTitle=Cr,this.getConfig=o(()=>De().er,"getConfig"),this.clear(),this.addEntity=this.addEntity.bind(this),this.addAttributes=this.addAttributes.bind(this),this.addRelationship=this.addRelationship.bind(this),this.setDirection=this.setDirection.bind(this),this.addCssStyles=this.addCssStyles.bind(this),this.addClass=this.addClass.bind(this),this.setClass=this.setClass.bind(this),this.setAccTitle=this.setAccTitle.bind(this),this.setAccDescription=this.setAccDescription.bind(this)}static{o(this,"ErDB")}addEntity(e,t=""){return this.entities.has(e)?!this.entities.get(e)?.alias&&t&&(this.entities.get(e).alias=t,ee.info(`Add alias '${t}' to entity '${e}'`)):(this.entities.set(e,{id:`entity-${e}-${this.entities.size}`,label:e,attributes:[],alias:t,shape:"erBox",look:De().look??"default",cssClasses:"default",cssStyles:[],labelType:"markdown"}),ee.info("Added new entity :",e)),this.entities.get(e)}getEntity(e){return this.entities.get(e)}getEntities(){return this.entities}getClasses(){return this.classes}addAttributes(e,t){let r=this.addEntity(e),i;for(i=t.length-1;i>=0;i--)t[i].keys||(t[i].keys=[]),t[i].comment||(t[i].comment=""),r.attributes.push(t[i]),ee.debug("Added attribute ",t[i].name)}addRelationship(e,t,r,i){let n=this.entities.get(e),a=this.entities.get(r);if(!n||!a)return;let s={entityA:n.id,roleA:t,entityB:a.id,relSpec:i};this.relationships.push(s),ee.debug("Added new relationship :",s)}getRelationships(){return this.relationships}getDirection(){return this.direction}setDirection(e){this.direction=e}getCompiledStyles(e){let t=[];for(let r of e){let i=this.classes.get(r);i?.styles&&(t=[...t,...i.styles??[]].map(n=>n.trim())),i?.textStyles&&(t=[...t,...i.textStyles??[]].map(n=>n.trim()))}return t}addCssStyles(e,t){for(let r of e){let i=this.entities.get(r);if(!t||!i)return;for(let n of t)i.cssStyles.push(n)}}addClass(e,t){e.forEach(r=>{let i=this.classes.get(r);i===void 0&&(i={id:r,styles:[],textStyles:[]},this.classes.set(r,i)),t&&t.forEach(function(n){if(/color/.exec(n)){let a=n.replace("fill","bgFill");i.textStyles.push(a)}i.styles.push(n)})})}setClass(e,t){for(let r of e){let i=this.entities.get(r);if(i)for(let n of t)i.cssClasses+=" "+n}}clear(){this.entities=new Map,this.classes=new Map,this.relationships=[],ar()}getData(){let e=[],t=[],r=De(),i=0;for(let a of this.entities.keys()){let s=this.entities.get(a);s&&(s.cssCompiledStyles=this.getCompiledStyles(s.cssClasses.split(" ")),s.colorIndex=i++,e.push(s))}let n=0;for(let a of this.relationships){let s={id:pc(a.entityA,a.entityB,{prefix:"id",counter:n++}),type:"normal",curve:"basis",start:a.entityA,end:a.entityB,label:a.roleA,labelpos:"c",thickness:"normal",classes:"relationshipLine",arrowTypeStart:a.relSpec.cardB.toLowerCase(),arrowTypeEnd:a.relSpec.cardA.toLowerCase(),pattern:a.relSpec.relType=="IDENTIFYING"?"solid":"dashed",look:r.look,labelType:"markdown"};t.push(s)}return{nodes:e,edges:t,other:{},config:r,direction:"TB"}}},g4e={};yu(g4e,{draw:()=>iZe});iZe=o(async function(e,t,r,i){ee.info("REF0:"),ee.info("Drawing er diagram (unified)",t);let{securityLevel:n,er:a,layout:s}=De(),l=i.db.getData(),h=Yo(t,n);l.type=i.type,l.layoutAlgorithm=Ec(s),l.config.flowchart.nodeSpacing=a?.nodeSpacing||140,l.config.flowchart.rankSpacing=a?.rankSpacing||80,l.direction=i.db.getDirection();let{config:u}=l,{look:d}=u;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 Wo(l,h),l.layoutAlgorithm==="elk"&&h.select(".edges").lower();let p=h.selectAll('[id*="-background"]');Array.from(p).length>0&&p.each(function(){let g=tt(this),m=g.attr("id").replace("-background",""),y=h.select(`#${CSS.escape(m)}`);if(!y.empty()){let b=y.attr("transform");g.attr("transform",b)}}),Wt.insertTitle(h,"erDiagramTitleText",a?.titleTopMargin??25,i.db.getDiagramTitle()),Gs(h,8,"erDiagram",a?.useMaxWidth??!0)},"draw"),f4e=o((e,t)=>{let r=v0,i=r(e,"r"),n=r(e,"g"),a=r(e,"b");return Ds(i,n,a,t)},"fade"),r5=new Set(["redux-color","redux-dark-color"]),nZe=o(e=>{let{theme:t,look:r,bkgColorArray:i,borderColorArray:n}=e;if(!r5.has(t))return"";let a=i?.length>0,s="";for(let l=0;l{let{look:t,theme:r,erEdgeLabelBackground:i,strokeWidth:n}=e;return` + ${nZe(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: ${r5.has(r)&&i?i:f4e(e.tertiaryColor,.5)}; + } + + .edgeLabel { + background-color: ${r5.has(r)&&i?i:e.edgeLabelBackground}; + } + .edgeLabel .label rect { + fill: ${r5.has(r)&&i?i: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"?n:"1px"}; + } + + .relationshipLine { + stroke: ${e.lineColor}; + stroke-width: ${t==="neo"?n:"1px"}; + fill: none; + } + + .marker { + fill: none !important; + stroke: ${e.lineColor} !important; + stroke-width: 1; + } + [data-look=neo].labelBkg { + background-color: ${f4e(e.tertiaryColor,.5)}; + } +`},"getStyles"),sZe=aZe,oZe={parser:tZe,get db(){return new rZe},renderer:g4e,styles:sZe}});var Lm,i5=Tt(()=>{vt();Lm=class{constructor(e){this.init=e,this.records=this.init()}static{o(this,"ImperativeState")}reset(){this.records=this.init()}}});function xi(e,t){e.accDescr&&t.setAccDescription?.(e.accDescr),e.accTitle&&t.setAccTitle?.(e.accTitle),e.title&&t.setDiagramTitle?.(e.title)}var bs=Tt(()=>{vt();o(xi,"populateCommonDb")});function Tn(e){return typeof e=="object"&&e!==null&&typeof e.$type=="string"}function Qa(e){return typeof e=="object"&&e!==null&&typeof e.$refText=="string"&&"ref"in e}function Nl(e){return typeof e=="object"&&e!==null&&typeof e.$refText=="string"&&"items"in e}function DE(e){return typeof e=="object"&&e!==null&&typeof e.name=="string"&&typeof e.type=="string"&&typeof e.path=="string"}function Ad(e){return typeof e=="object"&&e!==null&&typeof e.info=="object"&&typeof e.message=="string"}function Pc(e){return typeof e=="object"&&e!==null&&Array.isArray(e.content)}function Bd(e){return typeof e=="object"&&e!==null&&typeof e.tokenType=="object"}function Ax(e){return Pc(e)&&typeof e.fullText=="string"}function hP(e){return typeof e=="string"?e:typeof e>"u"?"undefined":typeof e.toString=="function"?e.toString():Object.prototype.toString.call(e)}function d1(e){return!!e&&typeof e[Symbol.iterator]=="function"}function vi(...e){if(e.length===1){let t=e[0];if(t instanceof Oc)return t;if(d1(t))return new Oc(()=>t[Symbol.iterator](),r=>r.next());if(typeof t.length=="number")return new Oc(()=>({index:0}),r=>r.index1?new Oc(()=>({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{Tn(n)&&(n.$container=e,n.$containerProperty=r,n.$containerIndex=a,t.deep&&lg(n,t))}):Tn(i)&&(i.$container=e,i.$containerProperty=r,t.deep&&lg(i,t)))}function Pd(e,t){let r=e;for(;r;){if(t(r))return r;r=r.$container}}function dP(e,t){let r=e;for(;r;){if(t(r))return!0;r=r.$container}return!1}function Zo(e){let t=ag(e).$document;if(!t)throw new Error("AST node has no document.");return t}function ag(e){for(;e.$container;)e=e.$container;return e}function ax(e){return Qa(e)?e.ref?[e.ref]:[]:Nl(e)?e.items.map(t=>t.ref):[]}function R1(e,t){if(!e)throw new Error("Node must be an AstNode.");let r=t?.range;return new Oc(()=>({keys:Object.keys(e),keyIndex:0,arrayIndex:0}),i=>{for(;i.keyIndexR1(r,t))}function Qo(e,t){if(e){if(t?.range&&!sx(e,t.range))return new f1(e,()=>[])}else throw new Error("Root node must be an AstNode.");return new f1(e,r=>R1(r,t),{includeRoot:!0})}function sx(e,t){if(!t)return!0;let r=e.$cstNode?.range;return r?rS(r,t):!1}function cg(e){return new Oc(()=>({keys:Object.keys(e),keyIndex:0,arrayIndex:0}),t=>{for(;t.keyIndexPc(t)?t.content:[],{includeRoot:!0})}function $P(e){return ug(e).filter(Bd)}function eS(e,t){for(;e.container;)if(e=e.container,e===t)return!0;return!1}function g1(e){return{start:{character:e.startColumn-1,line:e.startLine-1},end:{character:e.endColumn,line:e.endLine-1}}}function dg(e){if(!e)return;let{offset:t,end:r,range:i}=e;return{range:i,offset:t,end:r,length:r-t}}function tS(e,t){if(e.end.linet.end.line||e.start.line===t.end.line&&e.start.character>=t.end.character)return Nc.After;let r=e.start.line>t.start.line||e.start.line===t.start.line&&e.start.character>=t.start.character,i=e.end.lineNc.After}function DP(e,t,r=IP){if(e){if(t>0){let i=t-e.offset,n=e.text.charAt(i);r.test(n)||t--}return Nx(e,t)}}function iS(e,t){if(e){let r=sS(e,!0);if(r&&lx(r,t))return r;if(Ax(e)){let i=e.content.findIndex(n=>!n.hidden);for(let n=i-1;n>=0;n--){let a=e.content[n];if(lx(a,t))return a}}}}function lx(e,t){return Bd(e)&&t.includes(e.tokenType.name)}function Nx(e,t){if(Bd(e))return e;if(Pc(e)){let r=aS(e,t,!1);if(r)return Nx(r,t)}}function nS(e,t){if(Bd(e))return e;if(Pc(e)){let r=aS(e,t,!0);if(r)return nS(r,t)}}function aS(e,t,r){let i=0,n=e.content.length-1,a;for(;i<=n;){let s=Math.floor((i+n)/2),l=e.content[s];if(l.offset<=t&&l.end>t)return l;l.end<=t?(a=r?l:void 0,i=s+1):n=s-1}return a}function sS(e,t=!0){for(;e.container;){let r=e.container,i=r.content.indexOf(e);for(;i>0;){i--;let n=r.content[i];if(t||!n.hidden)return n}e=r}}function MP(e,t=!0){for(;e.container;){let r=e.container,i=r.content.indexOf(e),n=r.content.length-1;for(;it.test(r))}function yg(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function uS(e,t){let r=dS(e),i=t.match(r);return!!i&&i[0].length>0}function dS(e){typeof e=="string"&&(e=new RegExp(e));let t=e,r=e.source,i=0;function n(){let a="",s;function l(u){a+=r.substr(i,u),i+=u}o(l,"appendRaw"),S(l,"appendRaw");function h(u){a+="(?:"+r.substr(i,u)+"|$)",i+=u}for(o(h,"appendOptional"),S(h,"appendOptional");i",i)-i+1);break;default:h(2);break}break;case"[":s=/\[(?:\\.|.)*?\]/g,s.lastIndex=i,s=s.exec(r)||[],h(s[0].length);break;case"|":case"^":case"$":case"*":case"+":case"?":l(1);break;case"{":s=/\{\d+,?\d*\}/g,s.lastIndex=i,s=s.exec(r),s?l(s[0].length):h(1);break;case"(":if(r[i+1]==="?")switch(r[i+2]){case":":a+="(?:",i+=3,a+=n()+"|$)";break;case"=":a+="(?=",i+=3,a+=n()+")";break;case"!":s=i,i+=3,n(),a+=r.substr(s,i-s);break;case"<":switch(r[i+3]){case"=":case"!":s=i,i+=4,n(),a+=r.substr(s,i-s);break;default:l(r.indexOf(">",i)-i+1),a+=n()+"|$)";break}break}else l(1),a+=n()+"|$)";break;case")":return++i,a;default:h(1);break}return a}return o(n,"process2"),S(n,"process"),new RegExp(n(),e.flags)}function pS(e){return e.rules.find(t=>Ja(t)&&t.entry)}function fS(e){return e.rules.filter(t=>xo(t)&&t.hidden)}function Bx(e,t){let r=new Set,i=pS(e);if(!i)return new Set(e.rules);let n=[i].concat(fS(e));for(let s of n)gS(s,r,t);let a=new Set;for(let s of e.rules)(r.has(s.name)||xo(s)&&s.hidden)&&a.add(s);return a}function gS(e,t,r){t.add(e.name),Wc(e).forEach(i=>{if(qc(i)||r&&Ix(i)){let n=i.rule.ref;n&&!t.has(n.name)&&gS(n,t,r)}})}function qP(e){let t=new Set;return Wc(e).forEach(r=>{zd(r)&&(Ja(r.type.ref)&&t.add(r.type.ref),L1(r.type.ref)&&Ja(r.type.ref.$container)&&t.add(r.type.ref.$container))}),t}function mS(e){if(e.terminal)return e.terminal;if(e.type.ref)return qx(e.type.ref)?.terminal}function yS(e){return e.hidden&&!Ox(D1(e))}function vS(e,t){return!e||!t?[]:Fx(e,t,e.astNode,!0)}function Px(e,t,r){if(!e||!t)return;let i=Fx(e,t,e.astNode,!0);if(i.length!==0)return r!==void 0?r=Math.max(0,Math.min(r,i.length-1)):r=0,i[r]}function Fx(e,t,r,i){if(!i){let n=Pd(e.grammarSource,Fc);if(n&&n.feature===t)return[e]}return Pc(e)&&e.astNode===r?e.content.flatMap(n=>Fx(n,t,r,!1)):[]}function jP(e,t){return e?zx(e,t,e?.astNode):[]}function bS(e,t,r){if(!e)return;let i=zx(e,t,e?.astNode);if(i.length!==0)return r!==void 0?r=Math.max(0,Math.min(r,i.length-1)):r=0,i[r]}function zx(e,t,r){if(e.astNode!==r)return[];if(zc(e.grammarSource)&&e.grammarSource.value===t)return[e];let i=ug(e).iterator(),n,a=[];do if(n=i.next(),!n.done){let s=n.value;s.astNode===r?zc(s.grammarSource)&&s.grammarSource.value===t&&a.push(s):i.prune()}while(!n.done);return a}function xS(e){let t=e.astNode;for(;t===e.container?.astNode;){let r=Pd(e.grammarSource,Fc);if(r)return r;e=e.container}}function qx(e){let t=e;return L1(t)&&(Yh(t.$container)?t=t.$container.$container:Fd(t.$container)?t=t.$container:eu(t.$container)),TS(e,t,new Map)}function TS(e,t,r){function i(n,a){let s;return Pd(n,Fc)||(s=TS(a,a,r)),r.set(e,s),s}if(o(i,"go"),S(i,"go"),r.has(e))return r.get(e);r.set(e,void 0);for(let n of Wc(t)){if(Fc(n)&&n.feature.toLowerCase()==="name")return r.set(e,n),n;if(qc(n)&&Ja(n.rule.ref))return i(n,n.rule.ref);if($x(n)&&n.typeRef?.ref)return i(n,n.typeRef.ref)}}function kS(e){let t=e.$container;if(qd(t)){let r=t.elements,i=r.indexOf(e);for(let n=i-1;n>=0;n--){let a=r[n];if(Yh(a))return a;{let s=Wc(r[n]).find(Yh);if(s)return s}}}if(Rx(t))return kS(t)}function GP(e,t){return e==="?"||e==="*"||qd(t)&&!!t.guardCondition}function WP(e){return e==="*"||e==="+"}function UP(e){return e==="+="}function $1(e){return CS(e,new Set)}function CS(e,t){if(t.has(e))return!0;t.add(e);for(let r of Wc(e))if(qc(r)){if(!r.rule.ref||Ja(r.rule.ref)&&!CS(r.rule.ref,t)||hg(r.rule.ref))return!1}else if(Fc(r)||Yh(r))return!1;return!!e.definition}function VP(e){return cx(e.type,new Set)}function cx(e,t){if(t.has(e))return!0;if(t.add(e),OE(e)||VE(e))return!1;if(ZE(e))return e.types.every(r=>cx(r,t));if($x(e)){if(e.primitiveType!==void 0||e.stringType!==void 0)return!0;if(e.typeRef!==void 0){let r=e.typeRef.ref;return Dx(r)?cx(r.type,t):!1}else return!1}else return!1}function I1(e){if(!xo(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 $d(e){if(Fd(e))return Ja(e)&&$1(e)?e.name:I1(e)??e.name;if(jE(e)||Dx(e)||HE(e))return e.name;if(Yh(e)){let t=wS(e);if(t)return t}else if(L1(e))return e.name;throw new Error("Cannot get name of Unknown Type")}function wS(e){if(e.inferredType)return e.inferredType.name;if(e.type?.ref)return $d(e.type.ref)}function YP(e){return xo(e)?e.type?.name??"string":Ja(e)&&$1(e)?e.name:I1(e)??e.name}function ES(e){return xo(e)?e.type?.name??"string":I1(e)??e.name}function D1(e){let t={s:!1,i:!1,u:!1},r=jd(e.definition,t),i=Object.entries(t).filter(([,n])=>n).map(([n])=>n).join("");return new RegExp(r,i)}function jd(e,t){if(XE(e))return XP(e);if(KE(e))return KP(e);if(PE(e))return JP(e);if(Ix(e)){let r=e.rule.ref;if(!r)throw new Error("Missing rule reference.");return Ol(jd(r.definition),{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized})}else{if(GE(e))return QP(e);if(QE(e))return ZP(e);if(YE(e)){let r=e.regex.lastIndexOf("/"),i=e.regex.substring(1,r),n=e.regex.substring(r+1);return t&&(t.i=n.includes("i"),t.s=n.includes("s"),t.u=n.includes("u")),Ol(i,{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized,wrap:!1})}else{if(JE(e))return Ol(HP,{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized});throw new Error(`Invalid terminal element: ${e?.$type}, ${e?.$cstNode?.text}`)}}}function XP(e){return Ol(e.elements.map(t=>jd(t)).join("|"),{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized,wrap:!1})}function KP(e){return Ol(e.elements.map(t=>jd(t)).join(""),{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized,wrap:!1})}function ZP(e){return Ol(`${HP}*?${jd(e.terminal)}`,{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized})}function QP(e){return Ol(`(?!${jd(e.terminal)})${HP}*?`,{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized})}function JP(e){return e.right?Ol(`[${Hb(e.left)}-${Hb(e.right)}]`,{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized,wrap:!1}):Ol(Hb(e.left),{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized,wrap:!1})}function Hb(e){return yg(e.value)}function Ol(e,t){return(t.parenthesized||t.lookahead||t.wrap!==!1)&&(e=`(${t.lookahead??(t.parenthesized?"":"?:")}${e})`),t.cardinality?`${e}${t.cardinality}`:e}function SS(e){let t=[],r=e.Grammar;for(let i of r.rules)xo(i)&&yS(i)&&hS(D1(i))&&t.push(i.name);return{multilineCommentRules:t,nameRegexp:IP}}function eF(e){var t=JZe.call(e,mb),r=e[mb];try{e[mb]=void 0;var i=!0}catch{}var n=eQe.call(e);return i&&(t?e[mb]=r:delete e[mb]),n}function tF(e){return iQe.call(e)}function rF(e){return e==null?e===void 0?sQe:aQe:T4e&&T4e in Object(e)?tQe(e):nQe(e)}function iF(e){return e!=null&&typeof e=="object"}function nF(e){return typeof e=="symbol"||Fl(e)&&Gd(e)==oQe}function aF(e,t){for(var r=-1,i=e==null?0:e.length,n=Array(i);++r0){if(++t>=WQe)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function CF(e){return function(){return e}}function wF(e,t){for(var r=-1,i=e==null?0:e.length;++r-1}function $F(e,t){var r=typeof e;return t=t??rJe,!!t&&(r=="number"||r!="symbol"&&iJe.test(e))&&e>-1&&e%1==0&&e-1&&e%1==0&&e<=oJe}function jF(e){return e!=null&&qF(e.length)&&!tu(e)}function GF(e,t,r){if(!tl(r))return!1;var i=typeof t;return(i=="number"?Vc(r)&&RS(t,r.length):i=="string"&&t in r)?Ux(r[t],e):!1}function WF(e){return FF(function(t,r){var i=-1,n=r.length,a=n>1?r[n-1]:void 0,s=n>2?r[2]:void 0;for(a=e.length>3&&typeof a=="function"?(n--,a):void 0,s&&$S(r[0],r[1],s)&&(a=n<3?void 0:a,n=1),t=Object(t);++i-1}function yz(e,t){var r=this.__data__,i=MS(r,e);return i<0?(++this.size,r.push([e,t])):r[i][1]=t,this}function Ud(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t0&&r(l)?t>1?FS(l,t-1,r,i,n):Dz(n,l):i||(n[n.length]=l)}return n}function Oz(e){var t=e==null?0:e.length;return t?Nz(e,1):[]}function Bz(e,t,r){var i=-1,n=e.length;t<0&&(t=-t>n?0:n+t),r=r>n?n:r,r<0&&(r+=n),n=t>r?0:r-t>>>0,t>>>=0;for(var a=Array(n);++il))return!1;var u=a.get(e),d=a.get(t);if(u&&d)return u==t&&d==e;var p=-1,f=!0,g=r&Prt?new yq:void 0;for(a.set(e,t),a.set(t,e);++p=$it&&(a=xq,s=!1,t=new yq(t));e:for(;++n-1?n[a?t[s]:s]:void 0}}function lj(e,t,r){var i=e==null?0:e.length;if(!i)return-1;var n=r==null?0:Gx(r);return n<0&&(n=Pit(i+n,0)),sCe(e,Yc(t,3),n)}function cj(e){return e&&e.length?e[0]:void 0}function hj(e,t){var r=-1,i=Vc(e)?Array(e.length):[];return xg(e,function(n,a,s){i[++r]=t(n,a,s)}),i}function uj(e,t){var r=ai(e)?jx:qit;return r(e,Yc(t,3))}function dj(e,t){return Nz(Jt(e,t),1)}function pj(e,t){return e!=null&&Yit.call(e,t)}function fj(e,t){return e!=null&&RCe(e,t,Hit)}function gj(e){return typeof e=="string"||!ai(e)&&Fl(e)&&Gd(e)==Xit}function mj(e,t){return jx(t,function(r){return e[r]})}function yj(e){return e==null?[]:Kit(e,yo(e))}function vj(e,t,r,i){e=Vc(e)?e:Gn(e),r=r&&!i?Gx(r):0;var n=e.length;return r<0&&(r=Zit(n+r,0)),Ys(e)?r<=n&&e.indexOf(t,r)>-1:!!n&&RF(e,t,r)>-1}function bj(e,t,r){var i=e==null?0:e.length;if(!i)return-1;var n=r==null?0:Gx(r);return n<0&&(n=Qit(i+n,0)),RF(e,t,n)}function xj(e){if(e==null)return!0;if(Vc(e)&&(ai(e)||typeof e=="string"||typeof e.splice=="function"||hx(e)||ZF(e)||IS(e)))return!e.length;var t=m1(e);if(t==Jit||t==ent)return!e.size;if(Yx(e))return!pCe(e).length;for(var r in e)if(rnt.call(e,r))return!1;return!0}function Tj(e){return Fl(e)&&Gd(e)==int}function kj(e){return e===void 0}function Cj(e){if(typeof e!="function")throw new TypeError(snt);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}function wj(e,t,r,i){if(!tl(e))return e;t=PS(t,e);for(var n=-1,a=t.length,s=a-1,l=e;l!=null&&++n=gnt){var u=t?null:fnt(e);if(u)return wq(u);s=!1,n=xq,h=new yq}else h=t?[]:l;e:for(;++ib1(r,t)):e instanceof Cs&&Ss(t,e)?!1:e instanceof Hc?(e instanceof Cs&&t.push(e),Pl(e.definition,r=>b1(r,t))):!1}function Fj(e){return e instanceof Ks}function Ho(e){if(e instanceof Cs)return"SUBRULE";if(e instanceof va)return"OPTION";if(e instanceof Ks)return"OR";if(e instanceof To)return"AT_LEAST_ONE";if(e instanceof ko)return"AT_LEAST_ONE_SEP";if(e instanceof Xs)return"MANY_SEP";if(e instanceof pn)return"MANY";if(e instanceof zi)return"CONSUME";throw Error("non exhaustive match")}function nE(e,t,r){return[new va({definition:[new zi({terminalType:e.separator})].concat(e.definition)})].concat(t,r)}function Tg(e){if(e instanceof Cs)return Tg(e.referencedRule);if(e instanceof zi)return jj(e);if(Pj(e))return zj(e);if(Fj(e))return qj(e);throw Error("non exhaustive match")}function zj(e){let t=[],r=e.definition,i=0,n=r.length>i,a,s=!0;for(;n&&s;)a=r[i],s=b1(a),t=t.concat(Tg(a)),i=i+1,n=r.length>i;return Mj(t)}function qj(e){let t=Jt(e.definition,r=>Tg(r));return Mj(Bl(t))}function jj(e){return[e.terminalType]}function Gj(e){let t={};return wr(e,r=>{let i=new ynt(r).startWalking();vo(t,i)}),t}function Wj(e,t){return e.name+t+MCe}function O1(e){let t=e.toString();if(L5.hasOwnProperty(t))return L5[t];{let r=vnt.pattern(t);return L5[t]=r,r}}function Uj(){L5={}}function Vj(e,t=!1){try{let r=O1(e);return gx(r.value,{},r.flags.ignoreCase)}catch(r){if(r.message===NCe)t&&GS(`${aE} 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 i="";t&&(i=` + This will disable the lexer's first char optimizations. + See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#REGEXP_PARSING for details.`),fx(`${aE} + Failed parsing: < ${e.toString()} > + Using the @chevrotain/regexp-to-ast library + Please open an issue at: https://github.com/chevrotain/chevrotain/issues`+i)}}return[]}function gx(e,t,r){switch(e.type){case"Disjunction":for(let n=0;n{if(typeof h=="number")n1(h,t,r);else{let u=h;if(r===!0)for(let d=u.from;d<=u.to;d++)n1(d,t,r);else{for(let d=u.from;d<=u.to&&d=Nb){let d=u.from>=Nb?u.from:Nb,p=u.to,f=jc(d),g=jc(p);for(let m=f;m<=g;m++)t[m]=m}}}});break;case"Group":gx(s.value,t,r);break;default:throw Error("Non Exhaustive Match")}let l=s.quantifier!==void 0&&s.quantifier.atLeast===0;if(s.type==="Group"&&mx(s)===!1||s.type!=="Group"&&l===!1)break}break;default:throw Error("non exhaustive match!")}return Gn(t)}function n1(e,t,r){let i=jc(e);t[i]=i,r===!0&&Yj(e,t)}function Yj(e,t){let r=String.fromCharCode(e),i=r.toUpperCase();if(i!==r){let n=jc(i.charCodeAt(0));t[n]=n}else{let n=r.toLowerCase();if(n!==r){let a=jc(n.charCodeAt(0));t[a]=a}}}function sE(e,t){return v1(e.value,r=>{if(typeof r=="number")return Ss(t,r);{let i=r;return v1(t,n=>i.from<=n&&n<=i.to)!==void 0}})}function mx(e){let t=e.quantifier;return t&&t.atLeast===0?!0:e.value?ai(e.value)?Pl(e.value,mx):mx(e.value):!1}function Qx(e,t){if(t instanceof RegExp){let r=O1(t),i=new bnt(e);return i.visit(r),i.found}else return v1(t,r=>Ss(e,r.charCodeAt(0)))!==void 0}function Hj(e,t){t=Yq(t,{debug:!1,safeMode:!1,positionTracking:"full",lineTerminatorCharacters:["\r",` +`],tracer:S((T,x)=>x(),"tracer")});let r=t.tracer;r("initCharCodeToOptimizedIndexMap",()=>{gG()});let i;r("Reject Lexer.NA",()=>{i=jS(e,T=>T[fg]===ks.NA)});let n=!1,a;r("Transform Patterns",()=>{n=!1,a=Jt(i,T=>{let x=T[fg];if(Hh(x)){let k=x.source;return k.length===1&&k!=="^"&&k!=="$"&&k!=="."&&!x.ignoreCase?k:k.length===2&&k[0]==="\\"&&!Ss(["d","D","s","S","t","r","n","t","0","c","b","B","f","v","w","W"],k[1])?k[1]:oE(x)}else{if(tu(x))return n=!0,{exec:x};if(typeof x=="object")return n=!0,x;if(typeof x=="string"){if(x.length===1)return x;{let k=x.replace(/[\\^$.*+?()[\]{}|]/g,"\\$&"),C=new RegExp(k);return oE(C)}}else throw Error("non exhaustive match")}})});let s,l,h,u,d;r("misc mapping",()=>{s=Jt(i,T=>T.tokenTypeIdx),l=Jt(i,T=>{let x=T.GROUP;if(x!==ks.SKIPPED){if(Ys(x))return x;if(Xh(x))return!1;throw Error("non exhaustive match")}}),h=Jt(i,T=>{let x=T.LONGER_ALT;if(x)return ai(x)?Jt(x,k=>J4e(i,k)):[J4e(i,x)]}),u=Jt(i,T=>T.PUSH_MODE),d=Jt(i,T=>pr(T,"POP_MODE"))});let p;r("Line Terminator Handling",()=>{let T=XS(t.lineTerminatorCharacters);p=Jt(i,x=>!1),t.positionTracking!=="onlyOffset"&&(p=Jt(i,x=>pr(x,"LINE_BREAKS")?!!x.LINE_BREAKS:HS(x,T)===!1&&Qx(T,x.PATTERN)))});let f,g,m,y;r("Misc Mapping #2",()=>{f=Jt(i,YS),g=Jt(a,pG),m=bo(i,(T,x)=>{let k=x.GROUP;return Ys(k)&&k!==ks.SKIPPED&&(T[k]=[]),T},{}),y=Jt(a,(T,x)=>({pattern:a[x],longerAlt:h[x],canLineTerminator:p[x],isCustom:f[x],short:g[x],group:l[x],push:u[x],pop:d[x],tokenTypeIdx:s[x],tokenType:i[x]}))});let b=!0,v=[];return t.safeMode||r("First Char Optimization",()=>{v=bo(i,(T,x,k)=>{if(typeof x.PATTERN=="string"){let C=x.PATTERN.charCodeAt(0),E=jc(C);Zb(T,E,y[k])}else if(ai(x.START_CHARS_HINT)){let C;wr(x.START_CHARS_HINT,E=>{let w=typeof E=="string"?E.charCodeAt(0):E,_=jc(w);C!==_&&(C=_,Zb(T,_,y[k]))})}else if(Hh(x.PATTERN))if(x.PATTERN.unicode)b=!1,t.ensureOptimizations&&fx(`${aE} Unable to analyze < ${x.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=Vj(x.PATTERN,t.ensureOptimizations);Di(C)&&(b=!1),wr(C,E=>{Zb(T,E,y[k])})}else t.ensureOptimizations&&fx(`${aE} TokenType: <${x.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`),b=!1;return T},[])}),{emptyGroups:m,patternIdxToConfig:y,charCodeToPatternIdxToConfig:v,hasCustom:n,canBeOptimized:b}}function Xj(e,t){let r=[],i=Zj(e);r=r.concat(i.errors);let n=Qj(i.valid),a=n.valid;return r=r.concat(n.errors),r=r.concat(Kj(a)),r=r.concat(nG(a)),r=r.concat(aG(a,t)),r=r.concat(sG(a)),r}function Kj(e){let t=[],r=rl(e,i=>Hh(i[fg]));return t=t.concat(Jj(r)),t=t.concat(tG(r)),t=t.concat(rG(r)),t=t.concat(iG(r)),t=t.concat(eG(r)),t}function Zj(e){let t=rl(e,n=>!pr(n,fg)),r=Jt(t,n=>({message:"Token Type: ->"+n.name+"<- missing static 'PATTERN' property",type:fn.MISSING_PATTERN,tokenTypes:[n]})),i=qS(e,t);return{errors:r,valid:i}}function Qj(e){let t=rl(e,n=>{let a=n[fg];return!Hh(a)&&!tu(a)&&!pr(a,"exec")&&!Ys(a)}),r=Jt(t,n=>({message:"Token Type: ->"+n.name+"<- static 'PATTERN' can only be a RegExp, a Function matching the {CustomPatternMatcherFunc} type or an Object matching the {ICustomPattern} interface.",type:fn.INVALID_PATTERN,tokenTypes:[n]})),i=qS(e,t);return{errors:r,valid:i}}function Jj(e){class t extends cS{static{o(this,"EndAnchorFinder")}static{S(this,"EndAnchorFinder")}constructor(){super(...arguments),this.found=!1}visitEndAnchor(n){this.found=!0}}let r=rl(e,i=>{let n=i.PATTERN;try{let a=O1(n),s=new t;return s.visit(a),s.found}catch{return xnt.test(n.source)}});return Jt(r,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:fn.EOI_ANCHOR_FOUND,tokenTypes:[i]}))}function eG(e){let t=rl(e,r=>r.PATTERN.test(""));return Jt(t,r=>({message:"Token Type: ->"+r.name+"<- static 'PATTERN' must not match an empty string",type:fn.EMPTY_MATCH_PATTERN,tokenTypes:[r]}))}function tG(e){class t extends cS{static{o(this,"StartAnchorFinder")}static{S(this,"StartAnchorFinder")}constructor(){super(...arguments),this.found=!1}visitStartAnchor(n){this.found=!0}}let r=rl(e,i=>{let n=i.PATTERN;try{let a=O1(n),s=new t;return s.visit(a),s.found}catch{return Tnt.test(n.source)}});return Jt(r,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:fn.SOI_ANCHOR_FOUND,tokenTypes:[i]}))}function rG(e){let t=rl(e,r=>{let i=r[fg];return i instanceof RegExp&&(i.multiline||i.global)});return Jt(t,r=>({message:"Token Type: ->"+r.name+"<- static 'PATTERN' may NOT contain global('g') or multiline('m')",type:fn.UNSUPPORTED_FLAGS_FOUND,tokenTypes:[r]}))}function iG(e){let t=[],r=Jt(e,n=>bo(e,(a,s)=>(n.PATTERN.source===s.PATTERN.source&&!Ss(t,s)&&s.PATTERN!==ks.NA&&(t.push(s),a.push(s)),a),[]));r=Zx(r);let i=rl(r,n=>n.length>1);return Jt(i,n=>{let a=Jt(n,s=>s.name);return{message:`The same RegExp pattern ->${zl(n).PATTERN}<-has been used in all of the following Token Types: ${a.join(", ")} <-`,type:fn.DUPLICATE_PATTERNS_FOUND,tokenTypes:n}})}function nG(e){let t=rl(e,r=>{if(!pr(r,"GROUP"))return!1;let i=r.GROUP;return i!==ks.SKIPPED&&i!==ks.NA&&!Ys(i)});return Jt(t,r=>({message:"Token Type: ->"+r.name+"<- static 'GROUP' can only be Lexer.SKIPPED/Lexer.NA/A String",type:fn.INVALID_GROUP_TYPE_FOUND,tokenTypes:[r]}))}function aG(e,t){let r=rl(e,i=>i.PUSH_MODE!==void 0&&!Ss(t,i.PUSH_MODE));return Jt(r,i=>({message:`Token Type: ->${i.name}<- static 'PUSH_MODE' value cannot refer to a Lexer Mode ->${i.PUSH_MODE}<-which does not exist`,type:fn.PUSH_MODE_DOES_NOT_EXIST,tokenTypes:[i]}))}function sG(e){let t=[],r=bo(e,(i,n,a)=>{let s=n.PATTERN;return s===ks.NA||(Ys(s)?i.push({str:s,idx:a,tokenType:n}):Hh(s)&&lG(s)&&i.push({str:s.source,idx:a,tokenType:n})),i},[]);return wr(e,(i,n)=>{wr(r,({str:a,idx:s,tokenType:l})=>{if(n${l.name}<- can never be matched. +Because it appears AFTER the Token Type ->${i.name}<-in the lexer's definition. +See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNREACHABLE`;t.push({message:h,type:fn.UNREACHABLE_PATTERN,tokenTypes:[i,l]})}})}),t}function oG(e,t){if(Hh(t)){if(cG(t))return!1;let r=t.exec(e);return r!==null&&r.index===0}else{if(tu(t))return t(e,0,[],{});if(pr(t,"exec"))return t.exec(e,0,[],{});if(typeof t=="string")return t===e;throw Error("non exhaustive match")}}function lG(e){return v1([".","\\","[","]","|","^","$","(",")","?","*","+","{"],t=>e.source.indexOf(t)!==-1)===void 0}function cG(e){return/(\(\?=)|(\(\?!)|(\(\?<=)|(\(\? property in its definition +`,type:fn.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE}),pr(e,s5)||i.push({message:"A MultiMode Lexer cannot be initialized without a <"+s5+`> property in its definition +`,type:fn.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY}),pr(e,s5)&&pr(e,Mb)&&!pr(e.modes,e.defaultMode)&&i.push({message:`A MultiMode Lexer cannot be initialized with a ${Mb}: <${e.defaultMode}>which does not exist +`,type:fn.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST}),pr(e,s5)&&wr(e.modes,(n,a)=>{wr(n,(s,l)=>{if(Xh(s))i.push({message:`A Lexer cannot be initialized using an undefined Token Type. Mode:<${a}> at index: <${l}> +`,type:fn.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED});else if(pr(s,"LONGER_ALT")){let h=ai(s.LONGER_ALT)?s.LONGER_ALT:[s.LONGER_ALT];wr(h,u=>{!Xh(u)&&!Ss(n,u)&&i.push({message:`A MultiMode Lexer cannot be initialized with a longer_alt <${u.name}> on token <${s.name}> outside of mode <${a}> +`,type:fn.MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE})})}})}),i}function uG(e,t,r){let i=[],n=!1,a=Zx(Bl(Gn(e.modes))),s=jS(a,h=>h[fg]===ks.NA),l=XS(r);return t&&wr(s,h=>{let u=HS(h,l);if(u!==!1){let d={message:fG(h,u),type:u.issue,tokenType:h};i.push(d)}else pr(h,"LINE_BREAKS")?h.LINE_BREAKS===!0&&(n=!0):Qx(l,h.PATTERN)&&(n=!0)}),t&&!n&&i.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:fn.NO_LINE_BREAKS_FLAGS}),i}function dG(e){let t={},r=yo(e);return wr(r,i=>{let n=e[i];if(ai(n))t[i]=[];else throw Error("non exhaustive match")}),t}function YS(e){let t=e.PATTERN;if(Hh(t))return!1;if(tu(t)||pr(t,"exec"))return!0;if(Ys(t))return!1;throw Error("non exhaustive match")}function pG(e){return Ys(e)&&e.length===1?e.charCodeAt(0):!1}function HS(e,t){if(pr(e,"LINE_BREAKS"))return!1;if(Hh(e.PATTERN)){try{Qx(t,e.PATTERN)}catch(r){return{issue:fn.IDENTIFY_TERMINATOR,errMsg:r.message}}return!1}else{if(Ys(e.PATTERN))return!1;if(YS(e))return{issue:fn.CUSTOM_LINE_BREAK};throw Error("non exhaustive match")}}function fG(e,t){if(t.issue===fn.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===fn.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 XS(e){return Jt(e,t=>Ys(t)?t.charCodeAt(0):t)}function Zb(e,t,r){e[t]===void 0?e[t]=[r]:e[t].push(r)}function jc(e){return e255?255+~~(e/255):e}}function kg(e,t){let r=e.tokenTypeIdx;return r===t.tokenTypeIdx?!0:t.isParent===!0&&t.categoryMatchesMap[r]===!0}function x1(e,t){return e.tokenTypeIdx===t.tokenTypeIdx}function Cg(e){let t=mG(e);yG(t),bG(t),vG(t),wr(t,r=>{r.isParent=r.categoryMatches.length>0})}function mG(e){let t=ba(e),r=e,i=!0;for(;i;){r=Zx(Bl(Jt(r,a=>a.CATEGORIES)));let n=qS(r,t);t=t.concat(n),Di(n)?i=!1:r=n}return t}function yG(e){wr(e,t=>{ZS(t)||(OCe[tke]=t,t.tokenTypeIdx=tke++),lE(t)&&!ai(t.CATEGORIES)&&(t.CATEGORIES=[t.CATEGORIES]),lE(t)||(t.CATEGORIES=[]),xG(t)||(t.categoryMatches=[]),TG(t)||(t.categoryMatchesMap={})})}function vG(e){wr(e,t=>{t.categoryMatches=[],wr(t.categoryMatchesMap,(r,i)=>{t.categoryMatches.push(OCe[i].tokenTypeIdx)})})}function bG(e){wr(e,t=>{KS([],t)})}function KS(e,t){wr(e,r=>{t.categoryMatchesMap[r.tokenTypeIdx]=!0}),wr(t.CATEGORIES,r=>{let i=e.concat(t);Ss(i,r)||KS(i,r)})}function ZS(e){return pr(e,"tokenTypeIdx")}function lE(e){return pr(e,"CATEGORIES")}function xG(e){return pr(e,"categoryMatches")}function TG(e){return pr(e,"categoryMatchesMap")}function kG(e){return pr(e,"tokenTypeIdx")}function Ld(e){return QS(e)?e.LABEL:e.name}function QS(e){return Ys(e.LABEL)&&e.LABEL!==""}function sg(e){return CG(e)}function CG(e){let t=e.pattern,r={};if(r.name=e.name,Xh(t)||(r.PATTERN=t),pr(e,Cnt))throw`The parent property is no longer supported. +See: https://github.com/chevrotain/chevrotain/issues/564#issuecomment-349062346 for details.`;return pr(e,rke)&&(r.CATEGORIES=e[rke]),Cg([r]),pr(e,ike)&&(r.LABEL=e[ike]),pr(e,nke)&&(r.GROUP=e[nke]),pr(e,ske)&&(r.POP_MODE=e[ske]),pr(e,ake)&&(r.PUSH_MODE=e[ake]),pr(e,oke)&&(r.LONGER_ALT=e[oke]),pr(e,lke)&&(r.LINE_BREAKS=e[lke]),pr(e,cke)&&(r.START_CHARS_HINT=e[cke]),r}function B1(e,t,r,i,n,a,s,l){return{image:t,startOffset:r,endOffset:i,startLine:n,endLine:a,startColumn:s,endColumn:l,tokenTypeIdx:e.tokenTypeIdx,tokenType:e}}function JS(e,t){return kg(e,t)}function wG(e,t){let r=new Ent(e,t);return r.resolveRefs(),r.errors}function yx(e,t,r=[]){r=ba(r);let i=[],n=0;function a(l){return l.concat(ya(e,n+1))}o(a,"remainingPathWith"),S(a,"remainingPathWith");function s(l){let h=yx(a(l),t,r);return i.concat(h)}for(o(s,"getAlternativesForProd"),S(s,"getAlternativesForProd");r.length{Di(h.definition)===!1&&(i=s(h.definition))}),i;if(l instanceof zi)r.push(l.terminalType);else throw Error("non exhaustive match")}n++}return i.push({partialPath:r,suffixDef:ya(e,n)}),i}function t6(e,t,r,i){let n="EXIT_NONE_TERMINAL",a=[n],s="EXIT_ALTERNATIVE",l=!1,h=t.length,u=h-i-1,d=[],p=[];for(p.push({idx:-1,def:e,ruleStack:[],occurrenceStack:[]});!Di(p);){let f=p.pop();if(f===s){l&&pg(p).idx<=u&&p.pop();continue}let g=f.def,m=f.idx,y=f.ruleStack,b=f.occurrenceStack;if(Di(g))continue;let v=g[0];if(v===n){let T={idx:m,def:ya(g),ruleStack:px(y),occurrenceStack:px(b)};p.push(T)}else if(v instanceof zi)if(m=0;T--){let x=v.definition[T],k={idx:m,def:x.definition.concat(ya(g)),ruleStack:y,occurrenceStack:b};p.push(k),p.push(s)}else if(v instanceof Hs)p.push({idx:m,def:v.definition.concat(ya(g)),ruleStack:y,occurrenceStack:b});else if(v instanceof M1)p.push(EG(v,m,y,b));else throw Error("non exhaustive match")}return d}function EG(e,t,r,i){let n=ba(r);n.push(e.name);let a=ba(i);return a.push(1),{idx:t,def:e.definition,ruleStack:n,occurrenceStack:a}}function Jx(e){if(e instanceof va||e==="Option")return Ji.OPTION;if(e instanceof pn||e==="Repetition")return Ji.REPETITION;if(e instanceof To||e==="RepetitionMandatory")return Ji.REPETITION_MANDATORY;if(e instanceof ko||e==="RepetitionMandatoryWithSeparator")return Ji.REPETITION_MANDATORY_WITH_SEPARATOR;if(e instanceof Xs||e==="RepetitionWithSeparator")return Ji.REPETITION_WITH_SEPARATOR;if(e instanceof Ks||e==="Alternation")return Ji.ALTERNATION;throw Error("non exhaustive match")}function cE(e){let{occurrence:t,rule:r,prodType:i,maxLookahead:n}=e,a=Jx(i);return a===Ji.ALTERNATION?P1(t,r,n):F1(t,r,a,n)}function SG(e,t,r,i,n,a){let s=P1(e,t,r),l=i6(s)?x1:kg;return a(s,i,l,n)}function _G(e,t,r,i,n,a){let s=F1(e,t,n,r),l=i6(s)?x1:kg;return a(s[0],l,i)}function AG(e,t,r,i){let n=e.length,a=Pl(e,s=>Pl(s,l=>l.length===1));if(t)return function(s){let l=Jt(s,h=>h.GATE);for(let h=0;hBl(h)),l=bo(s,(h,u,d)=>(wr(u,p=>{pr(h,p.tokenTypeIdx)||(h[p.tokenTypeIdx]=d),wr(p.categoryMatches,f=>{pr(h,f)||(h[f]=d)})}),h),{});return function(){let h=this.LA(1);return l[h.tokenTypeIdx]}}else return function(){for(let s=0;sa.length===1),n=e.length;if(i&&!r){let a=Bl(e);if(a.length===1&&Di(a[0].categoryMatches)){let s=a[0].tokenTypeIdx;return function(){return this.LA(1).tokenTypeIdx===s}}else{let s=bo(a,(l,h,u)=>(l[h.tokenTypeIdx]=!0,wr(h.categoryMatches,d=>{l[d]=!0}),l),[]);return function(){let l=this.LA(1);return s[l.tokenTypeIdx]===!0}}}else return function(){e:for(let a=0;ayx([s],1)),i=hE(r.length),n=Jt(r,s=>{let l={};return wr(s,h=>{let u=Qb(h.partialPath);wr(u,d=>{l[d]=!0})}),l}),a=r;for(let s=1;s<=t;s++){let l=a;a=hE(l.length);for(let h=0;h{let b=Qb(y.partialPath);wr(b,v=>{n[h][v]=!0})})}}}}return i}function P1(e,t,r,i){let n=new BCe(e,Ji.ALTERNATION,i);return t.accept(n),r6(n.result,r)}function F1(e,t,r,i){let n=new BCe(e,r);t.accept(n);let a=n.result,s=new Lnt(t,e,r).startWalking(),l=new Hs({definition:a}),h=new Hs({definition:s});return r6([l,h],i)}function vx(e,t){e:for(let r=0;r{let n=t[i];return r===n||n.categoryMatchesMap[r.tokenTypeIdx]})}function i6(e){return Pl(e,t=>Pl(t,r=>Pl(r,i=>Di(i.categoryMatches))))}function IG(e){let t=e.lookaheadStrategy.validate({rules:e.rules,tokenTypes:e.tokenTypes,grammarName:e.grammarName});return Jt(t,r=>Object.assign({type:ws.CUSTOM_LOOKAHEAD_VALIDATION},r))}function DG(e,t,r,i){let n=Jo(e,h=>MG(h,r)),a=UG(e,t,r),s=Jo(e,h=>qG(h,r)),l=Jo(e,h=>OG(h,e,i,r));return n.concat(a,s,l)}function MG(e,t){let r=new $nt;e.accept(r);let i=r.allProductions,n=Uit(i,NG),a=ql(n,s=>s.length>1);return Jt(Gn(a),s=>{let l=zl(s),h=t.buildDuplicateFoundError(e,s),u=Ho(l),d={message:h,type:ws.DUPLICATE_PRODUCTIONS,ruleName:e.name,dslName:u,occurrence:l.idx},p=n6(l);return p&&(d.parameter=p),d})}function NG(e){return`${Ho(e)}_#_${e.idx}_#_${n6(e)}`}function n6(e){return e instanceof zi?e.terminalType.name:e instanceof Cs?e.nonTerminalName:""}function OG(e,t,r,i){let n=[];if(bo(t,(a,s)=>s.name===e.name?a+1:a,0)>1){let a=i.buildDuplicateRuleNameError({topLevelRule:e,grammarName:r});n.push({message:a,type:ws.DUPLICATE_RULE_NAME,ruleName:e.name})}return n}function BG(e,t,r){let i=[],n;return Ss(t,e)||(n=`Invalid rule override, rule: ->${e}<- cannot be overridden in the grammar: ->${r}<-as it is not defined in any of the super grammars `,i.push({message:n,type:ws.INVALID_RULE_OVERRIDE,ruleName:e})),i}function a6(e,t,r,i=[]){let n=[],a=c1(t.definition);if(Di(a))return[];{let s=e.name;Ss(a,e)&&n.push({message:r.buildLeftRecursionError({topLevelRule:e,leftRecursionPath:i}),type:ws.LEFT_RECURSION,ruleName:s});let l=qS(a,i.concat([e])),h=Jo(l,u=>{let d=ba(i);return d.push(u),a6(e,u,r,d)});return n.concat(h)}}function c1(e){let t=[];if(Di(e))return t;let r=zl(e);if(r instanceof Cs)t.push(r.referencedRule);else if(r instanceof Hs||r instanceof va||r instanceof To||r instanceof ko||r instanceof Xs||r instanceof pn)t=t.concat(c1(r.definition));else if(r instanceof Ks)t=Bl(Jt(r.definition,a=>c1(a.definition)));else if(!(r instanceof zi))throw Error("non exhaustive match");let i=b1(r),n=e.length>1;if(i&&n){let a=ya(e);return t.concat(c1(a))}else return t}function FG(e,t){let r=new PG;e.accept(r);let i=r.alternations;return Jo(i,n=>{let a=px(n.definition);return Jo(a,(s,l)=>{let h=t6([s],[],kg,1);return Di(h)?[{message:t.buildEmptyAlternationError({topLevelRule:e,alternation:n,emptyChoiceIdx:l}),type:ws.NONE_LAST_EMPTY_ALT,ruleName:e.name,occurrence:n.idx,alternative:l+1}]:[]})})}function zG(e,t,r){let i=new PG;e.accept(i);let n=i.alternations;return n=jS(n,a=>a.ignoreAmbiguities===!0),Jo(n,a=>{let s=a.idx,l=a.maxLookahead||t,h=P1(s,e,l,a),u=GG(h,a,e,r),d=WG(h,a,e,r);return u.concat(d)})}function qG(e,t){let r=new PG;e.accept(r);let i=r.alternations;return Jo(i,n=>n.definition.length>255?[{message:t.buildTooManyAlternativesError({topLevelRule:e,alternation:n}),type:ws.TOO_MANY_ALTS,ruleName:e.name,occurrence:n.idx}]:[])}function jG(e,t,r){let i=[];return wr(e,n=>{let a=new Int;n.accept(a);let s=a.allProductions;wr(s,l=>{let h=Jx(l),u=l.maxLookahead||t,d=l.idx,p=F1(d,n,h,u)[0];if(Di(Bl(p))){let f=r.buildEmptyRepetitionError({topLevelRule:n,repetition:l});i.push({message:f,type:ws.NO_NON_EMPTY_LOOKAHEAD,ruleName:n.name})}})}),i}function GG(e,t,r,i){let n=[],a=bo(e,(s,l,h)=>(t.definition[h].ignoreAmbiguities===!0||wr(l,u=>{let d=[h];wr(e,(p,f)=>{h!==f&&vx(p,u)&&t.definition[f].ignoreAmbiguities!==!0&&d.push(f)}),d.length>1&&!vx(n,u)&&(n.push(u),s.push({alts:d,path:u}))}),s),[]);return Jt(a,s=>{let l=Jt(s.alts,h=>h+1);return{message:i.buildAlternationAmbiguityError({topLevelRule:r,alternation:t,ambiguityIndices:l,prefixPath:s.path}),type:ws.AMBIGUOUS_ALTS,ruleName:r.name,occurrence:t.idx,alternatives:s.alts}})}function WG(e,t,r,i){let n=bo(e,(a,s,l)=>{let h=Jt(s,u=>({idx:l,path:u}));return a.concat(h)},[]);return Zx(Jo(n,a=>{if(t.definition[a.idx].ignoreAmbiguities===!0)return[];let s=a.idx,l=a.path,h=rl(n,u=>t.definition[u.idx].ignoreAmbiguities!==!0&&u.idx{let d=[u.idx+1,s+1],p=t.idx===0?"":t.idx;return{message:i.buildAlternationPrefixAmbiguityError({topLevelRule:r,alternation:t,ambiguityIndices:d,prefixPath:u.path}),type:ws.AMBIGUOUS_PREFIX_ALTS,ruleName:r.name,occurrence:p,alternatives:d}})}))}function UG(e,t,r){let i=[],n=Jt(t,a=>a.name);return wr(e,a=>{let s=a.name;if(Ss(n,s)){let l=r.buildNamespaceConflictError(a);i.push({message:l,type:ws.CONFLICT_TOKENS_RULES_NAMESPACE,ruleName:s})}}),i}function VG(e){let t=Yq(e,{errMsgProvider:wnt}),r={};return wr(e.rules,i=>{r[i.name]=i}),wG(r,t.errMsgProvider)}function YG(e){return e=Yq(e,{errMsgProvider:ig}),DG(e.rules,e.tokenTypes,e.errMsgProvider,e.grammarName)}function T1(e){return Ss(jCe,e.name)}function HG(e,t,r,i,n,a,s){let l=this.getKeyForAutomaticLookahead(i,n),h=this.firstAfterRepMap[l];if(h===void 0){let f=this.getCurrRuleFullName(),g=this.getGAstProductions()[f];h=new a(g,n).startWalking(),this.firstAfterRepMap[l]=h}let u=h.token,d=h.occurrence,p=h.isEndOfRule;this.RULE_STACK.length===1&&p&&u===void 0&&(u=Dd,d=1),!(u===void 0||d===void 0)&&this.shouldInRepetitionRecoveryBeTried(u,d,s)&&this.tryInRepetitionRecovery(e,t,r,u)}function Jb(e,t,r){return r|t|e}function KG(e){o5.reset(),e.accept(o5);let t=o5.dslMethods;return o5.reset(),t}function uE(e,t){isNaN(e.startOffset)===!0?(e.startOffset=t.startOffset,e.endOffset=t.endOffset):e.endOffsets.msg);throw Error(`Errors Detected in CST Visitor <${this.constructor.name}>: + ${a.join(` + +`).replace(/\n/g,` + `)}`)}},"validateVisitor")};return r.prototype=i,r.prototype.constructor=r,r._RULE_NAMES=t,r}function tW(e,t,r){let i=S(function(){},"derivedConstructor");o6(i,e+"BaseSemanticsWithDefaults");let n=Object.create(r.prototype);return wr(t,a=>{n[a]=JG}),i.prototype=n,i.prototype.constructor=i,i}function rW(e,t){return iW(e,t)}function iW(e,t){let r=rl(t,n=>tu(e[n])===!1),i=Jt(r,n=>({msg:`Missing visitor method: <${n}> on ${e.constructor.name} CST Visitor.`,type:$B.MISSING_METHOD,methodName:n}));return Zx(i)}function tg(e,t,r,i=!1){k1(r);let n=pg(this.recordingProdStack),a=tu(t)?t:t.DEF,s=new e({definition:[],idx:r});return i&&(s.separator=t.SEP),pr(t,"MAX_LOOKAHEAD")&&(s.maxLookahead=t.MAX_LOOKAHEAD),this.recordingProdStack.push(s),a.call(this),n.definition.push(s),this.recordingProdStack.pop(),l6}function nW(e,t){k1(t);let r=pg(this.recordingProdStack),i=ai(e)===!1,n=i===!1?e:e.DEF,a=new Ks({definition:[],idx:t,ignoreAmbiguities:i&&e.IGNORE_AMBIGUITIES===!0});pr(e,"MAX_LOOKAHEAD")&&(a.maxLookahead=e.MAX_LOOKAHEAD);let s=DCe(n,l=>tu(l.GATE));return a.hasPredicates=s,r.definition.push(a),wr(n,l=>{let h=new Hs({definition:[]});a.definition.push(h),pr(l,"IGNORE_AMBIGUITIES")?h.ignoreAmbiguities=l.IGNORE_AMBIGUITIES:pr(l,"GATE")&&(h.ignoreAmbiguities=!0),this.recordingProdStack.push(h),l.ALT.call(this),this.recordingProdStack.pop()}),l6}function pE(e){return e===0?"":`${e}`}function k1(e){if(e<0||e>pke){let t=new Error(`Invalid DSL Method idx value: <${e}> + Idx value must be a none negative value smaller than ${pke+1}`);throw t.KNOWN_RECORDER_ERROR=!0,t}}function aW(e,t){t.forEach(r=>{let i=r.prototype;Object.getOwnPropertyNames(i).forEach(n=>{if(n==="constructor")return;let a=Object.getOwnPropertyDescriptor(i,n);a&&(a.get||a.set)?Object.defineProperty(e.prototype,n,a):e.prototype[n]=r.prototype[n]})})}function mE(e=void 0){return function(){return e}}function oW(e,t){for(var r=-1,i=e==null?0:e.length,n=Array(i);++r-1}function fW(e,t){var r=this.__data__,i=c6(r,e);return i<0?(++this.size,r.push([e,t])):r[i][1]=t,this}function Xd(e){var t=-1,r=e==null?0:e.length;for(this.clear();++tl))return!1;var u=a.get(e),d=a.get(t);if(u&&d)return u==t&&d==e;var p=-1,f=!0,g=r&ust?new twe:void 0;for(a.set(e,t),a.set(t,e);++p-1&&e%1==0&&e-1&&e%1==0&&e<=Vst}function cU(e){return w1(e)&&lU(e.length)&&!!Fi[z1(e)]}function hU(e){return function(t){return e(t)}}function dU(e,t){var r=Es(e),i=!r&&p6(e),n=!r&&!i&&yE(e),a=!r&&!i&&!n&&uU(e),s=r||i||n||a,l=s?Nst(e.length,String):[],h=l.length;for(var u in e)(t||Cot.call(e,u))&&!(s&&(u=="length"||n&&(u=="offset"||u=="parent")||a&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||lwe(u,h)))&&l.push(u);return l}function pU(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||Eot;return e===r}function fU(e,t){return function(r){return e(t(r))}}function gU(e){if(!hwe(e))return Aot(e);var t=[];for(var r in Object(e))Lot.call(e,r)&&r!="constructor"&&t.push(r);return t}function mU(e){return e!=null&&lU(e.length)&&!ewe(e)}function yU(e){return f6(e)?wot(e):uwe(e)}function bU(e){return Rst(e,vU,Mst)}function xU(e,t,r,i,n,a){var s=r&$ot,l=Eke(e),h=l.length,u=Eke(t),d=u.length;if(h!=d&&!s)return!1;for(var p=h;p--;){var f=l[p];if(!(s?f in t:Dot.call(t,f)))return!1}var g=a.get(e),m=a.get(t);if(g&&m)return g==t&&m==e;var y=!0;a.set(e,t),a.set(t,e);for(var b=s;++pT6(e,t,a));return Jd(e,t,i,r,...n)}function cV(e,t,r){let i=Dn(e,t,r,{type:Nd});Xc(e,i);let n=Jd(e,t,i,r,iu(e,t,r));return hV(e,t,r,n)}function iu(e,t,r){let i=Ilt(Vh(r.definition,n=>T6(e,t,n)),n=>n!==void 0);return i.length===1?i[0]:i.length===0?void 0:dV(e,i)}function k6(e,t,r,i,n){let a=i.left,s=i.right,l=Dn(e,t,r,{type:Blt});Xc(e,l);let h=Dn(e,t,r,{type:bwe});return a.loopback=l,h.loopback=l,e.decisionMap[Md(t,n?"RepetitionMandatoryWithSeparator":"RepetitionMandatory",r.idx)]=l,dn(s,l),n===void 0?(dn(l,a),dn(l,h)):(dn(l,h),dn(l,n.left),dn(n.right,a)),{left:a,right:h}}function C6(e,t,r,i,n){let a=i.left,s=i.right,l=Dn(e,t,r,{type:Olt});Xc(e,l);let h=Dn(e,t,r,{type:bwe}),u=Dn(e,t,r,{type:Nlt});return l.loopback=u,h.loopback=u,dn(l,a),dn(l,h),dn(s,u),n!==void 0?(dn(u,h),dn(u,n.left),dn(n.right,a)):dn(u,l),e.decisionMap[Md(t,n?"RepetitionWithSeparator":"Repetition",r.idx)]=l,{left:l,right:h}}function hV(e,t,r,i){let n=i.left,a=i.right;return dn(n,a),e.decisionMap[Md(t,"Option",r.idx)]=n,i}function Xc(e,t){return e.decisionStates.push(t),t.decision=e.decisionStates.length-1,t.decision}function Jd(e,t,r,i,...n){let a=Dn(e,t,i,{type:Mlt,start:r});r.end=a;for(let l of n)l!==void 0?(dn(r,l.left),dn(l.right,a)):dn(r,a);let s={left:r,right:a};return e.decisionMap[Md(t,uV(i),i.idx)]=r,s}function uV(e){if(e instanceof Ks)return"Alternation";if(e instanceof va)return"Option";if(e instanceof pn)return"Repetition";if(e instanceof Xs)return"RepetitionWithSeparator";if(e instanceof To)return"RepetitionMandatory";if(e instanceof ko)return"RepetitionMandatoryWithSeparator";throw new Error("Invalid production type encountered")}function dV(e,t){let r=t.length;for(let a=0;ar.stateNumber.toString()).join("_")}`}function mV(e,t,r){for(var i=-1,n=e.length;++i0&&r(l)?t>1?E6(l,t-1,r,i,n):nwe(n,l):i||(n[n.length]=l)}return n}function xV(e,t){return Twe(Vh(e,t),1)}function TV(e,t,r,i){for(var n=e.length,a=r+(i?1:-1);i?a--:++a-1}function SV(e,t,r){for(var i=-1,n=e==null?0:e.length;++i=Jlt){var u=t?null:Qlt(e);if(u)return KW(u);s=!1,n=rwe,h=new twe}else h=t?[]:l;e:for(;++i{let n=i.toString(),a=r[n];return a!==void 0||(a={atnStartState:e,decision:t,states:{}},r[n]=a),a}}function bE(e,t=!0){let r=new Set;for(let i of e){let n=new Set;for(let a of i){if(a===void 0){if(t)break;return!1}let s=[a.tokenTypeIdx].concat(a.categoryMatches);for(let l of s)if(r.has(l)){if(!n.has(l))return!1}else r.add(l),n.add(l)}}return!0}function FV(e){let t=e.decisionStates.length,r=Array(t);for(let i=0;iLd(n)).join(", "),r=e.production.idx===0?"":e.production.idx,i=`Ambiguous Alternatives Detected: <${e.ambiguityIndices.join(", ")}> in <${WV(e.production)}${r}> inside <${e.topLevelRule.name}> Rule, +<${t}> may appears as a prefix path in all these alternatives. +`;return i=i+`See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#AMBIGUOUS_ALTERNATIVES +For Further details.`,i}function WV(e){if(e instanceof Cs)return"SUBRULE";if(e instanceof va)return"OPTION";if(e instanceof Ks)return"OR";if(e instanceof To)return"AT_LEAST_ONE";if(e instanceof ko)return"AT_LEAST_ONE_SEP";if(e instanceof Xs)return"MANY_SEP";if(e instanceof pn)return"MANY";if(e instanceof zi)return"CONSUME";throw Error("non exhaustive match")}function UV(e,t,r){let i=jlt(t.configs.elements,a=>a.state.transitions),n=tct(i.filter(a=>a instanceof eV).map(a=>a.tokenType),a=>a.tokenTypeIdx);return{actualToken:r,possibleTokenTypes:n,tokenPath:e}}function VV(e,t){return e.edges[t.tokenTypeIdx]}function YV(e,t,r){let i=new OB,n=[];for(let s of e.elements){if(r.is(s.alt)===!1)continue;if(s.state.type===tT){n.push(s);continue}let l=s.state.transitions.length;for(let h=0;h0&&!QV(a))for(let s of n)a.add(s);return a}function HV(e,t){if(e instanceof eV&&JS(t,e.tokenType))return e.target}function XV(e,t){let r;for(let i of e.elements)if(t.is(i.alt)===!0){if(r===void 0)r=i.alt;else if(r!==i.alt)return}return r}function S6(e){return{configs:e,edges:{},isAcceptState:!1,prediction:-1}}function xE(e,t,r,i){return i=_6(e,i),t.edges[r.tokenTypeIdx]=i,i}function _6(e,t){if(t===vE)return t;let r=t.configs.key,i=e.states[r];return i!==void 0?i:(t.configs.finalize(),e.states[r]=t,t)}function KV(e){let t=new OB,r=e.transitions.length;for(let i=0;i0){let n=[...e.stack],a={state:n.pop(),alt:e.alt,stack:n};E1(a,t)}else t.add(e);return}r.epsilonOnlyTransitions||t.add(e);let i=r.transitions.length;for(let n=0;n1)return!0;return!1}function iY(e){for(let t of Array.from(e.values()))if(Object.keys(t).length===1)return!0;return!1}function rx(e){return e.$type===kE}function nT(e,t,r){return lY({parser:t,tokens:r,ruleNames:new Map},e),t}function lY(e,t){let r=Bx(t,!1),i=vi(t.rules).filter(Ja).filter(a=>r.has(a));for(let a of i){let s={...e,consume:1,optional:1,subrule:1,many:1,or:1};e.parser.rule(a,Zh(s,a.definition))}let n=vi(t.rules).filter(hg).filter(a=>r.has(a));for(let a of n)e.parser.rule(a,cY(e,a))}function cY(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(xo(r))throw new Error("Cannot use terminal rule in infix expression");let i=t.operators.precedences.flatMap(p=>p.operators),n={$type:"Group",elements:[]},a={$container:n,$type:"Assignment",feature:"parts",operator:"+=",terminal:t.call},s={$container:n,$type:"Group",elements:[],cardinality:"*"};n.elements.push(a,s);let l={$container:s,$type:"Assignment",feature:"operators",operator:"+=",terminal:{$type:"Alternatives",elements:i}},h={...a,$container:s};s.elements.push(l,h);let u=i.map(p=>e.tokens[p.value]).map((p,f)=>({ALT:S(()=>e.parser.consume(f,p,l),"ALT")})),d;return p=>{d??(d=aT(e,r)),e.parser.subrule(0,d,!1,a,p),e.parser.many(0,{DEF:S(()=>{e.parser.alternatives(0,u),e.parser.subrule(1,d,!1,h,p)},"DEF")})}}function Zh(e,t,r=!1){let i;if(zc(t))i=mY(e,t);else if(Yh(t))i=hY(e,t);else if(Fc(t))i=Zh(e,t.terminal);else if(zd(t))i=R6(e,t);else if(qc(t))i=uY(e,t);else if(Lx(t))i=pY(e,t);else if(Mx(t))i=fY(e,t);else if(qd(t))i=gY(e,t);else if(qE(t)){let n=e.consume++;i=S(()=>e.parser.consume(n,Dd,t),"method")}else throw new oS(t.$cstNode,`Unexpected element type: ${t.$type}`);return L6(e,r?void 0:S1(t),i,t.cardinality)}function hY(e,t){let r=$d(t);return()=>e.parser.action(r,t)}function uY(e,t){let r=t.rule.ref;if(Fd(r)){let i=e.subrule++,n=Ja(r)&&r.fragment,a=t.arguments.length>0?dY(r,t.arguments):()=>({}),s;return l=>{s??(s=aT(e,r)),e.parser.subrule(i,s,n,t,a(l))}}else if(xo(r)){let i=e.consume++,n=Tx(e,r.name);return()=>e.parser.consume(i,n,t)}else if(r)eu(r);else throw new oS(t.$cstNode,`Undefined rule: ${t.rule.$refText}`)}function dY(e,t){if(t.some(r=>r.calledByName)){let r=t.map(i=>({parameterName:i.parameter?.ref?.name,predicate:Xo(i.value)}));return i=>{let n={};for(let{parameterName:a,predicate:s}of r)a&&(n[a]=s(i));return n}}else{let r=t.map(i=>Xo(i.value));return i=>{let n={};for(let a=0;at(i)||r(i)}else if(FE(e)){let t=Xo(e.left),r=Xo(e.right);return i=>t(i)&&r(i)}else if(WE(e)){let t=Xo(e.value);return r=>!t(r)}else if(UE(e)){let t=e.parameter.ref.name;return r=>r!==void 0&&r[t]===!0}else if(BE(e)){let t=!!e.true;return()=>t}eu(e)}function pY(e,t){if(t.elements.length===1)return Zh(e,t.elements[0]);{let r=[];for(let n of t.elements){let a={ALT:Zh(e,n,!0)},s=S1(n);s&&(a.GATE=Xo(s)),r.push(a)}let i=e.or++;return n=>e.parser.alternatives(i,r.map(a=>{let s={ALT:S(()=>a.ALT(n),"ALT")},l=a.GATE;return l&&(s.GATE=()=>l(n)),s}))}}function fY(e,t){if(t.elements.length===1)return Zh(e,t.elements[0]);let r=[];for(let l of t.elements){let h={ALT:Zh(e,l,!0)},u=S1(l);u&&(h.GATE=Xo(u)),r.push(h)}let i=e.or++,n=S((l,h)=>{let u=h.getRuleStack().join("-");return`uGroup_${l}_${u}`},"idFunc"),a=S(l=>e.parser.alternatives(i,r.map((h,u)=>{let d={ALT:S(()=>!0,"ALT")},p=e.parser;d.ALT=()=>{if(h.ALT(l),!p.isRecording()){let g=n(i,p);p.unorderedGroups.get(g)||p.unorderedGroups.set(g,[]);let m=p.unorderedGroups.get(g);typeof m?.[u]>"u"&&(m[u]=!0)}};let f=h.GATE;return f?d.GATE=()=>f(l):d.GATE=()=>!p.unorderedGroups.get(n(i,p))?.[u],d})),"alternatives"),s=L6(e,S1(t),a,"*");return l=>{s(l),e.parser.isRecording()||e.parser.unorderedGroups.delete(n(i,e.parser))}}function gY(e,t){let r=t.elements.map(i=>Zh(e,i));return i=>r.forEach(n=>n(i))}function S1(e){if(qd(e))return e.guardCondition}function R6(e,t,r=t.terminal){if(r)if(qc(r)&&Ja(r.rule.ref)){let i=r.rule.ref,n=e.subrule++,a;return s=>{a??(a=aT(e,i)),e.parser.subrule(n,a,!1,t,s)}}else if(qc(r)&&xo(r.rule.ref)){let i=e.consume++,n=Tx(e,r.rule.ref.name);return()=>e.parser.consume(i,n,t)}else if(zc(r)){let i=e.consume++,n=Tx(e,r.value);return()=>e.parser.consume(i,n,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=qx(t.type.ref)?.terminal;if(!i)throw new Error("Could not find name assignment for type: "+$d(t.type.ref));return R6(e,t,i)}}function mY(e,t){let r=e.consume++,i=e.tokens[t.value];if(!i)throw new Error("Could not find token for keyword: "+t.value);return()=>e.parser.consume(r,i,t)}function L6(e,t,r,i){let n=t&&Xo(t);if(!i)if(n){let a=e.or++;return s=>e.parser.alternatives(a,[{ALT:S(()=>r(s),"ALT"),GATE:S(()=>n(s),"GATE")},{ALT:mE(),GATE:S(()=>!n(s),"GATE")}])}else return r;if(i==="*"){let a=e.many++;return s=>e.parser.many(a,{DEF:S(()=>r(s),"DEF"),GATE:n?()=>n(s):void 0})}else if(i==="+"){let a=e.many++;if(n){let s=e.or++;return l=>e.parser.alternatives(s,[{ALT:S(()=>e.parser.atLeastOne(a,{DEF:S(()=>r(l),"DEF")}),"ALT"),GATE:S(()=>n(l),"GATE")},{ALT:mE(),GATE:S(()=>!n(l),"GATE")}])}else return s=>e.parser.atLeastOne(a,{DEF:S(()=>r(s),"DEF")})}else if(i==="?"){let a=e.optional++;return s=>e.parser.optional(a,{DEF:S(()=>r(s),"DEF"),GATE:n?()=>n(s):void 0})}else eu(i)}function aT(e,t){let r=yY(e,t),i=e.parser.getRule(r);if(!i)throw new Error(`Rule "${r}" not found."`);return i}function yY(e,t){if(Fd(t))return t.name;if(e.ruleNames.has(t))return e.ruleNames.get(t);{let r=t,i=r.$container,n=t.$type;for(;!Ja(i);)(qd(i)||Lx(i)||Mx(i))&&(n=i.elements.indexOf(r).toString()+":"+n),r=i,i=i.$container;return n=i.name+":"+n,e.ruleNames.set(t,n),n}}function Tx(e,t){let r=e.tokens[t];if(!r)throw new Error(`Token "${t}" not found."`);return r}function $6(e){let t=e.Grammar,r=e.parser.Lexer,i=new Awe(e);return nT(t,i,r.definition),i.finalize(),i}function I6(e){let t=D6(e);return t.finalize(),t}function D6(e){let t=e.Grammar,r=e.parser.Lexer,i=new Swe(e);return nT(t,i,r.definition)}function sT(){return new Promise(e=>{typeof setImmediate>"u"?setTimeout(e,0):setImmediate(e)})}function oT(){return M5=performance.now(),new Ii.CancellationTokenSource}function N6(e){Lwe=e}function ep(e){return e===Bc}async function Wn(e){if(e===Ii.CancellationToken.None)return;let t=performance.now();if(t-M5>=Lwe&&(M5=t,await sT(),M5=performance.now()),e.isCancellationRequested)throw Bc}function kx(e,t){if(e.length<=1)return e;let r=e.length/2|0,i=e.slice(0,r),n=e.slice(r);kx(i,t),kx(n,t);let a=0,s=0,l=0;for(;ar.line||t.line===r.line&&t.character>r.character?{start:r,end:t}:e}function bY(e){let t=B6(e.range);return t!==e.range?{newText:e.newText,range:t}:e}function P6(e){return typeof e.name=="string"}function q6(e){return typeof e.$comment=="string"}function SE(e){return typeof e=="object"&&!!e&&("$ref"in e||"$error"in e)}function Rd(e){return{code:e}}function j6(e){if(e.range)return e.range;let t;return typeof e.property=="string"?t=Px(e.node.$cstNode,e.property,e.index):typeof e.keyword=="string"&&(t=bS(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 u1(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 G6(e){switch(e){case"error":return Rd(Ko.LexingError);case"warning":return Rd(Ko.LexingWarning);case"info":return Rd(Ko.LexingInfo);case"hint":return Rd(Ko.LexingHint);default:throw new Error("Invalid diagnostic severity: "+e)}}function lT(e){return Array.isArray(e)&&(e.length===0||"name"in e[0])}function cT(e){return e&&"modes"in e&&"defaultMode"in e}function Cx(e){return!lT(e)&&!cT(e)}function U6(e,t,r){let i,n;typeof e=="string"?(n=t,i=r):(n=e.range.start,i=t),n||(n=gi.create(0,0));let a=Y6(e),s=hT(i),l=EY({lines:a,position:n,options:s});return AY({index:0,tokens:l,position:n})}function V6(e,t){let r=hT(t),i=Y6(e);if(i.length===0)return!1;let n=i[0],a=i[i.length-1],s=r.start,l=r.end;return!!s?.exec(n)&&!!l?.exec(a)}function Y6(e){let t="";return typeof e=="string"?t=e:t=e.text,t.split(eCe)}function EY(e){let t=[],r=e.position.line,i=e.position.character;for(let n=0;n=l.length){if(t.length>0){let u=gi.create(r,i);t.push({type:"break",content:"",range:Kr.create(u,u)})}}else{qke.lastIndex=h;let u=qke.exec(l);if(u){let d=u[0],p=u[1],f=gi.create(r,i+h),g=gi.create(r,i+h+d.length);t.push({type:"tag",content:p,range:Kr.create(f,g)}),h+=d.length,h=wx(l,h)}if(h0&&t[t.length-1].type==="break"?t.slice(0,-1):t}function SY(e,t,r,i){let n=[];if(e.length===0){let a=gi.create(r,i),s=gi.create(r,i+t.length);n.push({type:"text",content:t,range:Kr.create(a,s)})}else{let a=0;for(let l of e){let h=l.index,u=t.substring(a,h);u.length>0&&n.push({type:"text",content:t.substring(a,h),range:Kr.create(gi.create(r,a+i),gi.create(r,h+i))});let d=u.length+1,p=l[1];if(n.push({type:"inline-tag",content:p,range:Kr.create(gi.create(r,a+d+i),gi.create(r,a+d+p.length+i))}),d+=p.length,l.length===4){d+=l[2].length;let f=l[3];n.push({type:"text",content:f,range:Kr.create(gi.create(r,a+d+i),gi.create(r,a+d+f.length+i))})}else n.push({type:"text",content:"",range:Kr.create(gi.create(r,a+d+i),gi.create(r,a+d+i))});a=h+l[0].length}let s=t.substring(a);s.length>0&&n.push({type:"text",content:s,range:Kr.create(gi.create(r,a+i),gi.create(r,a+i+s.length))})}return n}function wx(e,t){let r=e.substring(t).match(bct);return r?t+r.index:e.length}function _Y(e){let t=e.match(xct);if(t&&typeof t.index=="number")return t.index}function AY(e){let t=gi.create(e.position.line,e.position.character);if(e.tokens.length===0)return new jke([],Kr.create(t,t));let r=[];for(;e.index0){let a=wx(t,i);n=t.substring(a),t=t.substring(0,i)}return(e==="linkcode"||e==="link"&&r.link==="code")&&(n=`\`${n}\``),r.renderLink?.(t,n)??DY(t,n)}}function DY(e,t){try{return mo.parse(e,!0),`[${t}](${e})`}catch{return e}}function AE(e){return e.endsWith(` +`)?` +`:` + +`}function Jr(e){return{documentation:{CommentProvider:S(t=>new r5e(t),"CommentProvider"),DocumentationProvider:S(t=>new t5e(t),"DocumentationProvider")},parser:{AsyncParser:S(t=>new i5e(t),"AsyncParser"),GrammarConfig:S(t=>SS(t),"GrammarConfig"),LangiumParser:S(t=>I6(t),"LangiumParser"),CompletionParser:S(t=>$6(t),"CompletionParser"),ValueConverter:S(()=>new vY,"ValueConverter"),TokenBuilder:S(()=>new M6,"TokenBuilder"),Lexer:S(t=>new wY(t),"Lexer"),ParserErrorMessageProvider:S(()=>new oY,"ParserErrorMessageProvider"),LexerErrorMessageProvider:S(()=>new Jwe,"LexerErrorMessageProvider")},workspace:{AstNodeLocator:S(()=>new Hwe,"AstNodeLocator"),AstNodeDescriptionProvider:S(t=>new Vwe(t),"AstNodeDescriptionProvider"),ReferenceDescriptionProvider:S(t=>new Ywe(t),"ReferenceDescriptionProvider")},references:{Linker:S(t=>new Mwe(t),"Linker"),NameProvider:S(()=>new Nwe,"NameProvider"),ScopeProvider:S(t=>new zwe(t),"ScopeProvider"),ScopeComputation:S(t=>new Bwe(t),"ScopeComputation"),References:S(t=>new Owe(t),"References")},serializer:{Hydrator:S(t=>new a5e(t),"Hydrator"),JsonSerializer:S(t=>new qwe(t),"JsonSerializer")},validation:{DocumentValidator:S(t=>new Uwe(t),"DocumentValidator"),ValidationRegistry:S(t=>new Gwe(t),"ValidationRegistry")},shared:S(()=>e.shared,"shared")}}function ei(e){return{ServiceRegistry:S(t=>new jwe(t),"ServiceRegistry"),workspace:{LangiumDocuments:S(t=>new Dwe(t),"LangiumDocuments"),LangiumDocumentFactory:S(t=>new Iwe(t),"LangiumDocumentFactory"),DocumentBuilder:S(t=>new Kwe(t),"DocumentBuilder"),IndexManager:S(t=>new Zwe(t),"IndexManager"),WorkspaceManager:S(t=>new Qwe(t),"WorkspaceManager"),FileSystemProvider:S(t=>e.fileSystemProvider(t),"FileSystemProvider"),WorkspaceLock:S(()=>new n5e,"WorkspaceLock"),ConfigurationProvider:S(t=>new Xwe(t),"ConfigurationProvider")},profilers:{}}}function vr(e,t,r,i,n,a,s,l,h){let u=[e,t,r,i,n,a,s,l,h].reduce(gg,{});return Q6(u)}function Z6(e){if(e&&e[s5e])for(let t of Object.values(e))Z6(t);return e}function Q6(e,t){let r=new Proxy({},{deleteProperty:S(()=>!1,"deleteProperty"),set:S(()=>{throw new Error("Cannot set property on injected service container")},"set"),get:S((i,n)=>n===s5e?!0:RE(i,n,e,t||r),"get"),getOwnPropertyDescriptor:S((i,n)=>(RE(i,n,e,t||r),Object.getOwnPropertyDescriptor(i,n)),"getOwnPropertyDescriptor"),has:S((i,n)=>n in e,"has"),ownKeys:S(()=>[...Object.getOwnPropertyNames(e)],"ownKeys")});return r}function RE(e,t,r,i){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]===Gke)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 n=r[t];e[t]=Gke;try{e[t]=typeof n=="function"?n(i):Q6(n,i)}catch(a){throw e[t]=a instanceof Error?a:void 0,a}return e[t]}else return}function gg(e,t){if(t){for(let[r,i]of Object.entries(t))if(i!=null)if(typeof i=="object"){let n=e[r];typeof n=="object"&&n!==null?e[r]=gg(n,i):e[r]=gg({},i)}else e[r]=i}return e}function NY(){let e=vr(ei(ci),Ect),t=vr(Jr({shared:e}),wct);return e.ServiceRegistry.register(t),t}function Un(e){let t=NY(),r=t.serializer.JsonSerializer.deserialize(e);return t.shared.workspace.LangiumDocumentFactory.fromModel(r,mo.parse(`memory:/${r.name??"grammar"}.langium`)),r}function h5e(e){return kn.isInstance(e,Ic.$type)}function u5e(e){return kn.isInstance(e,N5.$type)}function d5e(e){return kn.isInstance(e,qm.$type)}function p5e(e){return kn.isInstance(e,zf.$type)}function f5e(e){return kn.isInstance(e,O5.$type)}function g5e(e){return kn.isInstance(e,iP.$type)}function m5e(e){return e==="rmo"||e==="readmodel"||e==="ui"||e==="cmd"||e==="command"||e==="evt"||e==="event"||e==="pcr"||e==="processor"}function J6(e){return kn.isInstance(e,Gh.$type)}function y5e(e){return kn.isInstance(e,qf.$type)}function v5e(e){return kn.isInstance(e,Bb.$type)}function b5e(e){return kn.isInstance(e,jm.$type)}function x5e(e){return kn.isInstance(e,Gm.$type)}function T5e(e){return kn.isInstance(e,Wm.$type)}function k5e(e){return kn.isInstance(e,jf.$type)}function C5e(e){return kn.isInstance(e,B5.$type)}function w5e(e){return kn.isInstance(e,Um.$type)}function E5e(e){return kn.isInstance(e,Vm.$type)}function S5e(e){return kn.isInstance(e,Ym.$type)}function _5e(e){return kn.isInstance(e,Hm.$type)}function A5e(e){return kn.isInstance(e,Pb.$type)}function R5e(e){return kn.isInstance(e,Xm.$type)}function L5e(e){return kn.isInstance(e,ma.$type)}var lZe,Ex,cZe,nP,hZe,uZe,S,dZe,$r,Od,P5,LE,aP,sP,$E,kO,k5,CO,_b,gi,Kr,Ab,wO,C5,EO,SO,_O,AO,w5,RO,LO,$O,Rb,Nf,$c,Of,ga,qh,Lb,Bm,Pm,Fm,E5,gb,VN,j3e,IO,DO,$b,MO,S5,zm,NO,OO,BO,PO,FO,zO,qO,jO,Ib,GO,WO,UO,VO,YO,HO,XO,KO,ZO,QO,JO,Db,eB,tB,rB,iB,nB,aB,sB,oB,lB,cB,hB,uB,dB,_5,A5,pB,fB,gB,mB,yB,vB,bB,xB,G3e,TB,v4e,Qe,Sx,mg,_x,_1,IE,U3e,Y3e,pZe,fZe,H3e,gZe,mZe,yZe,vZe,kB,bZe,A1,b4e,en,oP,xZe,TZe,kZe,CZe,wZe,EZe,SZe,_Ze,AZe,RZe,LZe,$Ze,IZe,DZe,MZe,NZe,OZe,BZe,PZe,FZe,zZe,qZe,jZe,GZe,WZe,Z3e,lP,cP,Oc,p1,xs,f1,nx,uP,Q3e,UZe,Us,Fb,Km,go,kd,zb,F5,z5,Cd,q5,wd,Ed,qb,Sd,jb,j5,Wh,G5,Gf,W5,Dc,Gb,U5,Zm,Qm,Jm,Wf,V5,Y5,e1,H5,Ml,Wb,Uf,X5,Vf,t1,K5,Yf,Vs,Hf,Uh,Xf,Ub,Kf,Zf,Z5,Vb,Qf,Jf,r1,RP,hr,Nc,IP,PP,oS,FP,eE,tE,x4e,VZe,n5,YZe,J3e,cS,eCe,tCe,HZe,rg,rCe,HP,XZe,iCe,KZe,ZZe,Uc,QZe,el,nCe,JZe,eQe,mb,tQe,rQe,iQe,nQe,aQe,sQe,T4e,Gd,Fl,oQe,_S,jx,lQe,ai,cQe,k4e,C4e,hQe,uQe,dQe,pQe,fQe,tl,w4e,gQe,mQe,yQe,vQe,bQe,E4e,xQe,TQe,Gx,Wx,kQe,CQe,wQe,EQe,tu,SQe,YN,S4e,_Qe,AQe,RQe,vg,LQe,$Qe,IQe,DQe,MQe,NQe,OQe,BQe,PQe,bg,FQe,CB,_4e,zQe,qQe,jQe,ra,GQe,WQe,UQe,VQe,YQe,HQe,XQe,rE,KQe,ZQe,QQe,JQe,aCe,sCe,eJe,tJe,RF,oCe,rJe,iJe,RS,DF,Ux,nJe,aJe,LS,Vx,A4e,sJe,FF,oJe,qF,Vc,$S,lJe,cJe,Yx,hJe,uJe,R4e,lCe,dJe,pJe,fJe,IS,gJe,cCe,L4e,mJe,$4e,yJe,vJe,hx,bJe,xJe,TJe,kJe,CJe,wJe,EJe,SJe,_Je,AJe,RJe,LJe,$Je,IJe,DJe,MJe,NJe,OJe,BJe,PJe,FJe,zJe,qJe,jJe,Pi,GJe,Hx,hCe,Xb,WJe,HN,UJe,Id,I4e,VJe,ZF,YJe,HJe,uCe,dCe,XJe,KJe,ZJe,QJe,pCe,yo,JJe,eet,tet,vo,ret,iet,net,aet,DS,set,oet,sz,cet,ux,het,uet,det,pet,fet,get,met,yet,vet,bet,xet,D4e,Tet,MS,ket,Cet,wet,Eet,_et,Aet,NS,Ret,dx,Let,$et,OS,Iet,Det,Met,Net,BS,Oet,Bet,Pet,Fet,zet,qet,jet,Get,Wet,PS,Uet,Kx,Lz,Vet,Dz,M4e,Yet,Nz,Bl,Het,fCe,gCe,Xet,Ket,Zet,Qet,Jet,ett,ttt,Kb,rtt,itt,mCe,N4e,ntt,O4e,B4e,att,Hz,yCe,stt,ott,P4e,ltt,Kz,ctt,htt,utt,vCe,dtt,bCe,wB,xCe,ptt,EB,ftt,SB,gtt,s1,F4e,mtt,z4e,q4e,j4e,G4e,ytt,vtt,btt,xtt,Ttt,Bf,m1,ktt,Ctt,wtt,Ett,iE,nq,Stt,_tt,Att,W4e,U4e,Rtt,Ltt,$tt,Itt,Dtt,Mtt,Ntt,Ott,Btt,Ptt,Ftt,ztt,qtt,jtt,Gtt,Wtt,Utt,Vtt,Ytt,Htt,Xtt,Ktt,Ztt,Qtt,Jtt,V4e,ert,trt,rrt,irt,Y4e,nrt,art,srt,ort,lrt,TCe,crt,hrt,urt,drt,kCe,prt,frt,grt,CCe,mrt,yrt,vrt,brt,xrt,Trt,krt,Crt,wrt,Ert,Srt,_rt,Art,Rrt,Lrt,$rt,$i,Irt,Drt,ba,Zx,Mrt,Nrt,Ort,yq,wCe,xq,Brt,Prt,ECe,Frt,wq,zrt,qrt,jrt,Grt,Wrt,Urt,Vrt,Yrt,Hrt,Xrt,Krt,Zrt,Qrt,H4e,XN,Jrt,eit,tit,rit,iit,nit,X4e,K4e,a5,ait,Z4e,sit,SCe,oit,lit,cit,_Ce,hit,ACe,uit,dit,RCe,pit,fit,git,mit,yit,vit,bit,Yc,xit,Tit,kit,Cit,wit,Eit,Sit,xg,_it,Ait,LCe,Rit,Lit,Yq,Q4e,$Ce,$it,Iit,Dit,qS,pg,ya,px,Mit,wr,Nit,Oit,Pl,ICe,rl,Bit,Pit,Fit,zit,v1,zl,qit,Jt,Jo,jit,Git,Wit,Uit,Vit,Yit,Hit,pr,Xit,Ys,Kit,Gn,Zit,Ss,Qit,J4e,Jit,ent,tnt,rnt,Di,int,nnt,eke,ant,Hh,Xh,snt,ont,lnt,cnt,ql,hnt,bo,jS,unt,DCe,dnt,pnt,fnt,gnt,mnt,Mj,Hc,Cs,M1,Hs,va,To,ko,pn,Xs,Ks,zi,N1,VS,MCe,ynt,L5,vnt,NCe,aE,bnt,fg,Mb,s5,xnt,Tnt,knt,Nb,$5,tke,OCe,_B,fn,Ob,ks,Cnt,rke,ike,nke,ake,ske,oke,lke,cke,Dd,a1,wnt,ig,Ent,Snt,_nt,e6,Ant,hke,Rnt,uke,Ji,Lnt,BCe,$nt,PG,Int,PCe,FCe,zCe,qCe,jCe,s6,GCe,Dnt,Mnt,Nnt,KN,WCe,Ont,Bnt,Pnt,Hd,Fnt,UCe,VCe,AB,RB,LB,I5,aSt,XG,znt,qnt,o5,jnt,$B,Gnt,Wnt,Unt,Vnt,Ynt,Hnt,l6,dke,pke,YCe,HCe,Xnt,Knt,Znt,fE,Kh,gE,ws,sW,Qnt,KCe,Jnt,ZCe,c6,eat,tat,rat,iat,nat,aat,h6,sat,oat,lat,cat,hat,QCe,uat,dat,ru,pat,Gc,JCe,fat,gat,yb,mat,yat,vat,bat,xat,Tat,fke,z1,CW,kat,Cat,wat,Eat,ewe,Sat,ZN,gke,_at,Aat,Rat,wg,Lat,$at,Iat,Dat,Mat,Nat,Oat,Bat,Pat,q1,Fat,bx,zat,xx,qat,jat,Gat,Wat,Uat,Vat,Yat,Hat,Xat,Kat,Zat,mke,Qat,Jat,u6,est,tst,rst,ist,d6,nst,ast,D5,sst,ost,lst,twe,cst,rwe,hst,ust,iwe,dst,yke,pst,KW,fst,gst,mst,yst,vst,bst,xst,Tst,kst,Cst,wst,Est,Sst,vke,QN,_st,nwe,Ast,Es,Rst,awe,Lst,$st,Ist,bke,Dst,Mst,Nst,w1,Ost,xke,swe,Bst,Pst,Fst,p6,zst,owe,Tke,qst,kke,jst,Gst,yE,Wst,Ust,lwe,Vst,lU,Yst,Hst,Xst,Kst,Zst,Qst,Jst,eot,tot,rot,iot,not,aot,sot,oot,lot,cot,hot,uot,dot,pot,fot,got,mot,Fi,yot,vot,cwe,ex,bot,JN,xot,Cke,wke,Tot,uU,kot,Cot,wot,Eot,hwe,Sot,_ot,Aot,Rot,Lot,uwe,f6,vU,Eke,$ot,Iot,Dot,Mot,Not,IB,Oot,DB,Bot,h1,Pot,MB,Ske,Fot,_ke,Ake,Rke,Lke,zot,qot,jot,Got,Wot,Pf,NB,Uot,$ke,Ike,l5,Vot,Dke,Yot,dwe,Hot,Xot,Kot,pwe,Zot,fwe,Qot,Jot,m6,elt,tlt,RU,rlt,ilt,nlt,alt,slt,olt,llt,clt,hlt,Mke,Nke,ult,dlt,gwe,plt,v6,mwe,flt,glt,mlt,ylt,vlt,blt,xlt,qU,Tlt,klt,Clt,b6,wlt,Elt,Slt,_lt,Alt,Rlt,x6,Llt,Vh,$lt,Ilt,Nd,Dlt,ywe,vwe,tT,Mlt,Nlt,Olt,Blt,bwe,JU,eV,xwe,tV,vE,OB,Plt,Flt,zlt,Oke,qlt,Twe,jlt,Glt,Wlt,Ult,Vlt,Ylt,Hlt,Xlt,Klt,Zlt,Qlt,Jlt,ect,tct,rct,ict,nct,eO,act,sct,oct,lct,cct,hct,uct,Bke,kwe,Pke,dct,Cwe,nY,TE,A6,pct,aY,kE,Fke,Ewe,sY,Swe,_we,oY,Awe,fct,Rwe,gct,M6,vY,Mc,Ii,M5,Lwe,Bc,Qh,zke,CE,$we,mo,vb,Ts,xY,qr,Iwe,Dwe,Ff,Mwe,Nwe,Owe,Jh,EE,Bwe,PB,mct,Pwe,yct,F6,TY,z6,Fwe,kY,zwe,qwe,jwe,_E,Gwe,Wwe,Uwe,Ko,Vwe,Ywe,Hwe,W6,Xwe,c5,og,Kwe,Zwe,Qwe,Jwe,CY,wY,qke,vct,bct,xct,jke,tO,FB,e5e,t5e,r5e,i5e,Tct,kct,n5e,a5e,zB,s5e,Gke,qB,ng,o5e,Cct,MY,l5e,ci,wct,Ect,Sct,c5e,jB,GB,WB,UB,VB,YB,HB,XB,KB,ZB,QB,JB,eP,tP,rP,sSt,Wke,Uke,rO,Vke,Yke,Hke,$m,iO,Xke,Kke,h5,nO,u5,bb,aO,Ic,d5,N5,Zke,p5,sO,qm,f5,Lf,g5,zf,m5,Qke,Im,O5,iP,Jke,e3e,t3e,r3e,i3e,n3e,a3e,xb,$f,s3e,oO,o3e,l3e,lO,c3e,h3e,Lc,Dm,If,Tb,u3e,cO,y5,Gh,Td,hO,Fh,d3e,v5,uO,qf,kb,Bb,Cb,dO,wb,b5,Df,jm,x5,pO,Gm,Wm,p3e,f3e,g3e,m3e,y3e,fO,Eb,gO,v3e,mO,jf,B5,yO,T5,Mf,Um,Vm,b3e,Ym,zh,x3e,T3e,k3e,Hm,vO,C3e,w3e,E3e,S3e,bO,Mm,xO,Nm,Pb,Xm,TO,Om,Sb,ma,$5e,kn,_3e,_ct,A3e,Act,R3e,Rct,L3e,Lct,$3e,$ct,I3e,Ict,D3e,Dct,M3e,Mct,N3e,Nct,O3e,Oct,B3e,Bct,P3e,Pct,F3e,Fct,z3e,zct,q3e,qct,jct,Gct,Wct,Uct,Vct,Yct,Hct,Xct,Kct,Zct,Qct,Jct,eht,tht,rht,bi,I5e,D5e,M5e,N5e,O5e,B5e,P5e,F5e,z5e,q5e,j5e,G5e,W5e,U5e,V5e,iht,nht,aht,sht,Vn,il,Ti,oSt,Rr=Tt(()=>{vt();lZe=Object.create,Ex=Object.defineProperty,cZe=Object.getOwnPropertyDescriptor,nP=Object.getOwnPropertyNames,hZe=Object.getPrototypeOf,uZe=Object.prototype.hasOwnProperty,S=o((e,t)=>Ex(e,"name",{value:t,configurable:!0}),"__name"),dZe=o((e,t)=>o(function(){return e&&(t=(0,e[nP(e)[0]])(e=0)),t},"__init"),"__esm"),$r=o((e,t)=>o(function(){return t||(0,e[nP(e)[0]])((t={exports:{}}).exports,t),t.exports},"__require"),"__commonJS"),Od=o((e,t)=>{for(var r in t)Ex(e,r,{get:t[r],enumerable:!0})},"__export"),P5=o((e,t,r,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of nP(t))!uZe.call(e,n)&&n!==r&&Ex(e,n,{get:o(()=>t[n],"get"),enumerable:!(i=cZe(t,n))||i.enumerable});return e},"__copyProps"),LE=o((e,t,r)=>(P5(e,t,"default"),r&&P5(r,t,"default")),"__reExport"),aP=o((e,t,r)=>(r=e!=null?lZe(hZe(e)):{},P5(t||!e||!e.__esModule?Ex(r,"default",{value:e,enumerable:!0}):r,e)),"__toESM"),sP=o(e=>P5(Ex({},"__esModule",{value:!0}),e),"__toCommonJS"),$E={};Od($E,{AnnotatedTextEdit:o(()=>qh,"AnnotatedTextEdit"),ChangeAnnotation:o(()=>Of,"ChangeAnnotation"),ChangeAnnotationIdentifier:o(()=>ga,"ChangeAnnotationIdentifier"),CodeAction:o(()=>tB,"CodeAction"),CodeActionContext:o(()=>eB,"CodeActionContext"),CodeActionKind:o(()=>JO,"CodeActionKind"),CodeActionTriggerKind:o(()=>Db,"CodeActionTriggerKind"),CodeDescription:o(()=>$O,"CodeDescription"),CodeLens:o(()=>rB,"CodeLens"),Color:o(()=>C5,"Color"),ColorInformation:o(()=>EO,"ColorInformation"),ColorPresentation:o(()=>SO,"ColorPresentation"),Command:o(()=>Nf,"Command"),CompletionItem:o(()=>qO,"CompletionItem"),CompletionItemKind:o(()=>NO,"CompletionItemKind"),CompletionItemLabelDetails:o(()=>zO,"CompletionItemLabelDetails"),CompletionItemTag:o(()=>BO,"CompletionItemTag"),CompletionList:o(()=>jO,"CompletionList"),CreateFile:o(()=>Bm,"CreateFile"),DeleteFile:o(()=>Fm,"DeleteFile"),Diagnostic:o(()=>Rb,"Diagnostic"),DiagnosticRelatedInformation:o(()=>w5,"DiagnosticRelatedInformation"),DiagnosticSeverity:o(()=>RO,"DiagnosticSeverity"),DiagnosticTag:o(()=>LO,"DiagnosticTag"),DocumentHighlight:o(()=>YO,"DocumentHighlight"),DocumentHighlightKind:o(()=>VO,"DocumentHighlightKind"),DocumentLink:o(()=>nB,"DocumentLink"),DocumentSymbol:o(()=>QO,"DocumentSymbol"),DocumentUri:o(()=>kO,"DocumentUri"),EOL:o(()=>G3e,"EOL"),FoldingRange:o(()=>AO,"FoldingRange"),FoldingRangeKind:o(()=>_O,"FoldingRangeKind"),FormattingOptions:o(()=>iB,"FormattingOptions"),Hover:o(()=>GO,"Hover"),InlayHint:o(()=>pB,"InlayHint"),InlayHintKind:o(()=>_5,"InlayHintKind"),InlayHintLabelPart:o(()=>A5,"InlayHintLabelPart"),InlineCompletionContext:o(()=>bB,"InlineCompletionContext"),InlineCompletionItem:o(()=>gB,"InlineCompletionItem"),InlineCompletionList:o(()=>mB,"InlineCompletionList"),InlineCompletionTriggerKind:o(()=>yB,"InlineCompletionTriggerKind"),InlineValueContext:o(()=>dB,"InlineValueContext"),InlineValueEvaluatableExpression:o(()=>uB,"InlineValueEvaluatableExpression"),InlineValueText:o(()=>cB,"InlineValueText"),InlineValueVariableLookup:o(()=>hB,"InlineValueVariableLookup"),InsertReplaceEdit:o(()=>PO,"InsertReplaceEdit"),InsertTextFormat:o(()=>OO,"InsertTextFormat"),InsertTextMode:o(()=>FO,"InsertTextMode"),Location:o(()=>Ab,"Location"),LocationLink:o(()=>wO,"LocationLink"),MarkedString:o(()=>Ib,"MarkedString"),MarkupContent:o(()=>zm,"MarkupContent"),MarkupKind:o(()=>S5,"MarkupKind"),OptionalVersionedTextDocumentIdentifier:o(()=>$b,"OptionalVersionedTextDocumentIdentifier"),ParameterInformation:o(()=>WO,"ParameterInformation"),Position:o(()=>gi,"Position"),Range:o(()=>Kr,"Range"),RenameFile:o(()=>Pm,"RenameFile"),SelectedCompletionInfo:o(()=>vB,"SelectedCompletionInfo"),SelectionRange:o(()=>aB,"SelectionRange"),SemanticTokenModifiers:o(()=>oB,"SemanticTokenModifiers"),SemanticTokenTypes:o(()=>sB,"SemanticTokenTypes"),SemanticTokens:o(()=>lB,"SemanticTokens"),SignatureInformation:o(()=>UO,"SignatureInformation"),StringValue:o(()=>fB,"StringValue"),SymbolInformation:o(()=>KO,"SymbolInformation"),SymbolKind:o(()=>HO,"SymbolKind"),SymbolTag:o(()=>XO,"SymbolTag"),TextDocument:o(()=>TB,"TextDocument"),TextDocumentEdit:o(()=>Lb,"TextDocumentEdit"),TextDocumentIdentifier:o(()=>IO,"TextDocumentIdentifier"),TextDocumentItem:o(()=>MO,"TextDocumentItem"),TextEdit:o(()=>$c,"TextEdit"),URI:o(()=>k5,"URI"),VersionedTextDocumentIdentifier:o(()=>DO,"VersionedTextDocumentIdentifier"),WorkspaceChange:o(()=>j3e,"WorkspaceChange"),WorkspaceEdit:o(()=>E5,"WorkspaceEdit"),WorkspaceFolder:o(()=>xB,"WorkspaceFolder"),WorkspaceSymbol:o(()=>ZO,"WorkspaceSymbol"),integer:o(()=>CO,"integer"),uinteger:o(()=>_b,"uinteger")});Sx=dZe({"../../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"}o(t,"is"),S(t,"is"),e.is=t})(kO||(kO={})),(function(e){function t(r){return typeof r=="string"}o(t,"is"),S(t,"is"),e.is=t})(k5||(k5={})),(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}o(t,"is"),S(t,"is"),e.is=t})(CO||(CO={})),(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}o(t,"is"),S(t,"is"),e.is=t})(_b||(_b={})),(function(e){function t(i,n){return i===Number.MAX_VALUE&&(i=_b.MAX_VALUE),n===Number.MAX_VALUE&&(n=_b.MAX_VALUE),{line:i,character:n}}o(t,"create"),S(t,"create"),e.create=t;function r(i){let n=i;return Qe.objectLiteral(n)&&Qe.uinteger(n.line)&&Qe.uinteger(n.character)}o(r,"is"),S(r,"is"),e.is=r})(gi||(gi={})),(function(e){function t(i,n,a,s){if(Qe.uinteger(i)&&Qe.uinteger(n)&&Qe.uinteger(a)&&Qe.uinteger(s))return{start:gi.create(i,n),end:gi.create(a,s)};if(gi.is(i)&&gi.is(n))return{start:i,end:n};throw new Error(`Range#create called with invalid arguments[${i}, ${n}, ${a}, ${s}]`)}o(t,"create"),S(t,"create"),e.create=t;function r(i){let n=i;return Qe.objectLiteral(n)&&gi.is(n.start)&&gi.is(n.end)}o(r,"is"),S(r,"is"),e.is=r})(Kr||(Kr={})),(function(e){function t(i,n){return{uri:i,range:n}}o(t,"create"),S(t,"create"),e.create=t;function r(i){let n=i;return Qe.objectLiteral(n)&&Kr.is(n.range)&&(Qe.string(n.uri)||Qe.undefined(n.uri))}o(r,"is"),S(r,"is"),e.is=r})(Ab||(Ab={})),(function(e){function t(i,n,a,s){return{targetUri:i,targetRange:n,targetSelectionRange:a,originSelectionRange:s}}o(t,"create"),S(t,"create"),e.create=t;function r(i){let n=i;return Qe.objectLiteral(n)&&Kr.is(n.targetRange)&&Qe.string(n.targetUri)&&Kr.is(n.targetSelectionRange)&&(Kr.is(n.originSelectionRange)||Qe.undefined(n.originSelectionRange))}o(r,"is"),S(r,"is"),e.is=r})(wO||(wO={})),(function(e){function t(i,n,a,s){return{red:i,green:n,blue:a,alpha:s}}o(t,"create"),S(t,"create"),e.create=t;function r(i){let n=i;return Qe.objectLiteral(n)&&Qe.numberRange(n.red,0,1)&&Qe.numberRange(n.green,0,1)&&Qe.numberRange(n.blue,0,1)&&Qe.numberRange(n.alpha,0,1)}o(r,"is"),S(r,"is"),e.is=r})(C5||(C5={})),(function(e){function t(i,n){return{range:i,color:n}}o(t,"create"),S(t,"create"),e.create=t;function r(i){let n=i;return Qe.objectLiteral(n)&&Kr.is(n.range)&&C5.is(n.color)}o(r,"is"),S(r,"is"),e.is=r})(EO||(EO={})),(function(e){function t(i,n,a){return{label:i,textEdit:n,additionalTextEdits:a}}o(t,"create"),S(t,"create"),e.create=t;function r(i){let n=i;return Qe.objectLiteral(n)&&Qe.string(n.label)&&(Qe.undefined(n.textEdit)||$c.is(n))&&(Qe.undefined(n.additionalTextEdits)||Qe.typedArray(n.additionalTextEdits,$c.is))}o(r,"is"),S(r,"is"),e.is=r})(SO||(SO={})),(function(e){e.Comment="comment",e.Imports="imports",e.Region="region"})(_O||(_O={})),(function(e){function t(i,n,a,s,l,h){let u={startLine:i,endLine:n};return Qe.defined(a)&&(u.startCharacter=a),Qe.defined(s)&&(u.endCharacter=s),Qe.defined(l)&&(u.kind=l),Qe.defined(h)&&(u.collapsedText=h),u}o(t,"create"),S(t,"create"),e.create=t;function r(i){let n=i;return Qe.objectLiteral(n)&&Qe.uinteger(n.startLine)&&Qe.uinteger(n.startLine)&&(Qe.undefined(n.startCharacter)||Qe.uinteger(n.startCharacter))&&(Qe.undefined(n.endCharacter)||Qe.uinteger(n.endCharacter))&&(Qe.undefined(n.kind)||Qe.string(n.kind))}o(r,"is"),S(r,"is"),e.is=r})(AO||(AO={})),(function(e){function t(i,n){return{location:i,message:n}}o(t,"create"),S(t,"create"),e.create=t;function r(i){let n=i;return Qe.defined(n)&&Ab.is(n.location)&&Qe.string(n.message)}o(r,"is"),S(r,"is"),e.is=r})(w5||(w5={})),(function(e){e.Error=1,e.Warning=2,e.Information=3,e.Hint=4})(RO||(RO={})),(function(e){e.Unnecessary=1,e.Deprecated=2})(LO||(LO={})),(function(e){function t(r){let i=r;return Qe.objectLiteral(i)&&Qe.string(i.href)}o(t,"is"),S(t,"is"),e.is=t})($O||($O={})),(function(e){function t(i,n,a,s,l,h){let u={range:i,message:n};return Qe.defined(a)&&(u.severity=a),Qe.defined(s)&&(u.code=s),Qe.defined(l)&&(u.source=l),Qe.defined(h)&&(u.relatedInformation=h),u}o(t,"create"),S(t,"create"),e.create=t;function r(i){var n;let a=i;return Qe.defined(a)&&Kr.is(a.range)&&Qe.string(a.message)&&(Qe.number(a.severity)||Qe.undefined(a.severity))&&(Qe.integer(a.code)||Qe.string(a.code)||Qe.undefined(a.code))&&(Qe.undefined(a.codeDescription)||Qe.string((n=a.codeDescription)===null||n===void 0?void 0:n.href))&&(Qe.string(a.source)||Qe.undefined(a.source))&&(Qe.undefined(a.relatedInformation)||Qe.typedArray(a.relatedInformation,w5.is))}o(r,"is"),S(r,"is"),e.is=r})(Rb||(Rb={})),(function(e){function t(i,n,...a){let s={title:i,command:n};return Qe.defined(a)&&a.length>0&&(s.arguments=a),s}o(t,"create"),S(t,"create"),e.create=t;function r(i){let n=i;return Qe.defined(n)&&Qe.string(n.title)&&Qe.string(n.command)}o(r,"is"),S(r,"is"),e.is=r})(Nf||(Nf={})),(function(e){function t(a,s){return{range:a,newText:s}}o(t,"replace"),S(t,"replace"),e.replace=t;function r(a,s){return{range:{start:a,end:a},newText:s}}o(r,"insert"),S(r,"insert"),e.insert=r;function i(a){return{range:a,newText:""}}o(i,"del"),S(i,"del"),e.del=i;function n(a){let s=a;return Qe.objectLiteral(s)&&Qe.string(s.newText)&&Kr.is(s.range)}o(n,"is"),S(n,"is"),e.is=n})($c||($c={})),(function(e){function t(i,n,a){let s={label:i};return n!==void 0&&(s.needsConfirmation=n),a!==void 0&&(s.description=a),s}o(t,"create"),S(t,"create"),e.create=t;function r(i){let n=i;return Qe.objectLiteral(n)&&Qe.string(n.label)&&(Qe.boolean(n.needsConfirmation)||n.needsConfirmation===void 0)&&(Qe.string(n.description)||n.description===void 0)}o(r,"is"),S(r,"is"),e.is=r})(Of||(Of={})),(function(e){function t(r){let i=r;return Qe.string(i)}o(t,"is"),S(t,"is"),e.is=t})(ga||(ga={})),(function(e){function t(a,s,l){return{range:a,newText:s,annotationId:l}}o(t,"replace"),S(t,"replace"),e.replace=t;function r(a,s,l){return{range:{start:a,end:a},newText:s,annotationId:l}}o(r,"insert"),S(r,"insert"),e.insert=r;function i(a,s){return{range:a,newText:"",annotationId:s}}o(i,"del"),S(i,"del"),e.del=i;function n(a){let s=a;return $c.is(s)&&(Of.is(s.annotationId)||ga.is(s.annotationId))}o(n,"is"),S(n,"is"),e.is=n})(qh||(qh={})),(function(e){function t(i,n){return{textDocument:i,edits:n}}o(t,"create"),S(t,"create"),e.create=t;function r(i){let n=i;return Qe.defined(n)&&$b.is(n.textDocument)&&Array.isArray(n.edits)}o(r,"is"),S(r,"is"),e.is=r})(Lb||(Lb={})),(function(e){function t(i,n,a){let s={kind:"create",uri:i};return n!==void 0&&(n.overwrite!==void 0||n.ignoreIfExists!==void 0)&&(s.options=n),a!==void 0&&(s.annotationId=a),s}o(t,"create"),S(t,"create"),e.create=t;function r(i){let n=i;return n&&n.kind==="create"&&Qe.string(n.uri)&&(n.options===void 0||(n.options.overwrite===void 0||Qe.boolean(n.options.overwrite))&&(n.options.ignoreIfExists===void 0||Qe.boolean(n.options.ignoreIfExists)))&&(n.annotationId===void 0||ga.is(n.annotationId))}o(r,"is"),S(r,"is"),e.is=r})(Bm||(Bm={})),(function(e){function t(i,n,a,s){let l={kind:"rename",oldUri:i,newUri:n};return a!==void 0&&(a.overwrite!==void 0||a.ignoreIfExists!==void 0)&&(l.options=a),s!==void 0&&(l.annotationId=s),l}o(t,"create"),S(t,"create"),e.create=t;function r(i){let n=i;return n&&n.kind==="rename"&&Qe.string(n.oldUri)&&Qe.string(n.newUri)&&(n.options===void 0||(n.options.overwrite===void 0||Qe.boolean(n.options.overwrite))&&(n.options.ignoreIfExists===void 0||Qe.boolean(n.options.ignoreIfExists)))&&(n.annotationId===void 0||ga.is(n.annotationId))}o(r,"is"),S(r,"is"),e.is=r})(Pm||(Pm={})),(function(e){function t(i,n,a){let s={kind:"delete",uri:i};return n!==void 0&&(n.recursive!==void 0||n.ignoreIfNotExists!==void 0)&&(s.options=n),a!==void 0&&(s.annotationId=a),s}o(t,"create"),S(t,"create"),e.create=t;function r(i){let n=i;return n&&n.kind==="delete"&&Qe.string(n.uri)&&(n.options===void 0||(n.options.recursive===void 0||Qe.boolean(n.options.recursive))&&(n.options.ignoreIfNotExists===void 0||Qe.boolean(n.options.ignoreIfNotExists)))&&(n.annotationId===void 0||ga.is(n.annotationId))}o(r,"is"),S(r,"is"),e.is=r})(Fm||(Fm={})),(function(e){function t(r){let i=r;return i&&(i.changes!==void 0||i.documentChanges!==void 0)&&(i.documentChanges===void 0||i.documentChanges.every(n=>Qe.string(n.kind)?Bm.is(n)||Pm.is(n)||Fm.is(n):Lb.is(n)))}o(t,"is"),S(t,"is"),e.is=t})(E5||(E5={})),gb=class{static{o(this,"TextEditChangeImpl")}static{S(this,"TextEditChangeImpl")}constructor(e,t){this.edits=e,this.changeAnnotations=t}insert(e,t,r){let i,n;if(r===void 0?i=$c.insert(e,t):ga.is(r)?(n=r,i=qh.insert(e,t,r)):(this.assertChangeAnnotations(this.changeAnnotations),n=this.changeAnnotations.manage(r),i=qh.insert(e,t,n)),this.edits.push(i),n!==void 0)return n}replace(e,t,r){let i,n;if(r===void 0?i=$c.replace(e,t):ga.is(r)?(n=r,i=qh.replace(e,t,r)):(this.assertChangeAnnotations(this.changeAnnotations),n=this.changeAnnotations.manage(r),i=qh.replace(e,t,n)),this.edits.push(i),n!==void 0)return n}delete(e,t){let r,i;if(t===void 0?r=$c.del(e):ga.is(t)?(i=t,r=qh.del(e,t)):(this.assertChangeAnnotations(this.changeAnnotations),i=this.changeAnnotations.manage(t),r=qh.del(e,i)),this.edits.push(r),i!==void 0)return i}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.")}},VN=class{static{o(this,"ChangeAnnotations")}static{S(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(ga.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()}},j3e=class{static{o(this,"WorkspaceChange")}static{S(this,"WorkspaceChange")}constructor(e){this._textEditChanges=Object.create(null),e!==void 0?(this._workspaceEdit=e,e.documentChanges?(this._changeAnnotations=new VN(e.changeAnnotations),e.changeAnnotations=this._changeAnnotations.all(),e.documentChanges.forEach(t=>{if(Lb.is(t)){let r=new gb(t.edits,this._changeAnnotations);this._textEditChanges[t.textDocument.uri]=r}})):e.changes&&Object.keys(e.changes).forEach(t=>{let r=new gb(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($b.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 i=[],n={textDocument:t,edits:i};this._workspaceEdit.documentChanges.push(n),r=new gb(i,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 gb(r),this._textEditChanges[e]=t}return t}}initDocumentChanges(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._changeAnnotations=new VN,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 i;Of.is(t)||ga.is(t)?i=t:r=t;let n,a;if(i===void 0?n=Bm.create(e,r):(a=ga.is(i)?i:this._changeAnnotations.manage(i),n=Bm.create(e,r,a)),this._workspaceEdit.documentChanges.push(n),a!==void 0)return a}renameFile(e,t,r,i){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let n;Of.is(r)||ga.is(r)?n=r:i=r;let a,s;if(n===void 0?a=Pm.create(e,t,i):(s=ga.is(n)?n:this._changeAnnotations.manage(n),a=Pm.create(e,t,i,s)),this._workspaceEdit.documentChanges.push(a),s!==void 0)return s}deleteFile(e,t,r){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let i;Of.is(t)||ga.is(t)?i=t:r=t;let n,a;if(i===void 0?n=Fm.create(e,r):(a=ga.is(i)?i:this._changeAnnotations.manage(i),n=Fm.create(e,r,a)),this._workspaceEdit.documentChanges.push(n),a!==void 0)return a}},(function(e){function t(i){return{uri:i}}o(t,"create"),S(t,"create"),e.create=t;function r(i){let n=i;return Qe.defined(n)&&Qe.string(n.uri)}o(r,"is"),S(r,"is"),e.is=r})(IO||(IO={})),(function(e){function t(i,n){return{uri:i,version:n}}o(t,"create"),S(t,"create"),e.create=t;function r(i){let n=i;return Qe.defined(n)&&Qe.string(n.uri)&&Qe.integer(n.version)}o(r,"is"),S(r,"is"),e.is=r})(DO||(DO={})),(function(e){function t(i,n){return{uri:i,version:n}}o(t,"create"),S(t,"create"),e.create=t;function r(i){let n=i;return Qe.defined(n)&&Qe.string(n.uri)&&(n.version===null||Qe.integer(n.version))}o(r,"is"),S(r,"is"),e.is=r})($b||($b={})),(function(e){function t(i,n,a,s){return{uri:i,languageId:n,version:a,text:s}}o(t,"create"),S(t,"create"),e.create=t;function r(i){let n=i;return Qe.defined(n)&&Qe.string(n.uri)&&Qe.string(n.languageId)&&Qe.integer(n.version)&&Qe.string(n.text)}o(r,"is"),S(r,"is"),e.is=r})(MO||(MO={})),(function(e){e.PlainText="plaintext",e.Markdown="markdown";function t(r){let i=r;return i===e.PlainText||i===e.Markdown}o(t,"is"),S(t,"is"),e.is=t})(S5||(S5={})),(function(e){function t(r){let i=r;return Qe.objectLiteral(r)&&S5.is(i.kind)&&Qe.string(i.value)}o(t,"is"),S(t,"is"),e.is=t})(zm||(zm={})),(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})(NO||(NO={})),(function(e){e.PlainText=1,e.Snippet=2})(OO||(OO={})),(function(e){e.Deprecated=1})(BO||(BO={})),(function(e){function t(i,n,a){return{newText:i,insert:n,replace:a}}o(t,"create"),S(t,"create"),e.create=t;function r(i){let n=i;return n&&Qe.string(n.newText)&&Kr.is(n.insert)&&Kr.is(n.replace)}o(r,"is"),S(r,"is"),e.is=r})(PO||(PO={})),(function(e){e.asIs=1,e.adjustIndentation=2})(FO||(FO={})),(function(e){function t(r){let i=r;return i&&(Qe.string(i.detail)||i.detail===void 0)&&(Qe.string(i.description)||i.description===void 0)}o(t,"is"),S(t,"is"),e.is=t})(zO||(zO={})),(function(e){function t(r){return{label:r}}o(t,"create"),S(t,"create"),e.create=t})(qO||(qO={})),(function(e){function t(r,i){return{items:r||[],isIncomplete:!!i}}o(t,"create"),S(t,"create"),e.create=t})(jO||(jO={})),(function(e){function t(i){return i.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}o(t,"fromPlainText"),S(t,"fromPlainText"),e.fromPlainText=t;function r(i){let n=i;return Qe.string(n)||Qe.objectLiteral(n)&&Qe.string(n.language)&&Qe.string(n.value)}o(r,"is"),S(r,"is"),e.is=r})(Ib||(Ib={})),(function(e){function t(r){let i=r;return!!i&&Qe.objectLiteral(i)&&(zm.is(i.contents)||Ib.is(i.contents)||Qe.typedArray(i.contents,Ib.is))&&(r.range===void 0||Kr.is(r.range))}o(t,"is"),S(t,"is"),e.is=t})(GO||(GO={})),(function(e){function t(r,i){return i?{label:r,documentation:i}:{label:r}}o(t,"create"),S(t,"create"),e.create=t})(WO||(WO={})),(function(e){function t(r,i,...n){let a={label:r};return Qe.defined(i)&&(a.documentation=i),Qe.defined(n)?a.parameters=n:a.parameters=[],a}o(t,"create"),S(t,"create"),e.create=t})(UO||(UO={})),(function(e){e.Text=1,e.Read=2,e.Write=3})(VO||(VO={})),(function(e){function t(r,i){let n={range:r};return Qe.number(i)&&(n.kind=i),n}o(t,"create"),S(t,"create"),e.create=t})(YO||(YO={})),(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})(HO||(HO={})),(function(e){e.Deprecated=1})(XO||(XO={})),(function(e){function t(r,i,n,a,s){let l={name:r,kind:i,location:{uri:a,range:n}};return s&&(l.containerName=s),l}o(t,"create"),S(t,"create"),e.create=t})(KO||(KO={})),(function(e){function t(r,i,n,a){return a!==void 0?{name:r,kind:i,location:{uri:n,range:a}}:{name:r,kind:i,location:{uri:n}}}o(t,"create"),S(t,"create"),e.create=t})(ZO||(ZO={})),(function(e){function t(i,n,a,s,l,h){let u={name:i,detail:n,kind:a,range:s,selectionRange:l};return h!==void 0&&(u.children=h),u}o(t,"create"),S(t,"create"),e.create=t;function r(i){let n=i;return n&&Qe.string(n.name)&&Qe.number(n.kind)&&Kr.is(n.range)&&Kr.is(n.selectionRange)&&(n.detail===void 0||Qe.string(n.detail))&&(n.deprecated===void 0||Qe.boolean(n.deprecated))&&(n.children===void 0||Array.isArray(n.children))&&(n.tags===void 0||Array.isArray(n.tags))}o(r,"is"),S(r,"is"),e.is=r})(QO||(QO={})),(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"})(JO||(JO={})),(function(e){e.Invoked=1,e.Automatic=2})(Db||(Db={})),(function(e){function t(i,n,a){let s={diagnostics:i};return n!=null&&(s.only=n),a!=null&&(s.triggerKind=a),s}o(t,"create"),S(t,"create"),e.create=t;function r(i){let n=i;return Qe.defined(n)&&Qe.typedArray(n.diagnostics,Rb.is)&&(n.only===void 0||Qe.typedArray(n.only,Qe.string))&&(n.triggerKind===void 0||n.triggerKind===Db.Invoked||n.triggerKind===Db.Automatic)}o(r,"is"),S(r,"is"),e.is=r})(eB||(eB={})),(function(e){function t(i,n,a){let s={title:i},l=!0;return typeof n=="string"?(l=!1,s.kind=n):Nf.is(n)?s.command=n:s.edit=n,l&&a!==void 0&&(s.kind=a),s}o(t,"create"),S(t,"create"),e.create=t;function r(i){let n=i;return n&&Qe.string(n.title)&&(n.diagnostics===void 0||Qe.typedArray(n.diagnostics,Rb.is))&&(n.kind===void 0||Qe.string(n.kind))&&(n.edit!==void 0||n.command!==void 0)&&(n.command===void 0||Nf.is(n.command))&&(n.isPreferred===void 0||Qe.boolean(n.isPreferred))&&(n.edit===void 0||E5.is(n.edit))}o(r,"is"),S(r,"is"),e.is=r})(tB||(tB={})),(function(e){function t(i,n){let a={range:i};return Qe.defined(n)&&(a.data=n),a}o(t,"create"),S(t,"create"),e.create=t;function r(i){let n=i;return Qe.defined(n)&&Kr.is(n.range)&&(Qe.undefined(n.command)||Nf.is(n.command))}o(r,"is"),S(r,"is"),e.is=r})(rB||(rB={})),(function(e){function t(i,n){return{tabSize:i,insertSpaces:n}}o(t,"create"),S(t,"create"),e.create=t;function r(i){let n=i;return Qe.defined(n)&&Qe.uinteger(n.tabSize)&&Qe.boolean(n.insertSpaces)}o(r,"is"),S(r,"is"),e.is=r})(iB||(iB={})),(function(e){function t(i,n,a){return{range:i,target:n,data:a}}o(t,"create"),S(t,"create"),e.create=t;function r(i){let n=i;return Qe.defined(n)&&Kr.is(n.range)&&(Qe.undefined(n.target)||Qe.string(n.target))}o(r,"is"),S(r,"is"),e.is=r})(nB||(nB={})),(function(e){function t(i,n){return{range:i,parent:n}}o(t,"create"),S(t,"create"),e.create=t;function r(i){let n=i;return Qe.objectLiteral(n)&&Kr.is(n.range)&&(n.parent===void 0||e.is(n.parent))}o(r,"is"),S(r,"is"),e.is=r})(aB||(aB={})),(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"})(sB||(sB={})),(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"})(oB||(oB={})),(function(e){function t(r){let i=r;return Qe.objectLiteral(i)&&(i.resultId===void 0||typeof i.resultId=="string")&&Array.isArray(i.data)&&(i.data.length===0||typeof i.data[0]=="number")}o(t,"is"),S(t,"is"),e.is=t})(lB||(lB={})),(function(e){function t(i,n){return{range:i,text:n}}o(t,"create"),S(t,"create"),e.create=t;function r(i){let n=i;return n!=null&&Kr.is(n.range)&&Qe.string(n.text)}o(r,"is"),S(r,"is"),e.is=r})(cB||(cB={})),(function(e){function t(i,n,a){return{range:i,variableName:n,caseSensitiveLookup:a}}o(t,"create"),S(t,"create"),e.create=t;function r(i){let n=i;return n!=null&&Kr.is(n.range)&&Qe.boolean(n.caseSensitiveLookup)&&(Qe.string(n.variableName)||n.variableName===void 0)}o(r,"is"),S(r,"is"),e.is=r})(hB||(hB={})),(function(e){function t(i,n){return{range:i,expression:n}}o(t,"create"),S(t,"create"),e.create=t;function r(i){let n=i;return n!=null&&Kr.is(n.range)&&(Qe.string(n.expression)||n.expression===void 0)}o(r,"is"),S(r,"is"),e.is=r})(uB||(uB={})),(function(e){function t(i,n){return{frameId:i,stoppedLocation:n}}o(t,"create"),S(t,"create"),e.create=t;function r(i){let n=i;return Qe.defined(n)&&Kr.is(i.stoppedLocation)}o(r,"is"),S(r,"is"),e.is=r})(dB||(dB={})),(function(e){e.Type=1,e.Parameter=2;function t(r){return r===1||r===2}o(t,"is"),S(t,"is"),e.is=t})(_5||(_5={})),(function(e){function t(i){return{value:i}}o(t,"create"),S(t,"create"),e.create=t;function r(i){let n=i;return Qe.objectLiteral(n)&&(n.tooltip===void 0||Qe.string(n.tooltip)||zm.is(n.tooltip))&&(n.location===void 0||Ab.is(n.location))&&(n.command===void 0||Nf.is(n.command))}o(r,"is"),S(r,"is"),e.is=r})(A5||(A5={})),(function(e){function t(i,n,a){let s={position:i,label:n};return a!==void 0&&(s.kind=a),s}o(t,"create"),S(t,"create"),e.create=t;function r(i){let n=i;return Qe.objectLiteral(n)&&gi.is(n.position)&&(Qe.string(n.label)||Qe.typedArray(n.label,A5.is))&&(n.kind===void 0||_5.is(n.kind))&&n.textEdits===void 0||Qe.typedArray(n.textEdits,$c.is)&&(n.tooltip===void 0||Qe.string(n.tooltip)||zm.is(n.tooltip))&&(n.paddingLeft===void 0||Qe.boolean(n.paddingLeft))&&(n.paddingRight===void 0||Qe.boolean(n.paddingRight))}o(r,"is"),S(r,"is"),e.is=r})(pB||(pB={})),(function(e){function t(r){return{kind:"snippet",value:r}}o(t,"createSnippet"),S(t,"createSnippet"),e.createSnippet=t})(fB||(fB={})),(function(e){function t(r,i,n,a){return{insertText:r,filterText:i,range:n,command:a}}o(t,"create"),S(t,"create"),e.create=t})(gB||(gB={})),(function(e){function t(r){return{items:r}}o(t,"create"),S(t,"create"),e.create=t})(mB||(mB={})),(function(e){e.Invoked=0,e.Automatic=1})(yB||(yB={})),(function(e){function t(r,i){return{range:r,text:i}}o(t,"create"),S(t,"create"),e.create=t})(vB||(vB={})),(function(e){function t(r,i){return{triggerKind:r,selectedCompletionInfo:i}}o(t,"create"),S(t,"create"),e.create=t})(bB||(bB={})),(function(e){function t(r){let i=r;return Qe.objectLiteral(i)&&k5.is(i.uri)&&Qe.string(i.name)}o(t,"is"),S(t,"is"),e.is=t})(xB||(xB={})),G3e=[` +`,`\r +`,"\r"],(function(e){function t(a,s,l,h){return new v4e(a,s,l,h)}o(t,"create"),S(t,"create"),e.create=t;function r(a){let s=a;return!!(Qe.defined(s)&&Qe.string(s.uri)&&(Qe.undefined(s.languageId)||Qe.string(s.languageId))&&Qe.uinteger(s.lineCount)&&Qe.func(s.getText)&&Qe.func(s.positionAt)&&Qe.func(s.offsetAt))}o(r,"is"),S(r,"is"),e.is=r;function i(a,s){let l=a.getText(),h=n(s,(d,p)=>{let f=d.range.start.line-p.range.start.line;return f===0?d.range.start.character-p.range.start.character:f}),u=l.length;for(let d=h.length-1;d>=0;d--){let p=h[d],f=a.offsetAt(p.range.start),g=a.offsetAt(p.range.end);if(g<=u)l=l.substring(0,f)+p.newText+l.substring(g,l.length);else throw new Error("Overlapping edit");u=f}return l}o(i,"applyEdits"),S(i,"applyEdits"),e.applyEdits=i;function n(a,s){if(a.length<=1)return a;let l=a.length/2|0,h=a.slice(0,l),u=a.slice(l);n(h,s),n(u,s);let d=0,p=0,f=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,i=t.length;if(i===0)return gi.create(0,e);for(;re?i=a:r=a+1}let n=r-1;return gi.create(n,e-t[n])}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],i=e.line+1"u"}o(i,"undefined2"),S(i,"undefined"),e.undefined=i;function n(g){return g===!0||g===!1}o(n,"boolean"),S(n,"boolean"),e.boolean=n;function a(g){return t.call(g)==="[object String]"}o(a,"string"),S(a,"string"),e.string=a;function s(g){return t.call(g)==="[object Number]"}o(s,"number"),S(s,"number"),e.number=s;function l(g,m,y){return t.call(g)==="[object Number]"&&m<=g&&g<=y}o(l,"numberRange"),S(l,"numberRange"),e.numberRange=l;function h(g){return t.call(g)==="[object Number]"&&-2147483648<=g&&g<=2147483647}o(h,"integer2"),S(h,"integer"),e.integer=h;function u(g){return t.call(g)==="[object Number]"&&0<=g&&g<=2147483647}o(u,"uinteger2"),S(u,"uinteger"),e.uinteger=u;function d(g){return t.call(g)==="[object Function]"}o(d,"func"),S(d,"func"),e.func=d;function p(g){return g!==null&&typeof g=="object"}o(p,"objectLiteral"),S(p,"objectLiteral"),e.objectLiteral=p;function f(g,m){return Array.isArray(g)&&g.every(m)}o(f,"typedArray"),S(f,"typedArray"),e.typedArray=f})(Qe||(Qe={}))}}),mg=$r({"../../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}o(r,"RAL"),S(r,"RAL"),(function(i){function n(a){if(a===void 0)throw new Error("No runtime abstraction layer provided");t=a}o(n,"install"),S(n,"install"),i.install=n})(r||(r={})),e.default=r}}),_x=$r({"../../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(h){return h===!0||h===!1}o(t,"boolean"),S(t,"boolean"),e.boolean=t;function r(h){return typeof h=="string"||h instanceof String}o(r,"string"),S(r,"string"),e.string=r;function i(h){return typeof h=="number"||h instanceof Number}o(i,"number"),S(i,"number"),e.number=i;function n(h){return h instanceof Error}o(n,"error"),S(n,"error"),e.error=n;function a(h){return typeof h=="function"}o(a,"func"),S(a,"func"),e.func=a;function s(h){return Array.isArray(h)}o(s,"array"),S(s,"array"),e.array=s;function l(h){return s(h)&&h.every(u=>r(u))}o(l,"stringArray"),S(l,"stringArray"),e.stringArray=l}}),_1=$r({"../../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=mg(),r;(function(a){let s={dispose(){}};a.None=function(){return s}})(r||(e.Event=r={}));var i=class{static{o(this,"CallbackList")}static{S(this,"CallbackList")}add(a,s=null,l){this._callbacks||(this._callbacks=[],this._contexts=[]),this._callbacks.push(a),this._contexts.push(s),Array.isArray(l)&&l.push({dispose:S(()=>this.remove(a,s),"dispose")})}remove(a,s=null){if(!this._callbacks)return;let l=!1;for(let h=0,u=this._callbacks.length;h{this._callbacks||(this._callbacks=new i),this._options&&this._options.onFirstListenerAdd&&this._callbacks.isEmpty()&&this._options.onFirstListenerAdd(this),this._callbacks.add(s,l);let u={dispose:S(()=>{this._callbacks&&(this._callbacks.remove(s,l),u.dispose=W3e._noop,this._options&&this._options.onLastListenerRemove&&this._callbacks.isEmpty()&&this._options.onLastListenerRemove(this))},"dispose")};return Array.isArray(h)&&h.push(u),u}),this._event}fire(s){this._callbacks&&this._callbacks.invoke.call(this._callbacks,s)}dispose(){this._callbacks&&(this._callbacks.dispose(),this._callbacks=void 0)}};e.Emitter=n,n._noop=function(){}}}),IE=$r({"../../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=mg(),r=_x(),i=_1(),n;(function(h){h.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:i.Event.None}),h.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:i.Event.None});function u(d){let p=d;return p&&(p===h.None||p===h.Cancelled||r.boolean(p.isCancellationRequested)&&!!p.onCancellationRequested)}o(u,"is"),S(u,"is"),h.is=u})(n||(e.CancellationToken=n={}));var a=Object.freeze(function(h,u){let d=(0,t.default)().timer.setTimeout(h.bind(u),0);return{dispose(){d.dispose()}}}),s=class{static{o(this,"MutableToken")}static{S(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 i.Emitter),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=void 0)}},l=class{static{o(this,"CancellationTokenSource3")}static{S(this,"CancellationTokenSource")}get token(){return this._token||(this._token=new s),this._token}cancel(){this._token?this._token.cancel():this._token=n.Cancelled}dispose(){this._token?this._token instanceof s&&this._token.dispose():this._token=n.None}};e.CancellationTokenSource=l}}),U3e=$r({"../../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=_x(),r;(function(B){B.ParseError=-32700,B.InvalidRequest=-32600,B.MethodNotFound=-32601,B.InvalidParams=-32602,B.InternalError=-32603,B.jsonrpcReservedErrorRangeStart=-32099,B.serverErrorStart=-32099,B.MessageWriteError=-32099,B.MessageReadError=-32098,B.PendingResponseRejected=-32097,B.ConnectionInactive=-32096,B.ServerNotInitialized=-32002,B.UnknownErrorCode=-32001,B.jsonrpcReservedErrorRangeEnd=-32e3,B.serverErrorEnd=-32e3})(r||(e.ErrorCodes=r={}));var i=class V3e extends Error{static{o(this,"_ResponseError")}static{S(this,"ResponseError")}constructor(A,I,O){super(I),this.code=t.number(A)?A:r.UnknownErrorCode,this.data=O,Object.setPrototypeOf(this,V3e.prototype)}toJson(){let A={code:this.code,message:this.message};return this.data!==void 0&&(A.data=this.data),A}};e.ResponseError=i;var n=class R5{static{o(this,"_ParameterStructures")}static{S(this,"ParameterStructures")}constructor(A){this.kind=A}static is(A){return A===R5.auto||A===R5.byName||A===R5.byPosition}toString(){return this.kind}};e.ParameterStructures=n,n.auto=new n("auto"),n.byPosition=new n("byPosition"),n.byName=new n("byName");var a=class{static{o(this,"AbstractMessageSignature")}static{S(this,"AbstractMessageSignature")}constructor(B,A){this.method=B,this.numberOfParams=A}get parameterStructures(){return n.auto}};e.AbstractMessageSignature=a;var s=class extends a{static{o(this,"RequestType0")}static{S(this,"RequestType0")}constructor(B){super(B,0)}};e.RequestType0=s;var l=class extends a{static{o(this,"RequestType")}static{S(this,"RequestType")}constructor(B,A=n.auto){super(B,1),this._parameterStructures=A}get parameterStructures(){return this._parameterStructures}};e.RequestType=l;var h=class extends a{static{o(this,"RequestType1")}static{S(this,"RequestType1")}constructor(B,A=n.auto){super(B,1),this._parameterStructures=A}get parameterStructures(){return this._parameterStructures}};e.RequestType1=h;var u=class extends a{static{o(this,"RequestType2")}static{S(this,"RequestType2")}constructor(B){super(B,2)}};e.RequestType2=u;var d=class extends a{static{o(this,"RequestType3")}static{S(this,"RequestType3")}constructor(B){super(B,3)}};e.RequestType3=d;var p=class extends a{static{o(this,"RequestType4")}static{S(this,"RequestType4")}constructor(B){super(B,4)}};e.RequestType4=p;var f=class extends a{static{o(this,"RequestType5")}static{S(this,"RequestType5")}constructor(B){super(B,5)}};e.RequestType5=f;var g=class extends a{static{o(this,"RequestType6")}static{S(this,"RequestType6")}constructor(B){super(B,6)}};e.RequestType6=g;var m=class extends a{static{o(this,"RequestType7")}static{S(this,"RequestType7")}constructor(B){super(B,7)}};e.RequestType7=m;var y=class extends a{static{o(this,"RequestType8")}static{S(this,"RequestType8")}constructor(B){super(B,8)}};e.RequestType8=y;var b=class extends a{static{o(this,"RequestType9")}static{S(this,"RequestType9")}constructor(B){super(B,9)}};e.RequestType9=b;var v=class extends a{static{o(this,"NotificationType")}static{S(this,"NotificationType")}constructor(B,A=n.auto){super(B,1),this._parameterStructures=A}get parameterStructures(){return this._parameterStructures}};e.NotificationType=v;var T=class extends a{static{o(this,"NotificationType0")}static{S(this,"NotificationType0")}constructor(B){super(B,0)}};e.NotificationType0=T;var x=class extends a{static{o(this,"NotificationType1")}static{S(this,"NotificationType1")}constructor(B,A=n.auto){super(B,1),this._parameterStructures=A}get parameterStructures(){return this._parameterStructures}};e.NotificationType1=x;var k=class extends a{static{o(this,"NotificationType2")}static{S(this,"NotificationType2")}constructor(B){super(B,2)}};e.NotificationType2=k;var C=class extends a{static{o(this,"NotificationType3")}static{S(this,"NotificationType3")}constructor(B){super(B,3)}};e.NotificationType3=C;var E=class extends a{static{o(this,"NotificationType4")}static{S(this,"NotificationType4")}constructor(B){super(B,4)}};e.NotificationType4=E;var w=class extends a{static{o(this,"NotificationType5")}static{S(this,"NotificationType5")}constructor(B){super(B,5)}};e.NotificationType5=w;var _=class extends a{static{o(this,"NotificationType6")}static{S(this,"NotificationType6")}constructor(B){super(B,6)}};e.NotificationType6=_;var L=class extends a{static{o(this,"NotificationType7")}static{S(this,"NotificationType7")}constructor(B){super(B,7)}};e.NotificationType7=L;var N=class extends a{static{o(this,"NotificationType8")}static{S(this,"NotificationType8")}constructor(B){super(B,8)}};e.NotificationType8=N;var D=class extends a{static{o(this,"NotificationType9")}static{S(this,"NotificationType9")}constructor(B){super(B,9)}};e.NotificationType9=D;var M;(function(B){function A(R){let $=R;return $&&t.string($.method)&&(t.string($.id)||t.number($.id))}o(A,"isRequest"),S(A,"isRequest"),B.isRequest=A;function I(R){let $=R;return $&&t.string($.method)&&R.id===void 0}o(I,"isNotification"),S(I,"isNotification"),B.isNotification=I;function O(R){let $=R;return $&&($.result!==void 0||!!$.error)&&(t.string($.id)||t.number($.id)||$.id===null)}o(O,"isResponse"),S(O,"isResponse"),B.isResponse=O})(M||(e.Message=M={}))}}),Y3e=$r({"../../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 i=class{static{o(this,"LinkedMap")}static{S(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,s=r.None){let l=this._map.get(a);if(l)return s!==r.None&&this.touch(l,s),l.value}set(a,s,l=r.None){let h=this._map.get(a);if(h)h.value=s,l!==r.None&&this.touch(h,l);else{switch(h={key:a,value:s,next:void 0,previous:void 0},l){case r.None:this.addItemLast(h);break;case r.First:this.addItemFirst(h);break;case r.Last:this.addItemLast(h);break;default:this.addItemLast(h);break}this._map.set(a,h),this._size++}return this}delete(a){return!!this.remove(a)}remove(a){let s=this._map.get(a);if(s)return this._map.delete(a),this.removeItem(s),this._size--,s.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,s){let l=this._state,h=this._head;for(;h;){if(s?a.bind(s)(h.value,h.key,this):a(h.value,h.key,this),this._state!==l)throw new Error("LinkedMap got modified during iteration.");h=h.next}}keys(){let a=this._state,s=this._head,l={[Symbol.iterator]:()=>l,next:S(()=>{if(this._state!==a)throw new Error("LinkedMap got modified during iteration.");if(s){let h={value:s.key,done:!1};return s=s.next,h}else return{value:void 0,done:!0}},"next")};return l}values(){let a=this._state,s=this._head,l={[Symbol.iterator]:()=>l,next:S(()=>{if(this._state!==a)throw new Error("LinkedMap got modified during iteration.");if(s){let h={value:s.value,done:!1};return s=s.next,h}else return{value:void 0,done:!0}},"next")};return l}entries(){let a=this._state,s=this._head,l={[Symbol.iterator]:()=>l,next:S(()=>{if(this._state!==a)throw new Error("LinkedMap got modified during iteration.");if(s){let h={value:[s.key,s.value],done:!1};return s=s.next,h}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 s=this._head,l=this.size;for(;s&&l>a;)this._map.delete(s.key),s=s.next,l--;this._head=s,this._size=l,s&&(s.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 s=a.next,l=a.previous;if(!s||!l)throw new Error("Invalid list");s.previous=l,l.next=s}a.next=void 0,a.previous=void 0,this._state++}touch(a,s){if(!this._head||!this._tail)throw new Error("Invalid list");if(!(s!==r.First&&s!==r.Last)){if(s===r.First){if(a===this._head)return;let l=a.next,h=a.previous;a===this._tail?(h.next=void 0,this._tail=h):(l.previous=h,h.next=l),a.previous=void 0,a.next=this._head,this._head.previous=a,this._head=a,this._state++}else if(s===r.Last){if(a===this._tail)return;let l=a.next,h=a.previous;a===this._head?(l.previous=void 0,this._head=l):(l.previous=h,h.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((s,l)=>{a.push([l,s])}),a}fromJSON(a){this.clear();for(let[s,l]of a)this.set(s,l)}};e.LinkedMap=i;var n=class extends i{static{o(this,"LRUCache")}static{S(this,"LRUCache")}constructor(a,s=1){super(),this._limit=a,this._ratio=Math.min(Math.max(0,s),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,s=r.AsNew){return super.get(a,s)}peek(a){return super.get(a,r.None)}set(a,s){return super.set(a,s,r.Last),this.checkTrim(),this}checkTrim(){this.size>this._limit&&this.trimOld(Math.round(this._limit*this._ratio))}};e.LRUCache=n}}),pZe=$r({"../../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 i(n){return{dispose:n}}o(i,"create"),S(i,"create"),r.create=i})(t||(e.Disposable=t={}))}}),fZe=$r({"../../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=IE(),r;(function(l){l.Continue=0,l.Cancelled=1})(r||(r={}));var i=class{static{o(this,"SharedArraySenderStrategy")}static{S(this,"SharedArraySenderStrategy")}constructor(){this.buffers=new Map}enableCancellation(l){if(l.id===null)return;let h=new SharedArrayBuffer(4),u=new Int32Array(h,0,1);u[0]=r.Continue,this.buffers.set(l.id,h),l.$cancellationData=h}async sendCancellation(l,h){let u=this.buffers.get(h);if(u===void 0)return;let d=new Int32Array(u,0,1);Atomics.store(d,0,r.Cancelled)}cleanup(l){this.buffers.delete(l)}dispose(){this.buffers.clear()}};e.SharedArraySenderStrategy=i;var n=class{static{o(this,"SharedArrayBufferCancellationToken")}static{S(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{o(this,"SharedArrayBufferCancellationTokenSource")}static{S(this,"SharedArrayBufferCancellationTokenSource")}constructor(l){this.token=new n(l)}cancel(){}dispose(){}},s=class{static{o(this,"SharedArrayReceiverStrategy")}static{S(this,"SharedArrayReceiverStrategy")}constructor(){this.kind="request"}createCancellationTokenSource(l){let h=l.$cancellationData;return h===void 0?new t.CancellationTokenSource:new a(h)}};e.SharedArrayReceiverStrategy=s}}),H3e=$r({"../../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=mg(),r=class{static{o(this,"Semaphore")}static{S(this,"Semaphore")}constructor(i=1){if(i<=0)throw new Error("Capacity must be greater than 0");this._capacity=i,this._active=0,this._waiting=[]}lock(i){return new Promise((n,a)=>{this._waiting.push({thunk:i,resolve:n,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 i=this._waiting.shift();if(this._active++,this._active>this._capacity)throw new Error("To many thunks active");try{let n=i.thunk();n instanceof Promise?n.then(a=>{this._active--,i.resolve(a),this.runNext()},a=>{this._active--,i.reject(a),this.runNext()}):(this._active--,i.resolve(n),this.runNext())}catch(n){this._active--,i.reject(n),this.runNext()}}};e.Semaphore=r}}),gZe=$r({"../../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=mg(),r=_x(),i=_1(),n=H3e(),a;(function(u){function d(p){let f=p;return f&&r.func(f.listen)&&r.func(f.dispose)&&r.func(f.onError)&&r.func(f.onClose)&&r.func(f.onPartialMessage)}o(d,"is"),S(d,"is"),u.is=d})(a||(e.MessageReader=a={}));var s=class{static{o(this,"AbstractMessageReader")}static{S(this,"AbstractMessageReader")}constructor(){this.errorEmitter=new i.Emitter,this.closeEmitter=new i.Emitter,this.partialMessageEmitter=new i.Emitter}dispose(){this.errorEmitter.dispose(),this.closeEmitter.dispose()}get onError(){return this.errorEmitter.event}fireError(u){this.errorEmitter.fire(this.asError(u))}get onClose(){return this.closeEmitter.event}fireClose(){this.closeEmitter.fire(void 0)}get onPartialMessage(){return this.partialMessageEmitter.event}firePartialMessage(u){this.partialMessageEmitter.fire(u)}asError(u){return u instanceof Error?u:new Error(`Reader received error. Reason: ${r.string(u.message)?u.message:"unknown"}`)}};e.AbstractMessageReader=s;var l;(function(u){function d(p){let f,g,m,y=new Map,b,v=new Map;if(p===void 0||typeof p=="string")f=p??"utf-8";else{if(f=p.charset??"utf-8",p.contentDecoder!==void 0&&(m=p.contentDecoder,y.set(m.name,m)),p.contentDecoders!==void 0)for(let T of p.contentDecoders)y.set(T.name,T);if(p.contentTypeDecoder!==void 0&&(b=p.contentTypeDecoder,v.set(b.name,b)),p.contentTypeDecoders!==void 0)for(let T of p.contentTypeDecoders)v.set(T.name,T)}return b===void 0&&(b=(0,t.default)().applicationJson.decoder,v.set(b.name,b)),{charset:f,contentDecoder:m,contentDecoders:y,contentTypeDecoder:b,contentTypeDecoders:v}}o(d,"fromOptions"),S(d,"fromOptions"),u.fromOptions=d})(l||(l={}));var h=class extends s{static{o(this,"ReadableStreamMessageReader")}static{S(this,"ReadableStreamMessageReader")}constructor(u,d){super(),this.readable=u,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 n.Semaphore(1)}set partialMessageTimeout(u){this._partialMessageTimeout=u}get partialMessageTimeout(){return this._partialMessageTimeout}listen(u){this.nextMessageLength=-1,this.messageToken=0,this.partialMessageTimer=void 0,this.callback=u;let d=this.readable.onData(p=>{this.onData(p)});return this.readable.onError(p=>this.fireError(p)),this.readable.onClose(()=>this.fireClose()),d}onData(u){try{for(this.buffer.append(u);;){if(this.nextMessageLength===-1){let p=this.buffer.tryReadHeaders(!0);if(!p)return;let f=p.get("content-length");if(!f){this.fireError(new Error(`Header must provide a Content-Length property. +${JSON.stringify(Object.fromEntries(p))}`));return}let g=parseInt(f);if(isNaN(g)){this.fireError(new Error(`Content-Length value must be a number. Got ${f}`));return}this.nextMessageLength=g}let d=this.buffer.tryReadBody(this.nextMessageLength);if(d===void 0){this.setPartialMessageTimer();return}this.clearPartialMessageTimer(),this.nextMessageLength=-1,this.readSemaphore.lock(async()=>{let p=this.options.contentDecoder!==void 0?await this.options.contentDecoder.decode(d):d,f=await this.options.contentTypeDecoder.decode(p,this.options);this.callback(f)}).catch(p=>{this.fireError(p)})}}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((u,d)=>{this.partialMessageTimer=void 0,u===this.messageToken&&(this.firePartialMessage({messageToken:u,waitingTime:d}),this.setPartialMessageTimer())},this._partialMessageTimeout,this.messageToken,this._partialMessageTimeout))}};e.ReadableStreamMessageReader=h}}),mZe=$r({"../../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=mg(),r=_x(),i=H3e(),n=_1(),a="Content-Length: ",s=`\r +`,l;(function(p){function f(g){let m=g;return m&&r.func(m.dispose)&&r.func(m.onClose)&&r.func(m.onError)&&r.func(m.write)}o(f,"is"),S(f,"is"),p.is=f})(l||(e.MessageWriter=l={}));var h=class{static{o(this,"AbstractMessageWriter")}static{S(this,"AbstractMessageWriter")}constructor(){this.errorEmitter=new n.Emitter,this.closeEmitter=new n.Emitter}dispose(){this.errorEmitter.dispose(),this.closeEmitter.dispose()}get onError(){return this.errorEmitter.event}fireError(p,f,g){this.errorEmitter.fire([this.asError(p),f,g])}get onClose(){return this.closeEmitter.event}fireClose(){this.closeEmitter.fire(void 0)}asError(p){return p instanceof Error?p:new Error(`Writer received error. Reason: ${r.string(p.message)?p.message:"unknown"}`)}};e.AbstractMessageWriter=h;var u;(function(p){function f(g){return g===void 0||typeof g=="string"?{charset:g??"utf-8",contentTypeEncoder:(0,t.default)().applicationJson.encoder}:{charset:g.charset??"utf-8",contentEncoder:g.contentEncoder,contentTypeEncoder:g.contentTypeEncoder??(0,t.default)().applicationJson.encoder}}o(f,"fromOptions"),S(f,"fromOptions"),p.fromOptions=f})(u||(u={}));var d=class extends h{static{o(this,"WriteableStreamMessageWriter")}static{S(this,"WriteableStreamMessageWriter")}constructor(p,f){super(),this.writable=p,this.options=u.fromOptions(f),this.errorCount=0,this.writeSemaphore=new i.Semaphore(1),this.writable.onError(g=>this.fireError(g)),this.writable.onClose(()=>this.fireClose())}async write(p){return this.writeSemaphore.lock(async()=>this.options.contentTypeEncoder.encode(p,this.options).then(f=>this.options.contentEncoder!==void 0?this.options.contentEncoder.encode(f):f).then(f=>{let g=[];return g.push(a,f.byteLength.toString(),s),g.push(s),this.doWrite(p,g,f)},f=>{throw this.fireError(f),f}))}async doWrite(p,f,g){try{return await this.writable.write(f.join(""),"ascii"),this.writable.write(g)}catch(m){return this.handleError(m,p),Promise.reject(m)}}handleError(p,f){this.errorCount++,this.fireError(p,f,this.errorCount)}end(){this.writable.end()}};e.WriteableStreamMessageWriter=d}}),yZe=$r({"../../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,i=`\r +`,n=class{static{o(this,"AbstractMessageBuffer")}static{S(this,"AbstractMessageBuffer")}constructor(a="utf-8"){this._encoding=a,this._chunks=[],this._totalLength=0}get encoding(){return this._encoding}append(a){let s=typeof a=="string"?this.fromString(a,this._encoding):a;this._chunks.push(s),this._totalLength+=s.byteLength}tryReadHeaders(a=!1){if(this._chunks.length===0)return;let s=0,l=0,h=0,u=0;e:for(;lthis._totalLength)throw new Error("Cannot read so many bytes!");if(this._chunks[0].byteLength===a){let u=this._chunks[0];return this._chunks.shift(),this._totalLength-=a,this.asNative(u)}if(this._chunks[0].byteLength>a){let u=this._chunks[0],d=this.asNative(u,a);return this._chunks[0]=u.slice(a),this._totalLength-=a,d}let s=this.allocNative(a),l=0,h=0;for(;a>0;){let u=this._chunks[h];if(u.byteLength>a){let d=u.slice(0,a);s.set(d,l),l+=a,this._chunks[h]=u.slice(a),this._totalLength-=a,a-=a}else s.set(u,l),l+=u.byteLength,this._chunks.shift(),this._totalLength-=u.byteLength,a-=u.byteLength}return s}};e.AbstractMessageBuffer=n}}),vZe=$r({"../../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=mg(),r=_x(),i=U3e(),n=Y3e(),a=_1(),s=IE(),l;(function(B){B.type=new i.NotificationType("$/cancelRequest")})(l||(l={}));var h;(function(B){function A(I){return typeof I=="string"||typeof I=="number"}o(A,"is"),S(A,"is"),B.is=A})(h||(e.ProgressToken=h={}));var u;(function(B){B.type=new i.NotificationType("$/progress")})(u||(u={}));var d=class{static{o(this,"ProgressType")}static{S(this,"ProgressType")}constructor(){}};e.ProgressType=d;var p;(function(B){function A(I){return r.func(I)}o(A,"is"),S(A,"is"),B.is=A})(p||(p={})),e.NullLogger=Object.freeze({error:S(()=>{},"error"),warn:S(()=>{},"warn"),info:S(()=>{},"info"),log:S(()=>{},"log")});var f;(function(B){B[B.Off=0]="Off",B[B.Messages=1]="Messages",B[B.Compact=2]="Compact",B[B.Verbose=3]="Verbose"})(f||(e.Trace=f={}));var g;(function(B){B.Off="off",B.Messages="messages",B.Compact="compact",B.Verbose="verbose"})(g||(e.TraceValues=g={})),(function(B){function A(O){if(!r.string(O))return B.Off;switch(O=O.toLowerCase(),O){case"off":return B.Off;case"messages":return B.Messages;case"compact":return B.Compact;case"verbose":return B.Verbose;default:return B.Off}}o(A,"fromString"),S(A,"fromString"),B.fromString=A;function I(O){switch(O){case B.Off:return"off";case B.Messages:return"messages";case B.Compact:return"compact";case B.Verbose:return"verbose";default:return"off"}}o(I,"toString4"),S(I,"toString"),B.toString=I})(f||(e.Trace=f={}));var m;(function(B){B.Text="text",B.JSON="json"})(m||(e.TraceFormat=m={})),(function(B){function A(I){return r.string(I)?(I=I.toLowerCase(),I==="json"?B.JSON:B.Text):B.Text}o(A,"fromString"),S(A,"fromString"),B.fromString=A})(m||(e.TraceFormat=m={}));var y;(function(B){B.type=new i.NotificationType("$/setTrace")})(y||(e.SetTraceNotification=y={}));var b;(function(B){B.type=new i.NotificationType("$/logTrace")})(b||(e.LogTraceNotification=b={}));var v;(function(B){B[B.Closed=1]="Closed",B[B.Disposed=2]="Disposed",B[B.AlreadyListening=3]="AlreadyListening"})(v||(e.ConnectionErrors=v={}));var T=class X3e extends Error{static{o(this,"_ConnectionError")}static{S(this,"ConnectionError")}constructor(A,I){super(I),this.code=A,Object.setPrototypeOf(this,X3e.prototype)}};e.ConnectionError=T;var x;(function(B){function A(I){let O=I;return O&&r.func(O.cancelUndispatched)}o(A,"is"),S(A,"is"),B.is=A})(x||(e.ConnectionStrategy=x={}));var k;(function(B){function A(I){let O=I;return O&&(O.kind===void 0||O.kind==="id")&&r.func(O.createCancellationTokenSource)&&(O.dispose===void 0||r.func(O.dispose))}o(A,"is"),S(A,"is"),B.is=A})(k||(e.IdCancellationReceiverStrategy=k={}));var C;(function(B){function A(I){let O=I;return O&&O.kind==="request"&&r.func(O.createCancellationTokenSource)&&(O.dispose===void 0||r.func(O.dispose))}o(A,"is"),S(A,"is"),B.is=A})(C||(e.RequestCancellationReceiverStrategy=C={}));var E;(function(B){B.Message=Object.freeze({createCancellationTokenSource(I){return new s.CancellationTokenSource}});function A(I){return k.is(I)||C.is(I)}o(A,"is"),S(A,"is"),B.is=A})(E||(e.CancellationReceiverStrategy=E={}));var w;(function(B){B.Message=Object.freeze({sendCancellation(I,O){return I.sendNotification(l.type,{id:O})},cleanup(I){}});function A(I){let O=I;return O&&r.func(O.sendCancellation)&&r.func(O.cleanup)}o(A,"is"),S(A,"is"),B.is=A})(w||(e.CancellationSenderStrategy=w={}));var _;(function(B){B.Message=Object.freeze({receiver:E.Message,sender:w.Message});function A(I){let O=I;return O&&E.is(O.receiver)&&w.is(O.sender)}o(A,"is"),S(A,"is"),B.is=A})(_||(e.CancellationStrategy=_={}));var L;(function(B){function A(I){let O=I;return O&&r.func(O.handleMessage)}o(A,"is"),S(A,"is"),B.is=A})(L||(e.MessageStrategy=L={}));var N;(function(B){function A(I){let O=I;return O&&(_.is(O.cancellationStrategy)||x.is(O.connectionStrategy)||L.is(O.messageStrategy))}o(A,"is"),S(A,"is"),B.is=A})(N||(e.ConnectionOptions=N={}));var D;(function(B){B[B.New=1]="New",B[B.Listening=2]="Listening",B[B.Closed=3]="Closed",B[B.Disposed=4]="Disposed"})(D||(D={}));function M(B,A,I,O){let R=I!==void 0?I:e.NullLogger,$=0,F=0,P=0,z="2.0",q,G=new Map,W,J=new Map,H=new Map,Z,se=new n.LinkedMap,Q=new Map,te=new Set,re=new Map,ne=f.Off,Ae=m.Text,ie,me=D.New,oe=new a.Emitter,we=new a.Emitter,ye=new a.Emitter,ve=new a.Emitter,ae=new a.Emitter,Pe=O&&O.cancellationStrategy?O.cancellationStrategy:_.Message;function X(_e){if(_e===null)throw new Error("Can't send requests with id null since the response can't be correlated.");return"req-"+_e.toString()}o(X,"createRequestQueueKey"),S(X,"createRequestQueueKey");function ce(_e){return _e===null?"res-unknown-"+(++P).toString():"res-"+_e.toString()}o(ce,"createResponseQueueKey"),S(ce,"createResponseQueueKey");function ge(){return"not-"+(++F).toString()}o(ge,"createNotificationQueueKey"),S(ge,"createNotificationQueueKey");function be(_e,Ze){i.Message.isRequest(Ze)?_e.set(X(Ze.id),Ze):i.Message.isResponse(Ze)?_e.set(ce(Ze.id),Ze):_e.set(ge(),Ze)}o(be,"addMessageToQueue"),S(be,"addMessageToQueue");function ke(_e){}o(ke,"cancelUndispatched"),S(ke,"cancelUndispatched");function Me(){return me===D.Listening}o(Me,"isListening"),S(Me,"isListening");function pe(){return me===D.Closed}o(pe,"isClosed"),S(pe,"isClosed");function Oe(){return me===D.Disposed}o(Oe,"isDisposed"),S(Oe,"isDisposed");function j(){(me===D.New||me===D.Listening)&&(me=D.Closed,we.fire(void 0))}o(j,"closeHandler"),S(j,"closeHandler");function le(_e){oe.fire([_e,void 0,void 0])}o(le,"readErrorHandler"),S(le,"readErrorHandler");function U(_e){oe.fire(_e)}o(U,"writeErrorHandler"),S(U,"writeErrorHandler"),B.onClose(j),B.onError(le),A.onClose(j),A.onError(U);function fe(){Z||se.size===0||(Z=(0,t.default)().timer.setImmediate(()=>{Z=void 0,Le()}))}o(fe,"triggerMessageQueue"),S(fe,"triggerMessageQueue");function Y(_e){i.Message.isRequest(_e)?je(_e):i.Message.isNotification(_e)?Ve(_e):i.Message.isResponse(_e)?Ie(_e):Ne(_e)}o(Y,"handleMessage"),S(Y,"handleMessage");function Le(){if(se.size===0)return;let _e=se.shift();try{let Ze=O?.messageStrategy;L.is(Ze)?Ze.handleMessage(_e,Y):Y(_e)}finally{fe()}}o(Le,"processMessageQueue"),S(Le,"processMessageQueue");let xe=S(_e=>{try{if(i.Message.isNotification(_e)&&_e.method===l.type.method){let Ze=_e.params.id,He=X(Ze),yt=se.get(He);if(i.Message.isRequest(yt)){let Ot=O?.connectionStrategy,ir=Ot&&Ot.cancelUndispatched?Ot.cancelUndispatched(yt,ke):void 0;if(ir&&(ir.error!==void 0||ir.result!==void 0)){se.delete(He),re.delete(Ze),ir.id=yt.id,Ce(ir,_e.method,Date.now()),A.write(ir).catch(()=>R.error("Sending response for canceled message failed."));return}}let _t=re.get(Ze);if(_t!==void 0){_t.cancel(),Se(_e);return}else te.add(Ze)}be(se,_e)}finally{fe()}},"callback");function je(_e){if(Oe())return;function Ze(Ee,ot,Be){let Ke={jsonrpc:z,id:_e.id};Ee instanceof i.ResponseError?Ke.error=Ee.toJson():Ke.result=Ee===void 0?null:Ee,Ce(Ke,ot,Be),A.write(Ke).catch(()=>R.error("Sending response failed."))}o(Ze,"reply"),S(Ze,"reply");function He(Ee,ot,Be){let Ke={jsonrpc:z,id:_e.id,error:Ee.toJson()};Ce(Ke,ot,Be),A.write(Ke).catch(()=>R.error("Sending response failed."))}o(He,"replyError"),S(He,"replyError");function yt(Ee,ot,Be){Ee===void 0&&(Ee=null);let Ke={jsonrpc:z,id:_e.id,result:Ee};Ce(Ke,ot,Be),A.write(Ke).catch(()=>R.error("Sending response failed."))}o(yt,"replySuccess"),S(yt,"replySuccess"),ct(_e);let _t=G.get(_e.method),Ot,ir;_t&&(Ot=_t.type,ir=_t.handler);let ur=Date.now();if(ir||q){let Ee=_e.id??String(Date.now()),ot=k.is(Pe.receiver)?Pe.receiver.createCancellationTokenSource(Ee):Pe.receiver.createCancellationTokenSource(_e);_e.id!==null&&te.has(_e.id)&&ot.cancel(),_e.id!==null&&re.set(Ee,ot);try{let Be;if(ir)if(_e.params===void 0){if(Ot!==void 0&&Ot.numberOfParams!==0){He(new i.ResponseError(i.ErrorCodes.InvalidParams,`Request ${_e.method} defines ${Ot.numberOfParams} params but received none.`),_e.method,ur);return}Be=ir(ot.token)}else if(Array.isArray(_e.params)){if(Ot!==void 0&&Ot.parameterStructures===i.ParameterStructures.byName){He(new i.ResponseError(i.ErrorCodes.InvalidParams,`Request ${_e.method} defines parameters by name but received parameters by position`),_e.method,ur);return}Be=ir(..._e.params,ot.token)}else{if(Ot!==void 0&&Ot.parameterStructures===i.ParameterStructures.byPosition){He(new i.ResponseError(i.ErrorCodes.InvalidParams,`Request ${_e.method} defines parameters by position but received parameters by name`),_e.method,ur);return}Be=ir(_e.params,ot.token)}else q&&(Be=q(_e.method,_e.params,ot.token));let Ke=Be;Be?Ke.then?Ke.then(ht=>{re.delete(Ee),Ze(ht,_e.method,ur)},ht=>{re.delete(Ee),ht instanceof i.ResponseError?He(ht,_e.method,ur):ht&&r.string(ht.message)?He(new i.ResponseError(i.ErrorCodes.InternalError,`Request ${_e.method} failed with message: ${ht.message}`),_e.method,ur):He(new i.ResponseError(i.ErrorCodes.InternalError,`Request ${_e.method} failed unexpectedly without providing any details.`),_e.method,ur)}):(re.delete(Ee),Ze(Be,_e.method,ur)):(re.delete(Ee),yt(Be,_e.method,ur))}catch(Be){re.delete(Ee),Be instanceof i.ResponseError?Ze(Be,_e.method,ur):Be&&r.string(Be.message)?He(new i.ResponseError(i.ErrorCodes.InternalError,`Request ${_e.method} failed with message: ${Be.message}`),_e.method,ur):He(new i.ResponseError(i.ErrorCodes.InternalError,`Request ${_e.method} failed unexpectedly without providing any details.`),_e.method,ur)}}else He(new i.ResponseError(i.ErrorCodes.MethodNotFound,`Unhandled method ${_e.method}`),_e.method,ur)}o(je,"handleRequest"),S(je,"handleRequest");function Ie(_e){if(!Oe())if(_e.id===null)_e.error?R.error(`Received response message without id: Error is: +${JSON.stringify(_e.error,void 0,4)}`):R.error("Received response message without id. No further error information provided.");else{let Ze=_e.id,He=Q.get(Ze);if(at(_e,He),He!==void 0){Q.delete(Ze);try{if(_e.error){let yt=_e.error;He.reject(new i.ResponseError(yt.code,yt.message,yt.data))}else if(_e.result!==void 0)He.resolve(_e.result);else throw new Error("Should never happen.")}catch(yt){yt.message?R.error(`Response handler '${He.method}' failed with message: ${yt.message}`):R.error(`Response handler '${He.method}' failed unexpectedly.`)}}}}o(Ie,"handleResponse"),S(Ie,"handleResponse");function Ve(_e){if(Oe())return;let Ze,He;if(_e.method===l.type.method){let yt=_e.params.id;te.delete(yt),Se(_e);return}else{let yt=J.get(_e.method);yt&&(He=yt.handler,Ze=yt.type)}if(He||W)try{if(Se(_e),He)if(_e.params===void 0)Ze!==void 0&&Ze.numberOfParams!==0&&Ze.parameterStructures!==i.ParameterStructures.byName&&R.error(`Notification ${_e.method} defines ${Ze.numberOfParams} params but received none.`),He();else if(Array.isArray(_e.params)){let yt=_e.params;_e.method===u.type.method&&yt.length===2&&h.is(yt[0])?He({token:yt[0],value:yt[1]}):(Ze!==void 0&&(Ze.parameterStructures===i.ParameterStructures.byName&&R.error(`Notification ${_e.method} defines parameters by name but received parameters by position`),Ze.numberOfParams!==_e.params.length&&R.error(`Notification ${_e.method} defines ${Ze.numberOfParams} params but received ${yt.length} arguments`)),He(...yt))}else Ze!==void 0&&Ze.parameterStructures===i.ParameterStructures.byPosition&&R.error(`Notification ${_e.method} defines parameters by position but received parameters by name`),He(_e.params);else W&&W(_e.method,_e.params)}catch(yt){yt.message?R.error(`Notification handler '${_e.method}' failed with message: ${yt.message}`):R.error(`Notification handler '${_e.method}' failed unexpectedly.`)}else ye.fire(_e)}o(Ve,"handleNotification"),S(Ve,"handleNotification");function Ne(_e){if(!_e){R.error("Received empty message.");return}R.error(`Received message which is neither a response nor a notification message: +${JSON.stringify(_e,null,4)}`);let Ze=_e;if(r.string(Ze.id)||r.number(Ze.id)){let He=Ze.id,yt=Q.get(He);yt&&yt.reject(new Error("The received response has neither a result nor an error property."))}}o(Ne,"handleInvalidMessage"),S(Ne,"handleInvalidMessage");function Ge(_e){if(_e!=null)switch(ne){case f.Verbose:return JSON.stringify(_e,null,4);case f.Compact:return JSON.stringify(_e);default:return}}o(Ge,"stringifyTrace"),S(Ge,"stringifyTrace");function ze(_e){if(!(ne===f.Off||!ie))if(Ae===m.Text){let Ze;(ne===f.Verbose||ne===f.Compact)&&_e.params&&(Ze=`Params: ${Ge(_e.params)} + +`),ie.log(`Sending request '${_e.method} - (${_e.id})'.`,Ze)}else dt("send-request",_e)}o(ze,"traceSendingRequest"),S(ze,"traceSendingRequest");function Ue(_e){if(!(ne===f.Off||!ie))if(Ae===m.Text){let Ze;(ne===f.Verbose||ne===f.Compact)&&(_e.params?Ze=`Params: ${Ge(_e.params)} + +`:Ze=`No parameters provided. + +`),ie.log(`Sending notification '${_e.method}'.`,Ze)}else dt("send-notification",_e)}o(Ue,"traceSendingNotification"),S(Ue,"traceSendingNotification");function Ce(_e,Ze,He){if(!(ne===f.Off||!ie))if(Ae===m.Text){let yt;(ne===f.Verbose||ne===f.Compact)&&(_e.error&&_e.error.data?yt=`Error data: ${Ge(_e.error.data)} + +`:_e.result?yt=`Result: ${Ge(_e.result)} + +`:_e.error===void 0&&(yt=`No result returned. + +`)),ie.log(`Sending response '${Ze} - (${_e.id})'. Processing request took ${Date.now()-He}ms`,yt)}else dt("send-response",_e)}o(Ce,"traceSendingResponse"),S(Ce,"traceSendingResponse");function ct(_e){if(!(ne===f.Off||!ie))if(Ae===m.Text){let Ze;(ne===f.Verbose||ne===f.Compact)&&_e.params&&(Ze=`Params: ${Ge(_e.params)} + +`),ie.log(`Received request '${_e.method} - (${_e.id})'.`,Ze)}else dt("receive-request",_e)}o(ct,"traceReceivedRequest"),S(ct,"traceReceivedRequest");function Se(_e){if(!(ne===f.Off||!ie||_e.method===b.type.method))if(Ae===m.Text){let Ze;(ne===f.Verbose||ne===f.Compact)&&(_e.params?Ze=`Params: ${Ge(_e.params)} + +`:Ze=`No parameters provided. + +`),ie.log(`Received notification '${_e.method}'.`,Ze)}else dt("receive-notification",_e)}o(Se,"traceReceivedNotification"),S(Se,"traceReceivedNotification");function at(_e,Ze){if(!(ne===f.Off||!ie))if(Ae===m.Text){let He;if((ne===f.Verbose||ne===f.Compact)&&(_e.error&&_e.error.data?He=`Error data: ${Ge(_e.error.data)} + +`:_e.result?He=`Result: ${Ge(_e.result)} + +`:_e.error===void 0&&(He=`No result returned. + +`)),Ze){let yt=_e.error?` Request failed: ${_e.error.message} (${_e.error.code}).`:"";ie.log(`Received response '${Ze.method} - (${_e.id})' in ${Date.now()-Ze.timerStart}ms.${yt}`,He)}else ie.log(`Received response ${_e.id} without active response promise.`,He)}else dt("receive-response",_e)}o(at,"traceReceivedResponse"),S(at,"traceReceivedResponse");function dt(_e,Ze){if(!ie||ne===f.Off)return;let He={isLSPMessage:!0,type:_e,message:Ze,timestamp:Date.now()};ie.log(He)}o(dt,"logLSPMessage"),S(dt,"logLSPMessage");function gt(){if(pe())throw new T(v.Closed,"Connection is closed.");if(Oe())throw new T(v.Disposed,"Connection is disposed.")}o(gt,"throwIfClosedOrDisposed"),S(gt,"throwIfClosedOrDisposed");function Ct(){if(Me())throw new T(v.AlreadyListening,"Connection is already listening")}o(Ct,"throwIfListening"),S(Ct,"throwIfListening");function kt(){if(!Me())throw new Error("Call listen() first.")}o(kt,"throwIfNotListening"),S(kt,"throwIfNotListening");function $t(_e){return _e===void 0?null:_e}o($t,"undefinedToNull"),S($t,"undefinedToNull");function ut(_e){if(_e!==null)return _e}o(ut,"nullToUndefined"),S(ut,"nullToUndefined");function de(_e){return _e!=null&&!Array.isArray(_e)&&typeof _e=="object"}o(de,"isNamedParam"),S(de,"isNamedParam");function st(_e,Ze){switch(_e){case i.ParameterStructures.auto:return de(Ze)?ut(Ze):[$t(Ze)];case i.ParameterStructures.byName:if(!de(Ze))throw new Error("Received parameters by name but param is not an object literal.");return ut(Ze);case i.ParameterStructures.byPosition:return[$t(Ze)];default:throw new Error(`Unknown parameter structure ${_e.toString()}`)}}o(st,"computeSingleParam"),S(st,"computeSingleParam");function nt(_e,Ze){let He,yt=_e.numberOfParams;switch(yt){case 0:He=void 0;break;case 1:He=st(_e.parameterStructures,Ze[0]);break;default:He=[];for(let _t=0;_t{gt();let He,yt;if(r.string(_e)){He=_e;let Ot=Ze[0],ir=0,ur=i.ParameterStructures.auto;i.ParameterStructures.is(Ot)&&(ir=1,ur=Ot);let Ee=Ze.length,ot=Ee-ir;switch(ot){case 0:yt=void 0;break;case 1:yt=st(ur,Ze[ir]);break;default:if(ur===i.ParameterStructures.byName)throw new Error(`Received ${ot} parameters for 'by Name' notification parameter structure.`);yt=Ze.slice(ir,Ee).map(Be=>$t(Be));break}}else{let Ot=Ze;He=_e.method,yt=nt(_e,Ot)}let _t={jsonrpc:z,method:He,params:yt};return Ue(_t),A.write(_t).catch(Ot=>{throw R.error("Sending notification failed."),Ot})},"sendNotification"),onNotification:S((_e,Ze)=>{gt();let He;return r.func(_e)?W=_e:Ze&&(r.string(_e)?(He=_e,J.set(_e,{type:void 0,handler:Ze})):(He=_e.method,J.set(_e.method,{type:_e,handler:Ze}))),{dispose:S(()=>{He!==void 0?J.delete(He):W=void 0},"dispose")}},"onNotification"),onProgress:S((_e,Ze,He)=>{if(H.has(Ze))throw new Error(`Progress handler for token ${Ze} already registered`);return H.set(Ze,He),{dispose:S(()=>{H.delete(Ze)},"dispose")}},"onProgress"),sendProgress:S((_e,Ze,He)=>rt.sendNotification(u.type,{token:Ze,value:He}),"sendProgress"),onUnhandledProgress:ve.event,sendRequest:S((_e,...Ze)=>{gt(),kt();let He,yt,_t;if(r.string(_e)){He=_e;let Ee=Ze[0],ot=Ze[Ze.length-1],Be=0,Ke=i.ParameterStructures.auto;i.ParameterStructures.is(Ee)&&(Be=1,Ke=Ee);let ht=Ze.length;s.CancellationToken.is(ot)&&(ht=ht-1,_t=ot);let At=ht-Be;switch(At){case 0:yt=void 0;break;case 1:yt=st(Ke,Ze[Be]);break;default:if(Ke===i.ParameterStructures.byName)throw new Error(`Received ${At} parameters for 'by Name' request parameter structure.`);yt=Ze.slice(Be,ht).map(Yt=>$t(Yt));break}}else{let Ee=Ze;He=_e.method,yt=nt(_e,Ee);let ot=_e.numberOfParams;_t=s.CancellationToken.is(Ee[ot])?Ee[ot]:void 0}let Ot=$++,ir;_t&&(ir=_t.onCancellationRequested(()=>{let Ee=Pe.sender.sendCancellation(rt,Ot);return Ee===void 0?(R.log(`Received no promise from cancellation strategy when cancelling id ${Ot}`),Promise.resolve()):Ee.catch(()=>{R.log(`Sending cancellation messages for id ${Ot} failed`)})}));let ur={jsonrpc:z,id:Ot,method:He,params:yt};return ze(ur),typeof Pe.sender.enableCancellation=="function"&&Pe.sender.enableCancellation(ur),new Promise(async(Ee,ot)=>{let Be=S(At=>{Ee(At),Pe.sender.cleanup(Ot),ir?.dispose()},"resolveWithCleanup"),Ke=S(At=>{ot(At),Pe.sender.cleanup(Ot),ir?.dispose()},"rejectWithCleanup"),ht={method:He,timerStart:Date.now(),resolve:Be,reject:Ke};try{await A.write(ur),Q.set(Ot,ht)}catch(At){throw R.error("Sending request failed."),ht.reject(new i.ResponseError(i.ErrorCodes.MessageWriteError,At.message?At.message:"Unknown reason")),At}})},"sendRequest"),onRequest:S((_e,Ze)=>{gt();let He=null;return p.is(_e)?(He=void 0,q=_e):r.string(_e)?(He=null,Ze!==void 0&&(He=_e,G.set(_e,{handler:Ze,type:void 0}))):Ze!==void 0&&(He=_e.method,G.set(_e.method,{type:_e,handler:Ze})),{dispose:S(()=>{He!==null&&(He!==void 0?G.delete(He):q=void 0)},"dispose")}},"onRequest"),hasPendingResponse:S(()=>Q.size>0,"hasPendingResponse"),trace:S(async(_e,Ze,He)=>{let yt=!1,_t=m.Text;He!==void 0&&(r.boolean(He)?yt=He:(yt=He.sendNotification||!1,_t=He.traceFormat||m.Text)),ne=_e,Ae=_t,ne===f.Off?ie=void 0:ie=Ze,yt&&!pe()&&!Oe()&&await rt.sendNotification(y.type,{value:f.toString(_e)})},"trace"),onError:oe.event,onClose:we.event,onUnhandledNotification:ye.event,onDispose:ae.event,end:S(()=>{A.end()},"end"),dispose:S(()=>{if(Oe())return;me=D.Disposed,ae.fire(void 0);let _e=new i.ResponseError(i.ErrorCodes.PendingResponseRejected,"Pending response rejected since connection got disposed");for(let Ze of Q.values())Ze.reject(_e);Q=new Map,re=new Map,te=new Set,se=new n.LinkedMap,r.func(A.dispose)&&A.dispose(),r.func(B.dispose)&&B.dispose()},"dispose"),listen:S(()=>{gt(),Ct(),me=D.Listening,B.listen(xe)},"listen"),inspect:S(()=>{(0,t.default)().console.log("inspect")},"inspect")};return rt.onNotification(b.type,_e=>{if(ne===f.Off||!ie)return;let Ze=ne===f.Verbose||ne===f.Compact;ie.log(_e.message,Ze?_e.verbose:void 0)}),rt.onNotification(u.type,_e=>{let Ze=H.get(_e.token);Ze?Ze(_e.value):ve.fire(_e)}),rt}o(M,"createMessageConnection"),S(M,"createMessageConnection"),e.createMessageConnection=M}}),kB=$r({"../../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=U3e();Object.defineProperty(e,"Message",{enumerable:!0,get:S(function(){return t.Message},"get")}),Object.defineProperty(e,"RequestType",{enumerable:!0,get:S(function(){return t.RequestType},"get")}),Object.defineProperty(e,"RequestType0",{enumerable:!0,get:S(function(){return t.RequestType0},"get")}),Object.defineProperty(e,"RequestType1",{enumerable:!0,get:S(function(){return t.RequestType1},"get")}),Object.defineProperty(e,"RequestType2",{enumerable:!0,get:S(function(){return t.RequestType2},"get")}),Object.defineProperty(e,"RequestType3",{enumerable:!0,get:S(function(){return t.RequestType3},"get")}),Object.defineProperty(e,"RequestType4",{enumerable:!0,get:S(function(){return t.RequestType4},"get")}),Object.defineProperty(e,"RequestType5",{enumerable:!0,get:S(function(){return t.RequestType5},"get")}),Object.defineProperty(e,"RequestType6",{enumerable:!0,get:S(function(){return t.RequestType6},"get")}),Object.defineProperty(e,"RequestType7",{enumerable:!0,get:S(function(){return t.RequestType7},"get")}),Object.defineProperty(e,"RequestType8",{enumerable:!0,get:S(function(){return t.RequestType8},"get")}),Object.defineProperty(e,"RequestType9",{enumerable:!0,get:S(function(){return t.RequestType9},"get")}),Object.defineProperty(e,"ResponseError",{enumerable:!0,get:S(function(){return t.ResponseError},"get")}),Object.defineProperty(e,"ErrorCodes",{enumerable:!0,get:S(function(){return t.ErrorCodes},"get")}),Object.defineProperty(e,"NotificationType",{enumerable:!0,get:S(function(){return t.NotificationType},"get")}),Object.defineProperty(e,"NotificationType0",{enumerable:!0,get:S(function(){return t.NotificationType0},"get")}),Object.defineProperty(e,"NotificationType1",{enumerable:!0,get:S(function(){return t.NotificationType1},"get")}),Object.defineProperty(e,"NotificationType2",{enumerable:!0,get:S(function(){return t.NotificationType2},"get")}),Object.defineProperty(e,"NotificationType3",{enumerable:!0,get:S(function(){return t.NotificationType3},"get")}),Object.defineProperty(e,"NotificationType4",{enumerable:!0,get:S(function(){return t.NotificationType4},"get")}),Object.defineProperty(e,"NotificationType5",{enumerable:!0,get:S(function(){return t.NotificationType5},"get")}),Object.defineProperty(e,"NotificationType6",{enumerable:!0,get:S(function(){return t.NotificationType6},"get")}),Object.defineProperty(e,"NotificationType7",{enumerable:!0,get:S(function(){return t.NotificationType7},"get")}),Object.defineProperty(e,"NotificationType8",{enumerable:!0,get:S(function(){return t.NotificationType8},"get")}),Object.defineProperty(e,"NotificationType9",{enumerable:!0,get:S(function(){return t.NotificationType9},"get")}),Object.defineProperty(e,"ParameterStructures",{enumerable:!0,get:S(function(){return t.ParameterStructures},"get")});var r=Y3e();Object.defineProperty(e,"LinkedMap",{enumerable:!0,get:S(function(){return r.LinkedMap},"get")}),Object.defineProperty(e,"LRUCache",{enumerable:!0,get:S(function(){return r.LRUCache},"get")}),Object.defineProperty(e,"Touch",{enumerable:!0,get:S(function(){return r.Touch},"get")});var i=pZe();Object.defineProperty(e,"Disposable",{enumerable:!0,get:S(function(){return i.Disposable},"get")});var n=_1();Object.defineProperty(e,"Event",{enumerable:!0,get:S(function(){return n.Event},"get")}),Object.defineProperty(e,"Emitter",{enumerable:!0,get:S(function(){return n.Emitter},"get")});var a=IE();Object.defineProperty(e,"CancellationTokenSource",{enumerable:!0,get:S(function(){return a.CancellationTokenSource},"get")}),Object.defineProperty(e,"CancellationToken",{enumerable:!0,get:S(function(){return a.CancellationToken},"get")});var s=fZe();Object.defineProperty(e,"SharedArraySenderStrategy",{enumerable:!0,get:S(function(){return s.SharedArraySenderStrategy},"get")}),Object.defineProperty(e,"SharedArrayReceiverStrategy",{enumerable:!0,get:S(function(){return s.SharedArrayReceiverStrategy},"get")});var l=gZe();Object.defineProperty(e,"MessageReader",{enumerable:!0,get:S(function(){return l.MessageReader},"get")}),Object.defineProperty(e,"AbstractMessageReader",{enumerable:!0,get:S(function(){return l.AbstractMessageReader},"get")}),Object.defineProperty(e,"ReadableStreamMessageReader",{enumerable:!0,get:S(function(){return l.ReadableStreamMessageReader},"get")});var h=mZe();Object.defineProperty(e,"MessageWriter",{enumerable:!0,get:S(function(){return h.MessageWriter},"get")}),Object.defineProperty(e,"AbstractMessageWriter",{enumerable:!0,get:S(function(){return h.AbstractMessageWriter},"get")}),Object.defineProperty(e,"WriteableStreamMessageWriter",{enumerable:!0,get:S(function(){return h.WriteableStreamMessageWriter},"get")});var u=yZe();Object.defineProperty(e,"AbstractMessageBuffer",{enumerable:!0,get:S(function(){return u.AbstractMessageBuffer},"get")});var d=vZe();Object.defineProperty(e,"ConnectionStrategy",{enumerable:!0,get:S(function(){return d.ConnectionStrategy},"get")}),Object.defineProperty(e,"ConnectionOptions",{enumerable:!0,get:S(function(){return d.ConnectionOptions},"get")}),Object.defineProperty(e,"NullLogger",{enumerable:!0,get:S(function(){return d.NullLogger},"get")}),Object.defineProperty(e,"createMessageConnection",{enumerable:!0,get:S(function(){return d.createMessageConnection},"get")}),Object.defineProperty(e,"ProgressToken",{enumerable:!0,get:S(function(){return d.ProgressToken},"get")}),Object.defineProperty(e,"ProgressType",{enumerable:!0,get:S(function(){return d.ProgressType},"get")}),Object.defineProperty(e,"Trace",{enumerable:!0,get:S(function(){return d.Trace},"get")}),Object.defineProperty(e,"TraceValues",{enumerable:!0,get:S(function(){return d.TraceValues},"get")}),Object.defineProperty(e,"TraceFormat",{enumerable:!0,get:S(function(){return d.TraceFormat},"get")}),Object.defineProperty(e,"SetTraceNotification",{enumerable:!0,get:S(function(){return d.SetTraceNotification},"get")}),Object.defineProperty(e,"LogTraceNotification",{enumerable:!0,get:S(function(){return d.LogTraceNotification},"get")}),Object.defineProperty(e,"ConnectionErrors",{enumerable:!0,get:S(function(){return d.ConnectionErrors},"get")}),Object.defineProperty(e,"ConnectionError",{enumerable:!0,get:S(function(){return d.ConnectionError},"get")}),Object.defineProperty(e,"CancellationReceiverStrategy",{enumerable:!0,get:S(function(){return d.CancellationReceiverStrategy},"get")}),Object.defineProperty(e,"CancellationSenderStrategy",{enumerable:!0,get:S(function(){return d.CancellationSenderStrategy},"get")}),Object.defineProperty(e,"CancellationStrategy",{enumerable:!0,get:S(function(){return d.CancellationStrategy},"get")}),Object.defineProperty(e,"MessageStrategy",{enumerable:!0,get:S(function(){return d.MessageStrategy},"get")});var p=mg();e.RAL=p.default}}),bZe=$r({"../../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=kB(),r=class K3e extends t.AbstractMessageBuffer{static{o(this,"_MessageBuffer")}static{S(this,"MessageBuffer")}constructor(u="utf-8"){super(u),this.asciiDecoder=new TextDecoder("ascii")}emptyBuffer(){return K3e.emptyBuffer}fromString(u,d){return new TextEncoder().encode(u)}toString(u,d){return d==="ascii"?this.asciiDecoder.decode(u):new TextDecoder(d).decode(u)}asNative(u,d){return d===void 0?u:u.slice(0,d)}allocNative(u){return new Uint8Array(u)}};r.emptyBuffer=new Uint8Array(0);var i=class{static{o(this,"ReadableStreamWrapper")}static{S(this,"ReadableStreamWrapper")}constructor(h){this.socket=h,this._onData=new t.Emitter,this._messageListener=u=>{u.data.arrayBuffer().then(d=>{this._onData.fire(new Uint8Array(d))},()=>{(0,t.RAL)().console.error("Converting blob to array buffer failed.")})},this.socket.addEventListener("message",this._messageListener)}onClose(h){return this.socket.addEventListener("close",h),t.Disposable.create(()=>this.socket.removeEventListener("close",h))}onError(h){return this.socket.addEventListener("error",h),t.Disposable.create(()=>this.socket.removeEventListener("error",h))}onEnd(h){return this.socket.addEventListener("end",h),t.Disposable.create(()=>this.socket.removeEventListener("end",h))}onData(h){return this._onData.event(h)}},n=class{static{o(this,"WritableStreamWrapper")}static{S(this,"WritableStreamWrapper")}constructor(h){this.socket=h}onClose(h){return this.socket.addEventListener("close",h),t.Disposable.create(()=>this.socket.removeEventListener("close",h))}onError(h){return this.socket.addEventListener("error",h),t.Disposable.create(()=>this.socket.removeEventListener("error",h))}onEnd(h){return this.socket.addEventListener("end",h),t.Disposable.create(()=>this.socket.removeEventListener("end",h))}write(h,u){if(typeof h=="string"){if(u!==void 0&&u!=="utf-8")throw new Error(`In a Browser environments only utf-8 text encoding is supported. But got encoding: ${u}`);this.socket.send(h)}else this.socket.send(h);return Promise.resolve()}end(){this.socket.close()}},a=new TextEncoder,s=Object.freeze({messageBuffer:Object.freeze({create:S(h=>new r(h),"create")}),applicationJson:Object.freeze({encoder:Object.freeze({name:"application/json",encode:S((h,u)=>{if(u.charset!=="utf-8")throw new Error(`In a Browser environments only utf-8 text encoding is supported. But got encoding: ${u.charset}`);return Promise.resolve(a.encode(JSON.stringify(h,void 0,0)))},"encode")}),decoder:Object.freeze({name:"application/json",decode:S((h,u)=>{if(!(h instanceof Uint8Array))throw new Error("In a Browser environments only Uint8Arrays are supported.");return Promise.resolve(JSON.parse(new TextDecoder(u.charset).decode(h)))},"decode")})}),stream:Object.freeze({asReadableStream:S(h=>new i(h),"asReadableStream"),asWritableStream:S(h=>new n(h),"asWritableStream")}),console,timer:Object.freeze({setTimeout(h,u,...d){let p=setTimeout(h,u,...d);return{dispose:S(()=>clearTimeout(p),"dispose")}},setImmediate(h,...u){let d=setTimeout(h,0,...u);return{dispose:S(()=>clearTimeout(d),"dispose")}},setInterval(h,u,...d){let p=setInterval(h,u,...d);return{dispose:S(()=>clearInterval(p),"dispose")}}})});function l(){return s}o(l,"RIL"),S(l,"RIL"),(function(h){function u(){t.RAL.install(s)}o(u,"install"),S(u,"install"),h.install=u})(l||(l={})),e.default=l}}),A1=$r({"../../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(h,u,d,p){p===void 0&&(p=d);var f=Object.getOwnPropertyDescriptor(u,d);(!f||("get"in f?!u.__esModule:f.writable||f.configurable))&&(f={enumerable:!0,get:S(function(){return u[d]},"get")}),Object.defineProperty(h,p,f)}):(function(h,u,d,p){p===void 0&&(p=d),h[p]=u[d]})),r=e&&e.__exportStar||function(h,u){for(var d in h)d!=="default"&&!Object.prototype.hasOwnProperty.call(u,d)&&t(u,h,d)};Object.defineProperty(e,"__esModule",{value:!0}),e.createMessageConnection=e.BrowserMessageWriter=e.BrowserMessageReader=void 0;var i=bZe();i.default.install();var n=kB();r(kB(),e);var a=class extends n.AbstractMessageReader{static{o(this,"BrowserMessageReader")}static{S(this,"BrowserMessageReader")}constructor(h){super(),this._onData=new n.Emitter,this._messageListener=u=>{this._onData.fire(u.data)},h.addEventListener("error",u=>this.fireError(u)),h.onmessage=this._messageListener}listen(h){return this._onData.event(h)}};e.BrowserMessageReader=a;var s=class extends n.AbstractMessageWriter{static{o(this,"BrowserMessageWriter")}static{S(this,"BrowserMessageWriter")}constructor(h){super(),this.port=h,this.errorCount=0,h.addEventListener("error",u=>this.fireError(u))}write(h){try{return this.port.postMessage(h),Promise.resolve()}catch(u){return this.handleError(u,h),Promise.reject(u)}}handleError(h,u){this.errorCount++,this.fireError(h,u,this.errorCount)}end(){}};e.BrowserMessageWriter=s;function l(h,u,d,p){return d===void 0&&(d=n.NullLogger),n.ConnectionStrategy.is(p)&&(p={connectionStrategy:p}),(0,n.createMessageConnection)(h,u,d,p)}o(l,"createMessageConnection"),S(l,"createMessageConnection"),e.createMessageConnection=l}}),b4e=$r({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/browser.js"(e,t){"use strict";t.exports=A1()}}),en=$r({"../../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=A1(),r;(function(h){h.clientToServer="clientToServer",h.serverToClient="serverToClient",h.both="both"})(r||(e.MessageDirection=r={}));var i=class{static{o(this,"RegistrationType")}static{S(this,"RegistrationType")}constructor(h){this.method=h}};e.RegistrationType=i;var n=class extends t.RequestType0{static{o(this,"ProtocolRequestType0")}static{S(this,"ProtocolRequestType0")}constructor(h){super(h)}};e.ProtocolRequestType0=n;var a=class extends t.RequestType{static{o(this,"ProtocolRequestType")}static{S(this,"ProtocolRequestType")}constructor(h){super(h,t.ParameterStructures.byName)}};e.ProtocolRequestType=a;var s=class extends t.NotificationType0{static{o(this,"ProtocolNotificationType0")}static{S(this,"ProtocolNotificationType0")}constructor(h){super(h)}};e.ProtocolNotificationType0=s;var l=class extends t.NotificationType{static{o(this,"ProtocolNotificationType")}static{S(this,"ProtocolNotificationType")}constructor(h){super(h,t.ParameterStructures.byName)}};e.ProtocolNotificationType=l}}),oP=$r({"../../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}o(t,"boolean"),S(t,"boolean"),e.boolean=t;function r(d){return typeof d=="string"||d instanceof String}o(r,"string"),S(r,"string"),e.string=r;function i(d){return typeof d=="number"||d instanceof Number}o(i,"number"),S(i,"number"),e.number=i;function n(d){return d instanceof Error}o(n,"error"),S(n,"error"),e.error=n;function a(d){return typeof d=="function"}o(a,"func"),S(a,"func"),e.func=a;function s(d){return Array.isArray(d)}o(s,"array"),S(s,"array"),e.array=s;function l(d){return s(d)&&d.every(p=>r(p))}o(l,"stringArray"),S(l,"stringArray"),e.stringArray=l;function h(d,p){return Array.isArray(d)&&d.every(p)}o(h,"typedArray"),S(h,"typedArray"),e.typedArray=h;function u(d){return d!==null&&typeof d=="object"}o(u,"objectLiteral"),S(u,"objectLiteral"),e.objectLiteral=u}}),xZe=$r({"../../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=en(),r;(function(i){i.method="textDocument/implementation",i.messageDirection=t.MessageDirection.clientToServer,i.type=new t.ProtocolRequestType(i.method)})(r||(e.ImplementationRequest=r={}))}}),TZe=$r({"../../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=en(),r;(function(i){i.method="textDocument/typeDefinition",i.messageDirection=t.MessageDirection.clientToServer,i.type=new t.ProtocolRequestType(i.method)})(r||(e.TypeDefinitionRequest=r={}))}}),kZe=$r({"../../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=en(),r;(function(n){n.method="workspace/workspaceFolders",n.messageDirection=t.MessageDirection.serverToClient,n.type=new t.ProtocolRequestType0(n.method)})(r||(e.WorkspaceFoldersRequest=r={}));var i;(function(n){n.method="workspace/didChangeWorkspaceFolders",n.messageDirection=t.MessageDirection.clientToServer,n.type=new t.ProtocolNotificationType(n.method)})(i||(e.DidChangeWorkspaceFoldersNotification=i={}))}}),CZe=$r({"../../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=en(),r;(function(i){i.method="workspace/configuration",i.messageDirection=t.MessageDirection.serverToClient,i.type=new t.ProtocolRequestType(i.method)})(r||(e.ConfigurationRequest=r={}))}}),wZe=$r({"../../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=en(),r;(function(n){n.method="textDocument/documentColor",n.messageDirection=t.MessageDirection.clientToServer,n.type=new t.ProtocolRequestType(n.method)})(r||(e.DocumentColorRequest=r={}));var i;(function(n){n.method="textDocument/colorPresentation",n.messageDirection=t.MessageDirection.clientToServer,n.type=new t.ProtocolRequestType(n.method)})(i||(e.ColorPresentationRequest=i={}))}}),EZe=$r({"../../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=en(),r;(function(n){n.method="textDocument/foldingRange",n.messageDirection=t.MessageDirection.clientToServer,n.type=new t.ProtocolRequestType(n.method)})(r||(e.FoldingRangeRequest=r={}));var i;(function(n){n.method="workspace/foldingRange/refresh",n.messageDirection=t.MessageDirection.serverToClient,n.type=new t.ProtocolRequestType0(n.method)})(i||(e.FoldingRangeRefreshRequest=i={}))}}),SZe=$r({"../../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=en(),r;(function(i){i.method="textDocument/declaration",i.messageDirection=t.MessageDirection.clientToServer,i.type=new t.ProtocolRequestType(i.method)})(r||(e.DeclarationRequest=r={}))}}),_Ze=$r({"../../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=en(),r;(function(i){i.method="textDocument/selectionRange",i.messageDirection=t.MessageDirection.clientToServer,i.type=new t.ProtocolRequestType(i.method)})(r||(e.SelectionRangeRequest=r={}))}}),AZe=$r({"../../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=A1(),r=en(),i;(function(s){s.type=new t.ProgressType;function l(h){return h===s.type}o(l,"is"),S(l,"is"),s.is=l})(i||(e.WorkDoneProgress=i={}));var n;(function(s){s.method="window/workDoneProgress/create",s.messageDirection=r.MessageDirection.serverToClient,s.type=new r.ProtocolRequestType(s.method)})(n||(e.WorkDoneProgressCreateRequest=n={}));var a;(function(s){s.method="window/workDoneProgress/cancel",s.messageDirection=r.MessageDirection.clientToServer,s.type=new r.ProtocolNotificationType(s.method)})(a||(e.WorkDoneProgressCancelNotification=a={}))}}),RZe=$r({"../../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=en(),r;(function(a){a.method="textDocument/prepareCallHierarchy",a.messageDirection=t.MessageDirection.clientToServer,a.type=new t.ProtocolRequestType(a.method)})(r||(e.CallHierarchyPrepareRequest=r={}));var i;(function(a){a.method="callHierarchy/incomingCalls",a.messageDirection=t.MessageDirection.clientToServer,a.type=new t.ProtocolRequestType(a.method)})(i||(e.CallHierarchyIncomingCallsRequest=i={}));var n;(function(a){a.method="callHierarchy/outgoingCalls",a.messageDirection=t.MessageDirection.clientToServer,a.type=new t.ProtocolRequestType(a.method)})(n||(e.CallHierarchyOutgoingCallsRequest=n={}))}}),LZe=$r({"../../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=en(),r;(function(h){h.Relative="relative"})(r||(e.TokenFormat=r={}));var i;(function(h){h.method="textDocument/semanticTokens",h.type=new t.RegistrationType(h.method)})(i||(e.SemanticTokensRegistrationType=i={}));var n;(function(h){h.method="textDocument/semanticTokens/full",h.messageDirection=t.MessageDirection.clientToServer,h.type=new t.ProtocolRequestType(h.method),h.registrationMethod=i.method})(n||(e.SemanticTokensRequest=n={}));var a;(function(h){h.method="textDocument/semanticTokens/full/delta",h.messageDirection=t.MessageDirection.clientToServer,h.type=new t.ProtocolRequestType(h.method),h.registrationMethod=i.method})(a||(e.SemanticTokensDeltaRequest=a={}));var s;(function(h){h.method="textDocument/semanticTokens/range",h.messageDirection=t.MessageDirection.clientToServer,h.type=new t.ProtocolRequestType(h.method),h.registrationMethod=i.method})(s||(e.SemanticTokensRangeRequest=s={}));var l;(function(h){h.method="workspace/semanticTokens/refresh",h.messageDirection=t.MessageDirection.serverToClient,h.type=new t.ProtocolRequestType0(h.method)})(l||(e.SemanticTokensRefreshRequest=l={}))}}),$Ze=$r({"../../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=en(),r;(function(i){i.method="window/showDocument",i.messageDirection=t.MessageDirection.serverToClient,i.type=new t.ProtocolRequestType(i.method)})(r||(e.ShowDocumentRequest=r={}))}}),IZe=$r({"../../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=en(),r;(function(i){i.method="textDocument/linkedEditingRange",i.messageDirection=t.MessageDirection.clientToServer,i.type=new t.ProtocolRequestType(i.method)})(r||(e.LinkedEditingRangeRequest=r={}))}}),DZe=$r({"../../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=en(),r;(function(u){u.file="file",u.folder="folder"})(r||(e.FileOperationPatternKind=r={}));var i;(function(u){u.method="workspace/willCreateFiles",u.messageDirection=t.MessageDirection.clientToServer,u.type=new t.ProtocolRequestType(u.method)})(i||(e.WillCreateFilesRequest=i={}));var n;(function(u){u.method="workspace/didCreateFiles",u.messageDirection=t.MessageDirection.clientToServer,u.type=new t.ProtocolNotificationType(u.method)})(n||(e.DidCreateFilesNotification=n={}));var a;(function(u){u.method="workspace/willRenameFiles",u.messageDirection=t.MessageDirection.clientToServer,u.type=new t.ProtocolRequestType(u.method)})(a||(e.WillRenameFilesRequest=a={}));var s;(function(u){u.method="workspace/didRenameFiles",u.messageDirection=t.MessageDirection.clientToServer,u.type=new t.ProtocolNotificationType(u.method)})(s||(e.DidRenameFilesNotification=s={}));var l;(function(u){u.method="workspace/didDeleteFiles",u.messageDirection=t.MessageDirection.clientToServer,u.type=new t.ProtocolNotificationType(u.method)})(l||(e.DidDeleteFilesNotification=l={}));var h;(function(u){u.method="workspace/willDeleteFiles",u.messageDirection=t.MessageDirection.clientToServer,u.type=new t.ProtocolRequestType(u.method)})(h||(e.WillDeleteFilesRequest=h={}))}}),MZe=$r({"../../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=en(),r;(function(a){a.document="document",a.project="project",a.group="group",a.scheme="scheme",a.global="global"})(r||(e.UniquenessLevel=r={}));var i;(function(a){a.$import="import",a.$export="export",a.local="local"})(i||(e.MonikerKind=i={}));var n;(function(a){a.method="textDocument/moniker",a.messageDirection=t.MessageDirection.clientToServer,a.type=new t.ProtocolRequestType(a.method)})(n||(e.MonikerRequest=n={}))}}),NZe=$r({"../../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=en(),r;(function(a){a.method="textDocument/prepareTypeHierarchy",a.messageDirection=t.MessageDirection.clientToServer,a.type=new t.ProtocolRequestType(a.method)})(r||(e.TypeHierarchyPrepareRequest=r={}));var i;(function(a){a.method="typeHierarchy/supertypes",a.messageDirection=t.MessageDirection.clientToServer,a.type=new t.ProtocolRequestType(a.method)})(i||(e.TypeHierarchySupertypesRequest=i={}));var n;(function(a){a.method="typeHierarchy/subtypes",a.messageDirection=t.MessageDirection.clientToServer,a.type=new t.ProtocolRequestType(a.method)})(n||(e.TypeHierarchySubtypesRequest=n={}))}}),OZe=$r({"../../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=en(),r;(function(n){n.method="textDocument/inlineValue",n.messageDirection=t.MessageDirection.clientToServer,n.type=new t.ProtocolRequestType(n.method)})(r||(e.InlineValueRequest=r={}));var i;(function(n){n.method="workspace/inlineValue/refresh",n.messageDirection=t.MessageDirection.serverToClient,n.type=new t.ProtocolRequestType0(n.method)})(i||(e.InlineValueRefreshRequest=i={}))}}),BZe=$r({"../../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=en(),r;(function(a){a.method="textDocument/inlayHint",a.messageDirection=t.MessageDirection.clientToServer,a.type=new t.ProtocolRequestType(a.method)})(r||(e.InlayHintRequest=r={}));var i;(function(a){a.method="inlayHint/resolve",a.messageDirection=t.MessageDirection.clientToServer,a.type=new t.ProtocolRequestType(a.method)})(i||(e.InlayHintResolveRequest=i={}));var n;(function(a){a.method="workspace/inlayHint/refresh",a.messageDirection=t.MessageDirection.serverToClient,a.type=new t.ProtocolRequestType0(a.method)})(n||(e.InlayHintRefreshRequest=n={}))}}),PZe=$r({"../../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=A1(),r=oP(),i=en(),n;(function(u){function d(p){let f=p;return f&&r.boolean(f.retriggerRequest)}o(d,"is"),S(d,"is"),u.is=d})(n||(e.DiagnosticServerCancellationData=n={}));var a;(function(u){u.Full="full",u.Unchanged="unchanged"})(a||(e.DocumentDiagnosticReportKind=a={}));var s;(function(u){u.method="textDocument/diagnostic",u.messageDirection=i.MessageDirection.clientToServer,u.type=new i.ProtocolRequestType(u.method),u.partialResult=new t.ProgressType})(s||(e.DocumentDiagnosticRequest=s={}));var l;(function(u){u.method="workspace/diagnostic",u.messageDirection=i.MessageDirection.clientToServer,u.type=new i.ProtocolRequestType(u.method),u.partialResult=new t.ProgressType})(l||(e.WorkspaceDiagnosticRequest=l={}));var h;(function(u){u.method="workspace/diagnostic/refresh",u.messageDirection=i.MessageDirection.serverToClient,u.type=new i.ProtocolRequestType0(u.method)})(h||(e.DiagnosticRefreshRequest=h={}))}}),FZe=$r({"../../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=(Sx(),sP($E)),r=oP(),i=en(),n;(function(m){m.Markup=1,m.Code=2;function y(b){return b===1||b===2}o(y,"is"),S(y,"is"),m.is=y})(n||(e.NotebookCellKind=n={}));var a;(function(m){function y(T,x){let k={executionOrder:T};return(x===!0||x===!1)&&(k.success=x),k}o(y,"create"),S(y,"create"),m.create=y;function b(T){let x=T;return r.objectLiteral(x)&&t.uinteger.is(x.executionOrder)&&(x.success===void 0||r.boolean(x.success))}o(b,"is"),S(b,"is"),m.is=b;function v(T,x){return T===x?!0:T==null||x===null||x===void 0?!1:T.executionOrder===x.executionOrder&&T.success===x.success}o(v,"equals"),S(v,"equals"),m.equals=v})(a||(e.ExecutionSummary=a={}));var s;(function(m){function y(x,k){return{kind:x,document:k}}o(y,"create"),S(y,"create"),m.create=y;function b(x){let k=x;return r.objectLiteral(k)&&n.is(k.kind)&&t.DocumentUri.is(k.document)&&(k.metadata===void 0||r.objectLiteral(k.metadata))}o(b,"is"),S(b,"is"),m.is=b;function v(x,k){let C=new Set;return x.document!==k.document&&C.add("document"),x.kind!==k.kind&&C.add("kind"),x.executionSummary!==k.executionSummary&&C.add("executionSummary"),(x.metadata!==void 0||k.metadata!==void 0)&&!T(x.metadata,k.metadata)&&C.add("metadata"),(x.executionSummary!==void 0||k.executionSummary!==void 0)&&!a.equals(x.executionSummary,k.executionSummary)&&C.add("executionSummary"),C}o(v,"diff"),S(v,"diff"),m.diff=v;function T(x,k){if(x===k)return!0;if(x==null||k===null||k===void 0||typeof x!=typeof k||typeof x!="object")return!1;let C=Array.isArray(x),E=Array.isArray(k);if(C!==E)return!1;if(C&&E){if(x.length!==k.length)return!1;for(let w=0;w0}o(st,"hasId"),S(st,"hasId"),de.hasId=st})($||(e.StaticRegistrationOptions=$={}));var F;(function(de){function st(nt){let rt=nt;return rt&&(rt.documentSelector===null||M.is(rt.documentSelector))}o(st,"is"),S(st,"is"),de.is=st})(F||(e.TextDocumentRegistrationOptions=F={}));var P;(function(de){function st(rt){let _e=rt;return i.objectLiteral(_e)&&(_e.workDoneProgress===void 0||i.boolean(_e.workDoneProgress))}o(st,"is"),S(st,"is"),de.is=st;function nt(rt){let _e=rt;return _e&&i.boolean(_e.workDoneProgress)}o(nt,"hasWorkDoneProgress"),S(nt,"hasWorkDoneProgress"),de.hasWorkDoneProgress=nt})(P||(e.WorkDoneProgressOptions=P={}));var z;(function(de){de.method="initialize",de.messageDirection=t.MessageDirection.clientToServer,de.type=new t.ProtocolRequestType(de.method)})(z||(e.InitializeRequest=z={}));var q;(function(de){de.unknownProtocolVersion=1})(q||(e.InitializeErrorCodes=q={}));var G;(function(de){de.method="initialized",de.messageDirection=t.MessageDirection.clientToServer,de.type=new t.ProtocolNotificationType(de.method)})(G||(e.InitializedNotification=G={}));var W;(function(de){de.method="shutdown",de.messageDirection=t.MessageDirection.clientToServer,de.type=new t.ProtocolRequestType0(de.method)})(W||(e.ShutdownRequest=W={}));var J;(function(de){de.method="exit",de.messageDirection=t.MessageDirection.clientToServer,de.type=new t.ProtocolNotificationType0(de.method)})(J||(e.ExitNotification=J={}));var H;(function(de){de.method="workspace/didChangeConfiguration",de.messageDirection=t.MessageDirection.clientToServer,de.type=new t.ProtocolNotificationType(de.method)})(H||(e.DidChangeConfigurationNotification=H={}));var Z;(function(de){de.Error=1,de.Warning=2,de.Info=3,de.Log=4,de.Debug=5})(Z||(e.MessageType=Z={}));var se;(function(de){de.method="window/showMessage",de.messageDirection=t.MessageDirection.serverToClient,de.type=new t.ProtocolNotificationType(de.method)})(se||(e.ShowMessageNotification=se={}));var Q;(function(de){de.method="window/showMessageRequest",de.messageDirection=t.MessageDirection.serverToClient,de.type=new t.ProtocolRequestType(de.method)})(Q||(e.ShowMessageRequest=Q={}));var te;(function(de){de.method="window/logMessage",de.messageDirection=t.MessageDirection.serverToClient,de.type=new t.ProtocolNotificationType(de.method)})(te||(e.LogMessageNotification=te={}));var re;(function(de){de.method="telemetry/event",de.messageDirection=t.MessageDirection.serverToClient,de.type=new t.ProtocolNotificationType(de.method)})(re||(e.TelemetryEventNotification=re={}));var ne;(function(de){de.None=0,de.Full=1,de.Incremental=2})(ne||(e.TextDocumentSyncKind=ne={}));var Ae;(function(de){de.method="textDocument/didOpen",de.messageDirection=t.MessageDirection.clientToServer,de.type=new t.ProtocolNotificationType(de.method)})(Ae||(e.DidOpenTextDocumentNotification=Ae={}));var ie;(function(de){function st(rt){let _e=rt;return _e!=null&&typeof _e.text=="string"&&_e.range!==void 0&&(_e.rangeLength===void 0||typeof _e.rangeLength=="number")}o(st,"isIncremental"),S(st,"isIncremental"),de.isIncremental=st;function nt(rt){let _e=rt;return _e!=null&&typeof _e.text=="string"&&_e.range===void 0&&_e.rangeLength===void 0}o(nt,"isFull"),S(nt,"isFull"),de.isFull=nt})(ie||(e.TextDocumentContentChangeEvent=ie={}));var me;(function(de){de.method="textDocument/didChange",de.messageDirection=t.MessageDirection.clientToServer,de.type=new t.ProtocolNotificationType(de.method)})(me||(e.DidChangeTextDocumentNotification=me={}));var oe;(function(de){de.method="textDocument/didClose",de.messageDirection=t.MessageDirection.clientToServer,de.type=new t.ProtocolNotificationType(de.method)})(oe||(e.DidCloseTextDocumentNotification=oe={}));var we;(function(de){de.method="textDocument/didSave",de.messageDirection=t.MessageDirection.clientToServer,de.type=new t.ProtocolNotificationType(de.method)})(we||(e.DidSaveTextDocumentNotification=we={}));var ye;(function(de){de.Manual=1,de.AfterDelay=2,de.FocusOut=3})(ye||(e.TextDocumentSaveReason=ye={}));var ve;(function(de){de.method="textDocument/willSave",de.messageDirection=t.MessageDirection.clientToServer,de.type=new t.ProtocolNotificationType(de.method)})(ve||(e.WillSaveTextDocumentNotification=ve={}));var ae;(function(de){de.method="textDocument/willSaveWaitUntil",de.messageDirection=t.MessageDirection.clientToServer,de.type=new t.ProtocolRequestType(de.method)})(ae||(e.WillSaveTextDocumentWaitUntilRequest=ae={}));var Pe;(function(de){de.method="workspace/didChangeWatchedFiles",de.messageDirection=t.MessageDirection.clientToServer,de.type=new t.ProtocolNotificationType(de.method)})(Pe||(e.DidChangeWatchedFilesNotification=Pe={}));var X;(function(de){de.Created=1,de.Changed=2,de.Deleted=3})(X||(e.FileChangeType=X={}));var ce;(function(de){function st(nt){let rt=nt;return i.objectLiteral(rt)&&(r.URI.is(rt.baseUri)||r.WorkspaceFolder.is(rt.baseUri))&&i.string(rt.pattern)}o(st,"is"),S(st,"is"),de.is=st})(ce||(e.RelativePattern=ce={}));var ge;(function(de){de.Create=1,de.Change=2,de.Delete=4})(ge||(e.WatchKind=ge={}));var be;(function(de){de.method="textDocument/publishDiagnostics",de.messageDirection=t.MessageDirection.serverToClient,de.type=new t.ProtocolNotificationType(de.method)})(be||(e.PublishDiagnosticsNotification=be={}));var ke;(function(de){de.Invoked=1,de.TriggerCharacter=2,de.TriggerForIncompleteCompletions=3})(ke||(e.CompletionTriggerKind=ke={}));var Me;(function(de){de.method="textDocument/completion",de.messageDirection=t.MessageDirection.clientToServer,de.type=new t.ProtocolRequestType(de.method)})(Me||(e.CompletionRequest=Me={}));var pe;(function(de){de.method="completionItem/resolve",de.messageDirection=t.MessageDirection.clientToServer,de.type=new t.ProtocolRequestType(de.method)})(pe||(e.CompletionResolveRequest=pe={}));var Oe;(function(de){de.method="textDocument/hover",de.messageDirection=t.MessageDirection.clientToServer,de.type=new t.ProtocolRequestType(de.method)})(Oe||(e.HoverRequest=Oe={}));var j;(function(de){de.Invoked=1,de.TriggerCharacter=2,de.ContentChange=3})(j||(e.SignatureHelpTriggerKind=j={}));var le;(function(de){de.method="textDocument/signatureHelp",de.messageDirection=t.MessageDirection.clientToServer,de.type=new t.ProtocolRequestType(de.method)})(le||(e.SignatureHelpRequest=le={}));var U;(function(de){de.method="textDocument/definition",de.messageDirection=t.MessageDirection.clientToServer,de.type=new t.ProtocolRequestType(de.method)})(U||(e.DefinitionRequest=U={}));var fe;(function(de){de.method="textDocument/references",de.messageDirection=t.MessageDirection.clientToServer,de.type=new t.ProtocolRequestType(de.method)})(fe||(e.ReferencesRequest=fe={}));var Y;(function(de){de.method="textDocument/documentHighlight",de.messageDirection=t.MessageDirection.clientToServer,de.type=new t.ProtocolRequestType(de.method)})(Y||(e.DocumentHighlightRequest=Y={}));var Le;(function(de){de.method="textDocument/documentSymbol",de.messageDirection=t.MessageDirection.clientToServer,de.type=new t.ProtocolRequestType(de.method)})(Le||(e.DocumentSymbolRequest=Le={}));var xe;(function(de){de.method="textDocument/codeAction",de.messageDirection=t.MessageDirection.clientToServer,de.type=new t.ProtocolRequestType(de.method)})(xe||(e.CodeActionRequest=xe={}));var je;(function(de){de.method="codeAction/resolve",de.messageDirection=t.MessageDirection.clientToServer,de.type=new t.ProtocolRequestType(de.method)})(je||(e.CodeActionResolveRequest=je={}));var Ie;(function(de){de.method="workspace/symbol",de.messageDirection=t.MessageDirection.clientToServer,de.type=new t.ProtocolRequestType(de.method)})(Ie||(e.WorkspaceSymbolRequest=Ie={}));var Ve;(function(de){de.method="workspaceSymbol/resolve",de.messageDirection=t.MessageDirection.clientToServer,de.type=new t.ProtocolRequestType(de.method)})(Ve||(e.WorkspaceSymbolResolveRequest=Ve={}));var Ne;(function(de){de.method="textDocument/codeLens",de.messageDirection=t.MessageDirection.clientToServer,de.type=new t.ProtocolRequestType(de.method)})(Ne||(e.CodeLensRequest=Ne={}));var Ge;(function(de){de.method="codeLens/resolve",de.messageDirection=t.MessageDirection.clientToServer,de.type=new t.ProtocolRequestType(de.method)})(Ge||(e.CodeLensResolveRequest=Ge={}));var ze;(function(de){de.method="workspace/codeLens/refresh",de.messageDirection=t.MessageDirection.serverToClient,de.type=new t.ProtocolRequestType0(de.method)})(ze||(e.CodeLensRefreshRequest=ze={}));var Ue;(function(de){de.method="textDocument/documentLink",de.messageDirection=t.MessageDirection.clientToServer,de.type=new t.ProtocolRequestType(de.method)})(Ue||(e.DocumentLinkRequest=Ue={}));var Ce;(function(de){de.method="documentLink/resolve",de.messageDirection=t.MessageDirection.clientToServer,de.type=new t.ProtocolRequestType(de.method)})(Ce||(e.DocumentLinkResolveRequest=Ce={}));var ct;(function(de){de.method="textDocument/formatting",de.messageDirection=t.MessageDirection.clientToServer,de.type=new t.ProtocolRequestType(de.method)})(ct||(e.DocumentFormattingRequest=ct={}));var Se;(function(de){de.method="textDocument/rangeFormatting",de.messageDirection=t.MessageDirection.clientToServer,de.type=new t.ProtocolRequestType(de.method)})(Se||(e.DocumentRangeFormattingRequest=Se={}));var at;(function(de){de.method="textDocument/rangesFormatting",de.messageDirection=t.MessageDirection.clientToServer,de.type=new t.ProtocolRequestType(de.method)})(at||(e.DocumentRangesFormattingRequest=at={}));var dt;(function(de){de.method="textDocument/onTypeFormatting",de.messageDirection=t.MessageDirection.clientToServer,de.type=new t.ProtocolRequestType(de.method)})(dt||(e.DocumentOnTypeFormattingRequest=dt={}));var gt;(function(de){de.Identifier=1})(gt||(e.PrepareSupportDefaultBehavior=gt={}));var Ct;(function(de){de.method="textDocument/rename",de.messageDirection=t.MessageDirection.clientToServer,de.type=new t.ProtocolRequestType(de.method)})(Ct||(e.RenameRequest=Ct={}));var kt;(function(de){de.method="textDocument/prepareRename",de.messageDirection=t.MessageDirection.clientToServer,de.type=new t.ProtocolRequestType(de.method)})(kt||(e.PrepareRenameRequest=kt={}));var $t;(function(de){de.method="workspace/executeCommand",de.messageDirection=t.MessageDirection.clientToServer,de.type=new t.ProtocolRequestType(de.method)})($t||(e.ExecuteCommandRequest=$t={}));var ut;(function(de){de.method="workspace/applyEdit",de.messageDirection=t.MessageDirection.serverToClient,de.type=new t.ProtocolRequestType("workspace/applyEdit")})(ut||(e.ApplyWorkspaceEditRequest=ut={}))}}),jZe=$r({"../../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=A1();function r(i,n,a,s){return t.ConnectionStrategy.is(s)&&(s={connectionStrategy:s}),(0,t.createMessageConnection)(i,n,a,s)}o(r,"createProtocolConnection"),S(r,"createProtocolConnection"),e.createProtocolConnection=r}}),GZe=$r({"../../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,s,l,h){h===void 0&&(h=l);var u=Object.getOwnPropertyDescriptor(s,l);(!u||("get"in u?!s.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:S(function(){return s[l]},"get")}),Object.defineProperty(a,h,u)}):(function(a,s,l,h){h===void 0&&(h=l),a[h]=s[l]})),r=e&&e.__exportStar||function(a,s){for(var l in a)l!=="default"&&!Object.prototype.hasOwnProperty.call(s,l)&&t(s,a,l)};Object.defineProperty(e,"__esModule",{value:!0}),e.LSPErrorCodes=e.createProtocolConnection=void 0,r(A1(),e),r((Sx(),sP($E)),e),r(en(),e),r(qZe(),e);var i=jZe();Object.defineProperty(e,"createProtocolConnection",{enumerable:!0,get:S(function(){return i.createProtocolConnection},"get")});var n;(function(a){a.lspReservedErrorRangeStart=-32899,a.RequestFailed=-32803,a.ServerCancelled=-32802,a.ContentModified=-32801,a.RequestCancelled=-32800,a.lspReservedErrorRangeEnd=-32800})(n||(e.LSPErrorCodes=n={}))}}),WZe=$r({"../../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,s,l,h){h===void 0&&(h=l);var u=Object.getOwnPropertyDescriptor(s,l);(!u||("get"in u?!s.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:S(function(){return s[l]},"get")}),Object.defineProperty(a,h,u)}):(function(a,s,l,h){h===void 0&&(h=l),a[h]=s[l]})),r=e&&e.__exportStar||function(a,s){for(var l in a)l!=="default"&&!Object.prototype.hasOwnProperty.call(s,l)&&t(s,a,l)};Object.defineProperty(e,"__esModule",{value:!0}),e.createProtocolConnection=void 0;var i=b4e();r(b4e(),e),r(GZe(),e);function n(a,s,l,h){return(0,i.createMessageConnection)(a,s,l,h)}o(n,"createProtocolConnection"),S(n,"createProtocolConnection"),e.createProtocolConnection=n}}),Z3e={};Od(Z3e,{AbstractAstReflection:o(()=>cP,"AbstractAstReflection"),AbstractCstNode:o(()=>nY,"AbstractCstNode"),AbstractLangiumParser:o(()=>sY,"AbstractLangiumParser"),AbstractParserErrorMessageProvider:o(()=>_we,"AbstractParserErrorMessageProvider"),AbstractThreadedAsyncParser:o(()=>Tct,"AbstractThreadedAsyncParser"),AstUtils:o(()=>uP,"AstUtils"),BiMap:o(()=>EE,"BiMap"),Cancellation:o(()=>Ii,"Cancellation"),CompositeCstNodeImpl:o(()=>A6,"CompositeCstNodeImpl"),ContextCache:o(()=>z6,"ContextCache"),CstNodeBuilder:o(()=>Cwe,"CstNodeBuilder"),CstUtils:o(()=>lP,"CstUtils"),DEFAULT_TOKENIZE_OPTIONS:o(()=>CY,"DEFAULT_TOKENIZE_OPTIONS"),DONE_RESULT:o(()=>xs,"DONE_RESULT"),DatatypeSymbol:o(()=>kE,"DatatypeSymbol"),DefaultAstNodeDescriptionProvider:o(()=>Vwe,"DefaultAstNodeDescriptionProvider"),DefaultAstNodeLocator:o(()=>Hwe,"DefaultAstNodeLocator"),DefaultAsyncParser:o(()=>i5e,"DefaultAsyncParser"),DefaultCommentProvider:o(()=>r5e,"DefaultCommentProvider"),DefaultConfigurationProvider:o(()=>Xwe,"DefaultConfigurationProvider"),DefaultDocumentBuilder:o(()=>Kwe,"DefaultDocumentBuilder"),DefaultDocumentValidator:o(()=>Uwe,"DefaultDocumentValidator"),DefaultHydrator:o(()=>a5e,"DefaultHydrator"),DefaultIndexManager:o(()=>Zwe,"DefaultIndexManager"),DefaultJsonSerializer:o(()=>qwe,"DefaultJsonSerializer"),DefaultLangiumDocumentFactory:o(()=>Iwe,"DefaultLangiumDocumentFactory"),DefaultLangiumDocuments:o(()=>Dwe,"DefaultLangiumDocuments"),DefaultLangiumProfiler:o(()=>Sct,"DefaultLangiumProfiler"),DefaultLexer:o(()=>wY,"DefaultLexer"),DefaultLexerErrorMessageProvider:o(()=>Jwe,"DefaultLexerErrorMessageProvider"),DefaultLinker:o(()=>Mwe,"DefaultLinker"),DefaultNameProvider:o(()=>Nwe,"DefaultNameProvider"),DefaultReferenceDescriptionProvider:o(()=>Ywe,"DefaultReferenceDescriptionProvider"),DefaultReferences:o(()=>Owe,"DefaultReferences"),DefaultScopeComputation:o(()=>Bwe,"DefaultScopeComputation"),DefaultScopeProvider:o(()=>zwe,"DefaultScopeProvider"),DefaultServiceRegistry:o(()=>jwe,"DefaultServiceRegistry"),DefaultTokenBuilder:o(()=>M6,"DefaultTokenBuilder"),DefaultValueConverter:o(()=>vY,"DefaultValueConverter"),DefaultWorkspaceLock:o(()=>n5e,"DefaultWorkspaceLock"),DefaultWorkspaceManager:o(()=>Qwe,"DefaultWorkspaceManager"),Deferred:o(()=>Qh,"Deferred"),Disposable:o(()=>og,"Disposable"),DisposableCache:o(()=>F6,"DisposableCache"),DocumentCache:o(()=>Fwe,"DocumentCache"),DocumentState:o(()=>qr,"DocumentState"),DocumentValidator:o(()=>Ko,"DocumentValidator"),EMPTY_SCOPE:o(()=>yct,"EMPTY_SCOPE"),EMPTY_STREAM:o(()=>p1,"EMPTY_STREAM"),EmptyFileSystem:o(()=>ci,"EmptyFileSystem"),EmptyFileSystemProvider:o(()=>l5e,"EmptyFileSystemProvider"),ErrorWithLocation:o(()=>oS,"ErrorWithLocation"),GrammarAST:o(()=>Q3e,"GrammarAST"),GrammarUtils:o(()=>PP,"GrammarUtils"),IndentationAwareLexer:o(()=>Cct,"IndentationAwareLexer"),IndentationAwareTokenBuilder:o(()=>o5e,"IndentationAwareTokenBuilder"),JSDocDocumentationProvider:o(()=>t5e,"JSDocDocumentationProvider"),LangiumCompletionParser:o(()=>Awe,"LangiumCompletionParser"),LangiumParser:o(()=>Swe,"LangiumParser"),LangiumParserErrorMessageProvider:o(()=>oY,"LangiumParserErrorMessageProvider"),LeafCstNodeImpl:o(()=>TE,"LeafCstNodeImpl"),LexingMode:o(()=>ng,"LexingMode"),MapScope:o(()=>mct,"MapScope"),Module:o(()=>zB,"Module"),MultiMap:o(()=>Jh,"MultiMap"),MultiMapScope:o(()=>Pwe,"MultiMapScope"),OperationCancelled:o(()=>Bc,"OperationCancelled"),ParserWorker:o(()=>kct,"ParserWorker"),ProfilingTask:o(()=>c5e,"ProfilingTask"),Reduction:o(()=>nx,"Reduction"),RefResolving:o(()=>Ff,"RefResolving"),RegExpUtils:o(()=>FP,"RegExpUtils"),RootCstNodeImpl:o(()=>aY,"RootCstNodeImpl"),SimpleCache:o(()=>TY,"SimpleCache"),StreamImpl:o(()=>Oc,"StreamImpl"),StreamScope:o(()=>PB,"StreamScope"),TextDocument:o(()=>CE,"TextDocument"),TreeStreamImpl:o(()=>f1,"TreeStreamImpl"),URI:o(()=>mo,"URI"),UriTrie:o(()=>xY,"UriTrie"),UriUtils:o(()=>Ts,"UriUtils"),VALIDATE_EACH_NODE:o(()=>Wwe,"VALIDATE_EACH_NODE"),ValidationCategory:o(()=>_E,"ValidationCategory"),ValidationRegistry:o(()=>Gwe,"ValidationRegistry"),ValueConverter:o(()=>Mc,"ValueConverter"),WorkspaceCache:o(()=>kY,"WorkspaceCache"),assertCondition:o(()=>lS,"assertCondition"),assertUnreachable:o(()=>eu,"assertUnreachable"),createCompletionParser:o(()=>$6,"createCompletionParser"),createDefaultCoreModule:o(()=>Jr,"createDefaultCoreModule"),createDefaultSharedCoreModule:o(()=>ei,"createDefaultSharedCoreModule"),createGrammarConfig:o(()=>SS,"createGrammarConfig"),createLangiumParser:o(()=>I6,"createLangiumParser"),createParser:o(()=>nT,"createParser"),delayNextTick:o(()=>sT,"delayNextTick"),diagnosticData:o(()=>Rd,"diagnosticData"),eagerLoad:o(()=>Z6,"eagerLoad"),getDiagnosticRange:o(()=>j6,"getDiagnosticRange"),indentationBuilderDefaultOptions:o(()=>qB,"indentationBuilderDefaultOptions"),inject:o(()=>vr,"inject"),interruptAndCheck:o(()=>Wn,"interruptAndCheck"),isAstNode:o(()=>Tn,"isAstNode"),isAstNodeDescription:o(()=>DE,"isAstNodeDescription"),isAstNodeWithComment:o(()=>q6,"isAstNodeWithComment"),isCompositeCstNode:o(()=>Pc,"isCompositeCstNode"),isIMultiModeLexerDefinition:o(()=>cT,"isIMultiModeLexerDefinition"),isJSDoc:o(()=>V6,"isJSDoc"),isLeafCstNode:o(()=>Bd,"isLeafCstNode"),isLinkingError:o(()=>Ad,"isLinkingError"),isMultiReference:o(()=>Nl,"isMultiReference"),isNamed:o(()=>P6,"isNamed"),isOperationCancelled:o(()=>ep,"isOperationCancelled"),isReference:o(()=>Qa,"isReference"),isRootCstNode:o(()=>Ax,"isRootCstNode"),isTokenTypeArray:o(()=>lT,"isTokenTypeArray"),isTokenTypeDictionary:o(()=>Cx,"isTokenTypeDictionary"),loadGrammarFromJson:o(()=>Un,"loadGrammarFromJson"),parseJSDoc:o(()=>U6,"parseJSDoc"),prepareLangiumParser:o(()=>D6,"prepareLangiumParser"),setInterruptionPeriod:o(()=>N6,"setInterruptionPeriod"),startCancelableOperation:o(()=>oT,"startCancelableOperation"),stream:o(()=>vi,"stream"),toDiagnosticData:o(()=>G6,"toDiagnosticData"),toDiagnosticSeverity:o(()=>u1,"toDiagnosticSeverity")});lP={};Od(lP,{DefaultNameRegexp:o(()=>IP,"DefaultNameRegexp"),RangeComparison:o(()=>Nc,"RangeComparison"),compareRange:o(()=>tS,"compareRange"),findCommentNode:o(()=>iS,"findCommentNode"),findDeclarationNodeAtOffset:o(()=>DP,"findDeclarationNodeAtOffset"),findLeafNodeAtOffset:o(()=>Nx,"findLeafNodeAtOffset"),findLeafNodeBeforeOffset:o(()=>nS,"findLeafNodeBeforeOffset"),flattenCst:o(()=>$P,"flattenCst"),getDatatypeNode:o(()=>LP,"getDatatypeNode"),getInteriorNodes:o(()=>OP,"getInteriorNodes"),getNextNode:o(()=>MP,"getNextNode"),getPreviousNode:o(()=>sS,"getPreviousNode"),getStartlineNode:o(()=>NP,"getStartlineNode"),inRange:o(()=>rS,"inRange"),isChildNode:o(()=>eS,"isChildNode"),isCommentNode:o(()=>lx,"isCommentNode"),streamCst:o(()=>ug,"streamCst"),toDocumentSegment:o(()=>dg,"toDocumentSegment"),tokenToRange:o(()=>g1,"tokenToRange")});o(Tn,"isAstNode");S(Tn,"isAstNode");o(Qa,"isReference");S(Qa,"isReference");o(Nl,"isMultiReference");S(Nl,"isMultiReference");o(DE,"isAstNodeDescription");S(DE,"isAstNodeDescription");o(Ad,"isLinkingError");S(Ad,"isLinkingError");cP=class{static{o(this,"AbstractAstReflection")}static{S(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){return this.types[e]||{name:e,properties:{},superTypes:[]}}isInstance(e,t){return Tn(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 i=r[t];if(i!==void 0)return i;{let n=this.types[e],a=n?n.superTypes.some(s=>this.isSubtype(s,t)):!1;return r[t]=a,a}}getAllSubTypes(e){let t=this.allSubtypes[e];if(t)return t;{let r=this.getAllTypes(),i=[];for(let n of r)this.isSubtype(n,e)&&i.push(n);return this.allSubtypes[e]=i,i}}};o(Pc,"isCompositeCstNode");S(Pc,"isCompositeCstNode");o(Bd,"isLeafCstNode");S(Bd,"isLeafCstNode");o(Ax,"isRootCstNode");S(Ax,"isRootCstNode");Oc=class jh{static{o(this,"_StreamImpl")}static{S(this,"StreamImpl")}constructor(t,r){this.startFn=t,this.nextFn=r}iterator(){let t={state:this.startFn(),next:S(()=>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,i=t.next();for(;!i.done;)r++,i=t.next();return r}toArray(){let t=[],r=this.iterator(),i;do i=r.next(),i.value!==void 0&&t.push(i.value);while(!i.done);return t}toSet(){return new Set(this)}toMap(t,r){let i=this.map(n=>[t?t(n):n,r?r(n):n]);return new Map(i)}toString(){return this.join()}concat(t){return new jh(()=>({first:this.startFn(),firstDone:!1,iterator:t[Symbol.iterator]()}),r=>{let i;if(!r.firstDone){do if(i=this.nextFn(r.first),!i.done)return i;while(!i.done);r.firstDone=!0}do if(i=r.iterator.next(),!i.done)return i;while(!i.done);return xs})}join(t=","){let r=this.iterator(),i="",n,a=!1;do n=r.next(),n.done||(a&&(i+=t),i+=hP(n.value)),a=!0;while(!n.done);return i}indexOf(t,r=0){let i=this.iterator(),n=0,a=i.next();for(;!a.done;){if(n>=r&&a.value===t)return n;a=i.next(),n++}return-1}every(t){let r=this.iterator(),i=r.next();for(;!i.done;){if(!t(i.value))return!1;i=r.next()}return!0}some(t){let r=this.iterator(),i=r.next();for(;!i.done;){if(t(i.value))return!0;i=r.next()}return!1}forEach(t){let r=this.iterator(),i=0,n=r.next();for(;!n.done;)t(n.value,i),n=r.next(),i++}map(t){return new jh(this.startFn,r=>{let{done:i,value:n}=this.nextFn(r);return i?xs:{done:!1,value:t(n)}})}filter(t){return new jh(this.startFn,r=>{let i;do if(i=this.nextFn(r),!i.done&&t(i.value))return i;while(!i.done);return xs})}nonNullable(){return this.filter(t=>t!=null)}reduce(t,r){let i=this.iterator(),n=r,a=i.next();for(;!a.done;)n===void 0?n=a.value:n=t(n,a.value),a=i.next();return n}reduceRight(t,r){return this.recursiveReduce(this.iterator(),t,r)}recursiveReduce(t,r,i){let n=t.next();if(n.done)return i;let a=this.recursiveReduce(t,r,i);return a===void 0?n.value:r(a,n.value)}find(t){let r=this.iterator(),i=r.next();for(;!i.done;){if(t(i.value))return i.value;i=r.next()}}findIndex(t){let r=this.iterator(),i=0,n=r.next();for(;!n.done;){if(t(n.value))return i;n=r.next(),i++}return-1}includes(t){let r=this.iterator(),i=r.next();for(;!i.done;){if(i.value===t)return!0;i=r.next()}return!1}flatMap(t){return new jh(()=>({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:i,value:n}=this.nextFn(r.this);if(!i){let a=t(n);if(d1(a))r.iterator=a[Symbol.iterator]();else return{done:!1,value:a}}}while(r.iterator);return xs})}flat(t){if(t===void 0&&(t=1),t<=0)return this;let r=t>1?this.flat(t-1):this;return new jh(()=>({this:r.startFn()}),i=>{do{if(i.iterator){let s=i.iterator.next();if(s.done)i.iterator=void 0;else return s}let{done:n,value:a}=r.nextFn(i.this);if(!n)if(d1(a))i.iterator=a[Symbol.iterator]();else return{done:!1,value:a}}while(i.iterator);return xs})}head(){let t=this.iterator().next();if(!t.done)return t.value}tail(t=1){return new jh(()=>{let r=this.startFn();for(let i=0;i({size:0,state:this.startFn()}),r=>(r.size++,r.size>t?xs:this.nextFn(r.state)))}distinct(t){return new jh(()=>({set:new Set,internalState:this.startFn()}),r=>{let i;do if(i=this.nextFn(r.internalState),!i.done){let n=t?t(i.value):i.value;if(!r.set.has(n))return r.set.add(n),i}while(!i.done);return xs})}exclude(t,r){let i=new Set;for(let n of t){let a=r?r(n):n;i.add(a)}return this.filter(n=>{let a=r?r(n):n;return!i.has(a)})}};o(hP,"toString");S(hP,"toString");o(d1,"isIterable");S(d1,"isIterable");p1=new Oc(()=>{},()=>xs),xs=Object.freeze({done:!0,value:void 0});o(vi,"stream");S(vi,"stream");f1=class extends Oc{static{o(this,"TreeStreamImpl")}static{S(this,"TreeStreamImpl")}constructor(e,t,r){super(()=>({iterators:r?.includeRoot?[[e][Symbol.iterator]()]:[t(e)[Symbol.iterator]()],pruned:!1}),i=>{for(i.pruned&&(i.iterators.pop(),i.pruned=!1);i.iterators.length>0;){let n=i.iterators[i.iterators.length-1].next();if(n.done)i.iterators.pop();else return i.iterators.push(t(n.value)[Symbol.iterator]()),n}return xs})}iterator(){let e={state:this.startFn(),next:S(()=>this.nextFn(e.state),"next"),prune:S(()=>{e.state.pruned=!0},"prune"),[Symbol.iterator]:()=>e};return e}};(function(e){function t(a){return a.reduce((s,l)=>s+l,0)}o(t,"sum"),S(t,"sum"),e.sum=t;function r(a){return a.reduce((s,l)=>s*l,0)}o(r,"product"),S(r,"product"),e.product=r;function i(a){return a.reduce((s,l)=>Math.min(s,l))}o(i,"min2"),S(i,"min"),e.min=i;function n(a){return a.reduce((s,l)=>Math.max(s,l))}o(n,"max"),S(n,"max"),e.max=n})(nx||(nx={}));uP={};Od(uP,{assignMandatoryProperties:o(()=>ME,"assignMandatoryProperties"),copyAstNode:o(()=>ox,"copyAstNode"),findRootNode:o(()=>ag,"findRootNode"),getContainerOfType:o(()=>Pd,"getContainerOfType"),getDocument:o(()=>Zo,"getDocument"),getReferenceNodes:o(()=>ax,"getReferenceNodes"),hasContainerOfType:o(()=>dP,"hasContainerOfType"),linkContentToContainer:o(()=>lg,"linkContentToContainer"),streamAllContents:o(()=>Wc,"streamAllContents"),streamAst:o(()=>Qo,"streamAst"),streamContents:o(()=>R1,"streamContents"),streamReferences:o(()=>cg,"streamReferences")});o(lg,"linkContentToContainer");S(lg,"linkContentToContainer");o(Pd,"getContainerOfType");S(Pd,"getContainerOfType");o(dP,"hasContainerOfType");S(dP,"hasContainerOfType");o(Zo,"getDocument");S(Zo,"getDocument");o(ag,"findRootNode");S(ag,"findRootNode");o(ax,"getReferenceNodes");S(ax,"getReferenceNodes");o(R1,"streamContents");S(R1,"streamContents");o(Wc,"streamAllContents");S(Wc,"streamAllContents");o(Qo,"streamAst");S(Qo,"streamAst");o(sx,"isAstNodeInRange");S(sx,"isAstNodeInRange");o(cg,"streamReferences");S(cg,"streamReferences");o(ME,"assignMandatoryProperties");S(ME,"assignMandatoryProperties");o(NE,"copyDefaultValue");S(NE,"copyDefaultValue");o(ox,"copyAstNode");S(ox,"copyAstNode");Q3e={};Od(Q3e,{AbstractElement:o(()=>Us,"AbstractElement"),AbstractParserRule:o(()=>Fb,"AbstractParserRule"),AbstractRule:o(()=>Km,"AbstractRule"),AbstractType:o(()=>go,"AbstractType"),Action:o(()=>kd,"Action"),Alternatives:o(()=>zb,"Alternatives"),ArrayLiteral:o(()=>F5,"ArrayLiteral"),ArrayType:o(()=>z5,"ArrayType"),Assignment:o(()=>Cd,"Assignment"),BooleanLiteral:o(()=>q5,"BooleanLiteral"),CharacterRange:o(()=>wd,"CharacterRange"),Condition:o(()=>Ed,"Condition"),Conjunction:o(()=>qb,"Conjunction"),CrossReference:o(()=>Sd,"CrossReference"),Disjunction:o(()=>jb,"Disjunction"),EndOfFile:o(()=>j5,"EndOfFile"),Grammar:o(()=>Wh,"Grammar"),GrammarImport:o(()=>G5,"GrammarImport"),Group:o(()=>Gf,"Group"),InferredType:o(()=>W5,"InferredType"),InfixRule:o(()=>Dc,"InfixRule"),InfixRuleOperatorList:o(()=>Gb,"InfixRuleOperatorList"),InfixRuleOperators:o(()=>U5,"InfixRuleOperators"),Interface:o(()=>Zm,"Interface"),Keyword:o(()=>Qm,"Keyword"),LangiumGrammarAstReflection:o(()=>RP,"LangiumGrammarAstReflection"),LangiumGrammarTerminals:o(()=>UZe,"LangiumGrammarTerminals"),NamedArgument:o(()=>Jm,"NamedArgument"),NegatedToken:o(()=>Wf,"NegatedToken"),Negation:o(()=>V5,"Negation"),NumberLiteral:o(()=>Y5,"NumberLiteral"),Parameter:o(()=>e1,"Parameter"),ParameterReference:o(()=>H5,"ParameterReference"),ParserRule:o(()=>Ml,"ParserRule"),ReferenceType:o(()=>Wb,"ReferenceType"),RegexToken:o(()=>Uf,"RegexToken"),ReturnType:o(()=>X5,"ReturnType"),RuleCall:o(()=>Vf,"RuleCall"),SimpleType:o(()=>t1,"SimpleType"),StringLiteral:o(()=>K5,"StringLiteral"),TerminalAlternatives:o(()=>Yf,"TerminalAlternatives"),TerminalElement:o(()=>Vs,"TerminalElement"),TerminalGroup:o(()=>Hf,"TerminalGroup"),TerminalRule:o(()=>Uh,"TerminalRule"),TerminalRuleCall:o(()=>Xf,"TerminalRuleCall"),Type:o(()=>Ub,"Type"),TypeAttribute:o(()=>Kf,"TypeAttribute"),TypeDefinition:o(()=>Zf,"TypeDefinition"),UnionType:o(()=>Z5,"UnionType"),UnorderedGroup:o(()=>Vb,"UnorderedGroup"),UntilToken:o(()=>Qf,"UntilToken"),ValueLiteral:o(()=>Jf,"ValueLiteral"),Wildcard:o(()=>r1,"Wildcard"),isAbstractElement:o(()=>Rx,"isAbstractElement"),isAbstractParserRule:o(()=>Fd,"isAbstractParserRule"),isAbstractRule:o(()=>pP,"isAbstractRule"),isAbstractType:o(()=>fP,"isAbstractType"),isAction:o(()=>Yh,"isAction"),isAlternatives:o(()=>Lx,"isAlternatives"),isArrayLiteral:o(()=>gP,"isArrayLiteral"),isArrayType:o(()=>OE,"isArrayType"),isAssignment:o(()=>Fc,"isAssignment"),isBooleanLiteral:o(()=>BE,"isBooleanLiteral"),isCharacterRange:o(()=>PE,"isCharacterRange"),isCondition:o(()=>mP,"isCondition"),isConjunction:o(()=>FE,"isConjunction"),isCrossReference:o(()=>zd,"isCrossReference"),isDisjunction:o(()=>zE,"isDisjunction"),isEndOfFile:o(()=>qE,"isEndOfFile"),isGrammar:o(()=>yP,"isGrammar"),isGrammarImport:o(()=>vP,"isGrammarImport"),isGroup:o(()=>qd,"isGroup"),isInferredType:o(()=>L1,"isInferredType"),isInfixRule:o(()=>hg,"isInfixRule"),isInfixRuleOperatorList:o(()=>bP,"isInfixRuleOperatorList"),isInfixRuleOperators:o(()=>xP,"isInfixRuleOperators"),isInterface:o(()=>jE,"isInterface"),isKeyword:o(()=>zc,"isKeyword"),isNamedArgument:o(()=>TP,"isNamedArgument"),isNegatedToken:o(()=>GE,"isNegatedToken"),isNegation:o(()=>WE,"isNegation"),isNumberLiteral:o(()=>kP,"isNumberLiteral"),isParameter:o(()=>CP,"isParameter"),isParameterReference:o(()=>UE,"isParameterReference"),isParserRule:o(()=>Ja,"isParserRule"),isReferenceType:o(()=>VE,"isReferenceType"),isRegexToken:o(()=>YE,"isRegexToken"),isReturnType:o(()=>HE,"isReturnType"),isRuleCall:o(()=>qc,"isRuleCall"),isSimpleType:o(()=>$x,"isSimpleType"),isStringLiteral:o(()=>wP,"isStringLiteral"),isTerminalAlternatives:o(()=>XE,"isTerminalAlternatives"),isTerminalElement:o(()=>EP,"isTerminalElement"),isTerminalGroup:o(()=>KE,"isTerminalGroup"),isTerminalRule:o(()=>xo,"isTerminalRule"),isTerminalRuleCall:o(()=>Ix,"isTerminalRuleCall"),isType:o(()=>Dx,"isType"),isTypeAttribute:o(()=>SP,"isTypeAttribute"),isTypeDefinition:o(()=>_P,"isTypeDefinition"),isUnionType:o(()=>ZE,"isUnionType"),isUnorderedGroup:o(()=>Mx,"isUnorderedGroup"),isUntilToken:o(()=>QE,"isUntilToken"),isValueLiteral:o(()=>AP,"isValueLiteral"),isWildcard:o(()=>JE,"isWildcard"),reflection:o(()=>hr,"reflection")});UZe={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]*/},Us={$type:"AbstractElement",cardinality:"cardinality"};o(Rx,"isAbstractElement");S(Rx,"isAbstractElement");Fb={$type:"AbstractParserRule"};o(Fd,"isAbstractParserRule");S(Fd,"isAbstractParserRule");Km={$type:"AbstractRule"};o(pP,"isAbstractRule");S(pP,"isAbstractRule");go={$type:"AbstractType"};o(fP,"isAbstractType");S(fP,"isAbstractType");kd={$type:"Action",cardinality:"cardinality",feature:"feature",inferredType:"inferredType",operator:"operator",type:"type"};o(Yh,"isAction");S(Yh,"isAction");zb={$type:"Alternatives",cardinality:"cardinality",elements:"elements"};o(Lx,"isAlternatives");S(Lx,"isAlternatives");F5={$type:"ArrayLiteral",elements:"elements"};o(gP,"isArrayLiteral");S(gP,"isArrayLiteral");z5={$type:"ArrayType",elementType:"elementType"};o(OE,"isArrayType");S(OE,"isArrayType");Cd={$type:"Assignment",cardinality:"cardinality",feature:"feature",operator:"operator",predicate:"predicate",terminal:"terminal"};o(Fc,"isAssignment");S(Fc,"isAssignment");q5={$type:"BooleanLiteral",true:"true"};o(BE,"isBooleanLiteral");S(BE,"isBooleanLiteral");wd={$type:"CharacterRange",cardinality:"cardinality",left:"left",lookahead:"lookahead",parenthesized:"parenthesized",right:"right"};o(PE,"isCharacterRange");S(PE,"isCharacterRange");Ed={$type:"Condition"};o(mP,"isCondition");S(mP,"isCondition");qb={$type:"Conjunction",left:"left",right:"right"};o(FE,"isConjunction");S(FE,"isConjunction");Sd={$type:"CrossReference",cardinality:"cardinality",deprecatedSyntax:"deprecatedSyntax",isMulti:"isMulti",terminal:"terminal",type:"type"};o(zd,"isCrossReference");S(zd,"isCrossReference");jb={$type:"Disjunction",left:"left",right:"right"};o(zE,"isDisjunction");S(zE,"isDisjunction");j5={$type:"EndOfFile",cardinality:"cardinality"};o(qE,"isEndOfFile");S(qE,"isEndOfFile");Wh={$type:"Grammar",imports:"imports",interfaces:"interfaces",isDeclared:"isDeclared",name:"name",rules:"rules",types:"types"};o(yP,"isGrammar");S(yP,"isGrammar");G5={$type:"GrammarImport",path:"path"};o(vP,"isGrammarImport");S(vP,"isGrammarImport");Gf={$type:"Group",cardinality:"cardinality",elements:"elements",guardCondition:"guardCondition",predicate:"predicate"};o(qd,"isGroup");S(qd,"isGroup");W5={$type:"InferredType",name:"name"};o(L1,"isInferredType");S(L1,"isInferredType");Dc={$type:"InfixRule",call:"call",dataType:"dataType",inferredType:"inferredType",name:"name",operators:"operators",parameters:"parameters",returnType:"returnType"};o(hg,"isInfixRule");S(hg,"isInfixRule");Gb={$type:"InfixRuleOperatorList",associativity:"associativity",operators:"operators"};o(bP,"isInfixRuleOperatorList");S(bP,"isInfixRuleOperatorList");U5={$type:"InfixRuleOperators",precedences:"precedences"};o(xP,"isInfixRuleOperators");S(xP,"isInfixRuleOperators");Zm={$type:"Interface",attributes:"attributes",name:"name",superTypes:"superTypes"};o(jE,"isInterface");S(jE,"isInterface");Qm={$type:"Keyword",cardinality:"cardinality",predicate:"predicate",value:"value"};o(zc,"isKeyword");S(zc,"isKeyword");Jm={$type:"NamedArgument",calledByName:"calledByName",parameter:"parameter",value:"value"};o(TP,"isNamedArgument");S(TP,"isNamedArgument");Wf={$type:"NegatedToken",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized",terminal:"terminal"};o(GE,"isNegatedToken");S(GE,"isNegatedToken");V5={$type:"Negation",value:"value"};o(WE,"isNegation");S(WE,"isNegation");Y5={$type:"NumberLiteral",value:"value"};o(kP,"isNumberLiteral");S(kP,"isNumberLiteral");e1={$type:"Parameter",name:"name"};o(CP,"isParameter");S(CP,"isParameter");H5={$type:"ParameterReference",parameter:"parameter"};o(UE,"isParameterReference");S(UE,"isParameterReference");Ml={$type:"ParserRule",dataType:"dataType",definition:"definition",entry:"entry",fragment:"fragment",inferredType:"inferredType",name:"name",parameters:"parameters",returnType:"returnType"};o(Ja,"isParserRule");S(Ja,"isParserRule");Wb={$type:"ReferenceType",isMulti:"isMulti",referenceType:"referenceType"};o(VE,"isReferenceType");S(VE,"isReferenceType");Uf={$type:"RegexToken",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized",regex:"regex"};o(YE,"isRegexToken");S(YE,"isRegexToken");X5={$type:"ReturnType",name:"name"};o(HE,"isReturnType");S(HE,"isReturnType");Vf={$type:"RuleCall",arguments:"arguments",cardinality:"cardinality",predicate:"predicate",rule:"rule"};o(qc,"isRuleCall");S(qc,"isRuleCall");t1={$type:"SimpleType",primitiveType:"primitiveType",stringType:"stringType",typeRef:"typeRef"};o($x,"isSimpleType");S($x,"isSimpleType");K5={$type:"StringLiteral",value:"value"};o(wP,"isStringLiteral");S(wP,"isStringLiteral");Yf={$type:"TerminalAlternatives",cardinality:"cardinality",elements:"elements",lookahead:"lookahead",parenthesized:"parenthesized"};o(XE,"isTerminalAlternatives");S(XE,"isTerminalAlternatives");Vs={$type:"TerminalElement",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized"};o(EP,"isTerminalElement");S(EP,"isTerminalElement");Hf={$type:"TerminalGroup",cardinality:"cardinality",elements:"elements",lookahead:"lookahead",parenthesized:"parenthesized"};o(KE,"isTerminalGroup");S(KE,"isTerminalGroup");Uh={$type:"TerminalRule",definition:"definition",fragment:"fragment",hidden:"hidden",name:"name",type:"type"};o(xo,"isTerminalRule");S(xo,"isTerminalRule");Xf={$type:"TerminalRuleCall",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized",rule:"rule"};o(Ix,"isTerminalRuleCall");S(Ix,"isTerminalRuleCall");Ub={$type:"Type",name:"name",type:"type"};o(Dx,"isType");S(Dx,"isType");Kf={$type:"TypeAttribute",defaultValue:"defaultValue",isOptional:"isOptional",name:"name",type:"type"};o(SP,"isTypeAttribute");S(SP,"isTypeAttribute");Zf={$type:"TypeDefinition"};o(_P,"isTypeDefinition");S(_P,"isTypeDefinition");Z5={$type:"UnionType",types:"types"};o(ZE,"isUnionType");S(ZE,"isUnionType");Vb={$type:"UnorderedGroup",cardinality:"cardinality",elements:"elements"};o(Mx,"isUnorderedGroup");S(Mx,"isUnorderedGroup");Qf={$type:"UntilToken",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized",terminal:"terminal"};o(QE,"isUntilToken");S(QE,"isUntilToken");Jf={$type:"ValueLiteral"};o(AP,"isValueLiteral");S(AP,"isValueLiteral");r1={$type:"Wildcard",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized"};o(JE,"isWildcard");S(JE,"isWildcard");RP=class extends cP{static{o(this,"LangiumGrammarAstReflection")}static{S(this,"LangiumGrammarAstReflection")}constructor(){super(...arguments),this.types={AbstractElement:{name:Us.$type,properties:{cardinality:{name:Us.cardinality}},superTypes:[]},AbstractParserRule:{name:Fb.$type,properties:{},superTypes:[Km.$type,go.$type]},AbstractRule:{name:Km.$type,properties:{},superTypes:[]},AbstractType:{name:go.$type,properties:{},superTypes:[]},Action:{name:kd.$type,properties:{cardinality:{name:kd.cardinality},feature:{name:kd.feature},inferredType:{name:kd.inferredType},operator:{name:kd.operator},type:{name:kd.type,referenceType:go.$type}},superTypes:[Us.$type]},Alternatives:{name:zb.$type,properties:{cardinality:{name:zb.cardinality},elements:{name:zb.elements,defaultValue:[]}},superTypes:[Us.$type]},ArrayLiteral:{name:F5.$type,properties:{elements:{name:F5.elements,defaultValue:[]}},superTypes:[Jf.$type]},ArrayType:{name:z5.$type,properties:{elementType:{name:z5.elementType}},superTypes:[Zf.$type]},Assignment:{name:Cd.$type,properties:{cardinality:{name:Cd.cardinality},feature:{name:Cd.feature},operator:{name:Cd.operator},predicate:{name:Cd.predicate},terminal:{name:Cd.terminal}},superTypes:[Us.$type]},BooleanLiteral:{name:q5.$type,properties:{true:{name:q5.true,defaultValue:!1}},superTypes:[Ed.$type,Jf.$type]},CharacterRange:{name:wd.$type,properties:{cardinality:{name:wd.cardinality},left:{name:wd.left},lookahead:{name:wd.lookahead},parenthesized:{name:wd.parenthesized,defaultValue:!1},right:{name:wd.right}},superTypes:[Vs.$type]},Condition:{name:Ed.$type,properties:{},superTypes:[]},Conjunction:{name:qb.$type,properties:{left:{name:qb.left},right:{name:qb.right}},superTypes:[Ed.$type]},CrossReference:{name:Sd.$type,properties:{cardinality:{name:Sd.cardinality},deprecatedSyntax:{name:Sd.deprecatedSyntax,defaultValue:!1},isMulti:{name:Sd.isMulti,defaultValue:!1},terminal:{name:Sd.terminal},type:{name:Sd.type,referenceType:go.$type}},superTypes:[Us.$type]},Disjunction:{name:jb.$type,properties:{left:{name:jb.left},right:{name:jb.right}},superTypes:[Ed.$type]},EndOfFile:{name:j5.$type,properties:{cardinality:{name:j5.cardinality}},superTypes:[Us.$type]},Grammar:{name:Wh.$type,properties:{imports:{name:Wh.imports,defaultValue:[]},interfaces:{name:Wh.interfaces,defaultValue:[]},isDeclared:{name:Wh.isDeclared,defaultValue:!1},name:{name:Wh.name},rules:{name:Wh.rules,defaultValue:[]},types:{name:Wh.types,defaultValue:[]}},superTypes:[]},GrammarImport:{name:G5.$type,properties:{path:{name:G5.path}},superTypes:[]},Group:{name:Gf.$type,properties:{cardinality:{name:Gf.cardinality},elements:{name:Gf.elements,defaultValue:[]},guardCondition:{name:Gf.guardCondition},predicate:{name:Gf.predicate}},superTypes:[Us.$type]},InferredType:{name:W5.$type,properties:{name:{name:W5.name}},superTypes:[go.$type]},InfixRule:{name:Dc.$type,properties:{call:{name:Dc.call},dataType:{name:Dc.dataType},inferredType:{name:Dc.inferredType},name:{name:Dc.name},operators:{name:Dc.operators},parameters:{name:Dc.parameters,defaultValue:[]},returnType:{name:Dc.returnType,referenceType:go.$type}},superTypes:[Fb.$type]},InfixRuleOperatorList:{name:Gb.$type,properties:{associativity:{name:Gb.associativity},operators:{name:Gb.operators,defaultValue:[]}},superTypes:[]},InfixRuleOperators:{name:U5.$type,properties:{precedences:{name:U5.precedences,defaultValue:[]}},superTypes:[]},Interface:{name:Zm.$type,properties:{attributes:{name:Zm.attributes,defaultValue:[]},name:{name:Zm.name},superTypes:{name:Zm.superTypes,defaultValue:[],referenceType:go.$type}},superTypes:[go.$type]},Keyword:{name:Qm.$type,properties:{cardinality:{name:Qm.cardinality},predicate:{name:Qm.predicate},value:{name:Qm.value}},superTypes:[Us.$type]},NamedArgument:{name:Jm.$type,properties:{calledByName:{name:Jm.calledByName,defaultValue:!1},parameter:{name:Jm.parameter,referenceType:e1.$type},value:{name:Jm.value}},superTypes:[]},NegatedToken:{name:Wf.$type,properties:{cardinality:{name:Wf.cardinality},lookahead:{name:Wf.lookahead},parenthesized:{name:Wf.parenthesized,defaultValue:!1},terminal:{name:Wf.terminal}},superTypes:[Vs.$type]},Negation:{name:V5.$type,properties:{value:{name:V5.value}},superTypes:[Ed.$type]},NumberLiteral:{name:Y5.$type,properties:{value:{name:Y5.value}},superTypes:[Jf.$type]},Parameter:{name:e1.$type,properties:{name:{name:e1.name}},superTypes:[]},ParameterReference:{name:H5.$type,properties:{parameter:{name:H5.parameter,referenceType:e1.$type}},superTypes:[Ed.$type]},ParserRule:{name:Ml.$type,properties:{dataType:{name:Ml.dataType},definition:{name:Ml.definition},entry:{name:Ml.entry,defaultValue:!1},fragment:{name:Ml.fragment,defaultValue:!1},inferredType:{name:Ml.inferredType},name:{name:Ml.name},parameters:{name:Ml.parameters,defaultValue:[]},returnType:{name:Ml.returnType,referenceType:go.$type}},superTypes:[Fb.$type]},ReferenceType:{name:Wb.$type,properties:{isMulti:{name:Wb.isMulti,defaultValue:!1},referenceType:{name:Wb.referenceType}},superTypes:[Zf.$type]},RegexToken:{name:Uf.$type,properties:{cardinality:{name:Uf.cardinality},lookahead:{name:Uf.lookahead},parenthesized:{name:Uf.parenthesized,defaultValue:!1},regex:{name:Uf.regex}},superTypes:[Vs.$type]},ReturnType:{name:X5.$type,properties:{name:{name:X5.name}},superTypes:[]},RuleCall:{name:Vf.$type,properties:{arguments:{name:Vf.arguments,defaultValue:[]},cardinality:{name:Vf.cardinality},predicate:{name:Vf.predicate},rule:{name:Vf.rule,referenceType:Km.$type}},superTypes:[Us.$type]},SimpleType:{name:t1.$type,properties:{primitiveType:{name:t1.primitiveType},stringType:{name:t1.stringType},typeRef:{name:t1.typeRef,referenceType:go.$type}},superTypes:[Zf.$type]},StringLiteral:{name:K5.$type,properties:{value:{name:K5.value}},superTypes:[Jf.$type]},TerminalAlternatives:{name:Yf.$type,properties:{cardinality:{name:Yf.cardinality},elements:{name:Yf.elements,defaultValue:[]},lookahead:{name:Yf.lookahead},parenthesized:{name:Yf.parenthesized,defaultValue:!1}},superTypes:[Vs.$type]},TerminalElement:{name:Vs.$type,properties:{cardinality:{name:Vs.cardinality},lookahead:{name:Vs.lookahead},parenthesized:{name:Vs.parenthesized,defaultValue:!1}},superTypes:[Us.$type]},TerminalGroup:{name:Hf.$type,properties:{cardinality:{name:Hf.cardinality},elements:{name:Hf.elements,defaultValue:[]},lookahead:{name:Hf.lookahead},parenthesized:{name:Hf.parenthesized,defaultValue:!1}},superTypes:[Vs.$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:[Km.$type]},TerminalRuleCall:{name:Xf.$type,properties:{cardinality:{name:Xf.cardinality},lookahead:{name:Xf.lookahead},parenthesized:{name:Xf.parenthesized,defaultValue:!1},rule:{name:Xf.rule,referenceType:Uh.$type}},superTypes:[Vs.$type]},Type:{name:Ub.$type,properties:{name:{name:Ub.name},type:{name:Ub.type}},superTypes:[go.$type]},TypeAttribute:{name:Kf.$type,properties:{defaultValue:{name:Kf.defaultValue},isOptional:{name:Kf.isOptional,defaultValue:!1},name:{name:Kf.name},type:{name:Kf.type}},superTypes:[]},TypeDefinition:{name:Zf.$type,properties:{},superTypes:[]},UnionType:{name:Z5.$type,properties:{types:{name:Z5.types,defaultValue:[]}},superTypes:[Zf.$type]},UnorderedGroup:{name:Vb.$type,properties:{cardinality:{name:Vb.cardinality},elements:{name:Vb.elements,defaultValue:[]}},superTypes:[Us.$type]},UntilToken:{name:Qf.$type,properties:{cardinality:{name:Qf.cardinality},lookahead:{name:Qf.lookahead},parenthesized:{name:Qf.parenthesized,defaultValue:!1},terminal:{name:Qf.terminal}},superTypes:[Vs.$type]},ValueLiteral:{name:Jf.$type,properties:{},superTypes:[]},Wildcard:{name:r1.$type,properties:{cardinality:{name:r1.cardinality},lookahead:{name:r1.lookahead},parenthesized:{name:r1.parenthesized,defaultValue:!1}},superTypes:[Vs.$type]}}}},hr=new RP;o(LP,"getDatatypeNode");S(LP,"getDatatypeNode");o(ug,"streamCst");S(ug,"streamCst");o($P,"flattenCst");S($P,"flattenCst");o(eS,"isChildNode");S(eS,"isChildNode");o(g1,"tokenToRange");S(g1,"tokenToRange");o(dg,"toDocumentSegment");S(dg,"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"})(Nc||(Nc={}));o(tS,"compareRange");S(tS,"compareRange");o(rS,"inRange");S(rS,"inRange");IP=/^[\w\p{L}]$/u;o(DP,"findDeclarationNodeAtOffset");S(DP,"findDeclarationNodeAtOffset");o(iS,"findCommentNode");S(iS,"findCommentNode");o(lx,"isCommentNode");S(lx,"isCommentNode");o(Nx,"findLeafNodeAtOffset");S(Nx,"findLeafNodeAtOffset");o(nS,"findLeafNodeBeforeOffset");S(nS,"findLeafNodeBeforeOffset");o(aS,"binarySearch");S(aS,"binarySearch");o(sS,"getPreviousNode");S(sS,"getPreviousNode");o(MP,"getNextNode");S(MP,"getNextNode");o(NP,"getStartlineNode");S(NP,"getStartlineNode");o(OP,"getInteriorNodes");S(OP,"getInteriorNodes");o(BP,"getCommonParent");S(BP,"getCommonParent");o(Q5,"getParentChain");S(Q5,"getParentChain");PP={};Od(PP,{findAssignment:o(()=>xS,"findAssignment"),findNameAssignment:o(()=>qx,"findNameAssignment"),findNodeForKeyword:o(()=>bS,"findNodeForKeyword"),findNodeForProperty:o(()=>Px,"findNodeForProperty"),findNodesForKeyword:o(()=>jP,"findNodesForKeyword"),findNodesForKeywordInternal:o(()=>zx,"findNodesForKeywordInternal"),findNodesForProperty:o(()=>vS,"findNodesForProperty"),getActionAtElement:o(()=>kS,"getActionAtElement"),getActionType:o(()=>wS,"getActionType"),getAllReachableRules:o(()=>Bx,"getAllReachableRules"),getAllRulesUsedForCrossReferences:o(()=>qP,"getAllRulesUsedForCrossReferences"),getCrossReferenceTerminal:o(()=>mS,"getCrossReferenceTerminal"),getEntryRule:o(()=>pS,"getEntryRule"),getExplicitRuleType:o(()=>I1,"getExplicitRuleType"),getHiddenRules:o(()=>fS,"getHiddenRules"),getRuleType:o(()=>ES,"getRuleType"),getRuleTypeName:o(()=>YP,"getRuleTypeName"),getTypeName:o(()=>$d,"getTypeName"),isArrayCardinality:o(()=>WP,"isArrayCardinality"),isArrayOperator:o(()=>UP,"isArrayOperator"),isCommentTerminal:o(()=>yS,"isCommentTerminal"),isDataType:o(()=>VP,"isDataType"),isDataTypeRule:o(()=>$1,"isDataTypeRule"),isOptionalCardinality:o(()=>GP,"isOptionalCardinality"),terminalRegex:o(()=>D1,"terminalRegex")});oS=class extends Error{static{o(this,"ErrorWithLocation")}static{S(this,"ErrorWithLocation")}constructor(e,t){super(e?`${t} at ${e.range.start.line}:${e.range.start.character}`:t)}};o(eu,"assertUnreachable");S(eu,"assertUnreachable");o(lS,"assertCondition");S(lS,"assertCondition");FP={};Od(FP,{NEWLINE_REGEXP:o(()=>eCe,"NEWLINE_REGEXP"),escapeRegExp:o(()=>yg,"escapeRegExp"),getTerminalParts:o(()=>zP,"getTerminalParts"),isMultilineComment:o(()=>hS,"isMultilineComment"),isWhitespace:o(()=>Ox,"isWhitespace"),partialMatches:o(()=>uS,"partialMatches"),partialRegExp:o(()=>dS,"partialRegExp"),whitespaceCharacters:o(()=>rCe,"whitespaceCharacters")});o(yr,"cc");S(yr,"cc");o(Yb,"insertToSet");S(Yb,"insertToSet");o(eg,"addFlag");S(eg,"addFlag");o(_d,"ASSERT_EXISTS");S(_d,"ASSERT_EXISTS");o(i1,"ASSERT_NEVER_REACH_HERE");S(i1,"ASSERT_NEVER_REACH_HERE");o(J5,"isCharacter");S(J5,"isCharacter");eE=[];for(let e=yr("0");e<=yr("9");e++)eE.push(e);tE=[yr("_")].concat(eE);for(let e=yr("a");e<=yr("z");e++)tE.push(e);for(let e=yr("A");e<=yr("Z");e++)tE.push(e);x4e=[yr(" "),yr("\f"),yr(` +`),yr("\r"),yr(" "),yr("\v"),yr(" "),yr("\xA0"),yr("\u1680"),yr("\u2000"),yr("\u2001"),yr("\u2002"),yr("\u2003"),yr("\u2004"),yr("\u2005"),yr("\u2006"),yr("\u2007"),yr("\u2008"),yr("\u2009"),yr("\u200A"),yr("\u2028"),yr("\u2029"),yr("\u202F"),yr("\u205F"),yr("\u3000"),yr("\uFEFF")],VZe=/[0-9a-fA-F]/,n5=/[0-9]/,YZe=/[1-9]/,J3e=class{static{o(this,"RegExpParser")}static{S(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":eg(r,"global");break;case"i":eg(r,"ignoreCase");break;case"m":eg(r,"multiLine");break;case"u":eg(r,"unicode");break;case"y":eg(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}}_d(t);let r=this.disjunction();return this.consumeChar(")"),{type:t,value:r,loc:this.loc(e)}}return i1()}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 i=this.integerIncludingZero();switch(this.popChar()){case"}":t={atLeast:i,atMost:i};break;case",":let n;this.isDigit()?(n=this.integerIncludingZero(),t={atLeast:i,atMost:n}):t={atLeast:i,atMost:1/0},this.consumeChar("}");break}if(e===!0&&t===void 0)return;_d(t);break}if(!(e===!0&&t===void 0)&&_d(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()),_d(e)?(e.loc=this.loc(t),this.isQuantifier()&&(e.quantifier=this.quantifier()),e):i1()}dotAll(){return this.consumeChar("."),{type:"Set",complement:!0,value:[yr(` +`),yr("\r"),yr("\u2028"),yr("\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=eE;break;case"D":e=eE,t=!0;break;case"s":e=x4e;break;case"S":e=x4e,t=!0;break;case"w":e=tE;break;case"W":e=tE,t=!0;break}return _d(e)?{type:"Set",value:e,complement:t}:i1()}controlEscapeAtom(){let e;switch(this.popChar()){case"f":e=yr("\f");break;case"n":e=yr(` +`);break;case"r":e=yr("\r");break;case"t":e=yr(" ");break;case"v":e=yr("\v");break}return _d(e)?{type:"Character",value:e}:i1()}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:yr("\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:yr(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:yr(e)}}}characterClass(){let e=[],t=!1;for(this.consumeChar("["),this.peekChar(0)==="^"&&(this.consumeChar("^"),t=!0);this.isClassAtom();){let r=this.classAtom(),i=r.type==="Character";if(J5(r)&&this.isRangeDash()){this.consumeChar("-");let n=this.classAtom(),a=n.type==="Character";if(J5(n)){if(n.value=this.input.length)throw Error("Unexpected end of input");this.idx++}loc(e){return{begin:e,end:this.idx}}},cS=class{static{o(this,"BaseRegExpVisitor")}static{S(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(i=>{this.visit(i)},this))}}visit(e){switch(e.type){case"Pattern":this.visitPattern(e);break;case"Flags":this.visitFlags(e);break;case"Disjunction":this.visitDisjunction(e);break;case"Alternative":this.visitAlternative(e);break;case"StartAnchor":this.visitStartAnchor(e);break;case"EndAnchor":this.visitEndAnchor(e);break;case"WordBoundary":this.visitWordBoundary(e);break;case"NonWordBoundary":this.visitNonWordBoundary(e);break;case"Lookahead":this.visitLookahead(e);break;case"NegativeLookahead":this.visitNegativeLookahead(e);break;case"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){}},eCe=/\r?\n/gm,tCe=new J3e,HZe=class extends cS{static{o(this,"TerminalRegExpVisitor")}static{S(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=yg(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)}},rg=new HZe;o(zP,"getTerminalParts");S(zP,"getTerminalParts");o(hS,"isMultilineComment");S(hS,"isMultilineComment");rCe=`\f +\r \v \xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF`.split("");o(Ox,"isWhitespace");S(Ox,"isWhitespace");o(yg,"escapeRegExp");S(yg,"escapeRegExp");o(uS,"partialMatches");S(uS,"partialMatches");o(dS,"partialRegExp");S(dS,"partialRegExp");o(pS,"getEntryRule");S(pS,"getEntryRule");o(fS,"getHiddenRules");S(fS,"getHiddenRules");o(Bx,"getAllReachableRules");S(Bx,"getAllReachableRules");o(gS,"ruleDfs");S(gS,"ruleDfs");o(qP,"getAllRulesUsedForCrossReferences");S(qP,"getAllRulesUsedForCrossReferences");o(mS,"getCrossReferenceTerminal");S(mS,"getCrossReferenceTerminal");o(yS,"isCommentTerminal");S(yS,"isCommentTerminal");o(vS,"findNodesForProperty");S(vS,"findNodesForProperty");o(Px,"findNodeForProperty");S(Px,"findNodeForProperty");o(Fx,"findNodesForPropertyInternal");S(Fx,"findNodesForPropertyInternal");o(jP,"findNodesForKeyword");S(jP,"findNodesForKeyword");o(bS,"findNodeForKeyword");S(bS,"findNodeForKeyword");o(zx,"findNodesForKeywordInternal");S(zx,"findNodesForKeywordInternal");o(xS,"findAssignment");S(xS,"findAssignment");o(qx,"findNameAssignment");S(qx,"findNameAssignment");o(TS,"findNameAssignmentInternal");S(TS,"findNameAssignmentInternal");o(kS,"getActionAtElement");S(kS,"getActionAtElement");o(GP,"isOptionalCardinality");S(GP,"isOptionalCardinality");o(WP,"isArrayCardinality");S(WP,"isArrayCardinality");o(UP,"isArrayOperator");S(UP,"isArrayOperator");o($1,"isDataTypeRule");S($1,"isDataTypeRule");o(CS,"isDataTypeRuleInternal");S(CS,"isDataTypeRuleInternal");o(VP,"isDataType");S(VP,"isDataType");o(cx,"isDataTypeInternal");S(cx,"isDataTypeInternal");o(I1,"getExplicitRuleType");S(I1,"getExplicitRuleType");o($d,"getTypeName");S($d,"getTypeName");o(wS,"getActionType");S(wS,"getActionType");o(YP,"getRuleTypeName");S(YP,"getRuleTypeName");o(ES,"getRuleType");S(ES,"getRuleType");o(D1,"terminalRegex");S(D1,"terminalRegex");HP=/[\s\S]/.source;o(jd,"abstractElementToRegex");S(jd,"abstractElementToRegex");o(XP,"terminalAlternativesToRegex");S(XP,"terminalAlternativesToRegex");o(KP,"terminalGroupToRegex");S(KP,"terminalGroupToRegex");o(ZP,"untilTokenToRegex");S(ZP,"untilTokenToRegex");o(QP,"negateTokenToRegex");S(QP,"negateTokenToRegex");o(JP,"characterRangeToRegex");S(JP,"characterRangeToRegex");o(Hb,"keywordToRegex");S(Hb,"keywordToRegex");o(Ol,"withCardinality");S(Ol,"withCardinality");o(SS,"createGrammarConfig");S(SS,"createGrammarConfig");XZe=typeof global=="object"&&global&&global.Object===Object&&global,iCe=XZe,KZe=typeof self=="object"&&self&&self.Object===Object&&self,ZZe=iCe||KZe||Function("return this")(),Uc=ZZe,QZe=Uc.Symbol,el=QZe,nCe=Object.prototype,JZe=nCe.hasOwnProperty,eQe=nCe.toString,mb=el?el.toStringTag:void 0;o(eF,"getRawTag");S(eF,"getRawTag");tQe=eF,rQe=Object.prototype,iQe=rQe.toString;o(tF,"objectToString");S(tF,"objectToString");nQe=tF,aQe="[object Null]",sQe="[object Undefined]",T4e=el?el.toStringTag:void 0;o(rF,"baseGetTag");S(rF,"baseGetTag");Gd=rF;o(iF,"isObjectLike");S(iF,"isObjectLike");Fl=iF,oQe="[object Symbol]";o(nF,"isSymbol");S(nF,"isSymbol");_S=nF;o(aF,"arrayMap");S(aF,"arrayMap");jx=aF,lQe=Array.isArray,ai=lQe,cQe=1/0,k4e=el?el.prototype:void 0,C4e=k4e?k4e.toString:void 0;o(AS,"baseToString");S(AS,"baseToString");hQe=AS,uQe=/\s/;o(sF,"trimmedEndIndex");S(sF,"trimmedEndIndex");dQe=sF,pQe=/^\s+/;o(oF,"baseTrim");S(oF,"baseTrim");fQe=oF;o(lF,"isObject");S(lF,"isObject");tl=lF,w4e=NaN,gQe=/^[-+]0x[0-9a-f]+$/i,mQe=/^0b[01]+$/i,yQe=/^0o[0-7]+$/i,vQe=parseInt;o(cF,"toNumber");S(cF,"toNumber");bQe=cF,E4e=1/0,xQe=17976931348623157e292;o(hF,"toFinite");S(hF,"toFinite");TQe=hF;o(uF,"toInteger");S(uF,"toInteger");Gx=uF;o(dF,"identity");S(dF,"identity");Wx=dF,kQe="[object AsyncFunction]",CQe="[object Function]",wQe="[object GeneratorFunction]",EQe="[object Proxy]";o(pF,"isFunction");S(pF,"isFunction");tu=pF,SQe=Uc["__core-js_shared__"],YN=SQe,S4e=(function(){var e=/[^.]+$/.exec(YN&&YN.keys&&YN.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""})();o(fF,"isMasked");S(fF,"isMasked");_Qe=fF,AQe=Function.prototype,RQe=AQe.toString;o(gF,"toSource");S(gF,"toSource");vg=gF,LQe=/[\\^$.*+?()[\]{}|]/g,$Qe=/^\[object .+?Constructor\]$/,IQe=Function.prototype,DQe=Object.prototype,MQe=IQe.toString,NQe=DQe.hasOwnProperty,OQe=RegExp("^"+MQe.call(NQe).replace(LQe,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");o(mF,"baseIsNative");S(mF,"baseIsNative");BQe=mF;o(yF,"getValue");S(yF,"getValue");PQe=yF;o(vF,"getNative");S(vF,"getNative");bg=vF,FQe=bg(Uc,"WeakMap"),CB=FQe,_4e=Object.create,zQe=(function(){function e(){}return o(e,"object"),S(e,"object"),function(t){if(!tl(t))return{};if(_4e)return _4e(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}})(),qQe=zQe;o(bF,"apply");S(bF,"apply");jQe=bF;o(xF,"noop");S(xF,"noop");ra=xF;o(TF,"copyArray");S(TF,"copyArray");GQe=TF,WQe=800,UQe=16,VQe=Date.now;o(kF,"shortOut");S(kF,"shortOut");YQe=kF;o(CF,"constant");S(CF,"constant");HQe=CF,XQe=(function(){try{var e=bg(Object,"defineProperty");return e({},"",{}),e}catch{}})(),rE=XQe,KQe=rE?function(e,t){return rE(e,"toString",{configurable:!0,enumerable:!1,value:HQe(t),writable:!0})}:Wx,ZQe=KQe,QQe=YQe(ZQe),JQe=QQe;o(wF,"arrayEach");S(wF,"arrayEach");aCe=wF;o(EF,"baseFindIndex");S(EF,"baseFindIndex");sCe=EF;o(SF,"baseIsNaN");S(SF,"baseIsNaN");eJe=SF;o(_F,"strictIndexOf");S(_F,"strictIndexOf");tJe=_F;o(AF,"baseIndexOf");S(AF,"baseIndexOf");RF=AF;o(LF,"arrayIncludes");S(LF,"arrayIncludes");oCe=LF,rJe=9007199254740991,iJe=/^(?:0|[1-9]\d*)$/;o($F,"isIndex");S($F,"isIndex");RS=$F;o(IF,"baseAssignValue");S(IF,"baseAssignValue");DF=IF;o(MF,"eq");S(MF,"eq");Ux=MF,nJe=Object.prototype,aJe=nJe.hasOwnProperty;o(NF,"assignValue");S(NF,"assignValue");LS=NF;o(OF,"copyObject");S(OF,"copyObject");Vx=OF,A4e=Math.max;o(BF,"overRest");S(BF,"overRest");sJe=BF;o(PF,"baseRest");S(PF,"baseRest");FF=PF,oJe=9007199254740991;o(zF,"isLength");S(zF,"isLength");qF=zF;o(jF,"isArrayLike");S(jF,"isArrayLike");Vc=jF;o(GF,"isIterateeCall");S(GF,"isIterateeCall");$S=GF;o(WF,"createAssigner");S(WF,"createAssigner");lJe=WF,cJe=Object.prototype;o(UF,"isPrototype");S(UF,"isPrototype");Yx=UF;o(VF,"baseTimes");S(VF,"baseTimes");hJe=VF,uJe="[object Arguments]";o(YF,"baseIsArguments");S(YF,"baseIsArguments");R4e=YF,lCe=Object.prototype,dJe=lCe.hasOwnProperty,pJe=lCe.propertyIsEnumerable,fJe=R4e((function(){return arguments})())?R4e:function(e){return Fl(e)&&dJe.call(e,"callee")&&!pJe.call(e,"callee")},IS=fJe;o(HF,"stubFalse");S(HF,"stubFalse");gJe=HF,cCe=typeof exports=="object"&&exports&&!exports.nodeType&&exports,L4e=cCe&&typeof module=="object"&&module&&!module.nodeType&&module,mJe=L4e&&L4e.exports===cCe,$4e=mJe?Uc.Buffer:void 0,yJe=$4e?$4e.isBuffer:void 0,vJe=yJe||gJe,hx=vJe,bJe="[object Arguments]",xJe="[object Array]",TJe="[object Boolean]",kJe="[object Date]",CJe="[object Error]",wJe="[object Function]",EJe="[object Map]",SJe="[object Number]",_Je="[object Object]",AJe="[object RegExp]",RJe="[object Set]",LJe="[object String]",$Je="[object WeakMap]",IJe="[object ArrayBuffer]",DJe="[object DataView]",MJe="[object Float32Array]",NJe="[object Float64Array]",OJe="[object Int8Array]",BJe="[object Int16Array]",PJe="[object Int32Array]",FJe="[object Uint8Array]",zJe="[object Uint8ClampedArray]",qJe="[object Uint16Array]",jJe="[object Uint32Array]",Pi={};Pi[MJe]=Pi[NJe]=Pi[OJe]=Pi[BJe]=Pi[PJe]=Pi[FJe]=Pi[zJe]=Pi[qJe]=Pi[jJe]=!0;Pi[bJe]=Pi[xJe]=Pi[IJe]=Pi[TJe]=Pi[DJe]=Pi[kJe]=Pi[CJe]=Pi[wJe]=Pi[EJe]=Pi[SJe]=Pi[_Je]=Pi[AJe]=Pi[RJe]=Pi[LJe]=Pi[$Je]=!1;o(XF,"baseIsTypedArray");S(XF,"baseIsTypedArray");GJe=XF;o(KF,"baseUnary");S(KF,"baseUnary");Hx=KF,hCe=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Xb=hCe&&typeof module=="object"&&module&&!module.nodeType&&module,WJe=Xb&&Xb.exports===hCe,HN=WJe&&iCe.process,UJe=(function(){try{var e=Xb&&Xb.require&&Xb.require("util").types;return e||HN&&HN.binding&&HN.binding("util")}catch{}})(),Id=UJe,I4e=Id&&Id.isTypedArray,VJe=I4e?Hx(I4e):GJe,ZF=VJe,YJe=Object.prototype,HJe=YJe.hasOwnProperty;o(QF,"arrayLikeKeys");S(QF,"arrayLikeKeys");uCe=QF;o(JF,"overArg");S(JF,"overArg");dCe=JF,XJe=dCe(Object.keys,Object),KJe=XJe,ZJe=Object.prototype,QJe=ZJe.hasOwnProperty;o(ez,"baseKeys");S(ez,"baseKeys");pCe=ez;o(tz,"keys");S(tz,"keys");yo=tz,JJe=Object.prototype,eet=JJe.hasOwnProperty,tet=lJe(function(e,t){if(Yx(t)||Vc(t)){Vx(t,yo(t),e);return}for(var r in t)eet.call(t,r)&&LS(e,r,t[r])}),vo=tet;o(rz,"nativeKeysIn");S(rz,"nativeKeysIn");ret=rz,iet=Object.prototype,net=iet.hasOwnProperty;o(iz,"baseKeysIn");S(iz,"baseKeysIn");aet=iz;o(nz,"keysIn");S(nz,"keysIn");DS=nz,set=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,oet=/^\w*$/;o(az,"isKey");S(az,"isKey");sz=az,cet=bg(Object,"create"),ux=cet;o(oz,"hashClear");S(oz,"hashClear");het=oz;o(lz,"hashDelete");S(lz,"hashDelete");uet=lz,det="__lodash_hash_undefined__",pet=Object.prototype,fet=pet.hasOwnProperty;o(cz,"hashGet");S(cz,"hashGet");get=cz,met=Object.prototype,yet=met.hasOwnProperty;o(hz,"hashHas");S(hz,"hashHas");vet=hz,bet="__lodash_hash_undefined__";o(uz,"hashSet");S(uz,"hashSet");xet=uz;o(Wd,"Hash");S(Wd,"Hash");Wd.prototype.clear=het;Wd.prototype.delete=uet;Wd.prototype.get=get;Wd.prototype.has=vet;Wd.prototype.set=xet;D4e=Wd;o(dz,"listCacheClear");S(dz,"listCacheClear");Tet=dz;o(pz,"assocIndexOf");S(pz,"assocIndexOf");MS=pz,ket=Array.prototype,Cet=ket.splice;o(fz,"listCacheDelete");S(fz,"listCacheDelete");wet=fz;o(gz,"listCacheGet");S(gz,"listCacheGet");Eet=gz;o(mz,"listCacheHas");S(mz,"listCacheHas");_et=mz;o(yz,"listCacheSet");S(yz,"listCacheSet");Aet=yz;o(Ud,"ListCache");S(Ud,"ListCache");Ud.prototype.clear=Tet;Ud.prototype.delete=wet;Ud.prototype.get=Eet;Ud.prototype.has=_et;Ud.prototype.set=Aet;NS=Ud,Ret=bg(Uc,"Map"),dx=Ret;o(vz,"mapCacheClear");S(vz,"mapCacheClear");Let=vz;o(bz,"isKeyable");S(bz,"isKeyable");$et=bz;o(xz,"getMapData");S(xz,"getMapData");OS=xz;o(Tz,"mapCacheDelete");S(Tz,"mapCacheDelete");Iet=Tz;o(kz,"mapCacheGet");S(kz,"mapCacheGet");Det=kz;o(Cz,"mapCacheHas");S(Cz,"mapCacheHas");Met=Cz;o(wz,"mapCacheSet");S(wz,"mapCacheSet");Net=wz;o(Vd,"MapCache");S(Vd,"MapCache");Vd.prototype.clear=Let;Vd.prototype.delete=Iet;Vd.prototype.get=Det;Vd.prototype.has=Met;Vd.prototype.set=Net;BS=Vd,Oet="Expected a function";o(Xx,"memoize");S(Xx,"memoize");Xx.Cache=BS;Bet=Xx,Pet=500;o(Ez,"memoizeCapped");S(Ez,"memoizeCapped");Fet=Ez,zet=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,qet=/\\(\\)?/g,jet=Fet(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(zet,function(r,i,n,a){t.push(n?a.replace(qet,"$1"):i||r)}),t}),Get=jet;o(Sz,"toString2");S(Sz,"toString");Wet=Sz;o(_z,"castPath");S(_z,"castPath");PS=_z,Uet=1/0;o(Az,"toKey");S(Az,"toKey");Kx=Az;o(Rz,"baseGet");S(Rz,"baseGet");Lz=Rz;o($z,"get");S($z,"get");Vet=$z;o(Iz,"arrayPush");S(Iz,"arrayPush");Dz=Iz,M4e=el?el.isConcatSpreadable:void 0;o(Mz,"isFlattenable");S(Mz,"isFlattenable");Yet=Mz;o(FS,"baseFlatten");S(FS,"baseFlatten");Nz=FS;o(Oz,"flatten");S(Oz,"flatten");Bl=Oz,Het=dCe(Object.getPrototypeOf,Object),fCe=Het;o(Bz,"baseSlice");S(Bz,"baseSlice");gCe=Bz;o(Pz,"arrayReduce");S(Pz,"arrayReduce");Xet=Pz;o(Fz,"stackClear");S(Fz,"stackClear");Ket=Fz;o(zz,"stackDelete");S(zz,"stackDelete");Zet=zz;o(qz,"stackGet");S(qz,"stackGet");Qet=qz;o(jz,"stackHas");S(jz,"stackHas");Jet=jz,ett=200;o(Gz,"stackSet");S(Gz,"stackSet");ttt=Gz;o(Yd,"Stack");S(Yd,"Stack");Yd.prototype.clear=Ket;Yd.prototype.delete=Zet;Yd.prototype.get=Qet;Yd.prototype.has=Jet;Yd.prototype.set=ttt;Kb=Yd;o(Wz,"baseAssign");S(Wz,"baseAssign");rtt=Wz;o(Uz,"baseAssignIn");S(Uz,"baseAssignIn");itt=Uz,mCe=typeof exports=="object"&&exports&&!exports.nodeType&&exports,N4e=mCe&&typeof module=="object"&&module&&!module.nodeType&&module,ntt=N4e&&N4e.exports===mCe,O4e=ntt?Uc.Buffer:void 0,B4e=O4e?O4e.allocUnsafe:void 0;o(Vz,"cloneBuffer");S(Vz,"cloneBuffer");att=Vz;o(Yz,"arrayFilter");S(Yz,"arrayFilter");Hz=Yz;o(Xz,"stubArray");S(Xz,"stubArray");yCe=Xz,stt=Object.prototype,ott=stt.propertyIsEnumerable,P4e=Object.getOwnPropertySymbols,ltt=P4e?function(e){return e==null?[]:(e=Object(e),Hz(P4e(e),function(t){return ott.call(e,t)}))}:yCe,Kz=ltt;o(Zz,"copySymbols");S(Zz,"copySymbols");ctt=Zz,htt=Object.getOwnPropertySymbols,utt=htt?function(e){for(var t=[];e;)Dz(t,Kz(e)),e=fCe(e);return t}:yCe,vCe=utt;o(Qz,"copySymbolsIn");S(Qz,"copySymbolsIn");dtt=Qz;o(Jz,"baseGetAllKeys");S(Jz,"baseGetAllKeys");bCe=Jz;o(eq,"getAllKeys");S(eq,"getAllKeys");wB=eq;o(tq,"getAllKeysIn");S(tq,"getAllKeysIn");xCe=tq,ptt=bg(Uc,"DataView"),EB=ptt,ftt=bg(Uc,"Promise"),SB=ftt,gtt=bg(Uc,"Set"),s1=gtt,F4e="[object Map]",mtt="[object Object]",z4e="[object Promise]",q4e="[object Set]",j4e="[object WeakMap]",G4e="[object DataView]",ytt=vg(EB),vtt=vg(dx),btt=vg(SB),xtt=vg(s1),Ttt=vg(CB),Bf=Gd;(EB&&Bf(new EB(new ArrayBuffer(1)))!=G4e||dx&&Bf(new dx)!=F4e||SB&&Bf(SB.resolve())!=z4e||s1&&Bf(new s1)!=q4e||CB&&Bf(new CB)!=j4e)&&(Bf=S(function(e){var t=Gd(e),r=t==mtt?e.constructor:void 0,i=r?vg(r):"";if(i)switch(i){case ytt:return G4e;case vtt:return F4e;case btt:return z4e;case xtt:return q4e;case Ttt:return j4e}return t},"getTag"));m1=Bf,ktt=Object.prototype,Ctt=ktt.hasOwnProperty;o(rq,"initCloneArray");S(rq,"initCloneArray");wtt=rq,Ett=Uc.Uint8Array,iE=Ett;o(iq,"cloneArrayBuffer");S(iq,"cloneArrayBuffer");nq=iq;o(aq,"cloneDataView");S(aq,"cloneDataView");Stt=aq,_tt=/\w*$/;o(sq,"cloneRegExp");S(sq,"cloneRegExp");Att=sq,W4e=el?el.prototype:void 0,U4e=W4e?W4e.valueOf:void 0;o(oq,"cloneSymbol");S(oq,"cloneSymbol");Rtt=oq;o(lq,"cloneTypedArray");S(lq,"cloneTypedArray");Ltt=lq,$tt="[object Boolean]",Itt="[object Date]",Dtt="[object Map]",Mtt="[object Number]",Ntt="[object RegExp]",Ott="[object Set]",Btt="[object String]",Ptt="[object Symbol]",Ftt="[object ArrayBuffer]",ztt="[object DataView]",qtt="[object Float32Array]",jtt="[object Float64Array]",Gtt="[object Int8Array]",Wtt="[object Int16Array]",Utt="[object Int32Array]",Vtt="[object Uint8Array]",Ytt="[object Uint8ClampedArray]",Htt="[object Uint16Array]",Xtt="[object Uint32Array]";o(cq,"initCloneByTag");S(cq,"initCloneByTag");Ktt=cq;o(hq,"initCloneObject");S(hq,"initCloneObject");Ztt=hq,Qtt="[object Map]";o(uq,"baseIsMap");S(uq,"baseIsMap");Jtt=uq,V4e=Id&&Id.isMap,ert=V4e?Hx(V4e):Jtt,trt=ert,rrt="[object Set]";o(dq,"baseIsSet");S(dq,"baseIsSet");irt=dq,Y4e=Id&&Id.isSet,nrt=Y4e?Hx(Y4e):irt,art=nrt,srt=1,ort=2,lrt=4,TCe="[object Arguments]",crt="[object Array]",hrt="[object Boolean]",urt="[object Date]",drt="[object Error]",kCe="[object Function]",prt="[object GeneratorFunction]",frt="[object Map]",grt="[object Number]",CCe="[object Object]",mrt="[object RegExp]",yrt="[object Set]",vrt="[object String]",brt="[object Symbol]",xrt="[object WeakMap]",Trt="[object ArrayBuffer]",krt="[object DataView]",Crt="[object Float32Array]",wrt="[object Float64Array]",Ert="[object Int8Array]",Srt="[object Int16Array]",_rt="[object Int32Array]",Art="[object Uint8Array]",Rrt="[object Uint8ClampedArray]",Lrt="[object Uint16Array]",$rt="[object Uint32Array]",$i={};$i[TCe]=$i[crt]=$i[Trt]=$i[krt]=$i[hrt]=$i[urt]=$i[Crt]=$i[wrt]=$i[Ert]=$i[Srt]=$i[_rt]=$i[frt]=$i[grt]=$i[CCe]=$i[mrt]=$i[yrt]=$i[vrt]=$i[brt]=$i[Art]=$i[Rrt]=$i[Lrt]=$i[$rt]=!0;$i[drt]=$i[kCe]=$i[xrt]=!1;o(o1,"baseClone");S(o1,"baseClone");Irt=o1,Drt=4;o(pq,"clone");S(pq,"clone");ba=pq;o(fq,"compact");S(fq,"compact");Zx=fq,Mrt="__lodash_hash_undefined__";o(gq,"setCacheAdd");S(gq,"setCacheAdd");Nrt=gq;o(mq,"setCacheHas");S(mq,"setCacheHas");Ort=mq;o(y1,"SetCache");S(y1,"SetCache");y1.prototype.add=y1.prototype.push=Nrt;y1.prototype.has=Ort;yq=y1;o(vq,"arraySome");S(vq,"arraySome");wCe=vq;o(bq,"cacheHas");S(bq,"cacheHas");xq=bq,Brt=1,Prt=2;o(Tq,"equalArrays");S(Tq,"equalArrays");ECe=Tq;o(kq,"mapToArray");S(kq,"mapToArray");Frt=kq;o(Cq,"setToArray");S(Cq,"setToArray");wq=Cq,zrt=1,qrt=2,jrt="[object Boolean]",Grt="[object Date]",Wrt="[object Error]",Urt="[object Map]",Vrt="[object Number]",Yrt="[object RegExp]",Hrt="[object Set]",Xrt="[object String]",Krt="[object Symbol]",Zrt="[object ArrayBuffer]",Qrt="[object DataView]",H4e=el?el.prototype:void 0,XN=H4e?H4e.valueOf:void 0;o(Eq,"equalByTag");S(Eq,"equalByTag");Jrt=Eq,eit=1,tit=Object.prototype,rit=tit.hasOwnProperty;o(Sq,"equalObjects");S(Sq,"equalObjects");iit=Sq,nit=1,X4e="[object Arguments]",K4e="[object Array]",a5="[object Object]",ait=Object.prototype,Z4e=ait.hasOwnProperty;o(_q,"baseIsEqualDeep");S(_q,"baseIsEqualDeep");sit=_q;o(zS,"baseIsEqual");S(zS,"baseIsEqual");SCe=zS,oit=1,lit=2;o(Aq,"baseIsMatch");S(Aq,"baseIsMatch");cit=Aq;o(Rq,"isStrictComparable");S(Rq,"isStrictComparable");_Ce=Rq;o(Lq,"getMatchData");S(Lq,"getMatchData");hit=Lq;o($q,"matchesStrictComparable");S($q,"matchesStrictComparable");ACe=$q;o(Iq,"baseMatches");S(Iq,"baseMatches");uit=Iq;o(Dq,"baseHasIn");S(Dq,"baseHasIn");dit=Dq;o(Mq,"hasPath");S(Mq,"hasPath");RCe=Mq;o(Nq,"hasIn");S(Nq,"hasIn");pit=Nq,fit=1,git=2;o(Oq,"baseMatchesProperty");S(Oq,"baseMatchesProperty");mit=Oq;o(Bq,"baseProperty");S(Bq,"baseProperty");yit=Bq;o(Pq,"basePropertyDeep");S(Pq,"basePropertyDeep");vit=Pq;o(Fq,"property");S(Fq,"property");bit=Fq;o(zq,"baseIteratee");S(zq,"baseIteratee");Yc=zq;o(qq,"arrayAggregator");S(qq,"arrayAggregator");xit=qq;o(jq,"createBaseFor");S(jq,"createBaseFor");Tit=jq,kit=Tit(),Cit=kit;o(Gq,"baseForOwn");S(Gq,"baseForOwn");wit=Gq;o(Wq,"createBaseEach");S(Wq,"createBaseEach");Eit=Wq,Sit=Eit(wit),xg=Sit;o(Uq,"baseAggregator");S(Uq,"baseAggregator");_it=Uq;o(Vq,"createAggregator");S(Vq,"createAggregator");Ait=Vq,LCe=Object.prototype,Rit=LCe.hasOwnProperty,Lit=FF(function(e,t){e=Object(e);var r=-1,i=t.length,n=i>2?t[2]:void 0;for(n&&$S(t[0],t[1],n)&&(i=1);++r{t.accept(e)})}},Cs=class extends Hc{static{o(this,"NonTerminal")}static{S(this,"NonTerminal")}constructor(e){super([]),this.idx=1,vo(this,ql(e,t=>t!==void 0))}set definition(e){}get definition(){return this.referencedRule!==void 0?this.referencedRule.definition:[]}accept(e){e.visit(this)}},M1=class extends Hc{static{o(this,"Rule")}static{S(this,"Rule")}constructor(e){super(e.definition),this.orgText="",vo(this,ql(e,t=>t!==void 0))}},Hs=class extends Hc{static{o(this,"Alternative")}static{S(this,"Alternative")}constructor(e){super(e.definition),this.ignoreAmbiguities=!1,vo(this,ql(e,t=>t!==void 0))}},va=class extends Hc{static{o(this,"Option")}static{S(this,"Option")}constructor(e){super(e.definition),this.idx=1,vo(this,ql(e,t=>t!==void 0))}},To=class extends Hc{static{o(this,"RepetitionMandatory")}static{S(this,"RepetitionMandatory")}constructor(e){super(e.definition),this.idx=1,vo(this,ql(e,t=>t!==void 0))}},ko=class extends Hc{static{o(this,"RepetitionMandatoryWithSeparator")}static{S(this,"RepetitionMandatoryWithSeparator")}constructor(e){super(e.definition),this.idx=1,vo(this,ql(e,t=>t!==void 0))}},pn=class extends Hc{static{o(this,"Repetition")}static{S(this,"Repetition")}constructor(e){super(e.definition),this.idx=1,vo(this,ql(e,t=>t!==void 0))}},Xs=class extends Hc{static{o(this,"RepetitionWithSeparator")}static{S(this,"RepetitionWithSeparator")}constructor(e){super(e.definition),this.idx=1,vo(this,ql(e,t=>t!==void 0))}},Ks=class extends Hc{static{o(this,"Alternation")}static{S(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,vo(this,ql(e,t=>t!==void 0))}},zi=class{static{o(this,"Terminal")}static{S(this,"Terminal")}constructor(e){this.idx=1,vo(this,ql(e,t=>t!==void 0))}accept(e){e.visit(this)}};o(Bj,"serializeGrammar");S(Bj,"serializeGrammar");o(l1,"serializeProduction");S(l1,"serializeProduction");N1=class{static{o(this,"GAstVisitor")}static{S(this,"GAstVisitor")}visit(e){let t=e;switch(t.constructor){case Cs:return this.visitNonTerminal(t);case Hs:return this.visitAlternative(t);case va:return this.visitOption(t);case To:return this.visitRepetitionMandatory(t);case ko:return this.visitRepetitionMandatoryWithSeparator(t);case Xs:return this.visitRepetitionWithSeparator(t);case pn:return this.visitRepetition(t);case Ks:return this.visitAlternation(t);case zi:return this.visitTerminal(t);case M1: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){}};o(Pj,"isSequenceProd");S(Pj,"isSequenceProd");o(b1,"isOptionalProd");S(b1,"isOptionalProd");o(Fj,"isBranchingProd");S(Fj,"isBranchingProd");o(Ho,"getProductionDslName");S(Ho,"getProductionDslName");VS=class{static{o(this,"RestWalker")}static{S(this,"RestWalker")}walk(e,t=[]){wr(e.definition,(r,i)=>{let n=ya(e.definition,i+1);if(r instanceof Cs)this.walkProdRef(r,n,t);else if(r instanceof zi)this.walkTerminal(r,n,t);else if(r instanceof Hs)this.walkFlat(r,n,t);else if(r instanceof va)this.walkOption(r,n,t);else if(r instanceof To)this.walkAtLeastOne(r,n,t);else if(r instanceof ko)this.walkAtLeastOneSep(r,n,t);else if(r instanceof Xs)this.walkManySep(r,n,t);else if(r instanceof pn)this.walkMany(r,n,t);else if(r instanceof Ks)this.walkOr(r,n,t);else throw Error("non exhaustive match")})}walkTerminal(e,t,r){}walkProdRef(e,t,r){}walkFlat(e,t,r){let i=t.concat(r);this.walk(e,i)}walkOption(e,t,r){let i=t.concat(r);this.walk(e,i)}walkAtLeastOne(e,t,r){let i=[new va({definition:e.definition})].concat(t,r);this.walk(e,i)}walkAtLeastOneSep(e,t,r){let i=nE(e,t,r);this.walk(e,i)}walkMany(e,t,r){let i=[new va({definition:e.definition})].concat(t,r);this.walk(e,i)}walkManySep(e,t,r){let i=nE(e,t,r);this.walk(e,i)}walkOr(e,t,r){let i=t.concat(r);wr(e.definition,n=>{let a=new Hs({definition:[n]});this.walk(a,i)})}};o(nE,"restForRepetitionWithSeparator");S(nE,"restForRepetitionWithSeparator");o(Tg,"first");S(Tg,"first");o(zj,"firstForSequence");S(zj,"firstForSequence");o(qj,"firstForBranching");S(qj,"firstForBranching");o(jj,"firstForTerminal");S(jj,"firstForTerminal");MCe="_~IN~_",ynt=class extends VS{static{o(this,"ResyncFollowsWalker")}static{S(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 i=Wj(e.referencedRule,e.idx)+this.topProd.name,n=t.concat(r),a=new Hs({definition:n}),s=Tg(a);this.follows[i]=s}};o(Gj,"computeAllProdsFollows");S(Gj,"computeAllProdsFollows");o(Wj,"buildBetweenProdsFollowPrefix");S(Wj,"buildBetweenProdsFollowPrefix");L5={},vnt=new J3e;o(O1,"getRegExpAst");S(O1,"getRegExpAst");o(Uj,"clearRegExpParserCache");S(Uj,"clearRegExpParserCache");NCe="Complement Sets are not supported for first char optimization",aE=`Unable to use "first char" lexer optimizations: +`;o(Vj,"getOptimizedStartCodesIndices");S(Vj,"getOptimizedStartCodesIndices");o(gx,"firstCharOptimizedIndices");S(gx,"firstCharOptimizedIndices");o(n1,"addOptimizedIdxToResult");S(n1,"addOptimizedIdxToResult");o(Yj,"handleIgnoreCase");S(Yj,"handleIgnoreCase");o(sE,"findCode");S(sE,"findCode");o(mx,"isWholeOptional");S(mx,"isWholeOptional");bnt=class extends cS{static{o(this,"CharCodeFinder")}static{S(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){Ss(this.targetCharCodes,e.value)&&(this.found=!0)}visitSet(e){e.complement?sE(e,this.targetCharCodes)===void 0&&(this.found=!0):sE(e,this.targetCharCodes)!==void 0&&(this.found=!0)}};o(Qx,"canMatchCharCode");S(Qx,"canMatchCharCode");fg="PATTERN",Mb="defaultMode",s5="modes";o(Hj,"analyzeTokenTypes");S(Hj,"analyzeTokenTypes");o(Xj,"validatePatterns");S(Xj,"validatePatterns");o(Kj,"validateRegExpPattern");S(Kj,"validateRegExpPattern");o(Zj,"findMissingPatterns");S(Zj,"findMissingPatterns");o(Qj,"findInvalidPatterns");S(Qj,"findInvalidPatterns");xnt=/[^\\][$]/;o(Jj,"findEndOfInputAnchor");S(Jj,"findEndOfInputAnchor");o(eG,"findEmptyMatchRegExps");S(eG,"findEmptyMatchRegExps");Tnt=/[^\\[][\^]|^\^/;o(tG,"findStartOfInputAnchor");S(tG,"findStartOfInputAnchor");o(rG,"findUnsupportedFlags");S(rG,"findUnsupportedFlags");o(iG,"findDuplicatePatterns");S(iG,"findDuplicatePatterns");o(nG,"findInvalidGroupType");S(nG,"findInvalidGroupType");o(aG,"findModesThatDoNotExist");S(aG,"findModesThatDoNotExist");o(sG,"findUnreachablePatterns");S(sG,"findUnreachablePatterns");o(oG,"tryToMatchStrToPattern");S(oG,"tryToMatchStrToPattern");o(lG,"noMetaChar");S(lG,"noMetaChar");o(cG,"usesLookAheadOrBehind");S(cG,"usesLookAheadOrBehind");o(oE,"addStickyFlag");S(oE,"addStickyFlag");o(hG,"performRuntimeChecks");S(hG,"performRuntimeChecks");o(uG,"performWarningRuntimeChecks");S(uG,"performWarningRuntimeChecks");o(dG,"cloneEmptyGroups");S(dG,"cloneEmptyGroups");o(YS,"isCustomPattern");S(YS,"isCustomPattern");o(pG,"isShortPattern");S(pG,"isShortPattern");knt={test:S(function(e){let t=e.length;for(let r=this.lastIndex;r${e.image}<- The Mode Stack is empty`},buildUnexpectedCharactersMessage(e,t,r,i,n,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"})(fn||(fn={}));Ob={deferDefinitionErrorsHandling:!1,positionTracking:"full",lineTerminatorsPattern:/\n|\r\n?/g,lineTerminatorCharacters:[` +`,"\r"],ensureOptimizations:!1,safeMode:!1,errorMessageProvider:_B,traceInitPerf:!1,skipValidations:!1,recoveryEnabled:!0};Object.freeze(Ob);ks=class{static{o(this,"Lexer")}static{S(this,"Lexer")}constructor(e,t=Ob){if(this.lexerDefinition=e,this.lexerDefinitionErrors=[],this.lexerDefinitionWarning=[],this.patternIdxToConfig={},this.charCodeToPatternIdxToConfig={},this.modes=[],this.emptyGroups={},this.trackStartLines=!0,this.trackEndLines=!0,this.hasCustom=!1,this.canModeBeOptimized={},this.TRACE_INIT=(i,n)=>{if(this.traceInitPerf===!0){this.traceInitIndent++;let a=new Array(this.traceInitIndent+1).join(" ");this.traceInitIndent <${i}>`);let{time:s,value:l}=WS(n),h=s>10?console.warn:console.log;return this.traceInitIndent time: ${s}ms`),this.traceInitIndent--,l}else return n()},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=vo({},Ob,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 i,n=!0;this.TRACE_INIT("Lexer Config handling",()=>{if(this.config.lineTerminatorsPattern===Ob.lineTerminatorsPattern)this.config.lineTerminatorsPattern=knt;else if(this.config.lineTerminatorCharacters===Ob.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),ai(e)?i={modes:{defaultMode:ba(e)},defaultMode:Mb}:(n=!1,i=ba(e))}),this.config.skipValidations===!1&&(this.TRACE_INIT("performRuntimeChecks",()=>{this.lexerDefinitionErrors=this.lexerDefinitionErrors.concat(hG(i,this.trackStartLines,this.config.lineTerminatorCharacters))}),this.TRACE_INIT("performWarningRuntimeChecks",()=>{this.lexerDefinitionWarning=this.lexerDefinitionWarning.concat(uG(i,this.trackStartLines,this.config.lineTerminatorCharacters))})),i.modes=i.modes?i.modes:{},wr(i.modes,(s,l)=>{i.modes[l]=jS(s,h=>Xh(h))});let a=yo(i.modes);if(wr(i.modes,(s,l)=>{this.TRACE_INIT(`Mode: <${l}> processing`,()=>{if(this.modes.push(l),this.config.skipValidations===!1&&this.TRACE_INIT("validatePatterns",()=>{this.lexerDefinitionErrors=this.lexerDefinitionErrors.concat(Xj(s,a))}),Di(this.lexerDefinitionErrors)){Cg(s);let h;this.TRACE_INIT("analyzeTokenTypes",()=>{h=Hj(s,{lineTerminatorCharacters:this.config.lineTerminatorCharacters,positionTracking:t.positionTracking,ensureOptimizations:t.ensureOptimizations,safeMode:t.safeMode,tracer:this.TRACE_INIT})}),this.patternIdxToConfig[l]=h.patternIdxToConfig,this.charCodeToPatternIdxToConfig[l]=h.charCodeToPatternIdxToConfig,this.emptyGroups=vo({},this.emptyGroups,h.emptyGroups),this.hasCustom=h.hasCustom||this.hasCustom,this.canModeBeOptimized[l]=h.canBeOptimized}})}),this.defaultMode=i.defaultMode,!Di(this.lexerDefinitionErrors)&&!this.config.deferDefinitionErrorsHandling){let s=Jt(this.lexerDefinitionErrors,l=>l.message).join(`----------------------- +`);throw new Error(`Errors detected in definition of Lexer: +`+s)}wr(this.lexerDefinitionWarning,s=>{GS(s.message)}),this.TRACE_INIT("Choosing sub-methods implementations",()=>{if(n&&(this.handleModes=ra),this.trackStartLines===!1&&(this.computeNewColumn=Wx),this.trackEndLines===!1&&(this.updateTokenEndLineColumnLocation=ra),/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 s=bo(this.canModeBeOptimized,(l,h,u)=>(h===!1&&l.push(u),l),[]);if(t.ensureOptimizations&&!Di(s))throw Error(`Lexer Modes: < ${s.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",()=>{Uj()}),this.TRACE_INIT("toFastProperties",()=>{US(this)})})}tokenize(e,t=this.defaultMode){if(!Di(this.lexerDefinitionErrors)){let r=Jt(this.lexerDefinitionErrors,i=>i.message).join(`----------------------- +`);throw new Error(`Unable to Tokenize because Errors detected in definition of Lexer: +`+r)}return this.tokenizeInternal(e,t)}tokenizeInternal(e,t){let r,i,n,a,s,l,h,u,d,p,f,g,m,y,b,v=e,T=v.length,x=0,k=0,C=this.hasCustom?0:Math.floor(e.length/10),E=new Array(C),w=[],_=this.trackStartLines?1:void 0,L=this.trackStartLines?1:void 0,N=dG(this.emptyGroups),D=this.trackStartLines,M=this.config.lineTerminatorsPattern,B=0,A=[],I=[],O=[],R=[];Object.freeze(R);let $=!1,F=S(G=>{if(O.length===1&&G.tokenType.PUSH_MODE===void 0){let W=this.config.errorMessageProvider.buildUnableToPopLexerModeMessage(G);w.push({offset:G.startOffset,line:G.startLine,column:G.startColumn,length:G.image.length,message:W})}else{O.pop();let W=pg(O);A=this.patternIdxToConfig[W],I=this.charCodeToPatternIdxToConfig[W],B=A.length;let J=this.canModeBeOptimized[W]&&this.config.safeMode===!1;I&&J?$=!0:$=!1}},"pop_mode");function P(G){O.push(G),I=this.charCodeToPatternIdxToConfig[G],A=this.patternIdxToConfig[G],B=A.length,B=A.length;let W=this.canModeBeOptimized[G]&&this.config.safeMode===!1;I&&W?$=!0:$=!1}o(P,"push_mode"),S(P,"push_mode"),P.call(this,t);let z,q=this.config.recoveryEnabled;for(;xl.length){l=a,d=a.length,h=u,z=Q;break}}}break}}if(d!==-1){if(p=z.group,p!==void 0&&(l=l!==null?l:e.substring(x,x+d),f=z.tokenTypeIdx,g=this.createTokenInstance(l,x,f,z.tokenType,_,L,d),this.handlePayload(g,h),p===!1?k=this.addToken(E,k,g):N[p].push(g)),D===!0&&z.canLineTerminator===!0){let H=0,Z,se;M.lastIndex=0;do l=l!==null?l:e.substring(x,x+d),Z=M.test(l),Z===!0&&(se=M.lastIndex-1,H++);while(Z===!0);H!==0?(_=_+H,L=d-se,this.updateTokenEndLineColumnLocation(g,p,se,H,_,L,d)):L=this.computeNewColumn(L,d)}else L=this.computeNewColumn(L,d);x=x+d,this.handleModes(z,F,P,g)}else{let H=x,Z=_,se=L,Q=q===!1;for(;Q===!1&&x ${Ld(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:i,ruleName:n}){let a="Expecting: ",s=` +but found: '`+zl(t).image+"'";if(i)return a+i+s;{let l=bo(e,(d,p)=>d.concat(p),[]),h=Jt(l,d=>`[${Jt(d,p=>Ld(p)).join(", ")}]`),u=`one of these possible Token sequences: +${Jt(h,(d,p)=>` ${p+1}. ${d}`).join(` +`)}`;return a+u+s}},buildEarlyExitMessage({expectedIterationPaths:e,actual:t,customUserDescription:r,ruleName:i}){let n="Expecting: ",a=` +but found: '`+zl(t).image+"'";if(r)return n+r+a;{let s=`expecting at least one iteration which starts with one of these possible Token sequences:: + <${Jt(e,l=>`[${Jt(l,h=>Ld(h)).join(",")}]`).join(" ,")}>`;return n+s+a}}};Object.freeze(a1);wnt={buildRuleNotFoundError(e,t){return"Invalid grammar, reference to a rule which is not defined: ->"+t.nonTerminalName+`<- +inside top level rule: ->`+e.name+"<-"}},ig={buildDuplicateFoundError(e,t){function r(d){return d instanceof zi?d.terminalType.name:d instanceof Cs?d.nonTerminalName:""}o(r,"getExtraProductionArgument2"),S(r,"getExtraProductionArgument");let i=e.name,n=zl(t),a=n.idx,s=Ho(n),l=r(n),h=a>0,u=`->${s}${h?a:""}<- ${l?`with argument: ->${l}<-`:""} + appears more than once (${t.length} times) in the top level rule: ->${i}<-. + For further details see: https://chevrotain.io/docs/FAQ.html#NUMERICAL_SUFFIXES + `;return u=u.replace(/[ \t]+/g," "),u=u.replace(/\s\s+/g,` +`),u},buildNamespaceConflictError(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=Jt(e.prefixPath,i=>Ld(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,i=`Ambiguous Alternatives Detected: <${e.ambiguityIndices.join(" ,")}> in inside <${e.topLevelRule.name}> Rule, +`;if(r)i+=`These alternatives are all empty (match no tokens), making them indistinguishable. +Only the last alternative may be empty. +`;else{let n=Jt(e.prefixPath,a=>Ld(a)).join(", ");i+=`<${n}> may appears as a prefix path in all these alternatives. +`}return i+=`See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#AMBIGUOUS_ALTERNATIVES +For Further details.`,i},buildEmptyRepetitionError(e){let t=Ho(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=Jt(e.leftRecursionPath,n=>n.name),i=`${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: + ${i} + 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 M1?t=e.topLevelRule.name:t=e.topLevelRule,`Duplicate definition, rule: ->${t}<- is already defined in the grammar: ->${e.grammarName}<-`}};o(wG,"resolveGrammar");S(wG,"resolveGrammar");Ent=class extends N1{static{o(this,"GastRefResolverVisitor")}static{S(this,"GastRefResolverVisitor")}constructor(e,t){super(),this.nameToTopRule=e,this.errMsgProvider=t,this.errors=[]}resolveRefs(){wr(Gn(this.nameToTopRule),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:ws.UNRESOLVED_SUBRULE_REF,ruleName:this.currTopLevel.name,unresolvedRefName:e.nonTerminalName})}}},Snt=class extends VS{static{o(this,"AbstractNextPossibleTokensWalker")}static{S(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=ba(this.path.ruleStack).reverse(),this.occurrenceStack=ba(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 i=t.concat(r);this.updateExpectedNext(),this.walk(e.referencedRule,i)}}updateExpectedNext(){Di(this.ruleStack)?(this.nextProductionName="",this.nextProductionOccurrence=0,this.isAtEndOfPath=!0):(this.nextProductionName=this.ruleStack.pop(),this.nextProductionOccurrence=this.occurrenceStack.pop())}},_nt=class extends Snt{static{o(this,"NextAfterTokenWalker")}static{S(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 i=t.concat(r),n=new Hs({definition:i});this.possibleTokTypes=Tg(n),this.found=!0}}},e6=class extends VS{static{o(this,"AbstractNextTerminalAfterProductionWalker")}static{S(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}},Ant=class extends e6{static{o(this,"NextTerminalAfterManyWalker")}static{S(this,"NextTerminalAfterManyWalker")}walkMany(e,t,r){if(e.idx===this.occurrence){let i=zl(t.concat(r));this.result.isEndOfRule=i===void 0,i instanceof zi&&(this.result.token=i.terminalType,this.result.occurrence=i.idx)}else super.walkMany(e,t,r)}},hke=class extends e6{static{o(this,"NextTerminalAfterManySepWalker")}static{S(this,"NextTerminalAfterManySepWalker")}walkManySep(e,t,r){if(e.idx===this.occurrence){let i=zl(t.concat(r));this.result.isEndOfRule=i===void 0,i instanceof zi&&(this.result.token=i.terminalType,this.result.occurrence=i.idx)}else super.walkManySep(e,t,r)}},Rnt=class extends e6{static{o(this,"NextTerminalAfterAtLeastOneWalker")}static{S(this,"NextTerminalAfterAtLeastOneWalker")}walkAtLeastOne(e,t,r){if(e.idx===this.occurrence){let i=zl(t.concat(r));this.result.isEndOfRule=i===void 0,i instanceof zi&&(this.result.token=i.terminalType,this.result.occurrence=i.idx)}else super.walkAtLeastOne(e,t,r)}},uke=class extends e6{static{o(this,"NextTerminalAfterAtLeastOneSepWalker")}static{S(this,"NextTerminalAfterAtLeastOneSepWalker")}walkAtLeastOneSep(e,t,r){if(e.idx===this.occurrence){let i=zl(t.concat(r));this.result.isEndOfRule=i===void 0,i instanceof zi&&(this.result.token=i.terminalType,this.result.occurrence=i.idx)}else super.walkAtLeastOneSep(e,t,r)}};o(yx,"possiblePathsFrom");S(yx,"possiblePathsFrom");o(t6,"nextPossibleTokensAfter");S(t6,"nextPossibleTokensAfter");o(EG,"expandTopLevelRule");S(EG,"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"})(Ji||(Ji={}));o(Jx,"getProdType");S(Jx,"getProdType");o(cE,"getLookaheadPaths");S(cE,"getLookaheadPaths");o(SG,"buildLookaheadFuncForOr");S(SG,"buildLookaheadFuncForOr");o(_G,"buildLookaheadFuncForOptionalProd");S(_G,"buildLookaheadFuncForOptionalProd");o(AG,"buildAlternativesLookAheadFunc");S(AG,"buildAlternativesLookAheadFunc");o(RG,"buildSingleAlternativeLookaheadFunction");S(RG,"buildSingleAlternativeLookaheadFunction");Lnt=class extends VS{static{o(this,"RestDefinitionFinderWalker")}static{S(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,i){return e.idx===this.targetOccurrence&&this.targetProdType===t?(this.restDef=r.concat(i),!0):!1}walkOption(e,t,r){this.checkIsTarget(e,Ji.OPTION,t,r)||super.walkOption(e,t,r)}walkAtLeastOne(e,t,r){this.checkIsTarget(e,Ji.REPETITION_MANDATORY,t,r)||super.walkOption(e,t,r)}walkAtLeastOneSep(e,t,r){this.checkIsTarget(e,Ji.REPETITION_MANDATORY_WITH_SEPARATOR,t,r)||super.walkOption(e,t,r)}walkMany(e,t,r){this.checkIsTarget(e,Ji.REPETITION,t,r)||super.walkOption(e,t,r)}walkManySep(e,t,r){this.checkIsTarget(e,Ji.REPETITION_WITH_SEPARATOR,t,r)||super.walkOption(e,t,r)}},BCe=class extends N1{static{o(this,"InsideDefinitionFinderVisitor")}static{S(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,Ji.OPTION)}visitRepetition(e){this.checkIsTarget(e,Ji.REPETITION)}visitRepetitionMandatory(e){this.checkIsTarget(e,Ji.REPETITION_MANDATORY)}visitRepetitionMandatoryWithSeparator(e){this.checkIsTarget(e,Ji.REPETITION_MANDATORY_WITH_SEPARATOR)}visitRepetitionWithSeparator(e){this.checkIsTarget(e,Ji.REPETITION_WITH_SEPARATOR)}visitAlternation(e){this.checkIsTarget(e,Ji.ALTERNATION)}};o(hE,"initializeArrayOfArrays");S(hE,"initializeArrayOfArrays");o(Qb,"pathToHashKeys");S(Qb,"pathToHashKeys");o(LG,"isUniquePrefixHash");S(LG,"isUniquePrefixHash");o(r6,"lookAheadSequenceFromAlternatives");S(r6,"lookAheadSequenceFromAlternatives");o(P1,"getLookaheadPathsForOr");S(P1,"getLookaheadPathsForOr");o(F1,"getLookaheadPathsForOptionalProd");S(F1,"getLookaheadPathsForOptionalProd");o(vx,"containsPath");S(vx,"containsPath");o($G,"isStrictPrefixOfPath");S($G,"isStrictPrefixOfPath");o(i6,"areTokenCategoriesNotUsed");S(i6,"areTokenCategoriesNotUsed");o(IG,"validateLookahead");S(IG,"validateLookahead");o(DG,"validateGrammar");S(DG,"validateGrammar");o(MG,"validateDuplicateProductions");S(MG,"validateDuplicateProductions");o(NG,"identifyProductionForDuplicates");S(NG,"identifyProductionForDuplicates");o(n6,"getExtraProductionArgument");S(n6,"getExtraProductionArgument");$nt=class extends N1{static{o(this,"OccurrenceValidationCollector")}static{S(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)}};o(OG,"validateRuleDoesNotAlreadyExist");S(OG,"validateRuleDoesNotAlreadyExist");o(BG,"validateRuleIsOverridden");S(BG,"validateRuleIsOverridden");o(a6,"validateNoLeftRecursion");S(a6,"validateNoLeftRecursion");o(c1,"getFirstNoneTerminal");S(c1,"getFirstNoneTerminal");PG=class extends N1{static{o(this,"OrCollector")}static{S(this,"OrCollector")}constructor(){super(...arguments),this.alternations=[]}visitAlternation(e){this.alternations.push(e)}};o(FG,"validateEmptyOrAlternative");S(FG,"validateEmptyOrAlternative");o(zG,"validateAmbiguousAlternationAlternatives");S(zG,"validateAmbiguousAlternationAlternatives");Int=class extends N1{static{o(this,"RepetitionCollector")}static{S(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)}};o(qG,"validateTooManyAlts");S(qG,"validateTooManyAlts");o(jG,"validateSomeNonEmptyLookaheadPath");S(jG,"validateSomeNonEmptyLookaheadPath");o(GG,"checkAlternativesAmbiguities");S(GG,"checkAlternativesAmbiguities");o(WG,"checkPrefixAlternativesAmbiguities");S(WG,"checkPrefixAlternativesAmbiguities");o(UG,"checkTerminalAndNoneTerminalsNameSpace");S(UG,"checkTerminalAndNoneTerminalsNameSpace");o(VG,"resolveGrammar2");S(VG,"resolveGrammar");o(YG,"validateGrammar2");S(YG,"validateGrammar");PCe="MismatchedTokenException",FCe="NoViableAltException",zCe="EarlyExitException",qCe="NotAllInputParsedException",jCe=[PCe,FCe,zCe,qCe];Object.freeze(jCe);o(T1,"isRecognitionException");S(T1,"isRecognitionException");s6=class extends Error{static{o(this,"RecognitionException")}static{S(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)}},GCe=class extends s6{static{o(this,"MismatchedTokenException")}static{S(this,"MismatchedTokenException")}constructor(e,t,r){super(e,t),this.previousToken=r,this.name=PCe}},Dnt=class extends s6{static{o(this,"NoViableAltException")}static{S(this,"NoViableAltException")}constructor(e,t,r){super(e,t),this.previousToken=r,this.name=FCe}},Mnt=class extends s6{static{o(this,"NotAllInputParsedException")}static{S(this,"NotAllInputParsedException")}constructor(e,t){super(e,t),this.name=qCe}},Nnt=class extends s6{static{o(this,"EarlyExitException")}static{S(this,"EarlyExitException")}constructor(e,t,r){super(e,t),this.previousToken=r,this.name=zCe}},KN={},WCe="InRuleRecoveryException",Ont=class extends Error{static{o(this,"InRuleRecoveryException")}static{S(this,"InRuleRecoveryException")}constructor(e){super(e),this.name=WCe}},Bnt=class{static{o(this,"Recoverable")}static{S(this,"Recoverable")}initRecoverable(e){this.firstAfterRepMap={},this.resyncFollows={},this.recoveryEnabled=pr(e,"recoveryEnabled")?e.recoveryEnabled:Kh.recoveryEnabled,this.recoveryEnabled&&(this.attemptInRepetitionRecovery=HG)}getTokenToInsert(e){let t=B1(e,"",NaN,NaN,NaN,NaN,NaN,NaN);return t.isInsertedInRecovery=!0,t}canTokenTypeBeInsertedInRecovery(e){return!0}canTokenTypeBeDeletedInRecovery(e){return!0}tryInRepetitionRecovery(e,t,r,i){let n=this.findReSyncTokenType(),a=this.exportLexerState(),s=[],l=!1,h=this.LA(1),u=this.LA(1),d=S(()=>{let p=this.LA(0),f=this.errorMessageProvider.buildMismatchTokenMessage({expected:i,actual:h,previous:p,ruleName:this.getCurrRuleFullName()}),g=new GCe(f,h,this.LA(0));g.resyncedTokens=px(s),this.SAVE_ERROR(g)},"generateErrorMessage");for(;!l;)if(this.tokenMatcher(u,i)){d();return}else if(r.call(this)){d(),e.apply(this,t);return}else this.tokenMatcher(u,n)?l=!0:(u=this.SKIP_TOKEN(),this.addToResyncTokens(u,s));this.importLexerState(a)}shouldInRepetitionRecoveryBeTried(e,t,r){return!(r===!1||this.tokenMatcher(this.LA(1),e)||this.isBackTracking()||this.canPerformInRuleRecovery(e,this.getFollowsForInRuleRecovery(e,t)))}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 Ont("sad sad panda")}canPerformInRuleRecovery(e,t){return this.canRecoverWithSingleTokenInsertion(e,t)||this.canRecoverWithSingleTokenDeletion(e)}canRecoverWithSingleTokenInsertion(e,t){if(!this.canTokenTypeBeInsertedInRecovery(e)||Di(t))return!1;let r=this.LA(1);return v1(t,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(),r=this.getFollowSetFromFollowKey(t);return Ss(r,e)}findReSyncTokenType(){let e=this.flattenFollowSet(),t=this.LA(1),r=2;for(;;){let i=v1(e,n=>JS(t,n));if(i!==void 0)return i;t=this.LA(r),r++}}getCurrFollowKey(){if(this.RULE_STACK.length===1)return KN;let e=this.getLastExplicitRuleShortName(),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;return Jt(e,(r,i)=>i===0?KN:{ruleName:this.shortRuleNameToFullName(r),idxInCallingRule:t[i],inRule:this.shortRuleNameToFullName(e[i-1])})}flattenFollowSet(){let e=Jt(this.buildFullFollowKeyStack(),t=>this.getFollowSetFromFollowKey(t));return Bl(e)}getFollowSetFromFollowKey(e){if(e===KN)return[Dd];let t=e.ruleName+e.idxInCallingRule+MCe+e.inRule;return this.resyncFollows[t]}addToResyncTokens(e,t){return this.tokenMatcher(e,Dd)||t.push(e),t}reSyncTo(e){let t=[],r=this.LA(1);for(;this.tokenMatcher(r,e)===!1;)r=this.SKIP_TOKEN(),this.addToResyncTokens(r,t);return px(t)}attemptInRepetitionRecovery(e,t,r,i,n,a,s){}getCurrentGrammarPath(e,t){let r=this.getHumanReadableRuleStack(),i=ba(this.RULE_OCCURRENCE_STACK);return{ruleStack:r,occurrenceStack:i,lastTok:e,lastTokOccurrence:t}}getHumanReadableRuleStack(){return Jt(this.RULE_STACK,e=>this.shortRuleNameToFullName(e))}};o(HG,"attemptInRepetitionRecovery");S(HG,"attemptInRepetitionRecovery");Pnt=4,Hd=8,Fnt=8,UCe=1<a6(t,t,ig))}validateEmptyOrAlternatives(e){return Jo(e,t=>FG(t,ig))}validateAmbiguousAlternationAlternatives(e,t){return Jo(e,r=>zG(r,t,ig))}validateSomeNonEmptyLookaheadPath(e,t){return jG(e,t,ig)}buildLookaheadForAlternation(e){return SG(e.prodOccurrence,e.rule,e.maxLookahead,e.hasPredicates,e.dynamicTokensEnabled,AG)}buildLookaheadForOptional(e){return _G(e.prodOccurrence,e.rule,e.maxLookahead,e.dynamicTokensEnabled,Jx(e.prodType),RG)}},znt=class{static{o(this,"LooksAhead")}static{S(this,"LooksAhead")}initLooksAhead(e){this.dynamicTokensEnabled=pr(e,"dynamicTokensEnabled")?e.dynamicTokensEnabled:Kh.dynamicTokensEnabled,this.maxLookahead=pr(e,"maxLookahead")?e.maxLookahead:Kh.maxLookahead,this.lookaheadStrategy=pr(e,"lookaheadStrategy")?e.lookaheadStrategy:new XG({maxLookahead:this.maxLookahead}),this.lookAheadFuncsCache=new Map}preComputeLookaheadFunctions(e){wr(e,t=>{this.TRACE_INIT(`${t.name} Rule Lookahead`,()=>{let{alternation:r,repetition:i,option:n,repetitionMandatory:a,repetitionMandatoryWithSeparator:s,repetitionWithSeparator:l}=KG(t);wr(r,h=>{let u=h.idx===0?"":h.idx;this.TRACE_INIT(`${Ho(h)}${u}`,()=>{let d=this.lookaheadStrategy.buildLookaheadForAlternation({prodOccurrence:h.idx,rule:t,maxLookahead:h.maxLookahead||this.maxLookahead,hasPredicates:h.hasPredicates,dynamicTokensEnabled:this.dynamicTokensEnabled}),p=Jb(this.fullRuleNameToShort[t.name],UCe,h.idx);this.setLaFuncCache(p,d)})}),wr(i,h=>{this.computeLookaheadFunc(t,h.idx,AB,"Repetition",h.maxLookahead,Ho(h))}),wr(n,h=>{this.computeLookaheadFunc(t,h.idx,VCe,"Option",h.maxLookahead,Ho(h))}),wr(a,h=>{this.computeLookaheadFunc(t,h.idx,RB,"RepetitionMandatory",h.maxLookahead,Ho(h))}),wr(s,h=>{this.computeLookaheadFunc(t,h.idx,I5,"RepetitionMandatoryWithSeparator",h.maxLookahead,Ho(h))}),wr(l,h=>{this.computeLookaheadFunc(t,h.idx,LB,"RepetitionWithSeparator",h.maxLookahead,Ho(h))})})})}computeLookaheadFunc(e,t,r,i,n,a){this.TRACE_INIT(`${a}${t===0?"":t}`,()=>{let s=this.lookaheadStrategy.buildLookaheadForOptional({prodOccurrence:t,rule:e,maxLookahead:n||this.maxLookahead,dynamicTokensEnabled:this.dynamicTokensEnabled,prodType:i}),l=Jb(this.fullRuleNameToShort[e.name],r,t);this.setLaFuncCache(l,s)})}getKeyForAutomaticLookahead(e,t){let r=this.getLastExplicitRuleShortName();return Jb(r,e,t)}getLaFuncFromCache(e){return this.lookAheadFuncsCache.get(e)}setLaFuncCache(e,t){this.lookAheadFuncsCache.set(e,t)}},qnt=class extends N1{static{o(this,"DslMethodsCollectorVisitor")}static{S(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)}},o5=new qnt;o(KG,"collectMethods");S(KG,"collectMethods");o(uE,"setNodeLocationOnlyOffset");S(uE,"setNodeLocationOnlyOffset");o(dE,"setNodeLocationFull");S(dE,"setNodeLocationFull");o(ZG,"addTerminalToCst");S(ZG,"addTerminalToCst");o(QG,"addNoneTerminalToCst");S(QG,"addNoneTerminalToCst");jnt="name";o(o6,"defineNameProp");S(o6,"defineNameProp");o(JG,"defaultVisit");S(JG,"defaultVisit");o(eW,"createBaseSemanticVisitorConstructor");S(eW,"createBaseSemanticVisitorConstructor");o(tW,"createBaseVisitorConstructorWithDefaults");S(tW,"createBaseVisitorConstructorWithDefaults");(function(e){e[e.REDUNDANT_METHOD=0]="REDUNDANT_METHOD",e[e.MISSING_METHOD=1]="MISSING_METHOD"})($B||($B={}));o(rW,"validateVisitor");S(rW,"validateVisitor");o(iW,"validateMissingCstMethods");S(iW,"validateMissingCstMethods");Gnt=class{static{o(this,"TreeBuilder")}static{S(this,"TreeBuilder")}initTreeBuilder(e){if(this.CST_STACK=[],this.outputCst=e.outputCst,this.nodeLocationTracking=pr(e,"nodeLocationTracking")?e.nodeLocationTracking:Kh.nodeLocationTracking,!this.outputCst)this.cstInvocationStateUpdate=ra,this.cstFinallyStateUpdate=ra,this.cstPostTerminal=ra,this.cstPostNonTerminal=ra,this.cstPostRule=ra;else if(/full/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=dE,this.setNodeLocationFromNode=dE,this.cstPostRule=ra,this.setInitialNodeLocation=this.setInitialNodeLocationFullRecovery):(this.setNodeLocationFromToken=ra,this.setNodeLocationFromNode=ra,this.cstPostRule=this.cstPostRuleFull,this.setInitialNodeLocation=this.setInitialNodeLocationFullRegular);else if(/onlyOffset/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=uE,this.setNodeLocationFromNode=uE,this.cstPostRule=ra,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRecovery):(this.setNodeLocationFromToken=ra,this.setNodeLocationFromNode=ra,this.cstPostRule=this.cstPostRuleOnlyOffset,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRegular);else if(/none/i.test(this.nodeLocationTracking))this.setNodeLocationFromToken=ra,this.setNodeLocationFromNode=ra,this.cstPostRule=ra,this.setInitialNodeLocation=ra;else throw Error(`Invalid config option: "${e.nodeLocationTracking}"`)}setInitialNodeLocationOnlyOffsetRecovery(e){e.location={startOffset:NaN,endOffset:NaN}}setInitialNodeLocationOnlyOffsetRegular(e){e.location={startOffset:this.LA(1).startOffset,endOffset:NaN}}setInitialNodeLocationFullRecovery(e){e.location={startOffset:NaN,startLine:NaN,startColumn:NaN,endOffset:NaN,endLine:NaN,endColumn:NaN}}setInitialNodeLocationFullRegular(e){let t=this.LA(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];ZG(r,t,e),this.setNodeLocationFromToken(r.location,t)}cstPostNonTerminal(e,t){let r=this.CST_STACK[this.CST_STACK.length-1];QG(r,t,e),this.setNodeLocationFromNode(r.location,e.location)}getBaseCstVisitorConstructor(){if(Xh(this.baseCstVisitorConstructor)){let e=eW(this.className,yo(this.gastProductionsCache));return this.baseCstVisitorConstructor=e,e}return this.baseCstVisitorConstructor}getBaseCstVisitorConstructorWithDefaults(){if(Xh(this.baseCstVisitorWithDefaultsConstructor)){let e=tW(this.className,yo(this.gastProductionsCache),this.getBaseCstVisitorConstructor());return this.baseCstVisitorWithDefaultsConstructor=e,e}return this.baseCstVisitorWithDefaultsConstructor}getLastExplicitRuleShortName(){let e=this.RULE_STACK;return e[e.length-1]}getPreviousExplicitRuleShortName(){let e=this.RULE_STACK;return e[e.length-2]}getLastExplicitRuleOccurrenceIndex(){let e=this.RULE_OCCURRENCE_STACK;return e[e.length-1]}},Wnt=class{static{o(this,"LexerAdapter")}static{S(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.tokVector.length-2?(this.consumeToken(),this.LA(1)):fE}LA(e){let t=this.currIdx+e;return t<0||this.tokVectorLength<=t?fE:this.tokVector[t]}consumeToken(){this.currIdx++}exportLexerState(){return this.currIdx}importLexerState(e){this.currIdx=e}resetLexerState(){this.currIdx=-1}moveToTerminatedState(){this.currIdx=this.tokVector.length-1}getLexerPosition(){return this.exportLexerState()}},Unt=class{static{o(this,"RecognizerApi")}static{S(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=gE){if(Ss(this.definedRulesNames,e)){let n={message:ig.buildDuplicateRuleNameError({topLevelRule:e,grammarName:this.className}),type:ws.DUPLICATE_RULE_NAME,ruleName:e};this.definitionErrors.push(n)}this.definedRulesNames.push(e);let i=this.defineRule(e,t,r);return this[e]=i,i}OVERRIDE_RULE(e,t,r=gE){let i=BG(e,this.definedRulesNames,this.className);this.definitionErrors=this.definitionErrors.concat(i);let n=this.defineRule(e,t,r);return this[e]=n,n}BACKTRACK(e,t){return function(){this.isBackTrackingStack.push(1);let r=this.saveRecogState();try{return e.apply(this,t),!0}catch(i){if(T1(i))return!1;throw i}finally{this.reloadRecogState(r),this.isBackTrackingStack.pop()}}}getGAstProductions(){return this.gastProductionsCache}getSerializedGastProductions(){return Bj(Gn(this.gastProductionsCache))}},Vnt=class{static{o(this,"RecognizerEngine")}static{S(this,"RecognizerEngine")}initRecognizerEngine(e,t){if(this.className=this.constructor.name,this.shortRuleNameToFull={},this.fullRuleNameToShort={},this.ruleShortNameIdx=256,this.tokenMatcher=x1,this.subruleIdx=0,this.definedRulesNames=[],this.tokensMap={},this.isBackTrackingStack=[],this.RULE_STACK=[],this.RULE_OCCURRENCE_STACK=[],this.gastProductionsCache={},pr(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(ai(e)){if(Di(e))throw Error(`A Token Vocabulary cannot be empty. + Note that the first argument for the parser constructor + is no longer a Token vector (since v4.0).`);if(typeof e[0].startOffset=="number")throw Error(`The Parser constructor no longer accepts a token vector as the first argument. + See: https://chevrotain.io/docs/changes/BREAKING_CHANGES.html#_4-0-0 + For Further details.`)}if(ai(e))this.tokensMap=bo(e,(n,a)=>(n[a.name]=a,n),{});else if(pr(e,"modes")&&Pl(Bl(Gn(e.modes)),kG)){let n=Bl(Gn(e.modes)),a=Mj(n);this.tokensMap=bo(a,(s,l)=>(s[l.name]=l,s),{})}else if(tl(e))this.tokensMap=ba(e);else throw new Error(" argument must be An Array of Token constructors, A dictionary of Token constructors or an IMultiModeLexerDefinition");this.tokensMap.EOF=Dd;let r=pr(e,"modes")?Bl(Gn(e.modes)):Gn(e),i=Pl(r,n=>Di(n.categoryMatches));this.tokenMatcher=i?x1:kg,Cg(Gn(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 i=pr(r,"resyncEnabled")?r.resyncEnabled:gE.resyncEnabled,n=pr(r,"recoveryValueFunc")?r.recoveryValueFunc:gE.recoveryValueFunc,a=this.ruleShortNameIdx<a.call(this)&&s.call(this),"lookAheadFunc")}}else n=e;if(i.call(this)===!0)return n.call(this)}atLeastOneInternal(e,t){let r=this.getKeyForAutomaticLookahead(RB,e);return this.atLeastOneInternalLogic(e,t,r)}atLeastOneInternalLogic(e,t,r){let i=this.getLaFuncFromCache(r),n;if(typeof t!="function"){n=t.DEF;let a=t.GATE;if(a!==void 0){let s=i;i=S(()=>a.call(this)&&s.call(this),"lookAheadFunc")}}else n=t;if(i.call(this)===!0){let a=this.doSingleRepetition(n);for(;i.call(this)===!0&&a===!0;)a=this.doSingleRepetition(n)}else throw this.raiseEarlyExitException(e,Ji.REPETITION_MANDATORY,t.ERR_MSG);this.attemptInRepetitionRecovery(this.atLeastOneInternal,[e,t],i,RB,e,Rnt)}atLeastOneSepFirstInternal(e,t){let r=this.getKeyForAutomaticLookahead(I5,e);this.atLeastOneSepFirstInternalLogic(e,t,r)}atLeastOneSepFirstInternalLogic(e,t,r){let i=t.DEF,n=t.SEP;if(this.getLaFuncFromCache(r).call(this)===!0){i.call(this);let a=S(()=>this.tokenMatcher(this.LA(1),n),"separatorLookAheadFunc");for(;this.tokenMatcher(this.LA(1),n)===!0;)this.CONSUME(n),i.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,n,a,i,uke],a,I5,e,uke)}else throw this.raiseEarlyExitException(e,Ji.REPETITION_MANDATORY_WITH_SEPARATOR,t.ERR_MSG)}manyInternal(e,t){let r=this.getKeyForAutomaticLookahead(AB,e);return this.manyInternalLogic(e,t,r)}manyInternalLogic(e,t,r){let i=this.getLaFuncFromCache(r),n;if(typeof t!="function"){n=t.DEF;let s=t.GATE;if(s!==void 0){let l=i;i=S(()=>s.call(this)&&l.call(this),"lookaheadFunction")}}else n=t;let a=!0;for(;i.call(this)===!0&&a===!0;)a=this.doSingleRepetition(n);this.attemptInRepetitionRecovery(this.manyInternal,[e,t],i,AB,e,Ant,a)}manySepFirstInternal(e,t){let r=this.getKeyForAutomaticLookahead(LB,e);this.manySepFirstInternalLogic(e,t,r)}manySepFirstInternalLogic(e,t,r){let i=t.DEF,n=t.SEP;if(this.getLaFuncFromCache(r).call(this)===!0){i.call(this);let a=S(()=>this.tokenMatcher(this.LA(1),n),"separatorLookAheadFunc");for(;this.tokenMatcher(this.LA(1),n)===!0;)this.CONSUME(n),i.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,n,a,i,hke],a,LB,e,hke)}}repetitionSepSecondInternal(e,t,r,i,n){for(;r();)this.CONSUME(t),i.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,t,r,i,n],r,I5,e,n)}doSingleRepetition(e){let t=this.getLexerPosition();return e.call(this),this.getLexerPosition()>t}orInternal(e,t){let r=this.getKeyForAutomaticLookahead(UCe,t),i=ai(e)?e:e.DEF,n=this.getLaFuncFromCache(r).call(this,i);if(n!==void 0)return i[n].ALT.call(this);this.raiseNoAltException(t,e.ERR_MSG)}ruleFinallyStateUpdate(){if(this.RULE_STACK.pop(),this.RULE_OCCURRENCE_STACK.pop(),this.cstFinallyStateUpdate(),this.RULE_STACK.length===0&&this.isAtEndOfInput()===!1){let e=this.LA(1),t=this.errorMessageProvider.buildNotAllInputParsedMessage({firstRedundant:e,ruleName:this.getCurrRuleFullName()});this.SAVE_ERROR(new Mnt(t,e))}}subruleInternal(e,t,r){let i;try{let n=r!==void 0?r.ARGS:void 0;return this.subruleIdx=t,i=e.apply(this,n),this.cstPostNonTerminal(i,r!==void 0&&r.LABEL!==void 0?r.LABEL:e.ruleName),i}catch(n){throw this.subruleInternalError(n,r,e.ruleName)}}subruleInternalError(e,t,r){throw T1(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 i;try{let n=this.LA(1);this.tokenMatcher(n,e)===!0?(this.consumeToken(),i=n):this.consumeInternalError(e,n,r)}catch(n){i=this.consumeInternalRecovery(e,t,n)}return this.cstPostTerminal(r!==void 0&&r.LABEL!==void 0?r.LABEL:e.name,i),i}consumeInternalError(e,t,r){let i,n=this.LA(0);throw r!==void 0&&r.ERR_MSG?i=r.ERR_MSG:i=this.errorMessageProvider.buildMismatchTokenMessage({expected:e,actual:t,previous:n,ruleName:this.getCurrRuleFullName()}),this.SAVE_ERROR(new GCe(i,t,n))}consumeInternalRecovery(e,t,r){if(this.recoveryEnabled&&r.name==="MismatchedTokenException"&&!this.isBackTracking()){let i=this.getFollowsForInRuleRecovery(e,t);try{return this.tryInRuleRecovery(e,i)}catch(n){throw n.name===WCe?r:n}}else throw r}saveRecogState(){let e=this.errors,t=ba(this.RULE_STACK);return{errors:e,lexerState:this.exportLexerState(),RULE_STACK:t,CST_STACK:this.CST_STACK}}reloadRecogState(e){this.errors=e.errors,this.importLexerState(e.lexerState),this.RULE_STACK=e.RULE_STACK}ruleInvocationStateUpdate(e,t,r){this.RULE_OCCURRENCE_STACK.push(r),this.RULE_STACK.push(e),this.cstInvocationStateUpdate(t)}isBackTracking(){return this.isBackTrackingStack.length!==0}getCurrRuleFullName(){let e=this.getLastExplicitRuleShortName();return this.shortRuleNameToFull[e]}shortRuleNameToFullName(e){return this.shortRuleNameToFull[e]}isAtEndOfInput(){return this.tokenMatcher(this.LA(1),Dd)}reset(){this.resetLexerState(),this.subruleIdx=0,this.isBackTrackingStack=[],this.errors=[],this.RULE_STACK=[],this.CST_STACK=[],this.RULE_OCCURRENCE_STACK=[]}},Ynt=class{static{o(this,"ErrorHandler")}static{S(this,"ErrorHandler")}initErrorHandler(e){this._errors=[],this.errorMessageProvider=pr(e,"errorMessageProvider")?e.errorMessageProvider:Kh.errorMessageProvider}SAVE_ERROR(e){if(T1(e))return e.context={ruleStack:this.getHumanReadableRuleStack(),ruleOccurrenceStack:ba(this.RULE_OCCURRENCE_STACK)},this._errors.push(e),e;throw Error("Trying to save an Error which is not a RecognitionException")}get errors(){return ba(this._errors)}set errors(e){this._errors=e}raiseEarlyExitException(e,t,r){let i=this.getCurrRuleFullName(),n=this.getGAstProductions()[i],a=F1(e,n,t,this.maxLookahead)[0],s=[];for(let h=1;h<=this.maxLookahead;h++)s.push(this.LA(h));let l=this.errorMessageProvider.buildEarlyExitMessage({expectedIterationPaths:a,actual:s,previous:this.LA(0),customUserDescription:r,ruleName:i});throw this.SAVE_ERROR(new Nnt(l,this.LA(1),this.LA(0)))}raiseNoAltException(e,t){let r=this.getCurrRuleFullName(),i=this.getGAstProductions()[r],n=P1(e,i,this.maxLookahead),a=[];for(let h=1;h<=this.maxLookahead;h++)a.push(this.LA(h));let s=this.LA(0),l=this.errorMessageProvider.buildNoViableAltMessage({expectedPathsPerAlt:n,actual:a,previous:s,customUserDescription:t,ruleName:this.getCurrRuleFullName()});throw this.SAVE_ERROR(new Dnt(l,this.LA(1),s))}},Hnt=class{static{o(this,"ContentAssist")}static{S(this,"ContentAssist")}initContentAssist(){}computeContentAssist(e,t){let r=this.gastProductionsCache[e];if(Xh(r))throw Error(`Rule ->${e}<- does not exist in this grammar.`);return t6([r],t,this.tokenMatcher,this.maxLookahead)}getNextPossibleTokenTypes(e){let t=zl(e.ruleStack),r=this.getGAstProductions()[t];return new _nt(r,e).startWalking()}},l6={description:"This Object indicates the Parser is during Recording Phase"};Object.freeze(l6);dke=!0,pke=Math.pow(2,Hd)-1,YCe=sg({name:"RECORDING_PHASE_TOKEN",pattern:ks.NA});Cg([YCe]);HCe=B1(YCe,`This IToken indicates the Parser is in Recording Phase + See: https://chevrotain.io/docs/guide/internals.html#grammar-recording for details`,-1,-1,-1,-1,-1,-1);Object.freeze(HCe);Xnt={name:`This CSTNode indicates the Parser is in Recording Phase + See: https://chevrotain.io/docs/guide/internals.html#grammar-recording for details`,children:{}},Knt=class{static{o(this,"GastRecorder")}static{S(this,"GastRecorder")}initGastRecorder(e){this.recordingProdStack=[],this.RECORDING_PHASE=!1}enableRecording(){this.RECORDING_PHASE=!0,this.TRACE_INIT("Enable Recording",()=>{for(let e=0;e<10;e++){let t=e>0?e:"";this[`CONSUME${t}`]=function(r,i){return this.consumeInternalRecord(r,e,i)},this[`SUBRULE${t}`]=function(r,i){return this.subruleInternalRecord(r,e,i)},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 fE}topLevelRuleRecord(e,t){try{let r=new M1({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 tg.call(this,va,e,t)}atLeastOneInternalRecord(e,t){tg.call(this,To,t,e)}atLeastOneSepFirstInternalRecord(e,t){tg.call(this,ko,t,e,dke)}manyInternalRecord(e,t){tg.call(this,pn,t,e)}manySepFirstInternalRecord(e,t){tg.call(this,Xs,t,e,dke)}orInternalRecord(e,t){return nW.call(this,e,t)}subruleInternalRecord(e,t,r){if(k1(t),!e||pr(e,"ruleName")===!1){let s=new Error(` argument is invalid expecting a Parser method reference but got: <${JSON.stringify(e)}> + inside top level rule: <${this.recordingProdStack[0].name}>`);throw s.KNOWN_RECORDER_ERROR=!0,s}let i=pg(this.recordingProdStack),n=e.ruleName,a=new Cs({idx:t,nonTerminalName:n,label:r?.LABEL,referencedRule:void 0});return i.definition.push(a),this.outputCst?Xnt:l6}consumeInternalRecord(e,t,r){if(k1(t),!ZS(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 i=pg(this.recordingProdStack),n=new zi({idx:t,terminalType:e,label:r?.LABEL});return i.definition.push(n),HCe}};o(tg,"recordProd");S(tg,"recordProd");o(nW,"recordOrProd");S(nW,"recordOrProd");o(pE,"getIdxSuffix");S(pE,"getIdxSuffix");o(k1,"assertMethodIdxIsValid");S(k1,"assertMethodIdxIsValid");Znt=class{static{o(this,"PerformanceTracer")}static{S(this,"PerformanceTracer")}initPerformanceTracer(e){if(pr(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=Kh.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:i,value:n}=WS(t),a=i>10?console.warn:console.log;return this.traceInitIndent time: ${i}ms`),this.traceInitIndent--,n}else return t()}};o(aW,"applyMixins");S(aW,"applyMixins");fE=B1(Dd,"",NaN,NaN,NaN,NaN,NaN,NaN);Object.freeze(fE);Kh=Object.freeze({recoveryEnabled:!1,maxLookahead:3,dynamicTokensEnabled:!1,outputCst:!0,errorMessageProvider:a1,nodeLocationTracking:"none",traceInitPerf:!1,skipValidations:!1}),gE=Object.freeze({recoveryValueFunc:S(()=>{},"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"})(ws||(ws={}));o(mE,"EMPTY_ALT");S(mE,"EMPTY_ALT");sW=class XCe{static{o(this,"_Parser")}static{S(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",()=>{US(this)}),this.TRACE_INIT("Grammar Recording",()=>{try{this.enableRecording(),wr(this.definedRulesNames,n=>{let a=this[n].originalGrammarAction,s;this.TRACE_INIT(`${n} Rule`,()=>{s=this.topLevelRuleRecord(n,a)}),this.gastProductionsCache[n]=s})}finally{this.disableRecording()}});let i=[];if(this.TRACE_INIT("Grammar Resolving",()=>{i=VG({rules:Gn(this.gastProductionsCache)}),this.definitionErrors=this.definitionErrors.concat(i)}),this.TRACE_INIT("Grammar Validations",()=>{if(Di(i)&&this.skipValidations===!1){let n=YG({rules:Gn(this.gastProductionsCache),tokenTypes:Gn(this.tokensMap),errMsgProvider:ig,grammarName:r}),a=IG({lookaheadStrategy:this.lookaheadStrategy,rules:Gn(this.gastProductionsCache),tokenTypes:Gn(this.tokensMap),grammarName:r});this.definitionErrors=this.definitionErrors.concat(n,a)}}),Di(this.definitionErrors)&&(this.recoveryEnabled&&this.TRACE_INIT("computeAllProdsFollows",()=>{let n=Gj(Gn(this.gastProductionsCache));this.resyncFollows=n}),this.TRACE_INIT("ComputeLookaheadFunctions",()=>{var n,a;(a=(n=this.lookaheadStrategy).initialize)===null||a===void 0||a.call(n,{rules:Gn(this.gastProductionsCache)}),this.preComputeLookaheadFunctions(Gn(this.gastProductionsCache))})),!XCe.DEFER_DEFINITION_ERRORS_HANDLING&&!Di(this.definitionErrors))throw t=Jt(this.definitionErrors,n=>n.message),new Error(`Parser Definition Errors detected: + ${t.join(` +------------------------------- +`)}`)})}constructor(t,r){this.definitionErrors=[],this.selfAnalysisDone=!1;let i=this;if(i.initErrorHandler(r),i.initLexerAdapter(),i.initLooksAhead(r),i.initRecognizerEngine(t,r),i.initRecoverable(r),i.initTreeBuilder(r),i.initContentAssist(),i.initGastRecorder(r),i.initPerformanceTracer(r),pr(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=pr(r,"skipValidations")?r.skipValidations:Kh.skipValidations}};sW.DEFER_DEFINITION_ERRORS_HANDLING=!1;aW(sW,[Bnt,znt,Gnt,Wnt,Vnt,Unt,Ynt,Hnt,Knt,Znt]);Qnt=class extends sW{static{o(this,"EmbeddedActionsParser")}static{S(this,"EmbeddedActionsParser")}constructor(e,t=Kh){let r=ba(t);r.outputCst=!1,super(e,r)}};o(oW,"arrayMap2");S(oW,"arrayMap");KCe=oW;o(lW,"listCacheClear2");S(lW,"listCacheClear");Jnt=lW;o(cW,"eq2");S(cW,"eq");ZCe=cW;o(hW,"assocIndexOf2");S(hW,"assocIndexOf");c6=hW,eat=Array.prototype,tat=eat.splice;o(uW,"listCacheDelete2");S(uW,"listCacheDelete");rat=uW;o(dW,"listCacheGet2");S(dW,"listCacheGet");iat=dW;o(pW,"listCacheHas2");S(pW,"listCacheHas");nat=pW;o(fW,"listCacheSet2");S(fW,"listCacheSet");aat=fW;o(Xd,"ListCache2");S(Xd,"ListCache");Xd.prototype.clear=Jnt;Xd.prototype.delete=rat;Xd.prototype.get=iat;Xd.prototype.has=nat;Xd.prototype.set=aat;h6=Xd;o(gW,"stackClear2");S(gW,"stackClear");sat=gW;o(mW,"stackDelete2");S(mW,"stackDelete");oat=mW;o(yW,"stackGet2");S(yW,"stackGet");lat=yW;o(vW,"stackHas2");S(vW,"stackHas");cat=vW,hat=typeof global=="object"&&global&&global.Object===Object&&global,QCe=hat,uat=typeof self=="object"&&self&&self.Object===Object&&self,dat=QCe||uat||Function("return this")(),ru=dat,pat=ru.Symbol,Gc=pat,JCe=Object.prototype,fat=JCe.hasOwnProperty,gat=JCe.toString,yb=Gc?Gc.toStringTag:void 0;o(bW,"getRawTag2");S(bW,"getRawTag");mat=bW,yat=Object.prototype,vat=yat.toString;o(xW,"objectToString2");S(xW,"objectToString");bat=xW,xat="[object Null]",Tat="[object Undefined]",fke=Gc?Gc.toStringTag:void 0;o(TW,"baseGetTag2");S(TW,"baseGetTag");z1=TW;o(kW,"isObject2");S(kW,"isObject");CW=kW,kat="[object AsyncFunction]",Cat="[object Function]",wat="[object GeneratorFunction]",Eat="[object Proxy]";o(wW,"isFunction2");S(wW,"isFunction");ewe=wW,Sat=ru["__core-js_shared__"],ZN=Sat,gke=(function(){var e=/[^.]+$/.exec(ZN&&ZN.keys&&ZN.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""})();o(EW,"isMasked2");S(EW,"isMasked");_at=EW,Aat=Function.prototype,Rat=Aat.toString;o(SW,"toSource2");S(SW,"toSource");wg=SW,Lat=/[\\^$.*+?()[\]{}|]/g,$at=/^\[object .+?Constructor\]$/,Iat=Function.prototype,Dat=Object.prototype,Mat=Iat.toString,Nat=Dat.hasOwnProperty,Oat=RegExp("^"+Mat.call(Nat).replace(Lat,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");o(_W,"baseIsNative2");S(_W,"baseIsNative");Bat=_W;o(AW,"getValue2");S(AW,"getValue");Pat=AW;o(RW,"getNative2");S(RW,"getNative");q1=RW,Fat=q1(ru,"Map"),bx=Fat,zat=q1(Object,"create"),xx=zat;o(LW,"hashClear2");S(LW,"hashClear");qat=LW;o($W,"hashDelete2");S($W,"hashDelete");jat=$W,Gat="__lodash_hash_undefined__",Wat=Object.prototype,Uat=Wat.hasOwnProperty;o(IW,"hashGet2");S(IW,"hashGet");Vat=IW,Yat=Object.prototype,Hat=Yat.hasOwnProperty;o(DW,"hashHas2");S(DW,"hashHas");Xat=DW,Kat="__lodash_hash_undefined__";o(MW,"hashSet2");S(MW,"hashSet");Zat=MW;o(Kd,"Hash2");S(Kd,"Hash");Kd.prototype.clear=qat;Kd.prototype.delete=jat;Kd.prototype.get=Vat;Kd.prototype.has=Xat;Kd.prototype.set=Zat;mke=Kd;o(NW,"mapCacheClear2");S(NW,"mapCacheClear");Qat=NW;o(OW,"isKeyable2");S(OW,"isKeyable");Jat=OW;o(BW,"getMapData2");S(BW,"getMapData");u6=BW;o(PW,"mapCacheDelete2");S(PW,"mapCacheDelete");est=PW;o(FW,"mapCacheGet2");S(FW,"mapCacheGet");tst=FW;o(zW,"mapCacheHas2");S(zW,"mapCacheHas");rst=zW;o(qW,"mapCacheSet2");S(qW,"mapCacheSet");ist=qW;o(Zd,"MapCache2");S(Zd,"MapCache");Zd.prototype.clear=Qat;Zd.prototype.delete=est;Zd.prototype.get=tst;Zd.prototype.has=rst;Zd.prototype.set=ist;d6=Zd,nst=200;o(jW,"stackSet2");S(jW,"stackSet");ast=jW;o(Qd,"Stack2");S(Qd,"Stack");Qd.prototype.clear=sat;Qd.prototype.delete=oat;Qd.prototype.get=lat;Qd.prototype.has=cat;Qd.prototype.set=ast;D5=Qd,sst="__lodash_hash_undefined__";o(GW,"setCacheAdd2");S(GW,"setCacheAdd");ost=GW;o(WW,"setCacheHas2");S(WW,"setCacheHas");lst=WW;o(C1,"SetCache2");S(C1,"SetCache");C1.prototype.add=C1.prototype.push=ost;C1.prototype.has=lst;twe=C1;o(UW,"arraySome2");S(UW,"arraySome");cst=UW;o(VW,"cacheHas2");S(VW,"cacheHas");rwe=VW,hst=1,ust=2;o(YW,"equalArrays2");S(YW,"equalArrays");iwe=YW,dst=ru.Uint8Array,yke=dst;o(HW,"mapToArray2");S(HW,"mapToArray");pst=HW;o(XW,"setToArray2");S(XW,"setToArray");KW=XW,fst=1,gst=2,mst="[object Boolean]",yst="[object Date]",vst="[object Error]",bst="[object Map]",xst="[object Number]",Tst="[object RegExp]",kst="[object Set]",Cst="[object String]",wst="[object Symbol]",Est="[object ArrayBuffer]",Sst="[object DataView]",vke=Gc?Gc.prototype:void 0,QN=vke?vke.valueOf:void 0;o(ZW,"equalByTag2");S(ZW,"equalByTag");_st=ZW;o(QW,"arrayPush2");S(QW,"arrayPush");nwe=QW,Ast=Array.isArray,Es=Ast;o(JW,"baseGetAllKeys2");S(JW,"baseGetAllKeys");Rst=JW;o(eU,"arrayFilter2");S(eU,"arrayFilter");awe=eU;o(tU,"stubArray2");S(tU,"stubArray");Lst=tU,$st=Object.prototype,Ist=$st.propertyIsEnumerable,bke=Object.getOwnPropertySymbols,Dst=bke?function(e){return e==null?[]:(e=Object(e),awe(bke(e),function(t){return Ist.call(e,t)}))}:Lst,Mst=Dst;o(rU,"baseTimes2");S(rU,"baseTimes");Nst=rU;o(iU,"isObjectLike2");S(iU,"isObjectLike");w1=iU,Ost="[object Arguments]";o(nU,"baseIsArguments2");S(nU,"baseIsArguments");xke=nU,swe=Object.prototype,Bst=swe.hasOwnProperty,Pst=swe.propertyIsEnumerable,Fst=xke((function(){return arguments})())?xke:function(e){return w1(e)&&Bst.call(e,"callee")&&!Pst.call(e,"callee")},p6=Fst;o(aU,"stubFalse2");S(aU,"stubFalse");zst=aU,owe=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Tke=owe&&typeof module=="object"&&module&&!module.nodeType&&module,qst=Tke&&Tke.exports===owe,kke=qst?ru.Buffer:void 0,jst=kke?kke.isBuffer:void 0,Gst=jst||zst,yE=Gst,Wst=9007199254740991,Ust=/^(?:0|[1-9]\d*)$/;o(sU,"isIndex2");S(sU,"isIndex");lwe=sU,Vst=9007199254740991;o(oU,"isLength2");S(oU,"isLength");lU=oU,Yst="[object Arguments]",Hst="[object Array]",Xst="[object Boolean]",Kst="[object Date]",Zst="[object Error]",Qst="[object Function]",Jst="[object Map]",eot="[object Number]",tot="[object Object]",rot="[object RegExp]",iot="[object Set]",not="[object String]",aot="[object WeakMap]",sot="[object ArrayBuffer]",oot="[object DataView]",lot="[object Float32Array]",cot="[object Float64Array]",hot="[object Int8Array]",uot="[object Int16Array]",dot="[object Int32Array]",pot="[object Uint8Array]",fot="[object Uint8ClampedArray]",got="[object Uint16Array]",mot="[object Uint32Array]",Fi={};Fi[lot]=Fi[cot]=Fi[hot]=Fi[uot]=Fi[dot]=Fi[pot]=Fi[fot]=Fi[got]=Fi[mot]=!0;Fi[Yst]=Fi[Hst]=Fi[sot]=Fi[Xst]=Fi[oot]=Fi[Kst]=Fi[Zst]=Fi[Qst]=Fi[Jst]=Fi[eot]=Fi[tot]=Fi[rot]=Fi[iot]=Fi[not]=Fi[aot]=!1;o(cU,"baseIsTypedArray2");S(cU,"baseIsTypedArray");yot=cU;o(hU,"baseUnary2");S(hU,"baseUnary");vot=hU,cwe=typeof exports=="object"&&exports&&!exports.nodeType&&exports,ex=cwe&&typeof module=="object"&&module&&!module.nodeType&&module,bot=ex&&ex.exports===cwe,JN=bot&&QCe.process,xot=(function(){try{var e=ex&&ex.require&&ex.require("util").types;return e||JN&&JN.binding&&JN.binding("util")}catch{}})(),Cke=xot,wke=Cke&&Cke.isTypedArray,Tot=wke?vot(wke):yot,uU=Tot,kot=Object.prototype,Cot=kot.hasOwnProperty;o(dU,"arrayLikeKeys2");S(dU,"arrayLikeKeys");wot=dU,Eot=Object.prototype;o(pU,"isPrototype2");S(pU,"isPrototype");hwe=pU;o(fU,"overArg2");S(fU,"overArg");Sot=fU,_ot=Sot(Object.keys,Object),Aot=_ot,Rot=Object.prototype,Lot=Rot.hasOwnProperty;o(gU,"baseKeys2");S(gU,"baseKeys");uwe=gU;o(mU,"isArrayLike2");S(mU,"isArrayLike");f6=mU;o(yU,"keys2");S(yU,"keys");vU=yU;o(bU,"getAllKeys2");S(bU,"getAllKeys");Eke=bU,$ot=1,Iot=Object.prototype,Dot=Iot.hasOwnProperty;o(xU,"equalObjects2");S(xU,"equalObjects");Mot=xU,Not=q1(ru,"DataView"),IB=Not,Oot=q1(ru,"Promise"),DB=Oot,Bot=q1(ru,"Set"),h1=Bot,Pot=q1(ru,"WeakMap"),MB=Pot,Ske="[object Map]",Fot="[object Object]",_ke="[object Promise]",Ake="[object Set]",Rke="[object WeakMap]",Lke="[object DataView]",zot=wg(IB),qot=wg(bx),jot=wg(DB),Got=wg(h1),Wot=wg(MB),Pf=z1;(IB&&Pf(new IB(new ArrayBuffer(1)))!=Lke||bx&&Pf(new bx)!=Ske||DB&&Pf(DB.resolve())!=_ke||h1&&Pf(new h1)!=Ake||MB&&Pf(new MB)!=Rke)&&(Pf=S(function(e){var t=z1(e),r=t==Fot?e.constructor:void 0,i=r?wg(r):"";if(i)switch(i){case zot:return Lke;case qot:return Ske;case jot:return _ke;case Got:return Ake;case Wot:return Rke}return t},"getTag"));NB=Pf,Uot=1,$ke="[object Arguments]",Ike="[object Array]",l5="[object Object]",Vot=Object.prototype,Dke=Vot.hasOwnProperty;o(TU,"baseIsEqualDeep2");S(TU,"baseIsEqualDeep");Yot=TU;o(g6,"baseIsEqual2");S(g6,"baseIsEqual");dwe=g6,Hot=1,Xot=2;o(kU,"baseIsMatch2");S(kU,"baseIsMatch");Kot=kU;o(CU,"isStrictComparable2");S(CU,"isStrictComparable");pwe=CU;o(wU,"getMatchData2");S(wU,"getMatchData");Zot=wU;o(EU,"matchesStrictComparable2");S(EU,"matchesStrictComparable");fwe=EU;o(SU,"baseMatches2");S(SU,"baseMatches");Qot=SU,Jot="[object Symbol]";o(_U,"isSymbol2");S(_U,"isSymbol");m6=_U,elt=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,tlt=/^\w*$/;o(AU,"isKey2");S(AU,"isKey");RU=AU,rlt="Expected a function";o(eT,"memoize2");S(eT,"memoize");eT.Cache=d6;ilt=eT,nlt=500;o(LU,"memoizeCapped2");S(LU,"memoizeCapped");alt=LU,slt=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,olt=/\\(\\)?/g,llt=alt(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(slt,function(r,i,n,a){t.push(n?a.replace(olt,"$1"):i||r)}),t}),clt=llt,hlt=1/0,Mke=Gc?Gc.prototype:void 0,Nke=Mke?Mke.toString:void 0;o(y6,"baseToString2");S(y6,"baseToString");ult=y6;o($U,"toString3");S($U,"toString");dlt=$U;o(IU,"castPath2");S(IU,"castPath");gwe=IU,plt=1/0;o(DU,"toKey2");S(DU,"toKey");v6=DU;o(MU,"baseGet2");S(MU,"baseGet");mwe=MU;o(NU,"get2");S(NU,"get");flt=NU;o(OU,"baseHasIn2");S(OU,"baseHasIn");glt=OU;o(BU,"hasPath2");S(BU,"hasPath");mlt=BU;o(PU,"hasIn2");S(PU,"hasIn");ylt=PU,vlt=1,blt=2;o(FU,"baseMatchesProperty2");S(FU,"baseMatchesProperty");xlt=FU;o(zU,"identity2");S(zU,"identity");qU=zU;o(jU,"baseProperty2");S(jU,"baseProperty");Tlt=jU;o(GU,"basePropertyDeep2");S(GU,"basePropertyDeep");klt=GU;o(WU,"property2");S(WU,"property");Clt=WU;o(UU,"baseIteratee2");S(UU,"baseIteratee");b6=UU;o(VU,"createBaseFor2");S(VU,"createBaseFor");wlt=VU,Elt=wlt(),Slt=Elt;o(YU,"baseForOwn2");S(YU,"baseForOwn");_lt=YU;o(HU,"createBaseEach2");S(HU,"createBaseEach");Alt=HU,Rlt=Alt(_lt),x6=Rlt;o(XU,"baseMap2");S(XU,"baseMap");Llt=XU;o(KU,"map2");S(KU,"map");Vh=KU;o(ZU,"baseFilter2");S(ZU,"baseFilter");$lt=ZU;o(QU,"filter2");S(QU,"filter");Ilt=QU;o(Md,"buildATNKey");S(Md,"buildATNKey");Nd=1,Dlt=2,ywe=4,vwe=5,tT=7,Mlt=8,Nlt=9,Olt=10,Blt=11,bwe=12,JU=class{static{o(this,"AbstractTransition")}static{S(this,"AbstractTransition")}constructor(e){this.target=e}isEpsilon(){return!1}},eV=class extends JU{static{o(this,"AtomTransition")}static{S(this,"AtomTransition")}constructor(e,t){super(e),this.tokenType=t}},xwe=class extends JU{static{o(this,"EpsilonTransition")}static{S(this,"EpsilonTransition")}constructor(e){super(e)}isEpsilon(){return!0}},tV=class extends JU{static{o(this,"RuleTransition")}static{S(this,"RuleTransition")}constructor(e,t,r){super(e),this.rule=t,this.followState=r}isEpsilon(){return!0}};o(rV,"createATN");S(rV,"createATN");o(iV,"createRuleStartAndStopATNStates");S(iV,"createRuleStartAndStopATNStates");o(T6,"atom");S(T6,"atom");o(nV,"repetition");S(nV,"repetition");o(aV,"repetitionSep");S(aV,"repetitionSep");o(sV,"repetitionMandatory");S(sV,"repetitionMandatory");o(oV,"repetitionMandatorySep");S(oV,"repetitionMandatorySep");o(lV,"alternation");S(lV,"alternation");o(cV,"option");S(cV,"option");o(iu,"block");S(iu,"block");o(k6,"plus");S(k6,"plus");o(C6,"star");S(C6,"star");o(hV,"optional");S(hV,"optional");o(Xc,"defineDecisionState");S(Xc,"defineDecisionState");o(Jd,"makeAlts");S(Jd,"makeAlts");o(uV,"getProdType2");S(uV,"getProdType");o(dV,"makeBlock");S(dV,"makeBlock");o(rT,"tokenRef");S(rT,"tokenRef");o(pV,"ruleRef");S(pV,"ruleRef");o(fV,"buildRuleHandle");S(fV,"buildRuleHandle");o(dn,"epsilon");S(dn,"epsilon");o(Dn,"newState");S(Dn,"newState");o(iT,"addTransition");S(iT,"addTransition");o(gV,"removeState");S(gV,"removeState");vE={},OB=class{static{o(this,"ATNConfigSet")}static{S(this,"ATNConfigSet")}constructor(){this.map={},this.configs=[]}get size(){return this.configs.length}finalize(){this.map={}}add(e){let t=w6(e);t in this.map||(this.map[t]=this.configs.length,this.configs.push(e))}get elements(){return this.configs}get alts(){return Vh(this.configs,e=>e.alt)}get key(){let e="";for(let t in this.map)e+=t+":";return e}};o(w6,"getATNConfigKey");S(w6,"getATNConfigKey");o(mV,"baseExtremum");S(mV,"baseExtremum");Plt=mV;o(yV,"baseLt");S(yV,"baseLt");Flt=yV;o(vV,"min");S(vV,"min");zlt=vV,Oke=Gc?Gc.isConcatSpreadable:void 0;o(bV,"isFlattenable2");S(bV,"isFlattenable");qlt=bV;o(E6,"baseFlatten2");S(E6,"baseFlatten");Twe=E6;o(xV,"flatMap2");S(xV,"flatMap");jlt=xV;o(TV,"baseFindIndex2");S(TV,"baseFindIndex");Glt=TV;o(kV,"baseIsNaN2");S(kV,"baseIsNaN");Wlt=kV;o(CV,"strictIndexOf2");S(CV,"strictIndexOf");Ult=CV;o(wV,"baseIndexOf2");S(wV,"baseIndexOf");Vlt=wV;o(EV,"arrayIncludes2");S(EV,"arrayIncludes");Ylt=EV;o(SV,"arrayIncludesWith2");S(SV,"arrayIncludesWith");Hlt=SV;o(_V,"noop2");S(_V,"noop");Xlt=_V,Klt=1/0,Zlt=h1&&1/KW(new h1([,-0]))[1]==Klt?function(e){return new h1(e)}:Xlt,Qlt=Zlt,Jlt=200;o(AV,"baseUniq2");S(AV,"baseUniq");ect=AV;o(RV,"uniqBy");S(RV,"uniqBy");tct=RV;o(LV,"flatten2");S(LV,"flatten");rct=LV;o($V,"arrayEach2");S($V,"arrayEach");ict=$V;o(IV,"castFunction2");S(IV,"castFunction");nct=IV;o(DV,"forEach2");S(DV,"forEach");eO=DV,act="[object Map]",sct="[object Set]",oct=Object.prototype,lct=oct.hasOwnProperty;o(MV,"isEmpty2");S(MV,"isEmpty");cct=MV;o(NV,"arrayReduce2");S(NV,"arrayReduce");hct=NV;o(OV,"baseReduce2");S(OV,"baseReduce");uct=OV;o(BV,"reduce2");S(BV,"reduce");Bke=BV;o(PV,"createDFACache");S(PV,"createDFACache");kwe=class{static{o(this,"PredicateSet")}static{S(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(r))}initialize(e){this.atn=rV(e.rules),this.dfas=FV(this.atn)}validateAmbiguousAlternationAlternatives(){return[]}validateEmptyOrAlternatives(){return[]}buildLookaheadForAlternation(e){let{prodOccurrence:t,rule:r,hasPredicates:i,dynamicTokensEnabled:n}=e,a=this.dfas,s=this.logging,l=Md(r,"Alternation",t),h=this.atn.decisionMap[l].decision,u=Vh(cE({maxLookahead:1,occurrence:t,prodType:"Alternation",rule:r}),d=>Vh(d,p=>p[0]));if(bE(u,!1)&&!n){let d=Bke(u,(p,f,g)=>(eO(f,m=>{m&&(p[m.tokenTypeIdx]=g,eO(m.categoryMatches,y=>{p[y]=g}))}),p),{});return i?function(p){var f;let g=this.LA(1),m=d[g.tokenTypeIdx];if(p!==void 0&&m!==void 0){let y=(f=p[m])===null||f===void 0?void 0:f.GATE;if(y!==void 0&&y.call(this)===!1)return}return m}:function(){let p=this.LA(1);return d[p.tokenTypeIdx]}}else return i?function(d){let p=new kwe,f=d===void 0?0:d.length;for(let m=0;mVh(d,p=>p[0]));if(bE(u)&&u[0][0]&&!n){let d=u[0],p=rct(d);if(p.length===1&&cct(p[0].categoryMatches)){let f=p[0].tokenTypeIdx;return function(){return this.LA(1).tokenTypeIdx===f}}else{let f=Bke(p,(g,m)=>(m!==void 0&&(g[m.tokenTypeIdx]=!0,eO(m.categoryMatches,y=>{g[y]=!0})),g),{});return function(){let g=this.LA(1);return f[g.tokenTypeIdx]===!0}}}return function(){let d=tx.call(this,a,h,Pke,s);return typeof d=="object"?!1:d===0}}};o(bE,"isLL1Sequence");S(bE,"isLL1Sequence");o(FV,"initATNSimulator");S(FV,"initATNSimulator");o(tx,"adaptivePredict");S(tx,"adaptivePredict");o(zV,"performLookahead");S(zV,"performLookahead");o(qV,"computeLookaheadTarget");S(qV,"computeLookaheadTarget");o(jV,"reportLookaheadAmbiguity");S(jV,"reportLookaheadAmbiguity");o(GV,"buildAmbiguityError");S(GV,"buildAmbiguityError");o(WV,"getProductionDslName2");S(WV,"getProductionDslName");o(UV,"buildAdaptivePredictError");S(UV,"buildAdaptivePredictError");o(VV,"getExistingTargetState");S(VV,"getExistingTargetState");o(YV,"computeReachSet");S(YV,"computeReachSet");o(HV,"getReachableTarget");S(HV,"getReachableTarget");o(XV,"getUniqueAlt");S(XV,"getUniqueAlt");o(S6,"newDFAState");S(S6,"newDFAState");o(xE,"addDFAEdge");S(xE,"addDFAEdge");o(_6,"addDFAState");S(_6,"addDFAState");o(KV,"computeStartState");S(KV,"computeStartState");o(E1,"closure");S(E1,"closure");o(ZV,"getEpsilonTarget");S(ZV,"getEpsilonTarget");o(QV,"hasConfigInRuleStopState");S(QV,"hasConfigInRuleStopState");o(JV,"allConfigsInRuleStopStates");S(JV,"allConfigsInRuleStopStates");o(eY,"hasConflictTerminatingPrediction");S(eY,"hasConflictTerminatingPrediction");o(tY,"getConflictingAltSets");S(tY,"getConflictingAltSets");o(rY,"hasConflictingAltSet");S(rY,"hasConflictingAltSet");o(iY,"hasStateAssociatedWithOneAlt");S(iY,"hasStateAssociatedWithOneAlt");Sx();Cwe=class{static{o(this,"CstNodeBuilder")}static{S(this,"CstNodeBuilder")}constructor(){this.nodeStack=[]}get current(){return this.nodeStack[this.nodeStack.length-1]??this.rootNode}buildRootNode(e){return this.rootNode=new aY(e),this.rootNode.root=this.rootNode,this.nodeStack=[this.rootNode],this.rootNode}buildCompositeNode(e){let t=new A6;return t.grammarSource=e,t.root=this.rootNode,this.current.content.push(t),this.nodeStack.push(t),t}buildLeafNode(e,t){let r=new TE(e.startOffset,e.image.length,g1(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 n of e){let a=new TE(n.startOffset,n.image.length,g1(n),n.tokenType,!0);a.root=this.rootNode,t.push(a)}let r=this.current,i=!1;if(r.content.length>0){r.content.push(...t);return}for(;r.container;){let n=r.container.content.indexOf(r);if(n>0){r.container.content.splice(n,0,...t),i=!0;break}r=r.container}i||this.rootNode.content.unshift(...t)}construct(e){let t=this.current;typeof e.$type=="string"&&!e.$infix&&(this.current.astNode=e),e.$cstNode=t;let r=this.nodeStack.pop();r?.content.length===0&&this.removeNode(r)}},nY=class{static{o(this,"AbstractCstNode")}static{S(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)}},TE=class extends nY{static{o(this,"LeafCstNodeImpl")}static{S(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,i,n=!1){super(),this._hidden=n,this._offset=e,this._tokenType=i,this._length=t,this._range=r}},A6=class extends nY{static{o(this,"CompositeCstNodeImpl")}static{S(this,"CompositeCstNodeImpl")}constructor(){super(...arguments),this.content=new pct(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:i}=t;this._rangeCache={start:r.start,end:i.end.line=0;e--){let t=this.content[e];if(!t.hidden)return t}return this.content[this.content.length-1]}},pct=class wwe extends Array{static{o(this,"_CstNodeContainer")}static{S(this,"CstNodeContainer")}constructor(t){super(),this.parent=t,Object.setPrototypeOf(this,wwe.prototype)}push(...t){return this.addParents(t),super.push(...t)}unshift(...t){return this.addParents(t),super.unshift(...t)}splice(t,r,...i){return this.addParents(i),super.splice(t,r,...i)}addParents(t){for(let r of t)r.container=this.parent}},aY=class extends A6{static{o(this,"RootCstNodeImpl")}static{S(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??""}},kE=Symbol("Datatype");o(rx,"isDataTypeNode");S(rx,"isDataTypeNode");Fke="\u200B",Ewe=S(e=>e.endsWith(Fke)?e:e+Fke,"withRuleSuffix"),sY=class{static{o(this,"AbstractLangiumParser")}static{S(this,"AbstractLangiumParser")}constructor(e){this._unorderedGroups=new Map,this.allRules=new Map,this.lexer=e.parser.Lexer;let t=this.lexer.definition,r=e.LanguageMetaData.mode==="production";e.shared.profilers.LangiumProfiler?.isActive("parsing")?this.wrapper=new gct(t,{...e.parser.ParserConfig,skipValidations:r,errorMessageProvider:e.parser.ParserErrorMessageProvider},e.shared.profilers.LangiumProfiler.createTask("parsing",e.LanguageMetaData.languageId)):this.wrapper=new Rwe(t,{...e.parser.ParserConfig,skipValidations:r,errorMessageProvider:e.parser.ParserErrorMessageProvider})}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()}},Swe=class extends sY{static{o(this,"LangiumParser")}static{S(this,"LangiumParser")}get current(){return this.stack[this.stack.length-1]}constructor(e){super(e),this.nodeBuilder=new Cwe,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),i;hg(e)&&(i=e.name,this.registerPrecedenceMap(e));let n=this.wrapper.DEFINE_RULE(Ewe(e.name),this.startImplementation(r,i,t).bind(this));return this.allRules.set(e.name,n),Ja(e)&&e.entry&&(this.mainRule=n),n}registerPrecedenceMap(e){let t=e.name,r=new Map;for(let i=0;i0&&(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 i=>{let n=!this.isRecording()&&e!==void 0;if(n){let a={$type:e};this.stack.push(a),e===kE?a.value="":t!==void 0&&(a.$infixName=t)}return r(i),n?this.construct():void 0}}extractHiddenTokens(e){let t=this.lexerResult.hidden;if(!t.length)return[];let r=e.startOffset;for(let i=0;ir)return t.splice(0,i);return t.splice(0,t.length)}consume(e,t,r){let i=this.wrapper.wrapConsume(e,t);if(!this.isRecording()&&this.isValidToken(i)){let n=this.extractHiddenTokens(i);this.nodeBuilder.addHiddenNodes(n);let a=this.nodeBuilder.buildLeafNode(i,r),{assignment:s,crossRef:l}=this.getAssignment(r),h=this.current;if(s){let u=zc(r)?i.image:this.converter.convert(i.image,a);this.assign(s.operator,s.feature,u,a,l)}else if(rx(h)){let u=i.image;zc(r)||(u=this.converter.convert(u,a).toString()),h.value+=u}}}isValidToken(e){return!e.isInsertedInRecovery&&!isNaN(e.startOffset)&&typeof e.endOffset=="number"&&!isNaN(e.endOffset)}subrule(e,t,r,i,n){let a;!this.isRecording()&&!r&&(a=this.nodeBuilder.buildCompositeNode(i));let s;try{s=this.wrapper.wrapSubrule(e,t,n)}finally{this.isRecording()||(s===void 0&&!r&&(s=this.construct()),s!==void 0&&a&&a.length>0&&this.performSubruleAssignment(s,i,a))}}performSubruleAssignment(e,t,r){let{assignment:i,crossRef:n}=this.getAssignment(t);if(i)this.assign(i.operator,i.feature,e,r,n);else if(!i){let a=this.current;if(rx(a))a.value+=e.toString();else if(typeof e=="object"&&e){let s=this.assignWithoutOverride(e,a);this.stack.pop(),this.stack.push(s)}}}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)):rx(e)?this.converter.convert(e.value,e.$cstNode):(ME(this.astReflection,e),e)}constructInfix(e,t){let r=e.parts;if(!Array.isArray(r)||r.length===0)return;let i=e.operators;if(!Array.isArray(i)||r.length<2)return r[0];let n=0,a=-1;for(let m=0;ma?(a=b.precedence,n=m):b.precedence===a&&(b.rightAssoc||(n=m))}let s=i.slice(0,n),l=i.slice(n+1),h=r.slice(0,n+1),u=r.slice(n+1),d={$infixName:e.$infixName,$type:e.$type,$cstNode:e.$cstNode,parts:h,operators:s},p={$infixName:e.$infixName,$type:e.$type,$cstNode:e.$cstNode,parts:u,operators:l},f=this.constructInfix(d,t),g=this.constructInfix(p,t);return{$type:e.$type,$cstNode:e.$cstNode,left:f,operator:i[n],right:g}}getAssignment(e){if(!this.assignmentMap.has(e)){let t=Pd(e,Fc);this.assignmentMap.set(e,{assignment:t,crossRef:t&&zd(t.terminal)?t.terminal.isMulti?"multi":"single":void 0})}return this.assignmentMap.get(e)}assign(e,t,r,i,n){let a=this.current,s;switch(n==="single"&&typeof r=="string"?s=this.linker.buildReference(a,t,i,r):n==="multi"&&typeof r=="string"?s=this.linker.buildMultiReference(a,t,i,r):s=r,e){case"=":{a[t]=s;break}case"?=":{a[t]=!0;break}case"+=":Array.isArray(a[t])||(a[t]=[]),a[t].push(s)}}assignWithoutOverride(e,t){for(let[i,n]of Object.entries(t)){let a=e[i];a===void 0?e[i]=n:Array.isArray(a)&&Array.isArray(n)&&(n.push(...a),e[i]=n)}let r=e.$cstNode;return r&&(r.astNode=void 0,e.$cstNode=void 0),e}get definitionErrors(){return this.wrapper.definitionErrors}},_we=class{static{o(this,"AbstractParserErrorMessageProvider")}static{S(this,"AbstractParserErrorMessageProvider")}buildMismatchTokenMessage(e){return a1.buildMismatchTokenMessage(e)}buildNotAllInputParsedMessage(e){return a1.buildNotAllInputParsedMessage(e)}buildNoViableAltMessage(e){return a1.buildNoViableAltMessage(e)}buildEarlyExitMessage(e){return a1.buildEarlyExitMessage(e)}},oY=class extends _we{static{o(this,"LangiumParserErrorMessageProvider")}static{S(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}\`.`}},Awe=class extends sY{static{o(this,"LangiumCompletionParser")}static{S(this,"LangiumCompletionParser")}constructor(){super(...arguments),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(Ewe(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,i,n){this.before(i),this.wrapper.wrapSubrule(e,t,n),this.after(i)}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}},fct={recoveryEnabled:!0,nodeLocationTracking:"full",skipValidations:!0,errorMessageProvider:new oY},Rwe=class extends Qnt{static{o(this,"ChevrotainWrapper")}static{S(this,"ChevrotainWrapper")}constructor(e,t){let r=t&&"maxLookahead"in t;super(e,{...fct,lookaheadStrategy:r?new XG({maxLookahead:t.maxLookahead}):new dct({logging:t.skipValidations?()=>{}:void 0}),...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,{})}},gct=class extends Rwe{static{o(this,"ProfilerWrapper")}static{S(this,"ProfilerWrapper")}constructor(e,t,r){super(e,t),this.task=r}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))}}};o(nT,"createParser");S(nT,"createParser");o(lY,"buildRules");S(lY,"buildRules");o(cY,"buildInfixRule");S(cY,"buildInfixRule");o(Zh,"buildElement");S(Zh,"buildElement");o(hY,"buildAction");S(hY,"buildAction");o(uY,"buildRuleCall");S(uY,"buildRuleCall");o(dY,"buildRuleCallPredicate");S(dY,"buildRuleCallPredicate");o(Xo,"buildPredicate");S(Xo,"buildPredicate");o(pY,"buildAlternatives");S(pY,"buildAlternatives");o(fY,"buildUnorderedGroup");S(fY,"buildUnorderedGroup");o(gY,"buildGroup");S(gY,"buildGroup");o(S1,"getGuardCondition");S(S1,"getGuardCondition");o(R6,"buildCrossReference");S(R6,"buildCrossReference");o(mY,"buildKeyword");S(mY,"buildKeyword");o(L6,"wrap");S(L6,"wrap");o(aT,"getRule");S(aT,"getRule");o(yY,"getRuleName");S(yY,"getRuleName");o(Tx,"getToken");S(Tx,"getToken");o($6,"createCompletionParser");S($6,"createCompletionParser");o(I6,"createLangiumParser");S(I6,"createLangiumParser");o(D6,"prepareLangiumParser");S(D6,"prepareLangiumParser");M6=class{static{o(this,"DefaultTokenBuilder")}static{S(this,"DefaultTokenBuilder")}constructor(){this.diagnostics=[]}buildTokens(e,t){let r=vi(Bx(e,!1)),i=this.buildTerminalTokens(r),n=this.buildKeywordTokens(r,i,t);return n.push(...i),n}flushLexingReport(e){return{diagnostics:this.popDiagnostics()}}popDiagnostics(){let e=[...this.diagnostics];return this.diagnostics=[],e}buildTerminalTokens(e){return e.filter(xo).filter(t=>!t.fragment).map(t=>this.buildTerminalToken(t)).toArray()}buildTerminalToken(e){let t=D1(e),r=this.requiresCustomPattern(t)?this.regexPatternFunction(t):t,i={name:e.name,PATTERN:r};return typeof r=="function"&&(i.LINE_BREAKS=!0),e.hidden&&(i.GROUP=Ox(t)?ks.SKIPPED:"hidden"),i}requiresCustomPattern(e){return!!(e.flags.includes("u")||e.flags.includes("s"))}regexPatternFunction(e){let t=new RegExp(e,e.flags+"y");return(r,i)=>(t.lastIndex=i,t.exec(r))}buildKeywordTokens(e,t,r){return e.filter(Fd).flatMap(i=>Wc(i).filter(zc)).distinct(i=>i.value).toArray().sort((i,n)=>n.value.length-i.value.length).map(i=>this.buildKeywordToken(i,t,!!r?.caseInsensitive))}buildKeywordToken(e,t,r){let i=this.buildKeywordPattern(e,r),n={name:e.value,PATTERN:i,LONGER_ALT:this.findLongerAlt(e,t)};return typeof i=="function"&&(n.LINE_BREAKS=!0),n}buildKeywordPattern(e,t){return t?new RegExp(yg(e.value),"i"):e.value}findLongerAlt(e,t){return t.reduce((r,i)=>{let n=i?.PATTERN;return n?.source&&uS("^"+n.source+"$",e.value)&&r.push(i),r},[])}},vY=class{static{o(this,"DefaultValueConverter")}static{S(this,"DefaultValueConverter")}convert(e,t){let r=t.grammarSource;if(zd(r)&&(r=mS(r)),qc(r)){let i=r.rule.ref;if(!i)throw new Error("This cst node was not parsed by a rule.");return this.runConverter(i,e,t)}return e}runConverter(e,t,r){switch(e.name.toUpperCase()){case"INT":return Mc.convertInt(t);case"STRING":return Mc.convertString(t);case"ID":return Mc.convertID(t)}switch(ES(e)?.toLowerCase()){case"number":return Mc.convertNumber(t);case"boolean":return Mc.convertBoolean(t);case"bigint":return Mc.convertBigint(t);case"date":return Mc.convertDate(t);default:return t}}};(function(e){function t(u){let d="";for(let p=1;p{this.resolve=r=>(e(r),this),this.reject=r=>(t(r),this)})}},zke=class BB{static{o(this,"_FullTextDocument")}static{S(this,"FullTextDocument")}constructor(t,r,i,n){this._uri=t,this._languageId=r,this._version=i,this._content=n,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),i=this.offsetAt(t.end);return this._content.substring(r,i)}return this._content}update(t,r){for(let i of t)if(BB.isIncremental(i)){let n=B6(i.range),a=this.offsetAt(n.start),s=this.offsetAt(n.end);this._content=this._content.substring(0,a)+i.text+this._content.substring(s,this._content.length);let l=Math.max(n.start.line,0),h=Math.max(n.end.line,0),u=this._lineOffsets,d=wE(i.text,!1,a);if(h-l===d.length)for(let f=0,g=d.length;ft?n=s:i=s+1}let a=i-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 i=r[t.line];if(t.character<=0)return i;let n=t.line+1r&&O6(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(n,a,s,l){return new zke(n,a,s,l)}o(t,"create"),S(t,"create"),e.create=t;function r(n,a,s){if(n instanceof zke)return n.update(a,s),n;throw new Error("TextDocument.update: document must be created by TextDocument.create")}o(r,"update"),S(r,"update"),e.update=r;function i(n,a){let s=n.getText(),l=kx(a.map(bY),(d,p)=>{let f=d.range.start.line-p.range.start.line;return f===0?d.range.start.character-p.range.start.character:f}),h=0,u=[];for(let d of l){let p=n.offsetAt(d.range.start);if(ph&&u.push(s.substring(h,p)),d.newText.length&&u.push(d.newText),h=n.offsetAt(d.range.end)}return u.push(s.substr(h)),u.join("")}o(i,"applyEdits"),S(i,"applyEdits"),e.applyEdits=i})(CE||(CE={}));o(kx,"mergeSort");S(kx,"mergeSort");o(wE,"computeLineOffsets");S(wE,"computeLineOffsets");o(O6,"isEOL");S(O6,"isEOL");o(B6,"getWellformedRange");S(B6,"getWellformedRange");o(bY,"getWellformedEdit");S(bY,"getWellformedEdit");(()=>{"use strict";var e={975:D=>{function M(I){if(typeof I!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(I))}o(M,"e2"),S(M,"e");function B(I,O){for(var R,$="",F=0,P=-1,z=0,q=0;q<=I.length;++q){if(q2){var G=$.lastIndexOf("/");if(G!==$.length-1){G===-1?($="",F=0):F=($=$.slice(0,G)).length-1-$.lastIndexOf("/"),P=q,z=0;continue}}else if($.length===2||$.length===1){$="",F=0,P=q,z=0;continue}}O&&($.length>0?$+="/..":$="..",F=2)}else $.length>0?$+="/"+I.slice(P+1,q):$=I.slice(P+1,q),F=q-P-1;P=q,z=0}else R===46&&z!==-1?++z:z=-1}return $}o(B,"r2"),S(B,"r");var A={resolve:S(function(){for(var I,O="",R=!1,$=arguments.length-1;$>=-1&&!R;$--){var F;$>=0?F=arguments[$]:(I===void 0&&(I=process.cwd()),F=I),M(F),F.length!==0&&(O=F+"/"+O,R=F.charCodeAt(0)===47)}return O=B(O,!R),R?O.length>0?"/"+O:"/":O.length>0?O:"."},"resolve"),normalize:S(function(I){if(M(I),I.length===0)return".";var O=I.charCodeAt(0)===47,R=I.charCodeAt(I.length-1)===47;return(I=B(I,!O)).length!==0||O||(I="."),I.length>0&&R&&(I+="/"),O?"/"+I:I},"normalize"),isAbsolute:S(function(I){return M(I),I.length>0&&I.charCodeAt(0)===47},"isAbsolute"),join:S(function(){if(arguments.length===0)return".";for(var I,O=0;O0&&(I===void 0?I=R:I+="/"+R)}return I===void 0?".":A.normalize(I)},"join"),relative:S(function(I,O){if(M(I),M(O),I===O||(I=A.resolve(I))===(O=A.resolve(O)))return"";for(var R=1;Rq){if(O.charCodeAt(P+W)===47)return O.slice(P+W+1);if(W===0)return O.slice(P+W)}else F>q&&(I.charCodeAt(R+W)===47?G=W:W===0&&(G=0));break}var J=I.charCodeAt(R+W);if(J!==O.charCodeAt(P+W))break;J===47&&(G=W)}var H="";for(W=R+G+1;W<=$;++W)W!==$&&I.charCodeAt(W)!==47||(H.length===0?H+="..":H+="/..");return H.length>0?H+O.slice(P+G):(P+=G,O.charCodeAt(P)===47&&++P,O.slice(P))},"relative"),_makeLong:S(function(I){return I},"_makeLong"),dirname:S(function(I){if(M(I),I.length===0)return".";for(var O=I.charCodeAt(0),R=O===47,$=-1,F=!0,P=I.length-1;P>=1;--P)if((O=I.charCodeAt(P))===47){if(!F){$=P;break}}else F=!1;return $===-1?R?"/":".":R&&$===1?"//":I.slice(0,$)},"dirname"),basename:S(function(I,O){if(O!==void 0&&typeof O!="string")throw new TypeError('"ext" argument must be a string');M(I);var R,$=0,F=-1,P=!0;if(O!==void 0&&O.length>0&&O.length<=I.length){if(O.length===I.length&&O===I)return"";var z=O.length-1,q=-1;for(R=I.length-1;R>=0;--R){var G=I.charCodeAt(R);if(G===47){if(!P){$=R+1;break}}else q===-1&&(P=!1,q=R+1),z>=0&&(G===O.charCodeAt(z)?--z==-1&&(F=R):(z=-1,F=q))}return $===F?F=q:F===-1&&(F=I.length),I.slice($,F)}for(R=I.length-1;R>=0;--R)if(I.charCodeAt(R)===47){if(!P){$=R+1;break}}else F===-1&&(P=!1,F=R+1);return F===-1?"":I.slice($,F)},"basename"),extname:S(function(I){M(I);for(var O=-1,R=0,$=-1,F=!0,P=0,z=I.length-1;z>=0;--z){var q=I.charCodeAt(z);if(q!==47)$===-1&&(F=!1,$=z+1),q===46?O===-1?O=z:P!==1&&(P=1):O!==-1&&(P=-1);else if(!F){R=z+1;break}}return O===-1||$===-1||P===0||P===1&&O===$-1&&O===R+1?"":I.slice(O,$)},"extname"),format:S(function(I){if(I===null||typeof I!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof I);return(function(O,R){var $=R.dir||R.root,F=R.base||(R.name||"")+(R.ext||"");return $?$===R.root?$+F:$+"/"+F:F})(0,I)},"format"),parse:S(function(I){M(I);var O={root:"",dir:"",base:"",ext:"",name:""};if(I.length===0)return O;var R,$=I.charCodeAt(0),F=$===47;F?(O.root="/",R=1):R=0;for(var P=-1,z=0,q=-1,G=!0,W=I.length-1,J=0;W>=R;--W)if(($=I.charCodeAt(W))!==47)q===-1&&(G=!1,q=W+1),$===46?P===-1?P=W:J!==1&&(J=1):P!==-1&&(J=-1);else if(!G){z=W+1;break}return P===-1||q===-1||J===0||J===1&&P===q-1&&P===z+1?q!==-1&&(O.base=O.name=z===0&&F?I.slice(1,q):I.slice(z,q)):(z===0&&F?(O.name=I.slice(1,P),O.base=I.slice(1,q)):(O.name=I.slice(z,P),O.base=I.slice(z,q)),O.ext=I.slice(P,q)),z>0?O.dir=I.slice(0,z-1):F&&(O.dir="/"),O},"parse"),sep:"/",delimiter:":",win32:null,posix:null};A.posix=A,D.exports=A}},t={};function r(D){var M=t[D];if(M!==void 0)return M.exports;var B=t[D]={exports:{}};return e[D](B,B.exports,r),B.exports}o(r,"r"),S(r,"r"),r.d=(D,M)=>{for(var B in M)r.o(M,B)&&!r.o(D,B)&&Object.defineProperty(D,B,{enumerable:!0,get:M[B]})},r.o=(D,M)=>Object.prototype.hasOwnProperty.call(D,M),r.r=D=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(D,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(D,"__esModule",{value:!0})};var i={};let n;r.r(i),r.d(i,{URI:S(()=>f,"URI"),Utils:S(()=>N,"Utils")}),typeof process=="object"?n=process.platform==="win32":typeof navigator=="object"&&(n=navigator.userAgent.indexOf("Windows")>=0);let a=/^\w[\w\d+.-]*$/,s=/^\//,l=/^\/\//;function h(D,M){if(!D.scheme&&M)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(!s.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 ("//")')}}o(h,"a"),S(h,"a");let u="",d="/",p=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class f{static{o(this,"l")}static{S(this,"l")}static isUri(M){return M instanceof f||!!M&&typeof M.authority=="string"&&typeof M.fragment=="string"&&typeof M.path=="string"&&typeof M.query=="string"&&typeof M.scheme=="string"&&typeof M.fsPath=="string"&&typeof M.with=="function"&&typeof M.toString=="function"}scheme;authority;path;query;fragment;constructor(M,B,A,I,O,R=!1){typeof M=="object"?(this.scheme=M.scheme||u,this.authority=M.authority||u,this.path=M.path||u,this.query=M.query||u,this.fragment=M.fragment||u):(this.scheme=(function($,F){return $||F?$:"file"})(M,R),this.authority=B||u,this.path=(function($,F){switch($){case"https":case"http":case"file":F?F[0]!==d&&(F=d+F):F=d}return F})(this.scheme,A||u),this.query=I||u,this.fragment=O||u,h(this,R))}get fsPath(){return T(this,!1)}with(M){if(!M)return this;let{scheme:B,authority:A,path:I,query:O,fragment:R}=M;return B===void 0?B=this.scheme:B===null&&(B=u),A===void 0?A=this.authority:A===null&&(A=u),I===void 0?I=this.path:I===null&&(I=u),O===void 0?O=this.query:O===null&&(O=u),R===void 0?R=this.fragment:R===null&&(R=u),B===this.scheme&&A===this.authority&&I===this.path&&O===this.query&&R===this.fragment?this:new m(B,A,I,O,R)}static parse(M,B=!1){let A=p.exec(M);return A?new m(A[2]||u,E(A[4]||u),E(A[5]||u),E(A[7]||u),E(A[9]||u),B):new m(u,u,u,u,u)}static file(M){let B=u;if(n&&(M=M.replace(/\\/g,d)),M[0]===d&&M[1]===d){let A=M.indexOf(d,2);A===-1?(B=M.substring(2),M=d):(B=M.substring(2,A),M=M.substring(A)||d)}return new m("file",B,M,u,u)}static from(M){let B=new m(M.scheme,M.authority,M.path,M.query,M.fragment);return h(B,!0),B}toString(M=!1){return x(this,M)}toJSON(){return this}static revive(M){if(M){if(M instanceof f)return M;{let B=new m(M);return B._formatted=M.external,B._fsPath=M._sep===g?M.fsPath:null,B}}return M}}let g=n?1:void 0;class m extends f{static{o(this,"d")}static{S(this,"d")}_formatted=null;_fsPath=null;get fsPath(){return this._fsPath||(this._fsPath=T(this,!1)),this._fsPath}toString(M=!1){return M?x(this,!0):(this._formatted||(this._formatted=x(this,!1)),this._formatted)}toJSON(){let M={$mid:1};return this._fsPath&&(M.fsPath=this._fsPath,M._sep=g),this._formatted&&(M.external=this._formatted),this.path&&(M.path=this.path),this.scheme&&(M.scheme=this.scheme),this.authority&&(M.authority=this.authority),this.query&&(M.query=this.query),this.fragment&&(M.fragment=this.fragment),M}}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 b(D,M,B){let A,I=-1;for(let O=0;O=97&&R<=122||R>=65&&R<=90||R>=48&&R<=57||R===45||R===46||R===95||R===126||M&&R===47||B&&R===91||B&&R===93||B&&R===58)I!==-1&&(A+=encodeURIComponent(D.substring(I,O)),I=-1),A!==void 0&&(A+=D.charAt(O));else{A===void 0&&(A=D.substr(0,O));let $=y[R];$!==void 0?(I!==-1&&(A+=encodeURIComponent(D.substring(I,O)),I=-1),A+=$):I===-1&&(I=O)}}return I!==-1&&(A+=encodeURIComponent(D.substring(I))),A!==void 0?A:D}o(b,"m"),S(b,"m");function v(D){let M;for(let B=0;B1&&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?M?D.path.substr(1):D.path[1].toLowerCase()+D.path.substr(2):D.path,n&&(B=B.replace(/\//g,"\\")),B}o(T,"v"),S(T,"v");function x(D,M){let B=M?v:b,A="",{scheme:I,authority:O,path:R,query:$,fragment:F}=D;if(I&&(A+=I,A+=":"),(O||I==="file")&&(A+=d,A+=d),O){let P=O.indexOf("@");if(P!==-1){let z=O.substr(0,P);O=O.substr(P+1),P=z.lastIndexOf(":"),P===-1?A+=B(z,!1,!1):(A+=B(z.substr(0,P),!1,!1),A+=":",A+=B(z.substr(P+1),!1,!0)),A+="@"}O=O.toLowerCase(),P=O.lastIndexOf(":"),P===-1?A+=B(O,!1,!0):(A+=B(O.substr(0,P),!1,!0),A+=O.substr(P))}if(R){if(R.length>=3&&R.charCodeAt(0)===47&&R.charCodeAt(2)===58){let P=R.charCodeAt(1);P>=65&&P<=90&&(R=`/${String.fromCharCode(P+32)}:${R.substr(3)}`)}else if(R.length>=2&&R.charCodeAt(1)===58){let P=R.charCodeAt(0);P>=65&&P<=90&&(R=`${String.fromCharCode(P+32)}:${R.substr(2)}`)}A+=B(R,!0,!1)}return $&&(A+="?",A+=B($,!1,!1)),F&&(A+="#",A+=M?F:b(F,!1,!1)),A}o(x,"b"),S(x,"b");function k(D){try{return decodeURIComponent(D)}catch{return D.length>3?D.substr(0,3)+k(D.substr(3)):D}}o(k,"C"),S(k,"C");let C=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function E(D){return D.match(C)?D.replace(C,(M=>k(M))):D}o(E,"w"),S(E,"w");var w=r(975);let _=w.posix||w,L="/";var N;(function(D){D.joinPath=function(M,...B){return M.with({path:_.join(M.path,...B)})},D.resolvePath=function(M,...B){let A=M.path,I=!1;A[0]!==L&&(A=L+A,I=!0);let O=_.resolve(A,...B);return I&&O[0]===L&&!M.authority&&(O=O.substring(1)),M.with({path:O})},D.dirname=function(M){if(M.path.length===0||M.path===L)return M;let B=_.dirname(M.path);return B.length===1&&B.charCodeAt(0)===46&&(B=""),M.with({path:B})},D.basename=function(M){return _.basename(M.path)},D.extname=function(M){return _.extname(M.path)}})(N||(N={})),$we=i})();({URI:mo,Utils:vb}=$we);(function(e){e.basename=vb.basename,e.dirname=vb.dirname,e.extname=vb.extname,e.joinPath=vb.joinPath,e.resolvePath=vb.resolvePath;let t=typeof process=="object"&&process?.platform==="win32";function r(s,l){return s?.toString()===l?.toString()}o(r,"equals"),S(r,"equals"),e.equals=r;function i(s,l){let h=typeof s=="string"?mo.parse(s).path:s.path,u=typeof l=="string"?mo.parse(l).path:l.path,d=h.split("/").filter(y=>y.length>0),p=u.split("/").filter(y=>y.length>0);if(t){let y=/^[A-Z]:$/;if(d[0]&&y.test(d[0])&&(d[0]=d[0].toLowerCase()),p[0]&&y.test(p[0])&&(p[0]=p[0].toLowerCase()),d[0]!==p[0])return u.substring(1)}let f=0;for(;f({name:i.name,uri:Ts.joinPath(mo.parse(t),i.name).toString(),element:i.element})):[]}all(){return this.collectValues(this.root)}findAll(e){let t=this.getNode(Ts.normalize(e),!1);return t?this.collectValues(t):[]}getNode(e,t){let r=e.split("/");e.charAt(e.length-1)==="/"&&r.pop();let i=this.root;for(let n of r){let a=i.children.get(n);if(!a)if(t)a={name:n,children:new Map,parent:i},i.children.set(n,a);else return;i=a}return i}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"})(qr||(qr={}));Iwe=class{static{o(this,"DefaultLangiumDocumentFactory")}static{S(this,"DefaultLangiumDocumentFactory")}constructor(e){this.serviceRegistry=e.ServiceRegistry,this.textDocuments=e.workspace.TextDocuments,this.fileSystemProvider=e.workspace.FileSystemProvider}async fromUri(e,t=Ii.CancellationToken.None){let r=await this.fileSystemProvider.readFile(e);return this.createAsync(e,r,t)}fromTextDocument(e,t,r){return t=t??mo.parse(e.uri),Ii.CancellationToken.is(r)?this.createAsync(t,e,r):this.create(t,e,r)}fromString(e,t,r){return Ii.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 i=this.parse(e,t,r);return this.createLangiumDocument(i,e,void 0,t)}else if("$model"in t){let i={value:t.$model,parserErrors:[],lexerErrors:[]};return this.createLangiumDocument(i,e)}else{let i=this.parse(e,t.getText(),r);return this.createLangiumDocument(i,e,t)}}async createAsync(e,t,r){if(typeof t=="string"){let i=await this.parseAsync(e,t,r);return this.createLangiumDocument(i,e,void 0,t)}else{let i=await this.parseAsync(e,t.getText(),r);return this.createLangiumDocument(i,e,t)}}createLangiumDocument(e,t,r,i){let n;if(r)n={parseResult:e,uri:t,state:qr.Parsed,references:[],textDocument:r};else{let a=this.createTextDocumentGetter(t,i);n={parseResult:e,uri:t,state:qr.Parsed,references:[],get textDocument(){return a()}}}return e.value.$document=n,n}async update(e,t){let r=e.parseResult.value.$cstNode?.root.fullText,i=this.textDocuments?.get(e.uri.toString()),n=i?i.getText():await this.fileSystemProvider.readFile(e.uri);if(i)Object.defineProperty(e,"textDocument",{value:i});else{let a=this.createTextDocumentGetter(e.uri,n);Object.defineProperty(e,"textDocument",{get:a})}return r!==n&&(e.parseResult=await this.parseAsync(e.uri,n,t),e.parseResult.value.$document=e),e.state=qr.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,i;return()=>i??(i=CE.create(e.toString(),r.getServices(e).LanguageMetaData.languageId,0,t??""))}},Dwe=class{static{o(this,"DefaultLangiumDocuments")}static{S(this,"DefaultLangiumDocuments")}constructor(e){this.documentTrie=new xY,this.services=e,this.langiumDocumentFactory=e.workspace.LangiumDocumentFactory,this.documentBuilder=()=>e.workspace.DocumentBuilder}get all(){return vi(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(i=>(this.addDocument(i),i));{let i=this.langiumDocumentFactory.fromString(t,e);return this.addDocument(i),i}}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,qr.Changed),r}deleteDocument(e){let t=e.toString(),r=this.documentTrie.find(t);return r&&(r.state=qr.Changed,this.documentTrie.delete(t)),r}deleteDocuments(e){let t=e.toString(),r=this.documentTrie.findAll(t);for(let i of r)i.state=qr.Changed;return this.documentTrie.delete(t),r}},Ff=Symbol("RefResolving"),Mwe=class{static{o(this,"DefaultLinker")}static{S(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=Ii.CancellationToken.None){if(this.profiler?.isActive("linking")){let r=this.profiler.createTask("linking",this.languageId);r.start();try{for(let i of Qo(e.parseResult.value))await Wn(t),cg(i).forEach(n=>{let a=`${i.$type}:${n.property}`;r.startSubTask(a);try{this.doLink(n,e)}finally{r.stopSubTask(a)}})}finally{r.stop()}}else for(let r of Qo(e.parseResult.value))await Wn(t),cg(r).forEach(i=>this.doLink(i,e))}doLink(e,t){let r=e.reference;if("_ref"in r&&r._ref===void 0){r._ref=Ff;try{let i=this.getCandidate(e);if(Ad(i))r._ref=i;else{r._nodeDescription=i;let n=this.loadAstNode(i);r._ref=n??this.createLinkingError(e,i)}}catch(i){console.error(`An error occurred while resolving reference to '${r.$refText}':`,i);let n=i.message??String(i);r._ref={info:e,message:`An error occurred while resolving reference to '${r.$refText}': ${n}`}}t.references.push(r)}else if("_items"in r&&r._items===void 0){r._items=Ff;try{let i=this.getCandidates(e),n=[];if(Ad(i))r._linkingError=i;else for(let a of i){let s=this.loadAstNode(a);s&&n.push({ref:s,$nodeDescription:a})}r._items=n}catch(i){r._linkingError={info:e,message:`An error occurred while resolving reference to '${r.$refText}': ${i}`},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 t=this.scopeProvider.getScope(e).getElements(e.reference.$refText).distinct(r=>`${r.documentUri}#${r.path}`).toArray();return t.length>0?t:this.createLinkingError(e)}buildReference(e,t,r,i){let n=this,a={$refNode:r,$refText:i,_ref:void 0,get ref(){if(Tn(this._ref))return this._ref;if(DE(this._nodeDescription)){let s=n.loadAstNode(this._nodeDescription);this._ref=s??n.createLinkingError({reference:a,container:e,property:t},this._nodeDescription)}else if(this._ref===void 0){this._ref=Ff;let s=ag(e).$document,l=n.getLinkedNode({reference:a,container:e,property:t});if(l.error&&s&&s.state0))return this._linkingError=n.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(Ad(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=ag(e.container).$document;r&&r.statezd(t)&&t.isMulti)}findDeclarations(e){if(e){let t=xS(e),r=e.astNode;if(t&&r){let i=r[t.feature];if(Qa(i)||Nl(i))return ax(i);if(Array.isArray(i)){for(let n of i)if((Qa(n)||Nl(n))&&n.$refNode&&n.$refNode.offset<=e.offset&&n.$refNode.end>=e.end)return ax(n)}}if(r){let i=this.nameProvider.getNameNode(r);if(i&&(i===e||eS(e,i)))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 i of cg(r))if(Nl(i.reference)&&i.reference.items.some(n=>n.ref===e))return i.reference.items.map(n=>n.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 i of t){let n=this.nameProvider.getNameNode(i)??i.$cstNode;n&&r.push(n)}return r}findReferences(e,t){let r=[];t.includeDeclaration&&r.push(...this.getSelfReferences(e));let i=this.index.findAllReferences(e,this.nodeLocator.getAstNodePath(e));return t.documentUri&&(i=i.filter(n=>Ts.equals(n.sourceUri,t.documentUri))),r.push(...i),vi(r)}getSelfReferences(e){let t=this.getSelfNodes(e),r=[];for(let i of t){let n=this.nameProvider.getNameNode(i);if(n){let a=Zo(i),s=this.nodeLocator.getAstNodePath(i);r.push({sourceUri:a.uri,sourcePath:s,targetUri:a.uri,targetPath:s,segment:dg(n),local:!0})}}return r}},Jh=class{static{o(this,"MultiMap")}static{S(this,"MultiMap")}constructor(e){if(this.map=new Map,e)for(let[t,r]of e)this.add(t,r)}get size(){return nx.sum(vi(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 i=r.indexOf(t);if(i>=0)return r.length===1?this.map.delete(e):r.splice(i,1),!0}return!1}}get(e){return this.map.get(e)??[]}getStream(e){let t=this.map.get(e);return t?vi(t):p1}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(i=>e(i,r,this)))}[Symbol.iterator](){return this.entries().iterator()}entries(){return vi(this.map.entries()).flatMap(([e,t])=>t.map(r=>[e,r]))}keys(){return vi(this.map.keys())}values(){return vi(this.map.values()).flat()}entriesGroupedByKey(){return vi(this.map.entries())}},EE=class{static{o(this,"BiMap")}static{S(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}},Bwe=class{static{o(this,"DefaultScopeComputation")}static{S(this,"DefaultScopeComputation")}constructor(e){this.nameProvider=e.references.NameProvider,this.descriptions=e.workspace.AstNodeDescriptionProvider}async collectExportedSymbols(e,t=Ii.CancellationToken.None){return this.collectExportedSymbolsForNode(e.parseResult.value,e,void 0,t)}async collectExportedSymbolsForNode(e,t,r=R1,i=Ii.CancellationToken.None){let n=[];this.addExportedSymbol(e,n,t);for(let a of r(e))await Wn(i),this.addExportedSymbol(a,n,t);return n}addExportedSymbol(e,t,r){let i=this.nameProvider.getName(e);i&&t.push(this.descriptions.createDescription(e,i,r))}async collectLocalSymbols(e,t=Ii.CancellationToken.None){let r=e.parseResult.value,i=new Jh;for(let n of Wc(r))await Wn(t),this.addLocalSymbol(n,e,i);return i}addLocalSymbol(e,t,r){let i=e.$container;if(i){let n=this.nameProvider.getName(e);n&&r.add(i,this.descriptions.createDescription(e,n,t))}}},PB=class{static{o(this,"StreamScope")}static{S(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(i=>i.name.toLowerCase()===t):this.elements.find(i=>i.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(i=>i.name.toLowerCase()===t):this.elements.filter(i=>i.name===e);return(this.concatOuterScope||r.isEmpty())&&this.outerScope?r.concat(this.outerScope.getElements(e)):r}},mct=class{static{o(this,"MapScope")}static{S(this,"MapScope")}constructor(e,t,r){this.elements=new Map,this.caseInsensitive=r?.caseInsensitive??!1,this.concatOuterScope=r?.concatOuterScope??!0;for(let i of e){let n=this.caseInsensitive?i.name.toLowerCase():i.name;this.elements.set(n,i)}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),i=r?[r]:[];return(this.concatOuterScope||i.length>0)&&this.outerScope?vi(i).concat(this.outerScope.getElements(e)):vi(i)}getAllElements(){let e=vi(this.elements.values());return this.outerScope&&(e=e.concat(this.outerScope.getAllElements())),e}},Pwe=class{static{o(this,"MultiMapScope")}static{S(this,"MultiMapScope")}constructor(e,t,r){this.elements=new Jh,this.caseInsensitive=r?.caseInsensitive??!1,this.concatOuterScope=r?.concatOuterScope??!0;for(let i of e){let n=this.caseInsensitive?i.name.toLowerCase():i.name;this.elements.add(n,i)}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?vi(r).concat(this.outerScope.getElements(e)):vi(r)}getAllElements(){let e=vi(this.elements.values());return this.outerScope&&(e=e.concat(this.outerScope.getAllElements())),e}},yct={getElement(){},getElements(){return p1},getAllElements(){return p1}},F6=class{static{o(this,"DisposableCache")}static{S(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")}},TY=class extends F6{static{o(this,"SimpleCache")}static{S(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()}},z6=class extends F6{static{o(this,"ContextCache")}static{S(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 i=this.cacheForContext(e);if(i.has(t))return i.get(t);if(r){let n=r();return i.set(t,n),n}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}},Fwe=class extends z6{static{o(this,"DocumentCache")}static{S(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,i)=>{for(let n of i)this.clear(n)}))):this.toDispose.push(e.workspace.DocumentBuilder.onUpdate((r,i)=>{let n=r.concat(i);for(let a of n)this.clear(a)}))}},kY=class extends TY{static{o(this,"WorkspaceCache")}static{S(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,i)=>{i.length>0&&this.clear()}))):this.toDispose.push(e.workspace.DocumentBuilder.onUpdate(()=>{this.clear()}))}},zwe=class{static{o(this,"DefaultScopeProvider")}static{S(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 kY(e.shared)}getScope(e){let t=[],r=this.reflection.getReferenceType(e),i=Zo(e.container).localSymbols;if(i){let a=e.container;do i.has(a)&&t.push(i.getStream(a).filter(s=>this.reflection.isSubtype(s.type,r))),a=a.$container;while(a)}let n=this.getGlobalScope(r,e);for(let a=t.length-1;a>=0;a--)n=this.createScope(t[a],n);return n}createScope(e,t,r){return new PB(vi(e),t,r)}createScopeForNodes(e,t,r){let i=vi(e).map(n=>{let a=this.nameProvider.getName(n);if(a)return this.descriptions.createDescription(n,a)}).nonNullable();return new PB(i,t,r)}getGlobalScope(e,t){return this.globalScopeCache.get(e,()=>new Pwe(this.indexManager.allElements(e)))}};o(q6,"isAstNodeWithComment");S(q6,"isAstNodeWithComment");o(SE,"isIntermediateReference");S(SE,"isIntermediateReference");qwe=class{static{o(this,"DefaultJsonSerializer")}static{S(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??{},i=t?.replacer,n=S((s,l)=>this.replacer(s,l,r),"defaultReplacer"),a=i?(s,l)=>i(s,l,n):n;try{return this.currentDocument=Zo(e),JSON.stringify(e,a,t?.space)}finally{this.currentDocument=void 0}}deserialize(e,t){let r=t??{},i=JSON.parse(e);return this.linkNode(i,i,r),i}replacer(e,t,{refText:r,sourceText:i,textRegions:n,comments:a,uriConverter:s}){if(!this.ignoreProperties.has(e))if(Qa(t)){let l=t.ref,h=r?t.$refText:void 0;if(l){let u=Zo(l),d="";this.currentDocument&&this.currentDocument!==u&&(s?d=s(u.uri,l):d=u.uri.toString());let p=this.astNodeLocator.getAstNodePath(l);return{$ref:`${d}#${p}`,$refText:h}}else return{$error:t.error?.message??"Could not resolve reference",$refText:h}}else if(Nl(t)){let l=r?t.$refText:void 0,h=[];for(let u of t.items){let d=u.ref,p=Zo(u.ref),f="";this.currentDocument&&this.currentDocument!==p&&(s?f=s(p.uri,d):f=p.uri.toString());let g=this.astNodeLocator.getAstNodePath(d);h.push(`${f}#${g}`)}return{$refs:h,$refText:l}}else if(Tn(t)){let l;if(n&&(l=this.addAstNodeRegionWithAssignmentsTo({...t}),(!e||t.$document)&&l?.$textRegion&&(l.$textRegion.documentURI=this.currentDocument?.uri.toString())),i&&!e&&(l??(l={...t}),l.$sourceText=t.$cstNode?.text),a){l??(l={...t});let h=this.commentProvider.getComment(t);h&&(l.$comment=h.replace(/\r/g,""))}return l??t}else return t}addAstNodeRegionWithAssignmentsTo(e){let t=S(r=>({offset:r.offset,end:r.end,length:r.length,range:r.range}),"createDocumentSegment");if(e.$cstNode){let r=e.$textRegion=t(e.$cstNode),i=r.assignments={};return Object.keys(e).filter(n=>!n.startsWith("$")).forEach(n=>{let a=vS(e.$cstNode,n).map(t);a.length!==0&&(i[n]=a)}),e}}linkNode(e,t,r,i,n,a){for(let[l,h]of Object.entries(e))if(Array.isArray(h))for(let u=0;u{await this.handleException(()=>e.call(t,r,i,n),"An error occurred during validation",i,r)}}async handleException(e,t,r,i){try{await e()}catch(n){if(ep(n))throw n;console.error(`${t}:`,n),n instanceof Error&&n.stack&&console.error(n.stack);let a=n instanceof Error?n.message:String(n);r("error",`${t}: ${a}`,{node:i})}}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=vi(this.entries.get(e)).concat(this.entries.get("AstNode"));return t&&(r=r.filter(i=>t.includes(i.category))),r.map(i=>i.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(i,n,a,s)=>{await this.handleException(()=>e.call(r,i,n,a,s),t,n,i)}}get checksBefore(){return this.entriesBefore}get checksAfter(){return this.entriesAfter}getAllValidationCategories(e){return this.knownCategories}},Wwe=Object.freeze({validateNode:!0,validateChildren:!0}),Uwe=class{static{o(this,"DefaultDocumentValidator")}static{S(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=Ii.CancellationToken.None){let i=e.parseResult,n=[];if(await Wn(r),(!t.categories||t.categories.includes("built-in"))&&(this.processLexingErrors(i,n,t),t.stopAfterLexingErrors&&n.some(a=>a.data?.code===Ko.LexingError)||(this.processParsingErrors(i,n,t),t.stopAfterParsingErrors&&n.some(a=>a.data?.code===Ko.ParsingError))||(this.processLinkingErrors(e,n,t),t.stopAfterLinkingErrors&&n.some(a=>a.data?.code===Ko.LinkingError))))return n;try{n.push(...await this.validateAst(i.value,t,r))}catch(a){if(ep(a))throw a;console.error("An error occurred during validation:",a)}return await Wn(r),n}processLexingErrors(e,t,r){let i=[...e.lexerErrors,...e.lexerReport?.diagnostics??[]];for(let n of i){let a=n.severity??"error",s={severity:u1(a),range:{start:{line:n.line-1,character:n.column-1},end:{line:n.line-1,character:n.column+n.length-1}},message:n.message,data:G6(a),source:this.getSource()};t.push(s)}}processParsingErrors(e,t,r){for(let i of e.parserErrors){let n;if(isNaN(i.token.startOffset)){if("previousToken"in i){let a=i.previousToken;if(isNaN(a.startOffset)){let s={line:0,character:0};n={start:s,end:s}}else{let s={line:a.endLine-1,character:a.endColumn};n={start:s,end:s}}}}else n=g1(i.token);if(n){let a={severity:u1("error"),range:n,message:i.message,data:Rd(Ko.ParsingError),source:this.getSource()};t.push(a)}}}processLinkingErrors(e,t,r){for(let i of e.references){let n=i.error;if(n){let a={node:n.info.container,range:i.$refNode?.range,property:n.info.property,index:n.info.index,data:{code:Ko.LinkingError,containerType:n.info.container.$type,property:n.info.property,refText:n.info.reference.$refText}};t.push(this.toDiagnostic("error",n.message,a))}}}async validateAst(e,t,r=Ii.CancellationToken.None){let i=[],n=S((a,s,l)=>{i.push(this.toDiagnostic(a,s,l))},"acceptor");return await this.validateAstBefore(e,t,n,r),await this.validateAstNodes(e,t,n,r),await this.validateAstAfter(e,t,n,r),i}async validateAstBefore(e,t,r,i=Ii.CancellationToken.None){let n=this.validationRegistry.checksBefore;for(let a of n)await Wn(i),await a(e,r,t.categories??[],i)}async validateAstNodes(e,t,r,i=Ii.CancellationToken.None){if(this.profiler?.isActive("validating")){let n=this.profiler.createTask("validating",this.languageId);n.start();try{let a=Qo(e).iterator();for(let s of a){n.startSubTask(s.$type);let l=this.validateSingleNodeOptions(s,t);if(l.validateNode)try{let h=this.validationRegistry.getChecks(s.$type,t.categories);for(let u of h)await u(s,r,i)}finally{n.stopSubTask(s.$type)}l.validateChildren||a.prune()}}finally{n.stop()}}else{let n=Qo(e).iterator();for(let a of n){await Wn(i);let s=this.validateSingleNodeOptions(a,t);if(s.validateNode){let l=this.validationRegistry.getChecks(a.$type,t.categories);for(let h of l)await h(a,r,i)}s.validateChildren||n.prune()}}}validateSingleNodeOptions(e,t){return Wwe}async validateAstAfter(e,t,r,i=Ii.CancellationToken.None){let n=this.validationRegistry.checksAfter;for(let a of n)await Wn(i),await a(e,r,t.categories??[],i)}toDiagnostic(e,t,r){return{message:t,range:j6(r),severity:u1(e),code:r.code,codeDescription:r.codeDescription,tags:r.tags,relatedInformation:r.relatedInformation,data:r.data,source:this.getSource()}}getSource(){return this.metadata.languageId}};o(j6,"getDiagnosticRange");S(j6,"getDiagnosticRange");o(u1,"toDiagnosticSeverity");S(u1,"toDiagnosticSeverity");o(G6,"toDiagnosticData");S(G6,"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"})(Ko||(Ko={}));Vwe=class{static{o(this,"DefaultAstNodeDescriptionProvider")}static{S(this,"DefaultAstNodeDescriptionProvider")}constructor(e){this.astNodeLocator=e.workspace.AstNodeLocator,this.nameProvider=e.references.NameProvider}createDescription(e,t,r){let i=r??Zo(e);t??(t=this.nameProvider.getName(e));let n=this.astNodeLocator.getAstNodePath(e);if(!t)throw new Error(`Node at path ${n} has no name.`);let a,s=S(()=>a??(a=dg(this.nameProvider.getNameNode(e)??e.$cstNode)),"nameSegmentGetter");return{node:e,name:t,get nameSegment(){return s()},selectionSegment:dg(e.$cstNode),type:e.$type,documentUri:i.uri,path:n}}},Ywe=class{static{o(this,"DefaultReferenceDescriptionProvider")}static{S(this,"DefaultReferenceDescriptionProvider")}constructor(e){this.nodeLocator=e.workspace.AstNodeLocator}async createDescriptions(e,t=Ii.CancellationToken.None){let r=[],i=e.parseResult.value;for(let n of Qo(i))await Wn(t),cg(n).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=[];Qa(t)&&t.$nodeDescription?r=[t.$nodeDescription]:Nl(t)&&(r=t.items.map(l=>l.$nodeDescription).filter(l=>l!==void 0));let i=Zo(e.container).uri,n=this.nodeLocator.getAstNodePath(e.container),a=[],s=dg(t.$refNode);for(let l of r)a.push({sourceUri:i,sourcePath:n,targetUri:l.documentUri,targetPath:l.path,segment:s,local:Ts.equals(l.documentUri,i)});return a}},Hwe=class{static{o(this,"DefaultAstNodeLocator")}static{S(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((r,i)=>{if(!r||i.length===0)return r;let n=i.indexOf(this.indexSeparator);if(n>0){let a=i.substring(0,n),s=parseInt(i.substring(n+1));return r[a]?.[s]}return r[i]},e)}},W6={};LE(W6,aP(_1(),1));Xwe=class{static{o(this,"DefaultConfigurationProvider")}static{S(this,"DefaultConfigurationProvider")}constructor(e){this._ready=new Qh,this.onConfigurationSectionUpdateEmitter=new W6.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(i=>({section:this.toSectionName(i.LanguageMetaData.languageId)})),r=await e.fetchConfiguration(t);t.forEach((i,n)=>{this.updateSectionConfiguration(i.section,r[n])})}}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}},c5=aP(WZe(),1);(function(e){function t(r){return{dispose:S(async()=>await r(),"dispose")}}o(t,"create"),S(t,"create"),e.create=t})(og||(og={}));Kwe=class{static{o(this,"DefaultDocumentBuilder")}static{S(this,"DefaultDocumentBuilder")}constructor(e){this.updateBuildOptions={validation:{categories:["built-in","fast"]}},this.updateListeners=[],this.buildPhaseListeners=new Jh,this.documentPhaseListeners=new Jh,this.buildState=new Map,this.documentBuildWaiters=new Map,this.currentState=qr.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=Ii.CancellationToken.None){for(let i of e){let n=i.uri.toString();if(i.state===qr.Validated){if(typeof t.validation=="boolean"&&t.validation)this.resetToState(i,qr.IndexedReferences);else if(typeof t.validation=="object"){let a=this.findMissingValidationCategories(i,t);a.length>0&&(this.buildState.set(n,{completed:!1,options:{validation:{categories:a}},result:this.buildState.get(n)?.result}),i.state=qr.IndexedReferences)}}else this.buildState.delete(n)}this.currentState=qr.Changed,await this.emitUpdate(e.map(i=>i.uri),[]),await this.buildDocuments(e,t,r)}async update(e,t,r=Ii.CancellationToken.None){this.currentState=qr.Changed;let i=[];for(let l of t){let h=this.langiumDocuments.deleteDocuments(l);for(let u of h)i.push(u.uri),this.cleanUpDeleted(u)}let n=(await Promise.all(e.map(l=>this.findChangedUris(l)))).flat();for(let l of n){let h=this.langiumDocuments.getDocument(l);h===void 0&&(h=this.langiumDocumentFactory.fromModel({$type:"INVALID"},l),h.state=qr.Changed,this.langiumDocuments.addDocument(h)),this.resetToState(h,qr.Changed)}let a=vi(n).concat(i).map(l=>l.toString()).toSet();this.langiumDocuments.all.filter(l=>!a.has(l.uri.toString())&&this.shouldRelink(l,a)).forEach(l=>this.resetToState(l,qr.ComputedScopes)),await this.emitUpdate(n,i),await Wn(r);let s=this.sortDocuments(this.langiumDocuments.all.filter(l=>l.state=1}findMissingValidationCategories(e,t){let r=this.buildState.get(e.uri.toString()),i=this.serviceRegistry.getServices(e.uri).validation.ValidationRegistry.getAllValidationCategories(e),n=r?.result?.validationChecks?new Set(r?.result?.validationChecks):r?.completed?i:new Set,a=t===void 0||t.validation===!0?i:typeof t.validation=="object"?t.validation.categories??i:[];return vi(a).filter(s=>!n.has(s)).toArray()}async findChangedUris(e){if(this.langiumDocuments.getDocument(e)??this.textDocuments?.get(e))return[e];try{let t=await this.fileSystemProvider.stat(e);if(t.isDirectory)return await this.workspaceManager().searchFolder(e);if(this.workspaceManager().shouldIncludeEntry(t))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),og.create(()=>{let t=this.updateListeners.indexOf(e);t>=0&&this.updateListeners.splice(t,1)})}resetToState(e,t){switch(t){case qr.Changed:case qr.Parsed:this.indexManager.removeContent(e.uri);case qr.IndexedContent:e.localSymbols=void 0;case qr.ComputedScopes:this.serviceRegistry.getServices(e.uri).references.Linker.unlink(e);case qr.Linked:this.indexManager.removeReferences(e.uri);case qr.IndexedReferences:e.diagnostics=void 0,this.buildState.delete(e.uri.toString());case qr.Validated:}e.state>t&&(e.state=t)}cleanUpDeleted(e){this.buildState.delete(e.uri.toString()),this.indexManager.remove(e.uri),e.state=qr.Changed}async buildDocuments(e,t,r){this.prepareBuild(e,t),await this.runCancelable(e,qr.Parsed,r,a=>this.langiumDocumentFactory.update(a,r)),await this.runCancelable(e,qr.IndexedContent,r,a=>this.indexManager.updateContent(a,r)),await this.runCancelable(e,qr.ComputedScopes,r,async a=>{let s=this.serviceRegistry.getServices(a.uri).references.ScopeComputation;a.localSymbols=await s.collectLocalSymbols(a,r)});let i=e.filter(a=>this.shouldLink(a));await this.runCancelable(i,qr.Linked,r,a=>this.serviceRegistry.getServices(a.uri).references.Linker.link(a,r)),await this.runCancelable(i,qr.IndexedReferences,r,a=>this.indexManager.updateReferences(a,r));let n=e.filter(a=>this.shouldValidate(a)?!0:(this.markAsCompleted(a),!1));await this.runCancelable(n,qr.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 i=r.uri.toString(),n=this.buildState.get(i);(!n||n.completed)&&this.buildState.set(i,{completed:!1,options:t,result:n?.result})}}async runCancelable(e,t,r,i){for(let a of e)a.statea.state===t);await this.notifyBuildPhase(n,t,r),this.currentState=t}onBuildPhase(e,t){return this.buildPhaseListeners.add(e,t),og.create(()=>{this.buildPhaseListeners.delete(e,t)})}onDocumentPhase(e,t){return this.documentPhaseListeners.add(e,t),og.create(()=>{this.documentPhaseListeners.delete(e,t)})}waitUntil(e,t,r){let i;return t&&"path"in t?i=t:r=t,r??(r=Ii.CancellationToken.None),i?this.awaitDocumentState(e,i,r):this.awaitBuilderState(e,r)}awaitDocumentState(e,t,r){let i=this.langiumDocuments.getDocument(t);if(i){if(i.state>=e)return Promise.resolve(t);if(r.isCancellationRequested)return Promise.reject(Bc);if(this.currentState>=e&&e>i.state)return Promise.reject(new c5.ResponseError(c5.LSPErrorCodes.RequestFailed,`Document state of ${t.toString()} is ${qr[i.state]}, requiring ${qr[e]}, but workspace state is already ${qr[this.currentState]}. Returning undefined.`))}else return Promise.reject(new c5.ResponseError(c5.LSPErrorCodes.ServerCancelled,`No document found for URI: ${t.toString()}`));return new Promise((n,a)=>{let s=this.onDocumentPhase(e,h=>{Ts.equals(h.uri,t)&&(s.dispose(),l.dispose(),n(h.uri))}),l=r.onCancellationRequested(()=>{s.dispose(),l.dispose(),a(Bc)})})}awaitBuilderState(e,t){return this.currentState>=e?Promise.resolve():t.isCancellationRequested?Promise.reject(Bc):new Promise((r,i)=>{let n=this.onBuildPhase(e,()=>{n.dispose(),a.dispose(),r()}),a=t.onCancellationRequested(()=>{n.dispose(),a.dispose(),i(Bc)})})}async notifyDocumentPhase(e,t,r){let i=this.documentPhaseListeners.get(t).slice();for(let n of i)try{await Wn(r),await n(e,r)}catch(a){if(!ep(a))throw a}}async notifyBuildPhase(e,t,r){if(e.length===0)return;let i=this.buildPhaseListeners.get(t).slice();for(let n of i)await Wn(r),await n(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,i=this.getBuildOptions(e),n=typeof i.validation=="object"?{...i.validation}:{};n.categories=this.findMissingValidationCategories(e,i);let a=await r.validateDocument(e,n,t);e.diagnostics?e.diagnostics.push(...a):e.diagnostics=a;let s=this.buildState.get(e.uri.toString());s&&(s.result??(s.result={}),s.result.validationChecks?s.result.validationChecks=vi(s.result.validationChecks).concat(n.categories).distinct().toArray():s.result.validationChecks=[...n.categories])}getBuildOptions(e){return this.buildState.get(e.uri.toString())?.options??{}}},Zwe=class{static{o(this,"DefaultIndexManager")}static{S(this,"DefaultIndexManager")}constructor(e){this.symbolIndex=new Map,this.symbolByTypeIndex=new z6,this.referenceIndex=new Map,this.documents=e.workspace.LangiumDocuments,this.serviceRegistry=e.ServiceRegistry,this.astReflection=e.AstReflection}findAllReferences(e,t){let r=Zo(e).uri,i=[];return this.referenceIndex.forEach(n=>{n.forEach(a=>{Ts.equals(a.targetUri,r)&&a.targetPath===t&&i.push(a)})}),vi(i)}allElements(e,t){let r=vi(this.symbolIndex.keys());return t&&(r=r.filter(i=>!t||t.has(i))),r.map(i=>this.getFileDescriptions(i,e)).flat()}getFileDescriptions(e,t){return t?this.symbolByTypeIndex.get(e,t,()=>(this.symbolIndex.get(e)??[]).filter(r=>this.astReflection.isSubtype(r.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=Ii.CancellationToken.None){let r=await this.serviceRegistry.getServices(e.uri).references.ScopeComputation.collectExportedSymbols(e,t),i=e.uri.toString();this.symbolIndex.set(i,r),this.symbolByTypeIndex.clear(i)}async updateReferences(e,t=Ii.CancellationToken.None){let r=await this.serviceRegistry.getServices(e.uri).workspace.ReferenceDescriptionProvider.createDescriptions(e,t);this.referenceIndex.set(e.uri.toString(),r)}isAffected(e,t){let r=this.referenceIndex.get(e.uri.toString());return r?r.some(i=>!i.local&&t.has(i.targetUri.toString())):!1}},Qwe=class{static{o(this,"DefaultWorkspaceManager")}static{S(this,"DefaultWorkspaceManager")}constructor(e){this.initialBuildOptions={},this._ready=new Qh,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=Ii.CancellationToken.None){let r=await this.performStartup(e);await Wn(t),await this.documentBuilder.build(r,this.initialBuildOptions,t)}async performStartup(e){let t=[],r=S(a=>{t.push(a),this.langiumDocuments.hasDocument(a.uri)||this.langiumDocuments.addDocument(a)},"collector");await this.loadAdditionalDocuments(e,r);let i=[];await Promise.all(e.map(a=>this.getRootFolder(a)).map(async a=>this.traverseFolder(a,i)));let n=vi(i).distinct(a=>a.toString()).filter(a=>!this.langiumDocuments.hasDocument(a));return await this.loadWorkspaceDocuments(n,r),this._ready.resolve(),t}async loadWorkspaceDocuments(e,t){await Promise.all(e.map(async r=>{let i=await this.langiumDocuments.getOrCreateDocument(r);t(i)}))}loadAdditionalDocuments(e,t){return Promise.resolve()}getRootFolder(e){return mo.parse(e.uri)}async traverseFolder(e,t){try{let r=await this.fileSystemProvider.readDirectory(e);await Promise.all(r.map(async i=>{this.shouldIncludeEntry(i)&&(i.isDirectory?await this.traverseFolder(i.uri,t):i.isFile&&t.push(i.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=Ts.basename(e.uri);return t.startsWith(".")?!1:e.isDirectory?t!=="node_modules"&&t!=="out":e.isFile?this.serviceRegistry.hasServices(e.uri):!1}},Jwe=class{static{o(this,"DefaultLexerErrorMessageProvider")}static{S(this,"DefaultLexerErrorMessageProvider")}buildUnexpectedCharactersMessage(e,t,r,i,n){return _B.buildUnexpectedCharactersMessage(e,t,r,i,n)}buildUnableToPopLexerModeMessage(e){return _B.buildUnableToPopLexerModeMessage(e)}},CY={mode:"full"},wY=class{static{o(this,"DefaultLexer")}static{S(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=Cx(t)?Object.values(t):t,i=e.LanguageMetaData.mode==="production";this.chevrotainLexer=new ks(r,{positionTracking:"full",skipValidations:i,errorMessageProvider:this.errorMessageProvider})}get definition(){return this.tokenTypes}tokenize(e,t=CY){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(Cx(e))return e;let t=cT(e)?Object.values(e.modes).flat():e,r={};return t.forEach(i=>r[i.name]=i),r}};o(lT,"isTokenTypeArray");S(lT,"isTokenTypeArray");o(cT,"isIMultiModeLexerDefinition");S(cT,"isIMultiModeLexerDefinition");o(Cx,"isTokenTypeDictionary");S(Cx,"isTokenTypeDictionary");Sx();o(U6,"parseJSDoc");S(U6,"parseJSDoc");o(V6,"isJSDoc");S(V6,"isJSDoc");o(Y6,"getLines");S(Y6,"getLines");qke=/\s*(@([\p{L}][\p{L}\p{N}]*)?)/uy,vct=/\{(@[\p{L}][\p{L}\p{N}]*)(\s*)([^\r\n}]+)?\}/gu;o(EY,"tokenize");S(EY,"tokenize");o(SY,"buildInlineTokens");S(SY,"buildInlineTokens");bct=/\S/,xct=/\s*$/;o(wx,"skipWhitespace");S(wx,"skipWhitespace");o(_Y,"lastCharacter");S(_Y,"lastCharacter");o(AY,"parseJSDocComment");S(AY,"parseJSDocComment");o(RY,"parseJSDocElement");S(RY,"parseJSDocElement");o(LY,"appendEmptyLine");S(LY,"appendEmptyLine");o(H6,"parseJSDocText");S(H6,"parseJSDocText");o($Y,"parseJSDocInline");S($Y,"parseJSDocInline");o(X6,"parseJSDocTag");S(X6,"parseJSDocTag");o(K6,"parseJSDocLine");S(K6,"parseJSDocLine");o(hT,"normalizeOptions");S(hT,"normalizeOptions");o(ix,"normalizeOption");S(ix,"normalizeOption");jke=class{static{o(this,"JSDocCommentImpl")}static{S(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+=AE(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 i=r.toMarkdown(e);t+=AE(t)+i}return t.trim()}},tO=class{static{o(this,"JSDocTagImpl")}static{S(this,"JSDocTagImpl")}constructor(e,t,r,i){this.name=e,this.content=t,this.inline=r,this.range=i}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 n=IY(this.name,t,e??{});if(typeof n=="string")return n}let r="";e?.tag==="italic"||e?.tag===void 0?r="*":e?.tag==="bold"?r="**":e?.tag==="bold-italic"&&(r="***");let i=`${r}@${this.name}${r}`;return this.content.inlines.length===1?i=`${i} \u2014 ${t}`:this.content.inlines.length>1&&(i=`${i} +${t}`),this.inline?`{${i}}`:i}};o(IY,"renderInlineTag");S(IY,"renderInlineTag");o(DY,"renderLinkDefault");S(DY,"renderLinkDefault");FB=class{static{o(this,"JSDocTextImpl")}static{S(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;ri.range.start.line&&(t+=` +`)}return t}},e5e=class{static{o(this,"JSDocLineImpl")}static{S(this,"JSDocLineImpl")}constructor(e,t){this.text=e,this.range=t}toString(){return this.text}toMarkdown(){return this.text}};o(AE,"fillNewlines");S(AE,"fillNewlines");t5e=class{static{o(this,"JSDocDocumentationProvider")}static{S(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&&V6(t))return U6(t).toMarkdown({renderLink:S((r,i)=>this.documentationLinkRenderer(e,r,i),"renderLink"),renderTag:S(r=>this.documentationTagRenderer(e,r),"renderTag")})}documentationLinkRenderer(e,t,r){let i=this.findNameInLocalSymbols(e,t)??this.findNameInGlobalScope(e,t);if(i&&i.nameSegment){let n=i.nameSegment.range.start.line+1,a=i.nameSegment.range.start.character+1,s=i.documentUri.with({fragment:`L${n},${a}`});return`[${r}](${s.toString()})`}else return}documentationTagRenderer(e,t){}findNameInLocalSymbols(e,t){let r=Zo(e).localSymbols;if(!r)return;let i=e;do{let n=r.getStream(i).find(a=>a.name===t);if(n)return n;i=i.$container}while(i)}findNameInGlobalScope(e,t){return this.indexManager.allElements().find(r=>r.name===t)}},r5e=class{static{o(this,"DefaultCommentProvider")}static{S(this,"DefaultCommentProvider")}constructor(e){this.grammarConfig=()=>e.parser.GrammarConfig}getComment(e){return q6(e)?e.$comment:iS(e.$cstNode,this.grammarConfig().multilineCommentRules)?.text}},i5e=class{static{o(this,"DefaultAsyncParser")}static{S(this,"DefaultAsyncParser")}constructor(e){this.syncParser=e.parser.LangiumParser}parse(e,t){return Promise.resolve(this.syncParser.parse(e))}},Tct=class{static{o(this,"AbstractThreadedAsyncParser")}static{S(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),i=new Qh,n,a=t.onCancellationRequested(()=>{n=setTimeout(()=>{this.terminateWorker(r)},this.terminationDelay)});return r.parse(e).then(s=>{let l=this.hydrator.hydrate(s);i.resolve(l)}).catch(s=>{i.reject(s)}).finally(()=>{a.dispose(),clearTimeout(n)}),i.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 Qh;return e.onCancellationRequested(()=>{let r=this.queue.indexOf(t);r>=0&&this.queue.splice(r,1),t.reject(Bc)}),this.queue.push(t),t.promise}},kct=class{static{o(this,"ParserWorker")}static{S(this,"ParserWorker")}get ready(){return this._ready}get onReady(){return this.onReadyEmitter.event}constructor(e,t,r,i){this.onReadyEmitter=new W6.Emitter,this.deferred=new Qh,this._ready=!0,this._parsing=!1,this.sendMessage=e,this._terminate=i,t(n=>{let a=n;this.deferred.resolve(a),this.unlock()}),r(n=>{this.deferred.reject(n),this.unlock()})}terminate(){this.deferred.reject(Bc),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 Qh,this.sendMessage(e),this.deferred.promise}},n5e=class{static{o(this,"DefaultWorkspaceLock")}static{S(this,"DefaultWorkspaceLock")}constructor(){this.previousTokenSource=new Ii.CancellationTokenSource,this.writeQueue=[],this.readQueue=[],this.done=!0}write(e){this.cancelWrite();let t=oT();return this.previousTokenSource=t,this.enqueue(this.writeQueue,e,t.token)}read(e){return this.enqueue(this.readQueue,e)}enqueue(e,t,r=Ii.CancellationToken.None){let i=new Qh,n={action:t,deferred:i,cancellationToken:r};return e.push(n),this.performNextOperation(),i.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:i})=>{try{let n=await Promise.resolve().then(()=>t(i));r.resolve(n)}catch(n){ep(n)?r.resolve(void 0):r.reject(n)}})),this.done=!0,this.performNextOperation()}cancelWrite(){this.previousTokenSource.cancel()}},a5e=class{static{o(this,"DefaultHydrator")}static{S(this,"DefaultHydrator")}constructor(e){this.grammarElementIdMap=new EE,this.tokenTypeIdMap=new EE,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 i of Qo(e))t.set(i,{});if(e.$cstNode)for(let i of ug(e.$cstNode))r.set(i,{});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[i,n]of Object.entries(e))if(!i.startsWith("$"))if(Array.isArray(n)){let a=[];r[i]=a;for(let s of n)Tn(s)?a.push(this.dehydrateAstNode(s,t)):Qa(s)?a.push(this.dehydrateReference(s,t)):a.push(s)}else Tn(n)?r[i]=this.dehydrateAstNode(n,t):Qa(n)?r[i]=this.dehydrateReference(n,t):n!==void 0&&(r[i]=n);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 Ax(e)?r.fullText=e.fullText:r.grammarSource=this.getGrammarElementId(e.grammarSource),r.hidden=e.hidden,r.astNode=t.astNodes.get(e.astNode),Pc(e)?r.content=e.content.map(i=>this.dehydrateCstNode(i,t)):Bd(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 n of Qo(e))t.set(n,{});let i;if(e.$cstNode)for(let n of ug(e.$cstNode)){let a;"fullText"in n?(a=new aY(n.fullText),i=a):"content"in n?a=new A6:"tokenType"in n&&(a=this.hydrateCstLeafNode(n)),a&&(r.set(n,a),a.root=i)}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[i,n]of Object.entries(e))if(!i.startsWith("$"))if(Array.isArray(n)){let a=[];r[i]=a;for(let s of n)Tn(s)?a.push(this.setParent(this.hydrateAstNode(s,t),r)):Qa(s)?a.push(this.hydrateReference(s,r,i,t)):a.push(s)}else Tn(n)?r[i]=this.setParent(this.hydrateAstNode(n,t),r):Qa(n)?r[i]=this.hydrateReference(n,r,i,t):n!==void 0&&(r[i]=n);return r}setParent(e,t){return e.$container=t,e}hydrateReference(e,t,r,i){return this.linker.buildReference(t,r,i.cstNodes.get(e.$refNode),e.$refText)}hydrateCstNode(e,t,r=0){let i=t.cstNodes.get(e);if(typeof e.grammarSource=="number"&&(i.grammarSource=this.getGrammarElement(e.grammarSource)),i.astNode=t.astNodes.get(e.astNode),Pc(i))for(let n of e.content){let a=this.hydrateCstNode(n,t,r++);i.content.push(a)}return i}hydrateCstLeafNode(e){let t=this.getTokenType(e.tokenType),r=e.offset,i=e.length,n=e.startLine,a=e.startColumn,s=e.endLine,l=e.endColumn,h=e.hidden;return new TE(r,i,{start:{line:n,character:a},end:{line:s,character:l}},t,h)}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 Qo(this.grammar))Rx(t)&&this.grammarElementIdMap.set(t,e++)}};o(Jr,"createDefaultCoreModule");S(Jr,"createDefaultCoreModule");o(ei,"createDefaultSharedCoreModule");S(ei,"createDefaultSharedCoreModule");(function(e){e.merge=(t,r)=>gg(gg({},t),r)})(zB||(zB={}));o(vr,"inject");S(vr,"inject");s5e=Symbol("isProxy");o(Z6,"eagerLoad");S(Z6,"eagerLoad");o(Q6,"_inject");S(Q6,"_inject");Gke=Symbol();o(RE,"_resolve");S(RE,"_resolve");o(gg,"_merge");S(gg,"_merge");qB={indentTokenName:"INDENT",dedentTokenName:"DEDENT",whitespaceTokenName:"WS",ignoreIndentationDelimiters:[]};(function(e){e.REGULAR="indentation-sensitive",e.IGNORE_INDENTATION="ignore-indentation"})(ng||(ng={}));o5e=class extends M6{static{o(this,"IndentationAwareTokenBuilder")}static{S(this,"IndentationAwareTokenBuilder")}constructor(e=qB){super(),this.indentationStack=[0],this.whitespaceRegExp=/[ \t]+/y,this.options={...qB,...e},this.indentTokenType=sg({name:this.options.indentTokenName,pattern:this.indentMatcher.bind(this),line_breaks:!1}),this.dedentTokenType=sg({name:this.options.dedentTokenName,pattern:this.dedentMatcher.bind(this),line_breaks:!1})}buildTokens(e,t){let r=super.buildTokens(e,t);if(!lT(r))throw new Error("Invalid tokens built by default builder");let{indentTokenName:i,dedentTokenName:n,whitespaceTokenName:a,ignoreIndentationDelimiters:s}=this.options,l,h,u,d=[];for(let p of r){for(let[f,g]of s)p.name===f?p.PUSH_MODE=ng.IGNORE_INDENTATION:p.name===g&&(p.POP_MODE=!0);p.name===n?l=p:p.name===i?h=p:p.name===a?u=p:d.push(p)}if(!l||!h||!u)throw new Error("Some indentation/whitespace tokens not found!");return s.length>0?{modes:{[ng.REGULAR]:[l,h,...d,u],[ng.IGNORE_INDENTATION]:[...d,u]},defaultMode:ng.REGULAR}:[l,h,u,...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,i){this.whitespaceRegExp.lastIndex=t;let n=this.whitespaceRegExp.exec(e);return{currIndentLevel:n?.[0].length??0,prevIndentLevel:this.indentationStack.at(-1),match:n}}createIndentationTokenInstance(e,t,r,i){let n=this.getLineNumber(t,i);return B1(e,r,i,i+r.length,n,n,1,r.length)}getLineNumber(e,t){return e.substring(0,t).split(/\r\n|\r|\n/).length}indentMatcher(e,t,r,i){if(!this.isStartOfLine(e,t))return null;let{currIndentLevel:n,prevIndentLevel:a,match:s}=this.matchWhitespace(e,t,r,i);return n<=a?null:(this.indentationStack.push(n),s)}dedentMatcher(e,t,r,i){if(!this.isStartOfLine(e,t))return null;let{currIndentLevel:n,prevIndentLevel:a,match:s}=this.matchWhitespace(e,t,r,i);if(n>=a)return null;let l=this.indentationStack.lastIndexOf(n);if(l===-1)return this.diagnostics.push({severity:"error",message:`Invalid dedent level ${n} at offset: ${t}. Current indentation stack: ${this.indentationStack}`,offset:t,length:s?.[0]?.length??0,line:this.getLineNumber(e,t),column:1}),null;let h=this.indentationStack.length-l-1,u=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}},Cct=class extends wY{static{o(this,"IndentationAwareLexer")}static{S(this,"IndentationAwareLexer")}constructor(e){if(super(e),e.parser.TokenBuilder instanceof o5e)this.indentationTokenBuilder=e.parser.TokenBuilder;else throw new Error("IndentationAwareLexer requires an accompanying IndentationAwareTokenBuilder")}tokenize(e,t=CY){let r=super.tokenize(e),i=r.report;t?.mode==="full"&&r.tokens.push(...i.remainingDedents),i.remainingDedents=[];let{indentTokenType:n,dedentTokenType:a}=this.indentationTokenBuilder,s=n.tokenTypeIdx,l=a.tokenTypeIdx,h=[],u=r.tokens.length-1;for(let d=0;d=0&&h.push(r.tokens[u]),r.tokens=h,r}},MY={};Od(MY,{AstUtils:o(()=>uP,"AstUtils"),BiMap:o(()=>EE,"BiMap"),Cancellation:o(()=>Ii,"Cancellation"),ContextCache:o(()=>z6,"ContextCache"),CstUtils:o(()=>lP,"CstUtils"),DONE_RESULT:o(()=>xs,"DONE_RESULT"),Deferred:o(()=>Qh,"Deferred"),Disposable:o(()=>og,"Disposable"),DisposableCache:o(()=>F6,"DisposableCache"),DocumentCache:o(()=>Fwe,"DocumentCache"),EMPTY_STREAM:o(()=>p1,"EMPTY_STREAM"),ErrorWithLocation:o(()=>oS,"ErrorWithLocation"),GrammarUtils:o(()=>PP,"GrammarUtils"),MultiMap:o(()=>Jh,"MultiMap"),OperationCancelled:o(()=>Bc,"OperationCancelled"),Reduction:o(()=>nx,"Reduction"),RegExpUtils:o(()=>FP,"RegExpUtils"),SimpleCache:o(()=>TY,"SimpleCache"),StreamImpl:o(()=>Oc,"StreamImpl"),TreeStreamImpl:o(()=>f1,"TreeStreamImpl"),URI:o(()=>mo,"URI"),UriTrie:o(()=>xY,"UriTrie"),UriUtils:o(()=>Ts,"UriUtils"),WorkspaceCache:o(()=>kY,"WorkspaceCache"),assertCondition:o(()=>lS,"assertCondition"),assertUnreachable:o(()=>eu,"assertUnreachable"),delayNextTick:o(()=>sT,"delayNextTick"),interruptAndCheck:o(()=>Wn,"interruptAndCheck"),isOperationCancelled:o(()=>ep,"isOperationCancelled"),loadGrammarFromJson:o(()=>Un,"loadGrammarFromJson"),setInterruptionPeriod:o(()=>N6,"setInterruptionPeriod"),startCancelableOperation:o(()=>oT,"startCancelableOperation"),stream:o(()=>vi,"stream")});LE(MY,W6);l5e=class{static{o(this,"EmptyFileSystemProvider")}static{S(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[]}},ci={fileSystemProvider:S(()=>new l5e,"fileSystemProvider")},wct={Grammar:S(()=>{},"Grammar"),LanguageMetaData:S(()=>({caseInsensitive:!1,fileExtensions:[".langium"],languageId:"langium"}),"LanguageMetaData")},Ect={AstReflection:S(()=>new RP,"AstReflection")};o(NY,"createMinimalGrammarServices");S(NY,"createMinimalGrammarServices");o(Un,"loadGrammarFromJson");S(Un,"loadGrammarFromJson");LE(Z3e,MY);Sct=class{static{o(this,"DefaultLangiumProfiler")}static{S(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 Jh}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 c5e(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 s=t.entries.get(a),l=s.reduce((h,u)=>h+u);r.push({name:`${t.identifier}.${a}`,count:s.length,duration:l})}let i=t.duration-r.map(a=>a.duration).reduce((a,s)=>a+s,0);r.push({name:t.identifier,count:1,duration:i}),r.sort((a,s)=>s.duration-a.duration);function n(a){return Math.round(100*a)/100}return o(n,"Round"),S(n,"Round"),console.table(r.map(a=>({Element:a.name,Count:a.count,"Self %":n(100*a.duration/t.duration),"Time (ms)":n(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])}},c5e=class{static{o(this,"ProfilingTask")}static{S(this,"ProfilingTask")}constructor(e,t){this.stack=[],this.entries=new Jh,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 i=r-t.content;this.entries.add(e,i)}};(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 ]+)\]/}})(jB||(jB={}));(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]*/}})(GB||(GB={}));(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]*/}})(WB||(WB={}));(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])?/}})(UB||(UB={}));(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]*/}})(VB||(VB={}));(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]*/}})(YB||(YB={}));(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]*/}})(HB||(HB={}));(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]*/}})(XB||(XB={}));(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]*/}})(KB||(KB={}));(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]*?\*\)/}})(ZB||(ZB={}));(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]*?\*\//}})(QB||(QB={}));(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]*/}})(JB||(JB={}));(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:/"[^"]*"|'[^']*'/}})(eP||(eP={}));(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])*/}})(tP||(tP={}));(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]*/}})(rP||(rP={}));sSt={...jB.Terminals,...GB.Terminals,...WB.Terminals,...UB.Terminals,...VB.Terminals,...YB.Terminals,...HB.Terminals,...XB.Terminals,...KB.Terminals,...ZB.Terminals,...QB.Terminals,...JB.Terminals,...tP.Terminals,...eP.Terminals,...rP.Terminals},Wke={$type:"AbnfAlternation",alternatives:"alternatives"},Uke={$type:"AbnfConcatenation",elements:"elements"},rO={$type:"AbnfElement",primary:"primary",repeat:"repeat"},Vke={$type:"AbnfGroup",element:"element"},Yke={$type:"AbnfNumVal",value:"value"},Hke={$type:"AbnfOptionalGroup",element:"element"},$m={$type:"AbnfPrimary"},iO={$type:"AbnfRule",definition:"definition",name:"name"},Xke={$type:"AbnfRuleName",name:"name"},Kke={$type:"AbnfStringLiteral",value:"value"},h5={$type:"Accelerator",name:"name",x:"x",y:"y"},nO={$type:"Alignment",direction:"direction",members:"members"},u5={$type:"Anchor",evolution:"evolution",name:"name",visibility:"visibility"},bb={$type:"Annotation",number:"number",text:"text",x:"x",y:"y"},aO={$type:"Annotations",x:"x",y:"y"},Ic={$type:"Architecture",accDescr:"accDescr",accTitle:"accTitle",alignments:"alignments",edges:"edges",groups:"groups",junctions:"junctions",services:"services",title:"title"};o(h5e,"isArchitecture");S(h5e,"isArchitecture");d5={$type:"Axis",label:"label",name:"name"},N5={$type:"Branch",name:"name",order:"order"};o(u5e,"isBranch");S(u5e,"isBranch");Zke={$type:"Checkout",branch:"branch"},p5={$type:"CherryPicking",id:"id",parent:"parent",tags:"tags"},sO={$type:"ClassDefStatement",className:"className",styleText:"styleText"},qm={$type:"Commit",id:"id",message:"message",tags:"tags",type:"type"};o(d5e,"isCommit");S(d5e,"isCommit");f5={$type:"Common",accDescr:"accDescr",accTitle:"accTitle",title:"title"},Lf={$type:"Component",decorator:"decorator",evolution:"evolution",inertia:"inertia",label:"label",name:"name",visibility:"visibility"},g5={$type:"Curve",entries:"entries",label:"label",name:"name"},zf={$type:"Cynefin",accDescr:"accDescr",accTitle:"accTitle",domains:"domains",title:"title",transitions:"transitions"};o(p5e,"isCynefin");S(p5e,"isCynefin");m5={$type:"Deaccelerator",name:"name",x:"x",y:"y"},Qke={$type:"Decorator",strategy:"strategy"},Im={$type:"Direction",accDescr:"accDescr",accTitle:"accTitle",dir:"dir",statements:"statements",title:"title"},O5={$type:"DomainBlock",domain:"domain",items:"items"};o(f5e,"isDomainBlock");S(f5e,"isDomainBlock");iP={$type:"DomainItem",label:"label"};o(g5e,"isDomainItem");S(g5e,"isDomainItem");Jke={$type:"EbnfChoice",alternatives:"alternatives"},e3e={$type:"EbnfExceptionPostfix",except:"except"},t3e={$type:"EbnfGroup",element:"element"},r3e={$type:"EbnfNonTerminal",name:"name"},i3e={$type:"EbnfOneOrMorePostfix",operator:"operator"},n3e={$type:"EbnfOptional",element:"element"},a3e={$type:"EbnfOptionalPostfix",operator:"operator"},xb={$type:"EbnfPostfix"},$f={$type:"EbnfPrimary"},s3e={$type:"EbnfRepetition",element:"element"},oO={$type:"EbnfRule",definition:"definition",name:"name"},o3e={$type:"EbnfSequence",elements:"elements"},l3e={$type:"EbnfSpecial",text:"text"},lO={$type:"EbnfTerm",base:"base",postfixes:"postfixes"},c3e={$type:"EbnfTerminal",value:"value"},h3e={$type:"EbnfZeroOrMorePostfix",operator:"operator"},Lc={$type:"Edge",lhsDir:"lhsDir",lhsGroup:"lhsGroup",lhsId:"lhsId",lhsInto:"lhsInto",rhsDir:"rhsDir",rhsGroup:"rhsGroup",rhsId:"rhsId",rhsInto:"rhsInto",title:"title"},Dm={$type:"EmDataEntity",dataBlockValue:"dataBlockValue",dataType:"dataType",name:"name"},If={$type:"EmFrame"},Tb={$type:"EmGwt",givenStatements:"givenStatements",sourceFrame:"sourceFrame",thenStatements:"thenStatements",whenStatements:"whenStatements"},u3e={$type:"EmGwtStatement",entityIdentifier:"entityIdentifier"},cO={$type:"EmModelEntity",name:"name"};o(m5e,"isEmModelEntityType");S(m5e,"isEmModelEntityType");y5={$type:"EmNoteEntity",dataBlockValue:"dataBlockValue",dataType:"dataType",sourceFrame:"sourceFrame"},Gh={$type:"EmResetFrame",dataInlineValue:"dataInlineValue",dataReference:"dataReference",dataType:"dataType",entityIdentifier:"entityIdentifier",modelEntityType:"modelEntityType",name:"name",sourceFrames:"sourceFrames"};o(J6,"isEmResetFrame");S(J6,"isEmResetFrame");Td={$type:"EmTimeFrame",dataInlineValue:"dataInlineValue",dataReference:"dataReference",dataType:"dataType",entityIdentifier:"entityIdentifier",modelEntityType:"modelEntityType",name:"name",sourceFrames:"sourceFrames"},hO={$type:"Entry",axis:"axis",value:"value"},Fh={$type:"EventModel",accDescr:"accDescr",accTitle:"accTitle",dataEntities:"dataEntities",frames:"frames",gwtEntities:"gwtEntities",modelEntities:"modelEntities",noteEntities:"noteEntities",title:"title"},d3e={$type:"Evolution",stages:"stages"},v5={$type:"EvolutionStage",boundary:"boundary",name:"name",secondName:"secondName"},uO={$type:"Evolve",component:"component",target:"target"},qf={$type:"GitGraph",accDescr:"accDescr",accTitle:"accTitle",statements:"statements",title:"title"};o(y5e,"isGitGraph");S(y5e,"isGitGraph");kb={$type:"Group",icon:"icon",id:"id",in:"in",title:"title"},Bb={$type:"Info",accDescr:"accDescr",accTitle:"accTitle",title:"title"};o(v5e,"isInfo");S(v5e,"isInfo");Cb={$type:"Item",classSelector:"classSelector",name:"name"},dO={$type:"Junction",id:"id",in:"in"},wb={$type:"Label",negX:"negX",negY:"negY",offsetX:"offsetX",offsetY:"offsetY"},b5={$type:"Leaf",classSelector:"classSelector",name:"name",value:"value"},Df={$type:"Link",arrow:"arrow",from:"from",fromPort:"fromPort",linkLabel:"linkLabel",to:"to",toPort:"toPort"},jm={$type:"Merge",branch:"branch",id:"id",tags:"tags",type:"type"};o(b5e,"isMerge");S(b5e,"isMerge");x5={$type:"Note",evolution:"evolution",text:"text",visibility:"visibility"},pO={$type:"Option",name:"name",value:"value"},Gm={$type:"Packet",accDescr:"accDescr",accTitle:"accTitle",blocks:"blocks",title:"title"};o(x5e,"isPacket");S(x5e,"isPacket");Wm={$type:"PacketBlock",bits:"bits",end:"end",label:"label",start:"start"};o(T5e,"isPacketBlock");S(T5e,"isPacketBlock");p3e={$type:"PegAny",dot:"dot"},f3e={$type:"PegGroup",element:"element"},g3e={$type:"PegIdentifier",name:"name"},m3e={$type:"PegLiteral",value:"value"},y3e={$type:"PegOrderedChoice",alternatives:"alternatives"},fO={$type:"PegPrefix",operator:"operator",suffix:"suffix"},Eb={$type:"PegPrimary"},gO={$type:"PegRule",definition:"definition",name:"name"},v3e={$type:"PegSequence",elements:"elements"},mO={$type:"PegSuffix",operator:"operator",primary:"primary"},jf={$type:"Pie",accDescr:"accDescr",accTitle:"accTitle",sections:"sections",showData:"showData",title:"title"};o(k5e,"isPie");S(k5e,"isPie");B5={$type:"PieSection",label:"label",value:"value"};o(C5e,"isPieSection");S(C5e,"isPieSection");yO={$type:"Pipeline",components:"components",parent:"parent"},T5={$type:"PipelineComponent",evolution:"evolution",label:"label",name:"name"},Mf={$type:"Radar",accDescr:"accDescr",accTitle:"accTitle",axes:"axes",curves:"curves",options:"options",title:"title"},Um={$type:"Railroad",accDescr:"accDescr",accTitle:"accTitle",rules:"rules",title:"title"};o(w5e,"isRailroad");S(w5e,"isRailroad");Vm={$type:"RailroadAbnf",accDescr:"accDescr",accTitle:"accTitle",rules:"rules",title:"title"};o(E5e,"isRailroadAbnf");S(E5e,"isRailroadAbnf");b3e={$type:"RailroadChoiceExpr",alternatives:"alternatives"},Ym={$type:"RailroadEbnf",accDescr:"accDescr",accTitle:"accTitle",rules:"rules",title:"title"};o(S5e,"isRailroadEbnf");S(S5e,"isRailroadEbnf");zh={$type:"RailroadExpression"},x3e={$type:"RailroadNonTerminalExpr",name:"name"},T3e={$type:"RailroadOneOrMoreExpr",element:"element"},k3e={$type:"RailroadOptionalExpr",element:"element"},Hm={$type:"RailroadPeg",accDescr:"accDescr",accTitle:"accTitle",rules:"rules",title:"title"};o(_5e,"isRailroadPeg");S(_5e,"isRailroadPeg");vO={$type:"RailroadRule",definition:"definition",name:"name"},C3e={$type:"RailroadSequenceExpr",elements:"elements"},w3e={$type:"RailroadSpecialExpr",text:"text"},E3e={$type:"RailroadTerminalExpr",value:"value"},S3e={$type:"RailroadZeroOrMoreExpr",element:"element"},bO={$type:"Section",classSelector:"classSelector",name:"name"},Mm={$type:"Service",icon:"icon",iconText:"iconText",id:"id",in:"in",title:"title"},xO={$type:"Size",height:"height",width:"width"},Nm={$type:"Statement"},Pb={$type:"Transition",from:"from",label:"label",to:"to"};o(A5e,"isTransition");S(A5e,"isTransition");Xm={$type:"Treemap",accDescr:"accDescr",accTitle:"accTitle",title:"title",TreemapRows:"TreemapRows"};o(R5e,"isTreemap");S(R5e,"isTreemap");TO={$type:"TreemapRow",indent:"indent",item:"item"},Om={$type:"TreeNode",classAnnotation:"classAnnotation",descAnnotation:"descAnnotation",iconAnnotation:"iconAnnotation",indent:"indent",name:"name"},Sb={$type:"TreeView",accDescr:"accDescr",accTitle:"accTitle",nodes:"nodes",title:"title"},ma={$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"};o(L5e,"isWardley");S(L5e,"isWardley");$5e=class extends cP{static{o(this,"MermaidAstReflection")}constructor(){super(...arguments),this.types={AbnfAlternation:{name:Wke.$type,properties:{alternatives:{name:Wke.alternatives,defaultValue:[]}},superTypes:[]},AbnfConcatenation:{name:Uke.$type,properties:{elements:{name:Uke.elements,defaultValue:[]}},superTypes:[]},AbnfElement:{name:rO.$type,properties:{primary:{name:rO.primary},repeat:{name:rO.repeat}},superTypes:[]},AbnfGroup:{name:Vke.$type,properties:{element:{name:Vke.element}},superTypes:[$m.$type]},AbnfNumVal:{name:Yke.$type,properties:{value:{name:Yke.value}},superTypes:[$m.$type]},AbnfOptionalGroup:{name:Hke.$type,properties:{element:{name:Hke.element}},superTypes:[$m.$type]},AbnfPrimary:{name:$m.$type,properties:{},superTypes:[]},AbnfRule:{name:iO.$type,properties:{definition:{name:iO.definition},name:{name:iO.name}},superTypes:[]},AbnfRuleName:{name:Xke.$type,properties:{name:{name:Xke.name}},superTypes:[$m.$type]},AbnfStringLiteral:{name:Kke.$type,properties:{value:{name:Kke.value}},superTypes:[$m.$type]},Accelerator:{name:h5.$type,properties:{name:{name:h5.name},x:{name:h5.x},y:{name:h5.y}},superTypes:[]},Alignment:{name:nO.$type,properties:{direction:{name:nO.direction},members:{name:nO.members,defaultValue:[]}},superTypes:[]},Anchor:{name:u5.$type,properties:{evolution:{name:u5.evolution},name:{name:u5.name},visibility:{name:u5.visibility}},superTypes:[]},Annotation:{name:bb.$type,properties:{number:{name:bb.number},text:{name:bb.text},x:{name:bb.x},y:{name:bb.y}},superTypes:[]},Annotations:{name:aO.$type,properties:{x:{name:aO.x},y:{name:aO.y}},superTypes:[]},Architecture:{name:Ic.$type,properties:{accDescr:{name:Ic.accDescr},accTitle:{name:Ic.accTitle},alignments:{name:Ic.alignments,defaultValue:[]},edges:{name:Ic.edges,defaultValue:[]},groups:{name:Ic.groups,defaultValue:[]},junctions:{name:Ic.junctions,defaultValue:[]},services:{name:Ic.services,defaultValue:[]},title:{name:Ic.title}},superTypes:[]},Axis:{name:d5.$type,properties:{label:{name:d5.label},name:{name:d5.name}},superTypes:[]},Branch:{name:N5.$type,properties:{name:{name:N5.name},order:{name:N5.order}},superTypes:[Nm.$type]},Checkout:{name:Zke.$type,properties:{branch:{name:Zke.branch}},superTypes:[Nm.$type]},CherryPicking:{name:p5.$type,properties:{id:{name:p5.id},parent:{name:p5.parent},tags:{name:p5.tags,defaultValue:[]}},superTypes:[Nm.$type]},ClassDefStatement:{name:sO.$type,properties:{className:{name:sO.className},styleText:{name:sO.styleText}},superTypes:[]},Commit:{name:qm.$type,properties:{id:{name:qm.id},message:{name:qm.message},tags:{name:qm.tags,defaultValue:[]},type:{name:qm.type}},superTypes:[Nm.$type]},Common:{name:f5.$type,properties:{accDescr:{name:f5.accDescr},accTitle:{name:f5.accTitle},title:{name:f5.title}},superTypes:[]},Component:{name:Lf.$type,properties:{decorator:{name:Lf.decorator},evolution:{name:Lf.evolution},inertia:{name:Lf.inertia,defaultValue:!1},label:{name:Lf.label},name:{name:Lf.name},visibility:{name:Lf.visibility}},superTypes:[]},Curve:{name:g5.$type,properties:{entries:{name:g5.entries,defaultValue:[]},label:{name:g5.label},name:{name:g5.name}},superTypes:[]},Cynefin:{name:zf.$type,properties:{accDescr:{name:zf.accDescr},accTitle:{name:zf.accTitle},domains:{name:zf.domains,defaultValue:[]},title:{name:zf.title},transitions:{name:zf.transitions,defaultValue:[]}},superTypes:[]},Deaccelerator:{name:m5.$type,properties:{name:{name:m5.name},x:{name:m5.x},y:{name:m5.y}},superTypes:[]},Decorator:{name:Qke.$type,properties:{strategy:{name:Qke.strategy}},superTypes:[]},Direction:{name:Im.$type,properties:{accDescr:{name:Im.accDescr},accTitle:{name:Im.accTitle},dir:{name:Im.dir},statements:{name:Im.statements,defaultValue:[]},title:{name:Im.title}},superTypes:[qf.$type]},DomainBlock:{name:O5.$type,properties:{domain:{name:O5.domain},items:{name:O5.items,defaultValue:[]}},superTypes:[]},DomainItem:{name:iP.$type,properties:{label:{name:iP.label}},superTypes:[]},EbnfChoice:{name:Jke.$type,properties:{alternatives:{name:Jke.alternatives,defaultValue:[]}},superTypes:[]},EbnfExceptionPostfix:{name:e3e.$type,properties:{except:{name:e3e.except}},superTypes:[xb.$type]},EbnfGroup:{name:t3e.$type,properties:{element:{name:t3e.element}},superTypes:[$f.$type]},EbnfNonTerminal:{name:r3e.$type,properties:{name:{name:r3e.name}},superTypes:[$f.$type]},EbnfOneOrMorePostfix:{name:i3e.$type,properties:{operator:{name:i3e.operator}},superTypes:[xb.$type]},EbnfOptional:{name:n3e.$type,properties:{element:{name:n3e.element}},superTypes:[$f.$type]},EbnfOptionalPostfix:{name:a3e.$type,properties:{operator:{name:a3e.operator}},superTypes:[xb.$type]},EbnfPostfix:{name:xb.$type,properties:{},superTypes:[]},EbnfPrimary:{name:$f.$type,properties:{},superTypes:[]},EbnfRepetition:{name:s3e.$type,properties:{element:{name:s3e.element}},superTypes:[$f.$type]},EbnfRule:{name:oO.$type,properties:{definition:{name:oO.definition},name:{name:oO.name}},superTypes:[]},EbnfSequence:{name:o3e.$type,properties:{elements:{name:o3e.elements,defaultValue:[]}},superTypes:[]},EbnfSpecial:{name:l3e.$type,properties:{text:{name:l3e.text}},superTypes:[$f.$type]},EbnfTerm:{name:lO.$type,properties:{base:{name:lO.base},postfixes:{name:lO.postfixes,defaultValue:[]}},superTypes:[]},EbnfTerminal:{name:c3e.$type,properties:{value:{name:c3e.value}},superTypes:[$f.$type]},EbnfZeroOrMorePostfix:{name:h3e.$type,properties:{operator:{name:h3e.operator}},superTypes:[xb.$type]},Edge:{name:Lc.$type,properties:{lhsDir:{name:Lc.lhsDir},lhsGroup:{name:Lc.lhsGroup,defaultValue:!1},lhsId:{name:Lc.lhsId},lhsInto:{name:Lc.lhsInto,defaultValue:!1},rhsDir:{name:Lc.rhsDir},rhsGroup:{name:Lc.rhsGroup,defaultValue:!1},rhsId:{name:Lc.rhsId},rhsInto:{name:Lc.rhsInto,defaultValue:!1},title:{name:Lc.title}},superTypes:[]},EmDataEntity:{name:Dm.$type,properties:{dataBlockValue:{name:Dm.dataBlockValue},dataType:{name:Dm.dataType},name:{name:Dm.name}},superTypes:[]},EmFrame:{name:If.$type,properties:{},superTypes:[]},EmGwt:{name:Tb.$type,properties:{givenStatements:{name:Tb.givenStatements,defaultValue:[]},sourceFrame:{name:Tb.sourceFrame,referenceType:If.$type},thenStatements:{name:Tb.thenStatements,defaultValue:[]},whenStatements:{name:Tb.whenStatements,defaultValue:[]}},superTypes:[]},EmGwtStatement:{name:u3e.$type,properties:{entityIdentifier:{name:u3e.entityIdentifier,referenceType:cO.$type}},superTypes:[]},EmModelEntity:{name:cO.$type,properties:{name:{name:cO.name}},superTypes:[]},EmNoteEntity:{name:y5.$type,properties:{dataBlockValue:{name:y5.dataBlockValue},dataType:{name:y5.dataType},sourceFrame:{name:y5.sourceFrame,referenceType:If.$type}},superTypes:[]},EmResetFrame:{name:Gh.$type,properties:{dataInlineValue:{name:Gh.dataInlineValue},dataReference:{name:Gh.dataReference,referenceType:Dm.$type},dataType:{name:Gh.dataType},entityIdentifier:{name:Gh.entityIdentifier},modelEntityType:{name:Gh.modelEntityType},name:{name:Gh.name},sourceFrames:{name:Gh.sourceFrames,defaultValue:[],referenceType:If.$type}},superTypes:[If.$type]},EmTimeFrame:{name:Td.$type,properties:{dataInlineValue:{name:Td.dataInlineValue},dataReference:{name:Td.dataReference,referenceType:Dm.$type},dataType:{name:Td.dataType},entityIdentifier:{name:Td.entityIdentifier},modelEntityType:{name:Td.modelEntityType},name:{name:Td.name},sourceFrames:{name:Td.sourceFrames,defaultValue:[],referenceType:If.$type}},superTypes:[If.$type]},Entry:{name:hO.$type,properties:{axis:{name:hO.axis,referenceType:d5.$type},value:{name:hO.value}},superTypes:[]},EventModel:{name:Fh.$type,properties:{accDescr:{name:Fh.accDescr},accTitle:{name:Fh.accTitle},dataEntities:{name:Fh.dataEntities,defaultValue:[]},frames:{name:Fh.frames,defaultValue:[]},gwtEntities:{name:Fh.gwtEntities,defaultValue:[]},modelEntities:{name:Fh.modelEntities,defaultValue:[]},noteEntities:{name:Fh.noteEntities,defaultValue:[]},title:{name:Fh.title}},superTypes:[]},Evolution:{name:d3e.$type,properties:{stages:{name:d3e.stages,defaultValue:[]}},superTypes:[]},EvolutionStage:{name:v5.$type,properties:{boundary:{name:v5.boundary},name:{name:v5.name},secondName:{name:v5.secondName}},superTypes:[]},Evolve:{name:uO.$type,properties:{component:{name:uO.component},target:{name:uO.target}},superTypes:[]},GitGraph:{name:qf.$type,properties:{accDescr:{name:qf.accDescr},accTitle:{name:qf.accTitle},statements:{name:qf.statements,defaultValue:[]},title:{name:qf.title}},superTypes:[]},Group:{name:kb.$type,properties:{icon:{name:kb.icon},id:{name:kb.id},in:{name:kb.in},title:{name:kb.title}},superTypes:[]},Info:{name:Bb.$type,properties:{accDescr:{name:Bb.accDescr},accTitle:{name:Bb.accTitle},title:{name:Bb.title}},superTypes:[]},Item:{name:Cb.$type,properties:{classSelector:{name:Cb.classSelector},name:{name:Cb.name}},superTypes:[]},Junction:{name:dO.$type,properties:{id:{name:dO.id},in:{name:dO.in}},superTypes:[]},Label:{name:wb.$type,properties:{negX:{name:wb.negX,defaultValue:!1},negY:{name:wb.negY,defaultValue:!1},offsetX:{name:wb.offsetX},offsetY:{name:wb.offsetY}},superTypes:[]},Leaf:{name:b5.$type,properties:{classSelector:{name:b5.classSelector},name:{name:b5.name},value:{name:b5.value}},superTypes:[Cb.$type]},Link:{name:Df.$type,properties:{arrow:{name:Df.arrow},from:{name:Df.from},fromPort:{name:Df.fromPort},linkLabel:{name:Df.linkLabel},to:{name:Df.to},toPort:{name:Df.toPort}},superTypes:[]},Merge:{name:jm.$type,properties:{branch:{name:jm.branch},id:{name:jm.id},tags:{name:jm.tags,defaultValue:[]},type:{name:jm.type}},superTypes:[Nm.$type]},Note:{name:x5.$type,properties:{evolution:{name:x5.evolution},text:{name:x5.text},visibility:{name:x5.visibility}},superTypes:[]},Option:{name:pO.$type,properties:{name:{name:pO.name},value:{name:pO.value,defaultValue:!1}},superTypes:[]},Packet:{name:Gm.$type,properties:{accDescr:{name:Gm.accDescr},accTitle:{name:Gm.accTitle},blocks:{name:Gm.blocks,defaultValue:[]},title:{name:Gm.title}},superTypes:[]},PacketBlock:{name:Wm.$type,properties:{bits:{name:Wm.bits},end:{name:Wm.end},label:{name:Wm.label},start:{name:Wm.start}},superTypes:[]},PegAny:{name:p3e.$type,properties:{dot:{name:p3e.dot}},superTypes:[Eb.$type]},PegGroup:{name:f3e.$type,properties:{element:{name:f3e.element}},superTypes:[Eb.$type]},PegIdentifier:{name:g3e.$type,properties:{name:{name:g3e.name}},superTypes:[Eb.$type]},PegLiteral:{name:m3e.$type,properties:{value:{name:m3e.value}},superTypes:[Eb.$type]},PegOrderedChoice:{name:y3e.$type,properties:{alternatives:{name:y3e.alternatives,defaultValue:[]}},superTypes:[]},PegPrefix:{name:fO.$type,properties:{operator:{name:fO.operator},suffix:{name:fO.suffix}},superTypes:[]},PegPrimary:{name:Eb.$type,properties:{},superTypes:[]},PegRule:{name:gO.$type,properties:{definition:{name:gO.definition},name:{name:gO.name}},superTypes:[]},PegSequence:{name:v3e.$type,properties:{elements:{name:v3e.elements,defaultValue:[]}},superTypes:[]},PegSuffix:{name:mO.$type,properties:{operator:{name:mO.operator},primary:{name:mO.primary}},superTypes:[]},Pie:{name:jf.$type,properties:{accDescr:{name:jf.accDescr},accTitle:{name:jf.accTitle},sections:{name:jf.sections,defaultValue:[]},showData:{name:jf.showData,defaultValue:!1},title:{name:jf.title}},superTypes:[]},PieSection:{name:B5.$type,properties:{label:{name:B5.label},value:{name:B5.value}},superTypes:[]},Pipeline:{name:yO.$type,properties:{components:{name:yO.components,defaultValue:[]},parent:{name:yO.parent}},superTypes:[]},PipelineComponent:{name:T5.$type,properties:{evolution:{name:T5.evolution},label:{name:T5.label},name:{name:T5.name}},superTypes:[]},Radar:{name:Mf.$type,properties:{accDescr:{name:Mf.accDescr},accTitle:{name:Mf.accTitle},axes:{name:Mf.axes,defaultValue:[]},curves:{name:Mf.curves,defaultValue:[]},options:{name:Mf.options,defaultValue:[]},title:{name:Mf.title}},superTypes:[]},Railroad:{name:Um.$type,properties:{accDescr:{name:Um.accDescr},accTitle:{name:Um.accTitle},rules:{name:Um.rules,defaultValue:[]},title:{name:Um.title}},superTypes:[]},RailroadAbnf:{name:Vm.$type,properties:{accDescr:{name:Vm.accDescr},accTitle:{name:Vm.accTitle},rules:{name:Vm.rules,defaultValue:[]},title:{name:Vm.title}},superTypes:[]},RailroadChoiceExpr:{name:b3e.$type,properties:{alternatives:{name:b3e.alternatives,defaultValue:[]}},superTypes:[zh.$type]},RailroadEbnf:{name:Ym.$type,properties:{accDescr:{name:Ym.accDescr},accTitle:{name:Ym.accTitle},rules:{name:Ym.rules,defaultValue:[]},title:{name:Ym.title}},superTypes:[]},RailroadExpression:{name:zh.$type,properties:{},superTypes:[]},RailroadNonTerminalExpr:{name:x3e.$type,properties:{name:{name:x3e.name}},superTypes:[zh.$type]},RailroadOneOrMoreExpr:{name:T3e.$type,properties:{element:{name:T3e.element}},superTypes:[zh.$type]},RailroadOptionalExpr:{name:k3e.$type,properties:{element:{name:k3e.element}},superTypes:[zh.$type]},RailroadPeg:{name:Hm.$type,properties:{accDescr:{name:Hm.accDescr},accTitle:{name:Hm.accTitle},rules:{name:Hm.rules,defaultValue:[]},title:{name:Hm.title}},superTypes:[]},RailroadRule:{name:vO.$type,properties:{definition:{name:vO.definition},name:{name:vO.name}},superTypes:[]},RailroadSequenceExpr:{name:C3e.$type,properties:{elements:{name:C3e.elements,defaultValue:[]}},superTypes:[zh.$type]},RailroadSpecialExpr:{name:w3e.$type,properties:{text:{name:w3e.text}},superTypes:[zh.$type]},RailroadTerminalExpr:{name:E3e.$type,properties:{value:{name:E3e.value}},superTypes:[zh.$type]},RailroadZeroOrMoreExpr:{name:S3e.$type,properties:{element:{name:S3e.element}},superTypes:[zh.$type]},Section:{name:bO.$type,properties:{classSelector:{name:bO.classSelector},name:{name:bO.name}},superTypes:[Cb.$type]},Service:{name:Mm.$type,properties:{icon:{name:Mm.icon},iconText:{name:Mm.iconText},id:{name:Mm.id},in:{name:Mm.in},title:{name:Mm.title}},superTypes:[]},Size:{name:xO.$type,properties:{height:{name:xO.height},width:{name:xO.width}},superTypes:[]},Statement:{name:Nm.$type,properties:{},superTypes:[]},Transition:{name:Pb.$type,properties:{from:{name:Pb.from},label:{name:Pb.label},to:{name:Pb.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:Sb.$type,properties:{accDescr:{name:Sb.accDescr},accTitle:{name:Sb.accTitle},nodes:{name:Sb.nodes,defaultValue:[]},title:{name:Sb.title}},superTypes:[]},Treemap:{name:Xm.$type,properties:{accDescr:{name:Xm.accDescr},accTitle:{name:Xm.accTitle},title:{name:Xm.title},TreemapRows:{name:Xm.TreemapRows,defaultValue:[]}},superTypes:[]},TreemapRow:{name:TO.$type,properties:{indent:{name:TO.indent},item:{name:TO.item}},superTypes:[]},Wardley:{name:ma.$type,properties:{accDescr:{name:ma.accDescr},accelerators:{name:ma.accelerators,defaultValue:[]},accTitle:{name:ma.accTitle},anchors:{name:ma.anchors,defaultValue:[]},annotation:{name:ma.annotation,defaultValue:[]},annotations:{name:ma.annotations,defaultValue:[]},components:{name:ma.components,defaultValue:[]},deaccelerators:{name:ma.deaccelerators,defaultValue:[]},evolution:{name:ma.evolution},evolves:{name:ma.evolves,defaultValue:[]},links:{name:ma.links,defaultValue:[]},notes:{name:ma.notes,defaultValue:[]},pipelines:{name:ma.pipelines,defaultValue:[]},size:{name:ma.size},title:{name:ma.title}},superTypes:[]}}}static{S(this,"MermaidAstReflection")}},kn=new $5e,_ct=S(()=>_3e??(_3e=Un(`{"$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"),Act=S(()=>A3e??(A3e=Un(`{"$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"),Rct=S(()=>R3e??(R3e=Un('{"$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"),Lct=S(()=>L3e??(L3e=Un(`{"$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"),$ct=S(()=>$3e??($3e=Un(`{"$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"),Ict=S(()=>I3e??(I3e=Un(`{"$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"),Dct=S(()=>D3e??(D3e=Un(`{"$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"),Mct=S(()=>M3e??(M3e=Un(`{"$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"),Nct=S(()=>N3e??(N3e=Un('{"$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"),Oct=S(()=>O3e??(O3e=Un(`{"$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"),Bct=S(()=>B3e??(B3e=Un(`{"$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"),Pct=S(()=>P3e??(P3e=Un(`{"$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"),Fct=S(()=>F3e??(F3e=Un(`{"$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"),zct=S(()=>z3e??(z3e=Un(`{"$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"),qct=S(()=>q3e??(q3e=Un(`{"$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"),jct={languageId:"architecture",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},Gct={languageId:"cynefin",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},Wct={languageId:"eventmodeling",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},Uct={languageId:"gitGraph",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},Vct={languageId:"info",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},Yct={languageId:"packet",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},Hct={languageId:"pie",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},Xct={languageId:"radar",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},Kct={languageId:"railroadAbnf",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},Zct={languageId:"railroadEbnf",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},Qct={languageId:"railroad",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},Jct={languageId:"railroadPeg",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},eht={languageId:"treemap",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},tht={languageId:"treeView",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},rht={languageId:"wardley",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},bi={AstReflection:S(()=>new $5e,"AstReflection")},I5e={Grammar:S(()=>_ct(),"Grammar"),LanguageMetaData:S(()=>jct,"LanguageMetaData"),parser:{}},D5e={Grammar:S(()=>Act(),"Grammar"),LanguageMetaData:S(()=>Gct,"LanguageMetaData"),parser:{}},M5e={Grammar:S(()=>Rct(),"Grammar"),LanguageMetaData:S(()=>Wct,"LanguageMetaData"),parser:{}},N5e={Grammar:S(()=>Lct(),"Grammar"),LanguageMetaData:S(()=>Uct,"LanguageMetaData"),parser:{}},O5e={Grammar:S(()=>$ct(),"Grammar"),LanguageMetaData:S(()=>Vct,"LanguageMetaData"),parser:{}},B5e={Grammar:S(()=>Ict(),"Grammar"),LanguageMetaData:S(()=>Yct,"LanguageMetaData"),parser:{}},P5e={Grammar:S(()=>Dct(),"Grammar"),LanguageMetaData:S(()=>Hct,"LanguageMetaData"),parser:{}},F5e={Grammar:S(()=>Mct(),"Grammar"),LanguageMetaData:S(()=>Xct,"LanguageMetaData"),parser:{}},z5e={Grammar:S(()=>Nct(),"Grammar"),LanguageMetaData:S(()=>Kct,"LanguageMetaData"),parser:{}},q5e={Grammar:S(()=>Oct(),"Grammar"),LanguageMetaData:S(()=>Zct,"LanguageMetaData"),parser:{}},j5e={Grammar:S(()=>Bct(),"Grammar"),LanguageMetaData:S(()=>Qct,"LanguageMetaData"),parser:{}},G5e={Grammar:S(()=>Pct(),"Grammar"),LanguageMetaData:S(()=>Jct,"LanguageMetaData"),parser:{}},W5e={Grammar:S(()=>Fct(),"Grammar"),LanguageMetaData:S(()=>eht,"LanguageMetaData"),parser:{}},U5e={Grammar:S(()=>zct(),"Grammar"),LanguageMetaData:S(()=>tht,"LanguageMetaData"),parser:{}},V5e={Grammar:S(()=>qct(),"Grammar"),LanguageMetaData:S(()=>rht,"LanguageMetaData"),parser:{}},iht=/accDescr(?:[\t ]*:([^\n\r]*)|\s*{([^}]*)})/,nht=/accTitle[\t ]*:([^\n\r]*)/,aht=/title([\t ][^\n\r]*|)/,sht={ACC_DESCR:iht,ACC_TITLE:nht,TITLE:aht},Vn=class extends vY{static{o(this,"AbstractMermaidValueConverter")}static{S(this,"AbstractMermaidValueConverter")}runConverter(e,t,r){let i=this.runCommonConverter(e,t,r);return i===void 0&&(i=this.runCustomConverter(e,t,r)),i===void 0?super.runConverter(e,t,r):i}runCommonConverter(e,t,r){let i=sht[e.name];if(i===void 0)return;let n=i.exec(t);if(n!==null){if(n[1]!==void 0)return n[1].trim().replace(/[\t ]{2,}/gm," ");if(n[2]!==void 0)return n[2].replace(/^\s*/gm,"").replace(/\s+$/gm,"").replace(/[\t ]{2,}/gm," ").replace(/[\n\r]{2,}/gm,` +`)}}},il=class extends Vn{static{o(this,"CommonValueConverter")}static{S(this,"CommonValueConverter")}runCustomConverter(e,t,r){}},Ti=class extends M6{static{o(this,"AbstractMermaidTokenBuilder")}static{S(this,"AbstractMermaidTokenBuilder")}constructor(e){super(),this.keywords=new Set(e)}buildKeywordTokens(e,t,r){let i=super.buildKeywordTokens(e,t,r);return i.forEach(n=>{this.keywords.has(n.name)&&n.PATTERN!==void 0&&(n.PATTERN=new RegExp(n.PATTERN.toString()+"(?:(?=%%)|(?!\\S))"))}),i}},oSt=class extends Ti{static{o(this,"CommonTokenBuilder")}static{S(this,"CommonTokenBuilder")}};});function e_(e=ci){let t=vr(ei(e),bi),r=vr(Jr({shared:t}),O5e,OY);return t.ServiceRegistry.register(r),{shared:t,Info:r}}var oht,OY,xa=Tt(()=>{Rr();vt();oht=class extends Ti{static{o(this,"InfoTokenBuilder")}static{S(this,"InfoTokenBuilder")}constructor(){super(["info","showInfo"])}},OY={parser:{TokenBuilder:S(()=>new oht,"TokenBuilder"),ValueConverter:S(()=>new il,"ValueConverter")}};o(e_,"createInfoServices");S(e_,"createInfoServices")});var Y5e={};Kt(Y5e,{InfoModule:()=>OY,createInfoServices:()=>e_});var H5e=Tt(()=>{xa();Rr();vt()});function t_(e=ci){let t=vr(ei(e),bi),r=vr(Jr({shared:t}),B5e,BY);return t.ServiceRegistry.register(r),{shared:t,Packet:r}}var lht,BY,Ta=Tt(()=>{Rr();vt();lht=class extends Ti{static{o(this,"PacketTokenBuilder")}static{S(this,"PacketTokenBuilder")}constructor(){super(["packet"])}},BY={parser:{TokenBuilder:S(()=>new lht,"TokenBuilder"),ValueConverter:S(()=>new il,"ValueConverter")}};o(t_,"createPacketServices");S(t_,"createPacketServices")});var X5e={};Kt(X5e,{PacketModule:()=>BY,createPacketServices:()=>t_});var K5e=Tt(()=>{Ta();Rr();vt()});function r_(e=ci){let t=vr(ei(e),bi),r=vr(Jr({shared:t}),P5e,PY);return t.ServiceRegistry.register(r),{shared:t,Pie:r}}var cht,hht,PY,ka=Tt(()=>{Rr();vt();cht=class extends Ti{static{o(this,"PieTokenBuilder")}static{S(this,"PieTokenBuilder")}constructor(){super(["pie","showData"])}},hht=class extends Vn{static{o(this,"PieValueConverter")}static{S(this,"PieValueConverter")}runCustomConverter(e,t,r){if(e.name==="PIE_SECTION_LABEL")return t.replace(/"/g,"").trim()}},PY={parser:{TokenBuilder:S(()=>new cht,"TokenBuilder"),ValueConverter:S(()=>new hht,"ValueConverter")}};o(r_,"createPieServices");S(r_,"createPieServices")});var Z5e={};Kt(Z5e,{PieModule:()=>PY,createPieServices:()=>r_});var Q5e=Tt(()=>{ka();Rr();vt()});function i_(e=ci){let t=vr(ei(e),bi),r=vr(Jr({shared:t}),U5e,FY);return t.ServiceRegistry.register(r),{shared:t,TreeView:r}}var uht,dht,FY,Ca=Tt(()=>{Rr();vt();uht=class extends Vn{static{o(this,"TreeViewValueConverter")}static{S(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 i=t.trim();return i.substring(5,i.length-1)}if(e.name==="DESC_ANNOTATION")return t.trim().substring(2).trim()}},dht=class extends Ti{static{o(this,"TreeViewTokenBuilder")}static{S(this,"TreeViewTokenBuilder")}constructor(){super(["treeView-beta"])}},FY={parser:{TokenBuilder:S(()=>new dht,"TokenBuilder"),ValueConverter:S(()=>new uht,"ValueConverter")}};o(i_,"createTreeViewServices");S(i_,"createTreeViewServices")});var J5e={};Kt(J5e,{TreeViewModule:()=>FY,createTreeViewServices:()=>i_});var eEe=Tt(()=>{Ca();Rr();vt()});function n_(e=ci){let t=vr(ei(e),bi),r=vr(Jr({shared:t}),I5e,zY);return t.ServiceRegistry.register(r),{shared:t,Architecture:r}}var pht,fht,zY,wa=Tt(()=>{Rr();vt();pht=class extends Ti{static{o(this,"ArchitectureTokenBuilder")}static{S(this,"ArchitectureTokenBuilder")}constructor(){super(["architecture"])}},fht=class extends Vn{static{o(this,"ArchitectureValueConverter")}static{S(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 i=t.replace(/^\[|]$/g,"").trim();return(i.startsWith('"')&&i.endsWith('"')||i.startsWith("'")&&i.endsWith("'"))&&(i=i.slice(1,-1),i=i.replace(/\\"/g,'"').replace(/\\'/g,"'")),i.trim()}}},zY={parser:{TokenBuilder:S(()=>new pht,"TokenBuilder"),ValueConverter:S(()=>new fht,"ValueConverter")}};o(n_,"createArchitectureServices");S(n_,"createArchitectureServices")});var tEe={};Kt(tEe,{ArchitectureModule:()=>zY,createArchitectureServices:()=>n_});var rEe=Tt(()=>{wa();Rr();vt()});function a_(e=ci){let t=vr(ei(e),bi),r=vr(Jr({shared:t}),N5e,qY);return t.ServiceRegistry.register(r),{shared:t,GitGraph:r}}var ght,qY,Ea=Tt(()=>{Rr();vt();ght=class extends Ti{static{o(this,"GitGraphTokenBuilder")}static{S(this,"GitGraphTokenBuilder")}constructor(){super(["gitGraph"])}},qY={parser:{TokenBuilder:S(()=>new ght,"TokenBuilder"),ValueConverter:S(()=>new il,"ValueConverter")}};o(a_,"createGitGraphServices");S(a_,"createGitGraphServices")});var iEe={};Kt(iEe,{GitGraphModule:()=>qY,createGitGraphServices:()=>a_});var nEe=Tt(()=>{Ea();Rr();vt()});function GY(e){let t=e.validation.EventModelingValidator,r=e.validation.ValidationRegistry;if(r){let i={EmTimeFrame:t.checkSourceFrameTypes.bind(t),EmResetFrame:t.checkSourceFrameTypes.bind(t)};r.register(i,t)}}function s_(e=ci){let t=vr(ei(e),bi),r=vr(Jr({shared:t}),M5e,WY);return t.ServiceRegistry.register(r),GY(r),{shared:t,EventModel:r}}var mht,aEe,sEe,jY,oEe,lEe,yht,WY,Sa=Tt(()=>{Rr();vt();mht=class extends Ti{static{o(this,"EventModelingTokenBuilder")}static{S(this,"EventModelingTokenBuilder")}constructor(){super(["eventmodeling"])}},aEe=new Set(["cmd","command"]),sEe=new Set(["evt","event"]),jY=new Set(["rmo","readmodel"]),oEe=new Set(["pcr","processor"]),lEe=new Set(["ui"]);o(GY,"registerValidationChecks");S(GY,"registerValidationChecks");yht=class{static{o(this,"EventModelingValidator")}static{S(this,"EventModelingValidator")}checkSourceFrameTypes(e,t){e.sourceFrames.length!==0&&(aEe.has(e.modelEntityType)?this.validateSources(e,new Set([...lEe,...oEe]),"command","ui or processor",t):sEe.has(e.modelEntityType)?this.validateSources(e,aEe,"event","command",t):jY.has(e.modelEntityType)?this.validateSources(e,sEe,"read model","event",t):oEe.has(e.modelEntityType)?this.validateSources(e,jY,"processor","read model",t):lEe.has(e.modelEntityType)&&this.validateSources(e,jY,"ui","read model",t))}validateSources(e,t,r,i,n){for(let a of e.sourceFrames){let s=a.ref;s!==void 0&&!t.has(s.modelEntityType)&&n("error",`A ${r} can only receive input from a ${i}, not from '${s.modelEntityType}'.`,{node:e,property:"sourceFrames"})}}},WY={parser:{TokenBuilder:S(()=>new mht,"TokenBuilder"),ValueConverter:S(()=>new il,"ValueConverter")},validation:{EventModelingValidator:S(()=>new yht,"EventModelingValidator")}};o(s_,"createEventModelingServices");S(s_,"createEventModelingServices")});var cEe={};Kt(cEe,{EventModelingModule:()=>WY,createEventModelingServices:()=>s_});var hEe=Tt(()=>{Sa();Rr();vt()});function o_(e=ci){let t=vr(ei(e),bi),r=vr(Jr({shared:t}),F5e,UY);return t.ServiceRegistry.register(r),{shared:t,Radar:r}}var vht,UY,_a=Tt(()=>{Rr();vt();vht=class extends Ti{static{o(this,"RadarTokenBuilder")}static{S(this,"RadarTokenBuilder")}constructor(){super(["radar-beta"])}},UY={parser:{TokenBuilder:S(()=>new vht,"TokenBuilder"),ValueConverter:S(()=>new il,"ValueConverter")}};o(o_,"createRadarServices");S(o_,"createRadarServices")});var uEe={};Kt(uEe,{RadarModule:()=>UY,createRadarServices:()=>o_});var dEe=Tt(()=>{_a();Rr();vt()});function j1(e=ci){let t=vr(ei(e),bi),r=vr(Jr({shared:t}),j5e,VY);return t.ServiceRegistry.register(r),{shared:t,Railroad:r}}var bht,pEe,xht,VY,Aa=Tt(()=>{Rr();vt();bht=class extends Ti{static{o(this,"RailroadTokenBuilder")}static{S(this,"RailroadTokenBuilder")}constructor(){super(["railroad-beta"])}},pEe=S(e=>{let t=e.slice(1,-1),r="";for(let i=0;inew bht,"TokenBuilder"),ValueConverter:S(()=>new xht,"ValueConverter")}};o(j1,"createRailroadServices");S(j1,"createRailroadServices")});var fEe={};Kt(fEe,{RailroadModule:()=>VY,createRailroadServices:()=>j1});var gEe=Tt(()=>{Aa();Rr();vt()});function G1(e=ci){let t=vr(ei(e),bi),r=vr(Jr({shared:t}),q5e,YY);return t.ServiceRegistry.register(r),{shared:t,RailroadEbnf:r}}var Tht,mEe,kht,YY,Ra=Tt(()=>{Rr();vt();Tht=class extends Ti{static{o(this,"RailroadEbnfTokenBuilder")}static{S(this,"RailroadEbnfTokenBuilder")}constructor(){super(["railroad-ebnf-beta"])}},mEe=S(e=>{let t=e.slice(1,-1),r="";for(let i=0;inew Tht,"TokenBuilder"),ValueConverter:S(()=>new kht,"ValueConverter")}};o(G1,"createRailroadEbnfServices");S(G1,"createRailroadEbnfServices")});var yEe={};Kt(yEe,{RailroadEbnfModule:()=>YY,createRailroadEbnfServices:()=>G1});var vEe=Tt(()=>{Ra();Rr();vt()});function W1(e=ci){let t=vr(ei(e),bi),r=vr(Jr({shared:t}),z5e,HY);return t.ServiceRegistry.register(r),{shared:t,RailroadAbnf:r}}var Cht,wht,HY,La=Tt(()=>{Rr();vt();Cht=class extends Ti{static{o(this,"RailroadAbnfTokenBuilder")}static{S(this,"RailroadAbnfTokenBuilder")}constructor(){super(["railroad-abnf-beta"])}},wht=class extends Vn{static{o(this,"RailroadAbnfValueConverter")}static{S(this,"RailroadAbnfValueConverter")}runConverter(e,t,r){let i=super.runConverter(e,t,r);if(e.name==="TITLE"&&typeof i=="string"){let n=i.trim();if(n.startsWith('"')&&n.endsWith('"')||n.startsWith("'")&&n.endsWith("'"))return n.slice(1,-1)}return i}runCustomConverter(e,t,r){if(e.name==="ABNF_STRING")return t.slice(1,-1)}},HY={parser:{TokenBuilder:S(()=>new Cht,"TokenBuilder"),ValueConverter:S(()=>new wht,"ValueConverter")}};o(W1,"createRailroadAbnfServices");S(W1,"createRailroadAbnfServices")});var bEe={};Kt(bEe,{RailroadAbnfModule:()=>HY,createRailroadAbnfServices:()=>W1});var xEe=Tt(()=>{La();Rr();vt()});function U1(e=ci){let t=vr(ei(e),bi),r=vr(Jr({shared:t}),G5e,XY);return t.ServiceRegistry.register(r),{shared:t,RailroadPeg:r}}var Eht,TEe,Sht,XY,$a=Tt(()=>{Rr();vt();Eht=class extends Ti{static{o(this,"RailroadPegTokenBuilder")}static{S(this,"RailroadPegTokenBuilder")}constructor(){super(["railroad-peg-beta"])}},TEe=S(e=>{let t=e.slice(1,-1),r="";for(let i=0;inew Eht,"TokenBuilder"),ValueConverter:S(()=>new Sht,"ValueConverter")}};o(U1,"createRailroadPegServices");S(U1,"createRailroadPegServices")});var kEe={};Kt(kEe,{RailroadPegModule:()=>XY,createRailroadPegServices:()=>U1});var CEe=Tt(()=>{$a();Rr();vt()});function KY(e){let t=e.validation.TreemapValidator,r=e.validation.ValidationRegistry;if(r){let i={Treemap:t.checkSingleRoot.bind(t)};r.register(i,t)}}function l_(e=ci){let t=vr(ei(e),bi),r=vr(Jr({shared:t}),W5e,ZY);return t.ServiceRegistry.register(r),KY(r),{shared:t,Treemap:r}}var _ht,Aht,Rht,Lht,ZY,Ia=Tt(()=>{Rr();vt();_ht=class extends Ti{static{o(this,"TreemapTokenBuilder")}static{S(this,"TreemapTokenBuilder")}constructor(){super(["treemap"])}},Aht=/classDef\s+([A-Z_a-z]\w+)(?:\s+([^\n\r;]*))?;?/,Rht=class extends Vn{static{o(this,"TreemapValueConverter")}static{S(this,"TreemapValueConverter")}runCustomConverter(e,t,r){if(e.name==="NUMBER2")return parseFloat(t.replace(/,/g,""));if(e.name==="SEPARATOR"||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 i=Aht.exec(t);if(i)return{$type:"ClassDefStatement",className:i[1],styleText:i[2]||void 0}}}};o(KY,"registerValidationChecks");S(KY,"registerValidationChecks");Lht=class{static{o(this,"TreemapValidator")}static{S(this,"TreemapValidator")}checkSingleRoot(e,t){let r;for(let i of e.TreemapRows)i.item&&(r===void 0&&i.indent===void 0?r=0:i.indent===void 0?t("error","Multiple root nodes are not allowed in a treemap.",{node:i,property:"item"}):r!==void 0&&r>=parseInt(i.indent,10)&&t("error","Multiple root nodes are not allowed in a treemap.",{node:i,property:"item"}))}},ZY={parser:{TokenBuilder:S(()=>new _ht,"TokenBuilder"),ValueConverter:S(()=>new Rht,"ValueConverter")},validation:{TreemapValidator:S(()=>new Lht,"TreemapValidator")}};o(l_,"createTreemapServices");S(l_,"createTreemapServices")});var wEe={};Kt(wEe,{TreemapModule:()=>ZY,createTreemapServices:()=>l_});var EEe=Tt(()=>{Ia();Rr();vt()});function c_(e=ci){let t=vr(ei(e),bi),r=vr(Jr({shared:t}),V5e,QY);return t.ServiceRegistry.register(r),{shared:t,Wardley:r}}var $ht,QY,Da=Tt(()=>{Rr();vt();$ht=class extends Vn{static{o(this,"WardleyValueConverter")}static{S(this,"WardleyValueConverter")}runCustomConverter(e,t,r){if(e.name.toUpperCase()==="LINK_LABEL")return t.substring(1).trim()}},QY={parser:{ValueConverter:S(()=>new $ht,"ValueConverter")}};o(c_,"createWardleyServices");S(c_,"createWardleyServices")});var SEe={};Kt(SEe,{WardleyModule:()=>QY,createWardleyServices:()=>c_});var _Ee=Tt(()=>{Da();Rr();vt()});function h_(e=ci){let t=vr(ei(e),bi),r=vr(Jr({shared:t}),D5e,JY);return t.ServiceRegistry.register(r),{shared:t,Cynefin:r}}var Iht,JY,Ma=Tt(()=>{Rr();vt();Iht=class extends Ti{static{o(this,"CynefinTokenBuilder")}static{S(this,"CynefinTokenBuilder")}constructor(){super(["cynefin-beta"])}},JY={parser:{TokenBuilder:S(()=>new Iht,"TokenBuilder"),ValueConverter:S(()=>new il,"ValueConverter")}};o(h_,"createCynefinServices");S(h_,"createCynefinServices")});var AEe={};Kt(AEe,{CynefinModule:()=>JY,createCynefinServices:()=>h_});var REe=Tt(()=>{Ma();Rr();vt()});async function Vi(e,t){let r=Dht[e];if(!r)throw new Error(`Unknown diagram type: ${e}`);Na[e]||await r();let i=Na[e].parse(t);if(i.lexerErrors.length>0||i.parserErrors.length>0)throw new nu(i);return i.value}var Na,Dht,nu,es=Tt(()=>{Rr();vt();Na={},Dht={info:S(async()=>{let{createInfoServices:e}=await Promise.resolve().then(()=>(H5e(),Y5e)),t=e().Info.parser.LangiumParser;Na.info=t},"info"),packet:S(async()=>{let{createPacketServices:e}=await Promise.resolve().then(()=>(K5e(),X5e)),t=e().Packet.parser.LangiumParser;Na.packet=t},"packet"),pie:S(async()=>{let{createPieServices:e}=await Promise.resolve().then(()=>(Q5e(),Z5e)),t=e().Pie.parser.LangiumParser;Na.pie=t},"pie"),treeView:S(async()=>{let{createTreeViewServices:e}=await Promise.resolve().then(()=>(eEe(),J5e)),t=e().TreeView.parser.LangiumParser;Na.treeView=t},"treeView"),architecture:S(async()=>{let{createArchitectureServices:e}=await Promise.resolve().then(()=>(rEe(),tEe)),t=e().Architecture.parser.LangiumParser;Na.architecture=t},"architecture"),gitGraph:S(async()=>{let{createGitGraphServices:e}=await Promise.resolve().then(()=>(nEe(),iEe)),t=e().GitGraph.parser.LangiumParser;Na.gitGraph=t},"gitGraph"),eventmodeling:S(async()=>{let{createEventModelingServices:e}=await Promise.resolve().then(()=>(hEe(),cEe)),t=e().EventModel.parser.LangiumParser;Na.eventmodeling=t},"eventmodeling"),radar:S(async()=>{let{createRadarServices:e}=await Promise.resolve().then(()=>(dEe(),uEe)),t=e().Radar.parser.LangiumParser;Na.radar=t},"radar"),railroad:S(async()=>{let{createRailroadServices:e}=await Promise.resolve().then(()=>(gEe(),fEe)),t=e().Railroad.parser.LangiumParser;Na.railroad=t},"railroad"),railroadEbnf:S(async()=>{let{createRailroadEbnfServices:e}=await Promise.resolve().then(()=>(vEe(),yEe)),t=e().RailroadEbnf.parser.LangiumParser;Na.railroadEbnf=t},"railroadEbnf"),railroadAbnf:S(async()=>{let{createRailroadAbnfServices:e}=await Promise.resolve().then(()=>(xEe(),bEe)),t=e().RailroadAbnf.parser.LangiumParser;Na.railroadAbnf=t},"railroadAbnf"),railroadPeg:S(async()=>{let{createRailroadPegServices:e}=await Promise.resolve().then(()=>(CEe(),kEe)),t=e().RailroadPeg.parser.LangiumParser;Na.railroadPeg=t},"railroadPeg"),treemap:S(async()=>{let{createTreemapServices:e}=await Promise.resolve().then(()=>(EEe(),wEe)),t=e().Treemap.parser.LangiumParser;Na.treemap=t},"treemap"),wardley:S(async()=>{let{createWardleyServices:e}=await Promise.resolve().then(()=>(_Ee(),SEe)),t=e().Wardley.parser.LangiumParser;Na.wardley=t},"wardley"),cynefin:S(async()=>{let{createCynefinServices:e}=await Promise.resolve().then(()=>(REe(),AEe)),t=e().Cynefin.parser.LangiumParser;Na.cynefin=t},"cynefin")};o(Vi,"parse");S(Vi,"parse");nu=class extends Error{static{o(this,"MermaidParseError")}constructor(e){let t=e.lexerErrors.map(i=>{let n=i.line!==void 0&&!isNaN(i.line)?i.line:"?",a=i.column!==void 0&&!isNaN(i.column)?i.column:"?";return`Lexer error on line ${n}, column ${a}: ${i.message}`}).join(` +`),r=e.parserErrors.map(i=>{let n=i.token.startLine!==void 0&&!isNaN(i.token.startLine)?i.token.startLine:"?",a=i.token.startColumn!==void 0&&!isNaN(i.token.startColumn)?i.token.startColumn:"?";return`Parse error on line ${n}, column ${a}: ${i.message}`}).join(` +`);super(`Parsing failed: ${t} ${r}`),this.result=e}static{S(this,"MermaidParseError")}}});var FEe={};Kt(FEe,{diagram:()=>Mut});function p_(){return XL({length:7})}function $Ee(e,t){let r=Object.create(null);return e.reduce((i,n)=>{let a=t(n);return r[a]||(r[a]=!0,i.push(n)),i},[])}function eH(e,t,r){let i=e.indexOf(t);i===-1?e.push(r):e.splice(i,1,r)}function rH(e){let t=e.reduce((n,a)=>n.seq>a.seq?n:a,e[0]),r="";e.forEach(function(n){n===t?r+=" *":r+=" |"});let i=[r,t.id,t.seq];for(let n in Mt.records.branches)Mt.records.branches.get(n)===t.id&&i.push(n);if(ee.debug(i.join(" ")),t.parents&&t.parents.length==2&&t.parents[0]&&t.parents[1]){let n=Mt.records.commits.get(t.parents[0]);eH(e,t,n),t.parents[1]&&e.push(Mt.records.commits.get(t.parents[1]))}else{if(t.parents.length==0)return;if(t.parents[0]){let n=Mt.records.commits.get(t.parents[0]);eH(e,t,n)}}e=$Ee(e,n=>n.id),rH(e)}var wi,Mht,_g,Mt,Nht,Oht,Bht,Pht,Fht,zht,qht,IEe,jht,Ght,Wht,Uht,Vht,DEe,Yht,Hht,Xht,MEe,Kht,Zht,Qht,Jht,eut,tut,rut,iut,tp,rp,Kc,au,Eg,f_,tH,iH,nut,Sg,Zs,Qs,u_,uT,d_,su,jr,aut,NEe,OEe,sut,out,lut,cut,hut,uut,dut,put,fut,gut,mut,yut,LEe,vut,dT,but,xut,Tut,kut,Cut,wut,BEe,PEe,Eut,Sut,_ut,Aut,Rut,Lut,$ut,Iut,Dut,Mut,zEe=Tt(()=>{i5();bs();es();Ma();Sa();_a();Aa();Ra();La();$a();Ia();Da();xa();Ta();ka();Ca();wa();Ea();Rr();Or();Yr();tr();Zt();vt();wi={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},Mht=rr.gitGraph,_g=o(()=>zr({...Mht,...Rt().gitGraph}),"getConfig"),Mt=new Lm(()=>{let e=_g(),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:{}}});o(p_,"getID");o($Ee,"uniqBy");Nht=o(function(e){Mt.records.direction=e},"setDirection"),Oht=o(function(e){ee.debug("options str",e),e=e?.trim(),e=e||"{}";try{Mt.records.options=JSON.parse(e)}catch(t){ee.error("error while parsing gitGraph options",t.message)}},"setOptions"),Bht=o(function(){return Mt.records.options},"getOptions"),Pht=o(function(e){let t=e.msg,r=e.id,i=e.type,n=e.tags;ee.info("commit",t,r,i,n),ee.debug("Entering commit:",t,r,i,n);let a=_g();r=ft.sanitizeText(r,a),t=ft.sanitizeText(t,a),n=n?.map(l=>ft.sanitizeText(l,a));let s={id:r||Mt.records.seq+"-"+p_(),message:t,seq:Mt.records.seq++,type:i??wi.NORMAL,tags:n??[],parents:Mt.records.head==null?[]:[Mt.records.head.id],branch:Mt.records.currBranch};Mt.records.head=s,ee.info("main branch",a.mainBranchName),Mt.records.commits.has(s.id)&&ee.warn(`Commit ID ${s.id} already exists`),Mt.records.commits.set(s.id,s),Mt.records.branches.set(Mt.records.currBranch,s.id),ee.debug("in pushCommit "+s.id)},"commit"),Fht=o(function(e){let t=e.name,r=e.order;if(t=ft.sanitizeText(t,_g()),Mt.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}")`);Mt.records.branches.set(t,Mt.records.head!=null?Mt.records.head.id:null),Mt.records.branchConfig.set(t,{name:t,order:r}),IEe(t),ee.debug("in createBranch")},"branch"),zht=o(e=>{let t=e.branch,r=e.id,i=e.type,n=e.tags,a=_g();t=ft.sanitizeText(t,a),r&&(r=ft.sanitizeText(r,a));let s=Mt.records.branches.get(Mt.records.currBranch),l=Mt.records.branches.get(t),h=s?Mt.records.commits.get(s):void 0,u=l?Mt.records.commits.get(l):void 0;if(h&&u&&h.branch===t)throw new Error(`Cannot merge branch '${t}' into itself.`);if(Mt.records.currBranch===t){let f=new Error('Incorrect usage of "merge". Cannot merge a branch to itself');throw f.hash={text:`merge ${t}`,token:`merge ${t}`,expected:["branch abc"]},f}if(h===void 0||!h){let f=new Error(`Incorrect usage of "merge". Current branch (${Mt.records.currBranch})has no commits`);throw f.hash={text:`merge ${t}`,token:`merge ${t}`,expected:["commit"]},f}if(!Mt.records.branches.has(t)){let f=new Error('Incorrect usage of "merge". Branch to be merged ('+t+") does not exist");throw f.hash={text:`merge ${t}`,token:`merge ${t}`,expected:[`branch ${t}`]},f}if(u===void 0||!u){let f=new Error('Incorrect usage of "merge". Branch to be merged ('+t+") has no commits");throw f.hash={text:`merge ${t}`,token:`merge ${t}`,expected:['"commit"']},f}if(h===u){let f=new Error('Incorrect usage of "merge". Both branches have same head');throw f.hash={text:`merge ${t}`,token:`merge ${t}`,expected:["branch abc"]},f}if(r&&Mt.records.commits.has(r)){let f=new Error('Incorrect usage of "merge". Commit with id:'+r+" already exists, use different custom id");throw f.hash={text:`merge ${t} ${r} ${i} ${n?.join(" ")}`,token:`merge ${t} ${r} ${i} ${n?.join(" ")}`,expected:[`merge ${t} ${r}_UNIQUE ${i} ${n?.join(" ")}`]},f}let d=l||"",p={id:r||`${Mt.records.seq}-${p_()}`,message:`merged branch ${t} into ${Mt.records.currBranch}`,seq:Mt.records.seq++,parents:Mt.records.head==null?[]:[Mt.records.head.id,d],branch:Mt.records.currBranch,type:wi.MERGE,customType:i,customId:!!r,tags:n??[]};Mt.records.head=p,Mt.records.commits.set(p.id,p),Mt.records.branches.set(Mt.records.currBranch,p.id),ee.debug(Mt.records.branches),ee.debug("in mergeBranch")},"merge"),qht=o(function(e){let t=e.id,r=e.targetId,i=e.tags,n=e.parent;ee.debug("Entering cherryPick:",t,r,i);let a=_g();if(t=ft.sanitizeText(t,a),r=ft.sanitizeText(r,a),i=i?.map(h=>ft.sanitizeText(h,a)),n=ft.sanitizeText(n,a),!t||!Mt.records.commits.has(t)){let h=new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');throw h.hash={text:`cherryPick ${t} ${r}`,token:`cherryPick ${t} ${r}`,expected:["cherry-pick abc"]},h}let s=Mt.records.commits.get(t);if(s===void 0||!s)throw new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');if(n&&!(Array.isArray(s.parents)&&s.parents.includes(n)))throw new Error("Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit.");let l=s.branch;if(s.type===wi.MERGE&&!n)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||!Mt.records.commits.has(r)){if(l===Mt.records.currBranch){let p=new Error('Incorrect usage of "cherryPick". Source commit is already on current branch');throw p.hash={text:`cherryPick ${t} ${r}`,token:`cherryPick ${t} ${r}`,expected:["cherry-pick abc"]},p}let h=Mt.records.branches.get(Mt.records.currBranch);if(h===void 0||!h){let p=new Error(`Incorrect usage of "cherry-pick". Current branch (${Mt.records.currBranch})has no commits`);throw p.hash={text:`cherryPick ${t} ${r}`,token:`cherryPick ${t} ${r}`,expected:["cherry-pick abc"]},p}let u=Mt.records.commits.get(h);if(u===void 0||!u){let p=new Error(`Incorrect usage of "cherry-pick". Current branch (${Mt.records.currBranch})has no commits`);throw p.hash={text:`cherryPick ${t} ${r}`,token:`cherryPick ${t} ${r}`,expected:["cherry-pick abc"]},p}let d={id:Mt.records.seq+"-"+p_(),message:`cherry-picked ${s?.message} into ${Mt.records.currBranch}`,seq:Mt.records.seq++,parents:Mt.records.head==null?[]:[Mt.records.head.id,s.id],branch:Mt.records.currBranch,type:wi.CHERRY_PICK,tags:i?i.filter(Boolean):[`cherry-pick:${s.id}${s.type===wi.MERGE?`|parent:${n}`:""}`]};Mt.records.head=d,Mt.records.commits.set(d.id,d),Mt.records.branches.set(Mt.records.currBranch,d.id),ee.debug(Mt.records.branches),ee.debug("in cherryPick")}},"cherryPick"),IEe=o(function(e){if(e=ft.sanitizeText(e,_g()),Mt.records.branches.has(e)){Mt.records.currBranch=e;let t=Mt.records.branches.get(Mt.records.currBranch);t===void 0||!t?Mt.records.head=null:Mt.records.head=Mt.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");o(eH,"upsert");o(rH,"prettyPrintCommitHistory");jht=o(function(){ee.debug(Mt.records.commits);let e=DEe()[0];rH([e])},"prettyPrint"),Ght=o(function(){Mt.reset(),ar()},"clear"),Wht=o(function(){return[...Mt.records.branchConfig.values()].map((e,t)=>e.order!==null&&e.order!==void 0?e:{...e,order:parseFloat(`0.${t}`)}).sort((e,t)=>(e.order??0)-(t.order??0)).map(({name:e})=>({name:e}))},"getBranchesAsObjArray"),Uht=o(function(){return Mt.records.branches},"getBranches"),Vht=o(function(){return Mt.records.commits},"getCommits"),DEe=o(function(){let e=[...Mt.records.commits.values()];return e.forEach(function(t){ee.debug(t.id)}),e.sort((t,r)=>t.seq-r.seq),e},"getCommitsArray"),Yht=o(function(){return Mt.records.currBranch},"getCurrentBranch"),Hht=o(function(){return Mt.records.direction},"getDirection"),Xht=o(function(){return Mt.records.head},"getHead"),MEe={commitType:wi,getConfig:_g,setDirection:Nht,setOptions:Oht,getOptions:Bht,commit:Pht,branch:Fht,merge:zht,cherryPick:qht,checkout:IEe,prettyPrint:jht,clear:Ght,getBranchesAsObjArray:Wht,getBranches:Uht,getCommits:Vht,getCommitsArray:DEe,getCurrentBranch:Yht,getDirection:Hht,getHead:Xht,setAccTitle:gr,getAccTitle:xr,getAccDescription:kr,setAccDescription:Tr,setDiagramTitle:_r,getDiagramTitle:Cr},Kht=o((e,t)=>{xi(e,t),e.dir&&t.setDirection(e.dir);for(let r of e.statements)Zht(r,t)},"populate"),Zht=o((e,t)=>{let r={Commit:o(i=>t.commit(Qht(i)),"Commit"),Branch:o(i=>t.branch(Jht(i)),"Branch"),Merge:o(i=>t.merge(eut(i)),"Merge"),Checkout:o(i=>t.checkout(tut(i)),"Checkout"),CherryPicking:o(i=>t.cherryPick(rut(i)),"CherryPicking")}[e.$type];r?r(e):ee.error(`Unknown statement type: ${e.$type}`)},"parseStatement"),Qht=o(e=>({id:e.id,msg:e.message??"",type:e.type!==void 0?wi[e.type]:wi.NORMAL,tags:e.tags??void 0}),"parseCommit"),Jht=o(e=>({name:e.name,order:e.order??0}),"parseBranch"),eut=o(e=>({branch:e.branch,id:e.id??"",type:e.type!==void 0?wi[e.type]:void 0,tags:e.tags??void 0}),"parseMerge"),tut=o(e=>e.branch,"parseCheckout"),rut=o(e=>({id:e.id,targetId:"",tags:e.tags?.length===0?void 0:e.tags,parent:e.parent}),"parseCherryPicking"),iut={parse:o(async e=>{let t=await Vi("gitGraph",e);ee.debug(t),Kht(t,MEe)},"parse")},tp=10,rp=40,Kc=4,au=2,Eg=8,f_=new Set(["redux","redux-dark","redux-color","redux-dark-color"]),tH=12,iH=new Set(["redux-color","redux-dark-color"]),nut=new Set(["dark","redux-dark","redux-dark-color","neo-dark"]),Sg=o((e,t,r=!1)=>r&&e>0?(e-1)%(t-1)+1:e%t,"calcColorIndex"),Zs=new Map,Qs=new Map,u_=30,uT=new Map,d_=[],su=0,jr="LR",aut=o(()=>{Zs.clear(),Qs.clear(),uT.clear(),su=0,d_=[],jr="LR"},"clear"),NEe=o(e=>{let t=document.createElementNS("http://www.w3.org/2000/svg","text");return(typeof e=="string"?e.split(/\\n|\n|/gi):e).forEach(r=>{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=r.trim(),t.appendChild(i)}),t},"drawText"),OEe=o(e=>{let t,r,i;return jr==="BT"?(r=o((n,a)=>n<=a,"comparisonFunc"),i=1/0):(r=o((n,a)=>n>=a,"comparisonFunc"),i=0),e.forEach(n=>{let a=jr==="TB"||jr=="BT"?Qs.get(n)?.y:Qs.get(n)?.x;a!==void 0&&r(a,i)&&(t=n,i=a)}),t},"findClosestParent"),sut=o(e=>{let t="",r=1/0;return e.forEach(i=>{let n=Qs.get(i).y;n<=r&&(t=i,r=n)}),t||void 0},"findClosestParentBT"),out=o((e,t,r)=>{let i=r,n=r,a=[];e.forEach(s=>{let l=t.get(s);if(!l)throw new Error(`Commit not found for key ${s}`);l.parents.length?(i=cut(l),n=Math.max(i,n)):a.push(l),hut(l,i)}),i=n,a.forEach(s=>{uut(s,i,r)}),e.forEach(s=>{let l=t.get(s);if(l?.parents.length){let h=sut(l.parents);i=Qs.get(h).y-rp,i<=n&&(n=i);let u=Zs.get(l.branch).pos,d=i-tp;Qs.set(l.id,{x:u,y:d})}})},"setParallelBTPos"),lut=o(e=>{let t=OEe(e.parents.filter(i=>i!==null));if(!t)throw new Error(`Closest parent not found for commit ${e.id}`);let r=Qs.get(t)?.y;if(r===void 0)throw new Error(`Closest parent position not found for commit ${e.id}`);return r},"findClosestParentPos"),cut=o(e=>lut(e)+rp,"calculateCommitPosition"),hut=o((e,t)=>{let r=Zs.get(e.branch);if(!r)throw new Error(`Branch not found for commit ${e.id}`);let i=r.pos,n=t+tp;return Qs.set(e.id,{x:i,y:n}),{x:i,y:n}},"setCommitPosition"),uut=o((e,t,r)=>{let i=Zs.get(e.branch);if(!i)throw new Error(`Branch not found for commit ${e.id}`);let n=t+r,a=i.pos;Qs.set(e.id,{x:a,y:n})},"setRootPosition"),dut=o((e,t,r,i,n,a)=>{let{theme:s}=De(),l=f_.has(s??""),h=iH.has(s??""),u=nut.has(s??"");if(a===wi.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${Sg(n,Eg,h)} ${i}-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${Sg(n,Eg,h)} ${i}-inner`);else if(a===wi.CHERRY_PICK)e.append("circle").attr("cx",r.x).attr("cy",r.y).attr("r",l?7:10).attr("class",`commit ${t.id} ${i}`),e.append("circle").attr("cx",r.x-3).attr("cy",r.y+2).attr("r",l?2.5:2.75).attr("fill",u?"#000000":"#fff").attr("class",`commit ${t.id} ${i}`),e.append("circle").attr("cx",r.x+3).attr("cy",r.y+2).attr("r",l?2.5:2.75).attr("fill",u?"#000000":"#fff").attr("class",`commit ${t.id} ${i}`),e.append("line").attr("x1",r.x+3).attr("y1",r.y+1).attr("x2",r.x).attr("y2",r.y-5).attr("stroke",u?"#000000":"#fff").attr("class",`commit ${t.id} ${i}`),e.append("line").attr("x1",r.x-3).attr("y1",r.y+1).attr("x2",r.x).attr("y2",r.y-5).attr("stroke",u?"#000000":"#fff").attr("class",`commit ${t.id} ${i}`);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${Sg(n,Eg,h)}`),a===wi.MERGE){let p=e.append("circle");p.attr("cx",r.x),p.attr("cy",r.y),p.attr("r",l?5:6),p.attr("class",`commit ${i} ${t.id} commit${Sg(n,Eg,h)}`)}if(a===wi.REVERSE){let p=e.append("path"),f=l?4:5;p.attr("d",`M ${r.x-f},${r.y-f}L${r.x+f},${r.y+f}M${r.x-f},${r.y+f}L${r.x+f},${r.y-f}`).attr("class",`commit ${i} ${t.id} commit${Sg(n,Eg,h)}`)}}},"drawCommitBullet"),put=o((e,t,r,i,n)=>{if(t.type!==wi.CHERRY_PICK&&(t.customId&&t.type===wi.MERGE||t.type!==wi.MERGE)&&n.showCommitLabel){let a=e.append("g"),s=a.insert("rect").attr("class","commit-label-bkg"),l=a.append("text").attr("x",i).attr("y",r.y+25).attr("class","commit-label").text(t.id),h=l.node()?.getBBox();if(h&&(s.attr("x",r.posWithOffset-h.width/2-au).attr("y",r.y+13.5).attr("width",h.width+2*au).attr("height",h.height+2*au),jr==="TB"||jr==="BT"?(s.attr("x",r.x-(h.width+4*Kc+5)).attr("y",r.y-12),l.attr("x",r.x-(h.width+4*Kc)).attr("y",r.y+h.height-12)):l.attr("x",r.posWithOffset-h.width/2),n.rotateCommitLabel))if(jr==="TB"||jr==="BT")l.attr("transform","rotate(-45, "+r.x+", "+r.y+")"),s.attr("transform","rotate(-45, "+r.x+", "+r.y+")");else{let u=-7.5-(h.width+10)/25*9.5,d=10+h.width/25*8.5;a.attr("transform","translate("+u+", "+d+") rotate(-45, "+i+", "+r.y+")")}}},"drawCommitLabel"),fut=o((e,t,r,i)=>{if(t.tags.length>0){let n=0,a=0,s=0,l=[];for(let h of t.tags.reverse()){let u=e.insert("polygon"),d=e.append("circle"),p=e.append("text").attr("y",r.y-16-n).attr("class","tag-label").text(h),f=p.node()?.getBBox();if(!f)throw new Error("Tag bbox not found");a=Math.max(a,f.width),s=Math.max(s,f.height),p.attr("x",r.posWithOffset-f.width/2),l.push({tag:p,hole:d,rect:u,yOffset:n}),n+=20}for(let{tag:h,hole:u,rect:d,yOffset:p}of l){let f=s/2,g=r.y-19.2-p;if(d.attr("class","tag-label-bkg").attr("points",` + ${i-a/2-Kc/2},${g+au} + ${i-a/2-Kc/2},${g-au} + ${r.posWithOffset-a/2-Kc},${g-f-au} + ${r.posWithOffset+a/2+Kc},${g-f-au} + ${r.posWithOffset+a/2+Kc},${g+f+au} + ${r.posWithOffset-a/2-Kc},${g+f+au}`),u.attr("cy",g).attr("cx",i-a/2+Kc/2).attr("r",1.5).attr("class","tag-hole"),jr==="TB"||jr==="BT"){let m=i+p;d.attr("class","tag-label-bkg").attr("points",` + ${r.x},${m+2} + ${r.x},${m-2} + ${r.x+tp},${m-f-2} + ${r.x+tp+a+4},${m-f-2} + ${r.x+tp+a+4},${m+f+2} + ${r.x+tp},${m+f+2}`).attr("transform","translate(12,12) rotate(45, "+r.x+","+i+")"),u.attr("cx",r.x+Kc/2).attr("cy",m).attr("transform","translate(12,12) rotate(45, "+r.x+","+i+")"),h.attr("x",r.x+5).attr("y",m+3).attr("transform","translate(14,14) rotate(45, "+r.x+","+i+")")}}}},"drawCommitTags"),gut=o(e=>{switch(e.customType??e.type){case wi.NORMAL:return"commit-normal";case wi.REVERSE:return"commit-reverse";case wi.HIGHLIGHT:return"commit-highlight";case wi.MERGE:return"commit-merge";case wi.CHERRY_PICK:return"commit-cherry-pick";default:return"commit-normal"}},"getCommitClassType"),mut=o((e,t,r,i)=>{let n={x:0,y:0};if(e.parents.length>0){let a=OEe(e.parents);if(a){let s=i.get(a)??n;return t==="TB"?s.y+rp:t==="BT"?(i.get(e.id)??n).y-rp:s.x+rp}}else return t==="TB"?u_:t==="BT"?(i.get(e.id)??n).y-rp:0;return 0},"calculatePosition"),yut=o((e,t,r)=>{let i=jr==="BT"&&r?t:t+tp,n=Zs.get(e.branch)?.pos,a=jr==="TB"||jr==="BT"?Zs.get(e.branch)?.pos:i;if(a===void 0||n===void 0)throw new Error(`Position were undefined for commit ${e.id}`);let s=f_.has(De().theme??""),l=jr==="TB"||jr==="BT"?i:n+(s?tH/2+1:-2);return{x:a,y:l,posWithOffset:i}},"getCommitPosition"),LEe=o((e,t,r,i)=>{let n=e.append("g").attr("class","commit-bullets"),a=e.append("g").attr("class","commit-labels"),s=jr==="TB"||jr==="BT"?u_:0,l=[...t.keys()],h=i.parallelCommits??!1,u=o((p,f)=>{let g=t.get(p)?.seq,m=t.get(f)?.seq;return g!==void 0&&m!==void 0?g-m:0},"sortKeys"),d=l.sort(u);jr==="BT"&&(h&&out(d,t,s),d=d.reverse()),d.forEach(p=>{let f=t.get(p);if(!f)throw new Error(`Commit not found for key ${p}`);h&&(s=mut(f,jr,s,Qs));let g=yut(f,s,h);if(r){let m=gut(f),y=f.customType??f.type,b=Zs.get(f.branch)?.index??0;dut(n,f,g,m,b,y),put(a,f,g,s,i),fut(a,f,g,s)}jr==="TB"||jr==="BT"?Qs.set(f.id,{x:g.x,y:g.posWithOffset}):Qs.set(f.id,{x:g.posWithOffset,y:g.y}),s=jr==="BT"&&h?s+rp:s+rp+tp,s>su&&(su=s)})},"drawCommits"),vut=o((e,t,r,i,n)=>{let a=(jr==="TB"||jr==="BT"?r.xh.branch===a,"isOnBranchToGetCurve"),l=o(h=>h.seq>e.seq&&h.seql(h)&&s(h))},"shouldRerouteArrow"),dT=o((e,t,r=0)=>{let i=e+Math.abs(e-t)/2;if(r>5)return i;if(d_.every(a=>Math.abs(a-i)>=10))return d_.push(i),i;let n=Math.abs(e-t);return dT(e,t-n/5,r+1)},"findLane"),but=o((e,t,r,i)=>{let{theme:n}=De(),a=iH.has(n??""),s=Qs.get(t.id),l=Qs.get(r.id);if(s===void 0||l===void 0)throw new Error(`Commit positions not found for commits ${t.id} and ${r.id}`);let h=vut(t,r,s,l,i),u="",d="",p=0,f=0,g=Zs.get(r.branch)?.index;r.type===wi.MERGE&&t.id!==r.parents[0]&&(g=Zs.get(t.branch)?.index);let m;if(h){u="A 10 10, 0, 0, 0,",d="A 10 10, 0, 0, 1,",p=10,f=10;let y=s.yl.x&&(u="A 20 20, 0, 0, 0,",d="A 20 20, 0, 0, 1,",p=20,f=20,r.type===wi.MERGE&&t.id!==r.parents[0]?m=`M ${s.x} ${s.y} L ${s.x} ${l.y-p} ${d} ${s.x-f} ${l.y} L ${l.x} ${l.y}`:m=`M ${s.x} ${s.y} L ${l.x+p} ${s.y} ${u} ${l.x} ${s.y+f} L ${l.x} ${l.y}`),s.x===l.x&&(m=`M ${s.x} ${s.y} L ${l.x} ${l.y}`)):jr==="BT"?(s.xl.x&&(u="A 20 20, 0, 0, 0,",d="A 20 20, 0, 0, 1,",p=20,f=20,r.type===wi.MERGE&&t.id!==r.parents[0]?m=`M ${s.x} ${s.y} L ${s.x} ${l.y+p} ${u} ${s.x-f} ${l.y} L ${l.x} ${l.y}`:m=`M ${s.x} ${s.y} L ${l.x+p} ${s.y} ${d} ${l.x} ${s.y-f} L ${l.x} ${l.y}`),s.x===l.x&&(m=`M ${s.x} ${s.y} L ${l.x} ${l.y}`)):(s.yl.y&&(r.type===wi.MERGE&&t.id!==r.parents[0]?m=`M ${s.x} ${s.y} L ${l.x-p} ${s.y} ${u} ${l.x} ${s.y-f} L ${l.x} ${l.y}`:m=`M ${s.x} ${s.y} L ${s.x} ${l.y+p} ${d} ${s.x+f} ${l.y} L ${l.x} ${l.y}`),s.y===l.y&&(m=`M ${s.x} ${s.y} L ${l.x} ${l.y}`));if(m===void 0)throw new Error("Line definition not found");e.append("path").attr("d",m).attr("class","arrow arrow"+Sg(g,Eg,a))},"drawArrow"),xut=o((e,t)=>{let r=e.append("g").attr("class","commit-arrows");[...t.keys()].forEach(i=>{let n=t.get(i);n.parents&&n.parents.length>0&&n.parents.forEach(a=>{but(r,t.get(a),n,t)})})},"drawArrows"),Tut=o((e,t,r,i)=>{let{look:n,theme:a,themeVariables:s}=De(),{dropShadow:l,THEME_COLOR_LIMIT:h}=s,u=f_.has(a??""),d=iH.has(a??""),p=e.append("g");t.forEach((f,g)=>{let m=Sg(g,u?h:Eg,d),y=Zs.get(f.name)?.pos;if(y===void 0)throw new Error(`Position not found for branch ${f.name}`);let b=jr==="TB"||jr==="BT"?y:u?y+tH/2+1:y-2,v=p.append("line");v.attr("x1",0),v.attr("y1",b),v.attr("x2",su),v.attr("y2",b),v.attr("class","branch branch"+m),jr==="TB"?(v.attr("y1",u_),v.attr("x1",y),v.attr("y2",su),v.attr("x2",y)):jr==="BT"&&(v.attr("y1",su),v.attr("x1",y),v.attr("y2",u_),v.attr("x2",y)),d_.push(b);let T=f.name,x=NEe(T),k=p.insert("rect"),C=p.insert("g").attr("class","branchLabel").insert("g").attr("class","label branch-label"+m);C.node().appendChild(x);let E=x.getBBox(),w=u?0:4,_=u?16:0,L=u?tH:0;n==="neo"&&k.attr("data-look","neo"),k.attr("class","branchLabelBkg label"+m).attr("style",n==="neo"?`filter:${u?`url(#${i}-drop-shadow)`:l}`:"").attr("rx",w).attr("ry",w).attr("x",-E.width-4-(r.rotateCommitLabel===!0?30:0)).attr("y",-E.height/2+10).attr("width",E.width+18+_).attr("height",E.height+4+L),C.attr("transform","translate("+(-E.width-14-(r.rotateCommitLabel===!0?30:0)+_/2)+", "+(b-E.height/2-2)+")"),jr==="TB"?(k.attr("x",y-E.width/2-10).attr("y",0),C.attr("transform","translate("+(y-E.width/2-5)+", 0)"),u&&(k.attr("transform",`translate(${-_/2-3}, ${-L-10})`),C.attr("transform","translate("+(y-E.width/2-5)+", "+(-L*2+7)+")"))):jr==="BT"?(k.attr("x",y-E.width/2-10).attr("y",su),C.attr("transform","translate("+(y-E.width/2-5)+", "+su+")"),u&&(k.attr("transform",`translate(${-_/2-3}, ${L+10})`),C.attr("transform","translate("+(y-E.width/2-5)+", "+(su+L*2+4)+")"))):k.attr("transform","translate(-19, "+(b-12-L/2)+")")})},"drawBranches"),kut=o(function(e,t,r,i,n){return Zs.set(e,{pos:t,index:r}),t+=50+(n?40:0)+(jr==="TB"||jr==="BT"?i.width/2:0),t},"setBranchPosition"),Cut=o(function(e,t,r,i){aut(),ee.debug("in gitgraph renderer",e+` +`,"id:",t,r);let n=i.db;if(!n.getConfig){ee.error("getConfig method is not available on db");return}let a=n.getConfig(),s=a.rotateCommitLabel??!1;uT=n.getCommits();let l=n.getBranchesAsObjArray();jr=n.getDirection();let h=tt(`[id="${t}"]`),{look:u,theme:d,themeVariables:p}=De(),{useGradient:f,gradientStart:g,gradientStop:m,filterColor:y}=p;if(f){let v=h.append("defs").append("linearGradient").attr("id",t+"-gradient").attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");v.append("stop").attr("offset","0%").attr("stop-color",g).attr("stop-opacity",1),v.append("stop").attr("offset","100%").attr("stop-color",m).attr("stop-opacity",1)}u==="neo"&&f_.has(d??"")&&h.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 b=0;l.forEach((v,T)=>{let x=NEe(v.name),k=h.append("g"),C=k.insert("g").attr("class","branchLabel"),E=C.insert("g").attr("class","label branch-label");E.node()?.appendChild(x);let w=x.getBBox();b=kut(v.name,b,T,w,s),E.remove(),C.remove(),k.remove()}),LEe(h,uT,!1,a),a.showBranches&&Tut(h,l,a,t),xut(h,uT),LEe(h,uT,!0,a),Wt.insertTitle(h,"gitTitleText",a.titleTopMargin??0,n.getDiagramTitle()),R2(void 0,h,a.diagramPadding,a.useMaxWidth)},"draw"),wut={draw:Cut},BEe=8,PEe=new Set(["redux","redux-dark","redux-color","redux-dark-color"]),Eut=new Set(["redux-color","redux-dark-color"]),Sut=new Set(["neo","neo-dark"]),_ut=new Set(["dark","redux-dark","redux-dark-color","neo-dark"]),Aut=new Set(["redux","redux-dark","redux-color","redux-dark-color","neo","neo-dark"]),Rut=o(e=>{let{svgId:t}=e,r="";if(e.useGradient&&t)for(let i=0;i{let t=Rt(),{theme:r,themeVariables:i}=t,{borderColorArray:n}=i,a=PEe.has(r);if(Sut.has(r)){let s="";for(let l=0;l`${Array.from({length:e.THEME_COLOR_LIMIT},(t,r)=>r).map(t=>{let r=t%BEe;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"),Iut=o(e=>{let t=Rt(),{theme:r}=t,i=Aut.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); + } + + ${i?Lut(e):$ut(e)} + + .branch { + stroke-width: ${e.strokeWidth}; + stroke: ${e.commitLineColor??e.lineColor}; + stroke-dasharray: ${i?"4 2":"2"}; + } + .commit-label { font-size: ${e.commitLabelFontSize}; fill: ${i?e.nodeBorder:e.commitLabelColor}; ${i?`font-weight:${e.noteFontWeight};`:""}} + .commit-label-bkg { font-size: ${e.commitLabelFontSize}; fill: ${i?"transparent":e.commitLabelBackground}; opacity: ${i?"":.5}; } + .tag-label { font-size: ${e.tagLabelFontSize}; fill: ${e.tagLabelColor};} + .tag-label-bkg { fill: ${i?e.mainBkg:e.tagLabelBackground}; stroke: ${i?e.nodeBorder:e.tagLabelBorder}; ${i?`filter:${e.dropShadow}`:""} } + .tag-hole { fill: ${e.textColor}; } + + .commit-merge { + stroke: ${i?e.mainBkg:e.primaryColor}; + fill: ${i?e.mainBkg:e.primaryColor}; + } + .commit-reverse { + stroke: ${i?e.mainBkg:e.primaryColor}; + fill: ${i?e.mainBkg:e.primaryColor}; + stroke-width: ${i?e.strokeWidth:3}; + } + .commit-highlight-outer { + } + .commit-highlight-inner { + stroke: ${i?e.mainBkg:e.primaryColor}; + fill: ${i?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: ${PEe.has(r)?e.strokeWidth:8}; + stroke-linecap: round; + fill: none + } + .gitTitleText { + text-anchor: middle; + font-size: 18px; + fill: ${e.textColor}; + } +`},"getStyles"),Dut=Iut,Mut={parser:iut,db:MEe,renderer:wut,styles:Dut}});var JEe={};Kt(JEe,{diagram:()=>Mdt});function vH(e,t,r){let i=!0;for(;i;)i=!1,r.forEach(function(n){let a="^\\s*"+n+"\\s*$",s=new RegExp(a);e[0].match(s)&&(t[n]=!0,e.shift(1),i=!0)})}var Nut,Out,But,Put,aH,Fut,zut,nl,qut,jut,Gut,qEe,Zc,cH,hH,uH,H1,X1,dH,pH,y_,K1,fH,WEe,gH,V1,fT,mH,yH,v_,sH,Wut,Uut,Vut,Yut,Hut,Xut,Kut,Zut,Qut,Jut,edt,tdt,rdt,idt,ndt,adt,UEe,sdt,odt,ldt,cdt,hdt,udt,ddt,pdt,VEe,fdt,gdt,mdt,YEe,ydt,oH,HEe,XEe,g_,Y1,vdt,bdt,lH,m_,Yn,KEe,xdt,Ag,Tdt,jEe,kdt,ZEe,Cdt,QEe,wdt,Edt,Sdt,pT,_dt,Adt,GEe,Rdt,ou,nH,Ldt,$dt,Idt,Ddt,Mdt,eSe=Tt(()=>{Or();Yr();tr();Zt();vt();Nut=Xn((e,t)=>{"use strict";(function(r,i){typeof e=="object"&&typeof t<"u"?t.exports=i():typeof define=="function"&&define.amd?define(i):(r=typeof globalThis<"u"?globalThis:r||self).dayjs_plugin_isoWeek=i()})(e,(function(){"use strict";var r="day";return function(i,n,a){var s=o(function(u){return u.add(4-u.isoWeekday(),r)},"a"),l=n.prototype;l.isoWeekYear=function(){return s(this).year()},l.isoWeek=function(u){if(!this.$utils().u(u))return this.add(7*(u-this.isoWeek()),r);var d,p,f,g,m=s(this),y=(d=this.isoWeekYear(),p=this.$u,f=(p?a.utc:a)().year(d).startOf("year"),g=4-f.isoWeekday(),f.isoWeekday()>4&&(g+=7),f.add(g,r));return m.diff(y,"week")+1},l.isoWeekday=function(u){return this.$utils().u(u)?this.day()||7:this.day(this.day()%7?u:u-7)};var h=l.startOf;l.startOf=function(u,d){var p=this.$utils(),f=!!p.u(d)||d;return p.p(u)==="isoweek"?f?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):h.bind(this)(u,d)}}}))}),Out=Xn((e,t)=>{"use strict";(function(r,i){typeof e=="object"&&typeof t<"u"?t.exports=i():typeof define=="function"&&define.amd?define(i):(r=typeof globalThis<"u"?globalThis:r||self).dayjs_plugin_customParseFormat=i()})(e,(function(){"use strict";var r={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"},i=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,n=/\d/,a=/\d\d/,s=/\d\d?/,l=/\d*[^-_:/,()\s\d]+/,h={},u=o(function(b){return(b=+b)+(b>68?1900:2e3)},"a"),d=o(function(b){return function(v){this[b]=+v}},"f"),p=[/[+-]\d\d:?(\d\d)?|Z/,function(b){(this.zone||(this.zone={})).offset=(function(v){if(!v||v==="Z")return 0;var T=v.match(/([+-]|\d\d)/g),x=60*T[1]+(+T[2]||0);return x===0?0:T[0]==="+"?-x:x})(b)}],f=o(function(b){var v=h[b];return v&&(v.indexOf?v:v.s.concat(v.f))},"u"),g=o(function(b,v){var T,x=h.meridiem;if(x){for(var k=1;k<=24;k+=1)if(b.indexOf(x(k,0,v))>-1){T=k>12;break}}else T=b===(v?"pm":"PM");return T},"d"),m={A:[l,function(b){this.afternoon=g(b,!1)}],a:[l,function(b){this.afternoon=g(b,!0)}],Q:[n,function(b){this.month=3*(b-1)+1}],S:[n,function(b){this.milliseconds=100*+b}],SS:[a,function(b){this.milliseconds=10*+b}],SSS:[/\d{3}/,function(b){this.milliseconds=+b}],s:[s,d("seconds")],ss:[s,d("seconds")],m:[s,d("minutes")],mm:[s,d("minutes")],H:[s,d("hours")],h:[s,d("hours")],HH:[s,d("hours")],hh:[s,d("hours")],D:[s,d("day")],DD:[a,d("day")],Do:[l,function(b){var v=h.ordinal,T=b.match(/\d+/);if(this.day=T[0],v)for(var x=1;x<=31;x+=1)v(x).replace(/\[|\]/g,"")===b&&(this.day=x)}],w:[s,d("week")],ww:[a,d("week")],M:[s,d("month")],MM:[a,d("month")],MMM:[l,function(b){var v=f("months"),T=(f("monthsShort")||v.map((function(x){return x.slice(0,3)}))).indexOf(b)+1;if(T<1)throw new Error;this.month=T%12||T}],MMMM:[l,function(b){var v=f("months").indexOf(b)+1;if(v<1)throw new Error;this.month=v%12||v}],Y:[/[+-]?\d+/,d("year")],YY:[a,function(b){this.year=u(b)}],YYYY:[/\d{4}/,d("year")],Z:p,ZZ:p};function y(b){var v,T;v=b,T=h&&h.formats;for(var x=(b=v.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(N,D,M){var B=M&&M.toUpperCase();return D||T[M]||r[M]||T[B].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(A,I,O){return I||O.slice(1)}))}))).match(i),k=x.length,C=0;C-1)return new Date(($==="X"?1e3:1)*R);var z=y($)(R),q=z.year,G=z.month,W=z.day,J=z.hours,H=z.minutes,Z=z.seconds,se=z.milliseconds,Q=z.zone,te=z.week,re=new Date,ne=W||(q||G?1:re.getDate()),Ae=q||re.getFullYear(),ie=0;q&&!G||(ie=G>0?G-1:re.getMonth());var me,oe=J||0,we=H||0,ye=Z||0,ve=se||0;return Q?new Date(Date.UTC(Ae,ie,ne,oe,we,ye,ve+60*Q.offset*1e3)):F?new Date(Date.UTC(Ae,ie,ne,oe,we,ye,ve)):(me=new Date(Ae,ie,ne,oe,we,ye,ve),te&&(me=P(me).week(te).toDate()),me)}catch{return new Date("")}})(E,L,w,T),this.init(),B&&B!==!0&&(this.$L=this.locale(B).$L),M&&E!=this.format(L)&&(this.$d=new Date("")),h={}}else if(L instanceof Array)for(var A=L.length,I=1;I<=A;I+=1){_[1]=L[I-1];var O=T.apply(this,_);if(O.isValid()){this.$d=O.$d,this.$L=O.$L,this.init();break}I===A&&(this.$d=new Date(""))}else k.call(this,C)}}}))}),But=Xn((e,t)=>{"use strict";(function(r,i){typeof e=="object"&&typeof t<"u"?t.exports=i():typeof define=="function"&&define.amd?define(i):(r=typeof globalThis<"u"?globalThis:r||self).dayjs_plugin_advancedFormat=i()})(e,(function(){"use strict";return function(r,i){var n=i.prototype,a=n.format;n.format=function(s){var l=this,h=this.$locale();if(!this.isValid())return a.bind(this)(s);var u=this.$utils(),d=(s||"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(p){switch(p){case"Q":return Math.ceil((l.$M+1)/3);case"Do":return h.ordinal(l.$D);case"gggg":return l.weekYear();case"GGGG":return l.isoWeekYear();case"wo":return h.ordinal(l.week(),"W");case"w":case"ww":return u.s(l.week(),p==="w"?1:2,"0");case"W":case"WW":return u.s(l.isoWeek(),p==="W"?1:2,"0");case"k":case"kk":return u.s(String(l.$H===0?24:l.$H),p==="k"?1:2,"0");case"X":return Math.floor(l.$d.getTime()/1e3);case"x":return l.$d.getTime();case"z":return"["+l.offsetName()+"]";case"zzz":return"["+l.offsetName("long")+"]";default:return p}}));return a.bind(this)(d)}}}))}),Put=Xn((e,t)=>{"use strict";(function(r,i){typeof e=="object"&&typeof t<"u"?t.exports=i():typeof define=="function"&&define.amd?define(i):(r=typeof globalThis<"u"?globalThis:r||self).dayjs_plugin_duration=i()})(e,(function(){"use strict";var r,i,n=1e3,a=6e4,s=36e5,l=864e5,h=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,u=31536e6,d=2628e6,p=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,f={years:u,months:d,days:l,hours:s,minutes:a,seconds:n,milliseconds:1,weeks:6048e5},g=o(function(E){return E instanceof k},"c"),m=o(function(E,w,_){return new k(E,_,w.$l)},"f"),y=o(function(E){return i.p(E)+"s"},"m"),b=o(function(E){return E<0},"l"),v=o(function(E){return b(E)?Math.ceil(E):Math.floor(E)},"$"),T=o(function(E){return Math.abs(E)},"y"),x=o(function(E,w){return E?b(E)?{negative:!0,format:""+T(E)+w}:{negative:!1,format:""+E+w}:{negative:!1,format:""}},"v"),k=(function(){function E(_,L,N){var D=this;if(this.$d={},this.$l=N,_===void 0&&(this.$ms=0,this.parseFromMilliseconds()),L)return m(_*f[y(L)],this);if(typeof _=="number")return this.$ms=_,this.parseFromMilliseconds(),this;if(typeof _=="object")return Object.keys(_).forEach((function(A){D.$d[y(A)]=_[A]})),this.calMilliseconds(),this;if(typeof _=="string"){var M=_.match(p);if(M){var B=M.slice(2).map((function(A){return A!=null?Number(A):0}));return this.$d.years=B[0],this.$d.months=B[1],this.$d.weeks=B[2],this.$d.days=B[3],this.$d.hours=B[4],this.$d.minutes=B[5],this.$d.seconds=B[6],this.calMilliseconds(),this}}return this}o(E,"l");var w=E.prototype;return w.calMilliseconds=function(){var _=this;this.$ms=Object.keys(this.$d).reduce((function(L,N){return L+(_.$d[N]||0)*f[N]}),0)},w.parseFromMilliseconds=function(){var _=this.$ms;this.$d.years=v(_/u),_%=u,this.$d.months=v(_/d),_%=d,this.$d.days=v(_/l),_%=l,this.$d.hours=v(_/s),_%=s,this.$d.minutes=v(_/a),_%=a,this.$d.seconds=v(_/n),_%=n,this.$d.milliseconds=_},w.toISOString=function(){var _=x(this.$d.years,"Y"),L=x(this.$d.months,"M"),N=+this.$d.days||0;this.$d.weeks&&(N+=7*this.$d.weeks);var D=x(N,"D"),M=x(this.$d.hours,"H"),B=x(this.$d.minutes,"M"),A=this.$d.seconds||0;this.$d.milliseconds&&(A+=this.$d.milliseconds/1e3,A=Math.round(1e3*A)/1e3);var I=x(A,"S"),O=_.negative||L.negative||D.negative||M.negative||B.negative||I.negative,R=M.format||B.format||I.format?"T":"",$=(O?"-":"")+"P"+_.format+L.format+D.format+R+M.format+B.format+I.format;return $==="P"||$==="-P"?"P0D":$},w.toJSON=function(){return this.toISOString()},w.format=function(_){var L=_||"YYYY-MM-DDTHH:mm:ss",N={Y:this.$d.years,YY:i.s(this.$d.years,2,"0"),YYYY:i.s(this.$d.years,4,"0"),M:this.$d.months,MM:i.s(this.$d.months,2,"0"),D:this.$d.days,DD:i.s(this.$d.days,2,"0"),H:this.$d.hours,HH:i.s(this.$d.hours,2,"0"),m:this.$d.minutes,mm:i.s(this.$d.minutes,2,"0"),s:this.$d.seconds,ss:i.s(this.$d.seconds,2,"0"),SSS:i.s(this.$d.milliseconds,3,"0")};return L.replace(h,(function(D,M){return M||String(N[D])}))},w.as=function(_){return this.$ms/f[y(_)]},w.get=function(_){var L=this.$ms,N=y(_);return N==="milliseconds"?L%=1e3:L=N==="weeks"?v(L/f[N]):this.$d[N],L||0},w.add=function(_,L,N){var D;return D=L?_*f[y(L)]:g(_)?_.$ms:m(_,this).$ms,m(this.$ms+D*(N?-1:1),this)},w.subtract=function(_,L){return this.add(_,L,!0)},w.locale=function(_){var L=this.clone();return L.$l=_,L},w.clone=function(){return m(this.$ms,this)},w.humanize=function(_){return r().add(this.$ms,"ms").locale(this.$l).fromNow(!_)},w.valueOf=function(){return this.asMilliseconds()},w.milliseconds=function(){return this.get("milliseconds")},w.asMilliseconds=function(){return this.as("milliseconds")},w.seconds=function(){return this.get("seconds")},w.asSeconds=function(){return this.as("seconds")},w.minutes=function(){return this.get("minutes")},w.asMinutes=function(){return this.as("minutes")},w.hours=function(){return this.get("hours")},w.asHours=function(){return this.as("hours")},w.days=function(){return this.get("days")},w.asDays=function(){return this.as("days")},w.weeks=function(){return this.get("weeks")},w.asWeeks=function(){return this.as("weeks")},w.months=function(){return this.get("months")},w.asMonths=function(){return this.as("months")},w.years=function(){return this.get("years")},w.asYears=function(){return this.as("years")},E})(),C=o(function(E,w,_){return E.add(w.years()*_,"y").add(w.months()*_,"M").add(w.days()*_,"d").add(w.hours()*_,"h").add(w.minutes()*_,"m").add(w.seconds()*_,"s").add(w.milliseconds()*_,"ms")},"p");return function(E,w,_){r=_,i=_().$utils(),_.duration=function(D,M){var B=_.locale();return m(D,{$l:B},M)},_.isDuration=g;var L=w.prototype.add,N=w.prototype.subtract;w.prototype.add=function(D,M){return g(D)?C(this,D,1):L.bind(this)(D,M)},w.prototype.subtract=function(D,M){return g(D)?C(this,D,-1):N.bind(this)(D,M)}}}))}),aH=(function(){var e=o(function(B,A,I,O){for(I=I||{},O=B.length;O--;I[B[O]]=A);return I},"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],i=[1,27],n=[1,28],a=[1,29],s=[1,30],l=[1,31],h=[1,32],u=[1,33],d=[1,34],p=[1,9],f=[1,10],g=[1,11],m=[1,12],y=[1,13],b=[1,14],v=[1,15],T=[1,16],x=[1,19],k=[1,20],C=[1,21],E=[1,22],w=[1,23],_=[1,25],L=[1,35],N={trace:o(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:o(function(B,A,I,O,R,$,F){var P=$.length-1;switch(R){case 1:return $[P-1];case 2:this.$=[];break;case 3:$[P-1].push($[P]),this.$=$[P-1];break;case 4:case 5:this.$=$[P];break;case 6:case 7:this.$=[];break;case 8:O.setWeekday("monday");break;case 9:O.setWeekday("tuesday");break;case 10:O.setWeekday("wednesday");break;case 11:O.setWeekday("thursday");break;case 12:O.setWeekday("friday");break;case 13:O.setWeekday("saturday");break;case 14:O.setWeekday("sunday");break;case 15:O.setWeekend("friday");break;case 16:O.setWeekend("saturday");break;case 17:O.setDateFormat($[P].substr(11)),this.$=$[P].substr(11);break;case 18:O.enableInclusiveEndDates(),this.$=$[P].substr(18);break;case 19:O.TopAxis(),this.$=$[P].substr(8);break;case 20:O.setAxisFormat($[P].substr(11)),this.$=$[P].substr(11);break;case 21:O.setTickInterval($[P].substr(13)),this.$=$[P].substr(13);break;case 22:O.setExcludes($[P].substr(9)),this.$=$[P].substr(9);break;case 23:O.setIncludes($[P].substr(9)),this.$=$[P].substr(9);break;case 24:O.setTodayMarker($[P].substr(12)),this.$=$[P].substr(12);break;case 27:O.setDiagramTitle($[P].substr(6)),this.$=$[P].substr(6);break;case 28:this.$=$[P].trim(),O.setAccTitle(this.$);break;case 29:case 30:this.$=$[P].trim(),O.setAccDescription(this.$);break;case 31:O.addSection($[P].substr(8)),this.$=$[P].substr(8);break;case 33:O.addTask($[P-1],$[P]),this.$="task";break;case 34:this.$=$[P-1],O.setClickEvent($[P-1],$[P],null);break;case 35:this.$=$[P-2],O.setClickEvent($[P-2],$[P-1],$[P]);break;case 36:this.$=$[P-2],O.setClickEvent($[P-2],$[P-1],null),O.setLink($[P-2],$[P]);break;case 37:this.$=$[P-3],O.setClickEvent($[P-3],$[P-2],$[P-1]),O.setLink($[P-3],$[P]);break;case 38:this.$=$[P-2],O.setClickEvent($[P-2],$[P],null),O.setLink($[P-2],$[P-1]);break;case 39:this.$=$[P-3],O.setClickEvent($[P-3],$[P-1],$[P]),O.setLink($[P-3],$[P-2]);break;case 40:this.$=$[P-1],O.setLink($[P-1],$[P]);break;case 41:case 47:this.$=$[P-1]+" "+$[P];break;case 42:case 43:case 45:this.$=$[P-2]+" "+$[P-1]+" "+$[P];break;case 44:case 46:this.$=$[P-3]+" "+$[P-2]+" "+$[P-1]+" "+$[P];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:i,14:n,15:a,16:s,17:l,18:h,19:18,20:u,21:d,22:p,23:f,24:g,25:m,26:y,27:b,28:v,29:T,30:x,31:k,33:C,35:E,36:w,37:24,38:_,40:L},e(t,[2,7],{1:[2,1]}),e(t,[2,3]),{9:36,11:17,12:r,13:i,14:n,15:a,16:s,17:l,18:h,19:18,20:u,21:d,22:p,23:f,24:g,25:m,26:y,27:b,28:v,29:T,30:x,31:k,33:C,35:E,36:w,37:24,38:_,40:L},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:o(function(B,A){if(A.recoverable)this.trace(B);else{var I=new Error(B);throw I.hash=A,I}},"parseError"),parse:o(function(B){var A=this,I=[0],O=[],R=[null],$=[],F=this.table,P="",z=0,q=0,G=0,W=2,J=1,H=$.slice.call(arguments,1),Z=Object.create(this.lexer),se={yy:{}};for(var Q in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Q)&&(se.yy[Q]=this.yy[Q]);Z.setInput(B,se.yy),se.yy.lexer=Z,se.yy.parser=this,typeof Z.yylloc>"u"&&(Z.yylloc={});var te=Z.yylloc;$.push(te);var re=Z.options&&Z.options.ranges;typeof se.yy.parseError=="function"?this.parseError=se.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ne(ke){I.length=I.length-2*ke,R.length=R.length-ke,$.length=$.length-ke}o(ne,"popStack");function Ae(){var ke;return ke=O.pop()||Z.lex()||J,typeof ke!="number"&&(ke instanceof Array&&(O=ke,ke=O.pop()),ke=A.symbols_[ke]||ke),ke}o(Ae,"lex");for(var ie,me,oe,we,ye,ve,ae={},Pe,X,ce,ge;;){if(oe=I[I.length-1],this.defaultActions[oe]?we=this.defaultActions[oe]:((ie===null||typeof ie>"u")&&(ie=Ae()),we=F[oe]&&F[oe][ie]),typeof we>"u"||!we.length||!we[0]){var be="";ge=[];for(Pe in F[oe])this.terminals_[Pe]&&Pe>W&&ge.push("'"+this.terminals_[Pe]+"'");Z.showPosition?be="Parse error on line "+(z+1)+`: +`+Z.showPosition()+` +Expecting `+ge.join(", ")+", got '"+(this.terminals_[ie]||ie)+"'":be="Parse error on line "+(z+1)+": Unexpected "+(ie==J?"end of input":"'"+(this.terminals_[ie]||ie)+"'"),this.parseError(be,{text:Z.match,token:this.terminals_[ie]||ie,line:Z.yylineno,loc:te,expected:ge})}if(we[0]instanceof Array&&we.length>1)throw new Error("Parse Error: multiple actions possible at state: "+oe+", token: "+ie);switch(we[0]){case 1:I.push(ie),R.push(Z.yytext),$.push(Z.yylloc),I.push(we[1]),ie=null,me?(ie=me,me=null):(q=Z.yyleng,P=Z.yytext,z=Z.yylineno,te=Z.yylloc,G>0&&G--);break;case 2:if(X=this.productions_[we[1]][1],ae.$=R[R.length-X],ae._$={first_line:$[$.length-(X||1)].first_line,last_line:$[$.length-1].last_line,first_column:$[$.length-(X||1)].first_column,last_column:$[$.length-1].last_column},re&&(ae._$.range=[$[$.length-(X||1)].range[0],$[$.length-1].range[1]]),ve=this.performAction.apply(ae,[P,q,z,se.yy,we[1],R,$].concat(H)),typeof ve<"u")return ve;X&&(I=I.slice(0,-1*X*2),R=R.slice(0,-1*X),$=$.slice(0,-1*X)),I.push(this.productions_[we[1]][0]),R.push(ae.$),$.push(ae._$),ce=F[I[I.length-2]][I[I.length-1]],I.push(ce);break;case 3:return!0}}return!0},"parse")},D=(function(){var B={EOF:1,parseError:o(function(A,I){if(this.yy.parser)this.yy.parser.parseError(A,I);else throw new Error(A)},"parseError"),setInput:o(function(A,I){return this.yy=I||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:o(function(){var A=this._input[0];this.yytext+=A,this.yyleng++,this.offset++,this.match+=A,this.matched+=A;var I=A.match(/(?:\r\n?|\n).*/g);return I?(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:o(function(A){var I=A.length,O=A.split(/(?:\r\n?|\n)/g);this._input=A+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-I),this.offset-=I;var R=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),O.length-1&&(this.yylineno-=O.length-1);var $=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:O?(O.length===R.length?this.yylloc.first_column:0)+R[R.length-O.length].length-O[0].length:this.yylloc.first_column-I},this.options.ranges&&(this.yylloc.range=[$[0],$[0]+this.yyleng-I]),this.yyleng=this.yytext.length,this},"unput"),more:o(function(){return this._more=!0,this},"more"),reject:o(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:o(function(A){this.unput(this.match.slice(A))},"less"),pastInput:o(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:o(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:o(function(){var A=this.pastInput(),I=new Array(A.length+1).join("-");return A+this.upcomingInput()+` +`+I+"^"},"showPosition"),test_match:o(function(A,I){var O,R,$;if(this.options.backtrack_lexer&&($={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&($.yylloc.range=this.yylloc.range.slice(0))),R=A[0].match(/(?:\r\n?|\n).*/g),R&&(this.yylineno+=R.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:R?R[R.length-1].length-R[R.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+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],O=this.performAction.call(this,this.yy,this,I,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),O)return O;if(this._backtrack){for(var F in $)this[F]=$[F];return!1}return!1},"test_match"),next:o(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var A,I,O,R;this._more||(this.yytext="",this.match="");for(var $=this._currentRules(),F=0;F<$.length;F++)if(O=this._input.match(this.rules[$[F]]),O&&(!I||O[0].length>I[0].length)){if(I=O,R=F,this.options.backtrack_lexer){if(A=this.test_match(O,$[F]),A!==!1)return A;if(this._backtrack){I=!1;continue}else return!1}else if(!this.options.flex)break}return I?(A=this.test_match(I,$[R]),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:o(function(){var A=this.next();return A||this.lex()},"lex"),begin:o(function(A){this.conditionStack.push(A)},"begin"),popState:o(function(){var A=this.conditionStack.length-1;return A>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:o(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:o(function(A){return A=this.conditionStack.length-1-Math.abs(A||0),A>=0?this.conditionStack[A]:"INITIAL"},"topState"),pushState:o(function(A){this.begin(A)},"pushState"),stateStackSize:o(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:o(function(A,I,O,R){var $=R;switch(O){case 0:return this.begin("open_directive"),"open_directive";case 1:return this.begin("acc_title"),31;case 2:return this.popState(),"acc_title_value";case 3:return this.begin("acc_descr"),33;case 4:return this.popState(),"acc_descr_value";case 5:this.begin("acc_descr_multiline");break;case 6:this.popState();break;case 7:return"acc_descr_multiline_value";case 8:break;case 9:break;case 10:break;case 11:return 10;case 12:break;case 13:break;case 14:this.begin("href");break;case 15:this.popState();break;case 16:return 43;case 17:this.begin("callbackname");break;case 18:this.popState();break;case 19:this.popState(),this.begin("callbackargs");break;case 20:return 41;case 21:this.popState();break;case 22:return 42;case 23:this.begin("click");break;case 24:this.popState();break;case 25:return 40;case 26:return 4;case 27:return 22;case 28:return 23;case 29:return 24;case 30:return 25;case 31:return 26;case 32:return 28;case 33:return 27;case 34:return 29;case 35:return 12;case 36:return 13;case 37:return 14;case 38:return 15;case 39:return 16;case 40:return 17;case 41:return 18;case 42:return 20;case 43:return 21;case 44:return"date";case 45:return 30;case 46:return"accDescription";case 47:return 36;case 48:return 38;case 49:return 39;case 50:return":";case 51:return 6;case 52:return"INVALID"}},"anonymous"),rules:[/^(?:%%\{)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:%%(?!\{)*[^\n]*)/i,/^(?:[^\}]%%*[^\n]*)/i,/^(?:%%*[^\n]*[\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:%[^\n]*)/i,/^(?:href[\s]+["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:call[\s]+)/i,/^(?:\([\s]*\))/i,/^(?:\()/i,/^(?:[^(]*)/i,/^(?:\))/i,/^(?:[^)]*)/i,/^(?:click[\s]+)/i,/^(?:[\s\n])/i,/^(?:[^\s\n]*)/i,/^(?:gantt\b)/i,/^(?:dateFormat\s[^#\n;]+)/i,/^(?:inclusiveEndDates\b)/i,/^(?:topAxis\b)/i,/^(?:axisFormat\s[^#\n;]+)/i,/^(?:tickInterval\s[^#\n;]+)/i,/^(?:includes\s[^#\n;]+)/i,/^(?:excludes\s[^#\n;]+)/i,/^(?:todayMarker\s[^\n;]+)/i,/^(?:weekday\s+monday\b)/i,/^(?:weekday\s+tuesday\b)/i,/^(?:weekday\s+wednesday\b)/i,/^(?:weekday\s+thursday\b)/i,/^(?:weekday\s+friday\b)/i,/^(?:weekday\s+saturday\b)/i,/^(?:weekday\s+sunday\b)/i,/^(?:weekend\s+friday\b)/i,/^(?:weekend\s+saturday\b)/i,/^(?:\d\d\d\d-\d\d-\d\d\b)/i,/^(?:title\s[^\n]+)/i,/^(?:accDescription\s[^#\n;]+)/i,/^(?:section\s[^\n]+)/i,/^(?:[^:\n]+)/i,/^(?::[^#\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[6,7],inclusive:!1},acc_descr:{rules:[4],inclusive:!1},acc_title:{rules:[2],inclusive:!1},callbackargs:{rules:[21,22],inclusive:!1},callbackname:{rules:[18,19,20],inclusive:!1},href:{rules:[15,16],inclusive:!1},click:{rules:[24,25],inclusive:!1},INITIAL:{rules:[0,1,3,5,8,9,10,11,12,13,14,17,23,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52],inclusive:!0}}};return B})();N.lexer=D;function M(){this.yy={}}return o(M,"Parser"),M.prototype=N,N.Parser=M,new M})();aH.parser=aH;Fut=aH,zut=tn(dc(),1),nl=tn(k4(),1),qut=tn(Nut(),1),jut=tn(Out(),1),Gut=tn(But(),1);nl.default.extend(qut.default);nl.default.extend(jut.default);nl.default.extend(Gut.default);qEe={friday:5,saturday:6},Zc="",cH="",uH="",H1=[],X1=[],dH=new Map,pH=[],y_=[],K1="",fH="",WEe=["active","done","crit","milestone","vert"],gH=[],V1="",fT=!1,mH=!1,yH="sunday",v_="saturday",sH=0,Wut=o(function(){pH=[],y_=[],K1="",gH=[],g_=0,lH=void 0,m_=void 0,Yn=[],Zc="",cH="",fH="",hH=void 0,uH="",H1=[],X1=[],fT=!1,mH=!1,sH=0,dH=new Map,V1="",ar(),yH="sunday",v_="saturday"},"clear"),Uut=o(function(e){V1=e},"setDiagramId"),Vut=o(function(e){cH=e},"setAxisFormat"),Yut=o(function(){return cH},"getAxisFormat"),Hut=o(function(e){hH=e},"setTickInterval"),Xut=o(function(){return hH},"getTickInterval"),Kut=o(function(e){uH=e},"setTodayMarker"),Zut=o(function(){return uH},"getTodayMarker"),Qut=o(function(e){Zc=e},"setDateFormat"),Jut=o(function(){fT=!0},"enableInclusiveEndDates"),edt=o(function(){return fT},"endDatesAreInclusive"),tdt=o(function(){mH=!0},"enableTopAxis"),rdt=o(function(){return mH},"topAxisEnabled"),idt=o(function(e){fH=e},"setDisplayMode"),ndt=o(function(){return fH},"getDisplayMode"),adt=o(function(){return Zc},"getDateFormat"),UEe=o((e,t)=>{let r=t.toLowerCase().split(/[\s,]+/).filter(i=>i!=="");return[...new Set([...e,...r])]},"mergeTokens"),sdt=o(function(e){H1=UEe(H1,e)},"setIncludes"),odt=o(function(){return H1},"getIncludes"),ldt=o(function(e){X1=UEe(X1,e)},"setExcludes"),cdt=o(function(){return X1},"getExcludes"),hdt=o(function(){return dH},"getLinks"),udt=o(function(e){K1=e,pH.push(e)},"addSection"),ddt=o(function(){return pH},"getSections"),pdt=o(function(){let e=jEe(),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,s]},"fixTaskDates"),oH=o(function(e,t,r){if(r=r.trim(),o(a=>{let s=a.trim();return s==="x"||s==="X"},"isTimestampFormat")(t)&&/^\d+$/.test(r))return new Date(Number(r));let i=/^after\s+(?[\d\w- ]+)/.exec(r);if(i!==null){let a=null;for(let l of i.groups.ids.split(" ")){let h=Ag(l);h!==void 0&&(!a||h.endTime>a.endTime)&&(a=h)}if(a)return a.endTime;let s=new Date;return s.setHours(0,0,0,0),s}let n=(0,nl.default)(r,t.trim(),!0);if(n.isValid())return n.toDate();{ee.debug("Invalid date:"+r),ee.debug("With date format:"+t.trim());let a=new Date(r);if(a===void 0||isNaN(a.getTime())||a.getFullYear()<-1e4||a.getFullYear()>1e4)throw new Error("Invalid date:"+r);return a}},"getStartDate"),HEe=o(function(e){let t=/^(\d+(?:\.\d+)?)([Mdhmswy]|ms)$/.exec(e.trim());return t!==null?[Number.parseFloat(t[1]),t[2]]:[NaN,"ms"]},"parseDuration"),XEe=o(function(e,t,r,i=!1){r=r.trim();let n=/^until\s+(?[\d\w- ]+)/.exec(r);if(n!==null){let u=null;for(let p of n.groups.ids.split(" ")){let f=Ag(p);f!==void 0&&(!u||f.startTime{window.open(r,"_self")}),dH.set(i,r))}),ZEe(e,"clickable")},"setLink"),ZEe=o(function(e,t){e.split(",").forEach(function(r){let i=Ag(r);i!==void 0&&i.classes.push(t)})},"setClass"),Cdt=o(function(e,t,r){if(De().securityLevel!=="loose"||t===void 0)return;let i=[];if(typeof r=="string"){i=r.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let n=0;n{Wt.runFunc(t,...i)})},"setClickFun"),QEe=o(function(e,t){gH.push(function(){let r=V1?`${V1}-${e}`:e,i=document.querySelector(`[id="${r}"]`);i!==null&&i.addEventListener("click",function(){t()})},function(){let r=V1?`${V1}-${e}`:e,i=document.querySelector(`[id="${r}-text"]`);i!==null&&i.addEventListener("click",function(){t()})})},"pushFun"),wdt=o(function(e,t,r){e.split(",").forEach(function(i){Cdt(i,t,r)}),ZEe(e,"clickable")},"setClickEvent"),Edt=o(function(e){gH.forEach(function(t){t(e)})},"bindFunctions"),Sdt={getConfig:o(()=>De().gantt,"getConfig"),clear:Wut,setDateFormat:Qut,getDateFormat:adt,enableInclusiveEndDates:Jut,endDatesAreInclusive:edt,enableTopAxis:tdt,topAxisEnabled:rdt,setAxisFormat:Vut,getAxisFormat:Yut,setTickInterval:Hut,getTickInterval:Xut,setTodayMarker:Kut,getTodayMarker:Zut,setAccTitle:gr,getAccTitle:xr,setDiagramTitle:_r,getDiagramTitle:Cr,setDiagramId:Uut,setDisplayMode:idt,getDisplayMode:ndt,setAccDescription:Tr,getAccDescription:kr,addSection:udt,getSections:ddt,getTasks:pdt,addTask:xdt,findTaskById:Ag,addTaskOrg:Tdt,setIncludes:sdt,getIncludes:odt,setExcludes:ldt,getExcludes:cdt,setClickEvent:wdt,setLink:kdt,getLinks:hdt,bindFunctions:Edt,parseDuration:HEe,isInvalidDate:VEe,setWeekday:fdt,getWeekday:gdt,setWeekend:mdt};o(vH,"getTaskTags");pT=tn(k4(),1),_dt=tn(Put(),1);pT.default.extend(_dt.default);Adt=o(function(){ee.debug("Something is calling, setConf, remove the call")},"setConf"),GEe={monday:Jg,tuesday:K7,wednesday:Z7,thursday:Tu,friday:Q7,saturday:J7,sunday:a0},Rdt=o((e,t)=>{let r=[...e].map(()=>-1/0),i=[...e].sort((a,s)=>a.startTime-s.startTime||a.order-s.order),n=0;for(let a of i)for(let s=0;s=r[s]){r[s]=a.endTime,a.order=s+t,s>n&&(n=s);break}return n},"getMaxIntersections"),nH=1e4,Ldt=o(function(e,t,r,i){let n=De().gantt;i.db.setDiagramId(t);let a=De().securityLevel,s;a==="sandbox"&&(s=tt("#i"+t));let l=a==="sandbox"?tt(s.nodes()[0].contentDocument.body):tt("body"),h=a==="sandbox"?s.nodes()[0].contentDocument:document,u=h.getElementById(t);ou=u.parentElement.offsetWidth,ou===void 0&&(ou=1200),n.useWidth!==void 0&&(ou=n.useWidth);let d=i.db.getTasks(),p=d.filter(N=>!N.vert),f=[];for(let N of p)f.push(N.type);f=L(f);let g={},m=2*n.topPadding;if(i.db.getDisplayMode()==="compact"||n.displayMode==="compact"){let N={};for(let M of p)N[M.section]===void 0?N[M.section]=[M]:N[M.section].push(M);let D=0;for(let M of Object.keys(N)){let B=Rdt(N[M],D)+1;D+=B,m+=B*(n.barHeight+n.barGap),g[M]=B}}else{m+=p.length*(n.barHeight+n.barGap);for(let N of f)g[N]=p.filter(D=>D.type===N).length}u.setAttribute("viewBox","0 0 "+ou+" "+m);let y=l.select(`[id="${t}"]`),b=o8().domain([b7(d,function(N){return N.startTime}),v7(d,function(N){return N.endTime})]).rangeRound([0,ou-n.leftPadding-n.rightPadding]);function v(N,D){let M=N.startTime,B=D.startTime,A=0;return M>B?A=1:Mz.vert===q.vert?0:z.vert?1:-1);let R=N.filter(z=>!z.vert),$=[...new Set(R.map(z=>z.order))].map(z=>R.find(q=>q.order===z));y.append("g").selectAll("rect").data($).enter().append("rect").attr("x",0).attr("y",function(z,q){return q=z.order,q*D+M-2}).attr("width",function(){return O-n.rightPadding/2}).attr("height",D).attr("class",function(z){for(let[q,G]of f.entries())if(z.type===G)return"section section"+q%n.numberSectionStyles;return"section section0"}).enter();let F=y.append("g").selectAll("rect").data(N).enter(),P=i.db.getLinks();if(F.append("rect").attr("id",function(z){return t+"-"+z.id}).attr("rx",3).attr("ry",3).attr("x",function(z){return z.milestone?b(z.startTime)+B+.5*(b(z.endTime)-b(z.startTime))-.5*A:b(z.startTime)+B}).attr("y",function(z,q){return q=z.order,z.vert?n.gridLineStartPadding:q*D+M}).attr("width",function(z){return z.milestone?A:z.vert?.08*A:b(z.renderEndTime||z.endTime)-b(z.startTime)}).attr("height",function(z){return z.vert?R.length*(n.barHeight+n.barGap)+n.barHeight*2:A}).attr("transform-origin",function(z,q){return q=z.order,(b(z.startTime)+B+.5*(b(z.endTime)-b(z.startTime))).toString()+"px "+(q*D+M+.5*A).toString()+"px"}).attr("class",function(z){let q="task",G="";z.classes.length>0&&(G=z.classes.join(" "));let W=0;for(let[H,Z]of f.entries())z.type===Z&&(W=H%n.numberSectionStyles);let J="";return z.active?z.crit?J+=" activeCrit":J=" active":z.done?z.crit?J=" doneCrit":J=" done":z.crit&&(J+=" crit"),J.length===0&&(J=" task"),z.milestone&&(J=" milestone "+J),z.vert&&(J=" vert "+J),J+=W,J+=" "+G,q+J}),F.append("text").attr("id",function(z){return t+"-"+z.id+"-text"}).text(function(z){return z.task}).attr("font-size",n.fontSize).attr("x",function(z){let q=b(z.startTime),G=b(z.renderEndTime||z.endTime);if(z.milestone&&(q+=.5*(b(z.endTime)-b(z.startTime))-.5*A,G=q+A),z.vert)return b(z.startTime)+B;let W=this.getBBox().width;return W>G-q?G+W+1.5*n.leftPadding>O?q+B-5:G+B+5:(G-q)/2+q+B}).attr("y",function(z,q){return z.vert?n.gridLineStartPadding+R.length*(n.barHeight+n.barGap)+60:(q=z.order,q*D+n.barHeight/2+(n.fontSize/2-2)+M)}).attr("text-height",A).attr("class",function(z){let q=b(z.startTime),G=b(z.endTime);z.milestone&&(G=q+A);let W=this.getBBox().width,J="";z.classes.length>0&&(J=z.classes.join(" "));let H=0;for(let[se,Q]of f.entries())z.type===Q&&(H=se%n.numberSectionStyles);let Z="";return z.active&&(z.crit?Z="activeCritText"+H:Z="activeText"+H),z.done?z.crit?Z=Z+" doneCritText"+H:Z=Z+" doneText"+H:z.crit&&(Z=Z+" critText"+H),z.milestone&&(Z+=" milestoneText"),z.vert&&(Z+=" vertText"),W>G-q?G+W+1.5*n.leftPadding>O?J+" taskTextOutsideLeft taskTextOutside"+H+" "+Z:J+" taskTextOutsideRight taskTextOutside"+H+" "+Z+" width-"+W:J+" taskText taskText"+H+" "+Z+" width-"+W}),De().securityLevel==="sandbox"){let z;z=tt("#i"+t);let q=z.nodes()[0].contentDocument;F.filter(function(G){return P.has(G.id)}).each(function(G){var W=q.querySelector("#"+CSS.escape(t+"-"+G.id)),J=q.querySelector("#"+CSS.escape(t+"-"+G.id+"-text"));let H=W.parentNode;var Z=q.createElement("a");Z.setAttribute("xlink:href",P.get(G.id)),Z.setAttribute("target","_top"),H.appendChild(Z),Z.appendChild(W),Z.appendChild(J)})}}o(x,"drawRects");function k(N,D,M,B,A,I,O,R){if(O.length===0&&R.length===0)return;let $,F;for(let{startTime:W,endTime:J}of I)($===void 0||W<$)&&($=W),(F===void 0||J>F)&&(F=J);if(!$||!F)return;if((0,pT.default)(F).diff((0,pT.default)($),"year")>5){ee.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 P=i.db.getDateFormat(),z=[],q=null,G=(0,pT.default)($);for(;G.valueOf()<=F;)i.db.isInvalidDate(G,P,O,R)?q?q.end=G:q={start:G,end:G}:q&&(z.push(q),q=null),G=G.add(1,"d");y.append("g").selectAll("rect").data(z).enter().append("rect").attr("id",W=>t+"-exclude-"+W.start.format("YYYY-MM-DD")).attr("x",W=>b(W.start.startOf("day"))+M).attr("y",n.gridLineStartPadding).attr("width",W=>b(W.end.endOf("day"))-b(W.start.startOf("day"))).attr("height",A-D-n.gridLineStartPadding).attr("transform-origin",function(W,J){return(b(W.start)+M+.5*(b(W.end)-b(W.start))).toString()+"px "+(J*N+.5*A).toString()+"px"}).attr("class","exclude-range")}o(k,"drawExcludeDays");function C(N,D,M,B){if(M<=0||N>D)return 1/0;let A=D-N,I=pT.default.duration({[B??"day"]:M}).asMilliseconds();return I<=0?1/0:Math.ceil(A/I)}o(C,"getEstimatedTickCount");function E(N,D,M,B){let A=i.db.getDateFormat(),I=i.db.getAxisFormat(),O;I?O=I:A==="D"?O="%d":O=n.axisFormat??"%Y-%m-%d";let R=k7(b).tickSize(-B+D+n.gridLineStartPadding).tickFormat(Yy(O)),$=/^([1-9]\d*)(millisecond|second|minute|hour|day|week|month)$/.exec(i.db.getTickInterval()||n.tickInterval);if($!==null){let F=parseInt($[1],10);if(isNaN(F)||F<=0)ee.warn(`Invalid tick interval value: "${$[1]}". Skipping custom tick interval.`);else{let P=$[2],z=i.db.getWeekday()||n.weekday,q=b.domain(),G=q[0],W=q[1],J=C(G,W,F,P);if(J>nH)ee.warn(`The tick interval "${F}${P}" would generate ${J} ticks, which exceeds the maximum allowed (${nH}). This may indicate an invalid date or time range. Skipping custom tick interval.`);else switch(P){case"millisecond":R.ticks(xp.every(F));break;case"second":R.ticks(ah.every(F));break;case"minute":R.ticks(i0.every(F));break;case"hour":R.ticks(n0.every(F));break;case"day":R.ticks(Eu.every(F));break;case"week":R.ticks(GEe[z].every(F));break;case"month":R.ticks(s0.every(F));break}}}if(y.append("g").attr("class","grid").attr("transform","translate("+N+", "+(B-50)+")").call(R).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10).attr("dy","1em"),i.db.topAxisEnabled()||n.topAxis){let F=T7(b).tickSize(-B+D+n.gridLineStartPadding).tickFormat(Yy(O));if($!==null){let P=parseInt($[1],10);if(isNaN(P)||P<=0)ee.warn(`Invalid tick interval value: "${$[1]}". Skipping custom tick interval.`);else{let z=$[2],q=i.db.getWeekday()||n.weekday,G=b.domain(),W=G[0],J=G[1];if(C(W,J,P,z)<=nH)switch(z){case"millisecond":F.ticks(xp.every(P));break;case"second":F.ticks(ah.every(P));break;case"minute":F.ticks(i0.every(P));break;case"hour":F.ticks(n0.every(P));break;case"day":F.ticks(Eu.every(P));break;case"week":F.ticks(GEe[q].every(P));break;case"month":F.ticks(s0.every(P));break}}}y.append("g").attr("class","grid").attr("transform","translate("+N+", "+D+")").call(F).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10)}}o(E,"makeGrid");function w(N,D){let M=0,B=Object.keys(g).map(A=>[A,g[A]]);y.append("g").selectAll("text").data(B).enter().append(function(A){let I=A[0].split(ft.lineBreakRegex),O=-(I.length-1)/2,R=h.createElementNS("http://www.w3.org/2000/svg","text");R.setAttribute("dy",O+"em");for(let[$,F]of I.entries()){let P=h.createElementNS("http://www.w3.org/2000/svg","tspan");P.setAttribute("alignment-baseline","central"),P.setAttribute("x","10"),$>0&&P.setAttribute("dy","1em"),P.textContent=F,R.appendChild(P)}return R}).attr("x",10).attr("y",function(A,I){if(I>0)for(let O=0;O` + .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"),Ddt=Idt,Mdt={parser:Fut,db:Sdt,renderer:$dt,styles:Ddt}});var tSe={};Kt(tSe,{diagram:()=>qdt});var Ndt,Odt,Bdt,Pdt,Fdt,zdt,qdt,rSe=Tt(()=>{es();Ma();Sa();_a();Aa();Ra();La();$a();Ia();Da();xa();Ta();ka();Ca();wa();Ea();Rr();yn();tr();Zt();vt();Ndt={parse:o(async e=>{let t=await Vi("info",e);ee.debug(t)},"parse")},Odt={version:"11.16.0"},Bdt=o(()=>Odt.version,"getVersion"),Pdt={getVersion:Bdt},Fdt=o((e,t,r)=>{ee.debug(`rendering info diagram +`+e);let i=oi(t);Ir(i,100,400,!0),i.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"),zdt={draw:Fdt},qdt={parser:Ndt,db:Pdt,renderer:zdt}});var aSe={};Kt(aSe,{diagram:()=>rpt});var iSe,bH,b_,xH,jdt,Gdt,Wdt,Udt,Vdt,Ydt,Hdt,nSe,Xdt,Kdt,Zdt,Qdt,Jdt,ept,tpt,rpt,sSe=Tt(()=>{bs();es();Ma();Sa();_a();Aa();Ra();La();$a();Ia();Da();xa();Ta();ka();Ca();wa();Ea();Rr();yn();Or();Yr();tr();Zt();vt();iSe=rr.pie,bH={sections:new Map,showData:!1,config:iSe},b_=bH.sections,xH=bH.showData,jdt=structuredClone(iSe),Gdt=o(()=>structuredClone(jdt),"getConfig"),Wdt=o(()=>{b_=new Map,xH=bH.showData,ar()},"clear"),Udt=o(({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.`);b_.has(e)||(b_.set(e,t),ee.debug(`added new section: ${e}, with value: ${t}`))},"addSection"),Vdt=o(()=>b_,"getSections"),Ydt=o(e=>{xH=e},"setShowData"),Hdt=o(()=>xH,"getShowData"),nSe={getConfig:Gdt,clear:Wdt,setDiagramTitle:_r,getDiagramTitle:Cr,setAccTitle:gr,getAccTitle:xr,setAccDescription:Tr,getAccDescription:kr,addSection:Udt,getSections:Vdt,setShowData:Ydt,getShowData:Hdt},Xdt=o((e,t)=>{xi(e,t),t.setShowData(e.showData),e.sections.map(t.addSection)},"populateDb"),Kdt={parse:o(async e=>{let t=await Vi("pie",e);ee.debug(t),Xdt(t,nSe)},"parse")},Zdt=o(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"),Qdt=Zdt,Jdt=o(e=>{let t=[...e.values()].reduce((i,n)=>i+n,0),r=[...e.entries()].map(([i,n])=>({label:i,value:n})).filter(i=>i.value/t*100>=1);return p8().value(i=>i.value).sort(null)(r)},"createPieArcs"),ept=o((e,t,r,i)=>{ee.debug(`rendering pie chart +`+e);let n=i.db,a=De(),s=zr(n.getConfig(),a.pie),l=40,h=18,u=4,d=450,p=d,f=oi(t),g=f.append("g");g.attr("transform","translate("+p/2+","+d/2+")");let{themeVariables:m}=a,[y]=Os(m.pieOuterStrokeWidth);y??=2;let b=s.legendPosition,v=s.textPosition,T=s.donutHole>0&&s.donutHole<=.9?s.donutHole:0,x=Math.min(p,d)/2-l,k=Jl().innerRadius(T*x).outerRadius(x),C=Jl().innerRadius(x*v).outerRadius(x*v),E=g.append("g");E.append("circle").attr("cx",0).attr("cy",0).attr("r",x+y/2).attr("class","pieOuterCircle");let w=n.getSections(),_=Jdt(w),L=[m.pie1,m.pie2,m.pie3,m.pie4,m.pie5,m.pie6,m.pie7,m.pie8,m.pie9,m.pie10,m.pie11,m.pie12],N=0;w.forEach(H=>{N+=H});let D=_.filter(H=>(H.data.value/N*100).toFixed(0)!=="0"),M=pl(L).domain([...w.keys()]);E.selectAll("mySlices").data(D).enter().append("path").attr("d",k).attr("fill",H=>M(H.data.label)).attr("class",H=>{let Z="pieCircle";return s.highlightSlice==="hover"?Z+=" highlightedOnHover":s.highlightSlice===H.data.label&&(Z+=" highlighted"),Z}),E.selectAll("mySlices").data(D).enter().append("text").text(H=>(H.data.value/N*100).toFixed(0)+"%").attr("transform",H=>"translate("+C.centroid(H)+")").style("text-anchor","middle").attr("class","slice");let B=g.append("text").text(n.getDiagramTitle()).attr("x",0).attr("y",-(d-50)/2).attr("class","pieTitleText"),A=[...w.entries()].map(([H,Z])=>({label:H,value:Z})),I=g.selectAll(".legend").data(A).enter().append("g").attr("class","legend");I.append("rect").attr("width",h).attr("height",h).style("fill",H=>M(H.label)).style("stroke",H=>M(H.label)),I.append("text").attr("x",h+u).attr("y",h-u).text(H=>n.getShowData()?`${H.label} [${H.value}]`:H.label);let O=Math.max(...I.selectAll("text").nodes().map(H=>H?.getBoundingClientRect().width??0)),R=d,$=p+l,F=h+u,P=A.length*F;switch(b){case"center":I.attr("transform",(H,Z)=>{let se=F*A.length/2,Q=-O/2-(h+u),te=Z*F-se;return"translate("+Q+","+te+")"});break;case"top":R+=P,I.attr("transform",(H,Z)=>{let se=x,Q=-O/2-(h+u),te=Z*F-se;return`translate(${Q}, ${te})`}),E.attr("transform",()=>`translate(0, ${P+F})`);break;case"bottom":R+=P,I.attr("transform",(H,Z)=>{let se=-x-F,Q=-O/2-(h+u),te=Z*F-se;return"translate("+Q+","+te+")"});break;case"left":$+=h+u+O,I.attr("transform",(H,Z)=>{let se=F*A.length/2,Q=-x-(h+u),te=Z*F-se;return"translate("+Q+","+te+")"}),E.attr("transform",()=>`translate(${O+h+u}, 0)`);break;default:$+=h+u+O,I.attr("transform",(H,Z)=>{let se=F*A.length/2,Q=12*h,te=Z*F-se;return"translate("+Q+","+te+")"});break}let z=B.node()?.getBoundingClientRect().width??0,q=p/2-z/2,G=p/2+z/2,W=Math.min(0,q),J=Math.max($,G)-W;f.attr("viewBox",`${W} 0 ${J} ${R}`),Ir(f,R,J,s.useMaxWidth)},"draw"),tpt={draw:ept},rpt={parser:Kdt,db:nSe,renderer:tpt,styles:Qdt}});var kSe={};Kt(kSe,{diagram:()=>cpt});function kH(e){return!/^#?([\dA-Fa-f]{6}|[\dA-Fa-f]{3})$/.test(e)}function oSe(e){return!/^\d+$/.test(e)}function lSe(e){return!/^\d+px$/.test(e)}function Qc(e){return nr(e.trim(),De())}function cSe(e){Oa.setData({quadrant1Text:Qc(e.text)})}function hSe(e){Oa.setData({quadrant2Text:Qc(e.text)})}function uSe(e){Oa.setData({quadrant3Text:Qc(e.text)})}function dSe(e){Oa.setData({quadrant4Text:Qc(e.text)})}function pSe(e){Oa.setData({xAxisLeftText:Qc(e.text)})}function fSe(e){Oa.setData({xAxisRightText:Qc(e.text)})}function gSe(e){Oa.setData({yAxisTopText:Qc(e.text)})}function mSe(e){Oa.setData({yAxisBottomText:Qc(e.text)})}function T_(e){let t={};for(let r of e){let[i,n]=r.trim().split(/\s*:\s*/);if(i==="radius"){if(oSe(n))throw new x_(i,n,"number");t.radius=parseInt(n)}else if(i==="color"){if(kH(n))throw new x_(i,n,"hex code");t.color=n}else if(i==="stroke-color"){if(kH(n))throw new x_(i,n,"hex code");t.strokeColor=n}else if(i==="stroke-width"){if(lSe(n))throw new x_(i,n,"number of pixels (eg. 10px)");t.strokeWidth=n}else throw new Error(`style named ${i} is not supported.`)}return t}function ySe(e,t,r,i,n){let a=T_(n);Oa.addPoints([{x:r,y:i,text:Qc(e.text),className:t,...a}])}function vSe(e,t){Oa.addClass(e,T_(t))}function bSe(e){Oa.setConfig({chartWidth:e})}function xSe(e){Oa.setConfig({chartHeight:e})}function TSe(){let e=De(),{themeVariables:t,quadrantChart:r}=e;return r&&Oa.setConfig(r),Oa.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}),Oa.setData({titleText:Cr()}),Oa.build()}var TH,ipt,_s,npt,x_,Oa,apt,spt,opt,lpt,cpt,CSe=Tt(()=>{tr();Zt();vt();TH=(function(){var e=o(function(fe,Y,Le,xe){for(Le=Le||{},xe=fe.length;xe--;Le[fe[xe]]=Y);return Le},"o"),t=[1,3],r=[1,4],i=[1,5],n=[1,6],a=[1,7],s=[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],h=[55,56,57],u=[2,36],d=[1,37],p=[1,36],f=[1,38],g=[1,35],m=[1,43],y=[1,41],b=[1,45],v=[1,14],T=[1,23],x=[1,18],k=[1,19],C=[1,20],E=[1,21],w=[1,22],_=[1,24],L=[1,25],N=[1,26],D=[1,27],M=[1,28],B=[1,29],A=[1,32],I=[1,33],O=[1,34],R=[1,39],$=[1,40],F=[1,42],P=[1,44],z=[1,63],q=[1,62],G=[4,5,8,10,12,13,14,15,18,44,47,49,55,56,57,63,64,65,66,67],W=[1,66],J=[1,67],H=[1,68],Z=[1,69],se=[1,70],Q=[1,71],te=[1,72],re=[1,73],ne=[1,74],Ae=[1,75],ie=[1,76],me=[1,77],oe=[4,5,6,7,8,9,10,11,12,13,14,15,18],we=[1,91],ye=[1,92],ve=[1,93],ae=[1,100],Pe=[1,94],X=[1,97],ce=[1,95],ge=[1,96],be=[1,98],ke=[1,99],Me=[1,103],pe=[10,55,56,57],Oe=[4,5,6,8,10,11,13,17,18,19,20,55,56,57],j={trace:o(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:o(function(fe,Y,Le,xe,je,Ie,Ve){var Ne=Ie.length-1;switch(je){case 23:this.$=Ie[Ne];break;case 24:this.$=Ie[Ne-1]+""+Ie[Ne];break;case 26:this.$=Ie[Ne-1]+Ie[Ne];break;case 27:this.$=[Ie[Ne].trim()];break;case 28:Ie[Ne-2].push(Ie[Ne].trim()),this.$=Ie[Ne-2];break;case 29:this.$=Ie[Ne-4],xe.addClass(Ie[Ne-2],Ie[Ne]);break;case 37:this.$=[];break;case 42:this.$=Ie[Ne].trim(),xe.setDiagramTitle(this.$);break;case 43:this.$=Ie[Ne].trim(),xe.setAccTitle(this.$);break;case 44:case 45:this.$=Ie[Ne].trim(),xe.setAccDescription(this.$);break;case 46:xe.addSection(Ie[Ne].substr(8)),this.$=Ie[Ne].substr(8);break;case 47:xe.addPoint(Ie[Ne-3],"",Ie[Ne-1],Ie[Ne],[]);break;case 48:xe.addPoint(Ie[Ne-4],Ie[Ne-3],Ie[Ne-1],Ie[Ne],[]);break;case 49:xe.addPoint(Ie[Ne-4],"",Ie[Ne-2],Ie[Ne-1],Ie[Ne]);break;case 50:xe.addPoint(Ie[Ne-5],Ie[Ne-4],Ie[Ne-2],Ie[Ne-1],Ie[Ne]);break;case 51:xe.setXAxisLeftText(Ie[Ne-2]),xe.setXAxisRightText(Ie[Ne]);break;case 52:Ie[Ne-1].text+=" \u27F6 ",xe.setXAxisLeftText(Ie[Ne-1]);break;case 53:xe.setXAxisLeftText(Ie[Ne]);break;case 54:xe.setYAxisBottomText(Ie[Ne-2]),xe.setYAxisTopText(Ie[Ne]);break;case 55:Ie[Ne-1].text+=" \u27F6 ",xe.setYAxisBottomText(Ie[Ne-1]);break;case 56:xe.setYAxisBottomText(Ie[Ne]);break;case 57:xe.setQuadrant1Text(Ie[Ne]);break;case 58:xe.setQuadrant2Text(Ie[Ne]);break;case 59:xe.setQuadrant3Text(Ie[Ne]);break;case 60:xe.setQuadrant4Text(Ie[Ne]);break;case 64:this.$={text:Ie[Ne],type:"text"};break;case 65:this.$={text:Ie[Ne-1].text+""+Ie[Ne],type:Ie[Ne-1].type};break;case 66:this.$={text:Ie[Ne],type:"text"};break;case 67:this.$={text:Ie[Ne],type:"markdown"};break;case 68:this.$=Ie[Ne];break;case 69:this.$=Ie[Ne-1]+""+Ie[Ne];break}},"anonymous"),table:[{18:t,26:1,27:2,28:r,55:i,56:n,57:a},{1:[3]},{18:t,26:8,27:2,28:r,55:i,56:n,57:a},{18:t,26:9,27:2,28:r,55:i,56:n,57:a},e(s,[2,33],{29:10}),e(l,[2,61]),e(l,[2,62]),e(l,[2,63]),{1:[2,30]},{1:[2,31]},e(h,u,{30:11,31:12,24:13,32:15,33:16,34:17,43:30,58:31,1:[2,32],4:d,5:p,10:f,12:g,13:m,14:y,15:b,18:v,25:T,35:x,37:k,39:C,41:E,42:w,48:_,50:L,51:N,52:D,53:M,54:B,60:A,61:I,63:O,64:R,65:$,66:F,67:P}),e(s,[2,34]),{27:46,55:i,56:n,57:a},e(h,[2,37]),e(h,u,{24:13,32:15,33:16,34:17,43:30,58:31,31:47,4:d,5:p,10:f,12:g,13:m,14:y,15:b,18:v,25:T,35:x,37:k,39:C,41:E,42:w,48:_,50:L,51:N,52:D,53:M,54:B,60:A,61:I,63:O,64:R,65:$,66:F,67:P}),e(h,[2,39]),e(h,[2,40]),e(h,[2,41]),{36:[1,48]},{38:[1,49]},{40:[1,50]},e(h,[2,45]),e(h,[2,46]),{18:[1,51]},{4:d,5:p,10:f,12:g,13:m,14:y,15:b,43:52,58:31,60:A,61:I,63:O,64:R,65:$,66:F,67:P},{4:d,5:p,10:f,12:g,13:m,14:y,15:b,43:53,58:31,60:A,61:I,63:O,64:R,65:$,66:F,67:P},{4:d,5:p,10:f,12:g,13:m,14:y,15:b,43:54,58:31,60:A,61:I,63:O,64:R,65:$,66:F,67:P},{4:d,5:p,10:f,12:g,13:m,14:y,15:b,43:55,58:31,60:A,61:I,63:O,64:R,65:$,66:F,67:P},{4:d,5:p,10:f,12:g,13:m,14:y,15:b,43:56,58:31,60:A,61:I,63:O,64:R,65:$,66:F,67:P},{4:d,5:p,10:f,12:g,13:m,14:y,15:b,43:57,58:31,60:A,61:I,63:O,64:R,65:$,66:F,67:P},{4:d,5:p,8:z,10:f,12:g,13:m,14:y,15:b,18:q,44:[1,58],47:[1,59],58:61,59:60,63:O,64:R,65:$,66:F,67:P},e(G,[2,64]),e(G,[2,66]),e(G,[2,67]),e(G,[2,70]),e(G,[2,71]),e(G,[2,72]),e(G,[2,73]),e(G,[2,74]),e(G,[2,75]),e(G,[2,76]),e(G,[2,77]),e(G,[2,78]),e(G,[2,79]),e(G,[2,80]),e(G,[2,81]),e(s,[2,35]),e(h,[2,38]),e(h,[2,42]),e(h,[2,43]),e(h,[2,44]),{3:65,4:W,5:J,6:H,7:Z,8:se,9:Q,10:te,11:re,12:ne,13:Ae,14:ie,15:me,21:64},e(h,[2,53],{59:60,58:61,4:d,5:p,8:z,10:f,12:g,13:m,14:y,15:b,18:q,49:[1,78],63:O,64:R,65:$,66:F,67:P}),e(h,[2,56],{59:60,58:61,4:d,5:p,8:z,10:f,12:g,13:m,14:y,15:b,18:q,49:[1,79],63:O,64:R,65:$,66:F,67:P}),e(h,[2,57],{59:60,58:61,4:d,5:p,8:z,10:f,12:g,13:m,14:y,15:b,18:q,63:O,64:R,65:$,66:F,67:P}),e(h,[2,58],{59:60,58:61,4:d,5:p,8:z,10:f,12:g,13:m,14:y,15:b,18:q,63:O,64:R,65:$,66:F,67:P}),e(h,[2,59],{59:60,58:61,4:d,5:p,8:z,10:f,12:g,13:m,14:y,15:b,18:q,63:O,64:R,65:$,66:F,67:P}),e(h,[2,60],{59:60,58:61,4:d,5:p,8:z,10:f,12:g,13:m,14:y,15:b,18:q,63:O,64:R,65:$,66:F,67:P}),{45:[1,80]},{44:[1,81]},e(G,[2,65]),e(G,[2,82]),e(G,[2,83]),e(G,[2,84]),{3:83,4:W,5:J,6:H,7:Z,8:se,9:Q,10:te,11:re,12:ne,13:Ae,14:ie,15:me,18:[1,82]},e(oe,[2,23]),e(oe,[2,1]),e(oe,[2,2]),e(oe,[2,3]),e(oe,[2,4]),e(oe,[2,5]),e(oe,[2,6]),e(oe,[2,7]),e(oe,[2,8]),e(oe,[2,9]),e(oe,[2,10]),e(oe,[2,11]),e(oe,[2,12]),e(h,[2,52],{58:31,43:84,4:d,5:p,10:f,12:g,13:m,14:y,15:b,60:A,61:I,63:O,64:R,65:$,66:F,67:P}),e(h,[2,55],{58:31,43:85,4:d,5:p,10:f,12:g,13:m,14:y,15:b,60:A,61:I,63:O,64:R,65:$,66:F,67:P}),{46:[1,86]},{45:[1,87]},{4:we,5:ye,6:ve,8:ae,11:Pe,13:X,16:90,17:ce,18:ge,19:be,20:ke,22:89,23:88},e(oe,[2,24]),e(h,[2,51],{59:60,58:61,4:d,5:p,8:z,10:f,12:g,13:m,14:y,15:b,18:q,63:O,64:R,65:$,66:F,67:P}),e(h,[2,54],{59:60,58:61,4:d,5:p,8:z,10:f,12:g,13:m,14:y,15:b,18:q,63:O,64:R,65:$,66:F,67:P}),e(h,[2,47],{22:89,16:90,23:101,4:we,5:ye,6:ve,8:ae,11:Pe,13:X,17:ce,18:ge,19:be,20:ke}),{46:[1,102]},e(h,[2,29],{10:Me}),e(pe,[2,27],{16:104,4:we,5:ye,6:ve,8:ae,11:Pe,13:X,17:ce,18:ge,19:be,20:ke}),e(Oe,[2,25]),e(Oe,[2,13]),e(Oe,[2,14]),e(Oe,[2,15]),e(Oe,[2,16]),e(Oe,[2,17]),e(Oe,[2,18]),e(Oe,[2,19]),e(Oe,[2,20]),e(Oe,[2,21]),e(Oe,[2,22]),e(h,[2,49],{10:Me}),e(h,[2,48],{22:89,16:90,23:105,4:we,5:ye,6:ve,8:ae,11:Pe,13:X,17:ce,18:ge,19:be,20:ke}),{4:we,5:ye,6:ve,8:ae,11:Pe,13:X,16:90,17:ce,18:ge,19:be,20:ke,22:106},e(Oe,[2,26]),e(h,[2,50],{10:Me}),e(pe,[2,28],{16:104,4:we,5:ye,6:ve,8:ae,11:Pe,13:X,17:ce,18:ge,19:be,20:ke})],defaultActions:{8:[2,30],9:[2,31]},parseError:o(function(fe,Y){if(Y.recoverable)this.trace(fe);else{var Le=new Error(fe);throw Le.hash=Y,Le}},"parseError"),parse:o(function(fe){var Y=this,Le=[0],xe=[],je=[null],Ie=[],Ve=this.table,Ne="",Ge=0,ze=0,Ue=0,Ce=2,ct=1,Se=Ie.slice.call(arguments,1),at=Object.create(this.lexer),dt={yy:{}};for(var gt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,gt)&&(dt.yy[gt]=this.yy[gt]);at.setInput(fe,dt.yy),dt.yy.lexer=at,dt.yy.parser=this,typeof at.yylloc>"u"&&(at.yylloc={});var Ct=at.yylloc;Ie.push(Ct);var kt=at.options&&at.options.ranges;typeof dt.yy.parseError=="function"?this.parseError=dt.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function $t(Ee){Le.length=Le.length-2*Ee,je.length=je.length-Ee,Ie.length=Ie.length-Ee}o($t,"popStack");function ut(){var Ee;return Ee=xe.pop()||at.lex()||ct,typeof Ee!="number"&&(Ee instanceof Array&&(xe=Ee,Ee=xe.pop()),Ee=Y.symbols_[Ee]||Ee),Ee}o(ut,"lex");for(var de,st,nt,rt,_e,Ze,He={},yt,_t,Ot,ir;;){if(nt=Le[Le.length-1],this.defaultActions[nt]?rt=this.defaultActions[nt]:((de===null||typeof de>"u")&&(de=ut()),rt=Ve[nt]&&Ve[nt][de]),typeof rt>"u"||!rt.length||!rt[0]){var ur="";ir=[];for(yt in Ve[nt])this.terminals_[yt]&&yt>Ce&&ir.push("'"+this.terminals_[yt]+"'");at.showPosition?ur="Parse error on line "+(Ge+1)+`: +`+at.showPosition()+` +Expecting `+ir.join(", ")+", got '"+(this.terminals_[de]||de)+"'":ur="Parse error on line "+(Ge+1)+": Unexpected "+(de==ct?"end of input":"'"+(this.terminals_[de]||de)+"'"),this.parseError(ur,{text:at.match,token:this.terminals_[de]||de,line:at.yylineno,loc:Ct,expected:ir})}if(rt[0]instanceof Array&&rt.length>1)throw new Error("Parse Error: multiple actions possible at state: "+nt+", token: "+de);switch(rt[0]){case 1:Le.push(de),je.push(at.yytext),Ie.push(at.yylloc),Le.push(rt[1]),de=null,st?(de=st,st=null):(ze=at.yyleng,Ne=at.yytext,Ge=at.yylineno,Ct=at.yylloc,Ue>0&&Ue--);break;case 2:if(_t=this.productions_[rt[1]][1],He.$=je[je.length-_t],He._$={first_line:Ie[Ie.length-(_t||1)].first_line,last_line:Ie[Ie.length-1].last_line,first_column:Ie[Ie.length-(_t||1)].first_column,last_column:Ie[Ie.length-1].last_column},kt&&(He._$.range=[Ie[Ie.length-(_t||1)].range[0],Ie[Ie.length-1].range[1]]),Ze=this.performAction.apply(He,[Ne,ze,Ge,dt.yy,rt[1],je,Ie].concat(Se)),typeof Ze<"u")return Ze;_t&&(Le=Le.slice(0,-1*_t*2),je=je.slice(0,-1*_t),Ie=Ie.slice(0,-1*_t)),Le.push(this.productions_[rt[1]][0]),je.push(He.$),Ie.push(He._$),Ot=Ve[Le[Le.length-2]][Le[Le.length-1]],Le.push(Ot);break;case 3:return!0}}return!0},"parse")},le=(function(){var fe={EOF:1,parseError:o(function(Y,Le){if(this.yy.parser)this.yy.parser.parseError(Y,Le);else throw new Error(Y)},"parseError"),setInput:o(function(Y,Le){return this.yy=Le||this.yy||{},this._input=Y,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:o(function(){var Y=this._input[0];this.yytext+=Y,this.yyleng++,this.offset++,this.match+=Y,this.matched+=Y;var Le=Y.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),Y},"input"),unput:o(function(Y){var Le=Y.length,xe=Y.split(/(?:\r\n?|\n)/g);this._input=Y+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-Le),this.offset-=Le;var je=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),xe.length-1&&(this.yylineno-=xe.length-1);var Ie=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:xe?(xe.length===je.length?this.yylloc.first_column:0)+je[je.length-xe.length].length-xe[0].length:this.yylloc.first_column-Le},this.options.ranges&&(this.yylloc.range=[Ie[0],Ie[0]+this.yyleng-Le]),this.yyleng=this.yytext.length,this},"unput"),more:o(function(){return this._more=!0,this},"more"),reject:o(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:o(function(Y){this.unput(this.match.slice(Y))},"less"),pastInput:o(function(){var Y=this.matched.substr(0,this.matched.length-this.match.length);return(Y.length>20?"...":"")+Y.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:o(function(){var Y=this.match;return Y.length<20&&(Y+=this._input.substr(0,20-Y.length)),(Y.substr(0,20)+(Y.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:o(function(){var Y=this.pastInput(),Le=new Array(Y.length+1).join("-");return Y+this.upcomingInput()+` +`+Le+"^"},"showPosition"),test_match:o(function(Y,Le){var xe,je,Ie;if(this.options.backtrack_lexer&&(Ie={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&&(Ie.yylloc.range=this.yylloc.range.slice(0))),je=Y[0].match(/(?:\r\n?|\n).*/g),je&&(this.yylineno+=je.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:je?je[je.length-1].length-je[je.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+Y[0].length},this.yytext+=Y[0],this.match+=Y[0],this.matches=Y,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(Y[0].length),this.matched+=Y[0],xe=this.performAction.call(this,this.yy,this,Le,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),xe)return xe;if(this._backtrack){for(var Ve in Ie)this[Ve]=Ie[Ve];return!1}return!1},"test_match"),next:o(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var Y,Le,xe,je;this._more||(this.yytext="",this.match="");for(var Ie=this._currentRules(),Ve=0;VeLe[0].length)){if(Le=xe,je=Ve,this.options.backtrack_lexer){if(Y=this.test_match(xe,Ie[Ve]),Y!==!1)return Y;if(this._backtrack){Le=!1;continue}else return!1}else if(!this.options.flex)break}return Le?(Y=this.test_match(Le,Ie[je]),Y!==!1?Y:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:o(function(){var Y=this.next();return Y||this.lex()},"lex"),begin:o(function(Y){this.conditionStack.push(Y)},"begin"),popState:o(function(){var Y=this.conditionStack.length-1;return Y>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:o(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:o(function(Y){return Y=this.conditionStack.length-1-Math.abs(Y||0),Y>=0?this.conditionStack[Y]:"INITIAL"},"topState"),pushState:o(function(Y){this.begin(Y)},"pushState"),stateStackSize:o(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:o(function(Y,Le,xe,je){var Ie=je;switch(xe){case 0:break;case 1:break;case 2:return 55;case 3:break;case 4:return this.begin("title"),35;case 5:return this.popState(),"title_value";case 6:return this.begin("acc_title"),37;case 7:return this.popState(),"acc_title_value";case 8:return this.begin("acc_descr"),39;case 9:return this.popState(),"acc_descr_value";case 10:this.begin("acc_descr_multiline");break;case 11:this.popState();break;case 12:return"acc_descr_multiline_value";case 13:return 48;case 14:return 50;case 15:return 49;case 16:return 51;case 17:return 52;case 18:return 53;case 19:return 54;case 20:return 25;case 21:this.begin("md_string");break;case 22:return"MD_STR";case 23:this.popState();break;case 24:this.begin("string");break;case 25:this.popState();break;case 26:return"STR";case 27:this.begin("class_name");break;case 28:return this.popState(),47;case 29:return this.begin("point_start"),44;case 30:return this.begin("point_x"),45;case 31:this.popState();break;case 32:this.popState(),this.begin("point_y");break;case 33:return this.popState(),46;case 34:return 28;case 35:return 4;case 36:return 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 fe})();j.lexer=le;function U(){this.yy={}}return o(U,"Parser"),U.prototype=j,j.Parser=U,new U})();TH.parser=TH;ipt=TH,_s=Ua(),npt=class{constructor(){this.classes=new Map,this.config=this.getDefaultConfig(),this.themeConfig=this.getDefaultThemeConfig(),this.data=this.getDefaultData()}static{o(this,"QuadrantBuilder")}getDefaultData(){return{titleText:"",quadrant1Text:"",quadrant2Text:"",quadrant3Text:"",quadrant4Text:"",xAxisLeftText:"",xAxisRightText:"",yAxisBottomText:"",yAxisTopText:"",points:[]}}getDefaultConfig(){return{showXAxis:!0,showYAxis:!0,showTitle:!0,chartHeight:rr.quadrantChart?.chartWidth||500,chartWidth:rr.quadrantChart?.chartHeight||500,titlePadding:rr.quadrantChart?.titlePadding||10,titleFontSize:rr.quadrantChart?.titleFontSize||20,quadrantPadding:rr.quadrantChart?.quadrantPadding||5,xAxisLabelPadding:rr.quadrantChart?.xAxisLabelPadding||5,yAxisLabelPadding:rr.quadrantChart?.yAxisLabelPadding||5,xAxisLabelFontSize:rr.quadrantChart?.xAxisLabelFontSize||16,yAxisLabelFontSize:rr.quadrantChart?.yAxisLabelFontSize||16,quadrantLabelFontSize:rr.quadrantChart?.quadrantLabelFontSize||16,quadrantTextTopPadding:rr.quadrantChart?.quadrantTextTopPadding||5,pointTextPadding:rr.quadrantChart?.pointTextPadding||5,pointLabelFontSize:rr.quadrantChart?.pointLabelFontSize||12,pointRadius:rr.quadrantChart?.pointRadius||5,xAxisPosition:rr.quadrantChart?.xAxisPosition||"top",yAxisPosition:rr.quadrantChart?.yAxisPosition||"left",quadrantInternalBorderStrokeWidth:rr.quadrantChart?.quadrantInternalBorderStrokeWidth||1,quadrantExternalBorderStrokeWidth:rr.quadrantChart?.quadrantExternalBorderStrokeWidth||2}}getDefaultThemeConfig(){return{quadrant1Fill:_s.quadrant1Fill,quadrant2Fill:_s.quadrant2Fill,quadrant3Fill:_s.quadrant3Fill,quadrant4Fill:_s.quadrant4Fill,quadrant1TextFill:_s.quadrant1TextFill,quadrant2TextFill:_s.quadrant2TextFill,quadrant3TextFill:_s.quadrant3TextFill,quadrant4TextFill:_s.quadrant4TextFill,quadrantPointFill:_s.quadrantPointFill,quadrantPointTextFill:_s.quadrantPointTextFill,quadrantXAxisTextFill:_s.quadrantXAxisTextFill,quadrantYAxisTextFill:_s.quadrantYAxisTextFill,quadrantTitleFill:_s.quadrantTitleFill,quadrantInternalBorderStrokeFill:_s.quadrantInternalBorderStrokeFill,quadrantExternalBorderStrokeFill:_s.quadrantExternalBorderStrokeFill}}clear(){this.config=this.getDefaultConfig(),this.themeConfig=this.getDefaultThemeConfig(),this.data=this.getDefaultData(),this.classes=new Map,ee.info("clear called")}setData(e){this.data={...this.data,...e}}addPoints(e){this.data.points=[...e,...this.data.points]}addClass(e,t){this.classes.set(e,t)}setConfig(e){ee.trace("setConfig called with: ",e),this.config={...this.config,...e}}setThemeConfig(e){ee.trace("setThemeConfig called with: ",e),this.themeConfig={...this.themeConfig,...e}}calculateSpace(e,t,r,i){let n=this.config.xAxisLabelPadding*2+this.config.xAxisLabelFontSize,a={top:e==="top"&&t?n:0,bottom:e==="bottom"&&t?n:0},s=this.config.yAxisLabelPadding*2+this.config.yAxisLabelFontSize,l={left:this.config.yAxisPosition==="left"&&r?s:0,right:this.config.yAxisPosition==="right"&&r?s:0},h=this.config.titleFontSize+this.config.titlePadding*2,u={top:i?h:0},d=this.config.quadrantPadding+l.left,p=this.config.quadrantPadding+a.top+u.top,f=this.config.chartWidth-this.config.quadrantPadding*2-l.left-l.right,g=this.config.chartHeight-this.config.quadrantPadding*2-a.top-a.bottom-u.top,m=f/2,y=g/2;return{xAxisSpace:a,yAxisSpace:l,titleSpace:u,quadrantSpace:{quadrantLeft:d,quadrantTop:p,quadrantWidth:f,quadrantHalfWidth:m,quadrantHeight:g,quadrantHalfHeight:y}}}getAxisLabels(e,t,r,i){let{quadrantSpace:n,titleSpace:a}=i,{quadrantHalfHeight:s,quadrantHeight:l,quadrantLeft:h,quadrantHalfWidth:u,quadrantTop:d,quadrantWidth:p}=n,f=!!this.data.xAxisRightText,g=!!this.data.yAxisTopText,m=[];return this.data.xAxisLeftText&&t&&m.push({text:this.data.xAxisLeftText,fill:this.themeConfig.quadrantXAxisTextFill,x:h+(f?u/2:0),y:e==="top"?this.config.xAxisLabelPadding+a.top:this.config.xAxisLabelPadding+d+l+this.config.quadrantPadding,fontSize:this.config.xAxisLabelFontSize,verticalPos:f?"center":"left",horizontalPos:"top",rotation:0}),this.data.xAxisRightText&&t&&m.push({text:this.data.xAxisRightText,fill:this.themeConfig.quadrantXAxisTextFill,x:h+u+(f?u/2:0),y:e==="top"?this.config.xAxisLabelPadding+a.top:this.config.xAxisLabelPadding+d+l+this.config.quadrantPadding,fontSize:this.config.xAxisLabelFontSize,verticalPos:f?"center":"left",horizontalPos:"top",rotation:0}),this.data.yAxisBottomText&&r&&m.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:d+l-(g?s/2:0),fontSize:this.config.yAxisLabelFontSize,verticalPos:g?"center":"left",horizontalPos:"top",rotation:-90}),this.data.yAxisTopText&&r&&m.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:d+s-(g?s/2:0),fontSize:this.config.yAxisLabelFontSize,verticalPos:g?"center":"left",horizontalPos:"top",rotation:-90}),m}getQuadrants(e){let{quadrantSpace:t}=e,{quadrantHalfHeight:r,quadrantLeft:i,quadrantHalfWidth:n,quadrantTop:a}=t,s=[{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+n,y:a,width:n,height:r,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:a,width:n,height:r,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:a+r,width:n,height:r,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+n,y:a+r,width:n,height:r,fill:this.themeConfig.quadrant4Fill}];for(let l of s)l.text.x=l.x+l.width/2,this.data.points.length===0?(l.text.y=l.y+l.height/2,l.text.horizontalPos="middle"):(l.text.y=l.y+this.config.quadrantTextTopPadding,l.text.horizontalPos="top");return s}getQuadrantPoints(e){let{quadrantSpace:t}=e,{quadrantHeight:r,quadrantLeft:i,quadrantTop:n,quadrantWidth:a}=t,s=Ql().domain([0,1]).range([i,a+i]),l=Ql().domain([0,1]).range([r+n,n]);return this.data.points.map(h=>{let u=this.classes.get(h.className);return u&&(h={...u,...h}),{x:s(h.x),y:l(h.y),fill:h.color??this.themeConfig.quadrantPointFill,radius:h.radius??this.config.pointRadius,text:{text:h.text,fill:this.themeConfig.quadrantPointTextFill,x:s(h.x),y:l(h.y)+this.config.pointTextPadding,verticalPos:"center",horizontalPos:"top",fontSize:this.config.pointLabelFontSize,rotation:0},strokeColor:h.strokeColor??this.themeConfig.quadrantPointFill,strokeWidth:h.strokeWidth??"0px"}})}getBorders(e){let t=this.config.quadrantExternalBorderStrokeWidth/2,{quadrantSpace:r}=e,{quadrantHalfHeight:i,quadrantHeight:n,quadrantLeft:a,quadrantHalfWidth:s,quadrantTop:l,quadrantWidth:h}=r;return[{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:a-t,y1:l,x2:a+h+t,y2:l},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:a+h,y1:l+t,x2:a+h,y2:l+n-t},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:a-t,y1:l+n,x2:a+h+t,y2:l+n},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:a,y1:l+t,x2:a,y2:l+n-t},{strokeFill:this.themeConfig.quadrantInternalBorderStrokeFill,strokeWidth:this.config.quadrantInternalBorderStrokeWidth,x1:a+s,y1:l+t,x2:a+s,y2:l+n-t},{strokeFill:this.themeConfig.quadrantInternalBorderStrokeFill,strokeWidth:this.config.quadrantInternalBorderStrokeWidth,x1:a+t,y1:l+i,x2:a+h-t,y2:l+i}]}getTitle(e){if(e)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 e=this.config.showXAxis&&!!(this.data.xAxisLeftText||this.data.xAxisRightText),t=this.config.showYAxis&&!!(this.data.yAxisTopText||this.data.yAxisBottomText),r=this.config.showTitle&&!!this.data.titleText,i=this.data.points.length>0?"bottom":this.config.xAxisPosition,n=this.calculateSpace(i,e,t,r);return{points:this.getQuadrantPoints(n),quadrants:this.getQuadrants(n),axisLabels:this.getAxisLabels(i,e,t,n),borderLines:this.getBorders(n),title:this.getTitle(r)}}},x_=class extends Error{static{o(this,"InvalidStyleError")}constructor(e,t,r){super(`value for ${e} ${t} is invalid, please use a valid ${r}`),this.name="InvalidStyleError"}};o(kH,"validateHexCode");o(oSe,"validateNumber");o(lSe,"validateSizeInPixels");o(Qc,"textSanitizer");Oa=new npt;o(cSe,"setQuadrant1Text");o(hSe,"setQuadrant2Text");o(uSe,"setQuadrant3Text");o(dSe,"setQuadrant4Text");o(pSe,"setXAxisLeftText");o(fSe,"setXAxisRightText");o(gSe,"setYAxisTopText");o(mSe,"setYAxisBottomText");o(T_,"parseStyles");o(ySe,"addPoint");o(vSe,"addClass");o(bSe,"setWidth");o(xSe,"setHeight");o(TSe,"getQuadrantData");apt=o(function(){Oa.clear(),ar()},"clear"),spt={setWidth:bSe,setHeight:xSe,setQuadrant1Text:cSe,setQuadrant2Text:hSe,setQuadrant3Text:uSe,setQuadrant4Text:dSe,setXAxisLeftText:pSe,setXAxisRightText:fSe,setYAxisTopText:gSe,setYAxisBottomText:mSe,parseStyles:T_,addPoint:ySe,addClass:vSe,getQuadrantData:TSe,clear:apt,setAccTitle:gr,getAccTitle:xr,setDiagramTitle:_r,getDiagramTitle:Cr,getAccDescription:kr,setAccDescription:Tr},opt=o((e,t,r,i)=>{function n(E){return E==="top"?"hanging":"middle"}o(n,"getDominantBaseLine");function a(E){return E==="left"?"start":"middle"}o(a,"getTextAnchor");function s(E){return`translate(${E.x}, ${E.y}) rotate(${E.rotation||0})`}o(s,"getTransformation");let l=De();ee.debug(`Rendering quadrant chart +`+e);let h=l.securityLevel,u;h==="sandbox"&&(u=tt("#i"+t));let d=(h==="sandbox"?tt(u.nodes()[0].contentDocument.body):tt("body")).select(`[id="${t}"]`),p=d.append("g").attr("class","main"),f=l.quadrantChart?.chartWidth??500,g=l.quadrantChart?.chartHeight??500;Ir(d,g,f,l.quadrantChart?.useMaxWidth??!0),d.attr("viewBox","0 0 "+f+" "+g),i.db.setHeight(g),i.db.setWidth(f);let m=i.db.getQuadrantData(),y=p.append("g").attr("class","quadrants"),b=p.append("g").attr("class","border"),v=p.append("g").attr("class","data-points"),T=p.append("g").attr("class","labels"),x=p.append("g").attr("class","title");m.title&&x.append("text").attr("x",0).attr("y",0).attr("fill",m.title.fill).attr("font-size",m.title.fontSize).attr("dominant-baseline",n(m.title.horizontalPos)).attr("text-anchor",a(m.title.verticalPos)).attr("transform",s(m.title)).text(m.title.text),m.borderLines&&b.selectAll("line").data(m.borderLines).enter().append("line").attr("x1",E=>E.x1).attr("y1",E=>E.y1).attr("x2",E=>E.x2).attr("y2",E=>E.y2).style("stroke",E=>E.strokeFill).style("stroke-width",E=>E.strokeWidth);let k=y.selectAll("g.quadrant").data(m.quadrants).enter().append("g").attr("class","quadrant");k.append("rect").attr("x",E=>E.x).attr("y",E=>E.y).attr("width",E=>E.width).attr("height",E=>E.height).attr("fill",E=>E.fill),k.append("text").attr("x",0).attr("y",0).attr("fill",E=>E.text.fill).attr("font-size",E=>E.text.fontSize).attr("dominant-baseline",E=>n(E.text.horizontalPos)).attr("text-anchor",E=>a(E.text.verticalPos)).attr("transform",E=>s(E.text)).text(E=>E.text.text),T.selectAll("g.label").data(m.axisLabels).enter().append("g").attr("class","label").append("text").attr("x",0).attr("y",0).text(E=>E.text).attr("fill",E=>E.fill).attr("font-size",E=>E.fontSize).attr("dominant-baseline",E=>n(E.horizontalPos)).attr("text-anchor",E=>a(E.verticalPos)).attr("transform",E=>s(E));let C=v.selectAll("g.data-point").data(m.points).enter().append("g").attr("class","data-point");C.append("circle").attr("cx",E=>E.x).attr("cy",E=>E.y).attr("r",E=>E.radius).attr("fill",E=>E.fill).attr("stroke",E=>E.strokeColor).attr("stroke-width",E=>E.strokeWidth),C.append("text").attr("x",0).attr("y",0).text(E=>E.text.text).attr("fill",E=>E.text.fill).attr("font-size",E=>E.text.fontSize).attr("dominant-baseline",E=>n(E.text.horizontalPos)).attr("text-anchor",E=>a(E.text.verticalPos)).attr("transform",E=>s(E.text))},"draw"),lpt={draw:opt},cpt={parser:ipt,db:spt,renderer:lpt,styles:o(()=>"","styles")}});var jSe={};Kt(jSe,{diagram:()=>Cpt});function wH(e){return e.type==="bar"}function k_(e){return e.type==="band"}function Z1(e){return e.type==="linear"}function EH(e,t,r,i){let n=new wSe(i);return k_(e)?new upt(t,r,e.categories,e.title,n):new dpt(t,r,[e.min,e.max],e.title,n)}function SSe(e,t,r,i){let n=new wSe(i);return new ppt(n,e,t,r)}function _Se(e,t,r){return new mpt(e,t,r)}function AH(){let e=Ua(),t=Rt();return zr(e.xyChart,t.themeVariables.xyChart)}function RH(){let e=Rt();return zr(rr.xyChart,e.xyChart)}function LH(){return{yAxis:{type:"linear",title:"",min:1/0,max:-1/0},xAxis:{type:"band",title:"",categories:[]},title:"",plots:[]}}function vT(e){let t=Rt();return nr(e.trim(),t)}function RSe(e){ASe=e}function LSe(e){e==="horizontal"?mT.chartOrientation="horizontal":mT.chartOrientation="vertical"}function $Se(e){si.xAxis.title=vT(e.text)}function $H(e,t){si.xAxis={type:"linear",title:si.xAxis.title,min:e,max:t},C_=!0}function ISe(e){si.xAxis={type:"band",title:si.xAxis.title,categories:e.map(t=>vT(t.text))},C_=!0}function DSe(e){si.yAxis.title=vT(e.text)}function MSe(e,t){si.yAxis={type:"linear",title:si.yAxis.title,min:e,max:t},_H=!0}function NSe(e){let t=Math.min(...e),r=Math.max(...e),i=Z1(si.yAxis)?si.yAxis.min:1/0,n=Z1(si.yAxis)?si.yAxis.max:-1/0;si.yAxis={type:"linear",title:si.yAxis.title,min:Math.min(i,t),max:Math.max(n,r)}}function IH(e){let t=[];if(e.length===0)return t;if(!C_){let r=Z1(si.xAxis)?si.xAxis.min:1/0,i=Z1(si.xAxis)?si.xAxis.max:-1/0;$H(Math.min(r,1),Math.max(i,e.length))}if(k_(si.xAxis)&&e.length>si.xAxis.categories.length&&(e=e.slice(0,si.xAxis.categories.length)),_H||NSe(e),k_(si.xAxis)&&(t=si.xAxis.categories.map((r,i)=>[r,e[i]])),Z1(si.xAxis)){let r=si.xAxis.min,i=si.xAxis.max,n=(i-r)/(e.length-1),a=[];for(let s=r;s<=i;s+=n)a.push(`${s}`);t=a.map((s,l)=>[s,e[l]])}return t}function DH(e){return SH[e===0?0:e%SH.length]}function OSe(e,t){let r=t.map(s=>s.value),i=t.map(s=>s.label?vT(s.label):""),n=IH(r),a=i.some(s=>s!=="");si.plots.push({type:"line",strokeFill:DH(gT),strokeWidth:2,data:n,...a?{pointLabels:i}:{}}),gT++}function BSe(e,t){let r=t.map(n=>n.value),i=IH(r);si.plots.push({type:"bar",fill:DH(gT),data:i}),gT++}function PSe(){if(si.plots.length===0)throw Error("No Plot to render, please provide a plot with some data");return si.title=Cr(),vpt.build(mT,si,yT,ASe)}function FSe(){return yT}function zSe(){return mT}function qSe(){return si}var CH,hpt,wSe,ESe,upt,dpt,ppt,fpt,gpt,mpt,ypt,vpt,gT,ASe,mT,yT,si,SH,C_,_H,bpt,xpt,Tpt,kpt,Cpt,GSe=Tt(()=>{yn();Fn();An();Or();Yr();tr();Zt();vt();CH=(function(){var e=o(function(O,R,$,F){for($=$||{},F=O.length;F--;$[O[F]]=R);return $},"o"),t=[1,10,12,14,16,18,19,21,23],r=[2,6],i=[1,3],n=[1,5],a=[1,6],s=[1,7],l=[1,5,10,12,14,16,18,19,21,23,36,37,38],h=[1,25],u=[1,26],d=[1,28],p=[1,29],f=[1,30],g=[1,31],m=[1,32],y=[1,33],b=[1,34],v=[1,35],T=[1,36],x=[1,37],k=[1,43],C=[1,42],E=[1,47],w=[1,50],_=[1,10,12,14,16,18,19,21,23,36,37,38],L=[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],M=[26,28],B={trace:o(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:o(function(O,R,$,F,P,z,q){var G=z.length-1;switch(P){case 5:F.setOrientation(z[G]);break;case 9:F.setDiagramTitle(z[G].text.trim());break;case 12:F.setLineData({text:"",type:"text"},z[G]);break;case 13:F.setLineData(z[G-1],z[G]);break;case 14:F.setBarData({text:"",type:"text"},z[G]);break;case 15:F.setBarData(z[G-1],z[G]);break;case 16:this.$=z[G].trim(),F.setAccTitle(this.$);break;case 17:case 18:this.$=z[G].trim(),F.setAccDescription(this.$);break;case 19:this.$=z[G-1];break;case 20:case 30:this.$=[z[G-2],...z[G]];break;case 21:case 31:this.$=[z[G]];break;case 22:this.$={value:Number(z[G-1]),label:z[G]};break;case 23:this.$={value:Number(z[G]),label:""};break;case 24:F.setXAxisTitle(z[G]);break;case 25:F.setXAxisTitle(z[G-1]);break;case 26:F.setXAxisTitle({type:"text",text:""});break;case 27:F.setXAxisBand(z[G]);break;case 28:F.setXAxisRangeData(Number(z[G-2]),Number(z[G]));break;case 29:this.$=z[G-1];break;case 32:F.setYAxisTitle(z[G]);break;case 33:F.setYAxisTitle(z[G-1]);break;case 34:F.setYAxisTitle({type:"text",text:""});break;case 35:F.setYAxisRangeData(Number(z[G-2]),Number(z[G]));break;case 39:this.$={text:z[G],type:"text"};break;case 40:this.$={text:z[G],type:"text"};break;case 41:this.$={text:z[G],type:"markdown"};break;case 42:this.$=z[G];break;case 43:this.$=z[G-1]+""+z[G];break}},"anonymous"),table:[e(t,r,{3:1,4:2,7:4,5:i,36:n,37:a,38:s}),{1:[3]},e(t,r,{4:2,7:4,3:8,5:i,36:n,37:a,38:s}),e(t,r,{4:2,7:4,6:9,3:10,5:i,8:[1,11],36:n,37:a,38:s}),{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:i,36:n,37:a,38:s}),{1:[2,3]},e(l,[2,5]),e(t,[2,7],{4:22,36:n,37:a,38:s}),{11:23,30:h,39:24,40:u,41:27,42:d,43:p,44:f,45:g,46:m,47:y,48:b,49:v,50:T,51:x},{11:39,13:38,24:k,29:C,30:h,31:40,32:41,39:24,40:u,41:27,42:d,43:p,44:f,45:g,46:m,47:y,48:b,49:v,50:T,51:x},{11:45,15:44,29:E,30:h,35:46,39:24,40:u,41:27,42:d,43:p,44:f,45:g,46:m,47:y,48:b,49:v,50:T,51:x},{11:49,17:48,24:w,30:h,39:24,40:u,41:27,42:d,43:p,44:f,45:g,46:m,47:y,48:b,49:v,50:T,51:x},{11:52,17:51,24:w,30:h,39:24,40:u,41:27,42:d,43:p,44:f,45:g,46:m,47:y,48:b,49:v,50:T,51:x},{20:[1,53]},{22:[1,54]},e(_,[2,18]),{1:[2,2]},e(_,[2,8]),e(_,[2,9]),e(L,[2,39],{41:55,42:d,43:p,44:f,45:g,46:m,47:y,48:b,49:v,50:T,51:x}),e(L,[2,40]),e(L,[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(_,[2,10]),e(_,[2,24],{32:41,31:56,24:k,29:C}),e(_,[2,26]),e(_,[2,27]),{33:[1,57]},{11:59,30:h,34:58,39:24,40:u,41:27,42:d,43:p,44:f,45:g,46:m,47:y,48:b,49:v,50:T,51:x},e(_,[2,11]),e(_,[2,32],{35:60,29:E}),e(_,[2,34]),{33:[1,61]},e(_,[2,12]),{17:62,24:w},{25:63,27:64,29:D},e(_,[2,14]),{17:66,24:w},e(_,[2,16]),e(_,[2,17]),e(N,[2,43]),e(_,[2,25]),{29:[1,67]},{26:[1,68]},{26:[2,31],28:[1,69]},e(_,[2,33]),{29:[1,70]},e(_,[2,13]),{26:[1,71]},{26:[2,21],28:[1,72]},e(M,[2,23],{30:[1,73]}),e(_,[2,15]),e(_,[2,28]),e(_,[2,29]),{11:59,30:h,34:74,39:24,40:u,41:27,42:d,43:p,44:f,45:g,46:m,47:y,48:b,49:v,50:T,51:x},e(_,[2,35]),e(_,[2,19]),{25:75,27:64,29:D},e(M,[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:o(function(O,R){if(R.recoverable)this.trace(O);else{var $=new Error(O);throw $.hash=R,$}},"parseError"),parse:o(function(O){var R=this,$=[0],F=[],P=[null],z=[],q=this.table,G="",W=0,J=0,H=0,Z=2,se=1,Q=z.slice.call(arguments,1),te=Object.create(this.lexer),re={yy:{}};for(var ne in this.yy)Object.prototype.hasOwnProperty.call(this.yy,ne)&&(re.yy[ne]=this.yy[ne]);te.setInput(O,re.yy),re.yy.lexer=te,re.yy.parser=this,typeof te.yylloc>"u"&&(te.yylloc={});var Ae=te.yylloc;z.push(Ae);var ie=te.options&&te.options.ranges;typeof re.yy.parseError=="function"?this.parseError=re.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function me(Oe){$.length=$.length-2*Oe,P.length=P.length-Oe,z.length=z.length-Oe}o(me,"popStack");function oe(){var Oe;return Oe=F.pop()||te.lex()||se,typeof Oe!="number"&&(Oe instanceof Array&&(F=Oe,Oe=F.pop()),Oe=R.symbols_[Oe]||Oe),Oe}o(oe,"lex");for(var we,ye,ve,ae,Pe,X,ce={},ge,be,ke,Me;;){if(ve=$[$.length-1],this.defaultActions[ve]?ae=this.defaultActions[ve]:((we===null||typeof we>"u")&&(we=oe()),ae=q[ve]&&q[ve][we]),typeof ae>"u"||!ae.length||!ae[0]){var pe="";Me=[];for(ge in q[ve])this.terminals_[ge]&&ge>Z&&Me.push("'"+this.terminals_[ge]+"'");te.showPosition?pe="Parse error on line "+(W+1)+`: +`+te.showPosition()+` +Expecting `+Me.join(", ")+", got '"+(this.terminals_[we]||we)+"'":pe="Parse error on line "+(W+1)+": Unexpected "+(we==se?"end of input":"'"+(this.terminals_[we]||we)+"'"),this.parseError(pe,{text:te.match,token:this.terminals_[we]||we,line:te.yylineno,loc:Ae,expected:Me})}if(ae[0]instanceof Array&&ae.length>1)throw new Error("Parse Error: multiple actions possible at state: "+ve+", token: "+we);switch(ae[0]){case 1:$.push(we),P.push(te.yytext),z.push(te.yylloc),$.push(ae[1]),we=null,ye?(we=ye,ye=null):(J=te.yyleng,G=te.yytext,W=te.yylineno,Ae=te.yylloc,H>0&&H--);break;case 2:if(be=this.productions_[ae[1]][1],ce.$=P[P.length-be],ce._$={first_line:z[z.length-(be||1)].first_line,last_line:z[z.length-1].last_line,first_column:z[z.length-(be||1)].first_column,last_column:z[z.length-1].last_column},ie&&(ce._$.range=[z[z.length-(be||1)].range[0],z[z.length-1].range[1]]),X=this.performAction.apply(ce,[G,J,W,re.yy,ae[1],P,z].concat(Q)),typeof X<"u")return X;be&&($=$.slice(0,-1*be*2),P=P.slice(0,-1*be),z=z.slice(0,-1*be)),$.push(this.productions_[ae[1]][0]),P.push(ce.$),z.push(ce._$),ke=q[$[$.length-2]][$[$.length-1]],$.push(ke);break;case 3:return!0}}return!0},"parse")},A=(function(){var O={EOF:1,parseError:o(function(R,$){if(this.yy.parser)this.yy.parser.parseError(R,$);else throw new Error(R)},"parseError"),setInput:o(function(R,$){return this.yy=$||this.yy||{},this._input=R,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:o(function(){var R=this._input[0];this.yytext+=R,this.yyleng++,this.offset++,this.match+=R,this.matched+=R;var $=R.match(/(?:\r\n?|\n).*/g);return $?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),R},"input"),unput:o(function(R){var $=R.length,F=R.split(/(?:\r\n?|\n)/g);this._input=R+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-$),this.offset-=$;var P=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),F.length-1&&(this.yylineno-=F.length-1);var z=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:F?(F.length===P.length?this.yylloc.first_column:0)+P[P.length-F.length].length-F[0].length:this.yylloc.first_column-$},this.options.ranges&&(this.yylloc.range=[z[0],z[0]+this.yyleng-$]),this.yyleng=this.yytext.length,this},"unput"),more:o(function(){return this._more=!0,this},"more"),reject:o(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:o(function(R){this.unput(this.match.slice(R))},"less"),pastInput:o(function(){var R=this.matched.substr(0,this.matched.length-this.match.length);return(R.length>20?"...":"")+R.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:o(function(){var R=this.match;return R.length<20&&(R+=this._input.substr(0,20-R.length)),(R.substr(0,20)+(R.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:o(function(){var R=this.pastInput(),$=new Array(R.length+1).join("-");return R+this.upcomingInput()+` +`+$+"^"},"showPosition"),test_match:o(function(R,$){var F,P,z;if(this.options.backtrack_lexer&&(z={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&&(z.yylloc.range=this.yylloc.range.slice(0))),P=R[0].match(/(?:\r\n?|\n).*/g),P&&(this.yylineno+=P.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:P?P[P.length-1].length-P[P.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+R[0].length},this.yytext+=R[0],this.match+=R[0],this.matches=R,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(R[0].length),this.matched+=R[0],F=this.performAction.call(this,this.yy,this,$,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),F)return F;if(this._backtrack){for(var q in z)this[q]=z[q];return!1}return!1},"test_match"),next:o(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var R,$,F,P;this._more||(this.yytext="",this.match="");for(var z=this._currentRules(),q=0;q$[0].length)){if($=F,P=q,this.options.backtrack_lexer){if(R=this.test_match(F,z[q]),R!==!1)return R;if(this._backtrack){$=!1;continue}else return!1}else if(!this.options.flex)break}return $?(R=this.test_match($,z[P]),R!==!1?R:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:o(function(){var R=this.next();return R||this.lex()},"lex"),begin:o(function(R){this.conditionStack.push(R)},"begin"),popState:o(function(){var R=this.conditionStack.length-1;return R>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:o(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:o(function(R){return R=this.conditionStack.length-1-Math.abs(R||0),R>=0?this.conditionStack[R]:"INITIAL"},"topState"),pushState:o(function(R){this.begin(R)},"pushState"),stateStackSize:o(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:o(function(R,$,F,P){var z=P;switch(F){case 0:break;case 1:break;case 2:return this.popState(),36;case 3:return this.popState(),36;case 4:return 36;case 5:break;case 6:return 10;case 7:return this.pushState("acc_title"),19;case 8:return this.popState(),"acc_title_value";case 9:return this.pushState("acc_descr"),21;case 10:return this.popState(),"acc_descr_value";case 11:this.pushState("acc_descr_multiline");break;case 12:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:return 5;case 15:return 5;case 16:return 8;case 17:return this.pushState("axis_data"),"X_AXIS";case 18:return this.pushState("axis_data"),"Y_AXIS";case 19:return this.pushState("axis_band_data"),24;case 20:return 33;case 21:return this.pushState("data"),16;case 22:return this.pushState("data"),18;case 23:return this.pushState("data_inner"),24;case 24:return 29;case 25:return this.popState(),26;case 26:this.popState();break;case 27:this.pushState("string");break;case 28:this.popState();break;case 29:return"STR";case 30:return 24;case 31:return 26;case 32:return 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 O})();B.lexer=A;function I(){this.yy={}}return o(I,"Parser"),I.prototype=B,B.Parser=I,new I})();CH.parser=CH;hpt=CH;o(wH,"isBarPlot");o(k_,"isBandAxisData");o(Z1,"isLinearAxisData");wSe=class{constructor(e){this.parentGroup=e}static{o(this,"TextDimensionCalculatorWithFont")}getMaxDimension(e,t){if(!this.parentGroup)return{width:e.reduce((n,a)=>Math.max(a.length,n),0)*t,height:t};let r={width:0,height:0},i=this.parentGroup.append("g").attr("visibility","hidden").attr("font-size",t);for(let n of e){let a=x$(i,1,n),s=a?a.width:n.length*t,l=a?a.height:t;r.width=Math.max(r.width,s),r.height=Math.max(r.height,l)}return i.remove(),r}},ESe=class{constructor(e,t,r,i){this.axisConfig=e,this.title=t,this.textDimensionCalculator=r,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{o(this,"BaseAxis")}setRange(e){this.range=e,this.axisPosition==="left"||this.axisPosition==="right"?this.boundingRect.height=e[1]-e[0]:this.boundingRect.width=e[1]-e[0],this.recalculateScale()}getRange(){return[this.range[0]+this.outerPadding,this.range[1]-this.outerPadding]}setAxisPosition(e){this.axisPosition=e,this.setRange(this.range)}getTickDistance(){let e=this.getRange();return Math.abs(e[0]-e[1])/this.getTickValues().length}getAxisOuterPadding(){return this.outerPadding}getLabelDimension(){return this.textDimensionCalculator.getMaxDimension(this.getTickValues().map(e=>e.toString()),this.axisConfig.labelFontSize)}recalculateOuterPaddingToDrawBar(){.7*this.getTickDistance()>this.outerPadding*2&&(this.outerPadding=Math.floor(.7*this.getTickDistance()/2)),this.recalculateScale()}calculateSpaceIfDrawnHorizontally(e){let t=e.height;if(this.axisConfig.showAxisLine&&t>this.axisConfig.axisLineWidth&&(t-=this.axisConfig.axisLineWidth,this.showAxisLine=!0),this.axisConfig.showLabel){let r=this.getLabelDimension(),i=.2*e.width;this.outerPadding=Math.min(r.width/2,i);let n=r.height;this.axisPosition==="bottom"&&this.normalizedLabelRotationInRad!==0&&(n=Math.max(n,Math.abs(Math.sin(this.normalizedLabelRotationInRad)*r.width)+Math.abs(Math.cos(this.normalizedLabelRotationInRad)*r.height))),n+=this.axisConfig.labelPadding*2,this.labelTextHeight=r.height,n<=t&&(t-=n,this.showLabel=!0)}if(this.axisConfig.showTick&&t>=this.axisConfig.tickLength&&(this.showTick=!0,t-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title){let r=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),i=r.height+this.axisConfig.titlePadding*2;this.titleTextHeight=r.height,i<=t&&(t-=i,this.showTitle=!0)}this.boundingRect.width=e.width,this.boundingRect.height=e.height-t}calculateSpaceIfDrawnVertical(e){let t=e.width;if(this.axisConfig.showAxisLine&&t>this.axisConfig.axisLineWidth&&(t-=this.axisConfig.axisLineWidth,this.showAxisLine=!0),this.axisConfig.showLabel){let r=this.getLabelDimension(),i=.2*e.height;this.outerPadding=Math.min(r.height/2,i);let n=r.width+this.axisConfig.labelPadding*2;n<=t&&(t-=n,this.showLabel=!0)}if(this.axisConfig.showTick&&t>=this.axisConfig.tickLength&&(this.showTick=!0,t-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title){let r=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),i=r.height+this.axisConfig.titlePadding*2;this.titleTextHeight=r.height,i<=t&&(t-=i,this.showTitle=!0)}this.boundingRect.width=e.width-t,this.boundingRect.height=e.height}calculateSpace(e){return this.axisPosition==="left"||this.axisPosition==="right"?this.calculateSpaceIfDrawnVertical(e):this.calculateSpaceIfDrawnHorizontally(e),this.recalculateScale(),{width:this.boundingRect.width,height:this.boundingRect.height}}setBoundingBoxXY(e){this.boundingRect.x=e.x,this.boundingRect.y=e.y}calculateOffsetByRotation(e){let t=this.normalizedLabelRotationInRad;return t===0?0:Math.sin(t)*this.getLabelDimension()[e]/2}getDrawableElementsForLeftAxis(){let e=[];if(this.showAxisLine){let t=this.boundingRect.x+this.boundingRect.width-this.axisConfig.axisLineWidth/2;e.push({type:"path",groupTexts:["left-axis","axisl-line"],data:[{path:`M ${t},${this.boundingRect.y} L ${t},${this.boundingRect.y+this.boundingRect.height} `,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&e.push({type:"text",groupTexts:["left-axis","label"],data:this.getTickValues().map(t=>({text:t.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(t),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"middle",horizontalPos:"right"}))}),this.showTick){let t=this.boundingRect.x+this.boundingRect.width-(this.showAxisLine?this.axisConfig.axisLineWidth:0);e.push({type:"path",groupTexts:["left-axis","ticks"],data:this.getTickValues().map(r=>({path:`M ${t},${this.getScaleValue(r)} L ${t-this.axisConfig.tickLength},${this.getScaleValue(r)}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&e.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"}]}),e}getDrawableElementsForBottomAxis(){let e=[];if(this.showAxisLine){let t=this.boundingRect.y+this.axisConfig.axisLineWidth/2;e.push({type:"path",groupTexts:["bottom-axis","axis-line"],data:[{path:`M ${this.boundingRect.x},${t} L ${this.boundingRect.x+this.boundingRect.width},${t}`,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&e.push({type:"text",groupTexts:["bottom-axis","label"],data:this.getTickValues().map(t=>({text:t.toString(),x:this.getScaleValue(t)+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 t=this.boundingRect.y+(this.showAxisLine?this.axisConfig.axisLineWidth:0);e.push({type:"path",groupTexts:["bottom-axis","ticks"],data:this.getTickValues().map(r=>({path:`M ${this.getScaleValue(r)},${t} L ${this.getScaleValue(r)},${t+this.axisConfig.tickLength}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&e.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"}]}),e}getDrawableElementsForTopAxis(){let e=[];if(this.showAxisLine){let t=this.boundingRect.y+this.boundingRect.height-this.axisConfig.axisLineWidth/2;e.push({type:"path",groupTexts:["top-axis","axis-line"],data:[{path:`M ${this.boundingRect.x},${t} L ${this.boundingRect.x+this.boundingRect.width},${t}`,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&e.push({type:"text",groupTexts:["top-axis","label"],data:this.getTickValues().map(t=>({text:t.toString(),x:this.getScaleValue(t),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 t=this.boundingRect.y;e.push({type:"path",groupTexts:["top-axis","ticks"],data:this.getTickValues().map(r=>({path:`M ${this.getScaleValue(r)},${t+this.boundingRect.height-(this.showAxisLine?this.axisConfig.axisLineWidth:0)} L ${this.getScaleValue(r)},${t+this.boundingRect.height-this.axisConfig.tickLength-(this.showAxisLine?this.axisConfig.axisLineWidth:0)}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&e.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"}]}),e}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():[]}},upt=class extends ESe{static{o(this,"BandAxis")}constructor(e,t,r,i,n){super(e,i,n,t),this.categories=r,this.scale=Hy().domain(this.categories).range(this.getRange())}setRange(e){super.setRange(e)}recalculateScale(){this.scale=Hy().domain(this.categories).range(this.getRange()).paddingInner(1).paddingOuter(0).align(.5),ee.trace("BandAxis axis final categories, range: ",this.categories,this.getRange())}getTickValues(){return this.categories}getScaleValue(e){return this.scale(e)??this.getRange()[0]}},dpt=class extends ESe{static{o(this,"LinearAxis")}constructor(e,t,r,i,n){super(e,i,n,t),this.domain=r,this.scale=Ql().domain(this.domain).range(this.getRange())}getTickValues(){return this.scale.ticks()}recalculateScale(){let e=[...this.domain];this.axisPosition==="left"&&e.reverse(),this.scale=Ql().domain(e).range(this.getRange())}getScaleValue(e){return this.scale(e)}};o(EH,"getAxis");ppt=class{constructor(e,t,r,i){this.textDimensionCalculator=e,this.chartConfig=t,this.chartData=r,this.chartThemeConfig=i,this.boundingRect={x:0,y:0,width:0,height:0},this.showChartTitle=!1}static{o(this,"ChartTitle")}setBoundingBoxXY(e){this.boundingRect.x=e.x,this.boundingRect.y=e.y}calculateSpace(e){let t=this.textDimensionCalculator.getMaxDimension([this.chartData.title],this.chartConfig.titleFontSize),r=Math.max(t.width,e.width),i=t.height+2*this.chartConfig.titlePadding;return t.width<=r&&t.height<=i&&this.chartConfig.showTitle&&this.chartData.title&&(this.boundingRect.width=r,this.boundingRect.height=i,this.showChartTitle=!0),{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){let e=[];return this.showChartTitle&&e.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}]}),e}};o(SSe,"getChartTitleComponent");fpt=class{constructor(e,t,r,i,n){this.plotData=e,this.xAxis=t,this.yAxis=r,this.orientation=i,this.plotIndex=n}static{o(this,"LinePlot")}getDrawableElement(){let e=this.plotData.data.map(i=>[this.xAxis.getScaleValue(i[0]),this.yAxis.getScaleValue(i[1])]),t;if(this.orientation==="horizontal"?t=ec().y(i=>i[0]).x(i=>i[1])(e):t=ec().x(i=>i[0]).y(i=>i[1])(e),!t)return[];let r=[{groupTexts:["plot",`line-plot-${this.plotIndex}`],type:"path",data:[{path:t,strokeFill:this.plotData.strokeFill,strokeWidth:this.plotData.strokeWidth}]}];if(this.plotData.pointLabels&&this.plotData.pointLabels.length>0){let i=[];for(let[n,[a,s]]of e.entries()){let l=this.plotData.pointLabels[n];l&&(this.orientation==="horizontal"?i.push({x:s+10,y:a,text:l,fill:this.plotData.strokeFill,verticalPos:"middle",horizontalPos:"left",fontSize:12,rotation:0}):i.push({x:a,y:s-10,text:l,fill:this.plotData.strokeFill,verticalPos:"middle",horizontalPos:"center",fontSize:12,rotation:0}))}i.length>0&&r.push({groupTexts:["plot",`line-plot-${this.plotIndex}`,"labels"],type:"text",data:i})}return r}},gpt=class{constructor(e,t,r,i,n,a){this.barData=e,this.boundingRect=t,this.xAxis=r,this.yAxis=i,this.orientation=n,this.plotIndex=a}static{o(this,"BarPlot")}getDrawableElement(){let e=this.barData.data.map(i=>[this.xAxis.getScaleValue(i[0]),this.yAxis.getScaleValue(i[1])]),t=Math.min(this.xAxis.getAxisOuterPadding()*2,this.xAxis.getTickDistance())*(1-.05),r=t/2;return this.orientation==="horizontal"?[{groupTexts:["plot",`bar-plot-${this.plotIndex}`],type:"rect",data:e.map(i=>({x:this.boundingRect.x,y:i[0]-r,height:t,width:i[1]-this.boundingRect.x,fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill}))}]:[{groupTexts:["plot",`bar-plot-${this.plotIndex}`],type:"rect",data:e.map(i=>({x:i[0]-r,y:i[1],width:t,height:this.boundingRect.y+this.boundingRect.height-i[1],fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill}))}]}},mpt=class{constructor(e,t,r){this.chartConfig=e,this.chartData=t,this.chartThemeConfig=r,this.boundingRect={x:0,y:0,width:0,height:0}}static{o(this,"BasePlot")}setAxes(e,t){this.xAxis=e,this.yAxis=t}setBoundingBoxXY(e){this.boundingRect.x=e.x,this.boundingRect.y=e.y}calculateSpace(e){return this.boundingRect.width=e.width,this.boundingRect.height=e.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 e=[];for(let[t,r]of this.chartData.plots.entries())switch(r.type){case"line":{let i=new fpt(r,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,t);e.push(...i.getDrawableElement())}break;case"bar":{let i=new gpt(r,this.boundingRect,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,t);e.push(...i.getDrawableElement())}break}return e}};o(_Se,"getPlotComponent");ypt=class{constructor(e,t,r,i){this.chartConfig=e,this.chartData=t,this.componentStore={title:SSe(e,t,r,i),plot:_Se(e,t,r),xAxis:EH(t.xAxis,e.xAxis,{titleColor:r.xAxisTitleColor,labelColor:r.xAxisLabelColor,tickColor:r.xAxisTickColor,axisLineColor:r.xAxisLineColor},i),yAxis:EH(t.yAxis,e.yAxis,{titleColor:r.yAxisTitleColor,labelColor:r.yAxisLabelColor,tickColor:r.yAxisTickColor,axisLineColor:r.yAxisLineColor},i)}}static{o(this,"Orchestrator")}calculateVerticalSpace(){let e=this.chartConfig.width,t=this.chartConfig.height,r=0,i=0,n=Math.floor(e*this.chartConfig.plotReservedSpacePercent/100),a=Math.floor(t*this.chartConfig.plotReservedSpacePercent/100),s=this.componentStore.plot.calculateSpace({width:n,height:a});e-=s.width,t-=s.height,s=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:t}),i=s.height,t-=s.height,this.componentStore.xAxis.setAxisPosition("bottom"),s=this.componentStore.xAxis.calculateSpace({width:e,height:t}),t-=s.height,this.componentStore.yAxis.setAxisPosition("left"),s=this.componentStore.yAxis.calculateSpace({width:e,height:t}),r=s.width,e-=s.width,e>0&&(n+=e,e=0),t>0&&(a+=t,t=0),this.componentStore.plot.calculateSpace({width:n,height:a}),this.componentStore.plot.setBoundingBoxXY({x:r,y:i}),this.componentStore.xAxis.setRange([r,r+n]),this.componentStore.xAxis.setBoundingBoxXY({x:r,y:i+a}),this.componentStore.yAxis.setRange([i,i+a]),this.componentStore.yAxis.setBoundingBoxXY({x:0,y:i}),this.chartData.plots.some(l=>wH(l))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateHorizontalSpace(){let e=this.chartConfig.width,t=this.chartConfig.height,r=0,i=0,n=0,a=Math.floor(e*this.chartConfig.plotReservedSpacePercent/100),s=Math.floor(t*this.chartConfig.plotReservedSpacePercent/100),l=this.componentStore.plot.calculateSpace({width:a,height:s});e-=l.width,t-=l.height,l=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:t}),r=l.height,t-=l.height,this.componentStore.xAxis.setAxisPosition("left"),l=this.componentStore.xAxis.calculateSpace({width:e,height:t}),e-=l.width,i=l.width,this.componentStore.yAxis.setAxisPosition("top"),l=this.componentStore.yAxis.calculateSpace({width:e,height:t}),t-=l.height,n=r+l.height,e>0&&(a+=e,e=0),t>0&&(s+=t,t=0),this.componentStore.plot.calculateSpace({width:a,height:s}),this.componentStore.plot.setBoundingBoxXY({x:i,y:n}),this.componentStore.yAxis.setRange([i,i+a]),this.componentStore.yAxis.setBoundingBoxXY({x:i,y:r}),this.componentStore.xAxis.setRange([n,n+s]),this.componentStore.xAxis.setBoundingBoxXY({x:0,y:n}),this.chartData.plots.some(h=>wH(h))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateSpace(){this.chartConfig.chartOrientation==="horizontal"?this.calculateHorizontalSpace():this.calculateVerticalSpace()}getDrawableElement(){this.calculateSpace();let e=[];this.componentStore.plot.setAxes(this.componentStore.xAxis,this.componentStore.yAxis);for(let t of Object.values(this.componentStore))e.push(...t.getDrawableElements());return e}},vpt=class{static{o(this,"XYChartBuilder")}static build(e,t,r,i){return new ypt(e,t,r,i).getDrawableElement()}},gT=0,mT=RH(),yT=AH(),si=LH(),SH=yT.plotColorPalette.split(",").map(e=>e.trim()),C_=!1,_H=!1;o(AH,"getChartDefaultThemeConfig");o(RH,"getChartDefaultConfig");o(LH,"getChartDefaultData");o(vT,"textSanitizer");o(RSe,"setTmpSVGG");o(LSe,"setOrientation");o($Se,"setXAxisTitle");o($H,"setXAxisRangeData");o(ISe,"setXAxisBand");o(DSe,"setYAxisTitle");o(MSe,"setYAxisRangeData");o(NSe,"setYAxisRangeFromPlotData");o(IH,"transformDataWithoutCategory");o(DH,"getPlotColorFromPalette");o(OSe,"setLineData");o(BSe,"setBarData");o(PSe,"getDrawableElem");o(FSe,"getChartThemeConfig");o(zSe,"getChartConfig");o(qSe,"getXYChartData");bpt=o(function(){ar(),gT=0,mT=RH(),si=LH(),yT=AH(),SH=yT.plotColorPalette.split(",").map(e=>e.trim()),C_=!1,_H=!1},"clear"),xpt={getDrawableElem:PSe,clear:bpt,setAccTitle:gr,getAccTitle:xr,setDiagramTitle:_r,getDiagramTitle:Cr,getAccDescription:kr,setAccDescription:Tr,setOrientation:LSe,setXAxisTitle:$Se,setXAxisRangeData:$H,setXAxisBand:ISe,setYAxisTitle:DSe,setYAxisRangeData:MSe,setLineData:OSe,setBarData:BSe,setTmpSVGG:RSe,getChartThemeConfig:FSe,getChartConfig:zSe,getXYChartData:qSe},Tpt=o((e,t,r,i)=>{let n=i.db,a=n.getChartThemeConfig(),s=n.getChartConfig(),l=n.getXYChartData().plots[0].data.map(x=>x[1]);function h(x){return x==="top"?"text-before-edge":"middle"}o(h,"getDominantBaseLine");function u(x){return x==="left"?"start":x==="right"?"end":"middle"}o(u,"getTextAnchor");function d(x){return`translate(${x.x}, ${x.y}) rotate(${x.rotation||0})`}o(d,"getTextTransformation"),ee.debug(`Rendering xychart chart +`+e);let p=oi(t),f=p.append("g").attr("class","main"),g=f.append("rect").attr("width",s.width).attr("height",s.height).attr("class","background");Ir(p,s.height,s.width,!0),p.attr("viewBox",`0 0 ${s.width} ${s.height}`),g.attr("fill",a.backgroundColor),n.setTmpSVGG(p.append("g").attr("class","mermaid-tmp-group"));let m=n.getDrawableElem(),y={};function b(x){let k=f,C="";for(let[E]of x.entries()){let w=f;E>0&&y[C]&&(w=y[C]),C+=x[E],k=y[C],k||(k=y[C]=w.append("g").attr("class",x[E]))}return k}o(b,"getGroup");for(let x of m){if(x.data.length===0)continue;let k=b(x.groupTexts);switch(x.type){case"rect":if(k.selectAll("rect").data(x.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),s.showDataLabel){let C=s.showDataLabelOutsideBar;if(s.chartOrientation==="horizontal"){let E=function(B,A){let{data:I,label:O}=B;return A*O.length*.7<=I.width-10};var v=E;o(E,"fitsHorizontally");let w=.7,_=10,L=x.data.map((B,A)=>({data:B,label:l[A].toString()})).filter(B=>B.data.width>0&&B.data.height>0),N=L.map(B=>{let{data:A}=B,I=A.height*.7;for(;!E(B,I)&&I>0;)I-=1;return I}),D=Math.floor(Math.min(...N)),M=o(B=>C?B.data.x+B.data.width+10:B.data.x+B.data.width-10,"determineLabelXPosition");k.selectAll("text").data(L).enter().append("text").attr("x",M).attr("y",B=>B.data.y+B.data.height/2).attr("text-anchor",C?"start":"end").attr("dominant-baseline","middle").attr("fill",a.dataLabelColor).attr("font-size",`${D}px`).text(B=>B.label)}else{let E=function(M,B,A){let{data:I,label:O}=M,R=B*O.length*.7,$=I.x+I.width/2,F=$-R/2,P=$+R/2,z=F>=I.x&&P<=I.x+I.width,q=I.y+A+B<=I.y+I.height;return z&&q};var T=E;o(E,"fitsInBar");let w=10,_=x.data.map((M,B)=>({data:M,label:l[B].toString()})).filter(M=>M.data.width>0&&M.data.height>0),L=_.map(M=>{let{data:B,label:A}=M,I=B.width/(A.length*.7);for(;!E(M,I,10)&&I>0;)I-=1;return I}),N=Math.floor(Math.min(...L)),D=o(M=>C?M.data.y-10:M.data.y+10,"determineLabelYPosition");k.selectAll("text").data(_).enter().append("text").attr("x",M=>M.data.x+M.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(M=>M.label)}}break;case"text":k.selectAll("text").data(x.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=>h(C.verticalPos)).attr("text-anchor",C=>u(C.horizontalPos)).attr("transform",C=>d(C)).text(C=>C.text);break;case"path":k.selectAll("path").data(x.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"),kpt={draw:Tpt},Cpt={parser:hpt,db:xpt,renderer:kpt}});var USe={};Kt(USe,{diagram:()=>Lpt});var MH,wpt,Ept,Spt,_pt,Apt,WSe,Rpt,Lpt,VSe=Tt(()=>{fo();Ws();js();Bs();ha();Zn();sa();ds();la();Fn();An();Or();Yr();tr();Zt();vt();MH=(function(){var e=o(function(Oe,j,le,U){for(le=le||{},U=Oe.length;U--;le[Oe[U]]=j);return le},"o"),t=[1,3],r=[1,4],i=[1,5],n=[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],s=[1,22],l=[2,7],h=[1,26],u=[1,27],d=[1,28],p=[1,29],f=[1,33],g=[1,34],m=[1,35],y=[1,36],b=[1,37],v=[1,38],T=[1,24],x=[1,31],k=[1,32],C=[1,30],E=[1,39],w=[1,40],_=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],L=[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],M=[27,29],B=[1,70],A=[1,71],I=[1,72],O=[1,73],R=[1,74],$=[1,75],F=[1,76],P=[1,83],z=[1,80],q=[1,84],G=[1,85],W=[1,86],J=[1,87],H=[1,88],Z=[1,89],se=[1,90],Q=[1,91],te=[1,92],re=[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],ne=[63,64],Ae=[1,101],ie=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,76,77,89,90],me=[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],oe=[1,110],we=[1,106],ye=[1,107],ve=[1,108],ae=[1,109],Pe=[1,111],X=[1,116],ce=[1,117],ge=[1,114],be=[1,115],ke={trace:o(function(){},"trace"),yy:{},symbols_:{error:2,start:3,directive:4,NEWLINE:5,RD:6,diagram:7,EOF:8,acc_title:9,acc_title_value:10,acc_descr:11,acc_descr_value:12,acc_descr_multiline_value:13,requirementDef:14,elementDef:15,relationshipDef:16,direction:17,styleStatement:18,classDefStatement:19,classStatement:20,direction_tb:21,direction_bt:22,direction_rl:23,direction_lr:24,requirementType:25,requirementName:26,STRUCT_START:27,requirementBody:28,STYLE_SEPARATOR:29,idList:30,ID:31,COLONSEP:32,id:33,TEXT:34,text:35,RISK:36,riskLevel:37,VERIFYMTHD:38,verifyType:39,STRUCT_STOP:40,REQUIREMENT:41,FUNCTIONAL_REQUIREMENT:42,INTERFACE_REQUIREMENT:43,PERFORMANCE_REQUIREMENT:44,PHYSICAL_REQUIREMENT:45,DESIGN_CONSTRAINT:46,LOW_RISK:47,MED_RISK:48,HIGH_RISK:49,VERIFY_ANALYSIS:50,VERIFY_DEMONSTRATION:51,VERIFY_INSPECTION:52,VERIFY_TEST:53,ELEMENT:54,elementName:55,elementBody:56,TYPE:57,type:58,DOCREF:59,ref:60,END_ARROW_L:61,relationship:62,LINE:63,END_ARROW_R:64,CONTAINS:65,COPIES:66,DERIVES:67,SATISFIES:68,VERIFIES:69,REFINES:70,TRACES:71,CLASSDEF:72,stylesOpt:73,CLASS:74,ALPHA:75,COMMA:76,STYLE:77,style:78,styleComponent:79,NUM:80,COLON:81,UNIT:82,SPACE:83,BRKT:84,PCT:85,MINUS:86,LABEL:87,SEMICOLON:88,unqString:89,qString:90,$accept:0,$end:1},terminals_:{2:"error",5:"NEWLINE",6:"RD",8:"EOF",9:"acc_title",10:"acc_title_value",11:"acc_descr",12:"acc_descr_value",13:"acc_descr_multiline_value",21:"direction_tb",22:"direction_bt",23:"direction_rl",24:"direction_lr",27:"STRUCT_START",29:"STYLE_SEPARATOR",31:"ID",32:"COLONSEP",34:"TEXT",36:"RISK",38:"VERIFYMTHD",40:"STRUCT_STOP",41:"REQUIREMENT",42:"FUNCTIONAL_REQUIREMENT",43:"INTERFACE_REQUIREMENT",44:"PERFORMANCE_REQUIREMENT",45:"PHYSICAL_REQUIREMENT",46:"DESIGN_CONSTRAINT",47:"LOW_RISK",48:"MED_RISK",49:"HIGH_RISK",50:"VERIFY_ANALYSIS",51:"VERIFY_DEMONSTRATION",52:"VERIFY_INSPECTION",53:"VERIFY_TEST",54:"ELEMENT",57:"TYPE",59:"DOCREF",61:"END_ARROW_L",63:"LINE",64:"END_ARROW_R",65:"CONTAINS",66:"COPIES",67:"DERIVES",68:"SATISFIES",69:"VERIFIES",70:"REFINES",71:"TRACES",72:"CLASSDEF",74:"CLASS",75:"ALPHA",76:"COMMA",77:"STYLE",80:"NUM",81:"COLON",82:"UNIT",83:"SPACE",84:"BRKT",85:"PCT",86:"MINUS",87:"LABEL",88:"SEMICOLON",89:"unqString",90:"qString"},productions_:[0,[3,3],[3,2],[3,4],[4,2],[4,2],[4,1],[7,0],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[17,1],[17,1],[17,1],[17,1],[14,5],[14,7],[28,5],[28,5],[28,5],[28,5],[28,2],[28,1],[25,1],[25,1],[25,1],[25,1],[25,1],[25,1],[37,1],[37,1],[37,1],[39,1],[39,1],[39,1],[39,1],[15,5],[15,7],[56,5],[56,5],[56,2],[56,1],[16,5],[16,5],[62,1],[62,1],[62,1],[62,1],[62,1],[62,1],[62,1],[19,3],[20,3],[20,3],[30,1],[30,3],[30,1],[30,3],[18,3],[73,1],[73,3],[78,1],[78,2],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[26,1],[26,1],[33,1],[33,1],[35,1],[35,1],[55,1],[55,1],[58,1],[58,1],[60,1],[60,1]],performAction:o(function(Oe,j,le,U,fe,Y,Le){var xe=Y.length-1;switch(fe){case 4:this.$=Y[xe].trim(),U.setAccTitle(this.$);break;case 5:case 6:this.$=Y[xe].trim(),U.setAccDescription(this.$);break;case 7:this.$=[];break;case 17:U.setDirection("TB");break;case 18:U.setDirection("BT");break;case 19:U.setDirection("RL");break;case 20:U.setDirection("LR");break;case 21:U.addRequirement(Y[xe-3],Y[xe-4]);break;case 22:U.addRequirement(Y[xe-5],Y[xe-6]),U.setClass([Y[xe-5]],Y[xe-3]);break;case 23:U.setNewReqId(Y[xe-2]);break;case 24:U.setNewReqText(Y[xe-2]);break;case 25:U.setNewReqRisk(Y[xe-2]);break;case 26:U.setNewReqVerifyMethod(Y[xe-2]);break;case 29:this.$=U.RequirementType.REQUIREMENT;break;case 30:this.$=U.RequirementType.FUNCTIONAL_REQUIREMENT;break;case 31:this.$=U.RequirementType.INTERFACE_REQUIREMENT;break;case 32:this.$=U.RequirementType.PERFORMANCE_REQUIREMENT;break;case 33:this.$=U.RequirementType.PHYSICAL_REQUIREMENT;break;case 34:this.$=U.RequirementType.DESIGN_CONSTRAINT;break;case 35:this.$=U.RiskLevel.LOW_RISK;break;case 36:this.$=U.RiskLevel.MED_RISK;break;case 37:this.$=U.RiskLevel.HIGH_RISK;break;case 38:this.$=U.VerifyType.VERIFY_ANALYSIS;break;case 39:this.$=U.VerifyType.VERIFY_DEMONSTRATION;break;case 40:this.$=U.VerifyType.VERIFY_INSPECTION;break;case 41:this.$=U.VerifyType.VERIFY_TEST;break;case 42:U.addElement(Y[xe-3]);break;case 43:U.addElement(Y[xe-5]),U.setClass([Y[xe-5]],Y[xe-3]);break;case 44:U.setNewElementType(Y[xe-2]);break;case 45:U.setNewElementDocRef(Y[xe-2]);break;case 48:U.addRelationship(Y[xe-2],Y[xe],Y[xe-4]);break;case 49:U.addRelationship(Y[xe-2],Y[xe-4],Y[xe]);break;case 50:this.$=U.Relationships.CONTAINS;break;case 51:this.$=U.Relationships.COPIES;break;case 52:this.$=U.Relationships.DERIVES;break;case 53:this.$=U.Relationships.SATISFIES;break;case 54:this.$=U.Relationships.VERIFIES;break;case 55:this.$=U.Relationships.REFINES;break;case 56:this.$=U.Relationships.TRACES;break;case 57:this.$=Y[xe-2],U.defineClass(Y[xe-1],Y[xe]);break;case 58:U.setClass(Y[xe-1],Y[xe]);break;case 59:U.setClass([Y[xe-2]],Y[xe]);break;case 60:case 62:this.$=[Y[xe]];break;case 61:case 63:this.$=Y[xe-2].concat([Y[xe]]);break;case 64:this.$=Y[xe-2],U.setCssStyle(Y[xe-1],Y[xe]);break;case 65:this.$=[Y[xe]];break;case 66:Y[xe-2].push(Y[xe]),this.$=Y[xe-2];break;case 68:this.$=Y[xe-1]+Y[xe];break}},"anonymous"),table:[{3:1,4:2,6:t,9:r,11:i,13:n},{1:[3]},{3:8,4:2,5:[1,7],6:t,9:r,11:i,13:n},{5:[1,9]},{10:[1,10]},{12:[1,11]},e(a,[2,6]),{3:12,4:2,6:t,9:r,11:i,13:n},{1:[2,2]},{4:17,5:s,7:13,8:l,9:r,11:i,13:n,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:h,22:u,23:d,24:p,25:23,33:25,41:f,42:g,43:m,44:y,45:b,46:v,54:T,72:x,74:k,77:C,89:E,90:w},e(a,[2,4]),e(a,[2,5]),{1:[2,1]},{8:[1,41]},{4:17,5:s,7:42,8:l,9:r,11:i,13:n,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:h,22:u,23:d,24:p,25:23,33:25,41:f,42:g,43:m,44:y,45:b,46:v,54:T,72:x,74:k,77:C,89:E,90:w},{4:17,5:s,7:43,8:l,9:r,11:i,13:n,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:h,22:u,23:d,24:p,25:23,33:25,41:f,42:g,43:m,44:y,45:b,46:v,54:T,72:x,74:k,77:C,89:E,90:w},{4:17,5:s,7:44,8:l,9:r,11:i,13:n,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:h,22:u,23:d,24:p,25:23,33:25,41:f,42:g,43:m,44:y,45:b,46:v,54:T,72:x,74:k,77:C,89:E,90:w},{4:17,5:s,7:45,8:l,9:r,11:i,13:n,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:h,22:u,23:d,24:p,25:23,33:25,41:f,42:g,43:m,44:y,45:b,46:v,54:T,72:x,74:k,77:C,89:E,90:w},{4:17,5:s,7:46,8:l,9:r,11:i,13:n,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:h,22:u,23:d,24:p,25:23,33:25,41:f,42:g,43:m,44:y,45:b,46:v,54:T,72:x,74:k,77:C,89:E,90:w},{4:17,5:s,7:47,8:l,9:r,11:i,13:n,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:h,22:u,23:d,24:p,25:23,33:25,41:f,42:g,43:m,44:y,45:b,46:v,54:T,72:x,74:k,77:C,89:E,90:w},{4:17,5:s,7:48,8:l,9:r,11:i,13:n,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:h,22:u,23:d,24:p,25:23,33:25,41:f,42:g,43:m,44:y,45:b,46:v,54:T,72:x,74:k,77:C,89:E,90:w},{4:17,5:s,7:49,8:l,9:r,11:i,13:n,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:h,22:u,23:d,24:p,25:23,33:25,41:f,42:g,43:m,44:y,45:b,46:v,54:T,72:x,74:k,77:C,89:E,90:w},{4:17,5:s,7:50,8:l,9:r,11:i,13:n,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:h,22:u,23:d,24:p,25:23,33:25,41:f,42:g,43:m,44:y,45:b,46:v,54:T,72:x,74:k,77:C,89:E,90:w},{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(_,[2,17]),e(_,[2,18]),e(_,[2,19]),e(_,[2,20]),{30:60,33:62,75:L,89:E,90:w},{30:63,33:62,75:L,89:E,90:w},{30:64,33:62,75:L,89:E,90:w},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(M,[2,79]),e(M,[2,80]),{27:[1,67],29:[1,68]},e(M,[2,85]),e(M,[2,86]),{62:69,65:B,66:A,67:I,68:O,69:R,70:$,71:F},{62:77,65:B,66:A,67:I,68:O,69:R,70:$,71:F},{30:78,33:62,75:L,89:E,90:w},{73:79,75:P,76:z,78:81,79:82,80:q,81:G,82:W,83:J,84:H,85:Z,86:se,87:Q,88:te},e(re,[2,60]),e(re,[2,62]),{73:93,75:P,76:z,78:81,79:82,80:q,81:G,82:W,83:J,84:H,85:Z,86:se,87:Q,88:te},{30:94,33:62,75:L,76:z,89:E,90:w},{5:[1,95]},{30:96,33:62,75:L,89:E,90:w},{5:[1,97]},{30:98,33:62,75:L,89:E,90:w},{63:[1,99]},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]),{64:[1,100]},e(_,[2,59],{76:z}),e(_,[2,64],{76:Ae}),{33:103,75:[1,102],89:E,90:w},e(ie,[2,65],{79:104,75:P,80:q,81:G,82:W,83:J,84:H,85:Z,86:se,87:Q,88:te}),e(me,[2,67]),e(me,[2,69]),e(me,[2,70]),e(me,[2,71]),e(me,[2,72]),e(me,[2,73]),e(me,[2,74]),e(me,[2,75]),e(me,[2,76]),e(me,[2,77]),e(me,[2,78]),e(_,[2,57],{76:Ae}),e(_,[2,58],{76:z}),{5:oe,28:105,31:we,34:ye,36:ve,38:ae,40:Pe},{27:[1,112],76:z},{5:X,40:ce,56:113,57:ge,59:be},{27:[1,118],76:z},{33:119,89:E,90:w},{33:120,89:E,90:w},{75:P,78:121,79:82,80:q,81:G,82:W,83:J,84:H,85:Z,86:se,87:Q,88:te},e(re,[2,61]),e(re,[2,63]),e(me,[2,68]),e(_,[2,21]),{32:[1,122]},{32:[1,123]},{32:[1,124]},{32:[1,125]},{5:oe,28:126,31:we,34:ye,36:ve,38:ae,40:Pe},e(_,[2,28]),{5:[1,127]},e(_,[2,42]),{32:[1,128]},{32:[1,129]},{5:X,40:ce,56:130,57:ge,59:be},e(_,[2,47]),{5:[1,131]},e(_,[2,48]),e(_,[2,49]),e(ie,[2,66],{79:104,75:P,80:q,81:G,82:W,83:J,84:H,85:Z,86:se,87:Q,88:te}),{33:132,89:E,90:w},{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(_,[2,27]),{5:oe,28:145,31:we,34:ye,36:ve,38:ae,40:Pe},{58:146,89:[1,147],90:[1,148]},{60:149,89:[1,150],90:[1,151]},e(_,[2,46]),{5:X,40:ce,56:152,57:ge,59:be},{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(_,[2,22]),{5:[1,157]},{5:[2,87]},{5:[2,88]},{5:[1,158]},{5:[2,89]},{5:[2,90]},e(_,[2,43]),{5:oe,28:159,31:we,34:ye,36:ve,38:ae,40:Pe},{5:oe,28:160,31:we,34:ye,36:ve,38:ae,40:Pe},{5:oe,28:161,31:we,34:ye,36:ve,38:ae,40:Pe},{5:oe,28:162,31:we,34:ye,36:ve,38:ae,40:Pe},{5:X,40:ce,56:163,57:ge,59:be},{5:X,40:ce,56:164,57:ge,59:be},e(_,[2,23]),e(_,[2,24]),e(_,[2,25]),e(_,[2,26]),e(_,[2,44]),e(_,[2,45])],defaultActions:{8:[2,2],12:[2,1],41:[2,3],42:[2,8],43:[2,9],44:[2,10],45:[2,11],46:[2,12],47:[2,13],48:[2,14],49:[2,15],50:[2,16],134:[2,83],135:[2,84],137:[2,35],138:[2,36],139:[2,37],141:[2,38],142:[2,39],143:[2,40],144:[2,41],147:[2,87],148:[2,88],150:[2,89],151:[2,90]},parseError:o(function(Oe,j){if(j.recoverable)this.trace(Oe);else{var le=new Error(Oe);throw le.hash=j,le}},"parseError"),parse:o(function(Oe){var j=this,le=[0],U=[],fe=[null],Y=[],Le=this.table,xe="",je=0,Ie=0,Ve=0,Ne=2,Ge=1,ze=Y.slice.call(arguments,1),Ue=Object.create(this.lexer),Ce={yy:{}};for(var ct in this.yy)Object.prototype.hasOwnProperty.call(this.yy,ct)&&(Ce.yy[ct]=this.yy[ct]);Ue.setInput(Oe,Ce.yy),Ce.yy.lexer=Ue,Ce.yy.parser=this,typeof Ue.yylloc>"u"&&(Ue.yylloc={});var Se=Ue.yylloc;Y.push(Se);var at=Ue.options&&Ue.options.ranges;typeof Ce.yy.parseError=="function"?this.parseError=Ce.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function dt(_t){le.length=le.length-2*_t,fe.length=fe.length-_t,Y.length=Y.length-_t}o(dt,"popStack");function gt(){var _t;return _t=U.pop()||Ue.lex()||Ge,typeof _t!="number"&&(_t instanceof Array&&(U=_t,_t=U.pop()),_t=j.symbols_[_t]||_t),_t}o(gt,"lex");for(var Ct,kt,$t,ut,de,st,nt={},rt,_e,Ze,He;;){if($t=le[le.length-1],this.defaultActions[$t]?ut=this.defaultActions[$t]:((Ct===null||typeof Ct>"u")&&(Ct=gt()),ut=Le[$t]&&Le[$t][Ct]),typeof ut>"u"||!ut.length||!ut[0]){var yt="";He=[];for(rt in Le[$t])this.terminals_[rt]&&rt>Ne&&He.push("'"+this.terminals_[rt]+"'");Ue.showPosition?yt="Parse error on line "+(je+1)+`: +`+Ue.showPosition()+` +Expecting `+He.join(", ")+", got '"+(this.terminals_[Ct]||Ct)+"'":yt="Parse error on line "+(je+1)+": Unexpected "+(Ct==Ge?"end of input":"'"+(this.terminals_[Ct]||Ct)+"'"),this.parseError(yt,{text:Ue.match,token:this.terminals_[Ct]||Ct,line:Ue.yylineno,loc:Se,expected:He})}if(ut[0]instanceof Array&&ut.length>1)throw new Error("Parse Error: multiple actions possible at state: "+$t+", token: "+Ct);switch(ut[0]){case 1:le.push(Ct),fe.push(Ue.yytext),Y.push(Ue.yylloc),le.push(ut[1]),Ct=null,kt?(Ct=kt,kt=null):(Ie=Ue.yyleng,xe=Ue.yytext,je=Ue.yylineno,Se=Ue.yylloc,Ve>0&&Ve--);break;case 2:if(_e=this.productions_[ut[1]][1],nt.$=fe[fe.length-_e],nt._$={first_line:Y[Y.length-(_e||1)].first_line,last_line:Y[Y.length-1].last_line,first_column:Y[Y.length-(_e||1)].first_column,last_column:Y[Y.length-1].last_column},at&&(nt._$.range=[Y[Y.length-(_e||1)].range[0],Y[Y.length-1].range[1]]),st=this.performAction.apply(nt,[xe,Ie,je,Ce.yy,ut[1],fe,Y].concat(ze)),typeof st<"u")return st;_e&&(le=le.slice(0,-1*_e*2),fe=fe.slice(0,-1*_e),Y=Y.slice(0,-1*_e)),le.push(this.productions_[ut[1]][0]),fe.push(nt.$),Y.push(nt._$),Ze=Le[le[le.length-2]][le[le.length-1]],le.push(Ze);break;case 3:return!0}}return!0},"parse")},Me=(function(){var Oe={EOF:1,parseError:o(function(j,le){if(this.yy.parser)this.yy.parser.parseError(j,le);else throw new Error(j)},"parseError"),setInput:o(function(j,le){return this.yy=le||this.yy||{},this._input=j,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:o(function(){var j=this._input[0];this.yytext+=j,this.yyleng++,this.offset++,this.match+=j,this.matched+=j;var le=j.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),j},"input"),unput:o(function(j){var le=j.length,U=j.split(/(?:\r\n?|\n)/g);this._input=j+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-le),this.offset-=le;var fe=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),U.length-1&&(this.yylineno-=U.length-1);var Y=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:U?(U.length===fe.length?this.yylloc.first_column:0)+fe[fe.length-U.length].length-U[0].length:this.yylloc.first_column-le},this.options.ranges&&(this.yylloc.range=[Y[0],Y[0]+this.yyleng-le]),this.yyleng=this.yytext.length,this},"unput"),more:o(function(){return this._more=!0,this},"more"),reject:o(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:o(function(j){this.unput(this.match.slice(j))},"less"),pastInput:o(function(){var j=this.matched.substr(0,this.matched.length-this.match.length);return(j.length>20?"...":"")+j.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:o(function(){var j=this.match;return j.length<20&&(j+=this._input.substr(0,20-j.length)),(j.substr(0,20)+(j.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:o(function(){var j=this.pastInput(),le=new Array(j.length+1).join("-");return j+this.upcomingInput()+` +`+le+"^"},"showPosition"),test_match:o(function(j,le){var U,fe,Y;if(this.options.backtrack_lexer&&(Y={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(Y.yylloc.range=this.yylloc.range.slice(0))),fe=j[0].match(/(?:\r\n?|\n).*/g),fe&&(this.yylineno+=fe.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:fe?fe[fe.length-1].length-fe[fe.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+j[0].length},this.yytext+=j[0],this.match+=j[0],this.matches=j,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(j[0].length),this.matched+=j[0],U=this.performAction.call(this,this.yy,this,le,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),U)return U;if(this._backtrack){for(var Le in Y)this[Le]=Y[Le];return!1}return!1},"test_match"),next:o(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var j,le,U,fe;this._more||(this.yytext="",this.match="");for(var Y=this._currentRules(),Le=0;Lele[0].length)){if(le=U,fe=Le,this.options.backtrack_lexer){if(j=this.test_match(U,Y[Le]),j!==!1)return j;if(this._backtrack){le=!1;continue}else return!1}else if(!this.options.flex)break}return le?(j=this.test_match(le,Y[fe]),j!==!1?j:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:o(function(){var j=this.next();return j||this.lex()},"lex"),begin:o(function(j){this.conditionStack.push(j)},"begin"),popState:o(function(){var j=this.conditionStack.length-1;return j>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:o(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:o(function(j){return j=this.conditionStack.length-1-Math.abs(j||0),j>=0?this.conditionStack[j]:"INITIAL"},"topState"),pushState:o(function(j){this.begin(j)},"pushState"),stateStackSize:o(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:o(function(j,le,U,fe){var Y=fe;switch(U){case 0:return"title";case 1:return this.begin("acc_title"),9;case 2:return this.popState(),"acc_title_value";case 3:return this.begin("acc_descr"),11;case 4:return this.popState(),"acc_descr_value";case 5:this.begin("acc_descr_multiline");break;case 6:this.popState();break;case 7:return"acc_descr_multiline_value";case 8:return 21;case 9:return 22;case 10:return 23;case 11:return 24;case 12:return 5;case 13:break;case 14:break;case 15:break;case 16:return 8;case 17:return 6;case 18:return 27;case 19:return 40;case 20:return 29;case 21:return 32;case 22:return 31;case 23:return 34;case 24:return 36;case 25:return 38;case 26:return 41;case 27:return 42;case 28:return 43;case 29:return 44;case 30:return 45;case 31:return 46;case 32:return 47;case 33:return 48;case 34:return 49;case 35:return 50;case 36:return 51;case 37:return 52;case 38:return 53;case 39:return 54;case 40:return 65;case 41:return 66;case 42:return 67;case 43:return 68;case 44:return 69;case 45:return 70;case 46:return 71;case 47:return 57;case 48:return 59;case 49:return this.begin("style"),77;case 50:return 75;case 51:return 81;case 52:return 88;case 53:return"PERCENT";case 54:return 86;case 55:return 84;case 56:break;case 57:this.begin("string");break;case 58:this.popState();break;case 59:return this.begin("style"),72;case 60:return this.begin("style"),74;case 61:return 61;case 62:return 64;case 63:return 63;case 64:this.begin("string");break;case 65:this.popState();break;case 66:return"qString";case 67:return le.yytext=le.yytext.trim(),89;case 68:return 75;case 69:return 80;case 70:return 76}},"anonymous"),rules:[/^(?:title\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:(\r?\n)+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:$)/i,/^(?:requirementDiagram\b)/i,/^(?:\{)/i,/^(?:\})/i,/^(?::{3})/i,/^(?::)/i,/^(?:id\b)/i,/^(?:text\b)/i,/^(?:risk\b)/i,/^(?:verifyMethod\b)/i,/^(?:requirement\b)/i,/^(?:functionalRequirement\b)/i,/^(?:interfaceRequirement\b)/i,/^(?:performanceRequirement\b)/i,/^(?:physicalRequirement\b)/i,/^(?:designConstraint\b)/i,/^(?:low\b)/i,/^(?:medium\b)/i,/^(?:high\b)/i,/^(?:analysis\b)/i,/^(?:demonstration\b)/i,/^(?:inspection\b)/i,/^(?:test\b)/i,/^(?:element\b)/i,/^(?:contains\b)/i,/^(?:copies\b)/i,/^(?:derives\b)/i,/^(?:satisfies\b)/i,/^(?:verifies\b)/i,/^(?:refines\b)/i,/^(?:traces\b)/i,/^(?:type\b)/i,/^(?:docref\b)/i,/^(?:style\b)/i,/^(?:\w+)/i,/^(?::)/i,/^(?:;)/i,/^(?:%)/i,/^(?:-)/i,/^(?:#)/i,/^(?: )/i,/^(?:["])/i,/^(?:\n)/i,/^(?:classDef\b)/i,/^(?:class\b)/i,/^(?:<-)/i,/^(?:->)/i,/^(?:-)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[\w][^:,\r\n\{\<\>\-\=]*)/i,/^(?:\w+)/i,/^(?:[0-9]+)/i,/^(?:,)/i],conditions:{acc_descr_multiline:{rules:[6,7,68,69,70],inclusive:!1},acc_descr:{rules:[4,68,69,70],inclusive:!1},acc_title:{rules:[2,68,69,70],inclusive:!1},style:{rules:[50,51,52,53,54,55,56,57,58,68,69,70],inclusive:!1},unqString:{rules:[68,69,70],inclusive:!1},token:{rules:[68,69,70],inclusive:!1},string:{rules:[65,66,68,69,70],inclusive:!1},INITIAL:{rules:[0,1,3,5,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,59,60,61,62,63,64,67,68,69,70],inclusive:!0}}};return Oe})();ke.lexer=Me;function pe(){this.yy={}}return o(pe,"Parser"),pe.prototype=ke,ke.Parser=pe,new pe})();MH.parser=MH;wpt=MH,Ept=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=gr,this.getAccTitle=xr,this.setAccDescription=Tr,this.getAccDescription=kr,this.setDiagramTitle=_r,this.getDiagramTitle=Cr,this.getConfig=o(()=>De().requirement,"getConfig"),this.clear(),this.setDirection=this.setDirection.bind(this),this.addRequirement=this.addRequirement.bind(this),this.setNewReqId=this.setNewReqId.bind(this),this.setNewReqRisk=this.setNewReqRisk.bind(this),this.setNewReqText=this.setNewReqText.bind(this),this.setNewReqVerifyMethod=this.setNewReqVerifyMethod.bind(this),this.addElement=this.addElement.bind(this),this.setNewElementType=this.setNewElementType.bind(this),this.setNewElementDocRef=this.setNewElementDocRef.bind(this),this.addRelationship=this.addRelationship.bind(this),this.setCssStyle=this.setCssStyle.bind(this),this.setClass=this.setClass.bind(this),this.defineClass=this.defineClass.bind(this),this.setAccTitle=this.setAccTitle.bind(this),this.setAccDescription=this.setAccDescription.bind(this)}static{o(this,"RequirementDB")}getDirection(){return this.direction}setDirection(e){this.direction=e}resetLatestRequirement(){this.latestRequirement=this.getInitialRequirement()}resetLatestElement(){this.latestElement=this.getInitialElement()}getInitialRequirement(){return{requirementId:"",text:"",risk:"",verifyMethod:"",name:"",type:"",cssStyles:[],classes:["default"]}}getInitialElement(){return{name:"",type:"",docRef:"",cssStyles:[],classes:["default"]}}addRequirement(e,t){return this.requirements.has(e)||this.requirements.set(e,{name:e,type:t,requirementId:this.latestRequirement.requirementId,text:this.latestRequirement.text,risk:this.latestRequirement.risk,verifyMethod:this.latestRequirement.verifyMethod,cssStyles:[],classes:["default"]}),this.resetLatestRequirement(),this.requirements.get(e)}getRequirements(){return this.requirements}setNewReqId(e){this.latestRequirement!==void 0&&(this.latestRequirement.requirementId=e)}setNewReqText(e){this.latestRequirement!==void 0&&(this.latestRequirement.text=e)}setNewReqRisk(e){this.latestRequirement!==void 0&&(this.latestRequirement.risk=e)}setNewReqVerifyMethod(e){this.latestRequirement!==void 0&&(this.latestRequirement.verifyMethod=e)}addElement(e){return this.elements.has(e)||(this.elements.set(e,{name:e,type:this.latestElement.type,docRef:this.latestElement.docRef,cssStyles:[],classes:["default"]}),ee.info("Added new element: ",e)),this.resetLatestElement(),this.elements.get(e)}getElements(){return this.elements}setNewElementType(e){this.latestElement!==void 0&&(this.latestElement.type=e)}setNewElementDocRef(e){this.latestElement!==void 0&&(this.latestElement.docRef=e)}addRelationship(e,t,r){this.relations.push({type:e,src:t,dst:r})}getRelationships(){return this.relations}clear(){this.relations=[],this.resetLatestRequirement(),this.requirements=new Map,this.resetLatestElement(),this.elements=new Map,this.classes=new Map,ar()}setCssStyle(e,t){for(let r of e){let i=this.requirements.get(r)??this.elements.get(r);if(!t||!i)return;for(let n of t)n.includes(",")?i.cssStyles.push(...n.split(",")):i.cssStyles.push(n)}}setClass(e,t){for(let r of e){let i=this.requirements.get(r)??this.elements.get(r);if(i)for(let n of t){i.classes.push(n);let a=this.classes.get(n)?.styles;a&&i.cssStyles.push(...a)}}}defineClass(e,t){for(let r of e){let i=this.classes.get(r);i===void 0&&(i={id:r,styles:[],textStyles:[]},this.classes.set(r,i)),t&&t.forEach(function(n){if(/color/.exec(n)){let a=n.replace("fill","bgFill");i.textStyles.push(a)}i.styles.push(n)}),this.requirements.forEach(n=>{n.classes.includes(r)&&n.cssStyles.push(...t.flatMap(a=>a.split(",")))}),this.elements.forEach(n=>{n.classes.includes(r)&&n.cssStyles.push(...t.flatMap(a=>a.split(",")))})}}getClasses(){return this.classes}getData(){let e=De(),t=[],r=[];for(let i of this.requirements.values()){let n=i;n.id=i.name,n.cssStyles=i.cssStyles,n.cssClasses=i.classes.join(" "),n.shape="requirementBox",n.look=e.look,n.colorIndex=t.length,t.push(n)}for(let i of this.elements.values()){let n=i;n.shape="requirementBox",n.look=e.look,n.id=i.name,n.cssStyles=i.cssStyles,n.cssClasses=i.classes.join(" "),n.colorIndex=t.length,t.push(n)}for(let i of this.relations){let n=0,a=i.type===this.Relationships.CONTAINS,s={id:`${i.src}-${i.dst}-${n}`,start:this.requirements.get(i.src)?.name??this.elements.get(i.src)?.name,end:this.requirements.get(i.dst)?.name??this.elements.get(i.dst)?.name,label:`<<${i.type}>>`,classes:"relationshipLine",style:["fill:none",a?"":"stroke-dasharray: 10,7"],labelpos:"c",thickness:"normal",type:"normal",pattern:a?"normal":"dashed",arrowTypeStart:a?"requirement_contains":"",arrowTypeEnd:a?"":"requirement_arrow",look:e.look,labelType:"markdown"};r.push(s),n++}return{nodes:t,edges:r,other:{},config:e,direction:this.getDirection()}}},Spt=o(e=>{let t=Rt(),{themeVariables:r,look:i}=t,{bkgColorArray:n,borderColorArray:a}=r;if(!a?.length)return"";let s="";for(let l=0;l{let t=Rt(),{look:r,themeVariables:i}=t,{requirementEdgeLabelBackground:n}=i;return` + ${Spt(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: ${n??e.edgeLabelBackground}; + } + +`},"getStyles"),Apt=_pt,WSe={};yu(WSe,{draw:()=>Rpt});Rpt=o(async function(e,t,r,i){ee.info("REF0:"),ee.info("Drawing requirement diagram (unified)",t);let{securityLevel:n,state:a,layout:s,look:l}=De(),h=i.db.getData(),u=Yo(t,n);h.type=i.type,h.layoutAlgorithm=Ec(s),h.nodeSpacing=a?.nodeSpacing??50,h.rankSpacing=a?.rankSpacing??50,h.markers=l==="neo"?["requirement_contains_neo","requirement_arrow_neo"]:["requirement_contains","requirement_arrow"],h.diagramId=t,await Wo(h,u),Wt.insertTitle(u,"requirementDiagramTitleText",a?.titleTopMargin??25,i.db.getDiagramTitle()),Gs(u,8,"requirementDiagram",a?.useMaxWidth??!0)},"draw"),Lpt={parser:wpt,get db(){return new Ept},renderer:WSe,styles:Apt}});var o6e={};Kt(o6e,{diagram:()=>Eft});async function e6e(e,t){mt.bumpVerticalPos(10);let{startx:r,stopx:i,message:n}=t,a=ft.splitBreaks(n).length,s=Gi(n),l=s?await x0(n,De()):Wt.calculateTextDimensions(n,$g(Ye));if(!s){let p=l.height/a;t.height+=p,mt.bumpVerticalPos(p)}let h,u=l.height-10,d=l.width;if(r===i){h=mt.getVerticalPos()+u,Ye.rightAngles||(u+=Ye.boxMargin,h=mt.getVerticalPos()+u),u+=30;let p=ft.getMax(d/2,Ye.width/2);mt.insert(r-p,mt.getVerticalPos()-10+u,i+p,mt.getVerticalPos()+30+u)}else u+=Ye.boxMargin,h=mt.getVerticalPos()+u,mt.insert(r,h-10,i,h);return mt.bumpVerticalPos(u),t.height+=u,t.stopy=t.starty+t.height,mt.insert(t.fromBounds,t.starty,t.toBounds,t.stopy),h}function jl(e,t,r,i,n){mt.bumpVerticalPos(r);let a=i;if(t.id&&t.message&&e[t.id]){let s=e[t.id].width,l=$g(Ye);t.message=Wt.wrapLabel(`[${t.message}]`,s-2*Ye.wrapPadding,l),t.width=s,t.wrap=!0;let h=Wt.calculateTextDimensions(t.message,l),u=ft.getMax(h.height,Ye.labelBoxHeight);a=i+u,ee.debug(`${u} - ${t.message}`)}n(t),mt.bumpVerticalPos(a)}function i6e(e,t,r,i,n,a,s){function l(d,p){d.x{let s=$g(Ye),l=a.actorKeys.reduce((p,f)=>p+=e.get(f).width+(e.get(f).margin||0),0),h=Ye.boxMargin*8;l+=h,l-=2*Ye.boxTextMargin,a.wrap&&(a.name=Wt.wrapLabel(a.name,l-2*Ye.wrapPadding,s));let u=Wt.calculateTextDimensions(a.name,s);n=ft.getMax(u.height,n);let d=ft.getMax(l,u.width+2*Ye.wrapPadding);if(a.margin=Ye.boxTextMargin,la.textMaxHeight=n),ft.getMax(i,Ye.height)}var OH,$pt,Ipt,Dpt,Mpt,w_,Npt,Opt,Bpt,XSe,Rg,ip,np,S_,Lg,lu,bT,Ppt,__,E_,J1,KSe,Wr,ZSe,Fpt,zpt,qpt,jpt,Gpt,Wpt,Upt,Vpt,Ypt,Hpt,Xpt,Kpt,Zpt,QSe,Qpt,Jpt,eft,tft,rft,ift,nft,aft,JSe,sft,cu,oft,lft,cft,hft,uft,Mi,Ye,mt,dft,YSe,$g,Q1,BH,pft,fft,PH,t6e,r6e,A_,HSe,gft,mft,yft,vft,bft,NH,xft,s6e,Tft,kft,Cft,wft,Eft,l6e=Tt(()=>{i5();Ip();po();Or();Yr();tr();Zt();vt();OH=(function(){var e=o(function(Ve,Ne,Ge,ze){for(Ge=Ge||{},ze=Ve.length;ze--;Ge[Ve[ze]]=Ne);return Ge},"o"),t=[1,2],r=[1,3],i=[1,4],n=[2,4],a=[1,9],s=[1,11],l=[1,12],h=[1,14],u=[1,15],d=[1,17],p=[1,18],f=[1,19],g=[1,25],m=[1,26],y=[1,27],b=[1,28],v=[1,29],T=[1,30],x=[1,31],k=[1,32],C=[1,33],E=[1,34],w=[1,35],_=[1,36],L=[1,37],N=[1,38],D=[1,39],M=[1,40],B=[1,42],A=[1,43],I=[1,44],O=[1,45],R=[1,46],$=[1,47],F=[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,56,61,62,63,64,73],P=[1,74],z=[1,80],q=[1,81],G=[1,82],W=[1,83],J=[1,84],H=[1,85],Z=[1,86],se=[1,87],Q=[1,88],te=[1,89],re=[1,90],ne=[1,91],Ae=[1,92],ie=[1,93],me=[1,94],oe=[1,95],we=[1,96],ye=[1,97],ve=[1,98],ae=[1,99],Pe=[1,100],X=[1,101],ce=[1,102],ge=[1,103],be=[1,104],ke=[1,105],Me=[2,78],pe=[4,5,17,51,53,54],Oe=[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,56,61,62,63,64,73],j=[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,56,61,62,63,64,73],le=[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,56,61,62,63,64,73],U=[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,56,61,62,63,64,73],fe=[5,52],Y=[70,71,72,73],Le=[1,151],xe={trace:o(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,destroy:54,actor_with_config:55,note:56,placement:57,text2:58,over:59,actor_pair:60,links:61,link:62,properties:63,details:64,spaceList:65,",":66,left_of:67,right_of:68,signaltype:69,"+":70,"-":71,"()":72,ACTOR:73,config_object:74,CONFIG_START:75,CONFIG_CONTENT:76,CONFIG_END:77,SOLID_OPEN_ARROW:78,DOTTED_OPEN_ARROW:79,SOLID_ARROW:80,SOLID_ARROW_TOP:81,SOLID_ARROW_BOTTOM:82,STICK_ARROW_TOP:83,STICK_ARROW_BOTTOM:84,SOLID_ARROW_TOP_DOTTED:85,SOLID_ARROW_BOTTOM_DOTTED:86,STICK_ARROW_TOP_DOTTED:87,STICK_ARROW_BOTTOM_DOTTED:88,SOLID_ARROW_TOP_REVERSE:89,SOLID_ARROW_BOTTOM_REVERSE:90,STICK_ARROW_TOP_REVERSE:91,STICK_ARROW_BOTTOM_REVERSE:92,SOLID_ARROW_TOP_REVERSE_DOTTED:93,SOLID_ARROW_BOTTOM_REVERSE_DOTTED:94,STICK_ARROW_TOP_REVERSE_DOTTED:95,STICK_ARROW_BOTTOM_REVERSE_DOTTED:96,BIDIRECTIONAL_SOLID_ARROW:97,DOTTED_ARROW:98,BIDIRECTIONAL_DOTTED_ARROW:99,SOLID_CROSS:100,DOTTED_CROSS:101,SOLID_POINT:102,DOTTED_POINT:103,TXT:104,$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:"destroy",56:"note",59:"over",61:"links",62:"link",63:"properties",64:"details",66:",",67:"left_of",68:"right_of",70:"+",71:"-",72:"()",73:"ACTOR",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"},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,3],[13,5],[13,3],[13,5],[13,3],[25,4],[25,4],[26,3],[27,3],[28,3],[29,3],[65,2],[65,1],[60,3],[60,1],[57,1],[57,1],[18,5],[18,5],[18,5],[18,5],[18,6],[18,4],[55,2],[74,3],[23,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[58,1]],performAction:o(function(Ve,Ne,Ge,ze,Ue,Ce,ct){var Se=Ce.length-1;switch(Ue){case 3:return ze.apply(Ce[Se]),Ce[Se];case 4:case 10:this.$=[];break;case 5:case 11:Ce[Se-1].push(Ce[Se]),this.$=Ce[Se-1];break;case 6:case 7:case 12:case 13:this.$=Ce[Se];break;case 8:case 9:case 14:this.$=[];break;case 16:Ce[Se].type="createParticipant",this.$=Ce[Se];break;case 17:Ce[Se-1].unshift({type:"boxStart",boxData:ze.parseBoxData(Ce[Se-2])}),Ce[Se-1].push({type:"boxEnd",boxText:Ce[Se-2]}),this.$=Ce[Se-1];break;case 19:this.$={type:"sequenceIndex",sequenceIndex:Number(Ce[Se-2]),sequenceIndexStep:Number(Ce[Se-1]),sequenceVisible:!0,signalType:ze.LINETYPE.AUTONUMBER};break;case 20:this.$={type:"sequenceIndex",sequenceIndex:Number(Ce[Se-1]),sequenceIndexStep:1,sequenceVisible:!0,signalType:ze.LINETYPE.AUTONUMBER};break;case 21:this.$={type:"sequenceIndex",sequenceVisible:!1,signalType:ze.LINETYPE.AUTONUMBER};break;case 22:this.$={type:"sequenceIndex",sequenceVisible:!0,signalType:ze.LINETYPE.AUTONUMBER};break;case 23:this.$={type:"activeStart",signalType:ze.LINETYPE.ACTIVE_START,actor:Ce[Se-1].actor};break;case 24:this.$={type:"activeEnd",signalType:ze.LINETYPE.ACTIVE_END,actor:Ce[Se-1].actor};break;case 30:ze.setDiagramTitle(Ce[Se].substring(6)),this.$=Ce[Se].substring(6);break;case 31:ze.setDiagramTitle(Ce[Se].substring(7)),this.$=Ce[Se].substring(7);break;case 32:this.$=Ce[Se].trim(),ze.setAccTitle(this.$);break;case 33:case 34:this.$=Ce[Se].trim(),ze.setAccDescription(this.$);break;case 35:Ce[Se-1].unshift({type:"loopStart",loopText:ze.parseMessage(Ce[Se-2]),signalType:ze.LINETYPE.LOOP_START}),Ce[Se-1].push({type:"loopEnd",loopText:Ce[Se-2],signalType:ze.LINETYPE.LOOP_END}),this.$=Ce[Se-1];break;case 36:Ce[Se-1].unshift({type:"rectStart",color:ze.parseMessage(Ce[Se-2]),signalType:ze.LINETYPE.RECT_START}),Ce[Se-1].push({type:"rectEnd",color:ze.parseMessage(Ce[Se-2]),signalType:ze.LINETYPE.RECT_END}),this.$=Ce[Se-1];break;case 37:Ce[Se-1].unshift({type:"optStart",optText:ze.parseMessage(Ce[Se-2]),signalType:ze.LINETYPE.OPT_START}),Ce[Se-1].push({type:"optEnd",optText:ze.parseMessage(Ce[Se-2]),signalType:ze.LINETYPE.OPT_END}),this.$=Ce[Se-1];break;case 38:Ce[Se-1].unshift({type:"altStart",altText:ze.parseMessage(Ce[Se-2]),signalType:ze.LINETYPE.ALT_START}),Ce[Se-1].push({type:"altEnd",signalType:ze.LINETYPE.ALT_END}),this.$=Ce[Se-1];break;case 39:Ce[Se-1].unshift({type:"parStart",parText:ze.parseMessage(Ce[Se-2]),signalType:ze.LINETYPE.PAR_START}),Ce[Se-1].push({type:"parEnd",signalType:ze.LINETYPE.PAR_END}),this.$=Ce[Se-1];break;case 40:Ce[Se-1].unshift({type:"parStart",parText:ze.parseMessage(Ce[Se-2]),signalType:ze.LINETYPE.PAR_OVER_START}),Ce[Se-1].push({type:"parEnd",signalType:ze.LINETYPE.PAR_END}),this.$=Ce[Se-1];break;case 41:Ce[Se-1].unshift({type:"criticalStart",criticalText:ze.parseMessage(Ce[Se-2]),signalType:ze.LINETYPE.CRITICAL_START}),Ce[Se-1].push({type:"criticalEnd",signalType:ze.LINETYPE.CRITICAL_END}),this.$=Ce[Se-1];break;case 42:Ce[Se-1].unshift({type:"breakStart",breakText:ze.parseMessage(Ce[Se-2]),signalType:ze.LINETYPE.BREAK_START}),Ce[Se-1].push({type:"breakEnd",optText:ze.parseMessage(Ce[Se-2]),signalType:ze.LINETYPE.BREAK_END}),this.$=Ce[Se-1];break;case 44:this.$=Ce[Se-3].concat([{type:"option",optionText:ze.parseMessage(Ce[Se-1]),signalType:ze.LINETYPE.CRITICAL_OPTION},Ce[Se]]);break;case 46:this.$=Ce[Se-3].concat([{type:"and",parText:ze.parseMessage(Ce[Se-1]),signalType:ze.LINETYPE.PAR_AND},Ce[Se]]);break;case 48:this.$=Ce[Se-3].concat([{type:"else",altText:ze.parseMessage(Ce[Se-1]),signalType:ze.LINETYPE.ALT_ELSE},Ce[Se]]);break;case 49:Ce[Se-3].draw="participant",Ce[Se-3].type="addParticipant",Ce[Se-3].description=ze.parseMessage(Ce[Se-1]),this.$=Ce[Se-3];break;case 50:Ce[Se-1].draw="participant",Ce[Se-1].type="addParticipant",this.$=Ce[Se-1];break;case 51:Ce[Se-3].draw="actor",Ce[Se-3].type="addParticipant",Ce[Se-3].description=ze.parseMessage(Ce[Se-1]),this.$=Ce[Se-3];break;case 52:case 57:Ce[Se-1].draw="actor",Ce[Se-1].type="addParticipant",this.$=Ce[Se-1];break;case 53:Ce[Se-1].type="destroyParticipant",this.$=Ce[Se-1];break;case 54:Ce[Se-3].draw="participant",Ce[Se-3].type="addParticipant",Ce[Se-3].description=ze.parseMessage(Ce[Se-1]),this.$=Ce[Se-3];break;case 55:Ce[Se-1].draw="participant",Ce[Se-1].type="addParticipant",this.$=Ce[Se-1];break;case 56:Ce[Se-3].draw="actor",Ce[Se-3].type="addParticipant",Ce[Se-3].description=ze.parseMessage(Ce[Se-1]),this.$=Ce[Se-3];break;case 58:this.$=[Ce[Se-1],{type:"addNote",placement:Ce[Se-2],actor:Ce[Se-1].actor,text:Ce[Se]}];break;case 59:Ce[Se-2]=[].concat(Ce[Se-1],Ce[Se-1]).slice(0,2),Ce[Se-2][0]=Ce[Se-2][0].actor,Ce[Se-2][1]=Ce[Se-2][1].actor,this.$=[Ce[Se-1],{type:"addNote",placement:ze.PLACEMENT.OVER,actor:Ce[Se-2].slice(0,2),text:Ce[Se]}];break;case 60:this.$=[Ce[Se-1],{type:"addLinks",actor:Ce[Se-1].actor,text:Ce[Se]}];break;case 61:this.$=[Ce[Se-1],{type:"addALink",actor:Ce[Se-1].actor,text:Ce[Se]}];break;case 62:this.$=[Ce[Se-1],{type:"addProperties",actor:Ce[Se-1].actor,text:Ce[Se]}];break;case 63:this.$=[Ce[Se-1],{type:"addDetails",actor:Ce[Se-1].actor,text:Ce[Se]}];break;case 66:this.$=[Ce[Se-2],Ce[Se]];break;case 67:this.$=Ce[Se];break;case 68:this.$=ze.PLACEMENT.LEFTOF;break;case 69:this.$=ze.PLACEMENT.RIGHTOF;break;case 70:this.$=[Ce[Se-4],Ce[Se-1],{type:"addMessage",from:Ce[Se-4].actor,to:Ce[Se-1].actor,signalType:Ce[Se-3],msg:Ce[Se],activate:!0},{type:"activeStart",signalType:ze.LINETYPE.ACTIVE_START,actor:Ce[Se-1].actor}];break;case 71:this.$=[Ce[Se-4],Ce[Se-1],{type:"addMessage",from:Ce[Se-4].actor,to:Ce[Se-1].actor,signalType:Ce[Se-3],msg:Ce[Se]},{type:"activeEnd",signalType:ze.LINETYPE.ACTIVE_END,actor:Ce[Se-4].actor}];break;case 72:this.$=[Ce[Se-4],Ce[Se-1],{type:"addMessage",from:Ce[Se-4].actor,to:Ce[Se-1].actor,signalType:Ce[Se-3],msg:Ce[Se],activate:!0,centralConnection:ze.LINETYPE.CENTRAL_CONNECTION},{type:"centralConnection",signalType:ze.LINETYPE.CENTRAL_CONNECTION,actor:Ce[Se-1].actor}];break;case 73:this.$=[Ce[Se-4],Ce[Se-1],{type:"addMessage",from:Ce[Se-4].actor,to:Ce[Se-1].actor,signalType:Ce[Se-2],msg:Ce[Se],activate:!1,centralConnection:ze.LINETYPE.CENTRAL_CONNECTION_REVERSE},{type:"centralConnectionReverse",signalType:ze.LINETYPE.CENTRAL_CONNECTION_REVERSE,actor:Ce[Se-4].actor}];break;case 74:this.$=[Ce[Se-5],Ce[Se-1],{type:"addMessage",from:Ce[Se-5].actor,to:Ce[Se-1].actor,signalType:Ce[Se-3],msg:Ce[Se],activate:!0,centralConnection:ze.LINETYPE.CENTRAL_CONNECTION_DUAL},{type:"centralConnection",signalType:ze.LINETYPE.CENTRAL_CONNECTION,actor:Ce[Se-1].actor},{type:"centralConnectionReverse",signalType:ze.LINETYPE.CENTRAL_CONNECTION_REVERSE,actor:Ce[Se-5].actor}];break;case 75:this.$=[Ce[Se-3],Ce[Se-1],{type:"addMessage",from:Ce[Se-3].actor,to:Ce[Se-1].actor,signalType:Ce[Se-2],msg:Ce[Se]}];break;case 76:this.$={type:"addParticipant",actor:Ce[Se-1],config:Ce[Se]};break;case 77:this.$=Ce[Se-1].trim();break;case 78:this.$={type:"addParticipant",actor:Ce[Se]};break;case 79:this.$=ze.LINETYPE.SOLID_OPEN;break;case 80:this.$=ze.LINETYPE.DOTTED_OPEN;break;case 81:this.$=ze.LINETYPE.SOLID;break;case 82:this.$=ze.LINETYPE.SOLID_TOP;break;case 83:this.$=ze.LINETYPE.SOLID_BOTTOM;break;case 84:this.$=ze.LINETYPE.STICK_TOP;break;case 85:this.$=ze.LINETYPE.STICK_BOTTOM;break;case 86:this.$=ze.LINETYPE.SOLID_TOP_DOTTED;break;case 87:this.$=ze.LINETYPE.SOLID_BOTTOM_DOTTED;break;case 88:this.$=ze.LINETYPE.STICK_TOP_DOTTED;break;case 89:this.$=ze.LINETYPE.STICK_BOTTOM_DOTTED;break;case 90:this.$=ze.LINETYPE.SOLID_ARROW_TOP_REVERSE;break;case 91:this.$=ze.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE;break;case 92:this.$=ze.LINETYPE.STICK_ARROW_TOP_REVERSE;break;case 93:this.$=ze.LINETYPE.STICK_ARROW_BOTTOM_REVERSE;break;case 94:this.$=ze.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED;break;case 95:this.$=ze.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED;break;case 96:this.$=ze.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED;break;case 97:this.$=ze.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED;break;case 98:this.$=ze.LINETYPE.BIDIRECTIONAL_SOLID;break;case 99:this.$=ze.LINETYPE.DOTTED;break;case 100:this.$=ze.LINETYPE.BIDIRECTIONAL_DOTTED;break;case 101:this.$=ze.LINETYPE.SOLID_CROSS;break;case 102:this.$=ze.LINETYPE.DOTTED_CROSS;break;case 103:this.$=ze.LINETYPE.SOLID_POINT;break;case 104:this.$=ze.LINETYPE.DOTTED_POINT;break;case 105:this.$=ze.parseMessage(Ce[Se].trim().substring(1));break}},"anonymous"),table:[{3:1,4:t,5:r,6:i},{1:[3]},{3:5,4:t,5:r,6:i},{3:6,4:t,5:r,6:i},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,56,61,62,63,64,73],n,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:a,5:s,8:8,9:10,10:l,13:13,14:h,15:u,18:16,19:d,22:p,23:41,24:f,25:20,26:21,27:22,28:23,29:24,30:g,31:m,32:y,34:b,36:v,37:T,38:x,39:k,40:C,42:E,44:w,45:_,47:L,51:N,53:D,54:M,56:B,61:A,62:I,63:O,64:R,73:$},e(F,[2,5]),{9:48,13:13,14:h,15:u,18:16,19:d,22:p,23:41,24:f,25:20,26:21,27:22,28:23,29:24,30:g,31:m,32:y,34:b,36:v,37:T,38:x,39:k,40:C,42:E,44:w,45:_,47:L,51:N,53:D,54:M,56:B,61:A,62:I,63:O,64:R,73:$},e(F,[2,7]),e(F,[2,8]),e(F,[2,9]),e(F,[2,15]),{13:49,51:N,53:D,54:M},{16:[1,50]},{5:[1,51]},{5:[1,54],20:[1,52],21:[1,53]},{23:55,73:$},{23:56,73:$},{5:[1,57]},{5:[1,58]},{5:[1,59]},{5:[1,60]},{5:[1,61]},e(F,[2,30]),e(F,[2,31]),{33:[1,62]},{35:[1,63]},e(F,[2,34]),{16:[1,64]},{16:[1,65]},{16:[1,66]},{16:[1,67]},{16:[1,68]},{16:[1,69]},{16:[1,70]},{16:[1,71]},{23:72,55:73,73:P},{23:75,55:76,73:P},{23:77,73:$},{69:78,72:[1,79],78:z,79:q,80:G,81:W,82:J,83:H,84:Z,85:se,86:Q,87:te,88:re,89:ne,90:Ae,91:ie,92:me,93:oe,94:we,95:ye,96:ve,97:ae,98:Pe,99:X,100:ce,101:ge,102:be,103:ke},{57:106,59:[1,107],67:[1,108],68:[1,109]},{23:110,73:$},{23:111,73:$},{23:112,73:$},{23:113,73:$},e([5,66,72,78,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],Me),e(F,[2,6]),e(F,[2,16]),e(pe,[2,10],{11:114}),e(F,[2,18]),{5:[1,116],20:[1,115]},{5:[1,117]},e(F,[2,22]),{5:[1,118]},{5:[1,119]},e(F,[2,25]),e(F,[2,26]),e(F,[2,27]),e(F,[2,28]),e(F,[2,29]),e(F,[2,32]),e(F,[2,33]),e(Oe,n,{7:120}),e(Oe,n,{7:121}),e(Oe,n,{7:122}),e(j,n,{41:123,7:124}),e(le,n,{43:125,7:126}),e(le,n,{7:126,43:127}),e(U,n,{46:128,7:129}),e(Oe,n,{7:130}),{5:[1,132],52:[1,131]},{5:[1,134],52:[1,133]},e(fe,Me,{74:135,75:[1,136]}),{5:[1,138],52:[1,137]},{5:[1,140],52:[1,139]},{5:[1,141]},{23:145,70:[1,142],71:[1,143],72:[1,144],73:$},{69:146,78:z,79:q,80:G,81:W,82:J,83:H,84:Z,85:se,86:Q,87:te,88:re,89:ne,90:Ae,91:ie,92:me,93:oe,94:we,95:ye,96:ve,97:ae,98:Pe,99:X,100:ce,101:ge,102:be,103:ke},e(Y,[2,79]),e(Y,[2,80]),e(Y,[2,81]),e(Y,[2,82]),e(Y,[2,83]),e(Y,[2,84]),e(Y,[2,85]),e(Y,[2,86]),e(Y,[2,87]),e(Y,[2,88]),e(Y,[2,89]),e(Y,[2,90]),e(Y,[2,91]),e(Y,[2,92]),e(Y,[2,93]),e(Y,[2,94]),e(Y,[2,95]),e(Y,[2,96]),e(Y,[2,97]),e(Y,[2,98]),e(Y,[2,99]),e(Y,[2,100]),e(Y,[2,101]),e(Y,[2,102]),e(Y,[2,103]),e(Y,[2,104]),{23:147,73:$},{23:149,60:148,73:$},{73:[2,68]},{73:[2,69]},{58:150,104:Le},{58:152,104:Le},{58:153,104:Le},{58:154,104:Le},{4:[1,157],5:[1,159],12:156,13:158,17:[1,155],51:N,53:D,54:M},{5:[1,160]},e(F,[2,20]),e(F,[2,21]),e(F,[2,23]),e(F,[2,24]),{4:a,5:s,8:8,9:10,10:l,13:13,14:h,15:u,17:[1,161],18:16,19:d,22:p,23:41,24:f,25:20,26:21,27:22,28:23,29:24,30:g,31:m,32:y,34:b,36:v,37:T,38:x,39:k,40:C,42:E,44:w,45:_,47:L,51:N,53:D,54:M,56:B,61:A,62:I,63:O,64:R,73:$},{4:a,5:s,8:8,9:10,10:l,13:13,14:h,15:u,17:[1,162],18:16,19:d,22:p,23:41,24:f,25:20,26:21,27:22,28:23,29:24,30:g,31:m,32:y,34:b,36:v,37:T,38:x,39:k,40:C,42:E,44:w,45:_,47:L,51:N,53:D,54:M,56:B,61:A,62:I,63:O,64:R,73:$},{4:a,5:s,8:8,9:10,10:l,13:13,14:h,15:u,17:[1,163],18:16,19:d,22:p,23:41,24:f,25:20,26:21,27:22,28:23,29:24,30:g,31:m,32:y,34:b,36:v,37:T,38:x,39:k,40:C,42:E,44:w,45:_,47:L,51:N,53:D,54:M,56:B,61:A,62:I,63:O,64:R,73:$},{17:[1,164]},{4:a,5:s,8:8,9:10,10:l,13:13,14:h,15:u,17:[2,47],18:16,19:d,22:p,23:41,24:f,25:20,26:21,27:22,28:23,29:24,30:g,31:m,32:y,34:b,36:v,37:T,38:x,39:k,40:C,42:E,44:w,45:_,47:L,50:[1,165],51:N,53:D,54:M,56:B,61:A,62:I,63:O,64:R,73:$},{17:[1,166]},{4:a,5:s,8:8,9:10,10:l,13:13,14:h,15:u,17:[2,45],18:16,19:d,22:p,23:41,24:f,25:20,26:21,27:22,28:23,29:24,30:g,31:m,32:y,34:b,36:v,37:T,38:x,39:k,40:C,42:E,44:w,45:_,47:L,49:[1,167],51:N,53:D,54:M,56:B,61:A,62:I,63:O,64:R,73:$},{17:[1,168]},{17:[1,169]},{4:a,5:s,8:8,9:10,10:l,13:13,14:h,15:u,17:[2,43],18:16,19:d,22:p,23:41,24:f,25:20,26:21,27:22,28:23,29:24,30:g,31:m,32:y,34:b,36:v,37:T,38:x,39:k,40:C,42:E,44:w,45:_,47:L,48:[1,170],51:N,53:D,54:M,56:B,61:A,62:I,63:O,64:R,73:$},{4:a,5:s,8:8,9:10,10:l,13:13,14:h,15:u,17:[1,171],18:16,19:d,22:p,23:41,24:f,25:20,26:21,27:22,28:23,29:24,30:g,31:m,32:y,34:b,36:v,37:T,38:x,39:k,40:C,42:E,44:w,45:_,47:L,51:N,53:D,54:M,56:B,61:A,62:I,63:O,64:R,73:$},{16:[1,172]},e(F,[2,50]),{16:[1,173]},e(F,[2,55]),e(fe,[2,76]),{76:[1,174]},{16:[1,175]},e(F,[2,52]),{16:[1,176]},e(F,[2,57]),e(F,[2,53]),{23:177,73:$},{23:178,73:$},{23:179,73:$},{58:180,104:Le},{23:181,72:[1,182],73:$},{58:183,104:Le},{58:184,104:Le},{66:[1,185],104:[2,67]},{5:[2,60]},{5:[2,105]},{5:[2,61]},{5:[2,62]},{5:[2,63]},e(F,[2,17]),e(pe,[2,11]),{13:186,51:N,53:D,54:M},e(pe,[2,13]),e(pe,[2,14]),e(F,[2,19]),e(F,[2,35]),e(F,[2,36]),e(F,[2,37]),e(F,[2,38]),{16:[1,187]},e(F,[2,39]),{16:[1,188]},e(F,[2,40]),e(F,[2,41]),{16:[1,189]},e(F,[2,42]),{5:[1,190]},{5:[1,191]},{77:[1,192]},{5:[1,193]},{5:[1,194]},{58:195,104:Le},{58:196,104:Le},{58:197,104:Le},{5:[2,75]},{58:198,104:Le},{23:199,73:$},{5:[2,58]},{5:[2,59]},{23:200,73:$},e(pe,[2,12]),e(j,n,{7:124,41:201}),e(le,n,{7:126,43:202}),e(U,n,{7:129,46:203}),e(F,[2,49]),e(F,[2,54]),e(fe,[2,77]),e(F,[2,51]),e(F,[2,56]),{5:[2,70]},{5:[2,71]},{5:[2,72]},{5:[2,73]},{58:204,104:Le},{104:[2,66]},{17:[2,48]},{17:[2,46]},{17:[2,44]},{5:[2,74]}],defaultActions:{5:[2,1],6:[2,2],108:[2,68],109:[2,69],150:[2,60],151:[2,105],152:[2,61],153:[2,62],154:[2,63],180:[2,75],183:[2,58],184:[2,59],195:[2,70],196:[2,71],197:[2,72],198:[2,73],200:[2,66],201:[2,48],202:[2,46],203:[2,44],204:[2,74]},parseError:o(function(Ve,Ne){if(Ne.recoverable)this.trace(Ve);else{var Ge=new Error(Ve);throw Ge.hash=Ne,Ge}},"parseError"),parse:o(function(Ve){var Ne=this,Ge=[0],ze=[],Ue=[null],Ce=[],ct=this.table,Se="",at=0,dt=0,gt=0,Ct=2,kt=1,$t=Ce.slice.call(arguments,1),ut=Object.create(this.lexer),de={yy:{}};for(var st in this.yy)Object.prototype.hasOwnProperty.call(this.yy,st)&&(de.yy[st]=this.yy[st]);ut.setInput(Ve,de.yy),de.yy.lexer=ut,de.yy.parser=this,typeof ut.yylloc>"u"&&(ut.yylloc={});var nt=ut.yylloc;Ce.push(nt);var rt=ut.options&&ut.options.ranges;typeof de.yy.parseError=="function"?this.parseError=de.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function _e(Yt){Ge.length=Ge.length-2*Yt,Ue.length=Ue.length-Yt,Ce.length=Ce.length-Yt}o(_e,"popStack");function Ze(){var Yt;return Yt=ze.pop()||ut.lex()||kt,typeof Yt!="number"&&(Yt instanceof Array&&(ze=Yt,Yt=ze.pop()),Yt=Ne.symbols_[Yt]||Yt),Yt}o(Ze,"lex");for(var He,yt,_t,Ot,ir,ur,Ee={},ot,Be,Ke,ht;;){if(_t=Ge[Ge.length-1],this.defaultActions[_t]?Ot=this.defaultActions[_t]:((He===null||typeof He>"u")&&(He=Ze()),Ot=ct[_t]&&ct[_t][He]),typeof Ot>"u"||!Ot.length||!Ot[0]){var At="";ht=[];for(ot in ct[_t])this.terminals_[ot]&&ot>Ct&&ht.push("'"+this.terminals_[ot]+"'");ut.showPosition?At="Parse error on line "+(at+1)+`: +`+ut.showPosition()+` +Expecting `+ht.join(", ")+", got '"+(this.terminals_[He]||He)+"'":At="Parse error on line "+(at+1)+": Unexpected "+(He==kt?"end of input":"'"+(this.terminals_[He]||He)+"'"),this.parseError(At,{text:ut.match,token:this.terminals_[He]||He,line:ut.yylineno,loc:nt,expected:ht})}if(Ot[0]instanceof Array&&Ot.length>1)throw new Error("Parse Error: multiple actions possible at state: "+_t+", token: "+He);switch(Ot[0]){case 1:Ge.push(He),Ue.push(ut.yytext),Ce.push(ut.yylloc),Ge.push(Ot[1]),He=null,yt?(He=yt,yt=null):(dt=ut.yyleng,Se=ut.yytext,at=ut.yylineno,nt=ut.yylloc,gt>0&>--);break;case 2:if(Be=this.productions_[Ot[1]][1],Ee.$=Ue[Ue.length-Be],Ee._$={first_line:Ce[Ce.length-(Be||1)].first_line,last_line:Ce[Ce.length-1].last_line,first_column:Ce[Ce.length-(Be||1)].first_column,last_column:Ce[Ce.length-1].last_column},rt&&(Ee._$.range=[Ce[Ce.length-(Be||1)].range[0],Ce[Ce.length-1].range[1]]),ur=this.performAction.apply(Ee,[Se,dt,at,de.yy,Ot[1],Ue,Ce].concat($t)),typeof ur<"u")return ur;Be&&(Ge=Ge.slice(0,-1*Be*2),Ue=Ue.slice(0,-1*Be),Ce=Ce.slice(0,-1*Be)),Ge.push(this.productions_[Ot[1]][0]),Ue.push(Ee.$),Ce.push(Ee._$),Ke=ct[Ge[Ge.length-2]][Ge[Ge.length-1]],Ge.push(Ke);break;case 3:return!0}}return!0},"parse")},je=(function(){var Ve={EOF:1,parseError:o(function(Ne,Ge){if(this.yy.parser)this.yy.parser.parseError(Ne,Ge);else throw new Error(Ne)},"parseError"),setInput:o(function(Ne,Ge){return this.yy=Ge||this.yy||{},this._input=Ne,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:o(function(){var Ne=this._input[0];this.yytext+=Ne,this.yyleng++,this.offset++,this.match+=Ne,this.matched+=Ne;var Ge=Ne.match(/(?:\r\n?|\n).*/g);return Ge?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),Ne},"input"),unput:o(function(Ne){var Ge=Ne.length,ze=Ne.split(/(?:\r\n?|\n)/g);this._input=Ne+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-Ge),this.offset-=Ge;var Ue=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),ze.length-1&&(this.yylineno-=ze.length-1);var Ce=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:ze?(ze.length===Ue.length?this.yylloc.first_column:0)+Ue[Ue.length-ze.length].length-ze[0].length:this.yylloc.first_column-Ge},this.options.ranges&&(this.yylloc.range=[Ce[0],Ce[0]+this.yyleng-Ge]),this.yyleng=this.yytext.length,this},"unput"),more:o(function(){return this._more=!0,this},"more"),reject:o(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:o(function(Ne){this.unput(this.match.slice(Ne))},"less"),pastInput:o(function(){var Ne=this.matched.substr(0,this.matched.length-this.match.length);return(Ne.length>20?"...":"")+Ne.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:o(function(){var Ne=this.match;return Ne.length<20&&(Ne+=this._input.substr(0,20-Ne.length)),(Ne.substr(0,20)+(Ne.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:o(function(){var Ne=this.pastInput(),Ge=new Array(Ne.length+1).join("-");return Ne+this.upcomingInput()+` +`+Ge+"^"},"showPosition"),test_match:o(function(Ne,Ge){var ze,Ue,Ce;if(this.options.backtrack_lexer&&(Ce={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&&(Ce.yylloc.range=this.yylloc.range.slice(0))),Ue=Ne[0].match(/(?:\r\n?|\n).*/g),Ue&&(this.yylineno+=Ue.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:Ue?Ue[Ue.length-1].length-Ue[Ue.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+Ne[0].length},this.yytext+=Ne[0],this.match+=Ne[0],this.matches=Ne,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(Ne[0].length),this.matched+=Ne[0],ze=this.performAction.call(this,this.yy,this,Ge,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),ze)return ze;if(this._backtrack){for(var ct in Ce)this[ct]=Ce[ct];return!1}return!1},"test_match"),next:o(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var Ne,Ge,ze,Ue;this._more||(this.yytext="",this.match="");for(var Ce=this._currentRules(),ct=0;ctGe[0].length)){if(Ge=ze,Ue=ct,this.options.backtrack_lexer){if(Ne=this.test_match(ze,Ce[ct]),Ne!==!1)return Ne;if(this._backtrack){Ge=!1;continue}else return!1}else if(!this.options.flex)break}return Ge?(Ne=this.test_match(Ge,Ce[Ue]),Ne!==!1?Ne:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:o(function(){var Ne=this.next();return Ne||this.lex()},"lex"),begin:o(function(Ne){this.conditionStack.push(Ne)},"begin"),popState:o(function(){var Ne=this.conditionStack.length-1;return Ne>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:o(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:o(function(Ne){return Ne=this.conditionStack.length-1-Math.abs(Ne||0),Ne>=0?this.conditionStack[Ne]:"INITIAL"},"topState"),pushState:o(function(Ne){this.begin(Ne)},"pushState"),stateStackSize:o(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:o(function(Ne,Ge,ze,Ue){var Ce=Ue;switch(ze){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"),75;case 8:return 76;case 9:return this.popState(),this.begin("ALIAS"),77;case 10:return this.popState(),this.popState(),77;case 11:return Ge.yytext=Ge.yytext.trim(),73;case 12:return Ge.yytext=Ge.yytext.trim(),this.begin("ALIAS"),73;case 13:return Ge.yytext=Ge.yytext.trim(),this.popState(),73;case 14:return this.popState(),10;case 15:return Ge.yytext=Ge.yytext.trim(),this.popState(),10;case 16:return this.begin("LINE"),15;case 17:return this.begin("ID"),51;case 18:return this.begin("ID"),53;case 19:return 14;case 20:return this.begin("ID"),54;case 21:return this.popState(),this.popState(),this.begin("LINE"),52;case 22:return this.popState(),this.popState(),5;case 23:return this.begin("LINE"),37;case 24:return this.begin("LINE"),38;case 25:return this.begin("LINE"),39;case 26:return this.begin("LINE"),40;case 27:return this.begin("LINE"),50;case 28:return this.begin("LINE"),42;case 29:return this.begin("LINE"),44;case 30:return this.begin("LINE"),49;case 31:return this.begin("LINE"),45;case 32:return this.begin("LINE"),48;case 33:return this.begin("LINE"),47;case 34:return this.popState(),16;case 35:return 17;case 36:return 67;case 37:return 68;case 38:return 61;case 39:return 62;case 40:return 63;case 41:return 64;case 42:return 59;case 43:return 56;case 44:return this.begin("ID"),22;case 45:return this.begin("ID"),24;case 46:return 30;case 47:return 31;case 48:return this.begin("acc_title"),32;case 49:return this.popState(),"acc_title_value";case 50:return this.begin("acc_descr"),34;case 51:return this.popState(),"acc_descr_value";case 52:this.begin("acc_descr_multiline");break;case 53:this.popState();break;case 54:return"acc_descr_multiline_value";case 55:return 6;case 56:return 19;case 57:return 21;case 58:return 66;case 59:return 5;case 60:return Ge.yytext=Ge.yytext.trim(),73;case 61:return 80;case 62:return 97;case 63:return 98;case 64:return 99;case 65:return 78;case 66:return 79;case 67:return 100;case 68:return 101;case 69:return 102;case 70:return 103;case 71:return 85;case 72:return 86;case 73:return 87;case 74:return 88;case 75:return 93;case 76:return 94;case 77:return 95;case 78:return 96;case 79:return 81;case 80:return 82;case 81:return 83;case 82:return 84;case 83:return 89;case 84:return 90;case 85:return 91;case 86:return 92;case 87:return 104;case 88:return 104;case 89:return 70;case 90:return 71;case 91:return 72;case 92:return 5;case 93: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,/^(?: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:[53,54],inclusive:!1},acc_descr:{rules:[51],inclusive:!1},acc_title:{rules:[49],inclusive:!1},ID:{rules:[2,3,7,11,12,13,14,15],inclusive:!1},ALIAS:{rules:[2,3,21,22],inclusive:!1},LINE:{rules:[2,3,34],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,23,24,25,26,27,28,29,30,31,32,33,35,36,37,38,39,40,41,42,43,44,45,46,47,48,50,52,55,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],inclusive:!0}}};return Ve})();xe.lexer=je;function Ie(){this.yy={}}return o(Ie,"Parser"),Ie.prototype=xe,xe.Parser=Ie,new Ie})();OH.parser=OH;$pt=OH,Ipt={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},Dpt={FILLED:0,OPEN:1},Mpt={LEFTOF:0,RIGHTOF:1,OVER:2},w_={ACTOR:"actor",BOUNDARY:"boundary",COLLECTIONS:"collections",CONTROL:"control",DATABASE:"database",ENTITY:"entity",PARTICIPANT:"participant",QUEUE:"queue"},Npt=class{constructor(){this.state=new Lm(()=>({prevActor:void 0,actors:new Map,createdActors:new Map,destroyedActors:new Map,boxes:[],messages:[],notes:[],sequenceNumbersEnabled:!1,wrapEnabled:void 0,currentBox:void 0,lastCreated:void 0,lastDestroyed:void 0})),this.setAccTitle=gr,this.setAccDescription=Tr,this.setDiagramTitle=_r,this.getAccTitle=xr,this.getAccDescription=kr,this.getDiagramTitle=Cr,this.apply=this.apply.bind(this),this.parseBoxData=this.parseBoxData.bind(this),this.parseMessage=this.parseMessage.bind(this),this.clear(),this.setWrap(De().wrap),this.LINETYPE=Ipt,this.ARROWTYPE=Dpt,this.PLACEMENT=Mpt}static{o(this,"SequenceDB")}addBox(e){this.state.records.boxes.push({name:e.text,wrap:e.wrap??this.autoWrap(),fill:e.color,actorKeys:[]}),this.state.records.currentBox=this.state.records.boxes.slice(-1)[0]}addActor(e,t,r,i,n){let a=this.state.records.currentBox,s;if(n!==void 0){let h;n.includes(` +`)?h=n+` +`:h=`{ +`+n+` +}`,s=ju(h,{schema:qu})}i=s?.type??i,s?.alias&&(!r||r.text===t)&&(r={text:s.alias,wrap:r?.wrap,type:i});let l=this.state.records.actors.get(e);if(l){if(this.state.records.currentBox&&l.box&&this.state.records.currentBox!==l.box)throw new Error(`A same participant should only be defined in one Box: ${l.name} can't be in '${l.box.name}' and in '${this.state.records.currentBox.name}' at the same time.`);if(a=l.box?l.box:this.state.records.currentBox,l.box=a,l&&t===l.name&&r==null)return}if(r?.text==null&&(r={text:t,type:i}),(i==null||r.text==null)&&(r={text:t,type:i}),this.state.records.actors.set(e,{box:a,name:t,description:r.text,wrap:r.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=e)}this.state.records.currentBox&&this.state.records.currentBox.actorKeys.push(e),this.state.records.prevActor=e}activationCount(e){let t,r=0;if(!e)return 0;for(t=0;t>-",token:"->>-",line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["'ACTIVE_PARTICIPANT'"]},s}return this.state.records.messages.push({id:this.state.records.messages.length.toString(),from:e,to:t,message:r?.text??"",wrap:r?.wrap??this.autoWrap(),type:i,activate:n,centralConnection:a??0}),!0}hasAtLeastOneBox(){return this.state.records.boxes.length>0}hasAtLeastOneBoxWithTitle(){return this.state.records.boxes.some(e=>e.name)}getMessages(){return this.state.records.messages}getBoxes(){return this.state.records.boxes}getActors(){return this.state.records.actors}getCreatedActors(){return this.state.records.createdActors}getDestroyedActors(){return this.state.records.destroyedActors}getActor(e){return this.state.records.actors.get(e)}getActorKeys(){return[...this.state.records.actors.keys()]}enableSequenceNumbers(){this.state.records.sequenceNumbersEnabled=!0}disableSequenceNumbers(){this.state.records.sequenceNumbersEnabled=!1}showSequenceNumbers(){return this.state.records.sequenceNumbersEnabled}setWrap(e){this.state.records.wrapEnabled=e}extractWrap(e){if(e===void 0)return{};e=e.trim();let t=/^:?wrap:/.exec(e)!==null?!0:/^:?nowrap:/.exec(e)!==null?!1:void 0;return{cleanedText:(t===void 0?e:e.replace(/^:?(?:no)?wrap:/,"")).trim(),wrap:t}}autoWrap(){return this.state.records.wrapEnabled!==void 0?this.state.records.wrapEnabled:De().sequence?.wrap??!1}clear(){this.state.reset(),ar()}parseMessage(e){let t=e.trim(),{wrap:r,cleanedText:i}=this.extractWrap(t),n={text:i,wrap:r};return ee.debug(`parseMessage: ${JSON.stringify(n)}`),n}parseBoxData(e){let t=/^((?:rgba?|hsla?)\s*\(.*\)|\w*)(.*)$/.exec(e),r=t?.[1]?t[1].trim():"transparent",i=t?.[2]?t[2].trim():void 0;if(window?.CSS)window.CSS.supports("color",r)||(r="transparent",i=e.trim());else{let s=new Option().style;s.color=r,s.color!==r&&(r="transparent",i=e.trim())}let{wrap:n,cleanedText:a}=this.extractWrap(i);return{text:a?nr(a,De()):void 0,color:r,wrap:n}}addNote(e,t,r){let i={actor:e,placement:t,message:r.text,wrap:r.wrap??this.autoWrap()},n=[].concat(e,e);this.state.records.notes.push(i),this.state.records.messages.push({id:this.state.records.messages.length.toString(),from:n[0],to:n[1],message:r.text,wrap:r.wrap??this.autoWrap(),type:this.LINETYPE.NOTE,placement:t})}addLinks(e,t){let r=this.getActor(e);try{let i=nr(t.text,De());i=i.replace(/=/g,"="),i=i.replace(/&/g,"&");let n=JSON.parse(i);this.insertLinks(r,n)}catch(i){ee.error("error while parsing actor link text",i)}}addALink(e,t){let r=this.getActor(e);try{let i={},n=nr(t.text,De()),a=n.indexOf("@");n=n.replace(/=/g,"="),n=n.replace(/&/g,"&");let s=n.slice(0,a-1).trim(),l=n.slice(a+1).trim();i[s]=l,this.insertLinks(r,i)}catch(i){ee.error("error while parsing actor link text",i)}}insertLinks(e,t){if(e.links==null)e.links=t;else for(let r in t)e.links[r]=t[r]}addProperties(e,t){let r=this.getActor(e);try{let i=nr(t.text,De()),n=JSON.parse(i);this.insertProperties(r,n)}catch(i){ee.error("error while parsing actor properties text",i)}}insertProperties(e,t){if(e.properties==null)e.properties=t;else for(let r in t)e.properties[r]=t[r]}boxEnd(){this.state.records.currentBox=void 0}addDetails(e,t){let r=this.getActor(e),i=document.getElementById(t.text);try{let n=i.innerHTML,a=JSON.parse(n);a.properties&&this.insertProperties(r,a.properties),a.links&&this.insertLinks(r,a.links)}catch(n){ee.error("error while parsing actor details text",n)}}getActorProperty(e,t){if(e?.properties!==void 0)return e.properties[t]}apply(e){if(Array.isArray(e))e.forEach(t=>{this.apply(t)});else switch(e.type){case"sequenceIndex":this.state.records.messages.push({id:this.state.records.messages.length.toString(),from:void 0,to:void 0,message:{start:e.sequenceIndex,step:e.sequenceIndexStep,visible:e.sequenceVisible},wrap:!1,type:e.signalType});break;case"addParticipant":this.addActor(e.actor,e.actor,e.description,e.draw,e.config);break;case"createParticipant":if(this.state.records.actors.has(e.actor))throw new Error("It is not possible to have actors with the same id, even if one is destroyed before the next is created. Use 'AS' aliases to simulate the behavior");this.state.records.lastCreated=e.actor,this.addActor(e.actor,e.actor,e.description,e.draw,e.config),this.state.records.createdActors.set(e.actor,this.state.records.messages.length);break;case"destroyParticipant":this.state.records.lastDestroyed=e.actor,this.state.records.destroyedActors.set(e.actor,this.state.records.messages.length);break;case"activeStart":this.addSignal(e.actor,void 0,void 0,e.signalType);break;case"centralConnection":this.addSignal(e.actor,void 0,void 0,e.signalType);break;case"centralConnectionReverse":this.addSignal(e.actor,void 0,void 0,e.signalType);break;case"activeEnd":this.addSignal(e.actor,void 0,void 0,e.signalType);break;case"addNote":this.addNote(e.actor,e.placement,e.text);break;case"addLinks":this.addLinks(e.actor,e.text);break;case"addALink":this.addALink(e.actor,e.text);break;case"addProperties":this.addProperties(e.actor,e.text);break;case"addDetails":this.addDetails(e.actor,e.text);break;case"addMessage":if(this.state.records.lastCreated){if(e.to!==this.state.records.lastCreated)throw new Error("The created participant "+this.state.records.lastCreated.name+" does not have an associated creating message after its declaration. Please check the sequence diagram.");this.state.records.lastCreated=void 0}else if(this.state.records.lastDestroyed){if(e.to!==this.state.records.lastDestroyed&&e.from!==this.state.records.lastDestroyed)throw new Error("The destroyed participant "+this.state.records.lastDestroyed.name+" does not have an associated destroying message after its declaration. Please check the sequence diagram.");this.state.records.lastDestroyed=void 0}this.addSignal(e.from,e.to,e.msg,e.signalType,e.activate,e.centralConnection);break;case"boxStart":this.addBox(e.boxData);break;case"boxEnd":this.boxEnd();break;case"loopStart":this.addSignal(void 0,void 0,e.loopText,e.signalType);break;case"loopEnd":this.addSignal(void 0,void 0,void 0,e.signalType);break;case"rectStart":this.addSignal(void 0,void 0,e.color,e.signalType);break;case"rectEnd":this.addSignal(void 0,void 0,void 0,e.signalType);break;case"optStart":this.addSignal(void 0,void 0,e.optText,e.signalType);break;case"optEnd":this.addSignal(void 0,void 0,void 0,e.signalType);break;case"altStart":this.addSignal(void 0,void 0,e.altText,e.signalType);break;case"else":this.addSignal(void 0,void 0,e.altText,e.signalType);break;case"altEnd":this.addSignal(void 0,void 0,void 0,e.signalType);break;case"setAccTitle":gr(e.text);break;case"parStart":this.addSignal(void 0,void 0,e.parText,e.signalType);break;case"and":this.addSignal(void 0,void 0,e.parText,e.signalType);break;case"parEnd":this.addSignal(void 0,void 0,void 0,e.signalType);break;case"criticalStart":this.addSignal(void 0,void 0,e.criticalText,e.signalType);break;case"option":this.addSignal(void 0,void 0,e.optionText,e.signalType);break;case"criticalEnd":this.addSignal(void 0,void 0,void 0,e.signalType);break;case"breakStart":this.addSignal(void 0,void 0,e.breakText,e.signalType);break;case"breakEnd":this.addSignal(void 0,void 0,void 0,e.signalType);break}}getConfig(){return De().sequence}},Opt=o(e=>{let t=e.dropShadow??"none",{look:r}=De();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"),Bpt=Opt,XSe=tn(dc(),1),Rg=36,ip="actor-top",np="actor-bottom",S_="actor-box",Lg="actor-man",lu=new Set(["redux-color","redux-dark-color"]),bT=o(function(e,t){let r=Rf(e,t);return Rt().look==="neo"&&r.attr("data-look","neo"),r},"drawRect"),Ppt=o(function(e,t,r,i,n){if(t.links===void 0||t.links===null||Object.keys(t.links).length===0)return{height:0,width:0};let a=t.links,s=t.actorCnt,l=t.rectData;var h="none";n&&(h="block !important");let u=e.append("g");u.attr("id","actor"+s+"_popup"),u.attr("class","actorPopupMenu"),u.attr("display",h);var d="";l.class!==void 0&&(d=" "+l.class);let p=l.width>r?l.width:r,f=u.append("rect");if(f.attr("class","actorPopupMenuPanel"+d),f.attr("x",l.x),f.attr("y",l.height),f.attr("fill",l.fill),f.attr("stroke",l.stroke),f.attr("width",p),f.attr("height",l.height),f.attr("rx",l.rx),f.attr("ry",l.ry),a!=null){var g=20;for(let b in a){var m=u.append("a"),y=(0,XSe.sanitizeUrl)(a[b]);m.attr("xlink:href",y),m.attr("target","_blank"),oft(i)(b,m,l.x+10,l.height+g,p,20,{class:"actor"},i),g+=30}}return f.attr("height",g),{height:l.height+g,width:p}},"drawPopup"),__=o(function(e){return"var pu = document.getElementById('"+e+"'); if (pu != null) { pu.style.display = pu.style.display == 'block' ? 'none' : 'block'; }"},"popupMenuToggle"),E_=o(async function(e,t,r=null){let i=e.append("foreignObject"),n=await T0(t.text,Rt()),a=i.append("xhtml:div").attr("style","width: fit-content;").attr("xmlns","http://www.w3.org/1999/xhtml").html(n).node().getBoundingClientRect();if(i.attr("height",Math.round(a.height)).attr("width",Math.round(a.width)),t.class==="noteText"){let s=e.node().firstChild;s.setAttribute("height",a.height+2*t.textMargin);let l=s.getBBox();i.attr("x",Math.round(l.x+l.width/2-a.width/2)).attr("y",Math.round(l.y+l.height/2-a.height/2))}else if(r){let{startx:s,stopx:l,starty:h}=r;if(s>l){let u=s;s=l,l=u}i.attr("x",Math.round(s+Math.abs(s-l)/2-a.width/2)),t.class==="loopText"?i.attr("y",Math.round(h)):i.attr("y",Math.round(h-a.height))}return[i]},"drawKatex"),J1=o(function(e,t){let r=0,i=0,n=t.text.split(ft.lineBreakRegex),[a,s]=Os(t.fontSize),l=[],h=0,u=o(()=>t.y,"yfunc");if(t.valign!==void 0&&t.textMargin!==void 0&&t.textMargin>0)switch(t.valign){case"top":case"start":u=o(()=>Math.round(t.y+t.textMargin),"yfunc");break;case"middle":case"center":u=o(()=>Math.round(t.y+(r+i+t.textMargin)/2),"yfunc");break;case"bottom":case"end":u=o(()=>Math.round(t.y+(r+i+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,p]of n.entries()){t.textMargin!==void 0&&t.textMargin===0&&a!==void 0&&(h=d*a);let f=e.append("text");f.attr("x",t.x),f.attr("y",u()),t.anchor!==void 0&&f.attr("text-anchor",t.anchor).attr("dominant-baseline",t.dominantBaseline).attr("alignment-baseline",t.alignmentBaseline),t.fontFamily!==void 0&&f.style("font-family",t.fontFamily),s!==void 0&&f.style("font-size",s),t.fontWeight!==void 0&&f.style("font-weight",t.fontWeight),t.fill!==void 0&&f.attr("fill",t.fill),t.class!==void 0&&f.attr("class",t.class),t.dy!==void 0?f.attr("dy",t.dy):h!==0&&f.attr("dy",h);let g=p||UL;if(t.tspan){let m=f.append("tspan");m.attr("x",t.x),t.fill!==void 0&&m.attr("fill",t.fill),m.text(g)}else f.text(g);t.valign!==void 0&&t.textMargin!==void 0&&t.textMargin>0&&(i+=(f._groups||f)[0][0].getBBox().height,r=i),l.push(f)}return l},"drawText"),KSe=o(function(e,t){function r(n,a,s,l,h){return n+","+a+" "+(n+s)+","+a+" "+(n+s)+","+(a+l-h)+" "+(n+s-h*1.2)+","+(a+l)+" "+n+","+(a+l)}o(r,"genPoints");let i=e.append("polygon");return i.attr("points",r(t.x,t.y,t.width,t.height,7)),i.attr("class","labelBox"),t.y=t.y+t.height/2,J1(e,t),i},"drawLabel"),Wr=-1,ZSe=o((e,t,r,i)=>{e.select&&r.forEach(n=>{let a=t.get(n),s=e.select("#actor"+a.actorCnt);!i.mirrorActors&&a.stopy?s.attr("y2",a.stopy+a.height/2):i.mirrorActors&&s.attr("y2",a.stopy)})},"fixLifeLineHeights"),Fpt=o(function(e,t,r,i,n){let a=i?t.stopy:t.starty,s=t.x+t.width/2,l=a+t.height,{look:h,theme:u,themeVariables:d}=r,{bkgColorArray:p,borderColorArray:f}=d,g=e.append("g").lower();var m=g;i||(Wr++,Object.keys(t.links||{}).length&&!r.forceMenus&&m.attr("onclick",__(`actor${Wr}_popup`)).attr("cursor","pointer"),m.append("line").attr("id","actor"+Wr).attr("x1",s).attr("y1",l).attr("x2",s).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),m=g.append("g"),t.actorCnt=Wr,t.links!=null&&m.attr("id","root-"+Wr),h==="neo"&&m.attr("data-look","neo"));let y=Za();var b="actor";t.properties?.class?b=t.properties.class:y.fill="#eaeaea",i?b+=` ${np}`:b+=` ${ip}`,y.x=t.x,y.y=a,y.width=t.width,y.height=t.height,y.class=b,y.rx=3,y.ry=3,y.name=t.name,h==="neo"&&(y.rx=6,y.ry=6);let v=bT(m,y),T=n.get(t.name)??0;if(lu.has(u)&&(v.style("stroke",f[T%f.length]),v.style("fill",p[T%f.length])),h==="neo"&&v.attr("filter","url(#drop-shadow)"),t.rectData=y,t.properties?.icon){let k=t.properties.icon.trim();k.charAt(0)==="@"?Vw(m,y.x+y.width-20,y.y+10,k.substr(1)):Uw(m,y.x+y.width-20,y.y+10,k)}i||(m.attr("data-et","participant"),m.attr("data-type","participant"),m.attr("data-id",t.name)),cu(r,Gi(t.description))(t.description,m,y.x,y.y,y.width,y.height,{class:`actor ${S_}`},r);let x=t.height;if(v.node){let k=v.node().getBBox();t.height=k.height,x=k.height}return x},"drawActorTypeParticipant"),zpt=o(function(e,t,r,i,n){let a=i?t.stopy:t.starty,s=t.x+t.width/2,l=a+t.height,{look:h,theme:u,themeVariables:d}=r,{bkgColorArray:p,borderColorArray:f}=d,g=e.append("g").lower();var m=g;i||(Wr++,Object.keys(t.links||{}).length&&!r.forceMenus&&m.attr("onclick",__(`actor${Wr}_popup`)).attr("cursor","pointer"),m.append("line").attr("id","actor"+Wr).attr("x1",s).attr("y1",l).attr("x2",s).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),m=g.append("g"),t.actorCnt=Wr,t.links!=null&&m.attr("id","root-"+Wr),h==="neo"&&m.attr("data-look","neo"));let y=Za();var b="actor";t.properties?.class?b=t.properties.class:y.fill="#eaeaea",i?b+=` ${np}`:b+=` ${ip}`,y.x=t.x,y.y=a,y.width=t.width,y.height=t.height,y.class=b,y.name=t.name;let v=6,T={...y,x:y.x+-v,y:y.y+ +v,class:"actor"},x=bT(m,y),k=bT(m,T);t.rectData=y,h==="neo"&&m.attr("filter","url(#drop-shadow)");let C=n.get(t.name)??0;if(lu.has(u)&&(x.style("stroke",f[C%f.length]),x.style("fill",p[C%f.length]),k.style("stroke",f[C%f.length]),k.style("fill",p[C%f.length])),t.properties?.icon){let w=t.properties.icon.trim();w.charAt(0)==="@"?Vw(m,y.x+y.width-20,y.y+10,w.substr(1)):Uw(m,y.x+y.width-20,y.y+10,w)}cu(r,Gi(t.description))(t.description,m,y.x-v,y.y+v,y.width,y.height,{class:`actor ${S_}`},r);let E=t.height;if(x.node){let w=x.node().getBBox();t.height=w.height,E=w.height}return i||(m.attr("data-et","participant"),m.attr("data-type","collections"),m.attr("data-id",t.name)),E},"drawActorTypeCollections"),qpt=o(function(e,t,r,i,n){let a=i?t.stopy:t.starty,s=t.x+t.width/2,l=a+t.height,{look:h,theme:u,themeVariables:d}=r,{bkgColorArray:p,borderColorArray:f}=d,g=e.append("g").lower(),m=g;i||(Wr++,Object.keys(t.links||{}).length&&!r.forceMenus&&m.attr("onclick",__(`actor${Wr}_popup`)).attr("cursor","pointer"),m.append("line").attr("id","actor"+Wr).attr("x1",s).attr("y1",l).attr("x2",s).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),m=g.append("g"),t.actorCnt=Wr,t.links!=null&&m.attr("id","root-"+Wr),h==="neo"&&m.attr("data-look","neo"));let y=Za(),b="actor";t.properties?.class?b=t.properties.class:y.fill="#eaeaea",i?b+=` ${np}`:b+=` ${ip}`,m.attr("class",b),y.x=t.x,y.y=a,y.width=t.width,y.height=t.height,y.name=t.name;let v=y.height/2,T=v/(2.5+y.height/50),x=m.append("g"),k=m.append("g"),C=`M ${y.x},${y.y+v} + a ${T},${v} 0 0 0 0,${y.height} + h ${y.width-2*T} + a ${T},${v} 0 0 0 0,-${y.height} + Z + `;x.append("path").attr("d",C),k.append("path").attr("d",`M ${y.x},${y.y+v} + a ${T},${v} 0 0 0 0,${y.height}`),x.attr("transform",`translate(${T}, ${-(y.height/2)})`),k.attr("transform",`translate(${y.width-T}, ${-y.height/2})`),t.rectData=y,h==="neo"&&x.attr("filter","url(#drop-shadow)");let E=n.get(t.name)??0;if(lu.has(u)&&(x.style("stroke",f[E%f.length]),x.style("fill",p[E%f.length]),k.style("stroke",f[E%f.length]),k.style("fill",p[E%f.length])),t.properties?.icon){let L=t.properties.icon.trim(),N=y.x+y.width-20,D=y.y+10;L.charAt(0)==="@"?Vw(m,N,D,L.substr(1)):Uw(m,N,D,L)}cu(r,Gi(t.description))(t.description,m,y.x,y.y,y.width,y.height,{class:`actor ${S_}`},r);let w=t.height,_=x.select("path:last-child");if(_.node()){let L=_.node().getBBox();t.height=L.height,w=L.height}return i||(m.attr("data-et","participant"),m.attr("data-type","queue"),m.attr("data-id",t.name)),w},"drawActorTypeQueue"),jpt=o(function(e,t,r,i,n,a){let s=i?t.stopy:t.starty,l=t.x+t.width/2,h=s+75,{look:u,theme:d,themeVariables:p}=r,{bkgColorArray:f,borderColorArray:g,actorBorder:m,actorBkg:y}=p,b=e.append("g").lower();i||(Wr++,b.append("line").attr("id","actor"+Wr).attr("x1",l).attr("y1",h).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=Wr);let v=e.append("g"),T=Lg;i?T+=` ${np}`:T+=` ${ip}`,v.attr("class",T),v.attr("name",t.name);let x=Za();x.x=t.x,x.y=s,x.fill="#eaeaea",x.width=t.width,x.height=t.height,x.class="actor";let k=t.x+t.width/2,C=s+32,E=22;v.append("defs").append("marker").attr("id",n+"-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"),v.append("circle").attr("cx",k).attr("cy",C).attr("r",E).attr("filter",`${u==="neo"?"url(#drop-shadow)":""}`),v.append("line").attr("marker-end","url(#"+n+"-filled-head-control)").attr("transform",`translate(${k}, ${C-E})`);let w=a.get(t.name)??0;lu.has(d)?(v.style("stroke",g[w%g.length]),v.style("fill",f[w%g.length])):(v.style("stroke",m),v.style("fill",y));let _=v.node().getBBox();return t.height=_.height+2*(r?.sequence?.labelBoxHeight??0),cu(r,Gi(t.description))(t.description,v,x.x,x.y+E+(i?5:12),x.width,x.height,{class:`actor ${Lg}`},r),i||(v.attr("data-et","participant"),v.attr("data-type","control"),v.attr("data-id",t.name)),t.height},"drawActorTypeControl"),Gpt=o(function(e,t,r,i,n){let a=i?t.stopy:t.starty,s=t.x+t.width/2,l=a+75,{look:h,theme:u,themeVariables:d}=r,{bkgColorArray:p,borderColorArray:f}=d,g=e.append("g").lower(),m=e.append("g"),y="actor";i?y+=` ${np}`:y+=` ${ip}`,m.attr("class",y),m.attr("name",t.name);let b=Za();b.x=t.x,b.y=a,b.fill="#eaeaea",b.width=t.width,b.height=t.height,b.class="actor";let v=t.x+t.width/2,T=a+(i?10:25),x=22;m.append("circle").attr("cx",v).attr("cy",T).attr("r",x).attr("width",t.width).attr("height",t.height),m.append("line").attr("x1",v-x).attr("x2",v+x).attr("y1",T+x).attr("y2",T+x).attr("stroke-width",2),h==="neo"&&m.attr("filter","url(#drop-shadow)");let k=n.get(t.name)??0;lu.has(u)&&(m.style("stroke",f[k%f.length]),m.style("fill",p[k%f.length]));let C=m.node().getBBox();return t.height=C.height+(r?.sequence?.labelBoxHeight??0),i||(Wr++,g.append("line").attr("id","actor"+Wr).attr("x1",s).attr("y1",l).attr("x2",s).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=Wr),cu(r,Gi(t.description))(t.description,m,b.x,b.y+(i?15:30),b.width,b.height,{class:`actor ${Lg}`},r),i?m.attr("transform",`translate(0, ${x})`):(m.attr("transform",`translate(0, ${x/2-5})`),m.attr("data-et","participant"),m.attr("data-type","entity"),m.attr("data-id",t.name)),t.height},"drawActorTypeEntity"),Wpt=o(function(e,t,r,i,n){let a=i?t.stopy:t.starty,s=t.x+t.width/2,l=a+t.height+2*r.boxTextMargin,{theme:h,themeVariables:u,look:d}=r,{bkgColorArray:p,borderColorArray:f,actorBorder:g}=u,m=e.append("g").lower(),y=m;i||(Wr++,Object.keys(t.links||{}).length&&!r.forceMenus&&y.attr("onclick",__(`actor${Wr}_popup`)).attr("cursor","pointer"),y.append("line").attr("id","actor"+Wr).attr("x1",s).attr("y1",l).attr("x2",s).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=m.append("g"),t.actorCnt=Wr,t.links!=null&&y.attr("id","root-"+Wr),d==="neo"&&y.attr("data-look","neo"));let b=Za(),v="actor";t.properties?.class?v=t.properties.class:b.fill="#eaeaea",i?v+=` ${np}`:v+=` ${ip}`,b.x=t.x,b.y=a,b.width=t.width,b.height=t.height,b.class=v,b.name=t.name,b.x=t.x,b.y=a;let T=b.width/3,x=b.width/3,k=T/2,C=k/(2.5+T/50),E=y.append("g");E.attr("class",v);let w=` + M ${b.x},${b.y+C} + a ${k},${C} 0 0 0 ${T},0 + a ${k},${C} 0 0 0 -${T},0 + l 0,${x-2*C} + a ${k},${C} 0 0 0 ${T},0 + l 0,-${x-2*C} +`;E.append("path").attr("d",w),d==="neo"&&E.attr("filter","url(#drop-shadow)");let _=n.get(t.name)??0;lu.has(h)?(E.style("stroke",f[_%f.length]),E.style("fill",p[_%f.length])):E.style("stroke",g),E.attr("transform",`translate(${T}, ${C})`),t.rectData=b,cu(r,Gi(t.description))(t.description,y,b.x,b.y+35,b.width,b.height,{class:`actor ${S_}`},r);let L=E.select("path:last-child");if(L.node()){let N=L.node().getBBox();t.height=N.height+(r.sequence.labelBoxHeight??0)}return i||(y.attr("data-et","participant"),y.attr("data-type","database"),y.attr("data-id",t.name)),t.height},"drawActorTypeDatabase"),Upt=o(function(e,t,r,i,n){let a=i?t.stopy:t.starty,s=t.x+t.width/2,l=a+80,h=22,u=e.append("g").lower(),{look:d,theme:p,themeVariables:f}=r,{bkgColorArray:g,borderColorArray:m,actorBorder:y}=f;i||(Wr++,u.append("line").attr("id","actor"+Wr).attr("x1",s).attr("y1",l).attr("x2",s).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=Wr);let b=e.append("g"),v=Lg;i?v+=` ${np}`:v+=` ${ip}`,b.attr("class",v),b.attr("name",t.name);let T=Za();T.x=t.x,T.y=a,T.fill="#eaeaea",T.width=t.width,T.height=t.height,T.class="actor",b.append("line").attr("id","actor-man-torso"+Wr).attr("x1",t.x+t.width/2-h*2.5).attr("y1",a+12).attr("x2",t.x+t.width/2-15).attr("y2",a+12),b.append("line").attr("id","actor-man-arms"+Wr).attr("x1",t.x+t.width/2-h*2.5).attr("y1",a+2).attr("x2",t.x+t.width/2-h*2.5).attr("y2",a+22),b.append("circle").attr("cx",t.x+t.width/2).attr("cy",a+12).attr("r",h),d==="neo"&&b.attr("filter","url(#drop-shadow)");let x=n.get(t.name)??0;lu.has(p)?(b.style("stroke",m[x%m.length]),b.style("fill",g[x%m.length])):b.style("stroke",y);let k=b.node().getBBox();return t.height=k.height+(r.sequence.labelBoxHeight??0),cu(r,Gi(t.description))(t.description,b,T.x,T.y+15,T.width,T.height,{class:`actor ${Lg}`},r),b.attr("transform",`translate(0,${h/2+10})`),i||(b.attr("data-et","participant"),b.attr("data-type","boundary"),b.attr("data-id",t.name)),t.height},"drawActorTypeBoundary"),Vpt=o(function(e,t,r,i,n){let a=i?t.stopy:t.starty,s=t.x+t.width/2,l=a+80,{look:h,theme:u,themeVariables:d}=r,{bkgColorArray:p,borderColorArray:f,actorBorder:g}=d,m=e.append("g").lower();i||(Wr++,m.append("line").attr("id","actor"+Wr).attr("x1",s).attr("y1",l).attr("x2",s).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=Wr);let y=e.append("g"),b=Lg;i?b+=` ${np}`:b+=` ${ip}`,y.attr("class",b),y.attr("name",t.name),i||y.attr("data-et","participant").attr("data-type","actor").attr("data-id",t.name);let v=h==="neo"?.5:1,T=h==="neo"?a+(1-v)*30:a;y.append("line").attr("id","actor-man-torso"+Wr).attr("x1",s).attr("y1",T+25*v).attr("x2",s).attr("y2",T+45*v),y.append("line").attr("id","actor-man-arms"+Wr).attr("x1",s-Rg/2*v).attr("y1",T+33*v).attr("x2",s+Rg/2*v).attr("y2",T+33*v),y.append("line").attr("x1",s-Rg/2*v).attr("y1",T+60*v).attr("x2",s).attr("y2",T+45*v),y.append("line").attr("x1",s).attr("y1",T+45*v).attr("x2",s+(Rg/2-2)*v).attr("y2",T+60*v);let x=y.append("circle");x.attr("cx",t.x+t.width/2),x.attr("cy",T+10*v),x.attr("r",15*v),x.attr("width",t.width*v),x.attr("height",t.height*v);let k=y.node().getBBox();t.height=k.height;let C=Za();C.x=t.x,C.y=T,C.fill="#eaeaea",C.width=t.width,C.height=t.height/v,C.class="actor",C.rx=3,C.ry=3;let E=n.get(t.name)??0;return lu.has(u)?(y.style("stroke",f[E%f.length]),y.style("fill",p[E%f.length])):y.style("stroke",g),cu(r,Gi(t.description))(t.description,y,C.x,T+35*v-(h==="neo"?10:0),C.width,C.height,{class:`actor ${Lg}`},r),t.height},"drawActorTypeActor"),Ypt=o(async function(e,t,r,i,n,a,s){let l=s??new Map([...a.db.getActors().values()].map((h,u)=>[h.name,u]));switch(t.type){case"actor":return await Vpt(e,t,r,i,l);case"participant":return await Fpt(e,t,r,i,l);case"boundary":return await Upt(e,t,r,i,l);case"control":return await jpt(e,t,r,i,n,l);case"entity":return await Gpt(e,t,r,i,l);case"database":return await Wpt(e,t,r,i,l);case"collections":return await zpt(e,t,r,i,l);case"queue":return await qpt(e,t,r,i,l)}},"drawActor"),Hpt=o(function(e,t,r){let i=e.append("g");QSe(i,t),t.name&&cu(r)(t.name,i,t.x,t.y+r.boxTextMargin+(t.textMaxHeight||0)/2,t.width,0,{class:"text"},r),i.lower()},"drawBox"),Xpt=o(function(e){return e.append("g")},"anchorElement"),Kpt=o(function(e,t,r,i,n,a,s){let{theme:l,themeVariables:h}=i,{bkgColorArray:u,borderColorArray:d,mainBkg:p}=h,f=Za(),g=t.anchored,m=t.actor;f.x=t.startx,f.y=t.starty,f.class="activation"+n%3,f.width=t.stopx-t.startx,f.height=r-t.starty;let y=bT(g,f),b=(s??new Map([...a.db.getActors().values()].map((v,T)=>[v.name,T]))).get(m)??0;lu.has(l)&&(y.style("stroke",d[b%d.length]),y.style("fill",u[b%d.length]??p))},"drawActivation"),Zpt=o(async function(e,t,r,i,n){let{boxMargin:a,boxTextMargin:s,labelBoxHeight:l,labelBoxWidth:h,messageFontFamily:u,messageFontSize:d,messageFontWeight:p}=i,f=e.append("g").attr("data-et","control-structure").attr("data-id","i"+n.id),g=o(function(b,v,T,x){return f.append("line").attr("x1",b).attr("y1",v).attr("x2",T).attr("y2",x).attr("class","loopLine")},"drawLoopLine");g(t.startx,t.starty,t.stopx,t.starty),g(t.stopx,t.starty,t.stopx,t.stopy),g(t.startx,t.stopy,t.stopx,t.stopy),g(t.startx,t.starty,t.startx,t.stopy),t.sections!==void 0&&t.sections.forEach(function(b){g(t.startx,b.y,t.stopx,b.y).style("stroke-dasharray","3, 3")});let m=Yw();m.text=r,m.x=t.startx,m.y=t.starty,m.fontFamily=u,m.fontSize=d,m.fontWeight=p,m.anchor="middle",m.valign="middle",m.tspan=!1,m.width=Math.max(h??0,50),m.height=l+(i.look==="neo"?15:0)||20,m.textMargin=s,m.class="labelText",KSe(f,m),m=JSe(),m.text=t.title,m.x=t.startx+h/2+(t.stopx-t.startx)/2,m.y=t.starty+a+s,m.anchor="middle",m.valign="middle",m.textMargin=s,m.class="loopText",m.fontFamily=u,m.fontSize=d,m.fontWeight=p,m.wrap=!0;let y=Gi(m.text)?await E_(f,m,t):J1(f,m);if(t.sectionTitles!==void 0){for(let[b,v]of Object.entries(t.sectionTitles))if(v.message){m.text=v.message,m.x=t.startx+(t.stopx-t.startx)/2,m.y=t.sections[b].y+a+s,m.class="sectionTitle",m.anchor="middle",m.valign="middle",m.tspan=!1,m.fontFamily=u,m.fontSize=d,m.fontWeight=p,m.wrap=t.wrap,Gi(m.text)?(t.starty=t.sections[b].y,await E_(f,m,t)):J1(f,m);let T=Math.round(y.map(x=>(x._groups||x)[0][0].getBBox().height).reduce((x,k)=>x+k));t.sections[b].height+=T-(a+s)}}return t.height=Math.round(t.stopy-t.starty),f},"drawLoop"),QSe=o(function(e,t){Ww(e,t)},"drawBackgroundRect"),Qpt=o(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"),Jpt=o(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"),eft=o(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"),tft=o(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"),rft=o(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"),ift=o(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"),nft=o(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"),aft=o(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"),JSe=o(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"),sft=o(function(){return{x:0,y:0,fill:"#EDF2AE",stroke:"#666",width:100,anchor:"start",height:100,rx:0,ry:0}},"getNoteRect"),cu=(function(){function e(a,s,l,h,u,d,p){let f=s.append("text").attr("x",l+u/2).attr("y",h+d/2+5).style("text-anchor","middle").text(a);n(f,p)}o(e,"byText");function t(a,s,l,h,u,d,p,f){let{actorFontSize:g,actorFontFamily:m,actorFontWeight:y}=f,[b,v]=Os(g),T=a.split(ft.lineBreakRegex);for(let x=0;xe.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:o(function(){this.actors=[],this.boxes=[],this.loops=[],this.messages=[],this.notes=[]},"clear"),addBox:o(function(e){this.boxes.push(e)},"addBox"),addActor:o(function(e){this.actors.push(e)},"addActor"),addLoop:o(function(e){this.loops.push(e)},"addLoop"),addMessage:o(function(e){this.messages.push(e)},"addMessage"),addNote:o(function(e){this.notes.push(e)},"addNote"),lastActor:o(function(){return this.actors[this.actors.length-1]},"lastActor"),lastLoop:o(function(){return this.loops[this.loops.length-1]},"lastLoop"),lastMessage:o(function(){return this.messages[this.messages.length-1]},"lastMessage"),lastNote:o(function(){return this.notes[this.notes.length-1]},"lastNote"),actors:[],boxes:[],loops:[],messages:[],notes:[]},init:o(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,r6e(De())},"init"),updateVal:o(function(e,t,r,i){e[t]===void 0?e[t]=r:e[t]=i(r,e[t])},"updateVal"),updateBounds:o(function(e,t,r,i){let n=this,a=0;function s(l){return o(function(h){a++;let u=n.sequenceItems.length-a+1;n.updateVal(h,"starty",t-u*Ye.boxMargin,Math.min),n.updateVal(h,"stopy",i+u*Ye.boxMargin,Math.max),n.updateVal(mt.data,"startx",e-u*Ye.boxMargin,Math.min),n.updateVal(mt.data,"stopx",r+u*Ye.boxMargin,Math.max),l!=="activation"&&(n.updateVal(h,"startx",e-u*Ye.boxMargin,Math.min),n.updateVal(h,"stopx",r+u*Ye.boxMargin,Math.max),n.updateVal(mt.data,"starty",t-u*Ye.boxMargin,Math.min),n.updateVal(mt.data,"stopy",i+u*Ye.boxMargin,Math.max))},"updateItemBounds")}o(s,"updateFn"),this.sequenceItems.forEach(s()),this.activations.forEach(s("activation"))},"updateBounds"),insert:o(function(e,t,r,i){let n=ft.getMin(e,r),a=ft.getMax(e,r),s=ft.getMin(t,i),l=ft.getMax(t,i);this.updateVal(mt.data,"startx",n,Math.min),this.updateVal(mt.data,"starty",s,Math.min),this.updateVal(mt.data,"stopx",a,Math.max),this.updateVal(mt.data,"stopy",l,Math.max),this.updateBounds(n,s,a,l)},"insert"),newActivation:o(function(e,t,r){let i=r.get(e.from),n=A_(e.from).length||0,a=i.x+i.width/2+(n-1)*Ye.activationWidth/2;this.activations.push({startx:a,starty:this.verticalPos+2,stopx:a+Ye.activationWidth,stopy:void 0,actor:e.from,anchored:Mi.anchorElement(t)})},"newActivation"),endActivation:o(function(e){let t=this.activations.map(function(r){return r.actor}).lastIndexOf(e.from);return this.activations.splice(t,1)[0]},"endActivation"),createLoop:o(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:o(function(e={message:void 0,wrap:!1,width:void 0},t){this.sequenceItems.push(this.createLoop(e,t))},"newLoop"),endLoop:o(function(){return this.sequenceItems.pop()},"endLoop"),isLoopOverlap:o(function(){return this.sequenceItems.length?this.sequenceItems[this.sequenceItems.length-1].overlap:!1},"isLoopOverlap"),addSectionToLoop:o(function(e){let t=this.sequenceItems.pop();t.sections=t.sections||[],t.sectionTitles=t.sectionTitles||[],t.sections.push({y:mt.getVerticalPos(),height:0}),t.sectionTitles.push(e),this.sequenceItems.push(t)},"addSectionToLoop"),saveVerticalPos:o(function(){this.isLoopOverlap()&&(this.savedVerticalPos=this.verticalPos)},"saveVerticalPos"),resetVerticalPos:o(function(){this.isLoopOverlap()&&(this.verticalPos=this.savedVerticalPos)},"resetVerticalPos"),bumpVerticalPos:o(function(e){this.verticalPos=this.verticalPos+e,this.data.stopy=ft.getMax(this.data.stopy,this.verticalPos)},"bumpVerticalPos"),getVerticalPos:o(function(){return this.verticalPos},"getVerticalPos"),getBounds:o(function(){return{bounds:this.data,models:this.models}},"getBounds")},dft=o(async function(e,t,r){mt.bumpVerticalPos(Ye.boxMargin),t.height=Ye.boxMargin,t.starty=mt.getVerticalPos();let i=Za();i.x=t.startx,i.y=t.starty,i.width=t.width||Ye.width,i.class="note";let n=e.append("g");n.attr("data-et","note"),n.attr("data-id","i"+r);let a=Mi.drawRect(n,i),s=Yw();s.x=t.startx,s.y=t.starty,s.width=i.width,s.dy="1em",s.text=t.message,s.class="noteText",s.fontFamily=Ye.noteFontFamily,s.fontSize=Ye.noteFontSize,s.fontWeight=Ye.noteFontWeight,s.anchor=Ye.noteAlign,s.textMargin=Ye.noteMargin,s.valign="center";let l=Gi(s.text)?await E_(n,s):J1(n,s),h=Math.round(l.map(u=>(u._groups||u)[0][0].getBBox().height).reduce((u,d)=>u+d));a.attr("height",h+2*Ye.noteMargin),t.height+=h+2*Ye.noteMargin,mt.bumpVerticalPos(h+2*Ye.noteMargin),t.stopy=t.starty+h+2*Ye.noteMargin,t.stopx=t.startx+i.width,mt.insert(t.startx,t.starty,t.stopx,t.stopy),mt.models.addNote(t)},"drawNote"),YSe=o(function(e,t,r,i,n,a,s){let l=i.db.getActors(),h=l.get(t.from),u=l.get(t.to),d=r.sequenceVisible,p=h.x+h.width/2,f=u.x+u.width/2,g=p<=f,m=s6e(t,i),y=e.append("g"),b=16.5,v=o((E,w)=>{let _=E?b:-b;return w?-_:_},"getCircleOffset"),T=o(E=>{y.append("circle").attr("cx",E).attr("cy",s).attr("r",5).attr("width",10).attr("height",10)},"drawCircle"),{CENTRAL_CONNECTION:x,CENTRAL_CONNECTION_REVERSE:k,CENTRAL_CONNECTION_DUAL:C}=i.db.LINETYPE;if(d)switch(t.centralConnection){case x:m&&(f+=v(g,!0));break;case k:m||(p+=v(g,!1));break;case C:m?f+=v(g,!0):p+=v(g,!1);break}switch(t.centralConnection){case x:T(f);break;case k:T(p);break;case C:T(p),T(f);break}},"drawCentralConnection"),$g=o(e=>({fontFamily:e.messageFontFamily,fontSize:e.messageFontSize,fontWeight:e.messageFontWeight}),"messageFont"),Q1=o(e=>({fontFamily:e.noteFontFamily,fontSize:e.noteFontSize,fontWeight:e.noteFontWeight}),"noteFont"),BH=o(e=>({fontFamily:e.actorFontFamily,fontSize:e.actorFontSize,fontWeight:e.actorFontWeight}),"actorFont");o(e6e,"boundMessage");pft=o(async function(e,t,r,i,n,a){let{startx:s,stopx:l,starty:h,message:u,type:d,sequenceIndex:p,sequenceVisible:f}=t,g=Wt.calculateTextDimensions(u,$g(Ye)),m=Yw();m.x=Math.min(s,l),m.y=h+10,m.width=Math.abs(l-s),m.class="messageText",m.dy="1em",m.text=u,m.fontFamily=Ye.messageFontFamily,m.fontSize=Ye.messageFontSize,m.fontWeight=Ye.messageFontWeight,m.anchor=Ye.messageAlign,m.valign="center",m.textMargin=Ye.wrapPadding,m.tspan=!1,Gi(m.text)?await E_(e,m,{startx:s,stopx:l,starty:r}):J1(e,m);let y=g.width,b;if(s===l){let T=f||Ye.showSequenceNumbers,x=s6e(n,i),k=Tft(n,i),C=s+(T&&(x||k)?10:0);Ye.rightAngles?b=e.append("path").attr("d",`M ${C},${r} H ${s+ft.getMax(Ye.width/2,y/2)} V ${r+25} H ${s}`):b=e.append("path").attr("d","M "+C+","+r+" C "+(C+60)+","+(r-10)+" "+(s+60)+","+(r+30)+" "+s+","+(r+20)),NH(n,i)&&YSe(e,n,t,i,s,l,r)}else b=e.append("line"),b.attr("x1",s),b.attr("y1",r),b.attr("x2",l),b.attr("y2",r),NH(n,i)&&YSe(e,n,t,i,s,l,r);d===i.db.LINETYPE.DOTTED||d===i.db.LINETYPE.DOTTED_CROSS||d===i.db.LINETYPE.DOTTED_POINT||d===i.db.LINETYPE.DOTTED_OPEN||d===i.db.LINETYPE.BIDIRECTIONAL_DOTTED||d===i.db.LINETYPE.SOLID_TOP_DOTTED||d===i.db.LINETYPE.SOLID_BOTTOM_DOTTED||d===i.db.LINETYPE.STICK_TOP_DOTTED||d===i.db.LINETYPE.STICK_BOTTOM_DOTTED||d===i.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED||d===i.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED||d===i.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED||d===i.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED?(b.style("stroke-dasharray","3, 3"),b.attr("class","messageLine1")):b.attr("class","messageLine0"),b.attr("data-et","message"),b.attr("data-id","i"+t.id),b.attr("data-from",t.from),b.attr("data-to",t.to);let v="";if(Ye.arrowMarkerAbsolute&&(v=_p(!0)),b.attr("stroke-width",2),b.attr("stroke","none"),b.style("fill","none"),(d===i.db.LINETYPE.SOLID_TOP||d===i.db.LINETYPE.SOLID_TOP_DOTTED)&&b.attr("marker-end","url("+v+"#"+a+"-solidTopArrowHead)"),(d===i.db.LINETYPE.SOLID_BOTTOM||d===i.db.LINETYPE.SOLID_BOTTOM_DOTTED)&&b.attr("marker-end","url("+v+"#"+a+"-solidBottomArrowHead)"),(d===i.db.LINETYPE.STICK_TOP||d===i.db.LINETYPE.STICK_TOP_DOTTED)&&b.attr("marker-end","url("+v+"#"+a+"-stickTopArrowHead)"),(d===i.db.LINETYPE.STICK_BOTTOM||d===i.db.LINETYPE.STICK_BOTTOM_DOTTED)&&b.attr("marker-end","url("+v+"#"+a+"-stickBottomArrowHead)"),(d===i.db.LINETYPE.SOLID_ARROW_TOP_REVERSE||d===i.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED)&&b.attr("marker-start","url("+v+"#"+a+"-solidBottomArrowHead)"),(d===i.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE||d===i.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED)&&b.attr("marker-start","url("+v+"#"+a+"-solidTopArrowHead)"),(d===i.db.LINETYPE.STICK_ARROW_TOP_REVERSE||d===i.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED)&&b.attr("marker-start","url("+v+"#"+a+"-stickBottomArrowHead)"),(d===i.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE||d===i.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED)&&b.attr("marker-start","url("+v+"#"+a+"-stickTopArrowHead)"),(d===i.db.LINETYPE.SOLID||d===i.db.LINETYPE.DOTTED)&&b.attr("marker-end","url("+v+"#"+a+"-arrowhead)"),(d===i.db.LINETYPE.BIDIRECTIONAL_SOLID||d===i.db.LINETYPE.BIDIRECTIONAL_DOTTED)&&(b.attr("marker-start","url("+v+"#"+a+"-arrowhead)"),b.attr("marker-end","url("+v+"#"+a+"-arrowhead)")),(d===i.db.LINETYPE.SOLID_POINT||d===i.db.LINETYPE.DOTTED_POINT)&&b.attr("marker-end","url("+v+"#"+a+"-filled-head)"),(d===i.db.LINETYPE.SOLID_CROSS||d===i.db.LINETYPE.DOTTED_CROSS)&&b.attr("marker-end","url("+v+"#"+a+"-crosshead)"),f||Ye.showSequenceNumbers){let T=d===i.db.LINETYPE.BIDIRECTIONAL_SOLID||d===i.db.LINETYPE.BIDIRECTIONAL_DOTTED,x=d===i.db.LINETYPE.SOLID_ARROW_TOP_REVERSE||d===i.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED||d===i.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE||d===i.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED||d===i.db.LINETYPE.STICK_ARROW_TOP_REVERSE||d===i.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED||d===i.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE||d===i.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED,k=6,C=NH(n,i),E=s,w=l;T?(ss?w=l-2*k:(w=l-k,E+=n?.centralConnection===i.db.LINETYPE.CENTRAL_CONNECTION_DUAL||n?.centralConnection===i.db.LINETYPE.CENTRAL_CONNECTION_REVERSE?-7.5:0),w+=C?15:0,b.attr("x2",w),b.attr("x1",E)):b.attr("x1",s+k);let _=0,L=s===l,N=s<=l;L?_=t.fromBounds+1:x?_=N?t.toBounds-1:t.fromBounds+1:_=N?t.fromBounds+1:t.toBounds-1;let D="12px",M=p.toString().length;M>5?D="7px":M>3&&(D="9px"),e.append("line").attr("x1",_).attr("y1",r).attr("x2",_).attr("y2",r).attr("stroke-width",0).attr("marker-start","url("+v+"#"+a+"-sequencenumber)"),e.append("text").attr("x",_).attr("y",r+4).attr("font-family","sans-serif").attr("font-size",D).attr("text-anchor","middle").attr("class","sequenceNumber").text(p)}},"drawMessage"),fft=o(function(e,t,r,i,n,a,s){let l=0,h=0,u,d=0;for(let p of i){let f=t.get(p),g=f.box;u&&u!=g&&(s||mt.models.addBox(u),h+=Ye.boxMargin+u.margin),g&&g!=u&&(s||(g.x=l+h,g.y=n),h+=g.margin),f.width=ft.getMax(f.width||Ye.width,Ye.width),f.height=ft.getMax(f.height||Ye.height,Ye.height),f.margin=f.margin||Ye.actorMargin,d=ft.getMax(d,f.height),r.get(f.name)&&(h+=f.width/2),f.x=l+h,f.starty=mt.getVerticalPos(),mt.insert(f.x,n,f.x+f.width,f.height),l+=f.width+h,f.box&&(f.box.width=l+g.margin-f.box.x),h=f.margin,u=f.box,mt.models.addActor(f)}u&&!s&&mt.models.addBox(u),mt.bumpVerticalPos(d)},"addActorRenderingData"),PH=o(async function(e,t,r,i,n,a,s){if(i){let l=0;mt.bumpVerticalPos(Ye.boxMargin*2);for(let h of r){let u=t.get(h);u.stopy||(u.stopy=mt.getVerticalPos());let d=await Mi.drawActor(e,u,Ye,!0,n,a,s);l=ft.getMax(l,d)}mt.bumpVerticalPos(l+Ye.boxMargin)}else for(let l of r){let h=t.get(l);await Mi.drawActor(e,h,Ye,!1,n,a,s)}},"drawActors"),t6e=o(function(e,t,r,i){let n=0,a=0;for(let s of r){let l=t.get(s),h=mft(l),u=Mi.drawPopup(e,l,h,Ye,Ye.forceMenus,i);u.height>n&&(n=u.height),u.width+l.x>a&&(a=u.width+l.x)}return{maxHeight:n,maxWidth:a}},"drawActorsPopup"),r6e=o(function(e){Ni(Ye,e),e.fontFamily&&(Ye.actorFontFamily=Ye.noteFontFamily=Ye.messageFontFamily=e.fontFamily),e.fontSize&&(Ye.actorFontSize=Ye.noteFontSize=Ye.messageFontSize=e.fontSize),e.fontWeight&&(Ye.actorFontWeight=Ye.noteFontWeight=Ye.messageFontWeight=e.fontWeight)},"setConf"),A_=o(function(e){return mt.activations.filter(function(t){return t.actor===e})},"actorActivations"),HSe=o(function(e,t){let r=t.get(e),i=A_(e),n=i.reduce(function(s,l){return ft.getMin(s,l.startx)},r.x+r.width/2-1),a=i.reduce(function(s,l){return ft.getMax(s,l.stopx)},r.x+r.width/2+1);return[n,a]},"activationBounds");o(jl,"adjustLoopHeightForWrap");o(i6e,"adjustCreatedDestroyedData");gft=o(async function(e,t,r,i){let{securityLevel:n,sequence:a,look:s,themeVariables:l}=De();Ye=a;let h;n==="sandbox"&&(h=tt("#i"+t));let u=n==="sandbox"?tt(h.nodes()[0].contentDocument.body):tt("body"),d=n==="sandbox"?h.nodes()[0].contentDocument:document;mt.init(),ee.debug(i.db);let p=n==="sandbox"?u.select(`[id="${t}"]`):tt(`[id="${t}"]`),f=i.db.getActors(),g=i.db.getCreatedActors(),m=i.db.getDestroyedActors(),y=i.db.getBoxes(),b=i.db.getActorKeys(),v=i.db.getMessages(),T=i.db.getDiagramTitle(),x=i.db.hasAtLeastOneBox(),k=i.db.hasAtLeastOneBoxWithTitle(),C=await n6e(f,v,i);if(Ye.height=await a6e(f,C,y),Mi.insertComputerIcon(p,t),Mi.insertDatabaseIcon(p,t),Mi.insertClockIcon(p,t),x&&(mt.bumpVerticalPos(Ye.boxMargin),k&&mt.bumpVerticalPos(y[0].textMaxHeight)),Ye.hideUnusedParticipants===!0){let q=new Set;v.forEach(G=>{q.add(G.from),q.add(G.to)}),b=b.filter(G=>q.has(G))}let E=new Map(b.map((q,G)=>[f.get(q)?.name??q,G]));fft(p,f,g,b,0,v,!1);let w=await Cft(v,f,C,i);Mi.insertArrowHead(p,t),Mi.insertArrowCrossHead(p,t),Mi.insertArrowFilledHead(p,t),Mi.insertSequenceNumber(p,t),Mi.insertSolidTopArrowHead(p,t),Mi.insertSolidBottomArrowHead(p,t),Mi.insertStickTopArrowHead(p,t),Mi.insertStickBottomArrowHead(p,t),s==="neo"&&Mi.insertDropShadow(p,Ye);function _(q,G){let W=mt.endActivation(q);W.starty+18>G&&(W.starty=G-6,G+=12),Mi.drawActivation(p,W,G,Ye,A_(q.from).length,i,E),mt.insert(W.startx,G-10,W.stopx,G)}o(_,"activeEnd");let L=1,N=1,D=[],M=[],B=0;for(let q of v){let G,W,J;switch(q.type){case i.db.LINETYPE.NOTE:mt.resetVerticalPos(),W=q.noteModel,await dft(p,W,q.id);break;case i.db.LINETYPE.ACTIVE_START:mt.newActivation(q,p,f);break;case i.db.LINETYPE.CENTRAL_CONNECTION:mt.newActivation(q,p,f);break;case i.db.LINETYPE.CENTRAL_CONNECTION_REVERSE:mt.newActivation(q,p,f);break;case i.db.LINETYPE.ACTIVE_END:_(q,mt.getVerticalPos());break;case i.db.LINETYPE.LOOP_START:jl(w,q,Ye.boxMargin,Ye.boxMargin+Ye.boxTextMargin,H=>mt.newLoop(H));break;case i.db.LINETYPE.LOOP_END:G=mt.endLoop(),await Mi.drawLoop(p,G,"loop",Ye,q),mt.bumpVerticalPos(G.stopy-mt.getVerticalPos()),mt.models.addLoop(G);break;case i.db.LINETYPE.RECT_START:jl(w,q,Ye.boxMargin,Ye.boxMargin,H=>{let Z=H.message;Z||(Z=l?.rectBkgColor||l?.actorBkg||"rgba(128, 128, 128, 0.5)"),mt.newLoop(void 0,Z)});break;case i.db.LINETYPE.RECT_END:G=mt.endLoop(),M.push(G),mt.models.addLoop(G),mt.bumpVerticalPos(G.stopy-mt.getVerticalPos());break;case i.db.LINETYPE.OPT_START:jl(w,q,Ye.boxMargin,Ye.boxMargin+Ye.boxTextMargin,H=>mt.newLoop(H));break;case i.db.LINETYPE.OPT_END:G=mt.endLoop(),await Mi.drawLoop(p,G,"opt",Ye,q),mt.bumpVerticalPos(G.stopy-mt.getVerticalPos()),mt.models.addLoop(G);break;case i.db.LINETYPE.ALT_START:jl(w,q,Ye.boxMargin,Ye.boxMargin+Ye.boxTextMargin,H=>mt.newLoop(H));break;case i.db.LINETYPE.ALT_ELSE:jl(w,q,Ye.boxMargin+Ye.boxTextMargin,Ye.boxMargin,H=>mt.addSectionToLoop(H));break;case i.db.LINETYPE.ALT_END:G=mt.endLoop(),await Mi.drawLoop(p,G,"alt",Ye,q),mt.bumpVerticalPos(G.stopy-mt.getVerticalPos()),mt.models.addLoop(G);break;case i.db.LINETYPE.PAR_START:case i.db.LINETYPE.PAR_OVER_START:jl(w,q,Ye.boxMargin,Ye.boxMargin+Ye.boxTextMargin,H=>mt.newLoop(H)),mt.saveVerticalPos();break;case i.db.LINETYPE.PAR_AND:jl(w,q,Ye.boxMargin+Ye.boxTextMargin,Ye.boxMargin,H=>mt.addSectionToLoop(H));break;case i.db.LINETYPE.PAR_END:G=mt.endLoop(),await Mi.drawLoop(p,G,"par",Ye,q),mt.bumpVerticalPos(G.stopy-mt.getVerticalPos()),mt.models.addLoop(G);break;case i.db.LINETYPE.AUTONUMBER:L=q.message.start||L,N=q.message.step||N,q.message.visible?i.db.enableSequenceNumbers():i.db.disableSequenceNumbers();break;case i.db.LINETYPE.CRITICAL_START:jl(w,q,Ye.boxMargin,Ye.boxMargin+Ye.boxTextMargin,H=>mt.newLoop(H));break;case i.db.LINETYPE.CRITICAL_OPTION:jl(w,q,Ye.boxMargin+Ye.boxTextMargin,Ye.boxMargin,H=>mt.addSectionToLoop(H));break;case i.db.LINETYPE.CRITICAL_END:G=mt.endLoop(),await Mi.drawLoop(p,G,"critical",Ye,q),mt.bumpVerticalPos(G.stopy-mt.getVerticalPos()),mt.models.addLoop(G);break;case i.db.LINETYPE.BREAK_START:jl(w,q,Ye.boxMargin,Ye.boxMargin+Ye.boxTextMargin,H=>mt.newLoop(H));break;case i.db.LINETYPE.BREAK_END:G=mt.endLoop(),await Mi.drawLoop(p,G,"break",Ye,q),mt.bumpVerticalPos(G.stopy-mt.getVerticalPos()),mt.models.addLoop(G);break;default:try{J=q.msgModel,J.starty=mt.getVerticalPos(),J.sequenceIndex=L,J.sequenceVisible=i.db.showSequenceNumbers(),J.id=q.id,J.from=q.from,J.to=q.to;let H=await e6e(p,J);i6e(q,J,H,B,f,g,m),D.push({messageModel:J,lineStartY:H,msg:q}),mt.models.addMessage(J)}catch(H){ee.error("error while drawing message",H)}}[i.db.LINETYPE.SOLID_OPEN,i.db.LINETYPE.DOTTED_OPEN,i.db.LINETYPE.SOLID,i.db.LINETYPE.SOLID_TOP,i.db.LINETYPE.SOLID_BOTTOM,i.db.LINETYPE.STICK_TOP,i.db.LINETYPE.STICK_BOTTOM,i.db.LINETYPE.SOLID_TOP_DOTTED,i.db.LINETYPE.SOLID_BOTTOM_DOTTED,i.db.LINETYPE.STICK_TOP_DOTTED,i.db.LINETYPE.STICK_BOTTOM_DOTTED,i.db.LINETYPE.SOLID_ARROW_TOP_REVERSE,i.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE,i.db.LINETYPE.STICK_ARROW_TOP_REVERSE,i.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE,i.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED,i.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED,i.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED,i.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED,i.db.LINETYPE.DOTTED,i.db.LINETYPE.SOLID_CROSS,i.db.LINETYPE.DOTTED_CROSS,i.db.LINETYPE.SOLID_POINT,i.db.LINETYPE.DOTTED_POINT,i.db.LINETYPE.BIDIRECTIONAL_SOLID,i.db.LINETYPE.BIDIRECTIONAL_DOTTED].includes(q.type)&&(L=Math.round((L+N)*100)/100),B++}ee.debug("createdActors",g),ee.debug("destroyedActors",m),await PH(p,f,b,!1,t,i,E);for(let q of D)await pft(p,q.messageModel,q.lineStartY,i,q.msg,t);Ye.mirrorActors&&await PH(p,f,b,!0,t,i,E),M.forEach(q=>Mi.drawBackgroundRect(p,q)),ZSe(p,f,b,Ye);for(let q of mt.models.boxes){q.height=mt.getVerticalPos()-q.y,mt.insert(q.x,q.y,q.x+q.width,q.height);let G=Ye.boxMargin*2;q.startx=q.x-G,q.starty=q.y-G*.25,q.stopx=q.startx+q.width+2*G,q.stopy=q.starty+q.height+G*.75,q.stroke="rgb(0,0,0, 0.5)",Mi.drawBox(p,q,Ye)}x&&mt.bumpVerticalPos(Ye.boxMargin);let A=t6e(p,f,b,d),{bounds:I}=mt.getBounds();I.startx===void 0&&(I.startx=0),I.starty===void 0&&(I.starty=0),I.stopx===void 0&&(I.stopx=0),I.stopy===void 0&&(I.stopy=0);let O=I.stopy-I.starty;O2,f=o(b=>h?-b:b,"adjustValue");e.from===e.to?d=u:(e.activate&&!p&&(d+=f(Ye.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+=f(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)&&(u-=f(3)));let g=[n,a,s,l],m=Math.abs(u-d);e.wrap&&e.message&&(e.message=Wt.wrapLabel(e.message,ft.getMax(m+2*Ye.wrapPadding,Ye.width),$g(Ye)));let y=Wt.calculateTextDimensions(e.message,$g(Ye));return{width:ft.getMax(e.wrap?0:y.width+2*Ye.wrapPadding,m+2*Ye.wrapPadding,Ye.width),height:0,startx:u,stopx:d,starty:0,stopy:0,message:e.message,type:e.type,wrap:e.wrap,fromBounds:Math.min.apply(null,g),toBounds:Math.max.apply(null,g)}},"buildMessageModel"),Cft=o(async function(e,t,r,i){let n={},a=[],s,l,h;for(let u of e){switch(u.type){case i.db.LINETYPE.LOOP_START:case i.db.LINETYPE.ALT_START:case i.db.LINETYPE.OPT_START:case i.db.LINETYPE.PAR_START:case i.db.LINETYPE.PAR_OVER_START:case i.db.LINETYPE.CRITICAL_START:case i.db.LINETYPE.BREAK_START:a.push({id:u.id,msg:u.message,from:Number.MAX_SAFE_INTEGER,to:Number.MIN_SAFE_INTEGER,width:0});break;case i.db.LINETYPE.ALT_ELSE:case i.db.LINETYPE.PAR_AND:case i.db.LINETYPE.CRITICAL_OPTION:u.message&&(s=a.pop(),n[s.id]=s,n[u.id]=s,a.push(s));break;case i.db.LINETYPE.LOOP_END:case i.db.LINETYPE.ALT_END:case i.db.LINETYPE.OPT_END:case i.db.LINETYPE.PAR_END:case i.db.LINETYPE.CRITICAL_END:case i.db.LINETYPE.BREAK_END:s=a.pop(),n[s.id]=s;break;case i.db.LINETYPE.ACTIVE_START:{let d=t.get(u.from?u.from:u.to.actor),p=A_(u.from?u.from:u.to.actor).length,f=d.x+d.width/2+(p-1)*Ye.activationWidth/2,g={startx:f,stopx:f+Ye.activationWidth,actor:u.from,enabled:!0};mt.activations.push(g)}break;case i.db.LINETYPE.ACTIVE_END:{let d=mt.activations.map(p=>p.actor).lastIndexOf(u.from);mt.activations.splice(d,1).splice(0,1)}break}u.placement!==void 0?(l=await yft(u,t,i),u.noteModel=l,a.forEach(d=>{s=d,s.from=ft.getMin(s.from,l.startx),s.to=ft.getMax(s.to,l.startx+l.width),s.width=ft.getMax(s.width,Math.abs(s.from-s.to))-Ye.labelBoxWidth})):(h=kft(u,t,i),u.msgModel=h,h.startx&&h.stopx&&a.length>0&&a.forEach(d=>{if(s=d,h.startx===h.stopx){let p=t.get(u.from),f=t.get(u.to);s.from=ft.getMin(p.x-h.width/2,p.x-p.width/2,s.from),s.to=ft.getMax(f.x+h.width/2,f.x+p.width/2,s.to),s.width=ft.getMax(s.width,Math.abs(s.to-s.from))-Ye.labelBoxWidth}else s.from=ft.getMin(h.startx,s.from),s.to=ft.getMax(h.stopx,s.to),s.width=ft.getMax(s.width,h.width)-Ye.labelBoxWidth}))}return mt.activations=[],ee.debug("Loop type widths:",n),n},"calculateLoopBounds"),wft={bounds:mt,drawActors:PH,drawActorsPopup:t6e,setConf:r6e,draw:gft},Eft={parser:$pt,get db(){return new Npt},renderer:wft,styles:Bpt,init:o(e=>{e.sequence||(e.sequence={}),e.wrap&&(e.sequence.wrap=e.wrap,A2({sequence:{wrap:e.wrap}}))},"init")}});var FH,L_,c6e,h6e,R_,u6e,Ig,$_,Sft,I_,_ft,Aft,Rft,D_,qH=Tt(()=>{Rc();fo();Ws();js();po();Or();tr();Zt();vt();FH=(function(){var e=o(function(Me,pe,Oe,j){for(Oe=Oe||{},j=Me.length;j--;Oe[Me[j]]=pe);return Oe},"o"),t=[1,18],r=[1,19],i=[1,20],n=[1,41],a=[1,26],s=[1,42],l=[1,24],h=[1,25],u=[1,32],d=[1,33],p=[1,34],f=[1,45],g=[1,35],m=[1,36],y=[1,37],b=[1,38],v=[1,27],T=[1,28],x=[1,29],k=[1,30],C=[1,31],E=[1,44],w=[1,46],_=[1,43],L=[1,47],N=[1,9],D=[1,8,9],M=[1,58],B=[1,59],A=[1,60],I=[1,61],O=[1,62],R=[1,63],$=[1,64],F=[1,8,9,41],P=[1,77],z=[1,8,9,12,13,22,39,41,44,46,68,69,70,71,72,73,74,79,81],q=[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],G=[13,60,86,100,102,103],W=[13,60,73,74,86,100,102,103],J=[13,60,68,69,70,71,72,86,100,102,103],H=[1,103],Z=[1,121],se=[1,117],Q=[1,113],te=[1,119],re=[1,114],ne=[1,115],Ae=[1,116],ie=[1,118],me=[1,120],oe=[22,50,60,61,82,86,87,88,89,90],we=[1,128],ye=[12,39],ve=[1,8,9,39,41,44,46],ae=[1,8,9,22],Pe=[1,153],X=[1,8,9,61],ce=[1,8,9,22,50,60,61,82,86,87,88,89,90],ge={trace:o(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:o(function(Me,pe,Oe,j,le,U,fe){var Y=U.length-1;switch(le){case 8:this.$=U[Y-1];break;case 9:case 10:case 13:case 15:this.$=U[Y];break;case 11:case 14:this.$=U[Y-2]+"."+U[Y];break;case 12:case 16:this.$=U[Y-1]+U[Y];break;case 17:case 18:this.$=U[Y-1]+"~"+U[Y]+"~";break;case 19:j.addRelation(U[Y]);break;case 20:U[Y-1].title=j.cleanupLabel(U[Y]),j.addRelation(U[Y-1]);break;case 31:this.$=U[Y].trim(),j.setAccTitle(this.$);break;case 32:case 33:this.$=U[Y].trim(),j.setAccDescription(this.$);break;case 34:j.addClassesToNamespace(U[Y-3],U[Y-1][0],U[Y-1][1]),j.popNamespace();break;case 35:j.addClassesToNamespace(U[Y-4],U[Y-1][0],U[Y-1][1]),j.popNamespace();break;case 36:this.$=j.addNamespace(U[Y]);break;case 37:this.$=j.addNamespace(U[Y-1],U[Y]);break;case 38:this.$=[[U[Y]],[]];break;case 39:this.$=[[U[Y-1]],[]];break;case 40:U[Y][0].unshift(U[Y-2]),this.$=U[Y];break;case 41:this.$=[[],[U[Y]]];break;case 42:this.$=[[],[U[Y-1]]];break;case 43:U[Y][1].unshift(U[Y-2]),this.$=U[Y];break;case 44:case 45:this.$=[[],[]];break;case 46:this.$=U[Y];break;case 48:j.setCssClass(U[Y-2],U[Y]);break;case 49:j.addMembers(U[Y-3],U[Y-1]);break;case 51:j.setCssClass(U[Y-5],U[Y-3]),j.addMembers(U[Y-5],U[Y-1]);break;case 52:j.addAnnotation(U[Y-3],U[Y-1]);break;case 53:j.addAnnotation(U[Y-6],U[Y-4]),j.addMembers(U[Y-6],U[Y-1]);break;case 54:j.addAnnotation(U[Y-5],U[Y-3]);break;case 55:this.$=U[Y],j.addClass(U[Y]);break;case 56:this.$=U[Y-1],j.addClass(U[Y-1]),j.setClassLabel(U[Y-1],U[Y]);break;case 60:j.addAnnotation(U[Y],U[Y-2]);break;case 61:case 74:this.$=[U[Y]];break;case 62:U[Y].push(U[Y-1]),this.$=U[Y];break;case 63:break;case 64:j.addMember(U[Y-1],j.cleanupLabel(U[Y]));break;case 65:break;case 66:break;case 67:this.$={id1:U[Y-2],id2:U[Y],relation:U[Y-1],relationTitle1:"none",relationTitle2:"none"};break;case 68:this.$={id1:U[Y-3],id2:U[Y],relation:U[Y-1],relationTitle1:U[Y-2],relationTitle2:"none"};break;case 69:this.$={id1:U[Y-3],id2:U[Y],relation:U[Y-2],relationTitle1:"none",relationTitle2:U[Y-1]};break;case 70:this.$={id1:U[Y-4],id2:U[Y],relation:U[Y-2],relationTitle1:U[Y-3],relationTitle2:U[Y-1]};break;case 71:this.$=j.addNote(U[Y],U[Y-1]);break;case 72:this.$=j.addNote(U[Y]);break;case 73:this.$=U[Y-2],j.defineClass(U[Y-1],U[Y]);break;case 75:this.$=U[Y-2].concat([U[Y]]);break;case 76:j.setDirection("TB");break;case 77:j.setDirection("BT");break;case 78:j.setDirection("RL");break;case 79:j.setDirection("LR");break;case 80:this.$={type1:U[Y-2],type2:U[Y],lineType:U[Y-1]};break;case 81:this.$={type1:"none",type2:U[Y],lineType:U[Y-1]};break;case 82:this.$={type1:U[Y-1],type2:"none",lineType:U[Y]};break;case 83:this.$={type1:"none",type2:"none",lineType:U[Y]};break;case 84:this.$=j.relationType.AGGREGATION;break;case 85:this.$=j.relationType.EXTENSION;break;case 86:this.$=j.relationType.COMPOSITION;break;case 87:this.$=j.relationType.DEPENDENCY;break;case 88:this.$=j.relationType.LOLLIPOP;break;case 89:this.$=j.lineType.LINE;break;case 90:this.$=j.lineType.DOTTED_LINE;break;case 91:case 97:this.$=U[Y-2],j.setClickEvent(U[Y-1],U[Y]);break;case 92:case 98:this.$=U[Y-3],j.setClickEvent(U[Y-2],U[Y-1]),j.setTooltip(U[Y-2],U[Y]);break;case 93:this.$=U[Y-2],j.setLink(U[Y-1],U[Y]);break;case 94:this.$=U[Y-3],j.setLink(U[Y-2],U[Y-1],U[Y]);break;case 95:this.$=U[Y-3],j.setLink(U[Y-2],U[Y-1]),j.setTooltip(U[Y-2],U[Y]);break;case 96:this.$=U[Y-4],j.setLink(U[Y-3],U[Y-2],U[Y]),j.setTooltip(U[Y-3],U[Y-1]);break;case 99:this.$=U[Y-3],j.setClickEvent(U[Y-2],U[Y-1],U[Y]);break;case 100:this.$=U[Y-4],j.setClickEvent(U[Y-3],U[Y-2],U[Y-1]),j.setTooltip(U[Y-3],U[Y]);break;case 101:this.$=U[Y-3],j.setLink(U[Y-2],U[Y]);break;case 102:this.$=U[Y-4],j.setLink(U[Y-3],U[Y-1],U[Y]);break;case 103:this.$=U[Y-4],j.setLink(U[Y-3],U[Y-1]),j.setTooltip(U[Y-3],U[Y]);break;case 104:this.$=U[Y-5],j.setLink(U[Y-4],U[Y-2],U[Y]),j.setTooltip(U[Y-4],U[Y-1]);break;case 105:this.$=U[Y-2],j.setCssStyle(U[Y-1],U[Y]);break;case 106:j.setCssClass(U[Y-1],U[Y]);break;case 107:this.$=[U[Y]];break;case 108:U[Y-2].push(U[Y]),this.$=U[Y-2];break;case 110:this.$=U[Y-1]+U[Y];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:i,38:22,42:n,43:23,46:a,48:s,51:l,52:h,54:u,56:d,57:p,60:f,62:g,63:m,64:y,65:b,75:v,76:T,78:x,82:k,83:C,86:E,100:w,102:_,103:L},{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:M,69:B,70:A,71:I,72:O,73:R,74:$}),{39:[1,65]},e(F,[2,47],{39:[1,67],44:[1,66],46:[1,68]}),e(D,[2,65]),e(D,[2,66]),{16:69,60:f,86:E,100:w,102:_},{16:39,17:40,19:70,60:f,86:E,100:w,102:_,103:L},{16:39,17:40,19:71,60:f,86:E,100:w,102:_,103:L},{16:39,17:40,19:72,60:f,86:E,100:w,102:_,103:L},{60:[1,73]},{13:[1,74]},{16:39,17:40,19:75,60:f,86:E,100:w,102:_,103:L},{13:P,55:76},{58:78,60:[1,79]},e(D,[2,76]),e(D,[2,77]),e(D,[2,78]),e(D,[2,79]),e(z,[2,13],{16:39,17:40,19:81,18:[1,80],20:[1,82],60:f,86:E,100:w,102:_,103:L}),e(z,[2,15],{20:[1,83]}),{15:84,16:85,17:86,60:f,86:E,100:w,102:_,103:L},{16:39,17:40,19:87,60:f,86:E,100:w,102:_,103:L},e(q,[2,133]),e(q,[2,134]),e(q,[2,135]),e(q,[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:i,42:n,46:a,48:s,51:l,52:h,54:u,56:d,57:p,60:f,62:g,63:m,64:y,65:b,75:v,76:T,78:x,82:k,83:C,86:E,100:w,102:_,103:L}),{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:i,38:22,42:n,43:23,46:a,48:s,51:l,52:h,54:u,56:d,57:p,60:f,62:g,63:m,64:y,65:b,75:v,76:T,78:x,82:k,83:C,86:E,100:w,102:_,103:L},e(D,[2,20]),e(D,[2,31]),e(D,[2,32]),{13:[1,91],16:39,17:40,19:90,60:f,86:E,100:w,102:_,103:L},{53:92,66:56,67:57,68:M,69:B,70:A,71:I,72:O,73:R,74:$},e(D,[2,64]),{67:93,73:R,74:$},e(G,[2,83],{66:94,68:M,69:B,70:A,71:I,72:O}),e(W,[2,84]),e(W,[2,85]),e(W,[2,86]),e(W,[2,87]),e(W,[2,88]),e(J,[2,89]),e(J,[2,90]),{8:[1,96],23:99,24:97,30:98,38:22,40:95,42:n,43:23,48:s,54:u,56:d},{16:100,60:f,86:E,100:w,102:_},{41:[1,102],45:101,51:H},{16:104,60:f,86:E,100:w,102:_},{47:[1,105]},{13:[1,106]},{13:[1,107]},{79:[1,108],81:[1,109]},{22:Z,50:se,59:110,60:Q,82:te,84:111,85:112,86:re,87:ne,88:Ae,89:ie,90:me},{60:[1,122]},{13:P,55:123},e(F,[2,72]),e(F,[2,138]),{22:Z,50:se,59:124,60:Q,61:[1,125],82:te,84:111,85:112,86:re,87:ne,88:Ae,89:ie,90:me},e(oe,[2,74]),{16:39,17:40,19:126,60:f,86:E,100:w,102:_,103:L},e(z,[2,16]),e(z,[2,17]),e(z,[2,18]),{11:127,12:we,39:[2,36]},e(ye,[2,9],{16:85,17:86,15:130,18:[1,129],60:f,86:E,100:w,102:_,103:L}),e(ye,[2,10]),e(ve,[2,55],{11:131,12:we}),e(N,[2,7]),{9:[1,132]},e(ae,[2,67]),{16:39,17:40,19:133,60:f,86:E,100:w,102:_,103:L},{13:[1,135],16:39,17:40,19:134,60:f,86:E,100:w,102:_,103:L},e(G,[2,82],{66:136,68:M,69:B,70:A,71:I,72:O}),e(G,[2,81]),{41:[1,137]},{23:99,24:97,30:98,38:22,40:138,42:n,43:23,48:s,54:u,56:d},{8:[1,139],41:[2,38]},{8:[1,140],41:[2,41]},{8:[1,141],41:[2,44]},e(F,[2,48],{39:[1,142]}),{41:[1,143]},e(F,[2,50]),{41:[2,61],45:144,51:H},{47:[1,145]},{16:39,17:40,19:146,60:f,86:E,100:w,102:_,103:L},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:Pe}),e(X,[2,107],{85:154,22:Z,50:se,60:Q,82:te,86:re,87:ne,88:Ae,89:ie,90:me}),e(ce,[2,109]),e(ce,[2,111]),e(ce,[2,112]),e(ce,[2,113]),e(ce,[2,114]),e(ce,[2,115]),e(ce,[2,116]),e(ce,[2,117]),e(ce,[2,118]),e(ce,[2,119]),e(D,[2,106]),e(F,[2,71]),e(D,[2,73],{61:Pe}),{60:[1,155]},e(z,[2,14]),{39:[2,37]},{13:[1,156]},{15:157,16:85,17:86,60:f,86:E,100:w,102:_,103:L},e(ye,[2,12]),e(ve,[2,56]),{1:[2,4]},e(ae,[2,69]),e(ae,[2,68]),{16:39,17:40,19:158,60:f,86:E,100:w,102:_,103:L},e(G,[2,80]),e(F,[2,34]),{41:[1,159]},{23:99,24:97,30:98,38:22,40:160,41:[2,39],42:n,43:23,48:s,54:u,56:d},{23:99,24:97,30:98,38:22,40:161,41:[2,42],42:n,43:23,48:s,54:u,56:d},{23:99,24:97,30:98,38:22,40:162,41:[2,45],42:n,43:23,48:s,54:u,56:d},{45:163,51:H},e(F,[2,49]),{41:[2,62]},e(F,[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:Z,50:se,60:Q,82:te,84:169,85:112,86:re,87:ne,88:Ae,89:ie,90:me},e(ce,[2,110]),e(oe,[2,75]),{14:[1,170]},e(ye,[2,11]),e(ae,[2,70]),e(F,[2,35]),{41:[2,40]},{41:[2,43]},{41:[2,46]},{41:[1,171]},{41:[1,173],45:172,51:H},e(D,[2,96]),e(D,[2,100]),e(D,[2,102]),e(D,[2,103],{77:[1,174]}),e(X,[2,108],{85:154,22:Z,50:se,60:Q,82:te,86:re,87:ne,88:Ae,89:ie,90:me}),e(ve,[2,8]),e(F,[2,51]),{41:[1,175]},e(F,[2,54]),e(D,[2,104]),e(F,[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:o(function(Me,pe){if(pe.recoverable)this.trace(Me);else{var Oe=new Error(Me);throw Oe.hash=pe,Oe}},"parseError"),parse:o(function(Me){var pe=this,Oe=[0],j=[],le=[null],U=[],fe=this.table,Y="",Le=0,xe=0,je=0,Ie=2,Ve=1,Ne=U.slice.call(arguments,1),Ge=Object.create(this.lexer),ze={yy:{}};for(var Ue in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Ue)&&(ze.yy[Ue]=this.yy[Ue]);Ge.setInput(Me,ze.yy),ze.yy.lexer=Ge,ze.yy.parser=this,typeof Ge.yylloc>"u"&&(Ge.yylloc={});var Ce=Ge.yylloc;U.push(Ce);var ct=Ge.options&&Ge.options.ranges;typeof ze.yy.parseError=="function"?this.parseError=ze.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Se(He){Oe.length=Oe.length-2*He,le.length=le.length-He,U.length=U.length-He}o(Se,"popStack");function at(){var He;return He=j.pop()||Ge.lex()||Ve,typeof He!="number"&&(He instanceof Array&&(j=He,He=j.pop()),He=pe.symbols_[He]||He),He}o(at,"lex");for(var dt,gt,Ct,kt,$t,ut,de={},st,nt,rt,_e;;){if(Ct=Oe[Oe.length-1],this.defaultActions[Ct]?kt=this.defaultActions[Ct]:((dt===null||typeof dt>"u")&&(dt=at()),kt=fe[Ct]&&fe[Ct][dt]),typeof kt>"u"||!kt.length||!kt[0]){var Ze="";_e=[];for(st in fe[Ct])this.terminals_[st]&&st>Ie&&_e.push("'"+this.terminals_[st]+"'");Ge.showPosition?Ze="Parse error on line "+(Le+1)+`: +`+Ge.showPosition()+` +Expecting `+_e.join(", ")+", got '"+(this.terminals_[dt]||dt)+"'":Ze="Parse error on line "+(Le+1)+": Unexpected "+(dt==Ve?"end of input":"'"+(this.terminals_[dt]||dt)+"'"),this.parseError(Ze,{text:Ge.match,token:this.terminals_[dt]||dt,line:Ge.yylineno,loc:Ce,expected:_e})}if(kt[0]instanceof Array&&kt.length>1)throw new Error("Parse Error: multiple actions possible at state: "+Ct+", token: "+dt);switch(kt[0]){case 1:Oe.push(dt),le.push(Ge.yytext),U.push(Ge.yylloc),Oe.push(kt[1]),dt=null,gt?(dt=gt,gt=null):(xe=Ge.yyleng,Y=Ge.yytext,Le=Ge.yylineno,Ce=Ge.yylloc,je>0&&je--);break;case 2:if(nt=this.productions_[kt[1]][1],de.$=le[le.length-nt],de._$={first_line:U[U.length-(nt||1)].first_line,last_line:U[U.length-1].last_line,first_column:U[U.length-(nt||1)].first_column,last_column:U[U.length-1].last_column},ct&&(de._$.range=[U[U.length-(nt||1)].range[0],U[U.length-1].range[1]]),ut=this.performAction.apply(de,[Y,xe,Le,ze.yy,kt[1],le,U].concat(Ne)),typeof ut<"u")return ut;nt&&(Oe=Oe.slice(0,-1*nt*2),le=le.slice(0,-1*nt),U=U.slice(0,-1*nt)),Oe.push(this.productions_[kt[1]][0]),le.push(de.$),U.push(de._$),rt=fe[Oe[Oe.length-2]][Oe[Oe.length-1]],Oe.push(rt);break;case 3:return!0}}return!0},"parse")},be=(function(){var Me={EOF:1,parseError:o(function(pe,Oe){if(this.yy.parser)this.yy.parser.parseError(pe,Oe);else throw new Error(pe)},"parseError"),setInput:o(function(pe,Oe){return this.yy=Oe||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:o(function(){var pe=this._input[0];this.yytext+=pe,this.yyleng++,this.offset++,this.match+=pe,this.matched+=pe;var Oe=pe.match(/(?:\r\n?|\n).*/g);return Oe?(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:o(function(pe){var Oe=pe.length,j=pe.split(/(?:\r\n?|\n)/g);this._input=pe+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-Oe),this.offset-=Oe;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),j.length-1&&(this.yylineno-=j.length-1);var U=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:j?(j.length===le.length?this.yylloc.first_column:0)+le[le.length-j.length].length-j[0].length:this.yylloc.first_column-Oe},this.options.ranges&&(this.yylloc.range=[U[0],U[0]+this.yyleng-Oe]),this.yyleng=this.yytext.length,this},"unput"),more:o(function(){return this._more=!0,this},"more"),reject:o(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:o(function(pe){this.unput(this.match.slice(pe))},"less"),pastInput:o(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:o(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:o(function(){var pe=this.pastInput(),Oe=new Array(pe.length+1).join("-");return pe+this.upcomingInput()+` +`+Oe+"^"},"showPosition"),test_match:o(function(pe,Oe){var j,le,U;if(this.options.backtrack_lexer&&(U={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(U.yylloc.range=this.yylloc.range.slice(0))),le=pe[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+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],j=this.performAction.call(this,this.yy,this,Oe,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),j)return j;if(this._backtrack){for(var fe in U)this[fe]=U[fe];return!1}return!1},"test_match"),next:o(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var pe,Oe,j,le;this._more||(this.yytext="",this.match="");for(var U=this._currentRules(),fe=0;feOe[0].length)){if(Oe=j,le=fe,this.options.backtrack_lexer){if(pe=this.test_match(j,U[fe]),pe!==!1)return pe;if(this._backtrack){Oe=!1;continue}else return!1}else if(!this.options.flex)break}return Oe?(pe=this.test_match(Oe,U[le]),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:o(function(){var pe=this.next();return pe||this.lex()},"lex"),begin:o(function(pe){this.conditionStack.push(pe)},"begin"),popState:o(function(){var pe=this.conditionStack.length-1;return pe>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:o(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:o(function(pe){return pe=this.conditionStack.length-1-Math.abs(pe||0),pe>=0?this.conditionStack[pe]:"INITIAL"},"topState"),pushState:o(function(pe){this.begin(pe)},"pushState"),stateStackSize:o(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:o(function(pe,Oe,j,le){var U=le;switch(j){case 0:return 62;case 1:return 63;case 2:return 64;case 3:return 65;case 4:break;case 5:break;case 6:return this.begin("acc_title"),33;case 7:return this.popState(),"acc_title_value";case 8:return this.begin("acc_descr"),35;case 9:return this.popState(),"acc_descr_value";case 10:this.begin("acc_descr_multiline");break;case 11:this.popState();break;case 12:return"acc_descr_multiline_value";case 13:return 8;case 14:break;case 15:return 7;case 16:return 7;case 17:return"EDGE_STATE";case 18:this.begin("callback_name");break;case 19:this.popState();break;case 20:this.popState(),this.begin("callback_args");break;case 21:return 79;case 22:this.popState();break;case 23:return 80;case 24:this.popState();break;case 25:return"STR";case 26:this.begin("string");break;case 27:return 82;case 28:return 57;case 29:return this.begin("namespace"),42;case 30:return this.popState(),8;case 31:break;case 32:return this.begin("namespace-body"),39;case 33:this.popState(),this.less(0);break;case 34:return this.popState(),41;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;case 40:return this.popState(),8;case 41:break;case 42:return this.popState(),this.popState(),41;case 43:return this.begin("class-body"),39;case 44:return this.popState(),41;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 Me})();ge.lexer=be;function ke(){this.yy={}}return o(ke,"Parser"),ke.prototype=ge,ge.Parser=ke,new ke})();FH.parser=FH;L_=FH,c6e=["#","+","~","-",""],h6e=class{static{o(this,"ClassMember")}constructor(e,t){this.memberType=t,this.visibility="",this.classifier="",this.text="";let r=nr(e,De());this.parseMember(r)}getDisplayDetails(){let e=this.visibility+cc(this.id);this.memberType==="method"&&(e+=`(${cc(this.parameters.trim())})`,this.returnType&&(e+=" : "+cc(this.returnType))),e=e.trim();let t=this.parseClassifier();return{displayText:e,cssStyle:t}}parseMember(e){let t="";if(this.memberType==="method"){let i=/([#+~-])?(.+)\((.*)\)([\s$*])?(.*)([$*])?/.exec(e);if(i){let n=i[1]?i[1].trim():"";if(c6e.includes(n)&&(this.visibility=n),this.id=i[2],this.parameters=i[3]?i[3].trim():"",t=i[4]?i[4].trim():"",this.returnType=i[5]?i[5].trim():"",t===""){let a=this.returnType.substring(this.returnType.length-1);/[$*]/.exec(a)&&(t=a,this.returnType=this.returnType.substring(0,this.returnType.length-1))}}}else{let i=e.length,n=e.substring(0,1),a=e.substring(i-1);c6e.includes(n)&&(this.visibility=n),/[$*]/.exec(a)&&(t=a),this.id=e.substring(this.visibility===""?0:1,t===""?i:i-1)}this.classifier=t,this.id=this.id.startsWith(" ")?" "+this.id.trim():this.id.trim();let r=`${this.visibility?"\\"+this.visibility:""}${cc(this.id)}${this.memberType==="method"?`(${cc(this.parameters)})${this.returnType?" : "+cc(this.returnType):""}`:""}`;this.text=r.replaceAll("<","<").replaceAll(">",">"),this.text.startsWith("\\<")&&(this.text=this.text.replace("\\<","~"))}parseClassifier(){switch(this.classifier){case"*":return"font-style:italic;";case"$":return"text-decoration:underline;";default:return""}}},R_="classId-",u6e=0,Ig=o(e=>ft.sanitizeText(e,De()),"sanitizeText"),$_=class zH{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=o(t=>{let r=Rm();tt(t).select("svg").selectAll("g").filter(function(){return tt(this).attr("title")!==null}).on("mouseover",i=>{let n=tt(i.currentTarget),a=n.attr("title");if(!a)return;let s=i.currentTarget.getBoundingClientRect();r.transition().duration(200).style("opacity",".9"),r.html(no.sanitize(a)).style("left",`${window.scrollX+s.left+s.width/2}px`).style("top",`${window.scrollY+s.bottom+4}px`),n.classed("hover",!0)}).on("mouseout",i=>{r.transition().duration(500).style("opacity",0),tt(i.currentTarget).classed("hover",!1)})},"setupToolTips"),this.direction="TB",this.setAccTitle=gr,this.getAccTitle=xr,this.setAccDescription=Tr,this.getAccDescription=kr,this.setDiagramTitle=_r,this.getDiagramTitle=Cr,this.getConfig=o(()=>De().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{o(this,"ClassDB")}splitClassNameAndType(t){let r=ft.sanitizeText(t,De()),i="",n=r;if(r.indexOf("~")>0){let a=r.split("~");n=Ig(a[0]),i=Ig(a[1])}return{className:n,type:i}}setClassLabel(t,r){let i=ft.sanitizeText(t,De());r&&(r=Ig(r));let{className:n}=this.splitClassNameAndType(i);this.classes.get(n).label=r,this.classes.get(n).text=`${r}${this.classes.get(n).type?`<${this.classes.get(n).type}>`:""}`}addClass(t){let r=ft.sanitizeText(t,De()),{className:i,type:n}=this.splitClassNameAndType(r);if(this.classes.has(i))return;let a=ft.sanitizeText(i,De());this.classes.set(a,{id:a,type:n,label:a,text:`${a}${n?`<${n}>`:""}`,shape:"classBox",cssClasses:"default",methods:[],members:[],annotations:[],styles:[],domId:R_+a+"-"+u6e}),u6e++}addInterface(t,r){let i={id:`interface${this.interfaces.length}`,label:t,classId:r};this.interfaces.push(i)}setDiagramId(t){this.diagramId=t}lookUpDomId(t){let r=ft.sanitizeText(t,De());if(this.classes.has(r)){let i=this.classes.get(r).domId;return this.diagramId?`${this.diagramId}-${i}`:i}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",ar()}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){ee.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=ft.sanitizeText(t.relationTitle1.trim(),De()),t.relationTitle2=ft.sanitizeText(t.relationTitle2.trim(),De()),this.relations.push(t)}addAnnotation(t,r){let i=this.splitClassNameAndType(t).className;this.classes.get(i).annotations.push(r)}addMember(t,r){this.addClass(t);let i=this.splitClassNameAndType(t).className,n=this.classes.get(i);if(typeof r=="string"){let a=r.trim();a.startsWith("<<")&&a.endsWith(">>")?n.annotations.push(Ig(a.substring(2,a.length-2))):a.indexOf(")")>0?n.methods.push(new h6e(a,"method")):a&&n.members.push(new h6e(a,"attribute"))}}addMembers(t,r){Array.isArray(r)&&(r.reverse(),r.forEach(i=>this.addMember(t,i)))}addNote(t,r){let i=this.notes.size,n={id:`note${i}`,class:r,text:t,index:i};return this.notes.set(n.id,n),n.id}cleanupLabel(t){return t.startsWith(":")&&(t=t.substring(1)),Ig(t.trim())}setCssClass(t,r){t.split(",").forEach(i=>{let n=i;/\d/.exec(i[0])&&(n=R_+n),n=this.splitClassNameAndType(n).className;let a=this.classes.get(n);a&&(a.cssClasses+=" "+r)})}defineClass(t,r){for(let i of t){let n=this.styleClasses.get(i);n===void 0&&(n={id:i,styles:[],textStyles:[]},this.styleClasses.set(i,n)),r&&r.forEach(a=>{if(/color/.exec(a)){let s=a.replace("fill","bgFill");n.textStyles.push(s)}n.styles.push(a)}),this.classes.forEach(a=>{a.cssClasses.includes(i)&&a.styles.push(...r.flatMap(s=>s.split(",")))})}}setTooltip(t,r){t.split(",").forEach(i=>{if(r!==void 0){let n=this.splitClassNameAndType(i).className,a=this.classes.get(n);a&&(a.tooltip=Ig(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,i){let n=De();t.split(",").forEach(a=>{let s=a;/\d/.exec(a[0])&&(s=R_+s),s=this.splitClassNameAndType(s).className;let l=this.classes.get(s);l&&(l.link=Wt.formatUrl(r,n),n.securityLevel==="sandbox"?l.linkTarget="_top":typeof i=="string"?l.linkTarget=Ig(i):l.linkTarget="_blank")}),this.setCssClass(t,"clickable")}setClickEvent(t,r,i){t.split(",").forEach(n=>{this.setClickFunc(n,r,i);let a=this.splitClassNameAndType(n).className,s=this.classes.get(a);s&&(s.haveCallback=!0)}),this.setCssClass(t,"clickable")}setClickFunc(t,r,i){let n=ft.sanitizeText(t,De());if(De().securityLevel!=="loose"||r===void 0)return;let a=this.splitClassNameAndType(n).className;if(this.classes.has(a)){let s=[];if(typeof i=="string"){s=i.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let l=0;l{let l=this.lookUpDomId(a),h=document.querySelector(`[id="${l}"]`);h!==null&&h.addEventListener("click",()=>{Wt.runFunc(r,...s)},!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 i=r.at(-1);return i?`${i}.${t}`:t}static getAncestorIds(t){let r=t.split("."),i=new Array(r.length);i[0]=r[0];for(let n=1;n0?a[s-1]:void 0,u=s===a.length-1,d=u&&r?r:n[s];this.namespaces.has(l)?u&&(this.namespaces.get(l).explicit=!0):this.namespaces.set(l,this.createNamespaceNode(l,d,h,u)),h&&this.linkParentChild(h,l)}return i}popNamespace(){this.namespaceStack.pop()}getNamespace(t){return this.namespaces.get(t)}getNamespaces(){return this.namespaces}addClassesToNamespace(t,r,i){if(this.namespaces.has(t)){for(let n of r){let{className:a}=this.splitClassNameAndType(n),s=this.getClass(a);s.parent=t,this.namespaces.get(t).classes.set(a,s)}for(let n of i){let a=this.getNote(n);a.parent=t,this.namespaces.get(t).notes.set(n,a)}}}setCssStyle(t,r){let i=this.classes.get(t);if(!(!r||!i))for(let n of r)n.includes(",")?i.styles.push(...n.split(",")):i.styles.push(n)}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 i=this.namespaces.get(r);if(!i)return;if(i.explicit)return r;r=i.parent}}getData(){let t=[],r=[],i=De(),n=i.class?.hierarchicalNamespaces??!0;for(let s of this.namespaces.values()){if(!n&&!s.explicit)continue;let l={id:s.id,label:n?s.label:s.id,isGroup:!0,padding:i.class.padding??16,shape:"rect",cssStyles:[],look:i.look,parentId:n?s.parent:void 0};t.push(l)}for(let s of this.classes.values()){let l=n?s.parent:this.resolveExplicitAncestor(s.parent),h={...s,type:void 0,isGroup:!1,parentId:l,look:i.look};t.push(h)}for(let s of this.notes.values()){let l=n?s.parent:this.resolveExplicitAncestor(s.parent),h={id:s.id,label:s.text,isGroup:!1,shape:"note",padding:i.class.padding??6,cssStyles:["text-align: left","white-space: nowrap",`fill: ${i.themeVariables.noteBkgColor}`,`stroke: ${i.themeVariables.noteBorderColor}`],look:i.look,parentId:l,labelType:"markdown"};t.push(h);let u=this.classes.get(s.class)?.id;if(u){let d={id:`edgeNote${s.index}`,start:s.id,end:u,type:"normal",thickness:"normal",classes:"relation",arrowTypeStart:"none",arrowTypeEnd:"none",arrowheadStyle:"",labelStyle:[""],style:["fill: none"],pattern:"dotted",look:i.look};r.push(d)}}for(let s of this.interfaces){let l={id:s.id,label:s.label,isGroup:!1,shape:"rect",cssStyles:["opacity: 0;"],look:i.look};t.push(l)}let a=0;for(let s of this.relations){a++;let l={id:pc(s.id1,s.id2,{prefix:"id",counter:a}),start:s.id1,end:s.id2,type:"normal",label:s.title,labelpos:"c",thickness:"normal",classes:"relation",arrowTypeStart:this.getArrowMarker(s.relation.type1),arrowTypeEnd:this.getArrowMarker(s.relation.type2),startLabelRight:s.relationTitle1==="none"?"":s.relationTitle1,endLabelLeft:s.relationTitle2==="none"?"":s.relationTitle2,arrowheadStyle:"",labelStyle:["display: inline-block"],style:s.style||"",pattern:s.relation.lineType==1?"dashed":"solid",look:i.look,labelType:"markdown"};r.push(l)}return{nodes:t,edges:r,other:{},config:i,direction:this.getDirection()}}},Sft=o(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; +} + ${Ac()} +`,"getStyles"),I_=Sft,_ft=o((e,t="TB")=>{if(!e.doc)return t;let r=t;for(let i of e.doc)i.stmt==="dir"&&(r=i.value);return r},"getDir"),Aft=o(function(e,t){return t.db.getClasses()},"getClasses"),Rft=o(async function(e,t,r,i){ee.info("REF0:"),ee.info("Drawing class diagram (v3)",t);let{securityLevel:n,state:a,layout:s}=De();i.db.setDiagramId(t);let l=i.db.getData(),h=Yo(t,n);l.type=i.type,l.layoutAlgorithm=Ec(s),l.nodeSpacing=a?.nodeSpacing||50,l.rankSpacing=a?.rankSpacing||50,l.markers=["aggregation","extension","composition","dependency","lollipop"],l.diagramId=t,await Wo(l,h),Wt.insertTitle(h,"classDiagramTitleText",a?.titleTopMargin??25,i.db.getDiagramTitle()),Gs(h,8,"classDiagram",a?.useMaxWidth??!0)},"draw"),D_={getClasses:Aft,draw:Rft,getDir:_ft}});var d6e={};Kt(d6e,{diagram:()=>Lft});var Lft,p6e=Tt(()=>{qH();Rc();fo();Ws();js();po();Bs();ha();Zn();sa();ds();la();Fn();An();Or();Yr();tr();Zt();vt();Lft={parser:L_,get db(){return new $_},renderer:D_,styles:I_,init:o(e=>{e.class||(e.class={}),e.class.arrowMarkerAbsolute=e.arrowMarkerAbsolute},"init")}});var f6e={};Kt(f6e,{diagram:()=>$ft});var $ft,g6e=Tt(()=>{qH();Rc();fo();Ws();js();po();Bs();ha();Zn();sa();ds();la();Fn();An();Or();Yr();tr();Zt();vt();$ft={parser:L_,get db(){return new $_},renderer:D_,styles:I_,init:o(e=>{e.class||(e.class={}),e.class.arrowMarkerAbsolute=e.arrowMarkerAbsolute},"init")}});function O_(e="",t=0,r="",i=VH){let n=r!==null&&r.length>0?`${i}${r}`:"";return`${Xft}-${e}${n}-${t}`}function xT(e,t,r){if(!t.id||t.id===""||t.id==="")return;t.cssClasses&&(Array.isArray(t.cssCompiledStyles)||(t.cssCompiledStyles=[]),t.cssClasses.split(" ").forEach(n=>{let a=r.get(n);a&&(t.cssCompiledStyles=[...t.cssCompiledStyles??[],...a.styles])}));let i=e.find(n=>n.id===t.id);i?Object.assign(i,t):e.push(t)}function I6e(e){return e?.classes?.join(" ")??""}function D6e(e){return e?.styles??[]}var WH,B_,ty,ey,UH,Ift,Dft,Mft,kT,k6e,C6e,w6e,E6e,S6e,jH,GH,Nft,Oft,m6e,y6e,Bft,Pft,CT,Fft,zft,_6e,qft,jft,Gft,Wft,Uft,Vft,Yft,Hft,A6e,R6e,Xft,VH,Kft,v6e,L6e,Zft,Qft,$6e,N_,ap,Jft,b6e,TT,egt,As,x6e,T6e,M_,hu,tgt,P_,YH=Tt(()=>{fo();Ws();js();po();Or();tr();Zt();vt();WH=(function(){var e=o(function(F,P,z,q){for(z=z||{},q=F.length;q--;z[F[q]]=P);return z},"o"),t=[1,2],r=[1,3],i=[1,4],n=[2,4],a=[1,9],s=[1,11],l=[1,16],h=[1,17],u=[1,18],d=[1,19],p=[1,33],f=[1,20],g=[1,21],m=[1,22],y=[1,23],b=[1,24],v=[1,26],T=[1,27],x=[1,28],k=[1,29],C=[1,30],E=[1,31],w=[1,32],_=[1,35],L=[1,36],N=[1,37],D=[1,38],M=[1,34],B=[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],A=[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],I=[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],O={trace:o(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:o(function(F,P,z,q,G,W,J){var H=W.length-1;switch(G){case 3:return q.setRootDoc(W[H]),W[H];case 4:this.$=[];break;case 5:W[H]!="nl"&&(W[H-1].push(W[H]),this.$=W[H-1]);break;case 6:case 7:this.$=W[H];break;case 8:this.$="nl";break;case 12:this.$=W[H];break;case 13:let te=W[H-1];te.description=q.trimColon(W[H]),this.$=te;break;case 14:this.$={stmt:"relation",state1:W[H-2],state2:W[H]};break;case 15:let re=q.trimColon(W[H]);this.$={stmt:"relation",state1:W[H-3],state2:W[H-1],description:re};break;case 19:this.$={stmt:"state",id:W[H-3],type:"default",description:"",doc:W[H-1]};break;case 20:var Z=W[H],se=W[H-2].trim();if(W[H].match(":")){var Q=W[H].split(":");Z=Q[0],se=[se,Q[1]]}this.$={stmt:"state",id:Z,type:"default",description:se};break;case 21:this.$={stmt:"state",id:W[H-3],type:"default",description:W[H-5],doc:W[H-1]};break;case 22:this.$={stmt:"state",id:W[H],type:"fork"};break;case 23:this.$={stmt:"state",id:W[H],type:"join"};break;case 24:this.$={stmt:"state",id:W[H],type:"choice"};break;case 25:this.$={stmt:"state",id:q.getDividerId(),type:"divider"};break;case 26:this.$={stmt:"state",id:W[H-1].trim(),note:{position:W[H-2].trim(),text:W[H].trim()}};break;case 29:this.$=W[H].trim(),q.setAccTitle(this.$);break;case 30:case 31:this.$=W[H].trim(),q.setAccDescription(this.$);break;case 32:this.$={stmt:"click",id:W[H-3],url:W[H-2],tooltip:W[H-1]};break;case 33:this.$={stmt:"click",id:W[H-3],url:W[H-1],tooltip:""};break;case 34:case 35:this.$={stmt:"classDef",id:W[H-1].trim(),classes:W[H].trim()};break;case 36:this.$={stmt:"style",id:W[H-1].trim(),styleClass:W[H].trim()};break;case 37:this.$={stmt:"applyClass",id:W[H-1].trim(),styleClass:W[H].trim()};break;case 38:q.setDirection("TB"),this.$={stmt:"dir",value:"TB"};break;case 39:q.setDirection("BT"),this.$={stmt:"dir",value:"BT"};break;case 40:q.setDirection("RL"),this.$={stmt:"dir",value:"RL"};break;case 41:q.setDirection("LR"),this.$={stmt:"dir",value:"LR"};break;case 44:case 45:this.$={stmt:"state",id:W[H].trim(),type:"default",description:""};break;case 46:this.$={stmt:"state",id:W[H-2].trim(),classes:[W[H].trim()],type:"default",description:""};break;case 47:this.$={stmt:"state",id:W[H-2].trim(),classes:[W[H].trim()],type:"default",description:""};break}},"anonymous"),table:[{3:1,4:t,5:r,6:i},{1:[3]},{3:5,4:t,5:r,6:i},{3:6,4:t,5:r,6:i},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],n,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:a,5:s,8:8,9:10,10:12,11:13,12:14,13:15,16:l,17:h,19:u,22:d,24:p,25:f,26:g,27:m,28:y,29:b,32:25,33:v,35:T,37:x,38:k,41:C,45:E,48:w,51:_,52:L,53:N,54:D,57:M},e(B,[2,5]),{9:39,10:12,11:13,12:14,13:15,16:l,17:h,19:u,22:d,24:p,25:f,26:g,27:m,28:y,29:b,32:25,33:v,35:T,37:x,38:k,41:C,45:E,48:w,51:_,52:L,53:N,54:D,57:M},e(B,[2,7]),e(B,[2,8]),e(B,[2,9]),e(B,[2,10]),e(B,[2,11]),e(B,[2,12],{14:[1,40],15:[1,41]}),e(B,[2,16]),{18:[1,42]},e(B,[2,18],{20:[1,43]}),{23:[1,44]},e(B,[2,22]),e(B,[2,23]),e(B,[2,24]),e(B,[2,25]),{30:45,31:[1,46],59:[1,47],60:[1,48]},e(B,[2,28]),{34:[1,49]},{36:[1,50]},e(B,[2,31]),{13:51,24:p,57:M},{42:[1,52],44:[1,53]},{46:[1,54]},{49:[1,55]},e(A,[2,44],{58:[1,56]}),e(A,[2,45],{58:[1,57]}),e(B,[2,38]),e(B,[2,39]),e(B,[2,40]),e(B,[2,41]),e(B,[2,6]),e(B,[2,13]),{13:58,24:p,57:M},e(B,[2,17]),e(I,n,{7:59}),{24:[1,60]},{24:[1,61]},{23:[1,62]},{24:[2,48]},{24:[2,49]},e(B,[2,29]),e(B,[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(B,[2,14],{14:[1,71]}),{4:a,5:s,8:8,9:10,10:12,11:13,12:14,13:15,16:l,17:h,19:u,21:[1,72],22:d,24:p,25:f,26:g,27:m,28:y,29:b,32:25,33:v,35:T,37:x,38:k,41:C,45:E,48:w,51:_,52:L,53:N,54:D,57:M},e(B,[2,20],{20:[1,73]}),{31:[1,74]},{24:[1,75]},{39:[1,76]},{39:[1,77]},e(B,[2,34]),e(B,[2,35]),e(B,[2,36]),e(B,[2,37]),e(A,[2,46]),e(A,[2,47]),e(B,[2,15]),e(B,[2,19]),e(I,n,{7:78}),e(B,[2,26]),e(B,[2,27]),{5:[1,79]},{5:[1,80]},{4:a,5:s,8:8,9:10,10:12,11:13,12:14,13:15,16:l,17:h,19:u,21:[1,81],22:d,24:p,25:f,26:g,27:m,28:y,29:b,32:25,33:v,35:T,37:x,38:k,41:C,45:E,48:w,51:_,52:L,53:N,54:D,57:M},e(B,[2,32]),e(B,[2,33]),e(B,[2,21])],defaultActions:{5:[2,1],6:[2,2],47:[2,48],48:[2,49]},parseError:o(function(F,P){if(P.recoverable)this.trace(F);else{var z=new Error(F);throw z.hash=P,z}},"parseError"),parse:o(function(F){var P=this,z=[0],q=[],G=[null],W=[],J=this.table,H="",Z=0,se=0,Q=0,te=2,re=1,ne=W.slice.call(arguments,1),Ae=Object.create(this.lexer),ie={yy:{}};for(var me in this.yy)Object.prototype.hasOwnProperty.call(this.yy,me)&&(ie.yy[me]=this.yy[me]);Ae.setInput(F,ie.yy),ie.yy.lexer=Ae,ie.yy.parser=this,typeof Ae.yylloc>"u"&&(Ae.yylloc={});var oe=Ae.yylloc;W.push(oe);var we=Ae.options&&Ae.options.ranges;typeof ie.yy.parseError=="function"?this.parseError=ie.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ye(U){z.length=z.length-2*U,G.length=G.length-U,W.length=W.length-U}o(ye,"popStack");function ve(){var U;return U=q.pop()||Ae.lex()||re,typeof U!="number"&&(U instanceof Array&&(q=U,U=q.pop()),U=P.symbols_[U]||U),U}o(ve,"lex");for(var ae,Pe,X,ce,ge,be,ke={},Me,pe,Oe,j;;){if(X=z[z.length-1],this.defaultActions[X]?ce=this.defaultActions[X]:((ae===null||typeof ae>"u")&&(ae=ve()),ce=J[X]&&J[X][ae]),typeof ce>"u"||!ce.length||!ce[0]){var le="";j=[];for(Me in J[X])this.terminals_[Me]&&Me>te&&j.push("'"+this.terminals_[Me]+"'");Ae.showPosition?le="Parse error on line "+(Z+1)+`: +`+Ae.showPosition()+` +Expecting `+j.join(", ")+", got '"+(this.terminals_[ae]||ae)+"'":le="Parse error on line "+(Z+1)+": Unexpected "+(ae==re?"end of input":"'"+(this.terminals_[ae]||ae)+"'"),this.parseError(le,{text:Ae.match,token:this.terminals_[ae]||ae,line:Ae.yylineno,loc:oe,expected:j})}if(ce[0]instanceof Array&&ce.length>1)throw new Error("Parse Error: multiple actions possible at state: "+X+", token: "+ae);switch(ce[0]){case 1:z.push(ae),G.push(Ae.yytext),W.push(Ae.yylloc),z.push(ce[1]),ae=null,Pe?(ae=Pe,Pe=null):(se=Ae.yyleng,H=Ae.yytext,Z=Ae.yylineno,oe=Ae.yylloc,Q>0&&Q--);break;case 2:if(pe=this.productions_[ce[1]][1],ke.$=G[G.length-pe],ke._$={first_line:W[W.length-(pe||1)].first_line,last_line:W[W.length-1].last_line,first_column:W[W.length-(pe||1)].first_column,last_column:W[W.length-1].last_column},we&&(ke._$.range=[W[W.length-(pe||1)].range[0],W[W.length-1].range[1]]),be=this.performAction.apply(ke,[H,se,Z,ie.yy,ce[1],G,W].concat(ne)),typeof be<"u")return be;pe&&(z=z.slice(0,-1*pe*2),G=G.slice(0,-1*pe),W=W.slice(0,-1*pe)),z.push(this.productions_[ce[1]][0]),G.push(ke.$),W.push(ke._$),Oe=J[z[z.length-2]][z[z.length-1]],z.push(Oe);break;case 3:return!0}}return!0},"parse")},R=(function(){var F={EOF:1,parseError:o(function(P,z){if(this.yy.parser)this.yy.parser.parseError(P,z);else throw new Error(P)},"parseError"),setInput:o(function(P,z){return this.yy=z||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:o(function(){var P=this._input[0];this.yytext+=P,this.yyleng++,this.offset++,this.match+=P,this.matched+=P;var z=P.match(/(?:\r\n?|\n).*/g);return z?(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:o(function(P){var z=P.length,q=P.split(/(?:\r\n?|\n)/g);this._input=P+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-z),this.offset-=z;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),q.length-1&&(this.yylineno-=q.length-1);var W=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:q?(q.length===G.length?this.yylloc.first_column:0)+G[G.length-q.length].length-q[0].length:this.yylloc.first_column-z},this.options.ranges&&(this.yylloc.range=[W[0],W[0]+this.yyleng-z]),this.yyleng=this.yytext.length,this},"unput"),more:o(function(){return this._more=!0,this},"more"),reject:o(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:o(function(P){this.unput(this.match.slice(P))},"less"),pastInput:o(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:o(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:o(function(){var P=this.pastInput(),z=new Array(P.length+1).join("-");return P+this.upcomingInput()+` +`+z+"^"},"showPosition"),test_match:o(function(P,z){var q,G,W;if(this.options.backtrack_lexer&&(W={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&&(W.yylloc.range=this.yylloc.range.slice(0))),G=P[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+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],q=this.performAction.call(this,this.yy,this,z,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),q)return q;if(this._backtrack){for(var J in W)this[J]=W[J];return!1}return!1},"test_match"),next:o(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var P,z,q,G;this._more||(this.yytext="",this.match="");for(var W=this._currentRules(),J=0;Jz[0].length)){if(z=q,G=J,this.options.backtrack_lexer){if(P=this.test_match(q,W[J]),P!==!1)return P;if(this._backtrack){z=!1;continue}else return!1}else if(!this.options.flex)break}return z?(P=this.test_match(z,W[G]),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:o(function(){var P=this.next();return P||this.lex()},"lex"),begin:o(function(P){this.conditionStack.push(P)},"begin"),popState:o(function(){var P=this.conditionStack.length-1;return P>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:o(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:o(function(P){return P=this.conditionStack.length-1-Math.abs(P||0),P>=0?this.conditionStack[P]:"INITIAL"},"topState"),pushState:o(function(P){this.begin(P)},"pushState"),stateStackSize:o(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:o(function(P,z,q,G){function W(){let H=z.yytext.indexOf("%%");if(H===0)return!1;if(H>0){let Z=z.yytext.slice(0,H),se=z.yytext.slice(H);se&&P.lexer.unput(se),z.yytext=Z}return!0}o(W,"processId");var J=G;switch(q){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;case 14:return 18;case 15:this.popState();break;case 16:return this.begin("acc_title"),33;case 17:return this.popState(),"acc_title_value";case 18:return this.begin("acc_descr"),35;case 19:return this.popState(),"acc_descr_value";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;case 24:return this.popState(),this.pushState("CLASSDEFID"),"DEFAULT_CLASSDEF_ID";case 25:return this.popState(),this.pushState("CLASSDEFID"),42;case 26:return this.popState(),43;case 27:return this.pushState("CLASS"),48;case 28:return this.popState(),this.pushState("CLASS_STYLE"),49;case 29:return this.popState(),50;case 30:return this.pushState("STYLE"),45;case 31:return this.popState(),this.pushState("STYLEDEF_STYLES"),46;case 32:return this.popState(),47;case 33:return this.pushState("SCALE"),17;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;case 38:return this.popState(),z.yytext=z.yytext.slice(0,-8).trim(),26;case 39:return this.popState(),z.yytext=z.yytext.slice(0,-10).trim(),27;case 40:return this.popState(),z.yytext=z.yytext.slice(0,-8).trim(),25;case 41:return this.popState(),z.yytext=z.yytext.slice(0,-8).trim(),26;case 42:return this.popState(),z.yytext=z.yytext.slice(0,-10).trim(),27;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";case 49:return W()?(this.popState(),"ID"):void 0;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;case 56:return this.popState(),21;case 57:break;case 58:return this.begin("NOTE"),29;case 59:return this.popState(),this.pushState("NOTE_ID"),59;case 60:return this.popState(),this.pushState("NOTE_ID"),60;case 61:this.popState(),this.pushState("FLOATING_NOTE");break;case 62:return this.popState(),this.pushState("FLOATING_NOTE_ID"),"AS";case 63:break;case 64:return"NOTE_TEXT";case 65:return W()?(this.popState(),"ID"):void 0;case 66:return W()?(this.popState(),this.pushState("NOTE_TEXT"),24):void 0;case 67:return this.popState(),z.yytext=z.yytext.substr(2).trim(),31;case 68:return this.popState(),z.yytext=z.yytext.slice(0,-8).trim(),31;case 69:return 6;case 70:return 6;case 71:return 16;case 72:return 57;case 73:return W()?24:void 0;case 74:return z.yytext=z.yytext.trim(),14;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 F})();O.lexer=R;function $(){this.yy={}}return o($,"Parser"),$.prototype=O,O.Parser=$,new $})();WH.parser=WH;B_=WH,ty="state",ey="root",UH="relation",Ift="classDef",Dft="style",Mft="applyClass",kT="default",k6e="divider",C6e="fill:none",w6e="fill: #333",E6e="markdown",S6e="normal",jH="rect",GH="rectWithTitle",Nft="stateStart",Oft="stateEnd",m6e="divider",y6e="roundedWithTitle",Bft="note",Pft="noteGroup",CT="statediagram",Fft="state",zft=`${CT}-${Fft}`,_6e="transition",qft="note",jft="note-edge",Gft=`${_6e} ${jft}`,Wft=`${CT}-${qft}`,Uft="cluster",Vft=`${CT}-${Uft}`,Yft="cluster-alt",Hft=`${CT}-${Yft}`,A6e="parent",R6e="note",Xft="state",VH="----",Kft=`${VH}${R6e}`,v6e=`${VH}${A6e}`,L6e=o((e,t="TB")=>{if(!e.doc)return t;let r=t;for(let i of e.doc)i.stmt==="dir"&&(r=i.value);return r},"getDir"),Zft=o(function(e,t){return t.db.getClasses()},"getClasses"),Qft=o(async function(e,t,r,i){ee.info("REF0:"),ee.info("Drawing state diagram (v2)",t);let{securityLevel:n,state:a,layout:s}=De();i.db.extract(i.db.getRootDocV2());let l=i.db.getData(),h=Yo(t,n);l.type=i.type,l.layoutAlgorithm=s,l.nodeSpacing=a?.nodeSpacing||50,l.rankSpacing=a?.rankSpacing||50,De().look==="neo"?l.markers=["barbNeo"]:l.markers=["barb"],l.diagramId=t,await Wo(l,h);let u=8;try{(typeof i.db.getLinks=="function"?i.db.getLinks():new Map).forEach((d,p)=>{let f=typeof p=="string"?p:typeof p?.id=="string"?p.id:"",g=l.nodes.find(x=>x.id===f);if(!f){ee.warn("\u26A0\uFE0F Invalid or missing stateId from key:",JSON.stringify(p));return}let m=h.node()?.querySelectorAll("g.node, g.rough-node"),y;if(m?.forEach(x=>{let k=x.textContent?.trim();(x.id===g?.domId||k===f)&&(y=x)}),!y){ee.warn("\u26A0\uFE0F Could not find node matching text:",f);return}let b=y.parentNode;if(!b){ee.warn("\u26A0\uFE0F Node has no parent, cannot wrap:",f);return}let v=document.createElementNS("http://www.w3.org/2000/svg","a"),T=d.url.replace(/^"+|"+$/g,"");if(v.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",T),v.setAttribute("target","_blank"),d.tooltip){let x=d.tooltip.replace(/^"+|"+$/g,"");v.setAttribute("title",x),y.setAttribute("title",x)}b.replaceChild(v,y),v.appendChild(y),ee.info("\u{1F517} Wrapped node in
    tag for:",f,d.url)})}catch(d){ee.error("\u274C Error injecting clickable links:",d)}Wt.insertTitle(h,"statediagramTitleText",a?.titleTopMargin??25,i.db.getDiagramTitle()),Gs(h,u,CT,a?.useMaxWidth??!0)},"draw"),$6e={getClasses:Zft,draw:Qft,getDir:L6e},N_=new Map,ap=0;o(O_,"stateDomId");Jft=o((e,t,r,i,n,a,s,l)=>{ee.trace("items",t),t.forEach(h=>{switch(h.stmt){case ty:TT(e,h,r,i,n,a,s,l);break;case kT:TT(e,h,r,i,n,a,s,l);break;case UH:{TT(e,h.state1,r,i,n,a,s,l),TT(e,h.state2,r,i,n,a,s,l);let u=s==="neo",d={id:"edge"+ap,start:h.state1.id,end:h.state2.id,arrowhead:"normal",arrowTypeEnd:u?"arrow_barb_neo":"arrow_barb",style:C6e,labelStyle:"",label:ft.sanitizeText(h.description??"",De()),arrowheadStyle:w6e,labelpos:"c",labelType:E6e,thickness:S6e,classes:_6e,look:s};n.push(d),ap++}break}})},"setupDoc"),b6e=o((e,t="TB")=>{let r=t;if(e.doc)for(let i of e.doc)i.stmt==="dir"&&(r=i.value);return r},"getDir");o(xT,"insertOrUpdateNode");o(I6e,"getClassesFromDbInfo");o(D6e,"getStylesFromDbInfo");TT=o((e,t,r,i,n,a,s,l)=>{let h=t.id,u=r.get(h),d=I6e(u),p=D6e(u),f=De();if(ee.info("dataFetcher parsedItem",t,u,p),h!=="root"){let g=jH;t.start===!0?g=Nft:t.start===!1&&(g=Oft),t.type!==kT&&(g=t.type),N_.get(h)||N_.set(h,{id:h,shape:g,description:ft.sanitizeText(h,f),cssClasses:`${d} ${zft}`,cssStyles:p});let m=N_.get(h);t.description&&(Array.isArray(m.description)?(m.shape=GH,m.description.push(t.description)):m.description?.length&&m.description.length>0?(m.shape=GH,m.description===h?m.description=[t.description]:m.description=[m.description,t.description]):(m.shape=jH,m.description=t.description),m.description=ft.sanitizeTextOrArray(m.description,f)),m.description?.length===1&&m.shape===GH&&(m.type==="group"?m.shape=y6e:m.shape=jH),!m.type&&t.doc&&(ee.info("Setting cluster for XCX",h,b6e(t)),m.type="group",m.isGroup=!0,m.dir=b6e(t),m.explicitDir=t.doc.some(b=>b.stmt==="dir"),m.shape=t.type===k6e?m6e:y6e,m.cssClasses=`${m.cssClasses} ${Vft} ${a?Hft:""}`);let y={labelStyle:"",shape:m.shape,label:m.description,cssClasses:m.cssClasses,cssCompiledStyles:[],cssStyles:m.cssStyles,id:h,dir:m.dir,domId:O_(h,ap),type:m.type,isGroup:m.type==="group",padding:8,rx:10,ry:10,look:s,labelType:"markdown"};if(y.shape===m6e&&(y.label=""),e&&e.id!=="root"&&(ee.trace("Setting node ",h," to be child of its parent ",e.id),y.parentId=e.id),y.centerLabel=!0,t.note){let b={labelStyle:"",shape:Bft,label:t.note.text,labelType:"markdown",cssClasses:Wft,cssStyles:[],cssCompiledStyles:[],id:h+Kft+"-"+ap,domId:O_(h,ap,R6e),type:m.type,isGroup:m.type==="group",padding:f.flowchart?.padding,look:s,position:t.note.position},v=h+v6e,T={labelStyle:"",shape:Pft,label:t.note.text,cssClasses:m.cssClasses,cssStyles:[],id:h+v6e,domId:O_(h,ap,A6e),type:"group",isGroup:!0,padding:16,look:s,position:t.note.position};ap++,T.id=v,b.parentId=v,xT(i,T,l),xT(i,b,l),xT(i,y,l);let x=h,k=b.id;t.note.position==="left of"&&(x=b.id,k=h),n.push({id:x+"-"+k,start:x,end:k,arrowhead:"none",arrowTypeEnd:"",style:C6e,labelStyle:"",classes:Gft,arrowheadStyle:w6e,labelpos:"c",labelType:E6e,thickness:S6e,look:s})}else xT(i,y,l)}t.doc&&(ee.trace("Adding nodes children "),Jft(t,t.doc,r,i,n,!a,s,l))},"dataFetcher"),egt=o(()=>{N_.clear(),ap=0},"reset"),As={START_NODE:"[*]",START_TYPE:"start",END_NODE:"[*]",END_TYPE:"end",COLOR_KEYWORD:"color",FILL_KEYWORD:"fill",BG_FILL:"bgFill",STYLECLASS_SEP:","},x6e=o(()=>new Map,"newClassesList"),T6e=o(()=>({relations:[],states:new Map,documents:{}}),"newDoc"),M_=o(e=>JSON.parse(JSON.stringify(e)),"clone"),hu=class{constructor(e){this.version=e,this.nodes=[],this.edges=[],this.rootDoc=[],this.classes=x6e(),this.documents={root:T6e()},this.currentDocument=this.documents.root,this.startEndCount=0,this.dividerCnt=0,this.links=new Map,this.funs=[],this.getAccTitle=xr,this.setAccTitle=gr,this.getAccDescription=kr,this.setAccDescription=Tr,this.setDiagramTitle=_r,this.getDiagramTitle=Cr,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{o(this,"StateDB")}static{this.relationType={AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3}}extract(e){this.clear(!0);for(let i of Array.isArray(e)?e:e.doc)switch(i.stmt){case ty:this.addState(i.id.trim(),i.type,i.doc,i.description,i.note);break;case UH:this.addRelation(i.state1,i.state2,i.description);break;case Ift:this.addStyleClass(i.id.trim(),i.classes);break;case Dft:this.handleStyleDef(i);break;case Mft:this.setCssClass(i.id.trim(),i.styleClass);break;case"click":this.addLink(i.id,i.url,i.tooltip);break}let t=this.getStates(),r=De();egt(),TT(void 0,this.getRootDocV2(),t,this.nodes,this.edges,!0,r.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(e){let t=e.id.trim().split(","),r=e.styleClass.split(",");for(let i of t){let n=this.getState(i);if(!n){let a=i.trim();this.addState(a),n=this.getState(a)}n&&(n.styles=r.map(a=>a.replace(/;/g,"")?.trim()))}}setRootDoc(e){ee.info("Setting root doc",e),this.rootDoc=e,this.version===1?this.extract(e):this.extract(this.getRootDocV2())}docTranslator(e,t,r){if(t.stmt===UH){this.docTranslator(e,t.state1,!0),this.docTranslator(e,t.state2,!1);return}if(t.stmt===ty&&(t.id===As.START_NODE?(t.id=e.id+(r?"_start":"_end"),t.start=r):t.id=t.id.trim()),t.stmt!==ey&&t.stmt!==ty||!t.doc)return;let i=[],n=[];for(let a of t.doc)if(a.type===k6e){let s=M_(a);s.doc=M_(n),i.push(s),n=[]}else n.push(a);if(i.length>0&&n.length>0){let a={stmt:ty,id:HL(),type:"divider",doc:M_(n)};i.push(M_(a)),t.doc=i}t.doc.forEach(a=>this.docTranslator(t,a,!0))}getRootDocV2(){return this.docTranslator({id:ey,stmt:ey},{id:ey,stmt:ey,doc:this.rootDoc},!0),{id:ey,doc:this.rootDoc}}addState(e,t=kT,r=void 0,i=void 0,n=void 0,a=void 0,s=void 0,l=void 0){let h=e?.trim();if(!this.currentDocument.states.has(h))ee.info("Adding state ",h,i),this.currentDocument.states.set(h,{stmt:ty,id:h,descriptions:[],type:t,doc:r,note:n,classes:[],styles:[],textStyles:[]});else{let u=this.currentDocument.states.get(h);if(!u)throw new Error(`State not found: ${h}`);u.doc||(u.doc=r),u.type||(u.type=t)}if(i&&(ee.info("Setting state description",h,i),(Array.isArray(i)?i:[i]).forEach(u=>this.addDescription(h,u.trim()))),n){let u=this.currentDocument.states.get(h);if(!u)throw new Error(`State not found: ${h}`);u.note=n,u.note.text=ft.sanitizeText(u.note.text,De())}a&&(ee.info("Setting state classes",h,a),(Array.isArray(a)?a:[a]).forEach(u=>this.setCssClass(h,u.trim()))),s&&(ee.info("Setting state styles",h,s),(Array.isArray(s)?s:[s]).forEach(u=>this.setStyle(h,u.trim()))),l&&(ee.info("Setting state styles",h,s),(Array.isArray(l)?l:[l]).forEach(u=>this.setTextStyle(h,u.trim())))}clear(e){this.nodes=[],this.edges=[],this.funs=[this.setupToolTips.bind(this)],this.documents={root:T6e()},this.currentDocument=this.documents.root,this.startEndCount=0,this.classes=x6e(),e||(this.links=new Map,ar())}getState(e){return this.currentDocument.states.get(e)}getStates(){return this.currentDocument.states}logDocuments(){ee.info("Documents = ",this.documents)}getRelations(){return this.currentDocument.relations}addLink(e,t,r){this.links.set(e,{url:t,tooltip:r}),ee.warn("Adding link",e,t,r)}getLinks(){return this.links}startIdIfNeeded(e=""){return e===As.START_NODE?(this.startEndCount++,`${As.START_TYPE}${this.startEndCount}`):e}startTypeIfNeeded(e="",t=kT){return e===As.START_NODE?As.START_TYPE:t}endIdIfNeeded(e=""){return e===As.END_NODE?(this.startEndCount++,`${As.END_TYPE}${this.startEndCount}`):e}endTypeIfNeeded(e="",t=kT){return e===As.END_NODE?As.END_TYPE:t}addRelationObjs(e,t,r=""){let i=this.startIdIfNeeded(e.id.trim()),n=this.startTypeIfNeeded(e.id.trim(),e.type),a=this.startIdIfNeeded(t.id.trim()),s=this.startTypeIfNeeded(t.id.trim(),t.type);this.addState(i,n,e.doc,e.description,e.note,e.classes,e.styles,e.textStyles),this.addState(a,s,t.doc,t.description,t.note,t.classes,t.styles,t.textStyles),this.currentDocument.relations.push({id1:i,id2:a,relationTitle:ft.sanitizeText(r,De())})}addRelation(e,t,r){if(typeof e=="object"&&typeof t=="object")this.addRelationObjs(e,t,r);else if(typeof e=="string"&&typeof t=="string"){let i=this.startIdIfNeeded(e.trim()),n=this.startTypeIfNeeded(e),a=this.endIdIfNeeded(t.trim()),s=this.endTypeIfNeeded(t);this.addState(i,n),this.addState(a,s),this.currentDocument.relations.push({id1:i,id2:a,relationTitle:r?ft.sanitizeText(r,De()):void 0})}}addDescription(e,t){let r=this.currentDocument.states.get(e),i=t.startsWith(":")?t.replace(":","").trim():t;r?.descriptions?.push(ft.sanitizeText(i,De()))}cleanupLabel(e){return e.startsWith(":")?e.slice(2).trim():e.trim()}getDividerId(){return this.dividerCnt++,`divider-id-${this.dividerCnt}`}addStyleClass(e,t=""){this.classes.has(e)||this.classes.set(e,{id:e,styles:[],textStyles:[]});let r=this.classes.get(e);t&&r&&t.split(As.STYLECLASS_SEP).forEach(i=>{let n=i.replace(/([^;]*);/,"$1").trim();if(RegExp(As.COLOR_KEYWORD).exec(i)){let a=n.replace(As.FILL_KEYWORD,As.BG_FILL).replace(As.COLOR_KEYWORD,As.FILL_KEYWORD);r.textStyles.push(a)}r.styles.push(n)})}getClasses(){return this.classes}setupToolTips(e){let t=Rm();tt(e).select("svg").selectAll("g.node, g.rough-node").on("mouseover",r=>{let i=tt(r.currentTarget),n=i.attr("title");if(n===null)return;let a=r.currentTarget?.getBoundingClientRect();t.transition().duration(200).style("opacity",".9"),t.style("left",window.scrollX+a.left+(a.right-a.left)/2+"px").style("top",window.scrollY+a.bottom+"px"),t.html(no.sanitize(n)),i.classed("hover",!0)}).on("mouseout",r=>{t.transition().duration(500).style("opacity",0),tt(r.currentTarget).classed("hover",!1)})}setCssClass(e,t){e.split(",").forEach(r=>{let i=this.getState(r);if(!i){let n=r.trim();this.addState(n),i=this.getState(n)}i?.classes?.push(t)})}setStyle(e,t){this.getState(e)?.styles?.push(t)}setTextStyle(e,t){this.getState(e)?.textStyles?.push(t)}bindFunctions(e){this.funs.forEach(t=>{t(e)})}getDirectionStatement(){return this.rootDoc.find(e=>e.stmt==="dir")}getDirection(){return this.getDirectionStatement()?.value??"TB"}setDirection(e){let t=this.getDirectionStatement();t?t.value=e:this.rootDoc.unshift({stmt:"dir",value:e})}trimColon(e){return e.startsWith(":")?e.slice(1).trim():e.trim()}getData(){let e=De();return{nodes:this.nodes,edges:this.edges,other:{},config:e,direction:L6e(this.getRootDocV2())}}getConfig(){return De().state}},tgt=o(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"),P_=tgt});var B6e={};Kt(B6e,{diagram:()=>ygt});var rgt,igt,ngt,agt,sgt,ogt,lgt,cgt,hgt,M6e,N6e,ugt,Co,HH,dgt,pgt,fgt,ggt,O6e,mgt,ygt,P6e=Tt(()=>{YH();DI();nf();fo();Ws();js();po();Bs();ha();Zn();sa();ds();la();Fn();An();Or();Yr();tr();Zt();vt();rgt=o(e=>e.append("circle").attr("class","start-state").attr("r",De().state.sizeUnit).attr("cx",De().state.padding+De().state.sizeUnit).attr("cy",De().state.padding+De().state.sizeUnit),"drawStartState"),igt=o(e=>e.append("line").style("stroke","grey").style("stroke-dasharray","3").attr("x1",De().state.textHeight).attr("class","divider").attr("x2",De().state.textHeight*2).attr("y1",0).attr("y2",0),"drawDivider"),ngt=o((e,t)=>{let r=e.append("text").attr("x",2*De().state.padding).attr("y",De().state.textHeight+2*De().state.padding).attr("font-size",De().state.fontSize).attr("class","state-title").text(t.id),i=r.node().getBBox();return e.insert("rect",":first-child").attr("x",De().state.padding).attr("y",De().state.padding).attr("width",i.width+2*De().state.padding).attr("height",i.height+2*De().state.padding).attr("rx",De().state.radius),r},"drawSimpleState"),agt=o((e,t)=>{let r=o(function(p,f,g){let m=p.append("tspan").attr("x",2*De().state.padding).text(f);g||m.attr("dy",De().state.textHeight)},"addTspan"),i=e.append("text").attr("x",2*De().state.padding).attr("y",De().state.textHeight+1.3*De().state.padding).attr("font-size",De().state.fontSize).attr("class","state-title").text(t.descriptions[0]).node().getBBox(),n=i.height,a=e.append("text").attr("x",De().state.padding).attr("y",n+De().state.padding*.4+De().state.dividerMargin+De().state.textHeight).attr("class","state-description"),s=!0,l=!0;t.descriptions.forEach(function(p){s||(r(a,p,l),l=!1),s=!1});let h=e.append("line").attr("x1",De().state.padding).attr("y1",De().state.padding+n+De().state.dividerMargin/2).attr("y2",De().state.padding+n+De().state.dividerMargin/2).attr("class","descr-divider"),u=a.node().getBBox(),d=Math.max(u.width,i.width);return h.attr("x2",d+3*De().state.padding),e.insert("rect",":first-child").attr("x",De().state.padding).attr("y",De().state.padding).attr("width",d+2*De().state.padding).attr("height",u.height+n+2*De().state.padding).attr("rx",De().state.radius),e},"drawDescrState"),sgt=o((e,t,r)=>{let i=De().state.padding,n=2*De().state.padding,a=e.node().getBBox(),s=a.width,l=a.x,h=e.append("text").attr("x",0).attr("y",De().state.titleShift).attr("font-size",De().state.fontSize).attr("class","state-title").text(t.id),u=h.node().getBBox().width+n,d=Math.max(u,s);d===s&&(d=d+n);let p,f=e.node().getBBox();t.doc,p=l-i,u>s&&(p=(s-d)/2+i),Math.abs(l-f.x)s&&(p=l-(u-s)/2);let g=1-De().state.textHeight;return e.insert("rect",":first-child").attr("x",p).attr("y",g).attr("class",r?"alt-composit":"composit").attr("width",d).attr("height",f.height+De().state.textHeight+De().state.titleShift+1).attr("rx","0"),h.attr("x",p+i),u<=s&&h.attr("x",l+(d-n)/2-u/2+i),e.insert("rect",":first-child").attr("x",p).attr("y",De().state.titleShift-De().state.textHeight-De().state.padding).attr("width",d).attr("height",De().state.textHeight*3).attr("rx",De().state.radius),e.insert("rect",":first-child").attr("x",p).attr("y",De().state.titleShift-De().state.textHeight-De().state.padding).attr("width",d).attr("height",f.height+3+2*De().state.textHeight).attr("rx",De().state.radius),e},"addTitleAndBox"),ogt=o(e=>(e.append("circle").attr("class","end-state-outer").attr("r",De().state.sizeUnit+De().state.miniPadding).attr("cx",De().state.padding+De().state.sizeUnit+De().state.miniPadding).attr("cy",De().state.padding+De().state.sizeUnit+De().state.miniPadding),e.append("circle").attr("class","end-state-inner").attr("r",De().state.sizeUnit).attr("cx",De().state.padding+De().state.sizeUnit+2).attr("cy",De().state.padding+De().state.sizeUnit+2)),"drawEndState"),lgt=o((e,t)=>{let r=De().state.forkWidth,i=De().state.forkHeight;if(t.parentId){let n=r;r=i,i=n}return e.append("rect").style("stroke","black").style("fill","black").attr("width",r).attr("height",i).attr("x",De().state.padding).attr("y",De().state.padding)},"drawForkJoinState"),cgt=o((e,t,r,i)=>{let n=0,a=i.append("text");a.style("text-anchor","start"),a.attr("class","noteText");let s=e.replace(/\r\n/g,"
    ");s=s.replace(/\n/g,"
    ");let l=s.split(ft.lineBreakRegex),h=1.25*De().state.noteMargin;for(let u of l){let d=u.trim();if(d.length>0){let p=a.append("tspan");if(p.text(d),h===0){let f=p.node().getBBox();h+=f.height}n+=h,p.attr("x",t+De().state.noteMargin),p.attr("y",r+n+1.25*De().state.noteMargin)}}return{textWidth:a.node().getBBox().width,textHeight:n}},"_drawLongText"),hgt=o((e,t)=>{t.attr("class","state-note");let r=t.append("rect").attr("x",0).attr("y",De().state.padding),i=t.append("g"),{textWidth:n,textHeight:a}=cgt(e,0,0,i);return r.attr("height",a+2*De().state.noteMargin),r.attr("width",n+De().state.noteMargin*2),r},"drawNote"),M6e=o(function(e,t){let r=t.id,i={id:r,label:t.id,width:0,height:0},n=e.append("g").attr("id",r).attr("class","stateGroup");t.type==="start"&&rgt(n),t.type==="end"&&ogt(n),(t.type==="fork"||t.type==="join")&&lgt(n,t),t.type==="note"&&hgt(t.note.text,n),t.type==="divider"&&igt(n),t.type==="default"&&t.descriptions.length===0&&ngt(n,t),t.type==="default"&&t.descriptions.length>0&&agt(n,t);let a=n.node().getBBox();return i.width=a.width+2*De().state.padding,i.height=a.height+2*De().state.padding,i},"drawState"),N6e=0,ugt=o(function(e,t,r){let i=o(function(h){switch(h){case hu.relationType.AGGREGATION:return"aggregation";case hu.relationType.EXTENSION:return"extension";case hu.relationType.COMPOSITION:return"composition";case hu.relationType.DEPENDENCY:return"dependency"}},"getRelationType");t.points=t.points.filter(h=>!Number.isNaN(h.y));let n=t.points,a=ec().x(function(h){return h.x}).y(function(h){return h.y}).curve(tc),s=e.append("path").attr("d",a(n)).attr("id","edge"+N6e).attr("class","transition"),l="";if(De().state.arrowMarkerAbsolute&&(l=_p(!0)),s.attr("marker-end","url("+l+"#"+i(hu.relationType.DEPENDENCY)+"End)"),r.title!==void 0){let h=e.append("g").attr("class","stateLabel"),{x:u,y:d}=Wt.calcLabelPosition(t.points),p=ft.getRows(r.title),f=0,g=[],m=0,y=0;for(let T=0;T<=p.length;T++){let x=h.append("text").attr("text-anchor","middle").text(p[T]).attr("x",u).attr("y",d+f),k=x.node().getBBox();m=Math.max(m,k.width),y=Math.min(y,k.x),ee.info(k.x,u,d+f),f===0&&(f=x.node().getBBox().height,ee.info("Title height",f,d)),g.push(x)}let b=f*p.length;if(p.length>1){let T=(p.length-1)*f*.5;g.forEach((x,k)=>x.attr("y",d+k*f-T)),b=f*p.length}let v=h.node().getBBox();h.insert("rect",":first-child").attr("class","box").attr("x",u-m/2-De().state.padding/2).attr("y",d-b/2-De().state.padding/2-3.5).attr("width",m+De().state.padding).attr("height",b+De().state.padding),ee.info(v)}N6e++},"drawEdge"),HH={},dgt=o(function(){},"setConf"),pgt=o(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"),fgt=o(function(e,t,r,i){Co=De().state;let n=De().securityLevel,a;n==="sandbox"&&(a=tt("#i"+t));let s=n==="sandbox"?tt(a.nodes()[0].contentDocument.body):tt("body"),l=n==="sandbox"?a.nodes()[0].contentDocument:document;ee.debug("Rendering diagram "+e);let h=s.select(`[id='${t}']`);pgt(h);let u=i.db.getRootDoc(),d=h.append("g").attr("id",t+"-root");O6e(u,d,void 0,!1,s,l,i);let p=Co.padding,f=h.node().getBBox(),g=f.width+p*2,m=f.height+p*2,y=g*1.75;Ir(h,m,y,Co.useMaxWidth),h.attr("viewBox",`${f.x-Co.padding} ${f.y-Co.padding} `+g+" "+m)},"draw"),ggt=o(e=>e?e.length*Co.fontSizeFactor:1,"getLabelWidth"),O6e=o((e,t,r,i,n,a,s)=>{let l=new ln({compound:!0,multigraph:!0}),h,u=!0;for(h=0;h{let k=x.parentElement,C=0,E=0;k&&(k.parentElement&&(C=k.parentElement.getBBox().width),E=parseInt(k.getAttribute("data-x-shift"),10),Number.isNaN(E)&&(E=0)),x.setAttribute("x1",0-E+8),x.setAttribute("x2",C-E-8)})):ee.debug("No Node "+T+": "+JSON.stringify(l.node(T)))});let b=y.getBBox();l.edges().forEach(function(T){T!==void 0&&l.edge(T)!==void 0&&(ee.debug("Edge "+T.v+" -> "+T.w+": "+JSON.stringify(l.edge(T))),ugt(t,l.edge(T),l.edge(T).relation))}),b=y.getBBox();let v={id:r||"root",label:r||"root",width:0,height:0};return v.width=b.width+2*Co.padding,v.height=b.height+2*Co.padding,ee.debug("Doc rendered",v,l),v},"renderDoc"),mgt={setConf:dgt,draw:fgt},ygt={parser:B_,get db(){return new hu(1)},renderer:mgt,styles:P_,init:o(e=>{e.state||(e.state={}),e.state.arrowMarkerAbsolute=e.arrowMarkerAbsolute},"init")}});var F6e={};Kt(F6e,{diagram:()=>vgt});var vgt,z6e=Tt(()=>{YH();fo();Ws();js();po();Bs();ha();Zn();sa();ds();la();Fn();An();Or();Yr();tr();Zt();vt();vgt={parser:B_,get db(){return new hu(2)},renderer:$6e,styles:P_,init:o(e=>{e.state||(e.state={}),e.state.arrowMarkerAbsolute=e.arrowMarkerAbsolute},"init")}});var X6e={};Kt(X6e,{diagram:()=>Fgt});function H6e(e){let t=De().journey,r=t.maxLabelWidth;F_=0;let i=60;Object.keys(uu).forEach(n=>{let a=uu[n].color,s={cx:20,cy:i,r:7,fill:a,stroke:"#000",pos:uu[n].position};ST.drawCircle(e,s);let l=e.append("text").attr("visibility","hidden").text(n),h=l.node().getBoundingClientRect().width;l.remove();let u=[];if(h<=r)u=[n];else{let d=n.split(" "),p="";l=e.append("text").attr("visibility","hidden"),d.forEach(f=>{let g=p?`${p} ${f}`:f;if(l.text(g),l.node().getBoundingClientRect().width>r){if(p&&u.push(p),p=f,l.text(f),l.node().getBoundingClientRect().width>r){let m="";for(let y of f)m+=y,l.text(m+"-"),l.node().getBoundingClientRect().width>r&&(u.push(m.slice(0,-1)+"-"),m=y);p=m}}else p=g}),p&&u.push(p),l.remove()}u.forEach((d,p)=>{let f={x:40,y:i+7+p*20,fill:"#666",text:d,textMargin:t.boxTextMargin??5},g=ST.drawText(e,f).node().getBoundingClientRect().width;g>F_&&g>t.leftMargin-g&&(F_=g)}),i+=Math.max(20,u.length*20)})}var KH,bgt,ry,QH,wT,ET,xgt,Tgt,kgt,Cgt,wgt,Egt,Sgt,q6e,_gt,j6e,Agt,Rgt,JH,Lgt,U6e,V6e,$gt,Igt,ZH,Dgt,Mgt,Y6e,Ngt,ST,Ogt,uu,F_,Gl,sp,Bgt,al,XH,G6e,Pgt,W6e,Fgt,K6e=Tt(()=>{Rc();po();Yr();tr();Zt();vt();KH=(function(){var e=o(function(p,f,g,m){for(g=g||{},m=p.length;m--;g[p[m]]=f);return g},"o"),t=[6,8,10,11,12,14,16,17,18],r=[1,9],i=[1,10],n=[1,11],a=[1,12],s=[1,13],l=[1,14],h={trace:o(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:o(function(p,f,g,m,y,b,v){var T=b.length-1;switch(y){case 1:return b[T-1];case 2:this.$=[];break;case 3:b[T-1].push(b[T]),this.$=b[T-1];break;case 4:case 5:this.$=b[T];break;case 6:case 7:this.$=[];break;case 8:m.setDiagramTitle(b[T].substr(6)),this.$=b[T].substr(6);break;case 9:this.$=b[T].trim(),m.setAccTitle(this.$);break;case 10:case 11:this.$=b[T].trim(),m.setAccDescription(this.$);break;case 12:m.addSection(b[T].substr(8)),this.$=b[T].substr(8);break;case 13:m.addTask(b[T-1],b[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:i,14:n,16:a,17:s,18:l},e(t,[2,7],{1:[2,1]}),e(t,[2,3]),{9:15,11:r,12:i,14:n,16:a,17:s,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:o(function(p,f){if(f.recoverable)this.trace(p);else{var g=new Error(p);throw g.hash=f,g}},"parseError"),parse:o(function(p){var f=this,g=[0],m=[],y=[null],b=[],v=this.table,T="",x=0,k=0,C=0,E=2,w=1,_=b.slice.call(arguments,1),L=Object.create(this.lexer),N={yy:{}};for(var D in this.yy)Object.prototype.hasOwnProperty.call(this.yy,D)&&(N.yy[D]=this.yy[D]);L.setInput(p,N.yy),N.yy.lexer=L,N.yy.parser=this,typeof L.yylloc>"u"&&(L.yylloc={});var M=L.yylloc;b.push(M);var B=L.options&&L.options.ranges;typeof N.yy.parseError=="function"?this.parseError=N.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function A(se){g.length=g.length-2*se,y.length=y.length-se,b.length=b.length-se}o(A,"popStack");function I(){var se;return se=m.pop()||L.lex()||w,typeof se!="number"&&(se instanceof Array&&(m=se,se=m.pop()),se=f.symbols_[se]||se),se}o(I,"lex");for(var O,R,$,F,P,z,q={},G,W,J,H;;){if($=g[g.length-1],this.defaultActions[$]?F=this.defaultActions[$]:((O===null||typeof O>"u")&&(O=I()),F=v[$]&&v[$][O]),typeof F>"u"||!F.length||!F[0]){var Z="";H=[];for(G in v[$])this.terminals_[G]&&G>E&&H.push("'"+this.terminals_[G]+"'");L.showPosition?Z="Parse error on line "+(x+1)+`: +`+L.showPosition()+` +Expecting `+H.join(", ")+", got '"+(this.terminals_[O]||O)+"'":Z="Parse error on line "+(x+1)+": Unexpected "+(O==w?"end of input":"'"+(this.terminals_[O]||O)+"'"),this.parseError(Z,{text:L.match,token:this.terminals_[O]||O,line:L.yylineno,loc:M,expected:H})}if(F[0]instanceof Array&&F.length>1)throw new Error("Parse Error: multiple actions possible at state: "+$+", token: "+O);switch(F[0]){case 1:g.push(O),y.push(L.yytext),b.push(L.yylloc),g.push(F[1]),O=null,R?(O=R,R=null):(k=L.yyleng,T=L.yytext,x=L.yylineno,M=L.yylloc,C>0&&C--);break;case 2:if(W=this.productions_[F[1]][1],q.$=y[y.length-W],q._$={first_line:b[b.length-(W||1)].first_line,last_line:b[b.length-1].last_line,first_column:b[b.length-(W||1)].first_column,last_column:b[b.length-1].last_column},B&&(q._$.range=[b[b.length-(W||1)].range[0],b[b.length-1].range[1]]),z=this.performAction.apply(q,[T,k,x,N.yy,F[1],y,b].concat(_)),typeof z<"u")return z;W&&(g=g.slice(0,-1*W*2),y=y.slice(0,-1*W),b=b.slice(0,-1*W)),g.push(this.productions_[F[1]][0]),y.push(q.$),b.push(q._$),J=v[g[g.length-2]][g[g.length-1]],g.push(J);break;case 3:return!0}}return!0},"parse")},u=(function(){var p={EOF:1,parseError:o(function(f,g){if(this.yy.parser)this.yy.parser.parseError(f,g);else throw new Error(f)},"parseError"),setInput:o(function(f,g){return this.yy=g||this.yy||{},this._input=f,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:o(function(){var f=this._input[0];this.yytext+=f,this.yyleng++,this.offset++,this.match+=f,this.matched+=f;var g=f.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),f},"input"),unput:o(function(f){var g=f.length,m=f.split(/(?:\r\n?|\n)/g);this._input=f+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-g),this.offset-=g;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),m.length-1&&(this.yylineno-=m.length-1);var b=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:m?(m.length===y.length?this.yylloc.first_column:0)+y[y.length-m.length].length-m[0].length:this.yylloc.first_column-g},this.options.ranges&&(this.yylloc.range=[b[0],b[0]+this.yyleng-g]),this.yyleng=this.yytext.length,this},"unput"),more:o(function(){return this._more=!0,this},"more"),reject:o(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:o(function(f){this.unput(this.match.slice(f))},"less"),pastInput:o(function(){var f=this.matched.substr(0,this.matched.length-this.match.length);return(f.length>20?"...":"")+f.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:o(function(){var f=this.match;return f.length<20&&(f+=this._input.substr(0,20-f.length)),(f.substr(0,20)+(f.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:o(function(){var f=this.pastInput(),g=new Array(f.length+1).join("-");return f+this.upcomingInput()+` +`+g+"^"},"showPosition"),test_match:o(function(f,g){var m,y,b;if(this.options.backtrack_lexer&&(b={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&&(b.yylloc.range=this.yylloc.range.slice(0))),y=f[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+f[0].length},this.yytext+=f[0],this.match+=f[0],this.matches=f,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(f[0].length),this.matched+=f[0],m=this.performAction.call(this,this.yy,this,g,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),m)return m;if(this._backtrack){for(var v in b)this[v]=b[v];return!1}return!1},"test_match"),next:o(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var f,g,m,y;this._more||(this.yytext="",this.match="");for(var b=this._currentRules(),v=0;vg[0].length)){if(g=m,y=v,this.options.backtrack_lexer){if(f=this.test_match(m,b[v]),f!==!1)return f;if(this._backtrack){g=!1;continue}else return!1}else if(!this.options.flex)break}return g?(f=this.test_match(g,b[y]),f!==!1?f:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:o(function(){var f=this.next();return f||this.lex()},"lex"),begin:o(function(f){this.conditionStack.push(f)},"begin"),popState:o(function(){var f=this.conditionStack.length-1;return f>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:o(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:o(function(f){return f=this.conditionStack.length-1-Math.abs(f||0),f>=0?this.conditionStack[f]:"INITIAL"},"topState"),pushState:o(function(f){this.begin(f)},"pushState"),stateStackSize:o(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:o(function(f,g,m,y){var b=y;switch(m){case 0:break;case 1:break;case 2:return 10;case 3:break;case 4:break;case 5:return 4;case 6:return 11;case 7:return this.begin("acc_title"),12;case 8:return this.popState(),"acc_title_value";case 9:return this.begin("acc_descr"),14;case 10:return this.popState(),"acc_descr_value";case 11:this.begin("acc_descr_multiline");break;case 12:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:return 17;case 15:return 18;case 16:return 19;case 17:return":";case 18:return 6;case 19:return"INVALID"}},"anonymous"),rules:[/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:journey\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:section\s[^#:\n;]+)/i,/^(?:[^#:\n;]+)/i,/^(?::[^#\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,9,11,14,15,16,17,18,19],inclusive:!0}}};return p})();h.lexer=u;function d(){this.yy={}}return o(d,"Parser"),d.prototype=h,h.Parser=d,new d})();KH.parser=KH;bgt=KH,ry="",QH=[],wT=[],ET=[],xgt=o(function(){QH.length=0,wT.length=0,ry="",ET.length=0,ar()},"clear"),Tgt=o(function(e){ry=e,QH.push(e)},"addSection"),kgt=o(function(){return QH},"getSections"),Cgt=o(function(){let e=q6e(),t=100,r=0;for(;!e&&r{t.people&&e.push(...t.people)}),[...new Set(e)].sort()},"updateActors"),Egt=o(function(e,t){let r=t.substr(1).split(":"),i=0,n=[];r.length===1?(i=Number(r[0]),n=[]):(i=Number(r[0]),n=r[1].split(","));let a=n.map(l=>l.trim()),s={section:ry,type:ry,people:a,task:e,score:i};ET.push(s)},"addTask"),Sgt=o(function(e){let t={section:ry,type:ry,description:e,task:e,classes:[]};wT.push(t)},"addTaskOrg"),q6e=o(function(){let e=o(function(r){return ET[r].processed},"compileTask"),t=!0;for(let[r,i]of ET.entries())e(r),t=t&&i.processed;return t},"compileTasks"),_gt=o(function(){return wgt()},"getActors"),j6e={getConfig:o(()=>De().journey,"getConfig"),clear:xgt,setDiagramTitle:_r,getDiagramTitle:Cr,setAccTitle:gr,getAccTitle:xr,setAccDescription:Tr,getAccDescription:kr,addSection:Tgt,getSections:kgt,getTasks:Cgt,addTask:Egt,addTaskOrg:Sgt,getActors:_gt},Agt=o(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}`:""}; + } + ${Ac()} +`,"getStyles"),Rgt=Agt,JH=o(function(e,t){return Rf(e,t)},"drawRect"),Lgt=o(function(e,t){let r=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 n(l){let h=Jl().startAngle(Math.PI/2).endAngle(3*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);l.append("path").attr("class","mouth").attr("d",h).attr("transform","translate("+t.cx+","+(t.cy+2)+")")}o(n,"smile");function a(l){let h=Jl().startAngle(3*Math.PI/2).endAngle(5*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);l.append("path").attr("class","mouth").attr("d",h).attr("transform","translate("+t.cx+","+(t.cy+7)+")")}o(a,"sad");function s(l){l.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 o(s,"ambivalent"),t.score>3?n(i):t.score<3?a(i):s(i),r},"drawFace"),U6e=o(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"),V6e=o(function(e,t){return KTe(e,t)},"drawText"),$gt=o(function(e,t){function r(n,a,s,l,h){return n+","+a+" "+(n+s)+","+a+" "+(n+s)+","+(a+l-h)+" "+(n+s-h*1.2)+","+(a+l)+" "+n+","+(a+l)}o(r,"genPoints");let i=e.append("polygon");i.attr("points",r(t.x,t.y,50,20,7)),i.attr("class","labelBox"),t.y=t.y+t.labelMargin,t.x=t.x+.5*t.labelMargin,V6e(e,t)},"drawLabel"),Igt=o(function(e,t,r){let i=e.append("g"),n=Za();n.x=t.x,n.y=t.y,n.fill=t.fill,n.width=r.width*t.taskCount+r.diagramMarginX*(t.taskCount-1),n.height=r.height,n.class="journey-section section-type-"+t.num,n.rx=3,n.ry=3,JH(i,n),Y6e(r)(t.text,i,n.x,n.y,n.width,n.height,{class:"journey-section section-type-"+t.num},r,t.colour)},"drawSection"),ZH=-1,Dgt=o(function(e,t,r,i){let n=t.x+r.width/2,a=e.append("g");ZH++,a.append("line").attr("id",i+"-task"+ZH).attr("x1",n).attr("y1",t.y).attr("x2",n).attr("y2",450).attr("class","task-line").attr("stroke-width","1px").attr("stroke-dasharray","4 2").attr("stroke","#666"),Lgt(a,{cx:n,cy:300+(5-t.score)*30,score:t.score});let s=Za();s.x=t.x,s.y=t.y,s.fill=t.fill,s.width=r.width,s.height=r.height,s.class="task task-type-"+t.num,s.rx=3,s.ry=3,JH(a,s);let l=t.x+14;t.people.forEach(h=>{let u=t.actors[h].color,d={cx:l,cy:t.y,r:7,fill:u,stroke:"#000",title:h,pos:t.actors[h].position};U6e(a,d),l+=10}),Y6e(r)(t.task,a,s.x,s.y,s.width,s.height,{class:"task"},r,t.colour)},"drawTask"),Mgt=o(function(e,t){Ww(e,t)},"drawBackgroundRect"),Y6e=(function(){function e(n,a,s,l,h,u,d,p){let f=a.append("text").attr("x",s+h/2).attr("y",l+u/2+5).style("font-color",p).style("text-anchor","middle").text(n);i(f,d)}o(e,"byText");function t(n,a,s,l,h,u,d,p,f){let{taskFontSize:g,taskFontFamily:m}=p,y=n.split(//gi);for(let b=0;b{uu[k]={color:Gl.actorColours[y%Gl.actorColours.length],position:y},y++}),H6e(p),sp=Gl.leftMargin+F_,al.insert(0,0,sp,Object.keys(uu).length*50),Pgt(p,f,0,t);let b=al.getBounds();g&&p.append("text").text(g).attr("x",sp).attr("font-size",s).attr("font-weight","bold").attr("y",25).attr("fill",a).attr("font-family",l);let v=b.stopy-b.starty+2*Gl.diagramMarginY,T=sp+b.stopx+2*Gl.diagramMarginX;Ir(p,v,T,Gl.useMaxWidth),p.append("line").attr("x1",sp).attr("y1",Gl.height*4).attr("x2",T-sp-4).attr("y2",Gl.height*4).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#"+t+"-arrowhead)");let x=g?70:0;p.attr("viewBox",`${b.startx} -25 ${T} ${v+x}`),p.attr("preserveAspectRatio","xMinYMin meet"),p.attr("height",v+x+25)},"draw"),al={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],init:o(function(){this.sequenceItems=[],this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},this.verticalPos=0},"init"),updateVal:o(function(e,t,r,i){e[t]===void 0?e[t]=r:e[t]=i(r,e[t])},"updateVal"),updateBounds:o(function(e,t,r,i){let n=De().journey,a=this,s=0;function l(h){return o(function(u){s++;let d=a.sequenceItems.length-s+1;a.updateVal(u,"starty",t-d*n.boxMargin,Math.min),a.updateVal(u,"stopy",i+d*n.boxMargin,Math.max),a.updateVal(al.data,"startx",e-d*n.boxMargin,Math.min),a.updateVal(al.data,"stopx",r+d*n.boxMargin,Math.max),h!=="activation"&&(a.updateVal(u,"startx",e-d*n.boxMargin,Math.min),a.updateVal(u,"stopx",r+d*n.boxMargin,Math.max),a.updateVal(al.data,"starty",t-d*n.boxMargin,Math.min),a.updateVal(al.data,"stopy",i+d*n.boxMargin,Math.max))},"updateItemBounds")}o(l,"updateFn"),this.sequenceItems.forEach(l())},"updateBounds"),insert:o(function(e,t,r,i){let n=Math.min(e,r),a=Math.max(e,r),s=Math.min(t,i),l=Math.max(t,i);this.updateVal(al.data,"startx",n,Math.min),this.updateVal(al.data,"starty",s,Math.min),this.updateVal(al.data,"stopx",a,Math.max),this.updateVal(al.data,"stopy",l,Math.max),this.updateBounds(n,s,a,l)},"insert"),bumpVerticalPos:o(function(e){this.verticalPos=this.verticalPos+e,this.data.stopy=this.verticalPos},"bumpVerticalPos"),getVerticalPos:o(function(){return this.verticalPos},"getVerticalPos"),getBounds:o(function(){return this.data},"getBounds")},XH=Gl.sectionFills,G6e=Gl.sectionColours,Pgt=o(function(e,t,r,i){let n=De().journey,a="",s=n.height*2+n.diagramMarginY,l=r+s,h=0,u="#CCC",d="black",p=0;for(let[f,g]of t.entries()){if(a!==g.section){u=XH[h%XH.length],p=h%XH.length,d=G6e[h%G6e.length];let y=0,b=g.section;for(let T=f;T(uu[b]&&(y[b]=uu[b]),y),{});g.x=f*n.taskMargin+f*n.width+sp,g.y=l,g.width=n.diagramMarginX,g.height=n.diagramMarginY,g.colour=d,g.fill=u,g.num=p,g.actors=m,ST.drawTask(e,g,n,i),al.insert(g.x,g.y,g.x+g.width+n.taskMargin,450)}},"drawTasks"),W6e={setConf:Ogt,draw:Bgt},Fgt={parser:bgt,db:j6e,renderer:W6e,styles:Rgt,init:o(e=>{W6e.setConf(e.journey),j6e.clear()},"init")}});var x_e={};Kt(x_e,{diagram:()=>p0t});function aX(e,t){e.each(function(){var r=tt(this),i=r.text().split(/(\s+|
    )/).reverse(),n,a=[],s=1.1,l=r.attr("y"),h=parseFloat(r.attr("dy")),u=r.text(null).append("tspan").attr("x",0).attr("y",l).attr("dy",h+"em");for(let d=0;dt||n==="
    ")&&(a.pop(),u.text(a.join(" ").trim()),n==="
    "?a=[""]:a=[n],u=r.append("tspan").attr("x",0).attr("y",l).attr("dy",s+"em").text(n))})}var eX,zgt,r_e,iy,i_e,rX,iX,z_,ny,n_e,a_e,s_e,o_e,l_e,c_e,h_e,u_e,d_e,p_e,Z6e,qgt,f_e,q_,jgt,Ggt,g_e,Wgt,Ugt,tX,Vgt,Ygt,Hgt,nX,m_e,Xgt,Kgt,Zgt,Qgt,Js,Jgt,Q6e,e0t,t0t,j_,du,r0t,sX,i0t,y_e,n0t,J6e,v_e,e_e,b_e,a0t,t_e,s0t,o0t,l0t,c0t,h0t,u0t,d0t,p0t,T_e=Tt(()=>{yn();Or();Yr();tr();Zt();vt();eX=(function(){var e=o(function(f,g,m,y){for(m=m||{},y=f.length;y--;m[f[y]]=g);return m},"o"),t=[6,11,13,14,15,17,19,20,23,24],r=[1,12],i=[1,13],n=[1,14],a=[1,15],s=[1,16],l=[1,19],h=[1,20],u={trace:o(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:o(function(f,g,m,y,b,v,T){var x=v.length-1;switch(b){case 1:return v[x-1];case 3:y.setDirection("LR");break;case 4:y.setDirection("TD");break;case 5:this.$=[];break;case 6:v[x-1].push(v[x]),this.$=v[x-1];break;case 7:case 8:this.$=v[x];break;case 9:case 10:this.$=[];break;case 11:y.getCommonDb().setDiagramTitle(v[x].substr(6)),this.$=v[x].substr(6);break;case 12:this.$=v[x].trim(),y.getCommonDb().setAccTitle(this.$);break;case 13:case 14:this.$=v[x].trim(),y.getCommonDb().setAccDescription(this.$);break;case 15:y.addSection(v[x].substr(8)),this.$=v[x].substr(8);break;case 18:y.addTask(v[x],0,""),this.$=v[x];break;case 19:y.addEvent(v[x].substr(2)),this.$=v[x];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:i,17:n,19:a,20:s,21:17,22:18,23:l,24:h},e(t,[2,10],{1:[2,1]}),e(t,[2,6]),{12:21,14:r,15:i,17:n,19:a,20:s,21:17,22:18,23:l,24:h},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:o(function(f,g){if(g.recoverable)this.trace(f);else{var m=new Error(f);throw m.hash=g,m}},"parseError"),parse:o(function(f){var g=this,m=[0],y=[],b=[null],v=[],T=this.table,x="",k=0,C=0,E=0,w=2,_=1,L=v.slice.call(arguments,1),N=Object.create(this.lexer),D={yy:{}};for(var M in this.yy)Object.prototype.hasOwnProperty.call(this.yy,M)&&(D.yy[M]=this.yy[M]);N.setInput(f,D.yy),D.yy.lexer=N,D.yy.parser=this,typeof N.yylloc>"u"&&(N.yylloc={});var B=N.yylloc;v.push(B);var A=N.options&&N.options.ranges;typeof D.yy.parseError=="function"?this.parseError=D.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function I(Q){m.length=m.length-2*Q,b.length=b.length-Q,v.length=v.length-Q}o(I,"popStack");function O(){var Q;return Q=y.pop()||N.lex()||_,typeof Q!="number"&&(Q instanceof Array&&(y=Q,Q=y.pop()),Q=g.symbols_[Q]||Q),Q}o(O,"lex");for(var R,$,F,P,z,q,G={},W,J,H,Z;;){if(F=m[m.length-1],this.defaultActions[F]?P=this.defaultActions[F]:((R===null||typeof R>"u")&&(R=O()),P=T[F]&&T[F][R]),typeof P>"u"||!P.length||!P[0]){var se="";Z=[];for(W in T[F])this.terminals_[W]&&W>w&&Z.push("'"+this.terminals_[W]+"'");N.showPosition?se="Parse error on line "+(k+1)+`: +`+N.showPosition()+` +Expecting `+Z.join(", ")+", got '"+(this.terminals_[R]||R)+"'":se="Parse error on line "+(k+1)+": Unexpected "+(R==_?"end of input":"'"+(this.terminals_[R]||R)+"'"),this.parseError(se,{text:N.match,token:this.terminals_[R]||R,line:N.yylineno,loc:B,expected:Z})}if(P[0]instanceof Array&&P.length>1)throw new Error("Parse Error: multiple actions possible at state: "+F+", token: "+R);switch(P[0]){case 1:m.push(R),b.push(N.yytext),v.push(N.yylloc),m.push(P[1]),R=null,$?(R=$,$=null):(C=N.yyleng,x=N.yytext,k=N.yylineno,B=N.yylloc,E>0&&E--);break;case 2:if(J=this.productions_[P[1]][1],G.$=b[b.length-J],G._$={first_line:v[v.length-(J||1)].first_line,last_line:v[v.length-1].last_line,first_column:v[v.length-(J||1)].first_column,last_column:v[v.length-1].last_column},A&&(G._$.range=[v[v.length-(J||1)].range[0],v[v.length-1].range[1]]),q=this.performAction.apply(G,[x,C,k,D.yy,P[1],b,v].concat(L)),typeof q<"u")return q;J&&(m=m.slice(0,-1*J*2),b=b.slice(0,-1*J),v=v.slice(0,-1*J)),m.push(this.productions_[P[1]][0]),b.push(G.$),v.push(G._$),H=T[m[m.length-2]][m[m.length-1]],m.push(H);break;case 3:return!0}}return!0},"parse")},d=(function(){var f={EOF:1,parseError:o(function(g,m){if(this.yy.parser)this.yy.parser.parseError(g,m);else throw new Error(g)},"parseError"),setInput:o(function(g,m){return this.yy=m||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:o(function(){var g=this._input[0];this.yytext+=g,this.yyleng++,this.offset++,this.match+=g,this.matched+=g;var m=g.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),g},"input"),unput:o(function(g){var m=g.length,y=g.split(/(?:\r\n?|\n)/g);this._input=g+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-m),this.offset-=m;var b=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),y.length-1&&(this.yylineno-=y.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:y?(y.length===b.length?this.yylloc.first_column:0)+b[b.length-y.length].length-y[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:o(function(){return this._more=!0,this},"more"),reject:o(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:o(function(g){this.unput(this.match.slice(g))},"less"),pastInput:o(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:o(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:o(function(){var g=this.pastInput(),m=new Array(g.length+1).join("-");return g+this.upcomingInput()+` +`+m+"^"},"showPosition"),test_match:o(function(g,m){var y,b,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))),b=g[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+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],y=this.performAction.call(this,this.yy,this,m,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),y)return y;if(this._backtrack){for(var T in v)this[T]=v[T];return!1}return!1},"test_match"),next:o(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var g,m,y,b;this._more||(this.yytext="",this.match="");for(var v=this._currentRules(),T=0;Tm[0].length)){if(m=y,b=T,this.options.backtrack_lexer){if(g=this.test_match(y,v[T]),g!==!1)return g;if(this._backtrack){m=!1;continue}else return!1}else if(!this.options.flex)break}return m?(g=this.test_match(m,v[b]),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:o(function(){var g=this.next();return g||this.lex()},"lex"),begin:o(function(g){this.conditionStack.push(g)},"begin"),popState:o(function(){var g=this.conditionStack.length-1;return g>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:o(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:o(function(g){return g=this.conditionStack.length-1-Math.abs(g||0),g>=0?this.conditionStack[g]:"INITIAL"},"topState"),pushState:o(function(g){this.begin(g)},"pushState"),stateStackSize:o(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:o(function(g,m,y,b){var v=b;switch(y){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;case 10:return this.popState(),"acc_title_value";case 11:return this.begin("acc_descr"),17;case 12:return this.popState(),"acc_descr_value";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 f})();u.lexer=d;function p(){this.yy={}}return o(p,"Parser"),p.prototype=u,u.Parser=p,new p})();eX.parser=eX;zgt=eX,r_e={};yu(r_e,{addEvent:()=>d_e,addSection:()=>l_e,addTask:()=>u_e,addTaskOrg:()=>p_e,clear:()=>a_e,default:()=>qgt,getCommonDb:()=>n_e,getDirection:()=>o_e,getSections:()=>c_e,getTasks:()=>h_e,setDirection:()=>s_e});iy="",i_e=0,rX="LR",iX=[],z_=[],ny=[],n_e=o(()=>Mk,"getCommonDb"),a_e=o(function(){iX.length=0,z_.length=0,iy="",ny.length=0,rX="LR",ar()},"clear"),s_e=o(function(e){rX=e},"setDirection"),o_e=o(function(){return rX},"getDirection"),l_e=o(function(e){iy=e,iX.push(e)},"addSection"),c_e=o(function(){return iX},"getSections"),h_e=o(function(){let e=Z6e(),t=100,r=0;for(;!e&&rt.id===i_e-1).events.push(e)},"addEvent"),p_e=o(function(e){let t={section:iy,type:iy,description:e,task:e,classes:[]};z_.push(t)},"addTaskOrg"),Z6e=o(function(){let e=o(function(r){return ny[r].processed},"compileTask"),t=!0;for(let[r,i]of ny.entries())e(r),t=t&&i.processed;return t},"compileTasks"),qgt={clear:a_e,getCommonDb:n_e,getDirection:o_e,setDirection:s_e,addSection:l_e,getSections:c_e,getTasks:h_e,addTask:u_e,addTaskOrg:p_e,addEvent:d_e},f_e=0,q_=o(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"),jgt=o(function(e,t){let r=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 n(l){let h=Jl().startAngle(Math.PI/2).endAngle(3*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);l.append("path").attr("class","mouth").attr("d",h).attr("transform","translate("+t.cx+","+(t.cy+2)+")")}o(n,"smile");function a(l){let h=Jl().startAngle(3*Math.PI/2).endAngle(5*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);l.append("path").attr("class","mouth").attr("d",h).attr("transform","translate("+t.cx+","+(t.cy+7)+")")}o(a,"sad");function s(l){l.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 o(s,"ambivalent"),t.score>3?n(i):t.score<3?a(i):s(i),r},"drawFace"),Ggt=o(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"),g_e=o(function(e,t){let r=t.text.replace(//gi," "),i=e.append("text");i.attr("x",t.x),i.attr("y",t.y),i.attr("class","legend"),i.style("text-anchor",t.anchor),t.class!==void 0&&i.attr("class",t.class);let n=i.append("tspan");return n.attr("x",t.x+t.textMargin*2),n.text(r),i},"drawText"),Wgt=o(function(e,t){function r(n,a,s,l,h){return n+","+a+" "+(n+s)+","+a+" "+(n+s)+","+(a+l-h)+" "+(n+s-h*1.2)+","+(a+l)+" "+n+","+(a+l)}o(r,"genPoints");let i=e.append("polygon");i.attr("points",r(t.x,t.y,50,20,7)),i.attr("class","labelBox"),t.y=t.y+t.labelMargin,t.x=t.x+.5*t.labelMargin,g_e(e,t)},"drawLabel"),Ugt=o(function(e,t,r){let i=e.append("g"),n=nX();n.x=t.x,n.y=t.y,n.fill=t.fill,n.width=r.width,n.height=r.height,n.class="journey-section section-type-"+t.num,n.rx=3,n.ry=3,q_(i,n),m_e(r)(t.text,i,n.x,n.y,n.width,n.height,{class:"journey-section section-type-"+t.num},r,t.colour)},"drawSection"),tX=-1,Vgt=o(function(e,t,r,i){let n=t.x+r.width/2,a=e.append("g");tX++,a.append("line").attr("id",i+"-task"+tX).attr("x1",n).attr("y1",t.y).attr("x2",n).attr("y2",450).attr("class","task-line").attr("stroke-width","1px").attr("stroke-dasharray","4 2").attr("stroke","#666"),jgt(a,{cx:n,cy:300+(5-t.score)*30,score:t.score});let s=nX();s.x=t.x,s.y=t.y,s.fill=t.fill,s.width=r.width,s.height=r.height,s.class="task task-type-"+t.num,s.rx=3,s.ry=3,q_(a,s),m_e(r)(t.task,a,s.x,s.y,s.width,s.height,{class:"task"},r,t.colour)},"drawTask"),Ygt=o(function(e,t){q_(e,{x:t.startx,y:t.starty,width:t.stopx-t.startx,height:t.stopy-t.starty,fill:t.fill,class:"rect"}).lower()},"drawBackgroundRect"),Hgt=o(function(){return{x:0,y:0,fill:void 0,"text-anchor":"start",width:100,height:100,textMargin:0,rx:0,ry:0}},"getTextObj"),nX=o(function(){return{x:0,y:0,width:100,anchor:"start",height:100,rx:0,ry:0}},"getNoteRect"),m_e=(function(){function e(n,a,s,l,h,u,d,p){let f=a.append("text").attr("x",s+h/2).attr("y",l+u/2+5).style("font-color",p).style("text-anchor","middle").text(n);i(f,d)}o(e,"byText");function t(n,a,s,l,h,u,d,p,f){let{taskFontSize:g,taskFontFamily:m}=p,y=n.split(//gi);for(let b=0;b0?`M0 ${t.height-l} v${-t.height+2*l} q0,-${s},${s},-${s} h${t.width-2*l} q${s},0,${s},${s} 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",i+"-node-"+f_e++).attr("class","node-bkg node-"+t.type).attr("d",h),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"),Js={drawRect:q_,drawCircle:Ggt,drawSection:Ugt,drawText:g_e,drawLabel:Wgt,drawTask:Vgt,drawBackgroundRect:Ygt,getTextObj:Hgt,getNoteRect:nX,initGraphics:Xgt,drawNode:Kgt,getVirtualNodeHeight:Zgt},Jgt=o(function(e,t,r,i){let n=De(),{look:a,theme:s,themeVariables:l}=n,{useGradient:h,gradientStart:u,gradientStop:d}=l,p=n.timeline?.leftMargin??50;ee.debug("timeline",i.db);let f=n.securityLevel,g;f==="sandbox"&&(g=tt("#i"+t));let m=(f==="sandbox"?tt(g.nodes()[0].contentDocument.body):tt("body")).select("#"+t);m.append("g");let y=i.db.getTasks(),b=i.db.getCommonDb().getDiagramTitle();ee.debug("task",y),Js.initGraphics(m,t);let v=i.db.getSections();ee.debug("sections",v);let T=0,x=0,k=0,C=0,E=50+p,w=50;C=50;let _=0,L=!0;v.forEach(function(B){let A={number:_,descr:B,section:_,width:150,padding:20,maxHeight:T},I=Js.getVirtualNodeHeight(m,A,n);ee.debug("sectionHeight before draw",I),T=Math.max(T,I+20)});let N=0,D=0;ee.debug("tasks.length",y.length);for(let[B,A]of y.entries()){let I={number:B,descr:A,section:A.section,width:150,padding:20,maxHeight:x},O=Js.getVirtualNodeHeight(m,I,n);ee.debug("taskHeight before draw",O),x=Math.max(x,O+20),N=Math.max(N,A.events.length);let R=0;for(let $ of A.events){let F={descr:$,section:A.section,number:A.section,width:150,padding:20,maxHeight:50};R+=Js.getVirtualNodeHeight(m,F,n)}A.events.length>0&&(R+=(A.events.length-1)*10),D=Math.max(D,R)}ee.debug("maxSectionHeight before draw",T),ee.debug("maxTaskHeight before draw",x),v&&v.length>0?v.forEach(B=>{let A=y.filter($=>$.section===B),I={number:_,descr:B,section:_,width:200*Math.max(A.length,1)-50,padding:20,maxHeight:T};ee.debug("sectionNode",I);let O=m.append("g"),R=Js.drawNode(O,I,_,n,t);ee.debug("sectionNode output",R),O.attr("transform",`translate(${E}, ${C})`),w+=T+50,A.length>0&&Q6e(m,A,_,E,w,x,n,N,D,T,!1,t),E+=200*Math.max(A.length,1),w=C,_++}):(L=!1,Q6e(m,y,_,E,w,x,n,N,D,T,!0,t));let M=m.node().getBBox();if(ee.debug("bounds",M),b&&m.append("text").text(b).attr("x",a==="neo"?M.x*2+p:M.width/2-p).attr("font-size","4ex").attr("font-weight","bold").attr("y",20),k=L?T+x+150:x+100,m.append("g").attr("class","lineWrapper").append("line").attr("x1",p).attr("y1",k).attr("x2",M.width+3*p).attr("y2",k).attr("stroke-width",4).attr("stroke","black").attr("marker-end",`url(#${t}-arrowhead)`),a==="neo"&&h&&s!=="neutral"){let B=m.select("defs"),A=(B.empty()?m.append("defs"):B).append("linearGradient").attr("id",m.attr("id")+"-gradient").attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");A.append("stop").attr("offset","0%").attr("stop-color",u).attr("stop-opacity",1),A.append("stop").attr("offset","100%").attr("stop-color",d).attr("stop-opacity",1)}hc(void 0,m,n.timeline?.padding??50,n.timeline?.useMaxWidth??!1)},"draw"),Q6e=o(function(e,t,r,i,n,a,s,l,h,u,d,p){for(let f of t){let g={descr:f.task,section:r,number:r,width:150,padding:20,maxHeight:a};ee.debug("taskNode",g);let m=e.append("g").attr("class","taskWrapper"),y=Js.drawNode(m,g,r,s,p).height;if(ee.debug("taskHeight after draw",y),m.attr("transform",`translate(${i}, ${n})`),a=Math.max(a,y),f.events){let b=e.append("g").attr("class","lineWrapper"),v=a;n+=100,v=v+e0t(e,f.events,r,i,n,s,p),n-=100,b.append("line").attr("x1",i+190/2).attr("y1",n+a).attr("x2",i+190/2).attr("y2",n+a+100+h+100).attr("stroke-width",2).attr("stroke","black").attr("marker-end",`url(#${p}-arrowhead)`).attr("stroke-dasharray","5,5")}i=i+200,d&&!s.timeline?.disableMulticolor&&r++}n=n-10},"drawTasks"),e0t=o(function(e,t,r,i,n,a,s){let l=0,h=n;n=n+100;for(let u of t){let d={descr:u,section:r,number:r,width:150,padding:20,maxHeight:50};ee.debug("eventNode",d);let p=e.append("g").attr("class","eventWrapper"),f=Js.drawNode(p,d,r,a,s,!0).height;l=l+f,p.attr("transform",`translate(${i}, ${n})`),n=n+10+f}return n=h,l},"drawEvents"),t0t={setConf:o(()=>{},"setConf"),draw:Jgt},j_=200,du=5,r0t=j_+du*2,sX=j_+100,i0t=sX+du*2,y_e=10,n0t=0,J6e=20,v_e=20,e_e=30,b_e=50,a0t=o(function(e,t,r,i){let n=De(),a=n.timeline?.leftMargin??50;ee.debug("timeline",i.db);let s=oi(t);s.append("g");let l=i.db.getTasks(),h=i.db.getCommonDb().getDiagramTitle();ee.debug("task",l),Js.initGraphics(s);let u=i.db.getSections();ee.debug("sections",u);let d=0,p=0,f=50+a,g=50,m=g,y=f,b=r0t+v_e,v=i0t+b_e,T=y+b,x=0,k=u&&u.length>0,C=k?T:f+b,E=Math.max(50,b+v-du*2);u.forEach(function(A){let I={number:x,descr:A,section:x,width:E,padding:du,maxHeight:d},O=Js.getVirtualNodeHeight(s,I,n);ee.debug("sectionHeight before draw",O),d=Math.max(d,O)});let w=0;ee.debug("tasks.length",l.length);for(let[A,I]of l.entries()){let O={number:A,descr:I,section:I.section,width:j_,padding:du,maxHeight:p},R=Js.getVirtualNodeHeight(s,O,n);ee.debug("taskHeight before draw",R),p=Math.max(p,R);let $=0;for(let F of I.events){let P={descr:F,section:I.section,number:I.section,width:sX,padding:du,maxHeight:50};$+=Js.getVirtualNodeHeight(s,P,n)}I.events.length>0&&($+=(I.events.length-1)*y_e),w=Math.max(w,$)+n0t}ee.debug("maxSectionHeight before draw",d),ee.debug("maxTaskHeight before draw",p);let _=Math.max(p,w)+e_e;k?u.forEach(A=>{let I=l.filter(G=>G.section===A),O={number:x,descr:A,section:x,width:E,padding:du,maxHeight:d};ee.debug("sectionNode",O);let R=s.append("g"),$=Js.drawNode(R,O,x,n);ee.debug("sectionNode output",$);let F=C-b;R.attr("transform",`translate(${F}, ${g})`);let P=g+$.height+J6e;I.length>0&&t_e(s,I,x,C,P,p,n,_,!1);let z=I.length,q=$.height+J6e+_*Math.max(z,1)-(z>0?e_e*2:0);g+=q,x++}):t_e(s,l,x,C,g,p,n,_,!0);let L=s.node()?.getBBox();if(!L)throw new Error("bbox not found");if(ee.debug("bounds",L),h){if(s.append("text").text(h).attr("x",L.width/2-a).attr("font-size","4ex").attr("font-weight","bold").attr("y",20),L=s.node()?.getBBox(),!L)throw new Error("bbox not found");ee.debug("bounds after title",L)}let[N]=Os(n.fontSize),D=(N??16)*2,M=(N??16)*.5+20,B=s.append("g").attr("class","lineWrapper");B.append("line").attr("x1",C).attr("y1",m-D).attr("x2",C).attr("y2",L.y+L.height+M).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#arrowhead)"),B.lower(),hc(void 0,s,n.timeline?.padding??50,n.timeline?.useMaxWidth??!1)},"draw"),t_e=o(function(e,t,r,i,n,a,s,l,h){for(let u of t){let d={descr:u.task,section:r,number:r,width:j_,padding:du,maxHeight:a};ee.debug("taskNode",d);let p=e.append("g").attr("class","taskWrapper"),f=Js.drawNode(p,d,r,s),g=f.height;ee.debug("taskHeight after draw",g);let m=i-v_e-f.width;if(p.attr("transform",`translate(${m}, ${n})`),a=Math.max(a,g),u.events&&u.events.length>0){let y=n,b=i+b_e;s0t(e,u.events,r,i,b,y,s)}n=n+l,h&&!s.timeline?.disableMulticolor&&r++}},"drawTasks"),s0t=o(function(e,t,r,i,n,a,s){let l=a;for(let h of t){let u={descr:h,section:r,number:r,width:sX,padding:du,maxHeight:0};ee.debug("eventNode",u);let d=e.append("g").attr("class","eventWrapper"),p=Js.drawNode(d,u,r,s).height;d.attr("transform",`translate(${n}, ${l})`);let f=e.append("g").attr("class","lineWrapper"),g=l+p/2;f.append("line").attr("x1",i).attr("y1",g).attr("x2",n).attr("y2",g).attr("stroke-width",2).attr("stroke","black").attr("marker-end","url(#arrowhead)").attr("stroke-dasharray","5,5"),l=l+p+y_e}return l-a},"drawEvents"),o0t={setConf:o(()=>{},"setConf"),draw:a0t},l0t=o(e=>{let{theme:t}=Rt(),r=t?.includes("dark"),i=t?.includes("color"),n=e.svgId?.replace(/^#/,"")??"",a=n?`url(#${n}-drop-shadow)`:e.dropShadow??"none",s="";for(let l=0;l{let t="";for(let r=0;r{let{theme:t}=Rt(),r=t?.includes("redux"),i=t==="neutral",n=e.svgId?.replace(/^#/,"")??"",a="";if(e.useGradient&&n&&e.THEME_COLOR_LIMIT&&!i)for(let s=0;s{},"setConf"),draw:o((e,t,r,i)=>(i?.db?.getDirection?.()??"LR")==="TD"?o0t.draw(e,t,r,i):t0t.draw(e,t,r,i),"draw")},p0t={db:r_e,renderer:d0t,parser:zgt,styles:u0t}});var S_e={};Kt(S_e,{diagram:()=>E0t});function k_e(e,t=0){return(Ba[e[t+0]]+Ba[e[t+1]]+Ba[e[t+2]]+Ba[e[t+3]]+"-"+Ba[e[t+4]]+Ba[e[t+5]]+"-"+Ba[e[t+6]]+Ba[e[t+7]]+"-"+Ba[e[t+8]]+Ba[e[t+9]]+"-"+Ba[e[t+10]]+Ba[e[t+11]]+Ba[e[t+12]]+Ba[e[t+13]]+Ba[e[t+14]]+Ba[e[t+15]]).toLowerCase()}function C_e(){return crypto.getRandomValues(g0t)}function w_e(e,t,r){return!t&&!e&&crypto.randomUUID?crypto.randomUUID():E_e(e,t,r)}function E_e(e,t,r){e=e||{};let i=e.random??e.rng?.()??C_e();if(i.length<16)throw new Error("Random bytes length must be >= 16");if(i[6]=i[6]&15|64,i[8]=i[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 n=0;n<16;++n)t[r+n]=i[n];return t}return k_e(i)}var oX,f0t,Ba,g0t,m0t,y0t,pu,v0t,b0t,x0t,T0t,k0t,C0t,w0t,E0t,__e=Tt(()=>{fo();Ws();js();Bs();ha();Zn();sa();ds();la();Fn();An();Or();Yr();tr();Zt();vt();oX=(function(){var e=o(function(k,C,E,w){for(E=E||{},w=k.length;w--;E[k[w]]=C);return E},"o"),t=[1,4],r=[1,13],i=[1,12],n=[1,15],a=[1,16],s=[1,20],l=[1,19],h=[6,7,8],u=[1,26],d=[1,24],p=[1,25],f=[6,7,11],g=[1,6,13,15,16,19,22],m=[1,33],y=[1,34],b=[1,6,7,11,13,15,16,19,22],v={trace:o(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:o(function(k,C,E,w,_,L,N){var D=L.length-1;switch(_){case 6:case 7:return w;case 8:w.getLogger().trace("Stop NL ");break;case 9:w.getLogger().trace("Stop EOF ");break;case 11:w.getLogger().trace("Stop NL2 ");break;case 12:w.getLogger().trace("Stop EOF2 ");break;case 15:w.getLogger().info("Node: ",L[D].id),w.addNode(L[D-1].length,L[D].id,L[D].descr,L[D].type);break;case 16:w.getLogger().trace("Icon: ",L[D]),w.decorateNode({icon:L[D]});break;case 17:case 21:w.decorateNode({class:L[D]});break;case 18:w.getLogger().trace("SPACELIST");break;case 19:w.getLogger().trace("Node: ",L[D].id),w.addNode(0,L[D].id,L[D].descr,L[D].type);break;case 20:w.decorateNode({icon:L[D]});break;case 25:w.getLogger().trace("node found ..",L[D-2]),this.$={id:L[D-1],descr:L[D-1],type:w.getType(L[D-2],L[D])};break;case 26:this.$={id:L[D],descr:L[D],type:w.nodeType.DEFAULT};break;case 27:w.getLogger().trace("node found ..",L[D-3]),this.$={id:L[D-3],descr:L[D-1],type:w.getType(L[D-2],L[D])};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:i,14:14,15:n,16:a,17:17,18:18,19:s,22:l},e(h,[2,3]),{1:[2,2]},e(h,[2,4]),e(h,[2,5]),{1:[2,6],6:r,12:21,13:i,14:14,15:n,16:a,17:17,18:18,19:s,22:l},{6:r,9:22,12:11,13:i,14:14,15:n,16:a,17:17,18:18,19:s,22:l},{6:u,7:d,10:23,11:p},e(f,[2,22],{17:17,18:18,14:27,15:[1,28],16:[1,29],19:s,22:l}),e(f,[2,18]),e(f,[2,19]),e(f,[2,20]),e(f,[2,21]),e(f,[2,23]),e(f,[2,24]),e(f,[2,26],{19:[1,30]}),{20:[1,31]},{6:u,7:d,10:32,11:p},{1:[2,7],6:r,12:21,13:i,14:14,15:n,16:a,17:17,18:18,19:s,22:l},e(g,[2,14],{7:m,11:y}),e(b,[2,8]),e(b,[2,9]),e(b,[2,10]),e(f,[2,15]),e(f,[2,16]),e(f,[2,17]),{20:[1,35]},{21:[1,36]},e(g,[2,13],{7:m,11:y}),e(b,[2,11]),e(b,[2,12]),{21:[1,37]},e(f,[2,25]),e(f,[2,27])],defaultActions:{2:[2,1],6:[2,2]},parseError:o(function(k,C){if(C.recoverable)this.trace(k);else{var E=new Error(k);throw E.hash=C,E}},"parseError"),parse:o(function(k){var C=this,E=[0],w=[],_=[null],L=[],N=this.table,D="",M=0,B=0,A=0,I=2,O=1,R=L.slice.call(arguments,1),$=Object.create(this.lexer),F={yy:{}};for(var P in this.yy)Object.prototype.hasOwnProperty.call(this.yy,P)&&(F.yy[P]=this.yy[P]);$.setInput(k,F.yy),F.yy.lexer=$,F.yy.parser=this,typeof $.yylloc>"u"&&($.yylloc={});var z=$.yylloc;L.push(z);var q=$.options&&$.options.ranges;typeof F.yy.parseError=="function"?this.parseError=F.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function G(we){E.length=E.length-2*we,_.length=_.length-we,L.length=L.length-we}o(G,"popStack");function W(){var we;return we=w.pop()||$.lex()||O,typeof we!="number"&&(we instanceof Array&&(w=we,we=w.pop()),we=C.symbols_[we]||we),we}o(W,"lex");for(var J,H,Z,se,Q,te,re={},ne,Ae,ie,me;;){if(Z=E[E.length-1],this.defaultActions[Z]?se=this.defaultActions[Z]:((J===null||typeof J>"u")&&(J=W()),se=N[Z]&&N[Z][J]),typeof se>"u"||!se.length||!se[0]){var oe="";me=[];for(ne in N[Z])this.terminals_[ne]&&ne>I&&me.push("'"+this.terminals_[ne]+"'");$.showPosition?oe="Parse error on line "+(M+1)+`: +`+$.showPosition()+` +Expecting `+me.join(", ")+", got '"+(this.terminals_[J]||J)+"'":oe="Parse error on line "+(M+1)+": Unexpected "+(J==O?"end of input":"'"+(this.terminals_[J]||J)+"'"),this.parseError(oe,{text:$.match,token:this.terminals_[J]||J,line:$.yylineno,loc:z,expected:me})}if(se[0]instanceof Array&&se.length>1)throw new Error("Parse Error: multiple actions possible at state: "+Z+", token: "+J);switch(se[0]){case 1:E.push(J),_.push($.yytext),L.push($.yylloc),E.push(se[1]),J=null,H?(J=H,H=null):(B=$.yyleng,D=$.yytext,M=$.yylineno,z=$.yylloc,A>0&&A--);break;case 2:if(Ae=this.productions_[se[1]][1],re.$=_[_.length-Ae],re._$={first_line:L[L.length-(Ae||1)].first_line,last_line:L[L.length-1].last_line,first_column:L[L.length-(Ae||1)].first_column,last_column:L[L.length-1].last_column},q&&(re._$.range=[L[L.length-(Ae||1)].range[0],L[L.length-1].range[1]]),te=this.performAction.apply(re,[D,B,M,F.yy,se[1],_,L].concat(R)),typeof te<"u")return te;Ae&&(E=E.slice(0,-1*Ae*2),_=_.slice(0,-1*Ae),L=L.slice(0,-1*Ae)),E.push(this.productions_[se[1]][0]),_.push(re.$),L.push(re._$),ie=N[E[E.length-2]][E[E.length-1]],E.push(ie);break;case 3:return!0}}return!0},"parse")},T=(function(){var k={EOF:1,parseError:o(function(C,E){if(this.yy.parser)this.yy.parser.parseError(C,E);else throw new Error(C)},"parseError"),setInput:o(function(C,E){return this.yy=E||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:o(function(){var C=this._input[0];this.yytext+=C,this.yyleng++,this.offset++,this.match+=C,this.matched+=C;var E=C.match(/(?:\r\n?|\n).*/g);return E?(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:o(function(C){var E=C.length,w=C.split(/(?:\r\n?|\n)/g);this._input=C+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-E),this.offset-=E;var _=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),w.length-1&&(this.yylineno-=w.length-1);var L=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===_.length?this.yylloc.first_column:0)+_[_.length-w.length].length-w[0].length:this.yylloc.first_column-E},this.options.ranges&&(this.yylloc.range=[L[0],L[0]+this.yyleng-E]),this.yyleng=this.yytext.length,this},"unput"),more:o(function(){return this._more=!0,this},"more"),reject:o(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:o(function(C){this.unput(this.match.slice(C))},"less"),pastInput:o(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:o(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:o(function(){var C=this.pastInput(),E=new Array(C.length+1).join("-");return C+this.upcomingInput()+` +`+E+"^"},"showPosition"),test_match:o(function(C,E){var w,_,L;if(this.options.backtrack_lexer&&(L={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&&(L.yylloc.range=this.yylloc.range.slice(0))),_=C[0].match(/(?:\r\n?|\n).*/g),_&&(this.yylineno+=_.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:_?_[_.length-1].length-_[_.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+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],w=this.performAction.call(this,this.yy,this,E,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),w)return w;if(this._backtrack){for(var N in L)this[N]=L[N];return!1}return!1},"test_match"),next:o(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var C,E,w,_;this._more||(this.yytext="",this.match="");for(var L=this._currentRules(),N=0;NE[0].length)){if(E=w,_=N,this.options.backtrack_lexer){if(C=this.test_match(w,L[N]),C!==!1)return C;if(this._backtrack){E=!1;continue}else return!1}else if(!this.options.flex)break}return E?(C=this.test_match(E,L[_]),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:o(function(){var C=this.next();return C||this.lex()},"lex"),begin:o(function(C){this.conditionStack.push(C)},"begin"),popState:o(function(){var C=this.conditionStack.length-1;return C>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:o(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:o(function(C){return C=this.conditionStack.length-1-Math.abs(C||0),C>=0?this.conditionStack[C]:"INITIAL"},"topState"),pushState:o(function(C){this.begin(C)},"pushState"),stateStackSize:o(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:o(function(C,E,w,_){var L=_;switch(w){case 0:return C.getLogger().trace("Found comment",E.yytext),6;case 1:return 8;case 2:this.begin("CLASS");break;case 3:return this.popState(),16;case 4:this.popState();break;case 5:C.getLogger().trace("Begin icon"),this.begin("ICON");break;case 6:return C.getLogger().trace("SPACELINE"),6;case 7:return 7;case 8:return 15;case 9:C.getLogger().trace("end icon"),this.popState();break;case 10:return C.getLogger().trace("Exploding node"),this.begin("NODE"),19;case 11:return C.getLogger().trace("Cloud"),this.begin("NODE"),19;case 12:return C.getLogger().trace("Explosion Bang"),this.begin("NODE"),19;case 13:return C.getLogger().trace("Cloud Bang"),this.begin("NODE"),19;case 14:return this.begin("NODE"),19;case 15:return this.begin("NODE"),19;case 16:return this.begin("NODE"),19;case 17:return this.begin("NODE"),19;case 18:return 13;case 19:return 22;case 20:return 11;case 21:this.begin("NSTR2");break;case 22:return"NODE_DESCR";case 23:this.popState();break;case 24:C.getLogger().trace("Starting NSTR"),this.begin("NSTR");break;case 25:return C.getLogger().trace("description:",E.yytext),"NODE_DESCR";case 26:this.popState();break;case 27:return this.popState(),C.getLogger().trace("node end ))"),"NODE_DEND";case 28:return this.popState(),C.getLogger().trace("node end )"),"NODE_DEND";case 29:return this.popState(),C.getLogger().trace("node end ...",E.yytext),"NODE_DEND";case 30:return this.popState(),C.getLogger().trace("node end (("),"NODE_DEND";case 31:return this.popState(),C.getLogger().trace("node end (-"),"NODE_DEND";case 32:return this.popState(),C.getLogger().trace("node end (-"),"NODE_DEND";case 33:return this.popState(),C.getLogger().trace("node end (("),"NODE_DEND";case 34:return this.popState(),C.getLogger().trace("node end (("),"NODE_DEND";case 35:return C.getLogger().trace("Long description:",E.yytext),20;case 36:return C.getLogger().trace("Long description:",E.yytext),20}},"anonymous"),rules:[/^(?:\s*%%.*)/i,/^(?:mindmap\b)/i,/^(?::::)/i,/^(?:.+)/i,/^(?:\n)/i,/^(?:::icon\()/i,/^(?:[\s]+[\n])/i,/^(?:[\n]+)/i,/^(?:[^\)]+)/i,/^(?:\))/i,/^(?:-\))/i,/^(?:\(-)/i,/^(?:\)\))/i,/^(?:\))/i,/^(?:\(\()/i,/^(?:\{\{)/i,/^(?:\()/i,/^(?:\[)/i,/^(?:[\s]+)/i,/^(?:[^\(\[\n\)\{\}]+)/i,/^(?:$)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:[^"]+)/i,/^(?:["])/i,/^(?:[\)]\))/i,/^(?:[\)])/i,/^(?:[\]])/i,/^(?:\}\})/i,/^(?:\(-)/i,/^(?:-\))/i,/^(?:\(\()/i,/^(?:\()/i,/^(?:[^\)\]\(\}]+)/i,/^(?:.+(?!\(\())/i],conditions:{CLASS:{rules:[3,4],inclusive:!1},ICON:{rules:[8,9],inclusive:!1},NSTR2:{rules:[22,23],inclusive:!1},NSTR:{rules:[25,26],inclusive:!1},NODE:{rules:[21,24,27,28,29,30,31,32,33,34,35,36],inclusive:!1},INITIAL:{rules:[0,1,2,5,6,7,10,11,12,13,14,15,16,17,18,19,20],inclusive:!0}}};return k})();v.lexer=T;function x(){this.yy={}}return o(x,"Parser"),x.prototype=v,v.Parser=x,new x})();oX.parser=oX;f0t=oX,Ba=[];for(let e=0;e<256;++e)Ba.push((e+256).toString(16).slice(1));o(k_e,"unsafeStringify");g0t=new Uint8Array(16);o(C_e,"rng");o(w_e,"v4");o(E_e,"_v4");m0t=w_e,y0t=12,pu={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},v0t=class{constructor(){this.nodes=[],this.count=0,this.elements={},this.getLogger=this.getLogger.bind(this),this.nodeType=pu,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{o(this,"MindmapDB")}clear(){this.nodes=[],this.count=0,this.elements={},this.baseLevel=void 0}getParent(e){for(let t=this.nodes.length-1;t>=0;t--)if(this.nodes[t].level0?this.nodes[0]:null}addNode(e,t,r,i){ee.info("addNode",e,t,r,i);let n=!1;this.nodes.length===0?(this.baseLevel=e,e=0,n=!0):this.baseLevel!==void 0&&(e=e-this.baseLevel,n=!1);let a=De(),s=a.mindmap?.padding??rr.mindmap.padding;switch(i){case this.nodeType.ROUNDED_RECT:case this.nodeType.RECT:case this.nodeType.HEXAGON:s*=2;break}let l={id:this.count++,nodeId:nr(t,a),level:e,descr:nr(r,a),type:i,children:[],width:a.mindmap?.maxNodeWidth??rr.mindmap.maxNodeWidth,padding:s,isRoot:n},h=this.getParent(e);if(h)h.children.push(l),this.nodes.push(l);else if(n)this.nodes.push(l);else throw new Error(`There can be only one root. No parent could be found for ("${l.descr}")`)}getType(e,t){switch(ee.debug("In get type",e,t),e){case"[":return this.nodeType.RECT;case"(":return t===")"?this.nodeType.ROUNDED_RECT:this.nodeType.CLOUD;case"((":return this.nodeType.CIRCLE;case")":return this.nodeType.CLOUD;case"))":return this.nodeType.BANG;case"{{":return this.nodeType.HEXAGON;default:return this.nodeType.DEFAULT}}setElementForId(e,t){this.elements[e]=t}getElementById(e){return this.elements[e]}decorateNode(e){if(!e)return;let t=De(),r=this.nodes[this.nodes.length-1];e.icon&&(r.icon=nr(e.icon,t)),e.class&&(r.class=nr(e.class,t))}type2Str(e){switch(e){case this.nodeType.DEFAULT:return"no-border";case this.nodeType.RECT:return"rect";case this.nodeType.ROUNDED_RECT:return"rounded-rect";case this.nodeType.CIRCLE:return"circle";case this.nodeType.CLOUD:return"cloud";case this.nodeType.BANG:return"bang";case this.nodeType.HEXAGON:return"hexgon";default:return"no-border"}}assignSections(e,t){if(e.level===0?e.section=void 0:e.section=t,e.children)for(let[r,i]of e.children.entries()){let n=e.level===0?r%(y0t-1):t;this.assignSections(i,n)}}flattenNodes(e,t){let r=De(),i=["mindmap-node"];e.isRoot===!0?i.push("section-root","section--1"):e.section!==void 0&&i.push(`section-${e.section}`),e.class&&i.push(e.class);let n=i.join(" "),a=o(l=>{let h=(r.theme?.toLowerCase()??"").includes("redux");switch(l){case pu.CIRCLE:return"mindmapCircle";case pu.RECT:return"rect";case pu.ROUNDED_RECT:return"rounded";case pu.CLOUD:return"cloud";case pu.BANG:return"bang";case pu.HEXAGON:return"hexagon";case pu.DEFAULT:return h?"rounded":"defaultMindmapNode";case pu.NO_BORDER:default:return"rect"}},"getShapeFromType"),s={id:e.id.toString(),domId:"node_"+e.id.toString(),label:e.descr,labelType:"markdown",isGroup:!1,shape:a(e.type),width:e.width,height:e.height??0,padding:e.padding,cssClasses:n,cssStyles:[],look:r.look,icon:e.icon,x:e.x,y:e.y,level:e.level,nodeId:e.nodeId,type:e.type,section:e.section};if(t.push(s),e.children)for(let l of e.children)this.flattenNodes(l,t)}generateEdges(e,t){if(!e.children)return;let r=De();for(let i of e.children){let n="edge";i.section!==void 0&&(n+=` section-edge-${i.section}`);let a=e.level+1;n+=` edge-depth-${a}`;let s={id:`edge_${e.id}_${i.id}`,start:e.id.toString(),end:i.id.toString(),type:"normal",curve:"basis",thickness:"normal",look:r.look,classes:n,depth:e.level,section:i.section};t.push(s),this.generateEdges(i,t)}}getData(){let e=this.getMindmap(),t=De(),r=$k().layout!==void 0,i=t;if(r||(i.layout="cose-bilkent"),!e)return{nodes:[],edges:[],config:i};ee.debug("getData: mindmapRoot",e,t),this.assignSections(e);let n=[],a=[];this.flattenNodes(e,n),this.generateEdges(e,a),ee.debug(`getData: processed ${n.length} nodes and ${a.length} edges`);let s=new Map;for(let l of n)s.set(l.id,{shape:l.shape,width:l.width,height:l.height,padding:l.padding});return{nodes:n,edges:a,config:i,rootNode:e,markers:["point"],direction:"TB",nodeSpacing:50,rankSpacing:50,shapes:Object.fromEntries(s),type:"mindmap",diagramId:"mindmap-"+m0t()}}getLogger(){return ee}},b0t=o(async(e,t,r,i)=>{ee.debug(`Rendering mindmap diagram +`+e);let n=i.db,a=n.getData(),s=Yo(t,a.config.securityLevel);if(a.type=i.type,a.layoutAlgorithm=Ec(a.config.layout,{fallback:"cose-bilkent"}),a.diagramId=t,!n.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 Wo(a,s);let{themeVariables:l}=Rt(),{useGradient:h,gradientStart:u,gradientStop:d}=l;if(h&&u&&d){let p=s.attr("id"),f=s.append("defs").append("linearGradient").attr("id",`${p}-gradient`).attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");f.append("stop").attr("offset","0%").attr("stop-color",u).attr("stop-opacity",1),f.append("stop").attr("offset","100%").attr("stop-color",d).attr("stop-opacity",1)}Gs(s,a.config.mindmap?.padding??rr.mindmap.padding,"mindmapDiagram",a.config.mindmap?.useMaxWidth??rr.mindmap.useMaxWidth)},"draw"),x0t={draw:b0t},T0t=o(e=>{let{theme:t,look:r}=e,i="";for(let n=0;n{let i="";for(let n=0;n{let{theme:t}=e,r=e.svgId,i=e.dropShadow?e.dropShadow.replace("url(#drop-shadow)",`url(${r}-drop-shadow)`):"none";return` + .edge { + stroke-width: 3; + } + ${T0t(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: ${i}; + } + [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?k0t(e.THEME_COLOR_LIMIT,r,e.mainBkg):""} +`},"getStyles"),w0t=C0t,E0t={get db(){return new v0t},renderer:x0t,parser:f0t,styles:w0t}});var R_e={};Kt(R_e,{diagram:()=>W0t});var lX,S0t,sl,hX,cX,uX,_0t,A0t,A_e,R0t,L0t,Hn,$0t,I0t,D0t,M0t,N0t,O0t,B0t,P0t,F0t,z0t,q0t,j0t,G0t,W0t,L_e=Tt(()=>{yn();Rc();Ip();ha();Zn();sa();la();Fn();An();Or();Yr();tr();Zt();vt();lX=(function(){var e=o(function(w,_,L,N){for(L=L||{},N=w.length;N--;L[w[N]]=_);return L},"o"),t=[1,4],r=[1,13],i=[1,12],n=[1,15],a=[1,16],s=[1,20],l=[1,19],h=[6,7,8],u=[1,26],d=[1,24],p=[1,25],f=[6,7,11],g=[1,31],m=[6,7,11,24],y=[1,6,13,16,17,20,23],b=[1,35],v=[1,36],T=[1,6,7,11,13,16,17,20,23],x=[1,38],k={trace:o(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mindMap:4,spaceLines:5,SPACELINE:6,NL:7,KANBAN:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,node:14,shapeData:15,ICON:16,CLASS:17,nodeWithId:18,nodeWithoutId:19,NODE_DSTART:20,NODE_DESCR:21,NODE_DEND:22,NODE_ID:23,SHAPE_DATA:24,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"KANBAN",11:"EOF",13:"SPACELIST",16:"ICON",17:"CLASS",20:"NODE_DSTART",21:"NODE_DESCR",22:"NODE_DEND",23:"NODE_ID",24:"SHAPE_DATA"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,3],[12,2],[12,2],[12,2],[12,1],[12,2],[12,1],[12,1],[12,1],[12,1],[14,1],[14,1],[19,3],[18,1],[18,4],[15,2],[15,1]],performAction:o(function(w,_,L,N,D,M,B){var A=M.length-1;switch(D){case 6:case 7:return N;case 8:N.getLogger().trace("Stop NL ");break;case 9:N.getLogger().trace("Stop EOF ");break;case 11:N.getLogger().trace("Stop NL2 ");break;case 12:N.getLogger().trace("Stop EOF2 ");break;case 15:N.getLogger().info("Node: ",M[A-1].id),N.addNode(M[A-2].length,M[A-1].id,M[A-1].descr,M[A-1].type,M[A]);break;case 16:N.getLogger().info("Node: ",M[A].id),N.addNode(M[A-1].length,M[A].id,M[A].descr,M[A].type);break;case 17:N.getLogger().trace("Icon: ",M[A]),N.decorateNode({icon:M[A]});break;case 18:case 23:N.decorateNode({class:M[A]});break;case 19:N.getLogger().trace("SPACELIST");break;case 20:N.getLogger().trace("Node: ",M[A-1].id),N.addNode(0,M[A-1].id,M[A-1].descr,M[A-1].type,M[A]);break;case 21:N.getLogger().trace("Node: ",M[A].id),N.addNode(0,M[A].id,M[A].descr,M[A].type);break;case 22:N.decorateNode({icon:M[A]});break;case 27:N.getLogger().trace("node found ..",M[A-2]),this.$={id:M[A-1],descr:M[A-1],type:N.getType(M[A-2],M[A])};break;case 28:this.$={id:M[A],descr:M[A],type:0};break;case 29:N.getLogger().trace("node found ..",M[A-3]),this.$={id:M[A-3],descr:M[A-1],type:N.getType(M[A-2],M[A])};break;case 30:this.$=M[A-1]+M[A];break;case 31:this.$=M[A];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:i,14:14,16:n,17:a,18:17,19:18,20:s,23:l},e(h,[2,3]),{1:[2,2]},e(h,[2,4]),e(h,[2,5]),{1:[2,6],6:r,12:21,13:i,14:14,16:n,17:a,18:17,19:18,20:s,23:l},{6:r,9:22,12:11,13:i,14:14,16:n,17:a,18:17,19:18,20:s,23:l},{6:u,7:d,10:23,11:p},e(f,[2,24],{18:17,19:18,14:27,16:[1,28],17:[1,29],20:s,23:l}),e(f,[2,19]),e(f,[2,21],{15:30,24:g}),e(f,[2,22]),e(f,[2,23]),e(m,[2,25]),e(m,[2,26]),e(m,[2,28],{20:[1,32]}),{21:[1,33]},{6:u,7:d,10:34,11:p},{1:[2,7],6:r,12:21,13:i,14:14,16:n,17:a,18:17,19:18,20:s,23:l},e(y,[2,14],{7:b,11:v}),e(T,[2,8]),e(T,[2,9]),e(T,[2,10]),e(f,[2,16],{15:37,24:g}),e(f,[2,17]),e(f,[2,18]),e(f,[2,20],{24:x}),e(m,[2,31]),{21:[1,39]},{22:[1,40]},e(y,[2,13],{7:b,11:v}),e(T,[2,11]),e(T,[2,12]),e(f,[2,15],{24:x}),e(m,[2,30]),{22:[1,41]},e(m,[2,27]),e(m,[2,29])],defaultActions:{2:[2,1],6:[2,2]},parseError:o(function(w,_){if(_.recoverable)this.trace(w);else{var L=new Error(w);throw L.hash=_,L}},"parseError"),parse:o(function(w){var _=this,L=[0],N=[],D=[null],M=[],B=this.table,A="",I=0,O=0,R=0,$=2,F=1,P=M.slice.call(arguments,1),z=Object.create(this.lexer),q={yy:{}};for(var G in this.yy)Object.prototype.hasOwnProperty.call(this.yy,G)&&(q.yy[G]=this.yy[G]);z.setInput(w,q.yy),q.yy.lexer=z,q.yy.parser=this,typeof z.yylloc>"u"&&(z.yylloc={});var W=z.yylloc;M.push(W);var J=z.options&&z.options.ranges;typeof q.yy.parseError=="function"?this.parseError=q.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function H(ae){L.length=L.length-2*ae,D.length=D.length-ae,M.length=M.length-ae}o(H,"popStack");function Z(){var ae;return ae=N.pop()||z.lex()||F,typeof ae!="number"&&(ae instanceof Array&&(N=ae,ae=N.pop()),ae=_.symbols_[ae]||ae),ae}o(Z,"lex");for(var se,Q,te,re,ne,Ae,ie={},me,oe,we,ye;;){if(te=L[L.length-1],this.defaultActions[te]?re=this.defaultActions[te]:((se===null||typeof se>"u")&&(se=Z()),re=B[te]&&B[te][se]),typeof re>"u"||!re.length||!re[0]){var ve="";ye=[];for(me in B[te])this.terminals_[me]&&me>$&&ye.push("'"+this.terminals_[me]+"'");z.showPosition?ve="Parse error on line "+(I+1)+`: +`+z.showPosition()+` +Expecting `+ye.join(", ")+", got '"+(this.terminals_[se]||se)+"'":ve="Parse error on line "+(I+1)+": Unexpected "+(se==F?"end of input":"'"+(this.terminals_[se]||se)+"'"),this.parseError(ve,{text:z.match,token:this.terminals_[se]||se,line:z.yylineno,loc:W,expected:ye})}if(re[0]instanceof Array&&re.length>1)throw new Error("Parse Error: multiple actions possible at state: "+te+", token: "+se);switch(re[0]){case 1:L.push(se),D.push(z.yytext),M.push(z.yylloc),L.push(re[1]),se=null,Q?(se=Q,Q=null):(O=z.yyleng,A=z.yytext,I=z.yylineno,W=z.yylloc,R>0&&R--);break;case 2:if(oe=this.productions_[re[1]][1],ie.$=D[D.length-oe],ie._$={first_line:M[M.length-(oe||1)].first_line,last_line:M[M.length-1].last_line,first_column:M[M.length-(oe||1)].first_column,last_column:M[M.length-1].last_column},J&&(ie._$.range=[M[M.length-(oe||1)].range[0],M[M.length-1].range[1]]),Ae=this.performAction.apply(ie,[A,O,I,q.yy,re[1],D,M].concat(P)),typeof Ae<"u")return Ae;oe&&(L=L.slice(0,-1*oe*2),D=D.slice(0,-1*oe),M=M.slice(0,-1*oe)),L.push(this.productions_[re[1]][0]),D.push(ie.$),M.push(ie._$),we=B[L[L.length-2]][L[L.length-1]],L.push(we);break;case 3:return!0}}return!0},"parse")},C=(function(){var w={EOF:1,parseError:o(function(_,L){if(this.yy.parser)this.yy.parser.parseError(_,L);else throw new Error(_)},"parseError"),setInput:o(function(_,L){return this.yy=L||this.yy||{},this._input=_,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:o(function(){var _=this._input[0];this.yytext+=_,this.yyleng++,this.offset++,this.match+=_,this.matched+=_;var L=_.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),_},"input"),unput:o(function(_){var L=_.length,N=_.split(/(?:\r\n?|\n)/g);this._input=_+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-L),this.offset-=L;var D=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),N.length-1&&(this.yylineno-=N.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:N?(N.length===D.length?this.yylloc.first_column:0)+D[D.length-N.length].length-N[0].length:this.yylloc.first_column-L},this.options.ranges&&(this.yylloc.range=[M[0],M[0]+this.yyleng-L]),this.yyleng=this.yytext.length,this},"unput"),more:o(function(){return this._more=!0,this},"more"),reject:o(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:o(function(_){this.unput(this.match.slice(_))},"less"),pastInput:o(function(){var _=this.matched.substr(0,this.matched.length-this.match.length);return(_.length>20?"...":"")+_.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:o(function(){var _=this.match;return _.length<20&&(_+=this._input.substr(0,20-_.length)),(_.substr(0,20)+(_.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:o(function(){var _=this.pastInput(),L=new Array(_.length+1).join("-");return _+this.upcomingInput()+` +`+L+"^"},"showPosition"),test_match:o(function(_,L){var N,D,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))),D=_[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+_[0].length},this.yytext+=_[0],this.match+=_[0],this.matches=_,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(_[0].length),this.matched+=_[0],N=this.performAction.call(this,this.yy,this,L,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),N)return N;if(this._backtrack){for(var B in M)this[B]=M[B];return!1}return!1},"test_match"),next:o(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var _,L,N,D;this._more||(this.yytext="",this.match="");for(var M=this._currentRules(),B=0;BL[0].length)){if(L=N,D=B,this.options.backtrack_lexer){if(_=this.test_match(N,M[B]),_!==!1)return _;if(this._backtrack){L=!1;continue}else return!1}else if(!this.options.flex)break}return L?(_=this.test_match(L,M[D]),_!==!1?_:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:o(function(){var _=this.next();return _||this.lex()},"lex"),begin:o(function(_){this.conditionStack.push(_)},"begin"),popState:o(function(){var _=this.conditionStack.length-1;return _>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:o(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:o(function(_){return _=this.conditionStack.length-1-Math.abs(_||0),_>=0?this.conditionStack[_]:"INITIAL"},"topState"),pushState:o(function(_){this.begin(_)},"pushState"),stateStackSize:o(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:o(function(_,L,N,D){var M=D;switch(N){case 0:return this.pushState("shapeData"),L.yytext="",24;case 1:return this.pushState("shapeDataStr"),24;case 2:return this.popState(),24;case 3:let B=/\n\s*/g;return L.yytext=L.yytext.replace(B,"
    "),24;case 4:return 24;case 5:this.popState();break;case 6:return _.getLogger().trace("Found comment",L.yytext),6;case 7:return 8;case 8:this.begin("CLASS");break;case 9:return this.popState(),17;case 10:this.popState();break;case 11:_.getLogger().trace("Begin icon"),this.begin("ICON");break;case 12:return _.getLogger().trace("SPACELINE"),6;case 13:return 7;case 14:return 16;case 15:_.getLogger().trace("end icon"),this.popState();break;case 16:return _.getLogger().trace("Exploding node"),this.begin("NODE"),20;case 17:return _.getLogger().trace("Cloud"),this.begin("NODE"),20;case 18:return _.getLogger().trace("Explosion Bang"),this.begin("NODE"),20;case 19:return _.getLogger().trace("Cloud Bang"),this.begin("NODE"),20;case 20:return this.begin("NODE"),20;case 21:return this.begin("NODE"),20;case 22:return this.begin("NODE"),20;case 23:return this.begin("NODE"),20;case 24:return 13;case 25:return 23;case 26:return 11;case 27:this.begin("NSTR2");break;case 28:return"NODE_DESCR";case 29:this.popState();break;case 30:_.getLogger().trace("Starting NSTR"),this.begin("NSTR");break;case 31:return _.getLogger().trace("description:",L.yytext),"NODE_DESCR";case 32:this.popState();break;case 33:return this.popState(),_.getLogger().trace("node end ))"),"NODE_DEND";case 34:return this.popState(),_.getLogger().trace("node end )"),"NODE_DEND";case 35:return this.popState(),_.getLogger().trace("node end ...",L.yytext),"NODE_DEND";case 36:return this.popState(),_.getLogger().trace("node end (("),"NODE_DEND";case 37:return this.popState(),_.getLogger().trace("node end (-"),"NODE_DEND";case 38:return this.popState(),_.getLogger().trace("node end (-"),"NODE_DEND";case 39:return this.popState(),_.getLogger().trace("node end (("),"NODE_DEND";case 40:return this.popState(),_.getLogger().trace("node end (("),"NODE_DEND";case 41:return _.getLogger().trace("Long description:",L.yytext),21;case 42:return _.getLogger().trace("Long description:",L.yytext),21}},"anonymous"),rules:[/^(?:@\{)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^\"]+)/i,/^(?:[^}^"]+)/i,/^(?:\})/i,/^(?:\s*%%.*)/i,/^(?:kanban\b)/i,/^(?::::)/i,/^(?:.+)/i,/^(?:\n)/i,/^(?:::icon\()/i,/^(?:[\s]+[\n])/i,/^(?:[\n]+)/i,/^(?:[^\)]+)/i,/^(?:\))/i,/^(?:-\))/i,/^(?:\(-)/i,/^(?:\)\))/i,/^(?:\))/i,/^(?:\(\()/i,/^(?:\{\{)/i,/^(?:\()/i,/^(?:\[)/i,/^(?:[\s]+)/i,/^(?:[^\(\[\n\)\{\}@]+)/i,/^(?:$)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:[^"]+)/i,/^(?:["])/i,/^(?:[\)]\))/i,/^(?:[\)])/i,/^(?:[\]])/i,/^(?:\}\})/i,/^(?:\(-)/i,/^(?:-\))/i,/^(?:\(\()/i,/^(?:\()/i,/^(?:[^\)\]\(\}]+)/i,/^(?:.+(?!\(\())/i],conditions:{shapeDataEndBracket:{rules:[],inclusive:!1},shapeDataStr:{rules:[2,3],inclusive:!1},shapeData:{rules:[1,4,5],inclusive:!1},CLASS:{rules:[9,10],inclusive:!1},ICON:{rules:[14,15],inclusive:!1},NSTR2:{rules:[28,29],inclusive:!1},NSTR:{rules:[31,32],inclusive:!1},NODE:{rules:[27,30,33,34,35,36,37,38,39,40,41,42],inclusive:!1},INITIAL:{rules:[0,6,7,8,11,12,13,16,17,18,19,20,21,22,23,24,25,26],inclusive:!0}}};return w})();k.lexer=C;function E(){this.yy={}}return o(E,"Parser"),E.prototype=k,k.Parser=E,new E})();lX.parser=lX;S0t=lX,sl=[],hX=[],cX=0,uX={},_0t=o(()=>{sl=[],hX=[],cX=0,uX={}},"clear"),A0t=o(e=>{if(sl.length===0)return null;let t=sl[0].level,r=null;for(let i=sl.length-1;i>=0;i--)if(sl[i].level===t&&!r&&(r=sl[i]),sl[i].levell.parentId===n.id);for(let l of s){let h={id:l.id,parentId:n.id,label:nr(l.label??"",i),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(h)}}return{nodes:t,edges:e,other:{},config:De()}},"getData"),L0t=o((e,t,r,i,n)=>{let a=De(),s=a.mindmap?.padding??rr.mindmap.padding;switch(i){case Hn.ROUNDED_RECT:case Hn.RECT:case Hn.HEXAGON:s*=2}let l={id:nr(t,a)||"kbn"+cX++,level:e,label:nr(r,a),width:a.mindmap?.maxNodeWidth??rr.mindmap.maxNodeWidth,padding:s,isGroup:!1};if(n!==void 0){let u;n.includes(` +`)?u=n+` +`:u=`{ +`+n+` +}`;let d=ju(u,{schema:qu});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 h=A0t(e);h?l.parentId=h.id||"kbn"+cX++:hX.push(l),sl.push(l)},"addNode"),Hn={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},$0t=o((e,t)=>{switch(ee.debug("In get type",e,t),e){case"[":return Hn.RECT;case"(":return t===")"?Hn.ROUNDED_RECT:Hn.CLOUD;case"((":return Hn.CIRCLE;case")":return Hn.CLOUD;case"))":return Hn.BANG;case"{{":return Hn.HEXAGON;default:return Hn.DEFAULT}},"getType"),I0t=o((e,t)=>{uX[e]=t},"setElementForId"),D0t=o(e=>{if(!e)return;let t=De(),r=sl[sl.length-1];e.icon&&(r.icon=nr(e.icon,t)),e.class&&(r.cssClasses=nr(e.class,t))},"decorateNode"),M0t=o(e=>{switch(e){case Hn.DEFAULT:return"no-border";case Hn.RECT:return"rect";case Hn.ROUNDED_RECT:return"rounded-rect";case Hn.CIRCLE:return"circle";case Hn.CLOUD:return"cloud";case Hn.BANG:return"bang";case Hn.HEXAGON:return"hexgon";default:return"no-border"}},"type2Str"),N0t=o(()=>ee,"getLogger"),O0t=o(e=>uX[e],"getElementById"),B0t={clear:_0t,addNode:L0t,getSections:A_e,getData:R0t,nodeType:Hn,getType:$0t,setElementForId:I0t,decorateNode:D0t,type2Str:M0t,getLogger:N0t,getElementById:O0t},P0t=B0t,F0t=o(async(e,t,r,i)=>{ee.debug(`Rendering kanban diagram +`+e);let n=i.db.getData(),a=De();a.htmlLabels=!1;let s=oi(t);for(let y of n.nodes)y.domId=`${t}-${y.id}`;let l=s.append("g");l.attr("class","sections");let h=s.append("g");h.attr("class","items");let u=n.nodes.filter(y=>y.isGroup),d=0,p=10,f=[],g=25;for(let y of u){let b=a?.kanban?.sectionWidth||200;d=d+1,y.x=b*d+(d-1)*p/2,y.width=b,y.y=0,y.height=b*3,y.rx=5,y.ry=5,y.cssClasses=y.cssClasses+" section-"+d;let v=await Vu(l,y);g=Math.max(g,v?.labelBBox?.height),f.push(v)}let m=0;for(let y of u){let b=f[m];m=m+1;let v=a?.kanban?.sectionWidth||200,T=-v*3/2+g,x=T,k=n.nodes.filter(w=>w.parentId===y.id);for(let w of k){if(w.isGroup)throw new Error("Groups within groups are not allowed in Kanban diagrams");w.x=y.x,w.width=v-1.5*p;let _=(await wh(h,w,{config:a})).node().getBBox();w.y=x+_.height/2,await qp(w),x=w.y+_.height/2+p/2}let C=b.cluster.select("rect"),E=Math.max(x-T+3*p,50)+(g-25);C.attr("height",E)}hc(void 0,s,a.mindmap?.padding??rr.kanban.padding,a.mindmap?.useMaxWidth??rr.kanban.useMaxWidth)},"draw"),z0t={draw:F0t},q0t=o(e=>{let t="";for(let i=0;ie.darkMode?et(i,n):Je(i,n),"adjuster");for(let i=0;i` + .edge { + stroke-width: 3; + } + ${q0t(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; + } + ${Ac()} +`,"getStyles"),G0t=j0t,W0t={db:P0t,renderer:z0t,parser:S0t,styles:G0t}});var K_e={};Kt(K_e,{diagram:()=>umt});function pX(e,t){let r;if(t===void 0)for(let i of e)i!=null&&(r=i)&&(r=i);else{let i=-1;for(let n of e)(n=t(n,++i,e))!=null&&(r=n)&&(r=n)}return r}function kX(e,t){let r;if(t===void 0)for(let i of e)i!=null&&(r>i||r===void 0&&i>=i)&&(r=i);else{let i=-1;for(let n of e)(n=t(n,++i,e))!=null&&(r>n||r===void 0&&n>=n)&&(r=n)}return r}function G_(e,t){let r=0;if(t===void 0)for(let i of e)(i=+i)&&(r+=i);else{let i=-1;for(let n of e)(n=+t(n,++i,e))&&(r+=n)}return r}function I_e(e){return e.target.depth}function D_e(e){return e.depth}function M_e(e,t){return t-1-e.height}function CX(e,t){return e.sourceLinks.length?e.depth:t-1}function N_e(e){return e.targetLinks.length?e.depth:e.sourceLinks.length?kX(e.sourceLinks,I_e)-1:0}function _T(e){return function(){return e}}function fX(e,t){return AT(e.source,t.source)||e.index-t.index}function gX(e,t){return AT(e.target,t.target)||e.index-t.index}function AT(e,t){return e.y0-t.y0}function W_(e){return e.value}function O_e(e){return e.index}function B_e(e){return e.nodes}function P_e(e){return e.links}function mX(e,t){let r=e.get(t);if(!r)throw new Error("missing: "+t);return r}function yX({nodes:e}){for(let t of e){let r=t.y0,i=r;for(let n of t.sourceLinks)n.y0=r+n.width/2,r+=n.width;for(let n of t.targetLinks)n.y1=i+n.width/2,i+=n.width}}function F_e(){let e=0,t=0,r=1,i=1,n=24,a=8,s,l=O_e,h=CX,u,d,p=B_e,f=P_e,g=6;function m(){let I={nodes:p.apply(null,arguments),links:f.apply(null,arguments)};return y(I),b(I),v(I),T(I),C(I),yX(I),I}o(m,"sankey"),m.update=function(I){return yX(I),I},m.nodeId=function(I){return arguments.length?(l=typeof I=="function"?I:_T(I),m):l},m.nodeAlign=function(I){return arguments.length?(h=typeof I=="function"?I:_T(I),m):h},m.nodeSort=function(I){return arguments.length?(u=I,m):u},m.nodeWidth=function(I){return arguments.length?(n=+I,m):n},m.nodePadding=function(I){return arguments.length?(a=s=+I,m):a},m.nodes=function(I){return arguments.length?(p=typeof I=="function"?I:_T(I),m):p},m.links=function(I){return arguments.length?(f=typeof I=="function"?I:_T(I),m):f},m.linkSort=function(I){return arguments.length?(d=I,m):d},m.size=function(I){return arguments.length?(e=t=0,r=+I[0],i=+I[1],m):[r-e,i-t]},m.extent=function(I){return arguments.length?(e=+I[0][0],r=+I[1][0],t=+I[0][1],i=+I[1][1],m):[[e,t],[r,i]]},m.iterations=function(I){return arguments.length?(g=+I,m):g};function y({nodes:I,links:O}){for(let[$,F]of I.entries())F.index=$,F.sourceLinks=[],F.targetLinks=[];let R=new Map(I.map(($,F)=>[l($,F,I),$]));for(let[$,F]of O.entries()){F.index=$;let{source:P,target:z}=F;typeof P!="object"&&(P=F.source=mX(R,P)),typeof z!="object"&&(z=F.target=mX(R,z)),P.sourceLinks.push(F),z.targetLinks.push(F)}if(d!=null)for(let{sourceLinks:$,targetLinks:F}of I)$.sort(d),F.sort(d)}o(y,"computeNodeLinks");function b({nodes:I}){for(let O of I)O.value=O.fixedValue===void 0?Math.max(G_(O.sourceLinks,W_),G_(O.targetLinks,W_)):O.fixedValue}o(b,"computeNodeValues");function v({nodes:I}){let O=I.length,R=new Set(I),$=new Set,F=0;for(;R.size;){for(let P of R){P.depth=F;for(let{target:z}of P.sourceLinks)$.add(z)}if(++F>O)throw new Error("circular link");R=$,$=new Set}}o(v,"computeNodeDepths");function T({nodes:I}){let O=I.length,R=new Set(I),$=new Set,F=0;for(;R.size;){for(let P of R){P.height=F;for(let{source:z}of P.targetLinks)$.add(z)}if(++F>O)throw new Error("circular link");R=$,$=new Set}}o(T,"computeNodeHeights");function x({nodes:I}){let O=pX(I,F=>F.depth)+1,R=(r-e-n)/(O-1),$=new Array(O);for(let F of I){let P=Math.max(0,Math.min(O-1,Math.floor(h.call(null,F,O))));F.layer=P,F.x0=e+P*R,F.x1=F.x0+n,$[P]?$[P].push(F):$[P]=[F]}if(u)for(let F of $)F.sort(u);return $}o(x,"computeNodeLayers");function k(I){let O=kX(I,R=>(i-t-(R.length-1)*s)/G_(R,W_));for(let R of I){let $=t;for(let F of R){F.y0=$,F.y1=$+F.value*O,$=F.y1+s;for(let P of F.sourceLinks)P.width=P.value*O}$=(i-$+s)/(R.length+1);for(let F=0;FR.length)-1)),k(O);for(let R=0;R0))continue;let W=(q/G-z.y0)*O;z.y0+=W,z.y1+=W,D(z)}u===void 0&&P.sort(AT),_(P,R)}}o(E,"relaxLeftToRight");function w(I,O,R){for(let $=I.length,F=$-2;F>=0;--F){let P=I[F];for(let z of P){let q=0,G=0;for(let{target:J,value:H}of z.sourceLinks){let Z=H*(J.layer-z.layer);q+=A(z,J)*Z,G+=Z}if(!(G>0))continue;let W=(q/G-z.y0)*O;z.y0+=W,z.y1+=W,D(z)}u===void 0&&P.sort(AT),_(P,R)}}o(w,"relaxRightToLeft");function _(I,O){let R=I.length>>1,$=I[R];N(I,$.y0-s,R-1,O),L(I,$.y1+s,R+1,O),N(I,i,I.length-1,O),L(I,t,0,O)}o(_,"resolveCollisions");function L(I,O,R,$){for(;R1e-6&&(F.y0+=P,F.y1+=P),O=F.y1+s}}o(L,"resolveCollisionsTopToBottom");function N(I,O,R,$){for(;R>=0;--R){let F=I[R],P=(F.y1-O)*$;P>1e-6&&(F.y0-=P,F.y1-=P),O=F.y0-s}}o(N,"resolveCollisionsBottomToTop");function D({sourceLinks:I,targetLinks:O}){if(d===void 0){for(let{source:{sourceLinks:R}}of O)R.sort(gX);for(let{target:{targetLinks:R}}of I)R.sort(fX)}}o(D,"reorderNodeLinks");function M(I){if(d===void 0)for(let{sourceLinks:O,targetLinks:R}of I)O.sort(gX),R.sort(fX)}o(M,"reorderLinks");function B(I,O){let R=I.y0-(I.sourceLinks.length-1)*s/2;for(let{target:$,width:F}of I.sourceLinks){if($===O)break;R+=F+s}for(let{source:$,width:F}of O.targetLinks){if($===I)break;R-=F}return R}o(B,"targetTop");function A(I,O){let R=O.y0-(O.targetLinks.length-1)*s/2;for(let{source:$,width:F}of O.targetLinks){if($===I)break;R+=F+s}for(let{target:$,width:F}of I.sourceLinks){if($===O)break;R-=F}return R}return o(A,"sourceTop"),m}function Y_(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function wX(){return new Y_}function xX(e){return o(function(){return e},"constant")}function z_e(e){return e[0]}function q_e(e){return e[1]}function j_e(e){return e.source}function G_e(e){return e.target}function W_e(e){var t=j_e,r=G_e,i=z_e,n=q_e,a=null;function s(){var l,h=rmt.call(arguments),u=t.apply(this,h),d=r.apply(this,h);if(a||(a=l=tmt()),e(a,+i.apply(this,(h[0]=u,h)),+n.apply(this,h),+i.apply(this,(h[0]=d,h)),+n.apply(this,h)),l)return a=null,l+""||null}return o(s,"link"),s.source=function(l){return arguments.length?(t=l,s):t},s.target=function(l){return arguments.length?(r=l,s):r},s.x=function(l){return arguments.length?(i=typeof l=="function"?l:xX(+l),s):i},s.y=function(l){return arguments.length?(n=typeof l=="function"?l:xX(+l),s):n},s.context=function(l){return arguments.length?(a=l??null,s):a},s}function U_e(e,t,r,i,n){e.moveTo(t,r),e.bezierCurveTo(t=(t+i)/2,r,t,n,i,n)}function V_e(){return W_e(U_e)}function Y_e(e){return[e.source.x1,e.y0]}function H_e(e){return[e.target.x0,e.y1]}function X_e(){return V_e().source(Y_e).target(H_e)}var dX,U_,H_,X_,V_,U0t,V0t,Y0t,H0t,X0t,K0t,Z0t,Q0t,J0t,vX,bX,Dg,emt,tmt,rmt,$_e,imt,nmt,amt,smt,omt,lmt,cmt,hmt,umt,Z_e=Tt(()=>{tr();Zt();vt();dX=(function(){var e=o(function(l,h,u,d){for(u=u||{},d=l.length;d--;u[l[d]]=h);return u},"o"),t=[1,9],r=[1,10],i=[1,5,10,12],n={trace:o(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:o(function(l,h,u,d,p,f,g){var m=f.length-1;switch(p){case 7:let y=d.findOrCreateNode(f[m-4].trim().replaceAll('""','"')),b=d.findOrCreateNode(f[m-2].trim().replaceAll('""','"')),v=parseFloat(f[m].trim());d.addLink(y,b,v);break;case 8:case 9:case 11:this.$=f[m];break;case 10:this.$=f[m-1];break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},{5:[1,3]},{6:4,8:5,15:6,16:7,17:8,18:t,20:r},{1:[2,6],7:11,10:[1,12]},e(r,[2,4],{9:13,5:[1,14]}),{12:[1,15]},e(i,[2,8]),e(i,[2,9]),{19:[1,16]},e(i,[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(i,[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:o(function(l,h){if(h.recoverable)this.trace(l);else{var u=new Error(l);throw u.hash=h,u}},"parseError"),parse:o(function(l){var h=this,u=[0],d=[],p=[null],f=[],g=this.table,m="",y=0,b=0,v=0,T=2,x=1,k=f.slice.call(arguments,1),C=Object.create(this.lexer),E={yy:{}};for(var w in this.yy)Object.prototype.hasOwnProperty.call(this.yy,w)&&(E.yy[w]=this.yy[w]);C.setInput(l,E.yy),E.yy.lexer=C,E.yy.parser=this,typeof C.yylloc>"u"&&(C.yylloc={});var _=C.yylloc;f.push(_);var L=C.options&&C.options.ranges;typeof E.yy.parseError=="function"?this.parseError=E.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function N(W){u.length=u.length-2*W,p.length=p.length-W,f.length=f.length-W}o(N,"popStack");function D(){var W;return W=d.pop()||C.lex()||x,typeof W!="number"&&(W instanceof Array&&(d=W,W=d.pop()),W=h.symbols_[W]||W),W}o(D,"lex");for(var M,B,A,I,O,R,$={},F,P,z,q;;){if(A=u[u.length-1],this.defaultActions[A]?I=this.defaultActions[A]:((M===null||typeof M>"u")&&(M=D()),I=g[A]&&g[A][M]),typeof I>"u"||!I.length||!I[0]){var G="";q=[];for(F in g[A])this.terminals_[F]&&F>T&&q.push("'"+this.terminals_[F]+"'");C.showPosition?G="Parse error on line "+(y+1)+`: +`+C.showPosition()+` +Expecting `+q.join(", ")+", got '"+(this.terminals_[M]||M)+"'":G="Parse error on line "+(y+1)+": Unexpected "+(M==x?"end of input":"'"+(this.terminals_[M]||M)+"'"),this.parseError(G,{text:C.match,token:this.terminals_[M]||M,line:C.yylineno,loc:_,expected:q})}if(I[0]instanceof Array&&I.length>1)throw new Error("Parse Error: multiple actions possible at state: "+A+", token: "+M);switch(I[0]){case 1:u.push(M),p.push(C.yytext),f.push(C.yylloc),u.push(I[1]),M=null,B?(M=B,B=null):(b=C.yyleng,m=C.yytext,y=C.yylineno,_=C.yylloc,v>0&&v--);break;case 2:if(P=this.productions_[I[1]][1],$.$=p[p.length-P],$._$={first_line:f[f.length-(P||1)].first_line,last_line:f[f.length-1].last_line,first_column:f[f.length-(P||1)].first_column,last_column:f[f.length-1].last_column},L&&($._$.range=[f[f.length-(P||1)].range[0],f[f.length-1].range[1]]),R=this.performAction.apply($,[m,b,y,E.yy,I[1],p,f].concat(k)),typeof R<"u")return R;P&&(u=u.slice(0,-1*P*2),p=p.slice(0,-1*P),f=f.slice(0,-1*P)),u.push(this.productions_[I[1]][0]),p.push($.$),f.push($._$),z=g[u[u.length-2]][u[u.length-1]],u.push(z);break;case 3:return!0}}return!0},"parse")},a=(function(){var l={EOF:1,parseError:o(function(h,u){if(this.yy.parser)this.yy.parser.parseError(h,u);else throw new Error(h)},"parseError"),setInput:o(function(h,u){return this.yy=u||this.yy||{},this._input=h,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:o(function(){var h=this._input[0];this.yytext+=h,this.yyleng++,this.offset++,this.match+=h,this.matched+=h;var u=h.match(/(?:\r\n?|\n).*/g);return u?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),h},"input"),unput:o(function(h){var u=h.length,d=h.split(/(?:\r\n?|\n)/g);this._input=h+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-u),this.offset-=u;var p=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 f=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:d?(d.length===p.length?this.yylloc.first_column:0)+p[p.length-d.length].length-d[0].length:this.yylloc.first_column-u},this.options.ranges&&(this.yylloc.range=[f[0],f[0]+this.yyleng-u]),this.yyleng=this.yytext.length,this},"unput"),more:o(function(){return this._more=!0,this},"more"),reject:o(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:o(function(h){this.unput(this.match.slice(h))},"less"),pastInput:o(function(){var h=this.matched.substr(0,this.matched.length-this.match.length);return(h.length>20?"...":"")+h.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:o(function(){var h=this.match;return h.length<20&&(h+=this._input.substr(0,20-h.length)),(h.substr(0,20)+(h.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:o(function(){var h=this.pastInput(),u=new Array(h.length+1).join("-");return h+this.upcomingInput()+` +`+u+"^"},"showPosition"),test_match:o(function(h,u){var d,p,f;if(this.options.backtrack_lexer&&(f={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(f.yylloc.range=this.yylloc.range.slice(0))),p=h[0].match(/(?:\r\n?|\n).*/g),p&&(this.yylineno+=p.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:p?p[p.length-1].length-p[p.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+h[0].length},this.yytext+=h[0],this.match+=h[0],this.matches=h,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(h[0].length),this.matched+=h[0],d=this.performAction.call(this,this.yy,this,u,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),d)return d;if(this._backtrack){for(var g in f)this[g]=f[g];return!1}return!1},"test_match"),next:o(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var h,u,d,p;this._more||(this.yytext="",this.match="");for(var f=this._currentRules(),g=0;gu[0].length)){if(u=d,p=g,this.options.backtrack_lexer){if(h=this.test_match(d,f[g]),h!==!1)return h;if(this._backtrack){u=!1;continue}else return!1}else if(!this.options.flex)break}return u?(h=this.test_match(u,f[p]),h!==!1?h:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:o(function(){var h=this.next();return h||this.lex()},"lex"),begin:o(function(h){this.conditionStack.push(h)},"begin"),popState:o(function(){var h=this.conditionStack.length-1;return h>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:o(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:o(function(h){return h=this.conditionStack.length-1-Math.abs(h||0),h>=0?this.conditionStack[h]:"INITIAL"},"topState"),pushState:o(function(h){this.begin(h)},"pushState"),stateStackSize:o(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:o(function(h,u,d,p){var f=p;switch(d){case 0:return this.pushState("csv"),4;case 1:return this.pushState("csv"),4;case 2:return 10;case 3:return 5;case 4:return 12;case 5:return this.pushState("escaped_text"),18;case 6:return 20;case 7:return this.popState("escaped_text"),18;case 8:return 19}},"anonymous"),rules:[/^(?:sankey-beta\b)/i,/^(?:sankey\b)/i,/^(?:$)/i,/^(?:((\u000D\u000A)|(\u000A)))/i,/^(?:(\u002C))/i,/^(?:(\u0022))/i,/^(?:([\u0020-\u0021\u0023-\u002B\u002D-\u007E])*)/i,/^(?:(\u0022)(?!(\u0022)))/i,/^(?:(([\u0020-\u0021\u0023-\u002B\u002D-\u007E])|(\u002C)|(\u000D)|(\u000A)|(\u0022)(\u0022))*)/i],conditions:{csv:{rules:[2,3,4,5,6,7,8],inclusive:!1},escaped_text:{rules:[7,8],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8],inclusive:!0}}};return l})();n.lexer=a;function s(){this.yy={}}return o(s,"Parser"),s.prototype=n,n.Parser=s,new s})();dX.parser=dX;U_=dX,H_=[],X_=[],V_=new Map,U0t=o(()=>{H_=[],X_=[],V_=new Map,ar()},"clear"),V0t=class{constructor(e,t,r=0){this.source=e,this.target=t,this.value=r}static{o(this,"SankeyLink")}},Y0t=o((e,t,r)=>{H_.push(new V0t(e,t,r))},"addLink"),H0t=class{constructor(e){this.ID=e}static{o(this,"SankeyNode")}},X0t=o(e=>{e=ft.sanitizeText(e,De());let t=V_.get(e);return t===void 0&&(t=new H0t(e),V_.set(e,t),X_.push(t)),t},"findOrCreateNode"),K0t=o(()=>X_,"getNodes"),Z0t=o(()=>H_,"getLinks"),Q0t=o(()=>({nodes:X_.map(e=>({id:e.ID})),links:H_.map(e=>({source:e.source.ID,target:e.target.ID,value:e.value}))}),"getGraph"),J0t={nodesMap:V_,getConfig:o(()=>De().sankey,"getConfig"),getNodes:K0t,getLinks:Z0t,getGraph:Q0t,addLink:Y0t,findOrCreateNode:X0t,getAccTitle:xr,setAccTitle:gr,getAccDescription:kr,setAccDescription:Tr,getDiagramTitle:Cr,setDiagramTitle:_r,clear:U0t};o(pX,"max");o(kX,"min");o(G_,"sum");o(I_e,"targetDepth");o(D_e,"left");o(M_e,"right");o(CX,"justify");o(N_e,"center");o(_T,"constant");o(fX,"ascendingSourceBreadth");o(gX,"ascendingTargetBreadth");o(AT,"ascendingBreadth");o(W_,"value");o(O_e,"defaultId");o(B_e,"defaultNodes");o(P_e,"defaultLinks");o(mX,"find");o(yX,"computeLinkBreadths");o(F_e,"Sankey");vX=Math.PI,bX=2*vX,Dg=1e-6,emt=bX-Dg;o(Y_,"Path");o(wX,"path");Y_.prototype=wX.prototype={constructor:Y_,moveTo:o(function(e,t){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)},"moveTo"),closePath:o(function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},"closePath"),lineTo:o(function(e,t){this._+="L"+(this._x1=+e)+","+(this._y1=+t)},"lineTo"),quadraticCurveTo:o(function(e,t,r,i){this._+="Q"+ +e+","+ +t+","+(this._x1=+r)+","+(this._y1=+i)},"quadraticCurveTo"),bezierCurveTo:o(function(e,t,r,i,n,a){this._+="C"+ +e+","+ +t+","+ +r+","+ +i+","+(this._x1=+n)+","+(this._y1=+a)},"bezierCurveTo"),arcTo:o(function(e,t,r,i,n){e=+e,t=+t,r=+r,i=+i,n=+n;var a=this._x1,s=this._y1,l=r-e,h=i-t,u=a-e,d=s-t,p=u*u+d*d;if(n<0)throw new Error("negative radius: "+n);if(this._x1===null)this._+="M"+(this._x1=e)+","+(this._y1=t);else if(p>Dg)if(!(Math.abs(d*l-h*u)>Dg)||!n)this._+="L"+(this._x1=e)+","+(this._y1=t);else{var f=r-a,g=i-s,m=l*l+h*h,y=f*f+g*g,b=Math.sqrt(m),v=Math.sqrt(p),T=n*Math.tan((vX-Math.acos((m+p-y)/(2*b*v)))/2),x=T/v,k=T/b;Math.abs(x-1)>Dg&&(this._+="L"+(e+x*u)+","+(t+x*d)),this._+="A"+n+","+n+",0,0,"+ +(d*f>u*g)+","+(this._x1=e+k*l)+","+(this._y1=t+k*h)}},"arcTo"),arc:o(function(e,t,r,i,n,a){e=+e,t=+t,r=+r,a=!!a;var s=r*Math.cos(i),l=r*Math.sin(i),h=e+s,u=t+l,d=1^a,p=a?i-n:n-i;if(r<0)throw new Error("negative radius: "+r);this._x1===null?this._+="M"+h+","+u:(Math.abs(this._x1-h)>Dg||Math.abs(this._y1-u)>Dg)&&(this._+="L"+h+","+u),r&&(p<0&&(p=p%bX+bX),p>emt?this._+="A"+r+","+r+",0,1,"+d+","+(e-s)+","+(t-l)+"A"+r+","+r+",0,1,"+d+","+(this._x1=h)+","+(this._y1=u):p>Dg&&(this._+="A"+r+","+r+",0,"+ +(p>=vX)+","+d+","+(this._x1=e+r*Math.cos(n))+","+(this._y1=t+r*Math.sin(n))))},"arc"),rect:o(function(e,t,r,i){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)+"h"+ +r+"v"+ +i+"h"+-r+"Z"},"rect"),toString:o(function(){return this._},"toString")};tmt=wX;o(xX,"default");o(z_e,"x");o(q_e,"y");rmt=Array.prototype.slice;o(j_e,"linkSource");o(G_e,"linkTarget");o(W_e,"link");o(U_e,"curveHorizontal");o(V_e,"linkHorizontal");o(Y_e,"horizontalSource");o(H_e,"horizontalTarget");o(X_e,"default");$_e=class TX{static{o(this,"Uid")}static{this.count=0}static next(t){return new TX(t+ ++TX.count)}constructor(t){this.id=t,this.href=`#${t}`}toString(){return"url("+this.href+")"}},imt={left:D_e,right:M_e,center:N_e,justify:CX},nmt=o(e=>{let t=0,r=0;for(let i of e){let n=i.value??0;n>t&&(t=n,r=i.layer??0)}return r},"findCentralNodeLayer"),amt=o(function(e,t,r,i){let{securityLevel:n,sankey:a}=De(),s=Nk.sankey,l;n==="sandbox"&&(l=tt("#i"+t));let h=n==="sandbox"?tt(l.nodes()[0].contentDocument.body):tt("body"),u=n==="sandbox"?h.select(`[id="${t}"]`):tt(`[id="${t}"]`),d=a?.width??s.width,p=a?.height??s.width,f=a?.useMaxWidth??s.useMaxWidth,g=a?.nodeAlignment??s.nodeAlignment,m=a?.prefix??s.prefix,y=a?.suffix??s.suffix,b=a?.showValues??s.showValues,v=a?.nodeWidth??s.nodeWidth??10,T=a?.nodePadding??s.nodePadding??12,x=a?.labelStyle??s.labelStyle??"legacy",k=a?.nodeColors??{},C=i.db.getGraph(),E=imt[g];F_e().nodeId(R=>R.id).nodeWidth(v).nodePadding(T+(b?15:0)).nodeAlign(E).extent([[0,0],[d,p]])(C);let w=nmt(C.nodes),_=pl(vte),L=o(R=>k[R]??_(R),"getNodeColor");u.append("g").attr("class","nodes").selectAll(".node").data(C.nodes).join("g").attr("class","node").attr("id",R=>(R.uid=$_e.next("node-")).id).attr("transform",function(R){return"translate("+R.x0+","+R.y0+")"}).attr("x",R=>R.x0).attr("y",R=>R.y0).append("rect").attr("height",R=>R.y1-R.y0).attr("width",R=>R.x1-R.x0).attr("fill",R=>L(R.id));let N=o(({id:R,value:$})=>b?`${R} +${m}${Math.round($*100)/100}${y}`:R,"getText"),D=o(R=>x==="outlined"?(R.layer??0)M.selectAll(R?`.${R}`:"text").data(C.nodes).join("text").attr("class",R??null).attr("x",$=>D($).x).attr("y",$=>($.y1+$.y0)/2).attr("dy",`${b?"0":"0.35"}em`).attr("text-anchor",$=>D($).anchor).text(N),"appendLabel");x==="outlined"?(B("sankey-label-bg"),B("sankey-label-fg")):B();let A=u.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"),I=a?.linkColor??"gradient";if(I==="gradient"){let R=A.append("linearGradient").attr("id",$=>($.uid=$_e.next("linearGradient-")).id).attr("gradientUnits","userSpaceOnUse").attr("x1",$=>$.source.x1).attr("x2",$=>$.target.x0);R.append("stop").attr("offset","0%").attr("stop-color",$=>L($.source.id)),R.append("stop").attr("offset","100%").attr("stop-color",$=>L($.target.id))}let O;switch(I){case"gradient":O=o(R=>R.uid,"coloring");break;case"source":O=o(R=>L(R.source.id),"coloring");break;case"target":O=o(R=>L(R.target.id),"coloring");break;default:O=I}A.append("path").attr("d",X_e()).attr("stroke",O).attr("stroke-width",R=>Math.max(1,R.width)),hc(void 0,u,0,f)},"draw"),smt={draw:amt},omt=o(e=>e.replaceAll(/^[^\S\n\r]+|[^\S\n\r]+$/g,"").replaceAll(/([\n\r])+/g,` +`).trim(),"prepareTextForParsing"),lmt=o(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"),cmt=lmt,hmt=U_.parse.bind(U_);U_.parse=e=>hmt(omt(e));umt={styles:cmt,parser:U_,db:J0t,renderer:smt}});var eAe={};Kt(eAe,{diagram:()=>Tmt});var dmt,Q_e,pmt,fmt,gmt,J_e,mmt,ymt,vmt,bmt,xmt,Tmt,tAe=Tt(()=>{bs();es();Ma();Sa();_a();Aa();Ra();La();$a();Ia();Da();xa();Ta();ka();Ca();wa();Ea();Rr();yn();Or();Yr();tr();Zt();vt();dmt=rr.packet,Q_e=class{constructor(){this.packet=[],this.setAccTitle=gr,this.getAccTitle=xr,this.setDiagramTitle=_r,this.getDiagramTitle=Cr,this.getAccDescription=kr,this.setAccDescription=Tr}static{o(this,"PacketDB")}getConfig(){let e=zr({...dmt,...Rt().packet});return e.showBits&&(e.paddingY+=10),e}getPacket(){return this.packet}pushWord(e){e.length>0&&this.packet.push(e)}clear(){ar(),this.packet=[]}},pmt=1e4,fmt=o((e,t)=>{xi(e,t);let r=-1,i=[],n=1,{bitsPerRow:a}=t.getConfig();for(let{start:s,end:l,bits:h,label:u}of e.blocks){if(s!==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 i=t*r-1,n=t*r;return[{start:e.start,end:i,label:e.label,bits:i-e.start},{start:n,end:e.end,label:e.label,bits:e.end-n}]},"getNextFittingBlock"),J_e={parser:{yy:void 0},parse:o(async e=>{let t=await Vi("packet",e),r=J_e.parser?.yy;if(!(r instanceof Q_e))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.");ee.debug(t),fmt(t,r)},"parse")},mmt=o((e,t,r,i)=>{let n=i.db,a=n.getConfig(),{rowHeight:s,paddingY:l,bitWidth:h,bitsPerRow:u}=a,d=n.getPacket(),p=n.getDiagramTitle(),f=s+l,g=f*(d.length+1)-(p?0:s),m=h*u+2,y=oi(t);y.attr("viewBox",`0 0 ${m} ${g}`),Ir(y,g,m,a.useMaxWidth);for(let[b,v]of d.entries())ymt(y,v,b,a);y.append("text").text(p).attr("x",m/2).attr("y",g-f/2).attr("dominant-baseline","middle").attr("text-anchor","middle").attr("class","packetTitle")},"draw"),ymt=o((e,t,r,{rowHeight:i,paddingX:n,paddingY:a,bitWidth:s,bitsPerRow:l,showBits:h})=>{let u=e.append("g"),d=r*(i+a)+a;for(let p of t){let f=p.start%l*s+1,g=(p.end-p.start+1)*s-n;if(u.append("rect").attr("x",f).attr("y",d).attr("width",g).attr("height",i).attr("class","packetBlock"),u.append("text").attr("x",f+g/2).attr("y",d+i/2).attr("class","packetLabel").attr("dominant-baseline","middle").attr("text-anchor","middle").text(p.label),!h)continue;let m=p.end===p.start,y=d-2;u.append("text").attr("x",f+(m?g/2:0)).attr("y",y).attr("class","packetByte start").attr("dominant-baseline","auto").attr("text-anchor",m?"middle":"start").text(p.start),m||u.append("text").attr("x",f+g).attr("y",y).attr("class","packetByte end").attr("dominant-baseline","auto").attr("text-anchor","end").text(p.end)}},"drawWord"),vmt={draw:mmt},bmt={byteFontSize:"10px",startByteColor:"black",endByteColor:"black",labelColor:"black",labelFontSize:"12px",titleColor:"black",titleFontSize:"14px",blockStrokeColor:"black",blockStrokeWidth:"1",blockFillColor:"#efefef"},xmt=o(({packet:e}={})=>{let t=zr(bmt,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"),Tmt={parser:J_e,get db(){return new Q_e},renderer:vmt,styles:xmt}});var lAe={};Kt(lAe,{diagram:()=>qmt});function nAe(e,t,r,i,n,a,s){let l=t.length,h=Math.min(s.width,s.height)/2;r.forEach((u,d)=>{if(u.entries.length!==l)return;let p=u.entries.map((f,g)=>{let m=2*Math.PI*g/l-Math.PI/2,y=aAe(f,i,n,h),b=y*Math.cos(m),v=y*Math.sin(m);return{x:b,y:v}});a==="circle"?e.append("path").attr("d",sAe(p,s.curveTension)).attr("class",`radarCurve-${d}`):a==="polygon"&&e.append("polygon").attr("points",p.map(f=>`${f.x},${f.y}`).join(" ")).attr("class",`radarCurve-${d}`)})}function aAe(e,t,r,i){let n=Math.min(Math.max(e,t),r);return i*(n-t)/(r-t)}function sAe(e,t){let r=e.length,i=`M${e[0].x},${e[0].y}`;for(let n=0;n{let u=e.append("g").attr("transform",`translate(${n}, ${a+h*s})`);u.append("rect").attr("width",12).attr("height",12).attr("class",`radarLegendBox-${h}`),u.append("text").attr("x",16).attr("y",0).attr("class","radarLegendText").text(l.label)})}var ay,rAe,Mg,kmt,Cmt,iAe,wmt,Emt,Smt,_mt,Amt,Rmt,Lmt,RT,$mt,Imt,Dmt,Mmt,Nmt,Omt,Bmt,Pmt,Fmt,zmt,qmt,cAe=Tt(()=>{bs();es();Ma();Sa();_a();Aa();Ra();La();$a();Ia();Da();xa();Ta();ka();Ca();wa();Ea();Rr();yn();Or();Yr();tr();Zt();vt();ay={showLegend:!0,ticks:5,max:null,min:0,graticule:"circle"},rAe={axes:[],curves:[],options:ay},Mg=structuredClone(rAe),kmt=rr.radar,Cmt=o(()=>zr({...kmt,...Rt().radar}),"getConfig"),iAe=o(()=>Mg.axes,"getAxes"),wmt=o(()=>Mg.curves,"getCurves"),Emt=o(()=>Mg.options,"getOptions"),Smt=o(e=>{Mg.axes=e.map(t=>({name:t.name,label:t.label??t.name}))},"setAxes"),_mt=o(e=>{Mg.curves=e.map(t=>({name:t.name,label:t.label??t.name,entries:Amt(t.entries)}))},"setCurves"),Amt=o(e=>{if(e[0].axis==null)return e.map(r=>r.value);let t=iAe();if(t.length===0)throw new Error("Axes must be populated before curves for reference entries");return t.map(r=>{let i=e.find(n=>n.axis?.$refText===r.name);if(i===void 0)throw new Error("Missing entry for axis "+r.label);return i.value})},"computeCurveEntries"),Rmt=o(e=>{let t=e.reduce((r,i)=>(r[i.name]=i,r),{});Mg.options={showLegend:t.showLegend?.value??ay.showLegend,ticks:t.ticks?.value??ay.ticks,max:t.max?.value??ay.max,min:t.min?.value??ay.min,graticule:t.graticule?.value??ay.graticule}},"setOptions"),Lmt=o(()=>{ar(),Mg=structuredClone(rAe)},"clear"),RT={getAxes:iAe,getCurves:wmt,getOptions:Emt,setAxes:Smt,setCurves:_mt,setOptions:Rmt,getConfig:Cmt,clear:Lmt,setAccTitle:gr,getAccTitle:xr,setDiagramTitle:_r,getDiagramTitle:Cr,getAccDescription:kr,setAccDescription:Tr},$mt=o(e=>{xi(e,RT);let{axes:t,curves:r,options:i}=e;RT.setAxes(t),RT.setCurves(r),RT.setOptions(i)},"populate"),Imt={parse:o(async e=>{let t=await Vi("radar",e);ee.debug(t),$mt(t)},"parse")},Dmt=o((e,t,r,i)=>{let n=i.db,a=n.getAxes(),s=n.getCurves(),l=n.getOptions(),h=n.getConfig(),u=n.getDiagramTitle(),d=oi(t),p=Mmt(d,h),f=l.max??Math.max(...s.map(y=>Math.max(...y.entries))),g=l.min,m=Math.min(h.width,h.height)/2;Nmt(p,a,m,l.ticks,l.graticule),Omt(p,a,m,h),nAe(p,a,s,g,f,l.graticule,h),oAe(p,s,l.showLegend,h),p.append("text").attr("class","radarTitle").text(u).attr("x",0).attr("y",-h.height/2-h.marginTop)},"draw"),Mmt=o((e,t)=>{let r=t.width+t.marginLeft+t.marginRight,i=t.height+t.marginTop+t.marginBottom,n={x:t.marginLeft+t.width/2,y:t.marginTop+t.height/2};return Ir(e,i,r,t.useMaxWidth??!0),e.attr("viewBox",`0 0 ${r} ${i}`).attr("overflow","visible"),e.append("g").attr("transform",`translate(${n.x}, ${n.y})`)},"drawFrame"),Nmt=o((e,t,r,i,n)=>{if(n==="circle")for(let a=0;a{let p=2*d*Math.PI/a-Math.PI/2,f=l*Math.cos(p),g=l*Math.sin(p);return`${f},${g}`}).join(" ");e.append("polygon").attr("points",h).attr("class","radarGraticule")}}},"drawGraticule"),Omt=o((e,t,r,i)=>{let n=t.length;for(let a=0;a.01?"start":h<-.01?"end":"middle",p=u>.01?"hanging":u<-.01?"auto":"central",f=4;e.append("text").text(s).attr("x",r*i.axisLabelFactor*h+f*h).attr("y",r*i.axisLabelFactor*u+f*u).attr("text-anchor",d).attr("dominant-baseline",p).attr("class","radarAxisLabel")}},"drawAxes");o(nAe,"drawCurves");o(aAe,"relativeRadius");o(sAe,"closedRoundCurve");o(oAe,"drawLegend");Bmt={draw:Dmt},Pmt=o((e,t)=>{let r="";for(let i=0;i{let t=Ua(),r=Rt(),i=zr(t,r.themeVariables),n=zr(i.radar,e);return{themeVariables:i,radarOptions:n}},"buildRadarStyleOptions"),zmt=o(({radar:e}={})=>{let{themeVariables:t,radarOptions:r}=Fmt(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; + } + ${Pmt(t,r)} + `},"styles"),qmt={parser:Imt,db:RT,renderer:Bmt,styles:zmt}});var zAe={};Kt(zAe,{diagram:()=>pyt});function TAe(e){switch(ee.debug("typeStr2Type",e),e){case"[]":return"square";case"()":return ee.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 kAe(e){return(ee.debug("typeStr2Type",e),e)==="=="?"thick":"normal"}function CAe(e){switch(e.trim().slice(-1)){case"x":return"arrow_cross";case"o":return"arrow_circle";case">":return"arrow_point";default:return""}}function wAe(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 EAe(e){return e.includes("==")?"thick":"normal"}function SAe(e){return e.includes(".-")?"dotted":"solid"}function AX(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,i=Math.floor(t/e);return{px:r,py:i}}function Q_(e,t,r=0,i=0,n=8){ee.debug("setBlockSizes abc95 (start)",e.id,e?.size?.x,"block width =",e?.size,"siblingWidth",r),e?.size?.width||(e.size={width:r,height:i,x:0,y:0});let a=0,s=0;if(e.children?.length>0){for(let m of e.children)Q_(m,t,0,0,n);let l=C1t(e);a=l.width,s=l.height,ee.debug("setBlockSizes abc95 maxWidth of",e.id,":s children is ",a,s);for(let m of e.children)m.size&&(ee.debug(`abc95 Setting size of children of ${e.id} id=${m.id} ${a} ${s} ${JSON.stringify(m.size)}`),m.size.width=a*(m.widthInColumns??1)+n*((m.widthInColumns??1)-1),m.size.height=s,m.size.x=0,m.size.y=0,ee.debug(`abc95 updating size of ${e.id} children child:${m.id} maxWidth:${a} maxHeight:${s}`));for(let m of e.children)Q_(m,t,a,s,n);let h=e.columns??-1,u=0;for(let m of e.children)u+=m.widthInColumns??1;let d=e.children.length;h>0&&h0?Math.min(e.children.length,h):e.children.length;if(m>0){let y=(f-m*n-n)/m;ee.debug("abc95 (growing to fit) width",e.id,f,e.size?.width,y);for(let b of e.children)b.size&&(b.size.width=y)}}e.size={width:f,height:g,x:0,y:0}}ee.debug("setBlockSizes abc94 (done)",e.id,e?.size?.x,e?.size?.width,e?.size?.y,e?.size?.height)}function MX(e,t,r=8){ee.debug(`abc85 layout blocks (=>layoutBlocks) ${e.id} x: ${e?.size?.x} y: ${e?.size?.y} width: ${e?.size?.width}`);let i=e.columns??-1;if(ee.debug("layoutBlocks columns abc95",e.id,"=>",i,e),e.children&&e.children.length>0){let n=e?.children[0]?.size?.width??0,a=e.children.length*n+(e.children.length-1)*r;ee.debug("widthOfChildren 88",a,"posX");let s=new Map;{let p=0;for(let f of e.children){if(!f.size)continue;let{py:g}=AX(i,p),m=s.get(g)??0;f.size.height>m&&s.set(g,f.size.height);let y=f?.widthInColumns??1;i>0&&(y=Math.min(y,i-p%i)),p+=y}}let l=new Map;{let p=0,f=[...s.keys()].sort((g,m)=>g-m);for(let g of f)l.set(g,p),p+=(s.get(g)??0)+r}let h=0;ee.debug("abc91 block?.size?.x",e.id,e?.size?.x);let u=e?.size?.x?e?.size?.x+(-e?.size?.width/2||0):-r,d=0;for(let p of e.children){let f=e;if(!p.size)continue;let{width:g,height:m}=p.size,{px:y,py:b}=AX(i,h);if(b!=d&&(d=b,u=e?.size?.x?e?.size?.x+(-e?.size?.width/2||0):-r,ee.debug("New row in layout for block",e.id," and child ",p.id,d)),ee.debug(`abc89 layout blocks (child) id: ${p.id} Pos: ${h} (px, py) ${y},${b} (${f?.size?.x},${f?.size?.y}) parent: ${f.id} width: ${g}${r}`),f.size){let T=g/2;p.size.x=u+r+T,ee.debug(`abc91 layout blocks (calc) px, pyid:${p.id} startingPos=X${u} new startingPosX${p.size.x} ${T} padding=${r} width=${g} halfWidth=${T} => x:${p.size.x} y:${p.size.y} ${p.widthInColumns} (width * (child?.w || 1)) / 2 ${g*(p?.widthInColumns??1)/2}`),u=p.size.x+T;let x=l.get(b)??0,k=s.get(b)??m;p.size.y=f.size.y-f.size.height/2+x+k/2+r,ee.debug(`abc88 layout blocks (calc) px, pyid:${p.id}startingPosX${u}${r}${T}=>x:${p.size.x}y:${p.size.y}${p.widthInColumns}(width * (child?.w || 1)) / 2${g*(p?.widthInColumns??1)/2}`)}p.children&&MX(p,t,r);let v=p?.widthInColumns??1;i>0&&(v=Math.min(v,i-h%i)),h+=v,ee.debug("abc88 columnsPos",p,h)}}ee.debug(`layout blocks (<==layoutBlocks) ${e.id} x: ${e?.size?.x} y: ${e?.size?.y} width: ${e?.size?.width}`)}function NX(e,{minX:t,minY:r,maxX:i,maxY:n}={minX:0,minY:0,maxX:0,maxY:0}){if(e.size&&e.id!=="root"){let{x:a,y:s,width:l,height:h}=e.size;a-l/2i&&(i=a+l/2),s+h/2>n&&(n=s+h/2)}if(e.children)for(let a of e.children)({minX:t,minY:r,maxX:i,maxY:n}=NX(a,{minX:t,minY:r,maxX:i,maxY:n}));return{minX:t,minY:r,maxX:i,maxY:n}}function _Ae(e){let t=e.getBlock("root");if(!t)return;let r=De()?.block?.padding??8;Q_(t,e,0,0,r),MX(t,e,r),ee.debug("getBlocks",JSON.stringify(t,null,2));let{minX:i,minY:n,maxX:a,maxY:s}=NX(t),l=s-n,h=a-i;return{x:i,y:n,width:h,height:l}}function LT(e,t){Qr(De())&&e&&(e.style.width=t.length*9+"px",e.style.height="12px")}function AAe(e,t){return e.intersect(t)}function RAe(e,t,r,i){var n=e.x,a=e.y,s=n-i.x,l=a-i.y,h=Math.sqrt(t*t*l*l+r*r*s*s),u=Math.abs(t*r*s/h);i.x0}function DAe(e,t,r){var i=e.x,n=e.y,a=[],s=Number.POSITIVE_INFINITY,l=Number.POSITIVE_INFINITY;typeof t.forEach=="function"?t.forEach(function(m){s=Math.min(s,m.x),l=Math.min(l,m.y)}):(s=Math.min(s,t.x),l=Math.min(l,t.y));for(var h=i-e.width/2-s,u=n-e.height/2-l,d=0;d1&&a.sort(function(m,y){var b=m.x-r.x,v=m.y-r.y,T=Math.sqrt(b*b+v*v),x=y.x-r.x,k=y.y-r.y,C=Math.sqrt(x*x+k*k);return T{n.push(l,0)},"addBorder"),s=o(l=>{n.push(0,l)},"skipBorder");t.includes("t")?(ee.debug("add top border"),a(r)):s(r),t.includes("r")?(ee.debug("add right border"),a(i)):s(i),t.includes("b")?(ee.debug("add bottom border"),a(r)):s(r),t.includes("l")?(ee.debug("add left border"),a(i)):s(i),e.attr("stroke-dasharray",n.join(" "))}function OX(e,t,r=!1){let i=e,n="default";(i?.classes?.length||0)>0&&(n=(i?.classes??[]).join(" ")),n=n+" flowchart-label";let a=0,s="",l;switch(i.type){case"round":a=5,s="rect";break;case"composite":a=0,s="composite",l=0;break;case"square":s="rect";break;case"diamond":s="question";break;case"hexagon":s="hexagon";break;case"block_arrow":s="block_arrow";break;case"odd":s="rect_left_inv_arrow";break;case"lean_right":s="lean_right";break;case"lean_left":s="lean_left";break;case"trapezoid":s="trapezoid";break;case"inv_trapezoid":s="inv_trapezoid";break;case"rect_left_inv_arrow":s="rect_left_inv_arrow";break;case"circle":s="circle";break;case"ellipse":s="ellipse";break;case"stadium":s="stadium";break;case"subroutine":s="subroutine";break;case"cylinder":s="cylinder";break;case"group":s="rect";break;case"doublecircle":s="doublecircle";break;default:s="rect"}let h=v3(i?.styles??[]),u=i.label,d=i.size??{width:0,height:0,x:0,y:0},p=t.getDiagramId();return{labelStyle:h.labelStyle,shape:s,labelText:u,rx:a,ry:a,class:n,style:h.style,id:i.id,domId:p?`${p}-${i.id}`:i.id,directions:i.directions,width:d.width,height:d.height,x:d.x,y:d.y,positioned:r,intersect:void 0,type:i.type,padding:l??Rt()?.block?.padding??0,widthInColumns:i.widthInColumns??1}}async function NAe(e,t,r){let i=OX(t,r,!1);if(i.type==="group")return;let n=Rt(),a=await MAe(e,i,{config:n}),s=a.node().getBBox(),l=r.getBlock(i.id);l.size={width:s.width,height:s.height,x:0,y:0,node:a},r.setBlock(l),a.remove()}async function OAe(e,t,r){let i=OX(t,r,!0);if(r.getBlock(i.id).type!=="space"){let n=Rt();await MAe(e,i,{config:n}),t.intersect=i?.intersect,cyt(i)}}async function eA(e,t,r,i){for(let n of t)await i(e,n,r),n.children&&await eA(e,n.children,r,i)}async function BAe(e,t,r){await eA(e,t,r,NAe)}async function PAe(e,t,r){await eA(e,t,r,OAe)}async function FAe(e,t,r,i,n){let a=new ln({multigraph:!0,compound:!0});a.setGraph({rankdir:"TB",nodesep:10,ranksep:10,marginx:8,marginy:8});for(let s of r)s.size&&a.setNode(s.id,{width:s.size.width,height:s.size.height,intersect:s.intersect});for(let s of t)if(s.start&&s.end){let l=i.getBlock(s.start),h=i.getBlock(s.end);if(l?.size&&h?.size){let u=l.size,d=h.size,p=[{x:u.x,y:u.y},{x:u.x+(d.x-u.x)/2,y:u.y+(d.y-u.y)/2},{x:d.x,y:d.y}],f=n?`${n}-${s.id}`:s.id,g=s.thickness==="thick"?"edge-thickness-thick":"edge-thickness-normal",m=s.pattern==="dotted"?"edge-pattern-dotted":"edge-pattern-solid",y=`${g} ${m} flowchart-link LS-a1 LE-b1`;$1t(e,{v:s.start,w:s.end,name:f},{...s,id:f,arrowTypeEnd:s.arrowTypeEnd,arrowTypeStart:s.arrowTypeStart,points:p,classes:y},void 0,"block",a,n),s.label&&(await _1t(e,{...s,label:s.label,labelStyle:"stroke: #333; stroke-width: 1.5px;fill:none;",arrowTypeEnd:s.arrowTypeEnd,arrowTypeStart:s.arrowTypeStart,points:p,classes:y}),A1t({...s,x:p[1].x,y:p[1].y},{originalPath:p}))}}}var SX,jmt,Ul,$X,_X,hAe,uAe,Gmt,bAe,Z_,IX,Wmt,Umt,Vmt,Ymt,xAe,DX,$T,Hmt,dAe,Xmt,Kmt,Zmt,Qmt,Jmt,e1t,t1t,r1t,i1t,n1t,a1t,s1t,o1t,l1t,EX,c1t,h1t,u1t,d1t,p1t,f1t,g1t,m1t,y1t,v1t,b1t,x1t,T1t,k1t,C1t,w1t,Wl,E1t,S1t,pAe,RX,ts,_1t,A1t,R1t,L1t,fAe,$1t,I1t,D1t,M1t,LAe,N1t,O1t,B1t,P1t,F1t,Yi,ia,gn,z1t,q1t,gAe,wo,mAe,j1t,G1t,W1t,U1t,V1t,Y1t,H1t,X1t,K1t,Z1t,Q1t,J1t,eyt,tyt,ryt,iyt,nyt,ayt,syt,yAe,oyt,lyt,vAe,K_,MAe,cyt,hyt,uyt,dyt,pyt,qAe=Tt(()=>{nf();Rc();ds();la();Fn();An();Or();Yr();tr();Zt();vt();SX=(function(){var e=o(function(x,k,C,E){for(C=C||{},E=x.length;E--;C[x[E]]=k);return C},"o"),t=[1,15],r=[1,7],i=[1,13],n=[1,14],a=[1,19],s=[1,16],l=[1,17],h=[1,18],u=[8,30],d=[8,10,21,28,29,30,31,39,43,46],p=[1,23],f=[1,24],g=[8,10,15,16,21,28,29,30,31,39,43,46],m=[8,10,15,16,21,27,28,29,30,31,39,43,46],y=[1,49],b={trace:o(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:o(function(x,k,C,E,w,_,L){var N=_.length-1;switch(w){case 4:E.getLogger().debug("Rule: separator (NL) ");break;case 5:E.getLogger().debug("Rule: separator (Space) ");break;case 6:E.getLogger().debug("Rule: separator (EOF) ");break;case 7:E.getLogger().debug("Rule: hierarchy: ",_[N-1]),E.setHierarchy(_[N-1]);break;case 8:E.getLogger().debug("Stop NL ");break;case 9:E.getLogger().debug("Stop EOF ");break;case 10:E.getLogger().debug("Stop NL2 ");break;case 11:E.getLogger().debug("Stop EOF2 ");break;case 12:E.getLogger().debug("Rule: statement: ",_[N]),typeof _[N].length=="number"?this.$=_[N]:this.$=[_[N]];break;case 13:E.getLogger().debug("Rule: statement #2: ",_[N-1]),this.$=[_[N-1]].concat(_[N]);break;case 14:E.getLogger().debug("Rule: link: ",_[N],x),this.$={edgeTypeStr:_[N],label:""};break;case 15:E.getLogger().debug("Rule: LABEL link: ",_[N-3],_[N-1],_[N]),this.$={edgeTypeStr:_[N],label:_[N-1]};break;case 18:let D=parseInt(_[N]),M=E.generateId();this.$={id:M,type:"space",label:"",width:D,children:[]};break;case 23:E.getLogger().debug("Rule: (nodeStatement link node) ",_[N-2],_[N-1],_[N]," typestr: ",_[N-1].edgeTypeStr);let B=E.edgeStrToEdgeData(_[N-1].edgeTypeStr),A=E.edgeStrToEdgeStartData(_[N-1].edgeTypeStr),I=E.edgeStrToThickness(_[N-1].edgeTypeStr),O=E.edgeStrToPattern(_[N-1].edgeTypeStr);this.$=[{id:_[N-2].id,label:_[N-2].label,type:_[N-2].type,directions:_[N-2].directions},{id:_[N-2].id+"-"+_[N].id,start:_[N-2].id,end:_[N].id,label:_[N-1].label,type:"edge",thickness:I,pattern:O,directions:_[N].directions,arrowTypeEnd:B,arrowTypeStart:A},{id:_[N].id,label:_[N].label,type:E.typeStr2Type(_[N].typeStr),directions:_[N].directions}];break;case 24:E.getLogger().debug("Rule: nodeStatement (abc88 node size) ",_[N-1],_[N]),this.$={id:_[N-1].id,label:_[N-1].label,type:E.typeStr2Type(_[N-1].typeStr),directions:_[N-1].directions,widthInColumns:parseInt(_[N],10)};break;case 25:E.getLogger().debug("Rule: nodeStatement (node) ",_[N]),this.$={id:_[N].id,label:_[N].label,type:E.typeStr2Type(_[N].typeStr),directions:_[N].directions,widthInColumns:1};break;case 26:E.getLogger().debug("APA123",this?this:"na"),E.getLogger().debug("COLUMNS: ",_[N]),this.$={type:"column-setting",columns:_[N]==="auto"?-1:parseInt(_[N])};break;case 27:E.getLogger().debug("Rule: id-block statement : ",_[N-2],_[N-1]);let R=E.generateId();this.$={..._[N-2],type:"composite",children:_[N-1]};break;case 28:E.getLogger().debug("Rule: blockStatement : ",_[N-2],_[N-1],_[N]);let $=E.generateId();this.$={id:$,type:"composite",label:"",children:_[N-1]};break;case 29:E.getLogger().debug("Rule: node (NODE_ID separator): ",_[N]),this.$={id:_[N]};break;case 30:E.getLogger().debug("Rule: node (NODE_ID nodeShapeNLabel separator): ",_[N-1],_[N]),this.$={id:_[N-1],label:_[N].label,typeStr:_[N].typeStr,directions:_[N].directions};break;case 31:E.getLogger().debug("Rule: dirList: ",_[N]),this.$=[_[N]];break;case 32:E.getLogger().debug("Rule: dirList: ",_[N-1],_[N]),this.$=[_[N-1]].concat(_[N]);break;case 33:E.getLogger().debug("Rule: nodeShapeNLabel: ",_[N-2],_[N-1],_[N]),this.$={typeStr:_[N-2]+_[N],label:_[N-1]};break;case 34:E.getLogger().debug("Rule: BLOCK_ARROW nodeShapeNLabel: ",_[N-3],_[N-2]," #3:",_[N-1],_[N]),this.$={typeStr:_[N-3]+_[N],label:_[N-2],directions:_[N-1]};break;case 35:case 36:this.$={type:"classDef",id:_[N-1].trim(),css:_[N].trim()};break;case 37:this.$={type:"applyClass",id:_[N-1].trim(),styleClass:_[N].trim()};break;case 38:this.$={type:"applyStyles",id:_[N-1].trim(),stylesStr:_[N].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:i,29:n,31:a,39:s,43:l,46:h},{8:[1,20]},e(u,[2,12],{13:4,19:5,20:6,22:8,23:9,24:10,25:11,26:12,11:21,10:t,21:r,28:i,29:n,31:a,39:s,43:l,46:h}),e(d,[2,16],{14:22,15:p,16:f}),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(g,[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:i,29:n,31:a,39:s,43:l,46:h},{40:[1,28],42:[1,29]},{44:[1,30]},{47:[1,31]},e(m,[2,29],{32:32,35:[1,33],37:[1,34]}),{1:[2,7]},e(u,[2,13]),{26:35,31:a},{31:[2,14]},{17:[1,36]},e(g,[2,24]),{10:t,11:37,13:4,14:22,15:p,16:f,19:5,20:6,21:r,22:8,23:9,24:10,25:11,26:12,28:i,29:n,31:a,39:s,43:l,46:h},{30:[1,38]},{41:[1,39]},{41:[1,40]},{45:[1,41]},{48:[1,42]},e(m,[2,30]),{18:[1,43]},{18:[1,44]},e(g,[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(m,[2,33]),{38:[1,51]},{33:52,34:y,38:[2,31]},{31:[2,15]},e(m,[2,34]),{38:[2,32]}],defaultActions:{20:[2,7],23:[2,14],50:[2,15],52:[2,32]},parseError:o(function(x,k){if(k.recoverable)this.trace(x);else{var C=new Error(x);throw C.hash=k,C}},"parseError"),parse:o(function(x){var k=this,C=[0],E=[],w=[null],_=[],L=this.table,N="",D=0,M=0,B=0,A=2,I=1,O=_.slice.call(arguments,1),R=Object.create(this.lexer),$={yy:{}};for(var F in this.yy)Object.prototype.hasOwnProperty.call(this.yy,F)&&($.yy[F]=this.yy[F]);R.setInput(x,$.yy),$.yy.lexer=R,$.yy.parser=this,typeof R.yylloc>"u"&&(R.yylloc={});var P=R.yylloc;_.push(P);var z=R.options&&R.options.ranges;typeof $.yy.parseError=="function"?this.parseError=$.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function q(oe){C.length=C.length-2*oe,w.length=w.length-oe,_.length=_.length-oe}o(q,"popStack");function G(){var oe;return oe=E.pop()||R.lex()||I,typeof oe!="number"&&(oe instanceof Array&&(E=oe,oe=E.pop()),oe=k.symbols_[oe]||oe),oe}o(G,"lex");for(var W,J,H,Z,se,Q,te={},re,ne,Ae,ie;;){if(H=C[C.length-1],this.defaultActions[H]?Z=this.defaultActions[H]:((W===null||typeof W>"u")&&(W=G()),Z=L[H]&&L[H][W]),typeof Z>"u"||!Z.length||!Z[0]){var me="";ie=[];for(re in L[H])this.terminals_[re]&&re>A&&ie.push("'"+this.terminals_[re]+"'");R.showPosition?me="Parse error on line "+(D+1)+`: +`+R.showPosition()+` +Expecting `+ie.join(", ")+", got '"+(this.terminals_[W]||W)+"'":me="Parse error on line "+(D+1)+": Unexpected "+(W==I?"end of input":"'"+(this.terminals_[W]||W)+"'"),this.parseError(me,{text:R.match,token:this.terminals_[W]||W,line:R.yylineno,loc:P,expected:ie})}if(Z[0]instanceof Array&&Z.length>1)throw new Error("Parse Error: multiple actions possible at state: "+H+", token: "+W);switch(Z[0]){case 1:C.push(W),w.push(R.yytext),_.push(R.yylloc),C.push(Z[1]),W=null,J?(W=J,J=null):(M=R.yyleng,N=R.yytext,D=R.yylineno,P=R.yylloc,B>0&&B--);break;case 2:if(ne=this.productions_[Z[1]][1],te.$=w[w.length-ne],te._$={first_line:_[_.length-(ne||1)].first_line,last_line:_[_.length-1].last_line,first_column:_[_.length-(ne||1)].first_column,last_column:_[_.length-1].last_column},z&&(te._$.range=[_[_.length-(ne||1)].range[0],_[_.length-1].range[1]]),Q=this.performAction.apply(te,[N,M,D,$.yy,Z[1],w,_].concat(O)),typeof Q<"u")return Q;ne&&(C=C.slice(0,-1*ne*2),w=w.slice(0,-1*ne),_=_.slice(0,-1*ne)),C.push(this.productions_[Z[1]][0]),w.push(te.$),_.push(te._$),Ae=L[C[C.length-2]][C[C.length-1]],C.push(Ae);break;case 3:return!0}}return!0},"parse")},v=(function(){var x={EOF:1,parseError:o(function(k,C){if(this.yy.parser)this.yy.parser.parseError(k,C);else throw new Error(k)},"parseError"),setInput:o(function(k,C){return this.yy=C||this.yy||{},this._input=k,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:o(function(){var k=this._input[0];this.yytext+=k,this.yyleng++,this.offset++,this.match+=k,this.matched+=k;var C=k.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),k},"input"),unput:o(function(k){var C=k.length,E=k.split(/(?:\r\n?|\n)/g);this._input=k+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-C),this.offset-=C;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),E.length-1&&(this.yylineno-=E.length-1);var _=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:E?(E.length===w.length?this.yylloc.first_column:0)+w[w.length-E.length].length-E[0].length:this.yylloc.first_column-C},this.options.ranges&&(this.yylloc.range=[_[0],_[0]+this.yyleng-C]),this.yyleng=this.yytext.length,this},"unput"),more:o(function(){return this._more=!0,this},"more"),reject:o(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:o(function(k){this.unput(this.match.slice(k))},"less"),pastInput:o(function(){var k=this.matched.substr(0,this.matched.length-this.match.length);return(k.length>20?"...":"")+k.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:o(function(){var k=this.match;return k.length<20&&(k+=this._input.substr(0,20-k.length)),(k.substr(0,20)+(k.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:o(function(){var k=this.pastInput(),C=new Array(k.length+1).join("-");return k+this.upcomingInput()+` +`+C+"^"},"showPosition"),test_match:o(function(k,C){var E,w,_;if(this.options.backtrack_lexer&&(_={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(_.yylloc.range=this.yylloc.range.slice(0))),w=k[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+k[0].length},this.yytext+=k[0],this.match+=k[0],this.matches=k,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(k[0].length),this.matched+=k[0],E=this.performAction.call(this,this.yy,this,C,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),E)return E;if(this._backtrack){for(var L in _)this[L]=_[L];return!1}return!1},"test_match"),next:o(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var k,C,E,w;this._more||(this.yytext="",this.match="");for(var _=this._currentRules(),L=0;L<_.length;L++)if(E=this._input.match(this.rules[_[L]]),E&&(!C||E[0].length>C[0].length)){if(C=E,w=L,this.options.backtrack_lexer){if(k=this.test_match(E,_[L]),k!==!1)return k;if(this._backtrack){C=!1;continue}else return!1}else if(!this.options.flex)break}return C?(k=this.test_match(C,_[w]),k!==!1?k:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:o(function(){var k=this.next();return k||this.lex()},"lex"),begin:o(function(k){this.conditionStack.push(k)},"begin"),popState:o(function(){var k=this.conditionStack.length-1;return k>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:o(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:o(function(k){return k=this.conditionStack.length-1-Math.abs(k||0),k>=0?this.conditionStack[k]:"INITIAL"},"topState"),pushState:o(function(k){this.begin(k)},"pushState"),stateStackSize:o(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:o(function(k,C,E,w){var _=w;switch(E){case 0:return k.getLogger().debug("Found block-beta"),10;case 1:return k.getLogger().debug("Found id-block"),29;case 2:return k.getLogger().debug("Found block"),10;case 3:k.getLogger().debug(".",C.yytext);break;case 4:k.getLogger().debug("_",C.yytext);break;case 5:return 5;case 6:return C.yytext=-1,28;case 7:return C.yytext=C.yytext.replace(/columns\s+/,""),k.getLogger().debug("COLUMNS (LEX)",C.yytext),28;case 8:this.pushState("md_string");break;case 9:return"MD_STR";case 10:this.popState();break;case 11:this.pushState("string");break;case 12:k.getLogger().debug("LEX: POPPING STR:",C.yytext),this.popState();break;case 13:return k.getLogger().debug("LEX: STR end:",C.yytext),"STR";case 14:return C.yytext=C.yytext.replace(/space\:/,""),k.getLogger().debug("SPACE NUM (LEX)",C.yytext),21;case 15:return C.yytext="1",k.getLogger().debug("COLUMNS (LEX)",C.yytext),21;case 16:return 42;case 17:return"LINKSTYLE";case 18:return"INTERPOLATE";case 19:return this.pushState("CLASSDEF"),39;case 20:return this.popState(),this.pushState("CLASSDEFID"),"DEFAULT_CLASSDEF_ID";case 21:return this.popState(),this.pushState("CLASSDEFID"),40;case 22:return this.popState(),41;case 23:return this.pushState("CLASS"),43;case 24:return this.popState(),this.pushState("CLASS_STYLE"),44;case 25:return this.popState(),45;case 26:return this.pushState("STYLE_STMNT"),46;case 27:return this.popState(),this.pushState("STYLE_DEFINITION"),47;case 28:return this.popState(),48;case 29:return this.pushState("acc_title"),"acc_title";case 30:return this.popState(),"acc_title_value";case 31:return this.pushState("acc_descr"),"acc_descr";case 32:return this.popState(),"acc_descr_value";case 33:this.pushState("acc_descr_multiline");break;case 34:this.popState();break;case 35:return"acc_descr_multiline_value";case 36:return 30;case 37:return this.popState(),k.getLogger().debug("Lex: (("),"NODE_DEND";case 38:return this.popState(),k.getLogger().debug("Lex: (("),"NODE_DEND";case 39:return this.popState(),k.getLogger().debug("Lex: ))"),"NODE_DEND";case 40:return this.popState(),k.getLogger().debug("Lex: (("),"NODE_DEND";case 41:return this.popState(),k.getLogger().debug("Lex: (("),"NODE_DEND";case 42:return this.popState(),k.getLogger().debug("Lex: (-"),"NODE_DEND";case 43:return this.popState(),k.getLogger().debug("Lex: -)"),"NODE_DEND";case 44:return this.popState(),k.getLogger().debug("Lex: (("),"NODE_DEND";case 45:return this.popState(),k.getLogger().debug("Lex: ]]"),"NODE_DEND";case 46:return this.popState(),k.getLogger().debug("Lex: ("),"NODE_DEND";case 47:return this.popState(),k.getLogger().debug("Lex: ])"),"NODE_DEND";case 48:return this.popState(),k.getLogger().debug("Lex: /]"),"NODE_DEND";case 49:return this.popState(),k.getLogger().debug("Lex: /]"),"NODE_DEND";case 50:return this.popState(),k.getLogger().debug("Lex: )]"),"NODE_DEND";case 51:return this.popState(),k.getLogger().debug("Lex: )"),"NODE_DEND";case 52:return this.popState(),k.getLogger().debug("Lex: ]>"),"NODE_DEND";case 53:return this.popState(),k.getLogger().debug("Lex: ]"),"NODE_DEND";case 54:return k.getLogger().debug("Lexa: -)"),this.pushState("NODE"),35;case 55:return k.getLogger().debug("Lexa: (-"),this.pushState("NODE"),35;case 56:return k.getLogger().debug("Lexa: ))"),this.pushState("NODE"),35;case 57:return k.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;case 58:return k.getLogger().debug("Lex: ((("),this.pushState("NODE"),35;case 59:return k.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;case 60:return k.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;case 61:return k.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;case 62:return k.getLogger().debug("Lexc: >"),this.pushState("NODE"),35;case 63:return k.getLogger().debug("Lexa: (["),this.pushState("NODE"),35;case 64:return k.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;case 65:return this.pushState("NODE"),35;case 66:return this.pushState("NODE"),35;case 67:return this.pushState("NODE"),35;case 68:return this.pushState("NODE"),35;case 69:return this.pushState("NODE"),35;case 70:return this.pushState("NODE"),35;case 71:return this.pushState("NODE"),35;case 72:return k.getLogger().debug("Lexa: ["),this.pushState("NODE"),35;case 73:return this.pushState("BLOCK_ARROW"),k.getLogger().debug("LEX ARR START"),37;case 74:return k.getLogger().debug("Lex: NODE_ID",C.yytext),31;case 75:return k.getLogger().debug("Lex: EOF",C.yytext),8;case 76:this.pushState("md_string");break;case 77:this.pushState("md_string");break;case 78:return"NODE_DESCR";case 79:this.popState();break;case 80:k.getLogger().debug("Lex: Starting string"),this.pushState("string");break;case 81:k.getLogger().debug("LEX ARR: Starting string"),this.pushState("string");break;case 82:return k.getLogger().debug("LEX: NODE_DESCR:",C.yytext),"NODE_DESCR";case 83:k.getLogger().debug("LEX POPPING"),this.popState();break;case 84:k.getLogger().debug("Lex: =>BAE"),this.pushState("ARROW_DIR");break;case 85:return C.yytext=C.yytext.replace(/^,\s*/,""),k.getLogger().debug("Lex (right): dir:",C.yytext),"DIR";case 86:return C.yytext=C.yytext.replace(/^,\s*/,""),k.getLogger().debug("Lex (left):",C.yytext),"DIR";case 87:return C.yytext=C.yytext.replace(/^,\s*/,""),k.getLogger().debug("Lex (x):",C.yytext),"DIR";case 88:return C.yytext=C.yytext.replace(/^,\s*/,""),k.getLogger().debug("Lex (y):",C.yytext),"DIR";case 89:return C.yytext=C.yytext.replace(/^,\s*/,""),k.getLogger().debug("Lex (up):",C.yytext),"DIR";case 90:return C.yytext=C.yytext.replace(/^,\s*/,""),k.getLogger().debug("Lex (down):",C.yytext),"DIR";case 91:return C.yytext="]>",k.getLogger().debug("Lex (ARROW_DIR end):",C.yytext),this.popState(),this.popState(),"BLOCK_ARROW_END";case 92:return k.getLogger().debug("Lex: LINK","#"+C.yytext+"#"),15;case 93:return k.getLogger().debug("Lex: LINK",C.yytext),15;case 94:return k.getLogger().debug("Lex: LINK",C.yytext),15;case 95:return k.getLogger().debug("Lex: LINK",C.yytext),15;case 96:return k.getLogger().debug("Lex: START_LINK",C.yytext),this.pushState("LLABEL"),16;case 97:return k.getLogger().debug("Lex: START_LINK",C.yytext),this.pushState("LLABEL"),16;case 98:return k.getLogger().debug("Lex: START_LINK",C.yytext),this.pushState("LLABEL"),16;case 99:this.pushState("md_string");break;case 100:return k.getLogger().debug("Lex: Starting string"),this.pushState("string"),"LINK_LABEL";case 101:return this.popState(),k.getLogger().debug("Lex: LINK","#"+C.yytext+"#"),15;case 102:return this.popState(),k.getLogger().debug("Lex: LINK",C.yytext),15;case 103:return this.popState(),k.getLogger().debug("Lex: LINK",C.yytext),15;case 104:return k.getLogger().debug("Lex: COLON",C.yytext),C.yytext=C.yytext.slice(1),27}},"anonymous"),rules:[/^(?:block-beta\b)/,/^(?:block:)/,/^(?:block\b)/,/^(?:[\s]+)/,/^(?:[\n]+)/,/^(?:((\u000D\u000A)|(\u000A)))/,/^(?:columns\s+auto\b)/,/^(?:columns\s+[\d]+)/,/^(?:["][`])/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:space[:]\d+)/,/^(?:space\b)/,/^(?:default\b)/,/^(?:linkStyle\b)/,/^(?:interpolate\b)/,/^(?:classDef\s+)/,/^(?:DEFAULT\s+)/,/^(?:\w+\s+)/,/^(?:[^\n]*)/,/^(?:class\s+)/,/^(?:(\w+)+((,\s*\w+)*))/,/^(?:[^\n]*)/,/^(?:style\s+)/,/^(?:(\w+)+((,\s*\w+)*))/,/^(?:[^\n]*)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:end\b\s*)/,/^(?:\(\(\()/,/^(?:\)\)\))/,/^(?:[\)]\))/,/^(?:\}\})/,/^(?:\})/,/^(?:\(-)/,/^(?:-\))/,/^(?:\(\()/,/^(?:\]\])/,/^(?:\()/,/^(?:\]\))/,/^(?:\\\])/,/^(?:\/\])/,/^(?:\)\])/,/^(?:[\)])/,/^(?:\]>)/,/^(?:[\]])/,/^(?:-\))/,/^(?:\(-)/,/^(?:\)\))/,/^(?:\))/,/^(?:\(\(\()/,/^(?:\(\()/,/^(?:\{\{)/,/^(?:\{)/,/^(?:>)/,/^(?:\(\[)/,/^(?:\()/,/^(?:\[\[)/,/^(?:\[\|)/,/^(?:\[\()/,/^(?:\)\)\))/,/^(?:\[\\)/,/^(?:\[\/)/,/^(?:\[\\)/,/^(?:\[)/,/^(?:<\[)/,/^(?:[^\(\[\n\-\)\{\}\s\<\>:=]+)/,/^(?:$)/,/^(?:["][`])/,/^(?:["][`])/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["])/,/^(?:["])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:\]>\s*\()/,/^(?:,?\s*right\s*)/,/^(?:,?\s*left\s*)/,/^(?:,?\s*x\s*)/,/^(?:,?\s*y\s*)/,/^(?:,?\s*up\s*)/,/^(?:,?\s*down\s*)/,/^(?:\)\s*)/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?:\s*~~[\~]+\s*)/,/^(?:\s*[xo<]?--\s*)/,/^(?:\s*[xo<]?==\s*)/,/^(?:\s*[xo<]?-\.\s*)/,/^(?:["][`])/,/^(?:["])/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?::\d+)/],conditions:{STYLE_DEFINITION:{rules:[28],inclusive:!1},STYLE_STMNT:{rules:[27],inclusive:!1},CLASSDEFID:{rules:[22],inclusive:!1},CLASSDEF:{rules:[20,21],inclusive:!1},CLASS_STYLE:{rules:[25],inclusive:!1},CLASS:{rules:[24],inclusive:!1},LLABEL:{rules:[99,100,101,102,103],inclusive:!1},ARROW_DIR:{rules:[85,86,87,88,89,90,91],inclusive:!1},BLOCK_ARROW:{rules:[76,81,84],inclusive:!1},NODE:{rules:[37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,77,80],inclusive:!1},md_string:{rules:[9,10,78,79],inclusive:!1},space:{rules:[],inclusive:!1},string:{rules:[12,13,82,83],inclusive:!1},acc_descr_multiline:{rules:[34,35],inclusive:!1},acc_descr:{rules:[32],inclusive:!1},acc_title:{rules:[30],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,11,14,15,16,17,18,19,23,26,29,31,33,36,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,92,93,94,95,96,97,98,104],inclusive:!0}}};return x})();b.lexer=v;function T(){this.yy={}}return o(T,"Parser"),T.prototype=b,b.Parser=T,new T})();SX.parser=SX;jmt=SX,Ul=new Map,$X=[],_X=new Map,hAe="color",uAe="fill",Gmt="bgFill",bAe=",",Z_=new Map,IX="",Wmt=o(e=>ft.sanitizeText(e,De()),"sanitizeText"),Umt=o(function(e,t=""){let r=Z_.get(e);r||(r={id:e,styles:[],textStyles:[]},Z_.set(e,r)),t?.split(bAe).forEach(i=>{let n=i.replace(/([^;]*);/,"$1").trim();if(RegExp(hAe).exec(i)){let a=n.replace(uAe,Gmt).replace(hAe,uAe);r.textStyles.push(a)}r.styles.push(n)})},"addStyleClass"),Vmt=o(function(e,t=""){let r=Ul.get(e);t!=null&&(r.styles=t.split(bAe))},"addStyle2Node"),Ymt=o(function(e,t){e.split(",").forEach(function(r){let i=Ul.get(r);if(i===void 0){let n=r.trim();i={id:n,type:"na",children:[]},Ul.set(n,i)}i.classes||(i.classes=[]),i.classes.push(t)})},"setCssClass"),xAe=o((e,t)=>{let r=e.flat(),i=[],n=r.find(a=>a?.type==="column-setting")?.columns??-1;for(let a of r){if(typeof n=="number"&&n>0&&a.type!=="column-setting"&&typeof a.widthInColumns=="number"&&a.widthInColumns>n&&ee.warn(`Block ${a.id} width ${a.widthInColumns} exceeds configured column width ${n}`),a.label&&(a.label=Wmt(a.label)),a.type==="classDef"){Umt(a.id,a.css);continue}if(a.type==="applyClass"){Ymt(a.id,a?.styleClass??"");continue}if(a.type==="applyStyles"){a?.stylesStr&&Vmt(a.id,a?.stylesStr);continue}if(a.type==="column-setting")t.columns=a.columns??-1;else if(a.type==="edge"){let s=(_X.get(a.id)??0)+1;_X.set(a.id,s),a.id=s+"-"+a.id,$X.push(a)}else{a.label||(a.type==="composite"?a.label="":a.label=a.id);let s=Ul.get(a.id);if(s===void 0?Ul.set(a.id,a):(a.type!=="na"&&(s.type=a.type),a.label!==a.id&&(s.label=a.label)),a.children&&xAe(a.children,a),a.type==="space"){let l=a.width??1;for(let h=0;h{ee.debug("Clear called"),ar(),$T={id:"root",type:"composite",children:[],columns:-1},Ul=new Map([["root",$T]]),DX=[],Z_=new Map,$X=[],_X=new Map,IX=""},"clear");o(TAe,"typeStr2Type");o(kAe,"edgeTypeStr2Type");o(CAe,"edgeStrToEdgeData");o(wAe,"edgeStrToEdgeStartData");o(EAe,"edgeStrToThickness");o(SAe,"edgeStrToPattern");dAe=0,Xmt=o(()=>(dAe++,"id-"+Math.random().toString(36).substr(2,12)+"-"+dAe),"generateId"),Kmt=o(e=>{$T.children=e,xAe(e,$T),DX=$T.children},"setHierarchy"),Zmt=o(e=>{let t=Ul.get(e);return t?t.columns?t.columns:t.children?t.children.length:-1:-1},"getColumns"),Qmt=o(()=>[...Ul.values()],"getBlocksFlat"),Jmt=o(()=>DX||[],"getBlocks"),e1t=o(()=>$X,"getEdges"),t1t=o(e=>Ul.get(e),"getBlock"),r1t=o(e=>{Ul.set(e.id,e)},"setBlock"),i1t=o(e=>{IX=e},"setDiagramId"),n1t=o(()=>IX,"getDiagramId"),a1t=o(()=>ee,"getLogger"),s1t=o(function(){return Z_},"getClasses"),o1t={getConfig:o(()=>Rt().block,"getConfig"),typeStr2Type:TAe,edgeTypeStr2Type:kAe,edgeStrToEdgeData:CAe,edgeStrToEdgeStartData:wAe,edgeStrToThickness:EAe,edgeStrToPattern:SAe,getLogger:a1t,getBlocksFlat:Qmt,getBlocks:Jmt,getEdges:e1t,setHierarchy:Kmt,getBlock:t1t,setBlock:r1t,getColumns:Zmt,getClasses:s1t,clear:Hmt,generateId:Xmt,setDiagramId:i1t,getDiagramId:n1t},l1t=o1t,EX=o((e,t)=>{let r=v0,i=r(e,"r"),n=r(e,"g"),a=r(e,"b");return Ds(i,n,a,t)},"fade"),c1t=o(e=>`.label { + font-family: ${e.fontFamily}; + color: ${e.nodeTextColor||e.textColor}; + } + .cluster-label text { + fill: ${e.titleColor}; + } + .cluster-label span,p { + color: ${e.titleColor}; + } + + + + .label text,span,p { + fill: ${e.nodeTextColor||e.textColor}; + color: ${e.nodeTextColor||e.textColor}; + } + + .node rect, + .node circle, + .node ellipse, + .node polygon, + .node path { + fill: ${e.mainBkg}; + stroke: ${e.nodeBorder}; + stroke-width: 1px; + } + .flowchart-label text { + text-anchor: middle; + } + // .flowchart-label .text-outer-tspan { + // text-anchor: middle; + // } + // .flowchart-label .text-inner-tspan { + // text-anchor: start; + // } + + .node .label { + text-align: center; + } + .node.clickable { + cursor: pointer; + } + + .arrowheadPath { + fill: ${e.arrowheadColor}; + } + + .edgePath .path { + stroke: ${e.lineColor}; + stroke-width: 2.0px; + } + + .flowchart-link { + stroke: ${e.lineColor}; + fill: none; + } + + .edgeLabel { + background-color: ${e.edgeLabelBackground}; + /* + * 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: ${EX(e.mainBkg,.5)}; + fill: ${EX(e.clusterBkg,.5)}; + stroke: ${EX(e.clusterBorder,.2)}; + box-shadow: rgba(50, 50, 93, 0.25) 0px 13px 27px -5px, rgba(0, 0, 0, 0.3) 0px 8px 16px -8px; + stroke-width: 1px; + } + + .cluster text { + fill: ${e.titleColor}; + } + + .cluster span,p { + color: ${e.titleColor}; + } + /* .cluster div { + color: ${e.titleColor}; + } */ + + div.mermaidTooltip { + position: absolute; + text-align: center; + max-width: 200px; + padding: 2px; + font-family: ${e.fontFamily}; + font-size: 12px; + background: ${e.tertiaryColor}; + border: 1px solid ${e.border2}; + border-radius: 2px; + pointer-events: none; + z-index: 100; + } + + .flowchartTitleText { + text-anchor: middle; + font-size: 18px; + fill: ${e.textColor}; + } + ${Ac()} +`,"getStyles"),h1t=c1t,u1t=o((e,t,r,i)=>{t.forEach(n=>{T1t[n](e,r,i)})},"insertMarkers"),d1t=o((e,t,r)=>{ee.trace("Making markers for ",r),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionStart").attr("class","marker extension "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 1,7 L18,13 V 1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionEnd").attr("class","marker extension "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z")},"extension"),p1t=o((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionStart").attr("class","marker composition "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionEnd").attr("class","marker composition "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"composition"),f1t=o((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationStart").attr("class","marker aggregation "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationEnd").attr("class","marker aggregation "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"aggregation"),g1t=o((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyStart").attr("class","marker dependency "+t).attr("refX",6).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyEnd").attr("class","marker dependency "+t).attr("refX",13).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"dependency"),m1t=o((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopStart").attr("class","marker lollipop "+t).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopEnd").attr("class","marker lollipop "+t).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6)},"lollipop"),y1t=o((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-pointEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",6).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",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",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 5 L 10 10 L 10 0 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},"point"),v1t=o((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-circleEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",11).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-circleStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",-1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},"circle"),b1t=o((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-crossEnd").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",12).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-crossStart").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",-1).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0")},"cross"),x1t=o((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","strokeWidth").attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"barb"),T1t={extension:d1t,composition:p1t,aggregation:f1t,dependency:g1t,lollipop:m1t,point:y1t,circle:v1t,cross:b1t,barb:x1t},k1t=u1t;o(AX,"calculateBlockPosition");C1t=o(e=>{let t=0,r=0;for(let i of e.children){let{width:n,height:a,x:s,y:l}=i.size??{width:0,height:0,x:0,y:0};if(ee.debug("getMaxChildSize abc95 child:",i.id,"width:",n,"height:",a,"x:",s,"y:",l,i.type),i.type==="space")continue;let h=n/(i.widthInColumns??1);h>t&&(t=h),a>r&&(r=a)}return{width:t,height:r}},"getMaxChildSize");o(Q_,"setBlockSizes");o(MX,"layoutBlocks");o(NX,"findBounds");o(_Ae,"layout");w1t=o(async(e,t,r,i=!1,n=!1)=>{let a=t||"";typeof a=="object"&&(a=a[0]);let s=De(),l=Qr(s);return await Rn(e,a,{style:r,isTitle:i,useHtmlLabels:l,markdown:!1,isNode:n,width:Number.POSITIVE_INFINITY},s)},"createLabel"),Wl=w1t,E1t=o((e,t,r,i,n)=>{t.arrowTypeStart&&pAe(e,"start",t.arrowTypeStart,r,i,n),t.arrowTypeEnd&&pAe(e,"end",t.arrowTypeEnd,r,i,n)},"addEdgeMarkers"),S1t={arrow_cross:"cross",arrow_point:"point",arrow_barb:"barb",arrow_circle:"circle",aggregation:"aggregation",extension:"extension",composition:"composition",dependency:"dependency",lollipop:"lollipop"},pAe=o((e,t,r,i,n,a)=>{let s=S1t[r];if(!s){ee.warn(`Unknown arrow type: ${r}`);return}let l=t==="start"?"Start":"End";e.attr(`marker-${t}`,`url(${i}#${n}_${a}-${s}${l})`)},"addEdgeMarker"),RX={},ts={},_1t=o(async(e,t)=>{let r=De(),i=Qr(r),n=e.insert("g").attr("class","edgeLabel"),a=n.insert("g").attr("class","label"),s=t.labelType==="markdown",l=await Rn(e,t.label,{style:t.labelStyle,useHtmlLabels:i,addSvgBackground:s,isNode:!1,markdown:s,width:s?void 0:Number.POSITIVE_INFINITY},r);a.node().appendChild(l);let h=l.getBBox(),u=h;if(i){let p=l.children[0],f=tt(l);h=p.getBoundingClientRect(),u=h,f.attr("width",h.width),f.attr("height",h.height)}else{let p=tt(l).select("text").node();p&&typeof p.getBBox=="function"&&(u=p.getBBox())}a.attr("transform",Oo(u,i)),RX[t.id]=n,t.width=h.width,t.height=h.height;let d;if(t.startLabelLeft){let p=e.insert("g").attr("class","edgeTerminals"),f=p.insert("g").attr("class","inner"),g=await Wl(f,t.startLabelLeft,t.labelStyle);d=g;let m=g.getBBox();if(i){let y=g.children[0],b=tt(g);m=y.getBoundingClientRect(),b.attr("width",m.width),b.attr("height",m.height)}f.attr("transform",Oo(m,i)),ts[t.id]||(ts[t.id]={}),ts[t.id].startLeft=p,LT(d,t.startLabelLeft)}if(t.startLabelRight){let p=e.insert("g").attr("class","edgeTerminals"),f=p.insert("g").attr("class","inner"),g=await Wl(f,t.startLabelRight,t.labelStyle);d=g;let m=g.getBBox();if(i){let y=g.children[0],b=tt(g);m=y.getBoundingClientRect(),b.attr("width",m.width),b.attr("height",m.height)}f.attr("transform",Oo(m,i)),ts[t.id]||(ts[t.id]={}),ts[t.id].startRight=p,LT(d,t.startLabelRight)}if(t.endLabelLeft){let p=e.insert("g").attr("class","edgeTerminals"),f=p.insert("g").attr("class","inner"),g=await Wl(p,t.endLabelLeft,t.labelStyle);d=g;let m=g.getBBox();if(i){let y=g.children[0],b=tt(g);m=y.getBoundingClientRect(),b.attr("width",m.width),b.attr("height",m.height)}f.attr("transform",Oo(m,i)),ts[t.id]||(ts[t.id]={}),ts[t.id].endLeft=p,LT(d,t.endLabelLeft)}if(t.endLabelRight){let p=e.insert("g").attr("class","edgeTerminals"),f=p.insert("g").attr("class","inner"),g=await Wl(p,t.endLabelRight,t.labelStyle);d=g;let m=g.getBBox();if(i){let y=g.children[0],b=tt(g);m=y.getBoundingClientRect(),b.attr("width",m.width),b.attr("height",m.height)}f.attr("transform",Oo(m,i)),ts[t.id]||(ts[t.id]={}),ts[t.id].endRight=p,LT(d,t.endLabelRight)}return l},"insertEdgeLabel");o(LT,"setTerminalWidth");A1t=o((e,t)=>{ee.debug("Moving label abc88 ",e.id,e.label,RX[e.id],t);let r=t.updatedPath?t.updatedPath:t.originalPath,i=De(),{subGraphTitleTotalMargin:n}=Tl(i);if(e.label){let a=RX[e.id],s=e.x,l=e.y;if(r){let h=Wt.calcLabelPosition(r);ee.debug("Moving label "+e.label+" from (",s,",",l,") to (",h.x,",",h.y,") abc88"),t.updatedPath&&(s=h.x,l=h.y)}a.attr("transform",`translate(${s}, ${l+n/2})`)}if(e.startLabelLeft){let a=ts[e.id].startLeft,s=e.x,l=e.y;if(r){let h=Wt.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_left",r);s=h.x,l=h.y}a.attr("transform",`translate(${s}, ${l})`)}if(e.startLabelRight){let a=ts[e.id].startRight,s=e.x,l=e.y;if(r){let h=Wt.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_right",r);s=h.x,l=h.y}a.attr("transform",`translate(${s}, ${l})`)}if(e.endLabelLeft){let a=ts[e.id].endLeft,s=e.x,l=e.y;if(r){let h=Wt.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_left",r);s=h.x,l=h.y}a.attr("transform",`translate(${s}, ${l})`)}if(e.endLabelRight){let a=ts[e.id].endRight,s=e.x,l=e.y;if(r){let h=Wt.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_right",r);s=h.x,l=h.y}a.attr("transform",`translate(${s}, ${l})`)}},"positionEdgeLabel"),R1t=o((e,t)=>{let r=e.x,i=e.y,n=Math.abs(t.x-r),a=Math.abs(t.y-i),s=e.width/2,l=e.height/2;return n>=s||a>=l},"outsideNode"),L1t=o((e,t,r)=>{ee.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 i=e.x,n=e.y,a=Math.abs(i-r.x),s=e.width/2,l=r.xMath.abs(i-t.x)*h){let p=r.y{ee.debug("abc88 cutPathAtIntersect",e,t);let r=[],i=e[0],n=!1;return e.forEach(a=>{if(!R1t(t,a)&&!n){let s=L1t(t,i,a),l=!1;r.forEach(h=>{l=l||h.x===s.x&&h.y===s.y}),r.some(h=>h.x===s.x&&h.y===s.y)||r.push(s),n=!0}else i=a,n||r.push(a)}),r},"cutPathAtIntersect"),$1t=o(function(e,t,r,i,n,a,s){let l=r.points;ee.debug("abc88 InsertEdge: edge=",r,"e=",t);let h=!1,u=a.node(t.v);var d=a.node(t.w);d?.intersect&&u?.intersect&&(l=l.slice(1,r.points.length-1),l.unshift(u.intersect(l[0])),l.push(d.intersect(l[l.length-1]))),r.toCluster&&(ee.debug("to cluster abc88",i[r.toCluster]),l=fAe(r.points,i[r.toCluster].node),h=!0),r.fromCluster&&(ee.debug("from cluster abc88",i[r.fromCluster]),l=fAe(l.reverse(),i[r.fromCluster].node).reverse(),h=!0);let p=l.filter(k=>!Number.isNaN(k.y)),f=tc;r.curve&&(n==="graph"||n==="flowchart")&&(f=r.curve);let{x:g,y:m}=O3(r),y=ec().x(g).y(m).curve(f),b;switch(r.thickness){case"normal":b="edge-thickness-normal";break;case"thick":b="edge-thickness-thick";break;case"invisible":b="edge-thickness-thick";break;default:b=""}switch(r.pattern){case"solid":b+=" edge-pattern-solid";break;case"dotted":b+=" edge-pattern-dotted";break;case"dashed":b+=" edge-pattern-dashed";break}let v=e.append("path").attr("d",y(p)).attr("id",r.id).attr("class"," "+b+(r.classes?" "+r.classes:"")).attr("style",r.style),T="";(De().flowchart.arrowMarkerAbsolute||De().state.arrowMarkerAbsolute)&&(T=_p(!0)),E1t(v,r,T,s,n);let x={};return h&&(x.updatedPath=l),x.originalPath=r.points,x},"insertEdge"),I1t=o(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"),D1t=o((e,t,r,i)=>{let n=I1t(e),a=2,s=t.height+2*r.padding,l=s/a,h=i??t.width+2*l+r.padding,u=r.padding/2;return n.has("right")&&n.has("left")&&n.has("up")&&n.has("down")?[{x:0,y:0},{x:l,y:0},{x:h/2,y:2*u},{x:h-l,y:0},{x:h,y:0},{x:h,y:-s/3},{x:h+2*u,y:-s/2},{x:h,y:-2*s/3},{x:h,y:-s},{x:h-l,y:-s},{x:h/2,y:-s-2*u},{x:l,y:-s},{x:0,y:-s},{x:0,y:-2*s/3},{x:-2*u,y:-s/2},{x:0,y:-s/3}]:n.has("right")&&n.has("left")&&n.has("up")?[{x:l,y:0},{x:h-l,y:0},{x:h,y:-s/2},{x:h-l,y:-s},{x:l,y:-s},{x:0,y:-s/2}]:n.has("right")&&n.has("left")&&n.has("down")?[{x:0,y:0},{x:l,y:-s},{x:h-l,y:-s},{x:h,y:0}]:n.has("right")&&n.has("up")&&n.has("down")?[{x:0,y:0},{x:h,y:-l},{x:h,y:-s+l},{x:0,y:-s}]:n.has("left")&&n.has("up")&&n.has("down")?[{x:h,y:0},{x:0,y:-l},{x:0,y:-s+l},{x:h,y:-s}]:n.has("right")&&n.has("left")?[{x:l,y:0},{x:l,y:-u},{x:h-l,y:-u},{x:h-l,y:0},{x:h,y:-s/2},{x:h-l,y:-s},{x:h-l,y:-s+u},{x:l,y:-s+u},{x:l,y:-s},{x:0,y:-s/2}]:n.has("up")&&n.has("down")?[{x:h/2,y:0},{x:0,y:-u},{x:l,y:-u},{x:l,y:-s+u},{x:0,y:-s+u},{x:h/2,y:-s},{x:h,y:-s+u},{x:h-l,y:-s+u},{x:h-l,y:-u},{x:h,y:-u}]:n.has("right")&&n.has("up")?[{x:0,y:0},{x:h,y:-l},{x:0,y:-s}]:n.has("right")&&n.has("down")?[{x:0,y:0},{x:h,y:0},{x:0,y:-s}]:n.has("left")&&n.has("up")?[{x:h,y:0},{x:0,y:-l},{x:h,y:-s}]:n.has("left")&&n.has("down")?[{x:h,y:0},{x:0,y:0},{x:h,y:-s}]:n.has("right")?[{x:l,y:-u},{x:l,y:-u},{x:h-l,y:-u},{x:h-l,y:0},{x:h,y:-s/2},{x:h-l,y:-s},{x:h-l,y:-s+u},{x:l,y:-s+u},{x:l,y:-s+u}]:n.has("left")?[{x:l,y:0},{x:l,y:-u},{x:h-l,y:-u},{x:h-l,y:-s+u},{x:l,y:-s+u},{x:l,y:-s},{x:0,y:-s/2}]:n.has("up")?[{x:l,y:-u},{x:l,y:-s+u},{x:0,y:-s+u},{x:h/2,y:-s},{x:h,y:-s+u},{x:h-l,y:-s+u},{x:h-l,y:-u}]:n.has("down")?[{x:h/2,y:0},{x:0,y:-u},{x:l,y:-u},{x:l,y:-s+u},{x:h-l,y:-s+u},{x:h-l,y:-u},{x:h,y:-u}]:[{x:0,y:0}]},"getArrowPoints");o(AAe,"intersectNode");M1t=AAe;o(RAe,"intersectEllipse");LAe=RAe;o($Ae,"intersectCircle");N1t=$Ae;o(IAe,"intersectLine");o(LX,"sameSign");O1t=IAe,B1t=DAe;o(DAe,"intersectPolygon");P1t=o((e,t)=>{var r=e.x,i=e.y,n=t.x-r,a=t.y-i,s=e.width/2,l=e.height/2,h,u;return Math.abs(a)*s>Math.abs(n)*l?(a<0&&(l=-l),h=a===0?0:l*n/a,u=l):(n<0&&(s=-s),h=s,u=n===0?0:s*a/n),{x:r+h,y:i+u}},"intersectRect"),F1t=P1t,Yi={node:M1t,circle:N1t,ellipse:LAe,polygon:B1t,rect:F1t},ia=o(async(e,t,r,i)=>{let n=De(),a,s=t.useHtmlLabels||Qr(n);r?a=r:a="node default";let l=e.insert("g").attr("class",a).attr("id",t.domId||t.id),h=l.insert("g").attr("class","label").attr("style",t.labelStyle),u;t.labelText===void 0?u="":u=typeof t.labelText=="string"?t.labelText:t.labelText[0];let d;t.labelType==="markdown"?d=Rn(h,nr(so(u),n),{useHtmlLabels:s,width:t.width||n.flowchart.wrappingWidth,classes:"markdown-node-label"},n):d=await Wl(h,nr(so(u),n),t.labelStyle,!1,i);let p=d.getBBox(),f=t.padding/2;if(Qr(n)){let g=d.children[0],m=tt(d);await H2(g,u),p=g.getBoundingClientRect(),m.attr("width",p.width),m.attr("height",p.height)}return s?h.attr("transform","translate("+-p.width/2+", "+-p.height/2+")"):h.attr("transform","translate(0, "+-p.height/2+")"),t.centerLabel&&h.attr("transform","translate("+-p.width/2+", "+-p.height/2+")"),h.insert("rect",":first-child"),{shapeSvg:l,bbox:p,halfPadding:f,label:h}},"labelHelper"),gn=o((e,t)=>{let r=t.node().getBBox();e.width=r.width,e.height=r.height},"updateNodeBounds");o(Vl,"insertPolygonShape");z1t=o(async(e,t)=>{t.useHtmlLabels||Qr(De())||(t.centerLabel=!0);let{shapeSvg:r,bbox:i,halfPadding:n}=await ia(e,t,"node "+t.classes,!0);ee.info("Classes = ",t.classes);let a=r.insert("rect",":first-child");return a.attr("rx",t.rx).attr("ry",t.ry).attr("x",-i.width/2-n).attr("y",-i.height/2-n).attr("width",i.width+t.padding).attr("height",i.height+t.padding),gn(t,a),t.intersect=function(s){return Yi.rect(t,s)},r},"note"),q1t=z1t,gAe=o(e=>e?" "+e:"","formatClass"),wo=o((e,t)=>`${t||"node default"}${gAe(e.classes)} ${gAe(e.class)}`,"getClassesFromNode"),mAe=o(async(e,t)=>{let{shapeSvg:r,bbox:i}=await ia(e,t,wo(t,void 0),!0),n=i.width+t.padding,a=i.height+t.padding,s=n+a,l=[{x:s/2,y:0},{x:s,y:-s/2},{x:s/2,y:-s},{x:0,y:-s/2}];ee.info("Question main (Circle)");let h=Vl(r,s,s,l);return h.attr("style",t.style),gn(t,h),t.intersect=function(u){return ee.warn("Intersect called"),Yi.polygon(t,l,u)},r},"question"),j1t=o((e,t)=>{let r=e.insert("g").attr("class","node default").attr("id",t.domId||t.id),i=28,n=[{x:0,y:i/2},{x:i/2,y:0},{x:0,y:-i/2},{x:-i/2,y:0}];return r.insert("polygon",":first-child").attr("points",n.map(function(a){return a.x+","+a.y}).join(" ")).attr("class","state-start").attr("r",7).attr("width",28).attr("height",28),t.width=28,t.height=28,t.intersect=function(a){return Yi.circle(t,14,a)},r},"choice"),G1t=o(async(e,t)=>{let{shapeSvg:r,bbox:i}=await ia(e,t,wo(t,void 0),!0),n=4,a=t.positioned?t.height:i.height+t.padding,s=a/n,l=t.positioned?t.width:i.width+2*s+t.padding,h=[{x:s,y:0},{x:l-s,y:0},{x:l,y:-a/2},{x:l-s,y:-a},{x:s,y:-a},{x:0,y:-a/2}],u=Vl(r,l,a,h);return u.attr("style",t.style),gn(t,u),t.intersect=function(d){return Yi.polygon(t,h,d)},r},"hexagon"),W1t=o(async(e,t)=>{let{shapeSvg:r,bbox:i}=await ia(e,t,void 0,!0),n=2,a=i.height+2*t.padding,s=a/n,l=i.width+2*s+t.padding,h=t.positioned&&(t.widthInColumns??1)>1&&t.width>l?t.width:l,u=D1t(t.directions,i,t,h),d=Vl(r,h,a,u);return d.attr("style",t.style),gn(t,d),t.intersect=function(p){return Yi.polygon(t,u,p)},r},"block_arrow"),U1t=o(async(e,t)=>{let{shapeSvg:r,bbox:i}=await ia(e,t,wo(t,void 0),!0),n=i.width+t.padding,a=i.height+t.padding,s=[{x:-a/2,y:0},{x:n,y:0},{x:n,y:-a},{x:-a/2,y:-a},{x:0,y:-a/2}];return Vl(r,n,a,s).attr("style",t.style),t.width=n+a,t.height=a,t.intersect=function(l){return Yi.polygon(t,s,l)},r},"rect_left_inv_arrow"),V1t=o(async(e,t)=>{let{shapeSvg:r,bbox:i}=await ia(e,t,wo(t),!0),n=i.width+t.padding,a=i.height+t.padding,s=[{x:-2*a/6,y:0},{x:n-a/6,y:0},{x:n+2*a/6,y:-a},{x:a/6,y:-a}],l=Vl(r,n,a,s);return l.attr("style",t.style),gn(t,l),t.intersect=function(h){return Yi.polygon(t,s,h)},r},"lean_right"),Y1t=o(async(e,t)=>{let{shapeSvg:r,bbox:i}=await ia(e,t,wo(t,void 0),!0),n=i.width+t.padding,a=i.height+t.padding,s=[{x:2*a/6,y:0},{x:n+a/6,y:0},{x:n-2*a/6,y:-a},{x:-a/6,y:-a}],l=Vl(r,n,a,s);return l.attr("style",t.style),gn(t,l),t.intersect=function(h){return Yi.polygon(t,s,h)},r},"lean_left"),H1t=o(async(e,t)=>{let{shapeSvg:r,bbox:i}=await ia(e,t,wo(t,void 0),!0),n=i.width+t.padding,a=i.height+t.padding,s=[{x:-2*a/6,y:0},{x:n+2*a/6,y:0},{x:n-a/6,y:-a},{x:a/6,y:-a}],l=Vl(r,n,a,s);return l.attr("style",t.style),gn(t,l),t.intersect=function(h){return Yi.polygon(t,s,h)},r},"trapezoid"),X1t=o(async(e,t)=>{let{shapeSvg:r,bbox:i}=await ia(e,t,wo(t,void 0),!0),n=i.width+t.padding,a=i.height+t.padding,s=[{x:a/6,y:0},{x:n-a/6,y:0},{x:n+2*a/6,y:-a},{x:-2*a/6,y:-a}],l=Vl(r,n,a,s);return l.attr("style",t.style),gn(t,l),t.intersect=function(h){return Yi.polygon(t,s,h)},r},"inv_trapezoid"),K1t=o(async(e,t)=>{let{shapeSvg:r,bbox:i}=await ia(e,t,wo(t,void 0),!0),n=i.width+t.padding,a=i.height+t.padding,s=[{x:0,y:0},{x:n+a/2,y:0},{x:n,y:-a/2},{x:n+a/2,y:-a},{x:0,y:-a}],l=Vl(r,n,a,s);return l.attr("style",t.style),gn(t,l),t.intersect=function(h){return Yi.polygon(t,s,h)},r},"rect_right_inv_arrow"),Z1t=o(async(e,t)=>{let{shapeSvg:r,bbox:i}=await ia(e,t,wo(t,void 0),!0),n=i.width+t.padding,a=n/2,s=a/(2.5+n/50),l=i.height+s+t.padding,h="M 0,"+s+" a "+a+","+s+" 0,0,0 "+n+" 0 a "+a+","+s+" 0,0,0 "+-n+" 0 l 0,"+l+" a "+a+","+s+" 0,0,0 "+n+" 0 l 0,"+-l,u=r.attr("label-offset-y",s).insert("path",":first-child").attr("style",t.style).attr("d",h).attr("transform","translate("+-n/2+","+-(l/2+s)+")");return gn(t,u),t.intersect=function(d){let p=Yi.rect(t,d),f=p.x-t.x;if(a!=0&&(Math.abs(f)t.height/2-s)){let g=s*s*(1-f*f/(a*a));g!=0&&(g=Math.sqrt(g)),g=s-g,d.y-t.y>0&&(g=-g),p.y+=g}return p},r},"cylinder"),Q1t=o(async(e,t)=>{let{shapeSvg:r,bbox:i,halfPadding:n}=await ia(e,t,"node "+t.classes+" "+t.class,!0),a=r.insert("rect",":first-child"),s=t.positioned?t.width:i.width+t.padding,l=t.positioned?t.height:i.height+t.padding,h=t.positioned?-s/2:-i.width/2-n,u=t.positioned?-l/2:-i.height/2-n;if(a.attr("class","basic label-container").attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("x",h).attr("y",u).attr("width",s).attr("height",l),t.props){let d=new Set(Object.keys(t.props));t.props.borders&&(J_(a,t.props.borders,s,l),d.delete("borders")),d.forEach(p=>{ee.warn(`Unknown node property ${p}`)})}return gn(t,a),t.intersect=function(d){return Yi.rect(t,d)},r},"rect"),J1t=o(async(e,t)=>{let{shapeSvg:r,bbox:i,halfPadding:n}=await ia(e,t,"node "+t.classes,!0),a=r.insert("rect",":first-child"),s=t.positioned?t.width:i.width+t.padding,l=t.positioned?t.height:i.height+t.padding,h=t.positioned?-s/2:-i.width/2-n,u=t.positioned?-l/2:-i.height/2-n;if(a.attr("class","basic cluster composite label-container").attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("x",h).attr("y",u).attr("width",s).attr("height",l),t.props){let d=new Set(Object.keys(t.props));t.props.borders&&(J_(a,t.props.borders,s,l),d.delete("borders")),d.forEach(p=>{ee.warn(`Unknown node property ${p}`)})}return gn(t,a),t.intersect=function(d){return Yi.rect(t,d)},r},"composite"),eyt=o(async(e,t)=>{let{shapeSvg:r}=await ia(e,t,"label",!0);ee.trace("Classes = ",t.class);let i=r.insert("rect",":first-child"),n=0,a=0;if(i.attr("width",n).attr("height",a),r.attr("class","label edgeLabel"),t.props){let s=new Set(Object.keys(t.props));t.props.borders&&(J_(i,t.props.borders,n,a),s.delete("borders")),s.forEach(l=>{ee.warn(`Unknown node property ${l}`)})}return gn(t,i),t.intersect=function(s){return Yi.rect(t,s)},r},"labelRect");o(J_,"applyNodePropertyBorders");tyt=o(async(e,t)=>{let r;t.classes?r="node "+t.classes:r="node default";let i=e.insert("g").attr("class",r).attr("id",t.domId||t.id),n=i.insert("rect",":first-child"),a=i.insert("line"),s=i.insert("g").attr("class","label"),l=t.labelText.flat?t.labelText.flat():t.labelText,h="";typeof l=="object"?h=l[0]:h=l,ee.info("Label text abc79",h,l,typeof l=="object");let u=await Wl(s,h,t.labelStyle,!0,!0),d={width:0,height:0};if(Qr(De())){let y=u.children[0],b=tt(u);d=y.getBoundingClientRect(),b.attr("width",d.width),b.attr("height",d.height)}ee.info("Text 2",l);let p=l.slice(1,l.length),f=u.getBBox(),g=await Wl(s,p.join?p.join("
    "):p,t.labelStyle,!0,!0);if(Qr(De())){let y=g.children[0],b=tt(g);d=y.getBoundingClientRect(),b.attr("width",d.width),b.attr("height",d.height)}let m=t.padding/2;return tt(g).attr("transform","translate( "+(d.width>f.width?0:(f.width-d.width)/2)+", "+(f.height+m+5)+")"),tt(u).attr("transform","translate( "+(d.width{let{shapeSvg:r,bbox:i}=await ia(e,t,wo(t,void 0),!0),n=i.height+t.padding,a=i.width+n/4+t.padding,s=r.insert("rect",":first-child").attr("style",t.style).attr("rx",n/2).attr("ry",n/2).attr("x",-a/2).attr("y",-n/2).attr("width",a).attr("height",n);return gn(t,s),t.intersect=function(l){return Yi.rect(t,l)},r},"stadium"),iyt=o(async(e,t)=>{let{shapeSvg:r,bbox:i,halfPadding:n}=await ia(e,t,wo(t,void 0),!0),a=r.insert("circle",":first-child");return a.attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("r",i.width/2+n).attr("width",i.width+t.padding).attr("height",i.height+t.padding),ee.info("Circle main"),gn(t,a),t.intersect=function(s){return ee.info("Circle intersect",t,i.width/2+n,s),Yi.circle(t,i.width/2+n,s)},r},"circle"),nyt=o(async(e,t)=>{let{shapeSvg:r,bbox:i,halfPadding:n}=await ia(e,t,wo(t,void 0),!0),a=5,s=r.insert("g",":first-child"),l=s.insert("circle"),h=s.insert("circle");return s.attr("class",t.class),l.attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("r",i.width/2+n+a).attr("width",i.width+t.padding+a*2).attr("height",i.height+t.padding+a*2),h.attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("r",i.width/2+n).attr("width",i.width+t.padding).attr("height",i.height+t.padding),ee.info("DoubleCircle main"),gn(t,l),t.intersect=function(u){return ee.info("DoubleCircle intersect",t,i.width/2+n+a,u),Yi.circle(t,i.width/2+n+a,u)},r},"doublecircle"),ayt=o(async(e,t)=>{let{shapeSvg:r,bbox:i}=await ia(e,t,wo(t,void 0),!0),n=i.width+t.padding,a=i.height+t.padding,s=[{x:0,y:0},{x:n,y:0},{x:n,y:-a},{x:0,y:-a},{x:0,y:0},{x:-8,y:0},{x:n+8,y:0},{x:n+8,y:-a},{x:-8,y:-a},{x:-8,y:0}],l=Vl(r,n,a,s);return l.attr("style",t.style),gn(t,l),t.intersect=function(h){return Yi.polygon(t,s,h)},r},"subroutine"),syt=o((e,t)=>{let r=e.insert("g").attr("class","node default").attr("id",t.domId||t.id),i=r.insert("circle",":first-child");return i.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),gn(t,i),t.intersect=function(n){return Yi.circle(t,7,n)},r},"start"),yAe=o((e,t,r)=>{let i=e.insert("g").attr("class","node default").attr("id",t.domId||t.id),n=70,a=10;r==="LR"&&(n=10,a=70);let s=i.append("rect").attr("x",-1*n/2).attr("y",-1*a/2).attr("width",n).attr("height",a).attr("class","fork-join");return gn(t,s),t.height=t.height+t.padding/2,t.width=t.width+t.padding/2,t.intersect=function(l){return Yi.rect(t,l)},i},"forkJoin"),oyt=o((e,t)=>{let r=e.insert("g").attr("class","node default").attr("id",t.domId||t.id),i=r.insert("circle",":first-child"),n=r.insert("circle",":first-child");return n.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),i.attr("class","state-end").attr("r",5).attr("width",10).attr("height",10),gn(t,n),t.intersect=function(a){return Yi.circle(t,7,a)},r},"end"),lyt=o(async(e,t)=>{let r=t.padding/2,i=4,n=8,a;t.classes?a="node "+t.classes:a="node default";let s=e.insert("g").attr("class",a).attr("id",t.domId||t.id),l=s.insert("rect",":first-child"),h=s.insert("line"),u=s.insert("line"),d=0,p=i,f=s.insert("g").attr("class","label"),g=0,m=t.classData.annotations?.[0],y=t.classData.annotations[0]?"\xAB"+t.classData.annotations[0]+"\xBB":"",b=await Wl(f,y,t.labelStyle,!0,!0),v=b.getBBox();if(Qr(De())){let _=b.children[0],L=tt(b);v=_.getBoundingClientRect(),L.attr("width",v.width),L.attr("height",v.height)}t.classData.annotations[0]&&(p+=v.height+i,d+=v.width);let T=t.classData.label;t.classData.type!==void 0&&t.classData.type!==""&&(Qr(De())?T+="<"+t.classData.type+">":T+="<"+t.classData.type+">");let x=await Wl(f,T,t.labelStyle,!0,!0);tt(x).attr("class","classTitle");let k=x.getBBox();if(Qr(De())){let _=x.children[0],L=tt(x);k=_.getBoundingClientRect(),L.attr("width",k.width),L.attr("height",k.height)}p+=k.height+i,k.width>d&&(d=k.width);let C=[];t.classData.members.forEach(async _=>{let L=_.getDisplayDetails(),N=L.displayText;Qr(De())&&(N=N.replace(//g,">"));let D=await Wl(f,N,L.cssStyle?L.cssStyle:t.labelStyle,!0,!0),M=D.getBBox();if(Qr(De())){let B=D.children[0],A=tt(D);M=B.getBoundingClientRect(),A.attr("width",M.width),A.attr("height",M.height)}M.width>d&&(d=M.width),p+=M.height+i,C.push(D)}),p+=n;let E=[];if(t.classData.methods.forEach(async _=>{let L=_.getDisplayDetails(),N=L.displayText;Qr(De())&&(N=N.replace(//g,">"));let D=await Wl(f,N,L.cssStyle?L.cssStyle:t.labelStyle,!0,!0),M=D.getBBox();if(Qr(De())){let B=D.children[0],A=tt(D);M=B.getBoundingClientRect(),A.attr("width",M.width),A.attr("height",M.height)}M.width>d&&(d=M.width),p+=M.height+i,E.push(D)}),p+=n,m){let _=(d-v.width)/2;tt(b).attr("transform","translate( "+(-1*d/2+_)+", "+-1*p/2+")"),g=v.height+i}let w=(d-k.width)/2;return tt(x).attr("transform","translate( "+(-1*d/2+w)+", "+(-1*p/2+g)+")"),g+=k.height+i,h.attr("class","divider").attr("x1",-d/2-r).attr("x2",d/2+r).attr("y1",-p/2-r+n+g).attr("y2",-p/2-r+n+g),g+=n,C.forEach(_=>{tt(_).attr("transform","translate( "+-d/2+", "+(-1*p/2+g+n/2)+")");let L=_?.getBBox();g+=(L?.height??0)+i}),g+=n,u.attr("class","divider").attr("x1",-d/2-r).attr("x2",d/2+r).attr("y1",-p/2-r+n+g).attr("y2",-p/2-r+n+g),g+=n,E.forEach(_=>{tt(_).attr("transform","translate( "+-d/2+", "+(-1*p/2+g)+")");let L=_?.getBBox();g+=(L?.height??0)+i}),l.attr("style",t.style).attr("class","outer title-state").attr("x",-d/2-r).attr("y",-(p/2)-r).attr("width",d+t.padding).attr("height",p+t.padding),gn(t,l),t.intersect=function(_){return Yi.rect(t,_)},s},"class_box"),vAe={rhombus:mAe,composite:J1t,question:mAe,rect:Q1t,labelRect:eyt,rectWithTitle:tyt,choice:j1t,circle:iyt,doublecircle:nyt,stadium:ryt,hexagon:G1t,block_arrow:W1t,rect_left_inv_arrow:U1t,lean_right:V1t,lean_left:Y1t,trapezoid:H1t,inv_trapezoid:X1t,rect_right_inv_arrow:K1t,cylinder:Z1t,start:syt,end:oyt,note:q1t,subroutine:ayt,fork:yAe,join:yAe,class_box:lyt},K_={},MAe=o(async(e,t,r)=>{let i,n;if(t.link){let a;De().securityLevel==="sandbox"?a="_top":t.linkTarget&&(a=t.linkTarget||"_blank"),i=e.insert("svg:a").attr("xlink:href",t.link).attr("target",a),n=await vAe[t.shape](i,t,r)}else n=await vAe[t.shape](e,t,r),i=n;return t.tooltip&&n.attr("title",t.tooltip),t.class&&n.attr("class","node default "+t.class),K_[t.id]=i,t.haveCallback&&K_[t.id].attr("class",K_[t.id].attr("class")+" clickable"),i},"insertNode"),cyt=o(e=>{let t=K_[e.id];ee.trace("Transforming node",e.diff,e,"translate("+(e.x-e.width/2-5)+", "+e.width/2+")");let r=8,i=e.diff||0;return e.clusterNode?t.attr("transform","translate("+(e.x+i-e.width/2)+", "+(e.y-e.height/2-r)+")"):t.attr("transform","translate("+e.x+", "+e.y+")"),i},"positionNode");o(OX,"getNodeFromBlock");o(NAe,"calculateBlockSize");o(OAe,"insertBlockPositioned");o(eA,"performOperations");o(BAe,"calculateBlockSizes");o(PAe,"insertBlocks");o(FAe,"insertEdges");hyt=o(function(e,t){return t.db.getClasses()},"getClasses"),uyt=o(async function(e,t,r,i){let{securityLevel:n,block:a}=Rt(),s=i.db;s.setDiagramId(t);let l;n==="sandbox"&&(l=tt("#i"+t));let h=n==="sandbox"?tt(l.nodes()[0].contentDocument.body):tt("body"),u=n==="sandbox"?h.select(`[id="${t}"]`):tt(`[id="${t}"]`);k1t(u,["point","circle","cross"],i.type,t);let d=s.getBlocks(),p=s.getBlocksFlat(),f=s.getEdges(),g=u.insert("g").attr("class","block");await BAe(g,d,s);let m=_Ae(s);if(await PAe(g,d,s),await FAe(g,f,p,s,t),m){let y=m,b=Math.max(1,Math.round(.125*(y.width/y.height))),v=y.height+b+10,T=y.width+10,{useMaxWidth:x}=a;Ir(u,v,T,!!x),ee.debug("Here Bounds",m,y),u.attr("viewBox",`${y.x-5} ${y.y-5} ${y.width+10} ${y.height+10}`)}},"draw"),dyt={draw:uyt,getClasses:hyt},pyt={parser:jmt,db:l1t,renderer:dyt,styles:h1t}});var e7e={};Kt(e7e,{diagram:()=>Oyt});function HAe(e){return e.some(t=>VAe.test(t))}function XAe(e){for(let t of e){let r=YAe.exec(t);if(r?.index&&r.index>0)return r.index}return 4}function KAe(e,t){return e.replace(/\bline\s+(\d+)\b/gi,(r,i)=>{let n=parseInt(i,10),a=t.get(n);return a?`line ${a}`:r})}function ZAe(e){let t=e.split(` +`),r=new Map,i=-1;for(let[h,u]of t.entries())if(u.trim()==="treeView-beta"){i=h;break}if(i===-1)return{text:e,lineMap:r};let n=[];for(let h=i+1;h0){let n=e.substring(i).toLowerCase(),a=t?.extensionIcons;return a?.[n]??a?.[n.slice(1)]}}function PX(e,t){return e.includes(":")?e:e in IT.icons||!t?`${IT.prefix}:${e}`:`${t}:${e}`}function zX(e,t){if(e.icon!=="none"){if(e.icon)return PX(e.icon,t.defaultIconPack);if(t.showIcons){if(e.nodeType==="file"){let r=QAe(e.name,t);if(r==="none")return;if(r)return PX(r,t.defaultIconPack)}return`${IT.prefix}:${e.nodeType==="directory"?"folder":"file"}`}}}var VAe,YAe,fyt,jAe,GAe,WAe,gyt,Jc,myt,yyt,vyt,byt,xyt,Tyt,kyt,BX,Cyt,wyt,IT,FX,Eyt,Syt,JAe,_yt,Ayt,UAe,Ryt,Lyt,$yt,Iyt,Dyt,Myt,Nyt,Oyt,t7e=Tt(()=>{i5();bs();es();Ma();Sa();_a();Aa();Ra();La();$a();Ia();Da();xa();Ta();ka();Ca();wa();Ea();Rr();yn();An();Or();Yr();tr();Zt();vt();VAe=/[─━│┃└┗├┣]/,YAe=/[└┗├┣]/,fyt=/[─━]/,jAe=/^[\s│┃]+$/,GAe=/^\s*(title[\t ]|accTitle[\t ]*:|accDescr[\t ]*[:{])/,WAe=/^\s*%%/,gyt=" ";o(HAe,"isBoxDrawingFormat");o(XAe,"inferSegmentWidth");o(KAe,"remapErrorLines");o(ZAe,"preprocessBoxDrawing");Jc=new Lm(()=>({cnt:1,stack:[{id:0,level:-1,name:"/",nodeType:"directory",children:[]}]})),myt=o(()=>{Jc.reset(),ar()},"clear"),yyt=o(()=>Jc.records.stack[0],"getRoot"),vyt=o(()=>Jc.records.cnt,"getCount"),byt=rr.treeView,xyt=o(()=>zr(byt,Rt().treeView),"getConfig"),Tyt=o((e,t,r,i,n,a)=>{for(;e<=Jc.records.stack[Jc.records.stack.length-1].level;)Jc.records.stack.pop();let s={id:Jc.records.cnt++,level:e,name:t,nodeType:r,icon:n,cssClass:i,description:a,children:[]};Jc.records.stack[Jc.records.stack.length-1].children.push(s),Jc.records.stack.push(s)},"addNode"),kyt={clear:myt,addNode:Tyt,getRoot:yyt,getCount:vyt,getConfig:xyt,getAccTitle:xr,getAccDescription:kr,getDiagramTitle:Cr,setAccDescription:Tr,setAccTitle:gr,setDiagramTitle:_r},BX=kyt,Cyt=o(e=>{xi(e,BX);for(let t of e.nodes){let r=typeof t.indent=="number"?t.indent:0,i=t.name,n=i.endsWith("/");n&&(i=i.slice(0,-1));let a=n?"directory":"file",s=t.classAnnotation||void 0,l=t.iconAnnotation,h=l!==void 0?l||"none":void 0,u=t.descAnnotation||void 0,d=u?nr(u,Rt()):void 0;BX.addNode(r,i,a,s,h,d)}},"populate"),wyt={parse:o(async e=>{let{text:t,lineMap:r}=ZAe(e);try{let i=await Vi("treeView",t);ee.debug(i),Cyt(i)}catch(i){throw r.size>0&&i instanceof Error&&(i.message=KAe(i.message,r)),i}},"parse")},IT={prefix:"mermaid-treeview",height:24,width:24,icons:{folder:{body:''},file:{body:''}}};o(QAe,"detectIcon");o(PX,"qualifyIcon");o(zX,"getNodeIcon");I0([{name:IT.prefix,icons:IT}]);FX=14,Eyt=4,Syt=16,JAe=o((e,t)=>`tv-icon-${e}-${t.replace(/[^\w-]/g,"-")}`,"iconSymbolId"),_yt=o(async(e,t,r,i)=>{let n=new Set,a=o(h=>{let u=zX(h,r);u&&n.add(u),h.children.forEach(a)},"collect");if(a(t),n.size===0)return;let s=await Promise.all([...n].map(async h=>({icon:h,svg:await oo(h,{height:FX,width:FX})}))),l=e.append("defs");for(let{icon:h,svg:u}of s)l.append("g").attr("id",JAe(i,h)).html(u)},"injectIconDefs"),Ayt=o((e,t,r,i,n,a)=>{let s=i.append("g"),l="treeView-node-label";r.nodeType==="directory"&&(l+=" treeView-node-dir"),r.cssClass&&(l+=` ${r.cssClass}`);let h=FX+Eyt,u=zX(r,n),d=u!==void 0;u&&s.append("use").attr("xlink:href",`#${JAe(a,u)}`).attr("x",e+n.paddingX).attr("y",t+n.paddingY).attr("class","treeView-node-icon");let p=s.append("text").text(r.name).attr("dominant-baseline","middle").attr("class",l),{height:f,width:g}=p.node().getBBox(),m=f+n.paddingY*2,y=e+n.paddingX+(d?h:0);p.attr("x",y),p.attr("y",t+m/2);let b=y+g,v=g+n.paddingX*2+(d?h:0);return r.BBox={x:e,y:t,width:v,height:m},r.cssClass?.split(/\s+/).includes("highlight")&&s.insert("rect",":first-child").attr("x",e).attr("y",t+1).attr("width",0).attr("height",m-2).attr("rx",3).attr("class","treeView-highlight-bg"),{node:r,nodeGroup:s,labelRightEdge:b,centerY:t+m/2}},"positionLabel"),UAe=o((e,t,r,i,n,a)=>e.append("line").attr("x1",t).attr("y1",r).attr("x2",i).attr("y2",n).attr("stroke-width",a).attr("class","treeView-node-line"),"positionLine"),Ryt=o((e,t,r,i)=>{let n=0,a=0,s=[],l=o((d,p,f,g)=>{let m=g*(f.rowIndent+f.paddingX),y=Ayt(m,n,p,d,f,i);s.push(y);let{height:b,width:v}=p.BBox;UAe(d,m-f.rowIndent,n+b/2,m,n+b/2,f.lineThickness),a=Math.max(a,m+v),n+=b},"drawNode"),h=o((d,p=0)=>{l(e,d,r,p),d.children.forEach(y=>{h(y,p+1)});let{x:f,y:g,height:m}=d.BBox;if(d.children.length){let{y,height:b}=d.children[d.children.length-1].BBox;UAe(e,f+r.paddingX,g+m,f+r.paddingX,y+b/2+r.lineThickness/2,r.lineThickness)}},"processNode");h(t);let u=s.filter(d=>d.node.description);if(u.length>0){let d=Math.max(...s.map(p=>p.labelRightEdge))+Syt;for(let p of u){let f=p.nodeGroup.append("text").text(p.node.description).attr("dominant-baseline","middle").attr("class","treeView-node-description").attr("x",d).attr("y",p.centerY).node().getBBox();a=Math.max(a,d+f.width+r.paddingX)}}for(let d of s)if(d.node.cssClass?.split(/\s+/).includes("highlight")){let p=d.nodeGroup.select(".treeView-highlight-bg");if(!p.empty()){let f=a-d.node.BBox.x+8;p.attr("width",f),a=Math.max(a,d.node.BBox.x+f+2)}}return{totalHeight:n,totalWidth:a}},"drawTree"),Lyt=o(async(e,t,r,i)=>{ee.debug(`Rendering treeView diagram +`+e);let n=i.db,a=n.getRoot(),s=n.getConfig(),l=oi(t);await _yt(l,a,s,t);let h=l.append("g");h.attr("class","tree-view");let{totalHeight:u,totalWidth:d}=Ryt(h,a,s,t);l.attr("viewBox",`-${s.lineThickness/2} 0 ${d} ${u}`),Ir(l,u,d,s.useMaxWidth)},"draw"),$yt={draw:Lyt},Iyt=$yt,Dyt={labelFontSize:"16px",labelColor:"black",lineColor:"black",iconColor:"#546e7a",descriptionColor:"#6a9955",highlightBg:"rgba(255, 193, 7, 0.15)",highlightStroke:"#ffc107"},Myt=o(({treeView:e})=>{let{labelFontSize:t,labelColor:r,lineColor:i,iconColor:n,descriptionColor:a,highlightBg:s,highlightStroke:l}=zr(Dyt,e);return` + .treeView-node-label { + font-size: ${t}; + fill: ${r}; + white-space: pre; + } + .treeView-node-dir { + font-weight: bold; + } + .treeView-node-line { + stroke: ${i}; + } + .treeView-node-icon { + color: ${n}; + } + .treeView-node-description { + font-size: ${t}; + fill: ${a}; + font-style: italic; + white-space: pre; + } + .treeView-highlight-bg { + fill: ${s}; + stroke: ${l}; + stroke-width: 1; + } + `},"styles"),Nyt=Myt,Oyt={db:BX,renderer:Iyt,parser:wyt,styles:Nyt}});var v7e={};Kt(v7e,{diagram:()=>i2t});function jX(e,t){if(e===0)return t();let r=Math.random,i=e>>>0;Math.random=function(){i=i+1831565813>>>0;let n=i;return n=Math.imul(n^n>>>15,n|1),n^=n+Math.imul(n^n>>>7,n|61),((n^n>>>14)>>>0)/4294967296};try{return t()}finally{Math.random=r}}function h7e(e,t,r){e.forEach(i=>{t.add({group:"nodes",data:{type:"service",id:i.id,icon:i.icon,label:i.title,parent:i.in,width:r.getConfigField("iconSize"),height:r.getConfigField("iconSize")},classes:"node-service"})})}function u7e(e,t,r){e.forEach(i=>{t.add({group:"nodes",data:{type:"junction",id:i.id,parent:i.in,width:r.getConfigField("iconSize"),height:r.getConfigField("iconSize")},classes:"node-junction"})})}function d7e(e,t){t.nodes().map(r=>{let i=oy(r);i.type!=="group"&&(i.x=r.position().x,i.y=r.position().y,e.getElementById(i.id).attr("transform","translate("+(i.x||0)+","+(i.y||0)+")"))})}function p7e(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 f7e(e,t){e.forEach(r=>{let{lhsId:i,rhsId:n,lhsInto:a,lhsGroup:s,rhsInto:l,lhsDir:h,rhsDir:u,rhsGroup:d,title:p}=r,f=GX(r.lhsDir,r.rhsDir)?"segments":"straight",g={id:`${i}-${n}`,label:p,source:i,sourceDir:h,sourceArrow:a,sourceGroup:s,sourceEndpoint:h==="L"?"0 50%":h==="R"?"100% 50%":h==="T"?"50% 0":"50% 100%",target:n,targetDir:u,targetArrow:l,targetGroup:d,targetEndpoint:u==="L"?"0 50%":u==="R"?"100% 50%":u==="T"?"50% 0":"50% 100%"};t.add({group:"edges",data:g,classes:f})})}function g7e(e,t,r,i=[]){let n=o((f,g)=>Object.entries(f).reduce((m,[y,b])=>{let v=0,T=Object.entries(b);if(T.length===1)return m[y]=T[0][1],m;for(let x=0;x{let g={},m={};return Object.entries(f).forEach(([y,[b,v]])=>{let T=e.getNode(y)?.in??"default";g[v]??={},g[v][T]??=[],g[v][T].push(y),m[b]??={},m[b][T]??=[],m[b][T].push(y)}),{horiz:Object.values(n(g,"horizontal")).filter(y=>y.length>1),vert:Object.values(n(m,"vertical")).filter(y=>y.length>1)}}),[s,l]=a.reduce(([f,g],{horiz:m,vert:y})=>[[...f,...m],[...g,...y]],[[],[]]),h=new Set;i.forEach(f=>f.members.forEach(g=>h.add(g)));let u=o(f=>f.filter(g=>!g.some(m=>h.has(m))),"dropOverlapping"),d=u(s),p=u(l);return i.forEach(f=>{f.members.length<2||(f.direction==="row"?d.push([...f.members]):p.push([...f.members]))}),{horizontal:d,vertical:p}}function m7e(e,t,r=[]){let i=[],n=t.getConfigField("iconSize"),a=t.getConfigField("idealEdgeLengthMultiplier"),s=a*n,l=new Set;r.forEach(d=>{for(let p=0;p`${d[0]},${d[1]}`,"posToStr"),u=o(d=>d.split(",").map(p=>parseInt(p)),"strToPos");return e.forEach(d=>{let p=Object.fromEntries(Object.entries(d).map(([y,b])=>[h(b),y])),f=[h([0,0])],g={},m={L:[-1,0],R:[1,0],T:[0,1],B:[0,-1]};for(;f.length>0;){let y=f.shift();if(y){g[y]=1;let b=p[y];if(b){let v=u(y);Object.entries(m).forEach(([T,x])=>{let k=h([v[0]+x[0],v[1]+x[1]]),C=p[k];if(C&&!g[k]){if(f.push(k),l.has(`${b}|${C}`))return;i.push({[n7e[T]]:C,[n7e[Pyt(T)]]:b,gap:a*n})}})}}}}),i}function y7e(e,t,r,i,n,{spatialMaps:a,groupAlignments:s}){return new Promise(l=>{let h=tt("body").append("div").attr("id","cy").attr("style","display:none"),u=Go({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":`${n.getConfigField("fontSize")}px`}},{selector:".node-service",style:{label:"data(label)",width:"data(width)",height:"data(height)"}},{selector:".node-junction",style:{width:"data(width)",height:"data(height)"}},{selector:".node-group",style:{padding:`${n.getConfigField("padding")}px`}}],layout:{name:"grid",boundingBox:{x1:0,x2:100,y1:0,y2:100}}});h.remove(),p7e(r,u),h7e(e,u,n),u7e(t,u,n),f7e(i,u);let d=n.getLayoutHints(),p=g7e(n,a,s,d),f=m7e(a,n,d),g=n.getConfigField("iconSize"),m=n.getConfigField("idealEdgeLengthMultiplier")*g,y=.5*g,b=n.getConfigField("edgeElasticity"),v=n.getConfigField("seed"),T=u.layout({name:"fcose",quality:"proof",randomize:n.getConfigField("randomize"),nodeSeparation:n.getConfigField("nodeSeparation"),numIter:n.getConfigField("numIter"),styleEnabled:!1,animate:!1,nodeDimensionsIncludeLabels:!1,idealEdgeLength(x){let[k,C]=x.connectedNodes(),{parent:E}=oy(k),{parent:w}=oy(C);return E===w?m:y},edgeElasticity(x){let[k,C]=x.connectedNodes(),{parent:E}=oy(k),{parent:w}=oy(C);return E===w?b:.001},alignmentConstraint:p,relativePlacementConstraint:f});T.one("layoutstop",()=>{function x(k,C,E,w){let _,L,{x:N,y:D}=k,{x:M,y:B}=C;L=(w-D+(N-E)*(D-B)/(N-M))/Math.sqrt(1+Math.pow((D-B)/(N-M),2)),_=Math.sqrt(Math.pow(w-D,2)+Math.pow(E-N,2)-Math.pow(L,2));let A=Math.sqrt(Math.pow(M-N,2)+Math.pow(B-D,2));_=_/A;let I=(M-N)*(w-D)-(B-D)*(E-N);switch(!0){case I>=0:I=1;break;case I<0:I=-1;break}let O=(M-N)*(E-N)+(B-D)*(w-D);switch(!0){case O>=0:O=1;break;case O<0:O=-1;break}return L=Math.abs(L)*I,_=_*O,{distances:L,weights:_}}o(x,"getSegmentWeights"),u.startBatch();for(let k of Object.values(u.edges()))if(k.data?.()){let{x:C,y:E}=k.source().position(),{x:w,y:_}=k.target().position();if(C!==w&&E!==_){let L=k.sourceEndpoint(),N=k.targetEndpoint(),{sourceDir:D}=o7e(k),[M,B]=op(D)?[L.x,N.y]:[N.x,L.y],{weights:A,distances:I}=x(L,N,M,B);k.style("segment-distances",I),k.style("segment-weights",A)}}u.endBatch(),jX(v,()=>T.run())});try{jX(v,()=>T.run())}catch(x){throw x instanceof RangeError&&x.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."):x}u.ready(x=>{ee.info("Ready",x),l(u)})})}var r7e,i7e,Byt,n7e,a7e,tA,Pyt,s7e,Rs,op,GX,Fyt,zyt,qX,qyt,jyt,Gyt,Wyt,Uyt,o7e,oy,Vyt,l7e,Yyt,c7e,Hyt,Xyt,Kyt,sy,DT,Zyt,Qyt,Jyt,e2t,t2t,r2t,i2t,b7e=Tt(()=>{bs();es();Ma();Sa();_a();Aa();Ra();La();$a();Ia();Da();xa();Ta();ka();Ca();wa();Ea();Rr();yn();DN();Fn();An();Or();Yr();tr();Zt();vt();r7e=Xn((e,t)=>{"use strict";o((function(r,i){typeof e=="object"&&typeof t=="object"?t.exports=i():typeof define=="function"&&define.amd?define([],i):typeof e=="object"?e.layoutBase=i():r.layoutBase=i()}),"webpackUniversalModuleDefinition")(e,function(){return(function(r){var i={};function n(a){if(i[a])return i[a].exports;var s=i[a]={i:a,l:!1,exports:{}};return r[a].call(s.exports,s,s.exports,n),s.l=!0,s.exports}return o(n,"__webpack_require__"),n.m=r,n.c=i,n.i=function(a){return a},n.d=function(a,s,l){n.o(a,s)||Object.defineProperty(a,s,{configurable:!1,enumerable:!0,get:l})},n.n=function(a){var s=a&&a.__esModule?o(function(){return a.default},"getDefault"):o(function(){return a},"getModuleExports");return n.d(s,"a",s),s},n.o=function(a,s){return Object.prototype.hasOwnProperty.call(a,s)},n.p="",n(n.s=28)})([(function(r,i,n){"use strict";function a(){}o(a,"LayoutConstants"),a.QUALITY=1,a.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,a.DEFAULT_INCREMENTAL=!1,a.DEFAULT_ANIMATION_ON_LAYOUT=!0,a.DEFAULT_ANIMATION_DURING_LAYOUT=!1,a.DEFAULT_ANIMATION_PERIOD=50,a.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,a.DEFAULT_GRAPH_MARGIN=15,a.NODE_DIMENSIONS_INCLUDE_LABELS=!1,a.SIMPLE_NODE_SIZE=40,a.SIMPLE_NODE_HALF_SIZE=a.SIMPLE_NODE_SIZE/2,a.EMPTY_COMPOUND_NODE_SIZE=40,a.MIN_EDGE_LENGTH=1,a.WORLD_BOUNDARY=1e6,a.INITIAL_WORLD_BOUNDARY=a.WORLD_BOUNDARY/1e3,a.WORLD_CENTER_X=1200,a.WORLD_CENTER_Y=900,r.exports=a}),(function(r,i,n){"use strict";var a=n(2),s=n(8),l=n(9);function h(d,p,f){a.call(this,f),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=f,this.bendpoints=[],this.source=d,this.target=p}o(h,"LEdge"),h.prototype=Object.create(a.prototype);for(var u in a)h[u]=a[u];h.prototype.getSource=function(){return this.source},h.prototype.getTarget=function(){return this.target},h.prototype.isInterGraph=function(){return this.isInterGraph},h.prototype.getLength=function(){return this.length},h.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},h.prototype.getBendpoints=function(){return this.bendpoints},h.prototype.getLca=function(){return this.lca},h.prototype.getSourceInLca=function(){return this.sourceInLca},h.prototype.getTargetInLca=function(){return this.targetInLca},h.prototype.getOtherEnd=function(d){if(this.source===d)return this.target;if(this.target===d)return this.source;throw"Node is not incident with this edge"},h.prototype.getOtherEndInGraph=function(d,p){for(var f=this.getOtherEnd(d),g=p.getGraphManager().getRoot();;){if(f.getOwner()==p)return f;if(f.getOwner()==g)break;f=f.getOwner().getParent()}return null},h.prototype.updateLength=function(){var d=new Array(4);this.isOverlapingSourceAndTarget=s.getIntersection(this.target.getRect(),this.source.getRect(),d),this.isOverlapingSourceAndTarget||(this.lengthX=d[0]-d[2],this.lengthY=d[1]-d[3],Math.abs(this.lengthX)<1&&(this.lengthX=l.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=l.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},h.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=l.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=l.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},r.exports=h}),(function(r,i,n){"use strict";function a(s){this.vGraphObject=s}o(a,"LGraphObject"),r.exports=a}),(function(r,i,n){"use strict";var a=n(2),s=n(10),l=n(13),h=n(0),u=n(16),d=n(5);function p(g,m,y,b){y==null&&b==null&&(b=m),a.call(this,b),g.graphManager!=null&&(g=g.graphManager),this.estimatedSize=s.MIN_VALUE,this.inclusionTreeDepth=s.MAX_VALUE,this.vGraphObject=b,this.edges=[],this.graphManager=g,y!=null&&m!=null?this.rect=new l(m.x,m.y,y.width,y.height):this.rect=new l}o(p,"LNode"),p.prototype=Object.create(a.prototype);for(var f in a)p[f]=a[f];p.prototype.getEdges=function(){return this.edges},p.prototype.getChild=function(){return this.child},p.prototype.getOwner=function(){return this.owner},p.prototype.getWidth=function(){return this.rect.width},p.prototype.setWidth=function(g){this.rect.width=g},p.prototype.getHeight=function(){return this.rect.height},p.prototype.setHeight=function(g){this.rect.height=g},p.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},p.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},p.prototype.getCenter=function(){return new d(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},p.prototype.getLocation=function(){return new d(this.rect.x,this.rect.y)},p.prototype.getRect=function(){return this.rect},p.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},p.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},p.prototype.setRect=function(g,m){this.rect.x=g.x,this.rect.y=g.y,this.rect.width=m.width,this.rect.height=m.height},p.prototype.setCenter=function(g,m){this.rect.x=g-this.rect.width/2,this.rect.y=m-this.rect.height/2},p.prototype.setLocation=function(g,m){this.rect.x=g,this.rect.y=m},p.prototype.moveBy=function(g,m){this.rect.x+=g,this.rect.y+=m},p.prototype.getEdgeListToNode=function(g){var m=[],y,b=this;return b.edges.forEach(function(v){if(v.target==g){if(v.source!=b)throw"Incorrect edge source!";m.push(v)}}),m},p.prototype.getEdgesBetween=function(g){var m=[],y,b=this;return b.edges.forEach(function(v){if(!(v.source==b||v.target==b))throw"Incorrect edge source and/or target";(v.target==g||v.source==g)&&m.push(v)}),m},p.prototype.getNeighborsList=function(){var g=new Set,m=this;return m.edges.forEach(function(y){if(y.source==m)g.add(y.target);else{if(y.target!=m)throw"Incorrect incidency!";g.add(y.source)}}),g},p.prototype.withChildren=function(){var g=new Set,m,y;if(g.add(this),this.child!=null)for(var b=this.child.getNodes(),v=0;vm?(this.rect.x-=(this.labelWidth-m)/2,this.setWidth(this.labelWidth)):this.labelPosHorizontal=="right"&&this.setWidth(m+this.labelWidth)),this.labelHeight&&(this.labelPosVertical=="top"?(this.rect.y-=this.labelHeight,this.setHeight(y+this.labelHeight)):this.labelPosVertical=="center"&&this.labelHeight>y?(this.rect.y-=(this.labelHeight-y)/2,this.setHeight(this.labelHeight)):this.labelPosVertical=="bottom"&&this.setHeight(y+this.labelHeight))}}},p.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==s.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},p.prototype.transform=function(g){var m=this.rect.x;m>h.WORLD_BOUNDARY?m=h.WORLD_BOUNDARY:m<-h.WORLD_BOUNDARY&&(m=-h.WORLD_BOUNDARY);var y=this.rect.y;y>h.WORLD_BOUNDARY?y=h.WORLD_BOUNDARY:y<-h.WORLD_BOUNDARY&&(y=-h.WORLD_BOUNDARY);var b=new d(m,y),v=g.inverseTransformPoint(b);this.setLocation(v.x,v.y)},p.prototype.getLeft=function(){return this.rect.x},p.prototype.getRight=function(){return this.rect.x+this.rect.width},p.prototype.getTop=function(){return this.rect.y},p.prototype.getBottom=function(){return this.rect.y+this.rect.height},p.prototype.getParent=function(){return this.owner==null?null:this.owner.getParent()},r.exports=p}),(function(r,i,n){"use strict";var a=n(0);function s(){}o(s,"FDLayoutConstants");for(var l in a)s[l]=a[l];s.MAX_ITERATIONS=2500,s.DEFAULT_EDGE_LENGTH=50,s.DEFAULT_SPRING_STRENGTH=.45,s.DEFAULT_REPULSION_STRENGTH=4500,s.DEFAULT_GRAVITY_STRENGTH=.4,s.DEFAULT_COMPOUND_GRAVITY_STRENGTH=1,s.DEFAULT_GRAVITY_RANGE_FACTOR=3.8,s.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=1.5,s.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION=!0,s.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION=!0,s.DEFAULT_COOLING_FACTOR_INCREMENTAL=.3,s.COOLING_ADAPTATION_FACTOR=.33,s.ADAPTATION_LOWER_NODE_LIMIT=1e3,s.ADAPTATION_UPPER_NODE_LIMIT=5e3,s.MAX_NODE_DISPLACEMENT_INCREMENTAL=100,s.MAX_NODE_DISPLACEMENT=s.MAX_NODE_DISPLACEMENT_INCREMENTAL*3,s.MIN_REPULSION_DIST=s.DEFAULT_EDGE_LENGTH/10,s.CONVERGENCE_CHECK_PERIOD=100,s.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=.1,s.MIN_EDGE_LENGTH=1,s.GRID_CALCULATION_CHECK_PERIOD=10,r.exports=s}),(function(r,i,n){"use strict";function a(s,l){s==null&&l==null?(this.x=0,this.y=0):(this.x=s,this.y=l)}o(a,"PointD"),a.prototype.getX=function(){return this.x},a.prototype.getY=function(){return this.y},a.prototype.setX=function(s){this.x=s},a.prototype.setY=function(s){this.y=s},a.prototype.getDifference=function(s){return new DimensionD(this.x-s.x,this.y-s.y)},a.prototype.getCopy=function(){return new a(this.x,this.y)},a.prototype.translate=function(s){return this.x+=s.width,this.y+=s.height,this},r.exports=a}),(function(r,i,n){"use strict";var a=n(2),s=n(10),l=n(0),h=n(7),u=n(3),d=n(1),p=n(13),f=n(12),g=n(11);function m(b,v,T){a.call(this,T),this.estimatedSize=s.MIN_VALUE,this.margin=l.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=b,v!=null&&v instanceof h?this.graphManager=v:v!=null&&v instanceof Layout&&(this.graphManager=v.graphManager)}o(m,"LGraph"),m.prototype=Object.create(a.prototype);for(var y in a)m[y]=a[y];m.prototype.getNodes=function(){return this.nodes},m.prototype.getEdges=function(){return this.edges},m.prototype.getGraphManager=function(){return this.graphManager},m.prototype.getParent=function(){return this.parent},m.prototype.getLeft=function(){return this.left},m.prototype.getRight=function(){return this.right},m.prototype.getTop=function(){return this.top},m.prototype.getBottom=function(){return this.bottom},m.prototype.isConnected=function(){return this.isConnected},m.prototype.add=function(b,v,T){if(v==null&&T==null){var x=b;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 k=b;if(!(this.getNodes().indexOf(v)>-1&&this.getNodes().indexOf(T)>-1))throw"Source or target not in graph!";if(!(v.owner==T.owner&&v.owner==this))throw"Both owners must be this graph!";return v.owner!=T.owner?null:(k.source=v,k.target=T,k.isInterGraph=!1,this.getEdges().push(k),v.edges.push(k),T!=v&&T.edges.push(k),k)}},m.prototype.remove=function(b){var v=b;if(b instanceof u){if(v==null)throw"Node is null!";if(!(v.owner!=null&&v.owner==this))throw"Owner graph is invalid!";if(this.graphManager==null)throw"Owner graph manager is invalid!";for(var T=v.edges.slice(),x,k=T.length,C=0;C-1&&_>-1))throw"Source and/or target doesn't know this edge!";x.source.edges.splice(w,1),x.target!=x.source&&x.target.edges.splice(_,1);var E=x.source.owner.getEdges().indexOf(x);if(E==-1)throw"Not in owner's edge list!";x.source.owner.getEdges().splice(E,1)}},m.prototype.updateLeftTop=function(){for(var b=s.MAX_VALUE,v=s.MAX_VALUE,T,x,k,C=this.getNodes(),E=C.length,w=0;wT&&(b=T),v>x&&(v=x)}return b==s.MAX_VALUE?null:(C[0].getParent().paddingLeft!=null?k=C[0].getParent().paddingLeft:k=this.margin,this.left=v-k,this.top=b-k,new f(this.left,this.top))},m.prototype.updateBounds=function(b){for(var v=s.MAX_VALUE,T=-s.MAX_VALUE,x=s.MAX_VALUE,k=-s.MAX_VALUE,C,E,w,_,L,N=this.nodes,D=N.length,M=0;MC&&(v=C),Tw&&(x=w),k<_&&(k=_)}var A=new p(v,x,T-v,k-x);v==s.MAX_VALUE&&(this.left=this.parent.getLeft(),this.right=this.parent.getRight(),this.top=this.parent.getTop(),this.bottom=this.parent.getBottom()),N[0].getParent().paddingLeft!=null?L=N[0].getParent().paddingLeft:L=this.margin,this.left=A.x-L,this.right=A.x+A.width+L,this.top=A.y-L,this.bottom=A.y+A.height+L},m.calculateBounds=function(b){for(var v=s.MAX_VALUE,T=-s.MAX_VALUE,x=s.MAX_VALUE,k=-s.MAX_VALUE,C,E,w,_,L=b.length,N=0;NC&&(v=C),Tw&&(x=w),k<_&&(k=_)}var M=new p(v,x,T-v,k-x);return M},m.prototype.getInclusionTreeDepth=function(){return this==this.graphManager.getRoot()?1:this.parent.getInclusionTreeDepth()},m.prototype.getEstimatedSize=function(){if(this.estimatedSize==s.MIN_VALUE)throw"assert failed";return this.estimatedSize},m.prototype.calcEstimatedSize=function(){for(var b=0,v=this.nodes,T=v.length,x=0;x=this.nodes.length){var D=0;T.forEach(function(M){M.owner==b&&D++}),D==this.nodes.length&&(this.isConnected=!0)}},r.exports=m}),(function(r,i,n){"use strict";var a,s=n(1);function l(h){a=n(6),this.layout=h,this.graphs=[],this.edges=[]}o(l,"LGraphManager"),l.prototype.addRoot=function(){var h=this.layout.newGraph(),u=this.layout.newNode(null),d=this.add(h,u);return this.setRootGraph(d),this.rootGraph},l.prototype.add=function(h,u,d,p,f){if(d==null&&p==null&&f==null){if(h==null)throw"Graph is null!";if(u==null)throw"Parent node is null!";if(this.graphs.indexOf(h)>-1)throw"Graph already in this graph mgr!";if(this.graphs.push(h),h.parent!=null)throw"Already has a parent!";if(u.child!=null)throw"Already has a child!";return h.parent=u,u.child=h,h}else{f=d,p=u,d=h;var g=p.getOwner(),m=f.getOwner();if(!(g!=null&&g.getGraphManager()==this))throw"Source not in this graph mgr!";if(!(m!=null&&m.getGraphManager()==this))throw"Target not in this graph mgr!";if(g==m)return d.isInterGraph=!1,g.add(d,p,f);if(d.isInterGraph=!0,d.source=p,d.target=f,this.edges.indexOf(d)>-1)throw"Edge already in inter-graph edge list!";if(this.edges.push(d),!(d.source!=null&&d.target!=null))throw"Edge source and/or target is null!";if(!(d.source.edges.indexOf(d)==-1&&d.target.edges.indexOf(d)==-1))throw"Edge already in source and/or target incidency list!";return d.source.edges.push(d),d.target.edges.push(d),d}},l.prototype.remove=function(h){if(h instanceof a){var u=h;if(u.getGraphManager()!=this)throw"Graph not in this graph mgr";if(!(u==this.rootGraph||u.parent!=null&&u.parent.graphManager==this))throw"Invalid parent node!";var d=[];d=d.concat(u.getEdges());for(var p,f=d.length,g=0;g=h.getRight()?u[0]+=Math.min(h.getX()-l.getX(),l.getRight()-h.getRight()):h.getX()<=l.getX()&&h.getRight()>=l.getRight()&&(u[0]+=Math.min(l.getX()-h.getX(),h.getRight()-l.getRight())),l.getY()<=h.getY()&&l.getBottom()>=h.getBottom()?u[1]+=Math.min(h.getY()-l.getY(),l.getBottom()-h.getBottom()):h.getY()<=l.getY()&&h.getBottom()>=l.getBottom()&&(u[1]+=Math.min(l.getY()-h.getY(),h.getBottom()-l.getBottom()));var f=Math.abs((h.getCenterY()-l.getCenterY())/(h.getCenterX()-l.getCenterX()));h.getCenterY()===l.getCenterY()&&h.getCenterX()===l.getCenterX()&&(f=1);var g=f*u[0],m=u[1]/f;u[0]g)return u[0]=d,u[1]=y,u[2]=f,u[3]=N,!1;if(pf)return u[0]=m,u[1]=p,u[2]=_,u[3]=g,!1;if(df?(u[0]=v,u[1]=T,A=!0):(u[0]=b,u[1]=y,A=!0):O===$&&(d>f?(u[0]=m,u[1]=y,A=!0):(u[0]=x,u[1]=T,A=!0)),-R===$?f>d?(u[2]=L,u[3]=N,I=!0):(u[2]=_,u[3]=w,I=!0):R===$&&(f>d?(u[2]=E,u[3]=w,I=!0):(u[2]=D,u[3]=N,I=!0)),A&&I)return!1;if(d>f?p>g?(F=this.getCardinalDirection(O,$,4),P=this.getCardinalDirection(R,$,2)):(F=this.getCardinalDirection(-O,$,3),P=this.getCardinalDirection(-R,$,1)):p>g?(F=this.getCardinalDirection(-O,$,1),P=this.getCardinalDirection(-R,$,3)):(F=this.getCardinalDirection(O,$,2),P=this.getCardinalDirection(R,$,4)),!A)switch(F){case 1:q=y,z=d+-C/$,u[0]=z,u[1]=q;break;case 2:z=x,q=p+k*$,u[0]=z,u[1]=q;break;case 3:q=T,z=d+C/$,u[0]=z,u[1]=q;break;case 4:z=v,q=p+-k*$,u[0]=z,u[1]=q;break}if(!I)switch(P){case 1:W=w,G=f+-B/$,u[2]=G,u[3]=W;break;case 2:G=D,W=g+M*$,u[2]=G,u[3]=W;break;case 3:W=N,G=f+B/$,u[2]=G,u[3]=W;break;case 4:G=L,W=g+-M*$,u[2]=G,u[3]=W;break}}return!1},s.getCardinalDirection=function(l,h,u){return l>h?u:1+u%4},s.getIntersection=function(l,h,u,d){if(d==null)return this.getIntersection2(l,h,u);var p=l.x,f=l.y,g=h.x,m=h.y,y=u.x,b=u.y,v=d.x,T=d.y,x=void 0,k=void 0,C=void 0,E=void 0,w=void 0,_=void 0,L=void 0,N=void 0,D=void 0;return C=m-f,w=p-g,L=g*f-p*m,E=T-b,_=y-v,N=v*b-y*T,D=C*_-E*w,D===0?null:(x=(w*N-_*L)/D,k=(E*L-C*N)/D,new a(x,k))},s.angleOfVector=function(l,h,u,d){var p=void 0;return l!==u?(p=Math.atan((d-h)/(u-l)),u=0){var T=(-y+Math.sqrt(y*y-4*m*b))/(2*m),x=(-y-Math.sqrt(y*y-4*m*b))/(2*m),k=null;return T>=0&&T<=1?[T]:x>=0&&x<=1?[x]:k}else return null},s.HALF_PI=.5*Math.PI,s.ONE_AND_HALF_PI=1.5*Math.PI,s.TWO_PI=2*Math.PI,s.THREE_PI=3*Math.PI,r.exports=s}),(function(r,i,n){"use strict";function a(){}o(a,"IMath"),a.sign=function(s){return s>0?1:s<0?-1:0},a.floor=function(s){return s<0?Math.ceil(s):Math.floor(s)},a.ceil=function(s){return s<0?Math.floor(s):Math.ceil(s)},r.exports=a}),(function(r,i,n){"use strict";function a(){}o(a,"Integer"),a.MAX_VALUE=2147483647,a.MIN_VALUE=-2147483648,r.exports=a}),(function(r,i,n){"use strict";var a=(function(){function p(f,g){for(var m=0;m"u"?"undefined":a(l);return l==null||h!="object"&&h!="function"},r.exports=s}),(function(r,i,n){"use strict";function a(y){if(Array.isArray(y)){for(var b=0,v=Array(y.length);b0&&b;){for(C.push(w[0]);C.length>0&&b;){var _=C[0];C.splice(0,1),k.add(_);for(var L=_.getEdges(),x=0;x-1&&w.splice(B,1)}k=new Set,E=new Map}}return y},m.prototype.createDummyNodesForBendpoints=function(y){for(var b=[],v=y.source,T=this.graphManager.calcLowestCommonAncestor(y.source,y.target),x=0;x0){for(var T=this.edgeToDummyNodes.get(v),x=0;x=0&&b.splice(N,1);var D=E.getNeighborsList();D.forEach(function(A){if(v.indexOf(A)<0){var I=T.get(A),O=I-1;O==1&&_.push(A),T.set(A,O)}})}v=v.concat(_),(b.length==1||b.length==2)&&(x=!0,k=b[0])}return k},m.prototype.setGraphManager=function(y){this.graphManager=y},r.exports=m}),(function(r,i,n){"use strict";function a(){}o(a,"RandomSeed"),a.seed=1,a.x=0,a.nextDouble=function(){return a.x=Math.sin(a.seed++)*1e4,a.x-Math.floor(a.x)},r.exports=a}),(function(r,i,n){"use strict";var a=n(5);function s(l,h){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}o(s,"Transform"),s.prototype.getWorldOrgX=function(){return this.lworldOrgX},s.prototype.setWorldOrgX=function(l){this.lworldOrgX=l},s.prototype.getWorldOrgY=function(){return this.lworldOrgY},s.prototype.setWorldOrgY=function(l){this.lworldOrgY=l},s.prototype.getWorldExtX=function(){return this.lworldExtX},s.prototype.setWorldExtX=function(l){this.lworldExtX=l},s.prototype.getWorldExtY=function(){return this.lworldExtY},s.prototype.setWorldExtY=function(l){this.lworldExtY=l},s.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},s.prototype.setDeviceOrgX=function(l){this.ldeviceOrgX=l},s.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},s.prototype.setDeviceOrgY=function(l){this.ldeviceOrgY=l},s.prototype.getDeviceExtX=function(){return this.ldeviceExtX},s.prototype.setDeviceExtX=function(l){this.ldeviceExtX=l},s.prototype.getDeviceExtY=function(){return this.ldeviceExtY},s.prototype.setDeviceExtY=function(l){this.ldeviceExtY=l},s.prototype.transformX=function(l){var h=0,u=this.lworldExtX;return u!=0&&(h=this.ldeviceOrgX+(l-this.lworldOrgX)*this.ldeviceExtX/u),h},s.prototype.transformY=function(l){var h=0,u=this.lworldExtY;return u!=0&&(h=this.ldeviceOrgY+(l-this.lworldOrgY)*this.ldeviceExtY/u),h},s.prototype.inverseTransformX=function(l){var h=0,u=this.ldeviceExtX;return u!=0&&(h=this.lworldOrgX+(l-this.ldeviceOrgX)*this.lworldExtX/u),h},s.prototype.inverseTransformY=function(l){var h=0,u=this.ldeviceExtY;return u!=0&&(h=this.lworldOrgY+(l-this.ldeviceOrgY)*this.lworldExtY/u),h},s.prototype.inverseTransformPoint=function(l){var h=new a(this.inverseTransformX(l.x),this.inverseTransformY(l.y));return h},r.exports=s}),(function(r,i,n){"use strict";function a(g){if(Array.isArray(g)){for(var m=0,y=Array(g.length);ml.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*l.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(g-l.ADAPTATION_LOWER_NODE_LIMIT)/(l.ADAPTATION_UPPER_NODE_LIMIT-l.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-l.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=l.MAX_NODE_DISPLACEMENT_INCREMENTAL):(g>l.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(l.COOLING_ADAPTATION_FACTOR,1-(g-l.ADAPTATION_LOWER_NODE_LIMIT)/(l.ADAPTATION_UPPER_NODE_LIMIT-l.ADAPTATION_LOWER_NODE_LIMIT)*(1-l.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=l.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(this.getAllNodes().length*5,this.maxIterations),this.displacementThresholdPerNode=3*l.DEFAULT_EDGE_LENGTH/100,this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},p.prototype.calcSpringForces=function(){for(var g=this.getAllEdges(),m,y=0;y0&&arguments[0]!==void 0?arguments[0]:!0,m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,y,b,v,T,x=this.getAllNodes(),k;if(this.useFRGridVariant)for(this.totalIterations%l.GRID_CALCULATION_CHECK_PERIOD==1&&g&&this.updateGrid(),k=new Set,y=0;yC||k>C)&&(g.gravitationForceX=-this.gravityConstant*v,g.gravitationForceY=-this.gravityConstant*T)):(C=m.getEstimatedSize()*this.compoundGravityRangeFactor,(x>C||k>C)&&(g.gravitationForceX=-this.gravityConstant*v*this.compoundGravityConstant,g.gravitationForceY=-this.gravityConstant*T*this.compoundGravityConstant))},p.prototype.isConverged=function(){var g,m=!1;return this.totalIterations>this.maxIterations/3&&(m=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),g=this.totalDisplacement=x.length||C>=x[0].length)){for(var E=0;Ed},"_defaultCompareFunction")}]),u})();r.exports=h}),(function(r,i,n){"use strict";function a(){}o(a,"SVD"),a.svd=function(s){this.U=null,this.V=null,this.s=null,this.m=0,this.n=0,this.m=s.length,this.n=s[0].length;var l=Math.min(this.m,this.n);this.s=(function(de){for(var st=[];de-- >0;)st.push(0);return st})(Math.min(this.m+1,this.n)),this.U=(function(de){var st=o(function nt(rt){if(rt.length==0)return 0;for(var _e=[],Ze=0;Ze0;)st.push(0);return st})(this.n),u=(function(de){for(var st=[];de-- >0;)st.push(0);return st})(this.m),d=!0,p=!0,f=Math.min(this.m-1,this.n),g=Math.max(0,Math.min(this.n-2,this.m)),m=0;m=0;$--)if(this.s[$]!==0){for(var F=$+1;F=0;H--){if((function(de,st){return de&&st})(H0;){var oe=void 0,we=void 0;for(oe=I-2;oe>=-1&&oe!==-1;oe--)if(Math.abs(h[oe])<=me+ie*(Math.abs(this.s[oe])+Math.abs(this.s[oe+1]))){h[oe]=0;break}if(oe===I-2)we=4;else{var ye=void 0;for(ye=I-1;ye>=oe&&ye!==oe;ye--){var ve=(ye!==I?Math.abs(h[ye]):0)+(ye!==oe+1?Math.abs(h[ye-1]):0);if(Math.abs(this.s[ye])<=me+ie*ve){this.s[ye]=0;break}}ye===oe?we=3:ye===I-1?we=1:(we=2,oe=ye)}switch(oe++,we){case 1:{var ae=h[I-2];h[I-2]=0;for(var Pe=I-2;Pe>=oe;Pe--){var X=a.hypot(this.s[Pe],ae),ce=this.s[Pe]/X,ge=ae/X;if(this.s[Pe]=X,Pe!==oe&&(ae=-ge*h[Pe-1],h[Pe-1]=ce*h[Pe-1]),p)for(var be=0;be=this.s[oe+1]);){var Ct=this.s[oe];if(this.s[oe]=this.s[oe+1],this.s[oe+1]=Ct,p&&oeMath.abs(l)?(h=l/s,h=Math.abs(s)*Math.sqrt(1+h*h)):l!=0?(h=s/l,h=Math.abs(l)*Math.sqrt(1+h*h)):h=0,h},r.exports=a}),(function(r,i,n){"use strict";var a=(function(){function h(u,d){for(var p=0;p2&&arguments[2]!==void 0?arguments[2]:1,f=arguments.length>3&&arguments[3]!==void 0?arguments[3]:-1,g=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1;s(this,h),this.sequence1=u,this.sequence2=d,this.match_score=p,this.mismatch_penalty=f,this.gap_penalty=g,this.iMax=u.length+1,this.jMax=d.length+1,this.grid=new Array(this.iMax);for(var m=0;m=0;u--){var d=this.listeners[u];d.event===l&&d.callback===h&&this.listeners.splice(u,1)}},s.emit=function(l,h){for(var u=0;u{"use strict";o((function(r,i){typeof e=="object"&&typeof t=="object"?t.exports=i(r7e()):typeof define=="function"&&define.amd?define(["layout-base"],i):typeof e=="object"?e.coseBase=i(r7e()):r.coseBase=i(r.layoutBase)}),"webpackUniversalModuleDefinition")(e,function(r){return(()=>{"use strict";var i={45:((l,h,u)=>{var d={};d.layoutBase=u(551),d.CoSEConstants=u(806),d.CoSEEdge=u(767),d.CoSEGraph=u(880),d.CoSEGraphManager=u(578),d.CoSELayout=u(765),d.CoSENode=u(991),d.ConstraintHandler=u(902),l.exports=d}),806:((l,h,u)=>{var d=u(551).FDLayoutConstants;function p(){}o(p,"CoSEConstants");for(var f in d)p[f]=d[f];p.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,p.DEFAULT_RADIAL_SEPARATION=d.DEFAULT_EDGE_LENGTH,p.DEFAULT_COMPONENT_SEPERATION=60,p.TILE=!0,p.TILING_PADDING_VERTICAL=10,p.TILING_PADDING_HORIZONTAL=10,p.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,p.ENFORCE_CONSTRAINTS=!0,p.APPLY_LAYOUT=!0,p.RELAX_MOVEMENT_ON_CONSTRAINTS=!0,p.TREE_REDUCTION_ON_INCREMENTAL=!0,p.PURE_INCREMENTAL=p.DEFAULT_INCREMENTAL,l.exports=p}),767:((l,h,u)=>{var d=u(551).FDLayoutEdge;function p(g,m,y){d.call(this,g,m,y)}o(p,"CoSEEdge"),p.prototype=Object.create(d.prototype);for(var f in d)p[f]=d[f];l.exports=p}),880:((l,h,u)=>{var d=u(551).LGraph;function p(g,m,y){d.call(this,g,m,y)}o(p,"CoSEGraph"),p.prototype=Object.create(d.prototype);for(var f in d)p[f]=d[f];l.exports=p}),578:((l,h,u)=>{var d=u(551).LGraphManager;function p(g){d.call(this,g)}o(p,"CoSEGraphManager"),p.prototype=Object.create(d.prototype);for(var f in d)p[f]=d[f];l.exports=p}),765:((l,h,u)=>{var d=u(551).FDLayout,p=u(578),f=u(880),g=u(991),m=u(767),y=u(806),b=u(902),v=u(551).FDLayoutConstants,T=u(551).LayoutConstants,x=u(551).Point,k=u(551).PointD,C=u(551).DimensionD,E=u(551).Layout,w=u(551).Integer,_=u(551).IGeometry,L=u(551).LGraph,N=u(551).Transform,D=u(551).LinkedList;function M(){d.call(this),this.toBeTiled={},this.constraints={}}o(M,"CoSELayout"),M.prototype=Object.create(d.prototype);for(var B in d)M[B]=d[B];M.prototype.newGraphManager=function(){var A=new p(this);return this.graphManager=A,A},M.prototype.newGraph=function(A){return new f(null,this.graphManager,A)},M.prototype.newNode=function(A){return new g(this.graphManager,A)},M.prototype.newEdge=function(A){return new m(null,null,A)},M.prototype.initParameters=function(){d.prototype.initParameters.call(this,arguments),this.isSubLayout||(y.DEFAULT_EDGE_LENGTH<10?this.idealEdgeLength=10:this.idealEdgeLength=y.DEFAULT_EDGE_LENGTH,this.useSmartIdealEdgeLengthCalculation=y.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.gravityConstant=v.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=v.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=v.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=v.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.prunedNodesAll=[],this.growTreeIterations=0,this.afterGrowthIterations=0,this.isTreeGrowing=!1,this.isGrowthFinished=!1)},M.prototype.initSpringEmbedder=function(){d.prototype.initSpringEmbedder.call(this),this.coolingCycle=0,this.maxCoolingCycle=this.maxIterations/v.CONVERGENCE_CHECK_PERIOD,this.finalTemperature=.04,this.coolingAdjuster=1},M.prototype.layout=function(){var A=T.DEFAULT_CREATE_BENDS_AS_NEEDED;return A&&(this.createBendpoints(),this.graphManager.resetAllEdges()),this.level=0,this.classicLayout()},M.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(y.TREE_REDUCTION_ON_INCREMENTAL){this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var A=new Set(this.getAllNodes()),I=this.nodesWithGravity.filter(function(R){return A.has(R)});this.graphManager.setAllNodesToApplyGravitation(I)}}else{var O=this.getFlatForest();if(O.length>0)this.positionNodesRadially(O);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var A=new Set(this.getAllNodes()),I=this.nodesWithGravity.filter(function(F){return A.has(F)});this.graphManager.setAllNodesToApplyGravitation(I),this.positionNodesRandomly()}}return Object.keys(this.constraints).length>0&&(b.handleConstraints(this),this.initConstraintVariables()),this.initSpringEmbedder(),y.APPLY_LAYOUT&&this.runSpringEmbedder(),!0},M.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%v.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 A=new Set(this.getAllNodes()),I=this.nodesWithGravity.filter(function($){return A.has($)});this.graphManager.setAllNodesToApplyGravitation(I),this.graphManager.updateBounds(),this.updateGrid(),y.PURE_INCREMENTAL?this.coolingFactor=v.DEFAULT_COOLING_FACTOR_INCREMENTAL/2:this.coolingFactor=v.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()),y.PURE_INCREMENTAL?this.coolingFactor=v.DEFAULT_COOLING_FACTOR_INCREMENTAL/2*((100-this.afterGrowthIterations)/100):this.coolingFactor=v.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var O=!this.isTreeGrowing&&!this.isGrowthFinished,R=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(O,R),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},M.prototype.getPositionsData=function(){for(var A=this.graphManager.getAllNodes(),I={},O=0;O0&&this.updateDisplacements();for(var O=0;O0&&(R.fixedNodeWeight=F)}}if(this.constraints.relativePlacementConstraint){var P=new Map,z=new Map;if(this.dummyToNodeForVerticalAlignment=new Map,this.dummyToNodeForHorizontalAlignment=new Map,this.fixedNodesOnHorizontal=new Set,this.fixedNodesOnVertical=new Set,this.fixedNodeSet.forEach(function(Q){A.fixedNodesOnHorizontal.add(Q),A.fixedNodesOnVertical.add(Q)}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var q=this.constraints.alignmentConstraint.vertical,O=0;O=2*Q.length/3;ne--)te=Math.floor(Math.random()*(ne+1)),re=Q[ne],Q[ne]=Q[te],Q[te]=re;return Q},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(Q){if(Q.left){var te=P.has(Q.left)?P.get(Q.left):Q.left,re=P.has(Q.right)?P.get(Q.right):Q.right;A.nodesInRelativeHorizontal.includes(te)||(A.nodesInRelativeHorizontal.push(te),A.nodeToRelativeConstraintMapHorizontal.set(te,[]),A.dummyToNodeForVerticalAlignment.has(te)?A.nodeToTempPositionMapHorizontal.set(te,A.idToNodeMap.get(A.dummyToNodeForVerticalAlignment.get(te)[0]).getCenterX()):A.nodeToTempPositionMapHorizontal.set(te,A.idToNodeMap.get(te).getCenterX())),A.nodesInRelativeHorizontal.includes(re)||(A.nodesInRelativeHorizontal.push(re),A.nodeToRelativeConstraintMapHorizontal.set(re,[]),A.dummyToNodeForVerticalAlignment.has(re)?A.nodeToTempPositionMapHorizontal.set(re,A.idToNodeMap.get(A.dummyToNodeForVerticalAlignment.get(re)[0]).getCenterX()):A.nodeToTempPositionMapHorizontal.set(re,A.idToNodeMap.get(re).getCenterX())),A.nodeToRelativeConstraintMapHorizontal.get(te).push({right:re,gap:Q.gap}),A.nodeToRelativeConstraintMapHorizontal.get(re).push({left:te,gap:Q.gap})}else{var ne=z.has(Q.top)?z.get(Q.top):Q.top,Ae=z.has(Q.bottom)?z.get(Q.bottom):Q.bottom;A.nodesInRelativeVertical.includes(ne)||(A.nodesInRelativeVertical.push(ne),A.nodeToRelativeConstraintMapVertical.set(ne,[]),A.dummyToNodeForHorizontalAlignment.has(ne)?A.nodeToTempPositionMapVertical.set(ne,A.idToNodeMap.get(A.dummyToNodeForHorizontalAlignment.get(ne)[0]).getCenterY()):A.nodeToTempPositionMapVertical.set(ne,A.idToNodeMap.get(ne).getCenterY())),A.nodesInRelativeVertical.includes(Ae)||(A.nodesInRelativeVertical.push(Ae),A.nodeToRelativeConstraintMapVertical.set(Ae,[]),A.dummyToNodeForHorizontalAlignment.has(Ae)?A.nodeToTempPositionMapVertical.set(Ae,A.idToNodeMap.get(A.dummyToNodeForHorizontalAlignment.get(Ae)[0]).getCenterY()):A.nodeToTempPositionMapVertical.set(Ae,A.idToNodeMap.get(Ae).getCenterY())),A.nodeToRelativeConstraintMapVertical.get(ne).push({bottom:Ae,gap:Q.gap}),A.nodeToRelativeConstraintMapVertical.get(Ae).push({top:ne,gap:Q.gap})}});else{var W=new Map,J=new Map;this.constraints.relativePlacementConstraint.forEach(function(Q){if(Q.left){var te=P.has(Q.left)?P.get(Q.left):Q.left,re=P.has(Q.right)?P.get(Q.right):Q.right;W.has(te)?W.get(te).push(re):W.set(te,[re]),W.has(re)?W.get(re).push(te):W.set(re,[te])}else{var ne=z.has(Q.top)?z.get(Q.top):Q.top,Ae=z.has(Q.bottom)?z.get(Q.bottom):Q.bottom;J.has(ne)?J.get(ne).push(Ae):J.set(ne,[Ae]),J.has(Ae)?J.get(Ae).push(ne):J.set(Ae,[ne])}});var H=o(function(Q,te){var re=[],ne=[],Ae=new D,ie=new Set,me=0;return Q.forEach(function(oe,we){if(!ie.has(we)){re[me]=[],ne[me]=!1;var ye=we;for(Ae.push(ye),ie.add(ye),re[me].push(ye);Ae.length!=0;){ye=Ae.shift(),te.has(ye)&&(ne[me]=!0);var ve=Q.get(ye);ve.forEach(function(ae){ie.has(ae)||(Ae.push(ae),ie.add(ae),re[me].push(ae))})}me++}}),{components:re,isFixed:ne}},"constructComponents"),Z=H(W,A.fixedNodesOnHorizontal);this.componentsOnHorizontal=Z.components,this.fixedComponentsOnHorizontal=Z.isFixed;var se=H(J,A.fixedNodesOnVertical);this.componentsOnVertical=se.components,this.fixedComponentsOnVertical=se.isFixed}}},M.prototype.updateDisplacements=function(){var A=this;if(this.constraints.fixedNodeConstraint&&this.constraints.fixedNodeConstraint.forEach(function(se){var Q=A.idToNodeMap.get(se.nodeId);Q.displacementX=0,Q.displacementY=0}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var I=this.constraints.alignmentConstraint.vertical,O=0;O1){var z;for(z=0;zR&&(R=Math.floor(P.y)),F=Math.floor(P.x+y.DEFAULT_COMPONENT_SEPERATION)}this.transform(new k(T.WORLD_CENTER_X-P.x/2,T.WORLD_CENTER_Y-P.y/2))},M.radialLayout=function(A,I,O){var R=Math.max(this.maxDiagonalInTree(A),y.DEFAULT_RADIAL_SEPARATION);M.branchRadialLayout(I,null,0,359,0,R);var $=L.calculateBounds(A),F=new N;F.setDeviceOrgX($.getMinX()),F.setDeviceOrgY($.getMinY()),F.setWorldOrgX(O.x),F.setWorldOrgY(O.y);for(var P=0;P1;){var ne=re[0];re.splice(0,1);var Ae=H.indexOf(ne);Ae>=0&&H.splice(Ae,1),Q--,Z--}I!=null?te=(H.indexOf(re[0])+1)%Q:te=0;for(var ie=Math.abs(R-O)/Z,me=te;se!=Z;me=++me%Q){var oe=H[me].getOtherEnd(A);if(oe!=I){var we=(O+se*ie)%360,ye=(we+ie)%360;M.branchRadialLayout(oe,A,we,ye,$+F,F),se++}}},M.maxDiagonalInTree=function(A){for(var I=w.MIN_VALUE,O=0;OI&&(I=$)}return I},M.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},M.prototype.groupZeroDegreeMembers=function(){var A=this,I={};this.memberGroups={},this.idToDummyNode={};for(var O=[],R=this.graphManager.getAllNodes(),$=0;$"u"&&(I[z]=[]),I[z]=I[z].concat(F)}Object.keys(I).forEach(function(q){if(I[q].length>1){var G="DummyCompound_"+q;A.memberGroups[G]=I[q];var W=I[q][0].getParent(),J=new g(A.graphManager);J.id=G,J.paddingLeft=W.paddingLeft||0,J.paddingRight=W.paddingRight||0,J.paddingBottom=W.paddingBottom||0,J.paddingTop=W.paddingTop||0,A.idToDummyNode[G]=J;var H=A.getGraphManager().add(A.newGraph(),J),Z=W.getChild();Z.add(J);for(var se=0;se$?(R.rect.x-=(R.labelWidth-$)/2,R.setWidth(R.labelWidth),R.labelMarginLeft=(R.labelWidth-$)/2):R.labelPosHorizontal=="right"&&R.setWidth($+R.labelWidth)),R.labelHeight&&(R.labelPosVertical=="top"?(R.rect.y-=R.labelHeight,R.setHeight(F+R.labelHeight),R.labelMarginTop=R.labelHeight):R.labelPosVertical=="center"&&R.labelHeight>F?(R.rect.y-=(R.labelHeight-F)/2,R.setHeight(R.labelHeight),R.labelMarginTop=(R.labelHeight-F)/2):R.labelPosVertical=="bottom"&&R.setHeight(F+R.labelHeight))}})},M.prototype.repopulateCompounds=function(){for(var A=this.compoundOrder.length-1;A>=0;A--){var I=this.compoundOrder[A],O=I.id,R=I.paddingLeft,$=I.paddingTop,F=I.labelMarginLeft,P=I.labelMarginTop;this.adjustLocations(this.tiledMemberPack[O],I.rect.x,I.rect.y,R,$,F,P)}},M.prototype.repopulateZeroDegreeMembers=function(){var A=this,I=this.tiledZeroDegreePack;Object.keys(I).forEach(function(O){var R=A.idToDummyNode[O],$=R.paddingLeft,F=R.paddingTop,P=R.labelMarginLeft,z=R.labelMarginTop;A.adjustLocations(I[O],R.rect.x,R.rect.y,$,F,P,z)})},M.prototype.getToBeTiled=function(A){var I=A.id;if(this.toBeTiled[I]!=null)return this.toBeTiled[I];var O=A.getChild();if(O==null)return this.toBeTiled[I]=!1,!1;for(var R=O.getNodes(),$=0;$0)return this.toBeTiled[I]=!1,!1;if(F.getChild()==null){this.toBeTiled[F.id]=!1;continue}if(!this.getToBeTiled(F))return this.toBeTiled[I]=!1,!1}return this.toBeTiled[I]=!0,!0},M.prototype.getNodeDegree=function(A){for(var I=A.id,O=A.getEdges(),R=0,$=0;$W&&(W=H.rect.height)}O+=W+A.verticalPadding}},M.prototype.tileCompoundMembers=function(A,I){var O=this;this.tiledMemberPack=[],Object.keys(A).forEach(function(R){var $=I[R];if(O.tiledMemberPack[R]=O.tileNodes(A[R],$.paddingLeft+$.paddingRight),$.rect.width=O.tiledMemberPack[R].width,$.rect.height=O.tiledMemberPack[R].height,$.setCenter(O.tiledMemberPack[R].centerX,O.tiledMemberPack[R].centerY),$.labelMarginLeft=0,$.labelMarginTop=0,y.NODE_DIMENSIONS_INCLUDE_LABELS){var F=$.rect.width,P=$.rect.height;$.labelWidth&&($.labelPosHorizontal=="left"?($.rect.x-=$.labelWidth,$.setWidth(F+$.labelWidth),$.labelMarginLeft=$.labelWidth):$.labelPosHorizontal=="center"&&$.labelWidth>F?($.rect.x-=($.labelWidth-F)/2,$.setWidth($.labelWidth),$.labelMarginLeft=($.labelWidth-F)/2):$.labelPosHorizontal=="right"&&$.setWidth(F+$.labelWidth)),$.labelHeight&&($.labelPosVertical=="top"?($.rect.y-=$.labelHeight,$.setHeight(P+$.labelHeight),$.labelMarginTop=$.labelHeight):$.labelPosVertical=="center"&&$.labelHeight>P?($.rect.y-=($.labelHeight-P)/2,$.setHeight($.labelHeight),$.labelMarginTop=($.labelHeight-P)/2):$.labelPosVertical=="bottom"&&$.setHeight(P+$.labelHeight))}})},M.prototype.tileNodes=function(A,I){var O=this.tileNodesByFavoringDim(A,I,!0),R=this.tileNodesByFavoringDim(A,I,!1),$=this.getOrgRatio(O),F=this.getOrgRatio(R),P;return F<$?P=R:P=O,P},M.prototype.getOrgRatio=function(A){var I=A.width,O=A.height,R=I/O;return R<1&&(R=1/R),R},M.prototype.calcIdealRowWidth=function(A,I){var O=y.TILING_PADDING_VERTICAL,R=y.TILING_PADDING_HORIZONTAL,$=A.length,F=0,P=0,z=0;A.forEach(function(se){F+=se.getWidth(),P+=se.getHeight(),se.getWidth()>z&&(z=se.getWidth())});var q=F/$,G=P/$,W=Math.pow(O-R,2)+4*(q+R)*(G+O)*$,J=(R-O+Math.sqrt(W))/(2*(q+R)),H;I?(H=Math.ceil(J),H==J&&H++):H=Math.floor(J);var Z=H*(q+R)-R;return z>Z&&(Z=z),Z+=R*2,Z},M.prototype.tileNodesByFavoringDim=function(A,I,O){var R=y.TILING_PADDING_VERTICAL,$=y.TILING_PADDING_HORIZONTAL,F=y.TILING_COMPARE_BY,P={rows:[],rowWidth:[],rowHeight:[],width:0,height:I,verticalPadding:R,horizontalPadding:$,centerX:0,centerY:0};F&&(P.idealRowWidth=this.calcIdealRowWidth(A,O));var z=o(function(se){return se.rect.width*se.rect.height},"getNodeArea"),q=o(function(se,Q){return z(Q)-z(se)},"areaCompareFcn");A.sort(function(se,Q){var te=q;return P.idealRowWidth?(te=F,te(se.id,Q.id)):te(se,Q)});for(var G=0,W=0,J=0;J0&&(P+=A.horizontalPadding),A.rowWidth[O]=P,A.width0&&(z+=A.verticalPadding);var q=0;z>A.rowHeight[O]&&(q=A.rowHeight[O],A.rowHeight[O]=z,q=A.rowHeight[O]-q),A.height+=q,A.rows[O].push(I)},M.prototype.getShortestRowIndex=function(A){for(var I=-1,O=Number.MAX_VALUE,R=0;RO&&(I=R,O=A.rowWidth[R]);return I},M.prototype.canAddHorizontal=function(A,I,O){if(A.idealRowWidth){var R=A.rows.length-1,$=A.rowWidth[R];return $+I+A.horizontalPadding<=A.idealRowWidth}var F=this.getShortestRowIndex(A);if(F<0)return!0;var P=A.rowWidth[F];if(P+A.horizontalPadding+I<=A.width)return!0;var z=0;A.rowHeight[F]0&&(z=O+A.verticalPadding-A.rowHeight[F]);var q;A.width-P>=I+A.horizontalPadding?q=(A.height+z)/(P+I+A.horizontalPadding):q=(A.height+z)/A.width,z=O+A.verticalPadding;var G;return A.widthF&&I!=O){R.splice(-1,1),A.rows[O].push($),A.rowWidth[I]=A.rowWidth[I]-F,A.rowWidth[O]=A.rowWidth[O]+F,A.width=A.rowWidth[instance.getLongestRowIndex(A)];for(var P=Number.MIN_VALUE,z=0;zP&&(P=R[z].height);I>0&&(P+=A.verticalPadding);var q=A.rowHeight[I]+A.rowHeight[O];A.rowHeight[I]=P,A.rowHeight[O]<$.height+A.verticalPadding&&(A.rowHeight[O]=$.height+A.verticalPadding);var G=A.rowHeight[I]+A.rowHeight[O];A.height+=G-q,this.shiftToLastRow(A)}},M.prototype.tilingPreLayout=function(){y.TILE&&(this.groupZeroDegreeMembers(),this.clearCompounds(),this.clearZeroDegreeMembers())},M.prototype.tilingPostLayout=function(){y.TILE&&(this.repopulateZeroDegreeMembers(),this.repopulateCompounds())},M.prototype.reduceTrees=function(){for(var A=[],I=!0,O;I;){var R=this.graphManager.getAllNodes(),$=[];I=!1;for(var F=0;F0)for(var Z=$;Z<=F;Z++)H[0]+=this.grid[Z][P-1].length+this.grid[Z][P].length-1;if(F0)for(var Z=P;Z<=z;Z++)H[3]+=this.grid[$-1][Z].length+this.grid[$][Z].length-1;for(var se=w.MAX_VALUE,Q,te,re=0;re{var d=u(551).FDLayoutNode,p=u(551).IMath;function f(m,y,b,v){d.call(this,m,y,b,v)}o(f,"CoSENode"),f.prototype=Object.create(d.prototype);for(var g in d)f[g]=d[g];f.prototype.calculateDisplacement=function(){var m=this.graphManager.getLayout();this.getChild()!=null&&this.fixedNodeWeight?(this.displacementX+=m.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.fixedNodeWeight,this.displacementY+=m.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.fixedNodeWeight):(this.displacementX+=m.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY+=m.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren),Math.abs(this.displacementX)>m.coolingFactor*m.maxNodeDisplacement&&(this.displacementX=m.coolingFactor*m.maxNodeDisplacement*p.sign(this.displacementX)),Math.abs(this.displacementY)>m.coolingFactor*m.maxNodeDisplacement&&(this.displacementY=m.coolingFactor*m.maxNodeDisplacement*p.sign(this.displacementY)),this.child&&this.child.getNodes().length>0&&this.propogateDisplacementToChildren(this.displacementX,this.displacementY)},f.prototype.propogateDisplacementToChildren=function(m,y){for(var b=this.getChild().getNodes(),v,T=0;T{function d(b){if(Array.isArray(b)){for(var v=0,T=Array(b.length);v0){var at=0;Se.forEach(function(gt){fe=="horizontal"?(Ve.set(gt,x.has(gt)?k[x.get(gt)]:Le.get(gt)),at+=Ve.get(gt)):(Ve.set(gt,x.has(gt)?C[x.get(gt)]:Le.get(gt)),at+=Ve.get(gt))}),at=at/Se.length,ct.forEach(function(gt){Y.has(gt)||Ve.set(gt,at)})}else{var dt=0;ct.forEach(function(gt){fe=="horizontal"?dt+=x.has(gt)?k[x.get(gt)]:Le.get(gt):dt+=x.has(gt)?C[x.get(gt)]:Le.get(gt)}),dt=dt/ct.length,ct.forEach(function(gt){Ve.set(gt,dt)})}});for(var ze=o(function(){var ct=Ge.shift(),Se=U.get(ct);Se.forEach(function(at){if(Ve.get(at.id)gt&&(gt=rt),_eCt&&(Ct=_e)}}catch(Ee){$t=!0,ut=Ee}finally{try{!kt&&de.return&&de.return()}finally{if($t)throw ut}}var Ze=(at+gt)/2-(dt+Ct)/2,He=!0,yt=!1,_t=void 0;try{for(var Ot=ct[Symbol.iterator](),ir;!(He=(ir=Ot.next()).done);He=!0){var ur=ir.value;Ve.set(ur,Ve.get(ur)+Ze)}}catch(Ee){yt=!0,_t=Ee}finally{try{!He&&Ot.return&&Ot.return()}finally{if(yt)throw _t}}})}return Ve},"findAppropriatePositionForRelativePlacement"),B=o(function(U){var fe=0,Y=0,Le=0,xe=0;if(U.forEach(function(Ne){Ne.left?k[x.get(Ne.left)]-k[x.get(Ne.right)]>=0?fe++:Y++:C[x.get(Ne.top)]-C[x.get(Ne.bottom)]>=0?Le++:xe++}),fe>Y&&Le>xe)for(var je=0;jeY)for(var Ie=0;Iexe)for(var Ve=0;Ve1)v.fixedNodeConstraint.forEach(function(U,fe){R[fe]=[U.position.x,U.position.y],$[fe]=[k[x.get(U.nodeId)],C[x.get(U.nodeId)]]}),F=!0;else if(v.alignmentConstraint)(function(){var U=0;if(v.alignmentConstraint.vertical){for(var fe=v.alignmentConstraint.vertical,Y=o(function(Ve){var Ne=new Set;fe[Ve].forEach(function(Ue){Ne.add(Ue)});var Ge=new Set([].concat(d(Ne)).filter(function(Ue){return z.has(Ue)})),ze=void 0;Ge.size>0?ze=k[x.get(Ge.values().next().value)]:ze=D(Ne).x,fe[Ve].forEach(function(Ue){R[U]=[ze,C[x.get(Ue)]],$[U]=[k[x.get(Ue)],C[x.get(Ue)]],U++})},"_loop2"),Le=0;Le0?ze=k[x.get(Ge.values().next().value)]:ze=D(Ne).y,xe[Ve].forEach(function(Ue){R[U]=[k[x.get(Ue)],ze],$[U]=[k[x.get(Ue)],C[x.get(Ue)]],U++})},"_loop3"),Ie=0;IeJ&&(J=W[Z].length,H=Z);if(J0){var ce={x:0,y:0};v.fixedNodeConstraint.forEach(function(U,fe){var Y={x:k[x.get(U.nodeId)],y:C[x.get(U.nodeId)]},Le=U.position,xe=N(Le,Y);ce.x+=xe.x,ce.y+=xe.y}),ce.x/=v.fixedNodeConstraint.length,ce.y/=v.fixedNodeConstraint.length,k.forEach(function(U,fe){k[fe]+=ce.x}),C.forEach(function(U,fe){C[fe]+=ce.y}),v.fixedNodeConstraint.forEach(function(U){k[x.get(U.nodeId)]=U.position.x,C[x.get(U.nodeId)]=U.position.y})}if(v.alignmentConstraint){if(v.alignmentConstraint.vertical)for(var ge=v.alignmentConstraint.vertical,be=o(function(U){var fe=new Set;ge[U].forEach(function(xe){fe.add(xe)});var Y=new Set([].concat(d(fe)).filter(function(xe){return z.has(xe)})),Le=void 0;Y.size>0?Le=k[x.get(Y.values().next().value)]:Le=D(fe).x,fe.forEach(function(xe){z.has(xe)||(k[x.get(xe)]=Le)})},"_loop4"),ke=0;ke0?Le=C[x.get(Y.values().next().value)]:Le=D(fe).y,fe.forEach(function(xe){z.has(xe)||(C[x.get(xe)]=Le)})},"_loop5"),Oe=0;Oe{l.exports=r})},n={};function a(l){var h=n[l];if(h!==void 0)return h.exports;var u=n[l]={exports:{}};return i[l](u,u.exports,a),u.exports}o(a,"__webpack_require__");var s=a(45);return s})()})}),Byt=Xn((e,t)=>{"use strict";o((function(r,i){typeof e=="object"&&typeof t=="object"?t.exports=i(i7e()):typeof define=="function"&&define.amd?define(["cose-base"],i):typeof e=="object"?e.cytoscapeFcose=i(i7e()):r.cytoscapeFcose=i(r.coseBase)}),"webpackUniversalModuleDefinition")(e,function(r){return(()=>{"use strict";var i={658:(l=>{l.exports=Object.assign!=null?Object.assign.bind(Object):function(h){for(var u=arguments.length,d=Array(u>1?u-1:0),p=1;p{var d=(function(){function g(m,y){var b=[],v=!0,T=!1,x=void 0;try{for(var k=m[Symbol.iterator](),C;!(v=(C=k.next()).done)&&(b.push(C.value),!(y&&b.length===y));v=!0);}catch(E){T=!0,x=E}finally{try{!v&&k.return&&k.return()}finally{if(T)throw x}}return b}return o(g,"sliceIterator"),function(m,y){if(Array.isArray(m))return m;if(Symbol.iterator in Object(m))return g(m,y);throw new TypeError("Invalid attempt to destructure non-iterable instance")}})(),p=u(140).layoutBase.LinkedList,f={};f.getTopMostNodes=function(g){for(var m={},y=0;y0&&R.merge(z)});for(var $=0;$1){C=x[0],E=C.connectedEdges().length,x.forEach(function(R){R.connectedEdges().length0&&b.set("dummy"+(b.size+1),L),N},f.relocateComponent=function(g,m,y){if(!y.fixedNodeConstraint){var b=Number.POSITIVE_INFINITY,v=Number.NEGATIVE_INFINITY,T=Number.POSITIVE_INFINITY,x=Number.NEGATIVE_INFINITY;if(y.quality=="draft"){var k=!0,C=!1,E=void 0;try{for(var w=m.nodeIndexes[Symbol.iterator](),_;!(k=(_=w.next()).done);k=!0){var L=_.value,N=d(L,2),D=N[0],M=N[1],B=y.cy.getElementById(D);if(B){var A=B.boundingBox(),I=m.xCoords[M]-A.w/2,O=m.xCoords[M]+A.w/2,R=m.yCoords[M]-A.h/2,$=m.yCoords[M]+A.h/2;Iv&&(v=O),Rx&&(x=$)}}}catch(G){C=!0,E=G}finally{try{!k&&w.return&&w.return()}finally{if(C)throw E}}var F=g.x-(v+b)/2,P=g.y-(x+T)/2;m.xCoords=m.xCoords.map(function(G){return G+F}),m.yCoords=m.yCoords.map(function(G){return G+P})}else{Object.keys(m).forEach(function(G){var W=m[G],J=W.getRect().x,H=W.getRect().x+W.getRect().width,Z=W.getRect().y,se=W.getRect().y+W.getRect().height;Jv&&(v=H),Zx&&(x=se)});var z=g.x-(v+b)/2,q=g.y-(x+T)/2;Object.keys(m).forEach(function(G){var W=m[G];W.setCenter(W.getCenterX()+z,W.getCenterY()+q)})}}},f.calcBoundingBox=function(g,m,y,b){for(var v=Number.MAX_SAFE_INTEGER,T=Number.MIN_SAFE_INTEGER,x=Number.MAX_SAFE_INTEGER,k=Number.MIN_SAFE_INTEGER,C=void 0,E=void 0,w=void 0,_=void 0,L=g.descendants().not(":parent"),N=L.length,D=0;DC&&(v=C),Tw&&(x=w),k<_&&(k=_)}var B={};return B.topLeftX=v,B.topLeftY=x,B.width=T-v,B.height=k-x,B},f.calcParentsWithoutChildren=function(g,m){var y=g.collection();return m.nodes(":parent").forEach(function(b){var v=!1;b.children().forEach(function(T){T.css("display")!="none"&&(v=!0)}),v||y.merge(b)}),y},l.exports=f}),816:((l,h,u)=>{var d=u(548),p=u(140).CoSELayout,f=u(140).CoSENode,g=u(140).layoutBase.PointD,m=u(140).layoutBase.DimensionD,y=u(140).layoutBase.LayoutConstants,b=u(140).layoutBase.FDLayoutConstants,v=u(140).CoSEConstants,T=o(function(x,k){var C=x.cy,E=x.eles,w=E.nodes(),_=E.edges(),L=void 0,N=void 0,D=void 0,M={};x.randomize&&(L=k.nodeIndexes,N=k.xCoords,D=k.yCoords);var B=o(function(z){return typeof z=="function"},"isFn"),A=o(function(z,q){return B(z)?z(q):z},"optFn"),I=d.calcParentsWithoutChildren(C,E),O=o(function z(q,G,W,J){for(var H=G.length,Z=0;Z0){var Ae=void 0;Ae=W.getGraphManager().add(W.newGraph(),te),z(Ae,Q,W,J)}}},"processChildrenList"),R=o(function(z,q,G){for(var W=0,J=0,H=0;H0?v.DEFAULT_EDGE_LENGTH=b.DEFAULT_EDGE_LENGTH=W/J:B(x.idealEdgeLength)?v.DEFAULT_EDGE_LENGTH=b.DEFAULT_EDGE_LENGTH=50:v.DEFAULT_EDGE_LENGTH=b.DEFAULT_EDGE_LENGTH=x.idealEdgeLength,v.MIN_REPULSION_DIST=b.MIN_REPULSION_DIST=b.DEFAULT_EDGE_LENGTH/10,v.DEFAULT_RADIAL_SEPARATION=b.DEFAULT_EDGE_LENGTH)},"processEdges"),$=o(function(z,q){q.fixedNodeConstraint&&(z.constraints.fixedNodeConstraint=q.fixedNodeConstraint),q.alignmentConstraint&&(z.constraints.alignmentConstraint=q.alignmentConstraint),q.relativePlacementConstraint&&(z.constraints.relativePlacementConstraint=q.relativePlacementConstraint)},"processConstraints");x.nestingFactor!=null&&(v.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=b.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=x.nestingFactor),x.gravity!=null&&(v.DEFAULT_GRAVITY_STRENGTH=b.DEFAULT_GRAVITY_STRENGTH=x.gravity),x.numIter!=null&&(v.MAX_ITERATIONS=b.MAX_ITERATIONS=x.numIter),x.gravityRange!=null&&(v.DEFAULT_GRAVITY_RANGE_FACTOR=b.DEFAULT_GRAVITY_RANGE_FACTOR=x.gravityRange),x.gravityCompound!=null&&(v.DEFAULT_COMPOUND_GRAVITY_STRENGTH=b.DEFAULT_COMPOUND_GRAVITY_STRENGTH=x.gravityCompound),x.gravityRangeCompound!=null&&(v.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=b.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=x.gravityRangeCompound),x.initialEnergyOnIncremental!=null&&(v.DEFAULT_COOLING_FACTOR_INCREMENTAL=b.DEFAULT_COOLING_FACTOR_INCREMENTAL=x.initialEnergyOnIncremental),x.tilingCompareBy!=null&&(v.TILING_COMPARE_BY=x.tilingCompareBy),x.quality=="proof"?y.QUALITY=2:y.QUALITY=0,v.NODE_DIMENSIONS_INCLUDE_LABELS=b.NODE_DIMENSIONS_INCLUDE_LABELS=y.NODE_DIMENSIONS_INCLUDE_LABELS=x.nodeDimensionsIncludeLabels,v.DEFAULT_INCREMENTAL=b.DEFAULT_INCREMENTAL=y.DEFAULT_INCREMENTAL=!x.randomize,v.ANIMATE=b.ANIMATE=y.ANIMATE=x.animate,v.TILE=x.tile,v.TILING_PADDING_VERTICAL=typeof x.tilingPaddingVertical=="function"?x.tilingPaddingVertical.call():x.tilingPaddingVertical,v.TILING_PADDING_HORIZONTAL=typeof x.tilingPaddingHorizontal=="function"?x.tilingPaddingHorizontal.call():x.tilingPaddingHorizontal,v.DEFAULT_INCREMENTAL=b.DEFAULT_INCREMENTAL=y.DEFAULT_INCREMENTAL=!0,v.PURE_INCREMENTAL=!x.randomize,y.DEFAULT_UNIFORM_LEAF_NODE_SIZES=x.uniformNodeDimensions,x.step=="transformed"&&(v.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,v.ENFORCE_CONSTRAINTS=!1,v.APPLY_LAYOUT=!1),x.step=="enforced"&&(v.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,v.ENFORCE_CONSTRAINTS=!0,v.APPLY_LAYOUT=!1),x.step=="cose"&&(v.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,v.ENFORCE_CONSTRAINTS=!1,v.APPLY_LAYOUT=!0),x.step=="all"&&(x.randomize?v.TRANSFORM_ON_CONSTRAINT_HANDLING=!0:v.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,v.ENFORCE_CONSTRAINTS=!0,v.APPLY_LAYOUT=!0),x.fixedNodeConstraint||x.alignmentConstraint||x.relativePlacementConstraint?v.TREE_REDUCTION_ON_INCREMENTAL=!1:v.TREE_REDUCTION_ON_INCREMENTAL=!0;var F=new p,P=F.newGraphManager();return O(P.addRoot(),d.getTopMostNodes(w),F,x),R(F,P,_),$(F,x),F.runLayout(),M},"coseLayout");l.exports={coseLayout:T}}),212:((l,h,u)=>{var d=(function(){function k(C,E){for(var w=0;w0)if(R){var $=g.getTopMostNodes(E.eles.nodes());if(B=g.connectComponents(w,E.eles,$),B.forEach(function(ye){var ve=ye.boundingBox();A.push({x:ve.x1+ve.w/2,y:ve.y1+ve.h/2})}),E.randomize&&B.forEach(function(ye){E.eles=ye,L.push(y(E))}),E.quality=="default"||E.quality=="proof"){var F=w.collection();if(E.tile){var P=new Map,z=[],q=[],G=0,W={nodeIndexes:P,xCoords:z,yCoords:q},J=[];if(B.forEach(function(ye,ve){ye.edges().length==0&&(ye.nodes().forEach(function(ae,Pe){F.merge(ye.nodes()[Pe]),ae.isParent()||(W.nodeIndexes.set(ye.nodes()[Pe].id(),G++),W.xCoords.push(ye.nodes()[0].position().x),W.yCoords.push(ye.nodes()[0].position().y))}),J.push(ve))}),F.length>1){var H=F.boundingBox();A.push({x:H.x1+H.w/2,y:H.y1+H.h/2}),B.push(F),L.push(W);for(var Z=J.length-1;Z>=0;Z--)B.splice(J[Z],1),L.splice(J[Z],1),A.splice(J[Z],1)}}B.forEach(function(ye,ve){E.eles=ye,M.push(v(E,L[ve])),g.relocateComponent(A[ve],M[ve],E)})}else B.forEach(function(ye,ve){g.relocateComponent(A[ve],L[ve],E)});var se=new Set;if(B.length>1){var Q=[],te=_.filter(function(ye){return ye.css("display")=="none"});B.forEach(function(ye,ve){var ae=void 0;if(E.quality=="draft"&&(ae=L[ve].nodeIndexes),ye.nodes().not(te).length>0){var Pe={};Pe.edges=[],Pe.nodes=[];var X=void 0;ye.nodes().not(te).forEach(function(ce){if(E.quality=="draft")if(!ce.isParent())X=ae.get(ce.id()),Pe.nodes.push({x:L[ve].xCoords[X]-ce.boundingbox().w/2,y:L[ve].yCoords[X]-ce.boundingbox().h/2,width:ce.boundingbox().w,height:ce.boundingbox().h});else{var ge=g.calcBoundingBox(ce,L[ve].xCoords,L[ve].yCoords,ae);Pe.nodes.push({x:ge.topLeftX,y:ge.topLeftY,width:ge.width,height:ge.height})}else M[ve][ce.id()]&&Pe.nodes.push({x:M[ve][ce.id()].getLeft(),y:M[ve][ce.id()].getTop(),width:M[ve][ce.id()].getWidth(),height:M[ve][ce.id()].getHeight()})}),ye.edges().forEach(function(ce){var ge=ce.source(),be=ce.target();if(ge.css("display")!="none"&&be.css("display")!="none")if(E.quality=="draft"){var ke=ae.get(ge.id()),Me=ae.get(be.id()),pe=[],Oe=[];if(ge.isParent()){var j=g.calcBoundingBox(ge,L[ve].xCoords,L[ve].yCoords,ae);pe.push(j.topLeftX+j.width/2),pe.push(j.topLeftY+j.height/2)}else pe.push(L[ve].xCoords[ke]),pe.push(L[ve].yCoords[ke]);if(be.isParent()){var le=g.calcBoundingBox(be,L[ve].xCoords,L[ve].yCoords,ae);Oe.push(le.topLeftX+le.width/2),Oe.push(le.topLeftY+le.height/2)}else Oe.push(L[ve].xCoords[Me]),Oe.push(L[ve].yCoords[Me]);Pe.edges.push({startX:pe[0],startY:pe[1],endX:Oe[0],endY:Oe[1]})}else M[ve][ge.id()]&&M[ve][be.id()]&&Pe.edges.push({startX:M[ve][ge.id()].getCenterX(),startY:M[ve][ge.id()].getCenterY(),endX:M[ve][be.id()].getCenterX(),endY:M[ve][be.id()].getCenterY()})}),Pe.nodes.length>0&&(Q.push(Pe),se.add(ve))}});var re=O.packComponents(Q,E.randomize).shifts;if(E.quality=="draft")L.forEach(function(ye,ve){var ae=ye.xCoords.map(function(X){return X+re[ve].dx}),Pe=ye.yCoords.map(function(X){return X+re[ve].dy});ye.xCoords=ae,ye.yCoords=Pe});else{var ne=0;se.forEach(function(ye){Object.keys(M[ye]).forEach(function(ve){var ae=M[ye][ve];ae.setCenter(ae.getCenterX()+re[ne].dx,ae.getCenterY()+re[ne].dy)}),ne++})}}}else{var Ae=E.eles.boundingBox();if(A.push({x:Ae.x1+Ae.w/2,y:Ae.y1+Ae.h/2}),E.randomize){var ie=y(E);L.push(ie)}E.quality=="default"||E.quality=="proof"?(M.push(v(E,L[0])),g.relocateComponent(A[0],M[0],E)):g.relocateComponent(A[0],L[0],E)}var me=o(function(ye,ve){if(E.quality=="default"||E.quality=="proof"){typeof ye=="number"&&(ye=ve);var ae=void 0,Pe=void 0,X=ye.data("id");return M.forEach(function(ge){X in ge&&(ae={x:ge[X].getRect().getCenterX(),y:ge[X].getRect().getCenterY()},Pe=ge[X])}),E.nodeDimensionsIncludeLabels&&(Pe.labelWidth&&(Pe.labelPosHorizontal=="left"?ae.x+=Pe.labelWidth/2:Pe.labelPosHorizontal=="right"&&(ae.x-=Pe.labelWidth/2)),Pe.labelHeight&&(Pe.labelPosVertical=="top"?ae.y+=Pe.labelHeight/2:Pe.labelPosVertical=="bottom"&&(ae.y-=Pe.labelHeight/2))),ae==null&&(ae={x:ye.position("x"),y:ye.position("y")}),{x:ae.x,y:ae.y}}else{var ce=void 0;return L.forEach(function(ge){var be=ge.nodeIndexes.get(ye.id());be!=null&&(ce={x:ge.xCoords[be],y:ge.yCoords[be]})}),ce==null&&(ce={x:ye.position("x"),y:ye.position("y")}),{x:ce.x,y:ce.y}}},"getPositions");if(E.quality=="default"||E.quality=="proof"||E.randomize){var oe=g.calcParentsWithoutChildren(w,_),we=_.filter(function(ye){return ye.css("display")=="none"});E.eles=_.not(we),_.nodes().not(":parent").not(we).layoutPositions(C,E,me),oe.length>0&&oe.forEach(function(ye){ye.position(me(ye))})}else console.log("If randomize option is set to false, then quality option must be 'default' or 'proof'.")},"run")}]),k})();l.exports=x}),657:((l,h,u)=>{var d=u(548),p=u(140).layoutBase.Matrix,f=u(140).layoutBase.SVD,g=o(function(m){var y=m.cy,b=m.eles,v=b.nodes(),T=b.nodes(":parent"),x=new Map,k=new Map,C=new Map,E=[],w=[],_=[],L=[],N=[],D=[],M=[],B=[],A=void 0,I=void 0,O=1e8,R=1e-9,$=m.piTol,F=m.samplingType,P=m.nodeSeparation,z=void 0,q=o(function(){for(var U=0,fe=0,Y=!1;fe=xe;){Ie=Le[xe++];for(var Ce=E[Ie],ct=0;ctGe&&(Ge=N[at],ze=at)}return ze},"BFS"),W=o(function(U){var fe=void 0;if(U){fe=Math.floor(Math.random()*I),A=fe;for(var Y=0;Y=1)break;Ge=Ne}for(var Ce=0;Ce=1)break;Ge=Ne}for(var Se=0;Se0&&(Y.isParent()?E[fe].push(C.get(Y.id())):E[fe].push(Y.id()))})});var oe=o(function(U){var fe=k.get(U),Y=void 0;x.get(U).forEach(function(Le){y.getElementById(Le).isParent()?Y=C.get(Le):Y=Le,E[fe].push(Y),E[k.get(Y)].push(U)})},"_loop"),we=!0,ye=!1,ve=void 0;try{for(var ae=x.keys()[Symbol.iterator](),Pe;!(we=(Pe=ae.next()).done);we=!0){var X=Pe.value;oe(X)}}catch(U){ye=!0,ve=U}finally{try{!we&&ae.return&&ae.return()}finally{if(ye)throw ve}}I=k.size;var ce=void 0;if(I>2){z=I{var d=u(212),p=o(function(f){f&&f("layout","fcose",d)},"register");typeof cytoscape<"u"&&p(cytoscape),l.exports=p}),140:(l=>{l.exports=r})},n={};function a(l){var h=n[l];if(h!==void 0)return h.exports;var u=n[l]={exports:{}};return i[l](u,u.exports,a),u.exports}o(a,"__webpack_require__");var s=a(579);return s})()})}),n7e={L:"left",R:"right",T:"top",B:"bottom"},a7e={L:o(e=>`${e},${e/2} 0,${e} 0,0`,"L"),R:o(e=>`0,${e/2} ${e},0 ${e},${e}`,"R"),T:o(e=>`0,0 ${e},0 ${e/2},${e}`,"T"),B:o(e=>`${e/2},0 ${e},${e} 0,${e}`,"B")},tA={L:o((e,t)=>e-t+2,"L"),R:o((e,t)=>e-2,"R"),T:o((e,t)=>e-t+2,"T"),B:o((e,t)=>e-2,"B")},Pyt=o(function(e){return Rs(e)?e==="L"?"R":"L":e==="T"?"B":"T"},"getOppositeArchitectureDirection"),s7e=o(function(e){let t=e;return t==="L"||t==="R"||t==="T"||t==="B"},"isArchitectureDirection"),Rs=o(function(e){let t=e;return t==="L"||t==="R"},"isArchitectureDirectionX"),op=o(function(e){let t=e;return t==="T"||t==="B"},"isArchitectureDirectionY"),GX=o(function(e,t){let r=Rs(e)&&op(t),i=op(e)&&Rs(t);return r||i},"isArchitectureDirectionXY"),Fyt=o(function(e){let t=e[0],r=e[1],i=Rs(t)&&op(r),n=op(t)&&Rs(r);return i||n},"isArchitecturePairXY"),zyt=o(function(e){return e!=="LL"&&e!=="RR"&&e!=="TT"&&e!=="BB"},"isValidArchitectureDirectionPair"),qX=o(function(e,t){let r=`${e}${t}`;return zyt(r)?r:void 0},"getArchitectureDirectionPair"),qyt=o(function([e,t],r){let i=r[0],n=r[1];return Rs(i)?op(n)?[e+(i==="L"?-1:1),t+(n==="T"?1:-1)]:[e+(i==="L"?-1:1),t]:Rs(n)?[e+(n==="L"?1:-1),t+(i==="T"?1:-1)]:[e,t+(i==="T"?1:-1)]},"shiftPositionByArchitectureDirectionPair"),jyt=o(function(e){return e==="LT"||e==="TL"?[1,1]:e==="BL"||e==="LB"?[1,-1]:e==="BR"||e==="RB"?[-1,-1]:[-1,1]},"getArchitectureDirectionXYFactors"),Gyt=o(function(e,t){return GX(e,t)?"bend":Rs(e)?"horizontal":"vertical"},"getArchitectureDirectionAlignment"),Wyt=o(function(e){return e.type==="service"},"isArchitectureService"),Uyt=o(function(e){return e.type==="junction"},"isArchitectureJunction"),o7e=o(e=>e.data(),"edgeData"),oy=o(e=>e.data(),"nodeData"),Vyt=rr.architecture,l7e=class{constructor(){this.nodes={},this.groups={},this.edges=[],this.layoutHints=[],this.registeredIds={},this.elements={},this.diagramId="",this.setAccTitle=gr,this.getAccTitle=xr,this.setDiagramTitle=_r,this.getDiagramTitle=Cr,this.getAccDescription=kr,this.setAccDescription=Tr,this.clear()}static{o(this,"ArchitectureDB")}setDiagramId(e){this.diagramId=e}getDiagramId(){return this.diagramId}clear(){this.nodes={},this.groups={},this.edges=[],this.layoutHints=[],this.registeredIds={},this.dataStructures=void 0,this.elements={},this.diagramId="",ar()}addService({id:e,icon:t,in:r,title:i,iconText:n}){if(this.registeredIds[e]!==void 0)throw new Error(`The service id [${e}] is already in use by another ${this.registeredIds[e]}`);if(r!==void 0){if(e===r)throw new Error(`The service [${e}] cannot be placed within itself`);if(this.registeredIds[r]===void 0)throw new Error(`The service [${e}]'s parent does not exist. Please make sure the parent is created before this service`);if(this.registeredIds[r]==="node")throw new Error(`The service [${e}]'s parent is not a group`)}this.registeredIds[e]="node",this.nodes[e]={id:e,type:"service",icon:t,iconText:n,title:i,edges:[],in:r}}getServices(){return Object.values(this.nodes).filter(Wyt)}addJunction({id:e,in:t}){if(this.registeredIds[e]!==void 0)throw new Error(`The junction id [${e}] is already in use by another ${this.registeredIds[e]}`);if(t!==void 0){if(e===t)throw new Error(`The junction [${e}] cannot be placed within itself`);if(this.registeredIds[t]===void 0)throw new Error(`The junction [${e}]'s parent does not exist. Please make sure the parent is created before this junction`);if(this.registeredIds[t]==="node")throw new Error(`The junction [${e}]'s parent is not a group`)}this.registeredIds[e]="node",this.nodes[e]={id:e,type:"junction",edges:[],in:t}}getJunctions(){return Object.values(this.nodes).filter(Uyt)}getNodes(){return Object.values(this.nodes)}getNode(e){return this.nodes[e]??null}addGroup({id:e,icon:t,in:r,title:i}){if(this.registeredIds?.[e]!==void 0)throw new Error(`The group id [${e}] is already in use by another ${this.registeredIds[e]}`);if(r!==void 0){if(e===r)throw new Error(`The group [${e}] cannot be placed within itself`);if(this.registeredIds?.[r]===void 0)throw new Error(`The group [${e}]'s parent does not exist. Please make sure the parent is created before this group`);if(this.registeredIds?.[r]==="node")throw new Error(`The group [${e}]'s parent is not a group`)}this.registeredIds[e]="group",this.groups[e]={id:e,icon:t,title:i,in:r}}getGroups(){return Object.values(this.groups)}addEdge({lhsId:e,rhsId:t,lhsDir:r,rhsDir:i,lhsInto:n,rhsInto:a,lhsGroup:s,rhsGroup:l,title:h}){if(!s7e(r))throw new Error(`Invalid direction given for left hand side of edge ${e}--${t}. Expected (L,R,T,B) got ${String(r)}`);if(!s7e(i))throw new Error(`Invalid direction given for right hand side of edge ${e}--${t}. Expected (L,R,T,B) got ${String(i)}`);if(this.nodes[e]===void 0&&this.groups[e]===void 0)throw new Error(`The left-hand id [${e}] does not yet exist. Please create the service/group before declaring an edge to it.`);if(this.nodes[t]===void 0&&this.groups[t]===void 0)throw new Error(`The right-hand id [${t}] does not yet exist. Please create the service/group before declaring an edge to it.`);let u=this.nodes[e].in,d=this.nodes[t].in;if(s&&u&&d&&u==d)throw new Error(`The left-hand id [${e}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);if(l&&u&&d&&u==d)throw new Error(`The right-hand id [${t}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);let p={lhsId:e,lhsDir:r,lhsInto:n,lhsGroup:s,rhsId:t,rhsDir:i,rhsInto:a,rhsGroup:l,title:h};this.edges.push(p),this.nodes[e]&&this.nodes[t]&&(this.nodes[e].edges.push(this.edges[this.edges.length-1]),this.nodes[t].edges.push(this.edges[this.edges.length-1]))}getEdges(){return this.edges}addLayoutHint(e){if(e.members.length<2)throw new Error(`An align directive requires at least two members; got ${e.members.length}`);let t=new Set;e.members.forEach(r=>{if(this.registeredIds[r]!=="node")throw new Error(`align ${e.direction} references [${r}], which is not a service or junction`);if(t.has(r))throw new Error(`align ${e.direction} lists [${r}] more than once`);t.add(r)}),this.layoutHints.push(e)}getLayoutHints(){return this.layoutHints}getDataStructures(){if(this.dataStructures===void 0){let e={},t=Object.entries(this.nodes).reduce((l,[h,u])=>(l[h]=u.edges.reduce((d,p)=>{let f=this.getNode(p.lhsId)?.in,g=this.getNode(p.rhsId)?.in;if(f&&g&&f!==g){let m=Gyt(p.lhsDir,p.rhsDir);m!=="bend"&&(e[f]??={},e[f][g]=m,e[g]??={},e[g][f]=m)}if(p.lhsId===h){let m=qX(p.lhsDir,p.rhsDir);m&&(d[m]=p.rhsId)}else{let m=qX(p.rhsDir,p.lhsDir);m&&(d[m]=p.lhsId)}return d},{}),l),{}),r=Object.keys(t)[0],i={[r]:1},n=Object.keys(t).reduce((l,h)=>h===r?l:{...l,[h]:1},{}),a=o(l=>{let h={[l]:[0,0]},u=[l];for(;u.length>0;){let d=u.shift();if(d){i[d]=1,delete n[d];let p=t[d],[f,g]=h[d];Object.entries(p).forEach(([m,y])=>{i[y]||(h[y]=qyt([f,g],m),u.push(y))})}}return h},"BFS"),s=[a(r)];for(;Object.keys(n).length>0;)s.push(a(Object.keys(n)[0]));this.dataStructures={adjList:t,spatialMaps:s,groupAlignments:e}}return this.dataStructures}setElementForId(e,t){this.elements[e]=t}getElementById(e){return this.elements[e]}getConfig(){return zr({...Vyt,...Rt().architecture})}getConfigField(e){return this.getConfig()[e]}},Yyt=o((e,t)=>{xi(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"),c7e={parser:{yy:void 0},parse:o(async e=>{let t=await Vi("architecture",e);ee.debug(t);let r=c7e.parser?.yy;if(!(r instanceof l7e))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.");Yyt(t,r)},"parse")},Hyt=o(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"),Xyt=Hyt,Kyt=tn(Byt(),1);o(jX,"withSeededRandom");sy=o(e=>`${e}`,"wrapIcon"),DT={prefix:"mermaid-architecture",height:80,width:80,icons:{database:{body:sy('')},server:{body:sy('')},disk:{body:sy('')},internet:{body:sy('')},cloud:{body:sy('')},unknown:t$,blank:{body:sy("")}}},Zyt=o(async function(e,t,r,i){let n=r.getConfigField("padding"),a=r.getConfigField("iconSize"),s=a/2,l=a/6,h=l/2;await Promise.all(t.edges().map(async u=>{let{source:d,sourceDir:p,sourceArrow:f,sourceGroup:g,target:m,targetDir:y,targetArrow:b,targetGroup:v,label:T}=o7e(u),{x,y:k}=u[0].sourceEndpoint(),{x:C,y:E}=u[0].midpoint(),{x:w,y:_}=u[0].targetEndpoint(),L=n+4;if(g&&(Rs(p)?x+=p==="L"?-L:L:k+=p==="T"?-L:L+18),v&&(Rs(y)?w+=y==="L"?-L:L:_+=y==="T"?-L:L+18),!g&&r.getNode(d)?.type==="junction"&&(Rs(p)?x+=p==="L"?s:-s:k+=p==="T"?s:-s),!v&&r.getNode(m)?.type==="junction"&&(Rs(y)?w+=y==="L"?s:-s:_+=y==="T"?s:-s),u[0]._private.rscratch){let N=e.insert("g");if(N.insert("path").attr("d",`M ${x},${k} L ${C},${E} L${w},${_} `).attr("class","edge").attr("id",`${i}-${pc(d,m,{prefix:"L"})}`),f){let D=Rs(p)?tA[p](x,l):x-h,M=op(p)?tA[p](k,l):k-h;N.insert("polygon").attr("points",a7e[p](l)).attr("transform",`translate(${D},${M})`).attr("class","arrow")}if(b){let D=Rs(y)?tA[y](w,l):w-h,M=op(y)?tA[y](_,l):_-h;N.insert("polygon").attr("points",a7e[y](l)).attr("transform",`translate(${D},${M})`).attr("class","arrow")}if(T){let D=GX(p,y)?"XY":Rs(p)?"X":"Y",M=0;D==="X"?M=Math.abs(x-w):D==="Y"?M=Math.abs(k-_)/1.5:M=Math.abs(x-w)/2;let B=N.append("g");if(await Rn(B,T,{useHtmlLabels:!1,width:M,classes:"architecture-service-label"},De()),B.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle"),D==="X")B.attr("transform","translate("+C+", "+E+")");else if(D==="Y")B.attr("transform","translate("+C+", "+E+") rotate(-90)");else if(D==="XY"){let A=qX(p,y);if(A&&Fyt(A)){let I=B.node().getBoundingClientRect(),[O,R]=jyt(A);B.attr("dominant-baseline","auto").attr("transform",`rotate(${-1*O*R*45})`);let $=B.node().getBoundingClientRect();B.attr("transform",` + translate(${C}, ${E-I.height/2}) + translate(${O*$.width/2}, ${R*$.height/2}) + rotate(${-1*O*R*45}, 0, ${I.height/2}) + `)}}}}}))},"drawEdges"),Qyt=o(async function(e,t,r,i){let n=r.getConfigField("padding")*.75,a=r.getConfigField("fontSize"),s=r.getConfigField("iconSize")/2;await Promise.all(t.nodes().map(async l=>{let h=oy(l);if(h.type==="group"){let{h:u,w:d,x1:p,y1:f}=l.boundingBox(),g=e.append("rect");g.attr("id",`${i}-group-${h.id}`).attr("x",p+s).attr("y",f+s).attr("width",d).attr("height",u).attr("class","node-bkg");let m=e.append("g"),y=p,b=f;if(h.icon){let v=m.append("g");v.html(`${await oo(h.icon,{height:n,width:n,fallbackPrefix:DT.prefix})}`),v.attr("transform","translate("+(y+s+1)+", "+(b+s+1)+")"),y+=n,b+=a/2-1-2}if(h.label){let v=m.append("g");await Rn(v,h.label,{useHtmlLabels:!1,width:d,classes:"architecture-service-label"},De()),v.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","start").attr("text-anchor","start"),v.attr("transform","translate("+(y+s+4)+", "+(b+s+2)+")")}r.setElementForId(h.id,g)}}))},"drawGroups"),Jyt=o(async function(e,t,r,i){let n=De();for(let a of r){let s=t.append("g"),l=e.getConfigField("iconSize");if(a.title){let p=s.append("g");await Rn(p,a.title,{useHtmlLabels:!1,width:l*1.5,classes:"architecture-service-label"},n),p.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle"),p.attr("transform","translate("+l/2+", "+l+")")}let h=s.append("g");if(a.icon)h.html(`${await oo(a.icon,{height:l,width:l,fallbackPrefix:DT.prefix})}`);else if(a.iconText){h.html(`${await oo("blank",{height:l,width:l,fallbackPrefix:DT.prefix})}`);let p=h.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(nr(a.iconText,n)),f=parseInt(window.getComputedStyle(p.node(),null).getPropertyValue("font-size").replace(/\D/g,""))??16;p.attr("style",`-webkit-line-clamp: ${Math.floor((l-2)/f)};`)}else h.append("path").attr("class","node-bkg").attr("id",`${i}-node-${a.id}`).attr("d",`M0,${l} V5 Q0,0 5,0 H${l-5} Q${l},0 ${l},5 V${l} Z`);s.attr("id",`${i}-service-${a.id}`).attr("class","architecture-service");let{width:u,height:d}=s.node().getBBox();a.width=u,a.height=d,e.setElementForId(a.id,s)}return 0},"drawServices"),e2t=o(function(e,t,r,i){r.forEach(n=>{let a=t.append("g"),s=e.getConfigField("iconSize");a.append("g").append("rect").attr("id",`${i}-node-${n.id}`).attr("fill-opacity","0").attr("width",s).attr("height",s),a.attr("class","architecture-junction");let{width:l,height:h}=a._groups[0][0].getBBox();a.width=l,a.height=h,e.setElementForId(n.id,a)})},"drawJunctions");I0([{name:DT.prefix,icons:DT}]);Go.use(Kyt.default);o(h7e,"addServices");o(u7e,"addJunctions");o(d7e,"positionNodes");o(p7e,"addGroups");o(f7e,"addEdges");o(g7e,"getAlignments");o(m7e,"getRelativeConstraints");o(y7e,"layoutArchitecture");t2t=o(async(e,t,r,i)=>{let n=i.db;n.setDiagramId(t);let a=n.getServices(),s=n.getJunctions(),l=n.getGroups(),h=n.getEdges(),u=n.getDataStructures(),d=oi(t),p=d.append("g");p.attr("class","architecture-edges");let f=d.append("g");f.attr("class","architecture-services");let g=d.append("g");g.attr("class","architecture-groups"),await Jyt(n,f,a,t),e2t(n,f,s,t);let m=await y7e(a,s,l,h,n,u);await Zyt(p,m,n,t),await Qyt(g,m,n,t),d7e(n,m),hc(void 0,d,n.getConfigField("padding"),n.getConfigField("useMaxWidth"))},"draw"),r2t={draw:t2t},i2t={parser:c7e,get db(){return new l7e},renderer:r2t,styles:Xyt}});var Y7e={};Kt(Y7e,{diagram:()=>b2t});function C7e(){YX={}}function w7e(){let e=c2t,{ast:t}=YX,r=HX();if(!t)throw new Error("No data for EventModel");return t.frames.forEach((i,n)=>{let a=$7e(i,t.dataEntities,r);e=iA(e,{$kind:x7e,index:n,frame:i,textProps:a});let s;B7e(i)?(ee.debug("source frame",i.sourceFrames),s=t.frames.filter(l=>i.sourceFrames.some(h=>h.$refText===l.name)),s.forEach(l=>{e=iA(e,{$kind:WX,index:n,frame:i,sourceFrame:l})})):e=iA(e,{$kind:WX,index:n,frame:i})}),e={...e,sortedSwimlanesArray:XX(e.swimlanes)},e}function E7e(e){YX.ast=e}function HX(){return hi}function S7e(e){let t=e.split(".");if(t.length===2)return t[0]}function _7e(e){let t=e.split(".");return t.length===2?t[1]:e}function A7e(e,t){if(!(!t||t.length===0))return Object.values(e).find(r=>r.namespace===t)}function rA(e,t,r){return Math.max(t,...Object.keys(e).filter(i=>{let n=Number.parseInt(i);return n>t&&nNumber.parseInt(i)))+1}function R7e(e,t){let r=S7e(e.entityIdentifier),i=A7e(t,r);switch(e.modelEntityType){case"ui":case"pcr":case"processor":return i?{index:i.index,label:i.namespace||hi.labelUiAutomation}:r?{index:rA(t,0,100),label:hi.labelUiAutomationPrefix+r}:{index:0,label:hi.labelUiAutomation};case"rmo":case"readmodel":case"cmd":case"command":return i?{index:i.index,label:i.namespace||hi.labelCommandReadModel}:r?{index:rA(t,100,200),label:hi.labelCommandReadModelPrefix+r}:{index:100,label:hi.labelCommandReadModel};default:return i?{index:i.index,label:i.namespace||hi.labelEvents}:r?{index:rA(t,200,300),label:hi.labelEventsPrefix+r}:{index:200,label:hi.labelEvents}}}function L7e(e){let{themeVariables:t}=Rt();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 $7e(e,t,r){let i=Rt(),n=nr(_7e(e.entityIdentifier)??"",i),a,s={fontSize:16,fontWeight:700,fontFamily:'"trebuchet ms", verdana, arial, sans-serif',joinWith:"
    "},l=`${Op(n,r.textMaxWidth,s)}`;if(e.dataInlineValue&&(a=e.dataInlineValue,a=a.substring(a.indexOf("{")+1),a=a.substring(0,a.lastIndexOf("}")-1),a=nr(a,i),a=Op(a,r.textMaxWidth,s),a=a.replaceAll(" "," ")),e.dataReference){let g=t.find(m=>m.name===e.dataReference?.$refText);g&&(a=g.dataBlockValue,a=a.substring(a.indexOf(`{ +`)+2),a=a.substring(0,a.lastIndexOf("}")-1),a=nr(a,i),a=Op(a,r.textMaxWidth,s),a=a.replaceAll(" "," "),a+="
    ")}let h=a!==void 0;h&&(l+=`

    ${a}`);let u={fontSize:s.fontSize,fontWeight:s.fontWeight,fontFamily:s.fontFamily},d=Y2(l,u),p=h?d.width/3:d.width,f={content:l,width:p,height:d.height};return ee.debug(`[${e.name}] ${e.entityIdentifier} text`,f),f}function I7e(e,t){let r=t,i=L7e(r.frame),n={width:r.textProps.width+2*hi.boxTextPadding,height:r.textProps.height+2*hi.boxTextPadding};return[{$kind:T7e,frame:r.frame,index:r.index,visual:i,dimension:n,textProps:r.textProps}]}function D7e(e,t,r){return t===void 0?hi.contentStartX:t.index===e.index&&e.r?e.r+hi.boxPadding:r===void 0?hi.contentStartX:r.r-hi.boxOverlap+hi.boxPadding}function M7e(e,t){let r=[...e.map(i=>i.r),t];return Math.max(...r)}function XX(e){return Object.values(e).sort((t,r)=>t.index-r.index)}function N7e(e,t){let r=t,i=R7e(r.frame,e.swimlanes),n;i.index in e.swimlanes?n=e.swimlanes[i.index]:n={index:i.index,label:i.label,r:0,y:i.index*hi.swimlaneMinHeight+hi.swimlaneGap,height:hi.swimlaneMinHeight,maxHeight:hi.swimlaneMinHeight};let a=e.boxes.length>0?e.boxes[e.boxes.length-1]:void 0,s=e.previousSwimlaneNumber!==void 0?e.swimlanes[e.previousSwimlaneNumber]:void 0,l={width:Math.max(hi.boxMinWidth,Math.min(hi.boxMaxWidth,r.dimension.width))+2*hi.boxPadding,height:Math.max(hi.boxMinHeight,Math.min(hi.boxMaxHeight,r.dimension.height))+2*hi.boxPadding},h=D7e(n,s,a),u=h+l.width+hi.boxPadding,d=M7e(Object.values(e.swimlanes),u);n.r=h+l.width,n.maxHeight=Math.max(n.maxHeight,l.height),n.height=Math.max(hi.swimlaneMinHeight,n.maxHeight)+2*hi.swimlanePadding;let p={x:h,y:hi.swimlanePadding+n.y,r:u,dimension:l,leftSibling:!1,swimlane:n,visual:r.visual,text:r.textProps.content,frame:r.frame,index:r.index},f={...e,boxes:[...e.boxes,p],swimlanes:{...e.swimlanes,[`${n.index}`]:n},previousSwimlaneNumber:i.index,previousFrame:r.frame,maxR:d},g=XX(f.swimlanes);g.length>0&&(g[0].y=0);for(let m=1;m0}function UX(e,t){if(t!=null)return e.find(r=>r.frame.name===t.name)}function P7e(e,t,r){if(!(r<0))for(let i=r;i>=0;i--){let n=e[i];if(n.swimlane.index!==t)return n}}function F7e(e,t){let r=t;if(J6(r.frame)||O7e(r.index,r.frame))return[];let i=UX(e.boxes,r.frame);if(i===void 0)throw new Error(`Target box not found for frame ${r.frame.name}`);let n;return r.sourceFrame?n=UX(e.boxes,r.sourceFrame):n=P7e(e.boxes,i.swimlane.index,r.index-1),n===void 0?[]:[{$kind:k7e,frame:r.frame,index:r.index,sourceBox:n,targetBox:i}]}function z7e(e,t){let r=t,i={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,i]}}function q7e(e,t){let r=h2t[t.$kind];if(r==null)return[];let i=r(e,t);return ee.debug("decided events",i),i}function j7e(e,t){let r=t.reduce((i,n)=>{let a=u2t[n.$kind];return a==null?i:a(i,n)},e);return ee.debug("evolve events",{state:e,newState:r,events:t}),r}function iA(e,t){let r=q7e(e,t);return j7e(e,r)}function G7e(e,t){return r=>{let i=r.swimlane.y+t.swimlanePadding,n=e.append("g").attr("class","em-box");n.append("rect").attr("x",r.x).attr("y",i).attr("rx","3").attr("width",r.dimension.width).attr("height",r.dimension.height).attr("stroke",r.visual.stroke).attr("fill",r.visual.fill),n.append("foreignObject").attr("x",r.x+t.boxPadding).attr("y",i+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 W7e(e,t){return e>t}function U7e(e,t,r,i){return n=>{let a=n.sourceBox.swimlane.y+t.swimlanePadding,s=n.targetBox.swimlane.y+t.swimlanePadding,l=W7e(a,s),h=n.sourceBox.x+n.sourceBox.dimension.width*2/3,u=n.targetBox.x+n.targetBox.dimension.width/3,d,p;ee.debug(`rendering relation up=${l} for `,{sourceBox:n.sourceBox,targetBox:n.targetBox}),l?(d=a,p=s+n.targetBox.dimension.height):(d=a+n.sourceBox.dimension.height,p=s);let f=i.emRelationStroke??n.visual.stroke;e.append("path").attr("class","em-relation").attr("fill",n.visual.fill).attr("stroke",f).attr("stroke-width","1").attr("marker-end",`url(#${r})`).attr("d",`M${h} ${d} L${u} ${p}`)}}function V7e(e,t,r,i){return n=>{let a=e.append("g").attr("class","em-swimlane"),s=i.emSwimlaneBackgroundOdd??"rgb(250,250,250)",l=i.emSwimlaneBackgroundStroke??"rgb(240,240,240)";a.append("rect").attr("x",0).attr("y",n.y).attr("rx","3").attr("width",t+r.swimlanePadding).attr("height",n.height).attr("fill",s).attr("stroke",l),a.append("text").attr("font-weight",r.swimlaneTextFontWeight).attr("x",30).attr("y",n.y+30).text(n.label)}}var x7e,T7e,WX,k7e,n2t,a2t,s2t,o2t,l2t,YX,hi,c2t,h2t,u2t,VX,d2t,p2t,f2t,g2t,m2t,y2t,v2t,b2t,H7e=Tt(()=>{bs();es();Ma();Sa();_a();Aa();Ra();La();$a();Ia();Da();xa();Ta();ka();Ca();wa();Ea();Rr();Or();Yr();tr();Zt();vt();x7e="position frame",T7e="frame positioned",WX="position relation",k7e="relation positioned",n2t=o(function(e){ee.debug("options str",e)},"setOptions"),a2t=o(function(){return{}},"getOptions"),s2t=o(function(){C7e(),ar()},"clear");o(C7e,"reset");o2t=rr.eventmodeling,l2t=o(()=>zr({...o2t,...Rt().eventmodeling}),"getConfig"),YX={};o(w7e,"getState");o(E7e,"setAst");hi={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: "};o(HX,"getDiagramProps");c2t={boxes:[],swimlanes:{},relations:[],maxR:0,sortedSwimlanesArray:[]};o(S7e,"extractNamespace");o(_7e,"extractName");o(A7e,"findSwimlaneByNamespace");o(rA,"findNextAvailableIndex");o(R7e,"calculateSwimlaneProps");o(L7e,"calculateEntityVisualProps");o($7e,"calculateTextProps");o(I7e,"decidePositionFrame");o(D7e,"calculateX");o(M7e,"calculateMaxRight");o(XX,"sortedSwimlanesArray");o(N7e,"evolveFramePositioned");o(O7e,"isFirstFrame");o(B7e,"hasSourceFrame");o(UX,"findBoxByFrame");o(P7e,"findBoxByLineIndex");o(F7e,"decidePositionRelation");o(z7e,"evolveRelationPositioned");h2t={[x7e]:I7e,[WX]:F7e},u2t={[T7e]:N7e,[k7e]:z7e};o(q7e,"decide");o(j7e,"evolve");o(iA,"dispatch");VX={getConfig:l2t,setOptions:n2t,getOptions:a2t,clear:s2t,setAccTitle:gr,getAccTitle:xr,getAccDescription:kr,setAccDescription:Tr,setDiagramTitle:_r,getDiagramTitle:Cr,setAst:E7e,getDiagramProps:HX,getState:w7e},d2t={parse:o(async e=>{let t=await Vi("eventmodeling",e);ee.debug(t),VX.setAst(t),xi(t,VX)},"parse")},p2t=De(),f2t=p2t?.eventmodeling;o(G7e,"renderD3Box");o(W7e,"dirUpwards");o(U7e,"renderD3Relation");o(V7e,"renderD3Swimlane");g2t=o(function(e,t,r,i){if(ee.debug("in eventmodeling renderer",e+` +`,"id:",t,r),!f2t)throw new Error("EventModeling config not found");let n=i.db,{themeVariables:a,eventmodeling:s}=De(),l=tt(`[id="${t}"]`),h=n.getDiagramProps(),u=n.getState(),d=`em-arrowhead-${t}`,p=a.emArrowhead??"#000000";u.sortedSwimlanesArray.forEach(V7e(l,u.maxR,h,a)),u.boxes.forEach(G7e(l,h)),u.relations.forEach(U7e(l,h,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",p),R2(void 0,l,s?.padding??30,s?.useMaxWidth)},"draw"),m2t={draw:g2t},y2t=o(e=>"","getStyles"),v2t=y2t,b2t={parser:d2t,db:VX,renderer:m2t,styles:v2t}});var r8e={};Kt(r8e,{diagram:()=>N2t});var ZX,x2t,T2t,k2t,ly,C2t,w2t,E2t,e8e,X7e,K7e,Z7e,S2t,Q7e,_2t,A2t,R2t,KX,L2t,$2t,t8e,nA,J7e,cy,I2t,D2t,M2t,N2t,i8e=Tt(()=>{yn();Zn();Or();Yr();tr();Zt();vt();ZX=(function(){var e=o(function(v,T,x,k){for(x=x||{},k=v.length;k--;x[v[k]]=T);return x},"o"),t=[1,4],r=[1,14],i=[1,12],n=[1,13],a=[6,7,8],s=[1,20],l=[1,18],h=[1,19],u=[6,7,11],d=[1,6,13,14],p=[1,23],f=[1,24],g=[1,6,7,11,13,14],m={trace:o(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:o(function(v,T,x,k,C,E,w){var _=E.length-1;switch(C){case 6:case 7:return k;case 15:k.addNode(E[_-1].length,E[_].trim());break;case 16:k.addNode(0,E[_].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:i,14:n},e(a,[2,3]),{1:[2,2]},e(a,[2,4]),e(a,[2,5]),{1:[2,6],6:r,12:15,13:i,14:n},{6:r,9:16,12:11,13:i,14:n},{6:s,7:l,10:17,11:h},e(u,[2,18],{14:[1,21]}),e(u,[2,16]),e(u,[2,17]),{6:s,7:l,10:22,11:h},{1:[2,7],6:r,12:15,13:i,14:n},e(d,[2,14],{7:p,11:f}),e(g,[2,8]),e(g,[2,9]),e(g,[2,10]),e(u,[2,15]),e(d,[2,13],{7:p,11:f}),e(g,[2,11]),e(g,[2,12])],defaultActions:{2:[2,1],6:[2,2]},parseError:o(function(v,T){if(T.recoverable)this.trace(v);else{var x=new Error(v);throw x.hash=T,x}},"parseError"),parse:o(function(v){var T=this,x=[0],k=[],C=[null],E=[],w=this.table,_="",L=0,N=0,D=0,M=2,B=1,A=E.slice.call(arguments,1),I=Object.create(this.lexer),O={yy:{}};for(var R in this.yy)Object.prototype.hasOwnProperty.call(this.yy,R)&&(O.yy[R]=this.yy[R]);I.setInput(v,O.yy),O.yy.lexer=I,O.yy.parser=this,typeof I.yylloc>"u"&&(I.yylloc={});var $=I.yylloc;E.push($);var F=I.options&&I.options.ranges;typeof O.yy.parseError=="function"?this.parseError=O.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function P(ie){x.length=x.length-2*ie,C.length=C.length-ie,E.length=E.length-ie}o(P,"popStack");function z(){var ie;return ie=k.pop()||I.lex()||B,typeof ie!="number"&&(ie instanceof Array&&(k=ie,ie=k.pop()),ie=T.symbols_[ie]||ie),ie}o(z,"lex");for(var q,G,W,J,H,Z,se={},Q,te,re,ne;;){if(W=x[x.length-1],this.defaultActions[W]?J=this.defaultActions[W]:((q===null||typeof q>"u")&&(q=z()),J=w[W]&&w[W][q]),typeof J>"u"||!J.length||!J[0]){var Ae="";ne=[];for(Q in w[W])this.terminals_[Q]&&Q>M&&ne.push("'"+this.terminals_[Q]+"'");I.showPosition?Ae="Parse error on line "+(L+1)+`: +`+I.showPosition()+` +Expecting `+ne.join(", ")+", got '"+(this.terminals_[q]||q)+"'":Ae="Parse error on line "+(L+1)+": Unexpected "+(q==B?"end of input":"'"+(this.terminals_[q]||q)+"'"),this.parseError(Ae,{text:I.match,token:this.terminals_[q]||q,line:I.yylineno,loc:$,expected:ne})}if(J[0]instanceof Array&&J.length>1)throw new Error("Parse Error: multiple actions possible at state: "+W+", token: "+q);switch(J[0]){case 1:x.push(q),C.push(I.yytext),E.push(I.yylloc),x.push(J[1]),q=null,G?(q=G,G=null):(N=I.yyleng,_=I.yytext,L=I.yylineno,$=I.yylloc,D>0&&D--);break;case 2:if(te=this.productions_[J[1]][1],se.$=C[C.length-te],se._$={first_line:E[E.length-(te||1)].first_line,last_line:E[E.length-1].last_line,first_column:E[E.length-(te||1)].first_column,last_column:E[E.length-1].last_column},F&&(se._$.range=[E[E.length-(te||1)].range[0],E[E.length-1].range[1]]),Z=this.performAction.apply(se,[_,N,L,O.yy,J[1],C,E].concat(A)),typeof Z<"u")return Z;te&&(x=x.slice(0,-1*te*2),C=C.slice(0,-1*te),E=E.slice(0,-1*te)),x.push(this.productions_[J[1]][0]),C.push(se.$),E.push(se._$),re=w[x[x.length-2]][x[x.length-1]],x.push(re);break;case 3:return!0}}return!0},"parse")},y=(function(){var v={EOF:1,parseError:o(function(T,x){if(this.yy.parser)this.yy.parser.parseError(T,x);else throw new Error(T)},"parseError"),setInput:o(function(T,x){return this.yy=x||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:o(function(){var T=this._input[0];this.yytext+=T,this.yyleng++,this.offset++,this.match+=T,this.matched+=T;var x=T.match(/(?:\r\n?|\n).*/g);return x?(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:o(function(T){var x=T.length,k=T.split(/(?:\r\n?|\n)/g);this._input=T+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-x),this.offset-=x;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),k.length-1&&(this.yylineno-=k.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:k?(k.length===C.length?this.yylloc.first_column:0)+C[C.length-k.length].length-k[0].length:this.yylloc.first_column-x},this.options.ranges&&(this.yylloc.range=[E[0],E[0]+this.yyleng-x]),this.yyleng=this.yytext.length,this},"unput"),more:o(function(){return this._more=!0,this},"more"),reject:o(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:o(function(T){this.unput(this.match.slice(T))},"less"),pastInput:o(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:o(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:o(function(){var T=this.pastInput(),x=new Array(T.length+1).join("-");return T+this.upcomingInput()+` +`+x+"^"},"showPosition"),test_match:o(function(T,x){var k,C,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))),C=T[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+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],k=this.performAction.call(this,this.yy,this,x,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),k)return k;if(this._backtrack){for(var w in E)this[w]=E[w];return!1}return!1},"test_match"),next:o(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var T,x,k,C;this._more||(this.yytext="",this.match="");for(var E=this._currentRules(),w=0;wx[0].length)){if(x=k,C=w,this.options.backtrack_lexer){if(T=this.test_match(k,E[w]),T!==!1)return T;if(this._backtrack){x=!1;continue}else return!1}else if(!this.options.flex)break}return x?(T=this.test_match(x,E[C]),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:o(function(){var T=this.next();return T||this.lex()},"lex"),begin:o(function(T){this.conditionStack.push(T)},"begin"),popState:o(function(){var T=this.conditionStack.length-1;return T>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:o(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:o(function(T){return T=this.conditionStack.length-1-Math.abs(T||0),T>=0?this.conditionStack[T]:"INITIAL"},"topState"),pushState:o(function(T){this.begin(T)},"pushState"),stateStackSize:o(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:o(function(T,x,k,C){var E=C;switch(k){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 v})();m.lexer=y;function b(){this.yy={}}return o(b,"Parser"),b.prototype=m,m.Parser=b,new b})();ZX.parser=ZX;x2t=ZX,T2t=class{constructor(){this.stack=[],this.clear=this.clear.bind(this),this.addNode=this.addNode.bind(this),this.getRoot=this.getRoot.bind(this)}static{o(this,"IshikawaDB")}clear(){this.root=void 0,this.stack=[],this.baseLevel=void 0,ar()}getRoot(){return this.root}addNode(e,t){let r=ft.sanitizeText(t,De());if(!this.root){this.root={text:r,children:[]},this.stack=[{level:0,node:this.root}],_r(r);return}this.baseLevel??=e;let i=e-this.baseLevel+1;for(i<=0&&(i=1);this.stack.length>1&&this.stack[this.stack.length-1].level>=i;)this.stack.pop();let n=this.stack[this.stack.length-1].node,a={text:r,children:[]};n.children.push(a),this.stack.push({level:i,node:a})}getAccTitle(){return xr()}setAccTitle(e){gr(e)}getAccDescription(){return kr()}setAccDescription(e){Tr(e)}getDiagramTitle(){return Cr()}setDiagramTitle(e){_r(e)}},k2t=14,ly=250,C2t=30,w2t=60,E2t=5,e8e=82*Math.PI/180,X7e=Math.cos(e8e),K7e=Math.sin(e8e),Z7e=o((e,t,r)=>{let i=e.node().getBBox(),n=i.width+t*2,a=i.height+t*2;Ir(e,a,n,r),e.attr("viewBox",`${i.x-t} ${i.y-t} ${n} ${a}`)},"applyPaddedViewBox"),S2t=o((e,t,r,i)=>{let n=i.db.getRoot();if(!n)return;let a=De(),{look:s,handDrawnSeed:l,themeVariables:h}=a,u=Os(a.fontSize)[0]??k2t,d=s==="handDrawn",p=n.children??[],f=a.ishikawa?.diagramPadding??20,g=a.ishikawa?.useMaxWidth??!1,m=oi(t),y=m.append("g").attr("class","ishikawa"),b=d?Bt.svg(m.node()):void 0,v=b?{roughSvg:b,seed:l??0,lineColor:h?.lineColor??"#333",fillColor:h?.mainBkg??"#fff"}:void 0,T=`ishikawa-arrow-${t}`;d||y.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 x=0,k=ly,C=d?void 0:cy(y,x,k,x,k,"ishikawa-spine");if(_2t(y,x,k,n.text,u,v),!p.length){d&&cy(y,x,k,x,k,"ishikawa-spine",v),Z7e(m,f,g);return}x-=20;let E=p.filter((I,O)=>O%2===0),w=p.filter((I,O)=>O%2===1),_=Q7e(E),L=Q7e(w),N=_.total+L.total,D=ly,M=ly;if(N>0){let I=ly*2,O=ly*.3;D=Math.max(O,I*(_.total/N)),M=Math.max(O,I*(L.total/N))}let B=u*2;D=Math.max(D,_.max*B),M=Math.max(M,L.max*B),k=Math.max(D,ly),C&&C.attr("y1",k).attr("y2",k),y.select(".ishikawa-head-group").attr("transform",`translate(0,${k})`);let A=Math.ceil(p.length/2);for(let I=0;IMath.min(R,$.getBBox().x),1/0)}if(d)cy(y,x,k,0,k,"ishikawa-spine",v);else{C.attr("x1",x);let I=`url(#${T})`;y.selectAll("line.ishikawa-branch, line.ishikawa-sub-branch").attr("marker-start",I)}Z7e(m,f,g)},"draw"),Q7e=o(e=>{let t=o(r=>r.children.reduce((i,n)=>i+1+t(n),0),"countDescendants");return e.reduce((r,i)=>{let n=t(i);return r.total+=n,r.max=Math.max(r.max,n),r},{total:0,max:0})},"sideStats"),_2t=o((e,t,r,i,n,a)=>{let s=Math.max(6,Math.floor(110/(n*.6))),l=e.append("g").attr("class","ishikawa-head-group").attr("transform",`translate(${t},${r})`),h=nA(l,t8e(i,s),0,0,"ishikawa-head-label","start",n),u=h.node().getBBox(),d=Math.max(60,u.width+6),p=Math.max(40,u.height*2+40),f=`M 0 ${-p/2} L 0 ${p/2} Q ${d*2.4} 0 0 ${-p/2} Z`;if(a){let g=a.roughSvg.path(f,{roughness:1.5,seed:a.seed,fill:a.fillColor,fillStyle:"hachure",fillWeight:2.5,hachureGap:5,stroke:a.lineColor,strokeWidth:2});l.insert(()=>g,":first-child").attr("class","ishikawa-head")}else l.insert("path",":first-child").attr("class","ishikawa-head").attr("d",f);h.attr("transform",`translate(${(d-u.width)/2-u.x+3},${-u.y-u.height/2})`)},"drawHead"),A2t=o((e,t)=>{let r=[],i=[],n=o((a,s,l)=>{let h=t===-1?[...a].reverse():a;for(let u of h){let d=r.length,p=u.children??[];r.push({depth:l,text:t8e(u.text,15),parentIndex:s,childCount:p.length}),l%2===0?(i.push(d),p.length&&n(p,d,l+1)):(p.length&&n(p,d,l+1),i.push(d))}},"walk");return n(e,-1,2),{entries:r,yOrder:i}},"flattenTree"),R2t=o((e,t,r,i,n,a,s)=>{let l=e.append("g").attr("class","ishikawa-label-group"),h=nA(l,t,r,i+11*n,"ishikawa-label cause","middle",a).node().getBBox();if(s){let u=s.roughSvg.rectangle(h.x-20,h.y-2,h.width+40,h.height+4,{roughness:1.5,seed:s.seed,fill:s.fillColor,fillStyle:"hachure",fillWeight:2.5,hachureGap:5,stroke:s.lineColor,strokeWidth:2});l.insert(()=>u,":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"),KX=o((e,t,r,i,n,a)=>{let s=Math.sqrt(i*i+n*n);if(s===0)return;let l=i/s,h=n/s,u=6,d=-h*u,p=l*u,f=t,g=r,m=`M ${f} ${g} L ${f-l*u*2+d} ${g-h*u*2+p} L ${f-l*u*2-d} ${g-h*u*2-p} Z`,y=a.roughSvg.path(m,{roughness:1,seed:a.seed,fill:a.lineColor,fillStyle:"solid",stroke:a.lineColor,strokeWidth:1});e.append(()=>y)},"drawArrowMarker"),L2t=o((e,t,r,i,n,a,s,l)=>{let h=t.children??[],u=a*(h.length?1:.2),d=-X7e*u,p=K7e*u*n,f=r+d,g=i+p;if(cy(e,r,i,f,g,"ishikawa-branch",l),l&&KX(e,r,i,r-f,i-g,l),R2t(e,t.text,f,g,n,s,l),!h.length)return;let{entries:m,yOrder:y}=A2t(h,n),b=m.length,v=new Array(b);for(let[E,w]of y.entries())v[w]=i+p*((E+1)/(b+1));let T=new Map;T.set(-1,{x0:r,y0:i,x1:f,y1:g,childCount:h.length,childrenDrawn:0});let x=-X7e,k=K7e*n,C=n<0?"ishikawa-label up":"ishikawa-label down";for(let[E,w]of m.entries()){let _=v[E],L=T.get(w.parentIndex),N=e.append("g").attr("class","ishikawa-sub-group"),D=0,M=0,B=0;if(w.depth%2===0){let A=L.y1-L.y0;D=J7e(L.x0,L.x1,A?(_-L.y0)/A:.5),M=_,B=D-(w.childCount>0?w2t+w.childCount*E2t:C2t),cy(N,D,_,B,_,"ishikawa-sub-branch",l),l&&KX(N,D,_,1,0,l),nA(N,w.text,B,_,"ishikawa-label align","end",s)}else{let A=L.childrenDrawn++;D=J7e(L.x0,L.x1,(L.childCount-A)/(L.childCount+1)),M=L.y0,B=D+x*((_-M)/k),cy(N,D,M,B,_,"ishikawa-sub-branch",l),l&&KX(N,D,M,D-B,M-_,l),nA(N,w.text,B,_,C,"end",s)}w.childCount>0&&T.set(E,{x0:D,y0:M,x1:B,y1:_,childCount:w.childCount,childrenDrawn:0})}},"drawBranch"),$2t=o(e=>e.split(/|\n/),"splitLines"),t8e=o((e,t)=>{if(e.length<=t)return e;let r=[];for(let i of e.split(/\s+/)){let n=r.length-1;n>=0&&r[n].length+1+i.length<=t?r[n]+=" "+i:r.push(i)}return r.join(` +`)},"wrapText"),nA=o((e,t,r,i,n,a,s)=>{let l=$2t(t),h=s*1.05,u=e.append("text").attr("class",n).attr("text-anchor",a).attr("x",r).attr("y",i-(l.length-1)*h/2);for(let[d,p]of l.entries())u.append("tspan").attr("x",r).attr("dy",d===0?0:h).text(p);return u},"drawMultilineText"),J7e=o((e,t,r)=>e+(t-e)*r,"lerp"),cy=o((e,t,r,i,n,a,s)=>{if(s){let l=s.roughSvg.line(t,r,i,n,{roughness:1.5,seed:s.seed,stroke:s.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",i).attr("y2",n)},"drawLine"),I2t={draw:S2t},D2t=o(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"),M2t=D2t,N2t={parser:x2t,get db(){return new T2t},renderer:I2t,styles:M2t}});var _8e={};Kt(_8e,{diagram:()=>tvt});function n8e(){return zr(H2t,Rt().venn)}function NT(e,t){let r=s8e(e),i=r.filter(l=>a8e(l,e)),n=0,a=0,s=[];if(i.length>1){let l=lK(i);for(let u=0;ud.angle-u.angle);let h=i[i.length-1];for(let u=0;um.radius*2&&(x=m.radius*2),(f==null||f.width>x)&&(f={circle:m,width:x,p1:d,p2:h,large:x>m.radius,sweep:!0})}f!=null&&(s.push(f),n+=oA(f.circle.radius,f.width),h=d)}}else{let l=e[0];for(let u=1;uMath.abs(l.radius-e[u].radius)){h=!0;break}h?n=a=0:(n=l.radius*l.radius*Math.PI,s.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=n+a,t.arcArea=n,t.polygonArea=a,t.arcs=s,t.innerPoints=i,t.intersectionPoints=r),n+a}function a8e(e,t){return t.every(r=>Ls(e,r)=e+t)return 0;if(r<=Math.abs(e-t))return Math.PI*Math.min(e,t)*Math.min(e,t);let i=e-(r*r-t*t+e*e)/(2*r),n=t-(r*r-e*e+t*t)/(2*r);return oA(e,i)+oA(t,n)}function oK(e,t){let r=Ls(e,t),i=e.radius,n=t.radius;if(r>=i+n||r<=Math.abs(i-n))return[];let a=(i*i-n*n+r*r)/(2*r),s=Math.sqrt(i*i-a*a),l=e.x+a*(t.x-e.x)/r,h=e.y+a*(t.y-e.y)/r,u=-(t.y-e.y)*(s/r),d=-(t.x-e.x)*(s/r);return[{x:l+u,y:h-d},{x:l-u,y:h+d}]}function lK(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 o8e(e,t,r,i){i=i||{};let n=i.maxIterations||100,a=i.tolerance||1e-10,s=e(t),l=e(r),h=r-t;if(s*l>0)throw"Initial bisect points must have opposite signs";if(s===0)return t;if(l===0)return r;for(let u=0;u=0&&(t=d),Math.abs(h)lA(t))}function Ng(e,t){let r=0;for(let i=0;iC.fx-E.fx,"sortOrder"),v=t.slice(),T=t.slice(),x=t.slice(),k=t.slice();for(let C=0;C{let L=_.slice();return L.fx=_.fx,L.id=_.id,L});w.sort((_,L)=>_.id-L.id),r.history.push({x:m[0].slice(),fx:m[0].fx,simplex:w})}f=0;for(let w=0;w=m[g-1].fx){let w=!1;if(T.fx>E.fx?(eh(x,1+d,v,-d,E),x.fx=e(x),x.fx=1)break;for(let _=1;_l+a*n*h||u>=b)y=n;else{if(Math.abs(p)<=-s*h)return n;p*(y-m)>=0&&(y=m),m=n,b=u}return 0}o(g,"zoom");for(let m=0;m<10;++m){if(eh(i.x,1,r.x,n,t),u=i.fx=e(i.x,i.fxprime),p=Ng(i.fxprime,t),u>l+a*n*h||m&&u>=d)return g(f,n,d);if(Math.abs(p)<=-s*h)return n;if(p>=0)return g(n,f,u);d=u,f=n,n*=2}return n}function c8e(e,t,r){let i={x:t.slice(),fx:0,fxprime:t.slice()},n={x:t.slice(),fx:0,fxprime:t.slice()},a=t.slice(),s,l,h=1,u;r=r||{},u=r.maxIterations||t.length*20,i.fx=e(i.x,i.fxprime),s=i.fxprime.slice(),hA(s,i.fxprime,-1);for(let d=0;d{let d={};for(let p=0;pfA(e,t,i)-r,0,e+t)}function u8e(e,t={}){let r=t.distinct,i=e.map(l=>Object.assign({},l));function n(l){return l.join(";")}if(o(n,"toKey"),r){let l=new Map;for(let h of i)for(let u=0;ul===h?0:la.sets.length===2).forEach(a=>{let s=r[a.sets[0]],l=r[a.sets[1]],h=Math.sqrt(t[s].size/Math.PI),u=Math.sqrt(t[l].size/Math.PI),d=uA(h,u,a.size);i[s][l]=i[l][s]=d;let p=0;a.size+1e-10>=Math.min(t[s].size,t[l].size)?p=1:a.size<=1e-10&&(p=-1),n[s][l]=n[l][s]=p}),{distances:i,constraints:n}}function p8e(e,t,r,i){for(let a=0;a0&&m<=p||f<0&&m>=p||(n+=2*y*y,t[2*a]+=4*y*(s-u),t[2*a+1]+=4*y*(l-d),t[2*h]+=4*y*(u-s),t[2*h+1]+=4*y*(d-l))}}return n}function f8e(e,t={}){let r=m8e(e,t),i=t.lossFunction||Og;if(e.length>=8){let n=g8e(e,t),a=i(n,e),s=i(r,e);a+1e-8f.map(g=>g/l));let h=o((f,g)=>p8e(f,g,a,s),"obj"),u=null;for(let f=0;fp.sets.length===2);for(let p of e){let f=p.weight!=null?p.weight:1,g=p.sets[0],m=p.sets[1];p.size+h8e>=Math.min(i[g].size,i[m].size)&&(f=0),n[g].push({set:m,size:p.size,weight:f}),n[m].push({set:g,size:p.size,weight:f})}let a=[];Object.keys(n).forEach(p=>{let f=0;for(let g=0;ge[s]));let a=i.weight!=null?i.weight:1;r+=a*(n-i.size)*(n-i.size)}return r}function uK(e,t){let r=0;for(let i of t){if(i.sets.length===1)continue;let n;if(i.sets.length===2){let l=e[i.sets[0]],h=e[i.sets[1]];n=fA(l.radius,h.radius,Ls(l,h))}else n=NT(i.sets.map(l=>e[l]));let a=i.weight!=null?i.weight:1,s=Math.log((n+1)/(i.size+1));r+=a*s*s}return r}function y8e(e,t,r){if(r==null?e.sort((n,a)=>a.radius-n.radius):e.sort(r),e.length>0){let n=e[0].x,a=e[0].y;for(let s of e)s.x-=n,s.y-=a}if(e.length===2&&Ls(e[0],e[1])1){let n=Math.atan2(e[1].x,e[1].y)-t,a=Math.cos(n),s=Math.sin(n);for(let l of e){let h=l.x,u=l.y;l.x=a*h-s*u,l.y=s*h+a*u}}if(e.length>2){let n=Math.atan2(e[2].x,e[2].y)-t;for(;n<0;)n+=2*Math.PI;for(;n>2*Math.PI;)n-=2*Math.PI;if(n>Math.PI){let a=e[1].y/(1e-10+e[1].x);for(let s of e){var i=(s.x+a*s.y)/(1+a*a);s.x=2*i-s.x,s.y=2*i*a-s.y}}}}function v8e(e){e.forEach(n=>{n.parent=n});function t(n){return n.parent!==n&&(n.parent=t(n.parent)),n.parent}o(t,"find");function r(n,a){let s=t(n),l=t(a);s.parent=l}o(r,"union");for(let n=0;n{delete n.parent}),Array.from(i.values())}function dA(e){let t=o(r=>{let i=e.reduce((a,s)=>Math.max(a,s[r]+s.radius),Number.NEGATIVE_INFINITY),n=e.reduce((a,s)=>Math.min(a,s[r]-s.radius),Number.POSITIVE_INFINITY);return{max:i,min:n}},"minMax");return{xRange:t("x"),yRange:t("y")}}function dK(e,t,r){t==null&&(t=Math.PI/2);let i=gK(e).map(u=>Object.assign({},u)),n=v8e(i);for(let u of n){y8e(u,t,r);let d=dA(u);u.size=(d.xRange.max-d.xRange.min)*(d.yRange.max-d.yRange.min),u.bounds=d}n.sort((u,d)=>d.size-u.size),i=n[0];let a=i.bounds,s=(a.xRange.max-a.xRange.min)/50;function l(u,d,p){if(!u)return;let f=u.bounds,g,m;if(d)g=a.xRange.max-f.xRange.min+s;else{g=a.xRange.max-f.xRange.max;let y=(f.xRange.max-f.xRange.min)/2-(a.xRange.max-a.xRange.min)/2;y<0&&(g+=y)}if(p)m=a.yRange.max-f.yRange.min+s;else{m=a.yRange.max-f.yRange.max;let y=(f.yRange.max-f.yRange.min)/2-(a.yRange.max-a.yRange.min)/2;y<0&&(m+=y)}for(let y of u)y.x+=g,y.y+=m,i.push(y)}o(l,"addCluster");let h=1;for(;h({radius:d*g.radius,x:i+p+(g.x-s.min)*d,y:i+f+(g.y-l.min)*d,setid:g.setid})))}function fK(e){let t={};for(let r of e)t[r.setid]=r;return t}function gK(e){return Object.keys(e).map(t=>Object.assign(e[t],{setid:t}))}function b8e(e={}){let t=!1,r=600,i=350,n=15,a=1e3,s=Math.PI/2,l=!0,h=null,u=!0,d=!0,p=null,f=null,g=!1,m=null,y=e&&e.symmetricalTextCentre?e.symmetricalTextCentre:!1,b={},v=e&&e.colourScheme?e.colourScheme:e&&e.colorScheme?e.colorScheme:["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"],T=0,x=o(function(w){if(w in b)return b[w];var _=b[w]=v[T];return T+=1,T>=v.length&&(T=0),_},"colours"),k=hK,C=Og;function E(w){let _=w.datum(),L=new Set;_.forEach(Z=>{Z.size==0&&Z.sets.length==1&&L.add(Z.sets[0])}),_=_.filter(Z=>!Z.sets.some(se=>L.has(se)));let N={},D={};if(_.length>0){let Z=k(_,{lossFunction:C,distinct:g});l&&(Z=dK(Z,s,f)),N=pK(Z,r,i,n,h),D=yK(N,_,y)}let M={};_.forEach(Z=>{Z.label&&(M[Z.sets]=Z.label)});function B(Z){if(Z.sets in M)return M[Z.sets];if(Z.sets.length==1)return""+Z.sets[0]}o(B,"label"),w.selectAll("svg").data([N]).enter().append("svg");let A=w.select("svg");t?A.attr("viewBox",`0 0 ${r} ${i}`):A.attr("width",r).attr("height",i);let I={},O=!1;A.selectAll(".venn-area path").each(function(Z){let se=this.getAttribute("d");Z.sets.length==1&&se&&!g&&(O=!0,I[Z.sets[0]]=k8e(se))});function R(Z){return se=>{let Q=Z.sets.map(te=>{let re=I[te],ne=N[te];return re||(re={x:r/2,y:i/2,radius:1}),ne||(ne={x:r/2,y:i/2,radius:1}),{x:re.x*(1-se)+ne.x*se,y:re.y*(1-se)+ne.y*se,radius:re.radius*(1-se)+ne.radius*se}});return eK(Q,m)}}o(R,"pathTween");let $=A.selectAll(".venn-area").data(_,Z=>Z.sets),F=$.enter().append("g").attr("class",Z=>`venn-area venn-${Z.sets.length==1?"circle":"intersection"}${Z.colour||Z.color?" venn-coloured":""}`).attr("data-venn-sets",Z=>Z.sets.join("_")),P=F.append("path"),z=F.append("text").attr("class","label").text(Z=>B(Z)).attr("text-anchor","middle").attr("dy",".35em").attr("x",r/2).attr("y",i/2);d&&(P.style("fill-opacity","0").filter(Z=>Z.sets.length==1).style("fill",Z=>Z.colour?Z.colour:Z.color?Z.color:x(Z.sets)).style("fill-opacity",".25"),z.style("fill",Z=>Z.colour||Z.color?"#FFF":e.textFill?e.textFill:Z.sets.length==1?x(Z.sets):"#444"));function q(Z){return typeof Z.transition=="function"?Z.transition("venn").duration(a):Z}o(q,"asTransition");let G=w;O&&typeof G.transition=="function"?(G=q(w),G.selectAll("path").attrTween("d",R)):G.selectAll("path").attr("d",Z=>eK(Z.sets.map(se=>N[se])),m);let W=G.selectAll("text").filter(Z=>Z.sets in D).text(Z=>B(Z)).attr("x",Z=>Math.floor(D[Z.sets].x)).attr("y",Z=>Math.floor(D[Z.sets].y));u&&(O?"on"in W?W.on("end",aA(N,B)):W.each("end",aA(N,B)):W.each(aA(N,B)));let J=q($.exit()).remove();typeof $.transition=="function"&&J.selectAll("path").attrTween("d",R);let H=J.selectAll("text").attr("x",r/2).attr("y",i/2);return p!==null&&(z.style("font-size","0px"),W.style("font-size",p),H.style("font-size","0px")),{circles:N,textCentres:D,nodes:$,enter:F,update:G,exit:J}}return o(E,"chart"),E.wrap=function(w){return arguments.length?(u=w,E):u},E.useViewBox=function(){return t=!0,E},E.width=function(w){return arguments.length?(r=w,E):r},E.height=function(w){return arguments.length?(i=w,E):i},E.padding=function(w){return arguments.length?(n=w,E):n},E.distinct=function(w){return arguments.length?(g=w,E):g},E.colours=function(w){return arguments.length?(x=w,E):x},E.colors=function(w){return arguments.length?(x=w,E):x},E.fontSize=function(w){return arguments.length?(p=w,E):p},E.round=function(w){return arguments.length?(m=w,E):m},E.duration=function(w){return arguments.length?(a=w,E):a},E.layoutFunction=function(w){return arguments.length?(k=w,E):k},E.normalize=function(w){return arguments.length?(l=w,E):l},E.scaleToFit=function(w){return arguments.length?(h=w,E):h},E.styled=function(w){return arguments.length?(d=w,E):d},E.orientation=function(w){return arguments.length?(s=w,E):s},E.orientationOrder=function(w){return arguments.length?(f=w,E):f},E.lossFunction=function(w){return arguments.length?(C=w==="default"?Og:w==="logRatio"?uK:w,E):C},E}function aA(e,t){return function(r){let i=this,n=e[r.sets[0]].radius||50,a=t(r)||"",s=a.split(/\s+/).reverse(),l=(a.length+s.length)/3,h=s.pop(),u=[h],d=0,p=1.1;i.textContent=null;let f=[];function g(T){let x=i.ownerDocument.createElementNS(i.namespaceURI,"tspan");return x.textContent=T,f.push(x),i.append(x),x}o(g,"append");let m=g(h);for(;h=s.pop(),!!h;){u.push(h);let T=u.join(" ");m.textContent=T,T.length>l&&m.getComputedTextLength()>n&&(u.pop(),m.textContent=u.join(" "),u=[h],m=g(h),d++)}let y=.35-d*p/2,b=i.getAttribute("x"),v=i.getAttribute("y");f.forEach((T,x)=>{T.setAttribute("x",b),T.setAttribute("y",v),T.setAttribute("dy",`${y+x*p}em`)})}}function sA(e,t,r){let i=t[0].radius-Ls(t[0],e);for(let n=1;n=a&&(n=i[d],a=p)}let s=cK(d=>-1*sA({x:d[0],y:d[1]},e,t),[n.x,n.y],{maxIterations:500,minErrorDelta:1e-10}).x,l={x:r?0:s[0],y:s[1]},h=!0;for(let d of e)if(Ls(l,d)>d.radius){h=!1;break}for(let d of t)if(Ls(l,d)d.p1))}function x8e(e){let t={},r=Object.keys(e);for(let i of r)t[i]=[];for(let i=0;i0&&console.log("WARNING: area "+s+" not represented on screen")}return i}function T8e(e,t,r){let i=[];return i.push(` +M`,e,t),i.push(` +m`,-r,0),i.push(` +a`,r,r,0,1,0,r*2,0),i.push(` +a`,r,r,0,1,0,-r*2,0),i.join(" ")}function k8e(e){let t=e.split(" ");return{x:Number.parseFloat(t[1]),y:Number.parseFloat(t[2]),radius:-Number.parseFloat(t[4])}}function vK(e){if(e.length===0)return[];let t={};return NT(e,t),t.arcs}function bK(e,t){if(e.length===0)return"M 0 0";let r=Math.pow(10,t||0),i=t!=null?a=>Math.round(a*r)/r:a=>a;if(e.length==1){let a=e[0].circle;return T8e(i(a.x),i(a.y),i(a.radius))}let n=[` +M`,i(e[0].p2.x),i(e[0].p2.y)];for(let a of e){let s=i(a.circle.radius);n.push(` +A`,s,s,0,a.large?1:0,a.sweep?1:0,i(a.p1.x),i(a.p1.y))}return n.join(" ")}function eK(e,t){return bK(vK(e),t)}function C8e(e,t={}){let{lossFunction:r,layoutFunction:i=hK,normalize:n=!0,orientation:a=Math.PI/2,orientationOrder:s,width:l=600,height:h=350,padding:u=15,scaleToFit:d=!1,symmetricalTextCentre:p=!1,distinct:f,round:g=2}=t,m=i(e,{lossFunction:r==="default"||!r?Og:r==="logRatio"?uK:r,distinct:f});n&&(m=dK(m,a,s));let y=pK(m,l,h,u,d),b=yK(y,e,p),v=new Map(Object.keys(y).map(k=>[k,{set:k,x:y[k].x,y:y[k].y,radius:y[k].radius}])),T=e.map(k=>{let C=k.sets.map(_=>v.get(_)),E=vK(C),w=bK(E,g);return{circles:C,arcs:E,path:w,area:k,has:new Set(k.sets)}});function x(k){let C="";for(let E of T)E.has.size>k.length&&k.every(w=>E.has.has(w))&&(C+=" "+E.path);return C}return o(x,"genDistinctPath"),T.map(({circles:k,arcs:C,path:E,area:w})=>({data:w,text:b[w.sets],circles:k,arcs:C,path:E,distinctPath:E+x(w.sets)}))}function w8e(e){let t=new Map;for(let r of e){let i=r.targets.join("|"),n=t.get(i);n?Object.assign(n,r.styles):t.set(i,{...r.styles})}return t}function lp(e){return e.join("|")}function E8e(e,t,r,i,n,a){let s=e?.useDebugLayout??!1,l=r.select("svg").append("g").attr("class","venn-text-nodes"),h=new Map;for(let u of i){let d=lp(u.sets),p=h.get(d);p?p.push(u):h.set(d,[u])}for(let[u,d]of h.entries()){let p=t.get(u);if(!p?.text)continue;let f=p.text.x,g=p.text.y,m=Math.min(...p.circles.map(D=>D.radius)),y=Math.min(...p.circles.map(D=>D.radius-Math.hypot(f-D.x,g-D.y))),b=Number.isFinite(y)?Math.max(0,y):0;b===0&&Number.isFinite(m)&&(b=m*.6);let v=l.append("g").attr("class","venn-text-area").attr("font-size",`${40*n}px`);s&&v.append("circle").attr("class","venn-text-debug-circle").attr("cx",f).attr("cy",g).attr("r",b).attr("fill","none").attr("stroke","purple").attr("stroke-width",1.5*n).attr("stroke-dasharray",`${6*n} ${4*n}`);let T=Math.max(80*n,b*2*.95),x=Math.max(60*n,b*2*.95),k=(p.data.label&&p.data.label.length>0?Math.min(32*n,b*.25):0)+(d.length<=2?30*n:0),C=f-T/2,E=g-x/2+k,w=Math.max(1,Math.ceil(Math.sqrt(d.length))),_=Math.max(1,Math.ceil(d.length/w)),L=T/w,N=x/_;for(let[D,M]of d.entries()){let B=D%w,A=Math.floor(D/w),I=C+L*(B+.5),O=E+N*(A+.5);s&&v.append("rect").attr("class","venn-text-debug-cell").attr("x",C+L*B).attr("y",E+N*A).attr("width",L).attr("height",N).attr("fill","none").attr("stroke","teal").attr("stroke-width",1*n).attr("stroke-dasharray",`${4*n} ${3*n}`);let R=L*.9,$=N*.9,F=v.append("foreignObject").attr("class","venn-text-node-fo").attr("width",R).attr("height",$).attr("x",I-R/2).attr("y",O-$/2).attr("overflow","visible"),P=a.get(M.id)?.color,z=F.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(M.label??M.id);P&&z.style("color",P)}}}function S8e(e){let t=new Set(e.map(n=>[...n.sets].sort().join("|"))),r=new Map(e.filter(n=>n.sets.length===1&&n.size!==void 0).map(n=>[n.sets[0],n.size])),i=[];for(let n of e){if(n.sets.length<3)continue;let a=[...n.sets].sort();for(let s=0;s0?[...e,...i]:e}var QX,O2t,tK,rK,iK,nK,aK,sK,B2t,P2t,MT,F2t,z2t,q2t,j2t,pA,G2t,W2t,U2t,V2t,Y2t,H2t,X2t,K2t,Z2t,Q2t,h8e,J2t,evt,tvt,A8e=Tt(()=>{yn();Zn();Or();Yr();tr();Zt();vt();QX=(function(){var e=o(function(T,x,k,C){for(k=k||{},C=T.length;C--;k[T[C]]=x);return k},"o"),t=[5,8],r=[7,8,11,12,17,19,22,24],i=[1,17],n=[1,18],a=[7,8,11,12,14,15,16,17,19,20,21,22,24,27],s=[1,31],l=[1,39],h=[7,8,11,12,17,19,22,24,27],u=[1,57],d=[1,56],p=[1,58],f=[1,59],g=[1,60],m=[7,8,11,12,16,17,19,20,22,24,27,31,32,33],y={trace:o(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:o(function(T,x,k,C,E,w,_){var L=w.length-1;switch(E){case 1:return w[L-1];case 2:case 3:case 4:this.$=[];break;case 5:w[L-1].push(w[L]),this.$=w[L-1];break;case 6:this.$=[];break;case 7:case 22:case 32:case 36:case 37:case 38:case 39:case 40:this.$=w[L];break;case 8:C.setDiagramTitle(w[L].substr(6)),this.$=w[L].substr(6);break;case 9:C.addSubsetData([w[L]],void 0,void 0),C.setIndentMode&&C.setIndentMode(!0);break;case 10:C.addSubsetData([w[L-1]],w[L],void 0),C.setIndentMode&&C.setIndentMode(!0);break;case 11:C.addSubsetData([w[L-2]],void 0,parseFloat(w[L])),C.setIndentMode&&C.setIndentMode(!0);break;case 12:C.addSubsetData([w[L-3]],w[L-2],parseFloat(w[L])),C.setIndentMode&&C.setIndentMode(!0);break;case 13:if(w[L].length<2)throw new Error("union requires multiple identifiers");C.validateUnionIdentifiers&&C.validateUnionIdentifiers(w[L]),C.addSubsetData(w[L],void 0,void 0),C.setIndentMode&&C.setIndentMode(!0);break;case 14:if(w[L-1].length<2)throw new Error("union requires multiple identifiers");C.validateUnionIdentifiers&&C.validateUnionIdentifiers(w[L-1]),C.addSubsetData(w[L-1],w[L],void 0),C.setIndentMode&&C.setIndentMode(!0);break;case 15:if(w[L-2].length<2)throw new Error("union requires multiple identifiers");C.validateUnionIdentifiers&&C.validateUnionIdentifiers(w[L-2]),C.addSubsetData(w[L-2],void 0,parseFloat(w[L])),C.setIndentMode&&C.setIndentMode(!0);break;case 16:if(w[L-3].length<2)throw new Error("union requires multiple identifiers");C.validateUnionIdentifiers&&C.validateUnionIdentifiers(w[L-3]),C.addSubsetData(w[L-3],w[L-2],parseFloat(w[L])),C.setIndentMode&&C.setIndentMode(!0);break;case 17:case 18:case 19:C.addTextData(w[L-1],w[L],void 0);break;case 20:case 21:C.addTextData(w[L-2],w[L-1],w[L]);break;case 23:C.addStyleData(w[L-1],w[L]);break;case 24:case 25:case 26:var N=C.getCurrentSets();if(!N)throw new Error("text requires set");C.addTextData(N,w[L],void 0);break;case 27:case 28:var N=C.getCurrentSets();if(!N)throw new Error("text requires set");C.addTextData(N,w[L-1],w[L]);break;case 29:case 41:this.$=[w[L]];break;case 30:case 42:this.$=[...w[L-2],w[L]];break;case 31:this.$=[w[L-2],w[L]];break;case 33:this.$=w[L].join(" ");break;case 34:this.$=[w[L]];break;case 35:w[L-1].push(w[L]),this.$=w[L-1];break;case 43:case 44:this.$=w[L];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:i,21:n},{13:20,18:19,20:i,21:n},{13:20,18:21,20:i,21:n},{16:[1,25],20:[1,23],21:[1,24],23:22},{13:20,18:26,20:i,21:n},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:s}),e(a,[2,41]),{16:[1,34],20:[1,32],21:[1,33],27:s},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:s},e(r,[2,10],{15:[1,40]}),{16:[1,41]},e(r,[2,14],{15:[1,42]}),{16:[1,43]},{13:44,20:i,21:n},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(h,[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:u,20:d,21:[1,53],28:52,29:54,30:55,31:p,32:f,33:g},e(r,[2,12]),e(r,[2,16]),e(h,[2,30]),e(h,[2,31]),e(h,[2,32]),e(h,[2,33],{30:61,16:u,20:d,31:p,32:f,33:g}),e(m,[2,34]),e(m,[2,36]),e(m,[2,37]),e(m,[2,38]),e(m,[2,39]),e(m,[2,40]),e(m,[2,35])],defaultActions:{6:[2,1]},parseError:o(function(T,x){if(x.recoverable)this.trace(T);else{var k=new Error(T);throw k.hash=x,k}},"parseError"),parse:o(function(T){var x=this,k=[0],C=[],E=[null],w=[],_=this.table,L="",N=0,D=0,M=0,B=2,A=1,I=w.slice.call(arguments,1),O=Object.create(this.lexer),R={yy:{}};for(var $ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,$)&&(R.yy[$]=this.yy[$]);O.setInput(T,R.yy),R.yy.lexer=O,R.yy.parser=this,typeof O.yylloc>"u"&&(O.yylloc={});var F=O.yylloc;w.push(F);var P=O.options&&O.options.ranges;typeof R.yy.parseError=="function"?this.parseError=R.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function z(me){k.length=k.length-2*me,E.length=E.length-me,w.length=w.length-me}o(z,"popStack");function q(){var me;return me=C.pop()||O.lex()||A,typeof me!="number"&&(me instanceof Array&&(C=me,me=C.pop()),me=x.symbols_[me]||me),me}o(q,"lex");for(var G,W,J,H,Z,se,Q={},te,re,ne,Ae;;){if(J=k[k.length-1],this.defaultActions[J]?H=this.defaultActions[J]:((G===null||typeof G>"u")&&(G=q()),H=_[J]&&_[J][G]),typeof H>"u"||!H.length||!H[0]){var ie="";Ae=[];for(te in _[J])this.terminals_[te]&&te>B&&Ae.push("'"+this.terminals_[te]+"'");O.showPosition?ie="Parse error on line "+(N+1)+`: +`+O.showPosition()+` +Expecting `+Ae.join(", ")+", got '"+(this.terminals_[G]||G)+"'":ie="Parse error on line "+(N+1)+": Unexpected "+(G==A?"end of input":"'"+(this.terminals_[G]||G)+"'"),this.parseError(ie,{text:O.match,token:this.terminals_[G]||G,line:O.yylineno,loc:F,expected:Ae})}if(H[0]instanceof Array&&H.length>1)throw new Error("Parse Error: multiple actions possible at state: "+J+", token: "+G);switch(H[0]){case 1:k.push(G),E.push(O.yytext),w.push(O.yylloc),k.push(H[1]),G=null,W?(G=W,W=null):(D=O.yyleng,L=O.yytext,N=O.yylineno,F=O.yylloc,M>0&&M--);break;case 2:if(re=this.productions_[H[1]][1],Q.$=E[E.length-re],Q._$={first_line:w[w.length-(re||1)].first_line,last_line:w[w.length-1].last_line,first_column:w[w.length-(re||1)].first_column,last_column:w[w.length-1].last_column},P&&(Q._$.range=[w[w.length-(re||1)].range[0],w[w.length-1].range[1]]),se=this.performAction.apply(Q,[L,D,N,R.yy,H[1],E,w].concat(I)),typeof se<"u")return se;re&&(k=k.slice(0,-1*re*2),E=E.slice(0,-1*re),w=w.slice(0,-1*re)),k.push(this.productions_[H[1]][0]),E.push(Q.$),w.push(Q._$),ne=_[k[k.length-2]][k[k.length-1]],k.push(ne);break;case 3:return!0}}return!0},"parse")},b=(function(){var T={EOF:1,parseError:o(function(x,k){if(this.yy.parser)this.yy.parser.parseError(x,k);else throw new Error(x)},"parseError"),setInput:o(function(x,k){return this.yy=k||this.yy||{},this._input=x,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:o(function(){var x=this._input[0];this.yytext+=x,this.yyleng++,this.offset++,this.match+=x,this.matched+=x;var k=x.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),x},"input"),unput:o(function(x){var k=x.length,C=x.split(/(?:\r\n?|\n)/g);this._input=x+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-k),this.offset-=k;var E=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 w=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===E.length?this.yylloc.first_column:0)+E[E.length-C.length].length-C[0].length:this.yylloc.first_column-k},this.options.ranges&&(this.yylloc.range=[w[0],w[0]+this.yyleng-k]),this.yyleng=this.yytext.length,this},"unput"),more:o(function(){return this._more=!0,this},"more"),reject:o(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). +`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:o(function(x){this.unput(this.match.slice(x))},"less"),pastInput:o(function(){var x=this.matched.substr(0,this.matched.length-this.match.length);return(x.length>20?"...":"")+x.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:o(function(){var x=this.match;return x.length<20&&(x+=this._input.substr(0,20-x.length)),(x.substr(0,20)+(x.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:o(function(){var x=this.pastInput(),k=new Array(x.length+1).join("-");return x+this.upcomingInput()+` +`+k+"^"},"showPosition"),test_match:o(function(x,k){var C,E,w;if(this.options.backtrack_lexer&&(w={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&&(w.yylloc.range=this.yylloc.range.slice(0))),E=x[0].match(/(?:\r\n?|\n).*/g),E&&(this.yylineno+=E.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:E?E[E.length-1].length-E[E.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+x[0].length},this.yytext+=x[0],this.match+=x[0],this.matches=x,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(x[0].length),this.matched+=x[0],C=this.performAction.call(this,this.yy,this,k,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),C)return C;if(this._backtrack){for(var _ in w)this[_]=w[_];return!1}return!1},"test_match"),next:o(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var x,k,C,E;this._more||(this.yytext="",this.match="");for(var w=this._currentRules(),_=0;_k[0].length)){if(k=C,E=_,this.options.backtrack_lexer){if(x=this.test_match(C,w[_]),x!==!1)return x;if(this._backtrack){k=!1;continue}else return!1}else if(!this.options.flex)break}return k?(x=this.test_match(k,w[E]),x!==!1?x:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:o(function(){var x=this.next();return x||this.lex()},"lex"),begin:o(function(x){this.conditionStack.push(x)},"begin"),popState:o(function(){var x=this.conditionStack.length-1;return x>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:o(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:o(function(x){return x=this.conditionStack.length-1-Math.abs(x||0),x>=0?this.conditionStack[x]:"INITIAL"},"topState"),pushState:o(function(x){this.begin(x)},"pushState"),stateStackSize:o(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:o(function(x,k,C,E){var w=E;switch(C){case 0:break;case 1:break;case 2:break;case 3:if(x.getIndentMode&&x.getIndentMode())return x.consumeIndentText=!0,this.begin("INITIAL"),22;break;case 4:break;case 5:x.setIndentMode&&x.setIndentMode(!1),this.begin("INITIAL"),this.unput(k.yytext);break;case 6:return this.begin("bol"),8;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(x.consumeIndentText)x.consumeIndentText=!1;else return 19;break;case 15:return 24;case 16:return k.yytext=k.yytext.slice(2,-2),14;case 17:return k.yytext=k.yytext.slice(1,-1).trim(),14;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 T})();y.lexer=b;function v(){this.yy={}}return o(v,"Parser"),v.prototype=y,y.Parser=v,new v})();QX.parser=QX;O2t=QX,tK=[],rK=[],iK=[],nK=new Set,sK=!1,B2t=o((e,t,r)=>{let i=pA(e).sort(),n=r??10/Math.pow(e.length,2);aK=i,i.length===1&&nK.add(i[0]),tK.push({sets:i,size:n,label:t?MT(t):void 0})},"addSubsetData"),P2t=o(()=>tK,"getSubsetData"),MT=o(e=>{let t=e.trim();return t.length>=2&&t.startsWith('"')&&t.endsWith('"')?t.slice(1,-1):t},"normalizeText"),F2t=o(e=>e&&MT(e),"normalizeStyleValue"),z2t=o((e,t,r)=>{let i=MT(t);rK.push({sets:pA(e).sort(),id:i,label:r?MT(r):void 0})},"addTextData"),q2t=o((e,t)=>{let r=pA(e).sort(),i={};for(let[n,a]of t)i[n]=F2t(a)??a;iK.push({targets:r,styles:i})},"addStyleData"),j2t=o(()=>iK,"getStyleData"),pA=o(e=>e.map(t=>MT(t)),"normalizeIdentifierList"),G2t=o(e=>{let t=pA(e).filter(r=>!nK.has(r));if(t.length>0)throw new Error(`unknown set identifier: ${t.join(", ")}`)},"validateUnionIdentifiers"),W2t=o(()=>rK,"getTextData"),U2t=o(()=>aK,"getCurrentSets"),V2t=o(()=>sK,"getIndentMode"),Y2t=o(e=>{sK=e},"setIndentMode"),H2t=rr.venn;o(n8e,"getConfig");X2t=o(()=>{ar(),tK.length=0,rK.length=0,iK.length=0,nK.clear(),aK=void 0,sK=!1},"customClear"),K2t={getConfig:n8e,clear:X2t,setAccTitle:gr,getAccTitle:xr,setDiagramTitle:_r,getDiagramTitle:Cr,getAccDescription:kr,setAccDescription:Tr,addSubsetData:B2t,getSubsetData:P2t,addTextData:z2t,addStyleData:q2t,validateUnionIdentifiers:G2t,getTextData:W2t,getStyleData:j2t,getCurrentSets:U2t,getIndentMode:V2t,setIndentMode:Y2t},Z2t=o(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"),Q2t=Z2t;o(NT,"intersectionArea");o(a8e,"containedInCircles");o(s8e,"getIntersectionPoints");o(oA,"circleArea");o(Ls,"distance");o(fA,"circleOverlap");o(oK,"circleCircleIntersection");o(lK,"getCenter");o(o8e,"bisect");o(lA,"zeros");o(JX,"zerosM");o(Ng,"dot");o(cA,"norm2");o(hA,"scale");o(eh,"weightedSum");o(cK,"nelderMead");o(l8e,"wolfeLineSearch");o(c8e,"conjugateGradient");o(hK,"venn");h8e=1e-10;o(uA,"distanceFromIntersectArea");o(u8e,"addMissingAreas");o(d8e,"getDistanceMatrices");o(p8e,"constrainedMDSGradient");o(f8e,"bestInitialLayout");o(g8e,"constrainedMDSLayout");o(m8e,"greedyLayout");o(Og,"lossFunction");o(uK,"logRatioLossFunction");o(y8e,"orientateCircles");o(v8e,"disjointCluster");o(dA,"getBoundingBox");o(dK,"normalizeSolution");o(pK,"scaleSolution");o(fK,"toObjectNotation");o(gK,"fromObjectNotation");o(b8e,"VennDiagram");o(aA,"wrapText");o(sA,"circleMargin");o(mK,"computeTextCentre");o(x8e,"getOverlappingCircles");o(yK,"computeTextCentres");o(T8e,"circlePath");o(k8e,"circleFromPath");o(vK,"intersectionAreaArcs");o(bK,"arcsToPath");o(eK,"intersectionAreaPath");o(C8e,"layout");o(w8e,"buildStyleByKey");J2t=o((e,t,r,i)=>{let n=i.db,a=n.getConfig?.(),{themeVariables:s,look:l,handDrawnSeed:h}=Rt(),u=l==="handDrawn",d=[s.venn1,s.venn2,s.venn3,s.venn4,s.venn5,s.venn6,s.venn7,s.venn8].filter(Boolean),p=n.getDiagramTitle?.(),f=n.getSubsetData(),g=n.getTextData(),m=w8e(n.getStyleData()),y=S8e(f),b=a?.width??800,v=a?.height??450,T=b/1600,x=p?48*T:0,k=s.primaryTextColor??s.textColor,C=oi(t);C.attr("viewBox",`0 0 ${b} ${v}`),p&&C.append("text").text(p).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",s.vennTitleTextColor||s.titleColor);let E=tt(document.createElement("div")),w=b8e().width(b).height(v-x);E.datum(y).call(w);let _=u?Bt.svg(E.select("svg").node()):void 0,L=C8e(y,{width:b,height:v-x,padding:a?.padding??15}),N=new Map;for(let A of L){let I=lp([...A.data.sets].sort());N.set(I,A)}g.length>0&&E8e(a,N,E,g,T,m);let D=Bn(s.background||"#f4f4f4");E.selectAll(".venn-circle").each(function(A,I){let O=tt(this),R=lp([...A.sets].sort()),$=m.get(R),F=$?.fill||d[I%d.length]||s.primaryColor;O.classed(`venn-set-${I%8}`,!0);let P=$?.["fill-opacity"]??.1,z=$?.stroke||F,q=$?.["stroke-width"]||`${5*T}`;if(u&&_){let W=N.get(R);if(W&&W.circles.length>0){let J=W.circles[0],H=_.circle(J.x,J.y,J.radius*2,{roughness:.7,seed:h,fill:BR(F,.7),fillStyle:"hachure",fillWeight:2,hachureGap:8,hachureAngle:-41+I*60,stroke:z,strokeWidth:parseFloat(String(q))});O.select("path").remove(),O.node()?.insertBefore(H,O.select("text").node())}}else O.select("path").style("fill",F).style("fill-opacity",P).style("stroke",z).style("stroke-width",q).style("stroke-opacity",.95);let G=$?.color||(D?Je(F,30):et(F,30));O.select("text").style("font-size",`${48*T}px`).style("fill",G)}),u&&_?E.selectAll(".venn-intersection").each(function(A){let I=tt(this),O=lp([...A.sets].sort()),R=m.get(O),$=R?.fill;if($){let F=I.select("path"),P=F.attr("d");if(P){let z=_.path(P,{roughness:.7,seed:h,fill:BR($,.3),fillStyle:"cross-hatch",fillWeight:2,hachureGap:6,hachureAngle:60,stroke:"none"}),q=F.node();q?.parentNode?.insertBefore(z,q),F.remove()}}else I.select("path").style("fill-opacity",0);I.select("text").style("font-size",`${48*T}px`).style("fill",R?.color??s.vennSetTextColor??k)}):(E.selectAll(".venn-intersection text").style("font-size",`${48*T}px`).style("fill",A=>{let I=lp([...A.sets].sort());return m.get(I)?.color??s.vennSetTextColor??k}),E.selectAll(".venn-intersection path").style("fill-opacity",A=>{let I=lp([...A.sets].sort());return m.get(I)?.fill?1:0}).style("fill",A=>{let I=lp([...A.sets].sort());return m.get(I)?.fill??"transparent"}));let M=C.append("g").attr("transform",`translate(0, ${x})`),B=E.select("svg").node();if(B&&"childNodes"in B)for(let A of[...B.childNodes])M.node()?.appendChild(A);Ir(C,v,b,a?.useMaxWidth??!0)},"draw");o(lp,"stableSetsKey");o(E8e,"renderTextNodes");o(S8e,"ensurePairwiseSubsets");evt={draw:J2t},tvt={parser:O2t,db:K2t,renderer:evt,styles:Q2t}});var I8e={};Kt(I8e,{diagram:()=>uvt});function L8e(e){if(!e.length)return[];let t=[],r=[];return e.forEach(i=>{let n={name:i.name,children:i.type==="Leaf"?void 0:[]};for(n.classSelector=i?.classSelector,i?.cssCompiledStyles&&(n.cssCompiledStyles=i.cssCompiledStyles),i.type==="Leaf"&&i.value!==void 0&&(n.value=i.value);r.length>0&&r[r.length-1].level>=i.level;)r.pop();if(r.length===0)t.push(n);else{let a=r[r.length-1].node;a.children?a.children.push(n):a.children=[n]}i.type!=="Leaf"&&r.push({node:n,level:i.level})}),t}var R8e,rvt,ivt,$8e,nvt,hy,OT,avt,svt,ovt,lvt,cvt,hvt,uvt,D8e=Tt(()=>{bs();es();Ma();Sa();_a();Aa();Ra();La();$a();Ia();Da();xa();Ta();ka();Ca();wa();Ea();Rr();yn();Ws();sa();Or();Yr();tr();Zt();vt();R8e=class{constructor(){this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.setAccTitle=gr,this.getAccTitle=xr,this.setDiagramTitle=_r,this.getDiagramTitle=Cr,this.getAccDescription=kr,this.setAccDescription=Tr}static{o(this,"TreeMapDB")}getNodes(){return this.nodes}getConfig(){let e=rr,t=Rt();return zr({...e.treemap,...t.treemap??{}})}addNode(e,t){this.nodes.push(e),this.levels.set(e,t),t===0&&(this.outerNodes.push(e),this.root??=e)}getRoot(){return{name:"",children:this.outerNodes}}addClass(e,t){let r=this.classes.get(e)??{id:e,styles:[],textStyles:[]},i=t.replace(/\\,/g,"\xA7\xA7\xA7").replace(/,/g,";").replace(/§§§/g,",").split(";");i&&i.forEach(n=>{G2(n)&&(r?.textStyles?r.textStyles.push(n):r.textStyles=[n]),r?.styles?r.styles.push(n):r.styles=[n]}),this.classes.set(e,r)}getClasses(){return this.classes}getStylesForClass(e){return this.classes.get(e)?.styles??[]}clear(){ar(),this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.root=void 0}};o(L8e,"buildHierarchy");rvt=o((e,t)=>{xi(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 s=a.item;if(!s)continue;let l=a.indent?parseInt(a.indent):0,h=ivt(s),u=s.classSelector?t.getStylesForClass(s.classSelector):[],d=u.length>0?u:void 0,p={level:l,name:h,type:s.$type,value:s.value,classSelector:s.classSelector,cssCompiledStyles:d};r.push(p)}let i=L8e(r),n=o((a,s)=>{for(let l of a)t.addNode(l,s),l.children&&l.children.length>0&&n(l.children,s+1)},"addNodesRecursively");n(i,0)},"populate"),ivt=o(e=>e.name?String(e.name):"","getItemName"),$8e={parser:{yy:void 0},parse:o(async e=>{try{let t=await Vi("treemap",e);ee.debug("Treemap AST:",t);let r=$8e.parser?.yy;if(!(r instanceof R8e))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.");rvt(t,r)}catch(t){throw ee.error("Error parsing treemap:",t),t}},"parse")},nvt=10,hy=10,OT=25,avt=o((e,t,r,i)=>{let n=i.db,a=n.getConfig(),s=a.padding??nvt,l=n.getDiagramTitle(),h=n.getRoot(),{themeVariables:u}=Rt();if(!h)return;let d=l?30:0,p=oi(t),f=a.nodeWidth?a.nodeWidth*hy:960,g=a.nodeHeight?a.nodeHeight*hy:500,m=f,y=g+d;p.attr("viewBox",`0 0 ${m} ${y}`),Ir(p,y,m,a.useMaxWidth);let b;try{let P=a.valueFormat||",";if(P==="$0,0")b=o(z=>"$"+wu(",")(z),"valueFormat");else if(P.startsWith("$")&&P.includes(",")){let z=/\.\d+/.exec(P),q=z?z[0]:"";b=o(G=>"$"+wu(","+q)(G),"valueFormat")}else if(P.startsWith("$")){let z=P.substring(1);b=o(q=>"$"+wu(z||"")(q),"valueFormat")}else b=wu(P)}catch(P){ee.error("Error creating format function:",P),b=wu(",")}let v=pl().range(["transparent",u.cScale0,u.cScale1,u.cScale2,u.cScale3,u.cScale4,u.cScale5,u.cScale6,u.cScale7,u.cScale8,u.cScale9,u.cScale10,u.cScale11]),T=pl().range(["transparent",u.cScalePeer0,u.cScalePeer1,u.cScalePeer2,u.cScalePeer3,u.cScalePeer4,u.cScalePeer5,u.cScalePeer6,u.cScalePeer7,u.cScalePeer8,u.cScalePeer9,u.cScalePeer10,u.cScalePeer11]),x=pl().range([u.cScaleLabel0,u.cScaleLabel1,u.cScaleLabel2,u.cScaleLabel3,u.cScaleLabel4,u.cScaleLabel5,u.cScaleLabel6,u.cScaleLabel7,u.cScaleLabel8,u.cScaleLabel9,u.cScaleLabel10,u.cScaleLabel11]);l&&p.append("text").attr("x",m/2).attr("y",d/2).attr("class","treemapTitle").attr("text-anchor","middle").attr("dominant-baseline","middle").text(l);let k=p.append("g").attr("transform",`translate(0, ${d})`).attr("class","treemapContainer"),C=Uy(h).sum(P=>P.value??0).sort((P,z)=>(z.value??0)-(P.value??0)),E=V7().size([f,g]).paddingTop(P=>P.children&&P.children.length>0?OT+hy:0).paddingInner(s).paddingLeft(P=>P.children&&P.children.length>0?hy:0).paddingRight(P=>P.children&&P.children.length>0?hy:0).paddingBottom(P=>P.children&&P.children.length>0?hy:0).round(!0)(C),w=E.descendants().filter(P=>P.children&&P.children.length>0),_=k.selectAll(".treemapSection").data(w).enter().append("g").attr("class","treemapSection").attr("transform",P=>`translate(${P.x0},${P.y0})`);_.append("rect").attr("width",P=>P.x1-P.x0).attr("height",OT).attr("class","treemapSectionHeader").attr("fill","none").attr("fill-opacity",.6).attr("stroke-width",.6).attr("style",P=>P.depth===0?"display: none;":""),_.append("clipPath").attr("id",(P,z)=>`clip-section-${t}-${z}`).append("rect").attr("width",P=>Math.max(0,P.x1-P.x0-12)).attr("height",OT),_.append("rect").attr("width",P=>P.x1-P.x0).attr("height",P=>P.y1-P.y0).attr("class",(P,z)=>`treemapSection section${z}`).attr("fill",P=>v(P.data.name)).attr("fill-opacity",.6).attr("stroke",P=>T(P.data.name)).attr("stroke-width",2).attr("stroke-opacity",.4).attr("style",P=>{if(P.depth===0)return"display: none;";let z=Pt({cssCompiledStyles:P.data.cssCompiledStyles});return z.nodeStyles+";"+z.borderStyles.join(";")}),_.append("text").attr("class","treemapSectionLabel").attr("x",6).attr("y",OT/2).attr("dominant-baseline","middle").text(P=>P.depth===0?"":P.data.name).attr("font-weight","bold").attr("clip-path",(P,z)=>`url(#clip-section-${t}-${z})`).attr("style",P=>{if(P.depth===0)return"display: none;";let z="dominant-baseline: middle; font-size: 12px; fill:"+x(P.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;",q=Pt({cssCompiledStyles:P.data.cssCompiledStyles});return z+q.labelStyles.replace("color:","fill:")}).each(function(P){if(P.depth===0)return;let z=tt(this),q=P.data.name;z.text(q);let G=P.x1-P.x0,W=6,J;a.showValues!==!1&&P.value?J=G-10-30-10-W:J=G-W-6;let H=Math.max(15,J),Z=z.node();if(Z.getComputedTextLength()>H){let se=q;for(;se.length>0;){if(se=q.substring(0,se.length-1),se.length===0){z.text("..."),Z.getComputedTextLength()>H&&z.text("");break}if(z.text(se+"..."),Z.getComputedTextLength()<=H)break}}}),a.showValues!==!1&&_.append("text").attr("class","treemapSectionValue").attr("x",P=>P.x1-P.x0-10).attr("y",OT/2).attr("text-anchor","end").attr("dominant-baseline","middle").text(P=>P.value?b(P.value):"").attr("font-style","italic").attr("style",P=>{if(P.depth===0)return"display: none;";let z="text-anchor: end; dominant-baseline: middle; font-size: 10px; fill:"+x(P.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;",q=Pt({cssCompiledStyles:P.data.cssCompiledStyles});return z+q.labelStyles.replace("color:","fill:")});let L=E.leaves(),N=L.length>20,D=N?16:38,M=N?14:28,B=N?4:8,A=N?4:6,I=N?2:4,O=N?8:10,R=N?1:2,$=k.selectAll(".treemapLeafGroup").data(L).enter().append("g").attr("class",(P,z)=>`treemapNode treemapLeafGroup leaf${z}${P.data.classSelector?` ${P.data.classSelector}`:""}x`).attr("transform",P=>`translate(${P.x0},${P.y0})`);$.append("rect").attr("width",P=>P.x1-P.x0).attr("height",P=>P.y1-P.y0).attr("class","treemapLeaf").attr("fill",P=>P.parent?v(P.parent.data.name):v(P.data.name)).attr("style",P=>Pt({cssCompiledStyles:P.data.cssCompiledStyles}).nodeStyles).attr("fill-opacity",.3).attr("stroke",P=>P.parent?v(P.parent.data.name):v(P.data.name)).attr("stroke-width",3),$.append("clipPath").attr("id",(P,z)=>`clip-${t}-${z}`).append("rect").attr("width",P=>Math.max(0,P.x1-P.x0-4)).attr("height",P=>Math.max(0,P.y1-P.y0-4)),$.append("text").attr("class","treemapLabel").attr("x",P=>(P.x1-P.x0)/2).attr("y",P=>(P.y1-P.y0)/2).attr("style",P=>{let z=`text-anchor: middle; dominant-baseline: middle; font-size: ${D}px;fill:`+x(P.data.name)+";",q=Pt({cssCompiledStyles:P.data.cssCompiledStyles});return z+q.labelStyles.replace("color:","fill:")}).attr("clip-path",(P,z)=>`url(#clip-${t}-${z})`).text(P=>P.data.name).each(function(P){let z=tt(this),q=P.x1-P.x0,G=P.y1-P.y0,W=z.node(),J=q-2*I,H=G-2*I;if(JJ&&Z>B;)Z--,z.style("font-size",`${Z}px`);let Q=Math.max(A,Math.min(M,Math.round(Z*se))),te=Z+R+Q;for(;te>H&&Z>B&&(Z--,Q=Math.max(A,Math.min(M,Math.round(Z*se))),!(QH;z.style("font-size",`${Z}px`),N?(ZJ||Z(P.x1-P.x0)/2).attr("y",function(P){return(P.y1-P.y0)/2}).attr("style",P=>{let z=`text-anchor: middle; dominant-baseline: hanging; font-size: ${M}px;fill:`+x(P.data.name)+";",q=Pt({cssCompiledStyles:P.data.cssCompiledStyles});return z+q.labelStyles.replace("color:","fill:")}).attr("clip-path",(P,z)=>`url(#clip-${t}-${z})`).text(P=>P.value?b(P.value):"").each(function(P){let z=tt(this),q=this.parentNode;if(!q){z.style("display","none");return}let G=tt(q).select(".treemapLabel");if(G.empty()||G.style("display")==="none"){z.style("display","none");return}let W=parseFloat(G.style("font-size")),J=Math.max(A,Math.min(M,Math.round(W*.6)));z.style("font-size",`${J}px`);let H=(P.y1-P.y0)/2+W/2+R;z.attr("y",H);let Z=P.x1-P.x0,se=P.y1-P.y0-4,Q=Z-2*I;z.node().getComputedTextLength()>Q||H+J>se||J{let t=Ua(),r=Rt(),i=zr(t,r.themeVariables),n=zr(lvt,e),a=n.titleColor??i.titleColor,s=n.labelColor??i.textColor,l=n.valueColor??i.textColor;return` + .treemapNode.section { + stroke: ${n.sectionStrokeColor}; + stroke-width: ${n.sectionStrokeWidth}; + fill: ${n.sectionFillColor}; + } + .treemapNode.leaf { + stroke: ${n.leafStrokeColor}; + stroke-width: ${n.leafStrokeWidth}; + fill: ${n.leafFillColor}; + } + .treemapLabel { + fill: ${s}; + font-size: ${n.labelFontSize}; + } + .treemapValue { + fill: ${l}; + font-size: ${n.valueFontSize}; + } + .treemapTitle { + fill: ${a}; + font-size: ${n.titleFontSize}; + } + `},"getStyles"),hvt=cvt,uvt={parser:$8e,get db(){return new R8e},renderer:ovt,styles:hvt}});var J8e={};Kt(J8e,{diagram:()=>kvt});function O8e(){return De()["wardley-beta"]}function B8e(e,t,r,i,n,a,s,l,h){rs.addNode({id:e,label:t,x:r,y:i,className:n,labelOffsetX:a,labelOffsetY:s,inertia:l,sourceStrategy:h})}function P8e(e,t,r=!1,i,n){rs.addLink({source:e,target:t,dashed:r,label:i,flow:n})}function F8e(e,t,r){rs.addTrend({nodeId:e,targetX:t,targetY:r})}function z8e(e,t,r){rs.addAnnotation({number:e,coordinates:t,text:r})}function q8e(e,t,r){rs.addNote({text:e,x:t,y:r})}function j8e(e,t,r){rs.addAccelerator({name:e,x:t,y:r})}function G8e(e,t,r){rs.addDeaccelerator({name:e,x:t,y:r})}function W8e(e,t){rs.setAnnotationsBox(e,t)}function U8e(e,t){rs.setSize(e,t)}function V8e(e){rs.startPipeline(e)}function Y8e(e,t){rs.addPipelineComponent(e,t)}function H8e(e){rs.setAxes(e)}function X8e(e){return rs.getNode(e)}function K8e(e){return rs.resolveNodeId(e)}function Z8e(){return rs.build()}function Q8e(){rs.clear(),ar()}var gA,Bg,M8e,dvt,pvt,N8e,fvt,rs,gvt,mvt,yvt,vvt,bvt,xvt,Tvt,kvt,eRe=Tt(()=>{bs();es();Ma();Sa();_a();Aa();Ra();La();$a();Ia();Da();xa();Ta();ka();Ca();wa();Ea();Rr();yn();Or();Yr();tr();Zt();vt();gA=o((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"),Bg=o((e,t,r)=>({x:gA(t,`${r} evolution`),y:gA(e,`${r} visibility`)}),"toCoordinates"),M8e=o(e=>{if(e){if(e==="+<>")return"bidirectional";if(e==="+<")return"backward";if(e==="+>")return"forward"}},"getFlowFromPort"),dvt=o(e=>{if(!e?.startsWith("+"))return{};let t=/^\+'([^']*)'/.exec(e)?.[1];return e.includes("<>")?{flow:"bidirectional",label:t}:e.includes("<")?{flow:"backward",label:t}:e.includes(">")?{flow:"forward",label:t}:{label:t}},"extractFlowFromArrow"),pvt=o((e,t)=>{if(xi(e,t),e.size&&t.setSize(e.size.width,e.size.height),e.evolution){let r=e.evolution.stages.map(n=>n.secondName?`${n.name.trim()} / ${n.secondName.trim()}`:n.name.trim()),i=e.evolution.stages.filter(n=>n.boundary!==void 0).map(n=>n.boundary);t.updateAxes({stages:r,stageBoundaries:i})}if(e.anchors.forEach(r=>{let i=Bg(r.visibility,r.evolution,`Anchor "${r.name}"`);t.addNode(r.name,r.name,i.x,i.y,"anchor")}),e.components.forEach(r=>{let i=Bg(r.visibility,r.evolution,`Component "${r.name}"`),n=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,s=r.decorator?.strategy;t.addNode(r.name,r.name,i.x,i.y,"component",n,a,r.inertia,s)}),e.notes.forEach(r=>{let i=Bg(r.visibility,r.evolution,`Note "${r.text}"`);t.addNote(r.text,i.x,i.y)}),e.pipelines.forEach(r=>{let i=t.getNode(r.parent);if(!i||typeof i.y!="number")throw new Error(`Pipeline "${r.parent}" must reference an existing component with coordinates.`);let n=i.y;t.startPipeline(r.parent),r.components.forEach(a=>{let s=`${r.parent}_${a.name}`,l=a.label?(a.label.negX?-1:1)*a.label.offsetX:void 0,h=a.label?(a.label.negY?-1:1)*a.label.offsetY:void 0,u=gA(a.evolution,`Pipeline component "${a.name}" evolution`);t.addNode(s,a.name,u,n,"pipeline-component",l,h),t.addPipelineComponent(r.parent,s)})}),e.links.forEach(r=>{let i=!!r.arrow&&(r.arrow.includes("-.->")||r.arrow.includes(".-.")),n=M8e(r.fromPort)??M8e(r.toPort),{flow:a,label:s}=dvt(r.arrow);!n&&a&&(n=a);let l=r.linkLabel,h=s??l;t.addLink(t.resolveNodeId(r.from),t.resolveNodeId(r.to),i,h,n)}),e.evolves.forEach(r=>{let i=t.getNode(r.component);if(i?.y!==void 0){let n=gA(r.target,`Evolve target for "${r.component}"`);t.addTrend(r.component,n,i.y)}}),e.annotations.length>0){let r=e.annotations[0],i=Bg(r.x,r.y,"Annotations box");t.setAnnotationsBox(i.x,i.y)}e.annotation.forEach(r=>{let i=Bg(r.x,r.y,`Annotation ${r.number}`);t.addAnnotation(r.number,[{x:i.x,y:i.y}],r.text)}),e.accelerators.forEach(r=>{let i=Bg(r.x,r.y,`Accelerator "${r.name}"`);t.addAccelerator(r.name,i.x,i.y)}),e.deaccelerators.forEach(r=>{let i=Bg(r.x,r.y,`Deaccelerator "${r.name}"`);t.addDeaccelerator(r.name,i.x,i.y)})},"populateDb"),N8e={parser:{yy:void 0},parse:o(async e=>{let t=await Vi("wardley",e);ee.debug(t);let r=N8e.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.");pvt(t,r)},"parse")},fvt=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{o(this,"WardleyBuilder")}addNode(e){let t=this.nodes.get(e.id)??{id:e.id,label:e.label},r={...t,...e,className:e.className??t.className,labelOffsetX:e.labelOffsetX??t.labelOffsetX,labelOffsetY:e.labelOffsetY??t.labelOffsetY};this.nodes.set(e.id,r)}addLink(e){this.links.push(e)}addTrend(e){this.trends.set(e.nodeId,e)}startPipeline(e){this.pipelines.set(e,{nodeId:e,componentIds:[]});let t=this.nodes.get(e);t&&(t.isPipelineParent=!0)}addPipelineComponent(e,t){let r=this.pipelines.get(e);r&&r.componentIds.push(t);let i=this.nodes.get(t);i&&(i.inPipeline=!0)}addAnnotation(e){this.annotations.push(e)}addNote(e){this.notes.push(e)}addAccelerator(e){this.accelerators.push(e)}addDeaccelerator(e){this.deaccelerators.push(e)}setAnnotationsBox(e,t){this.annotationsBox={x:e,y:t}}setAxes(e){this.axes={...this.axes,...e}}setSize(e,t){this.size={width:e,height:t}}getNode(e){return this.nodes.get(e)}resolveNodeId(e){if(this.nodes.has(e))return e;for(let[t,r]of this.nodes)if(r.label===e)return t;return e}build(){let e=[];for(let t of this.nodes.values()){if(typeof t.x!="number"||typeof t.y!="number")throw new Error(`Node "${t.label}" is missing coordinates`);e.push(t)}return{nodes:e,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}},rs=new fvt;o(O8e,"getConfig");o(B8e,"addNode");o(P8e,"addLink");o(F8e,"addTrend");o(z8e,"addAnnotation");o(q8e,"addNote");o(j8e,"addAccelerator");o(G8e,"addDeaccelerator");o(W8e,"setAnnotationsBox");o(U8e,"setSize");o(V8e,"startPipeline");o(Y8e,"addPipelineComponent");o(H8e,"updateAxes");o(X8e,"getNode");o(K8e,"resolveNodeId");o(Z8e,"getWardleyData");o(Q8e,"clear");gvt={getConfig:O8e,addNode:B8e,addLink:P8e,addTrend:F8e,addAnnotation:z8e,addNote:q8e,addAccelerator:j8e,addDeaccelerator:G8e,setAnnotationsBox:W8e,setSize:U8e,startPipeline:V8e,addPipelineComponent:Y8e,updateAxes:H8e,getNode:X8e,resolveNodeId:K8e,getWardleyData:Z8e,clear:Q8e,setAccTitle:gr,getAccTitle:xr,setDiagramTitle:_r,getDiagramTitle:Cr,getAccDescription:kr,setAccDescription:Tr},mvt=["Genesis","Custom Built","Product","Commodity"],yvt=o(()=>{let{themeVariables:e}=De();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"),vvt=o(()=>{let e=De()["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"),bvt=o((e,t,r,i)=>{ee.debug(`Rendering Wardley map +`+e);let n=vvt(),a=yvt(),s=n.nodeRadius*1.6,l=i.db,h=l.getWardleyData(),u=l.getDiagramTitle(),d=h.size?.width??n.width,p=h.size?.height??n.height,f=oi(t);f.selectAll("*").remove(),Ir(f,p,d,n.useMaxWidth),f.attr("viewBox",`0 0 ${d} ${p}`);let g=f.append("g").attr("class","wardley-map"),m=f.append("defs");m.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"),m.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"),m.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"),g.append("rect").attr("class","wardley-background").attr("width",d).attr("height",p).attr("fill",a.backgroundColor);let y=d-n.padding*2,b=p-n.padding*2;u&&g.append("text").attr("class","wardley-title").attr("x",d/2).attr("y",n.padding/2).attr("fill",a.axisTextColor).attr("font-size",n.axisFontSize*1.05).attr("font-weight","bold").attr("text-anchor","middle").attr("dominant-baseline","middle").text(u);let v=o(R=>n.padding+R/100*y,"projectX"),T=o(R=>p-n.padding-R/100*b,"projectY"),x=g.append("g").attr("class","wardley-axes");x.append("line").attr("x1",n.padding).attr("x2",d-n.padding).attr("y1",p-n.padding).attr("y2",p-n.padding).attr("stroke",a.axisColor).attr("stroke-width",1),x.append("line").attr("x1",n.padding).attr("x2",n.padding).attr("y1",n.padding).attr("y2",p-n.padding).attr("stroke",a.axisColor).attr("stroke-width",1);let k=h.axes.xLabel??"Evolution",C=h.axes.yLabel??"Visibility";x.append("text").attr("class","wardley-axis-label wardley-axis-label-x").attr("x",n.padding+y/2).attr("y",p-n.padding/4).attr("fill",a.axisTextColor).attr("font-size",n.axisFontSize).attr("font-weight","bold").attr("text-anchor","middle").text(k),x.append("text").attr("class","wardley-axis-label wardley-axis-label-y").attr("x",n.padding/3).attr("y",n.padding+b/2).attr("fill",a.axisTextColor).attr("font-size",n.axisFontSize).attr("font-weight","bold").attr("text-anchor","middle").attr("transform",`rotate(-90 ${n.padding/3} ${n.padding+b/2})`).text(C);let E=h.axes.stages&&h.axes.stages.length>0?h.axes.stages:mvt;if(E.length>0){let R=g.append("g").attr("class","wardley-stages"),$=h.axes.stageBoundaries,F=[];if($&&$.length===E.length){let P=0;$.forEach(z=>{F.push({start:P,end:z}),P=z})}else{let P=1/E.length;E.forEach((z,q)=>{F.push({start:q*P,end:(q+1)*P})})}E.forEach((P,z)=>{let q=F[z],G=n.padding+q.start*y,W=n.padding+q.end*y,J=(G+W)/2;z>0&&R.append("line").attr("x1",G).attr("x2",G).attr("y1",n.padding).attr("y2",p-n.padding).attr("stroke","#000").attr("stroke-width",1).attr("stroke-dasharray","5 5").attr("opacity",.8),R.append("text").attr("class","wardley-stage-label").attr("x",J).attr("y",p-n.padding/1.5).attr("fill",a.axisTextColor).attr("font-size",n.axisFontSize-2).attr("text-anchor","middle").text(P)})}if(n.showGrid){let R=g.append("g").attr("class","wardley-grid");for(let $=1;$<4;$++){let F=$/4,P=n.padding+y*F;R.append("line").attr("x1",P).attr("x2",P).attr("y1",n.padding).attr("y2",p-n.padding).attr("stroke",a.gridColor).attr("stroke-dasharray","2 6"),R.append("line").attr("x1",n.padding).attr("x2",d-n.padding).attr("y1",p-n.padding-b*F).attr("y2",p-n.padding-b*F).attr("stroke",a.gridColor).attr("stroke-dasharray","2 6")}}let w=new Map;if(h.nodes.forEach(R=>{w.set(R.id,{x:v(R.x),y:T(R.y),node:R})}),h.pipelines.length>0){let R=g.append("g").attr("class","wardley-pipelines"),$=g.append("g").attr("class","wardley-pipeline-links");h.pipelines.forEach(F=>{if(F.componentIds.length===0)return;let P=F.componentIds.map(W=>({id:W,pos:w.get(W),node:h.nodes.find(J=>J.id===W)})).filter(W=>W.pos&&W.node).sort((W,J)=>W.node.x-J.node.x);for(let W=0;W{let J=w.get(W);J&&(z=Math.min(z,J.x),q=Math.max(q,J.x),G=J.y)}),z!==1/0&&q!==-1/0){let W=n.nodeRadius*4,J=G-W/2,H=w.get(F.nodeId);if(H){let Z=(z+q)/2;H.x=Z,H.y=J-s/6}R.append("rect").attr("class","wardley-pipeline-box").attr("x",z-15).attr("y",J).attr("width",q-z+30).attr("height",W).attr("fill","none").attr("stroke",a.axisColor).attr("stroke-width",1.5).attr("rx",4).attr("ry",4)}})}let _=g.append("g").attr("class","wardley-links"),L=new Map;h.pipelines.forEach(R=>{L.set(R.nodeId,new Set(R.componentIds))});let N=h.links.filter(R=>!(!w.has(R.source)||!w.has(R.target)||L.get(R.target)?.has(R.source)));_.selectAll("line").data(N).enter().append("line").attr("class",R=>`wardley-link${R.dashed?" wardley-link--dashed":""}`).attr("x1",R=>{let $=w.get(R.source),F=w.get(R.target),P=h.nodes.find(W=>W.id===R.source).isPipelineParent?s/Math.sqrt(2):n.nodeRadius,z=F.x-$.x,q=F.y-$.y,G=Math.sqrt(z*z+q*q);return $.x+z/G*P}).attr("y1",R=>{let $=w.get(R.source),F=w.get(R.target),P=h.nodes.find(W=>W.id===R.source).isPipelineParent?s/Math.sqrt(2):n.nodeRadius,z=F.x-$.x,q=F.y-$.y,G=Math.sqrt(z*z+q*q);return $.y+q/G*P}).attr("x2",R=>{let $=w.get(R.source),F=w.get(R.target),P=h.nodes.find(W=>W.id===R.target).isPipelineParent?s/Math.sqrt(2):n.nodeRadius,z=$.x-F.x,q=$.y-F.y,G=Math.sqrt(z*z+q*q);return F.x+z/G*P}).attr("y2",R=>{let $=w.get(R.source),F=w.get(R.target),P=h.nodes.find(W=>W.id===R.target).isPipelineParent?s/Math.sqrt(2):n.nodeRadius,z=$.x-F.x,q=$.y-F.y,G=Math.sqrt(z*z+q*q);return F.y+q/G*P}).attr("stroke",a.linkStroke).attr("stroke-width",1).attr("stroke-dasharray",R=>R.dashed?"6 6":null).attr("marker-end",R=>R.flow==="forward"||R.flow==="bidirectional"?`url(#link-arrow-end-${t})`:null).attr("marker-start",R=>R.flow==="backward"||R.flow==="bidirectional"?`url(#link-arrow-start-${t})`:null),_.selectAll("text").data(N.filter(R=>R.label)).enter().append("text").attr("class","wardley-link-label").attr("x",R=>{let $=w.get(R.source),F=w.get(R.target),P=($.x+F.x)/2,z=F.y-$.y,q=F.x-$.x,G=Math.sqrt(q*q+z*z),W=8,J=z/G;return P+J*W}).attr("y",R=>{let $=w.get(R.source),F=w.get(R.target),P=($.y+F.y)/2,z=F.x-$.x,q=F.y-$.y,G=Math.sqrt(z*z+q*q),W=8,J=-z/G;return P+J*W}).attr("fill",a.axisTextColor).attr("font-size",n.labelFontSize).attr("text-anchor","middle").attr("dominant-baseline","middle").attr("transform",R=>{let $=w.get(R.source),F=w.get(R.target),P=($.x+F.x)/2,z=($.y+F.y)/2,q=F.x-$.x,G=F.y-$.y,W=Math.sqrt(q*q+G*G),J=8,H=G/W,Z=-q/W,se=P+H*J,Q=z+Z*J,te=Math.atan2(G,q)*180/Math.PI;return(te>90||te<-90)&&(te+=180),`rotate(${te} ${se} ${Q})`}).text(R=>R.label);let D=g.append("g").attr("class","wardley-trends"),M=h.trends.map(R=>{let $=w.get(R.nodeId);if(!$)return null;let F=v(R.targetX),P=T(R.targetY),z=F-$.x,q=P-$.y,G=Math.sqrt(z*z+q*q),W=n.nodeRadius+2,J=G>W?F-z/G*W:F,H=G>W?P-q/G*W:P;return{origin:$,targetX:F,targetY:P,adjustedX2:J,adjustedY2:H}}).filter(R=>R!==null);D.selectAll("line").data(M).enter().append("line").attr("class","wardley-trend").attr("x1",R=>R.origin.x).attr("y1",R=>R.origin.y).attr("x2",R=>R.adjustedX2).attr("y2",R=>R.adjustedY2).attr("stroke",a.evolutionStroke).attr("stroke-width",1).attr("stroke-dasharray","4 4").attr("marker-end",`url(#arrow-${t})`);let B=g.append("g").attr("class","wardley-nodes").selectAll("g").data(h.nodes).enter().append("g").attr("class",R=>["wardley-node",R.className?`wardley-node--${R.className}`:""].filter(Boolean).join(" "));B.filter(R=>R.sourceStrategy==="outsource").append("circle").attr("class","wardley-outsource-overlay").attr("cx",R=>w.get(R.id).x).attr("cy",R=>w.get(R.id).y).attr("r",n.nodeRadius*2).attr("fill","#666").attr("stroke",a.componentStroke).attr("stroke-width",1),B.filter(R=>R.sourceStrategy==="buy").append("circle").attr("class","wardley-buy-overlay").attr("cx",R=>w.get(R.id).x).attr("cy",R=>w.get(R.id).y).attr("r",n.nodeRadius*2).attr("fill","#ccc").attr("stroke",a.componentStroke).attr("stroke-width",1),B.filter(R=>R.sourceStrategy==="build").append("circle").attr("class","wardley-build-overlay").attr("cx",R=>w.get(R.id).x).attr("cy",R=>w.get(R.id).y).attr("r",n.nodeRadius*2).attr("fill","#eee").attr("stroke","#000").attr("stroke-width",1);let A=B.filter(R=>R.sourceStrategy==="market");A.append("circle").attr("class","wardley-market-overlay").attr("cx",R=>w.get(R.id).x).attr("cy",R=>w.get(R.id).y).attr("r",n.nodeRadius*2).attr("fill","white").attr("stroke",a.componentStroke).attr("stroke-width",1),B.filter(R=>!R.isPipelineParent&&R.sourceStrategy!=="market"&&R.className!=="anchor").append("circle").attr("cx",R=>w.get(R.id).x).attr("cy",R=>w.get(R.id).y).attr("r",n.nodeRadius).attr("fill",a.componentFill).attr("stroke",a.componentStroke).attr("stroke-width",1);let I=n.nodeRadius*.7,O=n.nodeRadius*1.2;if(A.append("line").attr("class","wardley-market-line").attr("x1",R=>w.get(R.id).x).attr("y1",R=>w.get(R.id).y-O).attr("x2",R=>w.get(R.id).x-O*Math.cos(Math.PI/6)).attr("y2",R=>w.get(R.id).y+O*Math.sin(Math.PI/6)).attr("stroke",a.componentStroke).attr("stroke-width",1),A.append("line").attr("class","wardley-market-line").attr("x1",R=>w.get(R.id).x-O*Math.cos(Math.PI/6)).attr("y1",R=>w.get(R.id).y+O*Math.sin(Math.PI/6)).attr("x2",R=>w.get(R.id).x+O*Math.cos(Math.PI/6)).attr("y2",R=>w.get(R.id).y+O*Math.sin(Math.PI/6)).attr("stroke",a.componentStroke).attr("stroke-width",1),A.append("line").attr("class","wardley-market-line").attr("x1",R=>w.get(R.id).x+O*Math.cos(Math.PI/6)).attr("y1",R=>w.get(R.id).y+O*Math.sin(Math.PI/6)).attr("x2",R=>w.get(R.id).x).attr("y2",R=>w.get(R.id).y-O).attr("stroke",a.componentStroke).attr("stroke-width",1),A.append("circle").attr("class","wardley-market-dot").attr("cx",R=>w.get(R.id).x).attr("cy",R=>w.get(R.id).y-O).attr("r",I).attr("fill","white").attr("stroke",a.componentStroke).attr("stroke-width",2),A.append("circle").attr("class","wardley-market-dot").attr("cx",R=>w.get(R.id).x-O*Math.cos(Math.PI/6)).attr("cy",R=>w.get(R.id).y+O*Math.sin(Math.PI/6)).attr("r",I).attr("fill","white").attr("stroke",a.componentStroke).attr("stroke-width",2),A.append("circle").attr("class","wardley-market-dot").attr("cx",R=>w.get(R.id).x+O*Math.cos(Math.PI/6)).attr("cy",R=>w.get(R.id).y+O*Math.sin(Math.PI/6)).attr("r",I).attr("fill","white").attr("stroke",a.componentStroke).attr("stroke-width",2),B.filter(R=>R.isPipelineParent===!0).append("rect").attr("x",R=>w.get(R.id).x-s/2).attr("y",R=>w.get(R.id).y-s/2).attr("width",s).attr("height",s).attr("fill",a.componentFill).attr("stroke",a.componentStroke).attr("stroke-width",1),B.filter(R=>R.inertia===!0).append("line").attr("class","wardley-inertia").attr("x1",R=>{let $=w.get(R.id),F=R.isPipelineParent?s/2+15:n.nodeRadius+15;return R.sourceStrategy&&(F+=n.nodeRadius+10),$.x+F}).attr("y1",R=>{let $=w.get(R.id),F=R.isPipelineParent?s:n.nodeRadius*2;return $.y-F/2}).attr("x2",R=>{let $=w.get(R.id),F=R.isPipelineParent?s/2+15:n.nodeRadius+15;return R.sourceStrategy&&(F+=n.nodeRadius+10),$.x+F}).attr("y2",R=>{let $=w.get(R.id),F=R.isPipelineParent?s:n.nodeRadius*2;return $.y+F/2}).attr("stroke",a.componentStroke).attr("stroke-width",6),B.append("text").attr("x",R=>{let $=w.get(R.id);if(R.className==="anchor")return R.labelOffsetX!==void 0?$.x+R.labelOffsetX:$.x;let F=n.nodeLabelOffset;R.sourceStrategy&&R.labelOffsetX===void 0&&(F+=10);let P=R.labelOffsetX??F;return $.x+P}).attr("y",R=>{let $=w.get(R.id);if(R.className==="anchor")return R.labelOffsetY!==void 0?$.y+R.labelOffsetY:$.y-3;let F=-n.nodeLabelOffset;R.sourceStrategy&&R.labelOffsetY===void 0&&(F-=10);let P=R.labelOffsetY??F;return $.y+P}).attr("class","wardley-node-label").attr("fill",R=>R.className==="evolved"?a.evolutionStroke:R.className==="anchor"?"#000":a.componentLabelColor).attr("font-size",n.labelFontSize).attr("font-weight",R=>R.className==="anchor"?"bold":"normal").attr("text-anchor",R=>R.className==="anchor"?"middle":"start").attr("dominant-baseline",R=>R.className==="anchor"?"middle":"auto").text(R=>R.label),h.annotations.length>0){let R=g.append("g").attr("class","wardley-annotations");if(h.annotations.forEach($=>{let F=$.coordinates.map(P=>({x:v(P.x),y:T(P.y)}));if(F.length>1)for(let P=0;P{let z=R.append("g").attr("class","wardley-annotation");z.append("circle").attr("cx",P.x).attr("cy",P.y).attr("r",10).attr("fill","white").attr("stroke",a.axisColor).attr("stroke-width",1.5),z.append("text").attr("x",P.x).attr("y",P.y).attr("text-anchor","middle").attr("dominant-baseline","central").attr("font-size",10).attr("fill",a.axisTextColor).attr("font-weight","bold").text($.number)})}),h.annotationsBox){let $=v(h.annotationsBox.x),F=T(h.annotationsBox.y),P=10,z=16,q=11,G=R.append("g").attr("class","wardley-annotations-box"),W=[...h.annotations].filter(H=>H.text).sort((H,Z)=>H.number-Z.number),J=[];if(W.forEach((H,Z)=>{let se=G.append("text").attr("x",$+P).attr("y",F+P+(Z+1)*z).attr("font-size",q).attr("fill",a.axisTextColor).attr("text-anchor","start").attr("dominant-baseline","middle").text(`${H.number}. ${H.text}`);J.push(se)}),J.length>0){let H=0,Z=0;J.forEach(ie=>{let me=ie.node(),oe=me.getComputedTextLength();H=Math.max(H,oe);let we=me.getBBox();Z=Math.max(Z,we.height)});let se=H+P*2+105,Q=W.length*z+P*2+Z/2,te=n.padding,re=d-n.padding-se,ne=n.padding,Ae=p-n.padding-Q;$=Math.max(te,Math.min($,re)),F=Math.max(ne,Math.min(F,Ae)),J.forEach((ie,me)=>{ie.attr("x",$+P).attr("y",F+P+(me+1)*z)}),G.insert("rect","text").attr("x",$).attr("y",F).attr("width",se).attr("height",Q).attr("fill","white").attr("stroke",a.axisColor).attr("stroke-width",1.5).attr("rx",4).attr("ry",4)}}}if(h.notes.length>0){let R=g.append("g").attr("class","wardley-notes");h.notes.forEach($=>{let F=v($.x),P=T($.y);R.append("text").attr("x",F).attr("y",P).attr("text-anchor","start").attr("font-size",11).attr("fill",a.axisTextColor).attr("font-weight","bold").text($.text)})}if(h.accelerators.length>0){let R=g.append("g").attr("class","wardley-accelerators");h.accelerators.forEach($=>{let F=v($.x),P=T($.y),z=60,q=30,G=20,W=` + M ${F} ${P-q/2} + L ${F+z-G} ${P-q/2} + L ${F+z-G} ${P-q/2-8} + L ${F+z} ${P} + L ${F+z-G} ${P+q/2+8} + L ${F+z-G} ${P+q/2} + L ${F} ${P+q/2} + Z + `;R.append("path").attr("d",W).attr("fill","white").attr("stroke",a.componentStroke).attr("stroke-width",1),R.append("text").attr("x",F+z/2).attr("y",P+q/2+15).attr("text-anchor","middle").attr("font-size",10).attr("fill",a.axisTextColor).attr("font-weight","bold").text($.name)})}if(h.deaccelerators.length>0){let R=g.append("g").attr("class","wardley-deaccelerators");h.deaccelerators.forEach($=>{let F=v($.x),P=T($.y),z=60,q=30,G=20,W=` + M ${F+z} ${P-q/2} + L ${F+G} ${P-q/2} + L ${F+G} ${P-q/2-8} + L ${F} ${P} + L ${F+G} ${P+q/2+8} + L ${F+G} ${P+q/2} + L ${F+z} ${P+q/2} + Z + `;R.append("path").attr("d",W).attr("fill","white").attr("stroke",a.componentStroke).attr("stroke-width",1),R.append("text").attr("x",F+z/2).attr("y",P+q/2+15).attr("text-anchor","middle").attr("font-size",10).attr("fill",a.axisTextColor).attr("font-weight","bold").text($.name)})}},"draw"),xvt={draw:bvt},Tvt=o(({wardley:e}={})=>{let t=Ua(),r=Rt(),i=zr(t,r.themeVariables),n=zr(i.wardley,e);return` + .wardley-background { + fill: ${n.backgroundColor}; + } + .wardley-axes line, .wardley-axes path { + stroke: ${n.axisColor}; + } + .wardley-axis-label { + fill: ${n.axisTextColor}; + } + .wardley-stage-label { + fill: ${n.axisTextColor}; + } + .wardley-grid line { + stroke: ${n.gridColor}; + } + .wardley-node circle { + fill: ${n.componentFill}; + stroke: ${n.componentStroke}; + } + .wardley-node-label { + fill: ${n.componentLabelColor}; + } + .wardley-link { + stroke: ${n.linkStroke}; + } + .wardley-link--dashed { + stroke-dasharray: 4 4; + } + .wardley-link-label { + fill: ${n.axisTextColor}; + } + .wardley-trend line { + stroke: ${n.evolutionStroke}; + } + .wardley-annotation-line { + stroke: ${n.annotationStroke}; + } + .wardley-annotation circle { + fill: ${n.annotationFill}; + stroke: ${n.annotationStroke}; + } + .wardley-annotation text { + fill: ${n.annotationTextColor}; + } + .wardley-annotations-box rect { + fill: ${n.annotationFill}; + stroke: ${n.annotationStroke}; + } + .wardley-annotations-box text { + fill: ${n.annotationTextColor}; + } + .wardley-pipeline-box { + stroke: ${n.componentStroke}; + } + .wardley-notes text { + fill: ${n.axisTextColor}; + } + `},"styles"),kvt={parser:N8e,db:gvt,renderer:xvt,styles:Tvt}});var cRe={};Kt(cRe,{diagram:()=>Pvt});function BT(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 iRe(e){let t=0;for(let r=0;r{bs();es();Ma();Sa();_a();Aa();Ra();La();$a();Ia();Da();xa();Ta();ka();Ca();wa();Ea();Rr();yn();Or();Yr();tr();Zt();vt();rRe=o(()=>({domains:new Map,transitions:[]}),"createDefaultData"),PT=rRe(),Cvt=o(()=>PT.domains,"getDomains"),wvt=o(()=>PT.transitions,"getTransitions"),Evt=o(e=>{if(e)for(let t of e){let r=t.domain,i=(t.items??[]).map(n=>({label:n.label}));PT.domains.set(r,{name:r,items:i})}},"setDomains"),Svt=o(e=>{e&&(PT.transitions=e.filter(t=>t.from===t.to?(ee.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"),_vt=o(()=>zr({...rr.cynefin,...Rt().cynefin}),"getConfig"),Avt=o(()=>{ar(),PT=rRe()},"clear"),mA={getDomains:Cvt,getTransitions:wvt,setDomains:Evt,setTransitions:Svt,getConfig:_vt,clear:Avt,setAccTitle:gr,getAccTitle:xr,setDiagramTitle:_r,getDiagramTitle:Cr,getAccDescription:kr,setAccDescription:Tr},Rvt=o(e=>{xi(e,mA),mA.setDomains(e.domains),mA.setTransitions(e.transitions)},"populate"),Lvt={parse:o(async e=>{let t=await Vi("cynefin",e);ee.debug(t),Rvt(t)},"parse")};o(BT,"seededRandom");o(iRe,"hashString");o(nRe,"resolveSeed");o(aRe,"generateFoldPath");o(sRe,"generateHorizontalBoundary");o(oRe,"generateCliffPath");o(lRe,"generateConfusionPath");tRe={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"}},$vt=o((e,t)=>{let r=e/2,i=t/2;return{complex:{cx:r/2,cy:i/2,x:0,y:0,w:r,h:i},complicated:{cx:r+r/2,cy:i/2,x:r,y:0,w:r,h:i},chaotic:{cx:r/2,cy:i+i/2,x:0,y:i,w:r,h:i},clear:{cx:r+r/2,cy:i+i/2,x:r,y:i,w:r,h:i},confusion:{cx:r,cy:i,x:r*.7,y:i*.7,w:r*.6,h:i*.6}}},"getDomainLayouts"),Ivt=o(()=>{let e=Ua(),t=Rt();return zr(e,t.themeVariables).cynefin},"getCynefinDomainColors"),xK=3,Dvt=o((e,t,r,i)=>{let n=i.db,a=n.getDomains(),s=n.getTransitions(),l=n.getDiagramTitle(),h=n.getAccTitle(),u=n.getAccDescription(),d=n.getConfig(),p=Ivt();ee.debug("Rendering Cynefin diagram");let f=d.width,g=d.height,m=d.padding,y=d.showDomainDescriptions,b=d.boundaryAmplitude,v=f+m*2,T=g+m*2,x={complex:p.complexBg,complicated:p.complicatedBg,clear:p.clearBg,chaotic:p.chaoticBg,confusion:p.confusionBg},k=oi(t);Ir(k,T,v,d.useMaxWidth??!0),k.attr("viewBox",`0 0 ${v} ${T}`),h&&k.append("title").text(h),u&&k.append("desc").text(u);let C=k.append("g").attr("transform",`translate(${m}, ${m})`),E=$vt(f,g),w=nRe(d.seed,t),_=C.append("g").attr("class","cynefin-backgrounds"),L=["complex","complicated","chaotic","clear"];for(let $ of L){let F=E[$];_.append("rect").attr("class","cynefinDomain").attr("x",F.x).attr("y",F.y).attr("width",F.w).attr("height",F.h).attr("fill",x[$]).attr("fill-opacity",.4).attr("stroke","none")}let N=C.append("g").attr("class","cynefin-boundaries");N.append("path").attr("class","cynefinBoundary").attr("d",aRe(f,g,w,b)).attr("fill","none"),N.append("path").attr("class","cynefinBoundary").attr("d",sRe(f,g,w+100,b)).attr("fill","none"),N.append("path").attr("class","cynefinCliff").attr("d",oRe(f,g)).attr("fill","none");let D=f*.15,M=g*.15;C.append("path").attr("class","cynefinConfusion").attr("d",lRe(f/2,g/2,D,M)).attr("fill",x.confusion).attr("fill-opacity",.5);let B=C.append("g").attr("class","cynefin-labels");for(let $ of L){let F=E[$];B.append("text").attr("class","cynefinDomainLabel").attr("x",F.cx).attr("y",y?F.cy-30:F.cy).attr("text-anchor","middle").attr("dominant-baseline","middle").text($.charAt(0).toUpperCase()+$.slice(1))}if(B.append("text").attr("class","cynefinDomainLabel").attr("x",f/2).attr("y",y?g/2-10:g/2).attr("text-anchor","middle").attr("dominant-baseline","middle").text("Confusion"),y){let $=C.append("g").attr("class","cynefin-subtitles");for(let F of L){let P=E[F],z=tRe[F];$.append("text").attr("class","cynefinSubtitle").attr("x",P.cx).attr("y",P.cy-10).attr("text-anchor","middle").attr("dominant-baseline","middle").text(z.model),$.append("text").attr("class","cynefinSubtitle").attr("x",P.cx).attr("y",P.cy+5).attr("text-anchor","middle").attr("dominant-baseline","middle").text(z.practice)}$.append("text").attr("class","cynefinSubtitle").attr("x",f/2).attr("y",g/2+8).attr("text-anchor","middle").attr("dominant-baseline","middle").text(tRe.confusion.practice)}let A=C.append("g").attr("class","cynefin-items"),I=26,O=10,R=["complex","complicated","chaotic","clear","confusion"];for(let $ of R){let F=a.get($);if(!F||F.items.length===0)continue;let P=E[$],z=$==="confusion",q=F.items,G=0;z&&F.items.length>xK&&(G=F.items.length-xK,q=F.items.slice(0,xK));let W;if(z){let J=y?22:14;W=P.cy+J}else W=P.cy+(y?25:15);if([...q].forEach((J,H)=>{let Z=W+H*(I+4),se=A.append("g"),Q=se.append("text").attr("class","cynefinItemText").attr("x",0).attr("y",I/2).attr("text-anchor","middle").attr("dominant-baseline","central").text(J.label),te=J.label.length*7,re=Q.node();if(re&&typeof re.getBBox=="function"){let ie=re.getBBox();ie.width>0&&(te=ie.width)}let ne=te+O*2,Ae=P.cx-ne/2;se.attr("transform",`translate(${Ae}, ${Z})`),se.insert("rect","text").attr("class","cynefinItem").attr("x",0).attr("y",0).attr("width",ne).attr("height",I).attr("rx",4).attr("ry",4).attr("fill",x[$]).attr("fill-opacity",.95),Q.attr("x",ne/2).attr("y",I/2)}),G>0){let J=W+q.length*(I+4),H=`+${G} more`,Z=A.append("g"),se=Z.append("text").attr("class","cynefinItemText").attr("x",0).attr("y",I/2).attr("text-anchor","middle").attr("dominant-baseline","central").text(H),Q=H.length*7,te=se.node();if(te&&typeof te.getBBox=="function"){let Ae=te.getBBox();Ae.width>0&&(Q=Ae.width)}let re=Q+O*2,ne=P.cx-re/2;Z.attr("transform",`translate(${ne}, ${J})`),Z.insert("rect","text").attr("class","cynefinItemOverflow").attr("x",0).attr("y",0).attr("width",re).attr("height",I).attr("rx",4).attr("ry",4).attr("fill",x[$]).attr("fill-opacity",.6),se.attr("x",re/2).attr("y",I/2)}}if(s.length>0){let $=k.select("defs").empty()?k.append("defs"):k.select("defs"),F=`cynefin-arrow-${t}`;$.append("marker").attr("id",F).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 P=C.append("g").attr("class","cynefin-arrows");s.forEach(z=>{let q=E[z.from],G=E[z.to];if(!q||!G)return;if(z.from===z.to){ee.warn(`Cynefin renderer: skipping self-loop on domain "${z.from}"`);return}let W=q.cx,J=q.cy,H=G.cx,Z=G.cy,se=(W+H)/2,Q=(J+Z)/2,te=H-W,re=Z-J,ne=Math.sqrt(te*te+re*re),Ae=ne*.15,ie=-re/ne,me=te/ne,oe=se+ie*Ae,we=Q+me*Ae;P.append("path").attr("class","cynefinArrowLine").attr("d",`M${W},${J} Q${oe},${we} ${H},${Z}`).attr("fill","none").attr("marker-end",`url(#${F})`),z.label&&P.append("text").attr("class","cynefinArrowLabel").attr("x",oe).attr("y",we-6).attr("text-anchor","middle").attr("dominant-baseline","auto").text(z.label)})}l&&C.append("text").attr("class","cynefinTitle").attr("x",f/2).attr("y",-m/2).attr("text-anchor","middle").attr("dominant-baseline","middle").text(l)},"draw"),Mvt={draw:Dvt},Nvt=o(()=>{let e=Ua(),t=Rt();return zr(e,t.themeVariables).cynefin},"getCynefinTheme"),Ovt=o(()=>{let e=Nvt();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"),Bvt=Ovt,Pvt={parser:Lvt,db:mA,renderer:Mvt,styles:Bvt}});var TK,kK,CK,wK,yA,cp,uy,Fvt,dRe,pRe,zvt,qvt,jvt,Gvt,Wvt,Uvt,Vvt,Yvt,Hvt,ki,Pa,Xvt,Kvt,Zvt,fRe,Qvt,Jvt,Ei,gRe,Pg,ebt,tbt,EK,hp,ol,rbt,uRe,ibt,up,FT=Tt(()=>{yn();tr();Zt();vt();TK="",kK="",CK="",wK=[],yA=new Map,cp=o(e=>nr(e,De()),"sanitizeText"),uy=o(e=>{switch(e.type){case"terminal":return{...e,value:cp(e.value)};case"nonterminal":return{...e,name:cp(e.name)};case"sequence":return{...e,elements:e.elements.map(uy)};case"choice":return{...e,alternatives:e.alternatives.map(uy)};case"optional":return{...e,element:uy(e.element)};case"repetition":return{...e,element:uy(e.element),separator:e.separator?uy(e.separator):void 0};case"special":return{...e,text:cp(e.text)}}},"sanitizeAstNode"),Fvt=o(()=>{TK="",kK="",CK="",wK.length=0,yA.clear(),ar(),ee.debug("[Railroad] Database cleared")},"clear"),dRe=o(e=>{TK=cp(e),ee.debug("[Railroad] Title set:",e)},"setTitle"),pRe=o(()=>TK,"getTitle"),zvt=o(e=>{let t={...e,name:cp(e.name),definition:uy(e.definition),comment:e.comment?cp(e.comment):void 0};ee.debug("[Railroad] Adding rule:",t.name),yA.has(t.name)&&ee.warn(`[Railroad] Rule '${t.name}' is already defined. Overwriting.`),wK.push(t),yA.set(t.name,t)},"addRule"),qvt=o(()=>wK,"getRules"),jvt=o(e=>yA.get(e),"getRule"),Gvt=o(e=>{kK=cp(e).replace(/^\s+/g,""),ee.debug("[Railroad] Accessibility title set:",e)},"setAccTitle"),Wvt=o(()=>kK,"getAccTitle"),Uvt=o(e=>{CK=cp(e).replace(/\n\s+/g,` +`),ee.debug("[Railroad] Accessibility description set:",e)},"setAccDescription"),Vvt=o(()=>CK,"getAccDescription"),Yvt=dRe,Hvt=pRe,ki={clear:Fvt,setTitle:dRe,getTitle:pRe,addRule:zvt,getRules:qvt,getRule:jvt,setAccTitle:Gvt,getAccTitle:Wvt,setAccDescription:Uvt,getAccDescription:Vvt,setDiagramTitle:Yvt,getDiagramTitle:Hvt},Pa={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},Xvt=/^#(?:[\da-f]{3,4}|[\da-f]{6}|[\da-f]{8})$|^(?:rgb|rgba|hsl|hsla|hwb|lab|lch|oklab|oklch)\([\d\s%+,./-]+\)$|^[a-z]+$/i,Kvt=/^[\w "',.-]+$/,Zvt=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"]),fRe=o(e=>e?Object.keys(e).every(t=>t==="railroad"||Zvt.has(t)):!1,"isRailroadStyleOptions"),Qvt=o(e=>e?"railroad"in e&&e.railroad?e.railroad:fRe(e)?e:{}:{},"extractRailroadOverrides"),Jvt=o(e=>{if(!e||fRe(e))return{};let{railroad:t,svgId:r,theme:i,look:n,...a}=e;return a},"extractThemeOverrides"),Ei=o((e,t)=>{if(typeof e!="string")return t;let r=e.trim();return Xvt.test(r)?r:t},"sanitizeColorValue"),gRe=o((e,t)=>{if(typeof e!="string")return t;let r=e.trim();return Kvt.test(r)?r:t},"sanitizeFontFamilyValue"),Pg=o((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"),ebt=o(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"),tbt=o(e=>{let t=gRe(e.fontFamily,Pa.fontFamily),r=ebt(e.fontSize)??Pa.fontSize;return{...Pa,fontFamily:t,fontSize:r,terminalFill:Ei(e.secondBkg??e.secondaryColor,Pa.terminalFill),terminalStroke:Ei(e.secondaryBorderColor??e.lineColor,Pa.terminalStroke),terminalTextColor:Ei(e.secondaryTextColor??e.textColor,Pa.terminalTextColor),nonTerminalFill:Ei(e.mainBkg??e.background,Pa.nonTerminalFill),nonTerminalStroke:Ei(e.primaryBorderColor??e.lineColor,Pa.nonTerminalStroke),nonTerminalTextColor:Ei(e.primaryTextColor??e.textColor,Pa.nonTerminalTextColor),lineColor:Ei(e.lineColor,Pa.lineColor),markerFill:Ei(e.lineColor,Pa.markerFill),commentFill:Ei(e.labelBackground??e.tertiaryColor,Pa.commentFill),commentStroke:Ei(e.tertiaryBorderColor??e.lineColor,Pa.commentStroke),commentTextColor:Ei(e.tertiaryTextColor??e.textColor,Pa.commentTextColor),specialFill:Ei(e.tertiaryColor??e.secondaryColor,Pa.specialFill),specialStroke:Ei(e.tertiaryBorderColor??e.secondaryBorderColor,Pa.specialStroke),ruleNameColor:Ei(e.titleColor??e.textColor,Pa.ruleNameColor)}},"buildThemeDefaults"),EK=o(e=>{let t=Rt(),r={...Ua(),...t.themeVariables??{},...Jvt(e)},i=tbt(r),n={...t.railroad??{},...Qvt(e)};return{compactMode:n.compactMode??i.compactMode,padding:Pg(n.padding,i.padding),verticalSeparation:Pg(n.verticalSeparation,i.verticalSeparation),horizontalSeparation:Pg(n.horizontalSeparation,i.horizontalSeparation),arcRadius:Pg(n.arcRadius,i.arcRadius),fontSize:Pg(n.fontSize,i.fontSize),fontFamily:gRe(n.fontFamily,i.fontFamily),terminalFill:Ei(n.terminalFill,i.terminalFill),terminalStroke:Ei(n.terminalStroke,i.terminalStroke),terminalTextColor:Ei(n.terminalTextColor,i.terminalTextColor),nonTerminalFill:Ei(n.nonTerminalFill,i.nonTerminalFill),nonTerminalStroke:Ei(n.nonTerminalStroke,i.nonTerminalStroke),nonTerminalTextColor:Ei(n.nonTerminalTextColor,i.nonTerminalTextColor),lineColor:Ei(n.lineColor,i.lineColor),strokeWidth:Pg(n.strokeWidth,i.strokeWidth),markerFill:Ei(n.markerFill,i.markerFill),commentFill:Ei(n.commentFill,i.commentFill),commentStroke:Ei(n.commentStroke,i.commentStroke),commentTextColor:Ei(n.commentTextColor,i.commentTextColor),specialFill:Ei(n.specialFill,i.specialFill),specialStroke:Ei(n.specialStroke,i.specialStroke),ruleNameColor:Ei(n.ruleNameColor,i.ruleNameColor),showMarkers:n.showMarkers??i.showMarkers,markerRadius:Pg(n.markerRadius,i.markerRadius)}},"buildRailroadStyleOptions"),hp=o(e=>{let{fontFamily:t,fontSize:r,terminalFill:i,terminalStroke:n,terminalTextColor:a,nonTerminalFill:s,nonTerminalStroke:l,nonTerminalTextColor:h,lineColor:u,strokeWidth:d,markerFill:p,commentFill:f,commentStroke:g,commentTextColor:m,specialFill:y,specialStroke:b,ruleNameColor:v}=EK(e);return` + .railroad-diagram { + font-family: ${t}; + font-size: ${r}px; + } + + .railroad-terminal rect { + fill: ${i}; + stroke: ${n}; + 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: ${s}; + stroke: ${l}; + stroke-width: ${d}px; + } + + .railroad-nonterminal text { + fill: ${h}; + font-family: ${t}; + font-size: ${r}px; + text-anchor: middle; + dominant-baseline: middle; + } + + .railroad-line { + stroke: ${u}; + stroke-width: ${d}px; + fill: none; + } + + .railroad-start circle, + .railroad-end circle { + fill: ${p}; + } + + .railroad-comment ellipse { + fill: ${f}; + stroke: ${g}; + stroke-width: ${d}px; + } + + .railroad-comment text { + fill: ${m}; + font-style: italic; + font-family: ${t}; + font-size: ${r}px; + text-anchor: middle; + dominant-baseline: middle; + } + + .railroad-special rect { + fill: ${y}; + stroke: ${b}; + stroke-width: ${d}px; + stroke-dasharray: 5,3; + } + + .railroad-special text { + fill: ${h}; + font-family: ${t}; + font-size: ${r}px; + text-anchor: middle; + dominant-baseline: middle; + } + + .railroad-rule-name { + font-weight: bold; + fill: ${v}; + font-family: ${t}; + font-size: ${r}px; + } + + .railroad-group { + /* Grouping container, no specific styles */ + } +`},"getStyles"),ol=class{constructor(){this.d=""}static{o(this,"PathBuilder")}moveTo(e,t){return this.d+=`M ${e} ${t} `,this}lineTo(e,t){return this.d+=`L ${e} ${t} `,this}horizontalTo(e){return this.d+=`H ${e} `,this}verticalTo(e){return this.d+=`V ${e} `,this}arcTo(e,t,r,i,n,a,s){return this.d+=`A ${e} ${t} ${r} ${i?1:0} ${n?1:0} ${a} ${s} `,this}build(){return this.d.trim()}},rbt=class{constructor(e,t=EK()){this.textCache=new Map,this.svg=e,this.config=t}static{o(this,"RailroadRenderer")}measureText(e){if(this.textCache.has(e))return this.textCache.get(e);let t=this.svg.append("text").attr("font-family",this.config.fontFamily).attr("font-size",this.config.fontSize).text(e),r=t.node().getBBox(),i={width:r.width,height:r.height};return t.remove(),this.textCache.set(e,i),i}renderTerminal(e,t){let r=this.measureText(t),i=r.width+this.config.padding*2,n=r.height+this.config.padding*2,a=e.append("g").attr("class","railroad-terminal");return a.append("rect").attr("x",0).attr("y",0).attr("width",i).attr("height",n).attr("rx",10).attr("ry",10),a.append("text").attr("x",i/2).attr("y",n/2).text(t),{element:a.node(),dimensions:{width:i,height:n,up:n/2,down:n/2}}}renderNonTerminal(e,t){let r=this.measureText(t),i=r.width+this.config.padding*2,n=r.height+this.config.padding*2,a=e.append("g").attr("class","railroad-nonterminal");return a.append("rect").attr("x",0).attr("y",0).attr("width",i).attr("height",n),a.append("text").attr("x",i/2).attr("y",n/2).text(t),{element:a.node(),dimensions:{width:i,height:n,up:n/2,down:n/2}}}renderSequence(e,t){let r=t.map(h=>this.renderExpression(e,h)),i=0,n=0,a=0;for(let h of r)i+=h.dimensions.width,n=Math.max(n,h.dimensions.up),a=Math.max(a,h.dimensions.down);i+=(r.length-1)*this.config.horizontalSeparation;let s=e.append("g").attr("class","railroad-sequence"),l=0;for(let h=0;hthis.renderExpression(e,p)),i=0,n=0;for(let p of r)i=Math.max(i,p.dimensions.width),n+=p.dimensions.height;n+=(r.length-1)*this.config.verticalSeparation;let a=this.config.arcRadius,s=a*4,l=i+s,h=e.append("g").attr("class","railroad-choice"),u=0,d=n/2;for(let p of r){let f=u,g=f+p.dimensions.up,m=a*2+(i-p.dimensions.width)/2;h.node().appendChild(p.element).setAttribute("transform",`translate(${m}, ${f})`);let y=new ol,b=g>d;g===d?y.moveTo(0,d).lineTo(m,g):y.moveTo(0,d).arcTo(a,a,0,!1,b,a,d+(b?a:-a)).lineTo(a,g-(b?a:-a)).arcTo(a,a,0,!1,!b,a*2,g).lineTo(m,g),h.append("path").attr("class","railroad-line").attr("d",y.build());let v=new ol,T=m+p.dimensions.width,x=l-a*2;g===d?v.moveTo(T,g).lineTo(l,d):v.moveTo(T,g).lineTo(x,g).arcTo(a,a,0,!1,!b,l-a,g+(b?-a:a)).lineTo(l-a,d+(b?a:-a)).arcTo(a,a,0,!1,b,l,d),h.append("path").attr("class","railroad-line").attr("d",v.build()),u+=p.dimensions.height+this.config.verticalSeparation}return{element:h.node(),dimensions:{width:l,height:n,up:d,down:n-d}}}renderOptional(e,t){let r=this.renderExpression(e,t),i=this.config.arcRadius,n=i*2,a=r.dimensions.width+i*4,s=r.dimensions.height+n,l=e.append("g").attr("class","railroad-optional"),h=i*2,u=n;l.node().appendChild(r.element).setAttribute("transform",`translate(${h}, ${u})`);let d=u+r.dimensions.up,p=new ol().moveTo(0,d).lineTo(i*2,d);l.append("path").attr("class","railroad-line").attr("d",p.build());let f=new ol().moveTo(h+r.dimensions.width,d).lineTo(a,d);l.append("path").attr("class","railroad-line").attr("d",f.build());let g=new ol().moveTo(0,d).arcTo(i,i,0,!1,!1,i,d-i).lineTo(i,i).arcTo(i,i,0,!1,!0,i*2,0).lineTo(a-i*2,0).arcTo(i,i,0,!1,!0,a-i,i).lineTo(a-i,d-i).arcTo(i,i,0,!1,!1,a,d);return l.append("path").attr("class","railroad-line").attr("d",g.build()),{element:l.node(),dimensions:{width:a,height:s,up:d,down:s-d}}}renderRepetition(e,t,r){let i=this.renderExpression(e,t),n=this.config.arcRadius,a=n*2,s=i.dimensions.width+n*4,l=r===0,h=i.dimensions.height+a+(l?a:0),u=e.append("g").attr("class","railroad-repetition"),d=n*2,p=l?a:0;u.node().appendChild(i.element).setAttribute("transform",`translate(${d}, ${p})`);let f=p+i.dimensions.up;u.append("path").attr("class","railroad-line").attr("d",new ol().moveTo(0,f).lineTo(n*2,f).build()),u.append("path").attr("class","railroad-line").attr("d",new ol().moveTo(d+i.dimensions.width,f).lineTo(s,f).build());let g=p+i.dimensions.height+n,m=new ol().moveTo(d+i.dimensions.width,f).arcTo(n,n,0,!1,!0,d+i.dimensions.width+n,f+n).lineTo(d+i.dimensions.width+n,g).arcTo(n,n,0,!1,!0,d+i.dimensions.width,g+n).lineTo(n*2,g+n).arcTo(n,n,0,!1,!0,n,g).lineTo(n,f+n).arcTo(n,n,0,!1,!0,n*2,f);if(u.append("path").attr("class","railroad-line").attr("d",m.build()),l){let y=new ol().moveTo(0,f).arcTo(n,n,0,!1,!1,n,f-n).lineTo(n,n).arcTo(n,n,0,!1,!0,n*2,0).lineTo(s-n*2,0).arcTo(n,n,0,!1,!0,s-n,n).lineTo(s-n,f-n).arcTo(n,n,0,!1,!1,s,f);u.append("path").attr("class","railroad-line").attr("d",y.build())}return{element:u.node(),dimensions:{width:s,height:h,up:f,down:h-f}}}renderSpecial(e,t){let r=this.measureText("? "+t+" ?"),i=r.width+this.config.padding*2,n=r.height+this.config.padding*2,a=e.append("g").attr("class","railroad-special");return a.append("rect").attr("x",0).attr("y",0).attr("width",i).attr("height",n),a.append("text").attr("x",i/2).attr("y",n/2).text("? "+t+" ?"),{element:a.node(),dimensions:{width:i,height:n,up:n/2,down:n/2}}}renderExpression(e,t){switch(t.type){case"terminal":return this.renderTerminal(e,t.value);case"nonterminal":return this.renderNonTerminal(e,t.name);case"sequence":return this.renderSequence(e,t.elements);case"choice":return this.renderChoice(e,t.alternatives);case"optional":return this.renderOptional(e,t.element);case"repetition":return this.renderRepetition(e,t.element,t.min);case"special":return this.renderSpecial(e,t.text);default:throw new Error(`Unknown node type: ${t.type}`)}}renderRule(e,t){let r=this.svg.append("g").attr("class","railroad-rule").attr("transform",`translate(0, ${t})`),i=e.name+" =",n=this.measureText(i).width+20,a=n+20,s=r.append("g"),l=this.renderExpression(s,e.definition),h=Math.max(20,l.dimensions.up),u=h-l.dimensions.up;return s.attr("transform",`translate(${a}, ${u})`),r.append("g").attr("class","railroad-rule-name-group").append("text").attr("class","railroad-rule-name").attr("x",0).attr("y",h).text(i),r.append("g").attr("class","railroad-start").append("circle").attr("cx",n).attr("cy",h).attr("r",this.config.markerRadius),r.append("g").attr("class","railroad-end").append("circle").attr("cx",a+l.dimensions.width+10).attr("cy",h).attr("r",this.config.markerRadius),r.append("path").attr("class","railroad-line").attr("d",new ol().moveTo(n+this.config.markerRadius,h).lineTo(a,h).build()),r.append("path").attr("class","railroad-line").attr("d",new ol().moveTo(a+l.dimensions.width,h).lineTo(a+l.dimensions.width+10-this.config.markerRadius,h).build()),{height:Math.max(40,u+l.dimensions.height+this.config.padding*2),width:a+l.dimensions.width+10+this.config.markerRadius}}renderDiagram(e){let t=this.config.padding,r=0;for(let i of e){let n=this.renderRule(i,t);t+=n.height+this.config.verticalSeparation,r=Math.max(r,n.width)}return{width:r+this.config.padding*2,height:t+this.config.padding}}},uRe=o((e,t,r)=>{Ir(e,t.height,t.width,r),e.attr("viewBox",`0 0 ${t.width} ${t.height}`)},"configureRailroadSvgSize"),ibt=o((e,t,r)=>{ee.debug(`[Railroad] Rendering diagram +`+e);try{let i=oi(t);i.attr("class","railroad-diagram");let n=Rt().railroad?.useMaxWidth??!0,a=ki.getRules();if(ee.debug(`[Railroad] Rendering ${a.length} rules`),a.length===0){ee.warn("[Railroad] No rules to render"),uRe(i,{height:100,width:200},n);return}let s=new rbt(i,EK()).renderDiagram(a);uRe(i,s,n),ee.debug("[Railroad] Render complete")}catch(i){throw ee.error("[Railroad] Render error:",i),i}},"draw"),up={draw:ibt}});var yRe={};Kt(yRe,{default:()=>lbt,diagram:()=>mRe});var nbt,dy,abt,sbt,obt,mRe,lbt,vRe=Tt(()=>{FT();bs();es();Ma();Sa();_a();Aa();Ra();La();$a();Ia();Da();xa();Ta();ka();Ca();wa();Ea();Rr();yn();tr();Zt();vt();nbt=j1().Railroad.parser.LangiumParser,dy=o(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(dy);return t.length===1?t[0]:{type:"sequence",elements:t}}case"RailroadChoiceExpr":{let t=e.alternatives.map(dy);return t.length===1?t[0]:{type:"choice",alternatives:t}}case"RailroadOptionalExpr":return{type:"optional",element:dy(e.element)};case"RailroadOneOrMoreExpr":return{type:"repetition",element:dy(e.element),min:1,max:1/0};case"RailroadZeroOrMoreExpr":return{type:"repetition",element:dy(e.element),min:0,max:1/0};default:throw new Error(`Unsupported railroad expression: ${e.$type}`)}},"transformExpression"),abt=o(e=>({name:e.name,definition:dy(e.definition)}),"transformRule"),sbt=o(e=>{xi(e,ki),e.title&&ki.setTitle(e.title),e.rules.map(t=>ki.addRule(abt(t)))},"populateDb"),obt={parse:o(e=>{ki.clear(),ee.debug("[Railroad Parser] Starting Langium parse");let t=nbt.parse(e);if(t.lexerErrors.length>0||t.parserErrors.length>0)throw new nu(t);let r=t.value;ee.debug("[Railroad Parser] Parsed rules:",r.rules.length),sbt(r),ee.debug("[Railroad Parser] Parse complete")},"parse"),parser:{yy:ki}},mRe={parser:obt,db:ki,renderer:up,styles:hp},lbt=mRe});var xRe={};Kt(xRe,{diagram:()=>mbt});var cbt,vA,hbt,bRe,ubt,dbt,pbt,fbt,gbt,mbt,TRe=Tt(()=>{FT();bs();es();Ma();Sa();_a();Aa();Ra();La();$a();Ia();Da();xa();Ta();ka();Ca();wa();Ea();Rr();yn();tr();Zt();vt();cbt=G1().RailroadEbnf.parser.LangiumParser,vA=o(e=>{let t=e.alternatives.map(hbt);return t.length===1?t[0]:{type:"choice",alternatives:t}},"transformChoice"),hbt=o(e=>{let t=e.elements.map(dbt);return t.length===1?t[0]:{type:"sequence",elements:t}},"transformSequence"),bRe=o(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 vA(e.element);case"EbnfOptional":return{type:"optional",element:vA(e.element)};case"EbnfRepetition":return{type:"repetition",element:vA(e.element),min:0,max:1/0};default:throw new Error(`Unsupported EBNF primary node: ${e.$type}`)}},"transformPrimary"),ubt=o((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:"-"},bRe(t.except)]};default:throw new Error(`Unsupported EBNF postfix node: ${t.$type}`)}},"transformPostfix"),dbt=o(e=>e.postfixes.reduce((t,r)=>ubt(t,r),bRe(e.base)),"transformTerm"),pbt=o(e=>({name:e.name,definition:vA(e.definition)}),"transformRule"),fbt=o(e=>{xi(e,ki),e.title&&ki.setTitle(e.title),e.rules.map(t=>ki.addRule(pbt(t)))},"populateDb"),gbt={parse:o(e=>{ki.clear(),ee.debug("[EBNF Parser] Starting Langium parse");let t=cbt.parse(e);if(t.lexerErrors.length>0||t.parserErrors.length>0)throw new nu(t);let r=t.value;ee.debug("[EBNF Parser] Parsed rules:",r.rules.length),fbt(r),ee.debug("[EBNF Parser] Parse complete")},"parse"),parser:{yy:ki}},mbt={parser:gbt,db:ki,renderer:up,styles:hp}});var kRe={};Kt(kRe,{diagram:()=>Ebt});var ybt,SK,vbt,bbt,xbt,Tbt,kbt,Cbt,wbt,Ebt,CRe=Tt(()=>{FT();bs();es();Ma();Sa();_a();Aa();Ra();La();$a();Ia();Da();xa();Ta();ka();Ca();wa();Ea();Rr();yn();tr();Zt();vt();ybt=W1().RailroadAbnf.parser.LangiumParser,SK=o(e=>{let t=e.alternatives.map(vbt);return t.length===1?t[0]:{type:"choice",alternatives:t}},"transformAlternation"),vbt=o(e=>{let t=e.elements.map(xbt);return t.length===1?t[0]:{type:"sequence",elements:t}},"transformConcatenation"),bbt=o(e=>{if(e.includes("*")){let[r,i]=e.split("*"),n=r?parseInt(r,10):0,a=i?parseInt(i,10):1/0;return{min:n,max:a}}let t=parseInt(e,10);return{min:t,max:t}},"parseRepeat"),xbt=o(e=>{let t=Tbt(e.primary);if(!e.repeat)return t;let{min:r,max:i}=bbt(e.repeat);return r===0&&i===1?{type:"optional",element:t}:{type:"repetition",element:t,min:r,max:i}},"transformElement"),Tbt=o(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 SK(e.element);case"AbnfOptionalGroup":return{type:"optional",element:SK(e.element)};default:throw new Error(`Unsupported ABNF primary node: ${e.$type}`)}},"transformPrimary"),kbt=o(e=>({name:e.name,definition:SK(e.definition)}),"transformRule"),Cbt=o(e=>{xi(e,ki),e.title&&ki.setTitle(e.title),e.rules.map(t=>ki.addRule(kbt(t)))},"populateDb"),wbt={parse:o(e=>{ki.clear(),ee.debug("[ABNF Parser] Starting Langium parse");let t=ybt.parse(e);if(t.lexerErrors.length>0||t.parserErrors.length>0)throw new nu(t);let r=t.value;ee.debug("[ABNF Parser] Parsed rules:",r.rules.length),Cbt(r),ee.debug("[ABNF Parser] Parse complete")},"parse"),parser:{yy:ki}},Ebt={parser:wbt,db:ki,renderer:up,styles:hp}});var SRe={};Kt(SRe,{diagram:()=>Mbt});var Sbt,ERe,_bt,Abt,wRe,Rbt,Lbt,$bt,Ibt,Dbt,Mbt,_Re=Tt(()=>{FT();bs();es();Ma();Sa();_a();Aa();Ra();La();$a();Ia();Da();xa();Ta();ka();Ca();wa();Ea();Rr();yn();tr();Zt();vt();Sbt=U1().RailroadPeg.parser.LangiumParser,ERe=o(e=>{let t=e.alternatives.map(_bt);return t.length===1?t[0]:{type:"choice",alternatives:t}},"transformOrderedChoice"),_bt=o(e=>{let t=e.elements.map(Abt);return t.length===1?t[0]:{type:"sequence",elements:t}},"transformSequence"),Abt=o(e=>{let t=Rbt(e.suffix);return e.operator?{type:"special",text:e.operator==="&"?`&${wRe(t)}`:`!${wRe(t)}`}:t},"transformPrefix"),wRe=o(e=>{switch(e.type){case"terminal":return`"${e.value}"`;case"nonterminal":return e.name;case"special":return e.text;default:return"(...)"}},"nodeToLabel"),Rbt=o(e=>{let t=Lbt(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"),Lbt=o(e=>{switch(e.$type){case"PegLiteral":return{type:"terminal",value:e.value};case"PegIdentifier":return{type:"nonterminal",name:e.name};case"PegGroup":return ERe(e.element);case"PegAny":return{type:"special",text:e.dot};default:throw new Error(`Unsupported PEG primary node: ${e.$type}`)}},"transformPrimary"),$bt=o(e=>({name:e.name,definition:ERe(e.definition)}),"transformRule"),Ibt=o(e=>{xi(e,ki),e.title&&ki.setTitle(e.title),e.rules.map(t=>ki.addRule($bt(t)))},"populateDb"),Dbt={parse:o(e=>{ki.clear(),ee.debug("[PEG Parser] Starting Langium parse");let t=Sbt.parse(e);if(t.lexerErrors.length>0||t.parserErrors.length>0)throw new nu(t);let r=t.value;ee.debug("[PEG Parser] Parsed rules:",r.rules.length),Ibt(r),ee.debug("[PEG Parser] Parse complete")},"parse"),parser:{yy:ki}},Mbt={parser:Dbt,db:ki,renderer:up,styles:hp}});var skt={};Kt(skt,{default:()=>akt});yn();Ip();js();Bs();ha();Zn();sa();ds();la();Fn();An();Or();Yr();tr();Zt();vt();var Nbt=o(e=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(e),"detector"),Obt=o(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(l4e(),o4e));return{id:"c4",diagram:e}},"loader"),Bbt={id:"c4",detector:Nbt,loader:Obt},Pbt=Bbt,IRe="flowchart",Fbt=o((e,t)=>t?.flowchart?.defaultRenderer==="dagre-wrapper"||t?.flowchart?.defaultRenderer==="elk"?!1:/^\s*graph/.test(e),"detector"),zbt=o(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(t5(),e5));return{id:IRe,diagram:e}},"loader"),qbt={id:IRe,detector:Fbt,loader:zbt},jbt=qbt,DRe="flowchart-v2",Gbt=o((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"),Wbt=o(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(t5(),e5));return{id:DRe,diagram:e}},"loader"),Ubt={id:DRe,detector:Gbt,loader:Wbt},Vbt=Ubt,MRe="swimlane",Ybt=o(e=>/^\s*swimlane-beta\b/.test(e),"detector"),Hbt=o(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(p4e(),d4e));return{id:MRe,diagram:e}},"loader"),Xbt={id:MRe,detector:Ybt,loader:Hbt},Kbt=Xbt,Zbt=o(e=>/^\s*erDiagram/.test(e),"detector"),Qbt=o(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(y4e(),m4e));return{id:"er",diagram:e}},"loader"),Jbt={id:"er",detector:Zbt,loader:Qbt},ext=Jbt,NRe="gitGraph",txt=o(e=>/^\s*gitGraph/.test(e),"detector"),rxt=o(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(zEe(),FEe));return{id:NRe,diagram:e}},"loader"),ixt={id:NRe,detector:txt,loader:rxt},nxt=ixt,ORe="gantt",axt=o(e=>/^\s*gantt/.test(e),"detector"),sxt=o(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(eSe(),JEe));return{id:ORe,diagram:e}},"loader"),oxt={id:ORe,detector:axt,loader:sxt},lxt=oxt,BRe="info",cxt=o(e=>/^\s*info/.test(e),"detector"),hxt=o(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(rSe(),tSe));return{id:BRe,diagram:e}},"loader"),uxt={id:BRe,detector:cxt,loader:hxt},dxt=o(e=>/^\s*pie/.test(e),"detector"),pxt=o(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(sSe(),aSe));return{id:"pie",diagram:e}},"loader"),fxt={id:"pie",detector:dxt,loader:pxt},PRe="quadrantChart",gxt=o(e=>/^\s*quadrantChart/.test(e),"detector"),mxt=o(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(CSe(),kSe));return{id:PRe,diagram:e}},"loader"),yxt={id:PRe,detector:gxt,loader:mxt},vxt=yxt,FRe="xychart",bxt=o(e=>/^\s*xychart(-beta)?/.test(e),"detector"),xxt=o(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(GSe(),jSe));return{id:FRe,diagram:e}},"loader"),Txt={id:FRe,detector:bxt,loader:xxt},kxt=Txt,zRe="requirement",Cxt=o(e=>/^\s*requirement(Diagram)?/.test(e),"detector"),wxt=o(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(VSe(),USe));return{id:zRe,diagram:e}},"loader"),Ext={id:zRe,detector:Cxt,loader:wxt},Sxt=Ext,qRe="sequence",_xt=o(e=>/^\s*sequenceDiagram/.test(e),"detector"),Axt=o(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(l6e(),o6e));return{id:qRe,diagram:e}},"loader"),Rxt={id:qRe,detector:_xt,loader:Axt},Lxt=Rxt,jRe="class",$xt=o((e,t)=>t?.class?.defaultRenderer==="dagre-wrapper"?!1:/^\s*classDiagram/.test(e),"detector"),Ixt=o(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(p6e(),d6e));return{id:jRe,diagram:e}},"loader"),Dxt={id:jRe,detector:$xt,loader:Ixt},Mxt=Dxt,GRe="classDiagram",Nxt=o((e,t)=>/^\s*classDiagram/.test(e)&&t?.class?.defaultRenderer==="dagre-wrapper"?!0:/^\s*classDiagram-v2/.test(e),"detector"),Oxt=o(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(g6e(),f6e));return{id:GRe,diagram:e}},"loader"),Bxt={id:GRe,detector:Nxt,loader:Oxt},Pxt=Bxt,WRe="state",Fxt=o((e,t)=>t?.state?.defaultRenderer==="dagre-wrapper"?!1:/^\s*stateDiagram/.test(e),"detector"),zxt=o(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(P6e(),B6e));return{id:WRe,diagram:e}},"loader"),qxt={id:WRe,detector:Fxt,loader:zxt},jxt=qxt,URe="stateDiagram",Gxt=o((e,t)=>!!(/^\s*stateDiagram-v2/.test(e)||/^\s*stateDiagram/.test(e)&&t?.state?.defaultRenderer==="dagre-wrapper"),"detector"),Wxt=o(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(z6e(),F6e));return{id:URe,diagram:e}},"loader"),Uxt={id:URe,detector:Gxt,loader:Wxt},Vxt=Uxt,VRe="journey",Yxt=o(e=>/^\s*journey/.test(e),"detector"),Hxt=o(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(K6e(),X6e));return{id:VRe,diagram:e}},"loader"),Xxt={id:VRe,detector:Yxt,loader:Hxt},Kxt=Xxt,Zxt=o((e,t,r)=>{ee.debug(`rendering svg for syntax error +`);let i=oi(t),n=i.append("g");i.attr("viewBox","0 0 2412 512"),Ir(i,100,512,!0),n.append("path").attr("class","error-icon").attr("d","m411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z"),n.append("path").attr("class","error-icon").attr("d","m459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z"),n.append("path").attr("class","error-icon").attr("d","m340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z"),n.append("path").attr("class","error-icon").attr("d","m400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.164-16,16v32c0,8.836 7.156,16 16,16z"),n.append("path").attr("class","error-icon").attr("d","m496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z"),n.append("path").attr("class","error-icon").attr("d","m436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z"),n.append("text").attr("class","error-text").attr("x",1440).attr("y",250).attr("font-size","150px").style("text-anchor","middle").text("Syntax error in text"),n.append("text").attr("class","error-text").attr("x",1250).attr("y",400).attr("font-size","100px").style("text-anchor","middle").text(`mermaid version ${r}`)},"draw"),YRe={draw:Zxt},Qxt=YRe,Jxt={db:{},renderer:YRe,parser:{parse:o(()=>{},"parse")}},eTt=Jxt,HRe="flowchart-elk",tTt=o((e,t={})=>/^\s*flowchart-elk/.test(e)||/^\s*(flowchart|graph)/.test(e)&&t?.flowchart?.defaultRenderer==="elk"?(t.layout="elk",!0):!1,"detector"),rTt=o(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(t5(),e5));return{id:HRe,diagram:e}},"loader"),iTt={id:HRe,detector:tTt,loader:rTt},nTt=iTt,XRe="timeline",aTt=o(e=>/^\s*timeline/.test(e),"detector"),sTt=o(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(T_e(),x_e));return{id:XRe,diagram:e}},"loader"),oTt={id:XRe,detector:aTt,loader:sTt},lTt=oTt,KRe="mindmap",cTt=o(e=>/^\s*mindmap/.test(e),"detector"),hTt=o(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(__e(),S_e));return{id:KRe,diagram:e}},"loader"),uTt={id:KRe,detector:cTt,loader:hTt},dTt=uTt,ZRe="kanban",pTt=o(e=>/^\s*kanban/.test(e),"detector"),fTt=o(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(L_e(),R_e));return{id:ZRe,diagram:e}},"loader"),gTt={id:ZRe,detector:pTt,loader:fTt},mTt=gTt,QRe="sankey",yTt=o(e=>/^\s*sankey(-beta)?/.test(e),"detector"),vTt=o(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(Z_e(),K_e));return{id:QRe,diagram:e}},"loader"),bTt={id:QRe,detector:yTt,loader:vTt},xTt=bTt,JRe="packet",TTt=o(e=>/^\s*packet(-beta)?/.test(e),"detector"),kTt=o(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(tAe(),eAe));return{id:JRe,diagram:e}},"loader"),CTt={id:JRe,detector:TTt,loader:kTt},eLe="radar",wTt=o(e=>/^\s*radar-beta/.test(e),"detector"),ETt=o(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(cAe(),lAe));return{id:eLe,diagram:e}},"loader"),STt={id:eLe,detector:wTt,loader:ETt},tLe="block",_Tt=o(e=>/^\s*block(-beta)?/.test(e),"detector"),ATt=o(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(qAe(),zAe));return{id:tLe,diagram:e}},"loader"),RTt={id:tLe,detector:_Tt,loader:ATt},LTt=RTt,rLe="treeView",$Tt=o(e=>/^\s*treeView-beta/.test(e),"detector"),ITt=o(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(t7e(),e7e));return{id:rLe,diagram:e}},"loader"),DTt={id:rLe,detector:$Tt,loader:ITt},MTt=DTt,iLe="architecture",NTt=o(e=>/^\s*architecture/.test(e),"detector"),OTt=o(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(b7e(),v7e));return{id:iLe,diagram:e}},"loader"),BTt={id:iLe,detector:NTt,loader:OTt},PTt=BTt,nLe="eventmodeling",FTt=o(e=>/^\s*eventmodeling/.test(e),"detector"),zTt=o(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(H7e(),Y7e));return{id:nLe,diagram:e}},"loader"),qTt={id:nLe,detector:FTt,loader:zTt},jTt=qTt,aLe="ishikawa",GTt=o(e=>/^\s*ishikawa(-beta)?\b/i.test(e),"detector"),WTt=o(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(i8e(),r8e));return{id:aLe,diagram:e}},"loader"),UTt={id:aLe,detector:GTt,loader:WTt},sLe="venn",VTt=o(e=>/^\s*venn-beta/.test(e),"detector"),YTt=o(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(A8e(),_8e));return{id:sLe,diagram:e}},"loader"),HTt={id:sLe,detector:VTt,loader:YTt},XTt=HTt,oLe="treemap",KTt=o(e=>/^\s*treemap/.test(e),"detector"),ZTt=o(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(D8e(),I8e));return{id:oLe,diagram:e}},"loader"),QTt={id:oLe,detector:KTt,loader:ZTt},lLe="wardley",JTt=o(e=>/^\s*wardley-beta/i.test(e),"detector"),e4t=o(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(eRe(),J8e));return{id:lLe,diagram:e}},"loader"),t4t={id:lLe,detector:JTt,loader:e4t},r4t=t4t,cLe="cynefin",i4t=o(e=>/^\s*cynefin-beta(?:[\s:]|$)/.test(e),"detector"),n4t=o(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(hRe(),cRe));return{id:cLe,diagram:e}},"loader"),a4t={id:cLe,detector:i4t,loader:n4t},hLe="railroad",s4t=o(e=>/^\s*railroad-beta/i.test(e),"detector"),o4t=o(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(vRe(),yRe));return{id:hLe,diagram:e}},"loader"),l4t={id:hLe,detector:s4t,loader:o4t},uLe="railroadEbnf",c4t=o(e=>/^\s*railroad-ebnf-beta/i.test(e),"detector"),h4t=o(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(TRe(),xRe));return{id:uLe,diagram:e}},"loader"),u4t={id:uLe,detector:c4t,loader:h4t},dLe="railroadAbnf",d4t=o(e=>/^\s*railroad-abnf-beta/i.test(e),"detector"),p4t=o(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(CRe(),kRe));return{id:dLe,diagram:e}},"loader"),f4t={id:dLe,detector:d4t,loader:p4t},pLe="railroadPeg",g4t=o(e=>/^\s*railroad-peg-beta/i.test(e),"detector"),m4t=o(async()=>{let{diagram:e}=await Promise.resolve().then(()=>(_Re(),SRe));return{id:pLe,diagram:e}},"loader"),y4t={id:pLe,detector:g4t,loader:m4t},ARe=!1,CA=o(()=>{ARe||(ARe=!0,L2("error",eTt,e=>e.toLowerCase().trim()==="error"),L2("---",{db:{clear:o(()=>{},"clear")},styles:{},renderer:{draw:o(()=>{},"draw")},parser:{parse:o(()=>{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:o(()=>null,"init")},e=>e.toLowerCase().trimStart().startsWith("---")),Ik(nTt,dTt,PTt),Ik(Pbt,mTt,Pxt,Mxt,ext,lxt,uxt,fxt,Sxt,Lxt,Kbt,Vbt,jbt,lTt,nxt,Vxt,jxt,Kxt,vxt,xTt,CTt,kxt,LTt,jTt,MTt,STt,UTt,QTt,l4t,u4t,f4t,y4t,XTt,r4t,a4t))},"addDiagrams"),v4t=o(async()=>{ee.debug("Loading registered diagrams");let e=(await Promise.allSettled(Object.entries(Pu).map(async([t,{detector:r,loader:i}])=>{if(i)try{Bk(t)}catch{try{let{diagram:n,id:a}=await i();L2(a,n,r)}catch(n){throw ee.error(`Failed to load external diagram with key ${t}. Removing from detectors.`),delete Pu[t],n}}}))).filter(t=>t.status==="rejected");if(e.length>0){ee.error(`Failed to load ${e.length} external diagrams`);for(let t of e)ee.error(t);throw new Error(`Failed to load ${e.length} external diagrams`)}},"loadRegisteredDiagrams"),DK="comm",fLe="rule",gLe="decl",b4t="@media",x4t="@import",T4t="@supports",k4t="@namespace",AK="@keyframes",mLe="@layer",C4t="@scope",yLe=Math.abs,MK=String.fromCharCode;function NK(e){return e.trim()}o(NK,"trim");function qT(e,t,r){return e.replace(t,r)}o(qT,"replace");function vLe(e,t,r){return e.indexOf(t,r)}o(vLe,"indexof");function Fg(e,t){return e.charCodeAt(t)|0}o(Fg,"charat");function zg(e,t,r){return e.slice(t,r)}o(zg,"substr");function Yl(e){return e.length}o(Yl,"strlen");function OK(e){return e.length}o(OK,"sizeof");function zT(e,t){return t.push(e),e}o(zT,"append");var wA=1,py=1,bLe=0,cl=0,Mn=0,gy="";function EA(e,t,r,i,n,a,s,l){return{value:e,root:t,parent:r,type:i,props:n,children:a,line:wA,column:py,length:s,return:"",siblings:l}}o(EA,"node");function xLe(){return Mn}o(xLe,"char");function TLe(){return Mn=cl>0?Fg(gy,--cl):0,py--,Mn===10&&(py=1,wA--),Mn}o(TLe,"prev");function ll(){return Mn=cl2||fy(Mn)>3?"":" "}o(wLe,"whitespace");function ELe(e,t){for(;--t&&ll()&&!(Mn<48||Mn>102||Mn>57&&Mn<65||Mn>70&&Mn<97););return WT(e,jT()+(t<6&&fu()==32&&ll()==32))}o(ELe,"escaping");function xA(e){for(;ll();)switch(Mn){case e:return cl;case 34:case 39:e!==34&&e!==39&&xA(Mn);break;case 40:e===41&&xA(e);break;case 92:ll();break}return cl}o(xA,"delimiter");function SLe(e,t){for(;ll()&&e+Mn!==57&&!(e+Mn===84&&fu()===47););return"/*"+WT(t,cl-1)+"*"+MK(e===47?e:ll())}o(SLe,"commenter");function _Le(e){for(;!fy(fu());)ll();return WT(e,cl)}o(_Le,"identifier");function ALe(e){return CLe(GT("",null,null,null,[""],e=kLe(e),0,[0],e))}o(ALe,"compile");function GT(e,t,r,i,n,a,s,l,h){for(var u=0,d=0,p=s,f=0,g=0,m=0,y=1,b=1,v=1,T=0,x="",k=n,C=a,E=i,w=x;b;)switch(m=T,T=ll()){case 40:if(m!=108&&Fg(w,p-1)==58){vLe(w+=qT(bA(T),"&","&\f"),"&\f",yLe(u?l[u-1]:0))!=-1&&(v=-1);break}case 34:case 39:case 91:w+=bA(T);break;case 9:case 10:case 13:case 32:w+=wLe(m);break;case 92:w+=ELe(jT()-1,7);continue;case 47:switch(fu()){case 42:case 47:zT(RLe(SLe(ll(),jT()),t,r,h),h),(fy(m||1)==5||fy(fu()||1)==5)&&Yl(w)&&zg(w,-1,void 0)!==" "&&(w+=" ");break;default:w+="/"}break;case 123*y:l[u++]=Yl(w)*v;case 125*y:case 59:case 0:switch(T){case 0:case 125:b=0;case 59+d:v==-1&&(w=qT(w,/\f/g,"")),g>0&&(Yl(w)-p||y===0&&m===47)&&zT(g>32?LK(w+";",i,r,p-1,h):LK(qT(w," ","")+";",i,r,p-2,h),h);break;case 59:w+=";";default:if(zT(E=RK(w,t,r,u,d,n,l,x,k=[],C=[],p,a),a),T===123)if(d===0)GT(w,t,E,E,k,a,p,l,C);else{switch(f){case 99:if(Fg(w,3)===110)break;case 108:if(Fg(w,2)===97)break;default:d=0;case 100:case 109:case 115:}d?GT(e,E,E,i&&zT(RK(e,E,E,0,0,n,l,x,n,k=[],p,C),C),n,C,p,l,i?k:C):GT(w,E,E,E,[""],C,0,l,C)}}u=d=g=0,y=v=1,x=w="",p=s;break;case 58:p=1+Yl(w),g=m;default:if(y<1){if(T==123)--y;else if(T==125&&y++==0&&TLe()==125)continue}switch(w+=MK(T),T*y){case 38:v=d>0?1:(w+="\f",-1);break;case 44:l[u++]=(Yl(w)-1)*v,v=1;break;case 64:fu()===45&&(w+=bA(ll())),f=fu(),d=p=Yl(x=w+=_Le(jT())),T++;break;case 45:m===45&&Yl(w)==2&&(y=0)}}return a}o(GT,"parse");function RK(e,t,r,i,n,a,s,l,h,u,d,p){for(var f=n-1,g=n===0?a:[""],m=OK(g),y=0,b=0,v=0;y0?g[T]+" "+x:qT(x,/&\f/g,g[T])))&&(h[v++]=k);return EA(e,t,r,n===0?fLe:l,h,u,d,p)}o(RK,"ruleset");function RLe(e,t,r,i){return EA(e,t,r,DK,MK(xLe()),zg(e,2,-2),0,i)}o(RLe,"comment");function LK(e,t,r,i,n){return EA(e,t,r,gLe,zg(e,0,i),zg(e,i+1,-1),i,n)}o(LK,"declaration");function TA(e,t){for(var r="",i=0;i{RRe.forEach(e=>{e()}),RRe=[]},"attachFunctions"),S4t=o(e=>e.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments");function NLe(e){let t=e.match(qR);if(!t)return{text:e,metadata:{}};let r=t[1],i=r?t[2].split(` +`).map(s=>s.startsWith(r)?s.slice(r.length):s).join(` +`):t[2],n=ju(i,{schema:qu})??{};n=typeof n=="object"&&!Array.isArray(n)?n:{};let a={};return n.displayMode&&(a.displayMode=n.displayMode.toString()),n.title&&(a.title=n.title.toString()),n.config&&(a.config=n.config),{text:e.slice(t[0].length),metadata:a}}o(NLe,"extractFrontMatter");var _4t=o(e=>e.replace(/\r\n?/g,` +`).replace(/<(\w+)([^>]*)>/g,(t,r,i)=>"<"+r+i.replace(/="([^"]*)"/g,"='$1'")+">"),"cleanupText"),A4t=o(e=>{let{text:t,metadata:r}=NLe(e),{displayMode:i,title:n,config:a={}}=r;return i&&(a.gantt||(a.gantt={}),a.gantt.displayMode=i),{title:n,config:a,text:t}},"processFrontmatter"),R4t=o(e=>{let t=Wt.detectInit(e)??{},r=Wt.detectDirective(e,"wrap");return Array.isArray(r)?t.wrap=r.some(({type:i})=>i==="wrap"):r?.type==="wrap"&&(t.wrap=!0),{text:qoe(e),directive:t}},"processDirectives");function BK(e){let t=_4t(e),r=A4t(t),i=R4t(r.text),n=zr(r.config,i.directive);return e=S4t(i.text),{code:e,title:r.title,config:n}}o(BK,"preprocessDiagram");function OLe(e){let t=new TextEncoder().encode(e),r=Array.from(t,i=>String.fromCodePoint(i)).join("");return btoa(r)}o(OLe,"toBase64");var L4t=5e4,$4t="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa",I4t="sandbox",D4t="loose",M4t="http://www.w3.org/2000/svg",N4t="http://www.w3.org/1999/xlink",O4t="http://www.w3.org/1999/xhtml",B4t="100%",P4t="100%",F4t="border:0;margin:0;",z4t="margin:0",q4t="allow-top-navigation-by-user-activation allow-popups",j4t='The "iframe" tag is not supported by your browser.',G4t=["foreignobject"],W4t=["dominant-baseline"];function PK(e){let t=BK(e);return S2(),nae(t.config??{}),t}o(PK,"processAndSetConfigs");async function BLe(e,t){CA();try{let{code:r,config:i}=PK(e);return{diagramType:(await FLe(r)).type,config:i}}catch(r){if(t?.suppressErrors)return!1;throw r}}o(BLe,"parse");var LRe=o((e,t,r=[])=>{let i=PR(`{ ${r.join(" !important; ")} !important; }`);return`.${e} ${t} ${i}`},"cssImportantStyles"),U4t=o((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 n=Qr(e)?["> *","span"]:["rect","polygon","ellipse","circle","path"];t.forEach(a=>{m3(a.styles)||n.forEach(s=>{r.insertRule(LRe(a.id,s,a.styles),r.cssRules.length)}),m3(a.textStyles)||r.insertRule(LRe(a.id,"tspan",(a?.textStyles||[]).map(s=>s.replace("color","fill"))),r.cssRules.length)})}let i="";if(e.themeCSS!==void 0)if(typeof r.replaceSync=="function"){let n=new CSSStyleSheet;n.replaceSync(e.themeCSS),i=Dk(n)+` +`}else i+=`${e.themeCSS} +`;return i+Dk(r)},"createCssStyles"),V4t=o((e,t)=>TA(ALe(`${e}{${t}}`),$Le([o(function(r,i,n,a){if(r.type==="rule"&&Array.isArray(r.props)){if(r.parent&&r.parent.type===AK)return;r.props=r.props.map(s=>s.startsWith(e)?s:`${e} ${s}`)}else r.type.startsWith("@")&&([b4t,T4t,mLe,C4t,"@container","@starting-style",AK].includes(r.type)||(ee.warn(`Removing unsupported at-rule ${r.type} from CSS`),r.type=DK))},"addNamespace"),LLe])),"compileCSS"),Y4t=o((e,t,r,i)=>{let n=U4t(e,r),a=yae(t,n,{...e.themeVariables,theme:e.theme,look:e.look},i);return V4t(i,a)},"createUserStyles"),H4t=o((e="",t,r)=>{let i=e;return!r&&!t&&(i=i.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,'marker-end="url(#')),i=so(i),i=i.replace(/
    /g,"
    "),i},"cleanUpSvgCode"),X4t=o((e="",t)=>{let r=t?.viewBox?.baseVal?.height?t.viewBox.baseVal.height+"px":P4t,i=OLe(`${e}`);return``},"putIntoIFrame"),$Re=o((e,t,r,i,n)=>{let a=e.append("div");a.attr("id",r),i&&a.attr("style",i);let s=a.append("svg").attr("id",t).attr("width","100%").attr("xmlns",M4t);return n&&s.attr("xmlns:xlink",n),s.append("g"),e},"appendDivSvgG");function IK(e,t){return e.append("iframe").attr("id",t).attr("style","width: 100%; height: 100%;").attr("sandbox","")}o(IK,"sandboxedIframe");var K4t=o((e,t,r,i)=>{e.getElementById(t)?.remove(),e.getElementById(r)?.remove(),e.getElementById(i)?.remove()},"removeExistingElements"),Z4t=o(async function(e,t,r){CA();let i=PK(t);t=i.code;let n=Rt();ee.debug(n),t.length>(n?.maxTextSize??L4t)&&(t=$4t);let a=`#${e}`,s="i"+e,l="#"+s,h="d"+e,u="#"+h,d=o(()=>{let M=tt(f?l:u).node();M&&"remove"in M&&M.remove()},"removeTempElements"),p=tt(document.body),f=n.securityLevel===I4t,g=n.securityLevel===D4t,m=n.fontFamily;if(r!==void 0){if(r&&(r.innerHTML=""),f){let M=IK(tt(r),s);p=tt(M.nodes()[0].contentDocument.body),p.node().style.margin="0"}else p=tt(r);$Re(p,e,h,`font-family: ${m}`,N4t)}else{if(K4t(document,e,h,s),f){let M=IK(tt(document.body),s);p=tt(M.nodes()[0].contentDocument.body),p.node().style.margin="0"}else p=tt("body");$Re(p,e,h)}let y,b;try{y=await $K.fromText(t,{title:i.title})}catch(M){if(n.suppressErrorRendering)throw d(),M;y=await $K.fromText("error"),b=M}let v=p.select(u).node(),T=y.type,x=v.firstChild,k=x.firstChild,C=y.renderer.getClasses?.(t,y),E=Y4t(n,T,C,a),w=document.createElement("style");w.innerHTML=E,x.insertBefore(w,k);try{await y.renderer.draw(t,e,"11.16.0",y)}catch(M){throw n.suppressErrorRendering?d():Qxt.draw(t,e,"11.16.0"),M}let _=p.select(`${u} svg`),L=y.db.getAccTitle?.(),N=y.db.getAccDescription?.();zLe(T,_,L,N),p.select(`[id="${e}"]`).selectAll("foreignobject > *").attr("xmlns",O4t);let D=p.select(u).node().innerHTML;if(ee.debug("config.arrowMarkerAbsolute",n.arrowMarkerAbsolute),D=H4t(D,f,Mo(n.arrowMarkerAbsolute)),f){let M=p.select(u+" svg").node();D=X4t(D,M)}else g||(D=no.sanitize(D,{ADD_TAGS:G4t,ADD_ATTR:W4t,HTML_INTEGRATION_POINTS:{foreignobject:!0}}));if(E4t(),b)throw b;return d(),{diagramType:T,svg:D,bindFunctions:y.db.bindFunctions}},"render");function PLe(e={}){let t=Ni({},e);t?.fontFamily&&!t.themeVariables?.fontFamily&&(t.themeVariables||(t.themeVariables={}),t.themeVariables.fontFamily=t.fontFamily),tae(t),t?.theme&&t.theme in sc?t.themeVariables=sc[t.theme].getThemeVariables(t.themeVariables):t&&(t.themeVariables=sc.default.getThemeVariables(t.themeVariables));let r=typeof t=="object"?eae(t):FR();qy(r.logLevel),CA()}o(PLe,"initialize");var FLe=o((e,t={})=>{let{code:r}=BK(e);return $K.fromText(r,t)},"getDiagramFromText");function zLe(e,t,r,i){ILe(t,e),DLe(t,r,i,t.attr("id"))}o(zLe,"addA11yInfo");var qg=Object.freeze({render:Z4t,parse:BLe,getDiagramFromText:FLe,initialize:PLe,getConfig:Rt,setConfig:zR,getSiteConfig:FR,updateSiteConfig:rae,reset:o(()=>{S2()},"reset"),globalReset:o(()=>{S2(Ep)},"globalReset"),defaultConfig:Ep});qy(Rt().logLevel);S2(Rt());var Q4t=o((e,t,r)=>{ee.warn(e),b3(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"),qLe=o(async function(e={querySelector:".mermaid"}){try{await J4t(e)}catch(t){if(b3(t)&&ee.error(t.str),gu.parseError&&gu.parseError(t),!e.suppressErrors)throw ee.error("Use the suppressErrors option to suppress these errors"),t}},"run"),J4t=o(async function({postRenderCallback:e,querySelector:t,nodes:r}={querySelector:".mermaid"}){let i=qg.getConfig();ee.debug(`${e?"":"No "}Callback function found`);let n;if(r)n=r;else if(t)n=document.querySelectorAll(t);else throw new Error("Nodes and querySelector are both undefined");ee.debug(`Found ${n.length} diagrams`),i?.startOnLoad!==void 0&&(ee.debug("Start On Load: "+i?.startOnLoad),qg.updateSiteConfig({startOnLoad:i?.startOnLoad}));let a=new Wt.InitIDGenerator(i.deterministicIds,i.deterministicIDSeed),s,l=[];for(let h of Array.from(n)){if(ee.info("Rendering diagram: "+h.id),h.getAttribute("data-processed"))continue;h.setAttribute("data-processed","true");let u=`mermaid-${a.next()}`;s=h.innerHTML,s=S3(Wt.entityDecode(s)).trim().replace(//gi,"
    ");let d=Wt.detectInit(s);d&&ee.debug("Detected early reinit: ",d);try{let{svg:p,bindFunctions:f}=await ULe(u,s,h);h.innerHTML=p,e&&await e(u),f&&f(h)}catch(p){Q4t(p,l,gu.parseError)}}if(l.length>0)throw l[0]},"runThrowsErrors"),jLe=o(function(e){qg.initialize(e)},"initialize"),ekt=o(async function(e,t,r){ee.warn("mermaid.init is deprecated. Please use run instead."),e&&jLe(e);let i={postRenderCallback:r,querySelector:".mermaid"};typeof t=="string"?i.querySelector=t:t&&(t instanceof HTMLElement?i.nodes=[t]:i.nodes=t),await qLe(i)},"init"),tkt=o(async(e,{lazyLoad:t=!0}={})=>{CA(),Ik(...e),t===!1&&await v4t()},"registerExternalDiagrams"),GLe=o(function(){if(gu.startOnLoad){let{startOnLoad:e}=qg.getConfig();e&&gu.run().catch(t=>ee.error("Mermaid failed to initialize",t))}},"contentLoaded");typeof document<"u"&&window.addEventListener("load",GLe,!1);var rkt=o(function(e){gu.parseError=e},"setParseErrorHandler"),kA=[],_K=!1,WLe=o(async()=>{if(!_K){for(_K=!0;kA.length>0;){let e=kA.shift();if(e)try{await e()}catch(t){ee.error("Error executing queue",t)}}_K=!1}},"executeQueue"),ikt=o(async(e,t)=>new Promise((r,i)=>{let n=o(()=>new Promise((a,s)=>{qg.parse(e,t).then(l=>{a(l),r(l)},l=>{ee.error("Error parsing",l),gu.parseError?.(l),s(l),i(l)})}),"performCall");kA.push(n),WLe().catch(i)}),"parse"),ULe=o((e,t,r)=>new Promise((i,n)=>{let a=o(()=>new Promise((s,l)=>{qg.render(e,t,r).then(h=>{s(h),i(h)},h=>{ee.error("Error parsing",h),gu.parseError?.(h),l(h),n(h)})}),"performCall");kA.push(a),WLe().catch(n)}),"render"),nkt=o(()=>Object.keys(Pu).map(e=>({id:e})),"getRegisteredDiagramsMetadata"),gu={startOnLoad:!0,mermaidAPI:qg,parse:ikt,render:ULe,init:ekt,run:qLe,registerExternalDiagrams:tkt,registerLayoutLoaders:MN,initialize:jLe,parseError:void 0,contentLoaded:GLe,setParseErrorHandler:rkt,detectType:_2,registerIconPacks:I0,getRegisteredDiagramsMetadata:nkt},akt=gu;return KLe(skt);})(); +/*! Bundled license information: + +mermaid/dist/chunks/mermaid.esm.min/chunk-KEUXMURM.mjs: + (*! 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 *) + *) + +mermaid/dist/chunks/mermaid.esm.min/chunk-7FYTHRHK.mjs: + (*! Bundled license information: + + js-yaml/dist/js-yaml.mjs: + (*! js-yaml 4.1.1 https://github.com/nodeca/js-yaml @license MIT *) + *) + +mermaid/dist/chunks/mermaid.esm.min/chunk-W44A43WB.mjs: + (*! Bundled license information: + + 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 + *) + *) + +mermaid/dist/chunks/mermaid.esm.min/chunk-LAHSG3N2.mjs: + (*! Bundled license information: + + 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 *) + *) + +mermaid/dist/chunks/mermaid.esm.min/chunk-L5GCOVLC.mjs: + (*! Bundled license information: + + lodash-es/lodash.js: + (** + * @license + * Lodash (Custom Build) + * Build: `lodash modularize exports="es" -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 + *) + *) + +mermaid/dist/mermaid.esm.min.mjs: + (*! Check if previously processed *) + (*! + * Wait for document loaded before starting the execution + *) +*/ +globalThis.mermaid = mermaidBundle.default; diff --git a/integrations/code/media/preview.html b/integrations/code/media/preview.html index 067b533..c3957c7 100644 --- a/integrations/code/media/preview.html +++ b/integrations/code/media/preview.html @@ -42,8 +42,21 @@ vertical-align: super; } + .md-typeset .mermaid { + display: flex; + justify-content: center; + max-width: 100%; + overflow-x: auto; + } + + .md-typeset .mermaid svg { + max-width: 100%; + height: auto; + } + + =18" } }, + "node_modules/@iconify/types": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@iconify/types/-/types-2.0.0.tgz", + "integrity": "sha512-+wluvCrRhXrhyOmRDJ3q8mux9JkKy5SJ/v8ol2tu4FVjyYvtEzkc/3pK15ET6RKg4b4w4BmTk1+gsCUhf21Ykg==", + "dev": true, + "license": "MIT" + }, + "node_modules/@iconify/utils": { + "version": "3.1.4", + "resolved": "https://registry.npmjs.org/@iconify/utils/-/utils-3.1.4.tgz", + "integrity": "sha512-b1S7B1k9ohZ+iNTi2ATxbRYG9fTrJmUT0rc46bvVnNxqNRGW7dyo/vRREwyniI5IRN2RSJHDcm+s3BjWrSAjHw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@antfu/install-pkg": "^1.1.0", + "@iconify/types": "^2.0.0", + "import-meta-resolve": "^4.2.0" + } + }, "node_modules/@isaacs/fs-minipass": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/@isaacs/fs-minipass/-/fs-minipass-4.0.1.tgz", @@ -480,6 +528,307 @@ "node": ">=18.0.0" } }, + "node_modules/@mermaid-js/parser": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@mermaid-js/parser/-/parser-1.2.0.tgz", + "integrity": "sha512-oYPyv8A4As1yH5Bx+04iQEQxXuIQDe0GKCNSRgao6z8AM9jixXIfP0vsppRLvGf+nKIOb9/LdpWA4YuJiVvESA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@chevrotain/types": "~11.1.2" + } + }, + "node_modules/@types/d3": { + "version": "7.4.3", + "resolved": "https://registry.npmjs.org/@types/d3/-/d3-7.4.3.tgz", + "integrity": "sha512-lZXZ9ckh5R8uiFVt8ogUNf+pIrK4EsWrx2Np75WvF/eTpJ0FMHNhjXk8CKEx/+gpHbNQyJWehbFaTvqmHWB3ww==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/d3-array": "*", + "@types/d3-axis": "*", + "@types/d3-brush": "*", + "@types/d3-chord": "*", + "@types/d3-color": "*", + "@types/d3-contour": "*", + "@types/d3-delaunay": "*", + "@types/d3-dispatch": "*", + "@types/d3-drag": "*", + "@types/d3-dsv": "*", + "@types/d3-ease": "*", + "@types/d3-fetch": "*", + "@types/d3-force": "*", + "@types/d3-format": "*", + "@types/d3-geo": "*", + "@types/d3-hierarchy": "*", + "@types/d3-interpolate": "*", + "@types/d3-path": "*", + "@types/d3-polygon": "*", + "@types/d3-quadtree": "*", + "@types/d3-random": "*", + "@types/d3-scale": "*", + "@types/d3-scale-chromatic": "*", + "@types/d3-selection": "*", + "@types/d3-shape": "*", + "@types/d3-time": "*", + "@types/d3-time-format": "*", + "@types/d3-timer": "*", + "@types/d3-transition": "*", + "@types/d3-zoom": "*" + } + }, + "node_modules/@types/d3-array": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/@types/d3-array/-/d3-array-3.2.2.tgz", + "integrity": "sha512-hOLWVbm7uRza0BYXpIIW5pxfrKe0W+D5lrFiAEYR+pb6w3N2SwSMaJbXdUfSEv+dT4MfHBLtn5js0LAWaO6otw==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/d3-axis": { + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/@types/d3-axis/-/d3-axis-3.0.6.tgz", + "integrity": "sha512-pYeijfZuBd87T0hGn0FO1vQ/cgLk6E1ALJjfkC0oJ8cbwkZl3TpgS8bVBLZN+2jjGgg38epgxb2zmoGtSfvgMw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/d3-selection": "*" + } + }, + "node_modules/@types/d3-brush": { + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/@types/d3-brush/-/d3-brush-3.0.6.tgz", + "integrity": "sha512-nH60IZNNxEcrh6L1ZSMNA28rj27ut/2ZmI3r96Zd+1jrZD++zD3LsMIjWlvg4AYrHn/Pqz4CF3veCxGjtbqt7A==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/d3-selection": "*" + } + }, + "node_modules/@types/d3-chord": { + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/@types/d3-chord/-/d3-chord-3.0.6.tgz", + "integrity": "sha512-LFYWWd8nwfwEmTZG9PfQxd17HbNPksHBiJHaKuY1XeqscXacsS2tyoo6OdRsjf+NQYeB6XrNL3a25E3gH69lcg==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/d3-color": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/@types/d3-color/-/d3-color-3.1.3.tgz", + "integrity": "sha512-iO90scth9WAbmgv7ogoq57O9YpKmFBbmoEoCHDB2xMBY0+/KVrqAaCDyCE16dUspeOvIxFFRI+0sEtqDqy2b4A==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/d3-contour": { + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/@types/d3-contour/-/d3-contour-3.0.6.tgz", + "integrity": "sha512-BjzLgXGnCWjUSYGfH1cpdo41/hgdWETu4YxpezoztawmqsvCeep+8QGfiY6YbDvfgHz/DkjeIkkZVJavB4a3rg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/d3-array": "*", + "@types/geojson": "*" + } + }, + "node_modules/@types/d3-delaunay": { + "version": "6.0.4", + "resolved": "https://registry.npmjs.org/@types/d3-delaunay/-/d3-delaunay-6.0.4.tgz", + "integrity": "sha512-ZMaSKu4THYCU6sV64Lhg6qjf1orxBthaC161plr5KuPHo3CNm8DTHiLw/5Eq2b6TsNP0W0iJrUOFscY6Q450Hw==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/d3-dispatch": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/@types/d3-dispatch/-/d3-dispatch-3.0.7.tgz", + "integrity": "sha512-5o9OIAdKkhN1QItV2oqaE5KMIiXAvDWBDPrD85e58Qlz1c1kI/J0NcqbEG88CoTwJrYe7ntUCVfeUl2UJKbWgA==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/d3-drag": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/@types/d3-drag/-/d3-drag-3.0.7.tgz", + "integrity": "sha512-HE3jVKlzU9AaMazNufooRJ5ZpWmLIoc90A37WU2JMmeq28w1FQqCZswHZ3xR+SuxYftzHq6WU6KJHvqxKzTxxQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/d3-selection": "*" + } + }, + "node_modules/@types/d3-dsv": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/@types/d3-dsv/-/d3-dsv-3.0.7.tgz", + "integrity": "sha512-n6QBF9/+XASqcKK6waudgL0pf/S5XHPPI8APyMLLUHd8NqouBGLsU8MgtO7NINGtPBtk9Kko/W4ea0oAspwh9g==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/d3-ease": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/@types/d3-ease/-/d3-ease-3.0.2.tgz", + "integrity": "sha512-NcV1JjO5oDzoK26oMzbILE6HW7uVXOHLQvHshBUW4UMdZGfiY6v5BeQwh9a9tCzv+CeefZQHJt5SRgK154RtiA==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/d3-fetch": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/@types/d3-fetch/-/d3-fetch-3.0.7.tgz", + "integrity": "sha512-fTAfNmxSb9SOWNB9IoG5c8Hg6R+AzUHDRlsXsDZsNp6sxAEOP0tkP3gKkNSO/qmHPoBFTxNrjDprVHDQDvo5aA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/d3-dsv": "*" + } + }, + "node_modules/@types/d3-force": { + "version": "3.0.10", + "resolved": "https://registry.npmjs.org/@types/d3-force/-/d3-force-3.0.10.tgz", + "integrity": "sha512-ZYeSaCF3p73RdOKcjj+swRlZfnYpK1EbaDiYICEEp5Q6sUiqFaFQ9qgoshp5CzIyyb/yD09kD9o2zEltCexlgw==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/d3-format": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/@types/d3-format/-/d3-format-3.0.4.tgz", + "integrity": "sha512-fALi2aI6shfg7vM5KiR1wNJnZ7r6UuggVqtDA+xiEdPZQwy/trcQaHnwShLuLdta2rTymCNpxYTiMZX/e09F4g==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/d3-geo": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@types/d3-geo/-/d3-geo-3.1.0.tgz", + "integrity": "sha512-856sckF0oP/diXtS4jNsiQw/UuK5fQG8l/a9VVLeSouf1/PPbBE1i1W852zVwKwYCBkFJJB7nCFTbk6UMEXBOQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/geojson": "*" + } + }, + "node_modules/@types/d3-hierarchy": { + "version": "3.1.7", + "resolved": "https://registry.npmjs.org/@types/d3-hierarchy/-/d3-hierarchy-3.1.7.tgz", + "integrity": "sha512-tJFtNoYBtRtkNysX1Xq4sxtjK8YgoWUNpIiUee0/jHGRwqvzYxkq0hGVbbOGSz+JgFxxRu4K8nb3YpG3CMARtg==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/d3-interpolate": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/@types/d3-interpolate/-/d3-interpolate-3.0.4.tgz", + "integrity": "sha512-mgLPETlrpVV1YRJIglr4Ez47g7Yxjl1lj7YKsiMCb27VJH9W8NVM6Bb9d8kkpG/uAQS5AmbA48q2IAolKKo1MA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/d3-color": "*" + } + }, + "node_modules/@types/d3-path": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/@types/d3-path/-/d3-path-3.1.1.tgz", + "integrity": "sha512-VMZBYyQvbGmWyWVea0EHs/BwLgxc+MKi1zLDCONksozI4YJMcTt8ZEuIR4Sb1MMTE8MMW49v0IwI5+b7RmfWlg==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/d3-polygon": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/@types/d3-polygon/-/d3-polygon-3.0.2.tgz", + "integrity": "sha512-ZuWOtMaHCkN9xoeEMr1ubW2nGWsp4nIql+OPQRstu4ypeZ+zk3YKqQT0CXVe/PYqrKpZAi+J9mTs05TKwjXSRA==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/d3-quadtree": { + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/@types/d3-quadtree/-/d3-quadtree-3.0.6.tgz", + "integrity": "sha512-oUzyO1/Zm6rsxKRHA1vH0NEDG58HrT5icx/azi9MF1TWdtttWl0UIUsjEQBBh+SIkrpd21ZjEv7ptxWys1ncsg==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/d3-random": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/@types/d3-random/-/d3-random-3.0.4.tgz", + "integrity": "sha512-UHYId5WTCx4L4YNel7NU00XUXXgvgpgZOvp10PuvsQENjMDXhh2RyFc0KBjO7B45ne4Ha1yVH7ii0vnzKkuzWA==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/d3-scale": { + "version": "4.0.9", + "resolved": "https://registry.npmjs.org/@types/d3-scale/-/d3-scale-4.0.9.tgz", + "integrity": "sha512-dLmtwB8zkAeO/juAMfnV+sItKjlsw2lKdZVVy6LRr0cBmegxSABiLEpGVmSJJ8O08i4+sGR6qQtb6WtuwJdvVw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/d3-time": "*" + } + }, + "node_modules/@types/d3-scale-chromatic": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@types/d3-scale-chromatic/-/d3-scale-chromatic-3.1.0.tgz", + "integrity": "sha512-iWMJgwkK7yTRmWqRB5plb1kadXyQ5Sj8V/zYlFGMUBbIPKQScw+Dku9cAAMgJG+z5GYDoMjWGLVOvjghDEFnKQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/d3-selection": { + "version": "3.0.11", + "resolved": "https://registry.npmjs.org/@types/d3-selection/-/d3-selection-3.0.11.tgz", + "integrity": "sha512-bhAXu23DJWsrI45xafYpkQ4NtcKMwWnAC/vKrd2l+nxMFuvOT3XMYTIj2opv8vq8AO5Yh7Qac/nSeP/3zjTK0w==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/d3-shape": { + "version": "3.1.8", + "resolved": "https://registry.npmjs.org/@types/d3-shape/-/d3-shape-3.1.8.tgz", + "integrity": "sha512-lae0iWfcDeR7qt7rA88BNiqdvPS5pFVPpo5OfjElwNaT2yyekbM0C9vK+yqBqEmHr6lDkRnYNoTBYlAgJa7a4w==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/d3-path": "*" + } + }, + "node_modules/@types/d3-time": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/@types/d3-time/-/d3-time-3.0.4.tgz", + "integrity": "sha512-yuzZug1nkAAaBlBBikKZTgzCeA+k1uy4ZFwWANOfKw5z5LRhV0gNA7gNkKm7HoK+HRN0wX3EkxGk0fpbWhmB7g==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/d3-time-format": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/@types/d3-time-format/-/d3-time-format-4.0.3.tgz", + "integrity": "sha512-5xg9rC+wWL8kdDj153qZcsJ0FWiFt0J5RB6LYUNZjwSnesfblqrI/bJ1wBdJ8OQfncgbJG5+2F+qfqnqyzYxyg==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/d3-timer": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/@types/d3-timer/-/d3-timer-3.0.2.tgz", + "integrity": "sha512-Ps3T8E8dZDam6fUyNiMkekK3XUsaUEik+idO9/YjPtfj2qruF8tFBXS7XhtE4iIXBLxhmLjP3SXpLhVf21I9Lw==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/d3-transition": { + "version": "3.0.9", + "resolved": "https://registry.npmjs.org/@types/d3-transition/-/d3-transition-3.0.9.tgz", + "integrity": "sha512-uZS5shfxzO3rGlu0cC3bjmMFKsXv+SmZZcgp0KD22ts4uGXp5EVYGzu/0YdwZeKmddhcAccYtREJKkPfXkZuCg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/d3-selection": "*" + } + }, + "node_modules/@types/d3-zoom": { + "version": "3.0.8", + "resolved": "https://registry.npmjs.org/@types/d3-zoom/-/d3-zoom-3.0.8.tgz", + "integrity": "sha512-iqMC4/YlFCSlO8+2Ii1GGGliCAY4XdeG748w5vQUbevlbDu0zSjH/+jojorQVBK/se0j6DUFNPBGSqD3YWYnDw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/d3-interpolate": "*", + "@types/d3-selection": "*" + } + }, + "node_modules/@types/geojson": { + "version": "7946.0.16", + "resolved": "https://registry.npmjs.org/@types/geojson/-/geojson-7946.0.16.tgz", + "integrity": "sha512-6C8nqWur3j98U6+lXDfTUWIfgvZU+EumvpHKcYjujKH7woYyLj2sUmff0tRhrqM7BohUw7Pz3ZB1jj2gW9Fvmg==", + "dev": true, + "license": "MIT" + }, "node_modules/@types/node": { "version": "25.9.1", "resolved": "https://registry.npmjs.org/@types/node/-/node-25.9.1.tgz", @@ -497,6 +846,14 @@ "dev": true, "license": "MIT" }, + "node_modules/@types/trusted-types": { + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/@types/trusted-types/-/trusted-types-2.0.7.tgz", + "integrity": "sha512-ScaPdn1dQczgbl0QFTeTOmVHFULt394XJgOQNoyVhZ6r2vLnMLJfBPd53SB52T/3G36VI1/g2MZaX0cwDuXsfw==", + "dev": true, + "license": "MIT", + "optional": true + }, "node_modules/@types/vscode": { "version": "1.120.0", "resolved": "https://registry.npmjs.org/@types/vscode/-/vscode-1.120.0.tgz", @@ -504,6 +861,17 @@ "dev": true, "license": "MIT" }, + "node_modules/@upsetjs/venn.js": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@upsetjs/venn.js/-/venn.js-2.0.0.tgz", + "integrity": "sha512-WbBhLrooyePuQ1VZxrJjtLvTc4NVfpOyKx0sKqioq9bX1C1m7Jgykkn8gLrtwumBioXIqam8DLxp88Adbue6Hw==", + "dev": true, + "license": "MIT", + "optionalDependencies": { + "d3-selection": "^3.0.0", + "d3-transition": "^3.0.1" + } + }, "node_modules/@zip.js/zip.js": { "version": "2.8.26", "resolved": "https://registry.npmjs.org/@zip.js/zip.js/-/zip.js-2.8.26.tgz", @@ -540,118 +908,911 @@ "node": ">= 12" } }, - "node_modules/esbuild": { - "version": "0.28.1", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.28.1.tgz", - "integrity": "sha512-HrJrvZv5ayxBzPfwphOoNzkzOIIlifzk0KJrGK2c8R4+LKpMtpYLQeUdjnwjWv/LZlkH2laZk+4w78pi99D4Vw==", + "node_modules/cose-base": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/cose-base/-/cose-base-1.0.3.tgz", + "integrity": "sha512-s9whTXInMSgAp/NVXVNuVxVKzGH2qck3aQlVHxDCdAEPgtMKwc4Wq6/QKhgdEdgbLSi9rBTAcPoRa6JpiG4ksg==", + "dev": true, + "license": "MIT", + "dependencies": { + "layout-base": "^1.0.0" + } + }, + "node_modules/cytoscape": { + "version": "3.34.0", + "resolved": "https://registry.npmjs.org/cytoscape/-/cytoscape-3.34.0.tgz", + "integrity": "sha512-62rNSrioXw93uliKFBwjukeQyeWwH2PqDrTac31r2P6464u3AUvTk0xS4LVvT251g7IgkFunrI48ZEZGjywSOg==", "dev": true, - "hasInstallScript": true, "license": "MIT", - "bin": { - "esbuild": "bin/esbuild" - }, "engines": { - "node": ">=18" - }, - "optionalDependencies": { - "@esbuild/aix-ppc64": "0.28.1", - "@esbuild/android-arm": "0.28.1", - "@esbuild/android-arm64": "0.28.1", - "@esbuild/android-x64": "0.28.1", - "@esbuild/darwin-arm64": "0.28.1", - "@esbuild/darwin-x64": "0.28.1", - "@esbuild/freebsd-arm64": "0.28.1", - "@esbuild/freebsd-x64": "0.28.1", - "@esbuild/linux-arm": "0.28.1", - "@esbuild/linux-arm64": "0.28.1", - "@esbuild/linux-ia32": "0.28.1", - "@esbuild/linux-loong64": "0.28.1", - "@esbuild/linux-mips64el": "0.28.1", - "@esbuild/linux-ppc64": "0.28.1", - "@esbuild/linux-riscv64": "0.28.1", - "@esbuild/linux-s390x": "0.28.1", - "@esbuild/linux-x64": "0.28.1", - "@esbuild/netbsd-arm64": "0.28.1", - "@esbuild/netbsd-x64": "0.28.1", - "@esbuild/openbsd-arm64": "0.28.1", - "@esbuild/openbsd-x64": "0.28.1", - "@esbuild/openharmony-arm64": "0.28.1", - "@esbuild/sunos-x64": "0.28.1", - "@esbuild/win32-arm64": "0.28.1", - "@esbuild/win32-ia32": "0.28.1", - "@esbuild/win32-x64": "0.28.1" + "node": ">=0.10" } }, - "node_modules/katex": { - "version": "0.16.22", - "resolved": "https://registry.npmjs.org/katex/-/katex-0.16.22.tgz", - "integrity": "sha512-XCHRdUw4lf3SKBaJe4EvgqIuWwkPSo9XoeO8GjQW94Bp7TWv9hNhzZjZ+OH9yf1UmLygb7DIT5GSFQiyt16zYg==", + "node_modules/cytoscape-cose-bilkent": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/cytoscape-cose-bilkent/-/cytoscape-cose-bilkent-4.1.0.tgz", + "integrity": "sha512-wgQlVIUJF13Quxiv5e1gstZ08rnZj2XaLHGoFMYXz7SkNfCDOOteKBE6SYRfA9WxxI/iBc3ajfDoc6hb/MRAHQ==", "dev": true, - "funding": [ - "https://opencollective.com/katex", - "https://github.com/sponsors/katex" - ], "license": "MIT", "dependencies": { - "commander": "^8.3.0" + "cose-base": "^1.0.0" }, - "bin": { - "katex": "cli.js" + "peerDependencies": { + "cytoscape": "^3.2.0" } }, - "node_modules/minimatch": { - "version": "5.1.9", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.9.tgz", - "integrity": "sha512-7o1wEA2RyMP7Iu7GNba9vc0RWWGACJOCZBJX2GJWip0ikV+wcOsgVuY9uE8CPiyQhkGFSlhuSkZPavN7u1c2Fw==", - "license": "ISC", + "node_modules/cytoscape-fcose": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/cytoscape-fcose/-/cytoscape-fcose-2.2.0.tgz", + "integrity": "sha512-ki1/VuRIHFCzxWNrsshHYPs6L7TvLu3DL+TyIGEsRcvVERmxokbf5Gdk7mFxZnTdiGtnA4cfSmjZJMviqSuZrQ==", + "dev": true, + "license": "MIT", "dependencies": { - "brace-expansion": "^2.0.1" + "cose-base": "^2.2.0" }, - "engines": { - "node": ">=10" + "peerDependencies": { + "cytoscape": "^3.2.0" } }, - "node_modules/minipass": { - "version": "7.1.3", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.3.tgz", - "integrity": "sha512-tEBHqDnIoM/1rXME1zgka9g6Q2lcoCkxHLuc7ODJ5BxbP5d4c2Z5cGgtXAku59200Cx7diuHTOYfSBD8n6mm8A==", - "license": "BlueOak-1.0.0", - "engines": { - "node": ">=16 || 14 >=14.17" + "node_modules/cytoscape-fcose/node_modules/cose-base": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/cose-base/-/cose-base-2.2.0.tgz", + "integrity": "sha512-AzlgcsCbUMymkADOJtQm3wO9S3ltPfYOFD5033keQn9NJzIbtnZj+UdBJe7DYml/8TdbtHJW3j58SOnKhWY/5g==", + "dev": true, + "license": "MIT", + "dependencies": { + "layout-base": "^2.0.0" } }, - "node_modules/minizlib": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-3.1.0.tgz", - "integrity": "sha512-KZxYo1BUkWD2TVFLr0MQoM8vUUigWD3LlD83a/75BqC+4qE0Hb1Vo5v1FgcfaNXvfXzr+5EhQ6ing/CaBijTlw==", - "license": "MIT", + "node_modules/cytoscape-fcose/node_modules/layout-base": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/layout-base/-/layout-base-2.0.1.tgz", + "integrity": "sha512-dp3s92+uNI1hWIpPGH3jK2kxE2lMjdXdr+DH8ynZHpd6PUlH6x6cbuXnoMmiNumznqaNO31xu9e79F0uuZ0JFg==", + "dev": true, + "license": "MIT" + }, + "node_modules/d3": { + "version": "7.9.0", + "resolved": "https://registry.npmjs.org/d3/-/d3-7.9.0.tgz", + "integrity": "sha512-e1U46jVP+w7Iut8Jt8ri1YsPOvFpg46k+K8TpCb0P+zjCkjkPnV7WzfDJzMHy1LnA+wj5pLT1wjO901gLXeEhA==", + "dev": true, + "license": "ISC", "dependencies": { - "minipass": "^7.1.2" + "d3-array": "3", + "d3-axis": "3", + "d3-brush": "3", + "d3-chord": "3", + "d3-color": "3", + "d3-contour": "4", + "d3-delaunay": "6", + "d3-dispatch": "3", + "d3-drag": "3", + "d3-dsv": "3", + "d3-ease": "3", + "d3-fetch": "3", + "d3-force": "3", + "d3-format": "3", + "d3-geo": "3", + "d3-hierarchy": "3", + "d3-interpolate": "3", + "d3-path": "3", + "d3-polygon": "3", + "d3-quadtree": "3", + "d3-random": "3", + "d3-scale": "4", + "d3-scale-chromatic": "3", + "d3-selection": "3", + "d3-shape": "3", + "d3-time": "3", + "d3-time-format": "4", + "d3-timer": "3", + "d3-transition": "3", + "d3-zoom": "3" }, "engines": { - "node": ">= 18" + "node": ">=12" } }, - "node_modules/semver": { - "version": "7.8.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.8.4.tgz", - "integrity": "sha512-rUCObTnP32Q08R2uuIrt7r9PlEonuTmtuXYcW6s5kjdlj3xbnwe+21yXptAUYcMAABLkYYTtnmzb3w3EDZfueA==", + "node_modules/d3-array": { + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/d3-array/-/d3-array-3.2.4.tgz", + "integrity": "sha512-tdQAmyA18i4J7wprpYq8ClcxZy3SC31QMeByyCFyRt7BVHdREQZ5lpzoe5mFEYZUWe+oq8HBvk9JjpibyEV4Jg==", + "dev": true, "license": "ISC", - "bin": { - "semver": "bin/semver.js" + "dependencies": { + "internmap": "1 - 2" }, "engines": { - "node": ">=10" + "node": ">=12" } }, - "node_modules/tar": { - "version": "7.5.20", - "resolved": "https://registry.npmjs.org/tar/-/tar-7.5.20.tgz", - "integrity": "sha512-9FcyK4PA6+WbzlTM9WhQm6vB5W7cP7dUiPsv1g7YDwEQnQ1CGpK3MGlKk/ITVWMk05kHZuBhmVhiv8LZoy/PFQ==", - "license": "BlueOak-1.0.0", - "dependencies": { - "@isaacs/fs-minipass": "^4.0.0", - "chownr": "^3.0.0", + "node_modules/d3-axis": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/d3-axis/-/d3-axis-3.0.0.tgz", + "integrity": "sha512-IH5tgjV4jE/GhHkRV0HiVYPDtvfjHQlQfJHs0usq7M30XcSBvOotpmH1IgkcXsO/5gEQZD43B//fc7SRT5S+xw==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-brush": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/d3-brush/-/d3-brush-3.0.0.tgz", + "integrity": "sha512-ALnjWlVYkXsVIGlOsuWH1+3udkYFI48Ljihfnh8FZPF2QS9o+PzGLBslO0PjzVoHLZ2KCVgAM8NVkXPJB2aNnQ==", + "dev": true, + "license": "ISC", + "dependencies": { + "d3-dispatch": "1 - 3", + "d3-drag": "2 - 3", + "d3-interpolate": "1 - 3", + "d3-selection": "3", + "d3-transition": "3" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-chord": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/d3-chord/-/d3-chord-3.0.1.tgz", + "integrity": "sha512-VE5S6TNa+j8msksl7HwjxMHDM2yNK3XCkusIlpX5kwauBfXuyLAtNg9jCp/iHH61tgI4sb6R/EIMWCqEIdjT/g==", + "dev": true, + "license": "ISC", + "dependencies": { + "d3-path": "1 - 3" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-color": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/d3-color/-/d3-color-3.1.0.tgz", + "integrity": "sha512-zg/chbXyeBtMQ1LbD/WSoW2DpC3I0mpmPdW+ynRTj/x2DAWYrIY7qeZIHidozwV24m4iavr15lNwIwLxRmOxhA==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-contour": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/d3-contour/-/d3-contour-4.0.2.tgz", + "integrity": "sha512-4EzFTRIikzs47RGmdxbeUvLWtGedDUNkTcmzoeyg4sP/dvCexO47AaQL7VKy/gul85TOxw+IBgA8US2xwbToNA==", + "dev": true, + "license": "ISC", + "dependencies": { + "d3-array": "^3.2.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-delaunay": { + "version": "6.0.4", + "resolved": "https://registry.npmjs.org/d3-delaunay/-/d3-delaunay-6.0.4.tgz", + "integrity": "sha512-mdjtIZ1XLAM8bm/hx3WwjfHt6Sggek7qH043O8KEjDXN40xi3vx/6pYSVTwLjEgiXQTbvaouWKynLBiUZ6SK6A==", + "dev": true, + "license": "ISC", + "dependencies": { + "delaunator": "5" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-dispatch": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/d3-dispatch/-/d3-dispatch-3.0.1.tgz", + "integrity": "sha512-rzUyPU/S7rwUflMyLc1ETDeBj0NRuHKKAcvukozwhshr6g6c5d8zh4c2gQjY2bZ0dXeGLWc1PF174P2tVvKhfg==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-drag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/d3-drag/-/d3-drag-3.0.0.tgz", + "integrity": "sha512-pWbUJLdETVA8lQNJecMxoXfH6x+mO2UQo8rSmZ+QqxcbyA3hfeprFgIT//HW2nlHChWeIIMwS2Fq+gEARkhTkg==", + "dev": true, + "license": "ISC", + "dependencies": { + "d3-dispatch": "1 - 3", + "d3-selection": "3" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-dsv": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/d3-dsv/-/d3-dsv-3.0.1.tgz", + "integrity": "sha512-UG6OvdI5afDIFP9w4G0mNq50dSOsXHJaRE8arAS5o9ApWnIElp8GZw1Dun8vP8OyHOZ/QJUKUJwxiiCCnUwm+Q==", + "dev": true, + "license": "ISC", + "dependencies": { + "commander": "7", + "iconv-lite": "0.6", + "rw": "1" + }, + "bin": { + "csv2json": "bin/dsv2json.js", + "csv2tsv": "bin/dsv2dsv.js", + "dsv2dsv": "bin/dsv2dsv.js", + "dsv2json": "bin/dsv2json.js", + "json2csv": "bin/json2dsv.js", + "json2dsv": "bin/json2dsv.js", + "json2tsv": "bin/json2dsv.js", + "tsv2csv": "bin/dsv2dsv.js", + "tsv2json": "bin/dsv2json.js" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-dsv/node_modules/commander": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-7.2.0.tgz", + "integrity": "sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 10" + } + }, + "node_modules/d3-ease": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/d3-ease/-/d3-ease-3.0.1.tgz", + "integrity": "sha512-wR/XK3D3XcLIZwpbvQwQ5fK+8Ykds1ip7A2Txe0yxncXSdq1L9skcG7blcedkOX+ZcgxGAmLX1FrRGbADwzi0w==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-fetch": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/d3-fetch/-/d3-fetch-3.0.1.tgz", + "integrity": "sha512-kpkQIM20n3oLVBKGg6oHrUchHM3xODkTzjMoj7aWQFq5QEM+R6E4WkzT5+tojDY7yjez8KgCBRoj4aEr99Fdqw==", + "dev": true, + "license": "ISC", + "dependencies": { + "d3-dsv": "1 - 3" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-force": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/d3-force/-/d3-force-3.0.0.tgz", + "integrity": "sha512-zxV/SsA+U4yte8051P4ECydjD/S+qeYtnaIyAs9tgHCqfguma/aAQDjo85A9Z6EKhBirHRJHXIgJUlffT4wdLg==", + "dev": true, + "license": "ISC", + "dependencies": { + "d3-dispatch": "1 - 3", + "d3-quadtree": "1 - 3", + "d3-timer": "1 - 3" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-format": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/d3-format/-/d3-format-3.1.2.tgz", + "integrity": "sha512-AJDdYOdnyRDV5b6ArilzCPPwc1ejkHcoyFarqlPqT7zRYjhavcT3uSrqcMvsgh2CgoPbK3RCwyHaVyxYcP2Arg==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-geo": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/d3-geo/-/d3-geo-3.1.1.tgz", + "integrity": "sha512-637ln3gXKXOwhalDzinUgY83KzNWZRKbYubaG+fGVuc/dxO64RRljtCTnf5ecMyE1RIdtqpkVcq0IbtU2S8j2Q==", + "dev": true, + "license": "ISC", + "dependencies": { + "d3-array": "2.5.0 - 3" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-hierarchy": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/d3-hierarchy/-/d3-hierarchy-3.1.2.tgz", + "integrity": "sha512-FX/9frcub54beBdugHjDCdikxThEqjnR93Qt7PvQTOHxyiNCAlvMrHhclk3cD5VeAaq9fxmfRp+CnWw9rEMBuA==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-interpolate": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/d3-interpolate/-/d3-interpolate-3.0.1.tgz", + "integrity": "sha512-3bYs1rOD33uo8aqJfKP3JWPAibgw8Zm2+L9vBKEHJ2Rg+viTR7o5Mmv5mZcieN+FRYaAOWX5SJATX6k1PWz72g==", + "dev": true, + "license": "ISC", + "dependencies": { + "d3-color": "1 - 3" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-path": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/d3-path/-/d3-path-3.1.0.tgz", + "integrity": "sha512-p3KP5HCf/bvjBSSKuXid6Zqijx7wIfNW+J/maPs+iwR35at5JCbLUT0LzF1cnjbCHWhqzQTIN2Jpe8pRebIEFQ==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-polygon": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/d3-polygon/-/d3-polygon-3.0.1.tgz", + "integrity": "sha512-3vbA7vXYwfe1SYhED++fPUQlWSYTTGmFmQiany/gdbiWgU/iEyQzyymwL9SkJjFFuCS4902BSzewVGsHHmHtXg==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-quadtree": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/d3-quadtree/-/d3-quadtree-3.0.1.tgz", + "integrity": "sha512-04xDrxQTDTCFwP5H6hRhsRcb9xxv2RzkcsygFzmkSIOJy3PeRJP7sNk3VRIbKXcog561P9oU0/rVH6vDROAgUw==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-random": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/d3-random/-/d3-random-3.0.1.tgz", + "integrity": "sha512-FXMe9GfxTxqd5D6jFsQ+DJ8BJS4E/fT5mqqdjovykEB2oFbTMDVdg1MGFxfQW+FBOGoB++k8swBrgwSHT1cUXQ==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-sankey": { + "version": "0.12.3", + "resolved": "https://registry.npmjs.org/d3-sankey/-/d3-sankey-0.12.3.tgz", + "integrity": "sha512-nQhsBRmM19Ax5xEIPLMY9ZmJ/cDvd1BG3UVvt5h3WRxKg5zGRbvnteTyWAbzeSvlh3tW7ZEmq4VwR5mB3tutmQ==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "d3-array": "1 - 2", + "d3-shape": "^1.2.0" + } + }, + "node_modules/d3-sankey/node_modules/d3-array": { + "version": "2.12.1", + "resolved": "https://registry.npmjs.org/d3-array/-/d3-array-2.12.1.tgz", + "integrity": "sha512-B0ErZK/66mHtEsR1TkPEEkwdy+WDesimkM5gpZr5Dsg54BiTA5RXtYW5qTLIAcekaS9xfZrzBLF/OAkB3Qn1YQ==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "internmap": "^1.0.0" + } + }, + "node_modules/d3-sankey/node_modules/d3-path": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/d3-path/-/d3-path-1.0.9.tgz", + "integrity": "sha512-VLaYcn81dtHVTjEHd8B+pbe9yHWpXKZUC87PzoFmsFrJqgFwDe/qxfp5MlfsfM1V5E/iVt0MmEbWQ7FVIXh/bg==", + "dev": true, + "license": "BSD-3-Clause" + }, + "node_modules/d3-sankey/node_modules/d3-shape": { + "version": "1.3.7", + "resolved": "https://registry.npmjs.org/d3-shape/-/d3-shape-1.3.7.tgz", + "integrity": "sha512-EUkvKjqPFUAZyOlhY5gzCxCeI0Aep04LwIRpsZ/mLFelJiUfnK56jo5JMDSE7yyP2kLSb6LtF+S5chMk7uqPqw==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "d3-path": "1" + } + }, + "node_modules/d3-sankey/node_modules/internmap": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/internmap/-/internmap-1.0.1.tgz", + "integrity": "sha512-lDB5YccMydFBtasVtxnZ3MRBHuaoE8GKsppq+EchKL2U4nK/DmEpPHNH8MZe5HkMtpSiTSOZwfN0tzYjO/lJEw==", + "dev": true, + "license": "ISC" + }, + "node_modules/d3-scale": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/d3-scale/-/d3-scale-4.0.2.tgz", + "integrity": "sha512-GZW464g1SH7ag3Y7hXjf8RoUuAFIqklOAq3MRl4OaWabTFJY9PN/E1YklhXLh+OQ3fM9yS2nOkCoS+WLZ6kvxQ==", + "dev": true, + "license": "ISC", + "dependencies": { + "d3-array": "2.10.0 - 3", + "d3-format": "1 - 3", + "d3-interpolate": "1.2.0 - 3", + "d3-time": "2.1.1 - 3", + "d3-time-format": "2 - 4" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-scale-chromatic": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/d3-scale-chromatic/-/d3-scale-chromatic-3.1.0.tgz", + "integrity": "sha512-A3s5PWiZ9YCXFye1o246KoscMWqf8BsD9eRiJ3He7C9OBaxKhAd5TFCdEx/7VbKtxxTsu//1mMJFrEt572cEyQ==", + "dev": true, + "license": "ISC", + "dependencies": { + "d3-color": "1 - 3", + "d3-interpolate": "1 - 3" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-selection": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/d3-selection/-/d3-selection-3.0.0.tgz", + "integrity": "sha512-fmTRWbNMmsmWq6xJV8D19U/gw/bwrHfNXxrIN+HfZgnzqTHp9jOmKMhsTUjXOJnZOdZY9Q28y4yebKzqDKlxlQ==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-shape": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/d3-shape/-/d3-shape-3.2.0.tgz", + "integrity": "sha512-SaLBuwGm3MOViRq2ABk3eLoxwZELpH6zhl3FbAoJ7Vm1gofKx6El1Ib5z23NUEhF9AsGl7y+dzLe5Cw2AArGTA==", + "dev": true, + "license": "ISC", + "dependencies": { + "d3-path": "^3.1.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-time": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/d3-time/-/d3-time-3.1.0.tgz", + "integrity": "sha512-VqKjzBLejbSMT4IgbmVgDjpkYrNWUYJnbCGo874u7MMKIWsILRX+OpX/gTk8MqjpT1A/c6HY2dCA77ZN0lkQ2Q==", + "dev": true, + "license": "ISC", + "dependencies": { + "d3-array": "2 - 3" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-time-format": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/d3-time-format/-/d3-time-format-4.1.0.tgz", + "integrity": "sha512-dJxPBlzC7NugB2PDLwo9Q8JiTR3M3e4/XANkreKSUxF8vvXKqm1Yfq4Q5dl8budlunRVlUUaDUgFt7eA8D6NLg==", + "dev": true, + "license": "ISC", + "dependencies": { + "d3-time": "1 - 3" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-timer": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/d3-timer/-/d3-timer-3.0.1.tgz", + "integrity": "sha512-ndfJ/JxxMd3nw31uyKoY2naivF+r29V+Lc0svZxe1JvvIRmi8hUsrMvdOwgS1o6uBHmiz91geQ0ylPP0aj1VUA==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-transition": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/d3-transition/-/d3-transition-3.0.1.tgz", + "integrity": "sha512-ApKvfjsSR6tg06xrL434C0WydLr7JewBB3V+/39RMHsaXTOG0zmt/OAXeng5M5LBm0ojmxJrpomQVZ1aPvBL4w==", + "dev": true, + "license": "ISC", + "dependencies": { + "d3-color": "1 - 3", + "d3-dispatch": "1 - 3", + "d3-ease": "1 - 3", + "d3-interpolate": "1 - 3", + "d3-timer": "1 - 3" + }, + "engines": { + "node": ">=12" + }, + "peerDependencies": { + "d3-selection": "2 - 3" + } + }, + "node_modules/d3-zoom": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/d3-zoom/-/d3-zoom-3.0.0.tgz", + "integrity": "sha512-b8AmV3kfQaqWAuacbPuNbL6vahnOJflOhexLzMMNLga62+/nh0JzvJ0aO/5a5MVgUFGS7Hu1P9P03o3fJkDCyw==", + "dev": true, + "license": "ISC", + "dependencies": { + "d3-dispatch": "1 - 3", + "d3-drag": "2 - 3", + "d3-interpolate": "1 - 3", + "d3-selection": "2 - 3", + "d3-transition": "2 - 3" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/dagre-d3-es": { + "version": "7.0.14", + "resolved": "https://registry.npmjs.org/dagre-d3-es/-/dagre-d3-es-7.0.14.tgz", + "integrity": "sha512-P4rFMVq9ESWqmOgK+dlXvOtLwYg0i7u0HBGJER0LZDJT2VHIPAMZ/riPxqJceWMStH5+E61QxFra9kIS3AqdMg==", + "dev": true, + "license": "MIT", + "dependencies": { + "d3": "^7.9.0", + "lodash-es": "^4.17.21" + } + }, + "node_modules/dayjs": { + "version": "1.11.21", + "resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.21.tgz", + "integrity": "sha512-98IT+HOahAisibz/yjKbzuOBwYcjJ7BCLPzARyHiyEBmRz4fatF+KPJszEHXsGYjUG234aH/cOjW1wwTbKUZlA==", + "dev": true, + "license": "MIT" + }, + "node_modules/delaunator": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/delaunator/-/delaunator-5.1.0.tgz", + "integrity": "sha512-AGrQ4QSgssa1NGmWmLPqN5NY2KajF5MqxetNEO+o0n3ZwZZeTmt7bBnvzHWrmkZFxGgr4HdyFgelzgi06otLuQ==", + "dev": true, + "license": "ISC", + "dependencies": { + "robust-predicates": "^3.0.2" + } + }, + "node_modules/dompurify": { + "version": "3.4.12", + "resolved": "https://registry.npmjs.org/dompurify/-/dompurify-3.4.12.tgz", + "integrity": "sha512-zQvGet8Z2sWbQhCmfFz/T5QWH2oBmjnqK3qvOjaqaNLrLEF912WamU+ohnTp0TCep/MFVHpdJuCZEdFOdTnEFg==", + "dev": true, + "license": "(MPL-2.0 OR Apache-2.0)", + "optionalDependencies": { + "@types/trusted-types": "^2.0.7" + } + }, + "node_modules/es-toolkit": { + "version": "1.49.0", + "resolved": "https://registry.npmjs.org/es-toolkit/-/es-toolkit-1.49.0.tgz", + "integrity": "sha512-G5iZ6Pc/FNRY/soKZHC+TxGDD83rHUDXxzaWhGCX44vAv/tMs56WMusnm/KMNK+luUPsgA9U28cGr4RDlSzL2g==", + "dev": true, + "license": "MIT", + "workspaces": [ + "docs", + "benchmarks" + ] + }, + "node_modules/esbuild": { + "version": "0.28.1", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.28.1.tgz", + "integrity": "sha512-HrJrvZv5ayxBzPfwphOoNzkzOIIlifzk0KJrGK2c8R4+LKpMtpYLQeUdjnwjWv/LZlkH2laZk+4w78pi99D4Vw==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=18" + }, + "optionalDependencies": { + "@esbuild/aix-ppc64": "0.28.1", + "@esbuild/android-arm": "0.28.1", + "@esbuild/android-arm64": "0.28.1", + "@esbuild/android-x64": "0.28.1", + "@esbuild/darwin-arm64": "0.28.1", + "@esbuild/darwin-x64": "0.28.1", + "@esbuild/freebsd-arm64": "0.28.1", + "@esbuild/freebsd-x64": "0.28.1", + "@esbuild/linux-arm": "0.28.1", + "@esbuild/linux-arm64": "0.28.1", + "@esbuild/linux-ia32": "0.28.1", + "@esbuild/linux-loong64": "0.28.1", + "@esbuild/linux-mips64el": "0.28.1", + "@esbuild/linux-ppc64": "0.28.1", + "@esbuild/linux-riscv64": "0.28.1", + "@esbuild/linux-s390x": "0.28.1", + "@esbuild/linux-x64": "0.28.1", + "@esbuild/netbsd-arm64": "0.28.1", + "@esbuild/netbsd-x64": "0.28.1", + "@esbuild/openbsd-arm64": "0.28.1", + "@esbuild/openbsd-x64": "0.28.1", + "@esbuild/openharmony-arm64": "0.28.1", + "@esbuild/sunos-x64": "0.28.1", + "@esbuild/win32-arm64": "0.28.1", + "@esbuild/win32-ia32": "0.28.1", + "@esbuild/win32-x64": "0.28.1" + } + }, + "node_modules/hachure-fill": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/hachure-fill/-/hachure-fill-0.5.2.tgz", + "integrity": "sha512-3GKBOn+m2LX9iq+JC1064cSFprJY4jL1jCXTcpnfER5HYE2l/4EfWSGzkPa/ZDBmYI0ZOEj5VHV/eKnPGkHuOg==", + "dev": true, + "license": "MIT" + }, + "node_modules/iconv-lite": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", + "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", + "dev": true, + "license": "MIT", + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/import-meta-resolve": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/import-meta-resolve/-/import-meta-resolve-4.2.0.tgz", + "integrity": "sha512-Iqv2fzaTQN28s/FwZAoFq0ZSs/7hMAHJVX+w8PZl3cY19Pxk6jFFalxQoIfW2826i/fDLXv8IiEZRIT0lDuWcg==", + "dev": true, + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/internmap": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/internmap/-/internmap-2.0.3.tgz", + "integrity": "sha512-5Hh7Y1wQbvY5ooGgPbDaL5iYLAPzMTUrjMulskHLH6wnv/A+1q5rgEaiuqEjB+oxGXIVZs1FF+R/KPN3ZSQYYg==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=12" + } + }, + "node_modules/katex": { + "version": "0.16.22", + "resolved": "https://registry.npmjs.org/katex/-/katex-0.16.22.tgz", + "integrity": "sha512-XCHRdUw4lf3SKBaJe4EvgqIuWwkPSo9XoeO8GjQW94Bp7TWv9hNhzZjZ+OH9yf1UmLygb7DIT5GSFQiyt16zYg==", + "dev": true, + "funding": [ + "https://opencollective.com/katex", + "https://github.com/sponsors/katex" + ], + "license": "MIT", + "dependencies": { + "commander": "^8.3.0" + }, + "bin": { + "katex": "cli.js" + } + }, + "node_modules/khroma": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/khroma/-/khroma-2.1.0.tgz", + "integrity": "sha512-Ls993zuzfayK269Svk9hzpeGUKob/sIgZzyHYdjQoAdQetRKpOLj+k/QQQ/6Qi0Yz65mlROrfd+Ev+1+7dz9Kw==", + "dev": true + }, + "node_modules/layout-base": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/layout-base/-/layout-base-1.0.2.tgz", + "integrity": "sha512-8h2oVEZNktL4BH2JCOI90iD1yXwL6iNW7KcCKT2QZgQJR2vbqDsldCTPRU9NifTCqHZci57XvQQ15YTu+sTYPg==", + "dev": true, + "license": "MIT" + }, + "node_modules/lodash-es": { + "version": "4.18.1", + "resolved": "https://registry.npmjs.org/lodash-es/-/lodash-es-4.18.1.tgz", + "integrity": "sha512-J8xewKD/Gk22OZbhpOVSwcs60zhd95ESDwezOFuA3/099925PdHJ7OFHNTGtajL3AlZkykD32HykiMo+BIBI8A==", + "dev": true, + "license": "MIT" + }, + "node_modules/marked": { + "version": "16.4.2", + "resolved": "https://registry.npmjs.org/marked/-/marked-16.4.2.tgz", + "integrity": "sha512-TI3V8YYWvkVf3KJe1dRkpnjs68JUPyEa5vjKrp1XEEJUAOaQc+Qj+L1qWbPd0SJuAdQkFU0h73sXXqwDYxsiDA==", + "dev": true, + "license": "MIT", + "bin": { + "marked": "bin/marked.js" + }, + "engines": { + "node": ">= 20" + } + }, + "node_modules/mermaid": { + "version": "11.16.0", + "resolved": "https://registry.npmjs.org/mermaid/-/mermaid-11.16.0.tgz", + "integrity": "sha512-Zvm3kbstgdpvIJPPItlL7fppIZ3kibvc1oZIGxdvk9t6UFz6flv+Jw7FtRGKwfcI8OckmH04LqG6LlS6X4B1pA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@braintree/sanitize-url": "^7.1.2", + "@iconify/utils": "^3.0.2", + "@mermaid-js/parser": "^1.2.0", + "@types/d3": "^7.4.3", + "@upsetjs/venn.js": "^2.0.0", + "cytoscape": "^3.33.3", + "cytoscape-cose-bilkent": "^4.1.0", + "cytoscape-fcose": "^2.2.0", + "d3": "^7.9.0", + "d3-sankey": "^0.12.3", + "dagre-d3-es": "7.0.14", + "dayjs": "^1.11.20", + "dompurify": "^3.3.3", + "es-toolkit": "^1.45.1", + "katex": "^0.16.45", + "khroma": "^2.1.0", + "marked": "^16.3.0", + "roughjs": "^4.6.6", + "stylis": "^4.3.6", + "ts-dedent": "^2.2.0", + "uuid": "^11.1.0 || ^12 || ^13 || ^14.0.0" + } + }, + "node_modules/mermaid/node_modules/katex": { + "version": "0.16.47", + "resolved": "https://registry.npmjs.org/katex/-/katex-0.16.47.tgz", + "integrity": "sha512-Eeo8Ys1doU1z+x8AZsPpQu+p/QcZBI5PeOo7QGQdy2x2m0MU/hYagBbGOmXwr5KVbEfVuWv9LpnQWeehogurjg==", + "dev": true, + "funding": [ + "https://opencollective.com/katex", + "https://github.com/sponsors/katex" + ], + "license": "MIT", + "dependencies": { + "commander": "^8.3.0" + }, + "bin": { + "katex": "cli.js" + } + }, + "node_modules/minimatch": { + "version": "5.1.9", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.9.tgz", + "integrity": "sha512-7o1wEA2RyMP7Iu7GNba9vc0RWWGACJOCZBJX2GJWip0ikV+wcOsgVuY9uE8CPiyQhkGFSlhuSkZPavN7u1c2Fw==", + "license": "ISC", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/minipass": { + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.3.tgz", + "integrity": "sha512-tEBHqDnIoM/1rXME1zgka9g6Q2lcoCkxHLuc7ODJ5BxbP5d4c2Z5cGgtXAku59200Cx7diuHTOYfSBD8n6mm8A==", + "license": "BlueOak-1.0.0", + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, + "node_modules/minizlib": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-3.1.0.tgz", + "integrity": "sha512-KZxYo1BUkWD2TVFLr0MQoM8vUUigWD3LlD83a/75BqC+4qE0Hb1Vo5v1FgcfaNXvfXzr+5EhQ6ing/CaBijTlw==", + "license": "MIT", + "dependencies": { + "minipass": "^7.1.2" + }, + "engines": { + "node": ">= 18" + } + }, + "node_modules/package-manager-detector": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/package-manager-detector/-/package-manager-detector-1.8.0.tgz", + "integrity": "sha512-yQA4H19AmPEoMUeavPMDIe1higySl/gH/yaQrkT/s07Qp+7pp2hYz30N3z2l5BkjVkF9Ow6o0wjJamm2y7Sn0A==", + "dev": true, + "license": "MIT" + }, + "node_modules/path-data-parser": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/path-data-parser/-/path-data-parser-0.1.0.tgz", + "integrity": "sha512-NOnmBpt5Y2RWbuv0LMzsayp3lVylAHLPUTut412ZA3l+C4uw4ZVkQbjShYCQ8TCpUMdPapr4YjUqLYD6v68j+w==", + "dev": true, + "license": "MIT" + }, + "node_modules/points-on-curve": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/points-on-curve/-/points-on-curve-0.2.0.tgz", + "integrity": "sha512-0mYKnYYe9ZcqMCWhUjItv/oHjvgEsfKvnUTg8sAtnHr3GVy7rGkXCb6d5cSyqrWqL4k81b9CPg3urd+T7aop3A==", + "dev": true, + "license": "MIT" + }, + "node_modules/points-on-path": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/points-on-path/-/points-on-path-0.2.1.tgz", + "integrity": "sha512-25ClnWWuw7JbWZcgqY/gJ4FQWadKxGWk+3kR/7kD0tCaDtPPMj7oHu2ToLaVhfpnHrZzYby2w6tUA0eOIuUg8g==", + "dev": true, + "license": "MIT", + "dependencies": { + "path-data-parser": "0.1.0", + "points-on-curve": "0.2.0" + } + }, + "node_modules/robust-predicates": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/robust-predicates/-/robust-predicates-3.0.3.tgz", + "integrity": "sha512-NS3levdsRIUOmiJ8FZWCP7LG3QpJyrs/TE0Zpf1yvZu8cAJJ6QMW92H1c7kWpdIHo8RvmLxN/o2JXTKHp74lUA==", + "dev": true, + "license": "Unlicense" + }, + "node_modules/roughjs": { + "version": "4.6.6", + "resolved": "https://registry.npmjs.org/roughjs/-/roughjs-4.6.6.tgz", + "integrity": "sha512-ZUz/69+SYpFN/g/lUlo2FXcIjRkSu3nDarreVdGGndHEBJ6cXPdKguS8JGxwj5HA5xIbVKSmLgr5b3AWxtRfvQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "hachure-fill": "^0.5.2", + "path-data-parser": "^0.1.0", + "points-on-curve": "^0.2.0", + "points-on-path": "^0.2.1" + } + }, + "node_modules/rw": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/rw/-/rw-1.3.3.tgz", + "integrity": "sha512-PdhdWy89SiZogBLaw42zdeqtRJ//zFd2PgQavcICDUgJT5oW10QCRKbJ6bg4r0/UY2M6BWd5tkxuGFRvCkgfHQ==", + "dev": true, + "license": "BSD-3-Clause" + }, + "node_modules/safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "dev": true, + "license": "MIT" + }, + "node_modules/semver": { + "version": "7.8.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.8.4.tgz", + "integrity": "sha512-rUCObTnP32Q08R2uuIrt7r9PlEonuTmtuXYcW6s5kjdlj3xbnwe+21yXptAUYcMAABLkYYTtnmzb3w3EDZfueA==", + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/stylis": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/stylis/-/stylis-4.4.0.tgz", + "integrity": "sha512-5Z9ZpRzfuH6l/UAvCPAPUo3665Nk2wLaZU3x+TLHKVzIz33+sbJqbtrYoC3KD4/uVOr2Zp+L0LySezP9OHV9yA==", + "dev": true, + "license": "MIT" + }, + "node_modules/tar": { + "version": "7.5.20", + "resolved": "https://registry.npmjs.org/tar/-/tar-7.5.20.tgz", + "integrity": "sha512-9FcyK4PA6+WbzlTM9WhQm6vB5W7cP7dUiPsv1g7YDwEQnQ1CGpK3MGlKk/ITVWMk05kHZuBhmVhiv8LZoy/PFQ==", + "license": "BlueOak-1.0.0", + "dependencies": { + "@isaacs/fs-minipass": "^4.0.0", + "chownr": "^3.0.0", "minipass": "^7.1.2", "minizlib": "^3.1.0", "yallist": "^5.0.0" @@ -678,6 +1839,26 @@ "node": ">=18" } }, + "node_modules/tinyexec": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/tinyexec/-/tinyexec-1.2.4.tgz", + "integrity": "sha512-SHf/r48b7vOrjve9PxJo3MN5v5yuyjHvdUcrQffT3WXMUfnGmHDVbC4k3sHJaJTgZCwpUplIaAo5ANtMyp3YHg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + } + }, + "node_modules/ts-dedent": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/ts-dedent/-/ts-dedent-2.3.0.tgz", + "integrity": "sha512-JfJeIHke7y2egdGGgRAvpCwYFUsHlM2gPcrVOxFkznt/4uzQ7HFmvE63iFHVLBJNDuyDOQgijDK/tXH/f6Msjg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.10" + } + }, "node_modules/typescript": { "version": "6.0.3", "resolved": "https://registry.npmjs.org/typescript/-/typescript-6.0.3.tgz", @@ -699,6 +1880,20 @@ "dev": true, "license": "MIT" }, + "node_modules/uuid": { + "version": "14.0.1", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-14.0.1.tgz", + "integrity": "sha512-6ZxzVpzDXDa3bJWaHilVayA+BH/1zmxCJoVgvmqJnid/gPoKHxUrS/aC/T6LGQtNHT+XHG9fXPJB4d+IrU30Ew==", + "dev": true, + "funding": [ + "https://github.com/sponsors/broofa", + "https://github.com/sponsors/ctavan" + ], + "license": "MIT", + "bin": { + "uuid": "dist-node/bin/uuid" + } + }, "node_modules/vscode-jsonrpc": { "version": "8.2.0", "resolved": "https://registry.npmjs.org/vscode-jsonrpc/-/vscode-jsonrpc-8.2.0.tgz", diff --git a/integrations/code/package.json b/integrations/code/package.json index e11a82e..6c5ca1c 100644 --- a/integrations/code/package.json +++ b/integrations/code/package.json @@ -41,6 +41,7 @@ "@types/vscode": "^1.100.0", "esbuild": "^0.28.1", "katex": "0.16.22", + "mermaid": "11.16.0", "typescript": "^6.0.3" }, "allowScripts": { diff --git a/integrations/code/src/preview.ts b/integrations/code/src/preview.ts index 246210b..bf22018 100644 --- a/integrations/code/src/preview.ts +++ b/integrations/code/src/preview.ts @@ -538,6 +538,9 @@ function previewHtml( const katexStylesheet = webview.asWebviewUri( vscode.Uri.joinPath(extensionUri, "media", "katex.min.css"), ); + const mermaid = webview.asWebviewUri( + vscode.Uri.joinPath(extensionUri, "media", "mermaid.js"), + ); const csp = [ "default-src 'none'", `img-src ${webview.cspSource} data: https:`, @@ -557,7 +560,8 @@ function previewHtml( .replaceAll("__STYLESHEET__", stylesheet.toString()) .replaceAll("__PALETTE__", palette.toString()) .replaceAll("__KATEX__", katex.toString()) - .replaceAll("__KATEX_STYLESHEET__", katexStylesheet.toString()); + .replaceAll("__KATEX_STYLESHEET__", katexStylesheet.toString()) + .replaceAll("__MERMAID__", mermaid.toString()); } /**